1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="67a93c3b-fd26-5b79-49e4-d68ef198ddce")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,671428,e=>{"use strict";var t=e.i(843476),r=e.i(647163);e.s(["Skeleton",0,function({className:e,...i}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,r.cn)("bg-accent animate-pulse rounded-md",e),...i})}])},23750,e=>{"use strict";var t=e.i(843476),r=e.i(647163);e.s(["Input",0,function({className:e,type:i,...n}){return(0,t.jsx)("input",{type:i,"data-slot":"input",className:(0,r.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}])},999682,e=>{"use strict";var t=e.i(271645);e.s(["usePrevious",0,function(e){let r=t.useRef({value:e,previous:e});return t.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}])},678784,e=>{"use strict";var t=e.i(678745);e.s(["CheckIcon",()=>t.default])},678745,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},635804,e=>{"use strict";var t=e.i(271645),r=e.i(934620);e.s(["useSize",0,function(e){let[i,n]=t.useState(void 0);return(0,r.useLayoutEffect)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let s=t[0];if("borderBoxSize"in s){let e=s.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),i}])},853660,e=>{"use strict";var t=e.i(271645),r=e.i(258950),i=e.i(953760),n=e.i(248425),s=e.i(843476),l=t.forwardRef((e,t)=>{let{children:r,width:i=10,height:l=5,...a}=e;return(0,s.jsx)(n.Primitive.svg,{...a,ref:t,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,s.jsx)("polygon",{points:"0,0 30,0 15,10"})})});l.displayName="Arrow";var a=e.i(820783),o=e.i(30030),d=e.i(30207),u=e.i(934620),c=e.i(635804),m="Popper",[f,h]=(0,o.createContextScope)(m),[p,x]=f(m),g=e=>{let{__scopePopper:r,children:i}=e,[n,l]=t.useState(null);return(0,s.jsx)(p,{scope:r,anchor:n,onAnchorChange:l,children:i})};g.displayName=m;var y="PopperAnchor",v=t.forwardRef((e,r)=>{let{__scopePopper:i,virtualRef:l,...o}=e,d=x(y,i),u=t.useRef(null),c=(0,a.useComposedRefs)(r,u),m=t.useRef(null);return t.useEffect(()=>{let e=m.current;m.current=l?.current||u.current,e!==m.current&&d.onAnchorChange(m.current)}),l?null:(0,s.jsx)(n.Primitive.div,{...o,ref:c})});v.displayName=y;var b="PopperContent",[w,j]=f(b),N=t.forwardRef((e,l)=>{let{__scopePopper:o,side:m="bottom",sideOffset:f=0,align:h="center",alignOffset:p=0,arrowPadding:g=0,avoidCollisions:y=!0,collisionBoundary:v=[],collisionPadding:j=0,sticky:N="partial",hideWhenDetached:k=!1,updatePositionStrategy:C="optimized",onPlaced:S,...O}=e,M=x(b,o),[P,E]=t.useState(null),T=(0,a.useComposedRefs)(l,e=>E(e)),[z,L]=t.useState(null),$=(0,c.useSize)(z),F=$?.width??0,B=$?.height??0,W="number"==typeof j?j:{top:0,right:0,bottom:0,left:0,...j},D=Array.isArray(v)?v:[v],_=D.length>0,U={padding:W,boundary:D.filter(A),altBoundary:_},{refs:Y,floatingStyles:V,placement:q,isPositioned:H,middlewareData:X}=(0,r.useFloating)({strategy:"fixed",placement:m+("center"!==h?"-"+h:""),whileElementsMounted:(...e)=>(0,i.autoUpdate)(...e,{animationFrame:"always"===C}),elements:{reference:M.anchor},middleware:[(0,r.offset)({mainAxis:f+B,alignmentAxis:p}),y&&(0,r.shift)({mainAxis:!0,crossAxis:!1,limiter:"partial"===N?(0,r.limitShift)():void 0,...U}),y&&(0,r.flip)({...U}
2),(0,r.size)({...U,apply:({elements:e,rects:t,availableWidth:r,availableHeight:i})=>{let{width:n,height:s}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${r}px`),l.setProperty("--radix-popper-available-height",`${i}px`),l.setProperty("--radix-popper-anchor-width",`${n}px`),l.setProperty("--radix-popper-anchor-height",`${s}px`)}}),z&&(0,r.arrow)({element:z,padding:g}),I({arrowWidth:F,arrowHeight:B}),k&&(0,r.hide)({strategy:"referenceHidden",...U})]}),[J,K]=R(q),Z=(0,d.useCallbackRef)(S);(0,u.useLayoutEffect)(()=>{H&&Z?.()},[H,Z]);let G=X.arrow?.x,Q=X.arrow?.y,ee=X.arrow?.centerOffset!==0,[et,er]=t.useState();return(0,u.useLayoutEffect)(()=>{P&&er(window.getComputedStyle(P).zIndex)},[P]),(0,s.jsx)("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:H?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:et,"--radix-popper-transform-origin":[X.transformOrigin?.x,X.transformOrigin?.y].join(" "),...X.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,s.jsx)(w,{scope:o,placedSide:J,onArrowChange:L,arrowX:G,arrowY:Q,shouldHideArrow:ee,children:(0,s.jsx)(n.Primitive.div,{"data-side":J,"data-align":K,...O,ref:T,style:{...O.style,animation:H?void 0:"none"}})})})});N.displayName=b;var k="PopperArrow",C={top:"bottom",right:"left",bottom:"top",left:"right"},S=t.forwardRef(function(e,t){let{__scopePopper:r,...i}=e,n=j(k,r),a=C[n.placedSide];return(0,s.jsx)("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:(0,s.jsx)(l,{...i,ref:t,style:{...i.style,display:"block"}})})});function A(e){return null!==e}S.displayName=k;var I=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:i,middlewareData:n}=t,s=n.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[o,d]=R(r),u={start:"0%",center:"50%",end:"100%"}[d],c=(n.arrow?.x??0)+l/2,m=(n.arrow?.y??0)+a/2,f="",h="";return"bottom"===o?(f=s?u:`${c}px`,h=`${-a}px`):"top"===o?(f=s?u:`${c}px`,h=`${i.floating.height+a}px`):"right"===o?(f=`${-a}px`,h=s?u:`${m}px`):"left"===o&&(f=`${i.floating.width+a}px`,h=s?u:`${m}px`),{data:{x:f,y:h}}}});function R(e){let[t,r="center"]=e.split("-");return[t,r]}e.s(["Anchor",0,v,"Arrow",0,S,"Content",0,N,"Root",0,g,"createPopperScope",0,h],853660)},296626,e=>{"use strict";var t=e.i(271645),r=e.i(820783),i=e.i(934620),n=e=>{var n;let l,a,{present:o,children:d}=e,u=function(e){var r,n;let[l,a]=t.useState(),o=t.useRef(null),d=t.useRef(e),u=t.useRef("none"),[c,m]=(r=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>n[e][t]??e,r));return t.useEffect(()=>{let e=s(o.current);u.current="mounted"===c?e:"none"},[c]),(0,i.useLayoutEffect)(()=>
2{let t=o.current,r=d.current;if(r!==e){let i=u.current,n=s(t);e?m("MOUNT"):"none"===n||t?.display==="none"?m("UNMOUNT"):r&&i!==n?m("ANIMATION_OUT"):m("UNMOUNT"),d.current=e}},[e,m]),(0,i.useLayoutEffect)(()=>{if(l){let e,t=l.ownerDocument.defaultView??window,r=r=>{let i=s(o.current).includes(CSS.escape(r.animationName));if(r.target===l&&i&&(m("ANIMATION_END"),!d.current)){let r=l.style.animationFillMode;l.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===l.style.animationFillMode&&(l.style.animationFillMode=r)})}},i=e=>{e.target===l&&(u.current=s(o.current))};return l.addEventListener("animationstart",i),l.addEventListener("animationcancel",r),l.addEventListener("animationend",r),()=>{t.clearTimeout(e),l.removeEventListener("animationstart",i),l.removeEventListener("animationcancel",r),l.removeEventListener("animationend",r)}}m("ANIMATION_END")},[l,m]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:t.useCallback(e=>{o.current=e?getComputedStyle(e):null,a(e)},[])}}(o),c="function"==typeof d?d({present:u.isPresent}):t.Children.only(d),m=(0,r.useComposedRefs)(u.ref,(n=c,(a=(l=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?n.ref:(a=(l=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?n.props.ref:n.props.ref||n.ref));return"function"==typeof d||u.isPresent?t.cloneElement(c,{ref:m}):null};function s(e){return e?.animationName||"none"}n.displayName="Presence",e.s(["Presence",0,n])},75830,e=>{"use strict";var t=e.i(271645),r=e.i(30030),i=e.i(820783),n=e.i(843476);function s(e){var r;let s,l=(r=e,(s=t.forwardRef((e,r)=>{let{children:n,...s}=e;if(t.isValidElement(n)){var l;let e,a,o=(l=n,(a=(e=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.ref:(a=(e=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.props.ref:l.props.ref||l.ref),d=function(e,t){let r={...t};for(let i in t){let n=e[i],s=t[i];/^on[A-Z]/.test(i)?n&&s?r[i]=(...e)=>{let t=s(...e);return n(...e),t}:n&&(r[i]=n):"style"===i?r[i]={...n,...s}:"className"===i&&(r[i]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}(s,n.props);return n.type!==t.Fragment&&(d.ref=r?(0,i.composeRefs)(r,o):o),t.cloneElement(n,d)}return t.Children.count(n)>1?t.Children.only(null):null})).displayName=`${r}.SlotClone`,s),o=t.forwardRef((e,r)=>{let{children:i,...s}=e,o=t.Children.toArray(i),d=o.find(a);if(d){let e=d.props.children,i=o.map(r=>r!==d?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,n.jsx)(l,{...s,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,i):null})}return(0,n.jsx)(l,{...s,ref:r,children:i})});return o.displayName=`${e}.Slot`,o}var l=Symbol("radix.slottable");function a(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===l}var o=new WeakMap;function d(e,t){var r,i;let n,s,l;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let a=(r=e,i=t,n=r.length,(l=(s=u(i))>=0?s:n+s)<0||l>=n?-1:l);return -1===a?void 0:e[a]}function u(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],o.set(this,!0)}set(e,t){return o.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let i,n=this.has(t),s=this.#e.length,l=u(e),a=l>=0?l:s+l,o=a<0||a>=s?-1:a;if(o===this.size||n&&o===this.size-1||-1===o)return this.set(t,r),this;let d=this.size+ +!n;l<0&&a++;let c=[...this.#e],m=!1;for(let e=a;e<d;e++)if(a===e){let s=c[e];c[e]===t&&(s=c[e+1]),n&&this.delete(t),i=this.get(s),this.set(t,r)}else{m||c[e-1]!==t||(m=!0);let r=c[m?e:e-1],n=i;i=this.get(r),this.delete(r),this.set(r,n)}return this}with(t,r,i){let n=new e(this);return n.insert(t,r,i),n}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let i=this.#e.indexOf(e);return -1===i?this:this.insert(i+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=d(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=d(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return d(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let i=r+t;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return i;r++}}findIndex(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return r;r++}return -1}filter(t,r){let i=[],n=0;for(let e of this)Reflect.apply(t,r,[e,n,this])&&i.push(e),n++;return new e(i)}map(t,r){let i=[],n=0;for(let e of this)i.push([e[0],Reflect.apply(t,r,[e,n,this])]),n++;return new e(i)}reduce(...e){let[t,r]=e,i=0,n=r??this.at(0);for(let r of this)n=0===i&&1===e.length?r:Reflect.apply(t,this,[n,r,i,this]),i++;return n}reduceRight(...e){let[t,r]=e,i=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let n=this.at(r);i=r===this.size-1&&1===e.length?n:Reflect.apply(t,this,[i,n,r,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),i=this.get(r);t.set(r,i)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let i=new e,n=this.size-1;if(void 0===t)return i;t<0&&(t+=this.size),void 0!==r&&r>0&&(n=r-1);for(let e=t;e<=n;e++){let t=this.keyAt(e),r=this.get(t);i.set(t,r)}return i}every(e,t){let r=0;for(let i of this){if(!Reflect.apply(e,t,[i,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let i of this){if(Reflect.apply(e,t,[i,r,this]))return!0;r++}return!1}}),e.s(["createCollection",0,function(e){let l=e+"CollectionProvider",[a,o]=(0,r.createContextScope)(l),[d,u]=a(l,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:i}=e,s=t.default.useRef(null),l=t.default.useRef(new Map).current;return(0,n.jsx)(d,{scope:r,itemMap:l,collectionRef:s,children:i})};c.displayName=l;let m=e+"CollectionSlot",f=s(m),h=t.default.forwardRef((e,t)=>
2{let{scope:r,children:s}=e,l=u(m,r),a=(0,i.useComposedRefs)(t,l.collectionRef);return(0,n.jsx)(f,{ref:a,children:s})});h.displayName=m;let p=e+"CollectionItemSlot",x="data-radix-collection-item",g=s(p),y=t.default.forwardRef((e,r)=>{let{scope:s,children:l,...a}=e,o=t.default.useRef(null),d=(0,i.useComposedRefs)(r,o),c=u(p,s);return t.default.useEffect(()=>(c.itemMap.set(o,{ref:o,...a}),()=>void c.itemMap.delete(o))),(0,n.jsx)(g,{...{[x]:""},ref:d,children:l})});return y.displayName=p,[{Provider:c,Slot:h,ItemSlot:y},function(r){let i=u(e+"CollectionConsumer",r);return t.default.useCallback(()=>{let e=i.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${x}]`));return Array.from(i.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[i.collectionRef,i.itemMap])},o]}],75830)},586318,e=>{"use strict";var t=e.i(271645);e.i(843476);var r=t.createContext(void 0);e.s(["useDirection",0,function(e){let i=t.useContext(r);return e||i||"ltr"}])},631171,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},87316,361277,e=>{"use strict";let t=(0,e.i(475254).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["default",0,t],361277),e.s(["Calendar",0,t],87316)},663408,e=>{"use strict";let t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function r(e){if(!e)return"";let r=e.trim(),i=r.match(/^(\d{4})-(\d{1,2})$/);if(i){let e=Number(i[2]);if(e>=1&&e<=12)return`${i[1]}-${String(e).padStart(2,"0")}`}let n=r.match(/([A-Za-z]{3,})\.?\s+(\d{4})/);if(n){let e=n[1].slice(0,3).toLowerCase(),r=t.findIndex(t=>t.toLowerCase()===e);if(r>=0)return`${n[2]}-${String(r+1).padStart(2,"0")}`}return""}function i(e){let r=e.match(/^(\d{4})-(\d{2})$/);if(!r)return"";let i=Number(r[2])-1;return i<0||i>11?"":`${t[i]} ${r[1]}`}function n(e){if(!e)return"";let t=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(t)?t.slice(0,7):r(t)}e.s(["intakeToIsoDate",0,function(e){if(!e)return null;let t=e.trim();if(/^\d{4}-\d{2}-\d{2}$/.test(t))return t;let i=r(t);return i?`${i}-01`:null},"intakeToYearMonth",0,r,"intakeValueToYearMonth",0,n,"isoDateToIntakeLabel",0,function(e){if(!e)return"";let t=e.trim(),r=n(t);return r&&i(r)||t},"yearMonthToIntake",0,i])},599527,e=>{"use strict";e.s(["shouldShowPreferredCountry",0,function(e,t=!1){return(null==e?null:"boolean"==typeof e.show_destination_country?e.show_destination_country:"boolean"==typeof e.showCountry?e.showCountry:null)??t}])},375052,e=>{"use strict";var t=e.i(843476),r=e.i(23750),i=e.i(647163),n=e.i(663408);function s(){let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`}e.s(["IntakeMonthField",0,function({id:e,value:l,onChange:a,label:o="Preferred intake",srOnlyLabel:d=!1,error:u,required:c=!1,disabled:m=!1,inputClassName:f,labelClassName:h,helpText:p}){return(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)("label",{htmlFor:e,className:(0,i.cn)(d?"sr-only":"block text-sm font-medium text-foreground mb-2",h),children:[o,c&&!d&&" *"]}),(0,t.jsx)(r.Input,{id:e,type:"month",min:s(),className:(0,i.cn)("bg-background text-foreground",f,u&&"border-destructive"),value:(0,n.intakeToYearMonth)(l),onChange:e=>a(e.target.value?(0,n.yearMonthToIntake)(e.target.value):""),required:c,disabled:m,"aria-invalid":!!u,"aria-describedby":u?`${e}-error`:void 0}),p&&!u&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground px-1",children:p}),u&&(0,t.jsx)("p",{id:`${e}-error`,className:"text-xs text-destructive px-1",children:u})]})},"currentYearMonth",0,s,"validateIntakeNotPast",0,function(e){let t=(0,n.intakeToYearMonth)(e);return t&&t<s()?"Intake month cannot be in the past.":null}])},921790,e=>{"use strict";var t=e.i(843476),r=e.i(595468),i=e.i(343432),n=e.i(167881),s=e.i(287801),l=e.i(647163);
2e.s(["LeadFormSuccess",0,function({firstName:e,title:a,body:o,phoneE164:d=s.AEOC_HEAD_OFFICE.phoneE164,onSubmitAnother:u,submitAnotherLabel:c="Submit another inquiry",extraActions:m,className:f}){let h=a??`Thank you, ${e?.trim()||"friend"}!`;return(0,t.jsxs)("div",{className:(0,l.cn)("flex flex-col items-center py-8 text-center duration-300 animate-in fade-in zoom-in-95",f),role:"status","aria-live":"polite",children:[(0,t.jsx)("div",{className:"mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-green-100 dark:bg-green-500/15",children:(0,t.jsx)(r.CheckCircle2,{className:"h-9 w-9 text-green-600 dark:text-green-400"})}),(0,t.jsx)("h3",{className:"mb-2 font-serif text-xl font-bold text-foreground md:text-2xl",children:h}),o&&(0,t.jsx)("p",{className:"mb-6 max-w-sm text-sm text-muted-foreground",children:o}),(0,t.jsxs)("div",{className:"flex w-full flex-col gap-3 px-2 sm:w-auto sm:flex-row sm:px-0",children:[(0,t.jsx)(n.Button,{asChild:!0,variant:"default",className:"w-full rounded-xl sm:w-auto",children:(0,t.jsxs)("a",{href:`tel:${d}`,children:[(0,t.jsx)(i.Phone,{className:"mr-2 h-4 w-4"}),"Call us now"]})}),(0,t.jsx)(n.Button,{variant:"outline",className:"w-full rounded-xl sm:w-auto",onClick:u,children:c}),m]})]})}])},897187,e=>{"use strict";var t=e.i(843476),r=e.i(271645),i=e.i(522016),n=e.i(618566),s=e.i(167881),l=e.i(307145),a=e.i(62870),o=e.i(671428),d=e.i(37727),u=e.i(972520),c=e.i(87316),m=e.i(32095),f=e.i(63209),h=e.i(647163),p=e.i(375052),x=e.i(921790),g=e.i(964010),y=e.i(599527);let v={"free-consultation":{badge:"Free Consultation",badgeIcon:c.Calendar,title:"Book Your Free Consultation",subtitle:"Fill in your details and our expert counselor will contact you within 24 hours.",submit:"Book Free Consultation",successTitle:"Thank You for Reaching Out!",successBody:"We've received your inquiry. Our expert counselor will contact you within 24 hours."},"apply-now":{badge:"Start Application",badgeIcon:m.GraduationCap,title:"Start Your Application",subtitle:"Tell us a little about yourself and our admissions team will guide you through every step.",submit:"Start Your Application",successTitle:"Application Request Received!",successBody:"Our admissions team will call you within 24 hours to plan your application, documents and timeline."}},b=null,w=null,j={name:"",phone:"",email:"",city:"",serviceLineId:"",countryId:"",intake:"",message:""};function N(e){return(0,h.cn)("w-full px-4 py-2.5 bg-background border rounded-xl focus:outline-none focus:ring-2 transition-all",e?"border-destructive focus:ring-destructive/30 focus:border-destructive":"border-border focus:ring-primary/50 focus:border-primary")}let k="w-full data-[size=default]:h-11 rounded-xl border-border bg-background px-4 text-base shadow-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:border-primary";function C({id:e,message:r}){return r?(0,t.jsxs)("p",{id:e,role:"alert",className:"mt-1.5 flex items-center gap-1.5 text-sm text-destructive",children:[(0,t.jsx)(f.AlertCircle,{className:"w-3.5 h-3.5 shrink-0"}),r]}):null}e.s(["ConsultationModal",0,function({isOpen:e,onClose:c,intent:m="free-consultation"}){let S=(0,n.usePathname)(),A=v[m]??v["free-consultation"],I=A.badgeIcon,[R,O]=(0,r.useState)(j),[M,P]=(0,r.useState)({}),[E,T]=(0,r.useState)(null),[z,L]=(0,r.useState)(!1),[$,F]=(0,r.useState)(!1),[B,W]=(0,r.useState)(b),[D,_]=(0,r.useState)(!1),[U,Y]=(0,r.useState)(!1);(0,r.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[e]);let V=(0,r.useRef)(null),q=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!e)return;q.current=document.activeElement??null;let t=window.setTimeout(()=>V.current?.focus(),0);return()=>{window.clearTimeout(t),q.current?.focus?.()}},[e]),(0,r.useEffect)(()=>{if(!e||B)return;let t=!0;return _(!0),Y(!1),(b?Promise.resolve(b):(!w&&(w=(0,g.fetchWebsiteLeadOptions)().then(e=>(b=e,e)).catch(e=>{throw w=null,e})),w)).then(e=>{t&&W(e)}).catch(()=>{t&&Y(!0)}).finally(()=>{t&&_(!1)}),()=>{t=!1}},[e,B]);let H=()=>{c(),$&&(F(!1),O(j),P({})),T(null)};(0,r.useEffect)(()=>
2{if(!e)return;let t=e=>{"Escape"===e.key&&H()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,$,c]);let X=B?.serviceLines??[],J=B?.countries??[],K=X.find(e=>String(e.id)===R.serviceLineId),Z=(D||J.length>0)&&(0,y.shouldShowPreferredCountry)(K,!0),G=J.find(e=>String(e.id)===R.countryId),Q=e=>P(t=>t[e]?{...t,[e]:void 0}:t),ee=async e=>{let t,r,i;if(e.preventDefault(),T(null),t={},R.name.trim().length<2&&(t.name="Please enter your full name."),/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(R.email.trim())||(t.email="Please enter a valid email address."),r=R.phone.replace(/[\s-]/g,""),/^\+?\d{7,15}$/.test(r)||(t.phone="Enter a valid phone number (7â15 digits, optional +)."),X.length>0&&!R.serviceLineId&&(t.serviceLineId="Please select a service."),(i=(0,p.validateIntakeNotPast)(R.intake))&&(t.intake=i),P(t),0===Object.keys(t).length){L(!0);try{await (0,g.submitWebsiteLead)({name:R.name.trim(),email:R.email.trim(),phone:R.phone.trim(),city:R.city.trim()||null,serviceLineId:K?K.id:null,countryId:Z&&G?G.id:null,countryName:Z&&G?G.name:null,intake:R.intake||null,message:R.message.trim()||null,sourcePage:S??window.location.pathname,formName:"apply-now"===m?"apply-now-modal":"free-consultation-modal"}),F(!0)}catch(e){T(e instanceof Error&&e.message?e.message:"Something went wrong. Please try again in a moment.")}finally{L(!1)}}};return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-foreground
2/60 backdrop-blur-sm",onClick:H}),(0,t.jsxs)("div",{ref:V,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":"consultation-modal-title",className:"relative flex flex-col bg-card rounded-3xl shadow-2xl border border-border w-full max-w-2xl max-h-[90dvh] overflow-hidden animate-in zoom-in-95 fade-in duration-300 focus:outline-none",children:[(0,t.jsx)("button",{type:"button",onClick:H,"aria-label":"Close dialog",className:"absolute top-3 right-3 z-30 flex h-9 w-9 items-center justify-center rounded-full bg-background text-foreground/70 shadow-md ring-1 ring-border transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(d.X,{className:"h-4 w-4"})}),(0,t.jsxs)("div",{className:"relative shrink-0 bg-gradient-to-r from-primary to-primary/80 px-6 py-6 sm:px-8 rounded-t-3xl overflow-hidden",children:[(0,t.jsxs)("div",{className:"absolute inset-0 opacity-10",children:[(0,t.jsx)("div",{className:"absolute top-0 right-0 w-40 h-40 bg-background rounded-full blur-3xl"}),(0,t.jsx)("div",{className:"absolute bottom-0 left-0 w-32 h-32 bg-background rounded-full blur-2xl"})]}),(0,t.jsxs)("div",{className:"relative z-10 pr-12",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 bg-background/20 text-primary-foreground px-3 py-1 rounded-full text-sm font-medium mb-3",children:[(0,t.jsx)(I,{className:"w-4 h-4"}),A.badge]}),(0,t.jsx)("h2",{id:"consultation-modal-title",className:"font-serif text-2xl md:text-3xl font-bold text-primary-foreground mb-1.5",children:A.title}),(0,t.jsx)("p",{className:"text-sm text-primary-foreground/80",children:A.subtitle})]})]}),(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto px-6 py-6 sm:px-8",children:$?(0,t.jsx)(x.LeadFormSuccess,{firstName:R.name.trim().split(" ")[0],title:A.successTitle,body:A.successBody,onSubmitAnother:()=>{F(!1),O(j),P({}),T(null)},extraActions:(0,t.jsx)(s.Button,{variant:"ghost",className:"w-full rounded-xl sm:w-auto",onClick:H,children:"Done"})}):(0,t.jsxs)("form",{onSubmit:ee,className:"space-y-4",noValidate:!0,children:[(0,t.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"modal-name",className:"block text-sm font-medium text-foreground mb-1.5",children:"Full Name *"}),(0,t.jsx)("input",{type:"text",id:"modal-name",required:!0,maxLength:120,autoComplete:"name",value:R.name,onChange:e=>{O({...R,name:e.target.value}),Q("name")},"aria-invalid":!!M.name,"aria-describedby":M.name?"modal-name-error":void 0,className:N(!!M.name),placeholder:"Enter your name"}),(0,t.jsx)(C,{id:"modal-name-error",message:M.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"modal-phone",className:"block text-sm font-medium text-foreground mb-1.5",children:"Phone Number *"}),(0,t.jsx)(l.PhoneInput,{id:"modal-phone",required:!0,value:R.phone,onChange:e=>{O({...R,phone:e}),Q("phone")},"aria-invalid":!!M.phone,className:(0,h.cn)("h-11 rounded-lg",M.phone&&"border-destructive"),placeholder:"99999 99999"}),(0,t.jsx)(C,{id:"modal-phone-error",message:M.phone})]})]}),(0,t.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"modal-email",className:"block text-sm font-medium text-foreground mb-1.5",children:"Email Address *"}),(0,t.jsx)("input",{type:"email",id:"modal-email",required:!0,autoComplete:"email",value:R.email,onChange:e=>{O({...R,email:e.target.value}),Q("email")},"aria-invalid":!!M.email,"aria-describedby":M.email?"modal-email-error":void 0,className:N(!!M.email),placeholder:"[email protected]"}),(0,t.jsx)(C,{id:"modal-email-error",message:M.email})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"modal-city",className:"block text-sm font-medium text-foreground mb-1.5",children:["City ",(0,t.jsx)("span",{className:"text-muted-foreground font-normal",children:"(Optional)"})]}),(0,t.jsx)("input",{type:"text",id:"modal-city",maxLength:80,autoComplete:"address-level2",value:R.city,onChange:e=>O({...R,city:e.target.value}),className:N(!1),placeholder:"e.g. Nadiad"})]})]}),(0,t.jsxs)("div",{className:(0,h.cn)("grid gap-4",Z&&"sm:grid-cols-2"),children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"modal-service",className:"block text-sm font-medium text-foreground mb-1.5",children:"Service Interest *"}),D?(0,t.jsx)(o.Skeleton,{className:"h-11 w-full rounded-xl"}):X.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.Select,{value:R.serviceLineId,onValueChange:e=>{O({...R,serviceLineId:e}),Q("serviceLineId")},children:[(0,t.jsx)(a.SelectTrigger,{id:"modal-service","aria-invalid":!!M.serviceLineId,"aria-describedby":M.serviceLineId?"modal
2-service-error":void 0,className:(0,h.cn)(k,M.serviceLineId&&"border-destructive focus-visible:ring-destructive/30 focus-visible:border-destructive"),children:(0,t.jsx)(a.SelectValue,{placeholder:"Select a service"})}),(0,t.jsx)(a.SelectContent,{children:X.map(e=>(0,t.jsx)(a.SelectItem,{value:String(e.id),children:e.name},e.id))})]}),(0,t.jsx)(C,{id:"modal-service-error",message:M.serviceLineId})]}):(0,t.jsx)("p",{className:"px-4 py-3 text-sm text-muted-foreground bg-muted/50 border border-dashed border-border rounded-xl",children:U?"We couldn't load our services right now â submit your details and we'll ask when we call.":"No services available right now."})]}),Z&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"modal-country",className:"block text-sm font-medium text-foreground mb-1.5",children:"Interested Country"}),D?(0,t.jsx)(o.Skeleton,{className:"h-11 w-full rounded-xl"}):(0,t.jsxs)(a.Select,{value:R.countryId,onValueChange:e=>O({...R,countryId:e}),children:[(0,t.jsx)(a.SelectTrigger,{id:"modal-country",className:k,children:(0,t.jsx)(a.SelectValue,{placeholder:"Select country"})}),(0,t.jsx)(a.SelectContent,{children:J.map(e=>(0,t.jsx)(a.SelectItem,{value:String(e.id),children:e.name},e.id))})]})]})]}),(0,t.jsx)(p.IntakeMonthField,{id:"modal-intake",label:"Preferred Intake",value:R.intake,error:M.intake,onChange:e=>{O(t=>({...t,intake:e})),Q("intake")},inputClassName:"data-[size=default]:h-11 h-11 rounded-xl border-border px-4",helpText:"Optional - current month or later."}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"modal-message",className:"block text-sm font-medium text-foreground mb-1.5",children:["Additional Message ",(0,t.jsx)("span",{className:"text-muted-foreground font-normal",children:"(Optional)"})]}),(0,t.jsx)("textarea",{id:"modal-message",rows:2,maxLength:2e3,value:R.message,onChange:e=>O({...R,message:e.target.value}),className:(0,h.cn)(N(!1),"resize-none"),placeholder:"Tell us about your requirements..."})]}),E&&(0,t.jsxs)("div",{role:"alert",className:"flex items-start gap-2.5 px-4 py-3 bg-destructive/10 border border-destructive/30 rounded-xl text-sm text-destructive",children:[(0,t.jsx)(f.AlertCircle,{className:"w-4 h-4 mt-0.5 shrink-0"}),E]}),(0,t.jsx)(s.Button,{type:"submit",size:"lg",className:"w-full group",disabled:z,children:z?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsxs)("svg",{className:"animate-spin w-5 h-5",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Submitting..."]}):(0,t.jsxs)(t.Fragment,{children:[A.submit,(0,t.jsx)(u.ArrowRight,{className:"ml-2 w-4 h-4 transition-transform group-hover:translate-x-1"})]})}),(0,t.jsxs)("p",{className:"text-center text-sm text-muted-foreground",children:["By submitting, you agree to our"," ",(0,t.jsx)(i.default,{href:"/terms",className:"underline underline-offset-4 hover:text-foreground transition-colors",target:"_blank",rel:"noopener noreferrer",children:"Terms of Use"})," ","&"," ",(0,t.jsx)(i.default,{href:"/privacy",className:"underline underline-offset-4 hover:text-foreground transition-colors",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"})]})]})})]})]}):null}])}]); 3 4//# debugId=67a93c3b-fd26-5b79-49e4-d68ef198ddce
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.