1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95956,e=>{"use strict";function t(e,l=""){let i=String(e?.id??e?.officer_id??"").trim(),r=String(e?.name??e?.officer_name??"").trim(),s=String(e?.email??e?.officer_email??"").trim();if(!i||!r||!s)return null;let a=String(e?.slug??e?.officer_slug??l).trim()||l,n=String(e?.firstName??"").trim()||(r.trim().split(/\s+/)[0]??"");return{id:i,slug:a,name:r,firstName:n,email:s,nmls:String(e?.nmls??e?.officer_nmls??"").trim()}}e.s(["buildOfficerContactHref",0,function(e){let t=new URLSearchParams({officer:e.slug,officerId:e.id,officerName:e.name,officerFirstName:e.firstName,officerEmail:e.email,officerNmls:e.nmls});return`/contact?${t.toString()}`},"mapOfficerContactContext",0,t,"mapOfficerContactContextFromQuery",0,function(e){return t({id:e.officerId,slug:e.officer,name:e.officerName,firstName:e.officerFirstName,email:e.officerEmail,nmls:e.officerNmls},e.officer??"")}])},81559,e=>{"use strict";var t=e.i(43476),l=e.i(57688),i=e.i(71645),r=e.i(79398),s=e.i(1331),a=e.i(76525),n=e.i(17431),o=e.i(95956),c=e.i(75719);e.i(47167);var f=e.i(30844);let d=(0,i.createContext)(null);function u(e){var t;let l,i;if(!e||"object"!=typeof e)return null;let r=String(e.officer_name??"").trim(),s=function(e){if(e.officer_slug)return String(e.officer_slug);
1if(e.officer_name){let t=function(e,t="Mortgage Consultant"){let l=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),i=t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return l?i?`${l}_${i}`:l:""}(String(e.officer_name),e.officer_title?String(e.officer_title):"Mortgage Consultant");if(t)return t}return String(e.officer_nmls??e.officer_id??"")}(e);return r&&s?{...e,slug:s,displayName:r,firstName:r.trim().split(/\s+/)[0]??"",title:String(e.officer_title??"Mortgage Consultant").trim()||"Mortgage Consultant",nmls:String(e.officer_nmls??"").trim(),photoUrl:e.officer_photo_filename?(t=String(e.officer_photo_filename),i=(l="https://www.pikecreekloans.com/").endsWith("/")?l:`${l}/`,`${i}includes/thumbs/index.php?src=/uploads/officers/photos/${encodeURIComponent(t)}`):""}:null}async function m(){var e;let t=await fetch("/api/officers",{cache:"no-store"});if(!t.ok)throw Error(`Unable to load officers (${t.status}).`);return Array.isArray(e=await t.json())?e.map(u).filter(e=>!!e).sort((e,t)=>e.displayName.localeCompare(t.displayName)):[]}async function x(e){let t=(0,o.mapOfficerContactContext)(e,e.slug);if(!t?.email){let l=await fetch(`/api/officers/${encodeURIComponent(e.slug)}`,{cache:"no-store"});if(!l.ok)throw Error(`Unable to load ${e.displayName}'s apply options.`);let i=await l.json();t=(0,o.mapOfficerContactContext)(i,e.slug)}if(!t?.email)throw Error(`We could not resolve ${e.displayName}'s officer-specific apply link right now.`);return t}function p({name:e,photoUrl:l,className:i="h-14 w-14 shrink-0 rounded-xl bg-slate-200 bg-cover bg-center",fallbackClassName:r="flex h-14 w-14 shrink-0 items-center justify-center rounded-xl bg-sky-700/15 text-sm font-semibold text-sky-700"}){let s=e.split(/\s+/).slice(0,2).map(e=>e[0]?.toUpperCase()??"").join("");return l?(0,t.jsx)("div",{"aria-hidden":"true",className:i,style:{backgroundImage:`url("${l}")`}}):(0,t.jsx)("div",{"aria-hidden":"true",className:r,children:s||"LO"})}function h({className:e="h-4 w-4"}){return(0,t.jsx)(l.default,{src:n.images.common.iconBlackChevronDown,alt:"",width:16,height:16,className:e})}function g({step:e}){return"intro"===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h2",{id:"loan-page-apply-flow-title",className:"max-w-[540px] text-3xl font-semibold leading-tight text-white sm:text-4xl",children:"Are you working with or referred to a specific PCM loan officer?"}),(0,t.jsx)("p",{className:"max-w-[540px] text-base font-medium leading-7 text-white/70",children:"Choose yes to select your loan officer first, or continue without one to view the standard apply options."})]}):(0,t.jsx)("h2",{id:"loan-page-apply-flow-title",className:"max-w-[540px] text-3xl font-semibold leading-tight text-white sm:text-4xl",children:"Please select a Loan Officer"})}function b({onYes:e,onNo:l}){return(0,t.jsxs)("div",{className:"mt-auto grid gap-4 sm:grid-cols-2",children:[(0,t.jsx)(a.Button,{variant:"primary",onClick:e,className:"h-14 w-full justify-center rounded-md bg-sky-700 text-base uppercase tracking-[0.08em] hover:bg-sky-800",children:"Yes"}),(0,t.jsx)("button",{type:"button",onClick:l,className:"inline-flex h-14 w-full items-center justify-center rounded-md bg-[#F3C400] px-8 text-base font-semibold uppercase tracking-[0.08em] text-slate-950 transition hover:bg-[#E0B500]",children:"No"})]})}function w({selectedOfficer:e,showOfficerList:l,setShowOfficerList:i}){return(0,t.jsx)("div",{className:"w-full overflow-hidden border border-slate-300 bg-white shadow-[0_8px_18px_rgba(15,23,42,0.18)]",children:(0,t.jsx)("button",{type:"button",onClick:e?()=>i(e=>!e):void 0,className:["flex min-h-[70px] w-full items-stretch text-left",l?"border-b border-slate-300":""].join(" "),children:e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p,{name:e.displayName,photoUrl:e.photoUrl,className:"h-[70px] w-[64px] shrink-0 border-r border-slate-300 bg-slate-200 bg-cover bg-center",fallbackClassName:"flex h-[70px] w-[64px] shrink-0 items-center justify-center border-r border-slate-300 bg-sky-700/15 text-sm font-semibold text-sky-700"}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-center justify-between px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 text-left",children:[(0,t.jsx)("div",{className:"truncate text-[14px] font-semibold leading-5 text-slate-950",children:e.displayName}),(0,t.jsx)("div",{className:"truncate text-[11px] font-medium leading-4 text-slate-500",children:e.title}),e.nmls?(0,t.jsxs)("div",{className:"truncate text-[11px] font-medium leading-4 text-slate-400",children:["NMLS:",e.nmls]}):null]}),(0,t.jsx)(h,{className:"ml-3 h-4 w-4 shrink-0 text-slate-900"})]})]}):(0,t.jsxs)("div",{className:"flex w-full items-center justify-between px-4 text-slate-950",children:[(0,t.jsx)("span",{className:"flex-1 text-center text-[15px] font-semibold leading-5",children:"Select a Loan Officer"}),(0,t.jsx)(h,{className:"h-4 w-4 shrink-0 text-slate-900"})]})})})}function y({officers:e,selectedOfficer:l,onSelectOfficer:i,setShowOfficerList:r}){return(0,t.jsx)("div",{className:"h-full w-full overflow-hidden border border-slate-300 bg-white shadow-[0_8px_18px_rgba(15,23,42,0.12)]",children:(0,t.jsx)("div",{role:"listbox","aria-label":"Loan officers",className:"h-full overflow-y-auto overscroll-contain",style:{scrollbarWidth:"thin"},children:e.map(e=>{let s=l?.slug===e.slug;return(0,t.jsxs)("button",{type:"button","aria-selected":s,onClick:()=>{i(e),r(!1)},className:["flex w-full items-center gap-0 border-b border-slate-200 text-left transition",s?"bg-slate-100":"hover:bg-slate-50"].join(" "),children:[(0,t.jsx)(p,{name:e.displayName,photoUrl:e.photoUrl,className:"h-[72px] w-[54px] shrink-0 bg-slate-200 bg-cover bg-center",fallbackClassName:"flex h-[72px] w-[54px] shrink-0 items-center justify-center bg-sky-700/15 text-[11px] font-semibold text-sky-700"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 px-3 py-2",children:[(0,t.jsx)("div",{className:"truncate text-[13px] font-medium leading-5 text-slate-950",children:e.displayName}),(0,t.jsx)("div",{className:"truncate text-[12px] font-medium leading-4 text-slate-400",children:e.title}),e.nmls?(0,t.jsxs)("div",{className:"truncate text-[12px] font-medium leading-4 text-slate-400",children:["NMLS:",e.nmls]}):null]})]},e.slug)})})})}function N({officers:e,officersLoading:l,officersError:i,selectedOfficer:r,isSubmitting:s,selectionError:n,onNo:o,onRetry:c,onSelectOfficer:f,onContinueWithOfficer:d,showOfficerList:u,setShowOfficerList:m}){let x=!!(r&&!u);return(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-5",children:[l?(0,t.jsx)("div",{className:"mt-auto rounded-2xl border border-white/10 bg-white/5 px-5 py-6 text-center text-base font-medium text-white/80",children:"Loading loan officers..."}):null,i?(0,t.jsxs)("div",{className:"mt-auto flex flex-col gap-4 roun
1ded-2xl border border-amber-400/30 bg-amber-400/10 px-5 py-5",children:[(0,t.jsx)("p",{className:"text-sm font-medium leading-6 text-amber-50",children:i}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row",children:[(0,t.jsx)(a.Button,{variant:"primaryWhite",onClick:c,className:"w-full sm:w-auto",children:"Retry"}),(0,t.jsx)(a.Button,{variant:"outlineWhite",onClick:o,className:"w-full sm:w-auto",children:"Continue without officer"})]})]}):null,l||i?null:(0,t.jsx)("div",{className:["mx-auto grid w-full items-start max-w-[238px] grid h-[314px] gap-4",u?"grid-rows-[70px_156px_56px]":"grid-rows-[70px_104px_1fr]"].join(" "),children:e.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w,{selectedOfficer:r,showOfficerList:u,setShowOfficerList:m}),u?(0,t.jsx)(y,{officers:e,selectedOfficer:r,onSelectOfficer:f,setShowOfficerList:m}):(0,t.jsx)("div",{"aria-hidden":"true",className:"row-start-3 h-full w-full"}),(0,t.jsx)("div",{className:["flex h-full w-full items-end justify-center",u?"":"row-start-2","max-w-[270px]"].join(" "),children:x?(0,t.jsx)("button",{type:"button",onClick:d,disabled:s,className:"inline-flex min-h-[48px] w-full items-center justify-center bg-[#4968A4] px-6 py-3 text-center text-[14px] font-semibold uppercase tracking-[0.03em] text-white transition hover:bg-[#3E5B92] disabled:cursor-not-allowed disabled:opacity-60",children:s?"Preparing options...":`Apply with ${r?.firstName}`}):(0,t.jsx)("div",{"aria-hidden":"true",className:"min-h-[48px] w-full"})})]}):(0,t.jsx)("div",{className:"w-full px-4 py-6 text-center text-sm font-medium text-white/75",children:"No loan officers are available right now. You can continue with the standard apply options instead."})}),n?(0,t.jsx)("div",{className:"rounded-2xl border border-rose-400/30 bg-rose-400/10 px-4 py-3 text-sm font-medium leading-6 text-rose-50",children:n}):null]})}function j({open:e,step:r,officers:s,officersLoading:a,officersError:o,selectedOfficer:c,isSubmitting:d,selectionError:u,onClose:m,onYes:x,onNo:p,onRetry:h,onSelectOfficer:w,onContinueWithOfficer:y}){(0,i.useEffect)(()=>{if(!e)return;(0,f.lockPageScroll)();let t=e=>{"Escape"===e.key&&m()};return window.addEventListener("keydown",t),()=>{(0,f.unlockPageScroll)(),window.removeEventListener("keydown",t)}},[e,m]);let{showOfficerList:v,setShowOfficerList:k}=function(e,t,l){let[r,s]=(0,i.useState)(!0);return(0,i.useEffect)(()=>{e&&"officer"===t&&l||s(!0)},[e,l,t]),{showOfficerList:r,setShowOfficerList:s}}(e,r,c);return e?(0,t.jsxs)("div",{className:"fixed inset-0 z-[310]",role:"presentation",children:[(0,t.jsx)("button",{type:"button","aria-label":"Close loan officer apply flow",className:"absolute inset-0 bg-slate-950/55 backdrop-blur-[4px]",onClick:m}),(0,t.jsx)("div",{className:"relative z-[311] flex min-h-full items-center justify-center px-4 py-6",children:(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":"loan-page-apply-flow-title",className:"relative w-full overflow-hidden rounded-[32px] border border-white/10 bg-[#07152B] shadow-[0_32px_80px_rgba(2,12,27,0.45)] max-w-[460px]",children:[(0,t.jsx)("button",{type:"button","aria-label":"Close",onClick:m,className:"absolute right-4 top-4 flex h-10 w-10 items-center justify-center rounded-md bg-sky-700 text-white transition hover:bg-sky-800",children:(0,t.jsx)(l.default,{src:n.images.common.iconXSolid,alt:"",width:16,height:16,className:"h-4 w-4 invert"})}),(0,t.jsxs)("div",{className:"flex flex-col gap-8 px-6 py-8 sm:px-10 sm:py-10 h-[560px]",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-6 text-center",children:[(0,t.jsx)(l.default,{src:n.images.myLoanPopupDesktop.logoRound,alt:"",width:64,height:64,className:"h-16 w-16"}),(0,t.jsx)(g,{step:r})]}),(0,t.jsx)("div",{className:"flex flex-1 flex-col",children:"intro"===r?(0,t.jsx)(b,{onYes:x,onNo:p}):(0,t.jsx)(N,{officers:s,officersLoading:a,officersError:o,selectedOfficer:c,isSubmitting:d,selectionError:u,onNo:p,onRetry:h,onSelectOfficer:w,onContinueWithOfficer:y,showOfficerList:v,setShowOfficerList:k})})]})]})})]}):null}e.s(["LoanPageApplyFlowProvider",0,function({children:e}){let{contextValue:l,modalProps:a}=function(){let{openMyLoan:e}=(0,s.useMyLoanModal)(),[t,l]=(0,i.useState)(!1),[a,n]=(0,i.useState)("intro"),[f,d]=(0,i.useState)([]),[u,p]=(0,i.useState)(!1),[h,g]=(0,i.useState)(null),[b,w]=(0,i.useState)(null),[y,N]=(0,i.useState)(!1),[j,v]=(0,i.useState)(null),k=(0,i.useCallback)(()=>{n("intro"),w(null),N(!1),v(null)},[]),C=(0,i.useCallback)(()=>{l(!1),k()},[k]),S=(0,i.useCallback)(()=>{k(),g(null),window.setTimeout(()=>l(!0),0)},[k]),_=(0,i.useCallback)(t=>{C(),window.setTimeout(()=>e(t),0)},[C,e]),L=(0,i.useCallback)(async()=>{p(!0),g(null);try{let e=await m();d(e)}catch(e){g(e instanceof Error?e.message:"We could not load the loan officer list right now.")}finally{p(!1)}},[]);(0,i.useEffect)(()=>{!t||u||f.length>0||h||L()},[L,t,f.length,h,u]);let O=(0,i.useMemo)(()=>f.find(e=>e.slug===b)??null,[f,b]),E=(0,i.useCallback)(()=>{_()},[_]),P=(0,i.useCallback)(async()=>
1{if(O&&!y){N(!0),v(null);try{let e,t,l=await x(O);_({cards:(e=(0,c.officerLenderLogixApplyUrl)(l.email,"STANDARD")??c.legacyExternal.lenderLogix.applyDefault,t=(0,c.officerLenderLogixApplyUrl)(l.email,"SPANISH")??c.legacyExternal.lenderLogix.applySpanish,(0,r.buildMyLoanModalCards)({ask:{ctaHref:(0,o.buildOfficerContactHref)(l),ctaExternal:!1,footerText:void 0,footerClassName:void 0},apply:{ctaHref:e,ctaExternal:!0},aplicar:{ctaHref:t,ctaExternal:!0}}))})}catch(e){v(e instanceof Error?e.message:"We could not prepare the officer-specific apply options."),N(!1)}}},[y,_,O]),A=(0,i.useMemo)(()=>({openLoanPageApplyFlow:S,closeLoanPageApplyFlow:C}),[C,S]),U=(0,i.useMemo)(()=>({open:t,step:a,officers:f,officersLoading:u,officersError:h,selectedOfficer:O,isSubmitting:y,selectionError:j,onClose:C,onYes:()=>n("officer"),onNo:E,onRetry:()=>{L()},onSelectOfficer:e=>{w(e.slug),v(null)},onContinueWithOfficer:()=>{P()}}),[C,L,P,E,y,f,h,u,t,O,j,a]);return{contextValue:A,modalProps:U}}();return(0,t.jsxs)(d.Provider,{value:l,children:[e,(0,t.jsx)(j,{...a})]})},"useLoanPageApplyFlow",0,function(){let e=(0,i.useContext)(d);if(!e)throw Error("useLoanPageApplyFlow must be used within LoanPageApplyFlowProvider");return e}],81559)},76240,e=>{e.n(e.i(81559))}]);
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.