var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}var window = _____WB$wombat$assign$function_____("window");
var self = _____WB$wombat$assign$function_____("self");
var document = _____WB$wombat$assign$function_____("document");
var location = _____WB$wombat$assign$function_____("location");
var top = _____WB$wombat$assign$function_____("top");
var parent = _____WB$wombat$assign$function_____("parent");
var frames = _____WB$wombat$assign$function_____("frames");
var opener = _____WB$wombat$assign$function_____("opener");
import"./getQueryStringValues-DkKYgdbv.js";const a=function(){const e=[this.vendorKeys["go.jacuzzi.com"]];return!!(!(this.queryString.referralUrl&&this.queryString.referralUrl==="crossSell")&&this.queryString.Match&&e.includes(this.queryString.Match))},i=function(e){const r=this;if((r.showBrandedResultPage||r.isBrandedExclusiveMatch)&&!modForm.opts.isExclusiveMatch)e&&e.dataCaptureKey!=null&&e.vendors&&e.vendors.length?modForm.opts.resultsPage=`${modForm.opts.landingPageSubdirectory}${r.brandedThankYouPage}/${window.location.search}`:(modForm.opts.showRedirectOverlay=!1,modForm.opts.resultsPage=`${modForm.opts.landingPageSubdirectory}${a.call(r)?r.jacuzziSorryPage:r.brandedSorryPage}/${window.location.search}`,modForm.opts.errorRedirectPath=modForm.opts.resultsPage);else{const s=modForm.opts.getVars;if(r.isModernizePage&&!modForm.opts.isExclusiveMatch||r.resultsInParentPageType==="HRC"){let o;if(e.dataCaptureKey!=null){window.projectId=e.publicLeadIdentifer,o=modForm.getProjExUrl();let t=o.indexOf("?")<0?"?":"&";o+=`${t}DCK=${e.dataCaptureKey}`,modForm.opts.shouldSuppressConversionPixel&&(o+=`${t}${modForm.opts.suppressConversionPixelParam}`),modForm.opts.isFirePixelTrue&&(o+=`${t}${modForm.opts.firePixelParam}`),modForm.opts.isSharedMatch&&(o+=`${t}${modForm.opts.sharedParam}`),modForm.opts&&modForm.opts.getVars&&"PartnerSourceID"in modForm.opts.getVars&&(o+=`${t}PartnerSourceID=${modForm.opts.getVars.PartnerSourceID}`),r.preferredMatchUI&&(o+=`${t}prefMatch=${e.vendors&&e.vendors.length>0?"true":"false"}`),o+=t+(e.vendors&&e.vendors.length>0?"ThankYou":"Sorry")}else o+=modForm.opts.resultsPage;window.parent.postMessage({leadForm:{redirect:o}},"*")}else{if(window.location!==window.parent.location&&(modForm.opts.landingPage=document.referrer),e.vendors&&e.vendors.length===0&&(r.resultsInParentPageType==="branded"&&(modForm.opts.resultsPage=modForm.opts.errorRedirectPath),r.preferredMatchUI&&(modForm.opts.resultsPage+=`${resultsPage.indexOf("?")<0?"?":"&"}prefMatch=false`)),s.vk&&e.dataCaptureKey!=null){const o=s.vk.split(",");modForm.opts.prefVendorKeys&&o.forEach(function(t){modForm.opts.prefVendorKeys.push(t)})}r.resultsInParentPageType!==!1&&window.parent.postMessage({leadForm:{redirect:modForm.opts.resultsPage,firstName:document.querySelector("#firstName").value,DCK:e.dataCaptureKey}},"*")}modForm.opts.vertical==="HOME_WARRANTY"&&modForm.opts.isExclusiveMatch&&(modForm.opts.showRedirectOverlay=!0,setTimeout(function(){setTimeout(function(){window.parent.postMessage({leadForm:{redirect:modForm.opts.resultsPage}},"*")},500),document.body.classList.add("submitted")},2500))}};export{a as i,i as u};