1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[95546],{3215:()=>{},12741:(e,t,r)=>{"use strict";let n;r.d(t,{v:()=>s});var i=r(85574),o=r.n(i),a=r(16842);let l={appVersion:a._.appVersion},s=(({options:e={},destination:t})=>(n||(n=o()({level:e?.level??a._.logLevel??"info",...e},t).child(l)),n))({options:{browser:{asObject:!0}}})},16842:(e,t,r)=>{"use strict";r.d(t,{_:()=>l});var n,i,o,a=r(40459);let l={appVersion:a.env.NEXT_PUBLIC_APP_VERSION||a.env.HEADLESS_METADATA_COMMIT_SHA||"local",strictValidation:"true"===a.env.STRICT_API_VALIDATION,isDebugAllowed:!1,newRelicEnabled:"false"!==a.env.NEW_RELIC_ENABLED&&!!a.env.NEW_RELIC_LICENSE_KEY,tenantsApiUrl:"https://tenants.api.highereducation.com",logoVariant:(n=a.env.LOGO_VARIANT,n?.trim()==="v2"?"v2":void 0),forceTenant:a.env.FORCE_TENANT||"",tenantResolution:a.env.TENANT_RESOLUTION||"path",isProd:"prd"===a.env.ENVIRONMENT,isDev:"prd"!==a.env.ENVIRONMENT,environment:a.env.ENVIRONMENT||"development",sitemapEnvironment:(i=a.env.SITEMAP_ENVIRONMENT,o="prd"===a.env.ENVIRONMENT,i&&["local","dev","prod"].includes(i)?i:o?"prod":"dev"),cmsUrlOverride:a.env.CMS_URL_OVERRIDE||"",logLevel:"info",prettyPrintLogs:"true"===a.env.PRETTY_PRINT_LOGS,redirectServiceApi:a.env.REDIRECT_SERVICE_API||("prd"===a.env.ENVIRONMENT?"https://redirects.api.highereducation.com":"https://redirects.int.api.highereducation.com"),learnersHubUclWebComponentDe:!0,dynamicFlowApiUrl:"https://dynamic-flows.api.highereducation.com",dynamicExperienceEnvironment:"prod",offeringsServiceUrl:a.env.OFFERINGS_SERVICE_URL||("prd"===a.env.ENVIRONMENT?"https://offerings.api.highereducation.com":"https://offerings.dev.api.highereducation.com"),campaignManagementUrl:a.env.CAMPAIGN_MANAGEMENT_API_BASE_URL||("prd"===a.env.ENVIRONMENT?"https://campaign-management.api.highereducation.com":"https://campaign-management.int.api.highereducation.com"),deliverySystemUrl:a.env.DELIVERY_SYSTEM_API_BASE_URL||("prd"===a.env.ENVIRONMENT?"https://delivery-system.rveducation.io":"https://delivery-system.staging.rveducation.io"),eduAuthServiceEnabled:"true"===a.env.EDU_AUTH_SERVICE_ENABLED,learnersHubUclAdapterSrc:"https://web-component-bundle.api.highereducation.com/latest/ucl.adapter.js",landingPageProxyDomain:a.env.LANDING_PAGE_PROXY_DOMAIN||"",tipApiBaseUrl:a.env.TIP_API_BASE_URL||"https://tip.cohesionapps.com/api/v1/lookup",tipApiToken:a.env.TIP_API_TOKEN||"",iterableApiKey:a.env.ITERABLE_API_KEY||"",iterableListId:a.env.ITERABLE_LIST_ID||""}},28645:()=>{},33108:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(12741);let i=void 0!==window.newrelic?window.newrelic:new Proxy({},{get:(e,t)=>(...e)=>{n.v.warn(`window.newrelic.${String(t)}(${e.join(", ")})`)}})},38892:()=>{},39409:(e,t,r)=>{"use strict";r.d(t,{mH4:()=>ft,JdN:()=>r$});var n,i,o,a,l,s,c,d,u,p,f,m,h,g,y,b=r(95155),v=r(12115),x=r(19627),w=r(24770),S=r.n(w);let I=["article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","ul","a","b","br","cite","code","em","i","img","mark","small","span","strong","sub","sup","time","caption","table","tbody","td","tfoot","th","thead","tr"],C={allowedTags:[...I],allowedAttributes:{a:["href","title","target","rel"],img:["src","alt","width","height"],td:["colspan","rowspan"],th:["colspan","rowspan"]},allowedSchemes:["http","https","mailto"],allowProtocolRelative:!1,transformTags:{a:(e,t)=>{let r;return{tagName:"a",attribs:(r={},"string"==typeof t.href&&t.href.length>0&&(r.href=t.href),"string"==typeof t.title&&t.title.length>0&&(r.title=t.title),"string"==typeof t.target&&t.target.length>0&&(r.target=t.target),"_blank"===t.target&&(r.rel="noopener noreferrer"),r)}}}};function j(e){return S()(e.replace(/(\r\n|\n|\r|\t)/g," ").replace(/\s+/g," ").trim(),C)}let k=e=>{if(!e)return null;let t=(0,x.Ay)(j(e),{replace:e=>{if(e instanceof x.Hg&&!(!(e instanceof x.Hg)||I.includes(e.name)))return v.createElement(v.Fragment)}});return Array.isArray(t),t},A=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)});var E=((n={}).STUDY_MATCH="STUDY_MATCH",n.HLF="HLF",n.QUALIFIED_RESULTS_PAGE="QUALIFIED_RESULTS_PAGE",n.CUSTOM_RESULTS_PAGE="CUSTOM_RESULTS_PAGE",n.OFFERINGS="OFFERINGS",n.DASHBOARD="DASHBOARD",n),N=((i={}).TEXT="TEXT",i.SELECT="SELECT",i.MULTIPLE_CHOICE="MULTIPLE_CHOICE",i.SINGLE_CHOICE="SINGLE_CHOICE",i.RADIO_CHOICE="RADIO_CHOICE",i.CHECKBOX="CHECKBOX",i.TOGGLE="TOGGLE",i.DYNAMIC_SINGLE_CHOICE="DYNAMIC_SINGLE_CHOICE",i.DYNAMIC_MULTIPLE_CHOICE="DYNAMIC_MULTIPLE_CHOICE",i),T=((o={}).ROW="ROW",o.COLUMN="COLUMN",o),O=((a={}).QUESTION="QUESTION",a.COMPONENT="COMPONENT",a.EXTERNAL_LINK="EXTERNAL_LINK",a.MULTI_QUESTION="MULTI_QUESTION",a.DCS="DCS",a.RESULT="RESULT",a.BANNER_CTA="BANNER_CTA",a),P=((l={}).EQUALS="EQUALS",l.NOT_EQUALS="NOT_EQUALS",l.CONTAINS="CONTAINS",l.CONTAINS_ANY="CONTAINS_ANY",l.NOT_CONTAINS_ANY="NOT_CONTAINS_ANY",l.GREATER_THAN="GREATER_THAN",l.LESS_THAN="LESS_THAN",l),L=((s={}).DEFAULT="DEFAULT",s.GROUP_SELECTED="GROUP_SELECTED",s.OPTION_SELECTED="OPTION_SELECTED",s.COMBINATION_SELECTED="COMBINATION_SELECTED",s),M=((c={}).NEXT_STEP="NEXT_STEP",c.RESULT="RESULT",c),R=((d={}).CAPPEX="CAPPEX",d.SALARY_CALCULATOR="SALARY_CALCULATOR",d.DUAL_CTA_EL_MARKETPLACE="DUAL_CTA_EL_MARKETPLACE",d.EDITORIAL_LISTINGS="EDITORIAL_LISTINGS",d.CAREER_PATHWAY="CAREER_PATHWAY",d.DEGREE_LENGTH="DEGREE_LENGTH",d.BANNER_CTA="BANNER_CTA",d),F=((u={}).SET_STEPS="SET_STEPS",u.SET_CURRENT_STEP="SET_CURRENT_STEP",u.SET_CURRENT_STEP_INDEX="SET_CURRENT_STEP_INDEX",u.SET_NAVIGATION_HISTORY="SET_NAVIGATION_HISTORY",u.ADD_TO_NAVIGATION_HISTORY="ADD_TO_NAVIGATION_HISTORY",u.GO_BACK_IN_HISTORY="GO_BACK_IN_HISTORY",u.UPDATE_FLOW_STATE="UPDATE_FLOW_STATE",u.SET_FLOW_STATE="SET_FLOW_STATE",u.SET_OPEN_MODAL="SET_OPEN_MODAL",u.SET_ACCEPT_TCPA="SET_ACCEPT_TCPA",u.SET_VALIDATION_ERRORS="SET_VALIDATION_ERRORS",u.CLEAR_VALIDATION_ERRORS="CLEAR_VALIDATION_ERRORS",u.SET_FORM_STARTED_FIRED="SET_FORM_STARTED_FIRED",u.JUMP_TO_STEP="JUMP_TO_STEP",u.SET_IS_SUBMITTING="SET_IS_SUBMITTING",u.SET_SUBMISSION_ERROR="SET_SUBMISSION_ERROR",u.SET_POPUP_BLOCKED="SET_POPUP_BLOCKED",u.RESET_FLOW="RESET_FLOW",u),U=((p={}).EMBEDDED_RECOMMENDER="dexp-embedded-recommender",p.POPUP="dexp-pop-up-recommender",p.PAGE="dexp-results-page",p.UNDERGRAD_THANK_YOU_PAGE="dexp-undergrad-thank-you-page",p.RECOMMENDER_GRAD_THANK_YOU_PAGE="dexp-recommender-grad-thank-you-page",p.READY_TO_GO_THANK_YOU_PAGE="dexp-ready-to-go-thank-you-page",p.THANK_YOU_PAGE="dexp-thank-you-page",p.SPOTLIGHT_POPUP="dexp-spotlight-popup",p.CONVERSION_DRAWER="dexp-conversion-drawer",p.PAGE_POPUP="dexp-results-page-pop-up",p),$=((f={}).ALGOLIA="algolia",f),_=r(40459);let D={...{dynamicFlowUrl:"https://dynamic-flows.api.highereducation.com",audienceIntentApiUrl:void 0!==_&&_.env?.AUDIENCE_INTENT_API?_.env.AUDIENCE_INTENT_API:"https://audience-intent.api.highereducation.com",mobiusApiUrl:"https://api.mobius.highereducation.com",organizationApiUrl:"https://organizations.api.highereducation.com",campaignManagementApiUrl:void 0!==_&&_.env?.CAMPAIGN_MANAGEMENT_API_BASE_URL?_.env.CAMPAIGN_MANAGEMENT_API_BASE_URL:"https://campaign-management.api.highereducation.com",deliverySystemApiUrl:void 0!==_&&_.env?.DELIVERY_SYSTEM_API_BASE_URL?_.env.DELIVERY_SYSTEM_API_BASE_URL:"https://delivery-system.staging.rveducation.io",offeringsSearchApiUrl:void 0!==_&&_.env?.OFFERING_SERVICE_BASE_URL?_.env?.OFFERING_SERVICE_BASE_URL:"https://offerings.int.api.highereducation.com",offeringsServiceBaseUrl:void 0!==_&&_.env?.OFFERINGS_SERVICE_BASE_URL?_.env.OFFERINGS_SERVICE_BASE_URL:"https://offerings-service.int.api.highereducation.com",sitePublishingBaseUrl:void 0!==_&&_.env?.NEXT_PUBLIC_SITE_PUBLISHING_BASE_URL?_.env?.NEXT_PUBLIC_SITE_PUBLISHING_BASE_URL:"",prospectServiceApiUrl:void 0!==_&&_.env?.NEXT_PUBLIC_PROSPECT_SERVICE_BASE_URL?_.env.NEXT_PUBLIC_PROSPECT_SERVICE_BASE_URL:void 0!==_&&_.env?.PROSPECT_SERVICE_BASE_URL?_.env.PROSPECT_SERVICE_BASE_URL:"",leadApiBaseUrl:void 0!==_&&_.env?.NEXT_PUBLIC_LEAD_API_BASE_URL?_.env.NEXT_PUBLIC_LEAD_API_BASE_URL:"",locationInferenceApiUrl:void 0!==_&&_.env?.NEXT_PUBLIC_LOCATION_INFERENCE_API_URL?_.env.NEXT_PUBLIC_LOCATION_INFERENCE_API_URL:""}};function Y(){return{...D}}var B=r(51985);let z=B.Ik({optionId:B.Yj(),text:B.Yj(),group:B.Yj().optional(),value:B.KC([B.Yj(),B.zM(),B.ch()]).optional(),nextQuestionId:B.Yj().optional(),questionId:B.Yj().optional(),leadFieldAssociated:B.Yj().optional(),isPreSelected:B.zM().optional(),isArray:B.zM().optional(),icon:B.Yj().optional(),subtext:B.Yj().optional()}),V=B.Ik({description:B.Yj(),key:B.Yj(),defaultValue:B.Yj().optional()}),H=B.Ik({type:B.Yj(),nextId:B.Yj(),condition:B.Ik({type:B.Yj(),operator:B.Yj().optional(),optionId:B.Yj().optional(),value:B.Yj().optional(),group:B.Yj().optional(),combination:B.YO(B.Yj()).optional(),optionIds:B.YO(B.Yj()).optional()})}),q=B.Ik({customField:B.Yj().optional(),flowId:B.Yj().optional(),isEntry:B.zM().optional(),id:B.Yj().optional(),type:B.Yj(),title:B.Yj().optional(),subtitle:B.Yj().optional(),preSubHeading:B.Yj().optional(),leadFieldAssociated:B.Yj().optional(),branchingLogic:B.YO(H).optional(),placeholders:B.YO(V).optional(),tooltip:B.Yj().optional(),modal:B.Ik({title:B.Yj().optional(),content:B.Yj().optional(),buttonText:B.Yj().optional(),enable:B.zM().optional()}).optional(),isTerminal:B.zM().optional(),required:B.zM().optional(),stepName:B.Yj().optional(),nextButtonText:B.Yj().optional(),options:B.YO(z).optional(),questionType:B.Yj().optional(),orientation:B.Yj().optional(),sideRailConfigs:B.YO(B.bz()).optional(),tcpaText:B.Yj().optional(),automaticNext:B.zM().optional(),maxSelection:B.ai().optional()}).passthrough(),G=B.YO(q),W=B.Ik({id:B.Yj(),title:B.Yj().optional(),type:B.Yj(),content:B.Yj().optional(),subtitle:B.Yj().optional(),options:B.YO(z).optional(),placeholders:B.YO(V).optional(),questionType:B.Yj().optional()}),Q=B.k5(["draft","published"]),K=B.k5(["entry","result"]),J=B.k5(["tenant","global"]),X=B.Ik({tenantId:B.Yj().optional(),configId:B.Yj(),name:B.Yj(),status:Q.or(B.Yj()),type:K.or(B.Yj()),version:B.ai(),data:B.g1(B.L5()),componentCount:B.ai().optional(),createdAt:B.Yj().optional(),updatedAt:B.Yj().optional(),createdBy:B.Yj().optional(),publishedBy:B.Yj().optional(),origin:J.or(B.Yj()).optional()}).passthrough(),Z=B.YO(X);class ee{constructor(e){this.cache=new Map;const t={baseUrl:"",defaultHeaders:{},cache:new Map,newRelic:{noticeError:(e,t)=>
1{console.error("Error in DynamicFlowsApiClient: noticeError",e,t)}},strictValidation:!1};this.config={...t,...e}}getApiName(){return"dynamic-flows"}async get(e,t={cacheEnabled:!1}){let r=`${this.config.baseUrl}${e}`;if(t.bustCache&&this.bustCache(r),this.shouldUseCache(r,t)){let e=this.cache.get(r);if(e)return e.clone()}let n=await fetch(`${this.config.baseUrl}${e}`,{method:"GET",...t});return t.cacheEnabled&&n.ok&&this.cache.set(r,n.clone()),n}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async getFlow(e,t,r={},n={cacheEnabled:!1}){let i=`/v1/tenants/${encodeURIComponent(e)}/flows/${encodeURIComponent(t)}`,o=await this.get(i,{...n,headers:{...this.config.defaultHeaders,...r}});if(this.hasError(o))throw console.error(`Failed to get flow for tenantId: ${e}, flowId: ${t}`),Error(`Failed to get flow: ${o.status} ${o.statusText}`);return await this.toJson(o,G)}async listDslConfigs(e,t={},r={},n={cacheEnabled:!1}){let i=new URLSearchParams;t.type&&i.set("type",t.type),t.status&&i.set("status",t.status);let o=i.toString(),a=`/v1/tenants/${encodeURIComponent(e)}/dsl-configs${o?`?${o}`:""}`,l=await this.get(a,{...n,headers:{...this.config.defaultHeaders,...r}});if(this.hasError(l))throw console.error(`Failed to list DSL configs for tenantId: ${e}`),Error(`Failed to list DSL configs: ${l.status} ${l.statusText}`);return this.toJson(l,Z)}async getDslConfig(e,t,r={},n={cacheEnabled:!1}){let i=`/v1/tenants/${encodeURIComponent(e)}/dsl-configs/${encodeURIComponent(t)}`,o=await this.get(i,{...n,headers:{...this.config.defaultHeaders,...r}});if(this.hasError(o))throw console.error(`Failed to get DSL config for tenantId: ${e}, configId: ${t}`),Error(`Failed to get DSL config: ${o.status} ${o.statusText}`);return this.toJson(o,X)}async getQuestion(e,t,r={},n={cacheEnabled:!1}){let i=`/v1/tenants/${encodeURIComponent(e)}/questions/${encodeURIComponent(t)}`,o=await this.get(i,{...n,headers:{...this.config.defaultHeaders,...r}});if(this.hasError(o))return console.error(`Error fetching question ${t}:`,o.statusText),null;let a=await this.toJson(o,W);return{id:a.id,type:a.type,title:a.content,subtitle:a.subtitle,options:a.options?.map(e=>e.text),placeholders:a.placeholders,questionType:a.questionType}}}let et=new Map,er=new Set(Object.values(O));async function en(e,t,r={},n={cacheEnabled:!1}){let i,o,a=(i=Y().dynamicFlowUrl,(o=et.get(i))||(o=new ee({baseUrl:i}),et.set(i,o)),o);try{var l;let i,o,s,c;return{data:(l=(await a.getFlow(e,t,r,n)).filter(e=>er.has(e.type)),i=[],o=function(e){let t=new Set;for(let r of e)if(r.type===O.MULTI_QUESTION&&Array.isArray(r.questions))for(let e of r.questions)t.add(e.questionId);return t}(l),s=e=>{if(!(null!=e.id&&o.has(e.id)))switch(e.type){case O.MULTI_QUESTION:let t,r;i.push((t=[],e&&Array.isArray(e.questions)&&e.questions.forEach(e=>{let r=l.find(t=>t.id===e.questionId);r&&t.push({...r,orientation:e.orientation})}),r=function(e,t=3){let r=[],n={questions:[],indices:[]};return e.forEach((e,i)=>{let o=(e.orientation??T.COLUMN)===T.ROW,a=0===n.questions.length,l=n.questions.length>=t;o||a||l?(n.questions.length>0&&r.push(n),n={questions:[e],indices:[i]}):(n.questions.push(e),n.indices.push(i))}),n.questions.length>0&&r.push(n),r}(t),{...e,stepQuestions:t,groupedQuestions:r}));break;case O.QUESTION:case O.DCS:case O.COMPONENT:case O.RESULT:case O.BANNER_CTA:case O.EXTERNAL_LINK:i.push(e)}},(c=l.find(e=>!0===e.isEntry))?(s(c),l.forEach(e=>{e.id!==c.id&&s(e)})):l.forEach(s),i),error:null}}catch(e){return{data:null,error:e instanceof Error?e.message:"Failed to fetch flow"}}}let ei="/v1/contact",eo=B.Ik({postalCode:B.Yj(),country:B.Yj(),ipInferredPostalCode:B.Yj()}),ea=B.Ik({lastName:B.Yj().optional(),email:B.Yj().optional(),phoneNumber:B.Yj().optional(),location:eo.optional(),hsGradYear:B.ai().optional(),levelOfEducation:B.Yj().optional(),militaryStatus:B.zM().optional(),startDate:B.Yj().optional(),tcpaText:B.Yj().optional(),thirdPartyLeadId:B.Yj().optional(),currentLicense:B.Yj().nullable().optional(),hasGivenTCPAConsent:B.zM().optional(),hasGivenThirdPartySharingConsent:B.zM().optional(),hasGivenProspectSharingConsent:B.zM().optional(),currentPermanentResidenceCountry:B.Yj().optional(),leadSource:B.Yj().nullable().optional(),category:B.Yj().nullable().optional(),degree:B.Yj().nullable().optional(),subject:B.Yj().nullable().optional()}).strict();B.Ik({contact:B.Ik({firstName:B.Yj(),lastName:B.Yj(),email:B.Yj(),phoneNumber:B.Yj(),zip:B.Yj(),details:ea.optional(),trackingContext:B.g1(B.L5()).optional()})});let el=B.Ik({data:B.Ik({contactId:B.Yj(),transactionId:B.ai(),retrievalUrl:B.Yj()})});class es{constructor(e){this.config=e,this.config={baseUrl:"",defaultHeaders:{"Content-Type":"application/json"},newRelic:{noticeError:(e,t)=>
1{console.error("Error in ProspectApiClient: noticeError",e,t)}},strictValidation:!1,...e},this.cache=e.cache??new Map}getApiName(){return"prospect-api-client"}async get(e,t={cacheEnabled:!1}){let r=`${this.config.baseUrl}${e}`;if(t.bustCache&&this.bustCache(r),this.shouldUseCache(r,t))return this.cache.get(r).clone();let n=await fetch(`${this.config.baseUrl}${e}`,{...t,headers:{...this.config.defaultHeaders,...t.headers}});return t.cacheEnabled&&n.ok&&this.cache.set(r,n.clone()),n}async post(e,t,r={cacheEnabled:!1}){return await fetch(`${this.config.baseUrl}${e}`,{method:"POST",...r,headers:{...this.config.defaultHeaders,...r.headers},body:JSON.stringify(t)})}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}reportError(e,t){this.config.newRelic?.noticeError&&this.config.newRelic.noticeError(e,t||{})}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async postContact(e){let t=await this.post(ei,e);if(this.hasError(t))throw Error(`HTTP ${t.status}: ${t.statusText}`);return this.toJson(t,el)}}let ec=new Map;async function ed(e){let t,r;return(t=Y().prospectServiceApiUrl??"",!(r=ec.get(t))&&(ec.clear(),r=new es({baseUrl:t,defaultHeaders:{"Content-Type":"application/json"}}),ec.set(t,r)),r).postContact(e)}let eu=async()=>{let e=Y().locationInferenceApiUrl??"";try{let t=await fetch(`${e}/api/v1/locate/`,{method:"GET",headers:{Accept:"application/json"}});if(!t.ok)return null;return await t.json()}catch{return null}},ep="_bind.",ef="_action.",em="_meta.",eh="formKey",eg=["onChange","onSelect"],ey="optionLabelField",eb="optionValueField",ev="tagKeys",ex="defaultTagKeys",ew="statLabelField",eS="statValueField",eI="statTooltipField",eC="badgeField",ej=["onSourceChange"],ek=e=>{for(let t=0;t<ej.length;t++)if(ej[t]===e)return!0;return!1},eA=[ep,ef,em],eE=e=>{if(e===eh)return!0;for(let t of eA)if(e.startsWith(t))return!0;return!1};function eN(e){let t={},r={};return eT(e,(e,n)=>{if(t[e]){r[e]||(r[e]=!0,console.warn(`[ConfigurableStep] Multiple components share formKey "${e}"; using the first match.`));return}t[e]=eP(e,n)}),t}function eT(e,t){if(Array.isArray(e)){for(let r of e)eT(r,t);return}if(!eO(e))return;let r=e.props??{},n=r[eh];for(let e of("string"==typeof n&&n.length>0&&t(n,r),Object.values(r)))(Array.isArray(e)||eO(e))&&eT(e,t)}function eO(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&"string"==typeof e.type}function eP(e,t){var r;let n,i=t[`${ep}${ey}`],o=t[`${ep}${eb}`],a=t[`${em}leadFieldAssociated`],l=t[`${em}customField`],s=t[`${em}isArray`],c=(n=eL((r=t)[`${ep}options`]))||eL(r[`${ep}value`]);return{formKey:e,source:c?.source,optionsPath:c?.path,optionLabelField:"string"==typeof i?i:void 0,optionValueField:"string"==typeof o?o:void 0,leadFieldAssociated:"string"==typeof a?a:void 0,customField:"string"==typeof l?l:void 0,isArray:!0===s||void 0}}function eL(e){if("object"==typeof e&&null!==e&&"string"==typeof e.source)return{source:e.source,path:"str
1ing"==typeof e.path&&e.path.length>0?e.path:void 0}}let eM=(e,t,r)=>{for(let r of e){for(let e of r.stepQuestions??[])if(e.customField===t&&e.id)return{id:e.id,options:e.options};if(r.customField===t&&r.id)return{id:r.id,options:r.options}}for(let n of e){if(!n.id)continue;let e=n.dslConfig,i=e?.data?.content;if(!i)continue;let o=r.get(n);if(o||(o=eN(i),r.set(n,o)),Object.values(o).some(e=>e.customField===t))return{id:n.id,optionCustomField:t}}},eR=(e,t,r)=>{if(e.optionCustomField)return{optionId:t,text:r,value:r,customField:e.optionCustomField};let n=e.options??[],i=n.find(e=>null!=e.slug&&String(e.slug)===r)??n.find(e=>null!=e.value&&String(e.value)===r)??n.find(e=>String(e.optionId)===r);return i?{...i}:{optionId:r,text:r,value:r}},eF=(e,t,r)=>{let n=e[t];if(!n){e[t]={option:r};return}let i=n.option;if(!i){e[t]={...n,option:r};return}if(Array.isArray(i)){let o=i.findIndex(e=>e.optionId===r.optionId||e.customField===r.optionId);if(o>=0){let a=[...i];a[o]=r,e[t]={...n,option:a}}else e[t]={...n,option:[...i,r]};return}if(i.optionId===r.optionId){e[t]={...n,option:r};return}e[t]={...n,option:[i,r]}},eU=(e,t)=>{let r={};if(t.dcs&&Object.values(t.dcs).some(Boolean)){let n=Object.keys(t.dcs).filter(e=>!!t.dcs[e]).map(e=>{let r=t.dcs[e],n=t.dcsTranslate?t.dcsTranslate(e,r):r;return{optionId:e,text:n,value:r,leadFieldAssociated:e}}),i=e.find(e=>!0===e.isEntry)??e[0],o=t.entryStepId||i?.id||"dcs";r[o]={option:n},t.jumpToStepId&&t.jumpToStepId!==o&&(r[t.jumpToStepId]={option:[...n]})}if(t.forwardedContext){let n=new Map;for(let[i,o]of Object.entries(t.forwardedContext)){if(!i||"string"!=typeof o||!o.trim())continue;let t=eM(e,i,n);t&&eF(r,t.id,eR(t,i,o))}}let n=e=>{let n;if("string"!=typeof e.leadFieldAssociated)return;let i=e.leadFieldAssociated;if(("zip"===i||"zipCode"===i)&&(t.zipCode||t.location?.zipCode)&&(n=t.zipCode||t.location?.zipCode),n){let t={optionId:`${e.leadFieldAssociated}-auto-input`,text:n,value:n,group:`${e.leadFieldAssociated}-auto-input`};r[e.id||""]={option:t,leadFieldAssociated:e.leadFieldAssociated}}};if(e.forEach(e=>{n(e),(e.stepQuestions??[]).forEach(e=>n(e))}),t.location){let{state:e,zipCode:n,countryCode:i}=t.location;r.location={state:e?.toUpperCase()||"",ipInferredPostalCode:n||"",countryCode:i?.toUpperCase()||""}}return r},e$=(e,t,r)=>{if(!e.options||0===e.options.length)return;let n=e.options.filter(e=>e.isPreSelected);if(n.length>0){let i=["MULTIPLE_CHOICE","SELECT_ALL"].includes(e.questionType);if(!e.id)return;t[e.id]={option:i?n:n[0],leadFieldAssociated:r??e.leadFieldAssociated}}},e_=B.Ik({id:B.ai().optional(),name:B.Yj(),slug:B.Yj().optional()}),eD=B.Ik({id:B.ai().optional(),name:B.Yj(),slug:B.Yj().optional()}),eY=B.Ik({id:B.ai().optional(),name:B.Yj(),slug:B.Yj().optional()}),eB=B.Ik({url:B.Yj(),helid:B.Yj().optional()}),ez=B.Ik({allowedIn:B.YO(B.Yj()),blockedIn:B.YO(B.Yj())}),eV=B.Ik({sdbSchoolId:B.Yj().optional()}),eH=B.Ik({id:B.Yj(),source:B.Yj(),sourceId:B.ai(),name:B.Yj(),slug:B.Yj(),description:B.Yj().optional(),meta:eV.optional()}),eq=B.Ik({label:B.Yj(),url:B.Yj()}),eG=B.Ik({applicationCta:eq,providerId:B.ai(),providerName:B.Yj(),sdbProgramId:B.Yj(),preferred:B.zM(),degree:e_,category:eD,subject:eY,bonsaiERPIState:B.g1(B.Yj(),B.ai()),audience:B.Yj().optional(),capId:B.ai()}),eW=B.Ik({id:B.KC([B.ai(),B.Yj()]),name:B.Yj(),source:B.Yj(),type:B.Yj(),subType:B.Yj(),sourceUrl:B.Yj(),slug:B.Yj(),description:B.Yj(),shortDescription:B.Yj().optional(),overview:B.Yj().optional(),snippet:B.Yj(),attributes:B.YO(B.Yj()).optional(),occupationCodes:B.YO(B.Yj()).optional(),imageUrl:B.Yj().optional(),destination:eB,createdAt:B.Yj().optional(),updatedAt:B.Yj().optional(),hash:B.Yj().optional(),locationRestrictions:B.YO(ez).optional(),organization:eH,subjects:B.YO(B.Yj()).optional(),skills:B.YO(B.Yj()).optional(),level:B.Yj().optional(),flexibility:B.Yj().optional(),weeksToComplete:B.ai().optional(),weeksToCompleteMin:B.ai().optional(),weeksToCompleteMax:B.ai().optional(),minHoursEffortPerWeek:B.ai().optional(),courseCount:B.ai().nullable().optional(),position:B.ai().optional(),meta:eG}),eQ=B.Ik({exact:B.YO(eW),related:B.YO(eW),recommended:B.YO(eW),spotlight:
1B.YO(eW)}),eK=B.Ik({data:eQ,tracking:B.Ik({sortingReferenceId:B.Yj()}).optional()}),eJ=B.Ik({data:B.YO(eW)}),eX=B.Ik({total:B.ai(),limit:B.ai(),offset:B.ai()}),eZ=B.Ik({data:B.YO(eW),pagination:eX}),e0=B.Ik({audience:B.Yj(),schoolIds:B.YO(B.ai())});B.Ik({degree:B.Yj().optional(),category:B.Yj().optional(),subject:B.Yj().optional(),unqualified:B.YO(B.Yj()).optional(),qualified:B.YO(B.Yj()).optional(),startDate:B.Yj().optional(),state:B.Yj().optional(),country:B.Yj().optional(),channel:B.Yj().optional(),media:B.Yj().optional(),experience:B.Yj().optional(),presentationUrl:B.Yj().optional(),limit:B.ai().optional(),offset:B.ai().optional(),programIds:B.YO(B.ai()).optional(),excludeProgramIds:B.YO(B.ai()).optional(),schoolIds:B.YO(B.ai()).optional(),providers:B.YO(B.Yj()).optional(),excludeProviders:B.YO(B.Yj()).optional(),forceAudience:e0.optional()}),B.Ik({degree:B.Yj().optional(),category:B.Yj().optional(),subject:B.Yj().optional(),state:B.Yj().optional(),country:B.Yj().optional(),channel:B.Yj().optional(),experience:B.Yj().optional(),presentationUrl:B.Yj().optional(),limit:B.ai().optional(),offset:B.ai().optional(),excludeSchoolIds:B.YO(B.ai()).optional(),excludeProgramIds:B.YO(B.ai()).optional(),excludeProviders:B.YO(B.Yj()).optional()}),B.Ik({data:B.YO(eW),tracking:B.Ik({sortingReferenceId:B.Yj().optional()}).optional()}),B.Ik({query:B.Yj().optional(),subjects:B.YO(B.Yj()).optional(),skills:B.YO(B.Yj()).optional(),level:B.Yj().optional(),flexibility:B.Yj().optional(),type:B.Yj().optional(),subType:B.Yj().optional(),limit:B.ai().optional(),offset:B.ai().optional(),uuids:B.YO(B.Yj()).optional(),excludeProviders:B.YO(B.Yj()).optional()});let e1=B.Ik({types:B.g1(B.Yj(),B.ai()),subjects:B.g1(B.Yj(),B.ai()),subTypes:B.g1(B.Yj(),B.ai()),skills:B.g1(B.Yj(),B.ai()).optional()}),e2=B.Ik({optionId:B.Yj(),text:B.Yj(),value:B.KC([B.Yj(),B.ai(),B.zM(),B.ch()]).optional(),leadFieldAssociated:B.Yj().optional()}),e4=B.Ik({options:B.YO(e2),questionType:B.eu("SELECT"),id:B.Yj(),type:B.eu("QUESTION"),title:B.Yj().optional()}),e5=B.g1(B.Yj(),B.Ik({question:e4})),e3=B.g1(B.Yj(),B.Ik({courses:B.YO(eW)})),e6=B.Ik({key:B.Yj().optional(),label:B.Yj().optional()}).passthrough(),e8=B.Ik({nodes:B.YO(e6).optional()}).passthrough(),e9=B.Ik({dimensions:B.g1(B.Yj(),e8).optional()});class e7{constructor(e){this.config=e,this.cache=new Map;const t={baseUrl:"",defaultHeaders:{},cache:new Map,newRelic:{noticeError:(e,t)=>{console.error("Error in OfferingsServiceApiClient: noticeError",e,t)}},strictValidation:!1};this.config={...t,...e},this.cache=this.config.cache??new Map}getApiName(){return"offerings-service"}async get(e,t={cacheEnabled:!1}){let r=`${this.config.baseUrl}${e}`;if(t.bustCache&&this.bustCache(r),this.shouldUseCache(r,t))return this.cache.get(r).clone();let n=await fetch(`${this.config.baseUrl}${e}`,{...t,headers:{...this.config.defaultHeaders,...t.headers}});return t.cacheEnabled&&n.ok&&this.cache.set(r,n.clone()),n}async post(e,t,r={cacheEnabled:!1}){let n=JSON.stringify(t),i=`${this.config.baseUrl}${e}:${n}`;if(r.bustCache&&this.bustCache(i),this.shouldUseCache(i,r))return this.cache.get(i).clone();let o=await fetch(`${this.config.baseUrl}${e}`,{method:"POST",body:n,...r,headers:{"Content-Type":"application/json",...this.config.defaultHeaders,...r.headers}});return r.cacheEnabled&&o.ok&&this.cache.set(i,o.clone()),o}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}reportError(e,t){this.config.newRelic?.noticeError&&this.config.newRelic.noticeError(e,t||{})}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async getQualifiedOfferings(e,t,r={}){let n={};t&&(n["x-forwarded-for"]=t);let i=await this.post("/v1/offerings/qualified",e,{...r,headers:{...r.headers,...n}});
1return this.hasError(i)&&console.error("Failed to get qualified offerings"),await this.toJson(i,eK)}async getFilters(e={},t={}){let r=new URLSearchParams;e.type&&r.append("type",e.type),e.subject&&r.append("subject",e.subject);let n=r.toString(),i=n?`/v1/filters?${n}`:"/v1/filters",o=await this.get(i,t);return this.hasError(o)?(console.error("Failed to get offerings filters"),null):await this.toJson(o,e1)}async getQualifiedExactOfferings(e,t,r={}){let n={};t&&(n["x-forwarded-for"]=t);let i=await this.post("/v1/offerings/qualified/exact",e,{...r,headers:{...r.headers,...n}});return this.hasError(i)&&console.error("Failed to get qualified exact offerings"),await this.toJson(i,eJ)}async getProgramFieldsConfiguration(e,t,r={}){let n={};t&&(n["x-forwarded-for"]=t);let i=await this.get(`/v1/degree-fields/${e.degreeId}`,{...r,headers:{...r.headers,...n}});return this.hasError(i)?(console.error(`Failed to get program fields configuration for degree ${e.degreeId}`),null):await this.toJson(i,e5)}async getRecommendations(e,t={}){let r={courses:[{sourceId:"95f61afe-f3d7-4782-8210-618e9080bada",subjects:e.subjects}]},n=await this.post("/v1/recommendations",r,t);return this.hasError(n)&&console.error("Failed to get recommendations"),await this.toJson(n,e3)}async getDimensions(e={}){let t=await this.get("/v1/offerings/dimensions",e);return this.hasError(t)?(console.error("Failed to get offerings dimensions"),null):this.toJson(t,e9)}async getSearchOfferings(e,t={}){let r=await this.post("/v1/search",e,t);return this.hasError(r)&&console.error("Failed to search offerings"),await this.toJson(r,eZ)}}let te={degree:"degree_level",category:"academic_subject_category",subject:"academic_subject"},tt=Object.values(te),tr=(e,t)=>`${e}:${t}`;async function tn(e,t){let{scope:r="all",...n}=t??{};try{let t=new e7({baseUrl:e.replace(/\/+$/,"")}),i=await t.getDimensions(n);if(!i)return[];let o=function(e,t){let r=new Map;for(let[n,i]of Object.entries(e?.dimensions??{}))if(!t||t.has(n))for(let e of i?.nodes??[]){let t="string"==typeof e.key?e.key:void 0,i="string"==typeof e.label?e.label:void 0;t&&i&&r.set(tr(n,t),i)}return r}(i,function(e){if("all"!==e)return new Set("dcs"===e?tt:e)}(r));return Array.from(o.entries())}catch{return[]}}let ti={ready:!1,translate:e=>e,translateDcsValue:(e,t)=>t},to=(0,v.createContext)(ti),ta=({children:e,seed:t})=>{let r=(0,v.useMemo)(()=>{if(!(t instanceof Map?t.size>0:Array.isArray(t)&&t.length>0))return ti;let e=t instanceof Map?t:new Map(t),r=(t,r)=>e.get(tr(r,t))??t;return{ready:!0,translate:r,translateDcsValue:(e,t)=>r(t,te[e])}},[t]);return(0,b.jsx)(to.Provider,{value:r,children:e})};function tl(){return(0,v.useContext)(to)}function ts(e,t){switch(t.type){case F.SET_STEPS:return{...e,steps:t.payload};case F.SET_CURRENT_STEP:return{...e,currentStep:t.payload,currentStepType:t.payload?.type};case F.SET_CURRENT_STEP_INDEX:return{...e,currentStepIndex:t.payload};case F.SET_NAVIGATION_HISTORY:return{...e,navigationHistory:t.payload};case F.ADD_TO_NAVIGATION_HISTORY:return{...e,navigationHistory:[...e.navigationHistory,t.payload]};case F.GO_BACK_IN_HISTORY:{let t=[...e.navigationHistory];t.pop();let r=t[t.length-1];return{...e,navigationHistory:t,currentStep:r,currentStepType:r?.type,currentStepIndex:e.currentStepIndex-1,acceptTCPA:!1}}case F.UPDATE_FLOW_STATE:return{...e,flowState:{...e.flowState,[t.payload.stepId]:t.payload.data}};case F.SET_FLOW_STATE:return{...e,flowState:t.payload};case F.SET_OPEN_MODAL:return{...e,openModal:t.payload};case F.SET_ACCEPT_TCPA:return{...e,acceptTCPA:t.payload};case F.SET_VALIDATION_ERRORS:return{...e,validationErrors:t.payload};case F.CLEAR_VALIDATION_ERRORS:return{...e,validationErrors:[]};case F.SET_FORM_STARTED_FIRED:return{...e,formStartedFired:t.payload};case F.JUMP_TO_STEP:return{...e,currentStep:t.payload.step,currentStepIndex:t.payload.index,navigationHistory:[t.payload.step],acceptTCPA:!1};case F.SET_IS_SUBMITTING:return{...e,isSubmitting:t.payload};case F.SET_SUBMISSION_ERROR:return{...e,submissionError:t.payload};case F.SET_POPUP_BLOCKED:return{...e,popupBlockedUrl:t.payload};case F.RESET_FLOW:return{...e,flowState:{},currentStep:t.payload.entryStep,currentStepIndex:t.payload.entryStepIndex,currentStepType:t.payload.entryStep?.type,navigationHistory:[t.payload.entryStep],validationErrors:[],openM
1odal:!1,acceptTCPA:!1,isSubmitting:!1,submissionError:null,popupBlockedUrl:null};default:return e}}let tc=e=>({type:F.SET_CURRENT_STEP,payload:e}),td=e=>({type:F.SET_CURRENT_STEP_INDEX,payload:e}),tu=e=>({type:F.ADD_TO_NAVIGATION_HISTORY,payload:e}),tp=(e,t)=>({type:F.UPDATE_FLOW_STATE,payload:{stepId:e,data:t}}),tf=e=>({type:F.SET_OPEN_MODAL,payload:e}),tm=e=>({type:F.SET_VALIDATION_ERRORS,payload:e}),th=e=>({type:F.SET_IS_SUBMITTING,payload:e}),tg=e=>({type:F.SET_SUBMISSION_ERROR,payload:e}),ty=e=>({type:F.SET_POPUP_BLOCKED,payload:e}),tb={ProductClicked:"redventures.ecommerce.v1.ProductClicked",ProductLoaded:"redventures.ecommerce.v1.ProductLoaded",ProductViewed:"redventures.ecommerce.v1.ProductViewed",ElementClicked:"redventures.usertracking.v3.ElementClicked",ElementViewed:"redventures.usertracking.v3.ElementViewed",FieldViewed:"core.fieldViewed.v1",FieldSelected:"redventures.usertracking.v3.FieldSelected",FieldInputted:"redventures.usertracking.v3.FieldInputted",FormContinued:"redventures.usertracking.v3.FormContinued",FormSubmitted:"redventures.usertracking.v3.FormSubmitted",FormStarted:"redventures.usertracking.v3.FormStarted",FormViewed:"redventures.usertracking.v3.FormViewed",ConversionTracked:"core.conversions.ConversionTracked.v2",ElementLoaded:"core.ElementLoaded.v1",ServiceRequestTracked:"highereducation.ServiceRequestTracked.v2",ServiceResponseTracked:"highereducation.ServiceResponseTracked.v2",Identify:"core.Identify.v1"},tv=e=>({"X-Powered-By":"Dynamic-Experiences-V2","X-RVEDU-Request-Chain-Id":e,"X-RVEDU-Original-Emitter":"Dynamic-Experiences-App","X-RVEDU-Session-ID":window?.tagular?.("getAliasSet")?.sessionId||"","X-RVEDU-Anonymous-ID":window?.tagular?.("getAliasSet")?.anonymousId||"","X-RVEDU-Referer":window.location.href||""}),tx=B.Ik({address:B.Yj().optional(),address2:B.Yj().optional(),city:B.Yj().optional(),state:B.Yj().optional(),stateAbbr:B.Yj().optional(),postalCode:B.Yj().nullable().optional(),country:B.Yj().nullable().optional(),ipInferredPostalCode:B.Yj().optional()}),tw=B.k5(["highschool","ged","associates","bachelors","masters","doctorate"]),tS=B.k5(["bsn","bsw","mba","msw","law-degree","teaching-certificate","bachelors-speech-pathology","bachelors-behavioral-science"]),tI=B.k5(["nursing","no-license","in-progress","licensed"]),tC=B.k5(["us"]),tj=B.k5(["k-12-teacher","k-12-admin","higher-education","private-sector","government-non-profit","other"]),tk=B.k5(["Architecture","Behavioral Science","Biology","Chemistry","Chemical Engineering","Engineering and Engineering Technology","Humanities, Social Sciences and Education","Management","Interior Design","Studio Arts","Science and Technology Management","Digital Media Design","Business","Computer Engineering","Computer Science","Economics","Education","Electrical Engineering","Engineering","English","Government","History","Information Technology","Mathematics","Mechanical Engineering","Other","Other Engineering","Other Sciences","Non-Science","Physical Science","Physics","Statistics","Teaching","Writing"]),tA=B.k5(["structured","self-paced"]),tE=B.k5(["us","other"]),tN=B.k5(["family-nursing","nurse-midwifery","womens-health","adult-gerontology-acute-care-nurse-practitioner","applied-behavior-analysis","psychology","licensed-marriage-and-family-therapist","licensed-professional-counselor","master-of-arts-in-counseling","master-of-science-in-marriage-and-family-therapy","mse-in-educational-leadership","mse-in-educational-leadership-with-principle-licensure","preparation-principal-licensure-preparation-only","master-of-arts-in-teaching","master-of-arts-in-teaching-tesol","MSN","Post-MSN to DNP","Post-BSN - FNP","Post-BSN - AG-ACNP","Post-BSN - MWH","Post-BSN - WHNP","Post-Master's"]),tT=B.Ik({firstName:B.Yj(),lastName:B.Yj(),email:B.Yj(),startDate:B.Yj().nullable().optional(),ipAddress:B.Yj().optional(),phoneNumber:B.Yj().nullable().optional(),location:tx.nullable().optional(),hsGradYear:B.ai().nullable().optional(),levelOfEducation:tw.nullable().optional(),inProgressLevelOfEducation:tw.nullable().optional(),militaryStatus:B.zM().nullable().optional(),gpa:B.ai().nullable().optional(),tcpaText:B.Yj().nullable().optional(),transferCredits:B.ai().nullable().optional(),yearsOfWorkExperience:B.ai().nullable().optional(),yearsOfProgramRelatedExperience:B.ai().nullable().optional(),currentAcademicAward:tS.nullable().optional(),inProgressAcademicAward:tS.nullable().optional(),currentLicense:tI.nullable().optional(),inProgressLicense:tI.nullable().optional(),currentCitizenship:tC.nullable().optional(),workExperienceField:tj.nullable().optional(),hasGivenTCPAConsent:B.zM().nullable().optional(),undergraduateMajor:tk.nullable().optional(),inProgressUndergraduateMajor:tk.nullable().optional(),learningPace:tA.nullable().optional(),currentPermanentResidenceCountry:tE.nullable().optional(),programTrack:tN.nullable().optional(),hasGivenThirdPartySharingConsent:B.zM().nullable().optional(),hasGivenProspectSharingConsent:B.zM().nullable().optional(),isInARelatedRole:B.zM().optional(),leadSource:B.Yj().nullable().optional(),is18YearsOrOlder:B.zM().optional(),someCollege:B.zM().optional(),lastAttendanceYear:B.ai().nullable().optional(),tcpaEABConsentGiven:B.zM().nullable().optional(),tcpaEMCCConsentGiven:B.zM().nullable().optional(),hasCompleted30SemesterHours:B.zM().nullable().optional(),thirdPartyLeadId:B.Yj().optional()}),tO=B.Ik({correlationId:B.Yj().optional(),publisher:B.Yj().optional(),trafficSource:B.Yj().optional(),heclid:B.Yj().optional(),anonymousId:B.Yj().nullable().optional(),url:B.Yj().optional(),experience:B.Yj().optional(),publisherType:B.Yj().optional()}),tP=B.Ik({id:B.ai(),name:B.Yj().optional(),slug:B.Yj().optional(),campus:B.Ik({id:B.ai().optional(),name:B.Yj().optional(),isOnline:B.zM().optional()}).optional()}),tL=B.Ik({providerProgramId:B.ai().nullable().optional(),program:B.Yj().optional(),degree:B.Ik({name:B.Yj().optional(),slug:B.Yj().optional(),id:B.ai().optional()}).optional(),category:B.Ik({name:B.Yj().optional(),slug:B.Yj().optional(),id:B.ai().optional()}).optional(),subject:B.Ik({name:B.Yj().optional(),slug:B.Yj().optional(),id:B.ai().optional()}).optional(),cap:B.Ik({id:B.ai().optional()}).optional()}),tM=B.Ik({contactId:B.Yj().optional()}),tR=B.Ik({timestamp:B.ai(),guid:B.Yj(),isSync:B.zM()}),tF=B.Ik({isSync:B.zM().optional(),isTest:B.zM().optional()});B.Ik({lead:tT,trackingContext:tO.nullable().optional()}),B.Ik({lead:tT,trackingContext:tO,schoolContext:tP,programContext:tL,contactContext:tM.optional(),messageContext:tR.optional()}),B.Ik({organizationId:B.Yj(),slug:B.Yj(),offeringUuid:B.Yj().optional(),conversionId:B.Yj().optional(),lead:tT.passthrough(),trackingContext:tO.catchall(B.L5()).optional(),messageContext:tF.optional()}),B.Ik({phoneNumber:B.Yj()});let tU=B.Ik({validPhoneNumber:B.eu(!1)}),t$=B.Ik({phoneNumber:B.Yj(),nationalFormat:B.Yj(),validPhoneNumber:B.zM(),lineTypeIntelligence:B.Ik({carrier_name:B.Yj().nullable()}).nullable()}),t_=B.KC([tU,t$]);B.Ik({zip:B.Yj()});let tD=B.Ik({validZip:B.eu(!1)}),tY=B.Ik({city:B.Yj(),zipcode:B.Yj(),state:B.Yj(),stateAbbr:B.Yj(),country:B.Yj().optional()}),tB=B.KC([tD,tY]);B.Ik({lead:tT});let tz=B.Ik({required:B.YO(B.Yj()).optional(),properties:B.g1(B.L5()).optional(),additionalProperties:B.zM().optional()}),tV=B.Ik({required:B.YO(B.Yj()),properties:B.g1(tz),additionalProperties:B.zM()}),tH=B.Ik({organizationId:B.Yj().optional(),offeringUuid:B.Yj().nullable().optional(),diff
1y:tV}),tq=B.Ik({id:B.Yj(),name:B.Yj(),description:B.Yj(),fields:B.YO(B.Yj())}),tG=B.Ik({qualified:B.YO(tq),unqualified:B.YO(tq),unknownQualifications:B.YO(tq)}),tW=B.Ik({studentId:B.Yj().optional(),referenceId:B.Yj().optional()}),tQ=B.Ik({organizationId:B.Yj().optional(),offeringUuid:B.Yj().nullable().optional(),leadSubmitted:B.zM(),PK:B.Yj(),SK:B.Yj(),referenceId:B.Yj().optional(),partnerIdentifiers:tW.optional()}),tK=B.Ik({type:B.Yj().optional(),enum:B.YO(B.L5()).optional(),default:B.L5().optional(),description:B.Yj().optional(),required:B.YO(B.Yj()).optional(),properties:B.g1(B.RZ(()=>tK)).optional()}).passthrough(),tJ=B.Ik({$schema:B.Yj().optional(),type:B.Yj().optional(),required:B.YO(B.Yj()).optional(),properties:B.g1(tK).optional(),additionalProperties:B.zM().optional()}).passthrough(),tX=B.Ik({organizationId:B.Yj(),offeringUuid:B.Yj().nullable(),schema:tJ});class tZ{constructor(e){this.config=e;const t={baseUrl:"",defaultHeaders:{"Content-Type":"application/json","x-api-key":"voyager"},cache:new Map,newRelic:{noticeError:(e,t)=>{console.error("Error in DeliverySystemApiClient: noticeError",e,t)}},strictValidation:!1},r={...t,...e};this.config={...r,defaultHeaders:{...t.defaultHeaders,...r.defaultHeaders??{}}},this.cache=this.config.cache??new Map}getApiName(){return"delivery-system"}async get(e,t={cacheEnabled:!1}){let r=`${this.config.baseUrl}${e}`;if(t.bustCache&&this.bustCache(r),this.shouldUseCache(r,t))return this.cache.get(r).clone();let n=await fetch(`${this.config.baseUrl}${e}`,{...t,headers:{...this.config.defaultHeaders,...t.headers}});return t.cacheEnabled&&n.ok&&this.cache.set(r,n.clone()),n}async post(e,t,r={cacheEnabled:!1}){let n=`${this.config.baseUrl}${e}`;if(r.bustCache&&this.bustCache(n),this.shouldUseCache(n,r))return this.cache.get(n).clone();let i=t instanceof URLSearchParams?t:JSON.stringify(t),o=await fetch(`${this.config.baseUrl}${e}`,{method:"POST",body:i,...r,headers:{...this.config.defaultHeaders,...r.headers}});return r.cacheEnabled&&o.ok&&this.cache.set(n,o.clone()),o}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}reportError(e,t){this.config.newRelic?.noticeError&&this.config.newRelic.noticeError(e,t||{})}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async getLeadSchema(e,t={}){let r=await this.get(`/v3/schema/${e.schoolId}/${e.programId}`,t);return this.hasError(r)&&console.error("Failed to get lead schema"),await this.toJson(r,tJ)}async getLeadSchemaV4(e,t={}){let r=this.buildLeadSchemaV4Path(e),n=await this.get(r,t);if(this.hasError(n))throw console.error("Failed to get v4 lead schema"),Error(await this.buildHttpErrorMessage(n,"Error getting v4 lead schema"));return(await this.toJson(n,tX)).schema}async postLeadSchema(e,t,r={}){let n=await this.post(`/v3/schema/${e.schoolId}/${e.programId}`,t,r);return this.hasError(n)&&console.error("Failed to post lead schema"),await this.toJson(n,tJ)}async postLeadQualify(e,t,r={}){let n=await this.post("/v4/request/qualify",e,{...r,headers:{...r.headers,...t}});return this.hasError(n)&&console.error("Failed to qualify lead"),await this.toJson(n,tG)}async postLeadQualifications(e,t,r={}){let n=await this.post("/v3/lead/qualify",e,{...r,headers:{...r.headers,...t}});return this.hasError(n)&&console.error("Failed to get lead qualifications"),await this.toJson(n,tG)}async submitLead(e,t={}){let r=await this.post("/v3/lead",e,t);return this.hasError(r)&&console.error("Failed to submit lead"),await this.toJson(r,tQ)}async submitLeadV4(e,t={}){let r=await this.post("/v4/lead",e,t);if(this.hasError(r))throw console.error("Failed to submit v4 lead"),Error(await this.buildHttpErrorMessage(r,"Error submitting v4 lead"));return await this.toJson(r,tQ)}async getDiffyV4(e,t,r={}){let n=await this.post(this.buildDiffyV4Path(t),e,r);if(this.hasError(n))throw console.error("Failed to get v4 diffy"),Error(await this.buildHttpErrorMessage(n,"Error getting v4 diffy"));return await this.toJson(n,tH)}async validatePhone(e,t={}){let r=await this.post("/v2/validate/phone",e,t);return this.hasError(r)&&console.error("Failed to validate phone"),await this.toJson(r,t_)}async validateZip(e,t={}){let r=await this.post("/v2/validate/zip",e,t);return this.hasError(r)&&console.error("Failed to validate zip"),await this.toJson(r,tB)}async getDiffy(e,t,r={}){let n=await this.post(`/v3/diffy/${t.schoolId}/${t.programId}`,e,r);return this.hasError(n)&&console.error("Failed to get diffy"),await this.toJson(n,tH)}buildLeadSchemaV4Path(e){return this.buildOrganizationScopedV4Path("/v4/schema",e)}buildDiffyV4Path(e){return this.buildOrganizationScopedV4Path("/v4/diffy",e)}async buildHttpErrorMessage(e,t){let r=await e.json().catch(()=>({})),n="string"==typeof r.error?r.error:"string"==typeof r.message?r.message:`${t}: ${e.status}`,i={...r};if(delete i.error,delete i.message,Object.keys(i).length>0)try{return`${n}: ${JSON.stringify(i)}`}catch{}return n}buildOrganizationScopedV4Path(e,t){let r=`${e}/${encodeURIComponent(t.organizationId)}`;return t.offeringUuid?`${r}/${encodeURIComponent(t.offeringUuid)}`:r}}let t0=()=>new tZ({baseUrl:Y().deliverySystemApiUrl??"",defaultHeaders:tv(A())}),t1=async e=>{try{let t=t0();return await t.validatePhone({phoneNumber:e})}
1catch(e){return console.error("Could not validate phone",e),{validPhoneNumber:!1,error:e}}},t2=async e=>{try{let t=t0(),r=await t.validateZip({zip:e});if("validZip"in r&&!1===r.validZip)return{validZip:!1,error:r};if("stateAbbr"in r)return{validZip:!0,...r};return{validZip:!1,error:"Invalid response format"}}catch(e){return console.error("Could not validate zip",e),{validZip:!1,error:e}}},t4=e=>{let t=!1,r=!1,n=!1;if(e.type===O.MULTI_QUESTION){let i=e.stepQuestions||[];t=i.some(e=>"phoneNumber"===e.leadFieldAssociated),r=i.some(e=>"zip"===e.leadFieldAssociated),n=i.some(e=>"email"===e.leadFieldAssociated)}else t="phoneNumber"===e.leadFieldAssociated,r="zip"===e.leadFieldAssociated,n="email"===e.leadFieldAssociated;return{needsPhone:t,needsZip:r,needsEmail:n}},t5=async(e,t)=>{let r,n=[];if("phoneNumber"===t)if(0===e.trim().length)n.push({field:t,message:"Please enter a phone number"});else{let r=await t1(e);r?.validPhoneNumber||n.push({field:t,message:"Please enter a valid phone number"})}if("zip"===t){0===e.trim().length&&n.push({field:t,message:"Please enter a ZIP code"});let i=await t2(e);i?.validZip?"stateAbbr"in i&&(r={stateAbbr:i.stateAbbr,state:i.state,city:i.city}):n.push({field:t,message:"Please enter a valid ZIP code"})}if("email"===t)if(0===e.trim().length)n.push({field:t,message:"Please enter an email address"});else/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(e)||n.push({field:t,message:"Please enter a valid email address"});return{errors:n,resolvedZipData:r}},t3=async(e,t)=>{let r,n=[],i=t[e.id||""],o=t4(e);if(!o.needsPhone&&!o.needsZip&&!o.needsEmail)return{isValid:!0,errors:[]};if(!i?.option){let t=e.title?.toString().toLowerCase().includes("phone")?"phone number":e.title?.toString().toLowerCase().includes("zip")?"ZIP code":e.title?.toString().toLowerCase().includes("email")?"email address":"field";return{isValid:!1,errors:[{field:e.leadFieldAssociated||e.id||"unknown",message:`Please enter a ${t}`}]}}if(e.type===O.MULTI_QUESTION){let i=e.stepQuestions||[];for(let e=0;e<i.length;e++){let o=i[e],a=t[o.id||""],l="phoneNumber"===o.leadFieldAssociated,s="zip"===o.leadFieldAssociated,c="email"===o.leadFieldAssociated;if((l||s||c)&&!a?.option){let e=l?"phone number":s?"ZIP code":"email address";
1n.push({field:o.leadFieldAssociated||o.id||"unknown",message:`Please enter a ${e}`})}if(a?.option)for(let e of Array.isArray(a.option)?a.option:[a.option]){let t=e.value?.toString()||"",i=await t5(t,o.leadFieldAssociated);i.errors&&n.push(...i.errors),i.resolvedZipData&&(r=i.resolvedZipData)}}}else for(let e of Array.isArray(i.option)?i.option:[i.option]){let t=e.value?.toString()||"",o=i?.leadFieldAssociated,a=await t5(t,o);a.errors&&n.push(...a.errors),a.resolvedZipData&&(r=a.resolvedZipData)}return{isValid:0===n.length,errors:n,resolvedZipData:r}},t6={dynamicFlowUrl:"dynamic-flows",organizationApiUrl:"organizations",organizationServiceBaseUrl:"organizations",campaignManagementApiUrl:"campaign-management",offeringsSearchApiUrl:"offerings",offeringsServiceBaseUrl:"offerings-service",deliverySystemApiUrl:"delivery-system",deliverySystemBaseUrl:"delivery-system",audienceIntentApiUrl:"audience-intent",prospectServiceApiUrl:"prospect"},t8={prod:{dynamicFlowUrl:"https://dynamic-flows.api.highereducation.com",audienceIntentApiUrl:"https://audience-intent.api.highereducation.com",offeringsSearchApiUrl:"https://offerings.api.highereducation.com",offeringsServiceBaseUrl:"https://offerings-service.api.highereducation.com",mobiusApiUrl:"https://api.mobius.highereducation.com",deliverySystemApiUrl:"https://delivery-system.rveducation.io",organizationApiUrl:"https://organizations.api.highereducation.com",campaignManagementApiUrl:"https://campaign-management.api.highereducation.com",prospectServiceApiUrl:"https://prospect.api.highereducation.com",leadApiBaseUrl:"",locationInferenceApiUrl:"",externalLinkOrigins:[]},beta:{dynamicFlowUrl:"https://dynamic-flows.beta.api.highereducation.com",audienceIntentApiUrl:"https://audience-intent.beta.api.highereducation.com",offeringsSearchApiUrl:"https://offerings.beta.api.highereducation.com",offeringsServiceBaseUrl:"https://offerings-service.beta.api.highereducation.com",mobiusApiUrl:"https://api.beta.mobius.highereducation.com",deliverySystemApiUrl:"https://delivery-system.beta.rveducation.io",organizationApiUrl:"https://organizations.beta.api.highereducation.com",campaignManagementApiUrl:"https://campaign-management.beta.api.highereducation.com",prospectServiceApiUrl:"https://prospect.beta.api.highereducation.com",leadApiBaseUrl:"",locationInferenceApiUrl:"",externalLinkOrigins:[]},int:{dynamicFlowUrl:"https://dynamic-flows.int.api.highereducation.com",audienceIntentApiUrl:"https://audience-intent.int.api.highereducation.com",offeringsSearchApiUrl:"https://offerings.int.api.highereducation.com",offeringsServiceBaseUrl:"https://offerings-service.int.api.highereducation.com",mobiusApiUrl:"https://api.staging.mobius.highereducation.com",deliverySystemApiUrl:"https://delivery-system.staging.rveducation.io",organizationApiUrl:"https://organizations.int.api.highereducation.com",campaignManagementApiUrl:"https://campaign-management.int.api.highereducation.com",prospectServiceApiUrl:"https://prospect.int.api.highereducation.com",leadApiBaseUrl:"",locationInferenceApiUrl:"",externalLinkOrigins:[]},dev:{dynamicFlowUrl:"https://dynamic-flows.dev.api.highereducation.com",audienceIntentApiUrl:"https://audience-intent.dev.api.highereducation.com",offeringsSearchApiUrl:"https://offerings.int.api.highereducation.com",offeringsServiceBaseUrl:"https://offerings-service.dev.api.highereducation.com",mobiusApiUrl:"https://api.staging.mobius.highereducation.com",deliverySystemApiUrl:"https://delivery-system.staging.rveducation.io",organizationApiUrl:"https://organizations.dev.api.highereducation.com",campaignManagementApiUrl:"https://campaign-management.int.api.highereducation.com",prospectServiceApiUrl:"https://prospect.dev.api.highereducation.com",leadApiBaseUrl:"",locationInferenceApiUrl:"",externalLinkOrigins:[]}},t9={prod:"https://www.highereducation.com",beta:"https://dev.highereducation.com",int:"https://dev.highereducation.com",dev:"https://dev.highereducation.com"};function t7(e,t){return t?t9["local"===e?re:e]:""}let re="int";function rt(e,t){return"local"===e?function({localPrefix:e="",localOverrides:t={}}={}){let r={...t8[re]},n=e.trim();if(n)for(let[e,t]of Object.entries(t6))r[e]=`https://local${n}-${t}.local.api.highereducation.com`;for(let[e,n]of Object.entries(t)){if("string"==typeof n){let t=n.trim();t&&(r[e]=t);continue}Array.isArray(n)&&(r.externalLinkOrigins=n)}return r}(t):t8[e]}let rr=(0,v.createContext)(null),rn=({children:e,config:t})=>{(0,v.useMemo)(()=>{var e;t.api&&(e=t.api,D={...D,...e})},[t.api]);let r=(0,v.useMemo)(()=>t,[t]);return(0,b.jsx)(rr.Provider,{value:r,children:e})};function ri(){let e=(0,v.useContext)(rr);return e||(console.warn("useExperienceConfig must be used within an ExperienceConfigProvider"),function(e="prod"){return{api:rt(e),tracking:{dynamicFlowEventFlag:!1}}}())}function ro(){return ri().site}let ra="_meta.leadFieldAssociated",rl="_meta.customField",rs=(e,t)=>t.find(t=>
1t.id===e.nextId)||null,rc=e=>"string"==typeof e.leadFieldAssociated&&e.leadFieldAssociated.length>0?e.leadFieldAssociated:"string"==typeof e.customField&&e.customField.length>0?e.customField:void 0,rd=(e,t)=>{if("string"==typeof t){let r=t.trim();r.length>0&&e.add(r)}},ru=(e,t)=>{if(!e||"object"!=typeof e)return;if(Array.isArray(e)){for(let r of e)ru(r,t);return}rd(t,e[ra]),rd(t,e[rl]);let r=e.props;for(let n of(r&&"object"==typeof r&&!Array.isArray(r)&&(rd(t,r[ra]),rd(t,r[rl])),Object.values(e)))n&&"object"==typeof n&&ru(n,t)},rp=e=>{if(!e)return[];let t=new Set;if(rd(t,e.leadFieldAssociated),rd(t,e.customField),Array.isArray(e.stepQuestions))for(let r of e.stepQuestions)for(let e of(rd(t,r.leadFieldAssociated),rd(t,r.customField),r.options||[]))rd(t,e.leadFieldAssociated),rd(t,e.customField);if(Array.isArray(e.groupedQuestions))for(let r of e.groupedQuestions)for(let e of r.questions||[])for(let r of(rd(t,e.leadFieldAssociated),rd(t,e.customField),e.options||[]))rd(t,r.leadFieldAssociated),rd(t,r.customField);if(Array.isArray(e.options))for(let r of e.options)rd(t,r.leadFieldAssociated),rd(t,r.customField);let r=e.dslConfig?.data;return void 0!==r&&ru(r,t),Array.from(t)},rf=(e,t,r=[])=>{let n=e.map(e=>void 0!==e.value&&null!==e.value&&String(e.value).length>0||"string"==typeof e.slug&&e.slug.length>0?e:{...e,value:""});if(!(Array.isArray(t)&&t.some(e=>""===e)))return n;let i=new Set(n.map(rc).filter(e=>"string"==typeof e));for(let e of r)i.has(e)||n.push({optionId:e,text:"",value:"",leadFieldAssociated:e});return n},rm=(e,t,r,n,i)=>{let{condition:o}=e;if(o.type===L.DEFAULT)return!0;if(o.type!==L.OPTION_SELECTED&&o.type!==L.GROUP_SELECTED&&o.type!==L.COMBINATION_SELECTED)return!1;let a=t.option;if(!a||!r)return!1;let l=Array.isArray(a),s=l?a[0]:a,c=l?a:[a];switch(o.type){case L.GROUP_SELECTED:switch(o.operator){case P.CONTAINS_ANY:return r.some(e=>e.group===o.group);case P.CONTAINS:return l?c.every(e=>e.group===o.group):s?.group===o.group;case P.EQUALS:return s?.group===o.group;case P.NOT_EQUALS:return s?.group!==o.group;default:return!1}case L.COMBINATION_SELECTED:{let e=i??rp(n),t=rf(r,o.combination,e),a=rf(c,o.combination,e),l=e=>{let t=[];return void 0!==e.value&&null!==e.value&&t.push(String(e.value)),"string"==typeof e.slug&&e.slug.length>0&&t.push(e.slug),t},s=Array.isArray(o.combination)&&o.combination.length>0;switch(o.operator){case P.CONTAINS_ANY:{let e=!!s&&o.combination.every(e=>t.some(t=>l(t).includes(e))),n=!o.optionIds||!(o.optionIds.length>0)||o.optionIds.every(e=>r.some(t=>t.optionId===e));return e&&n}case P.CONTAINS:return a.some(e=>l(e).some(e=>o.combination?.includes(e)??!1));case P.EQUALS:{let e=(o.combination||[]).slice().sort(),t=t=>JSON.stringify(t.slice().sort())===JSON.stringify(e);if(a.every(e=>void 0!==e.value&&null!==e.value)&&t(a.map(e=>String(e.value))))return!0;if(a.every(e=>!!e.slug))return t(a.map(e=>String(e.slug)));return!1}case P.NOT_EQUALS:return!a.some(e=>l(e).some(e=>o.combination?.includes(e)??!1));default:return!1}}case L.OPTION_SELECTED:switch(o.operator){case P.CONTAINS_ANY:return r.some(e=>e.optionId===o.optionId&&e.value===o.value);case P.EQUALS:return c.some(e=>e.optionId===o.optionId||e.value===o.value);case P.NOT_EQUALS:return!r.some(e=>e.optionId===o.optionId||e.value===o.value);case P.GREATER_THAN:return c.some(e=>Number(e.value)>Number(o.value));case P.LESS_THAN:return c.some(e=>Number(e.value)<Number(o.value));case P.CONTAINS:return c.some(e=>{let t=!o.optionId||e.optionId===o.optionId,r=!o.value||String(e.value).includes(String(o.value));return t&&r});default:return!1}default:return!1}},rh=(e,t,r)=>{let n=e.toLowerCase();return!!(n.includes("firstname")||n.includes("lastname")||n.includes("email")||n.includes("phonenumber")||n.includes("address")||t?.title?.includes("Name")||t?.title?.includes("Email")||t?.title?.includes("Phone")||t?.title?.includes("Contact")||t?.title?.includes("Address")||r?.toLowerCase().includes("name")||r?.toLowerCase().includes("email")||r?.toLowerCase().includes("phone")||r?.toLowerCase().includes("contact")||r?.toLowerCase().includes("address"))},rg=e=>Object.values(e).flatMap(e=>e?.option?(Array.isArray(e.option)?e.option:[e.option]).map(t=>({...t,leadFieldAssociated:t.leadFieldAssociated||e.leadFieldAssociated||""})):[]),ry=(e,t)=>
1{let r,n=(r=new Set,e.forEach(e=>{e.leadFieldAssociated&&r.add(e.leadFieldAssociated),e.type===O.MULTI_QUESTION&&(e.stepQuestions||[]).forEach(e=>{e.leadFieldAssociated&&r.add(e.leadFieldAssociated)})}),Array.from(r)),i={};for(let e of n)try{let r=rv(e,t);r&&""!==r&&(i[e]=r)}catch(t){console.warn(`Failed to get data for field: ${e}`,t)}return i},rb=["firstName","lastName","email","phoneNumber","zip","zipCode"],rv=(e,t)=>{let r=rg(t).find(t=>t.leadFieldAssociated===e);return rb.includes(e)?r?.value?.toString():r?.text?.toString()},rx=(e,t)=>rg(t).find(t=>t.leadFieldAssociated===e)||{optionId:"",text:"",value:"",leadFieldAssociated:""},rw=(e,t)=>Object.entries(e).filter(([e,r])=>{let n=t.find(t=>t.id===e);return"TCPA"!==e&&(r?.option||"location"===e)&&n?.type!==O.MULTI_QUESTION}).flatMap(([r,n])=>{if("location"===r){let e=[];return n.state&&e.push({fieldName:"location",fieldValue:n.state}),n.ipInferredPostalCode&&e.push({fieldName:"location",fieldValue:n.ipInferredPostalCode}),e}let i=t.find(e=>e.id===r);return i?.type===O.DCS?[{fieldName:"degree",fieldValue:rx("degree",e)?.value||""},{fieldName:"category",fieldValue:rx("category",e)?.value||""},{fieldName:"subject",fieldValue:rx("subject",e)?.value||""}]:(Array.isArray(n?.option)?n?.option:[n?.option]).map(e=>({fieldName:n?.leadFieldAssociated?.toString()||i?.stepName||i?.title?.toString()||r,fieldValue:rh(n?.leadFieldAssociated||"",i,i?.stepName)?"SANITIZED":e?.text?.toString()||e?.value?.toString()||""}))}),rS=e=>{let t={};return Object.entries(e).forEach(([e,r])=>{if(!r)return;if("location"===e){void 0!==r.state&&(t.state={key:"state",value:r.state}),void 0!==r.ipInferredPostalCode&&(t.ipInferredPostalCode={key:"ipInferredPostalCode",value:r.ipInferredPostalCode});return}if(!r.option)return;let n=r.option;if(Array.isArray(n))n.forEach(e=>{e.leadFieldAssociated&&void 0!==e.value&&(t[e.leadFieldAssociated]={key:e.leadFieldAssociated,value:e.value})});else{let e=r.leadFieldAssociated||n.leadFieldAssociated,i=n.value;e&&void 0!==i&&(t[e]={key:e,value:i})}}),t},rI=(e=null,t={})=>{if(!e)throw Error("base is required");let r=Object.entries(t).map(([e,t])=>{if(""===t||null===t)return!1;let r="object"==typeof t?JSON.stringify(t):t;return`${e}=${encodeURIComponent(r)}`}).filter(e=>e);return r.length<=0?e:e+(e.includes("?")?"&":"?")+r.join("&")},rC=e=>{let t=new URLSearchParams(e.includes("?")?e.split("?")[1]:e),r=(t.has("utmCap")||t.has("utm_cap")?t.get("utmCap")??t.get("utm_cap"):"organic")?.toLowerCase();return r&&["search","social"].includes(r)&&(r=`paid ${r}`),r??""},rj=()=>{if("function"==typeof window?.tagular)try{let e=window?.tagular("getAliasSet");if(!e)return;let{anonymousId:t,instanceId:r,sessionId:n,tenantId:i,transitId:o}=e;return{ref_anon:t??"",ref_inst:r??"",ref_sess:n??"",ref_tenant:i??"",transit_id:o??""}}catch{return}},rk="dexp-result",rA={},rE="/discover/hen",rN=e=>e.toLowerCase().replace(/^www\./,"");function rT(e){let t=e.match(/^\/discover((?:\/[^?#]*)?)((?:[?#].*)?)$/i);if(!t)return e;let[,r="",n=""]=t;return/^\/(hen|v2)(\/|$)/i.test(r)?e:`${rE}${r}${n}`}let rO=({step:e,currentStepId:t,correlationId:r,siteConfig:n,dcsData:i,redirectUrl:o,fromStepIndex:a,formViewedCorrelationId:l,outboundUrl:s,contextParams:c})=>rP(e,t,r,n,i,o,a,l,s,c),rP=(e,t,r,n,i,o,a,l,s,c)=>{let d,u,p,f=e?.resultType;if(e?.dslConfigId&&!(o&&o.toLowerCase().includes("discover")))return{url:"",outboundUrl:"",actionOutcome:rk};let m=o||"/school-search",h=(u=new URLSearchParams((d=(window?.location?.href||"").split("#")[0]).includes("?")?d.split("?")[1]:""),p={},u.forEach((e,t)=>{p[t]=e}),p),g="dexp-question-flow",y=n?.domain,b=window?.location?.hostname?.includes("dev.")||!1,v=function(e,t){if(!e)return"";let r=`https://${t}${e}`;if(!window.location)return r;let{pathname:n,origin:i,hostname:o}=window.location,a=n.replace(/^\/+/,"").split("/")[0]??"";if(a&&rN(a)===rN(e))return`${i}/${a}`;let l=rN(o)===rN(e),s=o.toLowerCase().endsWith(`.${rN(e)}`);if(!l&&s)return i;let c=o.toLowerCase(),d=rN(e);if(!(c===e.toLowerCase()||c===d||c.endsWith(`.${d}`))){let t=`${c}|${e.toLowerCase()}`;rA[t]||(rA[t]=!0,console.warn(`[generateResultUrl] Falling back to canonical base (${r}) on host "${o}" because the pathname's first segment ("${a}") does not match \`siteConfig.domain\` ("${e}"). If you are running on a path-prefixed staging host (WP Engine preview, localhost, ngrok, Vercel preview) the App Router should have a leading [tenant] segment that matches the configured domain (www-prefix differences are tolerated). The eject will route to the canonical host instead of staying on the current origin.`))}return r}
1(y,b?"dev.":"");switch(!y&&console.warn("[generateResultUrl] siteConfig.domain is missing; falling back to relative URLs. Thread `tenant.domain` into <DynamicExperience tenant={â¦} />."),f){case E.STUDY_MATCH:g=rk,m=rI(n?.appExperienceUrl,{publisher:n?.domain,url:window?.location?.href||"",degree:i?.degree?.value||"general",category:i?.category?.value||"general",subject:i?.subject?.value||"general",correlationId:r,trafficSource:rC(window?.location?.href||""),...rj()});break;case E.OFFERINGS:g=rk,m="";break;case E.DASHBOARD:g=rk,m=`${v}/${e.redirectUrl||""}`;break;case E.QUALIFIED_RESULTS_PAGE:case E.CUSTOM_RESULTS_PAGE:m="",s="",g=rk;break;default:if(g=rk,o){let d,u=o.toLowerCase().includes("discover"),p=!!n?.affiliate,f=u&&p,h=y||window.location?.hostname,x=h?rN(h):void 0,w=x?`/${x}`:"",S=f?`${b?"https://dev.highereducation.com":"https://www.highereducation.com"}${w}`:v;if(o.startsWith("http"))if(f)try{let e=new URL(o);d=`${S}${rT(e.pathname)}${e.search}`}catch{console.warn(`[generateResultUrl] Affiliate-discover redirectUrl could not be parsed as an absolute URL; falling back to the affiliate /discover/hen/ root. redirectUrl=${JSON.stringify(o)}`),d=`${S}${rE}/`}else d=o;else{let e=u?rT(o):o;d=`${S}${e}`}s=m=rI(d,{degree:i?.degree?.slug||i?.degree?.value||"general",category:i?.category?.slug||i?.category?.value||"general",subject:i?.subject?.slug||i?.subject?.value||"general",from:t||"",flowid:e?.flowId||"",jumpto:e?.id||"",correlationId:r,formViewedCorrelationId:l||"",actionOutcome:g,trafficSource:rC(window?.location?.href||""),...!c?{}:Object.fromEntries(Object.entries(c).filter(([e,t])=>e.startsWith("ctx_")&&"string"==typeof t&&t.length>0)),...rj(),fromStepIndex:a||""})}else m="/school-search",g=rk;s=m}if(m&&h){let e=new URLSearchParams(m.split("?")[1]||""),t=Object.fromEntries(Object.entries(h).filter(([t])=>!e.has(t)));Object.keys(t).length>0&&(m=rI(m,t))}return s=s||m,{url:m,outboundUrl:s||"",actionOutcome:g}};function rL(e){let t=[],r=new Set,n=e=>{let n=e.id;if(n){if(r.has(n))return;r.add(n)}t.push(e)};for(let t of e){n(t);let e=t.stepQuestions;if(Array.isArray(e))for(let t of e)n(t)}return t}let rM=(e,t,r,n)=>{let i=rL(t),o=i.find(t=>t.customField===e);if(o?.id){let e=r[o.id];if(e?.option)return e.option}for(let t of i){if(!t.id)continue;let n=r[t.id],i=n?.option;if(i){if(Array.isArray(i)){let t=i.find(t=>t.customField===e);if(t)return t}else if(i.customField===e)return i}}return n?.[e]};function rR(e,t,r){if(!r||0===r.length)return{};let n={};for(let i of r){if(Object.keys(n).length>=15)break;if("string"!=typeof i)continue;let r=i.trim();if(!r)continue;let o=t.find(e=>e.customField===r),a=rM(r,t,e),l=Array.isArray(a)?void 0:a?.leadFieldAssociated,s=o?.stepName??r,c=o?.leadFieldAssociated??l,d=null!=c&&String(c).length>0?String(c):null;if(rh(r,o,s)||null!==d&&rh(d,o,s))continue;let u=function(e){if(!e)return null;if(Array.isArray(e)){let t=e.map(e=>rF(e)).filter(e=>null!==e);return 0===t.length?null:t.join(",")}return rF(e)}(a);null!==u&&(u.length>200||(n[`ctx_${r}`]=u))}return n}function rF(e){let t=e.slug||e.value;if(null==t)return null;let r=String(t).trim();return r.length>0?r:null}let rU="de:conversion";function r$(e){let t=t=>{e(t.detail)};return window.addEventListener(rU,t),()=>window.removeEventListener(rU,t)}var r_=r(49088),rD=r.n(r_),rY=r(93275),rB=r.n(rY);let rz=e=>{if(null==e)return;let t=String(e).toLowerCase();return!1!==e&&"false"!==t&&"no"!==t&&(!0===e||"true"===t||"yes"===t||void 0)},rV=(e,t,r=null)=>{let n=null,i=null;if(e.currentAcademicAward?.value){let t=e.currentAcademicAward?.value;if("object"!=typeof t||Array.isArray(t))"string"==typeof t&&(t.includes("-in-progress")?(i=t.replace("-in-progress",""),n=null):(i=null,n=t));else{let e=Object.keys(t)[0];"IN_PROGRESS"===t[e]?(i=e,n=null):(n=e,i=null)}}else n=null,i=null;let o={firstName:e.firstName?.value,lastName:e.lastName?.value,email:e.email?.value,phoneNumber:e.phoneNumber?.value,location:{address:e.address?.value,address2:e.address2?.value,city:e.city?.value,postalCode:e.zip?.value??e.postalCode?.value,country:e.country?.value,state:e.state?.value,ipInferredPostalCode:e.ipInferredPostalCode?.value},hsGradYear:e?.hsGradYear?.value?Number(e?.hsGradYear?.value):void 0,levelOfEducation:e?.levelOfEducation?.value,militaryStatus:rz(e?.militaryStatus?.value),startDate:e?.startDate?.value==="null"?null:(e=>{if("string"==typeof e&&(e=Number(e)),null==e)return e;let t=new Date;return t.setMonth(t.getMonth()+Number(e)),t.toISOString().split("T")[0]})(e?.startDate?.value),gpa:e.gpa?.value?Number(e.gpa?.value):void 0,tcpaText:String(e.tcpaText?.value),transferCredits:e.transferCredits?.value,yearsOfWorkExperience:e.hasWorkExperience?.value===!1?0:e.yearsOfWorkExperience?.value,yearsOfProgramRelatedExperience:e.hasProgramRelatedExperience?.value===!1?0:e.yearsOfProgramRelatedExperience?.value,currentAcademicAward:n,inProgressAcademicAward:i,currentLicense:["NO_LICENSE","IN_PROGRESS",null,void 0].includes(e.currentLicense?.value)?null:e.currentLicense?.value,inProgressLicense:e.inProgressLicense?.value,workExperienceField:e?.workExperienceField?.value,hasGivenTCPAConsent:!0,hasGivenThirdPartySharingConsent:e?.hasGivenThirdPartySharingConsent?.value??!1,hasGivenProspectSharingConsent:e?.hasGivenProspectSharingConsent?.value??!1,undergraduateMajor:e?.undergraduateMajor?.value,inProgressUndergraduateMajor:e?.inProgressUndergraduateMajor?.value,learningPace:e?.learningPace?.value,programTrack:e?.programTrack?.value,currentCitizenship:e?.currentCitizenship?.value??null,currentPermanentResidenceCountry:e?.currentPermanentResidenceCountry?.value,isInARelatedRole:rz(e?.isInARelatedRole?.value),leadSource:r,tcpaEABConsentGiven:!!e?.tcpaEABConsentGiven?.value,tcpaEMCCConsentGiven:!!e?.tcpaEMCCConsentGiven?.value,someCollege:!!e?.someCollege?.value,is18YearsOrOlder:!!e?.is18YearsOrOlder?.value,lastAttendanceYear:e?.enrollmentYear?.value?Number(e?.enrollmentYear?.value):void 0};
1if(o.yearsOfWorkExperience&&(o.yearsOfWorkExperience=Number(o.yearsOfWorkExperience)),o.yearsOfProgramRelatedExperience&&(o.yearsOfProgramRelatedExperience=Number(o.yearsOfProgramRelatedExperience)),o.transferCredits&&(o.transferCredits=Number(o.transferCredits)),t){let e=new(rB())({removeAdditional:!0,allErrors:!0});rD()(e),e.compile(t)(o)}return o};function rH(e,t,r){null!=r&&""!==r&&(e[t]=r)}async function rq(e){let t,r,n,i,o;if(!e.lead.firstName?.trim()||!e.lead.lastName?.trim()||!e.lead.email?.trim()||!e.lead.phoneNumber?.trim()||!e.lead.location?.postalCode?.trim())return{success:!1,error:{code:"VALIDATION_ERROR",error:"Missing required contact information",path:ei}};let a={contact:{firstName:e.lead.firstName?.trim()??"",lastName:e.lead.lastName?.trim()??"",email:e.lead.email?.trim()??"",phoneNumber:e.lead.phoneNumber?.trim()??"",zip:e.lead.location?.postalCode?.trim()??"",details:(t=e.lead,rH(r={category:e.category,degree:e.degree,subject:e.subject},"lastName",t.lastName),rH(r,"email",t.email),rH(r,"phoneNumber",t.phoneNumber),rH(r,"hsGradYear",t.hsGradYear),rH(r,"levelOfEducation",t.levelOfEducation),rH(r,"militaryStatus",t.militaryStatus),rH(r,"startDate",t.startDate??void 0),rH(r,"tcpaText",t.tcpaText),rH(r,"thirdPartyLeadId",t.thirdPartyLeadId),rH(r,"currentLicense",t.currentLicense),rH(r,"hasGivenTCPAConsent",t.hasGivenTCPAConsent),rH(r,"hasGivenThirdPartySharingConsent",t.hasGivenThirdPartySharingConsent),rH(r,"hasGivenProspectSharingConsent",t.hasGivenProspectSharingConsent),rH(r,"currentPermanentResidenceCountry",t.currentPermanentResidenceCountry??void 0),rH(r,"leadSource",t.leadSource??void 0),(n=t.location?.postalCode?.trim())&&(r.location={postalCode:n,country:t.location?.country?.trim()||"US",ipInferredPostalCode:t.location?.ipInferredPostalCode?.trim()||n}),r),trackingContext:(i=window._Cohesion?.webContext,o=e.publisher?.trim()||window.HE?.publisher?.name||window.location?.host||"",{...i??{},sessionId:e.cohesionSessionId,publisher:o})}};try{let e=await ed(a);if(!e.data?.contactId?.length)return{success:!1,error:{code:"INVALID_RESPONSE",error:"Invalid response from contact service",path:ei}};return{success:!0,data:{contactId:e.data.contactId,transactionId:e.data.transactionId,retrievalUrl:e.data.retrievalUrl}}}catch(e){return{success:!1,error:{code:"NETWORK_ERROR",error:e instanceof Error?e.message:"Network error",path:ei}}}}let rG=["firstName","lastName","email","phoneNumber","zip"],rW=async e=>{let{flowState:t,correlationId:r,publisher:n="Unknown"}=e;try{let e=rQ(t,r,n);if(!e)return{success:!1,error:"Missing required contact information"};let i=await rq(e);return i.success?{success:!0,data:i.data}:{success:!1,error:i.error?.error||"Failed to save contact"}}catch(e){return{success:!1,error:e instanceof Error?e.message:"An unexpected error occurred"}}},rQ=(e,t,r)=>{let n=rS(e);if(rG.filter(e=>!n[e]).length>0)return null;let i=rV(n);return{degree:rK("degree",e),subject:rK("subject",e),category:rK("category",e),cohesionSessionId:window?._Cohesion?.sessionId||t,lead:i,publisher:r}},rK=(e,t)=>{let r=Object.values(t).find(t=>t?.leadFieldAssociated===e);if(r?.option){let e=Array.isArray(r.option)?r.option[0]:r.option;return e?.value?.toString()||e?.text?.toString()||"Unknown"}return"Unknown"},rJ="/v1/offerings/search/match",rX="/v1/offerings/search",rZ="dexp-results",r0="dexp-unqualified",r1=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,r2=e=>{let t=e?.tagularApiKey?.trim();return t&&r1.test(t)?t:void 0},r4=(e,t,r,n,i,o,a)=>{let l=e?.offeringId?.trim(),s=t?.tenantId?.trim(),c="string"==typeof n?{flowType:n,formatType:i,formatSubtype:o,location:a}:n??(i||o||a?{formatType:i,formatSubtype:o,location:a}:void 0),d=c?.flowType?.trim(),u=c?.trafficSource?.trim()||rC(window.location.href)||"organic",p=c?.monetizationChannel?.trim();if(!l)throw Error("CMS v2 offeringId is required to create a conversion");if(!s)throw Error("CMS v2 tenantId is required to create a conversion");let f=r2(t),m=e?.resultsSource===rX?r0:rZ,h=function(e){let t=e?.country?.trim().toUpperCase(),r=e?.state?.trim().toUpperCase();if(t||r)return{...t?{country:t}:{},...r?{state:r}:{}}}(c?.location);return{offeringId:l,tenantId:s,trackingContext:{...f?{tenantId:f}:{},formatType:c?.formatType?.trim()||"dexp-offering",formatSubtype:c?.formatSubtype?.trim()||m,webContext:{anonymousId:window?._Cohesion?.anonymousId||"",fromManual:!1,instanceId:window?._Cohesion?.instanceId||"",page:{referrer:window?._Cohesion?.webContext?.page?.referrer||"",title:document.title||"",url:window.location.href||""},sessionId:window?._Cohesion?.sessionId||"",userAgent:window.navigator.userAgent||""}},correlationId:e?.productClickedCorrelationId||r||"",experience:"voyager",trafficSource:u,monetizationChannel:p||"voyager",...d?{flowType:d}:{},...h?{location:h}:{},conversionSubmitMode:"standard"}};function r5(e,t){if(null==e||""===e)return e;try{let r=/^https?:\/\//i.test(e)?new URL(e):e.startsWith("//")?new URL(`https:${e}`):new URL(e,"https://telemetry.invalid"),n=new Set((!t?[]:Object.entries(t).filter(([,e])=>(function(e){let[t,...r]=e.trim().split(".");if("lead"!==t||0===r.length)return!1;let n=r.join(".").toLowerCase().replace(/[^a-z0-9]/g,"");return n.includes("firstname")||n.includes("lastname")||n.includes("email")||n.includes("phone")||n.includes("address")})(e)).map(([e])=>e)).map(e=>e.toLowerCase())),i=[];
1if(r.searchParams.forEach((e,t)=>{n.has(t.toLowerCase())&&i.push(t)}),0===i.length)return e;if(i.forEach(e=>{r.searchParams.delete(e)}),/^https?:\/\//i.test(e))return r.toString();if(e.startsWith("//"))return`//${r.host}${r.pathname}${r.search}${r.hash}`;let o=e.replace(/[?#].*$/,"");return`${o}${r.search}${r.hash}`}catch{return}}function r3(e){return"string"!=typeof e?e:r5(e)??void 0}function r6(e,t){if(null!=e&&""!==e)return r5(e,t)??void 0}function r8(e,t){let r;(r=window?.location?.hostname)&&"localhost"!==r&&"127.0.0.1"!==r&&1||(console.groupCollapsed("%cNewRelicEvent:","background: #16a085; color: #fff; padding: 3px; font-weight: 700;",e),console.log("action: ",e),console.log("args: ",t),console.groupEnd());let n=window.newrelic;return n||void console.error(`New Relic Action Error: ${e}`,t)}function r9(e){if(!e)return e;let t={};for(let[r,n]of Object.entries(e)){let e=r3(n);void 0!==e&&(t[r]=e)}return t}function r7(e,t){let r=r8(e,t);r&&r[e](...t)}function ne(e,t){r7("noticeError",[e,{...r9(t),dynamicExperiencesError:"true"}])}function nt(e,t){let r=r3(t);void 0!==r&&r7("setCustomAttribute",[e,r])}function nr(e,t){r7("addPageAction",[e,r9(t)])}var nn=r(53066);let ni="qualifications_not_met";function no(){return Y().leadApiBaseUrl??""}async function na(e){try{return await e.json()}catch{return null}}function nl(e,t,r,n){ne(e instanceof Error?e:Error(String(e)),{source:t,reason:r,...void 0!==n?{status:n}:{}})}let ns=async e=>{let t,r={"Content-Type":"application/json",...tv((0,nn.A)())};try{let n=await fetch(`${no()}/api/hen/v1/delivery-service/lead/conversion-init/`,{method:"POST",headers:r,body:JSON.stringify(e)});if(!n.ok){t=n.status;let e=await na(n);throw Error(`Failed to initialize conversion (status ${n.status}): ${JSON.stringify(e)}`)}return await n.json()}catch(e){throw console.error("Could not initialize conversion",e),nl(void 0===t?e:Error(`Failed to initialize conversion (status ${t})`),"initConversion",void 0===t?"request-failed":"http-error",t),e}},nc=async({needsActiveProspectToken:e,activeProspectToken:t,record:r,result:n,conversionId:i,inputs:o,productCorrelationId:a,jornayaToken:l,identityToken:s,monetizationChannel:c})=>{let d;if(!o){let e=Error("Invalid body");throw nl(e,"submitLead","invalid-body"),e}let u=n.organizationId?.trim();if(!u){let e=Error("LDS v4 organizationId is required to submit a lead");throw nl(e,"submitLead","missing-organization-id"),e}let p=n.offeringUuid?.trim(),f=c?.trim(),m=window?._Cohesion?.anonymousId;m||ne(Error("submitLead: missing Cohesion anonymousId; submitting lead without it"),{source:"submitLead",reason:"missing-anonymous-id"});let h={organizationId:u,...p?{offeringUuid:p}:{},slug:n.schoolSlug,conversionId:i,inputs:o,leadSource:r.program.leadSource,needsActiveProspectToken:e,activeProspectToken:t,jornayaToken:l,trackingContext:{correlationId:a,publisher:new URLSearchParams(window.location.search).get("publisher")||window.location.host,anonymousId:m,url:o?.sourceUrl?.value||window.location.href,experience:"Voyager",monetizationChannel:f||"voyager"},...!0===n.synchronousLeadDelivery&&{messageContext:{isSync:!0}},...s?{identityToken:s}:{}},g={"Content-Type":"application/json",...tv((0,nn.A)())};try{d=await fetch(`${no()}/api/hen/v1/delivery-service/lead/submit/`,{method:"POST",headers:g,body:JSON.stringify(h)})}catch(e){throw console.error("Could not submit lead",e),nl(e,"submitLead","network-error"),e}if(!d.ok){let e=await na(d);if(function(e){if(!e||"object"!=typeof e)return!1;let t="string"==typeof e.error?e.error:"",r="string"==typeof e.message?e.message:"";return t.includes(ni)||r.includes(ni)}(e)){let e=Error(ni);throw nl(e,"submitLead","qualifications-not-met",d.status),e}throw console.error("Could not submit lead",e),nl(Error(`Failed to submit lead (status ${d.status})`),"submitLead","http-error",d.status),Error(`Failed to submit lead (status ${d.status}): ${JSON.stringify(e)}`)}let y=await d.json();if(!0!==y.leadSubmitted){let e=Error("LDS did not accept the lead");throw nl(e,"submitLead","lead-not-accepted"),e}return y};function nd(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function nu(e){return"object"==typeof e&&null!==e&&"number"==typeof e.programId}function np(e){return"string"==typeof e&&e.trim().length>0}function nf(e){if("object"!=typeof e||null===e||"number"!=typeof e.programId||!Number.isFinite(e.programId)||e.programId<=0)return!1;let t=np(e.offeringUuid)&&np(e.organizationId),r=np(e.schoolId)&&np(e.schoolSlug)&&np(e.schoolName)&&np(e.programName);return t||r}let nm="We're preparing your matches!",nh="Preparing your matches",ng=[{label:"Compare schools",icon:"compare"},{label:"Pick your favorite",icon:"checklist"},{label:"Apply today",icon:"apply"}],ny="resultsPage",nb=new Set(["enabled","title","subtitle","disclosureTitle","disclosureContent"]),nv=new Set(["enabled","title","statusLabel","steps"]),nx=new Set(["label","icon"]),nw=new Set(["compare","checklist","apply"]),nS=new Set(["enabled","enableCompare","minSelection","maxSelection","variant","bannerText","ctaText","heading","logo","title","subtitle","buttonText","placeholderText","compareAttributes"]),nI=new Set(["bannerText","ctaText","heading","logo","title","subtitle","buttonText","placeholderText"]),nC=new Set(["enabled","title","subtitle"]),nj=new Set(["studentLoansInline","extraCta"]),nk=new Set(["enabled","label","eventName"]),nA=new Set(["enabled","title","subtitle","disclosure","partner","cta"]);function nE(e){let t=function(e){if(!nO(e))return;let t=e.root;
1if(!nO(t))return;let r=t.props;if(nO(r))return r}(e);if(!t||!("resultsPage"in t))return;let r=t.resultsPage;return nO(r)?function(e,t){let r={};for(let r of Object.keys(e))"flowType"!==r&&"recommender"!==r&&"spotlight"!==r&&"comparison"!==r&&"submissions"!==r&&"exitStrategy"!==r&&"loading"!==r&&t(`${ny}.${r} is not supported; skipping.`);void 0!==e.flowType&&("string"==typeof e.flowType&&e.flowType.trim()?r.flowType=e.flowType:t(`${ny}.flowType is not a non-empty string; skipping.`));let n=nN(e.recommender,`${ny}.recommender`,t);n&&(r.recommender=n);let i=nN(e.spotlight,`${ny}.spotlight`,t);i&&(r.spotlight=i);let o=function(e,t,r){if(void 0===e)return;if(!nO(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of(function(e,t,r,n){let i=Object.prototype.hasOwnProperty.call(e,"enabled"),o=Object.prototype.hasOwnProperty.call(e,"enableCompare"),a=e.enabled,l=e.enableCompare;if(i&&"boolean"!=typeof a&&n(`${r}.enabled is not a boolean; skipping.`),o&&"boolean"!=typeof l&&n(`${r}.enableCompare is not a boolean; skipping.`),"boolean"==typeof a&&"boolean"==typeof l&&a!==l&&n(`${r}.enableCompare conflicts with ${r}.enabled; using ${r}.enabled.`),"boolean"==typeof a){t.enabled=a;return}"boolean"==typeof l&&(t.enabled=l)}(e,n,t,r),Object.entries(e))){if(!nS.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"!==i&&"enableCompare"!==i){if("variant"===i){"POPUP"===o?n.variant=o:r(`${t}.variant must be "POPUP"; skipping.`);continue}if("minSelection"===i){nT(o)?n.minSelection=o:r(`${t}.${i} is not a positive integer; skipping.`);continue}if("maxSelection"===i){nT(o)?n.maxSelection=o:r(`${t}.${i} is not a positive integer; skipping.`);continue}if(nI.has(i)){"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`);continue}if("compareAttributes"===i){let e=function(e,t,r){return void 0===e?[]:Array.isArray(e)?(e.length>10&&r(`${t} exceeds 10 rows; using the first 10.`),e.slice(0,10).reduce((e,n,i)=>{if(!nO(n))return r(`${t}[${i}] is not an object; skipping.`),e;let{label:o,key:a}=n;return"string"!=typeof o||""===o.trim()?r(`${t}[${i}].label is not a non-empty string; skipping.`):"string"!=typeof a||""===a.trim()?r(`${t}[${i}].key is not a non-empty string; skipping.`):e.push({label:o,key:a}),e},[])):(r(`${t} is not an array; skipping.`),[])}(o,`${t}.compareAttributes`,r);e.length>0&&(n.compareAttributes=e);continue}}}return void 0!==n.minSelection&&void 0!==n.maxSelection&&n.minSelection>n.maxSelection&&(r(`${t}.minSelection is greater than maxSelection; skipping minSelection.`),delete n.minSelection),n}(e.comparison,`${ny}.comparison`,t);o&&(r.comparison=o);let a=function(e,t,r){if(void 0===e)return;if(!nO(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nC.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}("title"===i||"subtitle"===i)&&"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`)}return n}(e.submissions,`${ny}.submissions`,t);a&&(r.submissions=a);let l=function(e,t,r){if(void 0===e)return;if(!nO(e))return void r(`${t} is not an object; skipping.`);for(let n of Object.keys(e))nj.has(n)||r(`${t}.${n} is not supported; skipping.`);let n=function(e,t,r){if(void 0===e)return;if(!nO(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nA.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}n[i]=o}return n}(e.studentLoansInline,`${t}.studentLoansInline`,r),i=function(e,t,r){if(void 0===e)return;if(!nO(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nk.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`)}return n}(e.extraCta,`${t}.extraCta`,r);return{...n?{studentLoansInline:n}:{},...i?{extraCta:i}:{}}}(e.exitStrategy,`${ny}.exitStrategy`,t);l&&(r.exitStrategy=l);let s=function(e,t,r){if(void 0===e)return;if(!nO(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nv.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}if("title"===i||"statusLabel"===i){"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`);continue}if("steps"===i){let e=function(e,t,r){return void 0===e?[]:Array.isArray(e)?(e.length>3&&r(`${t} exceeds 3 steps; using the first 3.`),e.slice(0,3).reduce((e,n,i)=>{if(!nO(n))return r(`${t}[${i}] is not an object; skipping.`),e;for(let e of Object.keys(n))nx.has(e)||r(`${t}[${i}].${e} is not supported; skipping.`);let{label:o}=n;
1if("string"!=typeof o||""===o.trim())return r(`${t}[${i}].label is not a non-empty string; skipping.`),e;let a={label:o};return void 0!==n.icon&&("string"==typeof n.icon&&nw.has(n.icon)?a.icon=n.icon:r(`${t}[${i}].icon is not a supported loading icon; skipping.`)),e.push(a),e},[])):(r(`${t} is not an array; skipping.`),[])}(o,`${t}.steps`,r);e.length>0&&(n.steps=e)}}return Object.keys(n).length>0?n:void 0}(e.loading,`${ny}.loading`,t);return s&&(r.loading=s),r}(r,nP):void nP(`${ny} is not an object; skipping.`)}function nN(e,t,r){if(void 0===e)return;if(!nO(e))return void r(`${t} is not an object; skipping.`);for(let n of Object.keys(e))"modal"!==n&&r(`${t}.${n} is not supported; skipping.`);let n=function(e,t,r){if(void 0===e)return;if(!nO(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nb.has(i)){r(`${t}.${i} is not supported; skipping.`);continue}if("enabled"===i){"boolean"==typeof o?n.enabled=o:r(`${t}.enabled is not a boolean; skipping.`);continue}("title"===i||"subtitle"===i||"disclosureTitle"===i||"disclosureContent"===i)&&"string"==typeof o?n[i]=o:r(`${t}.${i} is not a string; skipping.`)}return n}(e.modal,`${t}.modal`,r);return n?{modal:n}:{}}function nT(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function nO(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function nP(e){console.warn(`[ConfigurableStep] ${e}`)}let nL="entryPoint",nM=["degree","category","subject"];function nR(e){let t=e.find(e=>!0===e.isEntry)??e[0],r=t?.dslConfig;return r?.type==="entry"?function(e){let t=function(e){if(!nU(e))return;let t=e.root;if(!nU(t))return;let r=t.props;if(nU(r))return r}(e);if(!t||!("entryPoint"in t))return;let r=t.entryPoint;return nU(r)?function(e,t){let r={};for(let r of Object.keys(e))"enabled"!==r&&"defaults"!==r&&"forwardFields"!==r&&"subjectLabelFallback"!==r&&t(`${nL}.${r} is not supported; skipping.`);void 0!==e.enabled&&("boolean"==typeof e.enabled?r.enabled=e.enabled:t(`${nL}.enabled is not a boolean; skipping.`));let n=function(e,t,r){if(void 0===e)return;if(!nU(e))return void r(`${t} is not an object; skipping.`);let n={};for(let[i,o]of Object.entries(e)){if(!nM.includes(i)){r(`${t}.${i} is not supported; skipping.`);continue}"string"==typeof o&&o.length>0?n[i]=o:r(`${t}.${i} is not a non-empty string; skipping.`)}return n}(e.defaults,`${nL}.defaults`,t);n&&(r.defaults=n);let i=function(e,t,r){if(void 0===e)return;if(!Array.isArray(e))return void r(`${t} is not an array; skipping.`);let n=[];for(let i=0;i<e.length;i++){let o=e[i];if("string"==typeof o){let e=o.trim();if(e.length>0){n.push(e);continue}}r(`${t}[${i}] is not a non-empty string; skipping.`)}return n}(e.forwardFields,`${nL}.forwardFields`,t);void 0!==i&&(r.forwardFields=i);let o=function(e,t,r){if(void 0===e)return;if("string"!=typeof e)return void r(`${t} is not a string; skipping.`);let n=e.trim();return 0===n.length?void r(`${t} is empty; skipping.`):n}(e.subjectLabelFallback,`${nL}.subjectLabelFallback`,t);return void 0!==o&&(r.subjectLabelFallback=o),r}(r,n$):void n$(`${nL} is not an object; skipping.`)}(r.data):void 0}function nF(e,t){if(!t?.enabled||!t.defaults)return e;let r={...e??{}};for(let e of nM)!r[e]&&t.defaults[e]&&(r[e]=t.defaults[e]);return r}function nU(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function n$(e){console.warn(`[ConfigurableStep] ${e}`)}function n_(e){if(null==e)return{kind:"empty"};if("string"==typeof e)return 0===e.length?{kind:"empty"}:{kind:"dataPath",dataPath:e};if(!nY(e))return{kind:"invalid",reason:"malformed"};let t=Object.prototype.hasOwnProperty.call(e,"dataPath"),r=Object.prototype.hasOwnProperty.call(e,"literal");return t&&r?{kind:"invalid",reason:"both-dataPath-and-literal"}:t?"string"!=typeof e.dataPath?{kind:"invalid",reason:"malformed"}:0===e.dataPath.length?{kind:"empty"}:{kind:"dataPath",dataPath:e.dataPath}:r?"string"!=typeof e.literal?{kind:"invalid",reason:"malformed"}:0===e.literal.length?{kind:"empty"}:{kind:"literal",literal:e.literal}:{kind:"invalid",reason:"malformed"}}function nD(e){var t;if(null==e)return{kind:"empty"};if(!nY(e))return{kind:"invalid",reason:"malformed"};let r="string"==typeof(t=e.key)&&t.length>0?t:void 0;if(void 0===r)return{kind:"invalid",reason:"missing-key"};let n=n_(e);
1return"dataPath"===n.kind||"literal"===n.kind?{...n,key:r}:n}function nY(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let nB=new Set(["variant","category","name","formatType","formatSubtype","brand","productId","sku"]),nz=new Set(["formatType","formatSubtype"]),nV=new Set(["variant","category","name","formatType","formatSubtype"]);function nH(e,t){let r=n_(t);return"empty"===r.kind||"invalid"===r.kind||"string"==typeof t?r:nB.has(e)?"literal"!==r.kind||nz.has(e)?r:{kind:"invalid",reason:"literal-not-allowed"}:{kind:"invalid",reason:"unknown-key"}}function nq(e){let t=function(e){if(!nG(e))return;let t=e.root;if(!nG(t))return;let r=t.props;if(nG(r))return r}(e);if(!t||!("tracking"in t))return null;let r=t.tracking;if(!nG(r))return console.warn("[ConfigurableStep] tracking is not an object; skipping."),null;let n=function(e){if(void 0===e)return;if(!nG(e))return void console.warn("[ConfigurableStep] tracking.productFields is not an object; skipping.");let t={};for(let[r,n]of Object.entries(e)){let e=nH(r,n);if("dataPath"===e.kind){t[r]="string"==typeof n?n:{dataPath:e.dataPath};continue}if("literal"===e.kind){t[r]={literal:e.literal};continue}let i="invalid"===e.kind?e.reason:e.kind;console.warn(`[ConfigurableStep] tracking.productFields["${r}"] is invalid (${i}); skipping.`)}return Object.keys(t).length>0?t:void 0}(r.productFields),i=function(e){if(void 0===e)return;if(!Array.isArray(e))return void console.warn("[ConfigurableStep] tracking.customDimensions is not an array; skipping.");let t=[];for(let r of e){let e=nD(r);if("dataPath"===e.kind){t.push({key:e.key,dataPath:e.dataPath});continue}if("literal"===e.kind){t.push({key:e.key,literal:e.literal});continue}let n="invalid"===e.kind?e.reason:e.kind;console.warn(`[ConfigurableStep] tracking.customDimensions entry is invalid (${n}); skipping.`)}return t.length>0?t:void 0}(r.customDimensions);return n||i?{...n?{productFields:n}:{},...i?{customDimensions:i}:{}}:null}function nG(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let nW={DegreeCardDetailed:{kind:"product",location:"dexp-results-page"},EditorialListing:{kind:"product",formatType:"dexp-ad",formatSubtype:"dexp-editorial-listings"},StudentLoansBanner:{kind:"product",location:"student-loans-on-page",formatType:"affiliate",formatSubtype:"credible-student-loans",productName:"credible-student-loans-banner",productVariant:"banner"},StudentLoansInline:{kind:"product",formatType:"affiliate",formatSubtype:"credible-student-loans",productName:"credible-student-loans-inline",productVariant:"inline"},Select:{kind:"field",fieldType:"select"},Input:{kind:"field",fieldType:"input"},Checkbox:{kind:"field",fieldType:"checkbox"},Switch:{kind:"field",fieldType:"switch"},Radio:{kind:"field",fieldType:"radio"},CheckboxButton:{kind:"field",fieldType:"checkbox"},SelectionTile:{kind:"field",fieldType:"tile"}},nQ=`${em}tracking`,nK=`${nQ}.kind`,nJ=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"string"==typeof e.type,nX=`${em}tracking`,nZ=`${nX}.kind`,n0=`${nX}.fieldName`,n1=`${nX}.leadFieldAssociated`,n2=`${nX}.fieldType`,n4=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&"string"==typeof e.type,n5=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),n3=(...e)=>{for(let t of e)if("string"==typeof t&&""!==t.trim())return t.trim()};class n6 extends Error{constructor(e,t,r){super(void 0!==r?`${e} (at position ${r} in ${JSON.stringify(t)})`:`${e} (in ${JSON.stringify(t)})`),this.name="InterpolationError",this.template=t,this.position=r,Object.setPrototypeOf(this,n6.prototype)}}function n8(e){let t=[],r=e.length,n=0,i=0;for(;n<r;){if(!(123===e.charCodeAt(n)&&n+1<r&&123===e.charCodeAt(n+1))){n++;continue}n>i&&t.push({type:"literal",value:e.slice(i,n)});let o=n+2,a=o,l=!1;for(;a<r;){if(a+1<r&&123===e.charCodeAt(a)&&123===e.charCodeAt(a+1))throw new n6('Nested "{{" inside expression',e,a);if(a+1<r&&125===e.charCodeAt(a)&&125===e.charCodeAt(a+1)){l=!0;break}a++}if(!l)throw new n6('Unclosed "{{"',e,n);let s=e.slice(o,a);t.push(function e(t,r,n){let i=t.trim(),o=0===i.length?n:n+t.indexOf(i);if(0===i.length)throw new n6('Empty expression "{{}}"',r,n);let a=i.indexOf("(");if(-1!==a)return function(t,r,n,i){if(41!==t.charCodeAt(t.length-1))throw new n6('Unterminated function call â expected ")"',r,n+t.length);let o=t.slice(0,i),a=o.length-o.trimStart().length,l=o.trim(),s=t.slice(i+1,t.length-1),c=s.length-s.trimStart().length,d=s.trim();if(0===l.length)throw new n6("Function call has no callee",r,n);let{path:u}=n9(l,r,n+a);return{type:"expression",raw:t,path:u,kind:"functionCall",segments:[],fn:u,arg:0===d.length?void 0:e(d,r,n+i+1+c)}}(i,r,o,a);let{path:l,segments:s}=n9(i,r,o);return{type:"expression",raw:i,path:l,kind:"path",segments:s}}(s,e,o)),i=n=a+2}return i<r&&t.push({type:"literal",value:e.slice(i)}),{segments:t}}function n9(e,t,r){let n=[],i=!1,o=0;for(;o<e.length;){let l=e[o];if("."===l){if(!i)throw new n6('Unexpected "." in path',t,r+o);i=!1,o++;continue}if("["===l){if(!i)throw new n6('Unexpected "[" â array selector must follow an identifier',t,r+o);if("*"!==e[o+1]||"]"!==e[o+2])throw new n6('Only the "[*]" wildcard array selector is supported',t,r+o);n.push({type:"wildcard"}),o+=3,i=!0;continue}if(n7(l)){var a;
1let t=o+1;for(;t<e.length&&(n7(a=e[t])||a>="0"&&a<="9");)t++;let r=e.slice(o,t);n.push({type:"key",name:r}),o=t,i=!0;continue}throw new n6(`Invalid character "${l}" in path`,t,r+o)}if(!i)throw new n6("Path ends with a trailing separator",t,r+e.length);return{path:function(e){let t="";for(let r=0;r<e.length;r++){let n=e[r];"wildcard"===n.type?t+="[*]":t+=0===r?n.name:`.${n.name}`}return t}(n),segments:n}}function n7(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e}let ie=new Set(["__proto__","constructor","prototype"]);function it(e,t){return function e(t,r,n){if(n>=r.length)return t;let i=r[n];if("wildcard"===i.type){if(!Array.isArray(t))return;let i=[];for(let o=0;o<t.length;o++)i.push(e(t[o],r,n+1));return i}if(!(null==t||"object"!=typeof t||ie.has(i.name))&&Object.prototype.hasOwnProperty.call(t,i.name))return e(t[i.name],r,n+1)}(e,t,0)}function ir(e,t,r){let{segments:n}=n8(e),i=r?.encodeSubstitutions===!0,o=r?.onMissing==="literal";if(0===n.length)return"";if(1===n.length){let e=n[0];if("expression"===e.type){let r=ii(e,t);return void 0===r&&o&&"path"===e.kind?io(e):r}return e.value}let a="";for(let e=0;e<n.length;e++){let r=n[e];if("literal"===r.type){a+=r.value;continue}let l=ii(r,t);void 0===l&&o&&"path"===r.kind?a+=io(r):a+=function e(t,r=!1){if(null==t)return"";if(Array.isArray(t))return t.map(t=>e(t,r)).join(",");if("object"==typeof t)try{let e=JSON.stringify(t)??"";return r?encodeURIComponent(e):e}catch{return""}let n=String(t);return r?encodeURIComponent(n):n}(l,i)}return a}function ii(e,t){if("functionCall"!==e.kind)return it(t,e.segments)}function io(e){return`{{${e.raw}}}`}function ia(e){if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function il(e){return"string"==typeof e&&-1!==e.indexOf("{{")}function is(e){return function e(t,r){if(il(t))return!0;if(null===t||"object"!=typeof t||!ia(t)||r.has(t))return!1;r.add(t);try{if(Array.isArray(t)){for(let n=0;n<t.length;n++)if(e(t[n],r))return!0;return!1}let n=Object.keys(t);for(let i=0;i<n.length;i++)if(e(t[n[i]],r))return!0;return!1}finally{r.delete(t)}}(e,new WeakSet)}function ic(e,t,r){return function e(t,r,n,i){if("string"==typeof t)return il(t)?ir(t,r,i):t;if(null===t||"object"!=typeof t||!ia(t)||n.has(t))return t;n.add(t);try{if(Array.isArray(t)){var o=t,a=r,l=n,s=i;let c=null;for(let t=0;t<o.length;t++){let r=o[t],n=e(r,a,l,s);n!==r&&null===c&&(c=o.slice(0,t)),null!==c&&c.push(n)}return c??o}return function(t,r,n,i){let o=null,a=Object.keys(t);for(let l=0;l<a.length;l++){let s=a[l],c=t[s],d=e(c,r,n,i);if(d!==c&&null===o){o={};for(let e=0;e<l;e++)o[a[e]]=t[a[e]]}null!==o&&(o[s]=d)}return o??t}(t,r,n,i)}finally{n.delete(t)}}(e,t,new WeakSet,r)}function id(e){let t=new Set,r=[],{segments:n}=n8(e);for(let e=0;e<n.length;e++){let i=n[e];"expression"===i.type&&"path"===i.kind&&(t.has(i.path)||(t.add(i.path),r.push(i.path)))}return r}function iu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function ip(e,t){var r;if("literal"===e.kind)return e.literal.length>0?e.literal:void 0;if(!t)return;let n=ir(`{{${e.dataPath}}}`,t);if(null==n)return;let i="string"==typeof(r=n)?r:"number"==typeof r||"boolean"==typeof r?String(r):Array.isArray(r)?r.map(e=>null==e||"object"==typeof e?"":String(e)).filter(Boolean).join(","):"";return i.length>0?i:void 0}function im({map:e,root:t,baseProduct:r}){if(!(null!=e&&Object.keys(e).length>0))return r;let n=function(e,t){if(!e)return{};let r={};for(let[n,i]of Object.entries(e)){let e,o=nH(n,i);if("empty"===o.kind)continue;if("invalid"===o.kind){console.warn(`[ConfigurableStep] tracking.productFields["${n}"] is invalid (${o.reason}); skipping.`);continue}try{e=ip(o,t)}catch(e){console.warn(`[ConfigurableStep] tracking.productFields["${n}"]: failed to resolve path "${"dataPath"===o.kind?o.dataPath:""}" â ${e instanceof n6?e.message:String(e)}`);continue}if(void 0===e)continue;let a=nV.has(n)?iu(e):e;0!==a.length&&(r[n]=a)}return r}(e,t);return r?0===Object.keys(n).length?r:{...r,...n}:Object.keys(n).length>0?n:void 0}function ih(e,t){if(!e||0===e.length)return[];let r=[];for(let n of e){let e,i=nD(n);if("empty"===i.kind)continue;if("invalid"===i.kind){console.warn(`[ConfigurableStep] tracking.customDimensions entry is invali
1d (${i.reason}); skipping.`);continue}try{e=ip(i,t)}catch(e){console.warn(`[ConfigurableStep] tracking.customDimensions["${i.key}"]: failed to resolve path "${"dataPath"===i.kind?i.dataPath:""}" â ${e instanceof n6?e.message:String(e)}`);continue}if(void 0===e)continue;let o=iu(e);0!==o.length&&r.push({key:i.key,value:o})}return r}function ig(e){let t=e?.flowType;return"string"==typeof t&&t.trim()?t:void 0}function iy(e){let t=e?.trafficSource;return"string"==typeof t&&t.trim()?t.trim():void 0}let ib="subject_label_with_fallback";function iv(e){if(ie.has(e))return!1;if(e.endsWith("_label")){let t=e.slice(0,-6);if(ie.has(t))return!1}return!0}function ix(e,t,r){iv(t)&&(e[t]=r)}function iw(e,t){return!!iv(t)&&Object.prototype.hasOwnProperty.call(e,t)}function iS(e,t,r,n){let i=Object.create(null);if(!e||!t)return i;for(let r of t){var o;let t=r?.id;if(t){let n=e[t];n&&iC(i,t,r.leadFieldAssociated,r.customField,n)}for(let t of(o=r).type!==O.MULTI_QUESTION&&o.type!==O.DCS?[]:o.stepQuestions??[]){let r=t.id;if(!r)continue;let n=e[r];n&&iC(i,r,t.leadFieldAssociated,t.customField,n)}}let a=ig(r);a&&ix(i,"flowType",a);let l=iy(r);return l&&ix(i,"trafficSource",l),function(e,t){let r=e.subject;if("string"==typeof r&&r.length>0&&"general"!==r){let t=e.subject_label;"string"==typeof t&&t.length>0&&ix(e,ib,t);return}let n="string"==typeof t?t.trim():"";n.length>0&&ix(e,ib,n)}(i,n?.subjectLabelFallback),i}function iI(e){return String(e??"").split(",").map(e=>e.trim()).filter(Boolean)}function iC(e,t,r,n,i){let o=i.option;if(!o)return;let a=function(e){if(Array.isArray(e)){let t=[];for(let r of e)!0===r.isArray?t.push(...iI(r.value)):t.push(r.value);return t}return!0===e.isArray?iI(e.value):e.value}(o),l=Array.isArray(o)?o.map(e=>e.value):o.value,s=Array.isArray(o)?o.map(e=>e.text).join(", "):o.text;ix(e,t,a),ix(e,`${t}_label`,s);let c=i.leadFieldAssociated??r;for(let t of(c&&(ix(e,c,l),ix(e,`${c}_label`,s)),n&&n!==c&&(ix(e,n,a),ix(e,`${n}_label`,s)),Array.isArray(o)?o:[o])){let r=t.leadFieldAssociated;r&&!iw(e,r)&&(ix(e,r,t.value),ix(e,`${r}_label`,t.text));let n=t.customField;n&&!iw(e,n)&&(ix(e,n,!0===t.isArray?iI(t.value):t.value),ix(e,`${n}_label`,t.text))}}function ij(e){let t=e?.location,r=t?.countryCode;return"string"==typeof r&&r.length>0?r:void 0}let ik=/^[A-Za-z0-9]+$/;function iA(e){if("string"!=typeof e)return;let t=e.trim().toUpperCase();return ik.test(t)?t:void 0}function iE(e){let t=e?.location,r=iA(t?.state),n=iA(t?.countryCode);return n&&r?`${n}-${r}`:n||(r?`US-${r}`:void 0)}let iN=new Set(["degree","category","subject"]);function iT(e,t){return iN.has(e)&&"general"===t}function iO(e){let t=e?.monetizationChannel;return"string"==typeof t&&t.trim()?t.trim():void 0}let iP={};function iL(e){let t=[],r=e=>{if(Array.isArray(e)){for(let t=0;t<e.length;t++)r(e[t]);return}t.push(e)};return r(e),t}function iM(e){iP[e]||(iP[e]=!0,console.warn(`[ConfigurableStep] Display label fell back to the raw value (reason: ${e}). Check that the bound source has resolved and that \`_bind.optionLabelField\` / \`_bind.optionValueField\` are configured.`))}function iR(e){let t=[],r=e=>{if(Array.isArray(e)){for(let t=0;t<e.length;t++)r(e[t]);return}t.push(e)};return r(e),t}var iF=r(90075);function iU(e){return iF.Ay.filter(t=>t.serviceId===e).flatMap(e=>[e.runtimePath,...e.runtimeAliases??[]].map(t=>({pattern:t,methods:[e.method],description:e.description})))}let i$={offerings:iU("offerings"),offeringsService:iU("offeringsService"),organizations:iU("organizations"),deliverySystem:iU("deliverySystem"),campaignManagement:iU("campaignManagement"),mobius:iU("mobius"),reporting:iU("reporting"),sameOrigin:iU("sameOrigin"),productApi:iU("productApi")},i_={offerings:"offeringsSearchApiUrl",offeringsService:"offeringsServiceBaseUrl",organizations:"organizationApiUrl",deliverySystem:"deliverySystemApiUrl",campaignManagement:"campaignManagementApiUrl",mobius:"mobiusApiUrl",reporting:"reportingApiUrl",sameOrigin:"dynamicFlowUrl",productApi:"productApiBffOrigin"},iD={offerings:"offeringsServiceBaseUrl",organizations:"organizationServiceBaseUrl",deliverySystem:"deliverySystemBaseUrl"},iY=iF.Ay.flatMap(e=>{let t=e.serviceId;return Object.prototype.hasOwnProperty.call(i$,t)?[e.runtimePath,...e.runtimeAliases??[]].map(r=>({pattern:r,methods:[e.method],description:e.description,service:t,tenantScope:e.tenantScope})):[]});
1class iB extends Error{constructor(e){super(e),this.name="DataSourceConfigurationError",Object.setPrototypeOf(this,iB.prototype)}}for(let e of iY){if(!e.pattern.startsWith("/"))throw new iB(`Allowlist pattern must start with '/': ${e.pattern}`);if(e.pattern.includes("*")&&!e.pattern.endsWith("/*"))throw new iB(`Allowlist wildcard only permitted as trailing '/*': ${e.pattern}`);if(0===e.methods.length)throw new iB(`Allowlist entry has no methods: ${e.pattern}`)}class iz extends Error{constructor(e,t,r,n){super(n),this.service=e,this.path=t,this.method=r,this.name="DataSourceNotAllowedError",Object.setPrototypeOf(this,iz.prototype)}}function iV(e,t,r){var n,i;let o,a=(n=e,i=t,(o=iQ(n))?iW(o,i):null);return!!(a&&(0,iF.pp)(a.tenantScope,r))}let iH=iF.R4;function iq(e,t){let r;if(!e)return!1;if(e.startsWith("/"))return!0;try{r=new URL(e)}catch{return!1}if("http:"!==r.protocol&&"https:"!==r.protocol||!t||0===t.length)return!1;let n=r.origin.toLowerCase();return t.some(e=>(function(e){try{return new URL(e).origin.toLowerCase()}catch{return e.toLowerCase().replace(/\/+$/,"")}})(e)===n)}function iG(e,t,r,n,i){let o=iQ(t),a=o?iW(o,r):null;if(!a||a.service!==e)throw new iz(e,t,r,`Endpoint ${r} ${t} is not in the data-source allowlist for service '${e}'`);if(!(0,iF.pp)(a.tenantScope,i))throw new iz(e,t,r,`Endpoint ${r} ${t} is not allowed for tenant '${i??""}'`);let l=i_[e],s=iD[e],c=n[l],d=s?n[s]:void 0,u="offerings"===e?c??d:d??c;if(!u)throw new iz(e,t,r,`No baseUrl configured for service '${e}' (ApiConfig.${l} is missing)`);return`${u.replace(/\/$/,"")}${o}`}function iW(e,t){let r=t.toUpperCase();return iY.find(t=>t.methods.includes(r)&&(0,iF.R4)(e,t.pattern))??null}function iQ(e){var t;if(!e||"string"!=typeof e||(t=function(e){if(e.startsWith("/"))return e.split(/[?#]/)[0]??"";let t=/^[a-zA-Z][a-zA-Z0-9+\-.]*:\/\//.exec(e);if(!t)return e;let r=e.slice(t[0].length),n=r.indexOf("/");return -1===n?"":r.slice(n).split(/[?#]/)[0]??""}(e),/(?:^|\/)(?:\.|%2e){1,2}(?:\/|$)/i.test(t)))return"";if(e.startsWith("/"))return e.split(/[?#]/)[0]??"";try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";return t.pathname}catch{return""}}function iK(e,t){window.open(e,t??"_blank","noopener,noreferrer")}function iJ(e){window.open(e,"_blank","noopener,noreferrer")}function iX(e){return"string"==typeof e&&e.length>0?e:void 0}let iZ="modal.open";function i0(e,t,r,n="Modal"){if(t!==iZ&&"modal.close"!==t)return;let i=r?.name;if("string"!=typeof i||0===i.trim().length)return void console.warn(`[${n}] ${t} ignored â params.name must be a non-empty string.`);let o=i.trim();(t===iZ?e.open(o):e.close(o))||console.warn(`[${n}] ${t} ignored â no Modal registered as "${o}".`)}function i1(e){return void 0===e.kind||"http"===e.kind?"http":e.kind}function i2(e){return void 0===e.kind||"http"===e.kind}function i4(e){return"reportingModel"===e.kind}function i5(e){return"inference"===e.kind}function i3(e){let t=i1(e);return"http"===t||"reportingModel"===t||"inference"===t}function i6(e){return i4(e)?[e.modelId,e.metrics,e.dimensions,e.segments,e.filters,e.having,e.order,e.limit,e.context]:i5(e)?[e.body,e.headers]:[e.endpoint,e.headers,e.query,e.body]}let i8=["offeringsServiceBaseUrl","offeringsSearchApiUrl","organizationServiceBaseUrl","organizationApiUrl","deliverySystemBaseUrl","deliverySystemApiUrl","campaignManagementApiUrl","mobiusApiUrl","reportingApiUrl","productApiBffOrigin"],i9=new Set(["degree_level","academic_subject_category","academic_subject"]),i7=["degreeId","categoryId","subjectId"],oe=["schoolId"];function ot(e){if("string"!=typeof e||!/^-?\d+$/.test(e))return e;let t=Number(e);return Number.isSafeInteger(t)?t:e}function or(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function on(e){if(!e)return null;try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return null;return t.origin.toLowerCase()}catch{return null}}function oi(e,t,r){var n,i;let o,a,l,s="object"==typeof e&&null!==e?e:{},c=s.organizations?.[0],d={schoolName:c?.name??"",schoolId:c?.externalIds?.edudirectId??"",schoolSlug:c?.slug??"",city:c?.location?.city??"",state:"string"==typeof(n=c?.location?.state)?n:n&&"object"==typeof n?n.abbreviation??n.name??"":"",programId:os(s.externalId)??0,programName:s.name??"",snippet:s.shortDescription??"",levelOfInstitution:c?.levelOfInstitution??"",accreditator:c?.accreditator??"",percentOnlineEnrollment:void 0===(o=os(c?.percentOnlineEnrollment))?null:o,isOnline:c?.tags?.isOnline??!1,notForProfit:c?.tags?.isNotForProfit??!1,applicationCtaURL:s.applicationCta?.url??"",applicationCtaLabel:s.applicationCta?.label??"",programFlow:[],tcpa:""};if(od(s.applicationCta?.fieldMap)&&(d.applicationCtaFieldMap=s.applicationCta?.fieldMap),od(s.applicationCta?.staticParams)&&
1(d.applicationCtaStaticParams=s.applicationCta?.staticParams),s.applicationCta?.missingValue&&(d.applicationCtaMissingValue=s.applicationCta.missingValue),function(e){if(!oc(e))return!1;try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}(s.postLeadCta?.url)){let e={url:s.postLeadCta.url};oc(s.postLeadCta.label)&&(e.label=s.postLeadCta.label),od(s.postLeadCta.staticParams)&&(e.staticParams=s.postLeadCta.staticParams),od(s.postLeadCta.fieldMap)&&(e.fieldMap=s.postLeadCta.fieldMap),("empty"===s.postLeadCta.missingValue||"omit"===s.postLeadCta.missingValue||"hide"===s.postLeadCta.missingValue)&&(e.missingValue=s.postLeadCta.missingValue),d.postLeadCta=e}"boolean"==typeof s.synchronousLeadDelivery&&(d.synchronousLeadDelivery=s.synchronousLeadDelivery),"boolean"==typeof c?.showActiveProspectScript&&(d.showActiveProspectScript=c.showActiveProspectScript),oc(s.offeringUuid)&&(d.offeringUuid=s.offeringUuid,d.offeringId=s.offeringUuid);let u=Array.isArray(s.organizationIds)?s.organizationIds[0]:void 0;oc(u)&&(d.organizationId=u);let p=Array.isArray(s.dynamicLinks)?s.dynamicLinks.find(e=>e?.type==="linkout")?.url:void 0;oc(p)&&(d.linkoutUrl=p);let f=oo(s.attributes);f&&(d.attributes={...f});let m=oo(f?.programFields)?.flowId;oc(m)&&(d.programFields={flowId:m}),oc(c?.images?.logo)&&(d.imageURL=c?.images?.logo),"boolean"==typeof c?.tags?.isPublic&&(d.isPublic=c.tags.isPublic),"boolean"==typeof c?.tags?.isPrivate&&(d.isPrivate=c.tags.isPrivate),"boolean"==typeof c?.tags?.isForProfit&&(d.forProfit=c.tags.isForProfit),function(e,t){if(!t)return;let r=os(oa(t,"fulltimeRetentionRate"));void 0!==r&&(e.fulltimeRetentionRate=r);let n=os(oa(t,"numberOnlinePrograms"));void 0!==n&&(e.numberOnlinePrograms=n);let i=ol(oa(t,"areTransferCreditsAccepted"));void 0!==i&&(e.areTransferCreditsAccepted=i);let o=ol(oa(t,"satOrActRequired"));void 0!==o&&(e.satOrActAdmissionsRequirements=o?"Yes":"No");let a=ol(oa(t,"isFreeApplication"));void 0!==a&&(e.isApplicationFeeOnlineWaived=a)}(d,c?.institutionalStats);let h=(i=c,a={},i?.tags?.isOnline===!0&&(a.isOnline={label:"Online",value:!0}),oc(i?.accreditator)&&(a.isAccredited={label:"Accredited",value:!0}),i?.tags?.isPrivate===!0&&(a.isPrivate={label:"Private",value:!0}),i?.tags?.isNotForProfit===!0&&(a.isNotForProfit={label:"Not-for-Profit",value:!0}),i?.institutionalStats&&!1===ol(oa(i.institutionalStats,"satOrActRequired"))&&(a.satOrActNotRequired={label:"No SAT/ACT Required",value:!0}),Object.keys(l={...a,...i?.institutionalStats}).length>0?l:void 0);return h&&(d.institutionalStats=h),oc(t)&&(d.resultsSource=t),oc(r)&&(d.listId=r),d}function oo(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}function oa(e,t){let r=e[t];return r&&"object"==typeof r?r.value:void 0}function ol(e){if("boolean"==typeof e)return e;if("string"==typeof e){let t=e.trim().toLowerCase();if("true"===t)return!0;if("false"===t)return!1}}function os(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"==typeof e&&e.trim().length>0){let t=Number(e);return Number.isFinite(t)?t:void 0}}function oc(e){return"string"==typeof e&&e.trim().length>0}function od(e){if("object"!=typeof e||null===e||Array.isArray(e))return!1;let t=Object.entries(e);return t.length>0&&t.every(([,e])=>"string"==typeof e)}let ou=["exact","recommended","related","spotlight"];function op(e){let t=e.tracking;if(!oh(t))return;let r=t.sortingReferenceId;return"string"==typeof r&&r.length>0?r:void 0}function of(e){return ou.some(t=>t in e)}function om(e,t,r){let n=null;for(let i of ou){if(!(i in e))continue;let o=function(e,t,r){return Array.isArray(e)?e.map(e=>oi(e,t,r)):oh(e)&&Array.isArray(e.data)?{...e,data:e.data.map(e=>oi(e,t,r))}:e}(e[i],t,r);o!==e[i]&&((n??={...e})[i]=o)}return n??e}function oh(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function og(e){if(!e)return null;try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return null;return t.origin.toLowerCase()}catch{return null}}let oy={percentOnlineEnrollment:"Online Enrollment",percentAdmittedUndergrad:"Acceptance Rate",graduationRateTotalCohort:"Graduation Rate",fulltimeRetentionRate:"Retention Rate",instateAvgTuitionFulltimeUndergrad:"In-State Tuition",avgNetPriceStudentsAwardedAid:"Avg Net Price",enrollmentTotal:"Students Enrolled",studentToFacultyRatio:"Student-to-Faculty Ratio",medianDebtCompletersOverall:"Median Debt",accreditator:"Accreditation"},ob={...oy,instateAvgTuitionFulltimeUndergrad:"Avg. Undergrad Tuition, In-State",outOfStateAvgTuitionFulltimeUndergrad:"Avg. Undergrad Tuition, Out-of-State",inStateAvgTuitionFulltimeGrad:"Avg. Graduate Tuition, In-State",outOfStateAvgTuitionFulltimeGrad:"Avg. Graduate Tuition, Out-of-State"},ov=["percentOnlineEnrollment","percentAdmittedUndergrad","graduationRateTotalCohort","fulltimeRetentionRate"],ox=["instateAvgTuitionFulltimeUndergrad","avgNetPriceStudentsAwardedAid","enrollmentTotal","studentToFacultyRatio","medianDebtCompletersOverall","accreditator"],ow=new Set(["percentOnlineEnrollment","percentAdmittedUndergrad","graduationRateTotalCohort","fulltimeRetentionRate"]),oS=new Set(["instateAvgTuitionFulltimeUndergrad","outOfStateAvgTuitionFulltimeUndergrad","inStateAvgTuitionFulltimeGrad","outOfStateAvgTuitionFulltimeGrad","avgNetPriceStudentsAwardedAid","medianDebtCompletersOverall"]),oI=new Set(["enrollmentTotal"]),oC=new Set(["studentToFacultyRatio"]);function oj(e,t){if(!oT(e))return[];let r=[];for(let n of t){let t=e[n];if(!oT(t)||null===t.value||void 0===t.value)continue;let i=oy[n]??("string"==typeof t.label&&t.label.length>0?t.label:n);if("accreditator"===n){let e=oE(t.value);if(null===e)continue;r.push({label:i,value:"Yes",tooltip:e});continue}r.push({label:i,value:ok(n,t.value)})}return r}function ok(e,t){return"string"==typeof t?t:"number"==typeof t&&Number.isFinite(t)?ow.has(e)?`${Math.round(t)}
1%`:oS.has(e)?`$${Math.round(t).toLocaleString("en-US")}`:oI.has(e)?t.toLocaleString("en-US"):oC.has(e)?`${t}:1`:String(t):String(t)}function oA(e,t){if(!oT(e))return null;let r=e[t];return oT(r)?oN(r.value):null}function oE(e){if("string"!=typeof e)return null;let t=e.trim();return t.length>0?t:null}function oN(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function oT(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let oO="/v1/rankings/";function oP(e){if(!e)return null;try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return null;return t.origin.toLowerCase()}catch{return null}}class oL extends Error{constructor(){super("LDS did not accept the lead"),this.name="IncompleteLeadSubmissionError"}}function oM(e,t){null==(window.top?window.top:window).open(e,"_blank","noopener,noreferrer")&&t&&t(e)}let oR=e=>{let t=e.split("=");if(2===t.length)return{key:t[0].trim(),customField:t[1].trim().replace(/[^a-zA-Z]/g,"")};let r=e.trim();return{key:r,customField:r}},oF=e=>e?Array.isArray(e)?e.map(e=>e.value??e.text).join(","):e.value??e.text??"":null,oU=(e,t,r={})=>{if(!e||!t?.length)return e;let n=e;return t.forEach(e=>{try{let t=e.key.toLowerCase();if(n.includes(e.key)){let i=r[t]||e.defaultValue;n=n.split(e.key).join(i)}}catch(t){console.warn(`Failed to translate placeholder ${e.key}:`,t)}}),n},o$=(e,t,r)=>{if(!e||"object"!=typeof e)return e;let n={...e};return Object.keys(n).forEach(e=>{"string"==typeof n[e]?n[e]=oU(n[e],t,r):Array.isArray(n[e])?n[e]=n[e].map(e=>"string"==typeof e?oU(e,t,r):e&&"object"==typeof e?o$(e,t,r):e):n[e]&&"object"==typeof n[e]&&(n[e]=o$(n[e],t,r))}),n},o_=(e,t)=>{var r,n;let i,o=JSON.parse(JSON.stringify(e));if(!o.placeholders||0===o.placeholders.length)return o;let a=ry(t.steps,t.flowState),l=rv("degree",t.flowState)||t.dcs?.degree||t.audienceIntent?.degreeDecisionOutcome||"",s=rv("category",t.flowState)||t.dcs?.category||"",c=rv("subject",t.flowState)||t.dcs?.subject||t.audienceIntent?.subjectDecisionOutcome||"",d=rv("career",t.flowState)||t.audienceIntent?.careerDecisionOutcome||"",u=(r=t.steps,n=t.flowState,i={},rL(r).forEach(e=>{if(e.customField){let t=oF(rM(e.customField,r,n));t&&(i[e.customField.toLowerCase()]=t)}}),Object.values(n).forEach(e=>{e?.option&&(Array.isArray(e.option)?e.option:[e.option]).forEach(e=>{if(!e.customField)return;let t=e.customField.toLowerCase();if(i[t])return;let r=oF(e);r&&(i[t]=r)})}),i),p={degree:l,category:s,subject:c,career:d,...Object.keys(a).reduce((e,t)=>(["degree","category","subject","career"].includes(t)||(e[t.toLowerCase()]=a[t]),e),{}),...u};return o$(o,o.placeholders,p)},oD="dexp-question-flow",oY="dexp-results",oB=e=>e?.type===O.RESULT,oz=e=>e?e.replace(/_/g,"-").toLowerCase():"",oV="dexp-question-flow";var oH=r(29097);let oq=(e,t)=>{let r;if(!e)return[];let n=/\{\{([^}]+)\}\}/g,i=[];for(;null!==(r=n.exec(e));)i.push(r);if(0===i.length)return(0,oH.E)({path:e,json:t,wrap:!0});if(1===i.length&&i[0][0]===e)return(0,oH.E)({path:i[0][1].trim(),json:t,wrap:!0});let o=i.map(e=>(0,oH.E)({path:e[1].trim(),json:t,wrap:!0})),a=Math.min(...o.map(e=>e.length));return 0===a?[]:Array.from({length:a},(t,r)=>{if(i.every((e,t)=>{let n=o[t][r];return null==n||""===n}))return null;let n=e;return i.forEach((e,t)=>{let i=o[t][r];n=n.replace(e[0],null==i||""===i?"":String(i))}),(n=n.replace(/<(\w+)(?:\s[^>]*)?>[\s]*<\/\1>/g,"").trim())||null})},oG=async(e,t,r)=>{let n,i,{dynamicContent:o,flowState:a,steps:l,searchParamsOptions:s,sortContext:c}=e,{endpointUrl:d,method:u,body:p,queryParams:f,sortConfig:m}=o;if(!d)throw Error("Endpoint URL is required");let h=((e,t,r,n,i)=>{var o;let a=(o=t||[],0!==o.length)?o.map(e=>{let{key:t,customField:o}=oR(e),a=rM(o,n,r,i);if(!a)return null;let l=oF(a);return null===l?null:`${encodeURIComponent(t)}=${encodeURIComponent(l)}`}).filter(e=>null!==e).join("&"):"";if(!a)return e;let l=e.includes("?")?"&":"?";return`${e}${l}${a}`})(d,f,a,l,s),g=m?.enabled&&c;g&&(h=((e,t,r)=>{let n=new URL(e,"http://placeholder");if(n.searchParams.has("sortBy")||n.searchParams.set("sortBy","ml-fyp"),n.searchParams.has("limit")||null==t.limit||n.searchParams.set("limit",String(t.limit)),!n.searchParams.has("sortMaxResults")){let e=n.searchParams.get("limit")??(null!=t.limit?String(t.limit):null);null!=e&&n.searchParams.set("sortMaxResults",String(e))}return r.listId&&n.searchParams.set("sortListId",r.listId),n.toString().replace("http://placeholder","")})(h,o,c));let y="POST"===u?((e,t,r,n)=>{if(!e)return;let i="string"==typeof e?JSON.parse(e.replace(/(?<!")\{\{([\w.]+)\}\}(?!")/g,'"{{$1}}"')):e,o=e=>{if("string"==typeof e){let i=e.match(/^\{\{([\w.]+)\}\}$/);
1if(i){let e=rM(i[1],r,t,n);if(!e)return{value:void 0,drop:!0};let o=oF(e);return null==o?{value:void 0,drop:!0}:{value:o,drop:!1}}return/\{\{[\w.]+\}\}/.test(e)?{value:e.replace(/\{\{([\w.]+)\}\}/g,(e,i)=>{let o=rM(i,r,t,n);return o?oF(o)??"":""}),drop:!1}:{value:e,drop:!1}}if(Array.isArray(e))return{value:e.map(e=>o(e)).filter(({drop:e})=>!e).map(({value:e})=>e),drop:!1};if("object"==typeof e&&null!==e){let t={};for(let[r,n]of Object.entries(e)){let{value:e,drop:i}=o(n);i||(t[r]=e)}return{value:t,drop:!1}}return{value:e,drop:!1}},{value:a}=o(i);return JSON.stringify(a)})(p,a,l,s):void 0;g&&y&&((n=JSON.parse(y)).sortUserContext={...n.sortUserContext,country:c.userContext?.country||"",region:c.userContext?.region||"",isMobile:c.userContext?.isMobile||!1,...c.userContext?.searchPageType&&{searchPageType:c.userContext.searchPageType}},m.weaverModel&&!n.weaverModel&&(n.weaverModel=m.weaverModel),c.webContext&&!n.sortWebContext&&(n.sortWebContext=c.webContext),"fyp"===m.weaverModel&&c.flowAnswers&&!n.flowAnswers&&(n.flowAnswers=c.flowAnswers),y=JSON.stringify(n));let b=c?.userContext?.country;b&&((i=new URL(h,"http://placeholder")).searchParams.has("country")||i.searchParams.set("country",b),h=i.toString().replace("http://placeholder",""));try{let e=await fetch(h,{method:u||"GET",headers:{"Content-Type":"application/json"},body:y});if(!e.ok)throw Error(`Failed to fetch ${t}: ${e.statusText}`);let n=await e.json();return r(n,o)}catch(e){throw console.error(`Error fetching ${t}:`,e),Error(`Failed to fetch ${t}: ${e}`)}},oW=(e,t)=>{let{limit:r,optionConfig:n}=t;if(!n)return console.warn("No optionConfig provided, returning empty options array"),[];let{optionId:i,text:o,value:a,extractKeys:l}=n;if(l){let t=(0,oH.E)({path:i,json:e,wrap:!1});if(!t||"object"!=typeof t||Array.isArray(t))return console.warn("extractKeys is true but optionIdPath did not resolve to an object:",t),[];{let e=Object.keys(t);return(r?e.slice(0,r):e).map(e=>({optionId:e,text:e,value:e}))}}let s=oq(i,e),c=oq(o,e),d=oq(a,e),u=Math.min(s.length,c.length,d.length);return Array.from({length:r?Math.min(u,r):u},(e,t)=>({optionId:String(s[t]),text:String(c[t]),value:String(d[t])}))},oQ=async(e,t,r)=>oG({dynamicContent:e,flowState:t,steps:r},"dynamic options",oW),oK=e=>{let t=e.dynamicOptions?.queryParams;return t&&0!==t.length?t.map(e=>oR(e).customField):[]},oJ=(e,t,r)=>{let n;return e.type===O.QUESTION&&!!e.dynamicOptions?.endpointUrl&&(0===(n=oK(e)).length||n.every(e=>null!=rM(e,r,t)))},oX=async(e,t,r)=>{let n=e.id;try{let i=await oQ(e.dynamicOptions,t,r);return{stepId:n,options:i,success:!0}}catch(e){return console.warn(`[Prefetch] Failed to prefetch options for step ${n}:`,e),{stepId:n,error:e instanceof Error?e:Error(String(e)),success:!1}}},oZ=async(e,t,r={})=>{let n=e.filter(n=>(!n.id||!r[n.id])&&oJ(n,t,e));if(0===n.length)return r;let i=await Promise.all(n.map(r=>oX(r,t,e))),o={...r};return i.forEach(e=>{e.success&&(o[e.stepId]=e.options)}),o},o0=(e,t,r)=>{let n=oK(e),i=e.id||"unknown";if(0===n.length)return i;let o=n.map(e=>{let n=oF(rM(e,r,t));return`${e}:${n??"null"}`});return`${i}|${o.join("|")}`},o1=e=>{if(null==e)return;let t=e.flatMap(({key:e,value:t})=>{if(null==t)return[];let r="object"==typeof t?JSON.stringify(t):String(t);if("outboundurl"===e.toLowerCase()){let t=r5(r);return null==t||""===t?[]:[{key:e,value:t}]}return[{key:e,value:r}]});return t?.length>0?t:void 0},o2=["elementType","name","htmlId","location","text"],o4=["sectionSlug","subTabSlug","modelId","metricNames","dimensionNames","blockId","blockType","dashboardConfigId","chartType","filterFormat"],o5=new Set(o2),o3=new Set(["elementType","name","htmlId","location","text","dashboardConfigId","blockId","blockType","sectionSlug","subTabSlug","modelId","metricNames","dimensionNames","chartType","filterFormat"]),o6=new Set(o4),o8=new Set(["__proto__","constructor","prototype","email","phone","chat","
1insight","metric","row","rows","result","results","export","user","tenantid","formstate","flowcontext"]);function o9(e,t){let r={};for(let t of o2){let n=e[t];"string"==typeof n&&n.length>0&&(r[t]=n)}let n=function(e,t,r={}){if(!e||0===Object.keys(e).length)return r;let n={...r};for(let[r,i]of Object.entries(e)){if(!o5.has(r)){at(r,"unknown-field");continue}let e=function(e,t,r){let n=n_(t);if("empty"!==n.kind)return"invalid"===n.kind?void at(e,"invalid-source"):ae(e,n,r)}(r,i,t);void 0!==e&&(n[r]=e)}return n}(e.fields,t,r),i=function(e,t){if(!e||0===e.length)return[];let r=[];for(let n of e){let e=nD(n);if("empty"===e.kind)continue;if("invalid"===e.kind){at("customDimension","invalid-source");continue}if(!o6.has(e.key)){at(e.key,"unknown-field");continue}let i=ae(e.key,e,t);void 0!==i&&r.push({key:e.key,value:i})}return r}(function(e){if(null==e)return;if(Array.isArray(e))return e;if(!o7(e))return at("customDimension","invalid-source"),[];let t=[];for(let[r,n]of Object.entries(e)){if(!o6.has(r)){at(r,"unknown-field");continue}if("string"==typeof n){t.push({key:r,dataPath:n});continue}if(!o7(n)){at(r,"invalid-source");continue}let e=Object.prototype.hasOwnProperty.call(n,"dataPath"),i=Object.prototype.hasOwnProperty.call(n,"literal");if(e&&!i&&"string"==typeof n.dataPath){t.push({key:r,dataPath:n.dataPath});continue}if(i&&!e&&"string"==typeof n.literal){t.push({key:r,literal:n.literal});continue}at(r,"invalid-source")}return t}(e.customDimensions),t),o={...n};return i.length>0&&(o.customDimensions=i),o}function o7(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function ae(e,t,r){var n,i;let o;if("literal"===t.kind)return t.literal;let a=(n=t.dataPath).toLowerCase().split(/[.[\]]+/).filter(Boolean).some(e=>o8.has(e))?"sensitive-path":o3.has(n)?void 0:"disallowed-path";if(a)return void at(e,a);try{o=ir(`{{${t.dataPath}}}`,r)}catch{at(e,"unresolved");return}let l="string"==typeof(i=o)?i:"number"==typeof i||"boolean"==typeof i?String(i):Array.isArray(i)?i.map(e=>"string"==typeof e||"number"==typeof e||"boolean"==typeof e?String(e):"").filter(Boolean).join(","):void 0;return void 0===l||0===l.length?void at(e,"unresolved"):l}function at(e,t){console.warn(`[tracking] element-field-resolve: ${t} field=${e}`)}let ar=["variant","category","name"],an="dexp-flow",ai="1.0.0",ao=e=>e?.map(({fieldNumber:e,...t})=>({...t})),aa=e=>{let{viewCorrelationId:t,formatType:r,formatSubtype:n,presets:i,dcs:o,product:a,placement:l,customDimensions:s,dslConfigId:c,mappedCustomDimensions:d,brand:u,location:p,position:f,sku:m,productId:h,listId:g}=e,y=al(s,c,d),b=iu(a?.variant??o?.degree??i?.degree??""),v=iu(a?.category??o?.category??i?.category??""),x=iu(a?.name??o?.subject??i?.subject??""),w=a?au(a):void 0;return{name:"ProductLoaded",payload:{viewCorrelationId:t,...y?{customDimensions:y}:{},...g?{listId:g}:{},product:{formatSubtype:n,formatType:r,variant:b,name:x,category:v,location:p||l||"",positionEngine:$.ALGOLIA,...u?{brand:u}:{},...void 0!==f?{position:f}:{},...m?{sku:m}:{},...h?{productId:h}:{},...w??{}}}}},al=(e,t,r)=>{var n,i=(n=o1(e),t?[...n??[],{key:"dslConfigId",value:t}]:n),o=o1(r);if(!o||0===o.length)return i;let a=new Map;for(let e of i??[])a.set(e.key,e);for(let e of o)a.set(e.key,e);return Array.from(a.values())},as=(e,t)=>{let{currentStep:r,formViewedCorrelationId:n,elementLoadedCorrelationId:i,currentStepIndex:o,productClickedCorrelationId:a,formName:l,stepName:s}=e;return t?{name:"FormViewed",payload:{formContext:{formId:`dexp-${r?.flowId}`,formName:l||oV},stepContext:{stepId:r?.id||"",stepName:s||r?.title||"",stepNumber:o},correlationId:a||n}}:{name:"FormViewed",payload:{sourceCorrelationId:i,formContext:{formId:`dexp-${r?.flowId}`,formType:an},stepContext:{stepId:r?.id||"",stepName:r?.title||"",stepNumber:o},correlationId:n}}},ac=e=>{let{viewCorrelationId:t,formatSubtype:r,formatType:n,placement:i,presets:o,dcs:a,product:l,customDimensions:s,dslConfigId:c,mappedCustomDimensions:d,brand:u,location:p,position:f,sku:m,productId:h,listId:g}=e,y=al(s,c,d),b=iu(l?.variant??a?.degree??o?.degree??""),v=iu(l?.category??a?.category??o?.category??""),x=iu(l?.name??a?.subject??o?.subject??""),w=l?au(l):void 0;return{name:"ProductViewed",payload:{viewCorrelationId:t,...g?{listId:g}:{},product:{formatSubtype:r,formatType:n,location:i||"",name:x,variant:b,category:v,positionEngine:$.ALGOLIA,...u?{brand:u}:{},...p?{location:p}:{},...void 0!==f?{position:f}:{},...m?{sku:m}:{},...h?{productId:h}:{},...w??{}},...y?{customDimensions:y}:{}}}},ad=e=>{let{formViewedCorrelationId:t,outboundUrl:r,actionOutcome:n,formatSubtype:i,formatType:o,presets:a,dcs:l,product:s,viewCorrelationId:c,customDimensions:d,mappedCustomDimensions:u,productClickedCorrelationId:p,brand:f,location:m,placement:h,position:g,sku:y,productId:b,listId:v}=e,x=al(d,void 0,u),w=iu(s?.variant??l?.degree??a?.degree??""),S=iu(s?.category??l?.category??a?.category??""),I=iu(s?.name??l?.subject??a?.subject??""),C=s?au(s):void 0;return{name:"ProductClicked",payload:{correlationId:p||t,viewCorrelationId:c,outboundUrl:r5(r),actionOutcome:n,...x?{customDimensions:x}:{},...v?{listId:v}:{},product:{formatSubtype:i,formatType:o,name:I,category:S,variant:w,positionEngine:$.ALGOLIA,location:m||h||"",...f?{brand:f}:{},...void 0!==g?{position:g}:{},...y?{sku:y}:{},...b?{productId:b}:{},...C??{}}}}};function au(e){let t=new Set(ar),r={};for(let[n,i]of Object.entries(e))t.has(n)||(r[n]=i);return r}let ap=e=>{let{productClickedCorrelationId:t,formViewedCorrelationId:r,currentStep:n,elementType:i,name:o,location:a,text:l,htmlId:s,variant:c,experienceVariant:d,customDimensions:u}=e,p=o1(u);return{name:"ElementViewed",payload:{correlationId:t||r,webElement:{htmlId:s||n?.id,elementType:i||`dexp-${n?.flowId}-${n?.id?.split("-")[0]}`,name:o||n?.title,location:a||"",text:l||"",variant:c||d},...p?{customDimensions:p}:{}}}},af=(e,t)=>
1{let{formViewedCorrelationId:r,currentStep:n,fieldName:i,fieldType:o,fieldValue:a,fieldNumber:l,fieldLabel:s,fieldId:c,autofilled:d,currentStepIndex:u,stepName:p,stepId:f,productClickedCorrelationId:m}=e,h=e.formName||oV,g=p||n?.title||"",y=f??n?.id??"";return{name:t,payload:{correlationId:m||r,formContext:{formId:`dexp-${n?.flowId}`,formName:h,formType:an,formVersion:ai},userInputField:{fieldName:i??n?.leadFieldAssociated??n?.stepName??n?.title??n?.id??"",fieldType:o??"",fieldValue:a??"",fieldLabel:s??"",fieldId:c??"",...d?{autofilled:d}:{},...l?{fieldNumber:l}:{}},stepContext:{stepId:y,stepName:g,stepNumber:u??void 0}}}},am=(e,t)=>{let{formViewedCorrelationId:r,currentStep:n,viewCorrelationId:i,customDimensions:o}=t,a=o1(o);return{name:e,payload:{correlationId:r,webElement:{htmlId:n?.id,elementType:"dexp-pop-up",name:"dexp-terms-and-conditions",text:n?.modal?.buttonText||"Agree & See Matches"},viewCorrelationId:i,...a?{customDimensions:a}:{}}}},ah=e=>{let{productClickedCorrelationId:t,formViewedCorrelationId:r,elementType:n,name:i,location:o,htmlId:a,text:l,correlationId:s,viewCorrelationId:c,position:d,customDimensions:u}=e,p=o1(u);return{name:"ElementClicked",payload:{correlationId:s||t||r,viewCorrelationId:c,webElement:{elementType:n||"dexp-hosted-lead-application-cta",name:i||"dexp-cta-button",location:o||"",...void 0!==d?{position:String(d)}:{},...a?{htmlId:a}:{},...l?{text:l}:{}},...p?{customDimensions:p}:{}}}},ag=["correlationId","viewCorrelationId","elementType","name","htmlId","location","text"],ay=new Set(o4),ab=(e,t)=>{let r=(e=>{let t={};for(let r of ag){let n=e[r];"string"==typeof n&&(t[r]=n)}return t})(t),n="ElementLoaded"===e?void 0:(e=>{let t=o1(e);if(!t||0===t.length)return;let r=t.filter(e=>ay.has(e.key));return r.length>0?r:void 0})(t.customDimensions);return{name:e,payload:{correlationId:r.correlationId,..."ElementLoaded"!==e?{viewCorrelationId:r.viewCorrelationId}:{},webElement:{elementType:r.elementType??"",name:r.name??"",location:r.location??"",text:r.text??"",...r.htmlId?{htmlId:r.htmlId}:{}},...n?{customDimensions:n}:{}}}},av=e=>{let{correlationId:t,elementType:r,name:n,location:i,text:o,htmlId:a,viewCorrelationId:l,position:s,customDimensions:c}=e,d=o1(c);return{name:"ElementViewed",payload:{correlationId:t,viewCorrelationId:l,webElement:{elementType:r||"",name:n||"",location:i||"",text:o||"",...a?{htmlId:a}:{},...void 0!==s?{position:String(s)}:{}},...d?{customDimensions:d}:{}}}},ax=(e,t)=>{if("tagular"in window&&"function"==typeof window.tagular)try{let r=tb[e],n={...void 0!==r?{"@type":r}:{},...t};(0,window.tagular)("beam",e,n)}catch{console.warn("[tagularEvent] dispatch-failed:",e)}},aw=()=>{let{eventContext:e}=aC();return{...((e,t="flow-defaults")=>{let r="explicit-node-enable"===t||"dashboard-defaults"===t,n=(0,v.useCallback)(t=>{let{name:r,payload:n}=(e=>{let{formViewedCorrelationId:t,currentStep:r,currentStepIndex:n}=e;return{name:"FormStarted",payload:{formContext:{formId:`dexp-${r?.flowId}`,formName:e.formName||oV,formType:an,formVersion:ai},stepContext:{stepId:r?.id||"",stepName:r?.title||"",stepNumber:n},correlationId:t}}})(t??e);ax(r,n)},[e]),i=(0,v.useCallback)(t=>{let{name:r,payload:n}=(e=>{let{formViewedCorrelationId:t,currentStep:r,currentStepIndex:n,field:i,dcs:o}=e,a=ao(i);return{name:"FormContinued",payload:{formContext:{formId:`dexp-${r?.flowId}`,formName:e.formName||oV,formType:an,formVersion:ai},stepContext:{stepId:r?.id||"",stepName:r?.title||"",stepNumber:n},correlationId:t,field:a||o}}})(t??e);ax(r,n)},[e]),o=(0,v.useCallback)((e,t)=>{let{name:r,payload:n}=((e,t)=>{let{formViewedCorrelationId:r,productClickedCorrelationId:n,currentStep:i,currentStepIndex:o,field:a,dcs:l,stepName:s,stepNumber:c,outboundUrl:d}=e,u=ao(a),p=r5(d);return{name:t,payload:{formContext:{formId:`dexp-${i?.flowId}`,formName:e.formName||oV,formType:an,formVersion:ai},stepContext:{stepId:i?.id||"",stepName:s||i?.title||"",stepNumber:c||o},field:u||[{fieldName:"degree",fieldValue:l?.degree||""},{fieldName:"category",fieldValue:l?.category||""},{fieldName:"subject",fieldValue:l?.subject||""}],correlationId:n||r,..."FormSubmitted"===t&&p?{outboundUrl:p}:{}}}})(t,e);ax(r,n)},[]),a=(0,v.useCallback)((e,t)=>{let n,{name:i,payload:o}=r?(n=t.blockId??t.fieldId??"",{name:e,payload:{correlationId:t.correlationId,formContext:{formId:t.dashboardConfigId??"",formName:"partner-dashboard",formType:"dashboard",formVersion:ai}
1,userInputField:{fieldName:t.fieldName??"",fieldType:t.fieldType??"",fieldValue:t.fieldValue??"",fieldLabel:t.fieldLabel??"",fieldId:n},stepContext:{stepId:n,stepName:t.stepName??t.name??""}}}):af(t,e);ax(i,o)},[r]),l=(0,v.useCallback)(t=>{let{name:r,payload:n}=aa({...e,...t});ax(r,n)},[e]),s=(0,v.useCallback)(()=>{let{name:t,payload:r}=(e=>{let{formViewedCorrelationId:t,currentStep:r,placement:n,productClickedCorrelationId:i}=e;return{name:"ElementLoaded",payload:{correlationId:i||t,webElement:{htmlId:r?.id,elementType:`dexp-${r?.flowId}-${r?.id?.split("-")[0]}`,name:r?.title,location:n||"",text:""}}}})(e);ax(t,r)},[e]),c=(0,v.useCallback)(()=>{let{name:t,payload:r}=ap(e);ax(t,r)},[e]),d=(0,v.useCallback)(t=>{let n={...e,...t},{name:i,payload:o}=r?ab("ElementLoaded",n):(e=>{let{currentStep:t,elementLoadedCorrelationId:r,placement:n,monarch:i,elementType:o,name:a,text:l,location:s,productClickedCorrelationId:c,htmlId:d}=e;return{name:"ElementLoaded",payload:{correlationId:c||r,webElement:{htmlId:d||t?.flowId||"",elementType:o||"dynamic-experiences-app",name:a||"dynamic-experiences-v1",location:void 0!==s?s:n||"personalizedQdf",text:void 0!==l?l:JSON.stringify(i)||""}}}})(n);ax(i,o)},[e,r]),u=(0,v.useCallback)(e=>{let{name:t,payload:r}=ad(e);ax(t,r)},[]),p=(0,v.useCallback)(t=>{let{name:r,payload:n}=ac({...e,...t});ax(r,n)},[e]),f=(0,v.useCallback)(t=>{let{name:r,payload:n}=as({...e,...t});ax(r,n)},[e]),m=(0,v.useCallback)(()=>{let{name:t,payload:r}=am("ElementViewed",e);ax(t,r)},[e]),h=(0,v.useCallback)(()=>{let{name:t,payload:r}=am("ElementClicked",e);ax(t,r)},[e]),g=(0,v.useCallback)(()=>{let{name:t,payload:r}=((e,t)=>{let{formViewedCorrelationId:r,currentStep:n,viewCorrelationId:i,customDimensions:o}=t,a=o1(o);return{name:e,payload:{correlationId:r,webElement:{htmlId:n?.id,elementType:"dexp-pop-up",name:"dexp-terms-and-conditions-exit",text:""},viewCorrelationId:i,...a?{customDimensions:a}:{}}}})("ElementClicked",e);ax(t,r)},[e]);return{triggerProductLoadedEvent:l,triggerProductViewedEvent:p,triggerStepElementLoadedEvent:s,triggerStepElementViewedEvent:c,triggerFieldEvents:a,triggerFormStartedEvent:n,triggerFormContinuedEvent:i,triggerFormViewedEvent:f,triggerFormEvents:o,triggerElementLoadedEvent:d,triggerProductClickedEvent:u,triggerModalElementViewedEvent:m,triggerModalElementClickedEvent:h,triggerModalElementClosedEvent:g,triggerElementClickedEvent:(0,v.useCallback)(t=>{let n={...e,...t};if(r){let{name:e,payload:t}=ab("ElementClicked",n);ax(e,t);return}let{name:i,payload:o}=ah(n);ax(i,o)},[e,r]),triggerElementViewedEvent:(0,v.useCallback)(t=>{let n={...e,...t};if(r){let{name:e,payload:t}=ab("ElementViewed",n);ax(e,t);return}let{name:i,payload:o}=ap(n);ax(i,o)},[e,r]),eventContext:e}})(e),eventContext:e}},aS=(0,v.createContext)(null),aI=({dcs:e,forwardedContext:t,schoolId:r,headline:n,params:i,steps:o,children:a,placementId:l,entryStepId:s,searchParams:c,jumpToStepId:d,debugResult:u=!1,fromStepIndex:p=0,isFullPageExp:f=!1,audienceIntent:m,styleVariant:h="default",elementLoadedCorrelationId:g,correlationId:y,leadSubmissionConfig:x,customDimensions:w=[],slotName:S,slotVariant:I,experienceName:C})=>{let j=ro(),k=(0,v.useMemo)(()=>j?.configs?.multitenant?.programFinderEnabled,[j]),E=(0,v.useMemo)(()=>(e=>{if(!e)return{};let t=(e=>{if("object"==typeof e)return e;let t=new URLSearchParams(e),r={};return t.forEach((e,t)=>{let n=r[t];void 0===n?r[t]=e:Array.isArray(n)?n.push(e):r[t]=[n,e]}),r})(e),r={};for(let[e,n]of Object.entries(t))n&&(Array.isArray(n)?r[e]=n.map((t,r)=>({optionId:`${e}-search-param-${r}`,text:t,value:t,group:`${e}-search-param`})):r[e]={optionId:`${e}-search-param`,text:n,value:n,group:`${e}-search-param`});return r})(c),[c]),N=tl(),T=(0,v.useRef)(N);T.current=N;let P=(0,v.useMemo)(()=>{let r,n=nF(e,nR(o)),i=eU(o,{dcs:n,entryStepId:s,jumpToStepId:d,dcsTranslate:T.current.translateDcsValue,forwardedContext:t}),a=(r={},o.forEach(e=>{"QUESTION"===e.type&&e$(e,r),("MULTI_QUESTION"===e.type||"DCS"===e.type)&&(e.stepQuestions??[]).forEach(e=>{e$(e,r,e.leadFieldAssociated)})}),r),l={};if(u){let e={firstName:"John",lastName:"Doe",email:"[email protected]",phoneNumber:"5555551234",zip:"90210",countryCode:"US",hsGradYear:"2023",location:{address:"123 Main St",city:"Los Angeles",state:"CA",stateAbbr:"CA",postalCode:"90210",country:"US",ipInferredPostalCode:"90210"}};o.forEach(t=>{let r=t.leadFieldAssociated;if(r&&r in e){let n=e[r]||"",i={optionId:`${r}-debug-input`,text:n,value:n,group:`${r}-debug-input`};l[t.id||""]={option:i,leadFieldAssociated:t.leadFieldAssociated}}})}let c={...a,...i,...l},{currentStep:f,currentStepIndex:h}=(({steps:e,jumpToStepId:t,fromStepIndex:r})=>{if(t){let n=e.findIndex(e=>e.id===t);if(-1!==n)return{currentStep:e[n],currentStepIndex:r?r+1:1}}return{currentStep:e[0],currentStepIndex:1}})({steps:o,jumpToStepId:d,fromStepIndex:p}),g=o_(f,{steps:o,flowState:c,dcs:e,audienceIntent:m||void 0});return{steps:o,currentStep:g,currentStepIndex:h,openModal:!1,acceptTCPA:!1,validationErrors:[],formStartedFired:!1,flowState:c,navigationHistory:[g],currentStepType:g?.type,isSubmitting:!1,submissionError:null,popupBlockedUrl:null}},[o,e,t,m,s,d,p,u]),[R,U]=(0,v.useReducer)(ts,P),$=(0,v.useRef)(R.flowState);$.current=R.flowState,(0,v.useEffect)(()=>{(async()=>{try{let e=await eu();if(!e)return;let t=eU(o,{location:{state:e.regionCode,zipCode:e.zipCode,countryCode:e.countryCode}});Object.entries(t).forEach(([e,t])=>{$.current={...$.current,[e]:t},U(tp(e,t))})}catch(e){console.warn("Failed to initialize location data",e)}})()},[o]);let _=(0,v.useMemo)(()=>R.currentStep?.isTerminal||R.currentStep?.branchingLogic?.length===0,[R.currentStep]),D=R.currentStep?.nextButtonText||(_?"See My Matches":"Next Question"),Y=$.current[R.currentStep?.id||""]||{},B=(0,v.useCallback)(e=>{$.current={...$.current,TCPA:{accepted:e}},U(tp("TCPA",{accepted:e})),U(tf(!1))},[]),z=(0,v.useCallback)(()=>{U({type:F.CLEAR_VALIDATION_ERRORS})},[]),V=(0,v.useCallback)(e=>{U(tm(e))},[]),H=(0,v.useCallback)(e=>R.flowState[e]||{},[R.flowState]),q=(0,v.useCallback)((e,t)=>{$.current={...$.current,[e]:t},U(tp(e,t))},[]),G=(0,v.useCallback)(()=>Promise.resolve(R.flowState[R.currentStep?.id||""]||{}),[R.flowState,R.currentStep?.id]),W=(0,v.useCallback)(e=>t4(e),[]),Q=(0,v.useCallback)(()=>{z(),U({type:F.GO_BACK_IN_HISTORY})},[z]),[K,J]=(0,v.useState)(A),X=(0,v.useCallback)(()=>{let e,t;if(!o||0===o.length)return;let r=0;if(s){let e=o.findIndex(e=>e.id===s);-1!==e&&(r=e)}let n=o[r];n&&($.current={},J(A()),ed.current=!1,U((e=n,t=r,{type:F.RESET_FLOW,payload:{entryStep:e,entryStepIndex:t}})))},[o,s]),Z=(0,v.useCallback)(e=>{let t,r=new Set(o.slice(0,e).map(e=>e.id));U((t=Object.fromEntries(Object.entries($.current).filter(([e])=>r.has(e))),{type:F.SET_FLOW_STATE,payload:t}))},[o]),ee=(0,v.useCallback)((e,t)=>{let r,{resetFlowState:n=!1}=t??{},i=o.findIndex(t=>t.id===e);if(-1===i)return void console.error("No target step found");let a=o[i],l=o.slice(0,i+1);n&&Z(i),U(tc(a)),U(td(i)),U((r=l,{type:F.SET_NAVIGATION_HISTORY,payload:r}))},[o,Z]),{correlationId:et,formViewedCorrelationId:er,eventContext:en}=(({steps:e,currentStep:t,currentStepType:r,currentStepIndex:n,dcs:i,placementId:o,correlationId:a,elementLoadedCorrelationId:l,formViewedCorrelationId:s,providedCustomDimensions:c,monarch:d})=>{let u=(0,v.useMemo)(()=>((e={})=>{let t,r=(t=e.search??window.location.search)?new URLSearchParams(t).get("formViewedCorrelationId"):null;return{correlationId:e.correlationId??A(),elementLoadedCorrelationId:e.elementLoadedCorrelationId??A(),viewCorrelationId:A(),formViewedCorrelationId:e.formViewedCorrelationId??r??A()}})({correlationId:a,elementLoadedCorrelationId:l,formViewedCorrelationId:s}),[]),p=(0,v.useMemo)(()=>(({steps:e,currentStep:t,currentStepType:r,currentStepIndex:n,dcs:i,placementId:o,elementLoadedCorrelationId:a,viewCorrelationId:l,formViewedCorrelationId:s,providedCustomDimensions:c,monarch:d})=>{let{formatType:u,formatSubtype:p}=((e,t)=>{let r;if(!e)return{formatType:"",formatSubtype:""};let n=oz(e),i=t?.isEntry?`dexp-entry-${n}`:`dexp-${n}`;switch(e){case O.COMPONENT:{let e=oz(t.componentType);if(e)r=`dexp-${e}`;else{let e=oz(t.dslConfig?.type);r=e?`dexp-dsl-${e}`:"dexp-unknown"}break}case O.QUESTION:{let e=oz(t.questionType);r=e?`dexp-${e}`:"dexp-unknown";break}case O.MULTI_QUESTION:r="dexp-multi-question";break;case O.DCS:{let e=oz(t.variant);r=e?`dexp-${e}`:"dexp-unknown";break}case O.BANNER_CTA:r="dexp-banner-cta";break;default:r="dexp-unknown"}return{formatType:i,formatSubtype:r}})(r,t),f=((e,t,r)=>{if(!e)return"";let n=e?e===O.DCS?oz(t?.variant):e===O.COMPONENT?oz(t?.componentType):oz(t?.type):"";if(!n)return"";let i=e===O.DCS&&t?.variant==="personalized";return r&&i?`${n}-${r}`:`${n}-default`})(r,t,d?.slotVariant),m=t?.type===O.RESULT&&t?.isEntry!==!0,h=(({elementLoadedCorrelationId:e,currentStep:t,
1sourceCorrelationId:r,providedCustomDimensions:n=[],monarch:i,slotId:o,experienceVariant:a})=>{let l=t?.flowId??"",s=[{key:"sourceCorrelationId",value:r??e},{key:"experienceVariant",value:a??""},{key:"formId",value:l?`dexp-${l}`:""},{key:"stepId",value:t?.id??""},{key:"stepTitle",value:t?.title??""},{key:"experienceName",value:i?.experienceName??""},{key:"slotName",value:i?.slotName??""},{key:"slotId",value:o??""},{key:"slotVariant",value:i?.slotVariant??""},{key:"flowId",value:l}],c=new Map;for(let e of[...s,...n])c.set(e.key,e);return Array.from(c.values())})({elementLoadedCorrelationId:a,currentStep:t,sourceCorrelationId:m?s:a,providedCustomDimensions:c,monarch:d,slotId:o||"",experienceVariant:f});return{dcs:i,placement:o||"",currentStep:t,currentStepType:r,currentStepIndex:n,formName:oV,stepName:t?.title,actionOutcome:((e,t=[])=>{if(!e)return oD;let r=e.branchingLogic??[];if(0===r.length)return e.isTerminal?oY:oD;let n=new Map(t.map(e=>[e.id,e])),i=r.filter(e=>e?.condition?.type!==void 0).map(e=>n.get(e.nextId??"")).filter(e=>!!e);return 0===i.length?e.isTerminal?oY:oD:i.every(oB)?oY:oD})(t,e),formatType:u,formatSubtype:p,experienceVariant:f,elementLoadedCorrelationId:a,viewCorrelationId:l,formViewedCorrelationId:s,customDimensions:h}})({steps:e,currentStep:t,currentStepType:r,currentStepIndex:n,dcs:i,placementId:o,elementLoadedCorrelationId:u.elementLoadedCorrelationId,viewCorrelationId:u.viewCorrelationId,formViewedCorrelationId:u.formViewedCorrelationId,providedCustomDimensions:c,monarch:d}),[e,t,r,n,i,o,u.elementLoadedCorrelationId,u.viewCorrelationId,u.formViewedCorrelationId,c,d?.slotName,d?.slotVariant,d?.experienceName]);return{correlationId:u.correlationId,elementLoadedCorrelationId:u.elementLoadedCorrelationId,viewCorrelationId:u.viewCorrelationId,formViewedCorrelationId:u.formViewedCorrelationId,eventContext:p}})({steps:R.steps,currentStep:R.currentStep,currentStepType:R.currentStepType,currentStepIndex:R.currentStepIndex,dcs:e,placementId:l,correlationId:y,elementLoadedCorrelationId:g,providedCustomDimensions:w,monarch:{slotName:S,slotVariant:I,experienceName:C}}),{triggerFormEvents:ei}=aw(),{triggerIdentify:eo}={triggerIdentify:(0,v.useCallback)((e,t)=>{ax("Identify",{traits:{email:rx("email",e)?.value||"",firstName:rx("firstName",e)?.value||"",website:`dcs[degrees][]=${t?.degree?.text||""}&dcs[categories][]=${t?.category?.text||""}&dcs[subjects][]=${t?.subject?.text||""}`},anonymousId:window?._Cohesion?.anonymousId||"",correlationId:A()})},[])},ea=(0,v.useMemo)(()=>nR(R.steps),[R.steps]),el=function({flowStateRef:e,currentStep:t,steps:r,currentStepIndex:n,currentStepData:i,correlationId:o,siteConfig:a,fromStepIndex:l,formViewedCorrelationId:s,dispatch:c,triggerFormEvents:d,triggerIdentify:u,eventContext:p,leadSubmissionConfig:f,onPopupBlocked:m,forwardFields:h}){return(0,v.useCallback)(async(g,y)=>{let b=g||t;if(!b)return;let v=!!(t?.isEntry&&y),x=e.current,w=x.TCPA?.accepted===!0;if(b.modal?.enable&&!w)return void c(tf(!0));let S=b.branchingLogic?.find(e=>e.type===M.RESULT&&rm(e,i,rg(x),b))?.nextId;await rW({flowState:x,correlationId:o,publisher:a?.domain||"Unknown"});let I=g||r?.find(e=>e.id===S),C={degree:rx("degree",x),category:rx("category",x),subject:rx("subject",x)},j=rR(x,r,h);if(u){let e=rx("emailConsent",x)?.value,t=!!rx("email",x)?.value,r=!!rx("firstName",x)?.value;t&&("Yes"===e||"true"===e||r)&&u(x,C)}if(f){var k;c(tg(null)),c(th(!0));try{let e=x.location,i=iO(I||b),u=r4(f.result,a??{},o,{flowType:ig(I||b),trafficSource:iy(I||b),monetizationChannel:i,location:{country:e?.countryCode,state:e?.state}}),h=await ns(u),g=rS(x),w=await nc({inputs:g,record:f.record,result:f.result,conversionId:h.conversionId,activeProspectToken:f.activeProspectToken,jornayaToken:f.jornayaToken,needsActiveProspectToken:f.needsActiveProspectToken,productCorrelationId:o,identityToken:a?.identityToken,monetizationChannel:i});if(!1===w.leadSubmitted)throw new oL;try{k={name:"Lead",pageUrl:window.location.href},window.dispatchEvent(new CustomEvent(rU,{detail:k}))}catch{}let{url:S}=rO({step:I||b,currentStepId:t?.id||"",correlationId:o,siteConfig:a,dcsData:C,redirectUrl:y,fromStepIndex:l,formViewedCorrelationId:s,contextParams:j});if(S&&d&&p&&!v&&d("FormSubmitted",{...p,outboundUrl:S,currentStep:b,field:rw(x,r)}),S&&oM(S,m),!y){let e=I||b;c(tc(e)),c(td(n+1)),c(tu(e))}}catch(e){c(tg(e instanceof Error&&"qualifications_not_met"===e.message?"This program is not available for your profile.":"Something went wrong submitting your application. Please try again."))}finally{c(th(!1))}return}let{url:A}=rO({step:I||b,currentStepId:t?.id||"",correlationId:o,siteConfig:a,dcsData:C,redirectUrl:y,fromStepIndex:l,formViewedCorrelationId:s,contextParams:j});if(p&&d&&b?.isTerminal&&!v&&d("FormSubmitted",{...p,outboundUrl:A,currentStep:b,field:rw(x,r)}),A&&oM(A,m),!y){let e=I||b;c(tc(e)),c(td(n+1)),c(tu(e))}},[o,r,t,n,i,a,l,s,e,c,d,u,p,f,m,h])}({steps:R.steps,currentStep:R.currentStep,currentStepIndex:R.currentStepIndex,siteConfig:j,flowStateRef:$,correlationId:et,fromStepIndex:p,currentStepData:Y,formViewedCorrelationId:er,dispatch:U,triggerFormEvents:ei,triggerIdentify:eo,eventContext:en,leadSubmissionConfig:x,onPopupBlocked:e=>U(ty(e)),forwardFields:ea?.forwardFields}),es=(0,v.useCallback)(()=>{U(ty(null))},[U]),ec=(0,v.useRef)(null),ed=(0,v.useRef)(!1),ep=(0,v.useMemo)(()=>{let e=R.currentStep;if(!e?.isEntry)return;let t=e.dslConfig;if(t)return nq(t.data)},[R.currentStep]),ef=ep?.productFields,em=ep?.customDimensions,eh=function({flowStateRef:e,currentStep:t,
1steps:r,currentStepIndex:n,isLastStep:i,clearValidationErrors:o,updateFlowState:a,handleSubmit:l,dispatch:s,dcs:c,audienceIntent:d,forwardStepEventFirerRef:u,entryProductFields:p,entryCustomDimensionMappings:f,siteConfig:m,correlationId:h,fromStepIndex:g,formViewedCorrelationId:y,forwardFields:b}){let x=tl();return(0,v.useCallback)(async()=>{let v,w,S;if(o(),!t)return;try{let r=await t3(t,e.current);if(!r.isValid)return void s(tm(r.errors));if(r.resolvedZipData?.stateAbbr){let{stateAbbr:t}=r.resolvedZipData,n=e.current.location||{};a("location",{...n,state:t})}}catch{s(tm([{field:t.id||"unknown",message:"Something went wrong validating your input. Please try again."}]));return}let I=e.current.TCPA?.accepted===!0;if(t.modal?.enable&&!I)return void s(tf(!0));let C=t.id||"",j=r.find(e=>!0===e.isEntry)?.id??r[0]?.id,k=nR(r),A=function(e,t,r,n){var i;if(!t||!r?.enabled||!r.defaults)return e;let o=r.defaults;if(!nM.some(e=>{let t=o[e];return"string"==typeof t&&t.trim().length>0}))return e;let a=e[t],l=(i=a?.option)?Array.isArray(i)?[...i]:[i]:[],s=!1,c=[...l];for(let e of nM){let t=o[e];if("string"!=typeof t||0===t.trim().length)continue;let r=t.trim(),i=n?.(e,r)??r,a=c.findIndex(t=>t.leadFieldAssociated===e);if(a>=0){let t=c[a];if(!function(e){let t=void 0===e.value||null===e.value||"string"==typeof e.value&&0===e.value.trim().length,r="string"!=typeof e.slug||0===e.slug.trim().length;return t&&r}(t))continue;c[a]={...t,value:r,slug:r,text:"string"==typeof t.text&&t.text.trim().length>0?t.text:i,leadFieldAssociated:e,optionId:"string"==typeof t.optionId&&t.optionId.trim().length>0?t.optionId:e},s=!0;continue}c.push({optionId:e,text:i,value:r,slug:r,leadFieldAssociated:e}),s=!0}if(!s)return e;let d=1===c.length?c[0]:c;return{...e,[t]:{...a??{},option:d}}}(e.current,j,k,x.translateDcsValue);if(A!==e.current&&j){let t=A[j];t&&(e.current=A,a(j,t))}let E=function(e,t,r,n){if(e.type===O.MULTI_QUESTION&&"stepQuestions"in e){let t=e.stepQuestions||[],i=[];return t.forEach(e=>{let t=(r[e.id]||{}).option;if(!t)return;let o=e.stepName||e.title||"",a=e.id;if(Array.isArray(t))t.forEach(e=>{i.push({fieldName:o,fieldId:a,fieldNumber:n,fieldValue:String(e?.text??e?.value??"")})});else if("object"==typeof t&&null!==t){let e=t.text??t.value;i.push({fieldName:o,fieldId:a,fieldNumber:n,fieldValue:String(e??"")})}}),i}if(!t||"object"!=typeof t)return[];let i=t.option,o=e.stepName||e.title||"",a=e.id;return Array.isArray(i)?i.map(e=>({fieldName:o,fieldId:a,fieldNumber:n,fieldValue:String(e?.text??e?.value??"")})):i&&"object"==typeof i&&null!==i?[{fieldName:o,fieldId:a,fieldNumber:n,fieldValue:String(i.text??i.value??"")}]:[]}(t,e.current[C]||{},e.current,n),N=t.dslConfigId||t.dslConfig?t.redirectUrl:void 0,T=!!N&&N.toLowerCase().includes("discover"),P=t.type===O.DCS?t.redirectUrl:T?N:void 0,M=!!P,R=e.current[C]||{},F=rg(e.current),U=i?void 0:await (({selectedOptions:e,currentStepData:t,currentStep:r,allSteps:n})=>{if(!r.branchingLogic||0===r.branchingLogic.length)return null;let i=rp(r),o=r.branchingLogic.find(n=>n.condition.type!==L.DEFAULT&&rm(n,t,e,r,i));if(o)return rs(o,n);let a=r.branchingLogic.find(e=>e.condition.type===L.DEFAULT);return a?rs(a,n):null})({currentStepData:R,selectedOptions:F,currentStep:t,allSteps:r})??void 0,$=i||oB(U)||void 0===U?oY:oD,_=t.isEntry&&void 0!==p&&Object.keys(p).length>0,D=t.isEntry&&void 0!==f&&f.length>0;if(_||D){let n=nR(r)?.subjectLabelFallback,i=iS(e.current,r,t,{subjectLabelFallback:n});if(_&&(v=im({map:p,root:i})),D){let e=ih(f,i);e.length>0&&(w=e)}}else if(t.isEntry){let t={degree:rx("degree",e.current)?.value,category:rx("category",e.current)?.value,subject:rx("subject",e.current)?.value};(t.degree||t.category||t.subject)&&(S=t)}let Y=t.redirectUrl||null;if(M&&t.isEntry){let n=rR(e.current,r,b),{url:i}=rO({step:U??t,currentStepId:C,correlationId:h??"",siteConfig:m,dcsData:{degree:rx("degree",e.current),category:rx("category",e.current),subject:rx("subject",e.current)},redirectUrl:P,fromStepIndex:g,formViewedCorrelationId:y,contextParams:n});Y=i||null}if(u.current?.({isExitingStepWithRedirect:M,isLastStep:i,outboundUrl:Y,ctaText:t.nextButtonText||"Next Question",actionOutcome:$,isResultsLanding:$===oY,...v&&Object.keys(v).length>0?{productOverride:v}:{},...w?{mappedCustomDimensions:w}:{},...S?{dcs:S}:{},field:E}),M&&P){U&&await l(U,P);return}if(i)return void await l();if(U){let t=n+1,i=o_(U,{steps:r,flowState:e.current,dcs:c,audienceIntent:d||void 0});s(tc(i)),s(td(t)),s(tu(i))}},[t,r,n,i,o,a,l,e,s,c,d,u,p,f,m,h,g,y,b,x.translateDcsValue])}({isLastStep:_,flowStateRef:$,steps:R.steps,currentStep:R.currentStep,currentStepIndex:R.currentStepIndex,dispatch:U,handleSubmit:el,updateFlowState:q,clearValidationErrors:z,dcs:e,audienceIntent:m,forwardStepEventFirerRef:ec,entryProductFields:ef,entryCustomDimensionMappings:em,siteConfig:j,correlationId:et,fromStepIndex:p,formViewedCorrelationId:er,forwardFields:ea?.forwardFields}),{getCachedOptions:eg,isPrefetching:ey}=(({steps:e,flowState:t,enabled:r=!0})=>{let[n,i]=(0,v.useState)({}),[o,a]=(0,v.useState)(()=>r&&e.some(r=>oJ(r,t,e))),l=(0,v.useRef)({}),s=(0,v.useRef)(n);s.current=n;let c=(0,v.useRef)(0),d=(0,v.useRef)(!0);(0,v.useEffect)(()=>(d.current=!0,()=>{d.current=!1}),[]);let u=(0,v.useMemo)(()=>{let t=new Map;for(let r of e)r.id&&t.set(r.id,r);return t},[e]),p=(0,v.useCallback)(r=>{let n=[];if(Object.keys(r).forEach(r=>{let i=u.get(r);i?o0(i,t,e)!==l.current[r]&&n.push(r):n.push(r)}),0===n.length)return r;let i={...r};
1return n.forEach(e=>{delete i[e],delete l.current[e]}),i},[e,t,u]),f=(0,v.useCallback)(async()=>{if(!r||0===e.length)return;let n=++c.current;if(d.current){a(!0);try{let r=p(s.current),o=await oZ(e,t,r);if(!d.current||n!==c.current)return;Object.keys(o).forEach(r=>{let n=u.get(r);n&&(l.current[r]=o0(n,t,e))}),i(o)}catch(e){"undefined"!=typeof console&&console.error&&console.error("[DynamicOptionsCache] Prefetch error:",e)}finally{d.current&&n===c.current&&a(!1)}}},[r,e,t,u,p]),m=(0,v.useCallback)(r=>{if(!r.id)return;let i=n[r.id];if(i){if(o0(r,t,e)===l.current[r.id])return i}},[n,t,e]),h=(0,v.useCallback)(e=>{i(t=>{let{[e]:r,...n}=t;return n}),delete l.current[e]},[]),g=(0,v.useCallback)(()=>{i({}),l.current={}},[]),y=(0,v.useMemo)(()=>(e=>{let t=new Set;for(let r of e)if(r.type===O.QUESTION&&r.dynamicOptions?.endpointUrl)for(let e of oK(r))t.add(e);let r=new Set;for(let n of e)n.type===O.QUESTION&&n.id&&n.customField&&t.has(n.customField)&&r.add(n.id);return Array.from(r).sort()})(e),[e]),b=(0,v.useMemo)(()=>JSON.stringify(Object.fromEntries(y.map(e=>[e,t[e]??null]))),[y,...y.map(e=>t[e])]);return(0,v.useEffect)(()=>{if(!r)return;let e=setTimeout(()=>{f()},50);return()=>clearTimeout(e)},[r,e,b]),{cache:n,isPrefetching:o,getCachedOptions:m,prefetchAll:f,invalidateStep:h,clearCache:g}})({steps:(0,v.useMemo)(()=>rL(R.steps||[]),[R.steps]),flowState:R.flowState,enabled:!0}),eb=(0,v.useMemo)(()=>({steps:R.steps||[],schoolId:r,headline:n,params:i,getCachedOptions:eg,isPrefetching:ey,openModal:R.openModal,flowState:R.flowState,currentStep:R.currentStep,currentStepType:R.currentStepType,validationErrors:R.validationErrors,currentStepIndex:R.currentStepIndex,navigationHistory:R.navigationHistory,isSubmitting:R.isSubmitting,submissionError:R.submissionError,popupBlockedUrl:R.popupBlockedUrl??null,clearPopupBlocked:es,buttonText:D,placementId:l,eventContext:en,styleVariant:h,correlationId:et,isFullPageExp:f,currentStepData:Y,searchParamsOptions:E,formViewedCorrelationId:er,programFinderEnabled:k,handleTCPA:B,handleGoToStep:ee,handlePrevious:Q,handleRestart:X,updateFlowState:q,handleStepForward:eh,getCurrentStepData:G,stepNeedsValidation:W,getStepMetadataById:H,clearValidationErrors:z,setValidationErrors:V,forwardStepEventFirerRef:ec,formStartedFiredRef:ed,flowSessionId:K}),[l,r,n,i,h,f,eg,ey,R.steps,R.flowState,R.openModal,R.currentStep,R.currentStepType,R.currentStepIndex,R.validationErrors,R.navigationHistory,R.isSubmitting,R.submissionError,R.popupBlockedUrl,es,D,en,et,Y,E,er,k,B,ee,Q,X,q,eh,G,H,W,V,z,ec,ed,K]);return(0,b.jsx)(aS.Provider,{value:eb,children:a})},aC=()=>{let e=(0,v.useContext)(aS);return e||(console.warn("useDynamicExperienceContext must be used within a DynamicExperienceProvider"),{})};var aj=r(95885),ak=r(62755),aA=r(79662);function aE(e,t,r,n,i,o){let a=function(e){if(!e)return"";let t=Object.keys(e).sort(),r=[];for(let n of t){let t=e[n],i=Array.isArray(t)?t.join(","):String(t);r.push(`${encodeURIComponent(n)}=${encodeURIComponent(i)}`)}return r.join("&")}(r),l=void 0===n?"":aN(n),s=function(e){if(!e)return"";let t={};for(let r of Object.keys(e))t[r.toLowerCase()]=e[r];return aN(t)}(i);return`${e.toUpperCase()} ${t}?${a} ${l} h:${s} rp:${o??""}`}function aN(e){try{return function e(t,r){if(null===t)return"null";if("number"==typeof t)return Number.isFinite(t)?String(t):"null";if("boolean"==typeof t||"string"==typeof t)return JSON.stringify(t);if(void 0===t||"function"==typeof t)return"null";if("object"!=typeof t)return JSON.stringify(t)??"null";if(r.has(t))return'"<cycle>"';r.add(t);try{if(Array.isArray(t)){let n=t.map(t=>e(t,r));return`[${n.join(",")}]`}let n=Object.keys(t).sort().map(n=>`${JSON.stringify(n)}:${e(t[n],r)}`);return`{${n.join(",")}}`}finally{r.delete(t)}}(e,new WeakSet)}catch{return"<unserializable>"}}class aT extends Error{constructor(e){super(`DataSource dependency cycle detected: ${e.join(" -> ")} -> ${e[0]??""}`),this.name="DataSourceCycleError",this.cycle=e,Object.setPrototypeOf(this,aT.prototype)}}class aO extends Error{constructor(e,t){super(`DataSource "${e}" declares dependsOn "${t}", but no data source with that name exists.`),this.name="DataSourceMissingDependencyError",this.source=e,this.missing=t,Object.setPrototypeOf(this,aO.prototype)}}
1class aP extends Error{constructor(e,t){super(`DataSource endpoint "${t} ${e}" is not permitted by the data source allowlist.`),this.name="DataSourceEndpointNotAllowedError",this.endpoint=e,this.method=t,Object.setPrototypeOf(this,aP.prototype)}}class aL extends Error{constructor(e,t){super(e),this.name="DataSourceExtractionError",this.responsePath=t,Object.setPrototypeOf(this,aL.prototype)}}class aM extends Error{constructor(e,t,r,n,i){super(n??`DataSource "${r} ${t}" responded with HTTP ${e}`),this.name="DataSourceHttpError",this.status=e,this.endpoint=t,this.method=r,void 0!==i&&(this.code=i),Object.setPrototypeOf(this,aM.prototype)}}class aR extends Error{constructor(e,t,r,n){super(r??(void 0!==n?"The data source could not be reached.":`DataSource "${t} ${e}" could not be reached.`)),this.name="DataSourceTransportError",this.endpoint=e,this.method=t,void 0!==n&&(this.code=n),Object.setPrototypeOf(this,aR.prototype)}}class aF extends Error{constructor(e){super(`DataSource kind "${e}" is not supported.`),this.name="DataSourceUnknownKindError",this.kind=e,Object.setPrototypeOf(this,aF.prototype)}}class aU extends Error{constructor(){super("DataSource reportingModel fetch requires reportingQueryUrl on DataSourceManagerProvider."),this.name="DataSourceReportingNotConfiguredError",Object.setPrototypeOf(this,aU.prototype)}}class a$ extends Error{constructor(){super("DataSource inference fetch requires inferenceUrl on DataSourceManagerProvider."),this.name="DataSourceInferenceNotConfiguredError",Object.setPrototypeOf(this,a$.prototype)}}function a_(e,t){let r=!1,n={};for(let[i,o]of Object.entries(e)){if(function(e,t){let r=function e(t){if("string"==typeof t)return function(e){let t;try{({segments:t}=n8(e))}catch{return null}let r=t.filter(e=>"expression"===e.type);return r.some(e=>"path"!==e.kind)?null:r}(t);if(Array.isArray(t)){let r=[];for(let n of t){let t=e(n);if(null===t)return null;r.push(...t)}return r}return[]}(e);return null!==r&&0!==r.length&&!!r.every(e=>{let t=e.segments[0];return t?.type==="key"&&"formState"===t.name})&&r.some(e=>{var r;return null==(r=it(t,e.segments))||"string"==typeof r&&0===r.trim().length})}(o,t)){r=!0;continue}n[i]=o}return r?n:e}let aD="_facets.",aY="_filterCounts.";function aB(e,t){return void 0===t||0===t.length?e:t.startsWith(aD)?az(e,"_facets",t.slice(aD.length),t):t.startsWith(aY)?az(e,"_filterCounts",t.slice(aY.length),t):it(e,t.split(".").filter(e=>e.length>0).map(e=>({type:"key",name:e})))}function az(e,t,r,n){if(0===r.length)throw new aL(`"${n}" must name a ${t} key (e.g. "${t}.degreeTypes").`,n);if(null===e||"object"!=typeof e)throw new aL(`Cannot extract "${n}" from a non-object response.`,n);let i=e[t];if(void 0===i)return;if(null===i||"object"!=typeof i)throw new aL(`Response field "${t}" must be an object.`,n);let o=i[r];if(void 0!==o){if(!Array.isArray(o))throw new aL(`"${t}.${r}" must be an array of { name, slug, count }.`,n);return o.map((e,i)=>(function(e,t,r,n,i){if(null===e||"object"!=typeof e)throw new aL(`"${t}.${r}[${n}]" must be an object.`,i);let o=e.name,a=e.slug,l=e.count;if("string"!=typeof o)throw new aL(`"${t}.${r}[${n}].name" must be a string.`,i);if("string"!=typeof a)throw new aL(`"${t}.${r}[${n}].slug" must be a string.`,i);if("number"!=typeof l)throw new aL(`"${t}.${r}[${n}].count" must be a number.`,i);return{name:o,slug:a,count:l}})(e,t,r,i,n))}}async function aV(e,t,r={}){var n,i,o,a,l,s;let c,d,u,p,f=(n=e,i=t,c=String(ic(n.endpoint,i)),d=n.headers?ic(n.headers,i):void 0,u=void 0!==n.body?ic(n.body,i):void 0,p=n.query?ic(a_(n.query,i),i):void 0,{endpoint:c,method:n.method,headers:d,body:u,query:p}),m=r.coerceRequestBody?r.coerceRequestBody(f):f;if(!iV(m.endpoint,m.method,r.tenantId))return console.warn(`[DataSourceManager] blocked endpoint by allowlist: ${m.method} ${m.endpoint}`),{status:"error",request:m,error:new aP(m.endpoint,m.method)};if(!iq(m.endpoint,r.trustedOrigins))return console.warn(`[DataSourceManager] blocked endpoint by origin allowlist: ${m.method} ${m.endpoint} (trustedOrigins: ${r.trustedOrigins?.join(", ")??"<none configured>"})`),{status:"error",request:m,error:new aP(m.endpoint,m.method)};let h=e.errorStrategy?.timeout??1e4,g=e.errorStrategy?.retries??2,y=r.fetchImpl??globalThis.fetch,b=r.delay??aq,v=Error("DataSource fetch never attempted â unreachable.");for(let t=0;t<=g;t++){if(r.signal?.aborted)return{status:"error",request:m,error:aG(r.signal.reason,"DataSource fetch aborted.")};try{let n=await aH(m,y,h,r.signal,r.setTimeoutImpl,r.clearTimeoutImpl);if(n.status>=400&&n.status<500)return{status:"error",request:m,error:new aM(n.status,m.endpoint,m.method)};if(n.status>=500){if(v=new aM(n.status,m.endpoint,m.method),t<g){await b((o=t,200*2**o),r.signal);continue}return{status:"error",request:m,error:v}}let i=await n.json(),l=r.coerceResponse?r.coerceResponse(i,m,e):i,s=aB(l,e.responsePath);if(a=s,null==a||(Array.isArray(a)?0===a.length:"object"==typeof a&&0===Object.keys(a).length))return{status:"empty",request:m,data:s};return{status:"resolved",request:m,data:s}}catch(e){if(v=aG(e,"DataSource fetch failed."),null!==(l=e)&&"object"==typeof l&&"AbortError"===l.name||r.signal?.aborted)return{status:"error",request:m,error:v};if(t<g){try{await b((s=t,200*2**s),r.signal)}catch{return{status:"error",request:m,error:v}}continue}break}}return{status:"error",request:m,error:v}}async function aH(e,t,r,n,i=setTimeout,o=clearTimeout){let a=new AbortController,l=()=>{a.abort(n?.reason)};n&&(n.aborted?a.abort(n.reason):n.addEventListener("abort",l,{once:!0}));let s=i(()=>{a.abort(Error("DataSource fetch timed out."))},r);try{let r=function(e,t){if(!t)return e;let r=Object.keys(t);if(0===r.length)return e;let n=[];for(let e of r){let r=t[e],i=Array.isArray(r)?r.join(","):String(r);n.push(`${encodeURIComponent(e)}=${encodeURIComponent(i)}`)}let i=e.includes("?")?"&":"?";return`${e}${i}${n.join("&")}`}(e.endpoint,e.query),n={method:e.method,headers:e.headers,signal:a.signal};return"GET"!==e.method&&void 0!==e.body&&(n.body=JSON.stringify(e.body),n.headers={"content-type":"application/json",...e.headers??{}}),await t(r,n)}finally{o(s),n&&n.removeEventListener("abort",l)}}function aq(e,t){return new Promise((r,n)=>{if(t?.aborted)return void n(aG(t.reason,"DataSource fetch aborted during backoff."));let i=setTimeout(()=>{a(),r()},e),o=()=>{clearTimeout(i),a(),n(aG(t?.reason,"DataSource fetch aborted during backoff."))},a=()=>{t?.removeEventListener("abort",o)};t?.addEventListener("abort",o,{once:!0})})}function aG(e,t){return e instanceof Error?e:"string"==typeof e?Error(e):Error(t)}async function aW(e,t,r={}){let n=r.inferenceUrl?.trim();if(!n)return{status:"error",request:{endpoint:"",method:"POST"},error:new a$};let i=e.headers?ic(e.headers,t):void 0,o=void 0!==e.body?ic(e.body,t):void 0,a={endpoint:n,method:"POST",headers:{...i??{},"content-type":"application/json"},body:o};if(r.coerceRequestBody&&(a=r.coerceRequestBody(a)),!iV(a.endpoint,a.method,r.tenantId))return console.warn(`[DataSourceManager] blocked inference endpoint by allowlist: ${a.method} ${a.endpoint}`),{status:"error",request:a,error:new aP(a.endpoint,a.method)};if(!iq(a.endpoint,r.trustedOrigins))return console.warn(`[DataSourceManager] blocked inference endpoint by origin allowlist: ${a.method} ${a.endpoint}`),{status:"error",request:a,error:new aP(a.endpoint,a.method)};let l=e.errorStrategy?.timeout??3e4,s=e.errorStrategy?.retries??0,c=r.fetchImpl??globalThis.fetch,d=r.delay??aK,u=Error("Inference fetch never attempted â unreachable.");for(let t=0;t<=s;t++){var p,f,m,h;if(r.signal?.aborted)return{status:"error",request:a,error:aJ(r.signal.reason,"Inference fetch aborted.")};try{let n=await aQ(a,c,l,r.signal,r.setTimeoutImpl,r.clearTimeoutImpl);if(n.status>=400&&n.status<500)return{status:"error",request:a,error:new aM(n.status,a.endpoint,a.method)};if(n.status>=500){if(u=new aM(n.status,a.endpoint,a.method),t<s){await d((p=t,200*2**p),r.signal);continue}return{status:"error",request:a,error:u}}let i=await n.json(),o=r.coerceResponse?r.coerceResponse(i,a):i,m=aB(o,e.responsePath);if(f=m,null==f||(Array.isArray(f)?0===f.length:"object"==typeof f&&0===Object.keys(f).length))return{status:"empty",request:a,data:m};return{status:"resolved",request:a,data:m}}catch(e){if(u=aJ(e,"Inference fetch failed."),null!==(m=e)&&"object"==typeof m&&"AbortError"===m.name||r.signal?.aborted)return{status:"error",request:a,error:u};if(t<s){try{await d((h=t,200*2**h),r.signal)}catch{return{status:"error",request:a,error:u}}continue}break}}return{status:"error",request:a,error:u}}async function aQ(e,t,r,n,i=setTimeout,o=clearTimeout){let a=new AbortController,l=()=>{a.abort(n?.reason)};n&&(n.aborted?a.abort(n.reason):n.addEventListener("abort",l,{once:!0}));let s=i(()=>{a.abort(Error("Inference fetch timed out."))},r);try{let r={method:e.method,headers:e.headers,signal:a.signal};return void 0!==e.body&&(r.body=JSON.stringify(e.body)),await t(e.endpoint,r)}finally{o(s),n&&n.removeEventListener("abort",l)}}function aK(e,t){return new Promise((r,n)=>{if(t?.aborted)return void n(aJ(t.reason,"Inference fetch aborted during backoff."));let i=setTimeout(()=>{a(),r()},e),o=()=>{clearTimeout(i),a(),n(aJ(t?.reason,"Inference fetch aborted during backoff."))},a=()=>{t?.removeEventListener("abort",o)};t?.addEventListener("abort",o,{once:!0})})}function aJ(e,t){return e instanceof Error?e:"string"==typeof e?Error(e):Error(t)}function aX(e,t){return{modelId:String(ic(e.modelId,t)),metrics:aZ(e.metrics,t),...e.dimensions?.length?{dimensions:aZ(e.dimensions,t)}:{},...function(e,t){let r={};if(e.segments?.length&&(r.segments=aZ(e.segments,t)),e.filters?.length&&(r.filters=e.filters.map(e=>ic(e,t))),e.having?.length){let n=e.having.map(e=>ic(e,t)).filter(e=>!function e(t){return Array.isArray(t)?0===t.length||t.some(e):"str
1ing"==typeof t?0===t.trim().length:null==t}(e?.value));n.length>0&&(r.having=n)}if(e.order?.length&&(r.order=e.order.map(e=>ic(e,t))),void 0!==e.limit){let n=ic(e.limit,t);"number"==typeof n&&Number.isFinite(n)&&(r.limit=n)}if(e.context&&Object.keys(e.context).length>0){let n=ic(e.context,t),i={};for(let[e,t]of Object.entries(n))"string"==typeof t||"number"==typeof t?i[e]=t:null!=t&&(i[e]=String(t));Object.keys(i).length>0&&(r.context=i)}return r}(e,t)}}function aZ(e,t){return e.map(e=>String(ic(e,t)))}let a0="SERVICE_UNAVAILABLE";async function a1(e,t,r={}){let n=r.reportingQueryUrl?.trim();if(!n)return{status:"error",request:{endpoint:"",method:"POST"},error:new aU};let i={endpoint:n,method:"POST",headers:{"content-type":"application/json"},body:aX(e,t)};if(r.coerceRequestBody&&(i=r.coerceRequestBody(i)),!iV(i.endpoint,i.method,r.tenantId))return console.warn(`[DataSourceManager] blocked reporting endpoint by allowlist: ${i.method} ${i.endpoint}`),{status:"error",request:i,error:new aP(i.endpoint,i.method)};if(!iq(i.endpoint,r.trustedOrigins))return console.warn(`[DataSourceManager] blocked reporting endpoint by origin allowlist: ${i.method} ${i.endpoint}`),{status:"error",request:i,error:new aP(i.endpoint,i.method)};let o=e.errorStrategy?.timeout??1e4,a=e.errorStrategy?.retries??2,l=r.fetchImpl??globalThis.fetch,s=r.delay??a5,c=Error("ReportingModel fetch never attempted â unreachable.");for(let t=0;t<=a;t++){var d,u,p;if(r.signal?.aborted)return{status:"error",request:i,error:a3(r.signal.reason,"ReportingModel fetch aborted.")};let n=!1;try{let p=await a4(i,l,o,r.signal,r.setTimeoutImpl,r.clearTimeoutImpl);if(n=!0,p.status>=400&&p.status<500)return{status:"error",request:i,error:await a2(p,i)};if(p.status>=500){if(c=new aM(p.status,i.endpoint,i.method,void 0,a0),t<a){await s((d=t,200*2**d),r.signal);continue}return{status:"error",request:i,error:c}}let f=await p.json(),m=r.coerceResponse?r.coerceResponse(f,i):f,h=aB(m,e.responsePath);if(u=h,null==u||(Array.isArray(u)?0===u.length:"object"==typeof u&&0===Object.keys(u).length))return{status:"empty",request:i,data:h};return{status:"resolved",request:i,data:h}}catch(o){let e=a3(o,"ReportingModel fetch failed.");if(r.signal?.aborted)return{status:"error",request:i,error:c=e};if(c=n?e:new aR(i.endpoint,i.method,void 0,a0),t<a){try{await s((p=t,200*2**p),r.signal)}catch{return{status:"error",request:i,error:c}}continue}break}}return{status:"error",request:i,error:c}}async function a2(e,t){let r,n=await e.text();try{r=JSON.parse(n)}catch{return new aM(e.status,t.endpoint,t.method,n||e.statusText,a0)}if(function(e){if("object"!=typeof e||null===e||"object"!=typeof e.error||null===e.error)return!1;let t=e.error;return"string"==typeof t.code&&"string"==typeof t.message}(r)){let{code:n,message:i}=r.error;return new aM(e.status,t.endpoint,t.method,i,n)}return new aM(e.status,t.endpoint,t.method,n||e.statusText,a0)}async function a4(e,t,r,n,i=setTimeout,o=clearTimeout){let a=new AbortController,l=()=>{a.abort(n?.reason)};n&&(n.aborted?a.abort(n.reason):n.addEventListener("abort",l,{once:!0}));let s=i(()=>{a.abort(Error("ReportingModel fetch timed out."))},r);try{return await t(e.endpoint,{method:e.method,headers:e.headers,body:JSON.stringify(e.body),signal:a.signal})}finally{o(s),n&&n.removeEventListener("abort",l)}}function a5(e,t){return new Promise((r,n)=>{if(t?.aborted)return void n(a3(t.reason,"ReportingModel fetch aborted during backoff."));let i=setTimeout(()=>{a(),r()},e),o=()=>{clearTimeout(i),a(),n(a3(t?.reason,"ReportingModel fetch aborted during backoff."))},a=()=>{t?.removeEventListener("abort",o)};t?.addEventListener("abort",o,{once:!0})})}function a3(e,t){return e instanceof Error?e:"string"==typeof e?Error(e):Error(t)}async function a6(e,t,r={}){if(!i3(e)){let t=String(e.kind??"");return{status:"error",request:{endpoint:i2(e)?e.endpoint:"",method:i2(e)?e.method:"GET"},error:new aF(t)}}return i4(e)?a1(e,t,r):i5(e)?aW(e,t,r):aV(e,t,r)}let a8=["offerings","offeringsService"];function a9(e){if(!e)return"";if(e.startsWith("/"))return e.split("?")[0]??"";try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";return t.pathname}catch{return""}}function a7(e){if("POST"!==e.method)return!1;let t=a9(e.endpoint);if(!t)return!1;for(let e of a8)for(let r of i$[e])if(r.methods.some(e=>"POST"===e)&&iH(t,r.pattern))return!0;return!1}function le(e,t){return Object.prototype.hasOwnProperty.call(e,t)}let lt=new Set(["context"]);function lr(e,t,r){return"string"==typeof e?function(e,t,r){let n;try{n=n8(e)}catch{return!1}for(let e of n.segments){if("expression"!==e.type||"path"!==e.kind)continue;let n=e.segments[0];if(!(void 0===n||"key"!==n.type||lt.has(n.name)||r?.ignoreFormState&&"formState"===n.name)){var i;if(null==(i=it(t,e.segments))||"string"==typeof i&&0===i.trim().length)return!0}}return!1}(e,t,r):null!==e&&"object"==typeof e&&(Array.isArray(e)?e.some(e=>lr(e,t,r)):Object.values(e).some(e=>lr(e,t,r)))}let ln=(0,v.createContext)(void 0);function li(e,t){switch(t.type){case"reset":{let e={};for(let r of t.names){let n=t.missingBySource.get(r);void 0!==n?e[r]={data:void 0,status:"error",error:new aO(r,n)}:e[r]={data:void 0,status:"pending"}}return e}case"reconcile":{let r={};for(let n of t.names){let i=t.missingBySource.get(n);void 0!==i?r[n]={data:void 0,status:"error",error:new aO(n,i)}:t.refetch.has(n)?r[n]={data:void 0,status:"pending"}:r[n]=e[n]??{data:void 0,status:"pending"}}if(Object.keys(e).length===t.names.length){let n=!0;for(let i of t.names)if(e[i]!==r[i]){n=!1;break}if(n)return e}return r}case"pending":return{...e,[t.name]:{data:void 0,status:"pending",lastUpdatedAt:e[t.name]?.lastUpdatedAt}};case"resolved":return{...e,[t.name]:{data:t.data,status:"resolved",lastUpdatedAt:t.at}};case"empty":return{...e,[t.name]:{data:t.data,status:"empty",lastUpdatedAt:t.at}};case"error":return{...e,[t.name]:{data:void 0,status:"error",error:t.error,lastUpdatedAt:e[t.name]?.lastUpdatedAt}};default:return e}}function lo(e,t){switch(t.type){case"set":if(e[t.key]===t.value)return e;return{...e,[t.key]:t.value};case"replace":return t.next;default:return e}}
1let la=({dataSources:e,flowContext:t,onFormStateChange:r,initialFormState:n,trustedOrigins:i,tenantId:o,coerceRequestBody:a,coerceResponse:l,reportingQueryUrl:s,inferenceUrl:c,children:d})=>{let u=(0,v.useMemo)(()=>aN(e),[e]),{ordered:p,missingDependencies:f}=(0,v.useMemo)(()=>(function(e){let t=Object.keys(e);if(0===t.length)return{ordered:[],missingDependencies:[]};let r=new Map,n=new Map,i=[],o=new Set;for(let e of t)r.set(e,0),n.set(e,[]);for(let a of t)for(let t of e[a].dependsOn??[]){if(!r.has(t)){o.has(a)||(o.add(a),i.push({source:a,missing:t}));continue}r.set(a,(r.get(a)??0)+1);let e=n.get(t);e&&e.push(a)}let a=[];for(let e of t)(r.get(e)??0)===0&&a.push(e);let l=[];for(;a.length>0;){let e=a.shift();if(void 0===e)break;for(let t of(l.push(e),n.get(e)??[])){let e=(r.get(t)??0)-1;r.set(t,e),0===e&&a.push(t)}}if(l.length!==t.length)throw new aT(function(e,t){let r=new Set(t),n=Object.keys(e).filter(e=>!r.has(e));for(let t of n){let n=function e(t,r,n,i,o){if(i.includes(t)){let e=i.indexOf(t);return i.slice(e)}if(o.has(t))return null;o.add(t),i.push(t);let a=r[t];for(let t of a?.dependsOn??[]){if(n.has(t))continue;let a=e(t,r,n,i,o);if(null!==a)return a}return i.pop(),null}(t,e,r,[],new Set);if(null!==n)return n}return n}(e,l));return{ordered:l,missingDependencies:i}})(e),[u]),m=(0,v.useMemo)(()=>{let e=new Map;for(let{source:t,missing:r}of f)e.has(t)||e.set(t,r);return e},[f]),[h,g]=(0,v.useReducer)(li,{orderedNames:p,missingBySource:m},({orderedNames:e,missingBySource:t})=>{let r={};for(let n of e){let e=t.get(n);void 0!==e?r[n]={data:void 0,status:"error",error:new aO(n,e)}:r[n]={data:void 0,status:"pending"}}return r}),[y,x]=(0,v.useReducer)(lo,n??{},e=>({...e})),w=(0,v.useRef)(null);w.current||(w.current=function(e={}){let t=new Map,r=e.now??Date.now,n=e=>{let n=t.get(e);if(n)return n.expiresAt<=r()?void t.delete(e):n};return{get:e=>n(e)?.data,getEntry:e=>n(e),set(e,n,i){if(!Number.isFinite(i)||i<=0)return;let o=r();t.set(e,{data:n,expiresAt:o+i,storedAt:o})},delete(e){t.delete(e)},clear(){t.clear()},size:()=>t.size}}());let S=(0,v.useRef)(new Map),I=(0,v.useRef)(y),C=(0,v.useRef)(t),j=(0,v.useRef)(!0),k=(0,v.useRef)(r),A=(0,v.useRef)(e),E=(0,v.useRef)(i),N=(0,v.useRef)(o),T=(0,v.useRef)(a),O=(0,v.useRef)(l),P=(0,v.useRef)(s),L=(0,v.useRef)(c),M=(0,v.useRef)(m),R=(0,v.useRef)(null),F=(0,v.useRef)(new Map),U=(0,v.useRef)(!1),$=(0,v.useRef)(new Map);I.current=y,C.current=t,k.current=r,A.current=e,E.current=i,N.current=o,T.current=a,O.current=l,P.current=s,L.current=c,M.current=m;let _=(0,v.useRef)({}),D=(0,v.useCallback)(async(e,t)=>{var r,n,i,o,a,l;let s,c;if(M.current.has(e))return;let d=A.current[e];if(!d)return;let u=null!=t&&"body"in t?{...d,body:t.body}:d;if(!t?.force&&i5(u)&&(u.trigger??"auto")==="explicit")return;let p=S.current.get(e);p&&p.abort(Error("DataSource re-run: superseded by newer run."));let f=new AbortController;S.current.set(e,f);let m=function(e,t,r){for(let e of Object.keys(r))ls.has(e)&&!lc.has(e)&&(lc.add(e),console.warn(`[DataSourceManager] data source name "${e}" shadows the built-in interpolation root and will be ignored. Rename the source.`));return{...r,context:e,formState:t}}(C.current,I.current,_.current);if(j.current&&g({type:"pending",name:e}),function(e,t){var r;let n=!i2(r=e)||!function(e){if(!i2(e)||"POST"!==e.method)return!1;let t=function(e){if(!e)return"";if(e.startsWith("/"))return e.split("?")[0]??"";try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";return t.pathname}catch{return""}}(e.endpoint);return t===rX||t===rJ}(r)||null===r.body||"object"!=typeof r.body||Array.isArray(r.body)?[]:[r.body.geolocation];if(i4(e)||i5(e)){let r=[...i6(e),...n];return!!r.some(e=>is(e))&&r.some(e=>lr(e,t))}let i=[i2(e)?e.endpoint:void 0,i2(e)?e.headers:void 0,...n],o=i2(e)?e.query:void 0;return!![...i,o].some(e=>is(e))&&(!!i.some(e=>lr(e,t))||lr(o,t,{ignoreFormState:!0}))}(u,m))return void delete _.current[e];let h=function(e){let t=e.trafficSource;if("string"==typeof t&&t.length>0)return t;let r=rC(window.location?.href??"");return"string"==typeof r&&r.length>0?r:void 0}(C.current),y=(s=window.location?.href??"").length>0?s:void 0,b=(o=(n=(r=function(e,t,r,n){var i,o;if(i4(e))return aE("POST",r?.trim()??"",void 0,aX(e,t),void 0,e.responsePath);if(i5(e))return aE("POST",n?.trim()??"",void 0,void 0!==e.body?ic(e.body,t):void 0,e.headers?ic(e.headers,t):void 0,e.responsePath);if(!i3(e))return aE("GET",`unknown-kind://${i1(e)}`,void 0,e,void 0,e.responsePath);let{interpolated:a}=(i=e,o=t,i2(i)?{interpolated:{endpoint:String(ic(i.endpoint,o)),method:i.method,headers:i.headers?ic(i.headers,o):void 0,body:void 0!==i.body?ic(i.body,o):void 0,query:i.query?ic(a_(i.query,o),o):void 0}}:{interpolated:{endpoint:"",method:"GET"}});return aE(a.method,a.endpoint,a.query,a.body,a.headers,e.responsePath)}(u,m,P.current,L.current),(c=ld({flowType:C.current.flowType}))?`${r}:flowType=${c}`:r),(i=h)?`${n}:trafficSource=${i}`:n),(a=y)?`${o}:presentationUrl=${a}`:o),v=w.current;if(u.cache?.ttlMs?F.current.set(e,b):F.current.delete(e),!t?.force&&v&&u.cache?.ttlMs){let t=v.getEntry(b),r=t?.data;if(void 0!==t&&void 0!==r){if(_.current[e]=r,!j.current)return;null==(l=r)||(Array.isArray(l)?0===l.length:"object"==typeof l&&0===Object.keys(l).length)?g({type:"empty",name:e,data:r,at:t.storedAt}):g({type:"resolved",name:e,data:r,at:t.storedAt});return}}
1let x=ld(C.current),k=await a6(u,m,{signal:f.signal,trustedOrigins:E.current,tenantId:N.current,reportingQueryUrl:P.current,inferenceUrl:L.current,coerceRequestBody:e=>{var t=function(e,t){if(!t||!a7(e))return e;let r=e.body;return null==r?{...e,body:{trafficSource:t}}:"object"!=typeof r||Array.isArray(r)?e:{...e,body:{...r,trafficSource:t}}}(function(e,t){if(!t||!a7(e))return e;let r=e.body;return null==r?{...e,body:{flowType:t}}:"object"!=typeof r||Array.isArray(r)?e:{...e,body:{...r,flowType:t}}}(T.current?.(e)??e,x),h);if(!y||!(a7(t)&&"/v1/offerings/search"===a9(t.endpoint)))return t;let r=t.body;return null==r?{...t,body:{presentationUrl:y}}:"object"!=typeof r||Array.isArray(r)?t:{...t,body:{...r,presentationUrl:y}}},coerceResponse:O.current});if(!j.current||f.signal.aborted)return;"resolved"===k.status||"empty"===k.status?(v&&u.cache?.ttlMs&&v.set(b,k.data,u.cache.ttlMs),_.current[e]=k.data):_.current[e]=void 0;let R=Date.now();switch(k.status){case"resolved":g({type:"resolved",name:e,data:k.data,at:R});break;case"empty":g({type:"empty",name:e,data:k.data,at:R});break;case"error":g({type:"error",name:e,error:k.error??Error(`DataSource "${e}" failed without a cause.`)})}},[]),Y=(0,v.useCallback)(async(e,t)=>{for(let r of e){if(!j.current)return;await D(r,t)}},[D]);(0,v.useEffect)(()=>{j.current=!0;let e=S.current,t=A.current,r=new Map;for(let e of p){let n=m.get(e);r.set(e,void 0!==n?`\u0000missing:${n}`:aN(t[e]))}if(!U.current){U.current=!0,_.current={},F.current.clear(),$.current=r,g({type:"reset",names:p,missingBySource:m}),Y(p);return}let n=$.current,i=new Set(p),o=new Set,a=(t,r)=>{let n=e.get(t);n&&(n.abort(Error(r)),e.delete(t));let i=F.current.get(t);void 0!==i&&(w.current?.delete(i),F.current.delete(t)),delete _.current[t]},l=!1;n.forEach((e,t)=>{i.has(t)||(a(t,"DataSource removed from declarations."),l=!0)});let s=!1;for(let e of p)n.get(e)!==r.get(e)&&(s=!0,a(e,"DataSource declaration changed."),void 0===m.get(e)&&o.add(e));$.current=r,(l||s)&&(g({type:"reconcile",names:p,refetch:o,missingBySource:m}),o.size>0&&Y(p.filter(e=>o.has(e))))},[p,m,Y]),(0,v.useEffect)(()=>{let e=S.current;return()=>{j.current=!1,e.forEach(e=>{e.abort(Error("DataSourceManager unmounted."))}),e.clear(),w.current?.clear(),F.current.clear(),_.current={},$.current=new Map,U.current=!1}},[]);let B=(0,v.useCallback)((e,t)=>{let r=I.current[e];if(x({type:"set",key:e,value:t}),r===t)return;let n={...I.current,[e]:t};I.current=n,R.current=n;let i=function(e,t,r){let n=new Set;for(let i of t){let t=e[i];t&&function(e,t){let r=`formState.${t}`,n=i6(e);return!!n.some(e=>(function e(t,r){return"string"==typeof t?t.includes(r):null!==t&&"object"==typeof t&&(Array.isArray(t)?t.some(t=>e(t,r)):Object.values(t).some(t=>e(t,r)))})(e,r))&&n.some(e=>is(e))}(t,r)&&n.add(i)}let i=new Set(n),o=!0;for(;o;)for(let r of(o=!1,t))if(!i.has(r)){for(let t of e[r]?.dependsOn??[])if(i.has(t)){i.add(r),o=!0;break}}return t.filter(e=>i.has(e))}(A.current,p,e);i.length>0&&Y(i)},[p,Y]),z=(0,v.useCallback)(async(e,t)=>{if(!Object.prototype.hasOwnProperty.call(A.current,e))return;let r=t?.cascade===!0?function(e,t,r){if(!le(e,r))return[];let n=new Set,i=[r];for(;i.length>0;){let t=i.pop();if(void 0===t)break;let r=e[t];for(let t of r?.dependsOn??[])le(e,t)&&(n.has(t)||(n.add(t),i.push(t)))}let o=new Set,a=!0;for(;a;)for(let n of(a=!1,t))if(!(n===r||o.has(n))){for(let t of e[n]?.dependsOn??[])if(t===r||o.has(t)){o.add(n),a=!0;break}}let l=new Set([r]);return n.forEach(e=>{l.add(e)}),o.forEach(e=>{l.add(e)}),t.filter(e=>l.has(e))}(A.current,p,e):[e];if(0!==r.length){if(!(null!=t&&"body"in t))return void await Y(r,{force:!0});for(let n of r){if(!j.current)return;await D(n,{force:!0,...n===e?{body:t.body}:{}})}}},[p,D,Y]),V=(0,v.useCallback)(async()=>{await Y(p,{force:!0})},[p,Y]),H=(0,v.useCallback)(async(e,t)=>{let r=t?.includeDependencies?function(e,t,r){let n=t=>Object.prototype.hasOwnProperty.call(e,t),i=new Set,o=r.filter(n);for(;o.length>0;){let t=o.pop();if(!(void 0===t||i.has(t)))for(let r of(i.add(t),e[t]?.dependsOn??[]))n(r)&&!i.has(r)&&o.push(r)}return 0===i.size?[]:t.filter(e=>i.has(e))}(A.current,p,e):e,n=function(e,t,r){let n=new Set(r.filter(t=>Object.prototype.hasOwnProperty.call(e,t)));if(0===n.size)return[];let i=new Map;for(let r of t){if(!n.has(r))continue;let t=0;for(let n of e[r]?.dependsOn??[]){let e=i.get(n);void 0!==e&&(t=Math.max(t,e+1))}i.set(r,t)}let o=[];for(let e of t){let t=i.get(e);if(void 0===t)continue;let r=o[t];void 0===r?o[t]=[e]:r.push(e)}return o}(A.current,p,r);if(0===n.length)return;let i=t?.concurrency??5,o=Number.isFinite(i)?Math.max(1,Math.trunc(i)):5;for(let e of n){if(!j.current)return;let t=0,r=Array.from({length:Math.min(o,e.length)},async()=>{for(;t<e.length;){let r=e[t];if(t+=1,void 0===r||!j.current)return;await D(r,{force:!0})}});await Promise.all(r)}},[p,D]),q=(0,v.useCallback)(e=>{let t=F.current.get(e);void 0!==t&&(w.current?.delete(t),F.current.delete(e))},[]),G=(0,v.useCallback)(e=>{if(0===e.length)return[];let t=new Set(e);return p.filter(e=>A.current[e]?.tags?.some(e=>t.has(e)))},[p]),W=(0,v.useCallback)(async(e,t)=>{await H(G(e),t)},[G,H]),Q=(0,v.useCallback)(e=>{for(let t of G(e))q(t)},[q,G]);(0,v.useEffect)(()=>{let e=R.current;null!==e&&k.current&&(R.current=null,k.current(e))},[y]);let K=(0,v.useMemo)(()=>({sources:h,formState:y,flowContext:t,getSource:e=>h[e],updateFormState:B,refetchSource:z,refetchAll:V,refetchMany:H,invalidate:q,namesByTags:G,refetchByTags:W,invali
1dateByTags:Q}),[h,y,t,B,z,V,H,q,G,W,Q]);return(0,b.jsx)(ln.Provider,{value:K,children:d})};function ll(){let e=(0,v.useContext)(ln);if(void 0===e)throw Error("useDataSourceManager must be used within a <DataSourceManagerProvider>.");return e}let ls=new Set(["context","formState"]),lc=new Set;function ld(e){let t=e.flowType;return"string"==typeof t&&t.length>0?t:void 0}let lu="11a86905-d823-4fd9-921e-662d9937cb8e",lp=Object.freeze({dispatch(e,t){console.warn(`[binding-enhancer] No ActionDispatcher provided; dropping dispatch("${e}")`,t)},has:()=>!1}),lf=(0,v.createContext)(lp);function lm(){return(0,v.useContext)(lf)}let lh=B.Ik({startDate:B.Yj(),showDateOn:B.Yj(),registerDate:B.Yj()}),lg=B.Ik({primary:B.Yj(),secondary:B.Yj(),cta:B.Yj(),formBackground:B.Yj(),heroGradient:B.Yj()}),ly=B.Ik({address:B.Yj(),address2:B.Yj(),city:B.Yj(),stateId:B.ai(),state:B.Yj(),zipcode:B.Yj()}),lb=B.Ik({title:B.Yj(),description:B.Yj(),icon:B.Yj().optional()}),lv=B.Ik({title:B.Yj(),image:B.Yj(),text:B.Yj().optional(),list:B.YO(B.Ik({text:B.Yj()}))}),lx=B.Ik({voyagerSpotlightSchoolCardHeader:B.Yj(),voyagerSpotlightImage:B.Yj(),header:B.Yj(),blocks:B.YO(lv)}),lw=B.Ik({description:B.Yj(),confirmation:B.Ik({meta:B.Ik({shortIntro:B.Yj().optional(),text:B.Yj().optional(),prepareCard:B.Ik({title:B.Yj(),text:B.Yj()}).optional()})}),snippet:B.Yj(),summary:B.Yj(),tcpa:B.Yj(),valueProps:B.YO(lb),spotlight:lx.optional()}),lS=B.Ik({undergrad:B.YO(lh),grad:B.YO(lh)}),lI=B.Ik({providerProgramIdArray:B.KC([B.YO(B.Yj()),B.Yj()]).transform(e=>Array.isArray(e)?e:e.split(",").map(e=>e.trim()).filter(Boolean)).optional(),tcpa:B.Yj().optional()}),lC=B.Ik({flow:B.Yj(),programFlow:B.YO(lI),formName:B.Yj(),formDatesLabel:B.Yj(),showNextStartDate:B.zM(),showActiveProspectScript:B.zM().optional()}),lj=B.Ik({requiredProgramMetadata:B.YO(B.Ik({name:B.Yj(),type:B.Yj()})).nullable(),metadata:B.bz()}),lk=B.Ik({logo:B.Yj(),hero:B.Yj()}),lA=B.Ik({organizationId:B.ai(),name:B.Yj(),mobiusIdToken:B.Yj(),tcpaSecondParagraph:B.Yj().optional(),slug:B.Yj(),homepage:B.Yj().optional(),tags:B.g1(B.bz()).optional(),themeColors:lg,citationText:B.Yj().optional(),sdbSchoolId:B.Yj(),priority:B.ai(),location:ly,content:lw,formDates:lS,formCustomizations:lC,partnerMetadata:lj,images:lk,additional:B.bz()});B.Ik({schoolIds:B.YO(B.ai()),isPreview:B.zM().optional(),version:B.Yj().optional()});let lE=B.Ik({data:B.YO(lA)});B.Ik({edudirectIds:B.YO(B.ai())});let lN=B.Ik({edudirectId:B.ai(),organizationId:B.Yj()}),lT=B.Ik({data:B.YO(lN)});class lO{constructor(e){this.cache=new Map;const t={baseUrl:"",defaultHeaders:{},cache:new Map,newRelic:{noticeError:(e,t)=>{console.error("Error in OrganizationServiceApiClient: noticeError",e,t)}},strictValidation:!1};this.config={...t,...e},this.cache=this.config.cache??new Map}getApiName(){return"organization-service"}async post(e,t,r={cacheEnabled:!1}){let n=JSON.stringify(t),i=`${this.config.baseUrl}${e}`;if(r.bustCache&&this.bustCache(i),this.shouldUseCache(i,r)){let e=this.cache.get(i);if(e)return e.clone()}let o=await fetch(`${this.config.baseUrl}${e}`,{method:"POST",body:n,...r,headers:{"Content-Type":"application/json",...r.headers}});return r.cacheEnabled&&o.ok&&this.cache.set(i,o.clone()),o}bustCache(e){this.cache.delete(e)}shouldUseCache(e,t){return!!t.cacheEnabled&&this.cache.has(e)}hasError(e){return e.status>=400}async toJson(e,t){let r=await e.json(),n=t.safeParse(r);if(!n.success){let e=Error(`Invalid response for ${this.getApiName()}`);if(console.error(e),console.log(this.buildErrorMessage(n.error.errors)),this.config.strictValidation)throw e;return r}return n.data}buildErrorMessage(e){return e.map(e=>`Path: ${e.path.join(".")}, Message: ${e.message}`)}async postMarketingLookup(e,t,r={cacheEnabled:!1}){let n={};t&&(n["User-Agent"]=t);let i=await this.post("/v1/marketing/lookup",e,{...r,headers:{...r.headers,...n}});return this.hasError(i)&&console.error(`Failed to request marketing lookup for schools: ${e.schoolIds.join(", ")}`),await this.toJson(i,lE)}async resolveExternalIds(e,t={cacheEnabled:!1}){let r=await this.post("/v1/organizations/resolve-edudirect-ids",e,t);return this.hasError(r)&&console.error(`Failed to resolve external ids: ${e.edudirectIds.join(", ")}`),this.toJson(r,lT)}}let lP=new Map,lL=new Map,lM=async(e,t)=>{let r=Array.from(new Set(e)).filter(e=>Number.isFinite(e));if(!r.length||!t)return[];let n=r.filter(e=>!lL.has(e));if(n.length)try{let e,{data:r}=await (!(e=lP.get(t))&&(e=new lO({baseUrl:t}
1),lP.set(t,e)),e).resolveExternalIds({edudirectIds:n});for(let e of r)lL.set(e.edudirectId,e.organizationId)}catch(e){return console.error("Failed to resolve organization ids:",e),[]}let i=[];for(let e of r){let t=lL.get(e);t&&!i.includes(t)&&i.push(t)}return i},lR=(e=1)=>{let[t,r]=(0,v.useState)([]),[n,i]=(0,v.useState)([]),o=(0,v.useRef)(null),a=(0,v.useRef)(!1),l=(0,v.useCallback)(()=>{a.current=!0,o.current&&(o.current.disconnect(),o.current=null)},[]);return(0,v.useEffect)(()=>{if(a.current||(o.current&&(o.current.disconnect(),o.current=null),0===n.length))return;let t=(n[0]?.ownerDocument?.defaultView??window).IntersectionObserver??window.IntersectionObserver;if("function"==typeof t)return o.current=new t(e=>r(e),{root:null,rootMargin:"0px",threshold:e}),n.forEach(e=>o.current?.observe(e)),()=>o.current?.disconnect()},[n,e]),{setNodes:i,entries:t,disconnect:l}},lF=new Set,lU=(e,t)=>{let r=t.flowId??t.dslConfigId??"-",n=t.stepId??"-",i=`entryPoint:${e}:${r}:${n}`;return t.flowSessionId?`${i}:${t.flowSessionId}`:i},l$=e=>{lF.add(e)},l_=({sessionId:e,configId:t,stepIndex:r,nodeId:n})=>`${e??"no-session"}::${t??"no-cfg"}::${r??"no-idx"}::${n}`,lD=(0,v.createContext)(void 0),lY=({dslConfigId:e,pageCategory:t,children:r})=>{let n=aC(),i=aw(),o=n?.eventContext,a=n?.flowSessionId,l=(0,v.useMemo)(()=>({page:o??{},dedupScope:{sessionId:a??"",configId:e??""},policy:"flow-defaults"}),[o,a,e]),s=(0,v.useMemo)(()=>(({currentStep:e,currentStepIndex:t,dslConfigId:r,pageCategory:n})=>({stepId:e?.id??"",stepIndex:"number"==typeof t?t:0,stepType:e?.type??"",dslConfigId:r,pageCategory:n??"dexp-step"}))({currentStep:n?.currentStep,currentStepIndex:n?.currentStepIndex,dslConfigId:e,pageCategory:t}),[n?.currentStep,n?.currentStepIndex,e,t]),{triggerElementLoadedEvent:c,triggerProductLoadedEvent:d,triggerStepElementLoadedEvent:u,triggerStepElementViewedEvent:p,triggerElementViewedEvent:f,triggerElementClickedEvent:m,triggerProductClickedEvent:h,triggerProductViewedEvent:g,triggerFieldEvents:y,triggerFormStartedEvent:x,triggerFormContinuedEvent:w,triggerFormViewedEvent:S,triggerFormEvents:I}=i,C=(0,v.useMemo)(()=>({triggerElementLoadedEvent:c,triggerProductLoadedEvent:d,triggerStepElementLoadedEvent:u,triggerStepElementViewedEvent:p,triggerElementViewedEvent:f,triggerElementClickedEvent:m,triggerProductClickedEvent:h,triggerProductViewedEvent:g,triggerFieldEvents:y,triggerFormStartedEvent:x,triggerFormContinuedEvent:w,triggerFormViewedEvent:S,triggerFormEvents:I}),[c,d,u,p,f,m,h,g,y,x,w,S,I]),j=n?.currentStep?.dslConfig?.data?.content,k=(0,v.useMemo)(()=>(function e(t){if(Array.isArray(t)){for(let r of t)if(e(r))return!0;return!1}if(!nJ(t))return!1;if("product"===function(e){let t=e.props??{},r=t[nQ];if("object"==typeof r&&null!==r&&!Array.isArray(r)&&"string"==typeof r.kind)return r.kind;let n=t[nK];if("string"==typeof n)return n;let i=e.type;if("string"==typeof i)return nW[i]?.kind}(t))return!0;for(let r of Object.values(t.props??{}))if((Array.isArray(r)||nJ(r))&&e(r))return!0;return!1})(j),[j]),A=(0,v.useMemo)(()=>(function(e){let t=[];if(!function e(t,r){if(Array.isArray(t)){for(let n of t)e(n,r);return}if(n4(t)){if("field"===function(e){let t=e.props??{},r=t[nX];if(n5(r)&&"string"==typeof r.kind)return r.kind;let n=t[nZ];if("string"==typeof n)return n;let i=e.type;if("string"==typeof i)return nW[i]?.kind}(t)){let e=function(e){let t=e.props??{},r=t[nX],n=n5(r)?n3(r.fieldName,r.leadFieldAssociated):void 0,i=n3(n,t[n0],t[n1],t[eh],t.name);if(i)return i;let o=n5(r)?r.fieldType:void 0,a="string"==typeof e.type?e.type:void 0,l=a?nW[a]?.fieldType:void 0,s=n3(o,t[n2],l,a);return s?s.toLowerCase():void 0}(t);e&&r.push(e)}for(let n of Object.values(t.props??{}))(Array.isArray(n)||n4(n))&&e(n,r)}}(e,t),0===t.length)return[];let r=[],n=new Set;for(let e of t)n.has(e)||(n.add(e),r.push(e));let i=Array.from(new Set(r.map(e=>e.toLowerCase()))).sort((e,t)=>e.localeCompare(t));return[{key:"fieldCount",value:String(r.length)},{key:"fieldNames",value:r.join(",")},{key:"fieldSet",value:i.join("_")}]})(j),[j]),E=(0,v.useMemo)(()=>{let e=n?.currentStep?.dslConfig;if(e)return nq(e.data)},[n?.currentStep]),N=E?.productFields,T=E?.customDimensions,{setEntryRootNode:O}=(e=>{let{eventContext:t,currentStep:r,triggers:n,dslConfigId:i,flowSessionId:o,contentEmitsProducts:a,entryFieldDimensions:l,productFields:s,customDimensionMappings:c,flowState:d,steps:u}=e,p=void 0!==r&&void 0!==t,f=r?.isEntry===!0,m=!0!==a,h=(0,v.useRef)({productFields:s,customDimensionMappings:c,flowState:d,steps:u,currentStep:r});h.current={productFields:s,customDimensionMappings:c,flowState:d,steps:u,currentStep:r};let g=e=>{let t=h.current,r=nR(t.steps??[])?.subjectLabelFallback,n=iS(t.flowState,t.steps,t.currentStep,{subjectLabelFallback:r}),i=im({map:t.productFields,root:n}),o=ih(t.customDimensionMappings,n);if(e||i||0!==o.length)return{...e,...i?{product:i}:{},...o.length>0?{mappedCustomDimensions:o}:{}}},y=(0,v.useMemo)(()=>
1{if(!l||0===l.length)return;let e=new Map;for(let r of[...t?.customDimensions??[],...l])e.set(r.key,r);return{customDimensions:Array.from(e.values())}},[t?.customDimensions,l]),b=r?.flowId,x=r?.id;(0,v.useEffect)(()=>{if(!p)return;let e={flowSessionId:o,flowId:b,dslConfigId:i,stepId:x};if(f){let t=lU("ElementLoaded",e);if(lF.has(t)||(l$(t),n.triggerElementLoadedEvent()),m){let t=lU("ProductLoaded",e);lF.has(t)||(l$(t),n.triggerProductLoadedEvent(g(y)))}}else{let t=lU("ElementLoaded",e);lF.has(t)||(l$(t),n.triggerStepElementLoadedEvent())}},[p,f,m,y,b,x,i,o,n]);let[w,S]=(0,v.useState)(null),I=(0,v.useRef)(null),C=(0,v.useCallback)(e=>{e!==I.current&&(I.current=e,S(e))},[]),{setNodes:j,entries:k,disconnect:A}=lR();return(0,v.useEffect)(()=>{p&&j(w?[w]:[])},[p,w,j]),(0,v.useEffect)(()=>{if(!p||0===k.length||!k.find(e=>e.isIntersecting))return;A();let e={flowSessionId:o,flowId:b,dslConfigId:i,stepId:x};if(f){if(m){let t=lU("ProductViewed",e);lF.has(t)||(l$(t),n.triggerProductViewedEvent(g(y)))}let t=lU("FormViewed",e);lF.has(t)||(l$(t),n.triggerFormViewedEvent())}else{let t=lU("ElementViewed",e);lF.has(t)||(l$(t),n.triggerStepElementViewedEvent())}},[p,f,m,y,k,A,b,x,i,o,n]),{setEntryRootNode:C}})({eventContext:o,currentStep:n?.currentStep,triggers:C,dslConfigId:e,flowSessionId:a,contentEmitsProducts:k,entryFieldDimensions:A,productFields:N,customDimensionMappings:T,flowState:n?.flowState,steps:n?.steps}),{fireForwardStepClick:P}=(e=>{let{eventContext:t,currentStep:r,currentStepIndex:n,triggers:i,forwardStepEventFirerRef:o,formStartedFiredRef:a}=e,l=(0,v.useRef)(!1),s=a??l,c=(0,v.useCallback)(e=>{!t||!r||(r.isEntry&&!s.current?(i.triggerFormStartedEvent(t),i.triggerProductClickedEvent({...t,outboundUrl:e.outboundUrl,...e.productOverride?{product:{...e.productOverride}}:{},...e.dcs?{dcs:e.dcs}:{},actionOutcome:e.actionOutcome,customDimensions:[...t.customDimensions||[],{key:"ctaText",value:e.ctaText}],...e.mappedCustomDimensions&&e.mappedCustomDimensions.length>0?{mappedCustomDimensions:[...e.mappedCustomDimensions]}:{}}),(e.isExitingStepWithRedirect||!e.isLastStep)&&(e.isResultsLanding?i.triggerFormEvents("FormSubmitted",{...t,currentStep:r,currentStepIndex:n,field:e.field.length>0?[...e.field]:void 0,outboundUrl:e.outboundUrl}):i.triggerFormContinuedEvent({...t,currentStep:r,currentStepIndex:n,field:e.field.length>0?[...e.field]:void 0})),s.current=!0):e.isLastStep||e.isExitingStepWithRedirect||i.triggerFormContinuedEvent({...t,currentStep:r,currentStepIndex:n,field:e.field.length>0?[...e.field]:void 0}))},[t,r,n,i]);return(0,v.useEffect)(()=>{if(o)return o.current=c,()=>{o.current===c&&(o.current=null)}},[o,c]),{fireForwardStepClick:c}})({eventContext:o,currentStep:n?.currentStep,currentStepIndex:n?.currentStepIndex,triggers:C,forwardStepEventFirerRef:n?.forwardStepEventFirerRef,formStartedFiredRef:n?.formStartedFiredRef}),L=(0,v.useMemo)(()=>({elementLoadedCorrelationId:o?.elementLoadedCorrelationId,viewCorrelationId:o?.viewCorrelationId,formViewedCorrelationId:o?.formViewedCorrelationId}),[o?.elementLoadedCorrelationId,o?.viewCorrelationId,o?.formViewedCorrelationId]);return(0,b.jsx)(lB,{host:l,eventContext:o,stepCorrelation:s,triggers:C,entryPointCorrelation:L,flowSessionId:a,setEntryRootNode:O,fireForwardStepClick:P,productFields:N,customDimensionMappings:T,children:r})},lB=({children:e,host:t,eventContext:r,stepCorrelation:n,triggers:i,entryPointCorrelation:o,flowSessionId:a,setEntryRootNode:l,fireForwardStepClick:s,productFields:c,customDimensionMappings:d})=>{let u=(0,v.useMemo)(()=>e=>l_({sessionId:a,configId:n.dslConfigId,stepIndex:n.stepIndex,nodeId:e}),[a,n.dslConfigId,n.stepIndex]),p=(0,v.useMemo)(()=>({host:t,eventContext:r,stepCorrelation:n,triggers:i,entryPointCorrelation:o,flowSessionId:a,composeDedupKey:u,setEntryRootNode:l,fireForwardStepClick:s,productFields:c,customDimensionMappings:d}),[t,r,n,i,o,a,u,l,s,c,d]);return(0,b.jsx)(lD.Provider,{value:p,children:e})},lz=()=>(0,v.useContext)(lD);function lV({minItems:e,maxItems:t}={}){let r=Math.max(1,e??2),n=Math.max(t??3,r);return{minItems:r,maxItems:n}}function lH(e){var t,r;if(!e||"object"!=typeof e)return{};let n={};lG(e.tcpa)&&(n.tcpa=e.tcpa),lG(e.tcpaSecondParagraph)&&(n.tcpaSecondParagraph=e.tcpaSecondParagraph);let i=Array.isArray(t=e.valueProps)?t.filter(e=>e&&lG(e.title)).map(e=>
1({title:e.title,description:e.description??"",icon:e.icon??""})):[];i.length>0&&(n.valueProps=i);let o=Array.isArray(r=e.programFlow)?r.map(e=>{let t={};if(lG(e.providerProgramIdArray)){let r=e.providerProgramIdArray.split(",").map(e=>e.trim()).filter(e=>e.length>0);r.length>0&&(t.providerProgramIdArray=r)}return lG(e.tcpa)&&(t.tcpa=e.tcpa),t}).filter(e=>Object.keys(e).length>0):[];o.length>0&&(n.programFlow=o);let a=function(e){if(!e)return;let t=e.undergrad?.[0]??e.grad?.[0];if(t&&lG(t.startDate))return{startDate:t.startDate}}(e.formDates);a&&(n.programDates=a);let l=e.confirmation?.shortIntroText;lG(l)&&(n.confirmationShortIntroText=l);let s=e.confirmation?.text;lG(s)&&(n.confirmationText=s);let c=function(e){if(!e||"object"!=typeof e)return;let t=Array.isArray(e.blocks)?e.blocks.map(e=>{let t=Array.isArray(e.list)?e.list.map(e=>e?.text).filter(e=>lG(e)).map(e=>({text:e})):[];return{...lG(e.title)?{title:e.title}:{},...lG(e.image)?{image:e.image}:{},...t.length>0?{list:t}:{}}}).filter(e=>Object.keys(e).length>0):void 0,r=lG(e.header);if(r||t&&0!==t.length)return{...r?{header:e.header}:{},...t&&t.length>0?{blocks:t}:{}}}(e.spotlight);return c&&(n.spotlight=c),n}function lq(e){if(!e||"object"!=typeof e)return;if("data"in e&&e.data&&"object"==typeof e.data&&!Array.isArray(e.organizations))return lq(e.data);let t=e.organizations;if(Array.isArray(t)){let e=t[0];return e&&"object"==typeof e?e:void 0}return e}function lG(e){return"string"==typeof e&&e.trim().length>0}async function lW(e,t={}){let r,n=e.trim();if(!n)return null;let i=t.apiConfig??Y();try{r=iG("offeringsService",`/v1/offerings/${encodeURIComponent(n)}`,"GET",i)}catch{return null}let o=t.fetchImpl??globalThis.fetch;try{let e=await o(r,{method:"GET",headers:{Accept:"application/json"},signal:t.signal});if(!e.ok)return null;let n=await e.json(),i=lq(n);return lH(i)}catch{return null}}function lQ(e){let t=e.offeringUuid?.trim();if(t)return t;let r=e.offeringId?.trim();if(r)return r}let lK=(0,v.createContext)(void 0),lJ=({children:e,minPrograms:t,maxPrograms:r,onAdd:n,onRemove:i,dslConfigId:o})=>{let a,l,s,[c,d]=(0,v.useState)([]),[u,p]=(0,v.useState)(!1),[f,m]=(0,v.useState)(!0),{minItems:h,maxItems:g}=lV({minItems:t,maxItems:r}),y=(0,v.useRef)(c);y.current=c;let x=(0,v.useRef)(n);x.current=n;let w=(0,v.useRef)(i);w.current=i;let S=(0,v.useCallback)(e=>!(y.current.length>=g||y.current.some(t=>t.programId===e.programId))&&(d(t=>[...t,e]),x.current?.(e),!0),[g]),I=(0,v.useCallback)(e=>{y.current.some(t=>t.programId===e)&&(d(t=>t.filter(t=>t.programId!==e)),w.current?.(e))},[]),C=(0,v.useCallback)((e,t)=>{y.current.some(t=>t.programId===e)&&d(r=>r.map(r=>r.programId===e?{...r,...t}:r))},[]),j=(0,v.useCallback)(()=>{d([])},[]),k=(0,v.useCallback)(e=>{p(e)},[]),A=(0,v.useCallback)(e=>{m(e)},[]),E=(0,v.useCallback)(e=>c.some(t=>t.programId===e),[c]),N=(0,v.useCallback)(e=>y.current.some(t=>t.programId===e.programId)?(I(e.programId),!1):S(e),[S,I]);(0,v.useEffect)(()=>{y.current.length<=g||d(e=>e.slice(0,g))},[g]),a=ri().api,l=(0,v.useRef)(new Map),s=(0,v.useRef)(new Set),(0,v.useEffect)(()=>{let e=new Set(c.map(e=>e.programId));for(let t of(Array.from(l.current.entries()).forEach(([t,r])=>{e.has(t)||(r.abort(),l.current.delete(t),s.current.delete(t))}),c)){if(!(!t.tcpa?.trim()&&lQ(t))){s.current.add(t.programId);continue}if(s.current.has(t.programId)||l.current.has(t.programId))continue;let e=lQ(t);if(!e){s.current.add(t.programId);continue}let r=new AbortController;l.current.set(t.programId,r);let n=t.programId;lW(e,{signal:r.signal,apiConfig:a}).then(e=>{r.signal.aborted||null!==e&&(Object.keys(e).length>0&&C(n,e),s.current.add(n))}).finally(()=>{l.current.delete(n)})}},[c,C,a]),(0,v.useEffect)(()=>()=>{Array.from(l.current.values()).forEach(e=>{e.abort()}),l.current.clear(),s.current.clear()},[]);let T=(0,v.useMemo)(()=>{let e=c.map(e=>e.programId),t={};for(let r of e)t[r]=!0;return{selectedIds:e,selectedIdsMap:t,count:e.length,minItems:h,maxItems:g,hasMetMin:e.length>=h,hasReachedMax:e.length>=g}},[c,h,g]),O=c.length<g,P=(0,v.useMemo)(()=>({snapshot:T,minItems:h,maxItems:g,hasMetMin:T.hasMetMin,hasReachedMax:T.hasReachedMax,togglePrograms:N,clear:j,programsToCompare:c,isComparisonModalOpen:u,isBannerVisible:f,addProgramToCompare:S,removeProgramFromCompare:I,patchProgramInCompare:C,clearProgramsToCompare:j,toggleComparisonModal:k,setBannerVisible:A,canAddMorePrograms:O,isProgramSelected:E,dslConfigId:o}),[T,o,h,g,N,c,u,f,S,I,C,j,k,A,O,E]);return(0,b.jsx)(lK.Provider,{value:P,children:e})},lX=()=>{let e=(0,v.useContext)(lK);if(void 0===e)throw Error("useComparison must be used within a ComparisonProvider");return e},lZ=()=>(0,v.useContext)(lK),l0=Object.freeze({});var l1=((m={}).INFO="info",m.WARNING="warning",m);let l2=(0,v.createContext)(void 0),l4=(0,v.createContext)(void 0),l5={isPopupOpen:!1,setPopupOpen:()=>{}},l3=({config:e,children:t})=>{let r=(0,v.useMemo)(()=>l7(e??l0),[e]),[n,i]=(0,v.useState)(!1),o=(0,v.useCallback)(e=>{i(e)},[]),a=(0,v.useMemo)(()=>({isPopupOpen:n,setPopupOpen:o}),[n,o]);return(0,b.jsx)(l2.Provider,{value:r,children:(0,b.jsx)(l4.Provider,{value:a,children:t})})};function l6(){return(0,v.useContext)(l4)??l5}function l8(){let e=(0,v.useContext)(l2);return e||se}function l9(){return(0,v.useContext)(l2)}function l7(e){let t=e.recommender?.modal,r=e.spotlight?.modal,n=e.comparison,i=e.loading,{minItems:o,maxItems:a}=lV({minItems:n?.minSelection,maxItems:n?.maxSelection}),l=e.submissions;return{config:e,shouldShowLoadingInterstitial:i?.enabled===!0,shouldShowRecommenderModal:t?.enabled===!0,shouldShowSpotlightModal:r?.enabled===!0,shouldShowComparison:e.comparison?.enabled===!0,shouldShowSubmissions:l?.enabled===!0,comparisonMinSelection:o,comparisonMaxSelection:a,getRecommenderModalCopy:()=>({title:t?.title,subtitle:t?.subtitle,disclosureTitle:t?.disclosureTitle,disclosureContent:t?.disclosureContent}),getSpotlightModalCopy:()=>
1({title:r?.title,subtitle:r?.subtitle,disclosureTitle:r?.disclosureTitle,disclosureContent:r?.disclosureContent}),getLoadingCopy:()=>({title:i?.title??nm,statusLabel:i?.statusLabel??nh,steps:i?.steps&&i.steps.length>0?i.steps:ng}),getComparisonCopy:()=>({bannerText:n?.bannerText,ctaText:n?.ctaText,heading:n?.heading,logo:n?.logo,title:n?.title,subtitle:n?.subtitle,buttonText:n?.buttonText,placeholderText:n?.placeholderText}),getComparisonBounds:()=>({minItems:o,maxItems:a}),getComparisonConfig:()=>n,getSubmissionsCopy:()=>({title:l?.title,subtitle:l?.subtitle})}}let se=l7(l0);var st=((h={}).PENDING="PENDING",h.SUBMITTED="SUBMITTED",h.SUBMITTING="SUBMITTING",h.ERROR="ERROR",h.UNQUALIFIED="UNQUALIFIED",h);function sr(e){return{...e.partnerIdentifiers??{},...e.referenceId?{referenceId:e.referenceId}:{}}}let sn=(0,v.createContext)(void 0),si=({children:e})=>{let[t,r]=(0,v.useState)([]),n=(0,v.useCallback)(e=>{r(t=>t.some(t=>t.programId===e.programId)?t:[...t,e])},[]),i=(0,v.useCallback)(e=>t.some(t=>t.programId===e),[t]),o=(0,v.useCallback)(e=>t.some(t=>t.schoolId===e),[t]),a=(0,v.useCallback)(e=>t.find(t=>t.schoolId===e),[t]),l=(0,v.useMemo)(()=>t.map(e=>({programId:e.programId,schoolId:e.schoolId})),[t]),s=(0,v.useMemo)(()=>{let e=t.map(e=>e.programId);return{programIds:e,schoolIds:t.map(e=>e.schoolId),count:e.length}},[t]),c=(0,v.useMemo)(()=>({snapshot:s,trackSubmission:n,isProgramSubmitted:i,hasSchoolSubmitted:o,getSubmittedForSchool:a,submittedResults:l,submittedResultsFull:t}),[s,n,i,o,a,l,t]);return(0,b.jsx)(sn.Provider,{value:c,children:e})},so=()=>(0,v.useContext)(sn);class sa extends v.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){ne(e,{source:"LeadFlowDrawerBoundary",componentStack:t.componentStack??""}),this.props.onError?.(e,t)}render(){return this.state.hasError?null:this.props.children}constructor(...e){super(...e),this.state={hasError:!1}}}let sl=({result:e,otherPrograms:t,isLoading:r=!1,onClose:n,onViewNextSteps:i})=>e?(0,b.jsx)(aj.Modal,{open:!0,onOpenChange:e=>{e||n()},children:(0,b.jsxs)(aj.Modal.Content,{size:"md",className:"overflow-y-auto",children:[(0,b.jsx)(aj.Modal.Header,{className:"sr-only",children:(0,b.jsx)(aj.Modal.Title,{children:"You already requested info from this school"})}),(0,b.jsxs)(aj.Flex,{align:"center",gap:"lg",className:"bg-primary-100 px-lg py-2xl",children:[e.imageURL&&(0,b.jsx)(aj.LogoBox,{src:e.imageURL,alt:e.schoolName}),(0,b.jsx)(aj.Flex,{asChild:!0,gap:"xs",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aj.Heading,{variant:"h3",align:"center",children:"Youâve already requested info from this school."}),(0,b.jsx)(aj.Text,{variant:"b4",align:"center",children:"You requested information about:"}),(0,b.jsx)(aj.Text,{variant:"b4",weight:"bold",color:"heading",align:"center",children:e.programName})]})}),(0,b.jsx)(aj.Flex,{asChild:!0,gap:"xxs",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aj.Text,{variant:"b4",weight:"bold",color:"heading",align:"center",children:e.schoolName}),(0,b.jsx)(aj.Text,{variant:"b4",align:"center",children:"has many programs you might be interested in!"}),(0,b.jsx)(aj.Text,{variant:"b4",align:"center",children:"Chat through your options with your advisors."})]})}),(0,b.jsx)(aj.Flex,{asChild:!0,width:"full",gap:"sm",className:"rounded-sm bg-white px-sm py-lg",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aj.Heading,{variant:"h6",children:"Other programs available:"}),r?(0,b.jsxs)(aj.Flex,{direction:"row",align:"center",gap:"xs",children:[(0,b.jsx)(aj.Spinner,{label:"Loading more programs"}),(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:"Searching for more programs..."})]}):t.length>0?(0,b.jsx)(aj.List,{bulletStyle:"check",className:"max-h-40 overflow-y-auto",children:t.map((e,t)=>(0,b.jsx)(aj.ListItem,{children:(0,b.jsx)(aj.Text,{variant:"b4",children:e.programName})},`${e.programId}-${t}`))}):(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:"Weâll share more options soon."})]})}),(0,b.jsx)(aj.Button,{type:"button",variant:"primaryFill",size:"lg",className:"w-full",onClick:()=>{i()},children:"View next steps"})]})]})}):null;var ss=((g={}).PII_CONFIRMATION="PII_CONFIRMATION",g.EXIT_STRATEGY="EXIT_STRATEGY",g.ADDITIONAL_QUESTIONS="ADDITIONAL_QUESTIONS",g);let sc=(...e)=>e.filter(Boolean).join(" "),sd=({html:e,variant:t="b4",color:r,align:n,weight:i,className:o})=>{let a=(0,v.useMemo)(()=>k(e),[e]);return null==a?null:(0,b.jsx)(aj.Text,{tag:"div",variant:t,color:r,align:n,weight:i,className:sc("prose-links [&_a]:text-primary-700","[&_p]:mb-sm [&_p:last-child]:mb-0 [&_h1]:font-heading [&_h1]:font-bold [&_h1]:text-h1 [&_h1]:mb-xs [&_h2]:font-heading [&_h2]:font-bold [&_h2]:text-h2 [&_h2]:mb-xs [&_h3]:font-heading [&_h3]:font-bold [&_h3]:text-h3 [&_h3]:mb-xxs [&_h4]:font-heading [&_h4]:font-bold [&_h4]:text-h4 [&_h4]:mb-xxs [&_h5]:font-heading [&_h5]:font-bold [&_h5]:text-h5 [&_h5]:mb-xxs [&_h6]:font-heading [&_h6]:font-bold [&_h6]:text-h6 [&_h6]:mb-xxs [&_h2:not(:first-child)]:mt-sm [&_h3:not(:first-child)]:mt-sm [&_h4:not(:first-child)]:mt-sm [&_strong]:font-bold [&_b]:font-bold [&_em]:italic [&_ul]:mb-sm [&_ul]:flex [&_ul]:list-disc [&_ul]:flex-col [&_ul]:gap-xs [&_ul]:pl-6 [&_ol]:mb-sm [&_ol]:flex [&_ol]:list-decimal [&_ol]:flex-col [&_ol]:gap-xs [&_ol]:pl-6 [&_li]:text-inherit [&_blockquote]:border-l-2 [&_blockquote]:border-neutral-200 [&_blockquote]:pl-md",o??""),children:a})},su=({schoolId:e="",tcpa:t,programFlow:r})=>{if(!t&&!r)return null;let n=r?.find(t=>t.providerProgramIdArray?.includes(e)),i=n?.tcpa??t,o=i?i.replace(/(submit|get) info|
1send your request/gi,"Learn More"):"";return(0,b.jsx)(aj.Text,{tag:"span",variant:"l2",weight:"regular",color:"subtext",children:(0,b.jsx)("span",{dangerouslySetInnerHTML:{__html:o}})})},sp=({tcpa:e,title:t="Terms and Conditions",schoolId:r="",schoolName:n="",tcpaSecondParagraph:i,providerName:o,programFlow:a})=>{let l=aC(),[s,c]=(0,v.useState)(!0),d=l?.flowState?.hasGivenThirdPartySharingConsent?.option,u=Array.isArray(d)?d[0]?.value:d?.value,p="boolean"==typeof u?u:"true"===u||"false"!==u&&void 0,f=(0,v.useCallback)(e=>{l?.updateFlowState&&l.updateFlowState("hasGivenThirdPartySharingConsent",{option:{optionId:"hasGivenThirdPartySharingConsent",text:e?"true":"false",value:e,leadFieldAssociated:"hasGivenThirdPartySharingConsent"},leadFieldAssociated:"hasGivenThirdPartySharingConsent"})},[l]);if((0,v.useEffect)(()=>{void 0===p?(f(!0),c(!0)):c(p)},[p,f,l]),!e||!e.length)return(0,b.jsx)(b.Fragment,{});let m="subtext",h=i&&n.includes("Syracuse")?i.split("\n")[0]:i;return(0,b.jsxs)(aj.Section,{as:"section",padding:"none",className:"gap-0","data-tf-element-role":"consent-language",children:[t&&(0,b.jsx)(aj.Text,{tag:"div",variant:"l1",weight:"bold",color:m,className:"mb-xxs",children:t}),(0,b.jsxs)(aj.Text,{tag:"div",variant:"l2",color:m,className:"mb-md",children:[(0,b.jsxs)(aj.Text,{tag:"span",variant:"l1",weight:"bold",className:"font-bold","data-tf-element-role":"consent-advertiser-name",children:[n,":"]})," ","\xa0",(0,b.jsxs)(aj.Label,{htmlFor:"leadid_tcpa_disclosure",variant:"subtext",className:"font-normal","data-tf-element-role":"consent-language",children:[(0,b.jsx)("input",{type:"hidden",id:"leadid_tcpa_disclosure"}),(0,b.jsx)(su,{schoolId:r,tcpa:e,programFlow:a})]}),h&&(0,b.jsx)("span",{className:"mt-xxs block",dangerouslySetInnerHTML:{__html:h}}),"TwoU"===o&&(0,b.jsx)(aj.Checkbox,{id:"hasGivenThirdPartySharingConsent",className:"mt-xs",checked:s,onCheckedChange:e=>{var t;c(t=!0===e),f(t)},"data-tf-element-role":"consent-language",label:(0,b.jsx)(aj.Text,{tag:"span",weight:"bold",children:"Please contact me about these educational programs."})})]})]})};function sf(e){let t=e.replace(/\D/g,"").slice(0,10);return 0===t.length?"":t.length<4?`(${t}`:t.length<7?`(${t.slice(0,3)}) ${t.slice(3)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`}let sm=({eventContext:e,listId:t,presets:r,location:n,productClickedCorrelationId:i,viewCorrelationId:o,brand:a,position:l,capId:s,programId:c,outboundUrl:d,isProgramSubmitted:u,isUserRequested:p,dslConfigId:f})=>{let m,h=null!=r?{degree:r.degree??e.dcs?.degree??"",category:r.category??e.dcs?.category??"",subject:r.subject??e.dcs?.subject??""}:e.dcs;return{...e,dcs:h,formatType:"dexp-offering",formatSubtype:(m=e.currentStep,m?.resultType?`dexp-${m.resultType.replace(/_/g,"-").toLowerCase()}`:m?.componentType?`dexp-${m.componentType.replace(/_/g,"-").toLowerCase()}`:"dexp-results"),formName:"dexp-hosted-lead-form",stepName:"pii-confirmation",location:n||U.CONVERSION_DRAWER,stepType:"LEAD",listId:t,customDimensions:[{key:"sourceCorrelationId",value:e.formViewedCorrelationId||""},{key:"isUserRequested",value:String(p)},{key:"flowId",value:e.currentStep?.flowId||""},{key:"resultsSource",value:"/v1/offerings/search/match"}],presets:r?{degree:r.degree??void 0,category:r.category??void 0,subject:r.subject??void 0}:void 0,productClickedCorrelationId:i||A(),viewCorrelationId:o,brand:a,position:l,sku:s?String(s):void 0,productId:c?String(c):void 0,outboundUrl:d,actionOutcome:u?"application":"explore",...f?{dslConfigId:f}:{}}},sh=e=>{let{setNodes:t,entries:r}=lR(),n=(0,v.useRef)(null);return(0,v.useEffect)(()=>{n.current&&(t([n.current]),r?.forEach(r=>{r?.isIntersecting&&(e.forEach(e=>{let{name:t,payload:r}=e;ax(t,r&&"object"==typeof r&&!Array.isArray(r)?r:{})}),t([]))}))},[r?.[0]?.isIntersecting]),{ref:n}},sg=({eventContext:e,productClickedCorrelationId:t,dslConfigId:r})=>({...e,productClickedCorrelationId:t,formName:"dexp-hosted-lead-form-additional",stepName:"additional-questions",...r?{dslConfigId:r}:{}}),sy=({eventContext:e,productClickedCorrelationId:t,elementType:r,name:n,location:i,text:o,dslConfigId:a,outboundUrl:l,fieldMap:s})=>{let c=[];a&&c.push({key:"dslConfigId",value:a});let d=r6(l,s);return d&&c.push({key:"outboundUrl",value:d}),{...e,correlationId:t,productClickedCorrelationId:t,elementType:r,name:n,location:i,htmlId:e.currentStep?.flowId,text:o??"",...c.length>0?{customDimensions:c}:{}}},sb=(e,t)=>
1{let{eventContext:r}=aC(),{triggerFieldEvents:n}=aw(),i=sm({eventContext:r,productClickedCorrelationId:e,dslConfigId:t}),o=sg({eventContext:r,productClickedCorrelationId:e,dslConfigId:t}),a=(0,v.useRef)({});return{sendDebouncedFieldEvent:(0,v.useCallback)((e,t,r,l)=>{a.current[e]&&clearTimeout(a.current[e]),a.current[e]=setTimeout(()=>{n("FieldInputted",{...l?o:i,fieldValue:rh(e)?"SANITIZED":r||"",fieldName:e,fieldType:t}),delete a.current[e]},2e3)},[r,n,o,i])}},sv=({message:e,className:t=""})=>(0,b.jsxs)("div",{role:"alert",className:`flex items-center gap-1 text-sm text-error-500 ${t}`,children:[(0,b.jsx)(aj.Icon,{icon:"circle-alert",size:"sm","aria-hidden":!0}),(0,b.jsx)(aj.Text,{variant:"b5",tag:"span",children:e})]}),sx=[{fieldName:"first-name",fieldType:"text",fieldLabel:"First Name",fieldId:"first-name"},{fieldName:"last-name",fieldType:"text",fieldLabel:"Last Name",fieldId:"last-name"},{fieldName:"email",fieldType:"email",fieldLabel:"Email",fieldId:"email"},{fieldName:"phone",fieldType:"text",fieldLabel:"Phone",fieldId:"phone"}],sw=({header:e="Confirm your contact details:",firstName:t,lastName:r,email:n,phone:i,setFirstName:o,setLastName:a,setEmail:l,setPhone:s,onSubmit:c,formErrors:d,showPhoneError:u=!1,showEmailError:p=!1,productClickedCorrelationId:f,dslConfigId:m})=>{let{sendDebouncedFieldEvent:h}=sb(f,m),{eventContext:g}=aC(),y={...sm({eventContext:g,productClickedCorrelationId:f}),dslConfigId:m},{ref:v}=sh([as(y,!0),...sx.map(e=>af({...y,fieldName:e.fieldName,fieldType:e.fieldType,fieldLabel:e.fieldLabel,fieldId:e.fieldId},"FieldViewed"))]);return(0,b.jsxs)(aj.Section,{as:"section",padding:"none",className:"not-prose gap-0",ref:v,children:[(0,b.jsx)(aj.Flex,{direction:"row",align:"center",justify:"between",gap:"none",children:(0,b.jsx)(aj.Heading,{variant:"h5",className:"mb-3 mt-4",children:e})}),d?.length!==0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aj.Text,{tag:"p",variant:"b5",className:"my-1 text-error-500",children:"We were unable to save your information. Please correct the errors listed below."}),d?.map(e=>(0,b.jsx)(sv,{message:`Make sure the ${e.field} field is valid.`},e.field))]}),(0,b.jsx)(aj.Flex,{asChild:!0,direction:"column",gap:"sm",children:(0,b.jsxs)("form",{onSubmit:e=>{e.preventDefault(),c()},children:[(0,b.jsx)(aj.Flex,{direction:"column",gap:"none",className:"flex-1",children:(0,b.jsx)(aj.Input,{variant:"two-line",label:"First Name",id:"first-name",type:"text","data-testid":"pii-form-first-name-input",value:t,onChange:e=>{o(e.target.value),h("first-name","text")}})}),(0,b.jsx)(aj.Flex,{direction:"column",gap:"none",className:"flex-1",children:(0,b.jsx)(aj.Input,{variant:"two-line",label:"Last Name",id:"last-name",type:"text","data-testid":"pii-form-last-name-input",value:r,onChange:e=>{a(e.target.value),h("last-name","text")}})}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"none",children:[(0,b.jsx)(aj.Input,{variant:"two-line",label:"Email",id:"email",type:"email","data-testid":"pii-form-email-input",value:n,error:p,onChange:e=>{l(e.target.value),h("email","email")}}),p&&(0,b.jsx)(aj.Flex,{direction:"row",justify:"start",width:"full",gap:"none",className:"pt-1",children:(0,b.jsx)(sv,{message:"Please enter a valid email address."})})]}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"none",children:[(0,b.jsx)(aj.Input,{variant:"two-line",label:"Phone",id:"phone",type:"text",inputMode:"numeric",autoComplete:"tel",maxLength:14,"data-testid":"pii-form-phone-input",value:i,error:u,onChange:e=>{s(sf(e.target.value)),h("phone","text")}}),u&&(0,b.jsx)(aj.Flex,{direction:"row",justify:"start",width:"full",gap:"none",className:"pt-1",children:(0,b.jsx)(sv,{message:"Please enter a valid phone number."})})]})]})})]})};function sS(){if("undefined"==typeof document)return window;let e=document.querySelector('iframe[title="Viewport Preview"]');return e?.contentWindow?e.contentWindow:window}function sI(e){let[t,r]=(0,v.useState)(()=>sS().matchMedia(e).matches);return(0,v.useEffect)(()=>{let t=sS().matchMedia(e);r(t.matches);let n=()=>r(t.matches);return t.addEventListener("change",n),()=>t.removeEventListener("change",n)},[e]),t}let sC=({isLoading:e,onProgramSubmit:t,firstName:r,lastName:n,email:i,phone:o,setFirstName:a,setLastName:l,setEmail:s,setPhone:c,formErrors:d,setFormErrors:u,setEditMode:p,editMode:f,piiLeadErrors:m,selectedResult:h,formHeading:g,leadSubmissionStatus:y,setLeadSubmissionStatus:x,productClickedCorrelationId:w,dslConfigId:S})=>{let I=sI("(max-width: 767px)"),{showPhoneError:C,showEmailError:j,handleSubmitClick:k}=(({phone:e,email:t,onProgramSubmit:r,setLeadSubmissionStatus:n})=>{let[i,o]=(0,v.useState)(!1),[a,l]=(0,v.useState)(!1);return{showPhoneError:i,showEmailError:a,handleSubmitClick:async i=>{let a=!1;if(i.preventDefault(),o(!1),l(!1),n(st.SUBMITTING),e||(o(!0),a=!0),t||(l(!0),a=!0),e&&e.length>0){let t=await t1(e);(!t||!1===t.validPhoneNumber||"error"in t&&t.error)&&(o(!0),a=!0)}t&&t.length>0&&!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(t)&&(l(!0),a=!0),a?n(st.PENDING):r()}}})({phone:o,email:i,onProgramSubmit:t,setLeadSubmissionStatus:x}),A=y===st.SUBMITTING,E=e||A?(0,b.jsx)(aj.LoadingDots,{color:"white",label:"Submitting..."}):"Confirm & Submit",N=h?.valueProps?.map((e,t)=>({title:e.title,value:`value-prop-${t}`,content:(0,b.jsx)(sd,{variant:"b5",color:"default",html:e.description})})),T=h?.tcpa,O=h?.tcpaSecondParagraph,P=h?.imageURL||(h?.schoolSlug?`https://simple-storage-server.highereducation.com/${h.schoolSlug}.png?w=130&h=80`:void 0);return(0,b.jsx)(aj.Flex,{asChild:!0,direction:"column",gap:"none",width:"full",className:"not-prose relative h-full bg-white md:h-auto md:min-
1h-full",children:(0,b.jsxs)("form",{onSubmit:e=>e.preventDefault(),"data-tf-element-role":"offer",children:[(0,b.jsx)(aj.Flex,{asChild:!0,direction:"row",gap:"lg",align:"start",className:sc("shrink-0 bg-white px-lg py-md","border-b border-neutral-200 md:border-b-0"),children:(0,b.jsxs)("header",{children:[P&&(0,b.jsx)(aj.LogoBox,{src:P,alt:h?.schoolName??"",className:"p-xxs shadow-xl"}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"min",className:"min-w-0 flex-1",children:[(0,b.jsx)(aj.Heading,{variant:"h4",className:"truncate text-h6 md:text-h4",children:h?.schoolName}),(0,b.jsx)(aj.Text,{variant:"b4",color:"default",children:[h?.city,h?.state].filter(Boolean).join(", ")})]})]})}),I?(0,b.jsxs)(aj.Flex,{direction:"column",gap:"lg",className:"min-h-0 w-full min-w-0 flex-1 overflow-y-auto bg-neutral-50 px-lg py-lg","data-vaul-no-drag":!0,children:[(0,b.jsx)(aj.Heading,{variant:"h3",className:"text-h4",children:h?.programName}),(0,b.jsx)(aj.Flex,{direction:"column",gap:"sm",children:(0,b.jsx)(sw,{onSubmit:t,header:g??"Confirm your contact details:",setEditMode:p,editMode:f,piiLeadErrors:m,location:"single-program",firstName:r,lastName:n,email:i,phone:o,setFirstName:a,setLastName:l,setEmail:s,setPhone:c,setFormErrors:u,formErrors:d,productClickedCorrelationId:w,showPhoneError:C,showEmailError:j,dslConfigId:S})}),(0,b.jsx)(sp,{tcpa:T,schoolId:h?.schoolSlug,schoolName:h?.schoolName,programFlow:h?.programFlow,tcpaSecondParagraph:O,providerName:h?.providerName}),(0,b.jsx)(aj.Button,{variant:"primaryFill",size:"lg",className:"w-full",disabled:e||A,id:"reward_click_lds","data-testid":"edumatch-leaddelivery-submit","data-tf-element-role":"submit",onClick:k,type:"button",children:E}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"xxs",children:[(0,b.jsx)(aj.Brow,{className:"normal-case",children:"School Highlights"}),h?.snippet&&(0,b.jsx)(sd,{variant:"b4",color:"subtext",html:h.snippet})]}),N&&N.length>0&&(0,b.jsx)(aj.Accordion,{type:"single",collapsible:!0,variant:"no-background",defaultValue:"value-prop-0",items:N})]}):(0,b.jsxs)(aj.Flex,{direction:"row",gap:"2xl",height:"full",className:"w-full min-w-0 bg-neutral-50 px-2xl py-2xl",children:[(0,b.jsxs)(aj.Section,{as:"section",gap:"md",padding:"none","aria-label":"School highlights",className:"min-w-0 max-w-[860px] flex-1",children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"xxs",children:[(0,b.jsx)(aj.Brow,{className:"normal-case",children:"School Highlights"}),(0,b.jsx)(aj.Heading,{variant:"h3",children:h?.programName}),h?.snippet&&(0,b.jsx)(sd,{variant:"b4",color:"subtext",className:"mt-xxs",html:h.snippet})]}),N&&N.length>0&&(0,b.jsx)(aj.Accordion,{type:"single",collapsible:!0,variant:"no-background",defaultValue:"value-prop-0",items:N})]}),(0,b.jsxs)(aj.Section,{as:"section",gap:"md",padding:"none","aria-label":"Contact form",className:sc("min-w-0 max-w-[860px] flex-1"),children:[(0,b.jsx)(aj.Flex,{direction:"column",gap:"sm",children:(0,b.jsx)(sw,{onSubmit:t,header:g??"Confirm your contact details:",setEditMode:p,editMode:f,piiLeadErrors:m,location:"single-program",firstName:r,lastName:n,email:i,phone:o,setFirstName:a,setLastName:l,setEmail:s,setPhone:c,setFormErrors:u,formErrors:d,productClickedCorrelationId:w,showPhoneError:C,showEmailError:j,dslConfigId:S})}),(0,b.jsx)(aj.Flex,{direction:"row",gap:"xs",children:(0,b.jsx)(aj.Text,{variant:"b5",color:"default",children:"Start a conversation with a school admin by submitting your contact information. Once you submit, youâll be able to start your application."})}),(0,b.jsx)(aj.Button,{variant:"primaryFill",size:"lg",className:"w-full",disabled:e||A,id:"reward_click_lds","data-testid":"edumatch-leaddelivery-submit","data-tf-element-role":"submit",onClick:k,type:"button",children:E}),(0,b.jsx)(aj.Text,{variant:"b5",weight:"bold",color:"default",children:"Your information will never be shared with a school without your consent."}),(0,b.jsx)(sp,{tcpa:T,schoolId:h?.schoolSlug,schoolName:h?.schoolName,programFlow:h?.programFlow,tcpaSecondParagraph:h?.tcpaSecondParagraph,providerName:h?.providerName})]})]})]})})};var sj=r(82113);let sk=new Set(["modal.open","modal.close"]),sA=["formatType","formatSubtype","correlationId","country","state"],sE=new Set(["context","formState","item","event","this"]),sN=new Set;function sT(e){sN.has(e)||(sN.add(e),console.warn(e))}let sO=new Map;function sP(e,t){let r,n=((r=sO.get(e))||(r=new Set,sO.set(e,r)),r);n.has(t)||(n.add(t),console.warn(t))}function sL(e,t){if("item"===e)return t.item;if("formState"===e)return t.formState;if("context"===e)return t.flowContext;let r=t.sources[e];return r?.data}let sM={mobile:"(max-width: 767px)",tablet:"(min-width: 768px) and (max-width: 1023px)",desktop:"(min-width: 1024px)"},sR=new Set(Object.values(P));function sF(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function sU(e,t){return Array.isArray(e)?e.some(e=>String(e)===String(t)):String(e).includes(String(t))}function s$(e,t){return Array.isArray(t)&&t.some(t=>sU(e,t))}function s_(e){if(!sF(e))return{ok:!1,reason:"when must be an object"};let{source:t,path:r,operator:n,value:i}
1=e,o="string"==typeof t?t.trim():"";if(0===o.length)return{ok:!1,reason:"when.source must be a non-empty string"};let a="string"==typeof r?r.trim():"";return 0===a.length?{ok:!1,reason:"when.path must be a non-empty string"}:"string"==typeof n&&sR.has(n)?{ok:!0,when:{source:o,path:a,operator:n,value:i}}:{ok:!1,reason:"when.operator must be a known Operator"}}function sD(e,t){let r=sL(e.source,t),n=e.path.split(".").map(e=>e.trim()).filter(e=>e.length>0).map(e=>({type:"key",name:e})),i=0===n.length?void 0:it(r,n);var o=e.operator,a=e.value;if(null==i)return o===P.NOT_CONTAINS_ANY;switch(o){case P.EQUALS:return String(i)===String(a);case P.NOT_EQUALS:return String(i)!==String(a);case P.CONTAINS:return sU(i,a);case P.CONTAINS_ANY:return s$(i,a);case P.NOT_CONTAINS_ANY:return!s$(i,a);case P.GREATER_THAN:return Number(i)>Number(a);case P.LESS_THAN:return Number(i)<Number(a);default:return!1}}function sY(e,t){return void 0===e||0===e.length||e.some(e=>t.has(e))}let sB=new Set(["options","text","count","isEmpty","tagLabels","stats","badges"]);function sz(e){return!(null===e||"object"!=typeof e||Array.isArray(e))&&"string"==typeof e.source&&0!==e.source.length&&"string"==typeof e.path&&0!==e.path.length&&(void 0===e.transform||"string"==typeof e.transform&&sB.has(e.transform))}let sV=["_bind.","_action.","_meta."];function sH(e){for(let t of sV)if(e.startsWith(t))return!0;return!1}function sq(e){return!("object"!=typeof e||null===e||Array.isArray(e))&&"string"==typeof e.type&&null!==e.props&&"object"==typeof e.props&&!Array.isArray(e.props)}function sG(e,t){return!(!(null===e||"object"!=typeof e||sq(e))&&ia(e))||t.has(e)}let sW=new Set(["item","formState","context"]),sQ=new Set(["context","formState","item","event","this"]),sK=new Set(["href","url","ctaHref","link","to","src"]);function sJ(e,t,r){return il(e)?ir(e,r,sK.has(t)?{encodeSubstitutions:!0}:void 0):e}function sX(e){if(!0===e)return!0;if("string"==typeof e){let t=e.trim().toLowerCase();return"true"===t||"yes"===t}return!1}function sZ(e,t){if("string"==typeof e&&e.length>0)return e;void 0!==e&&s3(`[binding-enhancer] _bind.${t} expected a non-empty string field name; got ${s0(e)}. Falling back to default value extraction â bound options may render as "[object Object]".`)}function s0(e){return null===e?"null":Array.isArray(e)?"an array":"object"==typeof e?"an object":typeof e}function s1(e,t){if(t&&s2(e)){let r=e[t];if(null!=r)return String(r)}}function s2(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function s4(e){if(void 0!==e){if(Array.isArray(e)){let t=e.filter(e=>"string"==typeof e&&e.length>0);return t.length<e.length&&s3(`[binding-enhancer] _bind.tagKeys contained ${e.length-t.length} non-string entr(y/ies); they were ignored.`),t.length>0?t:void 0}s3(`[binding-enhancer] _bind.tagKeys expected an array of entry-key strings; got ${s0(e)}. Falling back to all affirmative entries.`)}}let s5=new Set;function s3(e){s5.has(e)||(s5.add(e),console.warn(e))}let s6=new Map;function s8(e){let t,r=s6.get(e);if(void 0!==r)return r;try{let{segments:r}=n8(`{{${e}}}`),n=r[0];t=n&&"expression"===n.type&&"path"===n.kind?n.segments:[]}catch(r){if(!(r instanceof n6))throw r;sP(cr,`[binding-enhancer] Skipping invalid bind declaration path "${e}": ${r.message}`),t=[]}if(s6.size>=1e3){let e=s6.keys().next().value;void 0!==e&&s6.delete(e)}return s6.set(e,t),t}function s9(e,t,r){if(void 0!==e){if(sz(e)){sW.has(e.source)||r.add(e.source);let n=sL(e.source,t),i=s8(e.path);return s7(0===i.length?void 0:it(n,i))}if("string"==typeof e&&il(e)){let n=ce(t,r,e);try{return s7(ir(e,n))}catch(e){if(e instanceof n6)return void sP(cr,`[binding-enhancer] Skipping invalid template on a tag-key companion: ${e.message}`);throw e}}return e}}function s7(e){return Array.isArray(e)?e:"string"==typeof e?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):e}function ce(e,t,r){let n={context:e.flowContext,formState:e.formState,item:e.item};for(let[t,r]of Object.entries(e.sources)){if(sQ.has(t)){sP(cr,`[binding-enhancer] Ignoring data source "${t}" â collides with a reserved interpolation root.`);continue}n[t]=r.data}try{for(let e of id(r)){let r=e.split(".")[0];r&&!sQ.has(r)&&t.add(r)}}catch{}return n}let ct={error:0,pending:1,empty:2,resolved:3},cr="binding-resolver",cn=(0,v.createContext)(void 0),ci=(0,v.createContext)(void 0),co=(0,v.createContext)(void 0),ca=({item:e,index:t,section:r,children:n})=>{let i=(0,v.useContext)(ci),o=(0,v.useContext)(co),a=void 0===t?i:void 0===i?String(t):`${i}.${t}`;return(0,b.jsx)(cn.Provider,{value:e,children:(0,b.jsx)(ci.Provider,{value:a,children:(0,b.jsx)(co.Provider,{value:r??o,children:n})})})};function cl(){return(0,v.useContext)(cn)}function cs(){return(0,v.useContext)(ci)}let cc=e=>e?.policy==="explicit-node-enable";function cd(e){let{stepCorrelation:t,eventContext:r}=e,n=r?.customDimensions??[],i=[];return t.stepId&&i.push({key:"stepId",value:t.stepId}),"number"==typeof t.stepIndex&&i.push({key:"stepIndex",value:String(t.stepIndex)}),t.stepType&&i.push({key:"stepType",value:t.stepType}),t.dslConfigId&&i.push({key:"dslConfigId",value:t.dslConfigId}),t.pageCategory&&i.push({key:"pageCategory",value:t.pageCategory}),{customDimensions:[...n,...i]}}let cu=e=>"string"==typeof e&&e.length>0?e:void 0,cp=e=>{if(null!=e&&""!==e){if("number"==typeof e)return Number.isFinite(e)?String(e):void 0;if("string"==typeof e)return e}};function cf(e,t,r){let n=t?.customDimensions??[];return 0===n.length&&0===r.length?e:[...e,...n,...r]}let cm=new Map,ch=()=>(0,nn.A)(),cg=e=>{let t=(0,nn.A)(),r=e?cm.get(e):void 0;return void 0===r?{correlationId:t}:{correlationId:t,viewCorrelationId:r}},cy="tracking";function cb(e){return null!=e&&"object"==typeof e&&"product"===e.kind&&!1===e.enabled}
1let cv=new WeakSet,cx=new Set,cw=({meta:e,stableKey:t,productContext:r,fieldValue:n,elementContext:i,children:o})=>{let a=lz(),l=(e=>{if(!e)return null;let t=e[cy];return"object"!=typeof t||null===t||Array.isArray(t)?null:t})(e),s=cc(a?.host),c=a?.host?.policy==="dashboard-defaults",d=s&&(l?.kind!=="element"||!0!==l.enabled),u=c&&(l?.kind==null||!["element","field"].includes(l.kind)||!1===l.enabled);if(d||u)return(0,b.jsx)(b.Fragment,{children:o});if(cb(l)){let t=Object.keys(e??{}).filter(e=>e!==cy);return 0===t.length?(0,b.jsx)(b.Fragment,{children:o}):(0,b.jsx)("span",{"data-edu-trackable":"placeholder","data-edu-meta-keys":t.join(","),style:{display:"contents"},children:o})}return l&&a?(0,b.jsx)(cS,{tracking:a,trackingMeta:l,stableKey:t,productContext:r,fieldValue:n,elementContext:i,children:o},t):void 0!==e&&Object.keys(e).length>0?(0,b.jsx)("span",{"data-edu-trackable":"placeholder","data-edu-meta-keys":Object.keys(e??{}).join(","),style:{display:"contents"},children:o}):(0,b.jsx)(b.Fragment,{children:o})},cS=({tracking:e,trackingMeta:t,stableKey:r,productContext:n,fieldValue:i,elementContext:o,children:a})=>{let{setNodes:l,entries:s,disconnect:c}=lR(e.host?.viewThreshold??1),d=(0,v.useRef)(null),u=(0,v.useRef)(!1),p=t.kind??"element",{isPopupOpen:f}=l6();return(0,v.useEffect)(()=>{if(!("product"!==p||cc(e.host))){if(r){if(cx.has(r))return;cx.add(r)}!function({tracking:e,trackingMeta:t,productContext:r}){if(cc(e.host))return;let{triggers:n}=e,i=cC(cd(e),t,r);n.triggerProductLoadedEvent(i)}({tracking:e,trackingMeta:t,productContext:n})}},[]),(0,v.useEffect)(()=>{if(e.host?.policy!=="dashboard-defaults"||"element"!==p)return;let n=r?`dashboard-loaded:${r}`:void 0;if(n&&lF.has(n)||!n&&u.current)return;let i=(e=>{if(!e)return(0,nn.A)();let t=cm.get(e);if(t)return t;let r=(0,nn.A)();return cm.set(e,r),r})(r);n?l$(n):u.current=!0,e.triggers.triggerElementLoadedEvent({...o9(t,cI(e.host.page,o)),correlationId:i})},[]),(0,v.useEffect)(()=>{if(!d.current)return;let e=d.current.firstElementChild instanceof Element?d.current.firstElementChild:d.current;if(!(r&&lF.has(r))&&!(!r&&cv.has(e))){if(f)return void l([]);l([e])}},[l,p,r,f]),(0,v.useEffect)(()=>{if(0===s.length||f)return;let a=s.find(e=>e.isIntersecting);if(!a)return;let l=a.target;r&&lF.has(r)||!r&&cv.has(l)?c():(r&&l$(r),cv.add(l),c(),function({kind:e,tracking:t,trackingMeta:r,stableKey:n,elementContext:i,productContext:o,fieldValue:a}){if(cc(t.host)||t.host?.policy==="dashboard-defaults"){let{correlationId:o,viewCorrelationId:l}=cg(n),s=cI(t.host.page,i),c={...t.host.page,...o9(r,s),correlationId:o};return"field"===e?t.triggers.triggerFieldEvents("FieldViewed",{...c,fieldName:r.fieldName,fieldType:r.fieldType,fieldId:"string"==typeof t.host.page.blockId?t.host.page.blockId:r.leadFieldAssociated,fieldValue:a,stepName:r.name}):t.triggers.triggerElementViewedEvent({...c,...l?{viewCorrelationId:l}:{}})}let{triggers:l,eventContext:s}=t,c=cd(t);switch(e){case"product":{let e=cC(c,r,o);l.triggerProductViewedEvent(e);return}case"field":{let e={...s??{},...c,fieldName:r.fieldName,fieldType:r.fieldType,fieldId:r.leadFieldAssociated,fieldValue:a};l.triggerFieldEvents("FieldViewed",e);return}case"submit":return;default:{let e={...c};void 0!==r.name&&(e.name=r.name),void 0!==r.elementType&&(e.elementType=r.elementType),void 0!==r.htmlId&&(e.htmlId=r.htmlId),void 0!==r.location&&(e.location=r.location),void 0!==r.text&&(e.text=r.text),l.triggerElementViewedEvent(e);return}}}({kind:p,tracking:e,trackingMeta:t,stableKey:r,elementContext:o,productC
1ontext:n,fieldValue:i}))},[s]),(0,b.jsx)("span",{ref:d,"data-edu-trackable":"active","data-edu-tracking-kind":p,style:{display:"contents"},children:a})};function cI(e,t){if(!t)return e;let r=[t.name,t.title,t.label].find(e=>"string"==typeof e&&e.trim().length>0);return{...e,...t,...r?{name:r}:{},...void 0===t.filterFormat&&"string"==typeof t.variant?{filterFormat:t.variant}:{}}}function cC(e,t,r){var n;let i,o=(i=[],(n=t).ctaText&&i.push({key:"ctaText",value:n.ctaText}),n.outboundUrl&&i.push({key:"outboundUrl",value:n.outboundUrl}),n.actionOutcome&&i.push({key:"actionOutcome",value:n.actionOutcome}),i),a=cf(e.customDimensions,r,o);return{...r??{},...void 0!==t.formatType?{formatType:t.formatType}:{},...void 0!==t.formatSubtype?{formatSubtype:t.formatSubtype}:{},...void 0!==t.location?{location:t.location}:{},...void 0!==t.productName||void 0!==t.productVariant?{product:{...void 0!==t.productName?{name:t.productName}:{},...void 0!==t.productVariant?{variant:t.productVariant}:{}}}:{},customDimensions:a}}let cj=e=>"object"==typeof e&&null!==e&&!Array.isArray(e);function ck(e,t,r,n){let i="string"==typeof e?e:"";return 0===i.length?"":rh(t.leadFieldAssociated??t.fieldName??r,n)?"SANITIZED":i}let cA="data-hen-scroll-point",cE=v.useLayoutEffect;function cN({name:e,children:t}){let r=(0,v.useRef)(null),n=(0,v.useRef)(null),[i,o]=(0,v.useState)({name:e,status:"checking"}),a=i.name===e?i:{name:e,status:"checking"},l="stamped"===a.status?a.host:null;cE(()=>{if("checking"!==a.status)return;let t=r.current,i=n.current;if(!t||!i)return;let l=function(e,t){let r=[],n=e.nextElementSibling;for(;n&&n!==t;)r.push(n),n=n.nextElementSibling;return r}(t,i);if(l.some(t=>t.getAttribute(cA)===e||Array.from(t.querySelectorAll(`[${cA}]`)).some(t=>t.getAttribute(cA)===e)))return void o({name:e,status:"forwarded"});let s=l[0]??null;s?.setAttribute(cA,e),o({name:e,status:"stamped",host:s})},[e,a.status]),(0,v.useEffect)(()=>{let t=l?.parentNode;if(!l||!t)return;let r=l.ownerDocument.defaultView,n=new(r?.MutationObserver??MutationObserver)(()=>{l.isConnected&&l.parentNode===t||o({name:e,status:"checking"})});return n.observe(t,{childList:!0}),()=>{n.disconnect(),l.getAttribute(cA)===e&&l.removeAttribute(cA)}},[l,e]);let s="checking"===a.status;return(0,b.jsxs)(b.Fragment,{children:[s?(0,b.jsx)("template",{ref:r}):null,t,s?(0,b.jsx)("template",{ref:n}):null]})}let cT=Object.keys(sM),cO=null,cP=null,cL=new Set,cM=new Set;function cR(e){let t=new Set;for(let{token:r,media:n}of e)n.matches&&t.add(r);return t}function cF(e){cL=e,cM.forEach(t=>{t(e)})}function cU(e=!0){let[t,r]=(0,v.useState)(()=>new Set);return(0,v.useEffect)(()=>{if(!e)return;!function(){let e;if(null===cO){try{e=sS()}catch{return}for(let{media:t}of(cO=cT.map(t=>({token:t,media:e.matchMedia(sM[t])})),cP=()=>{null!==cO&&cF(cR(cO))},cO))t.addEventListener("change",cP);cF(cR(cO))}}();let t=e=>{r(e)};return cM.add(t),r(cL),()=>{cM.delete(t)}},[e]),t}function c$(e){return e in sM}function c_({showOn:e,children:t}){let r=(0,v.useId)().replace(/:/g,""),n=`de-vis-bp-${r}`,i=sY(e,cU()),o=e.filter(c$).map(e=>sM[e]),a=0===o.length?`.${n}{display:none!important}`:`.${n}{display:none!important}@media ${o.join(",")}{.${n}{display:contents!important}}`;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("style",{children:a}),(0,b.jsx)("div",{className:n,"data-testid":"de-visibility-css-hide","aria-hidden":!i,children:t})]})}function cD(e,t){ne(e instanceof Error?e:Error(String(e)),{source:t})}let cY="__edu_bound";function cB(e){if(null==e)return"";if("object"==typeof e){if(e.target&&"object"==typeof e.target&&void 0!==e.target.value)return String(e.target.value);if(e.currentTarget&&"object"==typeof e.currentTarget&&void 0!==e.currentTarget.value)return String(e.currentTarget.value)}return String(e)}function cz(e){if(!("tracking"in e))return e;let t={...e};return delete t.tracking,t}let cV=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),cH=new Map,cq=[{valueProp:"expanded",changeProp:"onExpandedChange",default:!1},{valueProp:"modalOpen",changeProp:"onModalOpenChange",default:!1}],cG=[{prop:"children",variant:"b5"}],cW={RankingCard:{controlledState:cq,htmlProps:cG},SponsoredCard:{controlledState:cq,htmlProps:cG}};function cQ(e,t,r){let n={},i=Object.keys(e.components);for(let o=0;o<i.length;o++){let a=i[o],l=e.components[a],s=t?.[a]??cW[a],c=r?.[a],d=function(e,t,r){if(!0===e[cY])return e;let n=t?.eventPropNames&&t.eventPropNames.length>0?t.eventPropNames:eg,i=t?.formKeyValueTransform??cB,o=t?.staticProps,a=t?.valuePropName,l=t?.formStateValueTransform,s=t?.clickPropName??"onClick",c=t?.outboundUrlPropPath,d=t?.autoSelectSingleOption===!0,u=t?.controlledState??[],p=(t?.htmlProps??[]).map(e=>"string"==typeof e?{prop:e}:e),f=t=>{var f,m;let h,g=ll(),y=lm(),x=cl(),w=cs(),S=(0,v.useContext)(co),I=lz(),C=so(),j=u.map(e=>(0,v.useState)(e.default)),{props:k,loading:A,dataSourceStatus:E,formKey:N,meta:T,referencedSources:O}=function(e,t){let r,n=function(e){let t=new Set;for(let r of Object.keys(e)){if(!r.startsWith(ep))continue;let e=r.slice(ep.length);0!==e.length&&e!==ey&&e!==eb&&e!==ev&&e!==ex&&e!==ew&&e!==eS&&e!==eI&&e!==eC&&t.add(e)}return t}(e),i={},o={},a=new Set,l=function(e,t,r){let n=`${ep}${ey}`,i=`${ep}${eb}`,o=`${ep}${ev}`,a=`${ep}${ex}`,l=`${ep}${ew}`,s=`${ep}${eS}`,c=`${ep}${eI}`,d=`${ep}${eC}`;return{optionLabelField:e[n],optionValueField:e[i],statLabelField:e[l],statValueField:e[s],statTooltipField:e[c],badgeField:e[d],tagKeys:s9(e[o],t,r),defaultTagKeys:s9(e[a],t,r)}}(e,t,a);for(let s of Object.keys(e)){let c=e[s];if(s.startsWith(ep)){let e=s.slice(ep.length);if(0===e.length){sP(cr,`[binding-enhancer] Ignoring empty bind key "${ep}
1" â DSL must declare a target prop name (e.g. "${ep}label").`);continue}if(e===ey||e===eb||e===ev||e===ex||e===ew||e===eS||e===eI||e===eC)continue;let r=function(e,t,r,n,i){if(sz(t)){sW.has(t.source)||i.add(t.source);let o=sL(t.source,r),a=s8(t.path),l=0===a.length?void 0:it(o,a),s=n;return void 0!==t.keys&&(Array.isArray(t.keys)?s={...n,tagKeys:function(e,t){let r=[];for(let n of e){if("string"==typeof n){n.length>0&&r.push(n);continue}if(!n||"object"!=typeof n||Array.isArray(n)){sP(cr,"[binding-resolver] Ignoring _bind.*.keys entry that is neither a string nor a { key, when } object.");continue}if("string"!=typeof n.key||0===n.key.length){sP(cr,'[binding-resolver] Ignoring _bind.*.keys entry without a non-empty string "key".');continue}if(void 0===n.when){r.push(n.key);continue}let e=s_(n.when);if(!1===e.ok){sP(cr,`[binding-resolver] Malformed _bind.*.keys[].${e.reason}; keeping "${n.key}".`),r.push(n.key);continue}sD(e.when,t)&&r.push(n.key)}return r}(t.keys,r)}:sP(cr,`[binding-resolver] Ignoring non-array _bind.${e}.keys; using node-level tagKeys.`)),function(e,t,r){switch(e){case"options":return function(e,t){if(!Array.isArray(e))return[];let r=sZ(t.optionLabelField,"optionLabelField"),n=sZ(t.optionValueField,"optionValueField"),i=function(e){let t=[],r=e=>{if(Array.isArray(e)){for(let t=0;t<e.length;t++)r(e[t]);return}t.push(e)};return r(e),t}(e),o=[];for(let e=0;e<i.length;e++){var a;let t=i[e];o.push({label:s1(a=t,r)??String(a),value:function(e,t){let r=s1(e,t);return void 0!==r?r:s2(e)&&void 0!==e.value&&null!==e.value?String(e.value):String(e)}(t,n)})}return o}(t,r);case"text":return function e(t){if(null==t)return"";if(Array.isArray(t))return t.filter(e=>null!=e).map(t=>e(t)).join(", ");if("object"==typeof t)try{return JSON.stringify(t)??""}catch{return""}return String(t)}(t);case"count":return Array.isArray(t)?t.length:0;case"isEmpty":if(null==t)return!0;if("string"==typeof t||Array.isArray(t))return 0===t.length;if("object"==typeof t){let e=Object.getPrototypeOf(t);if(e!==Object.prototype&&null!==e)return!1;for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}return!1;case"tagLabels":if(!s2(t))return[];let n=s4(r.tagKeys)??s4(r.defaultTagKeys)??Object.keys(t),i=[];for(let e of n){let r=t[e];s2(r)&&sX(r.value)&&"string"==typeof r.label&&r.label.length>0&&i.push(r.label)}return i;case"stats":return function(e,t){let r=function(e,t){if(Array.isArray(e))return e;if(!s2(e))return[];let r=s4(t.tagKeys)??s4(t.defaultTagKeys)??Object.keys(e),n=[];for(let t of r)Object.prototype.hasOwnProperty.call(e,t)&&n.push(e[t]);return n}(e,t);if(0===r.length)return[];let n=sZ(t.statLabelField,"statLabelField"),i=sZ(t.statValueField,"statValueField"),o=sZ(t.statTooltipField,"statTooltipField"),a=[];for(let e=0;e<r.length;e++){let t=r[e];if(null==t)continue;let l=s1(t,n)??String(t);if(0===l.length)continue;let s=s1(t,i)??"",c=function(e,t){let r=s1(e,t);return void 0!==r&&r.length>0?r:void 0}(t,o);a.push(void 0===c?{label:l,value:s}:{label:l,value:s,tooltip:c})}return a}(t,r);case"badges":return function(e,t){if(!Array.isArray(e))return[];let r=sZ(t.badgeField,"badgeField"),n=[];for(let t=0;t<e.length;t++){let i=e[t];if(null==i)continue;let o=r&&s2(i)?s1(i,r)??"":String(i);0!==o.length&&n.push(o)}return n}(t,r);case void 0:return t;default:return sP(cr,`[binding-enhancer] Unknown transform "${String(e)}"; passing raw value through.`),t}}(t.transform,l,s)}if("string"==typeof t&&il(t)){let n=ce(r,i,t);try{return ir(t,n)}catch(t){if(t instanceof n6)return void sP(cr,`[binding-enhancer] Skipping invalid template on _bind.${e}: ${t.message}`);throw t}}return t}(e,c,t,l,a);i[e]=r;continue}if(s.startsWith(ef)){for(let e of function(e){if(!e||"object"!=typeof e||Array.isArray(e)||!e.params||"object"!=typeof e.params)return[];let t=[];for(let r of Object.values(e.params))if("string"==typeof r&&il(r))try{for(let e of id(r))t.push(e)}catch{}return t}(c)){let t=e.split(".")[0];t&&!sQ.has(t)&&a.add(t)}continue}if(s.startsWith(em)){let e=s.slice(em.length);if(0===e.length){sP(cr,`[binding-enhancer] Ignoring empty meta key "${em}" â DSL must declare a meta name (e.g. "${em}flowState").`);continue}o[e]=c;continue}if(s===eh){"string"==typeof c&&c.length>0&&(r=c);continue}n.has(s)||(i[s]=function(e,t,r,n){if(!function e(t,r){if("string"==typeof t)return il(t);if(sG(t,r))return!1;r.add(t);try{if(Array.isArray(t)){for(let n of t)if(e(n,r))return!0;return!1}for(let[n,i]of Object.entries(t))if(!sH(n)&&e(i,r))return!0;return!1}finally{r.delete(t)}}(t,new WeakSet))return t;!function(e,t){!function e(t,r,n){if("string"==typeof t)return void n(t);if(!sG(t,r)){r.add(t);try{if(Array.isArray(t)){for(let i of t)e(i,r,n);return}for(let[i,o]of Object.entries(t))sH(i)||e(o,r,n)}finally{r.delete(t)}}}(e,new WeakSet,e=>{var r=e,n=t;if(il(r))try{for(let e of id(r)){let t=function(e){let t=e.split(".")[0];if(!t)return;let r=t.indexOf("[");return r>=0?t.slice(0,r):t}(e);t&&!sQ.has(t)&&n.add(t)}}catch{}})}(t,n);let i=function(e){let t={context:e.flowContext,formState:e.formState,item:e.item};for(let[r,n]of Object.entries(e.sources))sQ.has(r)||(t[r]=n.data);return t}(r);try{if("string"==typeof t)return sJ(t,e,i);let r=new WeakSet;return function e(t,r,n){if("string"==typeof t)return n(t,void 0);if(null===t||"object"!=typeof t||sq(t)||!ia(t)||r.has(t))return t;r.add(t);try{if(Array.isArray(t)){var i=t,o=r,a=n;let l=null;for(let t=0;t<i.length;t++){let r=i[t],n=sq(r)?r:e(r,o,a);n!==r&&null===l&&(l=i.slice(0,t)),null!==l&&l.push(n)}return l??i}return function(t,r,n){let i=null,o=!1,a=Object.keys(t);for(let l=0;l<a.length;l++){let s=a[l];if(sH(s)){o=!0;continue}let c=t[s],d=e(c,r,(e,t)=>n(e,t??s));
1if(d!==c&&null===i){i={};for(let e=0;e<l;e++){let r=a[e];sH(r)||(i[r]=t[r])}}null!==i&&(i[s]=d)}if(null!==i)return i;if(o){let e={};for(let r of a)sH(r)||(e[r]=t[r]);return e}return t}(t,r,n)}finally{r.delete(t)}}(t,r,(t,r)=>sJ(t,r??e,i))}catch(t){if(t instanceof n6)return void sP("plain-prop-resolver",`[binding-enhancer] Skipping invalid template on plain prop "${e}": ${t.message}`);throw t}}(s,c,t,a))}return{props:i,loading:function(e,t){let r=!1;return e.forEach(e=>{if(r)return;let n=t[e];void 0!==n&&"pending"===n.status&&(r=!0)}),r}(a,t.sources),dataSourceStatus:function(e,t){if(0===e.size)return"resolved";let r="resolved";return e.forEach(e=>{let n=t[e],i=void 0===n?"error":n.status;ct[i]<ct[r]&&(r=i)}),r}(a,t.sources),formKey:r,meta:o,referencedSources:a}}(t,{sources:g.sources,formState:g.formState,flowContext:g.flowContext,item:x}),P="string"==typeof t.id&&t.id.length>0?t.id:void 0,L=I&&P?I.composeDedupKey(void 0!==w?`${P}::${w}`:P):void 0,M=T&&cV(T.tracking)&&null!==T.tracking?T.tracking:void 0,R=(0,v.useMemo)(()=>M?JSON.stringify(M):"",[M]),F=c?function(e,t){let r=it(e,t.split(".").map(e=>e.trim()).filter(e=>e.length>0).map(e=>({type:"key",name:e})));return"string"==typeof r&&r.length>0?r:void 0}(k,c):void 0,U=M&&"string"==typeof M.location?M.location:void 0,$=(0,v.useMemo)(()=>(function(e,t,r){if(!t||void 0!==r)return e;let n=e.tracking;if(!cV(n)||"product"!==n.kind)return e;let i="string"==typeof n.location&&n.location.length>0?n.location:void 0;return i?{...e,tracking:{...n,location:`${i}-${t}`}}:e})(function(e,t){if(!t)return e;let r=e.tracking;return!cV(r)||"product"!==r.kind||"string"==typeof r.outboundUrl&&r.outboundUrl.length>0?e:{...e,tracking:{...r,outboundUrl:t}}}(function(e,t,r){let n=function(e){let t=e.tracking;if(null!=t&&"object"==typeof t&&!Array.isArray(t))return t}(t);if(!e)return cb(n)?cz(t):t;let i={...e,...n??{}};return("field"===i.kind&&r&&(void 0===i.fieldName&&(i.fieldName=r),void 0===i.leadFieldAssociated&&(i.leadFieldAssociated=r)),cb(i))?cz(t):{...t,tracking:i}}(r,function(e){if(!("scrollPoint"in e))return e;let t={...e};return delete t.scrollPoint,t}(T),N),F),S,U),[R,N,F,S,U]),_=cc(I?.host)?null:function(e,t=!1){if(!e)return null;let r=e.tracking;if(!cV(r)||"field"!==r.kind||t&&!1===r.enabled)return null;let n={};return"string"==typeof r.fieldName&&(n.fieldName=r.fieldName),"string"==typeof r.fieldType&&(n.fieldType=r.fieldType),"string"==typeof r.leadFieldAssociated&&(n.leadFieldAssociated=r.leadFieldAssociated),n}($,I?.host?.policy==="dashboard-defaults"),D=function(e,t){if(!e)return null;let r=e.tracking;if(!cV(r))return null;if("dashboard-defaults"===t&&"element"===r.kind&&!1!==r.enabled||"explicit-node-enable"===t&&"element"===r.kind&&!0===r.enabled){let e={kind:"element",enabled:!0};return"string"==typeof r.elementType&&(e.elementType=r.elementType),"string"==typeof r.name&&(e.name=r.name),"string"==typeof r.htmlId&&(e.htmlId=r.htmlId),"string"==typeof r.location&&(e.location=r.location),"string"==typeof r.text&&(e.text=r.text),cV(r.fields)&&(e.fields=r.fields),void 0!==r.customDimensions&&(e.customDimensions=r.customDimensions),e}if("explicit-node-enable"===t||"dashboard-defaults"===t||cb(r)||"product"!==r.kind)return null;let n={kind:"product"};return"string"==typeof r.ctaText&&(n.ctaText=r.ctaText),"string"==typeof r.outboundUrl&&(n.outboundUrl=r.outboundUrl),"string"==typeof r.actionOutcome&&(n.actionOutcome=r.actionOutcome),"string"==typeof r.location&&(n.location=r.location),"string"==typeof r.formatType&&(n.formatType=r.formatType),"string"==typeof r.formatSubtype&&(n.formatSubtype=r.formatSubtype),"string"==typeof r.productName&&(n.productName=r.productName),"string"==typeof r.productVariant&&(n.productVariant=r.productVariant),n}($,I?.host?.policy),Y=D?.kind==="product"?D:null,{productContext:B,resultActionOutcome:z,fieldViewValue:V}=function({item:e,itemIndexPath:t,clickKind:r,clickFormatSubtype:n,fieldMeta:i,formKey:o,formStateValue:a,currentStep:l,isProgramSubmitted:s,productFields:c,customDimensionMappings:d}){var u;let p,f="product"===r?(u=function(e,t,r){if(!t||0===Object.keys(t).length)return e;let n=im({map:t,root:cj(r)?r:void 0,baseProduct:e?.product});return n?e?e.product===n?e:{...e,product:n}:{product:n}:e}(function(e,t){if(!("object"==typeof e&&null!==e&&!Array.isArray(e)))return;let r=cu(e.schoolSlug),n=cp(e.programId);if(void 0===r&&void 0===n)return;let i=cu(e.resultsSource),o={formatType:"dexp-offering",formatSubtype:i===rX?r0:rZ};void 0!==r&&(o.brand=r),void 0!==n&&(o.productId=n);let a=cp(e.capId);void 0!==a&&(o.sku=a);let l=cu(e.viewCorrelationId);void 0!==l&&(o.viewCorrelationId=l);let s=cu(e.productClickedCorrelationId);void 0!==s&&(o.productClickedCorrelationId=s);let c=cu(e.listId);void 0!==c&&(o.listId=c);let d=cu(e.degreeSlug),u=cu(e.categorySlug),p=cu(e.subjectSlug);
1(void 0!==d||void 0!==u||void 0!==p)&&(o.presets={degree:d,category:u,subject:p});let f=(e=>{if(!e)return;let t=e.split("."),r=Number(t[t.length-1]);return Number.isFinite(r)?r+1:void 0})(t);return void 0!==f&&(o.position=f),void 0!==i&&(o.customDimensions=[{key:"resultsSource",value:i}]),o}(e,t),c,e),0===(p=ih(d,cj(e)?e:void 0)).length?u:u?{...u,mappedCustomDimensions:p}:{mappedCustomDimensions:p}):void 0,m=(()=>{let t;if(!f||(t=n??f.formatSubtype)!==rZ&&t!==r0)return;let r=cj(e)&&"number"==typeof e.programId?e.programId:void 0;return void 0!==r&&s?.(r)===!0?"application":"explore"})();return{productContext:f,resultActionOutcome:m,fieldViewValue:i&&void 0!==o?ck(a,i,o,l):void 0}}({item:x,itemIndexPath:w,clickKind:Y?.kind,clickFormatSubtype:Y?.formatSubtype,fieldMeta:_,formKey:N,formStateValue:void 0!==N?g.formState[N]:void 0,currentStep:I?.eventContext?.currentStep,isProgramSubmitted:C?e=>C.isProgramSubmitted(e):void 0,productFields:I?.productFields,customDimensionMappings:I?.customDimensionMappings}),H=function(e,t,r,n){let i=e?.formatType??t?.formatType,o=e?.formatSubtype??t?.formatSubtype,a=t?.productClickedCorrelationId||r,{country:l,state:s}=function(e){let t=e.geolocation?.trim().toUpperCase();if(t){let e=t.split("-").map(e=>e.trim()).filter(e=>e.length>0);if(2===e.length){let[t,r]=e;return{country:t,state:r}}if(1===e.length)return{country:e[0]}}let r=e.countryCode?.trim().toUpperCase();return r?{country:r}:{}}(n);if(void 0!==i||void 0!==o||void 0!==a||void 0!==l||void 0!==s)return{...void 0!==i?{formatType:i}:{},...void 0!==o?{formatSubtype:o}:{},...void 0!==a?{correlationId:a}:{},...void 0!==l?{country:l}:{},...void 0!==s?{state:s}:{}}}(Y,B,I?.eventContext?.formViewedCorrelationId,g.formState),q=function(e,t){let r={};for(let i of Object.keys(e)){var n;if(!i.startsWith(ef))continue;let o=i.slice(ef.length);if(0===o.length)continue;let a=e[i];if(!(!(null===(n=a)||"object"!=typeof n||Array.isArray(n))&&"string"==typeof n.type&&0!==n.type.length&&(void 0===n.params||!(null===n.params||"object"!=typeof n.params||Array.isArray(n.params))))){sT(`[binding-enhancer] Skipping malformed _action.${o} â expected { type: string, params?: Record<string,string> }`);continue}r[o]=function(e,t,r){return(...n)=>{var i;let o,a=n.length>0?n[0]:void 0,l=t.dispatcher;if(l.has&&!1===l.has(e.type))return void sT(`[binding-enhancer] No handler registered for action "${e.type}"; dropping _action.${r}`);if(void 0!==e.params)try{o=function(e,t,r){if(!is(e))return{...e};let n={context:t.flowContext,formState:t.formState,item:t.item,event:r,this:t.componentSelf??{}};for(let e of Object.keys(t.sources))sE.has(e)||(n[e]=t.sources[e]?.data);return ic(e,n)}(e.params,t,a)}catch(e){if(e instanceof n6)return void sT(`[binding-enhancer] Interpolation error in _action.${r}.params: ${e.message}`);throw e}"navigation.linkout"===e.type&&t.linkoutParamFallbacks&&(o=function(e,t){let r;for(let n of sA){let i=t[n];if(void 0===i)continue;let o=e?.[n];(void 0===o||""===o)&&(r||(r={...e??{}}),r[n]=i)}return r??e}(o,t.linkoutParamFallbacks)),"onClick"===r&&sk.has(e.type)&&"object"==typeof(i=a)&&null!==i&&"preventDefault"in i&&"function"==typeof i.preventDefault&&a.preventDefault();try{l.dispatch(e.type,o)}catch(t){console.error(`[binding-enhancer] ActionDispatcher.dispatch("${e.type}") threw`,t)}}}(a,t,o)}return r}(t,{dispatcher:y,sources:g.sources,formState:g.formState,flowContext:g.flowContext,item:x,componentSelf:{formKey:N},linkoutParamFallbacks:H});!function(e){let{handler:t,referencedSources:r,sources:n,stableKey:i}=e,o=(0,v.useRef)(new Map),a=(0,v.useRef)(void 0);a.current=t;let l=Array.from(r).sort(),s=l.join("|");(0,v.useEffect)(()=>{let e;if(0===l.length)return;if(i){let t=cH.get(i);t||(t=new Map,cH.set(i,t)),e=t}else e=o.current;let t=!1;for(let r=0;r<l.length;r++){let i=l[r],o=n[i];o&&"pending"!==o.status&&(e.has(i)&&e.get(i)!==o.data&&(t=!0),e.set(i,o.data))}if(t){let e=a.current;if(!e)return;try{e()}catch(e){cD(e,"binding-enhancer:_action.onSourceChange")}}},[s,n,i])}({handler:function(e){let t={};for(let r of Object.keys(e))ek(r)&&(t[r]=e[r],delete e[r]);return t}(q).onSourceChange,referencedSources:O,sources:g.sources,stableKey:L});let G=function(e){let{eventPropNames:t,staticProps:r,resolvedProps:n,actionHandlers:i,formKey:o,formKeyValueTransform:a,updateFormState:l,tracking:s,fieldTrackingMeta:c,clickPropName:d,clickTrackingMeta:u,stableKey:p,productC
1ontext:f,resultActionOutcome:m}=e,h=o?function(e,t){return e.find(e=>e in t)??e[0]}(t,i):void 0,g=s&&u?d:void 0,y=[],b={},v=e=>{b[e]||(b[e]=!0,y.push(e))};for(let e of Object.keys(i))v(e);if(h&&v(h),g&&v(g),r)for(let e of Object.keys(r))"function"==typeof r[e]&&"function"==typeof n[e]&&v(e);let x={};for(let e of y){let t=function(e,t,r){let n=[],i=r?.[e];"function"==typeof i&&n.push({fn:i,origin:"static"});let o=t[e];return"function"==typeof o&&n.push({fn:o,origin:"resolved"}),n}(e,n,r),d=i[e],y=void 0!==o&&e===h,b=void 0!==g&&e===g;(0!==t.length||d||y||b)&&(x[e]=(...r)=>{for(let n of t)try{n.fn(...r)}catch(t){cD(t,`binding-enhancer:authored:${e}:${n.origin}`)}if(d)try{d(...r)}catch(t){cD(t,`binding-enhancer:_action:${e}`)}if(y&&o){let e=a(r.length>0?r[0]:void 0);try{l(o,e)}catch(e){cD(e,`binding-enhancer:updateFormState:${o}`)}if(s&&c)try{let t=cd(s),r=s.host?.policy==="dashboard-defaults",n={...s.eventContext??{},...r?s.host?.page:t,...r?{correlationId:ch()}:{},fieldName:c.fieldName??o,fieldType:c.fieldType,fieldId:c.leadFieldAssociated??o,fieldValue:ck(e,c,o,s.eventContext?.currentStep)};s.triggers.triggerFieldEvents("FieldInputted",n)}catch(e){cD(e,`binding-enhancer:triggerFieldEvents:FieldInputted:${o}`)}}if(b&&s&&u)try{if("element"===u.kind){let e=s.host?.policy==="dashboard-defaults"||cc(s.host),t=s.host?.policy==="dashboard-defaults"?cg(p):void 0;s.triggers.triggerElementClickedEvent(e?{...s.host?.page,...o9(u,{...s.host?.page??{},...n,..."string"==typeof n.variant?{filterFormat:n.variant}:{}}),...t??{}}:{...void 0!==u.elementType?{elementType:u.elementType}:{},...void 0!==u.name?{name:u.name}:{},...void 0!==u.htmlId?{htmlId:u.htmlId}:{},...void 0!==u.location?{location:u.location}:{},...void 0!==u.text?{text:u.text}:{}});return}if(cc(s.host)||s.host?.policy==="dashboard-defaults")return;let e=cd(s),t=function(e){let t=[];return e.ctaText&&t.push({key:"ctaText",value:e.ctaText}),e.outboundUrl&&t.push({key:"outboundUrl",value:e.outboundUrl}),e.actionOutcome&&t.push({key:"actionOutcome",value:e.actionOutcome}),t}(u),r={...s.eventContext??{},...f??{},...void 0!==m?{actionOutcome:m}:{},...void 0!==u.outboundUrl?{outboundUrl:u.outboundUrl}:{},...void 0!==u.actionOutcome?{actionOutcome:u.actionOutcome}:{},...void 0!==u.location?{location:u.location}:{},...void 0!==u.formatType?{formatType:u.formatType}:{},...void 0!==u.formatSubtype?{formatSubtype:u.formatSubtype}:{},...void 0!==u.productName||void 0!==u.productVariant?{product:{...void 0!==u.productName?{name:u.productName}:{},...void 0!==u.productVariant?{variant:u.productVariant}:{}}}:{},customDimensions:cf(e.customDimensions,f,t)};s.triggers.triggerProductClickedEvent(r)}catch(e){cD(e,`binding-enhancer:click-dispatch:${u.kind}`)}})}return x}({eventPropNames:n,staticProps:o,resolvedProps:k,actionHandlers:q,formKey:N,formKeyValueTransform:i,updateFormState:g.updateFormState,tracking:I,fieldTrackingMeta:_,clickPropName:s,clickTrackingMeta:D,stableKey:L,productContext:B,resultActionOutcome:z}),W={...o??{},...k,...G,loading:"string"==typeof k.loading?k.loading:"string"==typeof o?.loading?o.loading:A,dataSourceStatus:E};if(void 0!==N&&void 0!==a&&!(a in W)){let e=g.formState[N];W[a]=l?l(e):e}for(let e=0;e<u.length;e++){let{valueProp:r,changeProp:n}=u[e],[i,a]=j[e],l=`${ep}${r}`in t||r in k||o?.[r]!==void 0;l||(W[r]=i);let s="function"==typeof W[n]?W[n]:void 0,c=`${ef}${n}`in t||"function"==typeof t[n]||"function"==typeof o?.[n]||n in G||"function"==typeof k[n];c&&l||(c&&s?W[n]=(...e)=>{a(e[0]),s(...e)}:W[n]=(...e)=>{a(e[0])})}let Q=d&&void 0!==N&&!A&&!0!==W.disabled&&Array.isArray(f=W.options)&&f.every(e=>null!==e&&"object"==typeof e&&"value"in e)&&1===W.options.length?String(W.options[0].value):void 0,K=void 0!==N?g.formState[N]:void 0,J=g.updateFormState;for(let{prop:e,variant:t}of((0,v.useEffect)(()=>{void 0===Q||void 0===N||K!==Q&&J(N,Q)},[Q,K,N,J]),void 0!==Q&&(W.disabled=!0),p)){let r=W[e];"string"==typeof r&&r.trim().length>0&&(W[e]=(0,b.jsx)(sd,{html:r,variant:t}))}let X=(m=T&&"object"==typeof T?T:void 0,"string"!=typeof(h=m?.scrollPoint)?"":h.trim()),Z=X?{[cA]:X}
1:void 0,ee=(0,b.jsx)(cw,{meta:$,stableKey:L,productContext:B,fieldValue:V,elementContext:k,children:(0,b.jsx)(e,{...W,...Z})});return X?(0,b.jsx)(cN,{name:X,children:ee}):ee};f.displayName=`Bound(${e.displayName??e.name??"Component"})`;let m=e=>{let t=ll(),r=cl(),n=e["_meta.visibility"],i=cU(function(e){if("object"!=typeof e||null===e||Array.isArray(e))return!1;let t=e.showOn;return Array.isArray(t)&&t.length>0}(n));if(void 0===n)return(0,b.jsx)(f,{...e});let o=function(e){let t,r,n;if(!sF(e))return{ok:!1,reason:"_meta.visibility must be a plain object"};if(void 0!==e.when){let r=s_(e.when);if(!1===r.ok)return{ok:!1,reason:`_meta.visibility.${r.reason}`};t=r.when}if(void 0!==e.showOn){if(!Array.isArray(e.showOn)||!e.showOn.every(e=>"string"==typeof e))return{ok:!1,reason:"_meta.visibility.showOn must be an array of strings"};r=e.showOn}if(void 0!==e.mode){if("mount"!==e.mode&&"css"!==e.mode)return{ok:!1,reason:'_meta.visibility.mode must be "mount" or "css"'};n=e.mode}return{ok:!0,meta:{when:t,showOn:r,mode:n}}}(n);if(!1===o.ok)return ne(Error(`[binding-enhancer] Malformed _meta.visibility: ${o.reason}`),{source:"binding-enhancer:visibility"}),(0,b.jsx)(f,{...e});let{meta:a}=o,l={sources:t.sources,formState:t.formState,flowContext:t.flowContext,item:r};if(void 0!==a.when&&!sD(a.when,l))return null;let s=sY(a.showOn,i);return"css"===a.mode&&void 0!==a.showOn&&a.showOn.length>0?(0,b.jsx)(c_,{showOn:a.showOn,children:(0,b.jsx)(f,{...e})}):s?(0,b.jsx)(f,{...e}):null};return m.displayName=`VisibilityGate(${e.displayName??e.name??"Component"})`,m[cY]=!0,m}(l.render,s,c);n[a]={...l,render:d}}return{...e,components:n}}let cK={},cJ={},cX=aj.StudentLoansInline,cZ=cQ({components:{StudentLoansInline:{fields:{},render:e=>(0,b.jsx)(cX,{...e})}},root:{fields:{},render:({children:e})=>(0,b.jsx)(b.Fragment,{children:e})}},{StudentLoansInline:{eventPropNames:["onCtaClick"],clickPropName:"onCtaClick",outboundUrlPropPath:"cta.href"}},nW);class c0 extends v.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(`[StudentLoansInlinePlacement] Render error for config "${this.props.configId??"unknown"}":`,e,t.componentStack)}render(){return this.state.hasError?null:this.props.children}constructor(...e){super(...e),this.state={hasError:!1}}}let c1=({content:e,configId:t})=>{let r=(0,v.useMemo)(()=>{var t;return!function(e){if(e?.type!=="StudentLoansInline")return!1;let t=e.props;if(!c2(t))return!1;let r=t.partner,n=t.cta;return c4(t.title)&&c4(t.subtitle)&&c4(t.disclosure)&&c2(r)&&c4(r.label)&&c4(r.logo)&&c4(r.name)&&"number"==typeof r.rating&&c2(n)&&c4(n.label)&&c4(n.href)}(t=e)?null:{content:[{type:"StudentLoansInline",props:{...t.props,"_meta.tracking":{location:"voyager-exit-credible"}}}],root:{props:{}}}},[e]);return r?(0,b.jsx)(c0,{configId:t,children:(0,b.jsx)(la,{dataSources:cK,flowContext:cJ,children:(0,b.jsx)(sj.dw,{config:cZ,data:r})})}):null};function c2(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function c4(e){return"string"==typeof e&&e.trim().length>0}function c5({baseUrl:e,staticParams:t,fieldMap:r,sources:n,missingValue:i="empty"}){let o=function(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol?t:void 0}catch{return}}(e);if(!o)return{hide:!0};let a=Object.entries(t??{});for(let[e,t]of Object.entries(r??{})){let r=function(e,t){let[r,...n]=t.split(".");if("lead"!==r&&"partnerIdentifiers"!==r||0===n.length)return;let i=e[r];for(let e of n){var o;if(!("object"==typeof(o=i)&&null!==o&&!Array.isArray(o))||!Object.prototype.hasOwnProperty.call(i,e))return;i=i[e]}return i}(n,t);if(null==r){if("hide"===i)return{hide:!0};if("omit"===i)continue;a.push([e,""]);continue}a.push([e,String(r)])}if(a.length>0){let e=a.map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&"),t=o.search.slice(1);o.search=t?`${t}&${e}`:e}return{href:o.toString()}}let c3="dexp-hosted-lead-application-cta",c6=({firstName:e,schoolName:t,schoolSlug:r,city:n,state:i,applicationCtaUrl:o,applicationCtaLabel:a,applicationCtaFieldMap:l,onCloseExperience:s,productClickedCorrelationId:c,dslConfigId:d,studentLoansInlineContent:u,extraCta:p,lead:f,partnerIdentifiers:m,showCloseButton:h})=>{let g=r?`https://simple-storage-server.highereducation.com/${r}.png?w=130&h=80`:void 0,{eventContext:y}=aC(),{triggerElementClickedEvent:v}=aw(),x=()=>
1{if(p?.enabled!==!0||!p.destination?.url)return;let e=c5({baseUrl:p.destination.url,staticParams:p.destination.staticParams,fieldMap:p.destination.fieldMap,missingValue:p.destination.missingValue,sources:{lead:f,partnerIdentifiers:m}});return"href"in e?e.href:void 0},w=x(),S=p?.label??p?.destination?.label??"Learn more",I=!!d&&!!o,C=sy({eventContext:y,productClickedCorrelationId:c,elementType:"dexp-application-cta",name:"dexp-application-cta",location:U.THANK_YOU_PAGE,text:a,dslConfigId:d,outboundUrl:o,fieldMap:l}),j=!!d&&!!w,k=p?.eventName?.trim()||c3,A=sy({eventContext:y,productClickedCorrelationId:c,elementType:c3,name:k,location:U.THANK_YOU_PAGE,text:S,dslConfigId:d,outboundUrl:w,fieldMap:p?.destination?.fieldMap}),E=[...I?[av(C)]:[],...j?[av(A)]:[]],{ref:N}=sh(E),{ref:T}=sh(E),O=(e,t)=>{e.preventDefault(),I&&v(C),window.open(t,"_blank","noopener,noreferrer")},P=e=>{e.preventDefault();let t=x();t&&(j&&v(A),window.open(t,"_blank","noopener,noreferrer"))};return(0,b.jsxs)(aj.Section,{variant:"light",padding:"none",gap:null,className:"relative h-full max-h-dvh flex flex-col overflow-hidden",children:[h&&s&&(0,b.jsx)(aj.Button,{type:"button",variant:"iconOnly",size:"sm",iconBefore:"x","aria-label":"Close",className:"absolute right-4 top-4 z-20",onClick:s}),(0,b.jsxs)(aj.Flex,{direction:"row",align:"center",gap:"lg",className:"px-6 py-5 bg-white shrink-0 z-10",children:[g&&(0,b.jsx)(aj.LogoBox,{src:g,alt:t??""}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"xs",className:"min-w-0 flex-1",children:[(0,b.jsx)(aj.Heading,{variant:"h5",className:"truncate",children:t}),n&&i&&(0,b.jsxs)(aj.Text,{variant:"b4",children:[n,", ",i]})]})]}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"lg",className:"px-10 py-10 flex-1 overflow-y-auto min-h-0",children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"xs",children:[(0,b.jsxs)(aj.Heading,{variant:"h2",children:["Congratulations",e?`, ${e}`:"","!"]}),(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:"Your information was submitted successfully."})]}),(0,b.jsx)(aj.Badge,{variant:"light",size:"lg",children:"Now Accepting Students"}),(o||w)&&(0,b.jsxs)(aj.Flex,{ref:N,direction:"column",gap:"md",className:"hidden lg:flex bg-white px-8 py-7 rounded-md",children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"xs",children:[(0,b.jsx)(aj.Heading,{variant:"h4",children:o?"Apply Online Today":"Next Steps"}),o&&(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:"Online applications are fast, convenient, and let you track your acceptance status. Start yours today!"})]}),o&&(0,b.jsx)(aj.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:e=>O(e,o),children:a||"Start Your Application"}),w&&(0,b.jsx)(aj.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:P,children:S})]}),!!u&&(0,b.jsx)(c1,{content:u,configId:d}),(0,b.jsxs)(aj.Timeline,{children:[(0,b.jsx)(aj.TimelineEvent,{title:"What to expect from your application:",index:0,hideMarker:!0,children:(0,b.jsx)(aj.TimelineEventDescription,{index:0,isLast:!1,lineColor:"primary",lineWidth:"thick",children:(0,b.jsxs)(aj.List,{bulletStyle:"bullet",children:[(0,b.jsx)(aj.ListItem,{children:"Most applications don't take long to complete."}),(0,b.jsx)(aj.ListItem,{children:"Be prepared to highlight your strengths, achievements, and individuality to show the school who you are."}),(0,b.jsx)(aj.ListItem,{children:"Depending on the school and degree level, you may be asked to provide your GPA and test scores."}),(0,b.jsx)(aj.ListItem,{children:"After submitting your application, track its status online. The school should have a decision soon."})]})})}),(0,b.jsx)(aj.TimelineEvent,{title:"Preparing for a chat with your advisor:",index:1,hideMarker:!0,children:(0,b.jsx)(aj.TimelineEventDescription,{index:1,isLast:!1,lineColor:"primary",lineWidth:"thick",children:(0,b.jsxs)(aj.List,{bulletStyle:"bullet",children:[(0,b.jsxs)(aj.ListItem,{children:["Generally, you can expect to be called immediately or within 2 business days, depending on the availability of the school's counselors. If you miss your call, ",t," ","will try again."]}),(0,b.jsx)(aj.ListItem,{children:"Calls average 20-30 minutes, and you'll typically receive a follow-up email afterwards."}),(0,b.jsx)(aj.ListItem,{children:"Be prepared to talk about your work and school history."}),(0,b.jsx)(aj.ListItem,{children:"Write down a few questions before the call."})]})})}),(0,b.jsx)(aj.TimelineEvent,{title:"Here's what other students are asking:",index:2,hideMarker:!0,children:(0,b.jsx)(aj.TimelineEventDescription,{index:2,isLast:!1,lineColor:"primary",lineWidth:"thick",children:(0,b.jsxs)(aj.List,{bulletStyle:"bullet",children:[(0,b.jsx)(aj.ListItem,{children:"What type of courses will I be taking for my degree?"}),(0,b.jsx)(aj.ListItem,{children:"What scholarships and financial aid are available?"}),(0,b.jsx)(aj.ListItem,{children:"How can I estimate my tuition cost, including books and fees?"})]})})})]})]}),(o||w)&&(0,b.jsxs)(aj.Flex,{ref:T,direction:"column",gap:"md",className:"p-6 bg-white shrink-0 border-t border-gray-100 lg:hidden",children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"xs",children:[(0,b.jsx)(aj.Heading,{variant:"h5",children:t}),n&&i&&(0,b.jsxs)(aj.Flex,{direction:"row",align:"center",gap:"xs",children:[(0,b.jsx)(aj.Icon,{icon:"map-pin",size:"sm",color:"secondary","aria-hidden":!0}),(0,b.jsxs)(aj.Text,{variant:"b5",color:"subtext",children:[n,", ",i]})]})]}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"sm",children:[o&&(0,b.jsx)(aj.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:e=>O(e,o),children:a||"Next Steps"}),w&&(0,b.jsx)(aj.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:P,children:S})]}),(0,b.jsx)(aj.Button,{variant:"textOnly",size:"sm",className:"mx-auto",iconAfter:"chevrons-right",onClick:s,children:"Continue browsing schools"})]})]})},c8=U.CONVERSION_DRAWER,c9=({tcpa:e,schoolName:t,schoolSlug:r,programName:n,questions:i,onProgramSubmit:o,tcpaSecondParagraph:a,programFlow:l,leadSubmissionStatus:s,onCloseExperience:c,productClickedCorrelationId:d,dslConfigId:u})=>{let p=s===st.SUBMITTING,f=s===st.UNQUALIFIED,m=r?`https://simple-storage-server.highereducation.com/${r}.png?w=130&h=80`:"",{eventContext:h}=aC(),{triggerElementLoadedEvent:g}=aw(),{sendDebouncedFieldEvent:y}=sb(d,u),x=!!u,w=x&&!f&&!!i?.length,S=sg({eventContext:h,productClickedCorrelationId:d,dslConfigId:u}),I=sy({eventContext:h,productClickedCorrelationId:d,elementType:"dexp-hosted-lead-form",name:"dexp-hosted-lead-form-additional",location:c8,dslConfigId:u}),C=(0,v.useRef)(!1);(0,v.useEffect)(()=>{!C.current&&w&&(C.current=!0,g(I))},[w]);let{ref:j}=sh(w?[av(I),as(S,!0),...i.map((e,t)=>{let r=e.id||`question-${t}`;return af({...S,fieldName:r,fieldType:"TEXT"===e.questionType?"text":"dropdown",fieldLabel:e.title??"",fieldId:r},"FieldViewed")})]:[]),k=(e,t,r)=>{x&&y(e,t,r,!0)},[A,E]=(0,v.useState)({});return(0,b.jsx)(aj.Section,{asChild:!0,variant:"light",padding:"none",gap:null,minHeight:"screen",children:(0,b.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget),r={};t.forEach((e,t)=>{r[t]=e.toString()}),o(r)},children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"lg",className:"px-section-sides py-section-top-bottom",children:[(0,b.jsxs)(aj.Flex,{direction:"row",align:"center",gap:"sm",children:[(0,b.jsx)(aj.Heading,{variant:"h4",children:"This school requires some additional info."}),(0,b.jsx)(aj.Icon,{icon:"circle-alert",size:"lg",color:"secondary","aria-hidden":!0})]}
1),(0,b.jsx)(aj.DegreeCardSimple,{layout:"compact",schoolName:t??"",degreeTitle:n??"",schoolLogo:m}),f?(0,b.jsx)(aj.Flex,{direction:"column",gap:"sm",children:(0,b.jsx)(aj.Text,{variant:"b3",weight:"bold",children:"Sorry, you do not meet the qualification requirements for this program. You can still explore other programs that may be a better fit for your background."})}):(0,b.jsxs)(aj.Flex,{direction:"column",gap:"md",ref:j,children:[i?.map((e,t)=>{let r=e.id||`question-${t}`;return"TEXT"===e.questionType?(0,b.jsx)(aj.Input,{variant:"two-line",label:e.title??"",id:r,name:r,type:"text",onChange:e=>k(r,"text",e.target.value)},r):(0,b.jsxs)("div",{children:[(0,b.jsx)("input",{type:"hidden",name:r,value:A[r]??""}),(0,b.jsx)(aj.Select,{variant:"two-line",label:e.title??"",id:r,placeholder:"Select...",value:A[r],onValueChange:e=>{E(t=>({...t,[r]:e})),k(r,"dropdown",e)},children:e.options?.map(e=>(0,b.jsx)(aj.SelectItem,{value:String(e.value??""),children:e.text},e.optionId))})]},r)}),(0,b.jsx)(sp,{title:"",tcpaSecondParagraph:a,tcpa:e,schoolId:r,schoolName:t,programFlow:l})]}),f&&(0,b.jsx)(aj.Flex,{direction:"row",children:(0,b.jsx)(aj.Button,{type:"button",variant:"primaryOutline",size:"sm",onClick:c,children:"Close"})})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aj.Flex,{className:"flex-1"}),(0,b.jsx)(aj.Section,{variant:"white-border-top",padding:"section",position:"sticky-bottom",children:(0,b.jsxs)(aj.Flex,{direction:"column",gap:"sm",align:"center",children:[(0,b.jsx)(aj.Text,{variant:"b4",weight:"bold",children:"Double check your information before submitting"}),(0,b.jsx)(aj.Text,{variant:"b5",color:"subtext",children:"Your information will never be shared with a school without your consent."}),(0,b.jsx)(aj.Button,{type:"submit",variant:"primaryFill",size:"lg",disabled:p,children:p?(0,b.jsx)(aj.LoadingDots,{color:"white",label:"Submitting additional information"}):"Submit"})]})})]})]})})},c7=({status:e,schoolName:t,onRetry:r,onCloseExperience:n})=>e?(0,b.jsx)(aj.Flex,{direction:"column",justify:"center",align:"center",height:"full",width:"full",className:"min-h-status-panel px-3 text-center",children:(0,b.jsxs)(aj.Flex,{direction:"column",justify:"center",align:"center",gap:"md",className:"animate-fade-in-0 motion-reduce:animate-none",children:[e===st.SUBMITTING&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aj.LoadingDots,{label:`Requesting information from ${t}...`,color:"primary"}),(0,b.jsxs)(aj.Heading,{variant:"h4",children:["Requesting information from ",t,"..."]}
1)]}),e===st.SUBMITTED&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aj.Icon,{icon:"circle-check",size:"4xl",color:"primary","aria-hidden":!0}),(0,b.jsxs)(aj.Text,{variant:"b1",children:["Successfully requested information from"," ",(0,b.jsxs)("strong",{children:[t,"!"]})]})]}),e===st.ERROR&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aj.Icon,{icon:"circle-alert",size:"4xl",color:"secondary","aria-hidden":!0}),(0,b.jsxs)(aj.Text,{variant:"b1",children:["Unable to request information from ",(0,b.jsx)("strong",{children:t})]}),(0,b.jsx)(aj.Text,{variant:"b3",color:"subtext",children:"Something went wrong. Please try again in a moment."}),r&&(0,b.jsx)(aj.Button,{variant:"primaryFill",onClick:r,children:"Try again"})]}),e===st.UNQUALIFIED&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aj.Icon,{icon:"circle-alert",size:"4xl",color:"warning","aria-hidden":!0}),(0,b.jsx)(aj.Heading,{variant:"h4",children:"This program isn't a fit right now"}),(0,b.jsx)(aj.Text,{variant:"b3",color:"subtext",className:"max-w-sm",children:"You don't meet the qualification requirements for this program. You can still explore other programs that may be a better fit."}),(0,b.jsx)(aj.Button,{variant:"primaryFill",onClick:n,children:"Browse other programs"})]})]},e)}):null;function de(e,t){let r=e?.applicationCtaURL;if(!r)return;let{applicationCtaFieldMap:n,applicationCtaStaticParams:i}=e??{};if(!n&&!i)return r;let o=c5({baseUrl:r,fieldMap:n,staticParams:i,missingValue:e?.applicationCtaMissingValue,sources:t});return"href"in o?o.href:void 0}let dt=({PiiConfirmationComponent:e,ExitStrategyComponent:t,AdditionalQuestionsComponent:r,SubmissionStatusComponent:n,step:i,selectedResult:o,startTime:a,piiLeadErrors:l,editMode:s,setEditMode:c,degree:d,isLoading:u,leadSubmissionStatus:p,setLeadSubmissionStatus:f,canSubmit:m,formHeading:h,formSubHeading:g,firstName:y,lastName:v,email:x,phone:w,setFirstName:S,setLastName:I,setEmail:C,setPhone:j,formErrors:k,questions:A,onProgramSubmit:E,onNextSteps:N,onBackButtonClick:T,onCloseExperience:O,productClickedCorrelationId:P,dslConfigId:L,studentLoansInlineContent:M,extraCtaConfig:R,partnerIdentifiers:F,showExitStrategyCloseButton:U})=>{if((p!==st.UNQUALIFIED||i!==ss.ADDITIONAL_QUESTIONS)&&(p===st.SUBMITTING||p===st.ERROR||p===st.SUBMITTED||p===st.UNQUALIFIED)&&n)return(0,b.jsx)(n,{status:p,schoolName:o?.schoolName,onRetry:E,onCloseExperience:O});let $={PII_CONFIRMATION:e,EXIT_STRATEGY:t,ADDITIONAL_QUESTIONS:r}[i];if(!$)return null;let _={firstName:y,lastName:v,email:x,phoneNumber:w},D={selectedResult:o,startTime:a,piiLeadErrors:l,editMode:s,setEditMode:c,degree:d,isLoading:u,leadSubmissionStatus:p,setLeadSubmissionStatus:f,canSubmit:m,formHeading:h,formSubHeading:g,firstName:y,lastName:v,email:x,phone:w,setFirstName:S,setLastName:I,setEmail:C,setPhone:j,formErrors:k,questions:A,onFormError:()=>{},onProgramSubmit:E,formCorrelationId:"",setPiiLeadErrors:()=>{},setFormErrors:()=>{},tcpa:o?.tcpa||"",schoolName:o?.schoolName||"",schoolSlug:o?.schoolSlug||"",city:o?.city,state:o?.state,programName:o?.programName||"",programFlow:o?.programFlow||[],tcpaSecondParagraph:o?.tcpaSecondParagraph||"",imageURL:o?.imageURL,valueProps:o?.valueProps,programDates:o?.programDates,onBackButtonClick:T,onCloseExperience:O,introText:o?.confirmationShortIntroText||o?.confirmationText||"",applicationCtaUrl:de(o,{lead:_,partnerIdentifiers:F}),applicationCtaLabel:o?.applicationCtaLabel,applicationCtaFieldMap:o?.applicationCtaFieldMap,productClickedCorrelationId:P,dslConfigId:L,studentLoansInlineContent:M,extraCta:R?{enabled:R.enabled,label:R.label,eventName:R.eventName,destination:o?.postLeadCta}:void 0,partnerIdentifiers:F,...R&&o?.postLeadCta?.url||o?.applicationCtaFieldMap?{lead:_}:{},showCloseButton:U};return(0,b.jsx)($,{...D})},dr=e=>(0,b.jsx)(dt,{...e,PiiConfirmationComponent:sC,ExitStrategyComponent:c6,AdditionalQuestionsComponent:c9,SubmissionStatusComponent:c7}),dn=({open:e,onClose:t,children:r,title:n="Program submission"})=>{let i=sI("(max-width: 767px)");return(0,b.jsx)(aj.Drawer,{direction:i?"bottom":"right",open:e,onOpenChange:e=>{e||t()},children:(0,b.jsxs)(aj.DrawerContent,{size:i?"full":"1/2",className:"bg-neutral-50 overflow-x-hidden overflow-y-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden data-[vaul-drawer-direction=bottom]:!max-h-full data-[vaul-drawer-direction=bottom]:!mt-0 data-[vaul-drawer-direction=bottom]:w-full data-[vaul-drawer-direction=bottom]:max-w-full",bottomBarEnd:i?(0,b.jsx)(aj.DrawerClose,{asChild:!0,children:(0,b.jsx)(aj.Button,{type:"button",variant:"iconOnly",size:"sm",iconBefore:"x","aria-label":"Close program details",className:"shrink-0"})}):void 0,children:[(0,b.jsxs)(aj.DrawerHeader,{className:"sr-only",children:[(0,b.jsx)(aj.DrawerTitle,{children:n}),(0,b.jsx)(aj.DrawerDescription,{children:"Review program details and confirm your contact information."})]}),r]})})},di=({productClickedCorrelationId:e})=>{let[t,r]=(0,v.useState)(ss.PII_CONFIRMATION),[n,i]=(0,v.useState)(!1),{eventContext:o}=aC(),{triggerElementClickedEvent:a}=aw(),l=(0,v.useCallback)(()=>{i(!1),r(ss.PII_CONFIRMATION)},[]),s=(0,v.useCallback)(()=>{i(!1),a({...o,productClickedCorrelationId:e,elementType:"dexp-slideout-close",name:"dexp-slideout-close-button",text:"X",location:U.CONVERSION_DRAWER})},[e,o,a]),c=(0,v.useCallback)(()=>i(!0),[]),d=(0,v.useCallback)(()=>r(ss.PII_CONFIRMATION),[]),u=(0,v.useCallback)(()=>r(ss.ADDITIONAL_QUESTIONS),[]),p=(0,v.useCallback)(()=>r(ss.EXIT_STRATEGY),[]);return{showSlideoutExperience:n,closeSlideoutExperience:s,resetSlideoutExperience:l,openSlideoutExperience:c,singleSubmissionExperienceStep:t,setSingleSubmissionExperienceStep:r,goToSlideoutPiiConfirmation:d,goToSlideoutExitStrategy:p,goToSlideoutAdditionalQuestions:u}},da=async({postResultsQuestions:e,programFlowQuestions:t,requiredFields:r,schema:n})=>{if(!e||!r)return[];let i=e.filter(e=>e.leadFieldAssociated&&r.includes(e.leadFieldAssociated)),o=[],a=new Set;
1(t??[]).forEach(e=>{if(e.type!==O.QUESTION)return;let t=e.leadFieldAssociated,n=!!t&&r.includes(t),i=!1,l=new Set;e.options&&e.options.forEach(e=>{e.leadFieldAssociated&&r.includes(e.leadFieldAssociated)&&(i=!0,l.add(e.leadFieldAssociated))}),(n||i)&&(o.push(e),n&&t&&a.add(t),l.forEach(e=>a.add(e)))});let l=new Set;o.forEach(e=>{e.leadFieldAssociated&&l.add(e.leadFieldAssociated),e.options&&e.options.forEach(e=>{e.leadFieldAssociated&&l.add(e.leadFieldAssociated)})});let s=[...o,...i.filter(e=>!e.leadFieldAssociated||!l.has(e.leadFieldAssociated))],c=n?.properties?.programTrack?.anyOf?.map(e=>e.enum).flat(),d=s.map(e=>{if(e?.leadFieldAssociated!=="programTrack"||!c||0===c.length||!e.options||!Array.isArray(e.options))return e;let t=new Set(c),r=e.options.filter(e=>e.value&&t.has(e.value));return{...e,options:r}}),u=new Set;return a.forEach(e=>u.add(e)),d.forEach(e=>{e?.leadFieldAssociated&&u.add(e.leadFieldAssociated)}),[...d,...r.filter(e=>!u.has(e)).map(e=>({id:`default-${e}`,type:O.QUESTION,questionType:N.TEXT,title:`${e}*`,leadFieldAssociated:e,isTerminal:!1,options:[]}))]},dl="";function ds(){if(dl)return dl;if("undefined"==typeof document)return"";let e=document.querySelector('input[name="xxTrustedFormCertUrl"]');return e?.value??""}function dc(e,t=3e3){let r=e();return r?Promise.resolve(r):new Promise(r=>{let n=Date.now(),i=setInterval(()=>{(e()||Date.now()-n>=t)&&(clearInterval(i),r(e()))},100)})}async function dd(e){let[t,r]=await Promise.all([dc(()=>du()||e.jornayaToken),e.needsActiveProspectToken?dc(()=>ds()||e.activeProspectToken):Promise.resolve(ds()||e.activeProspectToken)]);return{jornayaToken:t,activeProspectToken:r}}function du(){return window.LeadiD?.token??""}let dp="default",df=[{fieldName:"first-name",fieldType:"text",fieldValue:"SANITIZED"},{fieldName:"last-name",fieldType:"text",fieldValue:"SANITIZED"},{fieldName:"email",fieldType:"text",fieldValue:"SANITIZED"},{fieldName:"phone",fieldType:"text",fieldValue:"SANITIZED"}],dm=({lead:e,needsActiveProspectToken:t,activeProspectToken:r,jornayaToken:n,programId:i,selectedResult:o,productClickedCorrelationId:a,contactId:l,inputs:s,record:c,dslConfigId:d,flowType:u,trafficSource:p,monetizationChannel:f,precreatedConversionId:m,onLeadSubmitted:h})=>{let[g,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(!1),[w,S]=(0,v.useState)([]),[I,C]=(0,v.useState)(!1),[j,k]=(0,v.useState)(null),{eventContext:E}=aC(),{triggerFormEvents:N}=aw(),T=ro(),O=async()=>{C(!0),k(null);try{let i=Y(),a=o?.organizationId?.trim(),l=o?.offeringUuid?.trim();if(!a)throw Error("LDS v4 organizationId is required to fetch post-result questions");let s=tv(A()),c=new tZ({baseUrl:i.deliverySystemApiUrl||"",defaultHeaders:s}),d=await dd({jornayaToken:n,activeProspectToken:r,needsActiveProspectToken:t||!1}),u=t?d.activeProspectToken:d.jornayaToken,p=await c.getLeadSchemaV4({organizationId:a,offeringUuid:l}),f=p.required?.includes("thirdPartyLeadId")?{...e,thirdPartyLeadId:u}:e,m=await c.getDiffyV4({lead:f},{organizationId:a,offeringUuid:l});if(!m?.diffy)throw Error("LDS v4 diffy response did not include a diffy schema");let h=m.diffy,g=o?.programFields?.flowId,y=[];if(g){let e=await en(dp,g);e.error&&console.warn(`Failed to fetch program-fields flow "${g}": ${e.error}`),y=e.data??[]}let b=(await en(dp,"prq-flow")).data||[],v=h.required||[],x=[],w=new Set,S=h.properties||{};return Object.entries(S).forEach(([e,t])=>{let r=t.required;Array.isArray(r)&&r.length>0&&(w.add(e),r.forEach(e=>{x.includes(e)||x.push(e)}))}),v.forEach(e=>{let t=w.has(e),r=x.includes(e);t||r||x.push(e)}),await da({postResultsQuestions:b,programFlowQuestions:y,requiredFields:x,schema:p})}catch(e){throw k(e instanceof Error?e:Error("Unknown error")),e}finally{C(!1)}},P=async i=>{if(!c)throw Error("Cannot submit lead: record is not available");if(!o)throw Error("Cannot submit lead: selectedResult is not available");y(!0);try{let s=m;if(!s){let t=r4(o,T??{},o.productClickedCorrelationId||a,{flowType:u,trafficSource:p,monetizationChannel:f,location:{country:e.location?.country,state:e.location?.stateAbbr??e.location?.state}});s=(await ns(t)).conversionId}let d=await dd({jornayaToken:n,activeProspectToken:r,needsActiveProspectToken:t||!1}),g=await nc({activeProspectToken:d.activeProspectToken,jornayaToken:d.jornayaToken,needsActiveProspectToken:t||!1,record:c,result:o,conversionId:s,inputs:i,productC
1orrelationId:a,contactId:l,identityToken:T?.identityToken,monetizationChannel:f});return h?.(g),g}finally{y(!1)}},L=(0,v.useCallback)((t,r,n)=>{let i=[];n&&w.length>0&&Object.entries(n).forEach(([e,t])=>{let r=w.find(t=>t.id===e);r&&i.push({fieldName:r.title||e,fieldType:r.type||"text",fieldValue:rh(String(r.leadFieldAssociated),r,r.title)?"SANITIZED":String(t??"")})});let a=de(o,{lead:e,partnerIdentifiers:r?sr(r):void 0});N("FormSubmitted",{...E,productClickedCorrelationId:t,outboundUrl:r6(a,o?.applicationCtaFieldMap)??"",formName:"dexp-hosted-lead-form",stepName:"pii-confirmation",stepType:"LEAD",field:[...df,...i]})},[E,N,w,o,e]),M=(0,v.useCallback)(()=>{d&&N("FormContinued",{...E,productClickedCorrelationId:a,formName:"dexp-hosted-lead-form",stepName:"pii-confirmation",stepType:"LEAD",field:[...df]})},[E,a,d,N]),R=(0,v.useCallback)(async()=>{try{let e=await O();if(0!==e.length)return M(),S(e),x(!0),{hasQuestions:!0};{let e=await P(s);return L(a,e),{hasQuestions:!1}}}catch(e){throw console.error("Error checking for additional questions:",e),k(e instanceof Error?e:Error("Unknown error")),e}},[e,i,a,l,s,c,L,M]),F=(0,v.useCallback)(async e=>{let t={};Object.entries(e).forEach(([e,r])=>{let n=w.find(t=>t.id===e),i=n?.leadFieldAssociated||n?.options?.find(e=>e.leadFieldAssociated&&String(e.value)===String(r))?.leadFieldAssociated;i&&(t[i]={key:i,value:r})});let r={...s,...t};L(a,await P(r),e),x(!1),S([])},[s,c,a,l,w,L]);return{isSubmitting:g,showAdditionalQuestions:b,additionalQuestions:w,isLoadingQuestions:I,questionsError:j,checkForAdditionalQuestionsAndSubmit:R,submitWithAdditionalData:F,resetAdditionalQuestions:(0,v.useCallback)(()=>{x(!1),S([])},[])}},dh=e=>{let[t,r]=(0,v.useState)(ds);return(0,v.useEffect)(()=>{if(!e||"undefined"==typeof document)return;window.trustedFormCallback=e=>{e&&(dl=e),r(e)};let t=ds();if(t&&r(t),document.querySelector('script[src*="cdn.trustedform.com/bootstrap.js"]'))return;let n=new Date().getTime()+Math.random(),i="http:"===document.location.protocol?"http":"https",o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=`${i}://cdn.trustedform.com/bootstrap.js?provide_referrer=false&field=xxTrustedFormCertUrl&l=${n}&invert_field_sensitivity=false&use_tagged_consent=true`,document.body.appendChild(o)},[e]),t},dg=e=>{let[t,r]=(0,v.useState)(du);return(0,v.useEffect)(()=>{if(!e||"undefined"==typeof document)return;if(!document.querySelector('script[src*="create.lidstatic.com/campaign/1a8b1fee-893f-e8f5-901a-5d12b2e0d47b.js"]')){let e=document.createElement("script");e.id="LeadiDscript_campaign",e.type="text/javascript",e.async=!0,e.src="//create.lidstatic.com/campaign/1a8b1fee-893f-e8f5-901a-5d12b2e0d47b.js?snippet_version=2",document.body.appendChild(e)}let t=du();if(t)return void r(t);let n=Date.now(),i=setInterval(()=>{let e=du();if(e){r(e),clearInterval(i);return}Date.now()-n>=3e3&&clearInterval(i)},100);return()=>clearInterval(i)},[e]),t},dy=e=>{if(!e||0===e.length)return;let t=new Date().getTime(),r=e.find(e=>new Date(e.registerDate).getTime()>t);return r&&Object.keys(r).forEach(e=>{let t=new Date(r[e]);t.setDate(t.getDate()+1),r[e]=new Date(t).toLocaleString("en-US",{month:"long",day:"numeric"})}),r},db=/^(Master's|Doctorate)$/i,dv=(e,t,r,n,i,o,a)=>{let l=A();return e.map(e=>{let s=parseInt(e.organization.id,10),c=t[s]??(Number.isFinite(e.organization.sourceId)?t[e.organization.sourceId]:void 0)??(e.organization.slug?a?.[e.organization.slug]:void 0),d=n&&n.includes(s)?function(e,t,r,n,i){if(!n)return;let o=i||Y().mobiusApiUrl||"https://api.mobius.highereducation.com",a=`idToken=${n}&helid=${A()}`;return`${o}/v1/redirect/${e}/${t}`+(""!==r&&"none"!==r?`/${r}`:"")+`?${a}`}(e.id,e.meta.capId,e.meta.audience||"",i,o):void 0;return{schoolName:e?.organization?.name,schoolId:e?.organization?.id,schoolSlug:e?.organization?.slug,city:c?.location?.city||c?.tags?.city||"",state:c?.location?.state||c?.tags?.state||"",programId:e?.id,programName:e?.name,imageURL:c?.images?.logo||e?.imageUrl,snippet:e?.snippet,levelOfInstitution:c?.additional?.levelOfInstitution||"",accreditator:c?.additional?.accreditator||"",percentOnlineEnrollment:c?.additional?.percentOnlineEnrollment||null,isOnline:c?.tags?.isOnline??!1,isPublic:c?.tags?.isPublic,isPrivate:c?.tags?.isPrivate,forProfit:c?.tags?.isForProfit,notForProfit:c?.tags?.isNotForProfit??!1,applicationCtaLabel:e?.meta?.applicationCta?.label,applicationCtaURL:e?.meta?.applicationCta?.url,programFlow:c?.formCustomizations?.programFlow,..."boolean"==typeof c?.formCustomizations?.showActiveProspectScript&&{showActiveProspectScript:c.formCustomizations.showActiveProspectScript},tcpa:c?.content?.tcpa,tcpaSecondParagraph:c?.tcpaSecondParagraph,confirmationShortIntroText:c?.content?.confirmation?.meta?.shortIntro,confirmationText:c?.content?.confirmation?.meta?.text,valueProps:c?.content?.valueProps,programDates:db.test(r||"")?dy(c?.formDates?.grad):dy(c?.formDates?.undergrad),providerName:e?.meta?.providerName,viewCorrelationId:A(),embeddedViewCorrelationId:A(),spotlight:c?.content?.spotlight,audie
1nce:e.meta.audience,capId:e.meta.capId,linkoutUrl:d,degreeSlug:e.meta?.degree?.slug,categorySlug:e.meta?.category?.slug,subjectSlug:e.meta?.subject?.slug,listId:l}})},dx=async e=>{if(!e.lead)throw Error("Lead is required to fetch qualified results");let t="undefined"!=typeof navigator?navigator.userAgent:"",r=Y(),n=r.deliverySystemApiUrl??"",i=r.offeringsSearchApiUrl??"",o=r.organizationApiUrl??"",a=r.mobiusApiUrl??"",l={...tv(A())};try{let r,s=e.qualified||[],c=e.unqualified||[],d=s.map(e=>({id:e})),u=c.map(e=>({id:e}));if(!e.qualified&&!e.unqualified){let t=new tZ({defaultHeaders:l,baseUrl:n}),r=await t.postLeadQualifications({lead:e.lead,trackingContext:e.trackingContext||{}});if(!r)throw Error("Invalid qualifications response");s=r.qualified?.map(e=>e.id).filter(e=>!!e)||[],c=r.unqualified?.map(e=>e.id).filter(e=>!!e)||[],d=(r.qualified||[]).flatMap(e=>e.id?[{id:e.id}]:[]),u=(r.unqualified||[]).flatMap(e=>e.id?[{id:e.id}]:[])}let p=await eu(),f=p?.regionCode||e.lead.location?.state||"CA",m=p?.countryCode||"US",h=e.lead.location?.state||f,g=e.lead.location?.country||m,y={state:h,degree:e.degree||"",category:e.category||"",subject:e.subject||"",qualified:s,unqualified:c,country:g,channel:"web",media:"organic",experience:"voyager",presentationUrl:e.presentationUrl||"",startDate:e.lead.startDate||void 0,schoolIds:e.schoolIds,excludeProgramIds:e.excludeProgramIds,limit:e.limit};e.forceLinkoutSchoolIds&&Array.isArray(e.forceLinkoutSchoolIds)&&e.forceLinkoutSchoolIds.length>0&&(y.forceAudience={audience:"branded",schoolIds:e.forceLinkoutSchoolIds});let b=new e7({baseUrl:i,defaultHeaders:l}),v=await b.getQualifiedOfferings(y,p?.ip?p.ip:null);if(!v||!v?.data)throw Error("No qualified offerings found");let{exact:x,related:w,recommended:S,spotlight:I}=v.data,C=[...x,...w,...S,...I],j=Array.from(new Set(C.map(e=>parseInt(e.organization.id)).filter(e=>void 0!==e&&!isNaN(e)))),k={},A={};if(j.length>0)try{let e=new lO({baseUrl:o,defaultHeaders:l}),r=await e.postMarketingLookup({schoolIds:j,isPreview:!1,version:"latest"},t||"unknown"),n=r?.data||[];for(let e of(k={},A={},n))"number"==typeof e.organizationId&&(k[e.organizationId]=e),e.slug&&(A[e.slug]=e)}catch(e){console.warn("Failed to fetch organization marketing data, continuing without it",e)}let E=(({degree:e,exactOfferings:t,relatedOfferings:r})=>{if(!t||!r)return[];let n=0;if("Associate's"===e&&t.length<4&&(n=4),"Bachelor's"===e&&t.length<6&&(n=6),0!==n){var i;let e,o;return(e=new Set,i=r.filter(t=>{let r=t.organization.id;return!e.has(r)&&(e.add(r),!0)}),o=new Set(t?.map(e=>e.organization.id)??[]),i?.filter(e=>!o.has(e.organization.id)))?.slice(0,n-t.length)}return[]})({degree:e.degree,exactOfferings:x,relatedOfferings:w}),N=[...x,...E],T=(r=new Set(E?.map(e=>e.id)??[]),w?.filter(e=>!r.has(e.id)));return{qualified:d,unqualified:u,locationInference:{stateAbbr:f,countryCode:m},exactResults:dv(N,k,e.degree,e.forceLinkoutSchoolIds,e.publisherToken,a,A),relatedResults:dv(T,k,e.degree,e.forceLinkoutSchoolIds,e.publisherToken,a,A),recommendedResults:dv(S,k,e.degree,e.forceLinkoutSchoolIds,e.publisherToken,a,A),spotlightResults:dv(I,k,e.degree,e.forceLinkoutSchoolIds,e.publisherToken,a,A)}}catch(e){throw console.error("Could not fetch qualified results",e),e}},dw=async({lead:e,degree:t,category:r,subject:n,presentationUrl:i,forceLinkoutSchoolIds:o,schoolId:a,excludeProgramIds:l,limit:s,qualified:c,unqualified:d})=>{if(!a)throw Error("schoolId is required to fetch duplicate programs");return(await dx({lead:e,degree:t,category:r,subject:n,presentationUrl:i,forceLinkoutSchoolIds:o,schoolIds:[a],excludeProgramIds:l,limit:s,exactOnly:!0,qual
1ified:c,unqualified:d})).exactResults},dS=({duplicateResult:e,leadRef:t,degree:r,category:n,subject:i,forceLinkoutSchoolIds:o,qualifiedIds:a,unqualifiedIds:l})=>{let[s,c]=(0,v.useState)([]),[d,u]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{if(!e){c([]),u(!1);return}let s=parseInt(e.schoolId,10);if(Number.isNaN(s))return;let d=!1,p=window.location.href;return(async()=>{u(!0);try{if(!t.current){console.warn("Lead is not available for fetching duplicate programs"),d||c([]);return}let u=await dw({lead:t.current,degree:r,category:n,subject:i,presentationUrl:p,forceLinkoutSchoolIds:o,schoolId:s,excludeProgramIds:[e.programId],limit:50,qualified:a,unqualified:l});d||c(u)}catch(e){console.error("Error fetching duplicate programs",e),d||c([])}finally{d||u(!1)}})(),()=>{d=!0}},[n,r,e,i,a,l,o,t]),{duplicatePrograms:s,duplicateProgramsLoading:d}},dI=[64,75,142,495,1151,81];function dC(e){let t=e?.schoolId,r=e?.organizationId,n=e?.showActiveProspectScript,i=(0,v.useMemo)(()=>{var e;let i,o,a;return e={schoolId:t??"",organizationId:r,showActiveProspectScript:n},o=Number.isFinite(i=Number(e?.schoolId))&&dI.includes(i),"boolean"==typeof(a=e?.showActiveProspectScript)?{needsActiveProspectToken:a,source:"orgFlag",isMismatch:a!==o,isOnLegacyList:o}:{needsActiveProspectToken:o,source:o?"legacyList":"none",isMismatch:!1,isOnLegacyList:o}},[t,r,n]);return(0,v.useEffect)(()=>{("legacyList"===i.source||i.isMismatch)&&nr("DynamicExperiencesActiveProspectResolution",{source:i.source,isMismatch:i.isMismatch,isOnLegacyList:i.isOnLegacyList,needsActiveProspectToken:i.needsActiveProspectToken,schoolId:String(t??""),organizationId:r??""})},[i,t,r]),i.needsActiveProspectToken}let dj=e=>e instanceof Error&&e.message.includes("qualifications_not_met")?st.UNQUALIFIED:st.ERROR,dk=async(e,t,r,n,i,o,a)=>{let l=e.offeringId?.trim()||e.offeringUuid?.trim(),s=t?.tenantId?.trim();if(!l||!s)return;let c=e.offeringId?.trim()?e:{...e,offeringId:l};try{let l=r4(c,t??{},e.productClickedCorrelationId||r,{flowType:n,trafficSource:o,monetizationChannel:a,location:i});return(await ns(l)).conversionId}catch(e){console.error("[ensureConversion] click-time conversion create failed; the user still routes into the application view",e);return}},dA=(0,v.createContext)(void 0),dE=!1,dN=[],dT=Object.freeze({openLeadFlow:()=>{dE||(dE=!0,console.warn("[LeadFlowProvider] openLeadFlow dispatched without a LeadFlowProvider in scope; dropping."))},closeLeadFlow:()=>{},selectedResult:void 0,isOpen:!1,mode:"drawer",firstName:void 0,leadFlowContent:null,submittedResults:dN,applyOfferingDetail:()=>{}}),dO=[],dP=({children:e,dslConfigId:t,flowType:r,trafficSource:n,monetizationChannel:i,studentLoansInlineContent:o,extraCtaConfig:a})=>{let[l,s]=(0,v.useState)(),[c,d]=(0,v.useState)(void 0),[u,p]=(0,v.useState)("drawer"),[f,m]=(0,v.useState)(),[h,g]=(0,v.useState)(),{flowState:y,steps:x}=aC(),w=so(),S=(0,v.useRef)(w);S.current=w;let I=(0,v.useMemo)(()=>rS(y??{}),[y]),C=(0,v.useMemo)(()=>ry(x??[],y??{}),[x,y]),[j,k]=(0,v.useState)(""),[E,N]=(0,v.useState)(""),[T,O]=(0,v.useState)(""),[P,L]=(0,v.useState)(""),[M,R]=(0,v.useState)(!1),[F,U]=(0,v.useState)(void 0),[$,_]=(0,v.useState)(void 0),[D,Y]=(0,v.useState)(void 0),B=(0,v.useCallback)(e=>{Y(sr(e))},[]),z=(0,v.useRef)(0),V=(0,v.useRef)(new Map),H=ro();(0,v.useEffect)(()=>{k(e=>e||(I.firstName?.value?.toString()??"")),N(e=>e||(I.lastName?.value?.toString()??"")),O(e=>e||(I.email?.value?.toString()??"")),L(e=>e||(I.phoneNumber?.value?.toString()??""))},[I]);let q=(0,v.useMemo)(()=>({...I,...!I.country?{country:{key:"country",value:"US"}}:{},firstName:{key:"firstName",value:j},lastName:{key:"lastName",value:E},email:{key:"email",value:T},phoneNumber:{key:"phoneNumber",value:P}}),[I,j,E,T,P]),G=(0,v.useMemo)(()=>rV(q),[q]),W=(0,v.useRef)(G);(0,v.useEffect)(()=>{W.current=G},[G]);let Q=(0,v.useMemo)(()=>(w?.submittedResults??dN).map(e=>({programId:e.programId,schoolId:e.schoolId})),[w?.submittedResults]),K=(0,v.useMemo)(()=>l?.productClickedCorrelationId||A(),[l]),{showSlideoutExperience:J,closeSlideoutExperience:X,resetSlideoutExperience:Z,openSlideoutExperience:ee,singleSubmissionExperienceStep:et,goToSlideoutPiiConfirmation:er,goToSlideoutAdditionalQuestions:en,goToSlideoutExitStrategy:ei}=di({productClickedCorrelationId:K}),eo=dh(!0),ea=dg(!0),el=(0,v.useMemo)(()=>
1{if(l)return{school:{id:l.schoolId,slug:l.schoolSlug,name:l.schoolName},program:{id:l.programId,leadSource:C.leadSource}}},[l,C]),{additionalQuestions:es,checkForAdditionalQuestionsAndSubmit:ec,submitWithAdditionalData:ed}=dm({lead:G,needsActiveProspectToken:dC(l),activeProspectToken:eo||"",jornayaToken:ea,programId:l?.programId.toString()||"",selectedResult:l,productClickedCorrelationId:K,inputs:q,record:el,applicationCtaURL:l?.applicationCtaURL||"",dslConfigId:t,flowType:r,trafficSource:n,monetizationChannel:i,precreatedConversionId:$,onLeadSubmitted:B}),{duplicatePrograms:eu,duplicateProgramsLoading:ep}=dS({duplicateResult:f??null,leadRef:W,degree:C.levelOfEducation,category:C.category,subject:C.subject,qualifiedIds:dO,unqualifiedIds:dO}),ef=(0,v.useMemo)(()=>{let e=F===st.SUBMITTING,t=!j||!E||!T||!P;return!e&&!!l&&!t},[F,l,j,E,T,P]),em=(0,v.useRef)(l);em.current=l;let eh=(0,v.useCallback)(()=>{let e=em.current;e&&S.current?.trackSubmission(e)},[]),eg=(0,v.useCallback)(async()=>{U(st.SUBMITTED),eh();let e=em.current;await new Promise(e=>setTimeout(e,1500)),em.current===e&&(U(void 0),ei())},[eh,ei]),ey=(0,v.useCallback)((e,t,o="pii")=>{if(em.current?.offeringUuid!==e.offeringUuid&&d(void 0),s(e),U(void 0),p(t?.mode??"drawer"),"pii"===o&&Y(void 0),_(void 0),"pii"===o&&nf(e)){let t=e.productClickedCorrelationId||e.offeringId||e.offeringUuid||String(e.programId),o=V.current.get(t);if(o)_(o);else{let o=z.current+=1,a=y?.location;dk(e,H,e.productClickedCorrelationId||"",r,{country:a?.countryCode,state:a?.state},n,i).then(e=>{e&&z.current===o&&(V.current.set(t,e),_(e))})}}"exitStrategy"===o?ei():er(),ee()},[er,ei,ee,H,r,n,i,y]),eb=(0,v.useCallback)((e,t)=>{if(!nf(e))return void console.warn("[LeadFlowProvider] openLeadFlow ignored â result must carry a numeric programId and either a non-empty offeringUuid or the full schoolId, schoolSlug, schoolName, and programName quartet.");let r=S.current;if(r){if(r.isProgramSubmitted(e.programId))return void ey(e,t,"exitStrategy");if(!t?.skipDuplicateCheck&&r.hasSchoolSubmitted(e.schoolId)){m(e),g(t);return}}ey(e,t)},[ey]),ev=(0,v.useCallback)(()=>{m(void 0),g(void 0)},[]),ex=(0,v.useCallback)(()=>{if(m(void 0),g(void 0),!f)return;let e=S.current?.getSubmittedForSchool(f.schoolId);e&&ey(e,h,"exitStrategy")},[f,h,ey]),ew=(0,v.useCallback)(async()=>{try{U(st.SUBMITTING);let{hasQuestions:e}=await ec();e?(U(st.PENDING),en()):await eg()}catch(e){console.error("Error submitting lead:",e),U(dj(e))}},[ec,en,eg]),eS=(0,v.useCallback)(async e=>{try{U(st.SUBMITTING),await ed(e),await eg()}catch(e){console.error("Error submitting lead with additional data:",e),U(dj(e))}},[ed,eg]),eI=(0,v.useCallback)(e=>{et===ss.ADDITIONAL_QUESTIONS&&e?eS(e):ew()},[et,eS,ew]),eC=(0,v.useCallback)(e=>{d(e)},[]),ej=(0,v.useMemo)(()=>{if(!l||c?.status!=="resolved")return l;try{let e=lq(c.data);if(!function(e,t){if(!e||!t)return!1;let r=e.externalIds?.edudirectId,n=e.slug,i=lG(r)&&lG(t.schoolId),o=lG(n)&&lG(t.schoolSlug);return!i&&!o||!!i&&r===t.schoolId||!!o&&n===t.schoolSlug}(e,l))return l;let t=lH(e);return{...l,...t}}catch(e){return ne(e instanceof Error?e:Error(String(e)),{source:"LeadFlowProvider",context:"offering-detail-merge"}),l}},[l,c]),ek=ej?(0,b.jsx)(dr,{selectedResult:ej,step:et,startTime:parseInt(C?.startDate??"",10),piiLeadErrors:[],setEditMode:R,editMode:M,setFirstName:k,setLastName:N,setEmail:O,setPhone:L,formErrors:[],setFormErrors:()=>{},formHeading:"Confirm your contact details:",formSubHeading:"",onBackButtonClick:er,onNextSteps:ei,onProgramSubmit:eI,firstName:j,lastName:E,email:T,phone:P,leadSubmissionStatus:F,setLeadSubmissionStatus:U,canSubmit:ef,isLoading:!1,questions:es,productClickedCorrelationId:K,onCloseExperience:X,dslConfigId:t,studentLoansInlineContent:o,extraCtaConfig:a,partnerIdentifiers:D,showExitStrategyCloseButton:"inline"===u}):null,eA=ek?(0,b.jsx)(sa,{onError:Z,children:ek},l?.offeringUuid||l?.programId):null,eE=(0,v.useMemo)(()=>({openLeadFlow:eb,closeLeadFlow:X,selectedResult:ej,isOpen:J,mode:u,firstName:j||I.firstName?.value?.toString()||void 0,leadFlowContent:eA,submittedResults:Q,applyOfferingDetail:eC}),[eb,X,ej,J,u,j,I.firstName?.value,eA,Q,eC]);return(0,b.jsxs)(dA.Provider,{value:eE,children:[e,"drawer"===u&&(0,b.jsx)(dn,{open:J,onClose:X,children:eA}),f&&(0,b.jsx)(sl,{result:f,otherPrograms:eu,isLoading:ep,onClose:ev,onViewNextSteps:ex})]})};function dL(){return(0,v.useContext)(dA)??dT}function dM(){return(0,v.useContext)(dA)}function dR(e,t,r){let{name:n,payload:i}=ah({correlationId:e.correlationId??A(),viewCorrelationId:e.viewCorrelationId,elementType:"dexp-compare-checkbox",name:"dexp-compare-toggle",location:"dexp-results-page",position:e.position,htmlId:t?"enabled":"disabled",text:"Compare",customDimensions:[{key:"schoolSlug",value:e.schoolSlug},...r?[{key:"dslConfigId",value:r}]:[]]}),o=window._Cohesion?.webContext;ax(n,o?{...i,webContext:o}:i)}function dF(e,t){let r=t??"",n=function(e){if(0===e.length)return[];if(e.includes("["))return null;let t=e.split("."),r=[];for(let e of t){if(0===e.length)return null;r.push({type:"key",name:e})}return r}(r);if(null===n)return console.warn(`[platform.dataRepeater] Invalid iteratorPath "${r}
1" â must be a plain dot path with no [*] wildcards.`),null;let i=it(e,n);return Array.isArray(i)?i:null}let dU=(e,t,r)=>Math.min(r,Math.max(t,e));function d$(e,t){if(0!==t.length)return it(e,t.split(".").map(e=>({type:"key",name:e})))}function d_(e){return"function"==typeof e}function dD({slots:e,children:t,...r}){let n=function({status:e,bound:t=!1,unboundStatus:r="resolved",narrowedToNothing:n=!1,lastUpdatedAt:i,staleAfterMs:o,now:a}){let l=function(e,t,r){if(void 0===e)return{};let n=Math.max(0,(r??Date.now())-e);return void 0===t?{ageMs:n}:{ageMs:n,isStale:n>t}}(i,o,a);switch(t?e??"pending":e??r){case"pending":return{surface:"loading",...l};case"error":return{surface:"error",...l};case"empty":return{surface:"empty",emptyReason:"source-empty",...l};case"resolved":return n?{surface:"empty",emptyReason:"narrowed",...l}:{surface:"ready",...l};default:return{surface:"ready",...l}}}(r);switch(n.surface){case"loading":{let t=e?.loading;return(0,b.jsx)(b.Fragment,{children:(d_(t)?t(n):t)??null})}case"error":{let t=e?.error;return(0,b.jsx)(b.Fragment,{children:(d_(t)?t(n):t)??null})}case"empty":{let t=e?.empty;if(!d_(t))return(0,b.jsx)(b.Fragment,{children:t??null});return(0,b.jsx)(b.Fragment,{children:t({...n,emptyReason:n.emptyReason??"source-empty"})??null})}case"ready":return(0,b.jsx)(b.Fragment,{children:t})}}let dY=({rows:e=3,label:t="Loadingâ¦"})=>{let r=Math.max(1,Math.min(e,12));return(0,b.jsx)("div",{role:"status","aria-busy":"true","aria-label":t,"data-testid":"data-repeater-loading",style:{display:"flex",flexDirection:"column",gap:12,width:"100%"},children:Array.from({length:r},(e,t)=>(0,b.jsx)("div",{"aria-hidden":"true",style:{height:56,borderRadius:8,background:"linear-gradient(90deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.06) 100%)",backgroundSize:"200% 100%"}},t))})},dB=({heading:e="No results",body:t="Try adjusting your filters and search again."})=>(0,b.jsxs)("section",{"aria-labelledby":"data-repeater-empty-heading","data-testid":"data-repeater-empty",style:{padding:24,textAlign:"center"},children:[(0,b.jsx)("h3",{id:"data-repeater-empty-heading",style:{margin:0,fontSize:18,fontWeight:600},children:e}),(0,b.jsx)("p",{style:{marginTop:8,marginBottom:0,color:"rgba(0,0,0,0.65)"},children:t})]}),dz=({heading:e="Couldn't load results",body:t="Please try again in a moment.",ctaLabel:r,onRetry:n})=>(0,b.jsxs)("div",{role:"alert","data-testid":"data-repeater-error",style:{padding:24,textAlign:"center"},children:[(0,b.jsx)("h3",{style:{margin:0,fontSize:18,fontWeight:600},children:e}),(0,b.jsx)("p",{style:{marginTop:8,marginBottom:0,color:"rgba(0,0,0,0.65)"},children:t}),r&&n?(0,b.jsx)("button",{type:"button",onClick:n,style:{marginTop:16,padding:"8px 16px",borderRadius:6,border:"1px solid currentColor",background:"transparent",cursor:"pointer"},children:r}):null]}),dV=[],dH=new Map,dq=new Set(["none","paginated","loadMore","viewMore"]),dG=({item:e,index:t,section:r,children:n})=>{let i=(0,v.useRef)(A()).current,o=(0,v.useRef)(A()).current,a=(0,v.useMemo)(()=>e&&"object"==typeof e?{...e,viewCorrelationId:i,productClickedCorrelationId:o}:e,[e,i,o]);return(0,b.jsx)(ca,{item:a,index:t,section:r,children:n})},dW=({id:e,source:t,iteratorPath:r,pageSize:n,paginationMode:i,limit:o,viewMoreOnExhausted:a,filter:l=!1,filterStateKey:s="activeFilters",filterPath:c="institutionalStats",sortable:d=!1,sortOptions:u,layout:p="flex",direction:f="column",wrap:m="nowrap",align:h="stretch",justify:g="start",columns:y=1,columnsMd:x,columnsLg:w,columnsXl:S,gap:I="sm",emptyStateText:C,errorStateHeading:j,errorStateBody:k,errorCtaLabel:A,onRetry:E,children:N})=>{let T=ll(),{formState:O}=T,P=lz(),L=cs(),M=T.getSource(t),R=M?.data,F=M?.status,U=(0,v.useMemo)(()=>dF(R,r)??[],[R,r]),$="string"==typeof e&&e.length>0?void 0!==L?`${e}::${L}`:e:void 0,_=void 0===$?void 0:P?P.composeDedupKey($):l_({nodeId:$}),D=l?O[s]:void 0,Y=(0,v.useMemo)(()=>{if(!l)return U;let e=D?D.split(",").map(e=>e.trim()).filter(e=>e.length>0):[];return 0===e.length?U.slice():U.map((t,r)=>({row:t,index:r,score:function(e,t,r){if(0===t.length)return 0;let n=function(e,t){if(null===e||"object"!=typeof e)return;let r=e;for(let e of t.split("."))if(0!==e.length){if(null===r||"object"!=typeof r)return;r=r[e]}return null!==r&&"object"==typeof r?r:void 0}(e,r);if(!n)return 0;let i=0;for(let e of t)(function(e,t){let r=e[t];return null!==r&&"object"==typeof r?sX(r.value):sX(r)})(n,e)&&(i+=1);return i}(t,e,c)})).sort((e,t)=>
1t.score-e.score||e.index-t.index).map(e=>e.row)},[l,U,D,c]),B=d&&u&&u.length>0?u:dV,{sortedItems:z,activeSortIndex:V,canSort:H,setActiveSortIndex:q}=function(e,t){let r=t.length>0,[n,i]=(0,v.useState)(0),o=(0,v.useCallback)(e=>{r&&i(dU(e,0,t.length-1))},[r,t.length]),a=(0,v.useMemo)(()=>{if(!r||n<0||n>=t.length)return e;let i=t[n],o="desc"===i.direction?-1:1,a=e.slice();return a.sort((e,t)=>{let r=d$(e,i.field),n=d$(t,i.field);return void 0===r&&void 0===n?0:void 0===r?1:void 0===n?-1:function(e,t){if("number"==typeof e&&"number"==typeof t)return e<t?-1:+(e>t);let r=String(e),n=String(t);return r<n?-1:+(r>n)}(r,n)*o}),a},[e,t,r,n]);return(0,v.useMemo)(()=>({sortedItems:a,activeSortIndex:r?dU(n,0,t.length-1):0,canSort:r,setActiveSortIndex:o}),[a,r,n,t.length,o])}(Y,B),G=i&&dq.has(i)?i:"number"==typeof n&&n>0?"paginated":"none",W="viewMore"===G,Q="none"===G,{visibleItems:K,page:J,totalPages:X,hasMore:Z,goToPage:ee,loadMore:et}=function(e,t,r={}){let n=r.mode??"paginated",i="number"==typeof t&&t>0,o=(0,v.useMemo)(()=>i?0===e.length?0:Math.ceil(e.length/t):+(0!==e.length),[e,t,i]),[a,l]=(0,v.useState)(0),[s,c]=(0,v.useState)(1);(0,v.useEffect)(()=>
1{l(0),c(1)},[e]),(0,v.useEffect)(()=>{i&&a>=o&&o>0&&l(0)},[i,a,o]);let d=(0,v.useCallback)(e=>{i&&l(Math.min(Math.max(0,o-1),Math.max(0,e)))},[i,o]),u=(0,v.useCallback)(()=>{i&&c(e=>Math.min(e+1,o))},[i,o]);return(0,v.useMemo)(()=>{if(!i)return{visibleItems:e,page:0,totalPages:o,hasMore:!1,goToPage:d,loadMore:u};if("loadMore"===n){let r=e.slice(0,Math.min(e.length,s*t));return{visibleItems:r,page:0,totalPages:o,hasMore:r.length<e.length,goToPage:d,loadMore:u}}let r=a*t;return{visibleItems:e.slice(r,r+t),page:a,totalPages:o,hasMore:a<o-1,goToPage:d,loadMore:u}},[e,t,i,n,a,s,o,d,u])}(z,W||Q?void 0:n,{mode:"loadMore"===G?"loadMore":"paginated"}),er=lm(),[en,ei]=(0,v.useState)(()=>{if(!_)return!1;let e=dH.get(_);return void 0!==e&&e.itemsRef===U&&e.expanded}),eo=(0,v.useRef)(U);(0,v.useEffect)(()=>{eo.current!==U&&(eo.current=U,ei(!1))},[U]),(0,v.useEffect)(()=>{_&&dH.set(_,{itemsRef:U,expanded:en})},[_,U,en]);let ea=W&&"number"==typeof o&&o>0?o:void 0,el=W&&!en&&void 0!==ea&&z.length>ea,es=el||"advance"==("hide"===a?"hide":"advance"),ec=(0,v.useMemo)(()=>W?en||void 0===ea?z:z.slice(0,ea):K,[W,K,en,ea,z]),ed=(0,v.useCallback)(()=>{el?ei(!0):er.dispatch("navigation.advanceStep")},[el,er]),eu=(0,v.useId)(),ep=(0,v.useId)(),ef=n&&n>0?J*n:0,em=function(e){if(!e)return;let t=e.trim();if(!t.includes("."))return;let r=t.split(".")[0]?.trim();if(r&&"data"!==r)return r}(r),eh=ec.map((e,t)=>{let r=ef+t;return(0,b.jsx)(dG,{item:e,index:r,section:em,children:N},((e,t)=>{if(e&&"object"==typeof e){let t=[e.programId,e.schoolName,e.programName].filter(e=>"string"==typeof e||"number"==typeof e);if(t.length>0)return t.join("-")}return t})(e,r))});return(0,b.jsx)(dD,{status:F,bound:!0,narrowedToNothing:0===ec.length,slots:{loading:(0,b.jsx)(dY,{}),error:(0,b.jsx)(dz,{heading:j,body:k,ctaLabel:A,onRetry:E}),empty:(0,b.jsx)(dB,{body:C})},children:(0,b.jsxs)("div",{"data-testid":"data-repeater",children:[H?(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",marginBottom:12},children:[(0,b.jsx)("label",{id:ep,style:{marginRight:8},children:"Sort by"}),(0,b.jsx)("select",{"aria-labelledby":ep,value:V,onChange:e=>q(Number(e.target.value)),children:B.map((e,t)=>(0,b.jsx)("option",{value:t,children:e.label},`${e.field}-${e.direction}-${t}`))})]}):null,"grid"===p?(0,b.jsx)(aj.Grid,{role:"region","aria-live":"polite","aria-label":"Results",id:eu,"data-layout":"grid",className:"items-stretch",columns:y,...x?{"columns-md":x}:{},...w?{"columns-lg":w}:{},...S?{"columns-xl":S}:{},gap:I,children:eh}):(0,b.jsx)(aj.Flex,{role:"region","aria-live":"polite","aria-label":"Results",id:eu,"data-layout":"flex",direction:f,wrap:m,align:h,justify:g,gap:I,children:eh}),W?es?(0,b.jsx)("div",{style:{marginTop:16,textAlign:"center"},children:(0,b.jsx)(aj.Button,{variant:"primaryFill",onClick:ed,"data-testid":"data-repeater-view-more",children:"View More Programs"})}):null:!Q&&n&&n>0?"loadMore"===G?(0,b.jsx)("div",{style:{marginTop:16,textAlign:"center"},children:Z?(0,b.jsx)("button",{type:"button",onClick:et,children:"Load more"}):null}):(0,b.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:16},children:[(0,b.jsx)("button",{type:"button",onClick:()=>ee(J-1),disabled:0===J,children:"Previous"}),(0,b.jsxs)("span",{"aria-live":"polite",children:["Page ",J+1," of ",Math.max(X,1)]}),(0,b.jsx)("button",{type:"button",onClick:()=>ee(J+1),disabled:!Z,children:"Next"})]}):null]})})};function dQ(e,t){let r=lZ(),n=r?.programsToCompare,i=r?.canAddMorePrograms??!0,o=r?.dslConfigId,a=t?.position,l=t?.viewCorrelationId,s=t?.correlationId,c=(0,v.useRef)(r);return c.current=r,(0,v.useMemo)(()=>{if(!c.current||!e)return{compare:!1,compareChecked:!1,compareDisabled:!1,onCompareChange:void 0};let t=n?.some(t=>t.programId===e.programId)??!1,r=!i&&!t;return{compare:!0,compareChecked:t,compareDisabled:r,onCompareChange:t=>{let r=c.current;if(!r)return;let n={schoolSlug:e.schoolSlug,position:a,viewCorrelationId:l,correlationId:s??e.productClickedCorrelationId};if(t){r.addProgramToCompare(e)&&dR(n,!0,o);return}r.isProgramSelected(e.programId)&&(r.removeProgramFromCompare(e.programId),dR(n,!1,o))}}},[e,n,i,o,a,l,s])}(0,v.forwardRef)(({program:e,compare:t=!0,...r},n)=>{let i=dQ(e);return t?(0,b.jsx)(aj.DegreeCardDetailed,{ref:n,...r,...i}
1):(0,b.jsx)(aj.DegreeCardDetailed,{ref:n,...r,compare:!1,compareDisabled:!1})}).displayName="ComparisonAwareDegreeCard";let dK="Submitted",dJ="Clear Selection",dX="See Comparison",dZ="dexp-comparison-bar",d0="dexp-comparison-bar",d1="dexp-comparison-clear-selection",d2="dexp-comparison-see-comparison",d4=()=>{var e;let{programsToCompare:t,isBannerVisible:r,minItems:n,maxItems:i,toggleComparisonModal:o,clearProgramsToCompare:a,removeProgramFromCompare:l,dslConfigId:s}=lX(),{getComparisonCopy:c}=l8(),{bannerText:d,ctaText:u}=c(),p=lz(),f=s?{customDimensions:[{key:"dslConfigId",value:s}]}:void 0,m=r&&t.length>0;if((0,v.useEffect)(()=>{if(!m)return;let e=p?.eventContext?.viewCorrelationId;p?.triggers.triggerElementViewedEvent?.({correlationId:A(),viewCorrelationId:e,elementType:d0,name:d0,location:dZ,...f}),p?.triggers.triggerElementViewedEvent?.({correlationId:A(),viewCorrelationId:e,elementType:d1,name:d1,text:dJ,location:dZ,...f}),p?.triggers.triggerElementViewedEvent?.({correlationId:A(),viewCorrelationId:e,elementType:d2,name:d2,text:dX,location:dZ,...f})},[m,s]),!m)return null;let h=t.map(e=>({id:String(e.programId),schoolLogo:e.imageURL??"",schoolName:e.schoolName,programName:e.programName,onRemove:()=>{l(e.programId),p?.triggers.triggerElementClickedEvent({correlationId:A(),viewCorrelationId:p.eventContext?.viewCorrelationId,elementType:"dexp-comparison-banner",name:"dexp-comparison-banner-remove-button",text:"X",location:"dexp-comparison-bar",...f})}}));return(0,b.jsx)(aj.ComparisonBar,{items:h,maxItems:i,minItemsToCompare:n,statusText:(e=t.length,d?.replace(/\{count\}/g,String(e))),compareLabel:u??dX,clearLabel:dJ,onCompare:()=>{o(!0),p?.triggers.triggerElementClickedEvent({correlationId:A(),viewCorrelationId:p.eventContext?.viewCorrelationId,elementType:"dexp-comparison-banner",name:"dexp-comparison-banner-see-comparison-button",text:dX,location:"dexp-comparison-bar",...f})},onClear:()=>{a(),p?.triggers.triggerElementClickedEvent({correlationId:A(),viewCorrelationId:p.eventContext?.viewCorrelationId,elementType:"dexp-comparison-banner",name:"dexp-comparison-banner-clear-selection-button",text:dJ,location:"dexp-comparison-bar",...f})},reserveViewportSpace:!0})};function d5({result:e,eventContext:t,position:r,isProgramSubmitted:n,dslConfigId:i}){return sm({eventContext:t,listId:e.listId,presets:{degree:e.degreeSlug,category:e.categorySlug,subject:e.subjectSlug},location:"dexp-comparison-modal",viewCorrelationId:e.viewCorrelationId,productClickedCorrelationId:e.productClickedCorrelationId,brand:e.schoolSlug,position:r,capId:e.capId,programId:e.programId,outboundUrl:e.applicationCtaURL,isProgramSubmitted:n,dslConfigId:i})}var d3=r(7128),d6=r(65082);let d8={isPrivate:{value:"Private",icon:(0,b.jsx)(d3.QLA,{})},isOnline:{value:"Online",icon:(0,b.jsx)(d3.oUQ,{})},isPublic:{value:"Public",icon:(0,b.jsx)(d3.zeF,{})},forProfit:{value:"Forprofit",icon:(0,b.jsx)(d6.Peu,{})},notForProfit:{value:"Nonprofit",icon:(0,b.jsx)(d3.Kzi,{})},notOnline:{value:"On Campus",icon:(0,b.jsx)(d3.XOr,{})}};function d9(e){return Object.entries(e).flatMap(([e,t])=>t&&Object.prototype.hasOwnProperty.call(d8,e)?[{key:e,flag:d8[e]}]:[])}let d7=[{key:"flags",label:"Highlights",type:"badgeList",badgeVariant:"neutral",badgeSize:"sm"},{key:"onlineEnrollment",label:"Online Enrollment",type:"text",labelTooltip:"Percentage of all students who are enrolled online."},{key:"accreditation",label:"Accreditation",type:"text",labelTooltip:"The school's accrediting agency or organization."},{key:"onlinePrograms",label:"Online Programs",type:"text"},{key:"retentionRate",label:"Retention Rate",type:"text"},{key:"transferCredits",label:"Transfer Credits Accepted",type:"text"},{key:"feeWaived",label:"Online Application Fee Waived",type:"text"},{key:"satAct",label:"SAT/ACT Required",type:"text"},{key:"snippet",label:"Program Overview",type:"text"},{key:"tcpa",label:"Terms and Conditions",type:"text",clamp:!1,html:!0}];function ue(e){return null==e?"N/A":`${Math.round(Number(e))}%`}function ut(e){return void 0===e?"N/A":e?"Yes":"No"}function ur(e,t){return`configured-${t}-${e.replace(/[^a-zA-Z0-9_-]/g,"-")}`}let un=({squareButtons:e,onProductClick:t,submittedResults:r=[]})=>{let{programsToCompare:n,isComparisonModalOpen:i,maxItems:o,toggleComparisonModal:a,removeProgramFromCompare:l,dslConfigId:s}=lX(),{getComparisonConfig:c,getComparisonCopy:d}=l8(),u=c(),p=d(),{eventContext:f}=aw(),m=(0,v.useCallback)(()=>{a(!1)},[a]),h=(0,v.useCallback)(e=>r.some(t=>t.programId===e),[r]),g=(0,v.useCallback)(e=>{let r=n.findIndex(t=>t.programId===e.programId);!function(e){if(!e.eventContext)return;let{name:t,payload:r}=ad(d5(e));ax(t,r)}({result:e,eventContext:f,position:-1===r?0:r+1,isProgramSubmitted:h(e.programId),dslConfigId:s}),a(!1),t?.(e,!1)},[t,a,n,f,h,s]),y=(0,v.useCallback)(e=>{!function({eventContext:e,dslConfigId:t}){let{name:r,payload:n}=ah({correlationId:e?.formViewedCorrelationId??A(),viewCorrelationId:e?.viewCorrelationId,elementType:"dexp-comparison-popup-close",name:"dexp-comparison-popup-close-button",location:"dexp-comparison-popup",text:"X",...t?{customDimensions:[{key:"dslConfigId",value:t}]}:{}}),i=window._Cohesion?.webContext;
1ax(r,i?{...n,webContext:i}:n)}({eventContext:f,dslConfigId:s}),l(e),n.length<=1&&a(!1)},[f,s,n.length,l,a]),x=(0,v.useMemo)(()=>(function(e,{onProductClick:t,onRemove:r,isProgramSubmitted:n,config:i}){let o=i?.compareAttributes??[],a=i?.buttonText?.trim();return e.map(e=>{var i,l;let s=n(e.programId),c=s?"Next Steps":a||(e.applicationCtaLabel?e.applicationCtaLabel:"Learn More");return{id:String(e.programId),header:{image:{src:e.imageURL??"",alt:`${e.schoolName} logo`},title:e.schoolName,subtext:e.programName,remove:{onClick:()=>r(e.programId),ariaLabel:`Remove ${e.schoolName} from comparison`}},ctaBottom:{label:c,onClick:()=>t(e)},fields:{flags:{badges:d9({isOnline:e.isOnline,isPublic:e.isPublic,isPrivate:e.isPrivate,forProfit:e.forProfit,notForProfit:e.notForProfit}).map(({flag:e})=>({text:e.value}))},onlineEnrollment:{text:ue(e.percentOnlineEnrollment)},accreditation:{text:e.accreditator?"Yes":"N/A"},onlinePrograms:{text:e.numberOnlinePrograms?String(e.numberOnlinePrograms):"N/A"},retentionRate:{text:ue(e.fulltimeRetentionRate)},transferCredits:{text:ut(e.areTransferCreditsAccepted)},feeWaived:{text:ut(e.isApplicationFeeOnlineWaived)},satAct:{text:e.satOrActAdmissionsRequirements??"N/A"},snippet:{text:e.snippet??""},tcpa:{text:e.tcpa?.trim()?(i=e.tcpa)?j(i):"":"N/A"},...(l=e,o.reduce((e,t,r)=>(e[ur(t.key,r)]={text:function(e,t){let r=e.compareAttributeValues?.find(e=>e.key===t||e.label===t);if(r?.value)return r.value;let n=t.includes("{{")?t:t.startsWith("item.")?`{{${t}}
1}`:`{{item.${t}}}`;try{let t=ir(n,{item:e});if(null==t||""===t)return"N/A";if(Array.isArray(t))return t.length>0?t.map(e=>String(e)).join(", "):"N/A";if("object"==typeof t)return JSON.stringify(t)??"N/A";return String(t)}catch{return"N/A"}}(l,t.key)},e),{}))}}})})(n,{onProductClick:g,onRemove:y,isProgramSubmitted:h,config:u}),[n,g,y,h,u]),w=(0,v.useMemo)(()=>{let e;return e=u?.compareAttributes,e?.length?e.map((e,t)=>({key:ur(e.key,t),label:e.label,type:"text"})):d7},[u]),S=p.heading??p.title??"Compare Programs",I=p.subtitle??`Compare up to ${o} credit programs from our partners using the side-by-side comparison below.`,C=p.placeholderText??"Add another program";(0,v.useEffect)(()=>{i&&n.forEach((e,t)=>{!function(e){if(!e.eventContext)return;let{name:t,payload:r}=aa(d5(e));ax(t,r)}({result:e,eventContext:f,position:t+1,isProgramSubmitted:h(e.programId),dslConfigId:s})})},[i]);let k=(0,v.useCallback)(e=>{let t=n.findIndex(t=>String(t.programId)===e);if(-1===t)return;let r=n[t];!function(e){if(!e.eventContext)return;let{name:t,payload:r}=ac(d5(e));ax(t,r)}({result:r,eventContext:f,position:t+1,isProgramSubmitted:h(r.programId),dslConfigId:s})},[n,f,h,s]);return(0,b.jsx)(aj.Modal,{open:i,onOpenChange:e=>{e||m()},children:(0,b.jsxs)(aj.Modal.Content,{size:"xl",className:"p-0 max-h-[95vh] overflow-y-auto",children:[(0,b.jsx)(aj.Modal.Header,{className:"sr-only",children:(0,b.jsx)(aj.Modal.Title,{children:S})}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"md",className:"px-lg py-md",children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"xxs",children:[(0,b.jsx)(aj.Heading,{variant:"h3",children:S}),(0,b.jsx)(aj.Text,{variant:"b2",color:"subtext",children:I})]}),(0,b.jsx)(aj.ComparisonTable,{styleVersion:"v1",items:x,rowDefs:w,maxItems:o,visibleItems:o,emptySlot:{label:C,onClick:m,ariaLabel:"Close to add another program to compare"},inView:i,onProductViewed:k})]})]})})},ui=()=>{let e,t,r,{onProductClick:n,submittedResults:i}=(e=dM(),t=e?.openLeadFlow,r=lm(),{onProductClick:(0,v.useMemo)(()=>t?(e,r=!1)=>t(e,{skipDuplicateCheck:r}):e=>{let t=e.applicationCtaURL;t&&1?window.open(t,"_blank","noopener,noreferrer"):e.offeringId&&r.has?.("navigation.linkout")&&r.dispatch("navigation.linkout",{offeringId:e.offeringId})},[t,r]),submittedResults:e?.submittedResults});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d4,{}),(0,b.jsx)(un,{squareButtons:!0,onProductClick:n,submittedResults:i})]})},uo={Select:{eventPropNames:["onValueChange","onChange","onSelect"],valuePropName:"value",autoSelectSingleOption:!0},Button:{eventPropNames:["onClick"]},Input:{eventPropNames:["onChange"],valuePropName:"value"},ToggleGroup:{eventPropNames:["onValueChange"],valuePropName:"value",formKeyValueTransform:e=>Array.isArray(e)?e.filter(Boolean).join(","):"string"==typeof e?e:"",formStateValueTransform:e=>e&&e.length>0?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[]},StudentLoansBanner:{eventPropNames:["onCtaClick"],clickPropName:"onCtaClick",outboundUrlPropPath:"cta.href"},StudentLoansInline:{eventPropNames:["onCtaClick"],clickPropName:"onCtaClick",outboundUrlPropPath:"cta.href"},EditorialListing:{eventPropNames:["onVisitSiteClick"],clickPropName:"onVisitSiteClick"}},ua=e=>{let t,r,n=aj.DegreeCardDetailed,{shouldShowComparison:i}=l8(),o=cl(),a=nu(o)?o:void 0,l=i&&!!a,s=lz(),c=cs(),d=c?.split(".").pop(),u=void 0===d||""===d||Number.isNaN(Number(d))?void 0:Number(d),p=dQ(l?a:void 0,{position:void 0!==u?u+1:void 0,viewCorrelationId:s?.eventContext?.viewCorrelationId,correlationId:s?.eventContext?.formViewedCorrelationId}),{isProgramSubmitted:f}=(t=so(),r=t?.snapshot,(0,v.useMemo)(()=>t&&a?{isProgramSubmitted:t.isProgramSubmitted(a.programId)}:{isProgramSubmitted:!1},[a,r])),m=dM(),h=f&&a?{ctaLabel:dK,onCtaClick:()=>m?.openLeadFlow(a)}:{},g=e.onClick,y=h.onCtaClick??e.onCtaClick,x=!!g||!!y,w=x?e=>{let t=e.target;if(!t.closest?.("button[aria-controls]")){if(t.closest?.("[data-degree-card-footer]")){if(!t.closest?.('a[href], button:not([role="checkbox"])'))return;g?.(e);return}g?.(e),y?.(e)}}:e.onClick,S=x?[e.className,"cursor-pointer"].filter(Boolean).join(" "):e.className;return(0,b.jsx)(n,{...e,compare:l&&p.compare,compareChecked:!!l&&p.compareChecked,compareDisabled:!!l&&p.compareDisabled,onCompareChange:l?p.onCompareChange:void 0,...h,onClick:w,className:S})},ul=e=>{let t=aj.EditorialListing,{shouldShowComparison:r}=l8(),n=cl(),i=nu(n)?n:void 0,o=r&&!!i&&(i?.programId??0)>0,a=lz(),l=cs(),s=l?.split(".").pop(),c=void 0===s||""===s||Number.isNaN(Number(s))?void 0:Number(s),d=dQ(o?i:void 0,{position:void 0!==c?c+1:void 0,viewCorrelationId:a?.eventContext?.viewCorrelationId,correlationId:a?.eventContext?.formViewedCorrelationId}),u=e.onClick,p=u?e=>{let t=e.target;if(!t.closest?.("button[aria-controls]")){if(t.closest?.("[data-editorial-listing-footer]")&&!t.closest?.('a[href], button:not([role="checkbox"])'))return;u?.(e)}}:e.onClick;return(0,b.jsx)(t,{...e,compare:o&&d.compare,compareChecked:!!o&&d.compareChecked,compareDisabled:!!o&&d.compareDisabled,onCompareChange:o?d.onCompareChange:void 0,onClick:p})},us={...aj},uc=e=>"function"==typeof e||"object"==typeof e&&null!==e&&"$$typeof"in e,ud=new Set(["Text","Heading","Brow","FeedbackBox"]),uu=new Set(["Text","Link","PuckText"]),up=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),uf=new Set(["platform.dataRepeater"]),um=e=>!!up(e)&&"string"==typeof e.type&&!!up(e.props)&&("PuckText"===e.type||uf.has(e.type)||/^[A-Z]/.test(e.type)&&uc(us[e.type]));function uh(e){return um(e)&&"PuckText"===e.type}function ug(e){let t=e.props?.text;return"string"==typeof t?t:""}function uy(e){let t=e.props?.children;return"string"==typeof t?t:uh(t)?ug(t):Array.isArray(t)?t.map(e=>"string"==typeof e?e:uh(e)?ug(e):um(e)?uy(e):"").join(""):um(t)?uy(t):""}function ub(e){if("string"==typeof e||uh(e))return[e];if(um(e)){let t=uy(e);return t?[t]:[]}return[]}function uv(e,t){let r={...e.props??{}};if(t&&"Text"===e.type){let e="string"==typeof r.tag?r.tag.toLowerCase():"p";aj.INLINE_PHRASING_TAGS.has(e)||(r.tag="span")}if("Link"!==e.type||"string"!=typeof r.href||(0,aj.isSafeInlineLinkHref)(r.href)||delete r.href,t&&"children"in r){let e=r.children;if(Array.isArray(e))r.children=e.flatMap(ub);else if(um(e)&&!uh(e)){let t=uy(e);t?r.children=t:delete r.children}}return{...e,props:r}}let ux=e=>!!Array.isArray(e)&&0!==e.length&&e.every(e=>"string"==typeof e||um(e))&&e.some(e=>um(e)&&!uh(e));function uw(e,t){return"string"==typeof e?e.trim().length>0?{type:"PuckText",props:{text:e}}:null:um(e)?uS(e,t):null}function uS(e,t){let r=t[e.type]??{},n={...e.props??{}};for(let e of Object.keys(r)){if(eE(e))continue;let r=n[e];if(Array.isArray(r))n[e]=r.map(e=>uw(e,t)).filter(e=>null!==e);else if(um(r))n[e]=[uS(r,t)];else if("string"==typeof r){let i=uw(r,t);n[e]=i?[i]:[]}else n[e]=[]}return{...e,props:n}}let uI=({render:e,inline:t=!1})=>(0,b.jsx)(b.Fragment,{children:e({as:t?aj.InlineSlotElement:aj.SlotPassthrough})}),uC=(e,t=!1)=>"function"==typeof e?(0,b.jsx)(uI,{render:e,inline:t}):e;class uj extends v.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`[DslConfig] Render error for config "${this.props.configId??"unknown"}":`,e,t.componentStack),this.props.onRenderError?.(e,t)}
1render(){if(!this.state.hasError)return this.props.children;let{fallback:e}=this.props;return"function"==typeof e&&this.state.error?e(this.state.error):e??null}constructor(...e){super(...e),this.state={hasError:!1}}}let uk=({dslConfig:e,excludedContentTypes:t,renderErrorFallback:r,onRenderError:n})=>{let i,o,a,l,s=e?.configId,c=(i=aC(),o=i?.handleStepForward,a=i?.handlePrevious,l="function"==typeof aj.useModalHostOptional?(0,aj.useModalHostOptional)():null,(0,v.useMemo)(()=>{let e={};return o&&(e["flow.forward"]=()=>{o()}),a&&(e["flow.back"]=()=>{a()}),l&&(e["modal.open"]=e=>{i0(l,"modal.open",e,"DslConfig")},e["modal.close"]=e=>{i0(l,"modal.close",e,"DslConfig")}),{dispatch(t,r){let n=e[t];n?n(r):console.warn(`[DslConfig] No handler registered for action "${t}" â dropping.`)},has:t=>t in e}},[o,a,l])),d=(0,v.useContext)(ln),u=(0,v.useContext)(lf),p=lZ(),f=l9(),m=void 0!==d,h=u!==lp,{config:g,data:y,dataSources:x,bindingsApplied:w,resultsPageConfig:S}=(0,v.useMemo)(()=>{let r,n,i,o=function(e,t){if(!t||0===t.length||!e||"object"!=typeof e)return e;let r=e.content;if(!Array.isArray(r))return e;let n=new Set(t);return{...e,content:r.filter(e=>{if(!e||"object"!=typeof e)return!0;let t=e.type;return"string"!=typeof t||!n.has(t)})}}(e?.data,t);if(!o||!Array.isArray(o.content))return{config:null,data:null,dataSources:null,bindingsApplied:!1,resultsPageConfig:void 0};let a=(r=e=>Array.isArray(e)?e.map(r):um(e)?function e(t){let r={...t.props??{}},n=ud.has(t.type);for(let[t,i]of Object.entries(r))!("id"===t||eE(t))&&(n&&"children"===t?r[t]=function(e,t){if(Array.isArray(e)){let r=[];for(let n of e){if("string"==typeof n||uh(n)){r.push(n);continue}if(um(n)){if(t){r.push(...ub(n));continue}uu.has(n.type)&&r.push(uv(n,!0))}}return r}return uh(e)?e:um(e)?t?e:uu.has(e.type)?uv(e,!0):null:e}(i,!1):Array.isArray(i)?r[t]=i.map(t=>um(t)?e(t):t):um(i)&&(r[t]=e(i)));return{...t,props:r}}(e):e,{...o,content:Array.isArray(o.content)?o.content.map(r):o.content,...o.zones?{zones:function(e,t){if(!up(e))return e;let r={};for(let[n,i]of Object.entries(e))r[n]=Array.isArray(i)?i.map(t):i;return r}(o.zones,r)}:{}}),l=(n={},i=e=>{let t=e.type,r=e.props??{};for(let[e,o]of(n[t]||(n[t]={}),Object.entries(r)))"id"!==e&&(eE(e)||(Array.isArray(o)&&ux(o)?(n[t][e]={type:"slot"},o.filter(um).forEach(i)):um(o)&&!uh(o)&&(n[t][e]={type:"slot"},i(o))))},a.content.forEach(i),n),{config:s,boundConfigRef:c}=function(e){let t={},r={current:void 0};for(let[r,n]of Object.entries(us)){if(!uc(n))continue;let i="DegreeCardDetailed"===r?ua:"EditorialListing"===r?ul:n,o=Object.keys(e[r]??{});t[r]={fields:e[r]??{},render:e=>{var t;let{editMode:n,puck:a,...l}=e??{};for(let[e,t]of Object.entries(l))!("id"===e||eE(e))&&(o.includes(e)||(l[e]=function e(t){if(null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||v.isValidElement(t))return t;if(Array.isArray(t))return t.map(t=>e(t));if(uh(t))return ug(t);if(um(t)){let r=us[t.type];if(!uc(r))return t;let n={...t.props??{}};return"children"in n&&(n.children=e(n.children)),v.createElement(r,n)}return t}(function(e){if(uh(e))return ug(e);if(Array.isArray(e)&&e.some(uh)){if(e.some(e=>um(e)&&!uh(e)))return e;let t=[];for(let r of e){if("string"==typeof r){r.trim().length>0&&t.push(r);continue}if(uh(r)){let e=ug(r);e.trim().length>0&&t.push(e)}}return t}return e}(t))));for(let e of o)if(e in l){if("children"===e&&"function"==typeof aj.shouldResolveSlotChildren&&aj.shouldResolveSlotChildren(r))continue;l[e]=uC(l[e],ud.has(r)&&"children"===e)}if("Select"===r&&Array.isArray(t=l.options)&&t.every(e=>null!==e&&"object"==typeof e&&"label"in e&&"value"in e)){let e=us.SelectItem;e&&(l.children=l.options.map((t,r)=>(0,b.jsx)(e,{value:String(t.value),children:String(t.label)},`${String(t.value)}-${r}`)),delete l.options)}if("function"==typeof aj.shouldResolveSlotChildren&&aj.shouldResolveSlotChildren(r)&&"function"==typeof l.children&&aj.SlotHost){let{children:e,...t}=l;return(0,b.jsx)(aj.SlotHost,{Host:i,hostProps:t,slot:e,resolveComponent:e=>{let t=us[e];return uc(t)?t:null},mode:"render"})}return(0,b.jsx)(i,{...l})}}}t.PuckText={fields:{},render:e=>{let t="string"==typeof e.tag&&e.tag?e.tag:"span",r="string"==typeof e.text?e.text:"";return v.createElement(t,null,r)}};let n={components:t,root:{fields:{},render:({children:e})=>(0,b.jsx)(b.Fragment,{children:e})}};return t["platform.dataRepeater"]={fields:{},render:e=>{let{itemSlot:t,editMode:i,puck:o,...a}=e??{},l=Array.isArray(t)?t:[],s=r.current??n;return(0,b.jsx)(dW,{...a,children:(0,b.jsx)(sj.dw,{config:s,data:{content:l,root:{props:{}}}})})}},r.current=n,{config:n,boundConfigRef:r}}(l),d={...a,content:(a.content??[]).map(e=>uS(e,l)),root:a.root??{props:{}}},u=function(e){let t=e?.root?.props,r=t?.dataSources;if(!r||"object"!=typeof r)return null;let n=Object.entries(r);if(0===n.length)return null;let i={};for(let[e,t]of n)t&&"object"==typeof t&&(i2(t)&&"string"==typeof t.endpoint&&("GET"===t.method||"POST"===t.method)||i4(t)&&"string"==typeof t.modelId&&Array.isArray(t.metrics)&&t.metrics.length>0||i5(t))&&(i[e]=t);return Object.keys(i).length>0?i:null}(d),p=!!u||function(e){if(!e)return!1;let t=!1,r=e=>{if(t||!e)return;if(Array.isArray(e)){for(let t of e)r(t);return}if("object"!=typeof e)return;let n=e.props??null;if(n){for(let e of Object.keys(n))if("formKey"===e||e.startsWith("_bind.")||e.startsWith("_action.")||"_meta.tracking"===e||"_meta.visibility"===e||"_meta.scrollPoint"===e){t=!0;return}for(let e of Object.values(n))r(e)}};return r(e.content??[]),t}(d)||function(e){if(!e)return!1;let t=!1,r=e=>{if(!t&&e){if(Array.isArray(e)){for(let t of e)r(t);return}if("object"==typeof e){if("string"==typeof e.type&&e.type in nW){t=!0;return}if(e.props)for(let t of Object.values(e.props))r(t)}}};return r(e.content??[]),t}(d),f=p?cQ(s,uo,nW):s;return c.current=f,{config:f,data:d,dataSources:u,bindingsApplied:p,resultsPageConfig:nE(d)}},[e,t]);if(m&&x&&console.warn(`[DslConfig] Ignoring inner dataSources for "${s??"unknown"}" â host bridge owns the DataSourceManager.`),!g||!y)return console.warn(`[DslConfig] Missing or malformed payload for config "${s??"unknown"}" â rendering nothing.`),null;let I=(0,b.jsx)(uj,{configId:s,fallback:r,onRenderError:n,children:(0,b.jsx)(sj.dw,{config:g,data:y})}),C=void 0!==f?I:(0,b.jsx)(l3,{config:S,children:I}),j=S?.comparison,k=j?.enabled===!0,A=void 0===p&&k?(0,b.jsxs)(lJ,{minPrograms:j?.minSelection,maxPrograms:j?.maxSelection,children:[C,(0,b.jsx)(ui,{})]}):C,E=h?A:(0,b.jsx)(lf.Provider,{value:c,children:A});return m||!w?E:(0,b.jsx)(la,{dataSources:x??{},flowContext:{},children:E})},uA=({position:e="below",spanText:t="Sponsored",disclosureTitle:r,disclosureContent:n})=>{var i;let o=r?.trim()||t;return(0,b.jsx)(aj.Flex,{direction:"row",align:"center",className:"shrink-0",children:(0,b.jsx)(aj.Tooltip,{content:(i=n,i?.trim()||"This site is a free online resource that strives to offer helpful content and comparison features to our visitors. We accept advertising compensation from companies that appear on the site, which impacts the location and order in which brands (and/or their products) are presented, and also impacts the score that is assigned to it. Company listings on this page DO NOT imply endorsement. We do not feature all providers on the market."),side:"above"===e?"top":"bottom",children:(0,b.jsx)(aj.Button,{type:"button",variant:"textOnlyNeutral",size:"flush",iconAfter:"info",children:o})})})},uE=({results:e,firstName:t,productClickedCorrelationId:r,onProgramClick:n,onCloseExperience:i,submittedResults:o=[],title:a,subtitle:l,disclosureTitle:s,disclosureContent:c})=>{var d;let u,p=e?.[0],f=t?.trim(),m=(0,v.useRef)(null),h=(0,v.useRef)(!1),{triggerProductLoadedEvent:g,triggerProductClickedEvent:y,eventContext:x}=aw(),w=lz()?.stepCorrelation.dslConfigId,S=(0,v.useMemo)(()=>A(),[]),I=(0,v.useMemo)(()=>r||A(),[r]),{setNodes:C,entries:j}=lR(0),k=j[0]?.isIntersecting??!1,E=(0,v.useMemo)(()=>sm({eventContext:x,listId:p?.listId,presets:{degree:p?.degreeSlug||null,category:p?.categorySlug||null,subject:p?.subjectSlug||null},location:U.SPOTLIGHT_POPUP,productClickedCorrelationId:I,viewCorrelationId:S,brand:p?.schoolSlug,position:1,capId:p?.capId,programId:p?.programId,isUserRequested:p?.isUserRequested,dslConfigId:w}),[x,p,S,I,w]);if((0,v.useEffect)(()=>{m.current&&C([m.current])},[C]),(0,v.useEffect)(()=>
1{if(h.current||!k)return;let e=ac(E);ax(e.name,e.payload),h.current=!0,C([])},[k,E,C]),(0,v.useEffect)(()=>{g(E)},[]),!p)return null;let N=o.some(e=>e.programId===p.programId),T=p.spotlight?.header,O=p.spotlight?.blocks?.[0]?.list??[],P=(u=[],(d=p).isOnline&&u.push("Online"),d.isOnline||u.push("On Campus"),d.isPublic&&u.push("Public"),d.isPrivate&&u.push("Private"),d.notForProfit&&u.push("Nonprofit"),d.forProfit&&u.push("Forprofit"),d.accreditator&&u.push("Accredited"),u),L=p.city&&p.state?`${p.city}, ${p.state}`:void 0,M=O.map(({text:e})=>({icon:"circle-check",label:e}));return(0,b.jsxs)("section",{ref:m,className:"not-prose flex flex-col gap-lg rounded-lg border border-neutral-200 bg-neutral-50 p-lg",children:[(0,b.jsxs)("header",{className:"flex flex-col gap-xxs",children:[(0,b.jsx)(aj.Heading,{variant:"h3",children:a??`Great News${f?`, ${f}!`:"!"}`}),(0,b.jsx)(aj.Text,{variant:"b4",children:l??"We've found a great school near you!"})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-lg lg:flex-row lg:items-stretch",children:[(0,b.jsx)("div",{className:"flex-1 min-w-0 lg:max-w-md",children:(0,b.jsx)(aj.DegreeCardDetailed,{schoolLogo:`https://simple-storage-server.highereducation.com/${p.schoolSlug}.png?w=130&h=80`,schoolName:p.schoolName,schoolDetails:L,degreeTitle:p.programName,tags:P,description:p.snippet??"",ctaLabel:N?dK:"Explore Program",onCtaClick:()=>{y(E),n({...p,productClickedCorrelationId:I})},compare:!1,favorite:!1,border:"stroke"})}),(T||M.length>0)&&(0,b.jsxs)("aside",{className:"flex flex-1 min-w-0 flex-col gap-md",children:[T&&(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:T}),M.length>0&&(0,b.jsxs)("div",{className:"flex flex-col gap-sm",children:[(0,b.jsx)(aj.Heading,{variant:"h5",children:"School Highlights"}),(0,b.jsx)("ul",{className:"flex flex-col gap-xs",children:M.map(e=>(0,b.jsxs)("li",{className:"flex items-start gap-xxs",children:[(0,b.jsx)("span",{"aria-hidden":!0,className:"mt-min shrink-0 text-secondary-700",children:"â"}),(0,b.jsx)(aj.Text,{variant:"b4",children:e.label})]},e.label))})]})]})]}),(0,b.jsxs)("footer",{className:"flex items-center justify-between",children:[(0,b.jsx)(uA,{position:"above",spanText:"Learn More About Our Partners",disclosureTitle:s,disclosureContent:c}),i&&(0,b.jsx)(aj.Button,{type:"button",variant:"textOnlyNeutral",size:"sm",iconAfter:"chevron-right",onClick:i,children:"Skip to all results"})]})]})},uN=()=>{let e=ro(),{flowState:t,currentStep:r}=aC(),n=(0,v.useRef)(new Set);return{createAppViewConversion:(0,v.useCallback)(i=>{let o=i.productClickedCorrelationId||i.offeringId||i.offeringUuid||String(i.programId);if(n.current.has(o))return;n.current.add(o);let a=t?.location;dk(i,e,i.productClickedCorrelationId||"",void 0,{country:a?.countryCode,state:a?.state},void 0,iO(r))},[e,t,r])}},uT=({result:e,position:t,isProgramSubmitted:r=!1,governSubmittedClick:n=!1,onProductClick:i})=>{var o;let a,l=(0,v.useRef)(null),s=(0,v.useRef)(!1),{triggerProductLoadedEvent:c,triggerProductClickedEvent:d,eventContext:u}=aw(),{createAppViewConversion:p}=uN(),f=lz()?.stepCorrelation.dslConfigId,m=(0,v.useRef)(A()).current,h=(0,v.useRef)(A()).current,{setNodes:g,entries:y}=lR(),x=y[0]?.isIntersecting??!1,w=(0,v.useMemo)(()=>sm({eventContext:u,listId:e.listId,presets:{degree:e.degreeSlug||null,category:e.categorySlug||null,subject:e.subjectSlug||null},location:U.POPUP,productClickedCorrelationId:h,viewCorrelationId:m,brand:e.schoolSlug,position:t,capId:e.capId,programId:e.programId,outboundUrl:e.applicationCtaURL,isProgramSubmitted:r,isUserRequested:e.isUserRequested,dslConfigId:f}),[u,e,t,r,f,m,h]);(0,v.useEffect)(()=>{l.current&&g([l.current])},[g]),(0,v.useEffect)(()=>{if(s.current||!x)return;let e=ac(w);ax(e.name,e.payload),s.current=!0,g([])},[x,w,g]),(0,v.useEffect)(()=>{c(w)},[]);let S=function(e,{isProgramSubmitted:t,governSubmittedClick:r}){if(!t)return{label:"Explore Program",intent:"explore"};if(r)return{label:dK,intent:"submitted"};let n=e.applicationCtaURL;return n?{label:e.applicationCtaLabel||"Start Your Application",intent:"appCta",url:n}:{label:dK,intent:"noop"}}(e,{isProgramSubmitted:r,governSubmittedClick:n}),I=(a=d9({isPrivate:(o=e).isPrivate,isOnline:o.isOnline,isPublic:o.isPublic,forProfit:o.forProfit,notForProfit:o.notForProfit,notOnline:!o.isOnline}).map(({flag:e})=>e.value),o.accreditator&&a.push("Accredited"),a),C=e.city&&e.state?`${e.city}, ${e.state}`:void 0;return(0,b.jsx)("div",{ref:l,className:"flex-1 min-w-0",children:(0,b.jsx)(aj.DegreeCardDetailed,{schoolLogo:`https://simple-storage-server.highereducation.com/${e.schoolSlug}
1.png?w=130&h=80`,schoolName:e.schoolName,schoolDetails:C,degreeTitle:e.programName,tags:I,description:e.snippet??"",ctaLabel:S.label,onCtaClick:()=>{switch(d(w),S.intent){case"explore":case"submitted":i({viewCorrelationId:m,productClickedCorrelationId:h});return;case"appCta":S.url&&(p(e),window.open(S.url,"_blank","noopener,noreferrer"));return;default:return}},compare:!1,favorite:!1,border:"stroke"})})},uO=({results:e,onCloseExperience:t,loading:r,onProgramClick:n,submittedResults:i=[],governSubmittedClick:o=!1,title:a,subtitle:l,disclosureTitle:s,disclosureContent:c})=>{if(r)return(0,b.jsx)(aj.Flex,{asChild:!0,align:"center",justify:"center",gap:"xxs",className:"h-full min-h-[45vh]",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aj.Heading,{variant:"h4",children:"Loading..."}),(0,b.jsx)(aj.LoadingDots,{color:"primary",label:"Loading school recommendations"})]})});let d=e?.slice(0,2)??[];return(0,b.jsx)(aj.Flex,{asChild:!0,gap:"lg",className:"rounded-lg border border-neutral-200 bg-secondary-50 p-lg",children:(0,b.jsxs)("section",{children:[(0,b.jsx)(aj.Flex,{asChild:!0,gap:"xxs",children:(0,b.jsxs)("header",{children:[(0,b.jsx)(aj.Heading,{variant:"h3",children:a??"Great News! Youâre a Strong Match for These Schools!"}),(0,b.jsx)(aj.Text,{variant:"b4",children:l??"Select a school to request more information."})]})}),(0,b.jsx)(aj.Flex,{direction:"column","direction-md":"row",gap:"lg",children:d.map((e,t)=>{let r=i.some(t=>t.programId===e.programId);return(0,b.jsx)(uT,{result:e,position:t+1,isProgramSubmitted:r,governSubmittedClick:o,onProductClick:t=>n({...e,...t})},e.programId??`${e.schoolSlug}-${t}`)})}),(0,b.jsx)(aj.Flex,{asChild:!0,direction:"row",align:"center",justify:"between",gap:"none",children:(0,b.jsxs)("footer",{children:[(0,b.jsx)(uA,{position:"above",spanText:"Learn More About Our Partners",disclosureTitle:s,disclosureContent:c}),t&&(0,b.jsx)(aj.Button,{type:"button",variant:"textOnlyNeutral",size:"sm",iconAfter:"chevron-right",onClick:t,children:"Skip to all results"})]})})]})})};function uP(e,t,r){return dF(e,t)??dF(e,r)??[]}let uL=()=>{let{shouldShowRecommenderModal:e,shouldShowSpotlightModal:t,getRecommenderModalCopy:r,getSpotlightModalCopy:n}=l8(),{getSource:i}=ll(),{openLeadFlow:o,closeLeadFlow:a,isOpen:l,leadFlowContent:s,firstName:c}=dL(),d=so(),u=(0,v.useMemo)(()=>[...d?.submittedResults??[]],[d?.submittedResults]),p=i("results")?.data,f=(0,v.useMemo)(()=>uP(p,"spotlightResults","spotlight.data"),[p]),m=(0,v.useMemo)(()=>uP(p,"recommendedResults","recommended.data"),[p]),h=f.length>0&&t,g=!h&&m.length>0&&e,y=h||g,x=(0,v.useRef)(!1),[w,S]=(0,v.useState)(!1),{setPopupOpen:I}=l6();(0,v.useEffect)(()=>{y&&!x.current&&S(!0)},[y]),(0,v.useEffect)(()=>(I(w),()=>I(!1)),[w,I]);let C=(0,v.useCallback)(()=>{x.current=!0,S(!1),a()},[a]),j=(0,v.useCallback)(e=>{o(e,{mode:"inline"})},[o]);if(!y)return null;let k=h?n():r(),A=k.title??(h?"Spotlight program":"Recommended programs");return(0,b.jsx)(aj.Modal,{open:w,onOpenChange:e=>{e||C()},children:(0,b.jsxs)(aj.Modal.Content,{size:"xl",className:"max-w-5xl p-0 max-h-[95vh] overflow-y-auto rounded-2xl bg-transparent border-0 shadow-none",children:[(0,b.jsx)(aj.Modal.Header,{className:"sr-only",children:(0,b.jsx)(aj.Modal.Title,{children:A})}),(0,b.jsx)("div",{className:"flex flex-col gap-md",children:l?(0,b.jsx)("div",{className:"rounded-2xl bg-white",children:s}):h?(0,b.jsx)(uE,{results:f,firstName:c,submittedResults:u,title:k.title,subtitle:k.subtitle,disclosureTitle:k.disclosureTitle,disclosureContent:k.disclosureContent,onProgramClick:j,onCloseExperience:C}):(0,b.jsx)(uO,{results:m,firstName:c,importantFactors:[],submittedResults:u,governSubmittedClick:!0,title:k.title,subtitle:k.subtitle,disclosureTitle:k.disclosureTitle,disclosureContent:k.disclosureContent,onProgramClick:j,onCloseExperience:C})})]})})},uM=({data:e,onViewNextSteps:t})=>{let r=`https://simple-storage-server.highereducation.com/${e.school.slug}.png?w=130&h=80`;return(0,b.jsx)(aj.Card,{variant:"background-white",rounded:"md",border:"shadow",children:(0,b.jsxs)(aj.Flex,{direction:"column","direction-lg":"row",align:"stretch",justify:"between",gap:"md",width:"full",className:"lg:items-center",children:[(0,b.jsx)(aj.Flex,{direction:"row",align:"center",gap:"md",asChild:!0,children:(0,b.jsxs)("header",{children:[(0,b.jsx)(aj.Image,{src:r,alt:`${e.school.name} logo`,width:130,height:80,objectFit:"contain"}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"none",children:[(0,b.jsx)(aj.Text,{variant:"b5",weight:"bold",className:"text-primary-700",children:e.program.name}),(0,b.jsx)(aj.Heading,{variant:"h4",children:e.school.name})]})]})}),(0,b.jsx)(aj.Button,{variant:"primaryFill",size:"lg",type:"button",onClick:()=>{t&&t(e)},className:"w-full lg:w-auto",children:"Next Steps"})]})})},uR=({submissions:e,firstName:t,title:r,subtitle:n,onViewNextSteps:i})=>{let[o,a]=(0,v.useState)(!0),l=(0,v.useId)();return e?.length?(0,b.jsx)(aj.Section,{as:"section",variant:"default",padding:"section",className:"my-lg bg-primary-100",children:(0,b.jsxs)(aj.Flex,{direction:"column",gap:"2xl",width:"full",className:"mx-auto max-w-[1536px]",children:[(0,b.jsx)(aj.Flex,{direction:"row",align:"start",ga
1p:"md",asChild:!0,children:(0,b.jsxs)("header",{children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"none",className:"flex-1",children:[(0,b.jsx)(aj.Heading,{variant:"h2",className:"mb-xxs",children:r??`Good news${t?`, ${t}`:""}! You're ready for the next step.`}),n?(0,b.jsx)(aj.Text,{variant:"b3",children:n}):(0,b.jsxs)(aj.Text,{variant:"b3",children:["Select"," ",(0,b.jsx)(aj.Text,{tag:"b",variant:"b3",weight:"bold",children:"Next Steps"})," ","to learn about what you can expect from your call with a rep and how to apply."]})]}),(0,b.jsx)(aj.Button,{variant:"iconOnly",iconAfter:"chevron-up",type:"button","aria-expanded":o,"aria-controls":l,"aria-label":o?"Collapse submissions list":"Expand submissions list",onClick:()=>a(e=>!e),className:o?"rotate-180 transition-transform":"transition-transform"})]})}),o&&(0,b.jsx)(aj.Grid,{columns:1,gap:"sm",id:l,children:e.map((e,t)=>(0,b.jsx)(uM,{data:e,position:t+1,onViewNextSteps:i},e.program.id))})]})}):null},uF=()=>{let{shouldShowSubmissions:e,getSubmissionsCopy:t}=l8(),{openLeadFlow:r,firstName:n}=dL(),i=so(),o=i?.submittedResultsFull,a=(0,v.useMemo)(()=>(o??[]).map(e=>({program:{id:e.programId,name:e.programName},school:{name:e.schoolName,slug:e.schoolSlug},applicationCtaLabel:e.applicationCtaLabel,applicationCtaUrl:e.applicationCtaURL})),[o]),l=(0,v.useCallback)(e=>{let t=o?.find(t=>t.programId===e.program.id);t&&r(t)},[o,r]);if(!e||0===a.length)return null;let s=t();return(0,b.jsx)(uR,{submissions:a,firstName:n,title:s.title,subtitle:s.subtitle,onViewNextSteps:l})},uU=({title:e=nm,statusLabel:t=nh,steps:r=ng})=>{let n=r.length>0?r:ng;return(0,b.jsxs)(aj.Flex,{align:"center",className:"container pt-10 text-center",gap:"xl",children:[(0,b.jsx)(aj.Heading,{align:"center",className:"mx-14 my-2 max-w-xl md:mx-auto md:my-4 md:mb-6",variant:"h2",children:e}),(0,b.jsx)("div",{className:"my-6 md:my-8",children:(0,b.jsx)(aj.LoadingDots,{color:"secondary",label:t})}),(0,b.jsx)("div",{className:"mx-auto grid max-w-4xl grid-cols-1 gap-2 md:grid-cols-3",children:n.slice(0,3).map((e,t)=>{let r=ng[t]?.icon;return(0,b.jsx)(u$,{icon:e.icon??r??"compare",children:e.label},`${e.label}-${t}`)})})]})},u$=({children:e,icon:t})=>(0,b.jsxs)("div",{className:"flex flex-col items-center justify-between gap-4 px-12 md:flex-col md:justify-start",children:[(0,b.jsx)(u_,{icon:t}),(0,b.jsx)("div",{className:"mt-3 mb-7 flex flex-row space-x-1 p-1 text-center md:flex-col md:space-x-0 md:p-0",children:(0,b.jsx)(aj.Text,{align:"center",children:e})})]}),u_=({icon:e})=>"checklist"===e?(0,b.jsxs)("svg",{"data-loading-step-icon":e,xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"}),(0,b.jsx)("rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",ry:"1"}),(0,b.jsx)("path",{d:"m9 14 2 2 4-4"})]}):"apply"===e?(0,b.jsxs)("svg",{"data-loading-step-icon":e,xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}),(0,b.jsx)("polyline",{points:"10 17 15 12 10 7"}),(0,b.jsx)("line",{x1:"15",y1:"12",x2:"3",y2:"12"})]}):(0,b.jsxs)("svg",{"data-loading-step-icon":e,xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,b.jsx)("circle",{cx:"10.5",cy:"7",r:"5"}),(0,b.jsx)("circle",{cx:"10.5",cy:"7",r:"1"}),(0,b.jsx)("path",{d:"M3.5 12h2l1.5 5L10.5 12l3 5 1.5-5h2"})]}),uD=["StudentLoansInline"];function uY(e){return"string"==typeof e&&e.trim()?e:void 0}let uB=({dslConfig:e,comparisonEnabled:t,flowType:r,trafficSource:n,monetizationChannel:i})=>{let o=aC(),a=tl(),l=(0,v.useRef)(a);l.current=a;let s=ri().api,c=ro(),d=c?.tenantId?.trim(),u=e?.type==="result",p=(0,v.useMemo)(()=>(function(e){if(!nd(e))return{};let t=e.root;if(!nd(t))return{};let r=t.props;if(!nd(r))return{};let n=r.dataSources;if(!nd(n))return{};let i={};for(let[e,t]of Object.entries(n)){if(!nd(t)){console.warn(`[ConfigurableStep] dataSources["${e}"] is not an object; skipping.`);continue}i[e]=t}return i})(e?.data),[e?.data]),f=(0,v.useMemo)(()=>(function(e,t,r){let n={};for(let[i,o]of Object.entries(e)){if(!i2(o)){n[i]=o;continue}let e=o.endpoint;if("string"!=typeof e||0===e.length){n[i]=o;continue}let a=function(e,t){let r=t.toUpperCase();for(let[t,n]of Object.entries(i$))for(let i of n)if(i.methods.includes(r)&&iH(function(e){if(!e)return"";if(e.startsWith("/"))return e.split("?")[0]??"";try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)return"";return t.pathname}catch{return""}}(e),i.pattern))return t;return null}(e,o.method);if(!a){n[i]=o;continue}try{let l=iG(a,e,o.method,t,r);n[i]={...o,endpoint:l}}catch(e){if(e instanceof iz){console.warn(`[ConfigurableStep] dropping dataSources["${i}"]: ${e.message}`);continue}throw e}}return n})(p,s,d),[p,s,d]),m=(0,v.useMemo)(()=>(function(e,t,r){let n=function(e,t){let r=[],n=on(e.mobiusApiUrl);if(n&&t.identityToken){let e=t.identityToken;r.push({origin:n,apply:t=>{var r,n,i;let o;
1return r=t,n="idToken",i=e,(o=r.query)&&Object.prototype.hasOwnProperty.call(o,n)?r:{...r,query:{...o??{},[n]:i}}}})}return r}(t,r);if(0===n.length)return e;let i={...e},o=!1;for(let[t,r]of Object.entries(e)){if(!i2(r))continue;let e=on(r.endpoint);if(!e)continue;let a=n.find(t=>t.origin===e);if(!a)continue;let l=a.apply(r);l!==r&&(i[t]=l,o=!0)}return o?i:e})(f,s,{identityToken:lu}),[f,s]),h=(0,v.useMemo)(()=>(function(e,t){let r=e.reportingApiUrl?.trim()||t?.sameOriginBase?.trim();if(r)return`${r.replace(/\/$/,"")}/api/reporting/v1/query`})(s,{sameOriginBase:window.location.origin}),[s]),g=(0,v.useMemo)(()=>(function(e,t){if(!t)return e;try{let r=new URL(t).origin.toLowerCase();if(e.some(e=>e.toLowerCase()===r))return e;return[...e,r]}catch{return e}})(function(e){let t=new Set;for(let r of i8){let n=e[r];if("string"==typeof n&&0!==n.length)try{let e=new URL(n);if("http:"!==e.protocol&&"https:"!==e.protocol)continue;t.add(e.origin.toLowerCase())}catch{}}return Array.from(t)}(s),h),[s,h]),y=(0,v.useMemo)(()=>(function(...e){let t=e.filter(e=>void 0!==e);if(0!==t.length)return 1===t.length?t[0]:e=>t.reduce((e,t)=>t(e),e)})(function(e){let t=on(e.mobiusApiUrl);if(t)return e=>{if(on(e.endpoint)!==t)return e;let r=function(e){if(!or(e))return e;let t=e.criteria;if(!or(t))return e;let r=null;for(let e of i7){if(!(e in t))continue;let n=t[e],i=ot(n);i!==n&&((r??={...t})[e]=i)}for(let e of oe){if(!(e in t))continue;let n=t[e];if(!Array.isArray(n))continue;let i=!1,o=n.map(e=>{let t=ot(e);return t!==e&&(i=!0),t});i&&((r??={...t})[e]=o)}return r?{...e,criteria:r}:e}(e.body);return r===e.body?e:{...e,body:r}}}(s),function(e){let t=new Set([e.offeringsServiceBaseUrl,e.offeringsSearchApiUrl].map(on).filter(e=>null!==e));if(0!==t.size)return e=>{if("GET"===e.method)return e;let r=on(e.endpoint);if(r&&!t.has(r))return e;let n=function(e){if(!or(e))return e;let t=e.taxonomy;if(!or(t))return e;let r=null;for(let[e,n]of Object.entries(t)){let i=function(e,t){if(!Array.isArray(e))return e;let r=!1,n=[];for(let t of e)"string"==typeof t&&t.trim().length>0?n.push(t):r=!0;return 0===n.length?i9.has(t)?["general"]:r?void 0:e:r?n:e}(n,e);i!==n&&(r??={...t},void 0===i?delete r[e]:r[e]=i)}return r?{...e,taxonomy:r}:e}(e.body);return n===e.body?e:{...e,body:n}}}(s)),[s]),x=(0,v.useMemo)(()=>(function(...e){let t=e.filter(e=>void 0!==e);if(0!==t.length)return 1===t.length?t[0]:(e,r,n)=>t.reduce((e,t)=>t(e,r,n),e)})(function(e){let t=new Set([e.offeringsServiceBaseUrl,e.offeringsSearchApiUrl].map(og).filter(e=>null!==e));if(0!==t.size)return(e,r,n)=>{if("POST"!==r.method)return e;let i=function(e){if(e.startsWith("/"))return e.split(/[?#]/)[0]??"";try{return new URL(e).pathname}catch{return""}}(r.endpoint);if(i!==rJ&&i!==rX)return e;let o=og(r.endpoint);return o&&!t.has(o)?e:i===rJ?function(e,t){if(!oh(e))return e;if(of(e)){let r=op(e)??"";return om(e,t,r)}if(oh(e.data)&&of(e.data)){let r=op(e)??op(e.data)??"",n=om(e.data,t,r);return n===e.data?e:{...e,data:n}}return e}(e,i):function(e,t,r){if(!oh(e)||!Array.isArray(e.data))return e;let n=op(e)??"",i=e=>oi(e,t,n);if(!r)return{...e,data:e.data.map(i)};let o=[],a=[];for(let t of e.data){var l;oh(l=t)&&!0===l.related?a.push(t):o.push(t)}let s={...e,data:o.map(i)};return a.length>0&&(s.related={data:a.map(i)}),s}(e,i,n?.bucketRelated===!0)}}(s),function(e){let t=new Set([e.organizationServiceBaseUrl,e.organizationApiUrl].map(oP).filter(e=>null!==e));if(0!==t.size)return(e,r)=>{var n;if("POST"!==r.method||!((n=function(e){if(e.startsWith("/"))return e.split(/[?#]/)[0]??"";try{return new URL(e).pathname}catch{return""}}(r.endpoint)).startsWith(oO)&&1===n.slice(oO.length).split("/").filter(Boolean).length))return e;let i=oP(r.endpoint);if(i&&!t.has(i))return e;if(!oT(e)||!Array.isArray(e.items))return e;let o=!1,a=e.items.map(e=>{let t=function(e){var t,r,n,i;let o,a,l,s,c,d,u,p,f,m,h,g,y,b,v;if(!oT(e))return e;let x=e.marketing;if(!oT(x))return e;let w=oj(x.institutionalStats,ov),S=oj(x.institutionalStats,ox),I=(c=[],(d=(o=oT((r=t=x).tags)?r.tags:void 0,a=oT(r.location)?r.location:void 0,l=oE(o?.city)??oE(a?.city),s=oE(o?.state)??oE(a?.state),l&&s?`${l}, ${s}`:l??s??null))&&c.push(d),(g=(u=oT((n=t).additional)?n.additional:void 0,f=(p=oT(n.institutionalStats)?n.institutionalStats:void 0)&&oT(p.institutionLevel)?oE(p.institutionLevel.value):void 0,(m=oE(u?.levelOfInstitution)??f)?(h=m.trim().toLowerCase().replace(/\s+/g," ")).startsWith("less than 2 years")?"<2 year":h.includes("less than 4")?"2 year":h.includes("four or more")?"4 year":/\b(?:2|two)\b/.test(h)?"2 year":/\b(?:4|four)\b/.test(h)?"4 year":null:null))&&c.push(g),(v=(y=oT((i=t).additional)?i.additional:void 0,null===(b=oA(i.institutionalStats,"percentOnlinePrograms")??oN(y?.percentOnlineEnrollment)??oA(i.institutionalStats,"percentOnlineEnrollment"))?null:b>=100?"Online":b<=0?"Campus":"Campus + Online"))&&c.push(v),function(e){let t=oT(e.institutionalStats)?e.institutionalStats:void 0;if(!t)return!1;let r=t.accreditator;return!!oT(r)&&null!==oE(r.value)}(t)&&c.push("Accredited"),c),C=function(e){if(!oT(e))return;let t={};for(let[r,n]of Object.entries(e)){if(!oT(n)||null===n.value||void 0===n.value)continue;let e=ob[r]??("string"==typeof n.label&&n.label.length>0?n.label:r);if("accreditator"===r){let i=oE(n.value);if(null===i)continue;t[r]={label:e,value:"Yes",tooltip:i},t.accreditatorName={label:e,value:i};continue}t[r]={label:e,value:ok(r,n.value)}}return Object.keys(t).length>0?t:void 0}(x.institutionalStats);if(0===w.length&&0===S.length&&0===I.length&&void 0===C)return e;let j={...x};return w.length>0&&(j.stats=w),S.length>0&&(j.details=S),I.length>0&&(j.badges=I),void 0!==C&&(j.statFields=C),{...e,marketing:j}}(e);return t!==e&&(o=!0),t});return o?{...e,items:a}:e}}(s)),[s]),w=lZ(),S=t?w:void 0,I=so(),C=(0,v.useMemo)(()=>nR(o.steps??[])?.subjectLabelFallback,[o.steps]),j=(0,v.useMemo)(()=>{let e=function(e){if(e)try{let t=rS(e);if(0===Object.keys(t).length)return;return rV(t)}catch{return}}(o.flowState),t=function(e){try{let t=window._Cohesion,r={...t?.webContext};if(!r.anonymousId){let e="function"==typeof window.tagular?window.tagular("getAliasSet"):void 0,n=t?.anonymousId||e?.anonymousId;n&&(r.anonymousId=n)}let n=t?.tagular?.writeKey||t?.writeKey;return n&&(r.writeKey=n),e&&(r.correlationId=e),Object.keys(r).length>0?r:void 0}catch{return}}(o.correlationId),i=c?.displayName?.trim(),a=c?.domain?.trim(),l=d||i||a?{...d?{id:d}:{},...i?{name:i}:{},...a?{domain:a}:{}}:void 0;return{...iS(o.flowState,o.steps,o.currentStep,{subjectLabelFallback:C}),...r?{flowType:r}:{},...n?{trafficSource:n}:{},mobiusIdToken:lu,...d?{tenantId:d}:{},...o.headline?{headline:o.headline}:{},...o.params?{params:o.params}:{},...l?{tenant:l}:{},...e?{lead:e}:{},...t?{trackingContext:t}:{},...S?{comparison:S.snapshot}:{},...I?{submissions:I.snapshot}:{}}},[o.flowState,o.steps,o.currentStep,o.headline,o.params,C,r,n,d,c?.displayName,c?.domain,o.correlationId,S?.snapshot,I?.snapshot]),k=(0,v.useMemo)(()=>{let e=function(e,t){let r={};if(!e||!t)return r;for(let n of t){let t=n?.id;if(!t)continue;let i=e[t];if(!i)continue;let o=i.option;if(o){if(!Array.isArray(o)){let e=i.leadFieldAssociated??n.leadFieldAssociated;"string"==typeof e&&e.length>0&&"string"==typeof o.value&&o.value.length>0&&!iT(e,o.value)&&(r[e]=o.value);continue}for(let e of o){let t=e.leadFieldAssociated;!("string"!=typeof t||0===t.length||"string"!=typeof e.value||0===e.value.length||iT(t,e.value))&&(Object.prototype.hasOwnProperty.call(r,t)||(r[t]=e.value))}}}let n=ij(e);n&&!Object.prototype.hasOwnProperty.call(r,"countryCode")&&(r.countryCode=n);let i=iE(e);return i?r.geolocation=i:delete r.geolocation,r}(o.flowState,o.currentStep?[o.currentStep]:[]);return o.schoolId&&!Object.prototype.hasOwnProperty.call(e,"schoolId")&&(e.schoolId=o.schoolId),e},[o.flowState,o.currentStep,o.schoolId]),A=(0,v.useMemo)(()=>eN(e?.data?.content??[]),[e?.data]),E=(0,v.useRef)(o);E.current=o;let N=(0,v.useRef)(A);N.current=A;let T=(0,v.useRef)(void 0);T.current=e?.data?.content;let O=(0,v.useRef)({}),P=(0,v.useRef)(null),L=(0,v.useRef)({}),M=ij(o.flowState);(0,v.useEffect)(()=>{M&&P.current?.("countryCode",M)},[M]);let R=s.organizationServiceBaseUrl??s.organizationApiUrl,F=o.schoolId;(0,v.useEffect)(()=>
1{if(!F||!R)return;let e=F.split(",").map(e=>Number(e.trim())).filter(e=>Number.isFinite(e));if(!e.length)return;let t=!1;return lM(e,R).then(e=>{!t&&e.length&&P.current?.("organizationIds",e.join(","))}),()=>{t=!0}},[F,R]);let U=iE(o.flowState);(0,v.useEffect)(()=>{U&&P.current?.("geolocation",U)},[U]);let $=(0,v.useRef)(S);$.current=S;let _=dM(),D=(0,v.useRef)(_);D.current=_;let Y="function"==typeof aj.useModalHostOptional?(0,aj.useModalHostOptional)():null,B=(0,v.useRef)(Y);B.current=Y;let z=(0,v.useMemo)(()=>s.externalLinkOrigins??[],[s.externalLinkOrigins]),V=s.leadApiBaseUrl,H=(0,v.useMemo)(()=>c?r2(c):void 0,[c]),q=(0,v.useMemo)(()=>d?{tenantId:d,baseUrl:V,flowType:r,trafficSource:n,monetizationChannel:i,getTrackingContext:e=>(function(e={}){try{let t=window._Cohesion,r=t?.webContext,n=t?.anonymousId||r?.anonymousId,i=t?.instanceId||r?.instanceId,o=t?.sessionId||r?.sessionId,a=r?.page?.referrer||("undefined"!=typeof document?document.referrer:"")||"",l=r?.page?.title||("undefined"!=typeof document?document.title:"")||"",s=r?.page?.url||window.location?.href||"",c=r?.userAgent||window.navigator?.userAgent||"",d=t?.tagular?.writeKey||t?.writeKey,u={};a&&(u.referrer=a),l&&(u.title=l),s&&(u.url=s);let p={fromManual:!1};n&&(p.anonymousId=n),i&&(p.instanceId=i),o&&(p.sessionId=o),Object.keys(u).length>0&&(p.page=u),c&&(p.userAgent=c);let f=e.formatType?.trim()||"dexp-offering",m=e.formatSubtype?.trim(),h=e.trackingTenantId?.trim(),g={...h?{tenantId:h}:{},formatType:f,...m?{formatSubtype:m}:{},...d?{writeKey:d}:{},webContext:p};if(!(n||o||i||Object.keys(u).length>0||c))return;return g}catch{return}})({trackingTenantId:H,formatType:"string"==typeof e?.formatType?e.formatType:void 0,formatSubtype:"string"==typeof e?.formatSubtype?e.formatSubtype:void 0})}:void 0,[d,V,r,n,i,H]),G=(0,v.useMemo)(()=>(function(e){let t={};if(t["navigation.advanceStep"]=()=>e.advanceStep(),e.restartFlow){let r=e.restartFlow;t["navigation.restartFlow"]=()=>{r()}}if(void 0!==e.externalLinkOrigins){let r=e.externalLinkOrigins,n=e.openExternalLink??iK;t["navigation.externalLink"]=e=>{let t=e?.url;if("string"!=typeof t||0===t.length)return void console.warn("[ActionDispatcher] navigation.externalLink called without a `url` param.");let i="string"==typeof e?.target&&e.target.length>0?e.target:"_blank";t.startsWith("/")||!iq(t,r)?console.warn(`[ActionDispatcher] navigation.externalLink blocked URL "${t}" -- not in externalLinkOrigins allowlist.`):n(t,i)}}if(e.linkoutRedirect){let{tenantId:r,baseUrl:n,flowType:i,monetizationChannel:o,trafficSource:a}=e.linkoutRedirect,l=e.linkoutRedirect.openLinkout??iJ,s=e.linkoutRedirect.getTrackingContext;t["navigation.linkout"]=e=>{let t,c=e?.offeringId;if("string"!=typeof c||0===c.length)return void console.warn("[ActionDispatcher] navigation.linkout called without an `offeringId` param.");let d=e?.tenantId,u="string"==typeof d&&d.length>0?d:r;if(s)try{t=s(e)}catch{t=void 0}
1let p=function(e){let t=e.offeringId?.trim(),r=e.tenantId?.trim();if(!t||!r)return null;let n=new URLSearchParams;n.set("withRedirect","true"),n.set("offeringId",t),n.set("tenantId",r),e.correlationId&&n.set("correlationId",e.correlationId),e.trafficSource&&n.set("trafficSource",e.trafficSource),e.monetizationChannel&&n.set("monetizationChannel",e.monetizationChannel),e.experience&&n.set("experience",e.experience),e.flowType&&n.set("flowType",e.flowType);let i=function(e){if(e&&0!==Object.keys(e).length)try{let t=JSON.stringify(e);if(!t||"{}"===t||t.length>6e3)return;return t}catch{return}}(e.trackingContext);i&&n.set("trackingContext",i);let o=e.anonymousId?.trim();o&&n.set("anonymousId",o);let a=e.sessionId?.trim();a&&n.set("sessionId",a);let l=e.instanceId?.trim();l&&n.set("instanceId",l);let s=e.country?.trim().toUpperCase();s&&n.set("country",s);let c=e.state?.trim().toUpperCase();return c&&n.set("state",c),`${e.baseUrl??""}/api/hen/v1/delivery-service/lead/conversion-init/?${n.toString()}`}({offeringId:c,tenantId:u,correlationId:iX(e?.correlationId),trafficSource:iX(e?.trafficSource)??a,monetizationChannel:iX(e?.monetizationChannel)??o,experience:iX(e?.experience),flowType:iX(e?.flowType)??i,trackingContext:t,anonymousId:iX(e?.anonymousId),sessionId:iX(e?.sessionId),instanceId:iX(e?.instanceId),country:iX(e?.country),state:iX(e?.state),baseUrl:n});p?l(p):console.warn("[ActionDispatcher] navigation.linkout could not build a redirect URL -- missing offeringId or tenantId.")}}if(e.submitRequestInfo){let r=e.submitRequestInfo;t["submission.requestInfo"]=e=>r(e)}if(e.httpClient){let r=e.httpClient;t["submission.apiCall"]=async e=>{var t;let n=e?.endpoint;if("string"!=typeof n||0===n.length)return void console.warn("[ActionDispatcher] submission.apiCall called without a string `endpoint` param.");let i=e?.method,o="string"==typeof i&&"GET"===i.toUpperCase()?"GET":"POST",a="object"!=typeof(t=e?.headers)||null===t||Array.isArray(t)?void 0:e.headers,l=e?.body;try{await r({endpoint:n,method:o,headers:a,body:l})}catch(e){throw console.warn(`[ActionDispatcher] submission.apiCall to "${n}" failed; DB-2.4 will route the outcome through onAfterDispatch.`,e),e}}}if(e.openLeadFlow){let r=e.openLeadFlow;t["results.openLeadFlow"]=e=>r(e)}if(e.openNamedModal){let r=e.openNamedModal;t["modal.open"]=e=>r(e)}if(e.closeNamedModal){let r=e.closeNamedModal;t["modal.close"]=e=>r(e)}let r=!1;if(t["comparison.toggle"]=t=>{e.toggleComparison?e.toggleComparison(t):r||(r=!0,console.warn("[ActionDispatcher] comparison.toggle dispatched but no ComparisonProvider is wired (DB-2.2 / EDUN-10690)."))},e.goToStep){let r=e.goToStep;t["navigation.goToStep"]=e=>{let t=e?.stepId;if("string"!=typeof t||0===t.length)return void console.warn("[ActionDispatcher] navigation.goToStep called without a `stepId` param.");let n=e?.resetFlowState;r(t,"boolean"==typeof n?{resetFlowState:n}:void 0)}}if(e.goBack){let r=e.goBack;t["navigation.goBack"]=()=>{r()}}if(e.clearFormState){let r=e.clearFormState;t["formState.clear"]=e=>{let t=e?.keys;if(!Array.isArray(t))return void console.warn("[ActionDispatcher] formState.clear called without an array `keys` param; dropping.",e);let n=[];for(let e=0;e<t.length;e++){let r=t[e];"string"==typeof r&&r.length>0&&n.push(r)}0!==n.length&&r(n)}}if(e.extraHandlers){let r=!1;for(let[n,i]of Object.entries(e.extraHandlers))n in t&&!r&&(r=!0,console.warn(`[ActionDispatcher] extraHandlers override built-in handler(s) (first collision: "${n}").`)),t[n]=i}return{has:e=>e in t,dispatch(r,n){let i=t[r];if(!i)return void console.warn(`[ActionDispatcher] No handler registered for action "${r}".`);try{var o;let t=i(n);if(o=t,"object"==typeof o&&null!==o&&"function"==typeof o.then)return void t.then(()=>{e.onAfterDispatch?.(r,n,{ok:!0})},t=>{ne(t instanceof Error?t:Error(String(t)),{source:"ActionDispatcher",action:r,outcome:"rejected"}),e.onAfterDispatch?.(r,n,{ok:!1,error:t})});e.onAfterDispatch?.(r,n,{ok:!0})}catch(t){ne(t instanceof Error?t:Error(String(t)),{source:"ActionDispatcher",action:r,outcome:"threw"}),e.onAfterDispatch?.(r,n,{ok:!1,error:t})}}}})({advanceStep:()=>E.current.handleStepForward?.(),restartFlow:()=>E.current.handleRestart?.(),externalLinkOrigins:z,linkoutRedirect:q,submitRequestInfo:async()=>{await E.current.handleStepForward?.()},openLeadFlow:D.current?e=>{let t=D.current?.openLeadFlow;if(!t)return;let r=e?.result;if(!nf(r))return void console.warn("[ConfigurableStep] results.openLeadFlow ignored â params.result must be a Result with a numeric programId and either a non-empty offeringUuid or the full schoolId, schoolSlug, schoolName, and programName quartet.",e);let n=e?.offeringId;"string"==typeof n&&n.trim().length>0&&P.current?.("selectedOfferingId",n),t(r)}:void 0,openNamedModal:B.current?e=>{let t=B.current;t&&i0(t,"modal.open",e,"ConfigurableStep")}:void 0,closeNamedModal:B.current?e=>{let t=B.current;t&&i0(t,"modal.close",e,"ConfigurableStep")}:void 0,httpClient:async e=>{let t={endpoint:e.endpoint,method:e.method,...e.headers?{headers:e.headers}:{},...void 0!==e.body?{body:e.body}:{}},r=await aV(t,{},{trustedOrigins:g,tenantId:d,coerceRequestBody:y,coerceResponse:x});if("error"===r.status)throw r.error??Error("submission.apiCall failed");return r.data},toggleComparison:$.current?e=>{let t=$.current,r=t?.togglePrograms;if(!t||!r)return;let n=e?.item;if(!nu(n))return void console.warn("[ConfigurableStep] comparison.toggle ignored â params.item must be a Result with a numeric programId.",e);let i=t.isProgramSelected(n.programId),o=r(n),a=t.dslConfigId,l={schoolSlug:n.schoolSlug,viewCorrelationId:n.viewCorrelationId,correlationId:n.productClickedCorrelationId};o&&!i?dR(l,!0,a):!o&&i&&dR(l,!1,a)}:void 0,goToStep:E.current.handleGoToStep?(e,t)=>E.current.handleGoToStep?.(e,t):void 0,goBack:E.current.handlePrevious?()=>E.current.handlePrevious?.():void 0,clearFormState:e=>{let t=P.current;if(t)for(let r=0;r<e.length;r++)t(e[r],"")}}),[z,q,g,y,x,d,!!S,!!_,!!Y]),W=(0,v.useCallback)(e=>{let t=L.current,r=E.current.currentStep?.id;if(!r){L.current=e;return}try{!function(e){let t;if(!e.stepId||!function(e,t){for(let r of Object.keys(t))if(e[r]!==t[r])return!0;for(let r of Object.keys(e))if(!(r in t)&&void 0!==e[r])return!0;return!1}
1(e.prev,e.next))return;let r=[];for(let n of Object.keys(e.next)){let i;try{i=function(e,t,r){var n;let i,o=r.resolveBound(e),a=o?.source?r.resolveSource(o.source):void 0,l=!o?.source&&Object.prototype.hasOwnProperty.call(te,e)&&r.translateDcsValue?r.translateDcsValue(e,t):function(e,t,r){let n=String(e);if(!t?.optionLabelField||!t.optionValueField)return iM(`missing-companion-fields:${t?.formKey??"?"}`),n;let i=r?.data;if(null==i)return iM(`source-not-resolved:${t.source??"?"}`),n;let o=function(e,t,r){let n;if(void 0===t)return Array.isArray(e)?iL(e):[];try{let e=n8(`{{${t}}}`).segments[0];e&&"expression"===e.type&&"path"===e.kind&&(n=e.segments)}catch(e){if(e instanceof n6)return iM(`bad-options-path:${r??"?"}:${t}`),[];throw e}if(!n||0===n.length)return[];let i=it(e,n);return Array.isArray(i)?iL(i):[]}(i,t.optionsPath,t.source);if(0===o.length)return iM(`source-not-resolved:${t.source??"?"}`),n;let a=t.optionLabelField,l=t.optionValueField;for(let t=0;t<o.length;t++){let r=o[t];if(r&&"object"==typeof r){let t=r[l];if(void 0!==t&&String(t)===e){let e=r[a];if(null!=e)return String(e)}}}return iM(`no-match:${t.source??"?"}:${e}`),n}(t,o,a),s=function(e,t,r){if(!t?.optionValueField)return;let n=r?.data;if(null==n)return;let i=function(e,t){let r;if(void 0===t)return Array.isArray(e)?iR(e):[];try{let e=n8(`{{${t}}}`).segments[0];e&&"expression"===e.type&&"path"===e.kind&&(r=e.segments)}catch(e){if(e instanceof n6)return[];throw e}if(!r||0===r.length)return[];let n=it(e,r);return Array.isArray(n)?iR(n):[]}(n,t.optionsPath);if(0===i.length)return;let o=t.optionValueField;for(let t=0;t<i.length;t++){let r=i[t];if(r&&"object"==typeof r){let t=r[o];if(void 0!==t&&String(t)===e){let e=r.slug;if("string"==typeof e&&e.length>0)return e;break}}}}(t,o,a),c=o?o.leadFieldAssociated:e,d=o?.customField,u=o?.isArray===!0||void 0;return i={optionId:(n={formKey:e,value:t,label:l,...s?{slug:s}:{},leadFieldAssociated:c,customField:d,isArray:u}).formKey,text:n.label,value:n.value},n.slug&&(i.slug=n.slug),n.leadFieldAssociated&&(i.leadFieldAssociated=n.leadFieldAssociated),n.customField&&(i.customField=n.customField),!0===n.isArray&&(i.isArray=!0),i}(n,e.next[n]??"",e)}catch(e){console.error(`[ConfigurableStep] translateFormStateChange: resolver threw for "${n}"`,e);continue}i&&(r.push(i),!t&&i.leadFieldAssociated&&(t=i.leadFieldAssociated))}if(0===r.length)return;let n=1===r.length?r[0]:r,i=1===r.length?t:void 0;e.commit(e.stepId,{option:n,...i&&{leadFieldAssociated:i}})}({stepId:r,prev:t,next:e,resolveBound:e=>N.current[e]??function(e,t){if(!t||"string"!=typeof t)return;let r=[];if(eT(e,(e,n)=>{e===t&&r.push(eP(t,n))}),0!==r.length)return r.length>1&&console.warn(`[ConfigurableStep] Multiple components share formKey "${t}"; using the first match.`),r[0]}(T.current,e),resolveSource:e=>O.current[e],translateDcsValue:l.current.translateDcsValue,commit:(e,t)=>E.current.updateFlowState?.(e,t)})}finally{L.current=e}},[]),Q=u?(0,b.jsxs)(uq,{children:[(0,b.jsx)(uF,{}),(0,b.jsx)(uk,{dslConfig:e,excludedContentTypes:uD}),(0,b.jsx)(uL,{})]}):(0,b.jsx)(uk,{dslConfig:e});return(0,b.jsxs)(la,{dataSources:m,flowContext:j,initialFormState:k,onFormStateChange:W,trustedOrigins:g,tenantId:d,reportingQueryUrl:h,coerceRequestBody:y,coerceResponse:x,children:[(0,b.jsx)(uV,{sourcesRef:O,updateFormStateRef:P}),u&&(0,b.jsx)(uH,{}),(0,b.jsx)(lf.Provider,{value:G,children:(0,b.jsx)(uG,{children:Q})})]})},uz=({dslConfig:e,flowType:t,trafficSource:r})=>{var n;let{currentStep:i}=aC(),o=e?.type==="result",a=(0,v.useMemo)(()=>o?nE(e?.data):void 0,[e?.data,o]),l=a?.comparison,s=uY(t)??ig(i)??(n=a,uY(n?.flowType)),c=uY(r)??function(e){let t=iy(e);if(t)return t;let r=rC(window.location?.href??"");return"string"==typeof r&&r.length>0?r:void 0}(i),d=iO(i),u=o&&l?.enabled===!0,p=a?.exitStrategy?.studentLoansInline,f=o&&p?.enabled===!0?function(e){let{enabled:t,...r}=e;return{type:"StudentLoansInline",props:{...r,variant:"narrow"}}}(p):void 0,m=a?.exitStrategy?.extraCta,h=o&&m?.enabled===!0?{enabled:!0,...void 0!==m.label?{label:m.label}:{},...void 0!==m.eventName?{eventName:m.eventName}:{}}:void 0,g=(0,b.jsx)(uB,{dslConfig:e,comparisonEnabled:u,flowType:s,trafficSource:c,monetizationChannel:d}
1),y=u?(0,b.jsxs)(lJ,{minPrograms:l?.minSelection,maxPrograms:l?.maxSelection,dslConfigId:e?.configId,children:[g,(0,b.jsx)(ui,{})]}):g,x="function"==typeof aj.ModalHostProvider?(0,b.jsx)(aj.ModalHostProvider,{children:y}):y;return o?(0,b.jsx)(l3,{config:a,children:(0,b.jsx)(si,{children:(0,b.jsx)(dP,{dslConfigId:e?.configId,flowType:s,trafficSource:c,monetizationChannel:d,studentLoansInlineContent:f,extraCtaConfig:h,children:x})})}):x},uV=({sourcesRef:e,updateFormStateRef:t})=>{let{sources:r,updateFormState:n}=ll();return e.current=r,t.current=n,null},uH=()=>{let{sources:e}=ll(),t=dM(),r=t?.applyOfferingDetail,n=e.offeringDetail;return(0,v.useEffect)(()=>{r?.(n)},[r,n]),null},uq=({children:e})=>{let{getSource:t}=ll(),{shouldShowLoadingInterstitial:r,getLoadingCopy:n}=l8(),i=t("results"),[o,a]=v.useState(!1),l=r&&i&&"pending"===i.status;return((0,v.useEffect)(()=>{if(!l)return void a(!1);let e=window.setTimeout(()=>{a(!0)},1e4);return()=>window.clearTimeout(e)},[l]),l&&!o)?(0,b.jsx)(uU,{...n()}):(0,b.jsx)(b.Fragment,{children:e})},uG=({children:e})=>{let t=lz();return(0,b.jsx)("div",{ref:t?.setEntryRootNode,"data-de-entry-root":!0,children:e})},uW={[R.CAPPEX]:({handlePrevious:e})=>(0,b.jsxs)("div",{className:"relative w-full h-full min-h-[500px] bg-white",children:[(0,b.jsx)("div",{className:"h-full w-full bg-white relative hidden md:block","data-testid":"cappex-background-image",children:(0,b.jsx)("img",{src:"https://res.cloudinary.com/highereducation/image/upload/c_scale,w_1440/v1684422028/Cappex/LandingPage.jpg",alt:"woman in a library holding books to her chest and looking at camera",className:"h-full w-full object-contain"})}),(0,b.jsx)("div",{className:"md:absolute inset-0 flex h-full w-full flex-col items-center justify-center lg:ml-8 xl:ml-60",children:(0,b.jsxs)("section",{className:"md:relative w-full max-w-full flex flex-col p-12 md:gap-2",children:[(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-2 py-1 text-primary-500 text-sm md:text-sm mb-4 md:mb-0",onClick:()=>{e?.()},children:[(0,b.jsx)(aA.X8f,{className:"text-sm md:text-sm"}),"Back to previous question"]}),(0,b.jsx)("h3",{className:"text-primary-500 max-w-full text-2xl md:text-2xl font-medium leading-tight",children:"Continue with Appily to get your best results!"}),(0,b.jsxs)("p",{className:"text-primary-500 mt-3 md:mt-1 max-w-full text-base md:text-lg md:max-w-md leading-relaxed",children:["We're"," ",(0,b.jsx)("b",{className:"text-secondary-700",children:"partnering with Appily"})," to help students like you find the right college for your goals and future. Finish this quiz on their site to get personalized matches."]}),(0,b.jsx)("h6",{className:"text-primary-500 mt-4 md:mt-2 text-lg md:text-lg font-semibold",children:"Find a College in 3 Easy Steps"}),(0,b.jsxs)("ul",{className:"ml-5 mt-2 md:mt-1 text-primary-600 text-base md:text-sm space-y-1",children:[(0,b.jsx)("li",{className:"list-item max-w-full list-disc md:max-w-md leading-relaxed",children:"Continue this quiz on the Appily website"}),(0,b.jsx)("li",{className:"list-item max-w-full list-disc md:max-w-md leading-relaxed",children:"Create your FREE account"}),(0,b.jsx)("li",{className:"list-item max-w-full list-disc md:max-w-md leading-relaxed",children:"Connect with colleges"})]}),(0,b.jsx)("p",{className:"mt-3 md:mt-1 max-w-full text-primary-600 md:max-w-md text-base md:text-sm leading-relaxed",children:"Once you've created your account, you can even view your application status!"}),(0,b.jsx)("a",{"data-testid":"cappex-cta-anchor",children:(0,b.jsxs)("button",{"data-testid":"cappex-cta-button",onClick:()=>{window.open("http://tracking.appily.com/aff_c?offer_id=181&aff_id=2195&aff_sub=PHASE2","_blank")},type:"button",className:"rounded bg-secondary-700 mt-6 md:mt-auto flex items-center justify-center gap-2 py-3 px-6 md:px-3 font-bold text-white text-base md:text-sm",children:["Find Your Match"," ",(0,b.jsx)(ak.aIP,{className:"text-xl md:text-xl text-white"})]})})]})})]})},uQ=({componentType:e,currentStep:t,componentProps:r})=>{let{handlePrevious:n}=aC();if(t?.dslConfigId)return e&&console.warn(`[ComponentRenderer] Step "${t.id??"unknown"}" has both componentType "${e}" and dslConfigId "${t.dslConfigId}"; routing through DSL. Payloads should declare exactly one.`),(0,b.jsx)(uz,{dslConfig:t.dslConfig,flowType:t.flowType,trafficSource:t.trafficSource},t.dslConfigId??t.id??"configurable");let i=uW[e];return i?(0,b.jsx)(i,{currentStep:t,handlePrevious:n,...r}):(console.warn(`Component type "${e}" is not registered. Add it to COMPONENT_REGISTRY in ComponentRenderer.tsx`),null)};function uK(e,t){switch(e){case"BANNER_CTA":return R.BANNER_CTA;case"COMPONENT":return t?.componentType||null;default:return null}}let uJ=({modal:e,openModal:t})=>{let{handleTCPA:r,handleStepForward:n}=aC();return e?.enable?(0,b.jsx)(aj.Modal,{open:t,onOpenChange:e=>{e||r(!1)},children:(0,b.jsxs)(aj.Modal.Content,{size:"sm",children:[(0,b.jsx)(aj.Modal.Header,{children:(0,b.jsx)(aj.Modal.Title,{children:e?.title||""})}),(0,b.jsx)(aj.Text,{variant:"b5",color:"subtext",className:"de-modal-content px-lg py-md",children:k(e.content||"")}),(0,b.jsx)(aj.Modal.Footer,{children:(0,b.jsx)(aj.Button,{variant:"primaryFill",className:"w-full",onClick:()=>{r(!0),n()},children:e?.buttonText||"Accept"})})]})}):null},uX=e=>e?.type===O.QUESTION||e?.type===O.MULTI_QUESTION,uZ=({children:e})=>{let t=v.useRef(null),{currentStep:r,currentStepType:n,styleVariant:i,openModal:o}=aC(),a=r?.modal,l=r?.isTerminal&&r?.isEntry,s=function(){let{steps:e,currentStep:t,navigationHistory:r}=aC(),n=(0,v.useMemo)(()=>(e=>{if(!e||0===e.length)return 5;let t=new Set;for(let r of e)r.type===O.MULTI_QUESTION&&r.stepQuestions?.forEach(e
1=>e.id&&t.add(e.id));let r=new Map;for(let t of e)t.id&&r.set(t.id,t);let n=e.find(e=>e.isEntry)||e[0],i=0,o=new Set,a=n?.id;for(;a&&!o.has(a);){o.add(a);let e=r.get(a);if(!e||(uX(e)&&!t.has(e.id||"")&&i++,e.isTerminal))break;let n=e.branchingLogic?.find(e=>e.condition?.type===L.DEFAULT);if(!n||n.type===M.RESULT)break;a=n.nextId}return Math.max(i,5)})(e),[e]);return(0,v.useMemo)(()=>{if(!t?.id||0===e.length)return 0;let i=new Set;for(let t of e)t.type===O.MULTI_QUESTION&&t.stepQuestions?.forEach(e=>e.id&&i.add(e.id));return Math.round(Math.min(10+r.filter(e=>uX(e)&&!i.has(e.id||"")).length/n*85,95))},[e,t?.id,r,n])}();return n===O.RESULT?(0,b.jsx)("div",{className:"de-experience-container h-full",children:(0,b.jsx)("div",{className:"de-step-container bg-gray-50 h-full",children:e})}):(0,b.jsxs)(aj.Flex,{direction:"column",gap:"lg",className:"de-experience-wrapper md:flex-1 bg-white not-prose p-0",ref:t,children:["default"===i&&!l&&(0,b.jsx)(aj.Progress,{value:s,label:"Your Progress",valueLabel:`${Math.round(s)}% complete`,className:"[&>div]:!bg-secondary-700"}),(0,b.jsx)("div",{className:"de-step-container",children:e}),(0,b.jsx)(uJ,{modal:a,openModal:o})]})},u0=({title:e="We have over",statistic:t="300",description:r="potential matches for you. Letâs personalize that list some more.",sourceText:n})=>(0,b.jsx)(aj.Card,{className:"w-full",variant:"background-white",children:(0,b.jsxs)(aj.Card.Content,{children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"none",children:[(0,b.jsx)(aj.Brow,{children:e}),(0,b.jsx)(aj.Text,{variant:"d3",weight:"bold",color:"heading",tag:"span",children:t}),(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:k(r)})]}),n&&(0,b.jsx)(aj.Text,{variant:"b5",color:"subtext",className:"font-bold underline",children:k(n)})]})}),u1=({text:e="Online programs can cut the time it takes to get your degree by 50%.",title:t="Did You Know?"})=>(0,b.jsx)(aj.Card,{className:"w-full",variant:"background-white",children:(0,b.jsxs)(aj.Card.Content,{children:[(0,b.jsx)(aj.Brow,{children:t}),(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:k(e)})]})}),u2=({text:e="Online programs can cut the time it takes to get your degree by 50%.",graphic:t="horizontal",itemNameOne:r="Online",itemNameTwo:n="Traditional",sourceText:i="Source"})=>{let o="horizontal"===t;return(0,b.jsx)(aj.Card,{className:"w-full",variant:"background-white",children:(0,b.jsxs)(aj.Card.Content,{children:[(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:k(e)}),(0,b.jsx)(aj.StatStyles,{style:o?"bars-horizontal":"bars-vertical",bars:[{label:r,value:60,variant:"tertiary"},{label:n,value:100,variant:"primary"}],className:o?void 0:"h-36"}),i&&(0,b.jsx)(aj.Text,{variant:"b5",color:"subtext",className:"font-bold underline",children:k(i)})]})})};function u4(e){return e&&(e.type===O.QUESTION||e.type===O.MULTI_QUESTION)?e.sideRailConfigs??[]:[]}let u5=(0,v.memo)(()=>{let{currentStep:e}=aC(),t=u4(e);return(0,b.jsx)(aj.Card,{variant:"background-gray","data-test":"side-rail",className:"w-full md:self-start md:max-w-96 md:min-w-80 rounded-[32px] gap-8 px-8 py-7",children:t.map(e=>{switch(e.type){case"statisticHighlight":return(0,b.jsx)(u0,{...e.config},e.id);case"textBox":return(0,b.jsx)(u1,{...e.config},e.id);case"graphicCard":return(0,b.jsx)(u2,{...e.config},e.id);default:return null}})})}),u3=({onBack:e,onNext:t,nextLabel:r,showBack:n=!1,isFullPageExp:i=!0,disabled:o=!1})=>(0,b.jsxs)(aj.Flex,{direction:"row",justify:i?"start":"center",align:"start",gap:"xs",className:i?"de-cta-container fixed bottom-0 left-0 right-0 z-50 bg-neutral-50 px-5 py-4 md:static md:bg-transparent md:px-0 md:py-0 md:z-auto":"de-cta-container ",children:[n&&(0,b.jsx)(aj.Button,{"data-test":"back-button",onClick:e,variant:"grayOutline",size:"lg",iconBefore:"arrow-left","aria-label":"Back"}),(0,b.jsx)(aj.Button,{"data-test":"cta-button",onClick:t,variant:"primaryFill",size:"lg",className:i?"flex-1 md:flex-none":void 0,disabled:o,children:r})]}),u6=({step:e,isFullPageExp:t})=>e.preSubHeading?(0,b.jsx)(aj.Text,{"data-test":"step-preSubHeading",variant:t?"b3":"b4",color:"subtext",className:"font-bold",children:e.preSubHeading}):null,u8=({step:e,isFullPageExp:t})=>e.title?(0,b.jsxs)(aj.Flex,{direction:"column",justify:"center",align:"start",ga
1p:"xs",children:[(0,b.jsx)(aj.Heading,{variant:t?"h1":"h3",className:t?"de-step-title text-h3 leading-h3 md:text-h2 md:leading-h2":"de-step-title",children:e.title}),e.subtitle&&(0,b.jsx)(aj.Text,{variant:"b3",color:"default","data-test":"de-step-subtitle",children:e.subtitle})]}):null,u9=({step:e})=>e.tooltip?(0,b.jsx)(aj.FeedbackBox,{children:k(e.tooltip)}):null,u7=({id:e,fieldType:t,options:r,title:n,stepName:i,isMultiQuestionChild:o=!1,variant:a,leadFieldAssociated:l})=>{let{eventContext:s,getStepMetadataById:c}=aC(),{triggerFieldEvents:d}=aw(),u=c(e||""),{ref:p}=sh([ap({...s,variant:a||t}),af({...s,fieldName:i||u?.leadFieldAssociated?.toString()||l?.toString()||"",fieldValue:r.map(e=>e.text).join(","),fieldType:t,...o&&{stepId:e,stepName:i||n}},"FieldViewed")]);return{ref:p,triggerFieldInputted:(0,v.useCallback)(r=>{d("FieldInputted",{...s,fieldValue:r,fieldNumber:s?.currentStepIndex||0,fieldName:o?i||"":s?.currentStep?.stepName||"",fieldLabel:o?n:s?.currentStep?.title,fieldType:t,fieldId:o?l?.toString()||e:s?.currentStep?.leadFieldAssociated?.toString()||"",...o&&{stepId:e,stepName:i||n}})},[s,t,e,o,l,i,n,d])}},pe=({count:e=6})=>(0,b.jsx)(aj.Flex,{wrap:"wrap",gap:"md",justify:"center",align:"center",className:"py-6 w-full",children:Array.from({length:e}).map((e,t)=>(0,b.jsx)("div",{className:"animate-pulse rounded-full bg-gray-300 h-10",style:{width:`${120+t%3*40}px`}},t))}),pt=(e,t,r)=>{let n=new Set(e.map(e=>e.optionId)),i=r.filter(e=>!n.has(e.optionId)),o=i.length>0?[...i,...e]:e,a=new Set(o.map(e=>e.optionId));return{displayedOptions:o,searchableOptions:t.filter(e=>!a.has(e.optionId))}},pr=e=>({value:e.optionId,label:String(e.text)}),pn=({options:e=[],id:t="",leadFieldAssociated:r,maxSelection:n=0,automaticNext:i=!1,showOrderNumber:o=!1,isMultiQuestionChild:a=!1,title:l,stepName:s,variant:c,isOptionsLoading:d=!1,searchBarAllOptions:u,dynamicOptionsError:p})=>{let{updateFlowState:f,getStepMetadataById:m,handleStepForward:h}=aC(),g=(m(t)||{}).option||[],{ref:y,triggerFieldInputted:x}=u7({id:t,fieldType:"multiple_choice",options:e,title:l,stepName:s,isMultiQuestionChild:a,variant:c,leadFieldAssociated:r}),w=!!u?.length,{displayedOptions:S,searchableOptions:I}=(0,v.useMemo)(()=>w?pt(e,u,g):{displayedOptions:e,searchableOptions:[]},[w,e,u,g]),C=e=>{let o;if(g.find(t=>t.optionId===e.optionId))o=g.filter(t=>t.optionId!==e.optionId);else{if(n>0&&g.length>=n)return;o=[...g,e]}x(o.map(e=>e.text).join(",")),f(t,{option:o,leadFieldAssociated:r}),i&&!a&&o.length===n&&h()},j=d&&!p;return(0,b.jsxs)(b.Fragment,{children:[p?(0,b.jsx)(sv,{message:p,className:"w-full justify-center py-2 px-2"}):null,(0,b.jsx)(aj.Flex,{gap:"sm",wrap:"wrap",align:"center",justify:"start",direction:"row",className:"w-full",ref:y,children:j?(0,b.jsx)(pe,{}):S.map(e=>{let t,r=g.some(t=>t.optionId===e.optionId),n=-1!==(t=g.findIndex(t=>t.optionId===e.optionId))?t+1:null,i=o&&r;return(0,b.jsxs)(aj.Button,{size:"sm",type:"button",className:"w-fit",variant:"grayOutline","aria-pressed":r,onClick:()=>C(e),children:[i&&(0,b.jsxs)(aj.Text,{tag:"span",variant:"b5",weight:"semibold",children:[n,"."]}),e.text]},e.optionId)})}),!j&&w&&I.length>0&&(0,b.jsx)(aj.Combobox,{className:"mt-4","aria-label":l||"Search options",options:I.map(pr),selectedValues:g.map(e=>e.optionId),maxSelectable:n,onSelect:e=>{let t=(u??[]).find(t=>t.optionId===e);t&&C(t)}})]})},pi=(e,t)=>{if(!e)return"";let r=e;for(let n of Array.from(e.matchAll(/\{\{([^}]+)\}\}/g))){let e=t[n[1]],i="";if(e&&e.option)if(Array.isArray(e.option))i=e.option.map(e=>e.text||e.value).join(", ");else{let t=e.option;i=t.text||t.value}r=r.replace(n[0],i)}return r},po=({options:e=[],title:t,isMultiQuestionChild:r=!1,id:n="",leadFieldAssociated:i,automaticNext:o=!1,stepName:a,variant:l,isOptionsLoading:s=!1})=>{let{updateFlowState:c,getStepMetadataById:d,handleStepForward:u,flowState:p}=aC(),f=d(n||""),m=f?.option,h=(0,v.useMemo)(()=>t?pi(t,p):"",[t,p]),{ref:g,triggerFieldInputted:y}=u7({id:n,fieldType:"radio",options:e,title:t,stepName:a,isMultiQuestionChild:r,variant:l,leadFieldAssociated:i}),x=(0,v.useCallback)(t=>{let a=e.find(e=>e.optionId===t);a&&(m&&!Array.isArray(m)&&m.optionId===a.optionId?c(n,{}):c(n,{option:a,leadFieldAssociated:i}),y(a.text),o&&!r&&u())},[e,m,n,i,c,r,y,o,u]),w=e.map(e=>({value:e.optionId||"",label:e.text})),S=m&&!Array.isArray(m)?m.optionId:"";return(0,b.jsxs)(aj.Flex,{direction:r?"row":"column",gap:r?"xs":"md",ref:g,children:[t&&r&&(0,b.jsx)(aj.Heading,{variant:"h6",children:h}),s?(0,b.jsx)(pe,{}):(0,b.jsx)(aj.Radio,{options:w,value:S,onValueChange:x,name:n})]})},pa=async e=>null,pl=e=>{let{flowState:t}=aC(),[r,n]=(0,v.useState)([]),[i,o]=(0,v.useState)(!0),[a,l]=(0,v.useState)(),s=(0,v.useMemo)(()=>((e,t)=>{if(!e)return{};let r={},n=e=>{if(!e)return e;let r=e;for(let n of Array.from(e.matchAll(/\{\{([^}]+)\}\}/g))){let e=t[n[1]];if(e&&e.option){let t="";if(Array.isArray(e.option))t=e.option.map(e=>e.value||e.text).join(",");else{let r=e.option;t=r.value||r.text}r=r.replace(n[0],t)}}return r};return r.type=n(e.type),r.subject=n(e.subject),r})(e,t),[e,t]),c=e?.filterKey||"subjects",d=`${s.type??""}|${s.subject??""}|${c}`;return(0,v.useEffect)(()=>{let e=!1,t={type:s.type,subject:s.subject};return(async()=>{o(!0),l(void 0);try{let r=await pa(t);if(e)return;n(((e,t)=>{if(!e)return[];let r=e[t];if(!r)return[];let n=[];return Array.isArray(r)?n=r.filter(e=>"string"==typeof e):"object"==typeof r&&(n=Object.entries(r).sort(([e,t],[r,n])=>n!==t?n-t:e.localeCompare(r)).map(([e])=>e)),n.map(e=>({optionId:e,text:e,value:e}))}
1)(r,c))}catch(t){if(console.error("Error fetching filter options:",t),e)return;l("Failed to load options"),n([])}finally{e||o(!1)}})(),()=>{e=!0}},[d,s.type,s.subject,c]),{dynamicOptions:r,isLoading:i,fetchError:a}},ps=({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,dynamicOptionsFilters:l,variant:s,isOptionsLoading:c=!1,dynamicOptionsError:d})=>{let u,p,{updateFlowState:f,getStepMetadataById:m,handleStepForward:h}=aC(),g=m(t||""),y=g?.option,[x,w]=(0,v.useState)(""),[S,I]=(0,v.useState)(!1),[,C]=(0,v.useState)([]),j=(0,v.useRef)(null),{dynamicOptions:k,isLoading:A,fetchError:E}=pl(l),{ref:N,triggerFieldInputted:T}=u7({id:t,fieldType:"single_choice",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:s||"dynamic_single_choice",leadFieldAssociated:r});(0,v.useEffect)(()=>{let e=e=>{j.current&&!j.current.contains(e.target)&&I(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let O=(p=new Set((u=k.slice(0,10)).map(e=>e.optionId)),y&&!p.has(y.optionId)?[y,...u]:u),P=(()=>{if(!x||k.length<=10)return[];let e=new Set(O.map(e=>e.optionId));return k.filter(t=>!e.has(t.optionId)&&t.text.toLowerCase().includes(x.toLowerCase()))})(),L=d??E,M=(A||c)&&!L,R=!A&&!c&&!L&&0===k.length;return(0,b.jsxs)(b.Fragment,{children:[L?(0,b.jsx)(sv,{message:L,className:"w-full justify-center py-2 px-2"}):null,R?(0,b.jsx)("p",{role:"status",className:"w-full text-center text-sm text-gray-500 py-2 px-2",children:"No options found"}):null,(0,b.jsx)("div",{className:"flex flex-wrap gap-4 py-6 font-normal w-full items-center justify-center",ref:N,children:M?Array.from({length:10}).map((e,t)=>(0,b.jsx)("div",{className:"animate-pulse rounded-full bg-gray-300 h-10",style:{width:`${120+t%3*40}px`}},t)):O.map((e,o)=>{let a=y&&!Array.isArray(y)&&y.optionId===e.optionId;return(0,b.jsxs)("button",{className:`mx-0 transition-all duration-200 ease-in-out mb-0 flex w-fit flex-initial cursor-pointer items-center justify-center gap-x-2 rounded-full border-2 px-5 py-2 text-sm hover:border-gray-300 hover:bg-gray-100 ${a?"bg-secondary-800 text-white border-secondary-700":""}`,onClick:()=>{a?(f(t,null),C(t=>t.filter(t=>t.optionId!==e.optionId))):(f(t,{option:e,leadFieldAssociated:r}),n&&!i&&h()),T(e.text)},children:[(0,b.jsx)("svg",{className:`w-[14px] h-[14px] ${a?"block":"hidden"}`,viewBox:"0 0 20 20",fill:"currentColor",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),e.text]},o)})}),M&&(0,b.jsx)("div",{className:"w-full relative mb-6",children:(0,b.jsx)("div",{className:"animate-pulse rounded-lg bg-gray-300 h-11 w-full"})}),!M&&k.length>10&&(0,b.jsxs)("div",{className:"w-full relative mb-6",ref:j,children:[(0,b.jsx)("input",{type:"text",placeholder:"Search options...",value:x,onChange:e=>{w(e.target.value),I(e.target.value.length>0)},onFocus:()=>x.length>0&&I(!0),className:"w-full px-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),S&&P.length>0&&(0,b.jsx)("div",{className:"absolute z-10 w-full mt-1 bg-white border border-gray-300 rounded-xl shadow-lg max-h-60 overflow-y-auto",children:P.map((e,o)=>(0,b.jsx)("button",{onClick:()=>{C(t=>{let r=t.filter(t=>t.optionId!==e.optionId);return[e,...r]}),f(t,{option:e,leadFieldAssociated:r}),T(e.text),w(""),I(!1),n&&!i&&h()},className:"w-full px-4 py-3 text-left hover:bg-gray-100 transition-colors border-b border-gray-200 last:border-b-0 focus:outline-none focus:bg-gray-100 no-underline",children:(0,b.jsx)("div",{className:"font-medium text-gray-900",children:e.text})},o))}),S&&0===P.length&&(0,b.jsx)("div",{className:"absolute z-10 w-full mt-1 bg-white border border-gray-300 rounded-xl shadow-lg px-4 py-3 text-gray-500",children:"No options found"})]})]})},pc="searchbar-option-",pd=({options:e,selectedOptions:t,maxSelection:r=0,onSelect:n,placeholder:i="Search options...",emptyMessage:o="No options foun
1d"})=>{let[a,l]=(0,v.useState)(""),[s,c]=(0,v.useState)(!1),[d,u]=(0,v.useState)(-1),p=(0,v.useRef)(null),f=(0,v.useRef)(null),m=(0,v.useId)();(0,v.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&(c(!1),u(-1))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let h=(0,v.useMemo)(()=>{if(!a)return[];let t=a.toLowerCase();return e.filter(e=>String(e.text).toLowerCase().includes(t))},[e,a]);(0,v.useEffect)(()=>{u(-1)},[h]),(0,v.useEffect)(()=>{if(d<0||!f.current)return;let e=h[d]?.optionId;if(!e)return;let t=document.getElementById(`${pc}${e}`);t&&"function"==typeof t.scrollIntoView&&t.scrollIntoView({block:"nearest"})},[d,h]);let g=(0,v.useCallback)(e=>{n(e),l(""),c(!1),u(-1)},[n]),y=(0,v.useCallback)(e=>{if(!s||0===h.length){"Escape"===e.key&&(c(!1),u(-1));return}switch(e.key){case"ArrowDown":e.preventDefault(),u(e=>e<h.length-1?e+1:0);break;case"ArrowUp":e.preventDefault(),u(e=>e>0?e-1:h.length-1);break;case"Enter":if(e.preventDefault(),d>=0&&d<h.length){let e=h[d],n=t.some(t=>t.optionId===e.optionId),i=r>0&&t.length>=r;(n||!i)&&g(e)}break;case"Escape":e.preventDefault(),c(!1),u(-1);break;case"Home":e.preventDefault(),u(0);break;case"End":e.preventDefault(),u(h.length-1)}},[s,h,d,t,r,g]),x=r>0&&t.length>=r,w=d>=0&&h[d]?`${pc}${h[d].optionId}`:void 0;return(0,b.jsxs)("div",{className:"w-full relative",ref:p,children:[(0,b.jsx)(aj.Input,{type:"text",role:"combobox",icon:"search",className:"pl-10","aria-expanded":s,"aria-haspopup":"listbox","aria-controls":m,"aria-activedescendant":w,"aria-autocomplete":"list",placeholder:i,value:a,onChange:e=>{l(e.target.value),c(e.target.value.length>0)},onFocus:()=>a.length>0&&c(!0),onKeyDown:y}),s&&h.length>0&&(0,b.jsx)("div",{id:m,ref:f,role:"listbox",className:"absolute z-10 w-full mt-1 bg-white border border-neutral-200 rounded-sm shadow-sm max-h-60 overflow-y-auto",children:h.map((e,r)=>{let n=t.some(t=>t.optionId===e.optionId),i=r===d;return(0,b.jsx)("button",{id:`${pc}${e.optionId}`,type:"button",role:"option","aria-selected":n,onClick:()=>g(e),disabled:!n&&x,className:`w-full px-xs py-xxs text-left transition-colors duration-fast border-b border-neutral-100 last:border-b-0 focus:outline-none no-underline ${n?"bg-secondary-50 text-secondary-700":x?"bg-neutral-100 text-neutral-200 cursor-not-allowed":i?"bg-neutral-100":"hover:bg-neutral-100 focus:bg-neutral-100"}`,children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[n&&(0,b.jsx)(aj.Icon,{icon:"check",size:"sm","aria-hidden":!0}),(0,b.jsx)(aj.Text,{variant:"b5",children:e.text})]})},e.optionId)})}),s&&a.length>0&&0===h.length&&(0,b.jsx)("div",{id:m,role:"status",className:"absolute z-10 w-full mt-1 bg-white border border-neutral-200 rounded-sm shadow-sm px-xs py-xxs",children:(0,b.jsx)(aj.Text,{variant:"b5",className:"text-subtext",children:o})})]})},pu=({options:e=[],id:t="",leadFieldAssociated:r,maxSelection:n=0,automaticNext:i=!1,isMultiQuestionChild:o=!1,title:a,stepName:l,dynamicOptionsFilters:s,variant:c,isOptionsLoading:d=!1,dynamicOptionsError:u})=>{let{updateFlowState:p,getStepMetadataById:f,handleStepForward:m}=aC(),h=(f(t)||{}).option||[],{dynamicOptions:g,isLoading:y,fetchError:x}=pl(s),{ref:w,triggerFieldInputted:S}=u7({id:t,fieldType:"multiple_choice",options:e,title:a,stepName:l,isMultiQuestionChild:o,variant:c||"dynamic_multiple_choice",leadFieldAssociated:r}),I=(0,v.useMemo)(()=>{let e=g.slice(0,10),t=new Set(e.map(e=>e.optionId)),r=h.filter(e=>!t.has(e.optionId));return r.length>0?[...r,...e]:e},[g,h]),C=(0,v.useMemo)(()=>{let e=new Set(I.map(e=>e.optionId));return g.filter(t=>!e.has(t.optionId))},[g,I]),j=u??x,k=(y||d)&&!j,A=!y&&!d&&!j&&0===g.length;return(0,b.jsxs)(b.Fragment,{children:[j?(0,b.jsx)(sv,{message:j,className:"w-full justify-center py-2 px-2"}):null,A?(0,b.jsx)("p",{role:"status",className:"w-full text-center text-sm text-gray-500 py-2 px-2",children:"No options found"}):null,(0,b.jsx)("div",{className:"flex flex-wrap gap-4 py-6 font-normal w-full items-center justify-center",ref:w,children:k?Array.from({length:10}).map((e,t)=>(0,b.jsx)("div",{className:"animate-pulse rounded-full bg-gray-300 h-10",
1style:{width:`${120+t%3*40}px`}},t)):I.map((e,a)=>{let l,s=h.some(t=>t.optionId===e.optionId),c=-1!==(l=h.findIndex(t=>t.optionId===e.optionId))?l+1:null;return(0,b.jsxs)("button",{type:"button",role:"button",className:`mx-0 transition-all duration-200 ease-in-out mb-0 flex w-fit flex-initial cursor-pointer items-center justify-center gap-x-2 rounded-full border-2 px-5 py-2 text-sm hover:border-gray-300 hover:bg-gray-100 ${s?"bg-secondary-800 text-white border-secondary-700":""}`,onClick:()=>(e=>{let a;if(h.find(t=>t.optionId===e.optionId))a=h.filter(t=>t.optionId!==e.optionId);else{if(n>0&&h.length>=n)return;a=[...h,e]}S(a.map(e=>e.text).join(",")),p(t,{option:a,leadFieldAssociated:r}),i&&!o&&a.length===n&&m()})(e),children:[s&&(0,b.jsxs)("span",{className:"w-5 h-5 flex items-center justify-center",children:[c,"."]}),e.text]},a)})}),k&&(0,b.jsx)("div",{className:"w-full relative mb-6",children:(0,b.jsx)("div",{className:"animate-pulse rounded-lg bg-gray-300 h-11 w-full"})}),!k&&g.length>10&&(0,b.jsx)(pd,{options:C,selectedOptions:h,maxSelection:n,onSelect:e=>{if(h.some(t=>t.optionId===e.optionId)||n>0&&h.length>=n)return;let a=[...h,e];p(t,{option:a,leadFieldAssociated:r}),S(a.map(e=>e.text).join(",")),i&&!o&&a.length===n&&m()}})]})},pp={zip:{field:"zip",minDigits:5,validate:async e=>{let t=await t2(e);return!!t?.validZip},errorMessage:"Please enter a valid ZIP code"},phoneNumber:{field:"phoneNumber",minDigits:10,validate:async e=>{let t=await t1(e);return!!t?.validPhoneNumber},errorMessage:"Please enter a valid phone number"}},pf=({options:e=[],id:t="",leadFieldAssociated:r,isMultiQuestionChild:n,placeholderText:i="Type your answer here...",title:o,stepName:a,variant:l})=>{var s;let c,d,{updateFlowState:u,getStepMetadataById:p,validationErrors:f,clearValidationErrors:m,setValidationErrors:h,eventContext:g}=aC(),y=p(t),x=v.useRef(null),{triggerFieldEvents:w}=aw(),S="zip"===r,I="email"===r,C="phoneNumber"===r,j=S||C,k=f.find(e=>e.field===r||e.field===t),A=n?f.some(e=>e.field===r||e.field===t):f.length>0,E=v.useCallback(i=>{let l=i.target.value;if(C?l=sf(l):j&&(l=l.replace(/\D/g,"")),x.current&&(clearTimeout(x.current),x.current=null),""===l.trim())return void u(t,{});let s=e[0]||{optionId:"text-input",group:"text-input",text:"Text Input"},c={optionId:s.optionId,text:s.text||"",value:l,group:s.group};u(t,{option:c,leadFieldAssociated:r}),x.current=setTimeout(()=>{let e={...c,value:l};u(t,{option:e,leadFieldAssociated:r,isDebounced:!0}),w("FieldInputted",{...g,fieldValue:rh(r?.toString()||"",g?.currentStep)?"SANITIZED":e.value,fieldNumber:g?.currentStepIndex||0,fieldName:n?a||"":g?.currentStep?.stepName||"",fieldType:"text",fieldLabel:n?o:g?.currentStep?.title,...n&&{stepId:t,stepName:a||o}})},2e3)},[t,n,o,e,r,u,j,C,g,a,w]),N=y?.option?.value||"";s=r?.toString(),c=(0,v.useRef)(null),d=pp[s?.toString()||""],(0,v.useEffect)(()=>{if(!d)return;let e=N.replace(/\D/g,"");if(0===e.length){c.current=null;return}if(e.length<d.minDigits){c.current=null,h([{field:d.field,message:""}]);return}if(c.current===e)return;let t=!1;return(async()=>{let r=await d.validate(e);t||(c.current=e,r?m():h([{field:d.field,message:d.errorMessage}]))})(),()=>{t=!0}},[d,N,h,m]);let T=j?"numeric":void 0,O=j?"[0-9]*":void 0,P=S?5:C?14:void 0,L=r?({firstName:"given-name",lastName:"family-name",email:"email",phoneNumber:"tel"})[r]:void 0,M=n?{...g,fieldName:a||r?.toString()||"",fieldType:"text",stepId:t,stepName:a||o}:g,{ref:R}=sh([ap({...g,variant:l||"text"}),af(M,"FieldViewed")]);return(0,b.jsx)(aj.Flex,{className:"w-full h-full py-xxs",ref:R,children:(0,b.jsx)(aj.Input,{type:I?"email":"text",inputMode:T,pattern:O,value:N,onChange:E,placeholder:i,maxLength:P,autoComplete:L,name:r?.toString()||t,id:r?.toString()||t,error:A&&!!k?.message,errorMessage:k?.message})})},pm=({options:e=[],id:t="",leadFieldAssociated:r,placeholderText:n="Select an option",automaticNext:i=!1,isMultiQuestionChild:o=!1,title:a,stepName:l,variant:s,isOptionsLoading:c=!1,searchBarAllOptions:d,dynamicOptionsError:u})=>{let{updateFlowState:p,getStepMetadataById:f,handleStepForward:m}=aC(),h=f(t).option,{ref:g,triggerFieldInputted:y}=u7({id:t,fieldType:"dropdown",options:e,title:a,stepName:l,isMultiQuestionChild:o,variant:s,leadFieldAssociated:r}),x=!!d?.length,{displayedOptions:w,searchableOptions:S}=(0,v.useMemo)(()=>x?pt(e,d,h&&!Array.isArray(h)?[h]:[]):{displayedOptions:e,searchableOptions:[]},[x,e,d,h]),I=n=>
1{let a=(d??e).find(e=>e.optionId.toString()===n);a&&(y(a.text),p(t,{option:a,leadFieldAssociated:r}),i&&!o&&m())},C=c&&!u;return(0,b.jsxs)(aj.Flex,{direction:"column",ref:g,children:[u?(0,b.jsx)(sv,{message:u,className:"w-full justify-center py-2 px-2"}):null,C?(0,b.jsx)(pe,{count:4}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aj.Select,{id:t,value:h?.optionId?.toString()||"",placeholder:n,onValueChange:I,children:w.map(e=>(0,b.jsx)(aj.SelectItem,{value:e.optionId.toString(),children:e.text},e.optionId))}),x&&S.length>0&&(0,b.jsx)(aj.Combobox,{className:"mt-4","aria-label":a||"Search options",options:S.map(pr),selectedValues:h?.optionId?[h.optionId]:[],onSelect:I})]})]})};var ph=r(33296);let pg=({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,variant:l})=>{let{updateFlowState:s,getStepMetadataById:c,handleStepForward:d}=aC(),u=c(t||""),p=u?.option,f={yes:(0,b.jsx)(ph.HU4,{className:"w-[14px] h-[14px] !block !text-[rgb(34,197,94)]"}),no:(0,b.jsx)(ph.Fl6,{className:"w-[14px] h-[14px] !block !text-[rgb(239,68,68)]"})},{ref:m,triggerFieldInputted:h}=u7({id:t,fieldType:"toggle",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:l,leadFieldAssociated:r});return(0,b.jsx)(aj.Flex,{gap:"sm",wrap:"wrap",align:"center",direction:"row",justify:"start",className:"font-normal w-full",ref:m,children:e.map((e,o)=>{let a=p&&!Array.isArray(p)&&p?.optionId===e?.optionId;return(0,b.jsxs)(aj.Button,{size:"sm",variant:"grayOutline","aria-pressed":a,className:"w-fit",onClick:()=>{a?s(t,{}):s(t,{option:e,leadFieldAssociated:r}),h(e.text),n&&!i&&d()},children:[f[e?.text?.toLowerCase()],e.text]},o)})})};function py(e,t){let r=e.flatMap(e=>e?.options).find(e=>e?.nextQuestionId!=null),n=r?.nextQuestionId;if(n){let r=e.find(e=>e?.options?.some(e=>e?.nextQuestionId===n));if(r){let i=t(r.id);if(!(i?.option&&(!Array.isArray(i.option)||i.option.length>0))||!(i.option?Array.isArray(i.option)?i.option:[i.option]:[]).find(e=>e?.nextQuestionId===n))return e.filter(e=>e.id!==n)}}return e}let pb={optionsMap:{},loadingMap:{},errorsByQuestionId:{}},pv=e=>null==e?"":Array.isArray(e)?[...e].map(e=>e.optionId??String(e.value??"")).sort().join(","):String(e.optionId??e.value??""),px=({stepQuestions:e=[],bulletPoints:t=[],enableDivider:r=!1,groupedQuestions:n,automaticNext:i=!1,tcpaText:o})=>{let{currentStepType:a,currentStep:l,getStepMetadataById:s,updateFlowState:c,handleStepForward:d,flowState:u,steps:p,getCachedOptions:f}=aC(),m=(0,v.useRef)(null),h=(0,v.useRef)(0),g=(0,v.useMemo)(()=>{let t=rL(p??[]);if(!l?.id||a!==O.MULTI_QUESTION||0===e.length)return t;let r=[...t],n=r.findIndex(e=>e.id===l.id),i={...n>=0?r[n]:l,stepQuestions:e};for(let t of(n>=0?r[n]=i:r.push(i),e))t.id&&!r.some(e=>e.id===t.id)&&r.push(t);return r},[p,l,a,e]),{optionsMap:y,loadingMap:x,errorsByQuestionId:w}=((e,t,r,n)=>{let i=(0,v.useMemo)(()=>{let t={};for(let r of e)r.dynamicOptions&&(t[r.id]={id:r.id,dynamicOptions:r.dynamicOptions,question:r});return t},[e]),o=(0,v.useMemo)(()=>Object.keys(i),[i]),[a,l]=(0,v.useState)(pb),s=(0,v.useRef)({}),c=(0,v.useRef)({}),d=(0,v.useMemo)(()=>{let e={};return o.forEach(n=>{let o=i[n];e[n]=o0(o.question,t,r)}),e},[o,i,t,r]),u=(0,v.useRef)({flowState:t,steps:r});u.current={flowState:t,steps:r};let p=(0,v.useRef)(n);return p.current=n,(0,v.useEffect)(()=>{let e=!1;if(0===o.length)return void l(pb);let t=o.filter(e=>{let t=d[e],r=s.current[e];return!r||r!==t});if(0===t.length)return;let r=[],n=[];for(let e of t){let t,o=i[e],a=d[e],l=p.current;if(l){let e=l(o.question);void 0!==e&&(t=e)}void 0!==t?r.push({questionId:e,options:t,keyAtStart:a}):n.push(e)}if(r.length>0)for(let e of r)s.current={...s.current,[e.questionId]:e.keyAtStart};return l(e=>{let i={...e.errorsByQuestionId};for(let e of t)delete i[e];let o={...e.optionsMap},a={...e.loadingMap};for(let e of r)o[e.questionId]=e.options,a[e.questionId]=!1;for(let e of n)a[e]=!0;return{optionsMap:o,loadingMap:a,errorsByQuestionId:i}}),n.forEach(t=>{let r=i[t],n=d[t];c.current[t]!==n&&(c.current[t]=n,(async()=>{try{let i,o=null,a=null;try{let{flowState:e,steps:t}=u.current;o=await oQ(r.dynamicOptions,e,t)}catch(e){a=e instanceof Error?e:Error(String(e))}if(e)return;let{flowState:d,steps:p}=u.current;if(i=r.question,o0(i,d,p)!==n){e||c.current[t]!==n||l(e=>({...e,loadingMap:{...e.loadingMap,[t]:!1}}));return}a||null==o||(s.current={...s.current,[t]:n}),e||l(e=>{let r={...e.optionsMap},n={...e.loadingMap},i={...e.errorsByQuestionId};return n[t]=!1,a?i[t]=a:null!=o&&(r[t]=o,delete i[t]),{optionsMap:r,loadingMap:n,errorsByQuestionId:i}})}finally{c.current[t]===n&&delete c.current[t]}})())}),()=>{e=!0}},[o,d,i,t,r]),{...a,isAnyLoading:Object.values(a.loadingMap).some(e=>e)}})(e,u,g,f),S=(0,v.useMemo)(()=>{let t={};for(let r of e)if(r.dynamicOptions){let e=oK(r);e.length>0&&(t[r.id]=e)}return t},[e]),I=(0,v.useRef)({}),C=(0,v.useRef)(!1),j=(0,v.useRef)(void 0);(0,v.useEffect)(()=>{let t=l?.id;t!==j.current&&(j.current=t,C.current=!1,I.current={});let r={},n=[];for(let t of e){let e=s(t.id)?.option;r[t.id]=e,pv(I.current[t.id])!==pv(e)&&t.customField&&n.push(t.customField)}if(!C.current){I.current=r,C.current=!0;return}if(I.current=r,0!==n.length)for(let[e,t]of Object.entries(S))t.some(e=>n.includes(e))&&r[e]&&c(e,{})},[l?.id,e,s,c,S]);let k=(0,v.useCallback)(e=>{let t=y[e.id],r=x[e.id]??!1,n=w[e.id];return(0,b.jsx)(pj,{...e,...void 0!==t&&{options:t},isMultiQuestionChild:!0,isOptionsLoading:r&&!!e.dynamicOptions,dynamicOptionsError:n&&e.dynamicOptions?n.message:void 0})},[y,x,w]),A=py(e,s),E=A.length?A[A.length-1].id:void 0;return(0,v.useEffect)(()=>
1{if(l&&l.id&&a===O.MULTI_QUESTION){let e=A.reduce((e,t)=>{let r=s(t.id);return r.option&&(Array.isArray(r.option)?e.push(...r.option):e.push(r.option)),e},[]),t=s(l.id),r=e.length>0?{option:e}:{},n=JSON.stringify(t)!==JSON.stringify(r);n&&c(l.id,r),A.every(e=>{let t;return!!(t=s(e.id).option)&&(e.questionType===N.MULTIPLE_CHOICE&&e.maxSelection&&Array.isArray(t)?t.length===e.maxSelection:!!t)})&&i&&n&&e.length>0&&d()}},[A,l,a,c,s]),(0,v.useEffect)(()=>{let e=A.length;e>h.current&&e>0&&m.current?.scrollIntoView({behavior:"smooth",block:"center"}),h.current=e},[A]),(0,b.jsxs)(aj.Flex,{direction:"column",children:[t.length>0&&(0,b.jsxs)(aj.Flex,{direction:"column",align:"center",justify:"center",children:[r&&(0,b.jsx)(aj.Separator,{}),(0,b.jsx)(aj.Flex,{direction:"column","direction-md":"row",align:"center",wrap:"wrap",justify:"center",gap:"md",children:t?.map((e,t)=>(0,b.jsxs)(aj.Flex,{direction:"row",align:"center",gap:"xs",children:[(0,b.jsx)(aj.Icon,{icon:"check-circle",size:"sm",color:"secondary","aria-hidden":!0}),(0,b.jsx)(aj.Text,{variant:"b3",color:"subtext",children:e})]},t))})]}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"sm",children:[(0,b.jsx)(aj.Flex,{direction:"column",gap:"sm",children:n?.map((e,t)=>{let r=e.questions.filter(e=>A.some(t=>t.id===e.id));if(0===r.length)return null;let n=r.length>1;return(0,b.jsx)(aj.Flex,{direction:n?"row":"column",gap:"sm",children:r.map(e=>{let t=e.id===E;return(0,b.jsxs)(aj.Flex,{ref:t?e=>{m.current=e}:void 0,direction:"column",justify:"center",align:"stretch","data-question-id":e.id,children:[e.subtitle?.trim()&&(0,b.jsx)(aj.Heading,{variant:"h3",children:pi(e.subtitle,u)}),k(e)]},e.id)})},t)})}),o&&(0,b.jsx)(aj.Flex,{children:(0,b.jsx)(sd,{html:o,variant:"l1",color:"subtext",className:"!leading-[1.3] [&_p]:!leading-[1.3] [&_li]:!leading-[1.3] [&_ul]:!mb-0"})})]})]})},pw=({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,variant:l,isOptionsLoading:s=!1})=>{let{updateFlowState:c,getStepMetadataById:d,handleStepForward:u}=aC(),p=d(t||""),{ref:f,triggerFieldInputted:m}=u7({id:t,fieldType:"checkbox",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:l,leadFieldAssociated:r}),h=(0,v.useCallback)((e,o)=>{o?c(t,{option:e,leadFieldAssociated:r}):c(t,{}),n&&!i&&u(),m(e.text)},[n,u,t,i,r,m,c]);return(0,b.jsx)(aj.Flex,{className:"mt-md",justify:"center",ref:f,gap:"xxs",children:s?(0,b.jsx)(pe,{}):e.map(e=>{let r=(p.option&&!Array.isArray(p.option)&&p.option.optionId===e.optionId)??!1,n=`${t}-${e.optionId}`;return(0,b.jsx)(aj.Flex,{children:(0,b.jsx)(aj.Checkbox,{id:n,label:k(e.text),checked:r,onCheckedChange:t=>h(e,!!t)})},e.optionId)})})},pS=({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,variant:l,isOptionsLoading:s=!1,searchBarAllOptions:c,dynamicOptionsError:d})=>{let{updateFlowState:u,getStepMetadataById:p,handleStepForward:f}=aC(),m=p(t||""),h=m?.option,{ref:g,triggerFieldInputted:y}=u7({id:t,fieldType:"single_choice",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:l||"single_choice_pills",leadFieldAssociated:r}),x=!!c?.length,w=h&&!Array.isArray(h)?h:void 0,{displayedOptions:S,searchableOptions:I}=(0,v.useMemo)(()=>x?pt(e,c,w?[w]:[]):{displayedOptions:e,searchableOptions:[]},[x,e,c,w]),C=s&&!d;return(0,b.jsxs)(b.Fragment,{children:[d?(0,b.jsx)(sv,{message:d,className:"w-full justify-center py-2 px-2"}):null,(0,b.jsx)(aj.Flex,{gap:"sm",wrap:"wrap",align:"center",justify:"start",direction:"row",className:"w-full",ref:g,children:C?(0,b.jsx)(pe,{}):S.map((e,o)=>{let a=w?.optionId===e.optionId;return(0,b.jsx)(aj.Button,{size:"sm",iconBefore:a?"check":void 0,variant:"grayOutline","aria-pressed":a,className:"w-fit",onClick:()=>{a?u(t,null):(u(t,{option:e,leadFieldAssociated:r}),n&&!i&&f()),y(e.text)},children:e.text},o)})}),!C&&x&&I.length>0&&(0,b.jsx)(aj.Combobox,{className:"mt-4","aria-label":o||"Search options",options:I.map(pr),selectedValues:w?[w.optionId]:[],onSelect:e=>{let o=(c??[]).find(t=>t.optionId===e);o&&(u(t,{option:o,leadFieldAssociated:r}),n&&!i&&f(),y(o.text))}})]})},pI={TILE:({options:e=[],id:t="",leadFieldAssociated:r,automaticNext:n=!1,isMultiQuestionChild:i=!1,title:o,stepName:a,variant:l,isOptionsLoading:s=!1,searchBarAllOptions:c,dynamicOptionsError:d})=>{let{updateFlowState:u,getStepMetadataById:p,handleStepForward:f}=aC(),m=p(t||""),h=m?.option,{ref:g,triggerFieldInputted:y}=u7({id:t,fieldType:"single_choice",options:e,title:o,stepName:a,isMultiQuestionChild:i,variant:l||"single_choice_tiles",leadFieldAssociated:r}),x=!!c?.length,w=h&&!Array.isArray(h)?h:void 0,{displayedOptions:S,searchableOptions:I}=(0,v.useMemo)(()=>x?pt(e,c,w?[w]:[]):{displayedOptions:e,searchableOptions:[]},[x,e,c,w]),C=s&&!d;return(0,b.jsxs)(b.Fragment,{children:[d?(0,b.jsx)(sv,{message:d,className:"w-full justify-center py-2 px-2"}):null,(0,b.jsx)(aj.Flex,{gap:"lg",wrap:"wrap",justify:"center",direction:"column",className:"pb-2 md:flex-row max-w-full",ref:g,children:C?(0,b.jsx)(pe,{}):S.map(e=>{let o=w?.optionId===e.optionId,a=e.icon;return(0,b.jsx)(aj.SelectionTile,{icon:a,label:e.text,description:e.subtext,isSelected:o,variant:"secondary",alignment:"center",className:"flex-1",onClick:()=>{o?u(t,null):(u(t,{option:e,leadFieldAssociated:r}),n&&!i&&f()),y(e.text)}},e.optionId)})}),!C&&x&&I.length>0&&(0,b.jsx)(aj.Combobox,{className:"mt-4","aria-label":o||"Search options",options:I.map(pr),selectedValues:w?[w.optionId]:[],onSelect:e=>{let o=(c??[]).find(t=>t.optionId===e);o&&(u(t,{option:o,leadFieldAssociated:r}),n&&!i&&f(),y(o.text))}})]})},PILL:pS},pC=function(e){if(!e.variant)return(0,b.jsx)(pS,{...e});let t=pI[e.variant]||pS;return(0,b.jsx)(t,{...e})}
1,pj=e=>{switch(e.questionType||e.type){case"RADIO_CHOICE":return(0,b.jsx)(po,{...e});case"DYNAMIC_SINGLE_CHOICE":return(0,b.jsx)(ps,{...e});case"DYNAMIC_MULTIPLE_CHOICE":return(0,b.jsx)(pu,{...e});case"TOGGLE":return(0,b.jsx)(pg,{...e});case"MULTIPLE_CHOICE":return(0,b.jsx)(pn,{showOrderNumber:!0,...e});case"SINGLE_CHOICE":return(0,b.jsx)(pC,{...e});case"CHECKBOX":return(0,b.jsx)(pw,{...e});case"TEXT":return(0,b.jsx)(pf,{...e});case"SELECT":return(0,b.jsx)(pm,{...e});case"MULTI_QUESTION":return(0,b.jsx)(px,{...e});default:return(0,b.jsx)(pn,{...e})}},pk={options:void 0,isLoading:!1,error:void 0},pA=({step:e,stepType:t})=>{let{options:r,searchBarAllOptions:n,isOptionsLoading:i,dynamicOptionsError:o}=(e=>{let{getCachedOptions:t,isPrefetching:r,flowState:n,steps:i}=aC(),o=(0,v.useMemo)(()=>rL(i),[i]),a=e.type===O.QUESTION?e.dynamicOptions:void 0,l=!!a?.endpointUrl,s=a?.searchBarOptions===!0,c=l&&!s?t(e):void 0,d=void 0!==c,u=(0,v.useMemo)(()=>l?o0(e,n,o):"",[l,e,n,o]),[p,f]=(0,v.useState)(pk),m=(0,v.useRef)(e);m.current=e;let h=(0,v.useRef)(a);h.current=a;let g=(0,v.useRef)({flowState:n,steps:o});g.current={flowState:n,steps:o};let y=(0,v.useRef)(void 0),b=(0,v.useRef)(void 0),x=(0,v.useRef)(!1);if((0,v.useEffect)(()=>(x.current=!1,()=>{x.current=!0}),[]),(0,v.useEffect)(()=>{let e=h.current;if(!l||!e){f(pk),y.current=void 0,b.current=void 0;return}let t=!0===e.searchBarOptions;!t&&(d||r)||b.current!==u&&y.current!==u&&(y.current=u,f(e=>({...e,isLoading:!0,error:void 0})),(async()=>{try{let{flowState:r,steps:n}=g.current,i=t?{...e,limit:void 0}:e,o=await oQ(i,r,n);if(x.current)return;let{flowState:a,steps:l}=g.current;if(o0(m.current,a,l)!==u)return;b.current=u,f({options:o,isLoading:!1,error:void 0})}catch(r){if(x.current)return;let{flowState:e,steps:t}=g.current;if(o0(m.current,e,t)!==u)return;b.current=u,f({options:void 0,isLoading:!1,error:r instanceof Error?r.message:String(r)})}finally{y.current===u&&(y.current=void 0)}})())},[l,s,d,r,u]),!l)return{options:void 0,isOptionsLoading:!1};if(s){let e=a?.limit,t=p.options;return t&&e?{options:t.slice(0,e),searchBarAllOptions:t,isOptionsLoading:p.isLoading,dynamicOptionsError:p.error}:{options:t,isOptionsLoading:p.isLoading,dynamicOptionsError:p.error}}return d?{options:c,isOptionsLoading:!1}:r?{options:void 0,isOptionsLoading:!0}:{options:p.options,isOptionsLoading:p.isLoading,dynamicOptionsError:p.error}})(e);return t!==O.QUESTION&&t!==O.MULTI_QUESTION?null:(0,b.jsx)(pj,{...e,...void 0!==r&&{options:r},...void 0!==n&&{searchBarAllOptions:n},isOptionsLoading:i,dynamicOptionsError:o})};function pE(e,t=!1){return!t&&!!e&&!!e.option&&(Array.isArray(e.option)?e.option:[e.option]).some(e=>e&&(void 0!==e.value&&null!==e.value&&""!==e.value||void 0!==e.text&&null!==e.text&&""!==e.text))}let pN=async e=>{try{let t=Y().offeringsSearchApiUrl??"";if(!t)throw Error("Offerings base URL is not set");let r=tv(A()),n=new e7({baseUrl:t,defaultHeaders:r});return await n.getSearchOfferings(e)}catch(e){throw console.error("Get Search failed:",e),e}},pT=async e=>{let t=[],r={},n=await pN(e);return n.data.length>0||e.flexibility&&(t.push("flexibility"),(n=await pN({...e,flexibility:void 0,subType:void 0,...r})).data.length>0)||e.level&&(t.push("level"),(n=await pN({...e,level:void 0,flexibility:void 0,subType:void 0,...r})).data.length>0)?{data:n.data,relaxedFilters:t}:{data:(n=await pN({subjects:e.subjects,skills:e.skills,limit:e.limit,offset:e.offset,...r})).data,relaxedFilters:t}},pO=(e,t,r)=>{let n=t.find(t=>t.stepName===e);if(!n?.id)return{option:void 0,values:[]};let i=r[n.id];if(!i?.option)return{option:void 0,values:[]};let o=(Array.isArray(i.option)?i.option:[i.option]).map(e=>e.value).filter(e=>"string"==typeof e);return{option:i.option,values:o}};function pP(){let{steps:e,flowState:t,handleGoToStep:r}=aC(),{subject:n,skills:i,flexibility:o,level:a,subType:l,flexibilityLabel:s,levelLabel:c}=(0,v.useMemo)(()=>{let r=pO("flexibility",e,t),n=pO("level",e,t),i=r.option,o=n.option,a=r.values[0]||"",l="cohort_paced"===a;return{subject:pO("subject",e,t).values[0]||"",skills:pO("skills",e,t).values,flexibility:l?"instructor_paced":a,level:n.values[0]||"",subType:l?"Executive Education":void 0,flexibilityLabel:i?.text.toLowerCase()||"",levelLabel:o?.text.toLowerCase()||""}},[e,t]),{offerings:d,loading:u,relaxedFilters:p,error:f}=(e=>{let[t,r]=(0,v.useState)([]),[n,i]=(0,v.useState)(!1),[o,a]=(0,v.useState)(null),[l,s]=(0,v.useState)([]);return(0,v.useEffect)(()=>{let t=!1;return(async()=>{i(!0),a(null),s([]);try{let n=await pT(e);if(t)return;r(n.data),s(n.relaxedFilters)}catch(e){if(t)return;console.error("Error fetching offerings:",e),a(e),r([]),s([])}finally{if(t)return;i(!1)}})(),()=>{t=!0}},[e.query,JSON.stringify(e.subjects),JSON.stringify(e.skills),e.level,e.flexibility,e.type,e.subType,e.limit,e.offset]),{offerings:t,loading:n,error:o,relaxedFilters:l}})((0,v.useMemo)(()=>({subjects:n?[n]:[],skills:i,flexibility:o,level:a,subType:l,limit:4}),[n,i,o,a,l])),m=(0,v.useMemo)(()=>
1{if(0===p.length)return"";let e=p.map(e=>"flexibility"===e?s:c).filter(Boolean);if(0===e.length)return"";let t=e.join(" and ");return`We didn't find an exact match. To provide you with the best options available, we've broadened your search outside of ${t}.`},[p,s,c]),h=e.find(e=>e.isEntry),g=!!(h&&h.id&&r);return(0,b.jsxs)("section",{className:"bg-accent-300 p-8 rounded-xl flex flex-col gap-4 w-full shadow-lg",children:[(0,b.jsx)("div",{className:"mx-auto",children:(0,b.jsx)("h1",{children:"Mocked Offerings Results Page For Testing"})}),(0,b.jsx)("div",{className:"flex flex-col md:flex-row gap-2.5 items-center w-full",children:g&&(0,b.jsx)("button",{type:"button",onClick:()=>{r&&h&&h.id&&r(h.id,{resetFlowState:!0})},className:"bg-white px-5 py-2 rounded-full flex items-center justify-center shrink-0 no-underline hover:bg-gray-50 transition-colors",children:(0,b.jsx)("span",{className:"text-primary-700 text-base font-bold leading-[25.2px] whitespace-nowrap",children:"Edit your goal"})})}),u?(0,b.jsx)(aj.Spinner,{}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:m||"Explore the options below to find the best path for you."}),(0,b.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 w-full",children:d?.slice(0,4).map(e=>(0,b.jsx)("article",{children:(0,b.jsx)("h3",{children:e.name})},e.id))})]}),!!f&&(0,b.jsx)("p",{children:"failed to fetch offerings"})]})}var pL=((y={}).PROGRAM_SELECT="PROGRAM_SELECT",y.PII_CONFIRMATION="PII_CONFIRMATION",y.ADDITIONAL_QUESTIONS="ADDITIONAL_QUESTIONS",y.EXIT_STRATEGY="EXIT_STRATEGY",y.SUBMISSION="SUBMISSION",y);let pM=async e=>{let t=await dx(e);return{exactResults:t.exactResults,relatedResults:t.relatedResults,recommendedResults:t.recommendedResults,spotlightResults:t.spotlightResults,qualified:t.qualified?.map(e=>e.id)??[],unqualified:t.unqualified?.map(e=>e.id)??[],locationInference:t.locationInference}},pR=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),pF=new Map,pU=["Affordability","Tuition","Program length","Passion","Helping others","Career goals","Salary potential","Accredited","Accreditation","License","Licensure","Faculty credentials","Research","Clinical experience","Clinical opportunities","Internships","Internship rates","Licensure rates","nonprofit","not-for-profit","no GRE scores","no GRE scores required","no GRE required","CSWE Accredited","CSWE","certified school counselors","certification","clinical training","board certified","career development","No SAT or ACT scores required","future counselors","innovative research","advance your human services career","psychological research","set you apart from the competition","100% online program","wide variety of career paths","effect positive change","five specialized tracks","top ranked for return on investment","earn higher salaries","work as certified school counselors","real-world training","interactive online classes","fit your state's requirements","interdisciplinary curriculum","board certified","60 credit hour","foundation in psychological domains","specialized knowledge","prepare you for a career","advanced doctoral training","board certified behavior analyst","18-month online MA in Psychology","helps prepare you to work","optional internship","apply classroom studies to real-world situations","meets the Guidelines for Education and Training","one of the oldest and best of its kind","specialized online bachelor's","expand your expertise","National Certified Addiction Counselor (NCAC)","emphasis in Clinical Counseling","real-world field experience","two to four years","flexible online format","field experience","advance your career","solve social problems","without disrupting their professional lives and other commitments","improves health and wellness","diverse career paths","dual credit opportunity","strong foundation","No SAT or ACT scores required","build expert skills","apply psychological research and theory","virtual classroom","make a positive impact","hands-on experiences","passion to help people","industry-current","American Psychological Association","100% online","transfer up to 90 previous credit hours","prepare for graduate studies","transform lives","Christian worldview","critical and creative thinking","mental health concentration","wide range of professional applications","flexibility and convenience","pursue a career","improve health and wellness","passion to help people","two applied concentration tracks","interdisciplinary degree","prevent marginalization and improve equality","overcome health and wellness challenges","connections between human behavior and organizational performance","ideal fit for busy professionals","15 months","direct path to certification","Board Certified Behavior Analyst","12 months","Board Certified Behavior Analyst (BCBA)","improve their lives","BSBA","Build a well-rounded foun
1dation","support society's most vulnerable populations","designed for students seeking a flexible option","flexible","online degree program","pursue licensure","seek employment","Licensed Mental Health Counselor","in as short as 2 years","Channel your passion","best for your schedule","small cohort model","experienced faculty","helping people face addiction","top-15 school","GRE scores are not required","as few as 24 months","No GRE is required","prepare you to work in therapeutic settings","recognized both nationally and internationally","broaden and deepen their knowledge behavioral health administration and care","Eighteen (18) credit hours","prepare you to assume leadership positions","become a visionary leader","online coursework","offline practicum","as few as 32 months","impact higher education","helping young learners succeed","assessing learning abilities and needs","wide variety of potential career pathways","examine psychology from various aspects","pursue an impactful career","broad-based education","as little as one year","interdisciplinary business skills","leadership & management skills","Financial aid is available","no-cost digital materials","managerial expertise","ACBSP-accredited","eight concentrations","earn skills","fully online","prepare yourself for a path to graduate school","technical knowledge","critical thinking skills","business administration skills","problem solving and communication","ACBSP","define your competitive edge","career-focused concentrations","based on sound business fundamentals","hundreds of adult students","advance their careers","International Business","grow and thrive as a leader","build administrative skills","advancing your degree","mobile-friendly curriculum","business fundamentals","emphasis on ethical leadership","industry-focused concentration","professional success","top faculty","convenient online classroom","on your schedule","tuition-free","variety of industries and organizations","seeking a managerial role","ethical leader","small class","responsive faculty","transfer credit policies","seamlessly switch from online study to in-person learning","effective teamwork","motivate people","master your decision-making and problem-solving skills","ensure long-term sustainability","concentration in entrepreneurship","online classroom","complete your degree at your pace","Learn how to start and run your own business","work one-on-one with an entrepreneur","excel in the world of finance","as few as 2.5 years","No residencies or standardized test scores (SAT/ACT) required.","Advance a service or manufacturing operations management career","use your skills in the business field","Develop technical skills and accounting knowledge","accounting careers in all industries","Demand for accounting graduates continues to be strong","even during economic downturns","A
1ccountants are vital","entirely online","prepare for the CPA exam","effective accounting professional","as few as 16 months","business analyst","financial planner","actuary","apply practical accounting principles","foundational knowledge of tax planning","affordable","succeed in the information industry","build a repository of skills","develop knowledge and skills in computer-based systems","Prepare for leadership roles in information system management","strategically manage and utilize technology","management accounting","specialized bachelor's degree","management-level role","12 optional concentrations/built-in certificates","lead your teams with confidence","No GRE/GMAT required","Flexibly designed for full-time professionals","top-ranked MBA degree","just 16 months","$21K","No GMAT required","earn two credentials for less time and money","part-time program","individualized career services","largest conferrer of MBAs in the state","gives students the ultimate flexibility","designed for busy professionals","personalized instruction from experienced experts","45 credit hours","specialized expertise","AACSB-accredited","tailor your degree","full suite of career services","as few as two and a half years","achieve your goals","designed for working professionals","maximum flexibility","specialize your skills","as little as two years","flexibility","IACBE-accredited","aligns with the Forbes brand","fits both your professional and personal life","accelerated 1 year MBA program","no GRE/GMAT required","No application fee required","dual degree","part-time program","total of 30 hours","lead in the modern workplace","CCNE-accredited","provide holistic health care","greater flexibility","personal fulfillment","higher salary","increased opportunities","Designed for working nurses","100% online coursework","clinical placement support","ideal option for practicing nurses","Designed for graduates of a bachelor's degree program","100% online didactic classes","flexible scheduling","Earn two master's degrees","maintain flexibility","valuable nursing credential","multiple concentrations","Flexible 12- or 24-month track","No GRE required","An internship and capstone experience are required","improve healthcare","senior management roles in health care","gives students ultimate flexibility","online CSWE-accredited","flexibility of online learning","real-world skills","supervised field experience","3.0 GPA or better","Advanced Standing option","faster and at a lower overall cost","accredited by the Council on Social Work Education (CSWE)","CSWE accredited","strong liberal arts base","diverse populations","bachelor's in human services","flexible online courses","100% Online","120 credit hours","highly-ranked","CSWE-accredited","Comprehensive curriculum","field experience hours","Pending accreditation by the Council on Social Work Education (CSWE)","social services","alleviate poverty and oppression","generalist practice","graduate in 2-4 years","political and cultural change","organizational dynamics","eligible to sit for the LBSW exam","optional concentrations","notable faculty","advocacy","problem-solving","consultation","15 months","four specialized courses of study","Individualized Course of Study","Online MSW program","local field education","pursue licensure","including LCSW","Accredited by the CSWE","No GRE scores required","Full-time","part-time","and accelerated tracks top-ranked school of social work","two online MSW tracks","traditional and advanced standing","earn an MSW in as few as 18 months","GRE scores are not required","concentration in Mental Health and Trauma","advanced standing program track knowledge and skills","diverse funding sources","influence policy","supervise staff","develop and administer programs competencies from the Council on Social Work Education (CSWE)","Foundational Track","Advanced Standing Track","experiential learning opportunities","clinical and non-clinical settings","child welfare agencies","non-profit agencies","medical facilities","correctional settings 100% Online","3 starts a year","highly-ranked","CSWE-accredited","social justice","stronger communities unique skills","significant difference","values of the Sisters of Mercy","sit for licensure","professional social worker online Master of Social Work (MSW)","clinical social work","licensure exams","innovative solutions","complex mental health and social issues affordable","CSWE-accredited","expert faculty","hands-on field work","licensed social worker clinical social work","change agents","Clinical Advocacy focus","community resources","accredited by the C
1ouncil on Social Work Education's (CSWE) Board of Accreditation (BOA)","CSWE competencies social work leader","and global issues","mental health","substance abuse","child and youth services","accelerated","one-year program generalist clinical social work practice","CSWE accredited","five specializations","MBA or MPA dual degree options 100% online","CSWE accredited","No GRE required","positive change","leadership and effective collaboration","specialization in integrative social work","five specialized tracks","accredited by the Council on Social Work Education (CSWE) licensure in Missouri or select Midwestern states","meaningful impact on society trauma-informed curriculum","culturally informed assessment","advance justice and social change","flexibility","prepare for licensure Diverse Group of Faculty & Students","Accessible and Rigorous MSW Degree","nation's best Online MSW Programs","no GRE/GMAT required 100% Online","60 credit hours","career preparation","professional growth","counseling modalities","essential policy knowledge","ethical practitioner","advocate for social change","online RN to BSN program","Applicants must already hold an RN","seamlessly take classes","complete in-person requirements","without disrupting professional responsibilities","pre-licensure bachelor degree in nursing","evidence-based client/patient care","liberal arts education core","clinical judgment","critical thinking skills","diverse populations","lifelong learning","integrated throughout the curriculum","theoretical instruction","clinical experience","24.00 semester credit hours of block credit","nursing leadership and management","quality improvement","patient safety","promote health and prevent disease","lifelong learning","continuous professional development","critical thinking","conceptual level","mathematical analysis","scientific method","Bachelor of Science in Nursing","broader professional responsibilities","career opportunities","online Bachelor of Science in Nursing completion program","specialized nursing","nursing management","critical thinking skills","clinical judgment","accredited by the Commission on Collegiate Nursing Education","Bachelor of Science in Nursing","broader professional responsibilities","career opportunities","online Bachelor of Science in Nursing completion program","specialized nursing","nursing management","critical thinking skills","clinical judgment","accredited by the Commission on Collegiate Nursing Education","1 year","online RN to BSN program","real-life situations","evidence-based practice","100% Online","8 week terms","Up to 30 credits tuition-free","ADN required","Mercy principles and ethics","CCNE-accredited RN-BSN degree","leaders in their chosen specialty areas","Graduate in just 11 months","CCNE-accredited online RN to BSN","100% online coursework","complete in as little as one year","dedicated faculty","real-world curriculum","fast and flexible online RN to BSN","completed in 14 months","CCNE-accredited","no in-person practicum","up to 95 transfer credits","highly regarded faculty","100% online Bachelor of Science in Nursing","full-time working adult student","Transfer up to 90 credits","ASN","active unencumbered RN licensure","top-ranked","advance your health care career","foundation for further graduate studies","critical thinking","practice skills","clinical management","constantly changing health care environment","BSN online","accredited by the Arizona State Board of Nursing","Commission on Collegiate Nursing Education","notable faculty","expand nursing competencies","regionally accredited","adult learner RN","experts in their respective fields","clinical patient care","health care management","professional nursing practice and leadership","nurse competencies","management and leadership","health assessment","statistics","research","ethical decision-making","public health","spirituality in health care","effective leaders in the nursing profession","preparation in many areas","criminal justice system","investigation","prosecution","Supreme Court","Constitution","degree completion program","transfer a large number of college credits","core and elective Criminal Justice courses","law enforcement","surveillance","homeland security","social service","criminal justice degree","Online coursework","criminal law","ethics","research methods","solid foundation in criminal justice","broad liberal arts education","faculty with years of experience","crime scene investigation","forensic psychology","homeland security","juvenile justice","law enforcement","earn credit for eligible prior learning","new career opportunities","solid foundation in criminal justice","broad liberal arts education","faculty with years of experience","crime scene investigation","forensic psychology","homeland security","juvenile justice","law enforcement","earn credit for eligible prior learning","new career opportunities","change lives","enhance communities","fair and just treatment","expertise in criminality and procedure","100% Online","transfer in your associate degree","60 credit hours","20 courses","working knowledge","justice process","enhance your knowledge","criminal justice","law enforcement","crime prevention","interagency collaboration","real-world issues","accredited state university","enhance your knowledge","criminal justice","law enforcement","crime prevention","interagency collaboration","real-world issues","accredited state university","start or advance your career","law enforcement","online BS in Criminal Justice","pure academics","seasoned practitioners","online B.S. in criminal justice administration","entry-level and seasoned professionals","rational decisions","informed responses","law enforcement","courts and corrections","online Bachelor of Arts in Criminal Justice Policy","five start dates per year","fully digital format","complete within 2 years","advance your career","solid foundation","theoretical knowledge","practical application","juvenile justice","law enforcement","homeland security","governmental positions","online B.S. in Criminal Justice","flexible online program","real-world social and criminal justice issues","transfer up to 75 credits","degree completion program","fully online BA","real-life experiences","national security","local/state/federal law enforcement","investigate a rewarding career","Bachelor of Science in Criminal Justice Administration","law enforcement careers","private security employment","administration of justice","foundational insights and theories","opportunities within the field of criminal justice","flexible","customizable","online program","policing","critical thinking","resilience","cultural engagement","personalized support services","vibrant online community","BS in criminology and criminal justice - policing","notable faculty","policing strategies","reducing crime","criminal justice principles","practice orientation","global perspective","specialty coursew
1ork","law enforcement","criminal courts","corrections","36 credit hour program","entirely online","CPA certification","career in accountancy","complete the program in 12 months","industry leaders in accounting","strategic overview","competitive advantage","all course materials included","laptop computer","first course FREE of charge","course credit for professional training/certifications","Master's in Accounting","Certified Public Accountant (CPA)","corporate accountant","auditor","financial analyst","high-level positions","banking","taxation","insurance","financial division","unique competitive advantage","enhanced analytical skills","latest technology","financial analysis methods","no GMAT or GRE required","online or on campus","concentrations in Auditing","Forensics Accounting","Taxation","accounting leadership","online Master of Science in Accounting","Certified Public Accountant (CPA) partners","Chief Financial Officers (CFO)","communication","ethical leadership","strategic management","critical thinking","problem-solving skills","mid- to senior-level positions","auditing","cost accounting","financial accounting","elective courses","certification examinations","Certified Internal Auditor (CIA)","Certified Management Accountant (CMA)","concentrations: audit","finance","government","tax","ACBSP accredited","solid MBA","accounting expertise","online coursework","no GRE/GMAT required","Master of Accountancy","apply principles of accounting","solve real-world problems","graduate degree specialization","three courses","nine credits","greater responsibilities","accounting role","transition into accounting","CPA credential","high-quality educational experience","tailored to working professionals","career-focused skills","master's degree in management","focus in accounting","mid-career professionals","comptroller","managing partner","senior accountant","Master of Business Administration","emphasis in Accounting","advanced management positions","corporate or public accounting","financial accounting and reporting","regulation","specialized accounting topics","organizational decision making","transformational leadership","interpersonal skills","diverse cultures","critical thinkers","decision makers","accelerated evening or online","Master of Science in Accounting (MSA)","Certified Public Accountant's credentials","Uniform CPA Exam","two capstone courses","bachelor's degree in accounting","bridge program","teacher licensure","early childhood","Interstate Teaching Assessment and Support Consortium (InTASC)","National Association for the Education of Young Children (NAEYC)","common core standards","child development","cultural diversity","verified field experiences","student teaching","educational theory","experiential learning opportunities","effective teachers","public and private elementary schools","Christian worldview","diverse learner needs","servant-leadership","small class sizes","individualized learning","direct access to professors","early childhood development","leader in the early childhood field","operating or owning their own early childhood program","managing an early childhood agency or organization","online bachelor's degree","ranked No.1 in Oregon","non-licensure degree program","teaching advancement","policy-making","hybrid BA in Early Childhood Education","mainly online coursework","fieldwork","two practicums","Curriculum Alignment Project Eight (CAP 8)","strategies for resilience","crisis and trauma","educational career paths","ECE experience","train educators and administrators","preschool to early elementary","safe","dynamic","and compassionate settings","BAE in educational studies - early childhood studies","care of children from birth to age five","school readiness","future educational success","initial teacher licensure","early childhood education programs","universal preschool education","expertise in early childhood","instructional strategies","teaching methodologies","assessment techniques","theories of early childhood growth","embedded practicum experiences","student teaching component","teaching credential in Arizona","internship experiences in a K-3 classroom","motivate","develop and educate children from birth to Grade 3","real estate market rebounds","career opportunities","right skills and training","foundations of real estate","sales","market analysis","finance","ethics","law","national real estate or broker license exams","online pathway","Bachelor of Science in Nursing (BSN)","minimum GPA requirement","nursing education","earn an associate degree","qualify for entry","pre-licensure BSN program","general education classes","associate degree","career flexibility","Associate of Science degree","Medical Administrative Billing and Coding","accurate medical co
1des","diagnostic procedures","clerical and administrative functions","insurance claims","compliance","reimbursement","specialization in information assurance","programming","computer forensics","information security","artificial intelligence","computer science capstone experience","Bachelor of Science in Computer Science (BSCS)","strong academic foundation","design and implementation projects","ABET-accredited","employment in the computer industry","implement software-based solutions","computer science professionals","dynamic BS in Computer Science","hands-on curriculum","technical challenges","societal and ethical responsibilities","BS in computer science online","renowned faculty","specific training","career goals","operating environments","testing platforms","computer systems analysts","applications and software developers","B.S. in Computer Science","analyze problems","design solutions","interpersonal skills","accredited state university","computer systems","software engineering principles","analytics","emerging technology","AI","Cisco","wireless networking","cloud computing","network administration","network technology","career-ready skills","cutting-edge computer applications","Association for Computing Machinery (ACM) guidelines","computer programming","coding","software development","data analysis","technical skills","fast-paced field","new types of technology","innovative computer solutions","Associate of Science online degree","Medical Assisting","preparing examination rooms","taking vital signs","minor surgical procedures","giving injections","performing venipuncture","laboratory operations","taking x-rays","administering electrocardiograms","administrative capacity","patient communications","maintaining patient records","scheduling appointments","processing insurance claims","practical clinical experience","Registered Medical Assistant","hands-on patient care","taking blood pressure","drawing blood","medical history","administrative and clerical duties","scheduling appointments","concentrations health information management","patient safety and quality","aligned with AUPHA","solid foundation","core disciplines","health care administration and management","supervisory roles","day-to-day operations","earn college credit","up to 48 credit hours tuition free","100% online","flex or term enrollment options","administrative leadership roles","business principles","ethics of professional standards","leadership styles","AUPHA-certified","rigorous curriculum","internship opportunity","competitive edge","experienced faculty","leadership skills","healthcare knowledge","Christian worldview","ethical considerations","quality of life issues","Christian values","real-world skills","career-boosting connections","career change","career advancement","communication","management","expert faculty","business mindset","passion for helping others","hands-on experience","internship","coordinate medical and health services","maintain patient records","healthcare laws","manage teams","leadership and practical management skills","diverse healthcare settings","ACBSP-accredited","specialized skills","oversee operations","healthcare ethics","health information systems","health services manager","health information manager","records manager","policies & procedures","U.S. health care system","administrative roles","entry-level supervisory roles","health care organizations","career entry","advance from clinical or technical roles","conceptual and analytical skills","contemporary health care organizations","master's degree","senior health care executive positions","project management","in-depth understanding","strategic management","decision-making","human resources","information management","quality improvement","public policy","administrative positions","long-term care","outpatient facilities","physician offices","mental health organizations","insurance companies","public health agencies","framework of general education courses","foundational knowledge","challenging health industry","legal and ethical parameters","risk and quality management","expand professional opportunities","aligned to the Society of Human Resource Management (SHRM)","management-level positions","advanced human resource management skills","communication and negotiation skills","legal and ethical principles","strategic HR program development","global and cultural context","no GMAT/GREs","fully online","MBA - Human Resource Management","private industry and public sector","organizational performance and productivity","36-hour","accelerated online program","completed in 12 months","practical application","practitioner-scholars","executive-level experience","all course materials included","laptop computer","first course FREE of charge","course credit for professional training/certifications","key organizational role","curriculum al
1igned with SHRM","up-to-date expertise","100% Online","8 week terms","5 starts per year","knowledge and skills","SHRM-aligned curriculum","ultimate flexibility","personalized instruction","SHRM certified","national SHRM exam","100% online","flexible 12- or 24-month track","no GRE required","strategic role","HR leaders","maximize employee engagement","cultural","regulatory","and behavioral issues","strategic partner","workforce capabilities","problem-solving","data-driven decision-making","strategic management skills","competitive in a global marketplace","strategic partner","HR management","evaluation and analysis","interpersonal competencies","critical thinking","ethical reasoning","globally connected and diverse world","strategic partner","HR management","corporate","nonprofit","municipal organizations","evaluation and analysis","complex HR laws","interpersonal competencies","critical thinking","ethical reasoning","successful HR manager","globally connected and diverse world","Master of Business Administration","Emphasis in Strategic Human Resource Management","Society for Human Resource Management's critical competencies","human resource competencies","senior human resources specialists","general managers","strategic HR acumen","human resources concentration","employment practices","personnel administration","employee training","aligns with SHRM's HR Curriculum Guidebook","human resources expertise","improve your company's culture","SHRM & HRCI","prepare for PHR","SPHR","SHRM-CP exams","leadership and management skills","human resources","bachelor's degree in business management","Human Resource Management specialization","transfer credits","human resource manager","specialist","consultant","business economics","strategic human resources planning","technology management","transfer up to 90 approved credits","library and writing center","broad knowledge","managing human resources","recruitment","selection","retention","compensation and benefits","training and talent development","legal compliance","diversity","equity","inclusion","Human Resource Management degree program","HR functional areas","employee development","employment law","compensation and benefits","core HR systems","principles of management","SHRM Certification Prep","Labor & Management Relations","Managerial Accounting","Bachelor of Arts in Organizational Leadership","globally competitive environment","critical thinking","collaborative","strategic leadership skills","open minded","creative solutions","leading with integrity","leadership development","analytical thinking","collaborative relationships","BA in business - human resources online","current & relevant curriculum","notable faculty","rewarding employees","financial and analytical knowledge","bachelor's degree","accredited state university","prepare for CMA and CFP exams","financial expertise","online Bachelor of Science in business administration","concentration in finance","leadership skills","manage funds","loss prevention managers","management analysts","investment fund managers","financial planning degree","four-year undergraduate degree","evaluating risk","investments","taxes","diversification","ethics","financial advisor roles","financial managers","financial health","practical and theoretical training","financial decision-making","creation of wealth","managing financial resources","Bachelor of Business Administration in Finance","100% online study","certified financial planner","in-demand roles","six start dates per year","IACBE-accredited","Bachelor of Arts in Finance","long-range financial planning","efficient use of financial resources","Bachelor of Science in Finance","online","8-week accelerated modules","Corporate Finance","Personal Finance","management accounting","specialized bachelor's degree","Accounting Information Systems","Controllership","Financial Statement Analysis/Business Valuation","Data Analytics for Financial Professionals","BA in business - financial planning","portfolio","tax","insurance","estate management","problem-solving","data analysis strategies","online business administration bachelor's degree","government organization","technical knowledge","critical-thinking skills","corporate finance","banking","real estate","financial markets","investment management","wealth management","accelerated Master of Science in Finance (MSF)","portfolio manager","financial analyst","online associate degree in accounting","foundation in accounting principles","cost accounting","taxation","business law","Associate of Applied Science in Accounting","knowledge of accounting theories","communicate effectively","network with people","entry-level opportunities","ACBSP accredited","teaching excellence","continuous quality improvement","online Associate of Science in Accounting","traditional accounting jobs","practice-based environment","public accounting","corporate income taxation","accounting information systems","auditing","law enforcement","education","online Master of Health Administration","earn your master's degree in as few as 24 months","health care leader","Bachelor's degree required","No GRE/GMAT scores required","Master of Science in Healthcare Administration","advanced healthcare education","AUPHA","CAHME","HLA","key business and leadership skills","accredited by NEASC","CCNE","ACBSP","no GMAT or GRE required","earn your degree in as few as 15 months","2 courses per term","radical changes","medical and health services managers","complex new developments","leadership and management positions","nonprofit","private organizations","MBA in Healthcare Administration","36 credit hour program","entirely online","complete the program in 12 months","executive-level business principles","all course materials included","first course FREE of charge","course credit for professional training/certifications","accredited degree programs","collaborative learning","industry insights","professional network","healthcare leaders","master's in healthcare administration","and manage healthcare operations","100 percent online coursework","innovative","strategic business skills","healthcare industry","rising costs","aging population","projected 30+ percent growth","advance your healthcare career","master's degree in health care administration online","Master of Health Administration","complex healthcare industry","real-world experiences","high-impact management roles","Master of Science in Health Care Administration","improve quality and efficie
1ncy","control costs","innovative change agents","organizational improvement","conceptual","analytical","and application skills","health sciences","contemporary health care","hospitals","long-term care facilities","outpatient facilities","physician offices","mental health agencies","insurance companies","public health agencies","Master of Health Administration (MHA)","dynamic and ever-changing health care industry","critically examine and evaluate","global health care system","quality improvement","strategic planning","specialization options","gerontology","informatics","management/administrative background","BSN to MSN-NP tracks","Psychiatric Mental Health NP","Pediatric NP","Family NP","Adult-Gerontology Primary Care NP","MSN Nurse Educator","MSN/MBA dual degree programs","master's degree in nursing","accredited by the Commission on Collegiate Nursing Education","study online","career advancement","faculty","staff development roles","practicum","clinical practice experience","executive leader","nurse educator","adult-gerontology primary care nurse practitioner","family nurse practitioner","Nursing@Simmons","aspiring FNPs","MSN online","board pass rate","clinical placements","RN required","Family Nurse Practitioner Program","health and well being","cutting-edge science","primary care settings","holistic approach","RN to MSN program","Family Nurse Practitioner","clinical practice","online","flexible pacing","on-campus immersion","mentored practicum","$7.5k MSN-FNP grant","CCNE-accredited Nursing MS degree","nursing leadership","nursing education","family nurse practitioner","research-backed curriculum","expert faculty","practicums","leadership abilities","CCNE-accredited online MSN","leadership position","comprehensive online coursework","practical experience","MSN - MBA dual degree","low-residency program","leadership and education","business expertise","leadership positions","healthcare nursing education","management","healthcare administration","health care quality and patient safety","Master of Science in Nursing","quality improvement measures","clinical decision-making","patient safety","CCNE accredited","complete in 2.3 years","online MSN - Adult-Gerontology Primary Care Nurse Practitioner","treat adolescents through to older adult patients","innovative approach","devoted faculty","Master of Science in Nursing","accredited by the Commission on Collegiate Nursing Education","enhance knowledge and skills","leadership roles","practice and educational settings","advanced nursing content","leadership skills","Masters in Corporate Finance Concentration","career opportunities","corporate finance jobs","finance and corporate finance courses","managerial accounting","capital budgeting","fiscal and monetary policies","36-credit-hour","Investments and Securities","MS in Finance","online or on campus","financial analysis","quantitative skills","leader in the field","Ranked #2 in the nation","Georgetown's MSF","rising industry leaders","McDonough School of Business","world-class curriculum","online learning platform","Master of Science in Finance","maximize your career potential","firsthand industry knowledge","financial analysis","financial planning","knowledge and skills","MBA@UNC","quality and flexibility","top-ranked UNC Kenan-Flagler","innovative technologies","real-world immersion","interactive communication","global immersions","financial operations expertise","executive-level skills","UMGC","accredited state university","IIA recognized IAEP program school","financial operations expertise","in-demand executive-level skills","UMGC","accredited state university","IIA recognized IAEP program school","online MBA","focus in finance","international finance","capital markets","risk management","commercial banking","real estate","investment services","corporate posts","Master of Science in Finance","leader in finance","strategic financial management","financial analytics","business goals","financial industry","greater responsibilities","accounting role","CPA credential","high-quality educational experience","securities analysis","portfolio management","data analysis","financial modeling","MA in Economics","PhD","high-level government","NGO","private-sector careers","microeconomics","macroeconomics","econometrics","quantitative concepts","customizable program","Master of Business Administration","emphasis in Finance","global economy","organizational decision making","corporate financial management","investments","corporate solvency","profitability","efficie
1ncy","Associate of Arts with a concentration in Business Fundamentals","fundamental business principles","Associate of Arts degree in Business Administration","basic business administration skills","computer skills","software applications","business administration methods","management skills","Associate of Science in Business Administration","general education","elective courses","faith-based liberal arts education","business administration foundation courses","online associate degree in business administration","foundational knowledge","accounting","business law","human resource management","marketing","Associate of Applied Science in Business Administration","career opportunities","accounting","microcomputer skills","managerial techniques","decision-making","problem-solving skills","entrepreneurship","event planning","sales","retail management","ACBSP accredited","associate of arts in Business Administration","variety of careers","2-year Business Administration Associate Degree","fast-track program","basic business skills","employability","professional profile","Bachelor in Business Administration (BBA) degree","Associate of Arts degree in Health Services Administration","basic health services administration skills","computer skills","software applications","healthcare business environment","business law","management and marketing principles","medical anatomy","physiology","terminology","front office management","online A.S. in emergency medical services","foundational aspects","EMS","academic groundwork","paramedicine","clinical skills","EMS operational practices","legal issues","Associate Degree in Occupational Health and Safety (AOHS)","job-essential aspects","occupational health and safety","further undergraduate study","OHS career","accredited by the Province of New Brunswick","Board of Canadian Registered Safety Professionals (BCRSP)","Master of Education degree","Special Education","characteristics and needs","individuals qualifying for services","IDEA/IDEIA","Autism Spectrum Disorders (ASD)","growing demand","special education services","higher graduation standards","master's degree in autism spectrum disorders","licensed special education teachers","educator's responsibility","online MSEd in Special Education","practical experience","latest breakthroughs","students with special needs","special education master's","graduate certificate programs","Autism Spectrum Disorder","Applied Behavioral Analysis","M.Ed. in Special Education","unique learning abilities","teaching methods","ethical and legal considerations","behavior modification","cultural diversity","responsive teaching","100% of graduates hold teaching positions","Master of Arts in Special Education","meaningful learning experiences","exceptional students","design and implement curricula","collaborate with families","cultivate learning","nationwide shortage","special education educators","instruct K-12 students","interagency collaboration","trends related to educating exceptional students","Master's in Teaching degree","special education credential","teach in California","moderate to severe disabilities","fast-track pathway","California Commission on Teacher Credentialing (CTC)","Teacher Performance Expectations","Free credential test preparation","online master's of education (MEd)","early childhood special education","Master of Arts in Education/Special Education","teacher licensure","student teaching","pedagogical skills","effective special education educators","Master of Public Health","two-year","100 percent online degree","public health practitioner","curriculum shaped by public health experts","in-depth fieldwork","impact the health of your community","education that crosses geographical and cultural borders","online Master of Public Health","population health leadership and management","expert faculty","create real change","CEPH-accredited online Master of Public Health","global health practitioner","public health practice concentration","200 practicum hours","Certified in Public Health (CPH) examination","online Master of Public Health (MPH) degree","promote health of large populations","create programs","systems","policies","MS in Public Health (MPH)","high-growth leadership roles","career-focused specializations","CHES and MCHES certifications","complete in 18 months","Bridge (Master of Science in Nursing with an Emphasis in Public Health)","experienced RN's","MSN public health degree","public health analysis","planning and implementation","six-course program","asse
1ss learning needs","innovate prevention","interpret statistics","conduct research","disseminate nursing-related information","demand for public health professionals","health care reform","environmental health concerns","disease prevention","community health","evaluation of health programs","principles of epidemiology and biostatistics","environmental public health concepts","public health administration systems","economic factors","practicum and capstone project","web-based MPH@GW","national and global health practice","interdisciplinary teaching","core competencies","biostatistics and epidemiology","cultural competency","health communication","implementation and evaluation methods","public health biology","systems thinking","part-time or full-time","control disease outbreaks","develop wellness programs","policy change","Master of Science in Public Health","36 credit program","scientific basis of public health","health and wellness trends","national and global health policy","ASPPH competencies","WHO core functions","complete in 15 months","Master of Public Health","leadership and managerial positions","private organizations","professional skills","public health principles","UNC's Gillings School","No. 1-ranked public school of public health","online Master of Public Health","MPH@UNC","earn your MPH in as few as 24 months","part- and full-time options","GRE","GMAT or MCAT required","Doctor of Business Administration in Leadership and Organizational Development","100% online program","professional administrators","executives","leaders","practical application of research","leadership challenges","organizational development","positive social impact","real-world knowledge creation","executive-level problem-solving","thought-leadership","applied research","executive and/or administrative roles","Ranked one of the top education schools","Vanderbilt University's Peabody College","Doctor of Education (Ed.D.) in leadership and learning in organizations","experienced midcareer professionals","practical skills","systemic change","organizational growth","Doctor of Business Administration Degree","experienced business professionals","academia","business/management theories","global environment","Doctorate of Marriage and Family Therapy (DMFT)","Systemic Organizational Leadership","critical thinking","research skills","practical application","culturally sensitive","leadership role","non-clinical specialization","practicum and internship","systemic leadership","Doctor of Management in Organizational Leadership","professional master's degree","personal readiness","leadership literature","current organizational environments","global environment","advanced decision-making","leadership skills","lifelong learning","ethical decision-making","effective communication","sustainability","information technologies","Marketing","Global Management","Global Business","Doctor of Business Administration program","self-design option","multidisciplinary","100% online program","professional administrators","executives","leaders","public and private industry","specialization coursework","positive social impact","real-world knowledge creation","executive-level problem-solving","thought-leadership","applied research","online DBA in Business Intelligence","higher-order thinking","research skills","applied research","actionable research","agility","data-driven decision-making","real-world problems","Doctor of Business Administration (DBA) degree program","professional master's degree","personal readiness","leadership in management professions","business administration literature","current business environments","Doctor of Philosophy in Educational Leadership","reflective scholars","improve schools","lifelong learning","ethical decision-making","diversity","program evaluation","effective communication","curriculum development","instructional design","course delivery","online learning management systems","instructional design methodologies","educational media","Doctor of Education (EdD)","practitioner doctoral program","educational leadership","administration","innovative curriculum","transformational leadership","Leadership Foundations","Organizational Dynamics and Change","Strategic Planning","executive-level skill set","educational institutions","online doctorate of education (EdD)","educational leadership","Doctor of Education in Educational Leadership (Ed.D.)","transformational leaders","strategically manage","lead complex educational organizations","analytical thinking","critical thinking","innovative thinking","applied research","educational environments","Associate of Science (A.S.) in Healthcare Administration","general education","healthcare administration and management","healthcare terminology","healthcare delivery systems","role of spirituality and ethics","healthcare human resources","solid foundational understanding","health care environment","entry-level administrative positions","health care management","health care operations and policy","privacy and conflict","health services administrator","department administrative assistant","administrative clerk","operations assistant","Associate of Science in health information science/health care administration","entry-level administrative positions","managing situations","health care facilities","business principles","ethical impl
1ications","health care administrative responsibilities","improve efficiencies and quality","Associate of Arts degree in Health Services Administration","basic health services administration skills","business law","management and marketing principles","medical anatomy","physiology and terminology","front office management","Master of Education degree","Early Childhood Education","assess educational potential","create instructional programs","coordinate learning activities","manage early childhood classrooms","MAE","early childhood education programs","fiscal planning","leadership skills","innovative curricula","evaluate programs","NAEYC standards","program management","master's degree in early childhood education leadership","100% online","flexible and accelerated classes","advanced early childhood education leadership","opportunities in and out of the classroom","online master's degree","design","implement and evaluate educational services","children from birth through age 8","Master of Education in Early Childhood Education","knowledge and expertise","early childhood development and teaching","NAEYC standards","instructional strategies","teaching methodologies","assessment techniques","theories of early childhood growth","family and cultural diversity","Associate of Arts degree in Paralegal Studies","support attorneys","transactional and litigation fields","legal research","document drafting","case management","evidence gathering","litigation procedure","trial assistance","dispute resolution","real estate documents","wills","trusts","contracts","corporate matters","law office investigations","Master of Education in Educational Administration","initial teacher licensure","educational administrators","administrative certificate","K-12 setting","regionally accredited program","school leadership","administrative foundations","organizational theory","K-12 legal issues","public school finance","curriculum development","instructional leadership","educational administration","principal-ship","school improvement","observational and practice-based experiences","administrative internship","certified teaching experience","informed and effective educational administrators","Master of Arts in Education/Administration and Supervision","principal licensure","standards-based program","instructional leadership","organizational management","technology management","data-driven decision-making","administrative internship","school administration and supervision","Master of Education degree","specialization in Instructional Leadership","analyze instructional capacity","improve student achievement","teacher leadership skills","assessment and improvement strategies","K-12 educational settings","Master of Science in Higher Education Administration","analytical skills","leading within an institution of higher education","empirical research","data-centric decision-making","analytical problem-solving","effectiveness of initiatives","data-based conclusions","real world problems","institutional research","strategic planning","institutions of higher education","comprehensive student services program","measure student learning","evaluate academic programs","accreditation procedures","standards for online programs","CTC-approved Preliminary Administrative Services Credential","MAE in Educational Administration","online coursework","theory with practical situations","problem solving","conflict resolution","diverse individuals","Master of Education in Educational Administration","initial teacher licensure","educational administrators","administrative certificate","K-12 setting","regionally accredited program","school leadership","administrative foundations","organizational theory","K-12 legal issues","public school finance","curriculum development","instructional leadership","educational administration","principal-ship","school improvement","observational and practice-based experiences","administrative internship","certified teaching experience","informed and effective educational administrators","39-hour","no application fee"],p$=({isRecommender:e=!1,schoolName:t,schoolId:r,schoolSlug:n,programName:i,city:o,state:a,programId:l,capId:s,snippet:c,levelOfInstitution:d,accreditator:u,roiPercentileRank:p,percentOnlineEnrollment:f,isOnline:m,isPublic:h,forProfit:g,notForProfit:y,onProductClick:x,onNextStepsClick:w,isProgramSubmitted:S=!1,applicationCtaLabel:I,applicationCtaURL:C,applicationCtaFieldMap:j,applicationCtaStaticParams:k,applicationCtaMissingValue:E,lead:N,partnerIdentifiers:T,showComparisonCheckbox:O=!1,location:P=U.PAGE,audience:L,degreeSlug:M,categorySlug:R,subjectSlug:F,position:$,listId:_,isUserRequested:D=!0,showPopupExperience:Y=!1,offeringId:B,offeringUuid:z,organizationId:V,tcpa:H=""})=>{let{createAppViewConversion:q}=uN(),G=(0,v.useRef)(null),W=(0,v.useRef)(!1),{triggerProductLoadedEvent:Q,triggerProductClickedEvent:K,eventContext:J}=aw(),X=P===U.EMBEDDED_RECOMMENDER,Z=de({applicationCtaURL:C,applicationCtaFieldMap:j,applicationCtaStaticParams:k,applicationCtaMissingValue:E},{lead:N,partnerIdentifiers:T}),ee=(0,v.useRef)(A()).current,et=(0,v.useRef)(A()).current,{setNodes:er,entries:en}=lR(),ei=en[0]?.isIntersecting??!1;(0,v.useEffect)(()=>{G.current&&er([G.current])},[er]);let eo=sm({eventContext:J,listId:_,presets:{degree:M||null,category:R||null,subject:F||null},location:P,productClickedCorrelationId:et,viewCorrelationId:ee,brand:n,position:$,capId:s,programId:l,outboundUrl:C,isProgramSubmitted:S,isUserRequested:D});(0,v.useEffect)(()=>
1{if(!W.current&&(X?ei&&!Y:ei)){let e=ac({...eo});ax(e.name,e.payload),W.current=!0,er([])}},[ei,Y]);let ea=(0,v.useMemo)(()=>({schoolName:t,schoolId:r??"",schoolSlug:n,city:o,state:a,programId:l,capId:s,programName:i,snippet:c,levelOfInstitution:d||"",accreditator:u||"",percentOnlineEnrollment:f||null,roiPercentileRank:p,isOnline:m||!1,isPublic:h,forProfit:g,notForProfit:y||!1,applicationCtaLabel:I||"",applicationCtaURL:C||"",programFlow:[],tcpa:H,productClickedCorrelationId:et,offeringId:B,offeringUuid:z,organizationId:V,audience:L}),[t,r,n,o,a,l,s,i,c,d,u,f,p,m,h,g,y,I,C,et,B,z,V,L,H]);(0,v.useEffect)(()=>{Q({...eo})},[]);let el=(0,v.useCallback)(()=>{K({...eo,outboundUrl:S?r6(Z,j):C});let e={viewCorrelationId:ee,productClickedCorrelationId:et};S&&Z?(q(ea),window.open(Z,"_blank","noopener,noreferrer")):S&&!Z&&w?w(e):x&&x(e)},[K,eo,S,Z,C,w,x,q,ea,ee,et,j]),es=Z?I||"Start Your Application":"Next Steps",ec=S?e?"Submitted":es:"Explore Program",ed=`https://simple-storage-server.highereducation.com/${n}.png?w=130&h=80`,eu=[o,a].map(e=>e.trim()).filter(Boolean).join(", ")||void 0,ep=(0,v.useMemo)(()=>d9({levelOfInstitution:d,accreditator:u,roiPercentileRank:p,percentOnlineEnrollment:f,isOnline:m,isPublic:h,forProfit:g,notForProfit:y}).map(({flag:e})=>e.value),[d,u,p,f,m,h,g,y]),ef=dQ(ea,{position:$,viewCorrelationId:eo.viewCorrelationId,correlationId:eo.productClickedCorrelationId}),em=(0,v.useMemo)(()=>c?(function(e){if(!e)return[];let t=e.split(/(?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|\?|!)\s/).map(e=>e.trim()).filter(Boolean);if(t.length<=1){let t=e.split(/;\s*|,\s+/).map(e=>e.trim()).filter(Boolean);if(t.length>1)return t}return t})(c).map(e=>e.trim()).filter(Boolean).map((e,t)=>{let r=((e="",t)=>{let r;if(!e)return[];if(!t||0===t.length)return[{text:e,bold:!1}];let n=(e=>{let t=e.join("|"),r=pF.get(t);if(r)return r;let n=RegExp(`\\b(${e.map(pR).join("|")})\\b`,"gi");return pF.set(t,n),n})(t);n.lastIndex=0;let i=[],o=0;for(;null!==(r=n.exec(e));)r.index>o&&i.push({text:e.slice(o,r.index),bold:!1}),i.push({text:r[0],bold:!0}),o=n.lastIndex;return o<e.length&&i.push({text:e.slice(o),bold:!1}),i})(e,pU).map((e,t)=>e.bold?(0,b.jsx)("b",{children:e.text},t):e.text);return(0,b.jsx)("span",{children:r},`${t}-${e.slice(0,24)}`)}):[],[c]),eh=!!(O&&l&&ef.compare),eg=(0,v.useCallback)(e=>{let t=e.target;t.closest("[data-degree-card-footer]")||t.closest("button[aria-controls]")||el()},[el]),ey=(0,v.useCallback)(e=>{e.stopPropagation(),el()},[el]);return(0,b.jsx)(aj.DegreeCardDetailed,{ref:G,border:"stroke",readMoreBehavior:"expand",schoolLogo:ed,schoolName:t,schoolDetails:eu,degreeTitle:i,tags:ep.length>0?ep:void 0,description:c,listHeading:em.length>0?"Why Consider This Program":void 0,listItems:em.length>0?em:void 0,ctaLabel:ec,onCtaClick:ey,compare:eh,compareChecked:!!eh&&ef.compareChecked,compareDisabled:!!eh&&ef.compareDisabled,onCompareChange:eh?ef.onCompareChange:void 0,footerLayout:eh?"stackUntilSm":"row",className:sc("not-prose h-full w-full min-w-0 max-w-full min-h-[376px] cursor-pointer",e?"rounded-lg border-t-8 pt-3":"rounded-sm border-t-4 pt-3"),onClick:eg})},p_=({results:e,header:t,subheader:r,showSponsoredResultsPopover:n=!0,showComparisonCheckbox:i=!0,onProgramClick:o,onNextStepsClick:a,submittedResults:l=[],showPopupExperience:s=!1,lead:c,partnerIdentifiers:d})=>{let u=l9(),p=u?.getRecommenderModalCopy(),f=t?.trim()??"",m=r?.trim()??"",h=!!f||!!m,g=e?.length??0,y=1===g?"1 sponsored result":`${g} sponsored results`,v=h||n;return(0,b.jsxs)(aj.Flex,{direction:"column",gap:"none",width:"full",className:"not-prose mx-auto mb-6",children:[v&&(0,b.jsxs)(aj.Flex,{className:"mb-6",direction:"column","direction-md":"row",justify:h?"between":"end",align:"start",gap:"md",children:[h&&(0,b.jsx)(aj.Flex,{direction:"column",gap:"none",className:"min-w-0 flex-1",children:(0,b.jsx)(aj.SectionHeader,{size:"h2",title:f||m,subtext:f&&m?m:void 0})}),n&&(0,b.jsxs)(aj.Flex,{direction:"row",align:"center",gap:"sm",wrap:"wrap",className:h?void 0:"w-full md:w-auto",children:[(0,b.jsx)(aj.Badge,{variant:"light",size:"sm",children:y}),(0,b.jsx)(uA,{spanText:"Learn More About Our Partners",disclosureTitle:p?.disclosureTitle,disclosureContent:p?.disclosureContent})]})]}),(0,b.jsx)(aj.Grid,{columns:1,"columns-md":2,gap:"lg",className:"pb-6 [&>*]:min-w-0",children:e?.map((e,t)=>{let r=l.some(t=>t.programId===e.programId);return(0,b.jsx)(p$,{onProductClick:t=>o({...e,...t}),onNextStepsClick:a?t=>a({...e,...t}):void 0,schoolName:e.schoolName,schoolId:e.schoolId,schoolSlug:e.schoolSlug,programName:e.programName,city:e.city,state:e.state,snippet:e.snippet,levelOfInstitution:e.levelOfInstitution,accreditator:e.accreditator,percentOnlineEnrollment:e.percentOnlineEnrollment??void 0,isOnline:e.isOnline,isPublic:e.isPublic,forProfit:e.forProfit,notForProfit:e.notForProfit,audience:e.audience,position:t+1,showComparisonCheckbox:i,isProgramSubmitted:r,applicationCtaLabel:e.applicationCtaLabel||"",applicationCtaURL:e.applicationCtaURL||"",applicationCtaFieldMap:e.applicationCtaFieldMap,applicationCtaStaticParams:e.applicationCtaStaticParams,applicationCtaMissingValue:e.applicationCtaMissingValue,lead:c,partnerIdentifiers:d,location:U.PAGE,degreeSlug:e.degreeSlug,categorySlug:e.categorySlug,subjectSlug:e.subjectSlug,capId:e.capId,programId:e.programId,offeringId:e.offeringId,offeringUuid:e.offeringUuid,organizationId:e.organizationId,tcpa:e.tcpa,listId:e.listId,isUserRequested:e.isUserRequested,showPopupExperience:s},`${e.programId}-${e.schoolName}-${e.programName}`)})})]})}
1,pD=({firstName:e,schoolName:t,schoolSlug:r,programName:n,valueProps:i,applicationCtaUrl:o,applicationCtaLabel:a,onCloseExperience:l,extraCta:s,lead:c,partnerIdentifiers:d})=>{let u=r?`https://simple-storage-server.highereducation.com/${r}.png?w=130&h=80`:void 0,p=()=>{if(s?.enabled!==!0||!s.destination?.url)return;let e=c5({baseUrl:s.destination.url,staticParams:s.destination.staticParams,fieldMap:s.destination.fieldMap,missingValue:s.destination.missingValue,sources:{lead:c,partnerIdentifiers:d}});return"href"in e?e.href:void 0},f=p(),m=s?.label??s?.destination?.label??"Learn more";return(0,b.jsxs)(aj.Section,{variant:"default",padding:"none",gap:null,className:"relative flex flex-col lg:flex-row overflow-hidden rounded-2xl",children:[l&&(0,b.jsx)(aj.Button,{type:"button",variant:"iconOnly",size:"sm",iconBefore:"x","aria-label":"Close",className:"absolute right-4 top-4 z-20",onClick:l}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"lg",className:"lg:w-2/5 bg-white px-8 py-7 shrink-0",children:[u&&(0,b.jsx)(aj.LogoBox,{src:u,alt:t??""}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"xs",className:"min-w-0",children:[(0,b.jsx)(aj.Heading,{variant:"h4",className:"truncate",children:t}),n&&(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:n})]}),(0,b.jsxs)(aj.Badge,{variant:"light",size:"lg",className:"gap-2 self-start",children:[(0,b.jsx)(aj.Icon,{icon:"clock",size:"sm","aria-hidden":!0}),"Now Accepting New Students."]}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"md",children:[(0,b.jsx)(aj.Heading,{variant:"h6",children:"Next Steps"}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"sm",children:[o&&(0,b.jsx)(aj.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:e=>{e.preventDefault(),window.open(o,"_blank","noopener,noreferrer")},children:a||"Start Your Application"}),f&&(0,b.jsx)(aj.Button,{variant:"primaryFill",size:"lg",className:"w-full !h-auto min-h-10",onClick:e=>{e.preventDefault();let t=p();t&&window.open(t,"_blank","noopener,noreferrer")},children:m}),(0,b.jsx)(aj.Button,{variant:"primaryOutline",size:"lg",className:"w-full",onClick:l,children:"Continue Browsing Programs"})]})]}),(0,b.jsx)(aj.Text,{variant:"b5",color:"subtext",children:"Your information will never be shared with a school without your consent."})]}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"lg",className:"lg:w-3/5 bg-secondary-50 px-8 py-7 flex-1",children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"xs",children:[(0,b.jsxs)(aj.Heading,{variant:"h3",children:["Congratulations",e?`, ${e}`:"","!"]}),(0,b.jsx)(aj.Text,{variant:"b4",color:"subtext",children:"What's next?"})]}),(0,b.jsx)(aj.Card,{variant:"background-white",rounded:"lg",children:(0,b.jsxs)(aj.Card.Content,{children:[(0,b.jsx)(aj.Heading,{variant:"h5",children:"What to expect from the Advisor"}),(0,b.jsxs)(aj.List,{bulletStyle:"bullet",children:[(0,b.jsx)(aj.ListItem,{children:"Hands-on assistance with your application process"}),(0,b.jsx)(aj.ListItem,{children:"Help applying for financial aid"}),(0,b.jsx)(aj.ListItem,{children:"Answers to any question you have"})]})]})}),i&&i.length>0&&(0,b.jsx)(aj.Card,{variant:"background-white",rounded:"lg",children:(0,b.jsxs)(aj.Card.Content,{children:[(0,b.jsxs)(aj.Heading,{variant:"h5",children:[t," offers"]}),(0,b.jsx)(aj.List,{bulletStyle:"bullet",children:i.map(e=>(0,b.jsx)(aj.ListItem,{children:e.title},e.title))})]})})]})]})},pY=({results:e,selectedResult:t,startTime:r,onCloseExperience:n,step:i,programSelectComponent:o,PiiConfirmationComponent:a,AdditionalQuestionsComponent:l,ExitStrategyComponent:s,SubmissionComponent:c,onBackButtonClick:d,firstName:u,lastName:p,email:f,phone:m,formErrors:h,onProgramClick:g,onProgramSubmit:y,setFirstName:v,setLastName:x,setEmail:w,setPhone:S,setFormErrors:I,canSubmit:C,isLoading:j,leadSubmissionStatus:k,setLeadSubmissionStatus:A,piiLeadErrors:E,productClickedCorrelationId:N,questions:T,editMode:O,setEditMode:P,submittedResults:L,partnerIdentifiers:M,extraCtaConfig:R})=>{let F={PROGRAM_SELECT:o,PII_CONFIRMATION:a,ADDITIONAL_QUESTIONS:l,EXIT_STRATEGY:s,SUBMISSION:c}[i];if(!F)return null;let U={firstName:u,lastName:p,email:f,phoneNumber:m},$={isLoading:j,canSubmit:C,selectedResult:t,introText:t?.confirmationShortIntroText||"",valueProps:t?.valueProps,programName:t?.programName||"",schoolName:t?.schoolName||"",schoolSlug:t?.schoolSlug||"",city:t?.city,state:t?.state,applicationCtaUrl:de(t,{lead:U,partnerIdentifiers:M}),applicationCtaLabel:t?.applicationCtaLabel,applicationCtaFieldMap:t?.applicationCtaFieldMap,startTime:r,onBackButtonClick:d,onProgramClick:g,onProgramSubmit:y,importantFactors:[],results:e,piiLeadErrors:E||[],editMode:O,setEditMode:P,setPiiLeadErrors:()=>{},setFirstName:v,setLastName:x,setEmail:w,setPhone:S,firstName:u,lastName:p,email:f,phone:m,formErrors:h,setFormErrors:I,onCloseExperience:n,leadSubmissionStatus:k,setLeadSubmissionStatus:A,productClickedCorrelationId:N||"",questions:T,onFormError:()=>{},formCorrelationId:"",tcpa:t?.tcpa||"",programFlow:t?.programFlow||[],tcpaSecondParagraph:t?.tcpaSecondParagraph||"",submittedResults:L,extraCta:R?{enabled:R.enabled,label:R.label,destination:t?.postLeadCta}:void 0,partnerIdentifiers:M,...R&&t?.postLeadCta?.url||t?.applicationCtaFieldMap?{lead:U}:{}};return(0,b.jsx)(F,{...$})},pB=()=>(0,b.jsx)(aj.Flex,{align:"center",justify:"center",className:"not-prose relative h-full min-h-[60vh] w-full rounded-2xl bg-white",children:(0,b.jsx)(aj.LoadingDots,{label:"Submitting request",color:"secondary"})}),pz=e=>(0,b.jsx)(pY,{AdditionalQuestionsComponent:c9,programSelectComponent:uO,PiiConfirmationComponent:sC,SubmissionComponent:pB,ExitStrategyComponent:pD,...e}),pV=({results:e,subject:t,onProgramClick:r,submittedResults:n=[],showPopupExperience:i=!1,showComparisonCheckbox:o=!0,lead:a,partnerIdentifiers:l})=>
1{let s=l9(),c=s?.getRecommenderModalCopy();if(!e||0===e.length)return null;let d=`Your Top Matches For ${t}`;return(0,b.jsx)(aj.Section,{as:"section",variant:"default",padding:"none",rounded:"lg",className:"not-prose mb-2xl border-2 border-tertiary-400 bg-tertiary-50",children:(0,b.jsxs)(aj.Flex,{direction:"column",gap:"lg",width:"full",className:"p-md md:p-xl",children:[(0,b.jsxs)(aj.Flex,{direction:"column","direction-lg":"row",justify:"between",align:"start",gap:"md",width:"full",children:[(0,b.jsx)(aj.SectionHeader,{size:"h2",title:d,className:"min-w-0 flex-1"}),(0,b.jsx)(uA,{spanText:"Learn More About Our Partners",disclosureTitle:c?.disclosureTitle,disclosureContent:c?.disclosureContent})]}),(0,b.jsx)(aj.Grid,{columns:1,"columns-lg":2,gap:"lg",className:"w-full",children:e.slice(0,2).map((e,t)=>{let s=n.some(t=>t.programId===e.programId&&t.schoolId===e.schoolId);return(0,b.jsx)(p$,{onProductClick:t=>r({...e,...t}),schoolName:e.schoolName,schoolId:e.schoolId,programName:e.programName,schoolSlug:e.schoolSlug,city:e.city,state:e.state,position:t+1,snippet:e.snippet,location:U.EMBEDDED_RECOMMENDER,isProgramSubmitted:s,applicationCtaLabel:e.applicationCtaLabel,applicationCtaURL:e.applicationCtaURL,applicationCtaFieldMap:e.applicationCtaFieldMap,applicationCtaStaticParams:e.applicationCtaStaticParams,applicationCtaMissingValue:e.applicationCtaMissingValue,lead:a,partnerIdentifiers:l,showPopupExperience:i,showComparisonCheckbox:o,degreeSlug:e.degreeSlug,categorySlug:e.categorySlug,subjectSlug:e.subjectSlug,capId:e.capId,programId:e.programId,offeringId:e.offeringId,offeringUuid:e.offeringUuid,organizationId:e.organizationId,tcpa:e.tcpa,listId:e.listId,isUserRequested:e.isUserRequested},`${e.programId}-${e.schoolName}-${e.programName}`)})})]})})},pH=({illustration:e})=>(0,b.jsxs)(aj.Flex,{className:"mx-auto max-w-4xl px-4 py-16 md:gap-12","data-testid":"no-results",direction:"column","direction-md":"row",align:"center",gap:"2xl",children:[e,(0,b.jsxs)(aj.Flex,{className:"w-full md:w-auto",direction:"column",gap:"sm",children:[(0,b.jsx)(aj.Heading,{variant:"h2",children:"We couldn't find a direct match for your search"}),(0,b.jsx)(aj.Text,{variant:"b4",color:"default",children:"Try updating or clearing all of your selected filters."})]})]}),pq=({header:e,desktopSubheader:t,mobileSubheader:r,listItem1:n,listItem2:i,listItem3:o,imageUrl:a,showImage:l})=>(0,b.jsxs)(aj.Flex,{direction:"column","direction-lg":"row",align:"start",gap:"lg",width:"full",className:"not-prose mx-auto w-full max-w-screen-2xl px-lg py-xl lg:items-center lg:justify-between",children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"md",width:"full",className:l?"lg:max-w-[43%] lg:shrink-0":void 0,children:[(0,b.jsx)(aj.Heading,{variant:"h1",className:"overflow-hidden text-ellipsis",children:e}),(0,b.jsx)(aj.Text,{variant:"b3",className:"hidden lg:block",children:t}),(0,b.jsx)(aj.Text,{variant:"b3",className:"lg:hidden",children:r})]}),l?(0,b.jsxs)(aj.Flex,{direction:"row",align:"center",gap:"sm",width:"full",className:"min-w-0 w-full flex-1 justify-start lg:justify-end md:gap-md",children:[(0,b.jsx)("div",{className:"-mr-section-break aspect-square w-editorial-listing-branding shrink-0 overflow-hidden rounded-lg",children:(0,b.jsx)(aj.Image,{src:a,alt:"Woman smiling in a cozy living room looking at her phone and laptop",className:"h-full w-full object-cover"})}),(0,b.jsx)("ul",{className:"flex min-w-0 flex-1 list-none flex-col items-end gap-xxs p-0 text-end max-w-72",children:[{icon:"landmark",label:n},{icon:"clipboard-check",label:i},{icon:"mouse-pointer-click",label:o}].map(({icon:e,label:t})=>(0,b.jsx)("li",{children:(0,b.jsx)(aj.ValueProp,{size:"sm",icon:e,children:(0,b.jsx)(aj.Text,{variant:"b5",color:"subtext",weight:"semibold",children:t})})},e))})]}):null]});function pG(e){return e.replace(/&/gi,"&").replace(/�*38;/gi,"&").replace(/�*26;/gi,"&")}function pW(e,t){let r,n=RegExp(t.source,"gi");for(;null!==(r=n.exec(e));){let t=r.index;if(0===t||!/[\w-]/.test(e[t-1]))return!0}return!1}function pQ(e){if(!e||"string"!=typeof e)return!1;let t=pG(e).trim();return!!/^business-management$/i.test(t)||pW(t.toLowerCase(),/business\s*(&|and)\s*management/)}let pK=({resultsAreLoading:e,exactResults:t,relatedResults:r,recommendedResults:n,spotlightResults:i,selectedResult:o,title:a,subtitle:l,startTime:s,subject:c,category:d,firstName:u,lastName:p,email:f,phone:m,setFirstName:h,set
1LastName:g,setEmail:y,setPhone:x,formErrors:w,setEditMode:S,editMode:I,piiLeadErrors:C,onPopupProgramClick:j,onPopupProgramSubmit:k,popupExperienceStep:E,closePopupExperience:N,showPopupExperience:T,showSpotlight:O,goToPopupProgramSelect:P,openProgramSlideoutExperience:L,onNextStepsClick:M,singleSubmissionExperienceStep:R,showSlideoutExperience:F,closeSlideoutExperience:U,onSlideoutProgramSubmit:$,goToSlideoutPiiConfirmation:_,canSubmitLead:D,isHeclidLoading:Y,leadSubmissionStatus:B,setLeadSubmissionStatus:z,additionalQuestions:V,onAdditionalQuestionsSubmit:H,lead:q,submittedPrograms:G,submittedResults:W,onViewNextSteps:Q,partnerIdentifiers:K})=>{let J=(({category:e,firstName:t})=>(0,v.useMemo)(()=>{let r=pQ(e),n=function(e){if(!e||"string"!=typeof e)return!1;let t=pG(e).trim();return!!/^psychology-counseling$/i.test(t)||pW(t.toLowerCase(),/psychology\s*(&|and)\s*counseling/)}(e);return{header:r||n?"Welcome to your results!":t?`Hi, ${t}!`:"Hi!",desktopSubheader:r?"Pick your favorite school, set up a call with an admissions administrator, and start your application â all in one place.":"Select a program and connect with an advisor for more details about accreditation, faculty, internships, and more.",mobileSubheader:"Connect with an advisor for info on accreditation, faculty and internships.",listItem1:n?"Compare psych programs.":"Compare online programs.",listItem2:"Connect with your top choice.",listItem3:n?"Start your psych degree.":"Start your online degree.",imageUrl:"https://res.cloudinary.com/highereducation/image/upload/v1739214820/BME/Voyager_Psych_Banner.png",showImage:!r}},[e,t]))({category:d,firstName:u}),X=(({category:e,subject:t})=>(0,v.useMemo)(()=>{let r=pQ(e);return{header:r?"More Matches For You":"",subheader:r?`These schools match your interests in ${t}.`:""}},[e,t]))({category:d,subject:c}),{getComparisonBounds:Z}=l8(),{minItems:ee,maxItems:et}=Z();if(e)return(0,b.jsx)(uU,{});let er=O?i:n,en=O&&E===pL.PROGRAM_SELECT;return(0,b.jsxs)(lJ,{minPrograms:ee,maxPrograms:et,children:[(0,b.jsxs)(aj.Flex,{direction:"column",gap:"none",width:"full",className:"px-2 md:px-8 max-w-[1536px] mx-auto",children:[(0,b.jsx)(pq,{header:a||J.header,desktopSubheader:l||J.desktopSubheader,mobileSubheader:l||J.mobileSubheader,listItem1:J.listItem1,listItem2:J.listItem2,listItem3:J.listItem3,imageUrl:J.imageUrl,showImage:J.showImage}),(0,b.jsx)(aj.Modal,{open:T,onOpenChange:e=>{e||N()},children:(0,b.jsxs)(aj.Modal.Content,{size:"xl",className:"max-w-5xl p-0 max-h-[95vh] overflow-y-auto rounded-2xl bg-transparent border-0 shadow-none",children:[(0,b.jsx)(aj.Modal.Header,{className:"sr-only",children:(0,b.jsx)(aj.Modal.Title,{children:O?"Spotlight program":"Recommended programs"})}),en?(0,b.jsx)(uE,{results:i,firstName:u,productClickedCorrelationId:o?.productClickedCorrelationId,onProgramClick:j,onCloseExperience:N}):(0,b.jsx)(pz,{selectedResult:o,canSubmit:D,isLoading:Y,onBackButtonClick:P,onProgramClick:j,onProgramSubmit:e=>{E===pL.ADDITIONAL_QUESTIONS?H(e):k()},onCloseExperience:N,results:er,step:E,firstName:u,lastName:p,email:f,phone:m,setFirstName:h,setLastName:g,setEmail:y,setPhone:x,formErrors:w,setEditMode:S,editMode:I,piiLeadErrors:C,startTime:s,setFormErrors:()=>{},leadSubmissionStatus:B,setLeadSubmissionStatus:z,questions:V,productClickedCorrelationId:o?.productClickedCorrelationId,submittedResults:W,partnerIdentifiers:K})]})}),(0,b.jsx)(dn,{open:F,onClose:U,children:o&&(0,b.jsx)(dr,{onCloseExperience:U,selectedResult:o,step:R,startTime:s,piiLeadErrors:C,setEditMode:S,editMode:I,setFirstName:h,setLastName:g,setEmail:y,setPhone:x,formErrors:[],setFormErrors:()=>{},formHeading:"Confirm your contact details:",formSubHeading:"",onBackButtonClick:_,onProgramSubmit:e=>{R===ss.ADDITIONAL_QUESTIONS?H(e):$()},firstName:u,lastName:p,email:f,phone:m,leadSubmissionStatus:B,setLeadSubmissionStatus:z,canSubmit:D,isLoading:Y,questions:V,productClickedCorrelationId:o?.productClickedCorrelationId||A(),partnerIdentifiers:K})})]}),(0,b.jsx)(uR,{submissions:G,firstName:u,onViewNextSteps:Q}),(0,b.jsxs)(aj.Flex,{direction:"column",gap:"none",width:"full",className:"px-2 md:px-8 max-w-[1536px] mx-auto",children:[n&&(0,b.jsx)(pV,{results:n,subject:c,onProgramClick:L,submittedResults:W,showPopupExperience:T,lead:q,partnerIdentifiers:K}),!!t?.length&&(0,b.jsx)(p_,{header:X.header,subheader:X.subheader,onProgramClick:L,onNextStepsClick:M,results:t,submittedResults:W,lead:q,partnerIdentifiers:K}),!t?.length&&!n?.length&&!r?.length&&(0,b.jsx)(pH,{}),!!r?.length&&(0,b.jsx)(p_,{onProgramClick:L,onNextStepsClick:M,results:r,header:"Other School Programs You Might Like",subheader:`These schools offer similar programs to ${c}.`,submittedResults:W,lead:q,partnerIdentifiers:K})]}),(0,b.jsx)(d4,{}),(0,b.jsx)(un,{squareButtons:!0,onProductClick:L,submittedResults:W})]})};function pJ(e,t){if(!t)return null;let r=parseInt(e.schoolId);if(!t.includes(r)||!e.linkoutUrl)return null;let n=e.productClickedCorrelationId||A(),i=JSON.stringify({webContext:window?._Cohesion?.webContext,formatSubtype:"dexp-results",formatType:"dexp-offering"});return e.linkoutUrl+(e.linkoutUrl.includes("?")?"&":"?")+`correlationId=${encodeURIComponent(n)}&trackingContext=${encodeURIComponent(i)}`}let pX=({linkoutConfig:e,title:t,subtitle:r})=>{let n=ro(),i=aC(),{triggerElementLoadedEvent:o,triggerElementViewedEvent:a}=aw(),l=ry(i.steps,i.flowState),s=rv("degree",i.flowState),c=rv("category",i.flowState),d=rv("subject",i.flowState),u=rS(i.flowState),p=u.firstName?.value?.toString()||"",f=u.lastName?.value?.toString()||"",m=u.email?.value?.toString()||"",h=u.phoneNumber?.value?.toString()||"",[g,y]=(0,v.useState)(),[x,w]=(0,v.useState)([]),[S,I]=(0,v.useState)([]),[C,j]=(0,v.useState)([]),[k,E]=(0,v.useState)([]),[N,T]=(0,v.useState)(!0),[O,P]=(0,v.useState)([]),[L,M]=(0,v.useState)([]),[R,F]=(0,v.useState)(),[$,_]=(0,v.useState)(p),[D,Y]=(0,v.useState)(f),[B,z]=(0,v.useState)(m),[V,H]=(0,v.useState)(h),[q,G]=(0,v.useState)(!1),W={...R?.stateAbbr?{state:{key:"state",value:R.stateAbbr}}:{}
1,...u,...!u.country?{country:{key:"country",value:R?.countryCode||"US"}}:{},firstName:{key:"firstName",value:$},lastName:{key:"lastName",value:D},email:{key:"email",value:B},phoneNumber:{key:"phoneNumber",value:V}},Q=rV(W),K=(0,v.useRef)(Q);(0,v.useEffect)(()=>{K.current=Q},[Q]);let J=!$||!D||!B||!V;(0,v.useEffect)(()=>{(async()=>{T(!0);try{let t=await pM({lead:Q,publisherToken:n?.identityToken,trackingContext:{anonymousId:window?._Cohesion?.anonymousId},degree:s,category:c,subject:d,presentationUrl:window.location.href,forceLinkoutSchoolIds:e&&e.schoolIds?e.schoolIds:void 0});w(t.exactResults.map(e=>({...e,isUserRequested:!0}))),j(t.recommendedResults.map(e=>({...e,isUserRequested:!0}))),I(t.relatedResults.map(e=>({...e,isUserRequested:!1}))),E(t.spotlightResults.map(e=>({...e,isUserRequested:!0}))),P(t.qualified),M(t.unqualified),t.locationInference&&F(t.locationInference)}catch(e){console.error("Error fetching qualified results:",e)}finally{T(!1)}})()},[]);let[X,Z]=(0,v.useState)([]),[ee,et]=(0,v.useState)(!1),[er,en]=(0,v.useState)(null),{duplicatePrograms:ei,duplicateProgramsLoading:eo}=dS({duplicateResult:er,leadRef:K,degree:s,category:c,forceLinkoutSchoolIds:e?.schoolIds,qualifiedIds:O,unqualifiedIds:L}),[ea,el]=(0,v.useState)(void 0),[es,ec]=(0,v.useState)([]),[ed,eu]=(0,v.useState)(void 0),ep=(0,v.useCallback)(e=>{eu(sr(e))},[]),ef=(0,v.useCallback)(e=>{y(e);let t=es.some(t=>t.programId===e.programId);el(t?st.SUBMITTED:void 0),t||eu(void 0)},[es]),em=(0,v.useCallback)(()=>{el(void 0)},[]),eh=(0,v.useMemo)(()=>ea!==st.SUBMITTING&&!!g&&!J,[ea,g,$,D,B,V]),eg=g?.productClickedCorrelationId||A(),ey=(0,v.useMemo)(()=>{if(g)return{school:{id:g.schoolId,slug:g.schoolSlug,name:g.schoolName},program:{id:g.programId,leadSource:l.leadSource}}},[g,l]),eb=dC(g),{showPopupExperience:ev,closePopupExperience:ex,showSpotlight:ew,showRecommender:eS,popupExperienceStep:eI,gotToPopupPiiConfirmation:eC,goToPopupAdditionalQuestions:ej,goToPopupExitStrategy:ek,goToPopupProgramSelect:eA,goToPopupSubmission:eE}=(({recommendedResults:e,spotlightResults:t,productClickedCorrelationId:r})=>{let[n,i]=(0,v.useState)(pL.PROGRAM_SELECT),{triggerElementClickedEvent:o}=aw(),{eventContext:a}=aC(),l=t?.length>0,s=!l&&e?.length>0,[c,d]=(0,v.useState)(!1),u=(0,v.useCallback)(()=>{d(!1),o({...a,productClickedCorrelationId:r,elementType:"dexp-popup-close",name:"dexp-popup-close-button",text:"X",location:U.POPUP})},[r,a,o]),p=(0,v.useCallback)(()=>i(pL.PROGRAM_SELECT),[]),f=(0,v.useCallback)(()=>i(pL.PII_CONFIRMATION),[]),m=(0,v.useCallback)(()=>i(pL.ADDITIONAL_QUESTIONS),[]),h=(0,v.useCallback)(()=>i(pL.EXIT_STRATEGY),[]),g=(0,v.useCallback)(()=>i(pL.SUBMISSION),[]);return(0,v.useEffect)(()=>{d(t.length>0||e.length>0)},[t,e]),{showPopupExperience:c,closePopupExperience:u,showSpotlight:l,showRecommender:s,popupExperienceStep:n,goToPopupProgramSelect:p,gotToPopupPiiConfirmation:f,goToPopupAdditionalQuestions:m,goToPopupExitStrategy:h,goToPopupSubmission:g}})({recommendedResults:C,spotlightResults:k,productClickedCorrelationId:eg}),eN=(0,v.useCallback)(t=>{ef(t);let r=pJ(t,e?.schoolIds);r?window.open(r,"_blank","noopener,noreferrer"):eC()},[eC,ef]),eT=(0,v.useCallback)(e=>{e&&(ec(t=>t.some(t=>t.programId===e.programId)?t:[...t,{programId:e.programId,schoolId:e.schoolId}]),Z(t=>t.some(t=>t.program.id===e.programId)?t:[...t,{program:{id:e.programId,name:e.programName},school:{name:e.schoolName,slug:e.schoolSlug},applicationCtaLabel:e.applicationCtaLabel,applicationCtaUrl:e.applicationCtaURL}]))},[]),{showSlideoutExperience:eO,closeSlideoutExperience:eP,openSlideoutExperience:eL,singleSubmissionExperienceStep:eM,goToSlideoutPiiConfirmation:eR,goToSlideoutAdditionalQuestions:eF,goToSlideoutExitStrategy:eU}=di({productClickedCorrelationId:eg}),{showAdditionalQuestions:e$,additionalQuestions:e_,isLoadingQuestions:eD,checkForAdditionalQuestionsAndSubmit:eY,submitWithAdditionalData:eB}=dm({lead:Q,needsActiveProspectToken:eb,activeProspectToken:dh(!0)||"",jornayaToken:dg(!0),programId:g?.programId.toString()||"",selectedResult:g,productClickedCorrelationId:eg,input
1s:W,record:ey,applicationCtaURL:g?.applicationCtaURL||"",onLeadSubmitted:ep}),ez=(0,v.useCallback)(async()=>{try{el(st.SUBMITTING);let{hasQuestions:e}=await eY();e?(el(st.PENDING),ej()):(el(st.SUBMITTING),eE(),await new Promise(e=>setTimeout(e,1e3)),eT(g),el(st.SUBMITTED),await new Promise(e=>setTimeout(e,1500)),el(void 0),ek())}catch(e){console.error("Error submitting lead:",e),el(dj(e))}},[g,eY,ej,ek,eE,eT]),eV=(0,v.useCallback)(()=>{eP()},[eP]),eH=(0,v.useCallback)((t,r=!1)=>{if(es.some(e=>e.programId===t.programId)){ef(t),em(),eL(),eU();return}if(!r&&es.some(e=>e.schoolId===t.schoolId)){en(t),et(!0);return}ef(t);let n=pJ(t,e?.schoolIds);n?window.open(n,"_blank","noopener,noreferrer"):(eR(),eL())},[eL,ef,em,es,eR,eU]),eq=(0,v.useCallback)(async()=>{try{el(st.SUBMITTING);let{hasQuestions:e}=await eY();e?(el(st.PENDING),eF()):(el(st.SUBMITTING),await new Promise(e=>setTimeout(e,1e3)),eT(g),el(st.SUBMITTED),await new Promise(e=>setTimeout(e,1500)),el(void 0),eU())}catch(e){console.error("Error submitting lead:",e),el(dj(e))}},[g,eY,eF,eU,eT]),eG=(0,v.useCallback)(async e=>{try{el(st.SUBMITTING),await eB(e),eT(g),el(st.SUBMITTED),await new Promise(e=>setTimeout(e,1500)),el(void 0),eO&&eU(),ev&&ek()}catch(e){console.error("Error submitting lead with additional data:",e),el(dj(e))}},[eB,eO,ev,eU,ek,eT,g]),{correlationId:eW}=aC();(0,v.useEffect)(()=>{eW&&(o({correlationId:eW,elementType:U.PAGE,name:U.PAGE,location:U.PAGE}),a({correlationId:eW,elementType:U.PAGE,name:U.PAGE,location:U.PAGE}))},[]);let eQ=(0,v.useCallback)(e=>{let t=[...C,...x,...S,...k].find(t=>t.programId===e.program.id);t&&(ef(t),em(),eL(),eU())},[C,x,S,k,ef,em,eL,eU]),eK=(0,v.useCallback)(e=>{ef(e),em(),eL(),eU()},[ef,em,eL,eU]),eJ=(0,v.useCallback)(()=>{et(!1),en(null)},[]),eX=(0,v.useCallback)(()=>{if(!er)return void eJ();let e=es.find(e=>e.schoolId===er.schoolId),t=e?.programId,r=[...C,...x,...S,...k].find(e=>e.programId===t);eJ(),r&&eK(r)},[eJ,er,x,eK,C,S,k,es]),eZ={showSlideoutExperience:eO,closeSlideoutExperience:eV,openProgramSlideoutExperience:eH,onNextStepsClick:eK,singleSubmissionExperienceStep:eM,onSlideoutProgramSubmit:eq,goToSlideoutPiiConfirmation:eR,goToSlideoutExitStrategy:eU,popupExperienceStep:eI,onPopupProgramClick:eN,showRecommender:eS,showSpotlight:ew,showPopupExperience:ev,closePopupExperience:ex,onPopupProgramSubmit:ez,goToPopupProgramSelect:eA,resultsAreLoading:N,exactResults:x,relatedResults:S,recommendedResults:C,spotlightResults:k,selectedResult:g,subject:d,category:c,firstName:$,lastName:D,email:B,phone:V,setFirstName:_,setLastName:Y,setEmail:z,setPhone:H,setFormErrors:()=>{},formErrors:[],setEditMode:G,editMode:q,piiLeadErrors:[],setPiiLeadErrors:()=>{},...{startTime:parseInt(l?.startDate)},canSubmitLead:eh,isHeclidLoading:!1,leadSubmissionStatus:ea,setLeadSubmissionStatus:el,showAdditionalQuestions:e$,additionalQuestions:e_,isLoadingQuestions:eD,onAdditionalQuestionsSubmit:eG,lead:Q,submittedPrograms:X,submittedResults:es,onViewNextSteps:eQ,partnerIdentifiers:ed,title:t,subtitle:r};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(pK,{...eZ}),ee&&(0,b.jsx)(sl,{result:er,otherPrograms:ei,isLoading:eo,onClose:eJ,onViewNextSteps:eX})]})};function pZ(e){if(e.dslConfigId)return e.resultType&&console.warn(`[Results] Step "${e.id??"unknown"}" has both resultType "${e.resultType}" and dslConfigId "${e.dslConfigId}"; routing through DSL. Payloads should declare exactly one.`),(0,b.jsx)(uz,{dslConfig:e.dslConfig,flowType:e.flowType,trafficSource:e.trafficSource},e.dslConfigId??e.id??"configurable-result");switch(e.resultType){case E.CUSTOM_RESULTS_PAGE:return(0,b.jsx)("h1",{children:"Custom Results Page"});case E.OFFERINGS:return(0,b.jsx)(pP,{});default:return(0,b.jsx)(pX,{variant:e.variant,title:e.title,subtitle:e.subtitle})}}let p0={[l1.INFO]:"info",[l1.WARNING]:"triangle-alert"},p1={[l1.INFO]:{container:"border-info-500 bg-info-100",icon:"text-info-500"},[l1.WARNING]:{container:"border-warning-500 bg-warning-100",icon:"text-warning-500"}},p2=({title:e,message:t,icon:r,flowState:n,eventContext:i})=>{let o=n?((e,t)=>{if(!e||!t)return e;let{degree:r,subject:n,category:i,career:o}={degree:rv("degree",t)||"",subject:rv("subject",t)||"",category:rv("category",t)||"",career:rv("career",t)||""};return e.replace(/\{\{degree\}\}/gi,r).replace(/\{\{subject\}\}/gi,n).replace(/\{\{category\}\}/gi,i).replace(/\{\{career\}\}/gi,o)})(t,n):t,{ref:a}=sh(i?[{name:"ElementViewed",payload:{correlationId:i.elementLoadedCorrelationId,webElement:{elementType:"dexp-flow-banner",htmlId:"info-banner",name:e||"info-banner",location:i.placement||"",text:o||""}}}]:[]),l=p0[r]??p0[l1.INFO],s=p1[r]??p1[l1.INFO];return(0,b.jsxs)(aj.Flex,{ref:a,className:`w-full rounded-md border px-4 py-3 gap-3 mb-6 ${s.container}`,align:"center",children:[(0,b.jsx)("div",{className:`shrink-0 w-5 h-5 ${s.icon}`,children:(0,b.jsx)(aj.Icon,{icon:l,size:"sm","aria-hidden":!0})}),(0,b.jsxs)("div",{className:"flex flex-col gap-1 text-left",children:[e&&(0,b.jsx)(aj.Text,{variant:"l1",color:"heading",weight:"semibold",children:e}),o&&(0,b.jsx)(aj.Text,{variant:"l1",color:"subtext",children:k(o)})]})]})},p4=({componentProps:e,onResult:t})=>{let{currentStep:r,currentStepType:n,currentStepIndex:i}=aC(),o=(0,v.useRef)(null);(0,v.useEffect)(()=>
1{if(!r)return;let e=Date.now(),t=o.current;o.current=e;let a=r.flowId??"unknown",l=n??"unknown";nr("deStepView",{flowId:a,stepId:r.id??"unknown",stepType:l,stepIndex:i??-1,componentType:uK(l,r)??"none",...null!==t&&{msSincePreviousStep:e-t}});var s=`DE/${a}/${l}`;let c=r8("interaction",[s]);if(c)try{let e=c.interaction?.();e?.setName?.(s)?.save?.()}catch(e){console.error("New Relic Action Error: interaction",s,e)}},[r?.id,n]);let a=r?.dslConfigId,l=r?.id??"__no-step__";return(0,b.jsx)(lY,{dslConfigId:a,children:(0,b.jsx)(p5,{componentProps:e,onResult:t})},l)},p5=({componentProps:e,onResult:t})=>{let r=(0,v.useRef)(null),{steps:n,currentStep:i,currentStepType:o,navigationHistory:a,isFullPageExp:l,styleVariant:s,handlePrevious:c,handleStepForward:d,buttonText:u,getStepMetadataById:p,validationErrors:f,eventContext:m,flowState:h}=aC(),g=lz(),y=g?.setEntryRootNode,x=a.length>1,w=i?.id,S=(0,v.useMemo)(()=>rg(h),[h]),I=i?.id?p(i.id):void 0,{visibleInfoBanners:C}=(({currentStep:e,currentStepData:t,allSelectedOptions:r})=>({visibleInfoBanners:(0,v.useMemo)(()=>{if(!e||e.type!==O.QUESTION&&e.type!==O.MULTI_QUESTION)return[];let n=[];return(e.type===O.MULTI_QUESTION?e.stepQuestions&&e.stepQuestions.forEach(e=>{e.infoBannerConfigs&&e.infoBannerConfigs.forEach(e=>{n.push(e)})}):e.infoBannerConfigs&&e.infoBannerConfigs.forEach(e=>{n.push(e)}),0===n.length)?[]:(({configs:e,selectedOptions:t,stepData:r})=>{if(0===e.length)return[];let n=e.filter(e=>!e.condition||e.condition.type===L.DEFAULT),i=e.filter(e=>e.condition&&e.condition.type!==L.DEFAULT).filter(e=>!!e.condition&&0!==t.length&&rm({type:M.NEXT_STEP,nextId:"",condition:e.condition},r??{},t));return i.length>0?i:n.length>0?n.slice(0,1):[]})({configs:n,selectedOptions:r.filter(t=>{if(e.type===O.MULTI_QUESTION){if(e.stepQuestions)return e.stepQuestions.some(e=>e.options?.some(e=>e.optionId===t.optionId))}else if(e.type===O.QUESTION&&(e.options?.some(e=>e.optionId===t.optionId)||t.leadFieldAssociated&&t.leadFieldAssociated===e.leadFieldAssociated))return!0;return!1}),stepData:t})},[e,t,r])}))({currentStep:i,currentStepData:I,allSelectedOptions:S}),j=C.some(e=>e.config),k=(0,v.useRef)(t);if((0,v.useEffect)(()=>{k.current=t}),(0,v.useEffect)(()=>{o!==O.RESULT||!i||k.current&&k.current(i,{flowState:h,steps:n})},[o,i?.id]),(0,v.useEffect)(()=>{l&&w&&window.scrollTo({top:0,behavior:"smooth"})},[w,l]),(0,v.useEffect)(()=>{if(!i||o!==O.COMPONENT&&o!==O.DCS&&o!==O.BANNER_CTA)return;let e=uK(o,i),t=i.dslConfigId;e||t||ne(Error("Step rendered nothing: no componentType or dslConfigId"),{source:"Experience",stepType:o,stepId:i.id??"unknown",flowId:i.flowId??"unknown",configKeys:Object.keys(i).sort().join(",")})},[w,o]),!i)return null;if(o===O.COMPONENT||o===O.DCS||o===O.BANNER_CTA){let t=uK(o,i),r=i.dslConfigId;if(!t&&!r)return null;let n=o!==O.COMPONENT;return(0,b.jsx)("div",{className:"de-dynamic-experience col-span-full w-full","data-step-type":o,ref:n?y:void 0,children:(0,b.jsx)(uQ,{componentType:t??"",currentStep:i,componentProps:e})})}if(o===O.RESULT)return t?null:(0,b.jsx)(aj.Flex,{direction:"column",className:"flex-1",children:(0,b.jsx)(pZ,{...i})});let A=i?.required??!1,E=f.length>0,N=o===O.MULTI_QUESTION?!i.stepQuestions||py(i.stepQuestions,p).every(e=>!e.required||pE(p(e.id),E)):o!==O.QUESTION||pE(p(i.id||""),E),T=l&&u4(i).length>0;return(0,b.jsxs)("div",{className:`de-experience bg-white flex flex-col md:flex-row w-full md:justify-start md:items-stretch ${T?"gap-6 md:gap-section-break":"gap-section-break"} ${l?"":"px-4 lg:px-16 pt-8 md:pt-14 pb-14 md:pb-28"}`,ref:y,children:[(0,b.jsx)(uZ,{contentRef:r,children:(0,b.jsxs)(aj.Flex,{direction:"column",gap:"md",className:`de-question-container md:gap-lg ${l?"":"p-4"} ${"alt"===s?"de-alt-variant":""}`,ref:r,children:[(0,b.jsx)(u6,{step:i,isFullPageExp:l}),(0,b.jsx)(u8,{step:i,isFullPageExp:l}),(0,b.jsx)(u9,{step:i}),(0,b.jsx)(pA,{step:i,stepType:o}),j&&(0,b.jsx)("div",{className:"flex flex-col gap-3",children:C.map(e=>e.config?(0,b.jsx)(p2,{...e.config,flowState:h,eventContext:m},e.id):null)}),(0,b.jsx)(u3,{onBack:c,onNext:d,nextLabel:u,showBack:x,isFullPageExp:l,disabled:A&&!N})]})}),T&&(0,b.jsx)(u5,{})]})},p3={desktop:300,mobile:630},p6={desktop:400,mobile:400};function p8(e,t){return{desktop:e?.desktop??t.desktop,mobile:e?.mobile??t.mobile}}let p9=({placementId:e,children:t,needsPlaceholder:r=!0,contentLoaded:n=!1,scoped:i=!1,portalContainer:o})=>{let a=ro(),{desktop:l,mobile:s}=(0,v.useMemo)(()=>(function(e,t){if(!e)return p3;let r=t?.multitenant,n=r?.slotPlacement?.[e]?.defaultMinHeight;if(n?.desktop!=null||n?.mobile!=null)return p8(n,p3);let i=r?.layout?.slotPlacementMinHeight;return i?.desktop!=null||i?.mobile!=null?p8(i,p3):"belowTheFold"===e?p6:p3})(e,a?.configs),[e,a?.configs]),[c,d]=(0,v.useState)(null),u=i?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{ref:d,"data-de-portal":!0}),(0,b.jsx)(aj.PortalContainerProvider,{value:o??c,children:t})]}):t;return(0,b.jsx)("div",{"data-de":!0,"data-placement-id":e,className:r?n?"col-span-full w-full":"col-span-full w-full min-h-[--placement-min-mobile] md:min-
1h-[--placement-min-desktop]":"",style:{"--placement-min-mobile":`${s}px`,"--placement-min-desktop":`${l}px`},children:u})},p7={aboveTheFold:"personalized-dcs-v2-dsl",belowTheFold:"editorial-listings-only-dsl"},fe=Object.keys(te),ft=({placement:e="",forcedFlowId:t="",experienceType:r,jumpToStepId:n="",entryStepId:i="",fromStepIndex:o=1,dcs:a,forwardedContext:l,schoolId:s,headline:c,params:d,isFullPageExp:u=!1,styleVariant:p="default",debugResult:f=!1,needsPlaceholder:m=!0,awaitingFlowId:h=!1,componentProps:g,environment:y="prod",tenantId:x,tenant:w,siteConfigs:S,customDimensions:I,onError:C,onFallbackShouldRender:j,slotName:k,slotVariant:E,experienceName:N,scoped:T=!1,portalContainer:O,onResult:P,taxonomySeed:L,initialSteps:M})=>{let R=(0,v.useMemo)(()=>({api:{...rt(y),leadApiBaseUrl:function(e,{affiliate:t=!1}={}){return t7(e,t)}(y,{affiliate:!!w.affiliate}),locationInferenceApiUrl:function(e,{affiliate:t=!1}={}){return t7(e,t)}(y,{affiliate:!!w.affiliate})},tenantId:x,tracking:{dynamicFlowEventFlag:!1,tagularSourceKey:w.tagularSourceKey},site:{tenantId:x,domain:w.domain,displayName:w.displayName,affiliate:w.affiliate,appExperienceUrl:w.appExperienceUrl,identityToken:w.identityToken,tagularSourceKey:w.tagularSourceKey,tagularApiKey:w.tagularApiKey,configs:S}}),[y,x,w,S]),[F,U]=(0,v.useState)(M??null),[$,_]=(0,v.useState)(L),[D]=(0,v.useState)(null),[Y,B]=(0,v.useState)(null),[z,V]=(0,v.useState)(!M),[H]=(0,v.useState)(()=>A()),[q]=(0,v.useState)(()=>A());return((0,v.useEffect)(()=>{if(M||h)return;let n=!1;return(async()=>{var i;V(!0),B(null);let o=R.site?.tagularSourceKey,l=(i=R.tenantId,o?.trim()||i?.trim()||"default"),s=t||(e?p7[e]??`default-${e}`:"default");try{o||console.warn(`[DynamicExperience] Missing tenant.tagularSourceKey; falling back to "${l}" for flow resolution. The tenant-scoped flow will not load â verify the tenant config exposes cohesion.tagular.sourceKey.`),t||R.tracking?.tagularSourceKey,nt("flowId",s),r&&nt("experienceType",r);let e=await en(l,s);if(e.error)throw Error(e.error);if(e.data){let t=e.data,r=L,i=nF(a,nR(t));if(void 0===L&&R.api.offeringsServiceBaseUrl&&function(e,t){if(!t)return!1;let r=e.find(e=>!0===e.isEntry)??e[0],n=r?.dslConfig;if(n?.type!=="entry")return!1;let i=eN(n.data?.content);return fe.some(e=>!!t[e]&&!i[e]?.source)}(t,i))try{r=await tn(R.api.offeringsServiceBaseUrl,{scope:"dcs"})}catch{r=[]}if(n)return;_(r),U(t)}}catch(t){if(n)return;let e=t instanceof Error?t:Error("Failed to fetch flow data");B(e),ne(e,{source:"DynamicExperience",phase:"fetchFlow",flowId:s??"unresolved",tenantId:l}),console.error("Error fetching dynamic experience data:",e),C?.(e)}finally{n||V(!1)}})(),()=>{n=!0}},[M,h,t,r,e,R.tenantId,R.tracking?.tagularSourceKey,R.api.offeringsServiceBaseUrl,a?.degree,a?.category,a?.subject,L,C]),Y)?j?.({reason:"no-flow"})??null:h||z||!F||0===F.length?(0,b.jsx)(rn,{config:R,children:(0,b.jsx)(p9,{placementId:e,needsPlaceholder:m,scoped:T,portalContainer:O,children:(0,b.jsx)(b.Fragment,{})})}):(0,b.jsx)(rn,{config:R,children:(0,b.jsx)(ta,{seed:$,children:(0,b.jsx)(aI,{steps:F,correlationId:H,placementId:e,jumpToStepId:n,dcs:a,forwardedContext:l,schoolId:s,headline:c,params:d,entryStepId:i,isFullPageExp:u,audienceIntent:D,styleVariant:p,fromStepIndex:o,elementLoadedCorrelationId:q,debugResult:f,customDimensions:I,slotName:k,slotVariant:E,experienceName:N,children:(0,b.jsx)(p9,{needsPlaceholder:m,placementId:e,scoped:T,portalContainer:O,contentLoaded:!0,children:(0,b.jsx)(p4,{componentProps:g,onResult:P})})})})})},fr=new Map,fn=/^(\d{4})(80)$/,fi=/^Fall (\d{4})$/,fo=/^F(\d{2})$/;var fa={id:"term",parse(e){let t=function(e){if("string"!=typeof e||0===e.length)return null;let t=fo.exec(e);if(t)return`Fall 20${t[1]}`;if(fi.test(e))return e;let r=fn.exec(e);return r?`Fall ${r[1]}`:null}(e);if(!t)return null;let r=fi.exec(t);if(r)return{year:Number(r[1]),season:"Fall"};let n=fn.exec(t);return n?{year:Number(n[1]),season:"Fall"}:null},step:(e,t)=>Number.isInteger(t)?{year:e.year+t,season:"Fall"}:null,format:e=>`${e.season} ${e.year}`,anchors(e){return function(e,t){let r=e.parse(t);if(null===r)return null;let n=e.step(r,-1);if(null===n)return null;let i=e.step(n,-1);return null===i?null:{self:e.format(r),prior:e.format(n),priorPrior:e.format(i)}}(this,e)}};if(fr.has(fa.id))throw Error(`OrderedSequence "${fa.id}" is already registered`);fr.set(fa.id,fa)},65324:()=>{}}]); 2//# sourceMappingURL=95546-4504252b02bdc62a.js.map
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.