1"use strict";(globalThis.webpackChunkgolfnow_web||=[]).push([[79162],{8877(e,t,a){a.d(t,{Az:()=>p,FU:()=>g,YO:()=>v,rP:()=>f,yw:()=>y});var n=a(64592),i=a(66401),l=a(69592),r=a(84430),o=a(79162);let s,u=[],c=[],d,h="refresh",f=({adConfigNamesData:e,configAdUnits:t})=>(0,i.A)(googletag)?Promise.reject("googletag object is empty. Ads will not display"):new Promise(a=>{googletag.cmd.push(()=>{if((null==t?void 0:t.length)&&t[0].hasSingleDiscreetDimension){let{adUnitName:e,dimensions:a,id:n,gamId:i}=t[0];w(e,a,n,i)}else if(null==t?void 0:t.length){let{adUnitName:e,fullNames:a,gamId:n}=t[0];a.forEach(({dimensions:t,id:a})=>w(e,t,a,n))}(0,o.wN)("Targets:",c),c.forEach(e=>googletag.pubads().setTargeting(e.name,e.value)),googletag.pubads().addEventListener("impressionViewable",e=>{var t;let a,i=e.slot;if("function"==typeof i.getConfig)try{a=i.getConfig("targeting")}catch(e){(0,o.Ey)("slot.getConfig threw an error:",e),a=void 0}(null==(t=null==a?void 0:a[h])?void 0:t.indexOf("true"))>-1&&(0,n.A)(()=>{googletag.pubads().refresh([i])},6e4)}),googletag.setConfig({collapseDiv:"BEFORE_FETCH",disableInitialLoad:!0}),googletag.enableServices(),a({adConfigNamesData:e,configAdUnits:t,googleSlots:u})})}),m=(e,t)=>c.push({name:e,value:t}),p=(e,t)=>{(0,i.A)(googletag)||(""===e&&(0,o.Ey)("Ad Unit name is empty"),t&&(0,o.wN)("adElem::",t.id),googletag.cmd.push(()=>{googletag.display(t),(0,o.wN)("Ad Display called for:",e),(0,r.Mr)("display_dfp_ad",e)}))},y=(e,t,a,n,i=!1,l)=>{e&&a.length&&(u=[],c=[],s=t,m("ct_url",n),m("is18Up",l.is18Up?"true":"false"),m("is21Up",l.is21Up?"true":"false"),d=i)},g=(e,t)=>{!t.length||(0,i.A)(googletag)||(0,l.A)(googletag.pubads)||((0,o.wN)("Ad refresh called for:",e),googletag.pubads().refresh(t))},v=()=>{(0,i.A)(googletag)||(0,l.A)(googletag.pubads)||googletag.pubads().refresh()},w=(e,t,a,n)=>{var i;try{let l=null==(i=googletag.defineSlot(`/${n||s}/${e}`,t,a))?void 0:i.addService(googletag.pubads());l&&(l.setConfig({collapseDiv:"BEFORE_FETCH",targeting:{[h]:d.toString()}}),u.push(l),googletag.pubads().addEventListener("slotOnload",t=>{l===t.slot&&(0,o.wN)("Ad slot loaded:",e)}))}catch{}}},48966(e,t,a){a.d(t,{GoogleAnalytics:()=>b});var n=a(92049),i=a(98916),l=a(9703),r=a(79162),o=a(40341),s=a(10354),u=a(62350),c=a(64019);let d="GolfNow.Web.Analytics.Google",h=new Set(["sortChange"]);function f(e,t,a,n,i){if("u"<typeof dataLayer||!Array.isArray(dataLayer))return!1;let l=h.has(e)||!("Homepage Banner"===t||"string"==typeof a&&a.toLowerCase().includes("impression"));for(let r=dataLayer.length-1;r>=0;r--){let o=dataLayer[r];if(!(Array.isArray(o)&&"event"===o[0]||o&&"object"==typeof o&&"string"==typeof o.event&&"eventCategory"in o&&"eventAction"in o&&"eventLabel"in o))continue;let s=function(e,t,a,n,i,l){if(Array.isArray(e)){let t=e[2];return"event"===e[0]&&e[1]===a&&(null==t?void 0:t.event_action)===n&&(null==t?void 0:t.event_label)===i}return e&&"object"==typeof e&&e.event===t&&e.eventCategory===a&&e.eventAction===n&&e.eventLabel===i&&e.eventValue===l}(o,e,t,a,n,i);if(s||l)return s}return!1}function m(e){try{ga("set","page",e),ga("send","pageview"),(0,r.wN)(d+": Tracking Virtual PageView ("+e+")")}catch{}}function p(){let e="";try{let t=document.querySelector("main");if(null!==t&&(e=t.dataset.currency||""),""===e){let t=document.querySelector("meta[name='currency-code']");null!==t&&(e=t.content)}}catch{}return(""===e||"CLP"===e)&&(e=defaultSiteCurrencyCode),e}function y(e){!(null===e||(0,r.Sb)())&&"u">typeof window&&(window.location.href=e)}let g=function(){let e="Homepage";try{let t=window.location.href;t.indexOf("destinations")>-1?e="Destination Page":t.indexOf("hot-deals")>-1?e="Hotdeals Page":t.indexOf("play-fast")>-1?e="Play Fast":t.indexOf("play-nine")>-1?e="Play Nine":t.indexOf("play-single")>-1?e="Play Single":t.indexOf("play-walk")>-1?e="Play Walk":t.indexOf("/tee-times/search")>-1?e="GeoLocation":t.indexOf("facility")>-1?e="Facility Search":t.indexOf("search")>-1?e="Location Search":t.indexOf("select-rate")>-1&&(e="Select Rate")}catch(e){(0,r.wN)(e)}return e};function v(e,t,a,n){let i={event:"select_item",eventLabel:e,ecommerce:{item_list_name:t,items:a}};n&&(i.eventCallback=n),dataLayer.push(i)}function w(e,t,a){var n,i,l,o,s,h,f,m,p,y,g,v,w,b;if("Featured Course"===a&&"string"==typeof t&&"string"==typeof e&&(t.includes(null!=(n=null===c.XT||void 0===c.XT?void 0:c.XT.pmpTier1)?n:"")||t.includes(null!=(i=null===c.XT||void 0===c.XT?void 0:c.XT.pmpTier2)?i:""))){let a=[];if(t.includes("|")?a=null!=(l=t.split("|"))?l:[]:t.includes(":")&&(a=null!=(o=t.split(":"))?o:[]),a.length>1){let t=null!=(h=null==(s=a[0])?void 0:s.trim())?h:"",n=Number(null!=(m=null==(f=a[1])?void 0:f.trim())?m:0),i=null!=(y=null==(p=a[2])?void 0:p.trim())?y:"",l=(null==(g=a[3])?void 0:g.includes("/"))?null!=(v=a[3].split("/")[0])?v:"":null!=(b=null==(w=a[3])?void 0:w.trim())?b:"";e.includes("impression")?u.PmpReporting.ReportPmpImpressionEvent(t,n,i,l).catch(e=>(0,r.SS)(d+": Error reporting PMP impression event",e)):e.includes("click")&&u.PmpReporting.ReportPmpClickEvent(t,n,i,l).catch(e=>(0,r.SS)(d+": Error reporting PMP click event",e))}}}let b={TrackPageView:m,TrackPageView2:function(e,t,a){if("u">typeof dataLayer)try{dataLayer.push({event:e,virtualPageURL:t,virtualPageTitle:a})}catch{}},TrackRefinePageView:()=>m("/search-refine"),TrackCharityAutoOptInImpression:function(e,t){if("u">typeof dataLayer)try{dataLayer.push({event:"charityImpression",eventCategory:"Charity Impression",eventAction:e+" Impression",eventLabel:t})}catch{}},TrackCharityDonation:function(e){if("u"<typeof dataLayer)return;let t=/no thanks/gi.test(e.charityAction)?"":e.donationAmount,a=e.charityName||e.charityId;try{dataLayer.push({event:"charityDonation",eventCategory:"Charity Donation",eventAction:a+" "+e.charityAction,eventLabel:t})}catch{}},TrackGoogleClickEvent:function(e,t,a,n,i,l){if(!(0,r.Sb)())try{if
1(f(e,t,a,n,i))return;if(w(a,n,t),dataLayer){var o=!1;dataLayer.push({event:e,eventCategory:t,eventAction:a,eventLabel:n,eventValue:i,eventCallback:function(){o=!0,window.location.href=l}}),window.setTimeout(function(){o||(window.location.href=l)},250)}else window.location.href=l}catch(e){(0,r.wN)(e),window.location.href=l}},TrackGoogleEvent:function(e,t,a,n,i){if(!(0,r.Sb)())try{var l,o;let r=(l=e,o=i,"courseImpression"===l&&"number"==typeof o?o.toFixed(2):o),s={event:e,eventCategory:t,eventAction:a,eventLabel:n};if(void 0!==i&&(s.eventValue=r),f(e,t,a,n,r))return;w(a,n,t),dataLayer&&dataLayer.push(s)}catch(e){(0,r.wN)(e)}},Ecommerce:{AddToCart:function(e,t,a,n,i,l,o){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"addToCart",eventLabel:t,ecommerce:{add:{products:[{name:e,id:t,price:a,category:n,Dimension36:i,Dimension37:l,Dimension38:o,currencyCode:p()}]}}})},CheckoutStep1:function(e,t,a,n,i,l,o,s){if((0,r.Sb)()||"u"<typeof dataLayer){s&&""!==s&&(document.location=s);return}try{let r=!1;dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:1},products:[{name:e,id:t,price:a,category:n,Dimension36:i,Dimension37:l,Dimension38:o,currencyCode:p()}]}},eventCallback:function(){r=!0,s&&""!==s&&(document.location=s)}}),window.setTimeout(function(){!r&&s&&""!==s&&(window.location.href=s)},250)}catch(e){(0,r.wN)(e),s&&""!==s&&(window.location.href=s)}},CheckoutStep2:function(e,t,a,n,i,l,o,s,u){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:2},products:[{name:e,id:t,price:a,category:n,variant:i,Dimension36:l,Dimension37:o,Dimension38:s,quantity:u,currencyCode:p()}]}}})},CheckoutStep3:function(e,t,a,n,i,l,o,s,u){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:3},products:[{name:e,id:t,price:a,category:n,variant:i,Dimension36:l,Dimension37:o,Dimension38:s,quantity:u,currencyCode:p()}]}}})},CheckoutStep3MultProducts:function(e,t){if((0,r.Sb)()||"u"<typeof dataLayer)return;if(!(0,n.A)(t))return void(0,r.SS)(`Invalid argument: products 2 expected an array.`);let a=p();t.forEach(e=>{e.currencyCode=a}),dataLayer.push({event:"productCheckout",eventLabel:e,ecommerce:{checkout:{actionField:{step:3},products:t}}})},CheckoutStep4:function(e,t,a,n,i,l,o,s,u){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:4},products:[{name:e,id:t,price:a,category:n,variant:i,Dimension36:l,Dimension37:o,Dimension38:s,quantity:u,currencyCode:p()}]}}})},CheckoutStep4MultiProducts:function(e,t){if((0,r.Sb)()||"u"<typeof dataLayer)return;if(!(0,n.A)(t))return void(0,r.SS)(`Invalid argument: products 3 expected an array.`);let a=p();t.forEach(e=>{e.currencyCode=a}),dataLayer.push({event:"productCheckout",eventLabel:e,ecommerce:{checkout:{actionField:{step:4},products:t}}})},GetLoginPageInformation:async function(e,t,a){let n=new o.A;return await n.postEnhancedEcommerceInfoLogin(new s.v({facilityId:e,teetimeId:t,players:a}))},ProductImpression:function(e,t,a,n,i,l,o,s,u){if((0,r.Sb)()||"u"<typeof dataLayer)return;null==u&&(u="");let c=null==t?t:String(t),d=null;""===i&&(d=g()),null===d&&(d=(0,r.zv)(i),""===u&&""!==n&&(u="true"===n.toLowerCase()?"Hot Deal":"Course")),dataLayer.push({event:"productImpression",eventLabel:c,ecommerce:{impressions:[{name:e,id:c,price:a,category:u,list:d,Dimension36:l,Dimension37:o,Dimension38:s,currencyCode:p()}]}})},ProductClick:function(e,t,a,n,o,s,u,c,d,h,f){if((0,r.Sb)())return;if(null==h&&(h=""),(""===d||null==d)&&(d=null),"u"<typeof dataLayer)return void y(d);let m=null;""===o&&(m=g()),null===m&&(m=(0,r.zv)(o),""===h&&""!==n&&((0,l.A)(n)?h="true"===n.toLowerCase()?"Hot Deal":"Course":(0,i.A)(n)&&(h=n?"Hot Deal":"Course")));try{var w=null===d;let n=f||p();v(t,m,[{item_name:e,item_id:t,price:function(e,t){if("string"!=typeof e||!t)return e;let a=e.trimEnd(),n=a.length-t.length;return n<=0||!/\s/.test(a.charAt(n-1))||a.slice(n).toUpperCase()!==t.toUpperCase()?e:a.slice(0,n).trimEnd()}(a,n),item_category:h,Dimension36:s,Dimension37:u,Dimension38:c,currency:n}],function(){w=!0,y(d)}),(0,r.wN)("referrer:",document.referrer),window.setTimeout(function(){w||y(d)},250)}catch(e){(0,r.wN)(e),y(d)}},ProductDetailsView:function(e,t,a,n,i,l,o){!(0,r.Sb)()&&"u">
3typeof dataLayer&&dataLayer.push({event:"productDetailView",eventLabel:t,ecommerce:{detail:{products:[{name:e,id:t,price:a,category:n,Dimension36:i,Dimension37:l,Dimension38:o,currencyCode:p()}]}}})},Purchase:function(e,t,a,n,i,l,o,s,u,c,d,h,f){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productPurchase",eventLabel:l,ecommerce:{purchase:{actionField:{id:e,revenue:t,tax:a,coupon:n},products:[{name:i,id:l,price:o,category:s,variant:u,Dimension36:c,Dimension37:d,Dimension38:h,quantity:f,currencyCode:p()}]}}})},PurchaseMultiProducts:function(e,t){if((0,r.Sb)()||"u"<typeof dataLayer)return;if(!(0,n.A)(t))return void(0,r.SS)(`Invalid argument: products 4 expected an array.`);let a=p();t.forEach(e=>{e.currencyCode=a}),dataLayer.push({event:"productPurchase",eventLabel:e.productId,ecommerce:{purchase:{actionField:e,products:t}}})},RemoveFromCart:function(e,t,a,n,i,l){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"removeFromCart",ecommerce:{remove:{products:[{name:e,id:t,price:a,originalPrice:n,category:"VIP",quantity:1,currencyCode:p()}]}}})},VipProductImpression:function(e,t,a,n,i){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productImpression",eventLabel:t,ecommerce:{impressions:[{name:e,id:t,price:a,category:n,list:i,currencyCode:p()}]}})},VipCheckoutStep1:function(e,t,a,n){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:1},products:[{name:e,id:t,price:a,category:n,quantity:1,currencyCode:p()}]}}})},VipProductClick:function(e,t,a,n,i){!(0,r.Sb)()&&"u">typeof dataLayer&&(v(t,i,[{item_name:e,item_id:t,price:a,item_category:n,currency:p()}]),dataLayer.push({event:"productClick",eventLabel:t,ecommerce:{click:{actionField:{list:i},products:[{name:e,id:t,price:a,category:n,currencyCode:p()}]}}}))},VipAddToCart:function(e,t,a,n,i,l,o){if(!(0,r.Sb)()&&"u">typeof dataLayer){(""===o||null==o)&&(o=null);try{let r=null===o;dataLayer.push({event:"addToCart",eventLabel:t,ecommerce:{add:{actionField:{list:l},products:[{name:e,id:t,price:a,originalPrice:n,category:i,currencyCode:p()}]}},eventCallback:function(){r=!0,null!==o&&(document.location=o)}}),window.setTimeout(function(){r||(window.location.href=o)},250)}catch(e){(0,r.wN)(e),null!==o&&(window.location.href=o)}}},VipCheckoutStep2:function(e,t,a,n){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:2},products:[{name:e,id:t,price:a,category:n,quantity:1,currencyCode:p()}]}}})},VipCheckoutStep3:function(e,t,a,n,i){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:3},products:[{name:e,id:t,price:a,originalPrice:n,category:i,quantity:1,currencyCode:p()}]}}})},VipCheckoutStep4:function(e,t,a,n,i){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productCheckout",eventLabel:t,ecommerce:{checkout:{actionField:{step:4},products:[{name:e,id:t,price:a,originalPrice:n,category:i,quantity:1,currencyCode:p()}]}}})},VipPurchase:function(e,t,a,n,i,l,o){!(0,r.Sb)()&&"u">typeof dataLayer&&dataLayer.push({event:"productPurchase",eventLabel:i,ecommerce:{purchase:{actionField:{id:e,revenue:t,tax:a},products:[{name:n,id:i,price:l,category:o,quantity:1,currencyCode:p()}]}}})}}}},5804(e,t,a){a.d(t,{CloseFederatedSearch:()=>f,NY:()=>p,VU:()=>d,ZS:()=>h,aS:()=>y,ho:()=>g,pE:()=>m});var n=a(8058),i=a(66401),l=a(21879),r=a(47344),o=a(84430),s=a(79162),u=a(1098);let c=/^[\d\D]+$/,d=(0,r.A)(function(){var e,t;let a=document.querySelector("#fedresults");(0,s.wN)("fedresults?:",+!!a);let n=searchController?searchController.GetRestoreFedSearchKey():null;if(n&&n.Location&&""!==n.Location&&a){let e=Array.from(document.querySelectorAll(".list-refined-items"));searchController.SetRefinedResultsDisplay(n,a,e)}let i=document.querySelector("#fedsearch");i&&(null!=(t=null==(e=null==i?void 0:i.nodeValue)?void 0:e.length)?t:0)>0?($(".federatedStepOne, .federatedStepThree").hide(),$(".federatedStepTwo").show(),i.dispatchEvent(new Event("keyup",{bubbles:!0,cancelable:!0}))):($(".filter-options-head-wrapper .reset-filters, .federatedStepTwo, .federatedStepThree").hide(),$(".filter-options-head-wrapper .search-modal-header").html("Search"),$(".federatedStepOne").show())});function h(){(0,o.Mr)("show-refine-search-clicked",null),$("#searchModal").hasClass("open")||(0,o.Mr)("open-federated-search",null),$(".federatedStepOne, .federatedStepTwo").hide(),$(".filter-options-head-wrapper .search-modal-header").html("Filters"),$(".federatedStepThree, .reset-filters").show(),$(".federatedStepOne").parents(".autocomplete-results").hide()}function f(){(0,o.Mr)("close-federated-search",null)}function m(e){let t=/\-/g;return(!(e.length>0)||!!c.test(e))&&(!(e.length>0)||null===e.match(t)||!(e.match(t).length>1))&&!0}function p(e){(0,i.A)(e)||(0,n.A)(e,function(e,t,a){var n;let i=$("div[data-facilityid='"+e.courseId+"'] div .course-features"),r=Number($("div[data-facilityid='"+e.courseId+"']").data("averagerating")),o=(0,u.Z5)()&&(0,l.A)(r)&&r>4.5,s=(0,u.Z5)()&&(null!=(n=e.roundsBooked)?n:0)>=5,c=e.hasSmartPlayTag,d=$("<span>",{class:"course-rating",html:'<i class="icon-Thumbs-Up-Filled text-lg"></i> Top Rated Course '}),h=$("<span>",{class:"course-rating",html:'<i class="icon-Booked hide text-lg"></i> Booked <strong>'+e.roundsBooked+"</strong> times today"}),f=$("<span>",{class:"course-rating",html:'<i class="icon-Mobile-Check-In text-lg"></i> Mobile Check-In'});if(i.length){let e,t=i.data("split");e=t?i.siblings(".course-rating").addClass("columns large-6").css("width","55%").end():i.siblings(".course-rating").addClass("course-rating-nc text-sm pr-3 text-primary w-full inline-block border-t border-gray-400").removeClass("course-rating").removeClass("large-7").addClass("large-6").empty().end(),c&&e.append(f.css(t?{"padding-right":"10px"}:{width:"100%"})),(0,u.Z5)()&&(o&&e.append(d),s&&e.append(h))}})}async function y(e,t){let[{default:n},{CallCenterMaskingModel:i}]=await Promise.all([Promise.all([a.e(46112),a.e(32287)]).then(a.bind(a,32287)),a.e(89436).then(a.bind(a,89436))]);return new n().toggleMasking(new i({agentEmail:e,isMasked:t}))}function g(e,t){var a;let n=null!=(a=null==t?void 0:t.toLowerCase())?a:"",i=!["ie","bm"].includes(n);
4e.forEach(e=>{var t;let a=e.nextElementSibling,l=null!=(t=null==a?void 0:a.textContent)?t:"";i?(e.setAttribute("required","true"),a&&l&&!l.includes("*")&&(a.textContent=l+"*")):(e.removeAttribute("required"),null==a||a.removeAttribute("aria-required"),a&&l.includes("*")&&(a.textContent=l.replace("*",""))),"us"===n?e.setAttribute("type","tel"):e.setAttribute("type","text")})}},1467(e,t,a){a.d(t,{$x:()=>V,C9:()=>R,FZ:()=>_,Gl:()=>X,Mv:()=>T,NT:()=>k,aX:()=>N,gY:()=>z,hR:()=>D,kG:()=>U,kY:()=>I,nv:()=>B,p5:()=>F,pf:()=>x,rM:()=>Z,rR:()=>q,sM:()=>j,tf:()=>Y,vz:()=>E,x2:()=>W,z_:()=>H});var n=a(74742),i=a(28511),l=a(99301),r=a(33259),o=a(86992),s=a(1098),u=a(16172),c=a(95413),d=a(2831),h=a(92488),f=a(10472),m=a(83802),p=a(47402),y=a(48497),g=a(88652),v=a(47039),w=a(99790),b=a(41394),S=a(6463),C=a(88398),P=a(90501),A=a(18064);let L="GolfNow.Web.Client.ActiveDate";function M(e=new Date){return(0,w.f)(e)||"string"!=typeof e||(e=(0,b.H)(e)),e}function O(e=new Date){return(0,S.o)(M(e))}Date.prototype.toShortDateString=function(){return(0,f.GP)(this,"MM/dd/yyyy")},String.prototype.padLeft=function(e,t){let a=this.toString();for(;a.length<t;)a=e+a;return a},Date.prototype.toCommentDateString=function(){let e=this.getHours(),t=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"][this.getDay()],a=["January","February","March","April","May","June","July","August","September","October","November","December"][this.getMonth()],n=this.getDate().toString().padLeft("0",2),i=this.getFullYear()+1900,l=(e>12?e-12:e).toString().padLeft("0",2),r=this.getMinutes().toString().padLeft("0",2),o=e>11?"PM":"AM";return`${t}, ${a} ${n}, ${i} at ${l}:${r} ${o}`},Date.prototype.toDateDisplayString=function(e=!0){if(!(0,w.f)(this)){let t=new Date;return e?(0,s.uY)()?(0,f.GP)(t,(0,i.IL)()):(0,f.GP)(t,(0,i.wi)()):(0,f.GP)(t,"MMM dd yyyy")}if(!e)return(0,f.GP)(this,"MMM dd yyyy");if((0,s.uY)())return(0,f.GP)(this,(0,i.IL)());let t=(0,i.wi)();return(0,f.GP)(this,t)};let D=M,T=O,k=g.r,F=u.f,N=c.e,E=(e=!1)=>e?[2,3,4,5,6]:[],R=e=>(0,v.c)(O(e)),I=(e,t)=>(e=O(e),t=O(t),(0,d.m)(t,e)),x=e=>{let t=(0,S.o)(new Date),a=O(e),n=(0,d.m)(a,t);return n<0?7:n},G=/^\/Date\((-?\d+)([+-]\d{4})?\)\/$/,_=e=>{let t,a=G.exec(e);return new Date((t=new Date(a&&a[1]?parseInt(a[1],10):e)).getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()).getTime()},U=e=>{let t=(0,S.o)(new Date),a=O(e);return(0,d.m)(a,t)},j=e=>{if(!e)return!1;let t=(0,S.o)(new Date),a=O(e);return(0,p.d)(a,t)},H=e=>{let t=(0,S.o)(new Date),a=O(e);return(0,m.B)(t,a,{addSuffix:!0})},B=async e=>{var t;let a=V(),i=new Date,l=O(new Date(a)),s=O(),c=l;try{await (0,A.X)()}catch(e){return(0,n.SS)("Sunset calculation unavailable:",e),c}let f=null==(t=(0,o.getPageLocationCoordinator)())?void 0:t.getActiveLocation().location;if(f&&(0,r.isValidCoordinate)(f.Latitude)&&(0,r.isValidCoordinate)(f.Longitude)&&(0,g.r)(l,s)){let t=SunCalc.getTimes(i,f.Latitude,f.Longitude),a=O(t.sunset);if((0,d.m)(a,s)>0)return c=(0,S.o)((0,u.f)(i,1)),(0,n.wN)("New Sunset Date::",c),(0,P.Mr)("location_sunset_active_date_changed",c),c;(0,h.b)(t.sunset,i)<36e5*e&&(c=(0,S.o)((0,u.f)(i,1)),(0,n.wN)("New Sunset Date::",c),(0,P.Mr)("location_sunset_active_date_changed",c))}return c},q=e=>{if(document.prerendering)return;if(null===e)return void(0,l.EZ)(L,null);let t=e.toShortDateString(),a=C.b.HOURS_24;(0,l.EZ)(L,t,a)},V=(e=!1)=>{let t=T(new Date),a=(0,l.IR)(L),n=null===a||""===a?null:new Date(a);return(null===n||null!==n&&(0,y.Y)(n,t))&&(n=t),n.toDateDisplayString(e)},z=e=>e?e.toShortDateString():"",W=e=>e?e.toShortDateString():"",X=(e,t="EEE, MMM dd",a=new Date)=>(null===e&&(e=a),""===t&&(t="EEE, MMM dd"),(0,f.GP)(e,t)),Y=(e,t)=>e&&t?new Date(e,t,0).getDate():31,Z=(e,t)=>{let a=Y(e,t),n=[];for(let e=1;e<=a;e++)n.push(e);return n}},28511(e,t,a){function n(){return"EEE, MMM dd"}function i(){return"ddd, mmm dd"}function l(){return"EEE, MMM d"}a.d(t,{IL:()=>l,OC:()=>i,wi:()=>n})},64019(e,t,a){a.d(t,{NZ:()=>b,Tn:()=>D,mv:()=>T,PP:()=>C,_y:()=>w,xX:()=>P,JH:()=>E,JO:()=>L,vh:()=>A,aD:()=>k,Pq:()=>F,cX:()=>R,Xn:()=>S,te:()=>O,rE:()=>N,v1:()=>M,XT:()=>u});var n=a(66401),i=a(99301),l=a(89906),r=a(79162);let o={GNUS:{city:"Orlando",state:"FL",country:"US",lat:28.5383355,long:-81.37923649999999},GNUK:{city:"London",state:"England",country:"GB",lat:51.50859,long:-.125649},GNEU:{city:"Paris",state:"France",country:"FR",lat:48.8589384,long:2.2646349},GNAU:{city:"Brisbane",state:"Queensland",country:"AU",lat:-27.470125,long:153.021072},TOFF:{city:"Orlando",state:"FL",country:"US",lat:28.5383355,long:-81.37923649999999}};function s(e){let t=o[e.toUpperCase()];return t?Object.assign({},t):void 0}let u=null,c=null;function d(){try{return u}catch{return null}}function h(e){try{u=e}catch{}}function f(){return{domain:"golfnow.com",location:s("GNUS"),cookiePolicy:!0,golferCares:{phone:"1-800-767-3574",hours:"8AM - 5PM EST"},bookingCenter:{phone:"1-800-767-3574",hours:"8AM - 5PM EST"},vipPhone:"1-833-GolfVIP",locale:"en-US",pmpReportSettings:{enabled:!0,sessionDuration:1440,batchInterval:2}}}function m(...e){try{(0,r.SS)(...e)}catch{}}let p=[{domain:"demo.golfnow.com",location:s("GNUS"),cookiePolicy:!0,golferCares:{phone:"1-800-767-3574",hours:"8AM - 5PM ET"},bookingCenter:{phone:"1-800-767-3574",hours:"8AM - 5PM ET"},vipPhone:"1-833-GolfVIP",locale:"en-US",pmpReportSettings:{enabled:!0,sessionDuration:1440,batchInterval:2}},{domain:"golfnow.co.uk",location:s("GNUK"),cookiePolicy:!0,golferCares:{phone:"UK Phone: +44 28 9568 0287 or IE Phone: +353 1800 852 936",hours:"9AM - 5PM"},bookingCenter:{phone:"UK Phone: +44 28 9568 0287 or IE Phone: +353 1800 852 936",hours:"9AM - 5PM"},vipPhone:"",locale:"en-GB",pmpReportSettings:{enabled:!0,sessionDuration:1440,batchInterval:2}},{domain:"golfnow.eu",location:s("GNEU"),cookiePolicy:!0,golferCares:{phone:"UK Phone: +44 28 9568 0287 or IE Phone: +353 1800 852 936",hours:"9AM - 5PM"},bookingCenter:{phone:"UK Phone: +44 28 9568 0287 or IE Phone: +353 1800 852 936",hours:"9AM - 5PM"},vipPhone:"",locale:"en-FR",pmpReportSettings:{enabled:!0,sessionDuration:1440,batchInterval:2}},{domain:"golfnow.com.au",location:s("GNAU"),cookiePolicy:!0,golferCares:{phone:"+61 1800 942 929",hours:"9AM - 5PM AET - Mon - Fri"},bookingCenter:{phone:"+61 1800 942 929",hours:"9AM - 5PM AET - Mon - Fri"},vipPhone:"",locale:"en-AU",pmpReportSettings:{enabled:!0,sessionDuration:1440,batchInterval:2}},{domain:"teeoff.com",location:s("TOFF"),cookiePolicy:!0,golferCares:{phone:"1-855-383-3633",hours:"8AM - 5PM ET"},bookingCenter:{phone:"1-855-383-3633",hours:"8AM - 5PM ET"},vipPhone:"1-855-383-3633",locale:"en-US",pmpReportSettings:{enabled:!0,sessionDuration:1440,batchInterval:2}}],y=f();function g(){try{return y}catch{return f()}}async function v(){let e="GolfNow.Web.SiteSettings",t=d();if(t)return t;let a=await (0,i.qy)(e);return a?(!function(...e){try{(0,r.wN)(...e)}catch{}}("Resolved site setting from cache"),h(a),a):(null!=c||(c=(async()=>{var t,a,r,o,s,u=function(){var e,t,a,i;let l=d();try{let n=location.hostname.toLocaleLowerCase();if(null===l||-1===n.indexOf(null!=(e=null==l?void 0:l.domain)?e:"")){for(let e=0;e<p.length;e++)if(n.indexOf(null!=(a=null==(t=p[e])?void 0:t.domain)?a:"")>-1){l=null!=(i=p[e])?i:f();break}}}catch{return f()}return(null===l||(0,n.A)(l))&&(l=f()),l}();try{y=u}catch{}let c=g(),v="",w="https://www."+c.domain;/promotions|blog|travel|tournaments|concierge|news|base|origin-base|memberships/.test(location.hostname)&&(v=w.substring(8).lastIndexOf("/")>-1?w.substring(0,w.length-1):w);let b=new l.A(v);try{let n=await b.getSiteSettings();if(!n||"object"!=typeof n)return h(c),await (0,i.ty)(e,c,null).cat
4ch(e=>m("Failed to write fallback site settings to session storage: ",e)),c;let l=n.domain,u="string"==typeof l&&""!==l.trim()?l.trim().toLowerCase():null,d=[f(),...p],y=u?null!=(t=d.find(e=>u===e.domain))?t:d.reduce((e,t)=>{var a;return u.endsWith("."+t.domain)&&t.domain.length>(null!=(a=null==e?void 0:e.domain.length)?a:0)?t:e},null):null,g=null!=y?y:c,v=Object.assign(Object.assign(Object.assign({},g),n),{domain:null!=u?u:g.domain,location:Object.assign(Object.assign({},g.location),null!=(a=n.location)?a:{}),golferCares:Object.assign(Object.assign({},g.golferCares),null!=(r=n.golferCares)?r:{}),bookingCenter:Object.assign(Object.assign({},g.bookingCenter),null!=(o=n.bookingCenter)?o:{}),pmpReportSettings:Object.assign(Object.assign({},g.pmpReportSettings),null!=(s=n.pmpReportSettings)?s:{})});return await (0,i.ty)(e,v,null).catch(e=>m("Failed to write site settings to session storage: ",e)),h(v),v}catch(a){m("Failed settingsRequest: ",a);let t=g();return(0,i.ty)(e,t,null).catch(e=>m("Failed to write fallback site settings to session storage: ",e)),h(t),t}})()),c)}async function w(){var e,t,a,n,i,l,r,o,s,u,c,d;let h=await v(),f=g();return{latitude:null!=(t=null==(e=h.location)?void 0:e.lat)?t:f.location.lat,longitude:null!=(l=null!=(n=null==(a=h.location)?void 0:a.lng)?n:null==(i=h.location)?void 0:i.long)?l:f.location.long,city:null!=(o=null==(r=h.location)?void 0:r.city)?o:f.location.city,state:null!=(u=null==(s=h.location)?void 0:s.state)?u:f.location.state,country:null!=(d=null==(c=h.location)?void 0:c.country)?d:f.location.country}}async function b(){let e=await v();return null!==e&&e.hasOwnProperty("bookingCenter")&&e.bookingCenter?e.bookingCenter.phone:g().bookingCenter.phone}async function S(){let e=await v();return null!==e&&e.hasOwnProperty("pmpReportSettings")&&e.pmpReportSettings?e.pmpReportSettings:g().pmpReportSettings}function C(){var e;return null==(e=d())?void 0:e.domain}async function P(){var e;return null!=(e=(await v()).hoursToSunset)?e:4}async function A(){return(await v()).interstitialInactiveDaysLater}async function L(){return(await v()).interstitialInactiveDaysExit}async function M(){var e;return null!=(e=(await v()).tmplVersionKey)?e:""}async function O(){return(await v()).privateCoursesFormUrl}async function D(){return(await v()).clubChampionFormUrl}async function T(){return(await v()).golftecFormUrl}async function k(){return(await v()).nonRefundableModalCopy}async function F(){return(await v()).nonRefundableModalTitle}async function N(){var e;return null!=(e=(await v()).siteDisplayName)?e:"GolfNow"}async function E(){let e=await v();return e.radius_CourseViewDefault&&(0,r.OV)(e.radius_CourseViewDefault),e.radius_ListViewDefault&&(0,r.jQ)(e.radius_ListViewDefault),e}async function R(){return(await v()).offplatformCopy}},90501(e,t,a){a.d(t,{Mr:()=>r,Up:()=>l});let n=function(e,t){null!==window.parent&&(null==(t=t||window.parent)||t.postMessage(e,"*"))},i=null;function l(e){i=e}function r(e,t=null){amplify.publish(e,t),null!==t&&i&&t instanceof i||n(JSON.stringify({message:e,data:t}))}},1098(e,t,a){a.d(t,{SA:()=>l,Z5:()=>r,uY:()=>i,zE:()=>o});let n={small_only:"only screen and (max-width: 46rem)",small_up:"only screen and (min-width: 47rem)",medium_only:"only screen and (min-width: 46.0625rem) and (max-width: 64rem)",medium_up:"only screen and (min-width: 46.0625rem)",large_only:"only screen and (min-width: 64.0625rem) and (max-width: 90rem)",large_up:"only screen and (min-width: 64.0625rem)",xlarge_only:"only screen and (min-width: 90.0625rem) and (max-width: 120rem)",xlarge_up:"only screen and (min-width: 90.0625rem)",xxlarge_only:"only screen and (min-width:90.0625rem) and (min-width: 120rem)",xxlarge_up:"only screen and (min-width: 120.0625rem)"};function i(){var e,t;return!("u"<typeof window)&&!!window.matchMedia&&null!=(t=null==(e=window.matchMedia(n.small_only))?void 0:e.matches)&&t}function l(){var e,t;return!("u"<typeof window)&&!!window.matchMedia&&null!=(t=null==(e=window.matchMedia(n.medium_only))?void 0:e.matches)&&t}function r(){var e,t;return!("u"<typeof window)&&!!window.matchMedia&&null!=(t=null==(e=window.matchMedia(n.medium_up))?void 0:e.matches)&&t}function o(){var e,t;
4return!("u"<typeof window)&&!!window.matchMedia&&null!=(t=null==(e=window.matchMedia(n.large_up))?void 0:e.matches)&&t}a.d(t,["H5",0,n])},46874(e,t,a){function n(e){try{let t=new URL(window.location.href),a=new URL(e,t);if(a.origin!==t.origin||"http:"!==a.protocol&&"https:"!==a.protocol)return t.href;return a.href}catch{return e}}function i(e,t,a){history.pushState(e,t,n(a))}function l(e,t,a){history.replaceState(e,t,n(a))}a.d(t,{G:()=>i,n:()=>l})},22842(e,t,a){a.d(t,{AA:()=>h,hZ:()=>d});var n=a(99301),i=a(89906);let l=[],r=!1,o=new i.A,s="GolfNow.Web.Resources",u=async function(e,t){if(!t)return l[e]=[],l[e];l[e]=t.map(e=>{var t={};return e.key&&(t[e.key.toLowerCase()]=e.value),t});let a=await (0,n.qy)(s);return null!==a&&(l=Object.assign(Object.assign({},l),a)),await (0,n.ty)(s,l,null),l[e]};class c{constructor(e){Object.defineProperty(this,"resources",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.resources=e}getResources(){return this.resources}setResources(e){this.resources=e}getString(e){let t;for(let a of this.resources)if(a.hasOwnProperty(e.toLowerCase())){t=a[e.toLowerCase()];break}return t}}async function d(e){var t;let a=await (0,n.qy)(s),i=null!==a&&(null!=(t=a[e])?t:null)!==null;if(i)return new c(a[e]);if(i||r)if(!i&&r)return await new Promise(e=>setTimeout(e,100)),d(e);else return new c([]);{r=!0;let t=await o.getLocalizationByResource(e);var l=await u(e,t);return r=!1,new c(l)}}async function h(e,t){return(await d(e)).getString(t)}},92770(e,t,a){function n(e){var t;if(e.Formatted_Address)return{Address:e.Formatted_Address,Address2:e.Formatted_Address};let a=null==(t=e.Country)?void 0:t.toUpperCase(),n=("US"===a||"CA"===a?[e.City,e.State,e.PostalCode]:[e.City,e.PostalCode]).filter(e=>!!e).join(", ");return{Address:n&&a?`${n}, ${a}`:n,Address2:n}}function i(e,t){return`${e.toFixed(4)}, ${t.toFixed(4)}`}function l(e,t,a){return e.Address||n(e).Address||i(t,a)}a.d(t,{bG:()=>n,in:()=>l,jv:()=>i})},86992(e,t,a){a.r(t),a.d(t,{ReplaceLocationCoordinates:()=>d,getPageLocationCoordinator:()=>f,initialize:()=>h});var n=a(33259),i=a(92770),l=a(38342),r=a(48497),o=a(84430),s=a(46874);let u=Symbol.for("GolfNow.CoreWeb.PageLocationCoordinator"),c=Symbol.for("GolfNow.CoreWeb.PageLocationCoordinator.initPromise");function d(e,t){var a;let n=window.location.hash;if(!n)return;let i=n.startsWith("#")?n.slice(1):n;if(!i)return;let l=new URLSearchParams(i);if(!l.has("latitude")||!l.has("longitude"))return;l.set("latitude",String(e)),l.set("longitude",String(t));let r="#"+l.toString();(0,s.n)(null!=(a=history.state)?a:null,"",r)}function h(){let e=globalThis,t=globalThis,a=e[u];if(null!=a)return Promise.resolve(a.getActiveLocation());let s=t[c];if(null!=s)return s;let h=(async()=>{let a={activeResolved:null,revision:0,pageReady:!1,attemptMade:!1,evaluationQueued:!1,evaluationInFlight:!1,consumers:new Map,subscribers:new Set};function s(e){a.activeResolved=e;let t=e.location;null!=t.Latitude&&null!=t.Longitude&&d(t.Latitude,t.Longitude),Promise.allSettled(Array.from(a.consumers.values()).map(e=>Promise.resolve().then(()=>e.refresh())));a.revision+=1;let n=Object.assign(Object.assign({},e),{revision:a.revision});for(let e of a.subscribers)try{e(n)}catch{}(0,o.Mr)("user-location-changed",e.location)}function h(){if(!a.pageReady||a.attemptMade)return!1;let e=!1;for(let t of a.consumers.values())if(t.started){e=!0;break}if(!e)return!1;for(let e of a.consumers.values())if(e.started&&!e.settled)return!1;return!0}async function f(){var e;if(a.evaluationQueued=!1,!a.evaluationInFlight){a.evaluationInFlight=!0;try{if(!h())return;if(null===a.activeResolved){let e=await (0,n.resolveInitialLocation)();null===a.activeResolved&&(a.activeResolved=e)}{let e=a.activeResolved.source;if("profile"===e||"explicit-override"===e||"live"===e)return}{let e=await (0,n.getLastLocationCheck)();if(null!==e){let t=(0,l.z)(new Date(e),n.LOCATION_CHECK_TTL_MINUTES);if((0,r.Y)(new Date,t))return}}let t=globalThis.navigator;if((null==(e=null==t?void 0:t.permissions)?void 0:e.query)!=null){try{let e=await t.permissions.query({name:"geolocation"});if("denied"===e.state)return}catch{}if(!h())return}a.attemptMade=!0;try{let e=await (0,n.requestBrowserLocation)(),t=e;
4try{let a=await (0,n.lazyGetGeographicDetails)(e.Latitude,e.Longitude);if(a){let{Address:n,Address2:l}=(0,i.bG)(a);t=Object.assign(Object.assign({},e),{City:a.City,State:a.State,PostalCode:a.PostalCode,Country:a.Country,Address:n,Address2:l})}}catch{}let a={source:"live",location:t};await (0,n.persistLiveLocation)(t),await (0,n.setLastLocationCheck)(Date.now()),s(a)}catch(e){(0,n.isAnsweredGeolocationDenial)(e)&&await (0,n.setLastLocationCheck)(Date.now())}}finally{a.evaluationInFlight=!1,a.evaluationQueued&&(a.evaluationQueued=!1,f())}}}function m(){if(a.evaluationInFlight){a.evaluationQueued=!0;return}a.evaluationQueued||(a.evaluationQueued=!0,Promise.resolve().then(()=>f()))}let p=await (0,n.resolveInitialLocation)();return a.activeResolved=p,e[u]={getActiveLocation(){if(null===a.activeResolved)throw Error("LocationCoordinator: getActiveLocation() called before initialize() resolved");return a.activeResolved},getRevision:()=>a.revision,registerConsumer(e,t){let n=Symbol(e);return a.consumers.set(n,{name:e,refresh:t,started:!1,settled:!1}),n},unregisterConsumer(e){a.consumers.delete(e),m()},markInitialRequestStarted(e){let t=a.consumers.get(e);t&&(t.started=!0)},markInitialRequestSettled(e,t){let n=a.consumers.get(e);n&&(n.settled=!0),m()},markPageReady(){a.pageReady||(a.pageReady=!0,m())},subscribe:e=>(a.subscribers.add(e),()=>{a.subscribers.delete(e)}),async setExplicitOverride(e){await (0,n.persistExplicitOverride)(e),s({source:"explicit-override",location:e})},async clearOverrideToProfile(){await (0,n.clearExplicitOverride)(),s(await (0,n.resolveInitialLocation)())}},t[c]=void 0,p})();return t[c]=h,h}function f(){var e;return null!=(e=globalThis[u])?e:null}},33259(e,t,a){a.r(t),a.d(t,{Address:()=>eo,Address_City:()=>eg,CalculateRadius:()=>ev,CalculateRadius_v2:()=>ey,City:()=>ec,Country:()=>es,GeoCoordinates:()=>eu,GeoPlacesLookupAsync:()=>eS,GetCurrentPosition:()=>eC,GetGeographicDetails:()=>ew,GetGeographicDetails2:()=>eb,HasGPS:()=>eP,LOCATION_CHECK_TTL_MINUTES:()=>x,LocateMe:()=>ee,LocationData:()=>eh,OffMessage:()=>eA,OnMessage:()=>eL,PostalCode:()=>ed,SetUsersLocation:()=>ei,State:()=>er,Status:()=>el,StatusCodes:()=>i,UpdateUsersLocation:()=>J,clearExplicitOverride:()=>W,getLastLocationCheck:()=>B,initializeDefaultGeo:()=>F,isAnsweredGeolocationDenial:()=>Y,isValidCoordinate:()=>R,lazyGetGeographicDetails:()=>E,persistExplicitOverride:()=>z,persistLiveLocation:()=>V,requestBrowserLocation:()=>X,resolveInitialLocation:()=>H,setLastLocationCheck:()=>q});var n,i,l=a(66401),r=a(89610),o=a(47344),s=a(38342),u=a(48497),c=a(99301),d=a(74742),h=a(79162),f=a(64019),m=a(11300),p=a(92770),y=a(41399),g=a(76755);let v=globalThis,w=null,b=null,S=new g.A("string"==typeof v.topDomainAssetPrefix?v.topDomainAssetPrefix:void 0);(n=i||(i={}))[n.NOT_ASKED=0]="NOT_ASKED",n[n.SVC_ON_DENIED=1]="SVC_ON_DENIED",n[n.SVC_OFF_UNAVAILABLE=2]="SVC_OFF_UNAVAILABLE",n[n.SVC_ON_TIMEOUT=3]="SVC_ON_TIMEOUT",n[n.SVC_ON_ALLOWED=4]="SVC_ON_ALLOWED",n[n.NO_GPS=5]="NO_GPS",n[n.MANUAL_LOCATION_SETTING=6]="MANUAL_LOCATION_SETTING",(async()=>{try{await F(),(0,d.wN)("Default geo initialized on module load")}catch(e){(0,d.wN)("Failed to initialize default geo on module load:",e)}})();let C="GolfNow.Web.Client.CurrentPosition",P="GolfNow.Web.Client.LivePosition",A="GolfNow.Web.Client.ExplicitOverride",L="GolfNow.Web.Client.LastLocationCheck",M="GolfNow.Web.Client.LastLegacyLocationCheck",O="Find tee times near you",D="Help us find tee times near you",T={timeout:900,enableHighAccuracy:!1,maximumAge:18e5},k={timeout:6e4,enableHighAccuracy:!1,maximumAge:18e5};async function F(){return null===w&&(w=await em()),b=N(w,i.NOT_ASKED),w}function N(e,t){var a,n,i;let l={City:e.city,State:e.state,Country:e.country},{Address:r,Address2:o}=(0,p.bG)(l),s=(0,p.in)(l,e.latitude,e.longitude);return{Latitude:e.latitude,Longitude:e.longitude,City:null!=(a=e.city)?a:"",State:null!=(n=e.state)?n:"",Country:null!=(i=e.country)?i:"",Address:r||s,Address2:o||s,Status:{code:t,message:O}}}let E=(0,h.g5)(ep,150);function R(e){return null!=e&&isFinite(e)}function I(){let e="u">typeof __CLIENT_LOCATION_CONTEXT__?__CLIENT_LOCATION_CONTEXT__:void 0;return null!=e?e:{isAuthenticated:!1,profile:{isValid:!1,latitude:null,longitude:null,city:null,state:null,country:null}}}let x=120;async function G(){let e=[await (0,c.qy)(L),await (0,c.qy)(M)].filter(e=>"number"==typeof e);if(!e.length)return!1;let t=(0,s.z)(new Date(Math.max(...e)),x);return(0,u.Y)(new Date,t)}function _(e,t){return`GolfNow.Web.Client.ProfileGeoLabel.${e.toFixed(4)},${t.toFixed(4)}`}let U=new Set;async function j(e,t,a,n,i){let l,r;if(a||n||i)return{City:null!=a?a:"",State:null!=n?n:"",Country:null!=i?i:""};let o=await (0,c.qy)(_(e,t));if(null==o?void 0:o.Address)return o;l=_(e,t),U.has(l)||(U.add(l),(async()=>{var a,n,i,r;try{let o=await E(e,t);if(!(null==o?void 0:o.City)&&!(null==o?void 0:o.State)&&!(null==o?void 0:o.Country))return;let{Address:s,Address2:u}=(0,p.bG)(o);if(!s)return;(0,c.HI)(l,{City:null!=(a=o.City)?a:"",State:null!=(n=o.State)?n:"",Country:null!=(i=o.Country)?i:"",PostalCode:null!=(r=o.PostalCode)?r:"",Address:s,Address2:null!=u?u:s})}catch(e){(0,d.wN)("backfillProfileGeoLabel failed",e)}})());let s="string"==typeof(null==(r=v.siteAppVM)?void 0:r.profileZipCode)?r.profileZipCode.trim():"";if(s)return{City:"",State:"",Country:"",PostalCode:s,Address:s,Address2:s};let u=(0,p.jv)(e,t);return{City:"",State:"",Country:"",Address:u,Address2:u}}async function H(){var e,t,a,n,l;let r=I(),o=await (0,f._y)(),s=await (0,c.qy)(A);if(R(null==s?void 0:s.Latitude)&&R(null==s?void 0:s.Longitude))return{source:"explicit-override",location:s};let u=await (0,c.qy)(C);if((null==(e=null==u?void 0:u.Status)?void 0:e.code)===i.MANUAL_LOCATION_
4SETTING&&R(null==u?void 0:u.Latitude)&&R(null==u?void 0:u.Longitude))return{source:"explicit-override",location:u};if(r.isAuthenticated&&!0===r.profile.isValid&&R(r.profile.latitude)&&R(r.profile.longitude)){let e=await j(r.profile.latitude,r.profile.longitude,null!=(t=r.profile.city)?t:null,null!=(a=r.profile.state)?a:null,null!=(n=r.profile.country)?n:null);return{source:"profile",location:Object.assign(Object.assign({Latitude:r.profile.latitude,Longitude:r.profile.longitude},e),{Status:{code:i.SVC_ON_ALLOWED,message:O}})}}if(await G()){let e=await (0,c.qy)(P);if(R(null==e?void 0:e.Latitude)&&R(null==e?void 0:e.Longitude))return{source:"live",location:e};if((null==(l=null==u?void 0:u.Status)?void 0:l.code)===i.SVC_ON_ALLOWED&&R(null==u?void 0:u.Latitude)&&R(null==u?void 0:u.Longitude))return{source:"live",location:u}}return{source:"tenant-default",location:{Latitude:o.latitude,Longitude:o.longitude,City:o.city,State:o.state,Country:o.country,Status:{code:i.NOT_ASKED,message:O}}}}async function B(){return(0,c.qy)(L)}async function q(e){await (0,c.EZ)(L,e)}async function V(e){await (0,c.EZ)(P,e,2592e6),await (0,c.EZ)(L,Date.now())}async function z(e){await (0,c.EZ)(A,e,2592e6)}async function W(){await (0,c.EZ)(A,null)}function X(){return new Promise((e,t)=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(t=>{e({Latitude:t.coords.latitude,Longitude:t.coords.longitude,Status:{code:i.SVC_ON_ALLOWED,message:O}})},e=>{t(e)},k):t({code:i.NO_GPS,message:"Geolocation is not supported"})})}function Y(e){return"number"==typeof(null==e?void 0:e.code)&&1===e.code}let Z={},K=0,Q=(0,o.A)(ee);function J(e=!1){e&&((0,c.ay)(L,null,!0),(0,c.ay)(M,null,!0),(0,c.ay)(C,null,!0)),Q(!0,function(){},function(){})}async function ee(e,t,a,n=!1){var l,o;if(isAuthenticated){Z=N(await F(),i.NOT_ASKED),await (0,c.EZ)(C,Z),(0,r.A)(t)&&t(Z);return}let h=setTimeout(async()=>{await ea({code:3,message:D},a),(0,d.wN)("LocateMe time out")},4500);Z=await (0,c.qy)(C);let f=[await (0,c.qy)(L),await (0,c.qy)(M)].filter(e=>"number"==typeof e),m=f.length?Math.max(...f):null;if(null!==m){let t=new Date(m);if(t){let a=(0,s.z)(t,120);(0,u.Y)(new Date,a)&&null!==Z&&(e=!1)}}Z||(e=!0),e&&(null==(l=null==Z?void 0:Z.Status)?void 0:l.code)!==6||n?navigator.geolocation?(await (0,c.EZ)(M,Date.now()),navigator.geolocation.getCurrentPosition(async function(e){clearTimeout(h),await et(e,t),(0,d.wN)(e.coords.latitude+"::"+e.coords.longitude+"::W3C Navigator")},async function(e){var t,n;clearTimeout(h),(0,d.wN)((e.message||"Unavailable")+":: W3C Navigator"),(0,d.wN)("forcing default: "+(null!=(t=null==w?void 0:w.latitude)?t:0)+"::"+(null!=(n=null==w?void 0:w.longitude)?n:0)+"::W3C Navigator"),await ea(e,a)},T)):(clearTimeout(h),(0,d.wN)("No Geo available :: W3C Navigator"),await ea({code:5},a)):(clearTimeout(h),(null==Z?void 0:Z.Latitude)&&(null==Z?void 0:Z.Longitude)?(Z.Status=Z.Status||{code:0},Z.Status.message=Z.Status.message&&Z.Status.message!==D?Z.Status.message:O,K=null!=(o=Z.Status.code)?o:0,Z.Address&&Z.City||et({latitude:Z.Latitude,longitude:Z.Longitude,accuracy:0,altitude:0,altitudeAccuracy:0,heading:0,speed:0},t),await (0,c.EZ)(C,Z),(0,r.A)(t)&&t(Z),(0,d.wN)(Z.Latitude+"::"+Z.Longitude+"::Location Cache")):await ea({code:0},a))}async function et(e,t){var a,n,i,l;K=4,(Z=Z||{}).Status=Z.Status||{},Z.Latitude=null==(a=e.coords)?void 0:a.latitude,Z.Longitude=null==(n=e.coords)?void 0:n.longitude,Z.Status.message=O,Z.Status.code=K;let o=Z,s=await E(null==(i=e.coords)?void 0:i.latitude,null==(l=e.coords)?void 0:l.longitude);s&&(null!=s.Status||(s.Status=null==o?void 0:o.Status),o=await en(s)),(0,r.A)(t)&&t(o)}async function ea(e,t){var a;if((Z=null!=Z?Z:{}).Status=null!=(a=Z.Status)?a:{},Z.Status.message=Z.City?"Search Near "+Z.City:D,(0,d.wN)(e.code),e.code,K=e.code,Z.Status.code=K,!Z.Latitude&&!Z.Longitude){if(w){let{Latitude:e,Longitude:t,City:a,State:n,Country:i,Address:l,Address2:r}=N(w,K);Object.assign(Z,{Latitude:e,Longitude:t,City:a,State:n,Country:i,Address:l,Address2:r})}let e=Z,a=await E(Z.Latitude,Z.Longitude);a&&(null!=a.Status||(a.Status=null==e?void 0:e.Status),e=await en(a)),(0,r.A)(t)&&t(e);return}(0,r.A)(t)&&t(Z)}async function en(e){var t,a,n,i;(Z=null!=(t=null!=Z?Z:await (0,c.qy)(C))?t:{}).City&&(null==(a=Z.Status)?void 0:a.message)&&(null==(n=Z.Status)?void 0:n.code)?[0,4,6].includes(null==(i=Z.Status)?void 0:i.code)?Z.Status.message!==O&&(Z.Status.message=O):Z.Status&&Z.Status.message!=="Search Near "+e.City&&(Z.Status.message="Search Near "+e.City):Z.Status={code:0,message:O},Z.Country=e.Country,Z.City=e.City,Z.State=e.State,Z.PostalCode=e.PostalCode,e.Latitude&&(Z.Latitude=e.Latitude),e.Longitude&&(Z.Longitude=e.Longitude);let{Address:l,Address2:r}=(0,p.bG)(e);return Z.Address=l,Z.Address2=r,await (0,c.EZ)(C,Z),Z}async function ei(e,t){let a=Z;e&&(a=await en(e)),a&&t(a)}function el(e=!1){return new Promise((t,a)=>{let n=e=>{e.Status?t(e.Status):a(Error("Unable to get location status"))};ee(e,n,n)})}async function er(){var e;return((0,l.A)(Z)&&(Z=await (0,c.qy)(C)),!(0,l.A)(Z)&&Z.State)?Z.State:null!=(e=null==w?void 0:w.state)?e:""}async function eo(){if((0,l.A)(Z)&&(Z=await (0,c.qy)(C)),!(0,l.A)(Z)&&(null==Z?void 0:Z.Address))return Z.Address;{let e=function(e){!(0,l.A)(e)&&(null==e?void 0:e.Address)&&(Z=Object.assign(Object.assign({},Z||{}),e))};return(await ee(!1,e,e),(0,l.A)(Z)&&(Z=await (0,c.qy)(C)),!(0,l.A)(Z)&&(null==Z?void 0:Z.Address))?Z.Address:""}}async function es(){var e;return((0,l.A)(Z)&&(Z=await (0,c.qy)(C)),!(0,l.A)(Z)&&Z.Country)?Z.C
4ountry:null!=(e=null==w?void 0:w.country)?e:""}async function eu(){var e,t;return((0,l.A)(Z)&&(Z=await (0,c.qy)(C)),!(0,l.A)(Z)&&Z.Latitude&&Z.Longitude)?{Lat:Z.Latitude,Long:Z.Longitude}:{Lat:null!=(e=null==w?void 0:w.latitude)?e:0,Long:null!=(t=null==w?void 0:w.longitude)?t:0}}async function ec(){var e;if((0,l.A)(Z)&&(Z=await (0,c.qy)(C)),!(0,l.A)(Z)&&Z.City)return Z.City;if(!Z||(0,l.A)(Z)||!Z.Address)return null!=(e=null==w?void 0:w.city)?e:"";if("US"!==Z.Country&&"CA"!==Z.Country)return Z.Address;{let e=Z.Address,t=Z.Address.indexOf(",");return t>-1&&(e=Z.Address.substring(0,t)),e}}async function ed(){if((0,l.A)(Z)&&(Z=await (0,c.qy)(C)),!(0,l.A)(Z)&&Z.PostalCode)return Z.PostalCode;throw Error("PostalCode not found")}async function eh(){return isAuthenticated?N(await F(),i.NOT_ASKED):((0,l.A)(Z)&&(Z=await (0,c.qy)(C)),(0,l.A)(Z))?b:Z}async function ef(e,t){var a;(0,d.wN)("GeoPlacesLookup",e,t);let n="",i=await E(e,t);return i&&i.Formatted_Address?n=i.Formatted_Address:(null==i?void 0:i.Country)&&"us"===i.Country.toLowerCase()||(null==i?void 0:i.Country)&&"ca"===i.Country.toLowerCase()?(i.City&&(n+=i.City),i.State&&(n.length>0?n+=", "+i.State:n+=i.State),i.PostalCode&&(n+=" "+i.PostalCode)):i&&(i.City&&(n+=i.City),i.Country&&(n.length>0?n+=", "+i.Country:n+=i.Country)),new m.A().Add(null!=(a=null==i?void 0:i.Id)?a:"",n,"GEOLOCATION",e,t),n}async function em(e=!1){var t,a,n;let i=await (0,f._y)();if(e)return i;let l=I();if(!isAuthenticated||!0!==l.profile.isValid||!R(l.profile.latitude)||!R(l.profile.longitude))return i;let r={latitude:l.profile.latitude,longitude:l.profile.longitude};return(l.profile.city||l.profile.state||l.profile.country)&&(r.city=null!=(t=l.profile.city)?t:"",r.state=null!=(a=l.profile.state)?a:"",r.country=null!=(n=l.profile.country)?n:""),r}async function ep(e,t){var a,n,l,r,o;let s={Formatted_Address:null};if(!e||!t)return s;try{let u=new m.A,c=await u.Find(e,t,!0),d=c&&"string"!=typeof c?c.label:null,h=c&&"string"!=typeof c&&c.id&&"-1"!==c.id&&"0"!==c.id?c.id:null,f=await S.geoPlacesReverseLookup(new y.y({lat:e,lng:t})),p=null==f?void 0:f.type,g=null==f?void 0:f.name,v=(null==f?void 0:f.addressInformation)||null,w="postal"===p&&!!(null==v?void 0:v.stateProv);if(null==v)return d&&(s.Formatted_Address=d),h&&(s.Id=h),s;{let e=w?g:v.city,t=w?`${g}, ${v.stateProv}, ${v.countryCode}`:v.formatted,u=f.id;return f.mongoId&&"0"!==f.mongoId&&(u=f.mongoId),s={Id:null!=h?h:u,City:null!=e?e:"",State:null!=(a=v.stateProv)?a:"",PostalCode:null!=(n=v.zip)?n:"",Country:null!=(l=v.countryCode)?l:"",Geometry:void 0,Formatted_Address:null!=d?d:t,Latitude:null==(r=f.geo)?void 0:r.lat,Longitude:null==(o=f.geo)?void 0:o.lon,Status:{code:i.SVC_ON_ALLOWED,message:O}}}}catch(e){return(0,d.wN)("GetGeographicDetails3 failed",e),s}}
4async function ey(e){let t=e.getSouthWest(),a=e.getNorthEast();(0,d.wN)("SouthWestLat:"+t.lat()+"::SouthWestLng:"+t.lng()),(0,d.wN)("NorthEastLat:"+a.lat()+"::NortEastLng:"+a.lng());let n=google.maps.geometry.spherical.computeDistanceBetween(t,a);(0,h.x)();let i=Math.min(621371192e-12*n,(0,h.hi)("mi")),l=await (0,c.a9)("View");return Number(Math.round(i=Math.max(i,(0,h.AQ)(l))).toFixed(0))}let eg=ec,ev=ey,ew=E,eb=E,eS=(0,h.g5)(ef,800),eC=(e,t)=>ee(!0,e,t),eP=()=>null!==navigator.geolocation,eA=()=>D,eL=()=>O},74742(e,t,a){function n(e,...t){try{console&&console.log(e,...t)}catch{}}function i(e,...t){try{console&&console.warn(e,...t)}catch{}}function l(e,...t){try{console&&console.error(e,...t)}catch{}}a.d(t,{Ey:()=>i,SS:()=>l,wN:()=>n})},84430(e,t,a){a.d(t,{s6:()=>I,O$:()=>R,Mr:()=>U,vG:()=>G,kr:()=>E,_z:()=>b,jb:()=>_,E$:()=>j});var n=a(47344),i=a(64741),l=a(66401),r=a(36802),o=a(99301),s=a(1098),u=a(64019),c=a(79162),d=a(72336),h=a(70825),f=a(11802),m=a(84836);let p=["window_resize","page_init","mq_small_screen","mq_medium_screen","mq_large_screen","mq_xlarge_screen"],y=new Map,g=function(e,t){null!==window.parent&&(null==(t=t||window.parent)||t.postMessage(e,"*"))},v=(0,n.A)(function(e){w.pageConfig=e,(0,o.HI)("searchConfigData",e)}),w={pageName:"",baseUrl:"",pageLoadClientProfile:"",pageConfig:{}};function b(e,t){g(e,t)}function S(e){e&&e.widgetName?(0,c.wN)("Loading "+e.widgetName+"..."):(0,c.SS)("Widget loading data is null")}function C(e){(0,c.wN)("Done loading "+e.widgetName)}function P(e){(0,c.wN)("Error loading "+e)}function A(){return(0,s.uY)()?"small":(0,s.SA)()?"medium":(0,s.zE)()?"large":void 0}async function L(){return new Promise(e=>{var t,a,n;let l=document.body.clientHeight;t=window,a="message",n=function(e){if(e.isTrusted&&e.origin.indexOf("golfpass.com"))switch(e.data){case"reportBodyHeight":g(JSON.stringify({message:"resize",data:{scrollHeight:document.body.scrollHeight}}),e.source);break;case"hideHeaderFooter":let t=document.querySelector("head, footer");null!==t&&(t.style.display="none")}},null!==window.parent&&(t.addEventListener?t.addEventListener(a,n,!1):t.attachEvent&&t.attachEvent("on"+a,n)),function(){let{small_only:e,medium_only:t,large_up:a}=s.H5,n=window.matchMedia(e),l=window.matchMedia(t),r=window.matchMedia(a),o=(0,i.A)(T,200,{leading:!0}),u=(0,i.A)(D,200,{leading:!0}),c=(0,i.A)(O,200,{leading:!0});try{r.addEventListener("change",(0,i.A)(e=>{!0===e.matches&&T()},150)),l.addEventListener("change",(0,i.A)(e=>{!0===e.matches&&D()},150)),n.addEventListener("change",(0,i.A)(e=>{!0===e.matches&&O()},150)),r.matches&&o(),l.matches&&u(),n.matches&&c()}catch{k()}}();let r=(0,i.A)(()=>{try{amplify.publish("window_resize")}catch(e){}document.body.clientHeight!==l&&g(JSON.stringify({message:"resize",data:{scrollHeight:document.body.scrollHeight}}))},300);window.addEventListener("resize",r),e({})})}function M(e,t){let a=A();if(void 0!==a){if(a!==w.pageLoadClientProfile&&!(0,h.d)())return void document.location.reload();w.pageLoadClientProfile=a,amplify.publish(e,t)}}function O(){(0,c.wN)("Handling Small Screen"),M("mq_small_screen",0)}function D(){(0,c.wN)("Handling Medium Screen"),M("mq_medium_screen",1)}function T(){(0,c.wN)("Handling Large Screen"),M("mq_large_screen",2)}function k(){0>document.location.href.lastIndexOf("unsupported")&&(document.location.href="/browser/unsupported")}async function F(e,t,a,n,i){var l,o;let s=e.name,u=document.getElementById(null!=(l=null==s?void 0:s.toLowerCase())?l:""),h=(null!=(o=e.widgets)?o:[]).map((e,t)=>({widget:e,index:t})).filter(({widget:e})=>null!=e),f=e.type===d.sf.Randomize_Widgets&&h.length>0?[h[Math.floor(Math.random()*h.length)]]:h,y=w.baseUrl.endsWith("/")?w.baseUrl:w.baseUrl+"/",g=await Promise.all(f.map(async({widget:e,index:n})=>{var l;if(!e)return null;let o=null!=(l=e.name)?l:"",d=`${y}widgets/${t}/${o}/template/${s}/${a}?v=${i}`,h=`async_${o}_init`,f=`async_${o}_fail`,g=`async_${o}_always`;p.push(h,f,g);try{let e,t,a,i,l,s=await (0,r.a7)(o,d,{headers:{Accept:"text/html"}});if(null==s)return amplify.publish(f),null;let{styles:c,js:p,html:y}=(e=new DOMParser().parseFromString(s,"text/html"),t=[...Array.from(e.head.childNodes),...Array.from(e.body.childNodes)],a=[],i=[],l=null,t.forEach(e
4=>{switch(e.nodeName.toLowerCase()){case"style":case"link":e instanceof HTMLElement&&a.push(e);break;case"script":e instanceof HTMLElement&&i.push(e);break;case"#text":break;default:e instanceof HTMLElement&&(l=e)}}),{styles:a,js:i,html:l});if(c.length||p.length){let e=document.head;c.forEach(t=>e.appendChild(t)),p.forEach(t=>e.appendChild(t))}if(y&&u){let e=(0,m.n)(u.id,y.outerHTML);return amplify.publish(h),e?null:{index:n,markup:y.outerHTML}}return amplify.publish(h),null}catch(e){return(0,c.SS)(e),amplify.publish(f),null}finally{amplify.publish(g)}}));return u&&(u.classList.remove("gn_widget_spacer"),f.some(({widget:e})=>(null==e?void 0:e.name)==="DfpAd")||(u.style.minHeight=""),u.querySelectorAll(".widget-animation").forEach(e=>e.style.display="none")),g.filter(e=>null!=e)}function N(e,t,a,n,i,l=!1){var r;let o=[];for(let t of e){let e=t.name,a=document.getElementById(null!=(r=null==e?void 0:e.toLowerCase())?r:"");a&&o.push({id:null!=e?e:"",element:a})}let s=new Map(e.map(e=>{var t;return[null!=(t=e.name)?t:"",e]}));(0,f.D)(o,async e=>{let r=s.get(e.id),o=e.id.toLowerCase();if(!r)return;let u=y.get(o);if(u){let e=await u;if(!l||0===e.length||y.get(o)!==u)return;let t=e.filter(({markup:e})=>!(0,m.n)(o,e));y.set(o,Promise.resolve(t));return}let c=F(r,t,a,n,i);y.set(o,c),await c})}async function E(e){var t,a,n,i;let l=null!=(n=null==(a=null==(t=e.size)?void 0:t.sections)?void 0:a.filter(e=>!1===e.preLoad))?n:[];if(0===l.length)return;let r=await (0,u.v1)();N(l,null==(i=e.size)?void 0:i.name,w.pageName,null,r,!0)}async function R(e,t,n=[],i=[],r=null){if(y.clear(),!(void 0!==window.URLSearchParams&&"classList"in document.documentElement&&"dataset"in document.createElement("div")&&"function"==typeof window.matchMedia))return void k();let o=document.querySelector(".drawer-wrap");null!==o&&(o.style.display="block"),w.pageLoadClientProfile=null!=(s=A())?s:"",w.baseUrl=cdnUrl.substring(0,cdnUrl.length-1)||location.protocol+"//"+location.host;var s,d,h,f=!(0,l.A)(t);v({pageName:e,size:t,views:null!=n?n:[],refinements:null!=i?i:[]}),null==e&&(0,c.Ey)("pageName variable is not set"),w.pageName=e,(0,c.wN)("Page Load: "+e);let m="xhr_get_always_"+e+"_config";if(p.push(m),amplify.subscribe(m,function(e){(0,c.wN)("Topic Get Request - Always: Status = "+e.requestStatus)}),f){let e=null!=(h=null==(d=null==t?void 0:t.sections)?void 0:d.filter(e=>!1===e.preLoad))?h:[];if(e.length>0){let a=await (0,u.v1)();N(e,null==t?void 0:t.name,w.pageName,r,a)}}amplify.subscribe("widget_loading",S),amplify.subscribe("widget_loadComplete",C),amplify.subscribe("widget_loadError",P),amplify.subscribe("app-state-loaded",async e=>{(0,c.wN)(`App State Loaded for component: ${e}, initializing favorites...`);let{InitFavs:t}=await a.e(38831).then(a.bind(a,38831));await t()}),await L(),amplify.publish("page_init",I()),dataLayer.push({event:"optimize.active"})}async function I(){return await (0,o.qy)("searchConfigData")}let x=null;function G(e){x=e}function _(e,t){amplify.subscribe(e,t)}function U(e,t=null){amplify.publish(e,t),null!==t&&x&&t instanceof x||g(JSON.stringify({message:e,data:t}))}function j(e,t=null){amplify.unsubscribe(e,t)}},62350(e,t,a){a.r(t),a.d(t,{PmpReporting:()=>y});var n=a(99301),i=a(64019),l=a(79162);let r=new(a(47637)).A,o="pmpBatch",s="pmp_click",u="pmp_purchase",c="",d=!1,h=Promise.resolve();function f(e){return h=h.then(()=>e()).catch(e=>(0,l.SS)("Error in PMP reporting operation: "+e))}async function m(e,t,a,h=null){var f,y,g;try{let m=await (0,i.Xn)();if(!a||0===Object.keys(a).length||!m.enabled)return;let v=a.event,w=Number(m.sessionDuration),b=Number(m.batchInterval),S=new Date,C=S.getTime(),P=await (0,n.qy)(o),A={sessionId:(null==P?void 0:P.sessionId)&&P.sessionId>0?P.sessionId:C,channelId:c,batchId:(null==P?void 0:P.batchId)&&P.batchId>0?P.batchId:C,startFormattedDate:(null==P?void 0:P.startFormattedDate)||0,endFormattedDate:(null==P?void 0:P.endFormattedDate)||0,records:(null==P?void 0:P.records)?[...P.records]:[],facilitiesClicks:(null==P?void 0:P.facilitiesClicks)?[...P.facilitiesClicks]:[]};if(null!=A.records||(A.records=[]),null!=A.facilitiesClicks||(A.facilitiesClicks=[]),v){let e=t.toString(),a=A.facilitiesClicks;if(v===s)a.includes(e)||a.push(e);else if(v===u&&!a.includes(e))return}if(C-(null!=(f=A.sessionId)?f:0)>6e4*w&&(A.sessionId=C,A.facilitiesClicks=[]),a.date=S.toISOString(),a.facility_id=t,a.facility_name=e.trim().replace(/\\'/g,"'").replace(/'/g,"'").replace(/&#39;/g,"'"),a.session_id="u">typeof clientIP&&clientIP?clientIP:"unknown",v&&(a.access_route=v!==u?window.location.pathname:"/checkout"),A.records.push(a),A.endFormattedDate=parseInt([(g=S).getFullYear(),(Date.UTC(g.getFullYear(),g.getMonth(),g.getDate())-Date.UTC(g.getFullYear(),0,0))/24/60/60/1e3].join(""),10),0===A.startFormattedDate&&(A.startFormattedDate=A.endFormattedDate),C-(null!=(y=A.batchId)?y:0)>6e4*b&&A.records.length>0&&!d){d=!0;let e=p(A.records),t={sessionId:A.sessionId,channelId:A.channelId,batchId:A.batchId,startFormattedDate:A.startFormattedDate,endFormattedDate:A.endFormattedDate,records:e,facilitiesClicks:[...A.facilitiesClicks]};await (0,n.iU)("pmpBatchLog",t,!0);let a=!1;try{await r.postPmpEventBatch(t),a=!0}catch(e){(0,l.SS)("Failed to post PMP log batch to server: "+(e.message||e)),A.records=p(A.records)}a&&(A.records=[],A.batchId=C,A.startFormattedDate=0,A.endFormattedDate=0,A.facilitiesClicks=[]),d=!1}await (0,n.iU)(o,A,!0),h&&h()}catch(e){(0,l.SS)("Exception during batch of PMP logs: "+e)}}function p(e){let t=["PMPT1","PMPT2"],a=[],n=new Set;for(let i of e){let e=Object.assign({},i);if("pmp_purchase"!==e.event||e.event_zone||(e.event_zone="Confirmation"),!e.event_zone||!t.includes(e.tags))continue;let l=`${e.facility_id}|${e.event_zone}|${e.event}|${e.access_route}`;n.has(l)||(n.add(l),a.push(e))}return a}let y={ReportPmpImpressionEvent:async function(e,t,a,n){await f(()=>m(e,t,{event:"pmp_impression",tags:a,event_zone:n}))},ReportPmpClickEvent:async function(e,t,a,n){await f(()=>m(e,t,{event:s,tags:a,event_zone:n}))},ReportPmpPurchaseEvent:async function(e,t,a,n,i){await f(()=>m(e,t,{event:u,player_count:a,reservationId:n,event_zone:"Confirmation",tags:i}))},Init:function(e,t){c=t}}},11300(e,t,a){a.d(t,{A:()=>s});var n=a(50473),i=a(545),l=a(99301),r=a(79162),o=a(36802);class s{constructor(){Object.defineProperty(this,"recentSearchesCacheName",{enumerable:!0,configurable:!0,writable:!0,value:"GolfNow.Web.RecentSearches"}
4),Object.defineProperty(this,"maxRecentSearches",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"maxStoredSearches",{enumerable:!0,configurable:!0,writable:!0,value:30}),Object.defineProperty(this,"searches",{enumerable:!0,configurable:!0,writable:!0,value:this.GetFromCache(!1)})}GetFromCache(e=!0){var t;let a=null!=(t=(0,l.IR)(this.recentSearchesCacheName))?t:[];if(0===a.length)return[];let n=(0,i.A)(a,e=>"-1"===e.id||""===e.label);return e&&(n=n.slice(0,this.maxRecentSearches)),n}Get(){let e=(0,i.A)(this.searches,e=>"-1"===e.id||""===e.label);return e.slice(0,this.maxRecentSearches)}Add(e,t,a,n,i,r=null){var o,s,u;for(let a=0;a<this.searches.length;a++)if((null==(o=this.searches[a])?void 0:o.id)!=="0"&&(null==(s=this.searches[a])?void 0:s.id)===e||(null==(u=this.searches[a])?void 0:u.label)===t){this.searches.splice(a,1),(0,l.Uz)(this.recentSearchesCacheName,this.searches,2592e6);break}for(;this.searches.length>=this.maxStoredSearches;)this.searches.pop();let c={id:e,label:t,searchType:a};a&&"GEOLOCATION"===a&&null!==n&&null!==i&&(c.lat=n,c.long=i,c.geometryViewPort=r),this.searches.unshift(c),(0,l.Uz)(this.recentSearchesCacheName,this.searches,2592e6)}async Find(e,t,a=!1){var i;let o=this.searches,s=await (0,l.qy)("GolfNow.Web.Client.CurrentPosition");if(null==o?void 0:o.length){let i=(0,n.A)(o,a=>{var n;return(null==(n=a.searchType)?void 0:n.toLowerCase())==="geolocation"&&String(a.lat)===String(e)&&String(a.long)===String(t)})||null;if(i)return a?i:i.label}if(null===s||s.Latitude!==e||s.Longitude!==t)return null;{(0,r.wN)("USING CURRENT POSITION");let e={geometryViewPort:null,id:"-1",label:null!=(i=s.Address2)?i:"",lat:s.Latitude,long:s.Longitude,searchType:"GEOLOCATION"};return a?e:e.label}}async FindById(e,t){let a=!1,i=this.searches;if(null==i?void 0:i.length){let t=(0,n.A)(i,{searchType:"GEOLOCATION",id:e});if(t)return a=!0,t}if(!a)return(0,o.l7)("find-location-byid",t,!0)}}},36802(e,t,a){a.d(t,{CS:()=>m,Tt:()=>g,WW:()=>p,Y5:()=>f,a7:()=>y,aM:()=>S,l7:()=>d,m$:()=>b,tx:()=>h});var n=a(8058),i=a(41343),l=a(79162),r=a(99301),o=a(53049),s=a(69777);let u=[],c=[];async function d(e,t,a=!1,n=!0){let i=await v(t,{cache:a?"force-cache":"no-cache",eventTopic:e,headers:{"Content-Type":"application/json"}},n);return await (null==i?void 0:i.json())}async function h(e,t,a,n={},i=!0){let l=await v(t,Object.assign(Object.assign({},n),{eventTopic:e,method:"POST",headers:Object.assign({"Content-Type":"application/json"},n.headers||{}),body:"string"==typeof a?a:JSON.stringify(a)}),i);return await (null==l?void 0:l.json())}async function f(e,t,a,n){let i=e+"_"+n,o=await (0,r.qy)(i);if(""===o||null===o)return await p(e,t,a,i);{let t="success",a="xhr_getcontent_always_"+e;return(0,l.wN)(a+" - "+t),amplify.publish(a,{requestStatus:t,result:o}),o}}function m(e,t){return new Promise((a,r)=>{var o;let s="";if(null===(null!=(o=u.find(e=>e.url===t))?o:null)){let o=document.createElement("script");u.push({url:t,topic:e}),t||cdnUrl.substring(0,cdnUrl.length-1)||(location.protocol,location.host),o.type="text/javascript",o.src=t,o.onload=function(e){s="success";let t=e.currentTarget.src,r=u.find(e=>t.indexOf(e.url)>-1);(0,l.wN)("xhr-parent-script-"+(null==r?void 0:r.topic)+"-done"),amplify.publish("xhr_loadscript_always_"+(null==r?void 0:r.topic),{requestStatus:s}),(0,n.A)((0,i.A)(c),e=>{t.indexOf(e.url)>-1&&((0,l.wN)("xhr-waiting-script-"+e.topic+"-done"),amplify.publish("xhr_loadscript_always_"+e.topic,{requestStatus:s}))}),a()},o.onerror=function(){s="failed",r(),c=[],u=[]},$("body")[0].appendChild(o)}else c.unshift({url:t,topic:e})})}async function p(e,t,a={},n="",i=!0){let l=await v(t,Object.assign(Object.assign({},a),{cache:"force-cache",eventTopic:e,headers:{"Content-Type":"text/html"}}),i),o=await (null==l?void 0:l.text());return""!==n&&(0,r.HI)(n,o),o}async function y(e,t,a={},n=!0){let i=await v(t,Object.assign(Object.assign({},a),{eventTopic:e}),n);return await (null==i?void 0:i.text())}async function g(e,t={},a=!0){let n=await v(e,Object.assign(Object.assign({},t),{headers:{"Content-Type":"application/json"}}),a);return await (null==n?void 0:n.json())}async function v(e,t,a=!1){var n;let{timeout:i=3e4,eventTopic:l,headers:r}=t,s=new AbortController,u=setTimeout(()=>s.abort(),i),{handleRequestError:c}=(0,o.r)(),d=null,h=document.querySelector("#gn_widget_csrf > input");h&&!a&&((d=h.value)||(d=(h=document.querySelector("#teetime-search > input"))?h.value:null),t.headers=Object.assign(Object.assign({},r),{"X-CSRF-TOKEN":null!=d?d:""}));try{let a=await fetch(e,Object.assign(Object.assign({},t),{signal:s.signal}));if(l&&lify.publish(`xhr_${(null==(n=t.method)?void 0:n.toLowerCase())||"fetch"}_always_${l}`,{requestStatus:a.status,result:a}),!a.ok&&!c({status:a.status,statusText:a.statusText,responseURL:a.url}).logged)throw Error(`HTTP request failed. Status: ${a.status} ${a.statusText}`);return a}catch(e){if(!c(e).logged)throw e}finally{clearTimeout(u)}}let w="GolfNow.Web.Client.Auth401HandledAt";function b(e){return e instanceof s.A&&401===e.status}function S(){var e;try{let t=Number(null!=(e=sessionStorage.getItem(w))?e:"0"),a=Date.now();if(Number.isFinite(t)&&a-t<5e3)return!1;
4return sessionStorage.setItem(w,String(a)),!0}catch{return!0}}},59551(e,t,a){a.d(t,{G:()=>p});var n=a(8058),i=a(50473),l=a(66401),r=a(23149),o=a(1098),s=a(84430),u=a(1467),c=a(79162);async function d(e=f()){var t,a;let n=[],i=await (0,s.s6)();return(null==i?void 0:i.views)?n=null!=(a=null==(t=i.views.find(t=>{if(t.name===e)return t}))?void 0:t.sorts)?a:[]:(0,c.Ey)("Unable to get page config in Search"),n}async function h(e,t){let a=await d(t);if(!a.length)return!1;{let t=e.split("|"),n=t[0],r=Number(t[1])||0;return!(0,l.A)((0,i.A)(a,{name:n,direction:r}))}}function f(){var e;let t=null==(e=searchController.SearchParameters)?void 0:e.Get(),a=(null==t?void 0:t.view)||(null==t?void 0:t.searchType);if("number"==typeof a){let e;switch(a){case 0:e="Course";break;case 1:e="Tile";break;default:e="List"}a=e}return a}async function m(e,t){let a=await d();(0,l.A)(a)?((0,c.Ey)("Unable to remove unsupported sort options in Search."),(0,o.uY)()?$("#sort-listing-button").attr("data-toggle","").attr("data-target","").addClass("disabled"):$("#sort-listing-button").parent().addClass("disabled")):($("#sort-listing-button").parent().removeClass("disabled"),(0,n.A)(e,function(e){let t=$(e),n=t.data("sort-criteria").split("|"),l=n[0],r=Number(n[1]);if((0,i.A)(a,{name:l,direction:r})){let e=t.parent();!1===e.hasClass("depricated")&&e.show()}else t.parent().hide()}))}let p={handlePreviousDateLink:function(){var e,t;(0,u.NT)((0,u.hR)(),(0,u.hR)(new Date(null!=(t=null==(e=searchController.SearchParameters)?void 0:e.date)?t:new Date)))&&$(".button-prev-date").hide()},handleSortState:async function e(e){searchController.GetSortStateHandled()||((await d(e)).length>0?$("#sort-listing-button").parent().removeClass("disabled"):$("#sort-listing-button").parent().addClass("disabled"),searchController.SetSortStateHandled(!0))},getAllowedPageSorts:d,isSortAllowed:h,getView:f,removeUnSupportedSortOptions:m,removeUnSupportedViewOptions:async function e(e){let t=await (0,s.s6)();(0,r.A)(t)&&(0,r.A)(t.views)?(0,n.A)(e,function(e){let a=$(e),n=a.data("view-criteria");if((0,i.A)(t.views,{Name:n})){let e=a.parent();!1===e.hasClass("depricated")&&e.show()}else a.parent().hide()}):(0,c.Ey)("Unable to remove unsupported view options in Search.")},UseDateExclusions:!1,ExcludeDays:[],ExcludeDayIds:[],GetExcludedDayIds:()=>null,DatePickerOnOpenHandler:null,DatePickerOnCloseHandler:()=>{var e;null==(e=document.activeElement)||e.dispatchEvent(new Event("blur",{cancelable:!0,bubbles:!0}))}}},9741(e,t,a){a.d(t,{Qt:()=>s,XY:()=>u,default:()=>D});var n,i,l,r,o,s,u,c,d=a(22922),h=a(97859),f=a(27422),m=a(74722),p=a(92866),y=a(84220),g=a(99790),v=a(48497),w=a(10810),b=a(1098),S=a(1467),C=a(79162),P=a(72336),A=a(24519),L=a(9612),M=a(99301),O=a(88398);(n=o||(o={})).All="all",n.Ladies="ladies",n.Resident="resident",n.Senior="senior",n.Twilight="twilight",n.Walking="walking",(i=s||(s={})).List="list",i.Course="course",i.CourseTile="course-tile",i.Tile="tile",i.TileHd="tile-hd",i.Map="map",i.MapTile="map-tile",i.Grouping="grouping",(l=u||(u={}))[l.Client=0]="Client",l[l.Server=1]="Server",l[l.AdvancedOnly=2]="AdvancedOnly",(r=c||(c={}))[r.Morning=1]="Morning",r[r.Afternoon=2]="Afternoon",r[r.Any=3]="Any";class D{get searchParameterCacheName(){return"GolfNow.Web.SearchParameters"}get searchParameterInitialCacheName(){return"GolfNow.Web.SearchParameters.Initial"}constructor(e,t){var a;Object.defineProperty(this,"facilityId",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"teeTimeId",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"radius",{enumerable:!0,configurable:!0,writable:!0,value:null!=(a=(0,C.AQ)())?a:0}),Object.defineProperty(this,"latitude",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"longitude",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"searchType",{enumerable:!0,configurable:!0,writable:!0,value:P.nX.GeoLocation}),Object.defineProperty(this,"sortBy",{enumerable:!0,configurable:!0,writable:!0,value:(0,C.a8)()}),Object.defineProperty(this,"sortDirection",{enumerable:!0,configurable:!0,writable:!0,value:P.UE.Asc}),Object.defineProperty(this,"sortByRollup",{enumerable:!0,configurable:!0,writable:!0,value:(0,C.Ze)(this.sortBy,this.sortDirection)}),Object.defineProperty(this,"sortDisplay",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"view",{enumerable:!0,configurable:!0,writable:!0,value:(0,C.bf)(s.List)}),Object.defineProperty(this,"currentClientDate",{enumerable:!0,configurable:!0,writable:!0,value:new Date}),Object.defineProperty(this,"date",{enumerable:!0,configurable:!0,writable:!0,value:(0,S.$x)(!1)}),Object.defineProperty(this,"hotDealsOnly",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"trackmanOnly",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"promotedCampaignsOnly",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"priceMin",{enumerable:!0,configurable:!0,writable:!0,value:(0,C.C5)()}),Object.defineProperty(this,"priceMax",{enumerable:!0,configurable:!0,writable:!0,value:(0,C.KP)()}),Object.defineProperty(this,"players",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"timeMin",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"timeMax",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"timePeriod",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"holes",{enumerable:!0,configurable:!0,writable:!0,value:P.GS.Any}),Object.defineProperty(this,"facilityType",{enumerable:!0,configurable:!0,writable:!0,value:P.mU.Any}),Object.defineProperty(this,"marketId",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"golfPassPerksOnly",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"bestDealsOnly",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"address",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"location",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pageSize",{enumerable:!0,configurable:!0,writable:!0,value:30}),Object.defineProperty(this,"pageNumber",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"facilityName",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"facilitySlug",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"facilityIds",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rateTagCodes",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"tags",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nextAvailableTeeTime",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"teeTimeCount",{enumerable:!0,configurable:!0,writable:!0,value:this.GetTeeTimeCountDefault()}),Object.defineProperty(this,"excludeFeaturedFacilities",{enumerable:!0,configurable:!0,writable:!0,value:(0,C.BW)()}),Object.defineProperty(this,"excludePrivateFacilities",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"rateType",{enumerable:!0,configurable:!0,writable:!0,value:(0,C.YU)()}),Object.defineProperty(this,"marketName",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"offPlatformCourse",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"defaultSort",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"defaultView",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"disableLocationChange",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"redirectOnSearch",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"searchParamsAction",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"exploreToggle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),null!=e&&Object.assign(this,e),null!=t&&Object.assign(this,t),Object.defineProperties(this,{parametersUpdatedEvent:{configurable:!0,writable:!0,value:new Event("parametersUpdated")},offPlatformSearchEvent:{configurable:!0,writable:!0,value:new Event("offPlatformSearch")},searchPageStore:{configurable:!0,writable:!0,value:(0,A.Q)()}})}GetTeeTimeCountDefault(){return this.hotDealsOnly?3:(0,b.uY)()?10:(0,b.SA)()?15:(0,b.zE)()?20:void 0}isBoolean(e){return"boolean"==typeof e}isNumber(e){return"number"==typeof e}clampToToday(e,t){let a=(0,S.Mv)(new Date);return(0,v.Y)((0,S.Mv)(e),a)?((0,C.Ey)(`SearchParams: Search date "${t}" is in the past and was ignored.`,`Falling back to current date "${a.toDateDisplayString(!1)}".`),a):e}parseSearchDate(e){if("string"==typeof e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(t){let[,a,n,i]=t,l=new Date(Number(a),Number(n)-1,Number(i));if(l.getFullYear()===Number(a)&&l.getMonth()===Number(n)-1&&l.getDate()===Number(i))return this.clampToToday(l,e);let r=new Date;return(0,C.Ey)(`SearchParams: Invalid search date "${e}" was ignored.`,`Falling back to current date "${r.toDateDisplayString(!1)}".`),r}}let t=(0,d.A)(e)?e:new Date(e);if(!(0,g.f)(t)){let t=new Date;return(0,C.Ey)(`SearchParams: Invalid search date "${e}" was ignored.`,`Falling back to current date "${t.toDateDisplayString(!1)}".`),t}return this.clampToToday(t,e)}LowercaseKeys(e){let t=(0,f.A)(this);return Object.keys(e).filter(e=>t.includes(e)).reduce((t,a)=>(t[a.toLowerCase()]=e[a],t),{})}ResetAdvancedSearchParams(e=null){var t,a,n,i,l,r,o,s,u,c,d,f,m,p,y,g;let v=(0,C.wd)(null,this.view);for(let[w,b]of(v.date=(0,S.$x)(!1),v.searchType=(0,C.zv)(null!=(t=null==e?void 0:e.searchType)?t:this.searchType),v.hotDealsOnly=null!=(a=null==e?void 0:e.hotDealsOnly)?a:this.hotDealsOnly,v.promotedCampaignsOnly=null!=(n=null==e?void 0:e.promotedCampaignsOnly)?n:this.promotedCampaignsOnly,v.view=null!=(i=null==e?void 0:e.view
4)?i:this.view,v.sortBy=null!=(l=null==e?void 0:e.sortBy)?l:this.sortBy,v.sortDirection=null!=(r=null==e?void 0:e.sortDirection)?r:this.sortDirection,v.sortByRollup=null!=(o=null==e?void 0:e.sortByRollup)?o:this.sortByRollup,v.latitude=null!=(s=null==e?void 0:e.latitude)?s:this.latitude,v.longitude=null!=(u=null==e?void 0:e.longitude)?u:this.longitude,v.address=null!=(c=null==e?void 0:e.address)?c:this.address,v.facilityId=null!=(d=null==e?void 0:e.facilityId)?d:this.facilityId,v.facilityIds=null!=(f=null==e?void 0:e.facilityIds)?f:this.facilityIds,v.facilityName=null!=(m=null==e?void 0:e.facilityName)?m:this.facilityName,v.marketId=null!=(p=null==e?void 0:e.marketId)?p:this.marketId,v.marketName=null!=(y=null==e?void 0:e.marketName)?y:this.marketName,v.facilityType=null!=(g=null==e?void 0:e.facilityType)?g:this.facilityType,Object.entries(L.UrlParams.GetHashParams()))){if(""===b||"null"===b||(0,h.A)(b))continue;let t=Object.keys(v).find(e=>e.toLowerCase()===w.toLowerCase());t&&e||(v[t||w]=b)}this.Set(v,!0)}async GetSearchParametersFromUserStore(e=!1){let t=await (0,M.qy)(this.searchParameterCacheName);if(e){let e=(0,m.A)((0,f.A)(t),e=>e.toLowerCase()),a=(0,p.A)(t);t=(0,y.A)(e,a)}let a="Radius";if(e&&(a=a.toLowerCase()),t&&t[a]){let e=await (0,M.a9)("View");t[a]=Math.max(Number(t[a])||0,(0,C.AQ)(e))}return t}GetSearchParametersFromUrlSearchParams(e,t=!1){for(let[t,a]of e.entries()){if(""===a||"null"===a||(0,h.A)(a))continue;let e=Object.keys(this).find(e=>e.toLowerCase()===t.toLowerCase());e&&(this[e]=a)}return t?this.LowercaseKeys(this):this}async GetInitialSearchParameters(){return await (0,M.qy)(this.searchParameterInitialCacheName)}SaveInitialSearchParameters(e){(0,M.HI)(this.searchParameterInitialCacheName,e,O.b.MINUTES_30)}SaveSearchParameters(e){(0,M.HI)(this.searchParameterCacheName,e,O.b.MINUTES_30)}NextPage(){return void 0!==this.pageNumber&&null!==this.pageNumber?this.pageNumber+=1:this.pageNumber=1,this.pageNumber}Set(e,t=!0){let a=Object.getOwnPropertyNames(this),{searchParams:n}=(0,w.bP)(this.searchPageStore),i=!1;for(let t in e){let n=a.find(e=>{if(e.toLowerCase()===t.toLowerCase())return e});if(void 0!==n&&""!==n){if(void 0===t){(0,C.Ey)("SearchParams: Set called with undefined parameter name, skipping.");continue}let a=e[t];if("date"===t.toLowerCase()&&a){let e=(0,S.hR)(this.parseSearchDate(a)),t=e.toDateDisplayString(!1);if(t===this[n])continue;(0,S.rR)(e),this[n]=t,i=!0}else{let e=this[n];if(this.isBoolean(e)){let t=(0,C.mg)(a);if(t===e)continue;this[n]=t}else if(this.isNumber(e)&&!isNaN(e)){if(Number(a)===e)continue;this[n]=Number(a)}else{if(a===e)continue;this[n]=a}i=!0}}}let l=this.Get();return i&&(n.value=l),t&&this.SaveSearchParameters(l),t||this.offPlatformCourse||!this.parametersUpdatedEvent?this.offPlatformCourse&&this.offPlatformSearchEvent&&document.dispatchEvent(this.offPlatformSearchEvent):document.dispatchEvent(this.parametersUpdatedEvent),l}Get(){var e;let t=null==(e=this.GetKeys())?void 0:e.map(e=>e);return(0,y.A)(t,(0,p.A)(this))}GetLc(){return this.LowercaseKeys(this)}GetKeys(){return(0,f.A)(this)}QueryNeedsLocation(){let e=(0,C.zv)(this.searchType);return(e===P.nX.GeoLocation||e===P.nX.GoPlay)&&(!this.latitude||!this.longitude||!this.address)}getCallerName(){var e;let t=Error().stack;if(!t)return"unknown";let a=t.split(` 5`)[3];if(a){let t=a.match(/at\s+([^.\s]+)/);return t?null!=(e=t[1])?e:"not found":"anonymous"}return"unknown"}}},9612(e,t,a){let n;a.d(t,{UrlParams:()=>eu});var i=a(6232),l=a(64741),r=a(50473),o=a(42531),s=a(92049),u=a(66401),c=a(46996),d=a(97859),h=a(21395),f=a(23149),m=a(69592),p=a(27422),y=a(74722),g=a(59920),v=a(96034),w=a(82276),b=a(84123),S=a(69115),C=a(41343),P=a(57456),A=a(84430),L=a(79162),M=a(59551),O=a(33259),D=a(92770),T=a(86992),k=a(46874),F=a(6338),N=a(1467),E=a(9741),R=a(72336),I=a(42539),x=a(1593),G=a(73357),_=a(24519),U=a(10810),j=a(18875);let H=(n=!1,{SetClicked:e=>{void 0===e&&(e=!0),n=e},Clicked:()=>n});window.onhashchange=function(){V()},window.onpopstate=H.SetClicked;let B=null;function q(){var e,t;try{return null!=(t=null==(e=(0,T.getPageLocationCoordinator)())?void 0:e.getActiveLocation().location)?t:null}catch(e){return(0,L.Ey)("readCommittedLocation: coordinator not ready",e),null}}async function V(e=null){var t,a,n,l,r;let o=(e=null!=e?e:searchController)?null==(t=e.SearchParameters)?void 0:t.GetLc():null;if(B=(0,_.Q)(),location.hash.length>0&&(location.pathname.startsWith("/search",location.pathname.length-7)||location.pathname.startsWith("/go-play")||(null==o?void 0:o.searchtype)===searchType_GoPlay||location.pathname.startsWith("/tee-times/hot-deals")||location.pathname.startsWith("/favorites"))){(0,A.Mr)("close-federated-search");let t=(0,L.zv)(null==o?void 0:o.searchtype),i=W();null!==i&&(void 0===i.sortby&&(i.sortby=null!=(a=null==o?void 0:o.sortby)?a:"",i.sortbyrollup=null!=(n=null==o?void 0:o.sortbyrollup)?n:""),void 0===i.view&&(i.view=null!=(l=null==o?void 0:o.view)?l:""),"hotdealsonly"in i&&(i.hotdealsonly=(0,L.mg)(i.hotdealsonly))),i=await Z(i,t),i=await K(e,i),e&&(t===R.nX.Facility?Q(e,!1,null,i):t===R.nX.GoPlay||t===R.nX.Favorites?et(e,i,await eo(),!1):en(e,i,await eo([],!0),!1,!1).then(e=>{document.dispatchEvent(new Event("parametersUpdated"))}));let r=document.querySelector("#main-header a.login");if(r){let e=r.getAttribute("href");r.setAttribute("href",e+location.hash)}}else{if(!o)return;let t=(0,L.zv)(o.searchtype);if(t===R.nX.Facility)Q(e);else if(t===R.nX.GoPlay||t===R.nX.Favorites)et(e);else if(t!==R.nX.GeoLocation&&t!==R.nX.Destination){let t=(0,i.A)(o,(0,g.A)((0,L.fJ)(null,o.view),"searchtype"));null==(r=e.SearchParameters)||r.Set(t,!0)}}}function z(e,t,a){let n=e?e.GetRestoreFedSearchKey():null;(0,u.A)(n)||((t=(0,L.zv)(t))===searchType_Destination&&a&&(void 0!==a.radius||void 0!==a.Radius)&&(n.Radius=a.radius||a.Radius),e.SetRefinedResultsDisplay(n,$("#fedresults"),$(".list-refined-items")))}function W(){let e=""!==window.location.hash,t={};if(!e)return t;for(let[e,a]of new URLSearchParams(document.location.hash.substring(1)))t[e]=a;return t}function X(e){let t={};for(let[a,n]of e)t[a]=n;return t}function Y(e){return e instanceof URLSearchParams?X(e):"string"==typeof e?X(new URLSearchParams(e)):(0,f.A)(e)&&!(0,s.A)(e)?e:{}}async function Z(e,t=null){var a,n,l,o,c;let d,h,p;e=(0,i.A)({},Y(e));let g=await (0,A.s6)(),v=[],w=[],b=e=>!((0,m.A)(e)||(0,u.A)(e))&&(0,L.bf)(t)===e,S=()=>{v=[{name:"Course",default:b("Course")},{name:"List",default:b("List")},{name:"Tile",default:b("Tile")},{name:"Map",default:b("Map")},{name:"Grouping",default:b("Grouping")},{name:"Map-Tile",default:b("Map-Tile")},{name:"Course-Tile",default:b("Course-Tile")}],w=[{view:"Course",sorts:[{name:"Facilities.Distance"},{name:"Date"},{name:"Facilities.Rating"},{name:"GreensFees"},{name:"Facilities.Name"}]},{view:"List",sorts:[{name:"Facilities.Distance"},{name:"Date"},{name:"Facilities.Rating"},{name:"GreensFees"},{name:"Facilities.Name"}]},{view:"Tile",sorts:[{name:"Facilities.Distance"},{name:"Date"},{name:"Facilities.Rating"},{name:"GreensFees"},{name:"Facilities.Name"}]},{view:"Map",sorts:[]},{view:"Grouping",sorts:[{name:"GreensFees"}]}
5,{view:"Map-Tile",sorts:[]},{view:"Course-Tile",sorts:[{name:"Facilities.Distance"},{name:"Facilities.Rating"},{name:"Facilities.Name"}]}]};if((0,f.A)(g)&&(0,s.A)(g.views)?(v=(0,y.A)(g.views,e=>{var t,a;return{name:null!=(t=e.name)?t:"",default:null!=(a=e.default)&&a}}),w=(0,y.A)(g.views,e=>{var t,a;return{view:null!=(t=e.name)?t:"",sorts:null!=(a=e.sorts)?a:[]}})):S(),((0,u.A)(v)||(0,u.A)(w))&&S(),void 0===e.view||""===e.view||null==v.find(t=>t.name===e.view)){let t=(0,r.A)(v,{default:!0})||v[0];e.view=(null==t?void 0:t.name)||"Course"}if(void 0===e.sortby||null===e.sortby){for(let t=0;t<w.length;t++){let t=(0,r.A)(w,{view:e.view})||null;if(null!==t){let e=(0,r.A)(t.sorts,{default:!0})||t.sorts[0];h=null==e?void 0:e.name,p=null==e?void 0:e.direction;break}}null==h&&(h=null==(n=null==(a=w[0])?void 0:a.sorts[0])?void 0:n.name,p=null==(o=null==(l=w[0])?void 0:l.sorts[0])?void 0:o.direction)}else(d=e.sortby.lastIndexOf("."))===e.sortby.length-2?(h=e.sortby.substring(0,d),p=e.sortby.substring(d+1)):(h=e.sortby,p=e.sortdirection||0);p&&1===p?e.sortdirection=1:e.sortdirection=0,"Facilities.Rating"===h&&(e.sortdirection=1);let C=await M.G.getAllowedPageSorts(e.view);if(C.length)if((0,r.A)(C,{name:h}))e.sortby=h;else{let t=(0,r.A)(C,{default:!0});t?e.sortby=t.name:e.sortby=null==(c=C[0])?void 0:c.name}else e.sortby=h;return("Course"===e.view||"Map"===e.view||"Tile"===e.view||"Course-Tile"===e.view||"Map-Tile"===e.view)&&(e.sortbyrollup=(0,L.Ze)(h,e.sortdirection)),await M.G.handleSortState(e.view),e}async function K(e,t=null){let a=new URLSearchParams(t=t||W());for(let[n,i]of a){let l,r,o=window.location.pathname,s,c=window.location.search,d=(e,t,a=[])=>new URLSearchParams((0,v.A)(e,(e,n)=>!1===(0,p.A)(t).includes(n)||a.includes(n)||(0,h.A)(e))).toString(),f=e=>{""===e&&-1!==window.location.href.indexOf("?")&&(e=(l=window.location.href).substring(l.indexOf("?"),l.indexOf("#"))),-1!==i.indexOf("?")&&(i=i.substring(0,i.indexOf("?")))},m=async(n,i)=>{var l,h;(0,N.rR)(n),(0,A.Mr)("search_date_changed",(0,N.$x)());let f=null!=(l=(0,N.Gl)(n,"MMM dd yyyy"))?l:"";a.set("date",f),viewOverrideParams.date=f,(0,L.wN)("Overriding Date to:",n),(s=history.state?new URLSearchParams(history.state):a).has(i)&&s.delete(i);let m=await eo(void 0,!0),p=null==(h=e.SearchParameters)?void 0:h.GetSearchParametersFromUrlSearchParams(s,!0);r=d(p,p,m),o+=""!==c?c:"",o+=""!==r&&"#"!==r?"#"+r:"",(0,k.n)(X(s),"",(0,u.A)(o)?window.location.pathname:o),t=X(s)};switch(n.toLowerCase()){case"daysout":(0,N.rR)(null),f(c);let y=(Number(i)||0)>=0?Number(i):0,g=(0,I.W)((0,N.hR)(),{days:y});await m(g,n.toLowerCase());break;case"weekday":let w;(0,N.rR)(null),f(c);let b=w=(0,N.hR)(),S=(0,x.g)(b),C=isNaN(Number(i))?0:Number(i);w=S<=C?(0,G.s)(b,C):(0,G.s)((0,I.W)(b,{weeks:1}),C),await m(w,n.toLowerCase())}}return t}async function Q(e,t=!1,n="",i=null,l=!1){var r,o,s,d,f,m,p;let y,v,b=history.state,S=Y(b),P=null==(r=e.SearchParameters)?void 0:r.GetLc(),A=(0,L.bf)(R.nX.Facility),M=viewOverrideParams.view===A&&viewOverrideParams.searchParamsAction===E.XY.Client,O=t?n:(0,L.yx)().toLowerCase().replace("~facilityid~",(null==P?void 0:P.facilityslug)||(null==P?void 0:P.facilityid));if(O+=location.search,t&&""!==O){document.location.href=O;return}let D=(0,L.fJ)(null,A);D.view=A,D.sortby="Date",D.sortbyrollup="Date.MinDate";let T=await eo(["rateType","radius","q","qc","latitude","longitude"]);if(D.facilityid=null!=(s=null!=(o=null==P?void 0:P.facilityid)?o:null==viewOverrideParams?void 0:viewOverrideParams.facilityId)?s:0,D.searchtype=null!=(f=null!=(d=null==P?void 0:P.searchtype)?d:null==viewOverrideParams?void 0:viewOverrideParams.searchType)?f:R.nX.GeoLocation,null===b){void 0!==viewOverrideParams.hotDealsOnly&&null!==viewOverrideParams.hotDealsOnly?D.hotdealsonly=viewOverrideParams.hotDealsOnly:T.push("hotDealsOnly"),T=(0,C.A)(T);let t=await eo(T,!0);if(y=i||(0,g.A)(P,t),y=await Z(y),y=await K(e,y),M&&(y.view=viewOverrideParams.view,y.sortby=viewOverrideParams.sortBy,y.sortbyrollup=viewOverrideParams.sortByRollup),((v=er(y,D,await eo(["latitude","longitude","facilityid","searchtype","view","sortby"],!0))).indexOf("q=")>-1||v.indexOf("qc=")>-1)&&Promise.resolve().then(a.bind(a,48966)).then(({GoogleAnalytics:e})=>e.TrackPageView(O+"?"+v)),l)return v;y.sortby&&(y.sortbyrollup=(0,L.Ze)(y.sortby,y.sortdirection)),null==(m
5=e.SearchParameters)||m.Set(y,!1);let n=O;v.length>0&&(n+="#"+v),(0,k.n)(y,"Init",n)}else{T=(0,C.A)(T);let t=await eo(T,!0);if(H.Clicked()&&(i=Y(history.state)),y=i||(0,g.A)(P,t),y=await Z(y),y=await K(e,y),M&&(y.view=viewOverrideParams.view,y.sortby=viewOverrideParams.sortBy,y.sortbyrollup=viewOverrideParams.sortByRollup),((v=er(y,D,await eo(["latitude","longitude","facilityid","searchtype","view","sortby"],!0))).indexOf("q=")>-1||v.indexOf("qc=")>-1)&&Promise.resolve().then(a.bind(a,48966)).then(({GoogleAnalytics:e})=>e.TrackPageView(O+"?"+v)),l)return v;y.sortby&&(y.sortbyrollup=(0,L.Ze)(y.sortby,y.sortdirection)),null==(p=e.SearchParameters)||p.Set(y,!1);let n=(0,w.A)(y,e=>!(0,h.A)(e)),r=(0,w.A)(S,e=>!(0,h.A)(e));if(!H.Clicked()&&!(0,c.A)((0,g.A)(n,"facilityid"),(0,g.A)(r,"facilityid"))){let e=O;v.length>0&&(e+="#"+v),(0,k.G)(y,"",e)}H.SetClicked(!1)}let F=await e.GetRestoreFedSearchKey(),N=document.querySelector("#fedresults"),I=Array.from(document.querySelectorAll(".list-refined-items"));(0,u.A)(F)||e.SetRefinedResultsDisplay(F,N,I)}async function J(e){return await Q(e,!1,"",null,!0)}function ee(e){let t=Number(e);return null!=e&&isFinite(t)?t:null}async function et(e,t=null,a=["searchtype"],n=!1){var l,r,s,c,h,f,m,p,y;B||(B=(0,_.Q)());let{urlHash:g,hasResults:w,lastGoPlaySearchLocation:b}=(0,U.bP)(B),S=["private-clubs"];if((0,o.A)(S,window.location.pathname.substring(1)))return;let C=`${window.location.origin}${window.location.pathname}${window.location.search}`,A=null==(l=(e=null!=e?e:searchController).SearchParameters)?void 0:l.GetLc(),M=(0,L.zv)(A.searchtype),T=M===searchType_Favorites,F=(0,o.A)(S,window.location.pathname.substring(1));(0,o.A)(["tee-times/courses-near-me"],window.location.pathname.substring(1)),(0,o.A)(["tee-times/hot-deals"],window.location.pathname.substring(1)),(0,o.A)(["tee-times/best-golf-courses-near-me/search"],window.location.pathname.substring(1));let N=(0,o.A)(["tee-times/promo-codes-and-offers"],window.location.pathname.substring(1));null===t?((t=A)&&(t.sortbyrollup=A.sortbyrollup,t.sortby=A.sortby,t.view=A.view),t=await Z(t),t=await K(e,t)):"searchType"in t&&(t=null!=(s=null==(r=e.SearchParameters)?void 0:r.LowercaseKeys(t))?s:null);let E=(0,L.fJ)(null,viewOverrideParams.view);(T||N||n)&&a.push("view","ratetype","facilityids","longitude","latitude"),a=await eo(a,!0),n&&(a=(0,P.A)(a,"hotdealsonly")),F&&(a=(0,P.A)(a,"longitude","latitude")),N&&(a=(0,P.A)(a,"promotedcampaignsonly"));let I=(0,i.A)(A,t);if((null==t?void 0:t.latitude)&&(null==t?void 0:t.longitude)&&I.latitude&&(I.longitude||M===R.nX.Destination||viewOverrideParams.disableLocationChange)){if(M===R.nX.Destination&&(null===I.latitude||null===I.longitude)){let t=null==(c=e.SearchParameters)?void 0:c.Get();I.latitude=null!=(h=null==t?void 0:t.latitude)?h:null,I.longitude=null!=(f=null==t?void 0:t.longitude)?f:null,I.location=I.address=null==t?void 0:t.address}}else{let e=q(),t=null==e?void 0:e.Latitude,a=null==e?void 0:e.Longitude;if((0,O.isValidCoordinate)(t)&&(0,O.isValidCoordinate)(a)){let n=(0,D.in)(null!=e?e:{},t,a);I.latitude=t,I.longitude=a,I.address=I.location=n}}let x=er(I=(0,v.A)(I,d.A),E,a=await eo(a.concat(["sortbyrollup","searchtype"]),!0));if(g.value=er(I,E,a.concat("view","ratetype","facilityids","longitude","latitude")),n)return x;let G=null==(m=e.SearchParameters)?void 0:m.Set(I,!0);if(H.Clicked())H.SetClicked(!1),null==(y=e.SearchParameters)||y.Set(G,!1),b.value={latitude:ee(I.latitude),longitude:ee(I.longitude)};else{let t=x.length?`${C}#${x}`:C;if(F)window.location.hash=x;else{let a=!0,n=b.value;n&&w.value&&I.latitude==n.latitude&&I.longitude==n.longitude&&(a=!1);try{e.IsRequestPending()?(0,k.G)(G,"HandleGoPlayUrlHash",t):window.location.hash=x}catch(e){(0,L.SS)(e)}if(!a)return;null==(p=e.SearchParameters)||p.Set(G,!1),b.value={latitude:ee(I.latitude),longitude:ee(I.longitude)}}}let j=await e.GetRestoreFedSearchKey();if(!(0,u.A)(j)){T&&(j.location="");let t=document.querySelector("#fedresults"),a=Array.from(document.querySelectorAll(".list-refined-items"));e.SetRefinedResultsDisplay(j,t,a)}}async function ea(e,t){return await et(e,null,t,!0)}async function en(e,t,a,n,l=!1){var r,o,s,u,c,d;if(null===(e=e||searchController))return Promise.resolve("");B||(B=(0,_.Q)());let{urlHash:h}=(0,U.bP)(B);a=a||await eo([],!0),n=n||!1;let f=(0,L.fJ)(null,(0,L.bf)(R.nX.GeoLocation)),m=null!=(o=null==(r=e.SearchParameters)?void 0:r.GetLc())?o:f,p=(0,L.zv)(null==m?void 0:m.searchtype);null===t?(null!==(t=W())&&(t.sortbyrollup=m.sortbyrollup,t.sortby=m.s
5ortby,t.view=m.view),t=await Z(t),t=await K(e,t)):t.view!==m.view&&(t=await Z(t),l=!0);let y=(0,i.A)(m,(0,g.A)(t,a));if((null==t?void 0:t.location)&&"string"==typeof t.location&&""!==t.location.trim()&&(y.location=t.location,y.address=t.location),y.latitude=y.latitude||null,y.longitude=y.longitude||null,(null===y.latitude||void 0===y.latitude||null===y.longitude||void 0===y.longitude)&&p!==searchType_Destination)try{let e=await (0,O.LocationData)();y.latitude=null==e?void 0:e.Latitude,y.longitude=null==e?void 0:e.Longitude,l=!0}catch(e){(0,L.SS)(e)}else if(p===searchType_Destination&&(null===y.latitude||null===y.longitude)){let{latitude:t,longitude:a}=null==(s=e.SearchParameters)?void 0:s.GetLc();y.latitude=t,y.longitude=a,l=!0}Number(null!=(u=t.radius)?u:0)>(0,L.hi)(null)&&(y.radius=(0,L.hi)(null),l=!0);let v=async(e,t)=>{if(t!==R.nX.GeoLocation||e.address&&""!==e.address)return e;{if(e.location&&"string"==typeof e.location&&""!==e.location.trim())return e.address=e.location,e;let t=null,a=null;try{a=await (0,O.GeoPlacesLookupAsync)(e.latitude,e.longitude)||null}catch(e){(0,L.Ey)("validateAddressFromRecentSearches failed",e)}if(!a){let e=q(),t=null==e?void 0:e.Latitude,n=null==e?void 0:e.Longitude;(0,O.isValidCoordinate)(t)&&(0,O.isValidCoordinate)(n)&&(a=(0,D.in)(null!=e?e:{},t,n))}return a&&(e.address=a,t=e),t}},w=await v(y,p);if(null!==w&&n){let e=er(w,f,(0,S.A)(await eo([],!0),a));return h.value=e,e}if(null!==w){let t=null!=(c=(t=>{if((0,A.jb)("beforeSearch",t=>(z(e,p,t),!0)),null===e.SearchParameters)return null;e.SearchParameters.Set(t,!l);let n=e.SearchParameters.GetLc(),i=`${window.location.origin}${window.location.pathname}${window.location.search}`,r=er(n,f,a);return e.IsRequestPending()?H.Clicked()||(0,k.G)(n,"HandleGeoLocationUrlHash",`${i}#${r}`):window.location.href=`${i}#${r}`,r})(w))?c:null;null!==t&&(h.value=t,null==(d=e.SearchParameters)||d.Set(w,!0))}}async function ei(e,t){return await en(e,null,t,!0)}async function el(e){var t,a,n;
5let i=searchController,l=["radius","view","q","qc","longitude","latitude","sortby","searchtype"],{urlHash:r}=(0,U.bP)((0,_.Q)()),{isHomePageSearch:o}=(0,U.bP)((0,j.s)()),s="";switch(e){case searchType_GoPlay:case searchType_Favorites:s=null!=(t=await ea(i,l))?t:"";break;case searchType_Facility:s=null!=(a=await J(i))?a:"",o.value||(r.value=s);break;default:s=null!=(n=await ei(i,l))?n:""}return""!==s?"#"+s:s}function er(e,t,a){var n,i,l,r,o,s,u,c,d,f;let m=["timemin","timemax"],y=["pricemin","pricemax"],g=(0,v.A)(e,(e,n)=>!1===(0,p.A)(t).includes(n)||a.includes(n)||(0,h.A)(e)),w=Object.keys(g),b={},S,C=w.length;for(;C--;){let a=null!=(l=null==(i=g[S=null!=(n=w[C])?n:""])?void 0:i.toString())?l:"";if(""!==a&&a!==(null==(r=t[S])?void 0:r.toString())){if(b[S.toLowerCase()]=a.toString(),m.includes(S)){let a=m.indexOf(S),n=null!=(o=m[+(0===a)])?o:"";""!==n&&null==e[n]&&(b[n]=null!=(u=null==(s=t[n])?void 0:s.toString())?u:"")}if(y.includes(S)){let a=y.indexOf(S),n=null!=(c=y[+(0===a)])?c:"";""!==n&&null==e[n]&&(b[n]=null!=(f=null==(d=t[n])?void 0:d.toString())?f:"")}}}return b.date&&(b.date=b.date.replace(/,/g,"")),new URLSearchParams(b).toString()}async function eo(e=[],t=!1){(await F.FederatedSearch.GetDefinedPageRefinements()).forEach(t=>{var a;if(t.mode===R.PF.Off)switch(null==(a=t.name)?void 0:a.toLowerCase()){case"hot-deals":e.push("hotDealsOnly");break;case"time":e.push("timeMin","timeMax");break;case"price-range":e.push("priceMin","priceMax");break;case"distance":e.push("radius");break;case"golfers":e.push("players");break;case"holes":e.push("holes");break;case"rate-types":e.push("rateType");break;case"facility-type":e.push("facilityType");break;case"sort":e.push("sortBy")}});let a=[...new Set([...e,"defaultSort","defaultView","disableCourseView","disableLocationChange","disableViewChange","disableMapView","disableSearchResultActions","federatedSearchSettings","imagePathUrl","isTeeTimeSearchResultsPage","redirectOnSearch","searchParamsAction","vipSubscriptionSetting","searchType","teetimeId","facilityId","facilityIds","facilityName","facilitySlug","marketName","marketId","sortByRollup","sortDirection","daysout","weekday","address","rateTagCodes","tags","nextAvailableTeeTime","currentClientDate","excludeFeaturedFacilities","excludePrivateFacilities","resetLocation","teeTimeCount","timePeriod","pageNumber","pageSize","rateType","golfPassPerksOnly","bestDealsOnly","trackmanOnly","location","offPlatformCourse","exploreToggle","vipSubscriptionSetting","federatedSearchSettings"])];return t?a.map(e=>e.toLowerCase()):a}async function es(e,t=!0){let a=new URLSearchParams((0,b.A)(W()));for(let[t,n]of new URLSearchParams((0,b.A)((0,g.A)(e,await eo()))))""===n||(0,d.A)(n)||a.set(t.toLowerCase(),n);return t?a.toString():Object.fromEntries(a)}let eu={HandleUpdatedHashParameters:V,PopulateSearchHeadline:z,GetHashParams:W,NormalizeViewAndSort:Z,HandleSpecialHashParams:K,HandleFacilityUrlHash:(0,l.A)(Q,300),HandleGoPlayUrlHash:(0,l.A)(et,300),HandleGeoLocationUrlHash:(0,l.A)(en,300),GetUrlHash:el,BuildHashParamsFromSearchParams:er,isFacilitySearchType:function(e){let t=!1;switch(e){case"Facility":case"1":case 1:t=!0}return t},GetHashOmits:eo,GetModifiedHashParams:es}},79162(e,t,a){a.d(t,{AQ:()=>T,BW:()=>J,C5:()=>q,E_:()=>ek,Ey:()=>p.Ey,Gp:()=>ep,HN:()=>ed,Ju:()=>I,Jy:()=>er,KP:()=>V,LL:()=>el,Nr:()=>z,OC:()=>m.OC,OV:()=>x,Q7:()=>ea,QT:()=>D,RH:()=>eD,S1:()=>eO,SS:()=>p.SS,Sb:()=>ev,UQ:()=>R,Uq:()=>U,VY:()=>ec,Wo:()=>H,XY:()=>eI,YU:()=>Q,Ze:()=>Z,Zj:()=>eM,a8:()=>X,aO:()=>eF,bf:()=>W,dj:()=>B,fJ:()=>et,fn:()=>en,g0:()=>eL,g5:()=>eN,hi:()=>E,ht:()=>N,ip:()=>j,jQ:()=>G,lW:()=>eT,lc:()=>eu,lr:()=>k,mg:()=>eE,mx:()=>eg,ok:()=>ef,s_:()=>K,u3:()=>es,uV:()=>eA,up:()=>ey,uv:()=>Y,wN:()=>p.wN,wd:()=>ee,wi:()=>m.wi,x:()=>
5F,x8:()=>_,xd:()=>eo,yx:()=>eh,zv:()=>ei});var n,i,l=a(64741),r=a(21395),o=a(9703),s=a(21690),u=a(99301),c=a(1467),d=a(72336),h=a(99790),f=a(90501),m=a(28511),p=a(74742);(n=i||(i={})).standard="standard",n.compact="compact";let y=nonPostalCodeCountries||["ie","bm","fj"],g=countriesWithStates||["au","bm","ca","cw","cz","eng","gb","hn","ie","jm","mx","nir","nx","pr","sk","sct","us","wls"],v=defaultSearchRadius,w=v,b=v,S=maximumSearchRadius,C=defaultListSort,P="GolfNow.TeeTimeOffer",A="https://www.golfnow.eu/",L=function(){let e="GolfNow.TimePeriodOptions",t=(0,u.IR)(e);if(t&&t.length>0)return t;let a=[];a.push("12:01 AM"),a.push("12:30 AM");for(let e=1;e<=11;e++)a.push(`${e} AM`),a.push(`${e}:30 AM`);a.push("12:01 PM"),a.push("12:30 PM");for(let e=1;e<=8;e++)a.push(`${e} PM`),a.push(`${e}:30 PM`);for(let e=9;e<=11;e++)a.push(`${e} PM+`),a.push(`${e}:30 PM+`);return a.push("11:59 PM"),(0,u.HI)(e,a),a}(),M=[{key:"Facilities.Name",display:"A-Z"},{key:"Facilities.Rating",display:"Rating"},{key:"Facilities.Distance",display:"Closest"},{key:"Date",display:"Time"},{key:"GreensFees",display:"Price"}];(0,s.A)(0,49,6);let O=new Map;function D(e){return""===e?"":/GolfPass\+$/gi.test(e)?"golfpass-plus-badge bg-contain bg-no-repeat float-left w-20 h-5":/GolfPass\+\sVIP$/gi.test(e)?"golfpass-plus-vip-badge bg-contain bg-no-repeat float-left w-20 h-5":"vip-badge bg-contain bg-no-repeat float-left w-20 h-5"}function T(e){var t;let a=""!==window.location.hash?Object.fromEntries(new URLSearchParams(document.location.hash.substring(1))):{};if(e=e||a.view||W(),!(0,o.A)(e))return v;let n=null!=(t=null==viewOverrideParams?void 0:viewOverrideParams.searchParamsAction)?t:"Client",i="Client"===n||"Client"===n.toString()?0:Number(null==viewOverrideParams?void 0:viewOverrideParams.radius)||0;switch(null==e?void 0:e.toLowerCase()){case"course":return Math.max(i,w);case"list":case"map":return Math.max(i,b);default:return Math.max(i,v)}}function k(e){return e=void 0===e?"":e,!y.includes(e.toLowerCase())}function F(){return defaultUnits}function N(e){return b}function E(e){return S}function R(e){v=e}function I(e){S=e}function x(e){w=e}function G(e){b=e}function _(e){e.toLowerCase()}function U(e){return L[e=null==e?0:Number(e)]}function j(){return 10}function H(){return L.length-7}function B(){return M}function q(){return 0}function V(){return 130}function z(){return 1e4}function W(e){var t;switch(ei(e=null!=e?e:(0,r.A)(viewOverrideParams)?0:viewOverrideParams.searchType)){case d.nX.GeoLocation:return defaultListView;case d.nX.Facility:return((null==viewOverrideParams?void 0:viewOverrideParams.searchParamsAction)===1?viewOverrideParams.view:null!=(t=(0,u.IR)("GolfNow.FacilityView"))?t:"")||"Grouping";default:return defaultListView}}function X(){return(0,r.A)(viewOverrideParams)?defaultListSort:viewOverrideParams.defaultSort||defaultListSort}function Y(){var e;return Z(X(),(0,r.A)(viewOverrideParams)?0:null!=(e=viewOverrideParams.sortDirection)?e:0)}function Z(e,t){switch(e=null==e?C:e){case"Date":if("number"==typeof t)return e+(0===Number(t)?".MinDate":".MaxDate");return e+(t===d.UE.Asc?".MinDate":".MaxDate");case"GreensFees":if("number"==typeof t)return e+(0===Number(t)?".MinPrice":".MaxPrice");return e+(t===d.UE.Asc?".MinPrice":".MaxPrice");default:return e}}function K(){return 366}function Q(){return"all"}function J(){return excludeFeaturedFacilitiesDefault||!1}function ee(e,t){let{default:n}=a(9741);return new n({latitude:null,longitude:null,facilityId:null,facilityIds:null,teeTimeId:null,marketId:null,hotDealsOnly:!1,promotedCampaignsOnly:!1,priceMin:0,priceMax:z(),players:0,timeMin:10,timeMax:H(),timePeriod:null,radius:T(t),holes:d.GS.Any,searchType:null,date:(0,c.hR)().toDateDisplayString(!1),view:null!=t?t:W(null),sortBy:X(),sortByRollup:Y(),rateType:Q(),facilityType:d.mU.Any,trackmanOnly:!1})}function et(e,t){return ee(e,t).GetLc()}function ea(){(0,u.Uz)("avatarUrlCache",""),(0,u.Uz)("avatarUrlCacheHasChanged","")}function en(e){return $("<div/>").html(decodeURIComponent(e).replace(/\+/g," ")).text()}function ei(e){let t;switch(null==e?void 0:e.toString().toLowerCase()){case"geolocation":case"0":case 0:default:t=d.nX.GeoLocation;break;case"facility":case"1":case 1:t=d.nX.Facility;break;case"market":case"2":case 2:t=d.nX.Market;break;
5case"destination":case"3":case 3:t=d.nX.Destination;break;case"goplay":case"4":case 4:t=d.nX.GoPlay;break;case"favorites":case"5":case 5:t=d.nX.Favorites}return t}function el(e){(0,u.HI)(P,e)}function er(){let e=(0,u.IR)(P);return e&&0!==e.length?e:null}function eo(e,t){var n,i,l,r,o,s,u,c,d,h,m,p;let y=document.querySelector("meta[name='currency-code']"),g=null!=(n=null==y?void 0:y.getAttribute("content"))?n:"",v="";if(e&&"object"==typeof e&&Array.isArray(null==(m=e.ttResults)?void 0:m.facilities)){let t=null==(i=e.ttResults)?void 0:i.facilities;if(!Array.isArray(t)||0===t.length)return;let a=t[0];v=null!=(l=null==a?void 0:a.currencyCode)?l:""}else if(e&&"object"==typeof e&&Array.isArray(null==(p=e.ttResults)?void 0:p.teeTimes)){let t=null==(r=e.ttResults)?void 0:r.teeTimes;if(!Array.isArray(t)||0===t.length)return;let a=null==(o=t[0])?void 0:o.teeTimeRates,n=Array.isArray(a)&&a.length>0?a[0]:void 0;v=null!=(c=null==(u=null==(s=null==n?void 0:n.singlePlayerPrice)?void 0:s.greensFees)?void 0:u.currencyCode)?c:""}else if(e&&"object"==typeof e&&"todaysTeeTimes"in e&&Array.isArray(e.ttResults)){let t=e.ttResults;if(!Array.isArray(t)||0===t.length)return;let a=t.flatMap(e=>Array.isArray(null==e?void 0:e.teeTimes)?e.teeTimes:[]).find(e=>{var t;return null==(t=null==e?void 0:e.price)?void 0:t.currencyCode});v=null!=(h=null==(d=null==a?void 0:a.price)?void 0:d.currencyCode)?h:""}v&&g!==v&&(y&&y.setAttribute("content",v),Promise.resolve().then(a.bind(a,9612)).then(({UrlParams:e})=>e.PopulateSearchHeadline(searchController,t,null)),(0,f.Mr)("currencyCodeChanged",v))}function es(e){return null==e?`0${defaultUnits}`:`${e}${defaultUnits}`}function eu(e,t,a){let n=new Date;n.setDate(n.getDate()+a),t=encodeURI(t)+(null===a?"":`; expires=${n.toUTCString()}`),document.cookie=`${e}=${t}; path=/; samesite=none; domain=${location.host.substring(location.host.indexOf("."))}; secure;`}function ec(e){var t,a,n,i,l;let r,o,s,u=document.cookie.split(";");for(r=0;r<u.length;r++)if(o=null==(t=u[r])?void 0:t.substring(0,null==(a=u[r])?void 0:a.indexOf("=")),s=null==(n=u[r])?void 0:n.substring((null!=(l=null==(i=u[r])?void 0:i.indexOf("="))?l:0)+1),(o=o.replace(/^\s+|\s+$/g,""))===e)return decodeURI(s);return null}function ed(){var e;let t=document.getElementById("facility-listing");return null!=(e=null==t?void 0:t.classList.contains("fdi-left-side"))&&e}function eh(){let e=window.location.pathname.toLowerCase().startsWith("/fitting/facility/")&&!bestDealsFacilityPage?redirectToFittingsFacilityLink:redirectToFacilityLink;return bestDealsFacilityPage?redirectToBestDealsFacilityLink:e}function ef(e){let t=`${null!=gnSiteLocale?gnSiteLocale:""}|${e}`;if(O.has(t))return O.get(t);let a=new Date;a.setHours(20);let n="",i=e.indexOf(" "),l=e.indexOf("+")>-1,r=a.toLocaleString().indexOf("PM")>-1;if(i>-1){let t,i=e.split(" "),l=t=i[0],r=i[1];if(l.indexOf(":")>0){var o=l.split(":");t=o[0],n=o[1]}let s=12!=t&&r.indexOf("PM")>-1?Number(t)+12:Number(t);s=s>=24?23:s,a.setHours(s),""!==n&&a.setMinutes(Number(n))}else a.setHours(Number(e));let s=r&&"en-US"===gnSiteLocale?""===n?"h a":"h:mm aa":"HH";s+=l?"+":"";let u=(0,c.Gl)(a,s);return O.set(t,u),u}let em=new Set(["at","be","bg","cy","cz","de","dk","ee","es","fi","fr","gr","hr","hu","ie","it","lt","lu","lv","mt","nl","pl","pt","ro","se","si","sk","ch","is","li","no"]);function ep(e){let t=e.toLowerCase();switch(t){case"uk":case"gb":return"https://www.golfnow.co.uk/";case"au":return"https://www.golfnow.com.au/";case"eu":return A;default:if(em.has(t))return A}}function ey(e){if(null==e)return{};let t="",a="",n=e.toLowerCase();switch(n){case"uk":case"gb":t="UK",a="United Kingdom";break;case"au":t="AU",a="Australia";break;case"eu":t="EU",a="Europe";break;default:em.has(n)&&(t="EU",a="Europe")}return{countryCode:t,countryName:a}}function eg(e,t,a=i.compact){return Number(e).toLocaleString(void 0,{style:"currency",currency:t,notation:a})}let ev=()=>{var e;return null!=(e=HTMLScriptElement.supports)&&!!e.call(HTMLScriptElement,"speculationrules")&&document.prerendering},ew=/^[a-zA-Z0-9 .&'-]+$/,eb=/^(\d{5}|\d{9})$/,eS=/^[ABCEGHJ-NPRSTVXY]{1}[0-9]{1}[ABCEGHJ-NPRSTV-Z]{1}[ ]?[0-9]{1}[ABCEGHJ-NPRSTV-Z]{1}[0-9]{1}$/i,eC=/^\d{16}$/,eP=/^(?=(.*?\d){10}
5)(\+\s?)?(\(\+?\d+([\s\-\.]?\d+)?\)|\d+)([\s\-\.]?(\(\d+([\s\-\.]?\d+)?\)|\d+))*(\s?(x|ext\.?)\s?\d+)?(\s)*$/,eA=e=>ew.test(e),eL=e=>eP.test(e),eM=(e,t)=>{if(!t)return!1;let a=t.toLowerCase();return!k(a)||("us"===a?eb.test(e):"ca"!==a||eS.test(e))},eO=(e,t,a)=>!!t&&(!k(t.toLowerCase())||!a||e.trim().length>0),eD=(e,t,a)=>{var n;return!!t&&(n=void 0===(n=t.toLowerCase())?"":n,!g.includes(n.toLowerCase())||!a||e.trim().length>0)};function eT(e){return navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e):new Promise((t,a)=>{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.opacity="0",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();try{let e=document.execCommand("copy");document.body.removeChild(n),e?t():a(Error("execCommand copy failed"))}catch(e){document.body.removeChild(n),a(e)}})}function ek(){let e=document.location.pathname;for(let[t,a]of Object.entries({home:/^\/$/,facilityPage:/^\/tee-times\/facility\/[\w-]+\/search$/,teeTimeDetails:/^\/tee-times\/facility\/\d+\/tee-time\/\d+$/,hotDeals:/^\/tee-times\/hot-deals$/,coursesNearMe:/^\/tee-times\/courses-near-me$/,bestCourses:/^\/tee-times\/best-golf-courses-near-me\/search$/,golfPass:/^\/memberships\/golfpass$/}))if(a.test(e))switch(t){case"facilityPage":return"Facility Page";case"teeTimeDetails":return"Tee Time Details";case"hotDeals":return"Hot Deals Near Me";case"bestCourses":return"Best Courses Near Me";case"golfPass":return"GolfPass Landing Page";default:return t.charAt(0).toUpperCase()+t.slice(1).replace(/([A-Z])/g," $1").trim()}return e}let eF={errorPlacement:function(e,t){e.appendTo(t.parent("div").next("p"))},errorClass:"text-problem"};function eN(e,t){let a=new Set,n=new Set,i=(0,l.A)(t=>{e(...t).then((...e)=>{a.forEach(t=>t(...e)),a.clear()}).catch((...e)=>{n.forEach(t=>t(...e)),n.clear()})},t);return(...e)=>new Promise((t,l)=>{a.add(t),n.add(l),i(e)})}function eE(e){if("boolean"==typeof e)return e;if("string"==typeof e){let t=e.toLowerCase().trim();return"true"===t||"1"===t||"yes"===t}return"number"==typeof e&&0!==e}let eR=!1,eI=()=>{if(!eR){if("u"<typeof $||!$.validator)throw Error("initJQueryExtensions: $.validator is not available. Callers must await loadLegacyFormValidation() before invoking this function.");eR=!0,$.validator.addMethod("gnRegexValidate",function(e,t,a){var n,i;let l=null!=(n=t.dataset.valRegexPattern)?n:"",r=null!=(i=t.dataset.valRegex)?i:null;r&&(null==a?void 0:a.length)&&(a[a.length]=r);let o=new RegExp(l);return this.optional(t)||o.test(e)},$.validator.format("{1}")),$.validator.addMethod("gnDateOfBirthValidate",function(e,t,a){let n=$(a).val(),i=new Date,l=i.getFullYear(),r=i.getMonth(),o=i.getDate(),s=new Date(n),u=s.getFullYear(),c=s.getMonth(),d=s.getDate(),h=l-u,f=r-c,m=o-d;return!(h>100)&&((f<0||0===f&&m<0)&&(h-=1),(18!==h||!(f<=0)||!(m<=0))&&!(h<18))},"You must be older than 18."),$.validator.addMethod("gnHtmlTags",function(e,t,a){return!$(a).val().match(/<[^>]*>/g)},"Invalid input."),$.validator.addMethod("gnPostalCodeFormat",function(e,t,a){return eM(e,$(a).val())},"Invalid Postal Code"),$.validator.addMethod("gnPostalCodeRequired",function(e,t,a){return eO(e,$(a).val(),!this.optional(t))},"The Postal Code Field Is Required."),$.validator.addMethod("gnCreditCardExpiration",function(e,t,a){let n=new Date().getMonth()+1,i=new Date().getFullYear(),l=parseInt($(a.month).val(),10),r=parseInt($(a.year).val(),10);return r=r<2e3?r+2e3:r,!l||!r||r>i||r===i&&l>=n},"Invalid Expiration Date"),$.validator.addMethod("gnValidateField",function(e,t,a){return $(a).valid(),!0}),$.validator.addMethod("gnPasswordValidate",function(e,t,a){var n,i;let l=null!=(n=t.dataset.valRegexPattern)?n:"",r=null!=(i=t.dataset.valRegex)?i:null;return r&&(null==a?void 0:a.length)&&(a[a.length]=r),(""!==l?new RegExp(l):/^(?=.*[A-Za-z])(?=.*\d)(?!.*[\^/\\#$%@^&*+<(>)""'])[\S]{10,}$/).test(e)},$.validator.format("{0}")),$.validator.addMethod("gnPasswordLoginValidate",function(e,t,a){var n,i;let l=null!=(n=t.dataset.valRegexPattern)?n:"",r=null!=(i=t.dataset.valRegex)?i:null;return r&&(null==a?void 0:a.length)&&(a[a.length]=r),(""!==l?new RegExp(l):/^(?=.*[A-Za-z])(?=.*\d)(?!.*[\^/\\#$%@^&*+<(>)""'])[\S]{8,}$/).test(e)},$.validator.format("{0}
5")),$.validator.addMethod("gnUserNameValidate",function(e,t,a){return/^[a-zA-Z0-9]+$/g.test(e)},$.validator.format("{0}")),$.validator.addMethod("gnNameValidate",function(e){return eA(e)},$.validator.format("{0}")),$.validator.addMethod("gnCreditCardValidate",function(e){return eC.test(e.replace(/\s/g,""))},"Invalid credit card number"),$.validator.addMethod("gnEmailValidate",function(e,t,a){return/^[\w-\.]+@([\w-]+\.)+[\w-]{2,8}$/.test(e)},$.validator.format("{0}")),$.validator.addMethod("gnHandicapValidate",function(e,t,a){return/^(\d{1,10})$/.test(e)},$.validator.format("{0}")),$.validator.addMethod("gnDateValidate",function(e,t,a){let n=a[0],i=a[1];return a[2],!(i>new Date(e,n,0).getDate())||(0,h.f)(new Date(e,n,i))},$.validator.format("{3}")),$.validator.addMethod("le",function(e,t,a){let n=$(a).val();return this.optional(t)||!n||parseInt(e)<=parseInt(n)},"Invalid Value"),$.validator.addMethod("slt",function(e,t,a){let n=$(a).val();return this.optional(t)||!n||parseInt(e)<parseInt(n)},"Invalid Value"),$.validator.addMethod("ge",function(e,t,a){let n=$(a).val();return this.optional(t)||!n||parseInt(e)>=parseInt(n)},"Invalid Value"),$.validator.addMethod("sgt",function(e,t,a){let n=$(a).val();return this.optional(t)||!n||parseInt(e)>parseInt(n)},"Invalid Value"),$.validator.addMethod("equalToIgnoreCase",function(e,t,a){return this.optional(t)||e.toLowerCase()===$(a).val().toLowerCase()})}}},70825(e,t,a){a.d(t,{d:()=>
5l,t:()=>i});let n=globalThis;function i(e){n.__GN_DRAWER_OPEN_STATE__=e}function l(){var e;return null!=(e=n.__GN_DRAWER_OPEN_STATE__)&&e}void 0===n.__GN_DRAWER_OPEN_STATE__&&(n.__GN_DRAWER_OPEN_STATE__=!1)},18064(e,t,a){a.d(t,{j3:()=>u,y9:()=>h,Ez:()=>f,X:()=>m,E1:()=>d,f0:()=>c});let n=(()=>{var e;let t=null!=(e=(()=>{var e,t;let a=window,n=null==(e=document.querySelector('meta[name="asset-prefix"]'))?void 0:e.content,i=a.__SITE_CONFIG__,l=null!=(t=null==i?void 0:i.useCdn)&&t,r=null==i?void 0:i.cdnUrl;if(l&&"string"==typeof r&&r.trim().length>0)return r.trim();for(let e of[a.topDomainAssetPrefix,null==i?void 0:i.assetPrefix,null==i?void 0:i.cdnUrl,n])if("string"==typeof e){let t=e.trim();if(t.length>0)return t}return null})())?e:"/";try{let e,a=(e=t.trim(),/^https?:\/\//i.test(e)?new URL(e):e.startsWith("//")?new URL(`${window.location.protocol}${e}`):new URL(e.startsWith("/")?e:`/${e}`,window.location.origin));return a.pathname.endsWith("/")||(a.pathname=`${a.pathname}/`),new URL("dist/",a).toString()}catch{return new URL("dist/",window.location.origin).toString()}})();a.p!==n&&(a.p=n,console.log(`[Runtime Public Path] Set to: ${n}`));var i=a(74742),l=a(92378);let r=globalThis,o=()=>{var e;return null!=(e=r.jQuery)?e:r.$},s=e=>new URL(e,n).toString(),u=()=>(0,l.h)(s("js/legacy/lightslider.bundle.js"),()=>{var e,t;return"function"==typeof(null==(t=null==(e=o())?void 0:e.fn)?void 0:t.lightSlider)}),c=async()=>{try{return await (0,l.h)(s("js/jquery-validation.bundle.js"),()=>{var e;return!!(null==(e=o())?void 0:e.validator)}),!0}catch(e){return(0,i.SS)("jQuery form validation unavailable:",e),!1}},d=()=>{var e;let t=o();return!!(null==t?void 0:t.validator)&&"function"==typeof(null==(e=null==t?void 0:t.fn)?void 0:e.valid)},h=()=>(0,l.h)(s("js/legacy/picker.bundle.js"),()=>{var e,t;return"function"==typeof(null==(t=null==(e=o())?void 0:e.fn)?void 0:t.pickadate)}),f=()=>(0,l.h)(s("js/legacy/nouislider.bundle.js"),()=>{var e;return"function"==typeof(null==(e=r.noUiSlider)?void 0:e.create)&&"function"==typeof r.wNumb}),m=()=>(0,l.h)(s("js/legacy/suncalc.bundle.js"),()=>{var e;return"function"==typeof(null==(e=r.SunCalc)?void 0:e.getTimes)})},92378(e,t,a){a.d(t,{h:()=>i});let n=new Map;function i(e,t,a){var i;if(t())return Promise.resolve();let l=n.get(e);if(l)return l;let r=null!=(i=null==a?void 0:a.pollTimeoutMs)?i:0,o=a=>{let n=null,i=!0;return new Promise((a,l)=>{(n=document.createElement("script")).src=e,n.defer=!0,n.dataset.legacyScript="",n.onload=()=>{if(t())return void a();if(r<=0)return void l(Error(`Legacy script loaded without expected global: ${e}`));let n=Date.now()+r,o=setInterval(()=>{t()?(clearInterval(o),a()):Date.now()>=n&&(i=!1,clearInterval(o),l(Error(`Legacy script loaded without expected global: ${e}`)))},50)},n.onerror=()=>l(Error(`Failed to load legacy script: ${e}`)),document.head.appendChild(n)}).catch(e=>{if(null==n||n.remove(),a>0&&i)return o(a-1);throw e})},s=o(2).catch(t=>{throw n.delete(e),t});return n.set(e,s),s}},27493(e,t,a){let n;a.r(t),a.d(t,{getLocationData:()=>m,init:()=>p,showFooterText:()=>f});var i=a(51422),l=a(79162),r=a(33259),o=a(39286),s=a(46222),u=a(53049),c=a(18064);let d=globalThis;async function h(e){var t;let{showMessage:a}=(0,i.A)(),{handleRequestError:l}=(0,u.r)();if($(".signup-state").val(e.State),$(".signup-latitude").val(e.Latitude),$(".signup-longitude").val(e.Longitude),(0,c.E1)()&&!$(n).valid())return;let r=n.querySelector("button");null!==r&&r.setAttribute("disabled","disabled");let h=new o.default("string"==typeof d.topDomainAssetPrefix?d.topDomainAssetPrefix:void 0),f=new s.v({email:n.Email.value,postalCode:n.PostalCode.value,stateProv:n.StateProv.value,latitude:n.Latitude.value,longitude:n.Longitude.value,businessUnitId:n.BusinessUnitId.value,source:n.Source.value,sourceType:n.SourceType.value});try{let e=await h.postEmailSubscribe(f);if(e.success)a("Email Subscription","Thank You for your subscription."),n.reset();else{let t=null;if(e&&e.modelState&&(t=e.modelState),t)if(t.unhandledExceptions){let e=t.unhandledExceptions[0];a("Subscription Error",e)}else{let e={field:""};for(let a in t)if(t.hasOwnProperty(a)){let n=a.split(".")[1],i=t[a][0];n&&i&&(e[n]=i)}$.isEmptyObject(e)||n.showErrors(e)}
5else a("Subscription Error","There was an error submitting the form, please try again.")}}catch(e){a("Subscription Failed","There was an error submitting the form, please try again."),l(e,"Subsribe Failed")}finally{$("button:submit, button:reset").removeAttr("disabled");let e=n.querySelector(".signup-email");null!==e&&(e.value="");let a=n.querySelector(".signup-postal");null!==a&&(a.value=""),null!==r&&(null==(t=r.querySelector(".ion-load-d"))||t.remove(),r.removeAttribute("disabled"))}return!1}function f(){$("#email-signup .email-signup-header-footer").show(),$("#email-signup .email-signup-privacy-footer").show(),$("#email-signup .email-signup-header").hide(),$("#email-signup .email-signup-privacy").hide(),$("#quickOptInFooter button:submit").removeClass("expand")}async function m(e){try{if(null!==e&&(n=e),(0,c.E1)()||await (0,c.f0)(),(0,c.E1)()&&!$(n).valid())return!1;(0,r.LocateMe)(!1,h,h)}catch(e){(0,l.SS)("QuickOptIn Error: ",e)}return!1}async function p(e){var t;let a=null!=(t=null==e?void 0:e.dataset.prefix)?t:null;if(null!==e){if(!await (0,c.f0)())return;(0,l.XY)(),$(e).validate({errorPlacement:function(e,t){e.appendTo(t.parent("div").next("p"))},errorClass:"text-xs text-problem",rules:{Email:{gnEmailValidate:"Enter a valid email."},PostalCode:{gnPostalCodeRequired:`.signup-postal-${a}`,gnPostalCodeFormat:`.signup-postal-${a}`}},onfocusout:function(e){let t=$(e);t.valid()?t.parent("label").removeClass("error").addClass("valid"):t.parent("label").removeClass("valid").addClass("error")},submitHandler:m})}"footer"===a&&((0,r.Country)().then(function(e){"us"===e.toLowerCase()&&$("#footer-email-optin-copy").removeClass("hide")}),f())}},6338(e,t,a){a.d(t,{FederatedSearch:()=>F});var n=a(76640),i=a(64741),l=a(66401),r=a(97859),o=a(21395),s=a(23149),u=a(9703),c=a(96034),d=a(84430),h=a(79162),f=a(33259),m=a(1098),p=a(99301),y=a(5804),g=a(9612),v=a(59551),w=a(48966),b=a(72336);let S=!1,C=!1,P=!1;async function A(e){var t,a,i,l,s,u,d;let f,m,p=null==(t=e.SearchParameters)?void 0:t.Get(),v=(0,h.wd)(null,null==p?void 0:p.view);f=p,m=(0,c.A)(v,r.A),(p=(0,n.A)(f,m,(e,t)=>(0,r.A)(e)?t:e))&&(null!=(a=p.timeMin)?a:0)<=(0,h.ip)()&&(p.timeMin=(0,h.ip)()),p&&(null!=(i=p.timeMax)?i:0)>=(0,h.Wo)()&&(p.timeMax=(0,h.Wo)()),p&&(null!=(l=p.priceMax)?l:0)>130&&(p.priceMax=(0,h.Nr)());let w=e.GetPickerSelectedDate();w&&(e.SetNavDatePickerDate(w),e.SetDate(w,!0));let S=(0,h.zv)(null!=(s=null==p?void 0:p.searchType)?s:viewOverrideParams.searchType);if(S===b.nX.Facility){let t=(null==p?void 0:p.facilityId)||viewOverrideParams.facilityId,a=(0,h.yx)().toLowerCase().replace("~facilityid~",t);a=a.substring(0,a.lastIndexOf("/")),p&&(null==(u=e.SearchParameters)||u.Set(p));let n=!window.location.pathname.startsWith(a);await g.UrlParams.HandleFacilityUrlHash(e,n,a+"/search")}else if(e.SaveCurrentFederatedSearchParameters(),e.ShouldRedirectOnSearch())if(S===b.nX.Favorites||S===b.nX.GoPlay)await g.UrlParams.HandleGoPlayUrlHash(e,p);else{let t=(0,c.A)(p,o.A);e.RedirectToCustomSearchPage(t)}else{p&&(e.SaveSearchParameters(p),null==(d=e.SearchParameters)||d.Set(p,!1));let t=await e.GetRestoreFedSearchKey();t&&e.SetRefinedResultsDisplay(t,$("#fedresults"),$(".list-refined-items"))}(0,y.CloseFederatedSearch)()}async function L(){let e=await (0,d.s6)(),t=(0,h.dj)();return e&&e.views&&!(0,l.A)(e.views)?e.views.map(function(e){var a;let n=null==(a=e.sorts)?void 0:a.map(function(e){let a=t.find(t=>t.key===e.name)||null;return null!==a&&(e.Display=a.display),e});return{view:e.name,sorts:n}}):((0,h.Ey)("::getSortDisplayNames::Unable to get page config"),[{view:"",sorts:[]}])}async function M(e){var t,a;let n="",i=await L(),l=null!=(t=null==i?void 0:i.find(t=>t.view===e.view))?t:null,r=null!==l?l.sorts:[];try{$.observable(e.sortDisplayNames).refresh(r)}finally{if(r&&r.length>0){let t=null!=(a=e.sortDisplayNames.find(t=>t.name===e.sortBy))?a:null;null!==t&&(n=t.Display)}else $.observable(e).setProperty({sortBy:"",sortByRollup:""});return n}}async function O(e,t){var a,n,i;let l="",r=await L(),o=null!=(a=null==r?void 0:r.find(t=>t.view===e))?a:null,s=null!==o?o.sorts:[];if(s&&s.length>0){let e=null!=(n=s.find(e=>e.name===t))?n:null;null!==e&&(l=null!=(i=e.name)?i:"")}return{display:l,sortDisplayNames:s}}async function D(e,t,a,n){if(searchController.teeTimesLoading)return!1;let i=t+"|"+a,l=null;if((0,u.A)(i)&&""!==i){let r=searchController.SearchParameters.Get();if(!await v.G.isSortAllowed(i,e.view))return void(0,d.Mr)("close-result-action-menus",null);let o=document.querySelector("gn-search-filters");if((null==o?void 0:o.getAttribute("sortby"))!==t){null==o||o.setAttribute("sortdirection",a),null==o||o.setAttribute("sortby",t),null!==(l=await O(e.view,t))&&""!==l.display&&$.observable(e).setProperty("sortDisplay",l.display);return}
5if(r.SortBy+"|"+r.SortDirection!==i){let t=searchController.ChangeSort(i,n);l=await O(e.view,t.sortBy),null==o||o.setAttribute("sortbyrollup",t.sortByRollup),null==o||o.setAttribute("sortdirection",t.sortDirection)}else l=await O(e.view,t);null!==l&&$.observable(e.sortDisplayNames).refresh(l.sortDisplayNames),(0,d.Mr)("close-result-action-menus",null)}}async function T(e,t,a){if(!searchController.teeTimesLoading){let n=document.querySelector("gn-search-filters"),i=searchController.SearchParameters.Get();n&&n.getAttribute("view")!==t&&n.setAttribute("view",t),searchController.ChangeView(t,i,a),await v.G.handleSortState(null),await M(e),""!==i.SortBy&&e.sortBy!==i.SortBy?(await O(e.view,e.sortBy)).display:e.sortDisplay}}function k(e,t){let a;switch(e){case"hotdealsonly":case"promotedcampaignsonly":case"trackmanonly":case"radius":case"pricemin":case"pricemax":a=t;break;case"timemin":case"timemax":a=(0,h.Uq)(t);break;case"players":switch(t){case"1":case 1:a="1";break;case"2":case 2:a="2";break;case"3":case 3:a="3";break;case"4":case 4:a="4";break;default:a="Any"}break;case"holes":switch(t){case"Nine":case b.GS.Nine:a="9";break;case"Eighteen":case b.GS.Eighteen:a="18";break;default:a="Any"}break;case"facilitytype":switch(t){case"GolfCourse":case b.mU.GolfCourse:a="GolfCourse";break;case"Simulator":case b.mU.Simulator:a="Simulator";break;default:a="Any"}}return a}let F={initPage:function(){$(window).on("pageshow",function(e){if(e.originalEvent.persisted){let e=setInterval(function(){searchController.IsRequestPending()||((0,y.VU)(),window.clearInterval(e))},100)}}),(0,d.jb)("show-refine-search-clicked",function(){S=!0}),(0,d.jb)("show-search-filters-clicked",function(e){P=e.mediumOverride||!1,((0,m.uY)()||P)&&(S=!0)}),(0,d.jb)("edit-search-clicked",function(){S=!1}),(0,d.jb)("homepage-edit-search-clicked",function(){C=!0,S=!1}),(0,d.jb)("filter-option-changed",function(e){(0,i.A)(A,300,{leading:!0})})},ApplySearchParameters:A,FacilityHandler:function(e,t){var a;let n;searchController.SearchParameters.Set({FacilityId:e,SearchType:searchType_Facility,FacilityName:t},!0),searchController.AddRecentSearch(e,t,"FACILITY"),$("#fedsearch").val(t),!S&&!C&&(0,m.uY)()?$("#applyBtn").click():(a=e,n=redirectToFacilityLink.toLowerCase().replace("~facilityid~",a),window.location.href=n)},PlaceLatLongHandler:function(e,t){null!==e?placeDetailService.getDetails({placeId:e},async function(a,n){if(n===google.maps.places.PlacesServiceStatus.OK){let n=a.geometry.location,i={latitude:n.lat(),longitude:n.lng(),searchType:b.nX.GeoLocation};a.geometry.viewport&&(i.radius=await (0,f.CalculateRadius)(a.geometry.viewport)),searchController.SearchParameters.Set(i),searchController.SaveFederatedSearchParameters({Latitude:n.lat(),Longitude:n.lng(),Address:a.formatted_address,SearchType:searchType_GeoLocation}),searchController.AddRecentSearch(e,t,"GEOLOCATION",n.lat(),n.lng()),$("#fedsearch").val(t),!S&&!C&&(0,m.uY)()?$("#applyBtn").click():searchController.RedirectToCustomSearchPage(i)}else alert("Imposible to determine selected location geo location. Please try other search")}):alert("Unable to retrieve google place Id.")},GeoPlaceHandler:async function e(e){var t,a,n;(0,h.wN)("GeoPlace Handler");let i=e.id,l=e.name,r=e.lat,o=e.lon,s=await (0,f.GetGeographicDetails2)(r,o);null==(t=null==s?void 0:s.Geometry)||t.location;let u={latitude:r,longitude:o,searchType:b.nX.GeoLocation},c=!1;(null==(a=null==s?void 0:s.Geometry)?void 0:a.viewport)&&(u.radius=await (0,f.CalculateRadius)(s.Geometry.viewport),c=!0),searchController.SearchParameters.Set(u,!0),searchController.SaveFederatedSearchParameters({latitude:r,longitude:o,address:l,searchType:b.nX.GeoLocation}),null!==i&&""!==i&&searchController.AddRecentSearch(i,l,"GEOLOCATION",r,o,c?null==(n=null==s?void 0:s.Geometry)?void 0:n.viewport:null),$("#fedsearch").val(l),!S&&!C&&(0,m.uY)()?$("#applyBtn").click():searchController.RedirectToCustomSearchPage(u)},NearMeHandler:function(){(0,f.HasGPS)()&&(0,f.LocateMe)(!0,async function(e){$("input#fedsearch").val(e.Address),$(".universal-search.front-ver-b.front-ver-b-on #geo_msg").text(e.State),$(".federatedNearMe > a.nearMeLink > span").text(e.State);let t=await (0,p.a9)("View"),a={SearchType:searchType_GeoLocation,Latitude:e.Latitude,Longitude:e.Longitude,Address:e.Address,Radius:(0,h.AQ)(t)};searchController.ResetAdvancedSearchParams(),searchController.SearchParameters.Set(a,!0),searchController.SaveFederatedSearchParameters(a),!S&&!C&&(0,m.uY)()?$("#applyBtn").click():(0,y.ZS)()},function(e){(0,f.Address_City)().then(async function(t){$("input#fedsearch").val(e.Address),$(".universal-search.front-ver-b.front-ver-b-on #geo_msg").text(e.State),$(".federatedNearMe > a.nearMeLink > span").text(e.State);let a=await (0,p.a9)("View"),n={SearchType:searchType_GeoLocation,Latitude:e.Latitude,Longitude:e.Longitude,Address:e.Address,Radius:(0,h.AQ)(a)};searchController.ResetAdvancedSearchParams(),searchController.SearchParameters.Set(n,!0),searchController.SaveFederatedSearchParameters(n),!S&&!C&&(0,m.uY)()?$("#applyBtn").click():(0,y.ZS)()}).catch(h.SS)},!0)},GetDefinedPageRefinements:async function e(){let e=[],t=await (0,d.s6)();return(0,s.A)(t)&&(0,s.A)(t.refinements)?e=t.refinements:(0,h.Ey)("Unable to get defined page refinements in FederatedSearch"),e},GetViewDisplayNames:async function e(){let e=await (0,d.s6)();return(0,o.A)(e)?((0,h.Ey)("::getViewDisplayNames::Unable to get page config"),null):e.views.map(function(e){return{name:e.name,default:e.default,display:e.display}})},GetSortDisplayNames:L,SetObservableSortDisplay:M,SetSortDisplay:O,SetObservableSortOption:D,SetObservableViewOption:T,StoreUserFacilityViewOption:function(e,t){(0,h.zv)(e)===b.nX.Facility&&(0,p.Or)(t)},TrackApplyFilterAnalyticValue:function(e,t,a=null){var n,i,l;let r=k(e,t),o=(0,h.zv)(null!=a?a:null==(l=null==(i=null==(n=null==searchController?void 0:searchController.SearchParameters)?void 0:n.Get)?void 0:i.call(n))?void 0:l.SearchType),s=o===b.nX.Facility?"facilityFilter":"filterChips",u=o===b.nX.Facility?"Facility Filter":"Filter Chip";w.GoogleAnalytics.TrackGoogleEvent(s,u,"Apply",e+": "+r,r)},TrackFilterRefineAnalyticValue:function(e,t){let a=k(e,t);w.GoogleAnalytics.TrackGoogleEvent("filterRefine","Filter Refine","Apply",e+": "+a,a)}}},16180(e,t,a){a.d(t,{s:()=>r});var n=a(10810),i=a(56530),l=a(24519);function r(){function e(t,a=""){var i,r,o,s,u;
5let c,d=(0,l.Q)(),{urlHash:h}=(0,n.bP)(d),f="",m=null==(r=null==(i=document.querySelector(".special-rates"))?void 0:i.classList)?void 0:r.contains("best-tee-times-deals"),p=(c=new Set([...(null!=(s=null==t?void 0:t.tags)?s:[]).map(e=>String(e).toUpperCase()),...(null!=(u=null==t?void 0:t.facilityTags)?u:[]).map(e=>null==e?void 0:e.facilityTagCode).filter(e=>"string"==typeof e).map(e=>e.toUpperCase())])).has("FIT")&&(c.has("CLUBCHAMP")||c.has("GOLFTEC"))?"/fitting/facility/":m&&t.isPnas?"/best-deals/facility/":"/tee-times/facility/";if(t.seoFriendlyName?f=t.seoFriendlyName:t.facilityId?f=t.facilityId:t.id&&(f=t.id),""===a){if("daysOut"in t){let e=null!=(o=t.daysOut)?o:0;a=`#daysout=${e}`}""===a&&(a=h.value)}return`${p}${f}/search${a}`}function t(e,a=!0){let n,i=0,l="";return e.productReviewId?i=e.productReviewId:e.reviewId&&(i=e.reviewId),e.seoFriendlyName&&(l=e.seoFriendlyName.substring(e.seoFriendlyName.indexOf("-")+1)),n=`/courses/${i}-${l}-details`,a&&(n=`${n}#ratings-snapshot`),n}function a(e){return e.facilityId?Number(e.facilityId):e.id?Number(e.id):0}function r(e){if(e.reservationId)return Number(e.reservationId)}return{facilitySearchSlug:e,courseDetailsSlug:function(a){let n="";if(a.courseDetailSeoFriendlyName)n=a.courseDetailSeoFriendlyName;else if(a.productReviewId||a.reviewId)return t(a,!1);else if(a.id||a.facilityId)return e(a);return`/courses/${n}`},courseReviewDetailsSlug:t,courseWriteReviewsSlug:function(e){var t;let n=0,i=null!=(t=a(e))?t:0;return e.productReviewId?n=Number(e.productReviewId):e.reviewId&&(n=Number(e.reviewId)),`/courses/${i}/write-review/${n}`},reservationDetailsSlug:function(e){var t=r(e)||null,n=a(e.facility)||null;return e.reservationCanCheckIn?"/smart-play/pay-check-in/"+t+"/"+n:"/account/booking-history/"+t+"/details"},findFacilityId:a,findReservationId:r,findFacilityName:function(e){return e.facilityName?e.facilityName:e.n
5ame?e.name:e.label?e.label:""},facilityImagePathDisplay:function(e,t){var a;let n=null!=cdnImageBaseUrl?cdnImageBaseUrl:"https://exddilid.cdn.imgeng.in/app/ttf/image/",{imagePathDisplay:l}=(0,i.S)();if(null==t?void 0:t.length){let a=e.facilityId||e.id;return l(`${n}${t}/${a}.jpg`)}let r=null!=(a=e.imagePathURL)?a:e.imagePathUrl;return r?l(r):e.imgPath?l(e.imgPath):e.thumbnailImagePath?l(e.thumbnailImagePath):"/Content/images/general.jpg"},findReviewId:function(e){return e.productReviewId?e.productReviewId:e.reviewId?e.reviewId:0},findReviewCount:function(e){return null!=e.numberOfReviews?e.numberOfReviews:null!=e.reviewCount?e.reviewCount:0},handleTeeChartClick:function(e){let t=null==e?void 0:e.currentTarget;if(null===t)return;let a=document.querySelectorAll(".tee-chart-table");a&&a.forEach(e=>e.style.display="none");let n=`#tab-${t.id}`,i=document.querySelector(n);i&&(i.style.display="block")}}}},53049(e,t,a){a.d(t,{r:()=>m});var n=a(21879),i=a(16180),l=a(79162),r=a(9612),o=a(48966),s=a(51422),u=a(22842),c=a(24519),d=a(18875),h=a(10810),f=a(72336);function m(){function e(e){return(e=e||"").replace(/'/g,"'").replace(/'/g,"\\'")}async function t(e,a=f.nX.GeoLocation){var i,l;let o=(0,c.Q)(),s=(0,d.s)(),{urlHash:u,searchParams:m}=(0,h.bP)(o),{isHomePageSearch:p}=(0,h.bP)(s),y=null!=(l=null==(i=m.value)?void 0:i.view)?l:null,g=p.value?"":null===y||""===u.value?await r.UrlParams.GetUrlHash(a):await Promise.resolve(u.value.includes("#")?u.value:`#${u.value}`);return g.includes("daysout")||(0,n.A)(e)&&e>=0&&(""===g||g.includes("date")?""!==g||g.includes("date")||(g+=`#daysout=${e}`):g+=`&daysout=${e}`),g}function a(e,t,a,n){if(n)return t;if(!a)return e;let i=/hot+(\s+?|-?)deal.*?/gi;return e.match(i)?e.replace(i,t):e}async function m(e){let{showHtmlMessage:t}=(0,s.A)(),a=`/account/login?returnUrl=${encodeURIComponent(document.location.pathname+document.location.hash)||encodeURIComponent("/")}`,n=null!=e?e:`Please <a class="underline underline-offset-4" href="${a}">login</a> to complete your action.`;t(await (0,u.AA)("Profile","profile_search_loginneededtitle"),n)}let p={defaultHeaders:{"Content-Type":"application/json"},customHeaders:{},getHeaders(){return Object.assign(Object.assign({},this.defaultHeaders),this.customHeaders)},setHeader(e,t){this.customHeaders[e]=t},removeHeader(e){delete this.customHeaders[e]}},y={headers:p.getHeaders()};return{escapeApostrophes:e,units:function(){return(0,l.u3)(null)},logProductImpression:function(t,a=null){if(!t)return;let{findFacilityId:n,findFacilityName:l}=(0,i.s)();o.GoogleAnalytics.Ecommerce.ProductImpression(e(l(t)),n(t),"","","",e(t.address.city),t.address.stateProvinceCode,t.address.country,a)},logFeaturedImpression:function(t){let{findFacilityId:a,findFacilityName:n}=(0,i.s)();o.GoogleAnalytics.TrackGoogleEvent("featuredImpression","Featured Course","impression",`${e(n(t))} | ${a(t)}`,null)},resultHash:t,hideElement:function(e){e&&(e.style.display="none")},replaceAll:function(e,t,a){var n=t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1");return e.replace(RegExp(n,"g"),a)},convertToBoolean:function(e){return!!e},logImpression:function(t,a,n,l){let{findFacilityId:r,findFacilityName:s}=(0,i.s)();o.GoogleAnalytics.TrackGoogleEvent(t,a,n,`${e(s(l))} | ${r(l)}`,null)},localizedRateName:function(e,t,n,i){return a(e,n,t,i)},localizedRateNameWithTeeTimeRate:function(e,t,n){var i,l,r;let o=null!=(i=null==e?void 0:e.rateName)?i:"",s=null!=(l=null==e?void 0:e.isHotDeal)&&l,u=null!=(r=null==e?void 0:e.hasMemberPricing)&&r;return a(o,(null==e?void 0:e.hasMemberPricing)?n:t,s,u)},localizeCurrency:function(e,t,a){return new Intl.NumberFormat(null!=t?t:"en-US",{style:"currency",currency:null!=a?a:"USD"}).format(e)},handleRequestError:function(e,t){var a;let n={handled:!1,logged:!1,status:null,message:null};if(null==e?void 0:e.status){switch(e.status){case 401:m(t),n.handled=!0;break;case 400:case 403:case 404:case 500:case 501:case 502:case 503:case 504:case 505:case 506:case 507:case 509:case 510:(0,l.Ey)("Known Request Error - Status: "+e.status+"-"+e.statusText),n.logged=!0,n.handled=!0;break;default:(0,l.SS)("Unknown Request Error - Status: "+e.status+"-"+e.statusText),n.logged=!0}n.status=e.status}else if((null==e?void 0:e.message)||(null==e?void 0:e.responseJSON)){let t=null!=(a=e.message)?a:e.responseJSON.exceptionMessage;(0,l.SS)("GN Error: ",t),n.logged=!0,n.message=t}return n},pointsFormatter:function(e){return Math.trunc(e).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},copyPromoCode:function(e,t){var a;let n=null==(a=t.currentTarget)?void 0:a.querySelector("i");navigator.clipboard.writeText(e).then(()=>{null==n||n.classList.remove("icon-Copy"),null==n||n.classList.add("icon-Checkmark","text-secondary","font-bold"),setTimeout(()=>{null==n||n.classList.remove("icon-Checkmark","text-secondary","font-bold"),null==n||n.classList.add("icon-Copy")},2e3)})},generateComponentKey:function(){return Math.floor(400*Math.random())},fetchRequestHeaders:p,fetchOptions:y,fetchHttp:{fetch:(e,t)=>fetch(e,Object.assign(Object.assign(Object.assign({},y),t),{headers:Object.assign(Object.assign({},p.getHeaders()),(null==t?void 0:t.headers)||{})}))}}}},56530(e,t,a){a.d(t,{S:()=>n});function n(){return{imagePathDisplay:function(e){return""!==e&&-1===e.indexOf("http")?`${document.location.protocol}//${e}`:""!==e?e:void 0}}}},51422(e,t,a){a.d(t,{A:()=>r});var n=a(10810),i=a(80839),l=a(18875);function r(){let e=(0,i.A)(),t=(0,l.s)(),{showMessageModal:a,showHtmlMessageModal:r,resetModalDefaults:o,showAutoRenewOffConfirmModal:s,title:u,body:c,htmlContent:d,ackBtnText:h,closeButtonText:f}=(0,n.bP)(e),{showConfirmModal:m,showCouponListModal:p}=(0,n.bP)(t),{closeMessageModal:y,displayMessageModal:g,closeHtmlMessageModal:v,displayHtmlMessageModal:w,displaySubscriptionAutoRenewModal:b,closeAutoRenewOffConfirmModal:S,finalizeAutoRenewalModalClose:C,acknowledgeMessageModal:P,acknowledgeHtmlMessageModal:A,acknowledgeFn:L,resetDefaults:M}=e,{closeConfirmModal:O,closeCouponListModal:D}=t;return{showMessage:function(e,t,a,n,i,l){o.value=null==i||i,g({title:e,body:t,postCloseFn:n,closeButtonText:a,isError:l})},showMessageModal:a,closeMessageModal:y,showHtmlMessage:function(e,t,a,n,i,l){o.value=null==i||i,w({title:e,htmlContent:t,postCloseFn:n,closeButtonText:a,isError:l})},showHtmlMessageModal:r,closeHtmlMessageModal:v,showAckModal:function(e,t,a,n,i,l,r){o.value=null==r||r,g({title:e,body:t,closeButtonText:n,ackBtnText:a,postCloseFn:l,acknowledgeFn:i})},showHtmlAckModal:function(e,t,a,n,i,l,r){o.value=null==r||r,w({title:e,htmlContent:t,closeButtonText:n,ackBtnText:a,postCloseFn:l,acknowledgeFn:i})},showConfirmModal:m,closeConfirmModal:O,showAutoRenewOffConfirmModal:s,showSubscriptionAutoRenewModal:function(e,t,a){o.value=null==a||a,b({acknowledgeFn:e,validationFn:t})},closeAutoRenewOffConfirmModal:S,finalizeAutoRenewalModalClose:C,showCouponListModal:p,closeCouponListModal:D,acknowledgeMessageModal:P,acknowledgeHtmlMessageModal:A,acknowledgeFn:L,title:u,body:c,htmlContent:d,ackBtnText:h,closeButtonText:f,resetDefaults:M}}},18875(e,t,a){a.d(t,{s:()=>d});var n=a(6934),i=a(10810),l=a(84430),r=a(48966),o=a(27493),s=a(8877),u=a(99301),c=a(79162);let d=(0,i.nY)("page",{state:()=>({pageConfig:null,isHomePageSearch:!1,isSpecialRatesPage:!1,isFacilitySearch:!1,isSubscriptionsEnabled:!1,isWhiteLabelSite:!1,showChangeLocationModal:!1,showVisitorLocationModal:!1,showMoreHotDealsModal:!1,showInviteModal:!1,showErrorMessageModal:!1,showGolfPassPerksModal:!1,showSparkGolfModal:!1,showInviteFriendsToReservationModal:!1,showCheckInModal:!1,showPayAndCheckInModal:!1,showInviteMoreModal:!1,showEmailInviteModal:!1,showConfirmModal:!1,showCouponListModal:!1,locationChanged:!1,currentPage:0,hotdealsUrl:"",teeTimesSearchUrl:"",failedLocationWidgetName:"",failedLocationCurrentCity:"",hotdealsAllCoursesCopy:"",hotdealsAllCoursesUrl:"",radiusOverride:25,latitudeOverride:0,longitudeOverride:0,initialized:!1,model:null,inlineModel:null,country:"",adLoadCounter:0,googleSlots:new Map,adDisplayEventSubscribed:!1,secureRoutes:[],routeVerified:!1,isRouteSecure:!1,loginPartialLoaded:!1,emailOptinModelFooter:{},emailOptinModelSidebar:{},defaultGeo:{}}),actions:{generateKey:()=>`${Math.floor(100*Math.random())+1}`,updateKey:()=>`${Math.floor(100*Math.random())+1}`,cancelChangeLocation(){this.closeChangeLocationModal()},closeChangeLocationModal(){this.showChangeLocationModal=!1},closeVisitorLocationModal(){let e=(0,c.up)(this.country).countryCode||this.country.toUpperCase();r.GoogleAnalytics.TrackGoogleEvent(`visitor${e}`,`${e} Visitor`,"Click","Stay US Site",null),this.showVisitorLocationModal=!1},closeInviteModal(){this.showInviteModal=!1},closeErrorMessageModal(){this.showErrorMessageModal=!1},closeGolfPassPerksModal(){this.showGolfPassPerksModal=!1},closeInviteFriendsToReservationModal(){this.showInviteFriendsToReservationModal=!1},closeCheckInModal(){this.showCheckInModal=!1},closePayAndCheckInModal(){this.showPayAndCheckInModal=!1},closeInviteMoreModal(){this.showInviteMoreModal=!1},closeEmailInviteModal(){this.showEmailInviteModal=!1},closeMoreHotDealsModal(){this.showMoreHotDealsModal=!1},closeConfirmModal(){this.showConfirmModal=!1},closeCouponListModal(){this.showCouponListModal=!1},closeSparkGolfModal(){this.showSparkGolfModal=!1},handleEmailOptInSubmit(e){let t=e.target.closest("form");
5return t&&(0,o.getLocationData)(t),!1},displayMoreHotDealsModal(e,t){this.showMoreHotDealsModal=!0,r.GoogleAnalytics.TrackGoogleEvent("moreHotDeals","More Hot Deals","Click",`${t}:${e}`,null)},subscribeToDisplayAdEvent(){this.adDisplayEventSubscribed||(this.adDisplayEventSubscribed=!0,(0,l.jb)("display_dfp_ad",e=>{let t=(0,n.ux)(this.googleSlots).get(e);return(null==t?void 0:t.length)&&(0,s.FU)(e,t),!0}))},handleExploreLinkClick(e){let t=e.currentTarget.dataset.expoption;r.GoogleAnalytics.TrackGoogleEvent("explore","Explore","Click",t,t)},defaultInjectFactory(){},buildHashUrl:e=>window.location.pathname+"#"+e,init(){this.initialized||(this.isHomePageSearch=null!=isHomePageSearch&&isHomePageSearch,this.isSubscriptionsEnabled=null!=isSubscriptionsEnabled&&isSubscriptionsEnabled,this.isSpecialRatesPage=null!=isSpecialRatesPage&&isSpecialRatesPage,this.isFacilitySearch=null!=isFacilitySearch&&isFacilitySearch,this.isWhiteLabelSite=null!=isWhiteLabelSite&&isWhiteLabelSite,this.initialized=!0,this.hotdealsAllCoursesUrl=this.hotdealsUrl=null!=hotDealsSearchUrl?hotDealsSearchUrl:"",this.teeTimesSearchUrl="u">typeof teeTimesSearchUrl&&null!=teeTimesSearchUrl?teeTimesSearchUrl:"",(0,u.qy)("secureRoutes").then(e=>{e&&(this.secureRoutes=e)}))}}})},24519(e,t,a){a.d(t,{Q:()=>O});var n=a(10810),i=a(79162),l=a(6338),r=a(59551),o=a(84430),s=a(9612),u=a(1098),c=a(71304),d=a(65869),h=a(78238),f=a(72336),m=a(16180),p=a(1467),y=a(33259),g=a(92770),v=a(6934),w=a(48966),b=a(86992);let S=new d.A,C=new c.default,P=[],A=null,L=(0,v.KR)("loading...");function M(){var e;let t=null==(e=(0,b.getPageLocationCoordinator)())?void 0:e.getActiveLocation().location;if(!t)return;let a=t.Address||(0,g.bG)(t).Address;a&&(L.value=a)}(0,o.jb)("user-location-changed",M);let O=(0,n.nY)("searchPage",{state:()=>({pageConfig:null,searchParams:null,searchRaParams:null,viewModel:null,searchResults:null,urlHash:"",isHomePageSearch:!1,isSpecialRatesPage:!1,isBestDealsPage:!1,isFavoritesSearch:!1,isFacilitySearch:!1,isHotDealsDestination:!1,isWhiteLabelSite:!1,isPromotedCampaign:!1,currentCulture:"",serverDisplayMode:"",disableChangeLocation:!1,disableSearchResultActions:!1,displayFiltersButton:!1,displayMode:"",goPlayMode:"",mediumOverride:!1,filterControlInteraction:!1,pendingApply:!1,loading:!1,loadingRates:!1,showSelectRateModal:!1,rateModel:null,initialized:!1,facilityMetrics:[],facilityResultsPrivateClubsViewModel:null,noResultsMessage:"",loadingNextPage:!1,teeTimeDeals:{},searchLocation:L,isFiltersModal:!1,showFiltersModal:!1,debounceTimeout:300,pendingSortByRollup:null,lastGoPlaySearchLocation:null}),getters:{getDefaultTimeRange(e){var t,a,n,l;return{start:null!=(a=null==(t=e.searchParams)?void 0:t.timeMin)?a:(0,i.ip)(),end:null!=(l=null==(n=e.searchParams)?void 0:n.timeMax)?l:(0,i.Wo)()}},getDefaultPriceRange(e){var t,a,n,l;return{start:null!=(a=null==(t=e.searchParams)?void 0:t.priceMin)?a:(0,i.C5)(),end:null!=(l=null==(n=e.searchParams)?void 0:n.priceMax)?l:(0,i.KP)()}},getDefaultRadius(e){var t,a;return null!=(a=null==(t=e.searchParams)?void 0:t.radius)?a:(0,i.AQ)()},isTouchDevice:()=>!("u"<typeof window||"u"<typeof navigator)&&("ontouchstart"in window||navigator.maxTouchPoints>0),getHotDealOnly(e){var t,a;return null!=(a=null==(t=e.searchParams)?void 0:t.hotDealsOnly)&&a},getSearchLocation(e){var t,a;let n=null==(t=e.searchParams)?void 0:t.location,i=null;return n&&"string"==typeof n&&n.length>0?i=n:n&&"object"==typeof n&&"label"in n&&(i=n.label),null!=(a=null!=i?i:e.searchLocation)?a:L.value},isFacilityPageLeftSide:()=>(0,i.HN)(),viewDisplayNames:async()=>(null==viewoverridesObj?void 0:viewoverridesObj.disableViewChange)?null:await l.FederatedSearch.GetViewDisplayNames(),async sortDisplayNames(e){var t,a;let n=null!=(t=(await l.FederatedSearch.GetSortDisplayNames()).find(t=>{var a;return t.view===(null==(a=e.searchParams)?void 0:a.view)}))?t:null;return null!=(a=null==n?void 0:n.sorts)?a:[]},async sortDisplay(e){var t,a;let n="",i=await this.sortDisplayNames,l=null!=(t=null==i?void 0:i.find(t=>{var a;return t.name===(null==(a=e.searchParams)?void 0:a.sortBy)}))?t:null;return null!==l&&(n="Display"in l?l.Display:null!=(a=l.name)?a:""),n},hasResults:e=>null!==e.searchResults&&null!==e.searchResults.ttResults&&!!e.searchResults.ttResults&&("facilities"in e.searchResults.ttResults||"teeTimes"in e.searchResults.ttResults),hasException:e=>null!==e.searchResults&&null!==e.searchResults.ttException,hasRateException:e=>null!==e.rateModel&&null!==e.rateModel.rateException},actions:{async search(e=null){var t;let a=()=>{this.pendingSortByRollup&&(this.trackSortChange(this.pendingSortByRollup),this.pendingSortByRollup=null)};if(null===this.searchResults){let e=(0,b.getPageLocationCoordinator)();null!==A&&e&&e.markInitialRequestStarted(A);let t=!1;try{await s.UrlParams.HandleUpdatedHashParameters(searchController),a()}catch(e){throw t=!0,e}finally{null!==A&&e&&e.markInitialRequestSettled(A,t)}}else{let n=null!=e?e:this.searchParams;null==(t=searchController.SearchParameters)||t.Set(n),await l.FederatedSearch.ApplySearchParameters(searchController),a()}},resetFilters(){var e;null==(e=searchController.SearchParameters)||e.GetSearchParametersFromUserStore().then(e=>{var t;e?searchController.ResetAdvancedSearchParams(e):searchController.ResetAdvancedSearchParams(),this.$patch({searchParams:null==(t=searchController.SearchParameters)?void 0:t.Get()})}).catch(e=>{(0,i.SS)("Error getting initial search parameters:",e)})},getFormattedDate(e=!0){var t,a;let n=null!=(a=null==(t=this.searchParams)?void 0:t.date)?a:"";return n.length?new Date(n).toDateDisplayString(e):(0,p.$x)(e)},loadFacilityMetrics(e){let{findFacilityId:t}=(0,m.s)(),a=e=>{var t,a,n,i;let l=null==e?void 0:e.ttResults;return Array.isArray(l)?[...l,...null!=(t=null==e?void 0:e.featuredFacilities)?t:[]]:[...null!=(a=null==l?void 0:l.facilities)?a:[],...null!=(n=null==l?void 0:l.featuredFacilities)?n:[],...null!=(i=null==e?void 0:e.featuredFacilities)?i:[]]},n=a(e),i=a(this.searchResults),l=n.length>0?n:i;if(0===l.length)return;let r=l.map(e=>t(e)).filter(e=>"number"==typeof e&&e>0).filter((e,t,a)=>a.indexOf(e)===t),o=[];
5if(l.forEach(e=>{var a;if(null==(a=e.tags)?void 0:a.find(e=>"SP"===e)){let a=t(e);"number"==typeof a&&a>0&&o.push(a)}}),(0,u.Z5)()){if(0===r.length)return;S.postCourseMetrics(new h.$({courseIds:r})).then(e=>{e.forEach(e=>{var a;let n=null!=(a=l.find(a=>t(a)===e.courseId))?a:null;if(null===n)return;let i=!1;o.find(t=>t===e.courseId)&&(i=!0);let r={courseId:e.courseId,roundsBooked:e.roundsBooked,hasSmartPlayTag:i},s=P.findIndex(e=>e.courseId===r.courseId);s>=0?P[s]=r:P.push(r),n.metrics=r}),P.length>0&&(this.facilityMetrics=P)})}else o.forEach(e=>{var a,n,i;let r=null!=(a=l.find(a=>t(a)===e))?a:null;if(null!==r){let t=null!=(n=P.find(t=>t.courseId===e))?n:null,a={courseId:e,roundsBooked:null!=(i=null==t?void 0:t.roundsBooked)?i:0,hasSmartPlayTag:!0},l=P.findIndex(t=>t.courseId===e);l>=0?P[l]=a:P.push(a),r.metrics=a}}),P.length>0&&(this.facilityMetrics=P)},bindDatePicker(){searchController.BindDatePicker()},async setViewOption(e){var t,a,n,i,r;if(this.loading)return;let o=null==(t=searchController.SearchParameters)?void 0:t.Get();if(!searchController.ChangeView(e,o,!0))return;this.$patch({searchParams:{view:e}});let s=await this.sortDisplay;if(o&&""!==o.sortBy&&(null==(a=this.searchParams)?void 0:a.sortBy)!==o.sortBy){this.$patch({searchParams:{sortBy:o.sortBy,sortByRollup:o.sortByRollup,sortDirection:o.sortDirection}});let e=await l.FederatedSearch.SetSortDisplay(null==(n=this.searchParams)?void 0:n.view,null==(i=this.searchParams)?void 0:i.sortBy);""!==e.display&&this.$patch({searchParams:{sortDisplay:e.display}})}else(null==(r=this.searchParams)?void 0:r.sortDisplay)===""&&""!==s&&this.$patch({searchParams:{sortDisplay:s}})},async setSortOption(e,t){var a,n,l;if(this.loading)return;let s=null==(a=this.searchParams)?void 0:a.view,u=e+"|"+t;if(""!==u){if(!await r.G.isSortAllowed(u,s))return void(0,o.Mr)("close-result-action-menus",null);let a={sortBy:e,sortByRollup:(0,i.Ze)(e,t),sortDirection:t},c=(null==(n=this.searchParams)?void 0:n.sortBy)!==e||(null==(l=this.searchParams)?void 0:l.sortDirection)!==t;if(this.isFiltersModal){this.searchParams=Object.assign(Object.assign({},this.searchParams),a),c&&(this.pendingSortByRollup=a.sortByRollup);return}c&&(this.$patch({searchParams:a}),this.pendingSortByRollup=a.sortByRollup),(0,o.Mr)("close-result-action-menus",null)}},trackSortChange(e){var t,a;let n=(0,i.zv)(null!=(a=null==(t=this.searchParams)?void 0:t.searchType)?a:"u"<typeof viewoverridesObj||null==viewoverridesObj?void 0:viewoverridesObj.searchType),l=function(){var e,t,a;if("u"<typeof window)return"";let n=null!=(a=null==(t=null==(e=window.location)?void 0:e.pathname)?void 0:t.replace(/\/+$/,""))?a:"";return n.substring(n.lastIndexOf("/")+1)}();l&&w.GoogleAnalytics.TrackGoogleEvent("sortChange","Sort","Change",`${n}|${l}|${e}`)},setDate(e){searchController.SetDate(e),this.searchParams&&(this.searchParams.pageNumber=0)},isRefinementOn(e){var t,a;return!(null==(a=null==(t=this.pageConfig)?void 0:t.refinements)?void 0:a.some(t=>t.name===e&&t.mode===f.PF.Off))},overrideRefinement(e){var t;let a=null==(t=this.pageConfig)?void 0:t.refinements;a&&e&&a.forEach(t=>{let a=e.find(e=>e.name===t.name);(null==a?void 0:a.mode)!==void 0&&(t.mode=a.mode)})},checkNextDay(){searchController.NextDate()},viewNearByTeeTimes(){let e=`#date=${this.getFormattedDate(!1).replace(/ /g,"+")}`;window.location.href=`/tee-times/search${e}`},async displaySelectRateModal(e,t,a){this.loadingRates=!0,this.showSelectRateModal=!0;try{this.rateModel=await C.getSelectRateModal(e,t,a||(a=0))}catch(e){(0,i.SS)("Failed to retrieve Rate data:",e)}finally{this.loadingRates=!1}},closeSelectRateModal(){this.rateModel=null,this.showSelectRateModal=!1},buildCourseFeatureTags(e){if(null==e?void 0:e.length){let t=this;e.forEach(function(e){document.querySelectorAll(`a[data-facilityid="${e.courseId}"]`).forEach(a=>t.buildSingleCourseFeatureTags(a,e))})}},buildSingleCourseFeatureTags(e,t){var a,n,i,l,r,o;let s=null==e?void 0:e.querySelector("div .course-features"),c=Number(null!=(a=null==e?void 0:e.dataset.averagerating)?a:"0"),d=(null!=(n=null==e?void 0:e.dataset.ispremium)?n:"")==="true",h=(null!=(i=null==e?void 0:e.dataset.isteeofftoptier)?i:"")==="true",f=(0,u.Z5)()&&c&&c>4.5,m=(0,u.Z5)()&&(null!=(l=t.roundsBooked)?l:0)>
5=5,p=null!=(r=t.hasSmartPlayTag)&&r,y=$("<span>",{class:"course-rating top-rated-tag",html:'<i class="icon-Thumbs-Up-Empty text-lg"></i> Top Rated Course'})[0],g=$("<span>",{class:"course-rating booked-times-tag",html:`<i class="icon-Booked hide text-lg"></i> Booked <strong>${t.roundsBooked}</strong> times today`})[0],v=$("<span>",{class:"course-rating mobile-checkin-tag",html:'<i class="icon-Mobile-Check-In text-lg"></i> Mobile Check-In'})[0],w=$("<span>",{class:"course-rating",html:" | "})[0];if(s){let t,a=(null!=(o=s.dataset.split)?o:"")==="true",n=a?{"padding-right":"10px",color:"#fff"}:d?{}:{"border-top":"solid 1px #E0E0E0",color:"#fff",width:"100%","font-style":"italic"};a?(null==(t=s.querySelector(".course-rating"))||t.classList.add("columns large-6"),t&&(t.style.width="55%")):(null==(t=s)||t.classList.add("course-rating-nc"),null==t||t.classList.remove("course-rating"));let i=0;if(p&&v&&(null==t||t.append(v),Object.assign(v.style,n),i++),f&&y&&(i>0&&(null==t||t.append(w),Object.assign(w.style,n)),null==t||t.append(y),Object.assign(y.style,n),i++),m&&g&&(i>0&&(null==t||t.append(w),Object.assign(w.style,n)),null==t||t.append(g),Object.assign(g.style,n)),h&&d&&f&&m&&p){let t=null==e?void 0:e.querySelector(".course-features .booked-times-tag");t&&t.classList.add("hidden")}}},async loadTeeTimeDeals(e,t,a,n){if(!this.teeTimeDeals[n])try{let i=await C.getTeeTimeDaySummaries(e,t,a);(null==i?void 0:i.length)&&(this.teeTimeDeals[n]=i)}catch(e){(0,i.SS)("Failed to fetch tee-time deals",e)}},init(){var e;if(this.initialized)return;let t=document.body.classList;this.isHomePageSearch=null!=isHomePageSearch&&isHomePageSearch,this.isSpecialRatesPage=null!=isSpecialRatesPage&&isSpecialRatesPage,this.isFavoritesSearch=null!=isFavoritesSearch&&isFavoritesSearch,this.isFacilitySearch=null!=isFacilitySearch&&isFacilitySearch,this.isBestDealsPage=t.contains("special-rates")&&t.contains("best-tee-times-deals"),this.isPromotedCampaign=t.contains("special-rates")&&(t.contains("promoted-campaign")||t.contains("promo-campaign-landing")),this.isHotDealsDestination=null!=isHotDealsDestination&&isHotDealsDestination,this.isWhiteLabelSite=null!=isWhiteLabelSite&&isWhiteLabelSite,this.disableChangeLocation=null!=disableChangeLocation&&disableChangeLocation,this.disableSearchResultActions=null!=disableSearchResultActions&&disableSearchResultActions,this.displayFiltersButton=null!=displayFiltersButton&&displayFiltersButton,this.currentCulture=null!=currentCulture?currentCulture:"",this.serverDisplayMode=null!=serverDisplayMode?serverDisplayMode:"",this.displayMode=null!=(e=null==displayMode?void 0:displayMode.toLowerCase())?e:"large",this.searchRaParams=null!=searchResultActionsParams?searchResultActionsParams:null,this.goPlayMode=null!=goPlayMode?goPlayMode:"",this.initialized=!0,M();let a=(0,b.getPageLocationCoordinator)();a&&null===A&&(A=a.registerConsumer("SearchPage",async()=>{var e,t,n,i;let l=a.getActiveLocation(),r=null==(e=l.location)?void 0:e.Latitude,o=null==(t=l.location)?void 0:t.Longitude;if(!(0,y.isValidCoordinate)(r)||!(0,y.isValidCoordinate)(o))return;let s=(0,g.in)(null!=(n=l.location)?n:{},r,o),u=null==(i=this.searchParams)?void 0:i.location,c=u&&"object"==typeof u?Object.assign(Object.assign({},u),{label:s}):s;this.$patch({searchParams:Object.assign(Object.assign({},this.searchParams),{latitude:r,longitude:o,location:c,address:s})}),await this.search()}))},cleanupLocationConsumer(){var e;null!==A&&(null==(e=(0,b.getPageLocationCoordinator)())||e.unregisterConsumer(A),A=null)}}})},80839(e,t,a){let n=(0,a(10810).nY)("sharedModals",{state:()=>({title:"",body:"",htmlContent:"",closeButtonText:"OK",ackBtnText:"",acknowledgeFn:void 0,postCloseFn:void 0,validationFn:void 0,showMessageModal:!1,showHtmlMessageModal:!1,showAutoRenewOffConfirmModal:!1,resetModalDefaults:!0,isError:!1}),actions:{displayMessageModal(e){var t;this.title=e.title,this.body=e.body,e.ackBtnText&&(this.closeButtonText=e.closeButtonText),e.ackBtnText&&(this.ackBtnText=e.ackBtnText),e.acknowledgeFn&&e.acknowledgeFn instanceof Function&&(this.acknowledgeFn=e.acknowledgeFn),e.postCloseFn&&e.postCloseFn instanceof Function&&(this.postCloseFn=e.postCloseFn),this.showMessageModal=!0,this.isError=null!=(t=e.isError)&&t},acknowledgeMessageModal(e){!1!==this.showMessageModal&&(this.acknowledgeFn&&this.acknowledgeFn instanceof Function&&this.acknowledgeFn(e),this.resetDefaults(),this.showMessageModal=!1)},closeMessageModal(){!1!==this.showMessageModal&&(this.postCloseFn&&this.postCloseFn instanceof Function&&this.postCloseFn(),this.resetModalDefaults&&this.resetDefaults(),this.showMessageModal=!1)},displayHtmlMessageModal(e){var t;this.title=e.title,this.htmlContent=e.htmlContent,e.ackBtnText&&(this.ackBtnText=e.ackBtnText),e.closeButtonText&&(this.closeButtonText=e.closeButtonText),e.acknowledgeFn&&e.acknowledgeFn instanceof Function&&(this.acknowledgeFn=e.acknowledgeFn),e.postCloseFn&&e.postCloseFn instanceof Function&&(this.postCloseFn=e.postCloseFn),this.showHtmlMessageModal=!0,this.isError=null!=(t=e.isError)&&t},acknowledgeHtmlMessageModal(e){!1!==this.showHtmlMessageModal&&(this.acknowledgeFn&&this.acknowledgeFn instanceof Function&&this.acknowledgeFn(e),this.resetDefaults(),this.showHtmlMessageModal=!1)},closeHtmlMessageModal(){!1!==this.showHtmlMessageModal&&(this.postCloseFn&&this.postCloseFn instanceof Function&&this.postCloseFn(),this.showHtmlMessageModal=!1,this.resetModalDefaults&&this.resetDefaults())},displaySubscriptionAutoRenewModal(e){e.acknowledgeFn&&e.acknowledgeFn instanceof Function&&(this.acknowledgeFn=e.acknowledgeFn),e.validationFn&&e.validationFn instanceof Function&&(this.validationFn=e.validationFn),this.showAutoRenewOffConfirmModal=!0},closeAutoRenewOffConfirmModal(e){if(!1===this.showAutoRenewOffConfirmModal)return;let t=!0;e&&this.validationFn&&this.validationFn instanceof Function&&(t=this.validationFn()),t&&this.acknowledgeFn&&this.acknowledgeFn instanceof Function&&this.acknowledgeFn(e)},finalizeAutoRenewalModalClose(){this.resetModalDefaults&&this.resetDefaults(),this.showAutoRenewOffConfirmModal=!1},closeAllModals(){this.showMessageModal=!1,this.showHtmlMessageModal=!1,this.showAutoRenewOffConfirmModal=!1,this.resetModalDefaults=!0},resetDefaults(){this.title="",this.body="",this.htmlContent="",this.closeButtonText="OK",this.ackBtnText="",this.acknowledgeFn=void 0,this.postCloseFn=void 0,this.validationFn=void 0,this.showMessageModal=!1,this.showHtmlMessageModal=!1,this.showAutoRenewOffConfirmModal=!1,this.resetModalDefaults=!0,this.isError=!1}}});a.d(t,["A",0,n])}}]);
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.