var IdListPickerManager,LinkPickerManager;Vue.component("accommodation-card-panel",{props:["ParkId","AccommodationDetails","Props"],data:function(){return{state:window.AccommodationStore.state,store:window.AccommodationStore}},computed:{sites:function(){return _.filter(this.state.accommodations,function(n){return n.AccommodationType==="SITES"})},cabins:function(){return _.filter(this.state.accommodations,function(n){return n.AccommodationType==="CABINS"})}},created:function(){this.ParkId!=""&&(this.state.ParkId=this.ParkId);this.AccommodationDetails!=undefined&&(this.state.accommodations=this.AccommodationDetails);this.store.GetDailyFromPrices()}});Vue.component("accommodation-card",{props:["item","accommodation-type","pms-data"],template:"#AccommodationCard",mixins:[MIXIN_MEMBERSHIP,Common],data:function(){return{state:window.AccommodationStore.state,priceTotal:"0",discountedTotal:"0",CurrentPMSResult:[],PMSAvailable:!0,unavailableReasons:[],currentOfferCode:0}},methods:{ProcessPMSResults:function(n){for(var r,u,f=this,i=null,t=0;t<n.AllAccommodations.length;t++)n.AllAccommodations[t].AccommodationID==this.item.AccommodationID&&(i=n.AllAccommodations[t].Allotment);if(f.CurrentPMSResult=[],i!=null&&i.length>0){for(r=0,u=1e5,t=0;t<i.length;t++)f.CurrentPMSResult.push(i[t]),i[t].IsAvailable&&i[t].Total<u&&(r=t,u=i[t].Total);this.currentOfferCode=i[r].Offercode;this.updatePrice()}else this.state.accommodationLoading=!1},updatePrice:function(){for(var t=this.CurrentPMSResult,i=0,n=0;n<t.length;n++)t[n].Offercode==this.currentOfferCode&&(i=n,this.priceTotal=this.RoundPrice(t[n].Total),this.discountedTotal=this.RoundPrice(t[n].Total-t[n].MemberDiscount),this.PMSAvailable=t[n].IsAvailable),this.priceTotal!=0&&(this.state.accommodationLoading=!1),this.discountedTotal!=0&&(this.state.accommodationLoading=!1);this.QuantityCheck(t,i)},showMemberPrice:function(){return this.isLoggedIn&&!this.isHolidayPerksMember||this.isMemberOnlyDeal},memberPriceNotEqualToNonMember:function(){return!(this.DiscountedPrice==this.OriginalPrice)},memberIsVIPerks:function(){return this.isLoggedIn&&this.isVipPerksMember},QuantityCheck:function(n,t){var r=0,t=0,i;if(n!=undefined){for(i=0;i<n[t].DailyAvailability.length-1;i++)i==0?r=n[t].DailyAvailability[i].RoomsAvailable:r>n[t].DailyAvailability[i].RoomsAvailable&&(r=n[t].DailyAvailability[i].RoomsAvailable);window.AccommodationEventBus.$emit("quantity-update",{quantity:r,accommodationID:this.item.AccommodationID})}}},computed:{DefaultDates:function(){return!this.CurrentPMSResult.length>0},OriginalPrice:function(){var i,n,t;if(this.DefaultDates){i=this;try{if(this.item.AvailabilityCacheData)return n=this.priceTotal,n=this.item.AvailabilityCacheData.DailyResults[0].Price,t=n%1,t==0?n:Math.round(n)}catch(r){return this.item.Price}}else return this.priceTotal},accommodationLoading:function(){var n=this;return n.state.accommodationLoading||n.state.callingPms},DiscountedPrice:function(){var i,n,t;if(this.DefaultDates){i=this;try{if(n=this.discountedTotal,this.item.AvailabilityCacheData)return n=this.item.AvailabilityCacheData.DailyResults[0].DiscountPrice,t=n%1,t==0?n:Math.round(n)}catch(r){return this.item.DiscountPrice}}return this.discountedTotal},ItemNotAvailable:function(){var n=this,i=!1,f=!1,r=!0,e=!1,o=!0,s=!0,h=!0,t=n.PMSAvailable,c,l,u;return this.unavailableReasons.splice(0),c=n.state.NumAdults+n.state.NumInfants+n.state.NumChildren,n.state.PetFriendly&&(n.item.PetAllow?e=!0:this.unavailableReasons.push({priority:3,message:"No pets please"})),l=this.OriginalPrice/window.AccommodationStore.state.numberOfNights>=n.state.MinPriceRange&&this.OriginalPrice/window.AccommodationStore.state.numberOfNights<=n.state.MaxPriceRange,window.AccommodationStore.IsPriceFilterApplied()?typeof this.OriginalPrice=="undefined"||this.OriginalPrice===0?i=!0:l?i=!0:this.unavailableReasons.push({priority:4,message:"Not within selected price range"}):i=!0,n.item.Guest>=c?f=!0:t&&this.unavailableReasons.push({priority:2,message:"Exceeds max occupancy ("+n.item.Guest+" guests)"}),n.item.DateAvailable!=undefined&&window.DateFilterStore.state.dateFilterApplied==!0?r=n.item.DateAvailable:window.DateFilterStore.state.dateFilterApplied?r=t:t=!0,t||(u=_.find(this.CurrentPMSResult,{Offercode:this.currentOfferCode}),u!==null&&u!=undefined&&this.unavailableReasons.push({priority:1,message:u.UnavailableMessage})),n.item.AvailableInFilter=n.state.PetFriendly?i&&e&&f&&r&&o&&t&&s&&h?!0:!1:i&&f&&r&&o&&t&&s&&h?!0:!1,this.unavailableReasons=_.sortBy(this.unavailableReasons,["priority"]),!n.item.AvailableInFilter},CardUnavailableText:function(){var n=this.unavailableReasons[0].message;return n=n.replace(", please adjust your dates",""),n.replace(".  Please adjust your dates.","")}},mounted:function(){var n=this;window.AccommodationEventBus.$on("all-park-pms-availability-update",function(t){n.ProcessPMSResults(t)});window.AccommodationEventBus.$on("date-filter-clear",function(){n.CurrentPMSResult=[];n.priceTotal=0;n.discountedTotal=0})}});window.AccommodationEventBus=new Vue;Vue.component("accommodation-handler",{template:"<div style='display:none'><\/div>",props:{},data:function(){return{subscribers:[],websiteHub:null,store:window.AccommodationStore}},methods:{bindFilterEvents:function(){var n=this;window.AccommodationEventBus.$on("date-filter-update",function(t){window.DateFilterStore.state.rangeSelected&&(n.store.state.accommodationLoading=!0,n.store.state.StartDate=t.start,n.store.state.EndDate=t.end,n.store.CallPms())});window.AccommodationEventBus.$on("quick-booking-date-changed",function(t){n.store.state.StartDate=t.start;n.store.state.EndDate=t.end;n.store.CallPms()});window.AccommodationEventBus.$on("guest-filter-update",function(t){n.store.state.NumAdults=t.adults;n.store.state.NumChildren=t.children;n.store.state.NumInfants=t.infants;n.store.CallPms();window.BookingStore!=undefined?window.BookingStore.state.quickBooking.isPark||n.updateFilterPersonaScore():n.updateFilterPersonaScore()});window.AccommodationEventBus.$on("pets-filter-update",function(t){n.store.state.PetFriendly=t.isOn});window.AccommodationEventBus.$on("type-filter-update",function(t){n.store.state.Type=t;window.AccommodationStore.FilteredByAccommodationType()});window.AccommodationEventBus.$on("price-filter-update",function(t){n.store.state.MinPriceRange=t.startPoint;n.store.state.MaxPriceRange=t.endPoint})},updateFilterPersonaScore:function(){var n=this,t="";n.store.state.NumAdults>2?t+="/api/Personalization/FilteredByGroup":n.store.state.NumChildren>=1||n.store.state.NumInfants?t+="/api/Personalization/FilteredByFamily":n.store.state.NumAdults==2&&n.store.state.NumChildren==0&&n.store.state.NumInfants==0&&(t+="/api/Personalization/FilteredByNomad");t!=""&&$.ajax({type:"POST",url:t,contentType:"application/json; charset=utf-8",success:function(){},error:function(){}})}},computed:{parks:function(){return this.store.state.ParkFilter.Results}},mounted:function(){this.bindFilterEvents()}});window.AccommodationStore={state:{accommodations:[],accommodationLoading:!0,callingPms:!1,ParkId:0,StartDate:moment().startOf("day"),EndDate:moment().startOf("day").add(1,"day"),PetFriendly:!1,Type:[],showCabinList:!0,showSiteList:!0,canApplyDates:!1,checkAccomParam:!0,NumAdults:2,NumChildren:0,NumInfants:0,MinPriceRange:0,MaxPriceRange:999,DEFAULT_ADULTS:1,DEFAULT_CHILDREN:0,DEFAULT_INFANTS:0,DEFAULT_START_DATE:moment().startOf("day"),DEFAULT_END_DATE:moment().startOf("day").add(1,"day"),numberOfNights:1},SwapToCabins:function(){try{var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n.Accommodation=["Cabins"];CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(t){}document.getElementById("accommodationFlexCabins").style.order="1";document.getElementById("accommodationFlexSites").style.order="2";document.getElementById("mapButtonCabins").style.display="inline-block";document.getElementById("mapButtonSites").style.display="none";window.AccommodationFilterStore.state[0].data=["Cabins"]},SwapToSites:function(){try{var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n.Accommodation=["Sites"];CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(t){}document.getElementById("accommodationFlexCabins").style.order="2";document.getElementById("accommodationFlexSites").style.order="1";document.getElementById("mapButtonCabins").style.display="none";document.getElementById("mapButtonSites").style.display="inline-block";window.AccommodationFilterStore.state[0].data=["Sites"]},IsPriceFilterApplied:function(){return!(this.state.MinPriceRange===window.TwoSliderFilterStore.default.startPoint&&this.state.MaxPriceRange===window.TwoSliderFilterStore.default.endPoint)},ProcessAvailCacheData:function(n){for(var t,i,u=[],r=0;r<this.state.accommodations.length;r++)t=_.clone(this.state.accommodations[r]),i=_.find(n,{AccommodationID:t.AccommodationID}),i!==null&&typeof i!="undefined"?t.AvailabilityCacheData=i:console.log("Data not returned from availability cache."),u.push(t);this.state.accommodations=u},GetDailyFromPrices:function(){var n=this,t;this.state.accommodationLoading=!0;t=moment(new Date,"DD/MM/YYYY").format();request={ParkID:this.state.ParkId,Date:t};$.ajax({type:"GET",url:"/api/Deals/GetDailyAvailability",contentType:"application/json; charset=utf-8",data:request,success:function(t){var i=JSON.parse(t);n.ProcessAvailCacheData(i.Accommodations);n.state.accommodationLoading=!1},error:function(){}})},FilteredByAccommodationType:function(){var n=this,t;n.state.Type.length!==1||this.state.checkAccomParam?(this.state.showCabinList=!0,this.state.showSiteList=!0,(n.state.Type.length===0||this.state.checkAccomParam)&&(t=Common.GetUrlParameter("accommodationType"),this.state.checkAccomParam=!1,t==""?n.state.Type.length===1&&(n.state.Type[0].toUpperCase()==="CABINS"?(this.state.showCabinList=!0,this.state.showSiteList=!1,n.SwapToCabins()):n.state.Type[0].toUpperCase()==="SITES"&&(this.state.showCabinList=!1,this.state.showSiteList=!0,n.SwapToSites())):t.toUpperCase()==="CABINS"?n.SwapToCabins():t.toUpperCase()==="SITES"&&n.SwapToSites())):n.state.Type[0].toUpperCase()==="CABINS"?(this.state.showCabinList=!0,this.state.showSiteList=!1,n.SwapToCabins()):n.state.Type[0].toUpperCase()==="SITES"&&(this.state.showCabinList=!1,this.state.showSiteList=!0,n.SwapToSites())},CallPms:function(){var n=this,t,i,r;n.state.StartDate!=undefined&&(t=moment(n.state.StartDate).format("YYYY MM DD"),i=moment(n.state.EndDate).format("YYYY MM DD"));n.state.accommodationLoading=!0;n.state.callingPms=!0;r={ArrivalDate:t,DepartingDate:i,NumAdults:n.state.NumAdults,NumKids:n.state.NumChildren,NumInfants:n.state.NumInfants,ParkIDs:[n.state.ParkId],UseCache:!0};$.ajax({type:"GET",url:"/api/Booking/GetAllParkAvailability",contentType:"application/json; charset=utf-8",data:r,success:function(t){t.ResponseStatus==eHttpResponseStatus.Ok?(window.AccommodationEventBus.$emit("all-park-pms-availability-update",t),n.state.callingPms=!1):(Common.ShowErrorStatusMessages(t.StatusMessages),n.state.accommodationLoading=!1,n.state.callingPms=!1)},error:function(){n.state.accommodationLoading=!1;n.state.callingPms=!1}})}};Vue.component("view-image-button",{props:["images"],template:"#AccommodationViewImages",data:function(){return{}},methods:{openGallery:function(){for(var i,r=document.querySelectorAll(".pswp")[0],t=[],n=0;n<this.images.length;n++)t.push({src:this.images[n].ImageURL,w:1200,h:800,title:this.images[n].Description});i={index:0};window.gallery=new PhotoSwipe(r,PhotoSwipeUI_Default,t,i);window.gallery.init()}},created:function(){}});Vue.component("feature-list-data-wrapper",{props:["ParkId","FeatureList"],data:function(){return{featureItemList:[],featureMoreItemList:[],morePage:!1,count:0}},methods:{},mounted:function(){var n=this.FeatureList;n.length<=6?(this.featureItemList=this.FeatureList,this.morePage=!1):(this.featureItemList=this.FeatureList.slice(0,6),this.featureMoreItemList=this.FeatureList.slice(6),this.morePage=!0,this.count=this.FeatureList.length)}});Vue.component("more-feature-data-wrapper",{props:["FeatureCount","MoreFeatureList"],data:function(){return{active:!1,moreFeatureList:[],count:0}},methods:{toggle:function(){this.active=this.active?!1:!0}},mounted:function(){this.count=this.FeatureCount;this.moreFeatureList=this.MoreFeatureList}});Vue.component("action-confirmation",{props:["index"],template:"#CART_ITEM_ACTION_CONFIRMATION_TEMPLATE",methods:{removeItemFromCart:function(n){window.CartStore.removeItemFromCart(n)},cancelRemoveItemFromCart:function(n){window.CartStore.toggleMarkItemForRemoval(n)}}});Vue.component("cart",{template:"#CART_TEMPLATE",data:function(){return{state:window.CartStore.state}},computed:{hasItems:function(){return _.some(this.state.cartItems,function(n){return n.CartItemTypeID==window.CartItemType.ACCOMMODATION?!0:n.CartItemTypeID==window.CartItemType.GIFTCARD?!0:n.CartItemTypeID==window.CartItemType.MEMBERSHIP?!0:n.CartItemTypeID==window.CartItemType.PRODUCT?!0:!1})}},methods:{}});window.CartEventBus=new Vue;window.CartEvents={SET_CART_STATE:"set-cart-state",REMOVE_ITEM_FROM_CART:"remove-item-from-cart",LOADED:"loaded",STOP_PROCESSING:"stop-processing",SET_CART_ERROR:"set-cart-error",ADD_BOOKING:"add-booking",ADD_PRODUCTS:"add-products",UPDATE_PRODUCT:"update-product",ADD_MEMBERSHIP:"add-membership",REMOVE_MEMBERSHIP:"remove-membership",ADD_GIFTCARDS:"add-giftcards",ADD_GIFTCARD_REDEMPTION:"add-giftcard-redemption",ADD_GIFTCARD_POSTAGE:"add-giftcard-postage",REMOVE_GIFTCARD_POSTAGE:"remove-girftcard-postage",ADD_GIFTCARD_PROMOCODE_TO_CART:"add-giftcard-promocode-to-cart",CLOSE_CART_MODAL:"close-cart-modal",POPULATE_CART:"populate-cart"};window.CartItemType={ACCOMMODATION:1,GIFTCARD:2,MEMBERSHIP:3,PRODUCT:4,GIFTCARD_REDEMPTION:5,GIFTCARD_POSTAGE_FEE:6,PROMOTION:7};window.CartState={NEW:1,EDIT:2,SIGN_IN:3,CHECKOUT_EXTRAS:4,CHECKOUT_DETAILS:5,CHECKOUT_PAYMENT:6,PAID:7,ERROR:8,LOADING:9};Vue.component("cart-footer",{template:"#CART_FOOTER_TEMPLATE",mixins:[MIXIN_CHECK_OVERLAPPING_BOOKINGS,MIXIN_CHECKOUT_DEALS,MIXIN_MEMBERSHIP,MIXIN_CART],props:["responsive-footer","continue-button"],data:function(){return{state:window.CartStore.state,checkoutState:{},continueButtonBool:this.continueButton}},computed:{CartStates:function(){return window.CartState},showContinueButton:function(){return(this.$data.continueButtonBool||this.$mq!="sm"&&this.$mq!="md"&&this.$mq!="lg")&&window.CheckoutStore!=null},hasUnavailableItems:function(){return _.some(this.state.cartItems,{IsUnavailable:!0})||this.showAddMembership},cartProcessing:function(){return this.state.cartProcessing},cartError:function(){return this.state.cartError},memberLoggedIn:function(){return!!window.LoginStore.state.membership},showPaymentRequestButton:function(){return this.checkoutState.paymentType=="googleapple"},showAddMembership:function(){if((window.CartStore.state.cartState==window.CartState.CHECKOUT_EXTRAS||window.CartStore.state.cartState==window.CartState.CHECKOUT_DETAILS||window.CartStore.state.cartState==window.CartState.CHECKOUT_PAYMENT)&&this.hasMemberOnlyDeal){if(this.cartHasMembership)return!1;if(!this.isLoggedIn||this.isHolidayPerksMember)return!0}return!1}},methods:{closeCheckoutModal:function(){window.CartEventBus.$emit(window.CartEvents.CLOSE_CART_MODAL)},progressCheckout:function(){this.state.cartState==window.CartState.EDIT?window.location.href="/checkout":window.CheckoutEventBus.$emit(window.CheckoutEvents.ATTEMPT_PROGRESS_CHECKOUT)},addMembership:function(){window.CartEventBus.$emit(window.CartEvents.ADD_MEMBERSHIP,function(){},function(){Common.ShowError("Unable to add membership to cart.")})},reportFacebookAnalytics:function(){if(this.state.cartState==CartState.PAID){var n=this.DisplayPriceWithDecimals(this.paymentRequired);fbq("track","Purchase",{value:{Value:n},currency:"AUD"})}}},mounted:function(){window.CheckoutEventBus&&(this.checkoutState=window.CheckoutStore.state)}});Vue.component("cart-handler",{template:"<div style='display:none'><\/div>",mounted:function(){window.CartEventBus.$on(window.CartEvents.CLOSE_CART_MODAL,function(){window.CartStore.closeCart()});window.CartEventBus.$on(window.CartEvents.ADD_BOOKING,function(n,t,i){window.CartStore.addBooking(n,t,i)});window.CartEventBus.$on(window.CartEvents.ADD_PRODUCTS,function(n,t,i){window.CartStore.addProducts(n,t,i)});window.CartEventBus.$on(window.CartEvents.ADD_GIFTCARDS,function(n,t,i){window.CartStore.addGiftcards(n,t,i)});window.CartEventBus.$on(window.CartEvents.ADD_MEMBERSHIP,function(n,t){window.CartStore.addMembership(n,t)});window.CartEventBus.$on(window.CartEvents.REMOVE_MEMBERSHIP,function(n,t){window.CartStore.removeMembership(n,t)});window.CartEventBus.$on(window.CartEvents.UPDATE_PRODUCT,function(n,t,i){window.CartStore.updateProduct(n,t,i)});window.CartEventBus.$on(window.CartEvents.POPULATE_CART,function(n){window.CartStore.repopulateCart(n)});window.CartEventBus.$on(window.CartEvents.ADD_GIFTCARD_PROMOCODE_TO_CART,function(n,t,i){window.CartStore.addGiftcardPromocodeToCart(n,t,i)});window.CartEventBus.$on(window.CartEvents.REMOVE_ITEM_FROM_CART,function(n,t,i){window.CartStore.removeItemFromCart(n,t,i)});window.CartEventBus.$on(window.CartEvents.SET_CART_STATE,function(n){window.CartStore.setCartState(n)});window.CartEventBus.$on(window.CartEvents.STOP_PROCESSING,function(){window.CartStore.stopProcessing()});window.CartEventBus.$on(window.CartEvents.SET_CART_ERROR,function(n){window.CartStore.setCartError(n)});window.CartEventBus.$on(window.CartEvents.ADD_GIFTCARD_POSTAGE,function(n,t,i){window.CartStore.addGiftcardPostage(n,t,i)});window.CartEventBus.$on(window.CartEvents.REMOVE_GIFTCARD_POSTAGE,function(n,t,i){window.CartStore.removeGiftcardPostage(n,t,i)});window.CheckoutEventBus!=null&&(window.CheckoutEventBus.$on(window.CheckoutEvents.PROGRESS_CHECKOUT,function(){window.CartStore.progressCheckout()}),window.CheckoutEventBus.$on(window.CheckoutEvents.PROCESS_PAYMENT,function(){window.CartStore.setCartProcessing()}));window.LoginEventBus.$on(window.LoginEvents.AUTHENTICATED,function(){window.CartStore.retrieveCart()});typeof CART!="undefined"?(window.CartStore.setCartState(window.CartState.PAID),window.CartStore.repopulateCart(CART),window.CartEventBus.$emit(window.CartEvents.LOADED),window.GoogleAnalyticsEcommerceEventBus.$emit("PURCHASE")):window.CartStore.retrieveCart()},methods:{}});Vue.component("cart-sign-in",{template:"#CART_SIGN_IN_TEMPLATE",data:function(){return{}},methods:{},mounted:function(){var n=this;window.LoginEventBus.$on(window.LoginEvents.HIDE_LOGIN_MODAL,function(n){setTimeout(function(){n!=null&&n()},300)})}});window.CartStore={state:{cartItems:[],cartId:"",cartDto:{},encryptedCartId:"",transactionId:0,memberId:null,cartOwnerName:null,transaction:null,cartState:window.CartState.LOADING,cartProcessing:!1,cartError:"",updateTravelDetails:!1,isLoading:!1,previousCartItems:null},repopulateCart:function(n){n!=null&&(this.state.previousCartItems=this.state.previousCartItems==null?JSON.parse(JSON.stringify(n.CartItems)):JSON.parse(JSON.stringify(this.state.cartItems)),this.state.cartItems.length>0&&this.emptyCart(),this.addItemsToCart(n.CartItems,!0),this.state.cartId=n.EncryptedCartID,this.state.encryptedCartId=n.EncryptedCartID,this.state.transactionId=n.TransactionID,this.state.memberId=n.MemberID,this.state.transaction=n.Transaction,this.state.cartOwnerName=n.FirstName,this.state.cartDto=n)},addItemToCart:function(n){var t=n;t=_.merge(t,n);t.TryDelete=!1;this.state.cartItems.push(t);t.index=this.state.cartItems.length-1;t.TransactionLineItem.LineItemSequence=t.index+1},addItemsToCart:function(n){var t=this;n.forEach(function(n){t.addItemToCart(n)})},emptyCart:function(){this.state.cartItems.splice(0,this.state.cartItems.length)},toggleMarkItemForRemoval:function(n){this.state.cartItems[n].TryDelete=!this.state.cartItems[n].TryDelete},removeItemFromCart:function(n,t,i){var r=this,u=JSON.parse(JSON.stringify(this.state.cartItems[n])),f={CartID:this.state.encryptedCartId,CartItemID:u.CartItemID};r.setCartLoading();$.post({url:"/api/Cart/deleteitem",data:f,dataType:"json",success:function(n){r.setCartFinishedLoading();n.Status==eResponseStatus.Ok?(r.repopulateCart(n.Cart),!t||t(),window.GoogleAnalyticsEcommerceEventBus.$emit("REMOVE-FROM-CART")):Common.ShowError("Unexpected error has occurred.")},error:function(){r.setCartFinishedLoading();i?i():Common.ShowError("Unexpected error has occurred.")}})},removeProductFromCart:function(n,t,i){var r=_.findIndex(this.state.cartItems,{ItemID:n});this.removeItemFromCart(r,t,i)},setCartState:function(n){this.state.cartState=n},progressCheckout:function(){switch(this.state.cartState){case window.CartState.CHECKOUT_EXTRAS:this.state.cartState=window.CartState.CHECKOUT_DETAILS;break;case window.CartState.CHECKOUT_DETAILS:this.state.cartState=window.CartState.CHECKOUT_PAYMENT;break;default:return}},retrieveCart:function(){var n=this,i,t;n.setCartLoading();i="";t="/api/Cart/GetCart?cartId=";try{urlCartId=Common.GetUrlParameter("cartId");typeof urlCartId!="undefined"&&(t+=encodeURIComponent(urlCartId))}catch(r){}if(0){window.CartStore.state.cartItems=[{CartItemID:2106,CartID:1522,TransactionLineItemID:1613543,ItemID:0,CartItemTypeID:3,IsDeleted:!1,Referer:null,RefererType:0,RefererUrl:null,RefererDomain:null,BookingID:null,TransactionLineItem:{TransactionLineItemID:1613543,TransactionID:881779,StoreID:"298884b9-5051-4409-98bb-1d0d5f86c5ea",LineItemSequence:1,ArrivalDate:null,DepartureDate:null,SKU:"35",InvoiceNumber:null,Description:"Holiday Perks+ Member - Join",Quantity:1,UnitPrice:50,LineDiscountAmount:0,DiscountReasonID:null,ExtendedPrice:50,CurrencyCode:"AUD",CreatedBy:"anonymous",CreatedDateTime:"2019-11-07T16:06:34.053",ModifiedBy:"anonymous",ModifiedDateTime:"2019-11-07T16:06:34.053",LineItemTypeID:3,LineItemStatusID:106,ReferralTypeID:null,LoggedCalculation:null,ReferenceNumber:null,CancellationDate:null,AmountPaid:50,BookingID:null,Booking:null},ParkName:null,ParkTypeID:0,DealName:null,IsMemberOnlyDeal:!1,ProductName:null,AccommodationType:null,ParkStateAlias:null,AdditionalDetails:null,IsUnavailable:!1,PetFriendly:!1,ParkTermsAndConditionsURL:null,ParkPetTermsAndConditionsURL:null,ErrorMessage:null,TryDelete:!1,index:0},{CartItemID:2107,CartID:1522,TransactionLineItemID:1613544,ItemID:0,CartItemTypeID:5,IsDeleted:!1,Referer:null,RefererType:0,RefererUrl:null,RefererDomain:null,BookingID:null,TransactionLineItem:{TransactionLineItemID:1613544,TransactionID:881779,StoreID:"298884b9-5051-4409-98bb-1d0d5f86c5ea",LineItemSequence:2,ArrivalDate:null,DepartureDate:null,SKU:"discount10",InvoiceNumber:null,Description:"Discount for Online Promotion 'Discount 10%'",Quantity:1,UnitPrice:-10,LineDiscountAmount:null,DiscountReasonID:null,ExtendedPrice:-10,CurrencyCode:"AUD",CreatedBy:"anonymous",CreatedDateTime:"2019-11-07T16:07:02.96",ModifiedBy:"anonymous",ModifiedDateTime:"2019-11-07T16:07:02.96",LineItemTypeID:23,LineItemStatusID:134,ReferralTypeID:null,LoggedCalculation:null,ReferenceNumber:"Membership",CancellationDate:null,AmountPaid:-10,BookingID:null,Booking:null},ParkName:null,ParkTypeID:0,DealName:null,IsMemberOnlyDeal:!1,ProductName:null,AccommodationType:null,ParkStateAlias:null,AdditionalDetails:null,IsUnavailable:!1,PetFriendly:!1,ParkTermsAndConditionsURL:null,ParkPetTermsAndConditionsURL:null,ErrorMessage:null,TryDelete:!1,index:1}];window.CartStore.state.cartItems[1].IsMemberOnlyDeal=!1;window.CartStore.setCartState(window.CartState.EDIT);window.CartEventBus.$emit(window.CartEvents.LOADED);n.setCartFinishedLoading();setTimeout(function(){window.hideLoadingBlob()},1e3);return}$.ajax({type:"GET",url:t,contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){t.Status==window.eResponseStatus.Ok&&(window.CartStore.repopulateCart(t.Cart),window.CartStore.setCartState(window.CartState.EDIT),window.CartEventBus.$emit(window.CartEvents.LOADED));n.setCartFinishedLoading()},error:function(){n.setCartFinishedLoading()}})},removeMembership:function(n,t){var i=_.findIndex(this.state.cartItems,{CartItemTypeID:window.CartItemType.MEMBERSHIP});i>-1&&this.removeItemFromCart(i,n,t)},setCartProcessing:function(){this.setCartLoading()},stopProcessing:function(){this.setCartFinishedLoading()},setCartError:function(n){this.state.cartError=n},openCart:function(){$("#cartModal > span").first().click()},closeCart:function(){document.getElementById("cartModalWrapper").__vue__.closeModal()},addBooking:function(n,t,i){var r=this,u=n;u.CartID=r.state.encryptedCartId;r.setCartLoading();$.post({url:"/api/Cart/AddBooking",data:u,dataType:"json",success:function(n){r.setCartFinishedLoading();n.Status==eResponseStatus.Ok?(r.repopulateCart(n.Cart),!t||t(),r.openCart(),window.GoogleAnalyticsEcommerceEventBus.$emit("ADD-TO-CART")):!i||(n.ResponseMessage==="ALLOTMENT_UNAVAILABLE"?i("This accommodation is not available for the continuous period selected."):i())},error:function(){r.setCartFinishedLoading();!i||i()}})},addProducts:function(n,t,i){var r=this,u={CartID:r.state.encryptedCartId,Products:n};r.setCartLoading();$.post({url:"/api/Cart/AddProduct",data:u,dataType:"json",success:function(n){r.setCartFinishedLoading();n.Status==eResponseStatus.Ok?(r.repopulateCart(n.Cart),!t||t(),r.openCart(),window.GoogleAnalyticsEcommerceEventBus.$emit("ADD-TO-CART")):i?i(n.ResponseMessage):Common.ShowError("Unexpected error has occurred.")},error:function(){r.setCartFinishedLoading();i?i():Common.ShowError("Unexpected error has occurred.")}})},addGiftcardPromocodeToCart:function(n,t,i){var r=this,u={CartID:r.state.encryptedCartId,Code:n};r.setCartLoading();$.post({url:"/api/cart/addgiftcardpromocode",data:u,dataType:"json",success:function(n){r.setCartFinishedLoading();n.Status==eResponseStatus.Ok?(r.repopulateCart(n.Cart),t&&t()):i?i(n.ResponseMessage):Common.ShowError("Unexpected error has occurred.")},error:function(n){r.setCartFinishedLoading();switch(n.status){case 409:Common.ShowError("Uh, oh! Too many tries.  Please try again later.");break;case 404:i()}}})},updateProduct:function(n,t,i){var r=this,u=n;u.CartID=r.state.encryptedCartId;r.setCartLoading();$.post({url:"/api/Cart/UpdateProduct",data:u,dataType:"json",success:function(u){r.setCartFinishedLoading();u.Status==eResponseStatus.Ok?(r.repopulateCart(u.Cart),!t||t(),r.openCart(),window.GoogleAnalyticsEcommerceEventBus.$emit("UPDATE-CART",n.CartItemID)):i?i():Common.ShowError("Unexpected error has occurred.")},error:function(){r.setCartFinishedLoading();i?i():Common.ShowError("Unexpected error has occurred.")}})},addGiftcards:function(n,t,i){var r=this,u={CartID:r.state.encryptedCartId,GiftCards:n};r.setCartLoading();$.post({url:"/api/Cart/AddGiftCards",data:u,dataType:"json",success:function(n){r.setCartFinishedLoading();n.Status==eResponseStatus.Ok?(r.repopulateCart(n.Cart),!t||t(),r.openCart(),window.GoogleAnalyticsEcommerceEventBus.$emit("ADD-TO-CART")):i?i():Common.ShowError("Unexpected error has occurred.")},error:function(){r.setCartFinishedLoading();i?i():Common.ShowError("Unexpected error has occurred.")}})},addMembership:function(n,t){var i=[{ItemType:window.CartItemType.MEMBERSHIP}];this.addProducts(i,n,t)},addGiftcardPostage:function(n,t){var i=this,r={};r.CartID=i.state.encryptedCartId;i.setCartLoading();$.post({url:"/api/Cart/AddGiftCardPostage",data:r,dataType:"json",success:function(r){i.setCartFinishedLoading();r.Status==eResponseStatus.Ok?(i.repopulateCart(r.Cart),!n||n()):!t||t()},error:function(){i.setCartFinishedLoading();!t||t()}})},removeGiftcardPostage:function(n,t){var i=_.findIndex(this.state.cartItems,{CartItemTypeID:window.CartItemType.GIFTCARD_POSTAGE_FEE});i>-1&&this.removeItemFromCart(i,n,t)},setCartLoading:function(){this.state.cartProcessing=!0;$(".c-cart-summary").block({message:elementBlockUI})},setCartFinishedLoading:function(){$(".c-cart-summary").unblock();this.state.cartProcessing=!1}};Vue.component("cart-summary",{template:"#CART_SUMMARY_TEMPLATE",data:function(){return{state:window.CartStore.state}},computed:{isEmptyCart:function(){return this.hasParks?!1:this.hasExtras?!1:!0},hasParks:function(){return this.parks.length>0},hasReductions:function(){return this.reductions.length>0},hasExtras:function(){return this.extras.length>0},hasError:function(){return this.state.cartState==window.CartState.ERROR},isLoading:function(){return this.state.cartState==window.CartState.LOADING},parks:function(){return _.filter(this.state.cartItems,function(n){return n.CartItemTypeID==window.CartItemType.ACCOMMODATION})},reductions:function(){return _.filter(this.state.cartItems,function(n){return n.CartItemTypeID==window.CartItemType.PROMOTION||n.CartItemTypeID==window.CartItemType.GIFTCARD_REDEMPTION})},extras:function(){return _.filter(this.state.cartItems,function(n){return n.CartItemTypeID==window.CartItemType.MEMBERSHIP||n.CartItemTypeID==window.CartItemType.GIFTCARD||n.CartItemTypeID==window.CartItemType.PRODUCT||n.CartItemTypeID==window.CartItemType.GIFTCARD_POSTAGE_FEE})},showHeaderCheckout:function(){return(this.state.cartState==window.CartState.CHECKOUT_EXTRAS||this.state.cartState==window.CartState.CHECKOUT_DETAILS||this.state.cartState==window.CartState.CHECKOUT_PAYMENT)&&(this.$mq=="xl"||this.$mq=="lg")},showHeaderCheckoutComplete:function(){return this.state.cartState==window.CartState.PAID},mounted:function(){var n=this}}});window.GoogleAnalyticsEcommerceEventBus=new Vue;Vue.component("google-analytics-ecommerce",{mixins:[MIXIN_MEMBERSHIP],template:"<div style='display:none'><\/div>",mounted:function(){var n=this;window.GoogleAnalyticsEcommerceEventBus.$on("ADD-TO-CART",function(){var i=n.getCartObjects(),t={event:"addToCart",ecommerce:{currencyCode:"AUD",add:{actionField:{list:"Cart"},products:i}}};console.log(t);dataLayer.push(t)});window.GoogleAnalyticsEcommerceEventBus.$on("UPDATE-CART",function(t){var f=_.findIndex(window.CartStore.state.cartItems,{CartItemID:t}),r=JSON.parse(JSON.stringify(window.CartStore.state.cartItems[f])),u,i;r.TransactionLineItem.Quantity=1;u=n.getCartObject(r);i={event:"addToCart",ecommerce:{currencyCode:"AUD",add:{actionField:{list:"Cart"},products:[u]}}};console.log(i);dataLayer.push(i)});window.GoogleAnalyticsEcommerceEventBus.$on("REMOVE-FROM-CART",function(){var i=n.getCartObjects(),t={event:"removeFromCart",ecommerce:{currencyCode:"AUD",remove:{actionField:{list:"Cart"},products:i}}};console.log(t);dataLayer.push(t)});window.GoogleAnalyticsEcommerceEventBus.$on("START_CHECKOUT",function(){n.startCheckout()});window.GoogleAnalyticsEcommerceEventBus.$on("CHANGE_CHECKOUT_STEP",function(t){n.changeCheckoutStep(t)});window.GoogleAnalyticsEcommerceEventBus.$on("PURCHASE",function(){n.purchase()})},methods:{getCartObjects:function(){for(var r=this,t=r.getCartChanges(),i=[],n=0;n<t.length;n++)i.push(this.getCartObject(t[n]));return i},getCartObject:function(n){var i=this,t=null;switch(n.CartItemTypeID){case window.CartItemType.ACCOMMODATION:t=i.getAccommodationObject(n);break;case window.CartItemType.GIFTCARD:t=i.getGiftcardObject(n);break;case window.CartItemType.MEMBERSHIP:t=i.getMembershipObject(n);break;case window.CartItemType.PRODUCT:t=i.getParkProductObject(n)}return t},getAccommodationObject:function(n){var t=moment(n.TransactionLineItem.ArrivalDate).startOf("day"),i=moment(n.TransactionLineItem.DepartureDate).startOf("day");return{name:n.ProductName,id:n.CartItemID,price:n.TransactionLineItem.ExtendedPrice,brand:n.ParkName,category:window.EnumText.ParkTypeEnum[n.ParkTypeID],variant:n.AccommodationType,quantity:1,position:n.index+1,dimension1:this.isLoggedIn?"Signed In":"Guest",dimension2:this.membershipLevel,dimension3:t.format("DD/MM/YYYY")+"-"+i.format("DD/MM/YYYY"),metric1:i.diff(t,"days")}},getMembershipObject:function(n){return{name:"Holiday Perks+ Membership",id:n.CartItemID,price:n.TransactionLineItem.ExtendedPrice,brand:"BIG4",category:"Membership",quantity:1,position:n.index+1,dimension1:this.isLoggedIn?"Signed In":"Guest",dimension2:this.membershipLevel}},getGiftcardObject:function(n){return{name:"Giftcard",id:n.CartItemID,price:n.TransactionLineItem.UnitPrice,brand:"BIG4",category:"Giftcard",quantity:n.TransactionLineItem.Quantity,position:n.index+1,dimension1:this.isLoggedIn?"Signed In":"Guest",dimension2:this.membershipLevel}},getParkProductObject:function(n){return{name:n.ProductName,id:n.CartItemID,price:n.TransactionLineItem.UnitPrice,brand:n.ParkName,category:"In Park Product",quantity:n.TransactionLineItem.Quantity,position:n.index+1,dimension1:this.isLoggedIn?"Signed In":"Guest",dimension2:this.membershipLevel}},getCartChanges:function(){var r=[],i,n,t,u;if(window.CartStore.state.cartItems.length<window.CartStore.state.previousCartItems.length)for(n=0;n<window.CartStore.state.previousCartItems.length;n++){for(i=!1,t=0;t<window.CartStore.state.cartItems.length;t++)if(window.CartStore.state.previousCartItems[n].CartItemID==window.CartStore.state.cartItems[t].CartItemID){i=!0;break}i||r.push(window.CartStore.state.previousCartItems[n])}else{if(window.CartStore.state.cartItems.length>window.CartStore.state.previousCartItems.length)for(n=0;n<window.CartStore.state.cartItems.length;n++){for(i=!1,t=0;t<window.CartStore.state.previousCartItems.length;t++)if(window.CartStore.state.cartItems[n].CartItemID==window.CartStore.state.previousCartItems[t].CartItemID){i=!0;break}i||r.push(window.CartStore.state.cartItems[n])}for(n=0;n<window.CartStore.state.cartItems.length;n++)for(t=0;t<window.CartStore.state.previousCartItems.length;t++)window.CartStore.state.cartItems[n].CartItemID==window.CartStore.state.cartItems[t].CartItemID&&window.CartStore.state.cartItems[n].TransactionLineItem.Quantity!=window.CartStore.state.previousCartItems[t].TransactionLineItem.Quantity&&(u=JSON.parse(JSON.stringify(window.CartStore.state.cartItems[n])),u.TransactionLineItem.Quantity=window.CartStore.state.cartItems[n].TransactionLineItem.Quantity-window.CartStore.state.previousCartItems[t].TransactionLineItem.Quantity,r.push(u))}return r},startCheckout:function(){var t=window.CartStore.state.cartItems,i={event:"checkout",ecommerce:{checkout:{actionField:{step:1},products:[]}}},n;if(t.length>0)for(n=0;n<t.length;n++){i.ecommerce.checkout.actionField.revenue+=t[n].TransactionLineItem.ExtendedPrice;switch(t[n].CartItemTypeID){case window.CartItemType.ACCOMMODATION:i.ecommerce.checkout.products.push(this.getAccommodationObject(t[n]));break;case window.CartItemType.GIFTCARD:i.ecommerce.checkout.products.push(this.getGiftcardObject(t[n]));break;case window.CartItemType.MEMBERSHIP:i.ecommerce.checkout.products.push(this.getMembershipObject(t[n]));break;case window.CartItemType.PRODUCT:i.ecommerce.checkout.products.push(this.getParkProductObject(t[n]))}}dataLayer.push(i)},changeCheckoutStep:function(n){dataLayer.push({event:"checkout",ecommerce:{checkout:{actionField:{step:n}}}})},purchase:function(){var t=window.CartStore.state.cartItems,i={event:"purchase",ecommerce:{currencyCode:"AUD",purchase:{actionField:{id:window.CartStore.state.cartDto.TransactionID,revenue:0},products:[]}}},n;if(t.length>0)for(n=0;n<t.length;n++){i.ecommerce.purchase.actionField.revenue+=t[n].TransactionLineItem.ExtendedPrice;switch(t[n].CartItemTypeID){case window.CartItemType.ACCOMMODATION:i.ecommerce.purchase.products.push(this.getAccommodationObject(t[n]));break;case window.CartItemType.GIFTCARD:i.ecommerce.purchase.products.push(this.getGiftcardObject(t[n]));break;case window.CartItemType.MEMBERSHIP:i.ecommerce.purchase.products.push(this.getMembershipObject(t[n]));break;case window.CartItemType.PRODUCT:i.ecommerce.purchase.products.push(this.getParkProductObject(t[n]))}}dataLayer.push(i)},standardEcommerce:function(){var t=window.CartStore.state.cartItems,i={transactionId:window.CartStore.state.cartDto.TransactionID,transactionTotal:0,transactionProducts:[],event:"standardEcommPurchase"},n,r;if(t.length>0)for(n=0;n<t.length;n++){i.transactionTotal+=t[n].TransactionLineItem.ExtendedPrice;switch(t[n].CartItemTypeID){case window.CartItemType.ACCOMMODATION:r={sku:t[n].ProductName+" ("+t[n].TransactionLineItem.Booking.AccommodationID+") - $"+t[n].TransactionLineItem.ExtendedPrice,name:t[n].ParkName,price:t[n].TransactionLineItem.ExtendedPrice,quantity:t[n].TransactionLineItem.Quantity};r.category=t[n].AccommodationType=="Cabins"?"Cabin - FullAmount":"Site - FullAmount";i.transactionProducts.push(r);break;case window.CartItemType.GIFTCARD:i.transactionProducts.push({sku:"0000-0000-0000",name:"$"+t[n].TransactionLineItem.UnitPrice+"-Electronic",category:"GiftCard-Electronic",price:t[n].TransactionLineItem.UnitPrice,quantity:t[n].TransactionLineItem.Quantity});break;case window.CartItemType.MEMBERSHIP:i.transactionProducts.push({sku:"0000000",name:"Holiday Perks+ Member - Join",category:"Membership",price:t[n].TransactionLineItem.ExtendedPrice,quantity:t[n].TransactionLineItem.Quantity});break;case window.CartItemType.PRODUCT:i.transactionProducts.push({sku:t[n].ProductName,name:t[n].ParkName+" - "+t[n].ProductName,category:"In Park Product",price:t[n].TransactionLineItem.UnitPrice,quantity:t[n].TransactionLineItem.Quantity})}}dataLayer.push(i)}}});Vue.component("sign-in-wrapper-cart",{data:function(){return{email:"",password:"",errorMessage:"",isLoading:!1}},methods:{submit:function(){var n=this,t,i;this.pristine=new Pristine(this.$el,{classTo:"c-field",errorClass:"has-error",successClass:"is-success",errorTextParent:"c-input",errorTextClass:"c-field__error"});t=this.pristine.validate();t&&(i={Username:n.email,Password:n.password},n.isLoading=!0,window.LoginEventBus.$emit(window.LoginEvents.PERFORM_LOGIN,i,function(){window.location.href="/checkout"}))}},mounted:function(){var n=this;window.LoginEventBus.$on(window.LoginEvents.AUTHENTICATION_FAILURE,function(t){Common.ShowError(t);n.isLoading=!1})}});Vue.component("accommodation-item",{props:["item"],mixins:[MIXIN_MEMBERSHIP],template:"#CART_ITEM_ACCOMMODATION_TEMPLATE",data:function(){return{}},computed:{dateFrom:function(){return window.CheckoutStore!=undefined&&(window.CheckoutStore.state.bookingDates.startDate==null||moment(this.item.TransactionLineItem.ArrivalDate).isBefore(window.CheckoutStore.state.bookingDates.startDate))&&(window.CheckoutStore.state.bookingDates.startDate=moment(this.item.TransactionLineItem.ArrivalDate),window.CheckoutStore.state.bookingDates.parkID=this.item.TransactionLineItem.Booking.ParkID),moment(this.item.TransactionLineItem.ArrivalDate).format("DD MMM YYYY")},dateTo:function(){return window.CheckoutStore!=undefined&&(window.CheckoutStore.state.bookingDates.endDate==null||moment(this.item.TransactionLineItem.DepartureDate).isBefore(window.CheckoutStore.state.bookingDates.endDate))&&(window.CheckoutStore.state.bookingDates.endDate=moment(this.item.TransactionLineItem.DepartureDate)),moment(this.item.TransactionLineItem.DepartureDate).format("DD MMM YYYY")},numberOfNights:function(){var n=moment(this.item.TransactionLineItem.DepartureDate).startOf("day"),t=moment(this.item.TransactionLineItem.ArrivalDate).startOf("day");return n.diff(t,"day")},hasDeal:function(){return this.item.TransactionLineItem.Booking.SpecialOfferID>0},memberName:function(){var n;if(this.hasMemberDiscount){if(this.item.TransactionLineItem.Booking.IsPrimaryBookingForCartOwner)return window.CheckoutStore?(n=(window.CheckoutStore.state.details.FirstName+" "+window.CheckoutStore.state.details.LastName).trim(),n!="null null"?n:""):"";if(this.item.TransactionLineItem.Booking.BookingParty!=null&&this.item.TransactionLineItem.Booking.BookingParty.FirstName)return n=(this.item.TransactionLineItem.Booking.BookingParty.FirstName+" "+this.item.TransactionLineItem.Booking.BookingParty.LastName).trim(),n!="null null"?n:""}},discountLogo:function(){if(this.hasMemberDiscount)return this.item.TransactionLineItem.Booking.BookingParty!=null&&this.item.TransactionLineItem.Booking.BookingParty.MemberNo?this.getLogoByMembershipLevel(this.item.TransactionLineItem.Booking.BookingParty.MembershipLevel):this.membershipLogo},loggedIn:function(){return this.isLoggedIn},getMembershipPricingClass:function(){if(this.hasMemberDiscount){if(this.item.TransactionLineItem.Booking.BookingParty!=null){if(this.item.TransactionLineItem.Booking.BookingParty.MemberNo)switch(this.item.TransactionLineItem.Booking.BookingParty.MembershipLevel){case 9:return"c-pricing__membership--plus";case 8:return"c-pricing__membership--holiday";case 10:case 2:return"c-pricing__membership--vip"}}else if(this.isVipPerksMember)return"c-pricing__membership--vip";return"c-pricing__membership--plus"}},isMemberDeal:function(){return this.item.IsMemberOnlyDeal},hasMemberDiscount:function(){if(this.item.TransactionLineItem.LineDiscountAmount>0)return!0},guests:function(){var n="";return this.item.TransactionLineItem.Booking.Adults>0&&(n+=", "+this.item.TransactionLineItem.Booking.Adults+" adults"),this.item.TransactionLineItem.Booking.Children>0&&(n+=", "+this.item.TransactionLineItem.Booking.Children+" children"),this.item.TransactionLineItem.Booking.Infants>0&&(n+=", "+this.item.TransactionLineItem.Booking.Infants+" infants"),n.length>0&&n.startsWith(", ")&&(n=n.substring(2)),n}}});Vue.component("cart-line-item",{props:["item"],template:"#CART_ITEM_TEMPLATE",computed:{CartItemType:function(){return window.CartItemType}}});Vue.component("freight-line-item",{props:["item"],template:"#CART_ITEM_FREIGHT_TEMPLATE",data:function(){return{}},computed:{price:function(){return Math.abs(this.item.TransactionLineItem.ExtendedPrice)}},methods:{}});Vue.component("giftcard-line-item",{props:["item"],template:"#CART_ITEM_GIFT_CARD_TEMPLATE",data:function(){return{}},computed:{subtotal:function(){return this.item.TransactionLineItem.ExtendedPrice},hasMultipleInCart:function(){return this.item.TransactionLineItem.Quantity>1},unitPrice:function(){return this.item.TransactionLineItem.UnitPrice}},methods:{},mounted:function(){var n=this;this.$refs.input.$on("onInputNumberChange",function(t){if(t!=n.item.TransactionLineItem.Quantity){var i={CartItemID:n.item.CartItemID,Quantity:t-n.item.TransactionLineItem.Quantity};n.item.TransactionLineItem.Quantity=t;window.CartEventBus.$emit(window.CartEvents.UPDATE_PRODUCT,i,function(){},function(){})}})}});Vue.component("giftcard-redemption-line-item",{props:["item"],template:"#CART_ITEM_GIFTCARD_REDEMPTION_TEMPLATE",data:function(){return{}},computed:{price:function(){return Math.abs(this.item.TransactionLineItem.AmountPaid)}},methods:{}});Vue.component("loading-line-item",{props:["loading-line-item"],template:"#CART_ITEM_LOADING_TEMPLATE",data:function(){return{}}});Vue.component("membership-line-item",{props:["item"],template:"#CART_ITEM_MEMBERSHIP_TEMPLATE",data:function(){return{}},computed:{subtotal:function(){return this.item.TransactionLineItem.UnitPrice},physicalMemberCard:function(){return window.CheckoutStore!=undefined?window.CheckoutStore.state.createAccount.PhysicalMemberCard.toString()=="true":!1},checkoutLineItem:function(){return window.CheckoutStore!=undefined?window.CheckoutStore.state.checkoutState>1:!1}},methods:{}});Vue.component("product-line-item",{props:["item"],template:"#CART_ITEM_PRODUCT_TEMPLATE",data:function(){return{}},computed:{subtotal:function(){return this.item.TransactionLineItem.ExtendedPrice},hasMultipleInCart:function(){return this.item.TransactionLineItem.Quantity>1},unitPrice:function(){return this.item.TransactionLineItem.UnitPrice}},methods:{},mounted:function(){var n=this;this.$refs.input.$on("onInputNumberChange",function(t){if(t!=n.item.TransactionLineItem.Quantity){var i={CartItemID:n.item.CartItemID,Quantity:t-n.item.TransactionLineItem.Quantity};n.item.TransactionLineItem.Quantity=t;window.CartEventBus.$emit(window.CartEvents.UPDATE_PRODUCT,i,function(){},function(){})}})},updated:function(){this.$refs.input.quantity=this.item.TransactionLineItem.Quantity}});Vue.component("promo-code-line-item",{props:["item"],template:"#CART_ITEM_PROMO_CODE_TEMPLATE",data:function(){return{}},computed:{price:function(){return Math.abs(this.item.TransactionLineItem.ExtendedPrice)}},methods:{}});Vue.component("remove-from-cart",{props:["index"],template:"#CART_ITEM_REMOVE_TEMPLATE",data:function(){return{state:window.CartStore.state}},computed:{canDelete:function(){return this.state.cartState==window.CartState.EDIT?!0:this.state.cartState==window.CartState.CHECKOUT_EXTRAS?!0:this.state.cartState==window.CartState.CHECKOUT_DETAILS?!0:!1}},methods:{markItemForRemoval:function(n){window.CartStore.toggleMarkItemForRemoval(n)}}});Vue.component("unavailable-line-item",{props:["item"],template:"#CART_ITEM_UNAVAILABLE_TEMPLATE",data:function(){return{}},methods:{removeItemFromCart:function(){window.CartStore.removeItemFromCart(this.item.index)}}});Vue.component("deal-card",{props:["deal","small-card"],mixins:[MIXIN_SEARCH_SAVED_SEARCHES],template:"#DEAL_CARD_TEMPLATE",data:function(){return{}},computed:{memberOnly:function(){return!1},endDate:function(){return moment(this.deal.ToDate).format("DD MMMM YY")},startDate:function(){return moment(this.deal.FromDate).format("DD MMMM YY")},isSmallCard:function(){return this.$props.smallCard}},methods:{GoToUrl:function(){this.UpdateCookie({url:this.deal.Url,title:this.deal.DealName,icon:"deal"});window.location.href=this.deal.Url}}});Vue.component("deal-fine-print-toggle",{props:{finePrintClicked:{"default":!1},conditions:{"default":""},shortDescription:{"default":""}},mixins:[MIXIN_TOGGLE],computed:{FinePrintExpanded:function(){return this.finePrintClicked},HasConditions:function(){return this.conditions!=null&&this.conditions.length!=0},HasShortDescription:function(){return this.shortDescription!=""&&this.shortDescription!=null}},methods:{Conditions:function(){var n=this,i=[],r,t;if(n.HasConditions){for(r="",t=0;t<n.conditions.length;t++)r+=t==n.conditions.length-1?n.conditions[t]:n.conditions[t]+" / ";return i.push(r),n.HasShortDescription&&i.push(n.shortDescription),i}return n.HasShortDescription?(i.push(n.shortDescription),i):""}},mounted:function(){}});Vue.component("deal-map",{template:"#DEAL_MAP_TEMPLATE",props:["deals"],watch:{deals:function(){this.addDeals()}},methods:{init:function(){window.dealMap=new google.maps.Map(document.getElementById("map"),{zoom:4,center:{lat:-25.363,lng:131.044}});window.dealMapInfowindow=new google.maps.InfoWindow({content:""});this.deals!=undefined&&this.deals.length>0&&this.addDeals()},addDeals:function(){for(var u,f,e,t=window.DealSearchStore.state.AllDealResults,r=new google.maps.LatLngBounds,i=[],n=0;n<t.length;n++)try{t[n]&&t[n].ParkLatitude&&t[n].ParkLongitude&&(t[n].Rating||(t[n].Rating=[{Rating:0}]),u={lat:t[n].ParkLatitude,lng:t[n].ParkLongitude},i.push(new google.maps.LatLng(t[n].ParkLatitude,t[n].ParkLongitude)),f={path:"M16 32c7.6-8.2 11.8-13.5 11.8-20.1s-5.3-11.9-11.8-11.9-11.8 5.3-11.8 11.9 4.1 11.9 11.8 20.1zM16 6.7c2.8 0 5.1 2.3 5.1 5.1s-2.3 5.1-5.1 5.1-5.1-2.3-5.1-5.1 2.3-5.1 5.1-5.1z",fillColor:"#ee4b53",fillOpacity:1,anchor:new google.maps.Point(16,32),strokeWeight:0,scale:1},e=new google.maps.Marker({position:u,map:window.dealMap,title:t[n].ParkName,icon:f,review:t[n].Rating[0].Rating*2,typeID:t[n].ParkTypeID,image:t[n].ImageUrl,page:t[n].DealsPageUrl}),google.maps.event.addListener(e,"click",function(){var t="",i="",n="",r;switch(this.typeID){case window.Enums.ParkTypeEnum.Affiliate:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-bullet-rounded c-icon--tertiary-accent"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="227" height="32" viewBox="0 0 227 32"><title>badge-bullet-rounded<\/title> <path d="M-0.012 3.563c0-4.874 69.747-2.011 98.196-2.011s105.767 2.011 115.202 2.011c9.437 0 29.334 27.599-11.15 27.599-40.483 0-169.104 0.273-185.676 0s-16.572-3.135-16.572-27.599z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Affiliate<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMHoliday:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-3 c-icon--primary"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="136" height="32" viewBox="0 0 136 32"><title>badge-holiday<\/title> <path d="M0.879 2.702c1.916-4.48 35.716-2.037 42.326-2.037s67.99 0.646 78.154 0.646c10.165 0 31.658 29.085-11.946 29.085-43.605 0-67.97 1.604-90.122 1.604-22.151 0-18.413-12.376-18.413-29.298z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Holiday<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMClassic:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-1 c-icon--callout-variant-two"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="132" height="32" viewBox="0 0 132 32"><title>badge-trapezoid-1<\/title> <path d="M0.077 0.649c27.028-0.555 38.893 0 68.8 0s56.662 2.811 55.373 2.811c-1.289 0 26.849 26.363-15.713 26.363-42.559 0-72.196 1.774-91.23 1.774s-17.322-4.022-17.231-30.948z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Classic<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMPremier:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-2 c-icon--callout-variant-one"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="135" height="32" viewBox="0 0 135 32"><title>badge-trapezoid-2<\/title> <path d="M0.031 2.025c17.082-1.098 27.529-1.496 41.797-1.496 14.267 0 67.371-0.268 80.033 4.578 12.665 4.845 27.686 26.365-16.198 26.365h-87.823c-19.403 0-17.809-8.562-17.809-29.448z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Premier<\/p><\/span><\/div>'}t=this.image!=null?'<img style="width:100%" srcset="'+this.image+' 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="'+this.image+'" alt="">':'<img srcset="https://placehold.it/280x158 280w,https://placehold.it/300x169 300w,https://placehold.it/300x169 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="https://placehold.it/300x169" alt="">';i=this.review!=null&&this.review>0?'<div class="c-ratings"><span><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns: xlink="http://www.w3.org/1999/xlink" width="30" height="32" viewBox="0 0 30 32" class="svg-defs" style="position: absolute; width: 0px; height: 0px;"><clipPath id="star"><path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3                                                c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6                                                c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                                <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                                c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                                <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0                                                c0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path><path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\t                                                c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path><path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                                c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><clipPath id="star-empty">                                                <path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                                <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                                <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path>                                                <path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path>                                                <path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><rect id="rating" width="120" height="30" clip-path="url(#star)"><\/rect><\/svg>                                                <span class="rating-eg"><svg height="12px" viewBox="0 0 170 30" data-rating="1.2" class="rating"><rect x="0" y="0" width="100%" height="100%" clip-path="url(#star-empty)" class="bg-rect" style="fill: rgb(236, 236, 236);"><\/rect><rect x="0" y="0" width="'+this.review*10+'%" height="100%" clip-path="url(#star)" class="rating-rect" style="fill: rgb(55, 55, 55);"><\/rect><\/svg><\/span><\/span> <strong class="u-p4">'+Math.round(this.review*10)/10+"/10<\/strong><\/div>":'<strong class="u-p4" style="padding-left: 10px;">No reviews yet<\/strong>';r='<div class="infoWindow">                                 <div class="styleguide-maps" style="background-image:  " data-component="location-map-container" data-component-context="Location Pages">                                 <div class="styleguide-maps__card d-none d-md-block">                                <div class="styleguide-maps__card d-none d-md-block"><div data-component="park-card" data-component-context="map" data-component-label="BIG4 Beacon Resort" class="c-card c-card--primary c-card--popup"><div class="c-card__gallery"><a href = "'+this.page+'" class="c-card__img-wrapper"> '+t+"<\/a>"+n+'<\/div><div class="c-card__body"><h3 class="u-h6 c-card__title"><a href="'+this.page+'">'+this.title+"<\/a ><\/h3 >"+i+"<\/div>                                <\/div>                               <\/div>";window.dealMapInfowindow.setContent(r);window.dealMapInfowindow.open(window.dealMap,this)}))}catch(o){console.log("Unable to add marker to map for deal ["+t[n].DealName+"]")}if(i.length>0){for(n=0;n<i.length;n++)r.extend(i[n]);window.dealMap.fitBounds(r)}}},mounted:function(){this.init()}});window.DealSearchEventBus=new Vue;Vue.component("deal-search-handler",{template:"<div style='display:none'><\/div>",data:function(){return{store:window.DealSearchStore}},methods:{setSearchLoading:function(){this.store.state.PanelLoading=!0},setSearchFinishedLoading:function(){this.store.state.PanelLoading=!1},updateDealSearch:function(n){var t=this;t.store.state.LoadMoreDeals&&(t.store.state.MaxDealsShown+=t.store.state.MaxDealsShown,t.store.state.LoadMoreDeals=!1);n.length>t.store.state.MaxDealsShown?(t.store.state.DealSearch.Results=n.slice(0,t.store.state.MaxDealsShown),t.store.state.DealSearch.MoreDealsLoading=!1,t.store.state.DealSearch.HasMoreDeals=!0):(t.store.state.DealSearch.Results=n,t.store.state.DealSearch.MoreDealsLoading=!1,t.store.state.DealSearch.HasMoreDeals=!1)},performDealSearch:function(){var n=this,t=this.store.getDealSearchRequest();$.ajax({type:"POST",url:"/api/Search/HolidayDeals",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){n.setSearchFinishedLoading();n.getParkReviewInfo(t.Deals)},error:function(){n.setSearchFinishedLoading();n.store.state.DealSearch.MoreDealsLoading=!1;Common.ShowError("Unexpected error trying to load deals.")}})},getParkReviewInfo:function(n){var i=this,r,t,u,f;if(n.length>0){for(r=[],t=0;t<n.length;t++)r.push(n[t].ParkID);u="/api/Park/GetParkListReviewInformation";f={ParkIDs:r};$.ajax({type:"POST",url:u,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(f),success:function(t){for(var u,r=0;r<n.length;r++)u=n[r],n[r].Rating=_.filter(t.RatingList,function(n){return n.ParkID==u.ParkID});i.store.state.AllDealResults=n;i.updateDealSearch(n)},error:function(){Common.ShowError("Unexpected error trying to populate park ratings on map.")}})}else i.updateDealSearch(n)},dynamicZIndex:function(){var n;if(window.DealSearchStore!=undefined&&window.DealSearchStore!=null){var t=!1,r=new MutationObserver(function(n){n.forEach(function(){t?($(".c-head__header-deals").css("z-index","6"),t=!1):($(".c-head__header-deals").css("z-index","8"),t=!0)})}),i=$(".c-filter__panel");if(i.length>0)for(n=0;n<i.length;n++)r.observe(i[n],{attributes:!0,attributeFilter:["style"]})}},anchorToDealsHeading:function(){var n=document.getElementById("AllDealsHeading");this.$nextTick(function(){n!=null&&n!=undefined&&n.scrollIntoView({behavior:"auto",block:"start"})})},bindFilterEvents:function(){var n=this;n.dynamicZIndex();window.DealSearchEventBus.$on("date-filter-update",function(t){var i=n.store.state.StartDate._d!=undefined?n.store.state.StartDate._d.toDateString()!=t.start.toDateString()||n.store.state.EndDate._d.toDateString()!=t.end.toDateString():n.store.state.StartDate.toDateString()!=t.start.toDateString()||n.store.state.EndDate.toDateString()!=t.end.toDateString();n.store.state.StartDate=t.start;n.store.state.EndDate=t.end;i&&(n.store.state.DealSearch.Results=[],n.anchorToDealsHeading(),n.$nextTick(function(){n.performDealSearch()}))});window.DealSearchEventBus.$on("guest-filter-update",function(t){var i=n.store.state.NumAdults!=t.adults||n.store.state.NumChildren!=t.children||n.store.state.NumInfants!=t.infants;n.store.state.NumAdults=t.adults;n.store.state.NumChildren=t.children;n.store.state.NumInfants=t.infants;i&&(n.store.state.DealSearch.Results=[],n.anchorToDealsHeading(),n.$nextTick(function(){n.performDealSearch()}))});window.DealSearchEventBus.$on("pets-filter-update",function(t){var i=n.store.state.PetFriendly!=t.isOn;n.store.state.PetFriendly=t.isOn;i&&(n.store.state.DealSearch.Results=[],n.anchorToDealsHeading(),n.$nextTick(function(){n.performDealSearch()}))});window.DealSearchEventBus.$on("state-filter-update",function(t){var i=n.store.state.States[0]!=t[0];n.store.state.States=t;i&&(n.store.state.DealSearch.Results=[],n.anchorToDealsHeading(),n.$nextTick(function(){n.performDealSearch()}))});window.DealSearchEventBus.$on("distance-filter-update",function(t){var i=n.store.state.MaxDistanceRange!=t.distance;n.store.state.MaxDistanceRange=t.distance;i&&(n.store.state.DealSearch.Results=[],n.anchorToDealsHeading(),n.$nextTick(function(){n.performDealSearch()}))});window.SearchEventBus.$on(window.SearchEvents.LOAD_MORE_DEALS,function(){n.store.state.DealSearch.MoreDealsLoading=!0;n.store.state.LoadMoreDeals=!0;n.updateDealSearch(n.store.state.AllDealResults)});window.DealSearchEventBus.$on("deal-map-initialised",function(){n.populateDealMap()})}},computed:{deals:function(){return this.store.state.DealSearch.Results}},mounted:function(){var n=this;this.bindFilterEvents();this.$nextTick(function(){this.performDealSearch()})},created:function(){var n=this;navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(t){n.store.state.CanUseDistance=!0;n.store.state.Latitude=t.coods.latitude;n.store.state.Longitude=t.coods.longitude})}});Vue.component("deal-search-results-panel",{data:function(){return{store:window.DealSearchStore.state}},computed:{deals:function(){return this.store.DealSearch.Results},dealsLoading:function(){return this.store.DealSearch.MoreDealsLoading},panelLoading:function(){return this.store.PanelLoading},hasMoreDeals:function(){return this.store.DealSearch.HasMoreDeals}},methods:{loadMoreDeals:function(){window.SearchEventBus.$emit(window.SearchEvents.LOAD_MORE_DEALS)}}});window.DealSearchStore={state:{SearchTerm:"",StartDate:moment().endOf("day"),EndDate:moment().endOf("day").add(1,"day"),PetFriendly:!1,States:[],Latitude:0,Longitude:0,MaxDistanceRange:100,NumAdults:1,NumChildren:0,NumInfants:0,CanUseDistance:!1,MaxDealsShown:8,AllDealResults:[],DealCarouselResults:[],LoadMoreDeals:!1,DEFAULT_ADULTS:1,DEFAULT_CHILDREN:0,DEFAULT_INFANTS:0,DEFAULT_START_DATE:moment().endOf("day"),DEFAULT_END_DATE:moment().endOf("day").add(1,"day"),DealSearch:{PageNumber:1,ResultsPerPage:1e3,Results:[],MapResults:[],MoreDealsLoading:!1,HasMoreDeals:!1},PanelLoading:!0},getDealSearchRequest:function(){return{SearchTerm:this.state.SearchTerm,StartDate:this.state.StartDate,EndDate:this.state.EndDate,PetFriendly:this.state.PetFriendly,States:this.state.States,Latitude:this.state.Latitude,Longitude:this.state.Longitude,MaxDistanceRange:this.state.MaxDistanceRange,HolidayType:this.state.HolidayType,ParkType:this.state.ParkType,NumAdults:this.state.NumAdults,NumChildren:this.state.NumChildren,NumInfants:this.state.NumInfants,PageNumber:this.state.DealSearch.PageNumber,ResultsPerPage:this.state.DealSearch.ResultsPerPage}}};Vue.use(AsyncComputed);Vue.component("deals-near-carousel-data-wrapper",{props:["max-deals"],data:function(){return{results:[],request:[],Ipaddress:"",store:window.DealSearchStore}},computed:{items:function(){var n=this.$data.results;return this.store.state.DealCarouselResults=n,this.$data.results.length>0&&window.DealSearchEventBus.$emit("deal-results-found"),n.sort(function(n,t){return n.Distance-t.Distance}),n=_.uniqBy(n,"ParkID"),n.slice(0,this.maxDeals)},isDealsPage:function(){return window.location.href.includes("holiday-deals")}},methods:{GetDealsNearMe:function(){var n=this,t=this.store.getDealSearchRequest();$.ajax({type:"POST",url:"/api/Search/HolidayDeals",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){n.isDealsPage?n.getParkReviewInfo(t.Deals):n.$data.results=t.Deals},error:function(){n.setSearchFinishedLoading();n.store.state.DealSearch.MoreDealsLoading=!1;Common.ShowError("Unexpected error trying to load deals.")}})},getParkReviewInfo:function(n){var i=this,r,t,u,f;if(n.length>0){for(r=[],t=0;t<n.length;t++)r.push(n[t].ParkID);u="/api/Park/GetParkListReviewInformation";f={ParkIDs:r};$.ajax({type:"POST",url:u,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(f),success:function(t){for(var u,r=0;r<n.length;r++)u=n[r],n[r].Rating=_.filter(t.RatingList,function(n){return n.ParkID==u.ParkID});i.store.state.DealCarouselResults=n;i.$data.results=n},error:function(){Common.ShowError("Unexpected error trying to populate park ratings on map.")}})}else i.updateDealSearch(n)}},mounted:function(){this.GetDealsNearMe()}});Vue.use(AsyncComputed);Vue.component("popular-deals-carousel-data-wrapper",{props:["max-deals"],data:function(){return{results:[],request:[],Ipaddress:"",deals:[],store:window.DealSearchStore}},computed:{items:function(){return this.$data.deals}},methods:{GetPopularDealsRightNow:function(){var n=this;$.ajax({type:"GET",url:"/api/Deals/GetRecentMostBookedDeals",contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){n.results=t.RecentMostBookedDealsResult},error:function(){Common.ShowError("Unexpected error trying to load popular deals carousel.")}})},ProcessPopularDealsResponse:function(n){var t,i;for(this.$data.deals=[],t=0;t<n.length;t++)i=_.filter(this.store.state.DealCarouselResults,function(i){return i.Big4ID==n[t].OfferID}),i.length!=0&&(this.$data.deals=this.$data.deals.concat(i));this.$data.deals.length==0&&(this.$data.deals=[])}},mounted:function(){var n=this;this.GetPopularDealsRightNow();window.DealSearchEventBus.$on("deal-results-found",function(){n.ProcessPopularDealsResponse(n.$data.results)})}});Vue.component("gift-card-price-table",{template:"#GiftCardPriceTableTemplate",data:function(){return{isLoading:!1}},computed:{canAddToCart:function(){return!0}},methods:{addToCart:function(){var t=[],n;for($.each(this.$refs.presetAmounts,function(n,i){i.quantity>0&&t.push({Denomination:i.$attrs.amount,Quantity:i.quantity})}),n=0;n<this.$refs.customAmounts.$refs.amount.length;n++)this.$refs.customAmounts.$refs.amount[n].quantity>0&&t.push({Denomination:this.$refs.customAmounts.$refs.inputs[n].value,Quantity:this.$refs.customAmounts.$refs.amount[n].quantity})}}});Vue.component("gift-card-price-table-wrapper",{mixins:[MIXIN_CART],data:function(){return{isLoading:!1}},computed:{canAddToCart:function(){return this.cartLoaded},active:function(){return this.$parent.active},props:function(){return{toggle:this.toggle,active:this.active,canAddToCart:this.canAddToCart,isLoading:this.isLoading,addToCart:this.addToCart}}},methods:{addToCart:function(){var t=this,i,n,r;if(t.isLoading=!0,i=[],$.each(this.$refs.presetAmounts,function(n,t){t.quantity>0&&i.push({Denomination:t.$attrs.amount,Quantity:t.quantity})}),this.$refs.customAmounts.$refs.amount)for(n=0;n<this.$refs.customAmounts.$refs.amount.length;n++)if(r=parseInt(this.$refs.customAmounts.$refs.inputs[n].value),!isNaN(r)){if(r<50){Common.ShowError("Minimum gift card value is $50");t.isLoading=!1;return}this.$refs.customAmounts.$refs.amount[n].quantity>0&&i.push({Denomination:this.$refs.customAmounts.$refs.inputs[n].value,Quantity:this.$refs.customAmounts.$refs.amount[n].quantity})}if(i.length==0){t.isLoading=!1;return}window.CartEventBus.$emit(window.CartEvents.ADD_GIFTCARDS,i,function(){t.isLoading=!1},function(){t.isLoading=!1;Common.ShowError("Error trying to add gift card to cart.")})},toggle:function(){return this.$parent.toggle()}}});Vue.component("article-card",{mixins:[MIXIN_SEARCH_SAVED_SEARCHES],props:["article"],template:"#ARTICLE_CARD_TEMPLATE",data:function(){return{}},computed:{isMobile:function(){return!1},showImageCarousel:function(){return this.isMobile?!1:this.article.Image.length>1?!0:!1}},methods:{GoToUrl:function(){this.UpdateCookie({url:this.article.ArticleUrl,title:this.article.ArticleName,icon:"bulb"});window.location.href=this.article.ArticleUrl}},mounted:function(){}});Vue.component("article-card-load-button",{props:["page-number","sub-category","article-cards"],template:"#ARTICLE_CARD_LOAD_BUTTON_TEMPLATE",data:function(){return{}},computed:{},methods:{loadMoreArticles:function(){var n=this;$.ajax({type:"GET",url:"/api/Article/GetArticleCards?pageNumber="+n.pageNumber+"&subCategory="+n.subCategory,contentType:"application/json; charset=utf-8",success:function(t){var i,e,o;if(n.pageNumber=t.pageNumber,n.articleCards==undefined)n.articleCards=t.ArticleCards;else{var r=!0,u=!1,f=undefined;try{for(i=t.ArticleCards[Symbol.iterator]();!(r=(e=i.next()).done);r=!0)o=e.value,n.articleCards.push(o)}catch(s){u=!0;f=s}finally{try{r||i.return==null||i.return()}finally{if(u)throw f;}}}},error:function(){}})}},mounted:function(){},created:function(){}});Vue.use(AsyncComputed);Vue.component("deal-group-filter-data-wrapper",{data:function(){return{items:[],results:[],request:[],Ipaddress:"",limitNumber:"8",totalCount:""}},methods:{GetAllHolidayDeals:function(){request={SearchTerm:"VIC"};var n=this;$.ajax({type:"GET",url:"api/Search/SiteSearch",contentType:"application/json; charset=utf-8",dataType:"json",data:request,success:function(t){t=JSON.parse(t);n.items=t.Deals;var i=n.items;n.totalCount=i.length},error:function(){}})},LoadMoreDeals:function(){this.limitNumber=this.totalCount}},mounted:function(){this.GetAllHolidayDeals();this.items=[{title:"BIG4 Resort",tag:"Premier",price:"From $30 per night",images:[{lg:"https://placehold.it/340x430",md:"https://placehold.it/250x317"}]},{title:"Beacon Resort",tag:"Premier",price:"From $30 per night",images:[{lg:"https://placehold.it/340x430",md:"https://placehold.it/250x317"}]},{title:"BIG4 Beacon Resort1",tag:"Premier",price:"From $30 per night",images:[{lg:"https://placehold.it/340x430",md:"https://placehold.it/250x317"}]},{title:"BIG4 Beacon Resort2",tag:"Premier",price:"From $30 per night",images:[{lg:"https://placehold.it/340x430",md:"https://placehold.it/250x317"}]},{title:"BIG4 Beacon Resort",tag:"Premier",price:"From $30 per night",images:[{lg:"https://placehold.it/340x430",md:"https://placehold.it/250x317"}]},{title:"BIG4 Beacon",tag:"Premier",price:"From $30 per night",images:[{lg:"https://placehold.it/340x430",md:"https://placehold.it/250x317"}]},{title:"BIG4 Resort",tag:"Premier",price:"From $30 per night",images:[{lg:"https://placehold.it/340x430",md:"https://placehold.it/250x317"}]},{title:"BIG4 Beacon Resort",tag:"Premier",price:"From $30 per night",images:[{lg:"https://placehold.it/340x430",md:"https://placehold.it/250x317"}]},]}});Vue.use(AsyncComputed);Vue.component("deals-carousel-data-wrapper",{props:["ParkId","WidgetPlaceHolderUrl"],data:function(){return{items:[],results:[],request:[],observer:null}},methods:{GetDeals:function(){var n=this,t=n.WidgetPlaceHolderUrl+"/GetFeaturedDeals";$.ajax({type:"GET",url:t,contentType:"application/json; charset=utf-8",dataType:"json",data:{SearchTerm:""},success:function(t){t=t;n.items=t.Deals},error:function(){}})},GetParkDeals:function(){var n=this,t="",i;n.WidgetPlaceHolderUrl!=""&&(n.WidgetPlaceHolderUrl=n.WidgetPlaceHolderUrl.substring(1),t=n.WidgetPlaceHolderUrl+"/GetDealsForPark");i="";$.ajax({type:"GET",url:t,contentType:"application/json; charset=utf-8",data:{parkID:JSON.stringify(n.ParkId)},success:function(t){t=JSON.parse(t);n.items=t.Deals},error:function(){}})},createObserver:function(){this.observer=new IntersectionObserver(this.handleIntersect,{root:null,threshold:"0"});this.observer.observe(this.$el)},handleIntersect:function(n){var t=this;n.forEach(function(n){n.isIntersecting&&(t.GetDeals(),t.observer.unobserve(t.$el))})}},mounted:function(){this.WidgetPlaceHolderUrl!=""?this.GetParkDeals():window.IntersectionObserver?this.createObserver():this.GetDeals()}});Vue.use(AsyncComputed);Vue.component("related-parks-deal-data-wrapper",{props:["DealId","DealDetails","DealName"],data:function(){return{items:[]}},methods:{GetAllRelatedParkDeals:function(){var n=this,t=JSON.parse(n.DealDetails);$.ajax({type:"POST",url:"/api/Search/GetKenticoDealAccommodationSearchByDocumentIDs",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){var i=[];jQuery.isEmptyObject(t)||($.each(t,function(n,t){var r={AccommodationType:t.AccommodationType,Guests:t.Guest,Beds:t.Bed,Bath:t.Bath,ImageUrl:t.ImageUrl,Url:t.Url};i.push(r)}),n.items=i,window.DealStore.UpdateDealName(n.DealName))},error:function(){}})}},mounted:function(){}});Vue.component("home-hero-banner",{data:function(){return{show:!1}},computed:{scrolled:function(){return this.show}},methods:{},mounted:function(){var n=this,t=document.getElementsByClassName("c-banner__shape")[0],i=new IntersectionObserver(function(t){n.show=t[0].isIntersecting==!1?!0:!1});i.observe(t)}});Vue.component("park-map-view-widget",{template:"#PARK_MAP_VIEW_TEMPLATE",props:["parks"],data:function(){return{markersArray:[]}},methods:{init:function(){var n;$(window).width()>700?(n={lat:-27.363,lng:131.044},window.parkDirectoryMap=new google.maps.Map(document.getElementById("map"),{zoom:4,center:n}),window.parkDirectoryMapInfowindow=new google.maps.InfoWindow({content:""})):(n={lat:-27.363,lng:133.044},window.parkDirectoryMap=new google.maps.Map(document.getElementById("map"),{zoom:3,center:n,streetViewControl:!1}),window.parkDirectoryMapInfowindow=new google.maps.InfoWindow({content:""}));this.addParks();this.clusterMarkers()},addParks:function(){for(var u,f,r,t=this.parks,e=new google.maps.LatLngBounds,i=[],n=0;n<t.length;n++)u={lat:t[n].Latitude,lng:t[n].Longitude},i.push(new google.maps.LatLng(t[n].Latitude,t[n].Longitude)),f={path:"M16 32c7.6-8.2 11.8-13.5 11.8-20.1s-5.3-11.9-11.8-11.9-11.8 5.3-11.8 11.9 4.1 11.9 11.8 20.1zM16 6.7c2.8 0 5.1 2.3 5.1 5.1s-2.3 5.1-5.1 5.1-5.1-2.3-5.1-5.1 2.3-5.1 5.1-5.1z",fillColor:"#0064b6",fillOpacity:1,anchor:new google.maps.Point(16,32),strokeWeight:0,scale:1},r=new google.maps.Marker({position:u,map:window.parkDirectoryMap,title:t[n].ParkName,icon:f,review:t[n].ReviewRating,typeID:t[n].ParkTypeID,image:t[n].Images[0],page:t[n].Url}),this.markersArray.push(r),google.maps.event.addListener(r,"click",function(){var t="",n="",i="",r;switch(this.typeID){case window.Enums.ParkTypeEnum.Affiliate:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-bullet-rounded c-icon--tertiary-accent"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="227" height="32" viewBox="0 0 227 32"><title>badge-bullet-rounded<\/title> <path d="M-0.012 3.563c0-4.874 69.747-2.011 98.196-2.011s105.767 2.011 115.202 2.011c9.437 0 29.334 27.599-11.15 27.599-40.483 0-169.104 0.273-185.676 0s-16.572-3.135-16.572-27.599z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Affiliate<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMHoliday:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-3 c-icon--primary"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="136" height="32" viewBox="0 0 136 32"><title>badge-holiday<\/title> <path d="M0.879 2.702c1.916-4.48 35.716-2.037 42.326-2.037s67.99 0.646 78.154 0.646c10.165 0 31.658 29.085-11.946 29.085-43.605 0-67.97 1.604-90.122 1.604-22.151 0-18.413-12.376-18.413-29.298z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Holiday<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMClassic:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-1 c-icon--callout-variant-two"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="132" height="32" viewBox="0 0 132 32"><title>badge-trapezoid-1<\/title> <path d="M0.077 0.649c27.028-0.555 38.893 0 68.8 0s56.662 2.811 55.373 2.811c-1.289 0 26.849 26.363-15.713 26.363-42.559 0-72.196 1.774-91.23 1.774s-17.322-4.022-17.231-30.948z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Classic<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMPremier:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-2 c-icon--callout-variant-one"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="135" height="32" viewBox="0 0 135 32"><title>badge-trapezoid-2<\/title> <path d="M0.031 2.025c17.082-1.098 27.529-1.496 41.797-1.496 14.267 0 67.371-0.268 80.033 4.578 12.665 4.845 27.686 26.365-16.198 26.365h-87.823c-19.403 0-17.809-8.562-17.809-29.448z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Premier<\/p><\/span><\/div>'}t=this.image==null||this.image.MapsImageUrl.includes("placehold")?'<img srcset="https://placehold.it/280x158 280w,https://placehold.it/300x169 300w,https://placehold.it/300x169 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="https://placehold.it/300x169" alt="">':'<img style="width:100%" srcset="'+this.image.MapsImageUrl+' 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="'+this.image.MapsImageUrl+'" alt="">';i=this.review!=null&&this.review>0?'<div class="c-ratings"><span><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns: xlink="http://www.w3.org/1999/xlink" width="30" height="32" viewBox="0 0 30 32" class="svg-defs" style="position: absolute; width: 0px; height: 0px;"><clipPath id="star"><path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3                                         c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0                                        c0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path><path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\t                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path><path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><clipPath id="star-empty">                                        <path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path>                                        <path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path>                                        <path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><rect id="rating" width="120" height="30" clip-path="url(#star)"><\/rect><\/svg>                                        <span class="rating-eg"><svg height="12px" viewBox="0 0 170 30" data-rating="1.2" class="rating"><rect x="0" y="0" width="100%" height="100%" clip-path="url(#star-empty)" class="bg-rect" style="fill: rgb(236, 236, 236);"><\/rect><rect x="0" y="0" width="'+this.review*10+'%" height="100%" clip-path="url(#star)" class="rating-rect" style="fill: rgb(55, 55, 55);"><\/rect><\/svg><\/span><\/span> <strong class="u-p4">'+Math.round(this.review*10)/10+"/10<\/strong><\/div >":'<strong class="u-p4" style="padding-left: 10px;">No reviews yet<\/strong>';r='<div class="infoWindow">                         <div class="styleguide-maps" style="background-image: url(\'NaN " data-component="location-map-container" data-component-context="Location Pages">                         <div class="styleguide-maps__card d-none d-md-block">                        <div class="styleguide-maps__card d-none d-md-block"><div data-component="park-card" data-component-context="map" data-component-label="BIG4 Beacon Resort" class="c-card c-card--primary c-card--popup"><div class="c-card__gallery"><a href = "'+this.page+'" class="c-card__img-wrapper"> '+t+"<\/a>"+n+'<\/div ><div class="c-card__body"> <h3 class="u-h6 c-card__title"><a href="'+this.page+'">'+this.title+"<\/a ><\/h3 >"+i+"<\/div>                        <\/div>                       <\/div>";window.parkDirectoryMapInfowindow.setContent(r);window.parkDirectoryMapInfowindow.open(window.parkDirectoryMap,this)});for(n=0;n<i.length;n++)e.extend(i[n])},clusterMarkers:function(){window.markerCluster=new MarkerClusterer(window.parkDirectoryMap,this.markersArray,{imagePath:"/Content/Images/GoogleMaps/markerclusterer/images/m"})}},mounted:function(){this.init()}});Vue.use(AsyncComputed);Vue.component("highest-rated-parks-carousel-data-wrapper",{data:function(){return{items:[],results:[],request:[],Ipaddress:"",observer:null}},methods:{GetHighestRatedParks:function(){var n=this;$.ajax({type:"GET",url:"/api/homepage/GetHighestRatedParksDetails",contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){var i=jQuery.parseJSON(t);n.items=i},error:function(){}})},createObserver:function(){this.observer=new IntersectionObserver(this.handleIntersect,{root:null,threshold:"0"});this.observer.observe(this.$el)},handleIntersect:function(n){var t=this;n.forEach(function(n){n.isIntersecting&&(t.GetHighestRatedParks(),t.observer.unobserve(t.$el))})}},mounted:function(){window.IntersectionObserver?this.createObserver():this.GetHighestRatedParks()}});Vue.component("parks-near-carousel-data-wrapper",{data:function(){return{items:[],results:[],request:[],bresponse:[],parks:[],deals:[],regions:[],articles:[],Ipaddress:""}},methods:{GetIPAddress:function(){var t=this,n="";axios.get("api/homepage/GetIPAddress").then(function(i){n=i.data;t.GetParksNearMe(n)}).catch(function(n){this.error=n})},GetParksNearMe:function(n){var t={},u=moment().format(),f=moment().add(1,"day").format(),i,r;t={SearchTerm:"park",StartDate:u,EndDate:f,PetFriendly:"",States:n,Latitude:"",Longitude:"",MaxDistanceRange:"",PageNumber:"",ResultsPerPage:""};i=this;r="/api/Search/ParkSearch";$.ajax({type:"POST",url:r,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(n){n=JSON.parse(n);i.items=n.Parks},error:function(){}})},formatPrice:function(n){return n.toFixed(2)}},mounted:function(){this.GetIPAddress()}});Vue.use(AsyncComputed);Vue.component("parks-near-carousel-data-wrapper",{data:function(){return{items:[],results:[],request:[],Ipaddress:""}},methods:{GetParksNearMe:function(){var n=this,t=null,i=null,r;window.navigator.userAgent.indexOf("Edge")>0||window.navigator.userAgent.indexOf("Safari")>0||!navigator.permissions?(n=this,r="api/homepage/GetParksNearMeDetails?latitude="+t+"&longitude="+i,$.ajax({type:"GET",url:r,contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){var i=jQuery.parseJSON(t);n.items=i},error:function(){}})):navigator.permissions.query({name:"geolocation"}).then(function(r){if(console.log(r),r.state==="granted")navigator.geolocation.getCurrentPosition(function(r){t=r.coords.latitude;i=r.coords.longitude;var u="api/homepage/GetParksNearMeDetails?latitude="+t+"&longitude="+i;$.ajax({type:"GET",url:u,contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){var i=jQuery.parseJSON(t);n.items=i},error:function(){}})});else{var u="api/homepage/GetParksNearMeDetails?latitude="+t+"&longitude="+i;$.ajax({type:"GET",url:u,contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){var i=jQuery.parseJSON(t);n.items=i},error:function(){}})}})}},mounted:function(){this.GetParksNearMe()}});Vue.use(AsyncComputed);Vue.component("recently-booked-parks-carousel-data-wrapper",{props:["cards"],data:function(){return{items:[],observer:null}},methods:{createObserver:function(){this.observer=new IntersectionObserver(this.handleIntersect,{root:null,threshold:"0"});this.observer.observe(this.$el)},handleIntersect:function(n){var t=this;n.forEach(function(n){n.isIntersecting&&(t.items=t.cards,t.observer.unobserve(t.$el))})}},mounted:function(){var n=this;window.IntersectionObserver?this.createObserver():n.items=n.cards}});Vue.component("review-data-wrapper",{props:["cards"],data:function(){return{items:[]}},methods:{},mounted:function(){this.items=this.cards}});Vue.component("review-card",{props:["review"],data:function(){return{reviewDetails:[]}},computed:{formatReviewDate:function(){return moment(this.review.ReviewDate).format("DD MMM, YYYY")},getRating:function(){var n=this.review.Rating.toFixed(1).toString(),t=n.split(".");return t[1]=="0"?t[0]:n},getRatingPercent:function(){return this.review.Rating*10},getReviewSourceImage:function(){var n="";switch(this.review.ReviewSource.toLowerCase()){case"google":n="/Content/ReviewIcons/google_logo.png";break;case"ctrip (zh)":n="/Content/ReviewIcons/ctrip_logo.png";break;case"booking":n="/Content/ReviewIcons/booking_logo.png";break;case"wotif":n="/Content/ReviewIcons/wotif_logo.png";break;case"expedia":n="/Content/ReviewIcons/expedia_logo.png";break;case"agoda":n="/Content/ReviewIcons/agoda_logo.png";break;case"facebook":n="/Content/ReviewIcons/facebook_logo.png";break;case"turu":n="/Content/ReviewIcons/turu_logo.png";break;case"hotels.com":n="/Content/ReviewIcons/hotels_logo.jpg"}return n!=""||n!=null?Common.CdnAssetUrl(n):"https://via.placeholder.com/60x60/333333"}},mounted:function(){}});Vue.component("reviews-load-button",{props:["reviews-number",],template:"#ReviewsLoadButtonTemplate",data:function(){return{}},computed:{},methods:{loadMoreReviews:function(){this.$parent.$emit("LOAD-MORE-REVIEWS")}},mounted:function(){},created:function(){}});Vue.component("tip-inspiration-carousel-data-wrapper",{props:["cards"],data:function(){return{items:[],observer:null}},methods:{createObserver:function(){this.observer=new IntersectionObserver(this.handleIntersect,{root:null,threshold:"0"});this.observer.observe(this.$el)},handleIntersect:function(n){var t=this;n.forEach(function(n){n.isIntersecting&&(t.items=t.cards,t.observer.unobserve(t.$el))})}},mounted:function(){var n=this;window.IntersectionObserver?this.createObserver():n.items=n.cards}});Vue.component("footer-forgot-password-wrapper",{data:function(){return{}},methods:{showForgotPasswordModalFromFooter:function(){window.LoginStore.showForgotPasswordModal()}},mounted:function(){var n=this;window.LoginEventBus.$on("forgotPasswordModalUnregistered",function(){window.LoginStore.registerForgotPasswordModal(n)})}});Vue.component("footer-sign-in-wrapper",{data:function(){return{}},methods:{showSignInModalFromFooter:function(){window.LoginStore.showSignInModal()}}});Vue.component("forgot-password",{template:"#FORGOT_PASSWORD_TEMPLATE",data:function(){return{}},methods:{show:function(){this.$refs.modalWrapper.openModal()}},mounted:function(){window.LoginStore.registerForgotPasswordModal(this)}});Vue.component("forgot-password-wrapper",{data:function(){return{email:"",isLoading:!1,resetLinkSent:!1}},methods:{callApi:function(){var n=this;n.isLoading=!0;$.ajax({type:"POST",url:"/api/Login/SendForgotPassword",contentType:"application/json; charset=utf-8",data:JSON.stringify(n.email),success:function(t){n.isLoading=!1;t.Status==eResponseStatus.Ok?n.resetLinkSent=!0:Common.ShowError("Unexpected error has occurred.")},error:function(){n.isLoading=!1;Common.ShowError("Unexpected error has occurred.")}})},submit:function(){this.pristine=new Pristine(this.$el,{classTo:"c-field",errorClass:"has-error",successClass:"is-success",errorTextParent:"c-input",errorTextClass:"c-field__error"});var n=this.pristine.validate();n&&this.callApi()}}});window.LoginEventBus=new Vue;window.LoginEvents={PERFORM_LOGIN:"perform-login",AUTHENTICATED:"authenticated",HIDE_LOGIN_MODAL:"hide-login-modal",AUTHENTICATION_FAILURE:"authentication-failure",REGISTER_USER:"register-user",REGISTERED:"registered",SHOW_LOGIN_MODAL:"show-login-modal",SHOW_FORGOT_PASSWORD_MODAL:"show-forgot-password-modal"};Vue.component("login-handler",{template:"<div style='display:none'><\/div>",mounted:function(){window.LoginEventBus.$on(window.LoginEvents.SHOW_LOGIN_MODAL,function(){window.LoginStore.showSignInModal()});window.LoginEventBus.$on(window.LoginEvents.PERFORM_LOGIN,function(n,t){$.post({url:"/api/Login/Submit",data:n,dataType:"json",success:function(n){n.Status==window.eResponseStatus.Ok?window.LoginEventBus.$emit(window.LoginEvents.HIDE_LOGIN_MODAL,function(){window.LoginStore.updateMembership(n.Membership);window.LoginEventBus.$emit(window.LoginEvents.AUTHENTICATED);!t||t()}):window.LoginEventBus.$emit(window.LoginEvents.AUTHENTICATION_FAILURE,n.ResponseMessage)},error:function(){window.LoginEventBus.$emit(window.LoginEvents.AUTHENTICATION_FAILURE,"Unexpected error has occurred.")}})});window.LoginEventBus.$on(window.LoginEvents.REGISTER_USER,function(n,t){$.post({url:"/api/Login/Register",data:n,dataType:"json",success:function(n){n.Status==window.eResponseStatus.Ok?window.LoginEventBus.$emit(window.LoginEvents.HIDE_LOGIN_MODAL,function(){window.LoginStore.updateMembership(n.Membership);window.LoginEventBus.$emit(window.LoginEvents.REGISTERED);t&&t(n)}):(window.LoginEventBus.$emit(window.LoginEvents.AUTHENTICATION_FAILURE,n.ResponseMessage),t&&t(n))},error:function(){window.LoginEventBus.$emit(window.LoginEvents.AUTHENTICATION_FAILURE,"Unexpected error has occurred.")}})});window.LoginEventBus.$on(window.LoginEvents.SHOW_FORGOT_PASSWORD_MODAL,function(){window.LoginStore.showForgotPasswordModal()})}});Vue.component("login-status-wrapper",{data:function(){return{state:{loginStore:window.LoginStore.state}}},computed:{isLoggedIn:function(){return this.state.loginStore.membership&&this.state.loginStore.membership.MemberID?!0:!1}}});window.LoginStore={state:{membership:{},details:{FirstName:"",LastName:"",Address:"",UnitNumber:"",StreetNumber:"",StreetName:"",City:"",Suburb:"",State:"",Postcode:"",EmailAddress:"",MobileNumber:"",CompanyName:""},modal:null},signInModal:null,forgotPasswordModal:null,updateMembership:function(n){this.state.membership=n},registerSignInModal:function(n){this.signInModal==null&&(this.signInModal=n)},showSignInModal:function(){this.signInModal&&this.signInModal.$refs.modalWrapper?this.signInModal.$refs.modalWrapper.openModal():(this.registerSignInModal(this.state.modal),window.LoginEventBus.$emit("signInModalUnregistered"))},registerForgotPasswordModal:function(n){this.forgotPasswordModal=n},showForgotPasswordModal:function(){this.forgotPasswordModal&&this.forgotPasswordModal.$refs.modalWrapper?this.forgotPasswordModal.$refs.modalWrapper.openModal():(this.registerForgotPasswordModal(this.state.modal),window.LoginEventBus.$emit("forgotPasswordModalUnregistered"))}};Vue.component("logout-wrapper",{data:function(){return{}},methods:{Logout:function(){$.post({url:"/api/Login/Logout",success:function(){window.location.href="/"},error:function(){Common.ShowError("Unexpected error trying to logout.")}})}}});Vue.component("register-perks",{template:"#RegisterTemplate",data:function(){return{}},methods:{show:function(){this.$refs.modalWrapper.openModal()}},computed:{},mounted:function(){var n=this}});Vue.component("register-wrapper",{mixins:[MIXIN_PASSWORD_CHECKER,MIXIN_MEMBERSHIP],data:function(){return{email:"",password:"",firstName:"",lastName:"",state:"",newsletterSignup:!0,confirmPassword:"",isLoading:!1,passwordsDontMatch:!1,hasError:!1,passwordInvalid:!1,checkingEmail:!1,isMember:!1,signedUp:!1}},watch:{password:function(){this.passwordsDontMatch=!1;this.hasError=!1;this.passwordInvalid=!1},confirmPassword:function(){this.passwordsDontMatch=!1;this.hasError=!1;this.passwordInvalid=!1},email:_.debounce(function(){this.isMember=!1;var r=this,n=document.querySelector("#email"),t=new Pristine(this.$el),i=t.validate(n);i&&this.checkEmailAddress(function(){window.LoginEventBus.$emit(window.LoginEvents.SHOW_LOGIN_MODAL)})},500)},methods:{checkEmailAddress:function(n){var t=this;this.checkingEmail=!0;$.get({url:"/api/Checkout/MembershipLookup",data:{email:this.email},dataType:"json",success:function(i){t.checkingEmail=!1;i&&(t.isMember=!0,n(i))},error:function(){t.checkingEmail=!1}})},registerApi:function(){var n=this,t;if(n.isMember){Common.ShowError("There is already a membership associated with this email address.");return}n=this;t={EmailAddress:n.email,Password:n.password,FirstName:n.firstName,LastName:n.lastName,State:n.state,NewsletterSignup:n.newsletterSignup};n.isLoading=!0;$.ajax({type:"POST",url:"/api/Login/Register",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){t.Status==eResponseStatus.Ok?(n.isLoading=!1,n.signedUp=!0,window.LoginStore.updateMembership(t.Membership),window.LoginEventBus.$emit(window.LoginEvents.AUTHENTICATED)):(n.isLoading=!1,Common.ShowError("Unexpected error has occurred."))},error:function(){n.isLoading=!1;Common.ShowError("Unexpected error has occurred.")}})},register:function(){if(this.password!=this.confirmPassword){this.passwordsDontMatch=!0;this.hasError=!0;return}if(!this.passwordMeetsRequirements(this.password)){this.passwordInvalid=!0;this.hasError=!0;return}this.pristine=new Pristine(this.$el,{classTo:"c-field",errorClass:"has-error",successClass:"is-success",errorTextParent:"c-input",errorTextClass:"c-field__error"});var n=this.pristine.validate();n&&this.registerApi()}}});Vue.component("signed-in-logo",{template:"#SIGNED_IN_LOGO_TEMPLATE",mixins:[MIXIN_MEMBERSHIP],data:function(){return{state:{loginStore:window.LoginStore.state}}},methods:{},computed:{memberInitials:function(){var n="";return this.state.loginStore.membership&&(this.state.loginStore.membership.FirstName!=""&&this.state.loginStore.membership.FirstName!=null&&(n+=this.state.loginStore.membership.FirstName[0]),this.state.loginStore.membership.LastName!=""&&this.state.loginStore.membership.LastName!=null&&(n+=this.state.loginStore.membership.LastName[0])),n==""&&(n="M"),n},membershipClass:function(){return this.isHolidayPerksMember?"c-header__account--holiday":this.isPerksPlusMember?"c-header__account--plus":this.isVipPerksMember?"c-header__account--vip":void 0}}});Vue.component("sign-in",{template:"#SIGN_IN_TEMPLATE",data:function(){return{}},methods:{},computed:{isLoggedIn:function(){return this.state.membership&&this.state.membership.MemberID?!0:!1}},mounted:function(){var n=this;window.LoginEventBus.$on("signInModalUnregistered",function(){window.LoginStore.registerSignInModal(n)});window.LoginStore.registerSignInModal(this);window.LoginEventBus.$on(window.LoginEvents.HIDE_LOGIN_MODAL,function(t){n.$refs.modalWrapper!=undefined&&(n.$refs.modalWrapper.showModal=!1,$("body").removeClass("no-scroll"),setTimeout(function(){t!=null&&t()},300))})}});Vue.component("sign-in-wrapper",{data:function(){return{state:{email:"",password:"",errorMessage:"",isLoading:!1,loginFailed:!1}}},watch:{"state.email":function(){this.state.errorMessage=""},"state.password":function(){this.state.errorMessage=""}},methods:{showRegistration:function(){this.$refs.register.show()},showForgotPassword:function(){this.$refs.forgotPassword.show()}},mounted:function(){var n=this;this.$on("pristineFormSubmit",function(){var t={Username:n.state.email,Password:n.state.password};n.state.isLoading=!0;n.state.loginFailed=!1;window.LoginEventBus.$emit(window.LoginEvents.PERFORM_LOGIN,t)});window.LoginEventBus.$on(window.LoginEvents.AUTHENTICATION_FAILURE,function(t){n.state.errorMessage=t;n.state.isLoading=!1;n.state.loginFailed=!0})}});Vue.component("member-benefits-card",{template:"#MEMBER_BENEFITS_CARD_TEMPLATE",props:["benefit"],data:function(){return{}}});Vue.component("member-benefit-offer-code-widget",{template:"#MemberBenefitsOfferCodeWidgetTemplate",props:["benefit","has-code"],mixins:[MIXIN_MEMBERSHIP],data:function(){return{isLoading:!1,offerCode:"",redeemLinkUrl:"",redeemLinkTitle:"",consumedLogin:!1}},methods:{addMembershipToCart:function(){var n=this;this.isLoading=!0;window.CartEventBus.$emit(window.CartEvents.ADD_MEMBERSHIP,function(){n.isLoading=!1},function(){n.isLoading=!1;Common.ShowError("Unable to add membership to cart.")})},showSignInModal:function(){window.LoginEventBus.$emit(window.LoginEvents.SHOW_LOGIN_MODAL)},getOfferCode:function(){var n=this;n.isLoading=!0;$.ajax({type:"GET",method:"GET",contentType:"application/json; charset=utf-8",dataType:"json",url:"/loyalty-club/OfferCode",data:{documentId:n.benefit.DocumentID},success:function(t){n.isLoading=!1;n.offerCode=t.OfferCode;n.redeemLinkTitle=t.RedeemLinkTitle;n.redeemLinkUrl=t.RedeemLinkUrl},error:function(){n.isLoading=!1;Common.ShowError("Unable to retrieve offer code.")}})}},computed:{showUpgradeButton:function(){return this.isHolidayPerksMember},showOfferCode:function(){return this.offerCode.length>0},hasOfferCode:function(){return this.hasCode}},watch:{isLoggedIn:function(){var n=this;n.isLoggedIn&&!this.isHolidayPerksMember&&n.getOfferCode()}},mounted:function(){var n=this;n.isLoggedIn&&!this.isHolidayPerksMember&&n.getOfferCode();window.LoginEventBus.$on(window.LoginEvents.AUTHENTICATED,function(){n.isLoggedIn&&!n.isHolidayPerksMember&&n.getOfferCode()})}});Vue.component("member-benefits-search",{template:"#MemberBenefitsSearchTemplate",data:function(){return{hasMoreBenefits:!1,pageLoading:!0,moreLoading:!1,benefits:[],pageNumber:1}},methods:{loadMemberBenefits:function(){var n=this,t={PageNumber:n.pageNumber};$.ajax({type:"POST",url:"/api/search/MemberBenefits",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){n.pageLoading=!1;n.moreLoading=!1;n.benefits=n.benefits.concat(t.Benefits);n.hasMoreBenefits=t.HasMoreBenefits},error:function(){n.pageLoading=!1;n.moreLoading=!1;Common.ShowError("Unexpected error trying to load search results.")}})},loadMoreMemberBenefits:function(){this.moreLoading=!0;this.pageNumber++;this.loadMemberBenefits()}},mounted:function(){this.loadMemberBenefits()}});Vue.component("add-membership-to-cart-wrapper",{data:function(){return{isLoading:!1}},methods:{addToCart:function(){var n=this;this.isLoading=!0;window.CartEventBus.$emit(window.CartEvents.ADD_MEMBERSHIP,function(){n.isLoading=!1},function(t){n.isLoading=!1;Common.ShowError(t)})}}});Vue.component("membership-lookup-wrapper",{data:function(){return{isLoading:!1,status:"",join:""}},computed:{memberStatus:function(){return this.status},memberJoin:function(){return this.join}},methods:{lookupMember:function(){var n=this,t=document.getElementById("member_number").value,i;n.status="";n.join="";n.isLoading=!0;t!=null&&t!=""?(t.includes("M")&&(t=parseInt(t.replace("M",""),10)),i="/api/Partner/MemberLookup?memberNumber="+t,$.ajax({type:"GET",url:i,contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){n.isLoading=!0;n.status=t.MemberStatus;n.join=moment(t.JoinDate).format("DD/MM/YYYY").toString();n.isLoading=!1},error:function(){Common.ShowError("Unexpected error trying to lookup member details deals.")}})):Common.ShowError("Please enter the member number / barcode.");n.isLoading=!1}}});Vue.component("facilities-activities-data-wrapper",{props:["items"],data:function(){return{filterStore:window.FacilitiesActivitiesFilterStore.state}},watch:{categories:{handler:function(){this.$forceUpdate()},deep:!0}},computed:{categories:function(){return this.filterStore.categories.values},filteredItems:function(){var t=this,n=[];return $.each(this.items,function(i,r){t.IsAvailable(r)&&n.push(r)}),n}},methods:{IsAvailable:function(n){var u=this,r=Object.keys(this.filterStore.categories.values),t,i;if(r.length>0){if(t=[],$.each(r,function(n,i){u.categories[i]&&t.push(i)}),t.length==0)return!0;for(i=0;i<t.length;i++)if(t[i]==n.Category)return!0;return!1}return!0}}});window.FacilitiesActivitiesFilterStore={state:{categories:{values:{},tempValues:{}}},commitCategoriesFilter:function(){this.state.categories.values=JSON.parse(JSON.stringify(this.state.categories.tempValues))}};Vue.component("floor-plan-button",{props:[],template:"#FloorPlanTemplate",data:function(){return{}},methods:{},created:function(){}});Vue.component("floor-plan-view",{props:["floor-plan-url","floor-plan-name"],data:function(){return{}},methods:{},computed:{planUrl:function(){return this.floorPlanUrl},planName:function(){return this.floorPlanName}},created:function(){var t={documentID:DOCUMENT_ID},n=this;$.ajax({type:"GET",url:"/api/Park/GetFloorPlan/"+t.documentID,contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){n.floorPlanUrl=t.Url;n.floorPlanName=t.Name},error:function(){}})}});Vue.component("park-book-now",{props:[],template:"#PARK_BOOK_NOW",data:function(){return{menuPageYOffset:0}},methods:{updateData:function(){this.$data.menuPageYOffset=window.pageYOffset}},computed:{isActive:function(){return this.$mq=="sm"||this.$mq=="md"||this.$mq=="lg"}},mounted:function(){var n=this;window.addEventListener("scroll",function(){n.updateData()})}});Vue.component("park-contact-form-wrapper",{data:function(){return{enquiry:"",firstName:"",lastName:"",email:"",mobile:"",message:"",pristine:null,isLoading:!1,inProgress:!0}},methods:{sendParkContactFormRequest:function(){var n=this,t,i,r;this.isLoading=!0;t=this.pristine.validate();t?(i="/api/Park/SendContactForm",r={Enquiry:this.enquiry,FirstName:this.firstName,LastName:this.lastName,Email:this.email,Mobile:this.mobile,Message:this.message,ParkID:window.PARK_BIG4ID,CaptchaResponse:grecaptcha.getResponse()},$.ajax({type:"POST",url:i,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(r),success:function(t){n.isLoading=!1;t.Status==1?n.inProgress=!1:Common.ShowError("An error occured when attempting to send the message")},error:function(){n.isLoading=!1;Common.ShowError("An error occured when attempting to send the message")}})):this.isLoading=!1}},mounted:function(){this.pristine=new Pristine(this.$el,{classTo:"c-field",errorClass:"has-error",successClass:"is-success",errorTextParent:"c-field",errorTextClass:"c-field__error"},!0)}});Vue.component("park-feature-icon",{props:["featureId","feature-svg-url","feature-display-text"],template:"#ParkFeatureIconsTemplate",data:function(){return{}},computed:{},methods:{}});Vue.component("park-location-feature-icon",{props:["locationFeatureId","location-display-text","location-svg-url"],template:"#ParkLocationFeatureIconTemplate",data:function(){return{}},computed:{},methods:{}});Vue.component("park-map-button",{props:[],template:"#ParkMapTemplate",data:function(){return{}},methods:{},created:function(){}});Vue.component("park-map-view",{props:["park-map-url","park-map-name"],data:function(){return{}},methods:{},computed:{mapUrl:function(){return this.parkMapUrl},mapName:function(){return this.parkMapName}},created:function(){var t={documentID:PARK_DOCUMENT_ID},n=this;$.ajax({type:"GET",url:"/api/Park/GetParkMap/"+t.documentID,contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){n.parkMapUrl=t.Url;n.parkMapName=t.Name},error:function(){}})}});Vue.component("park-pets-icon",{props:["petsAllowed"],template:"#PetsAllowedTemplate",data:function(){return{}},computed:{},methods:{}});Vue.component("park-sticky-menu",{data:function(){return{menuPageYOffset:window.pageYOffset}},computed:{isActive:function(){return this.$data.menuPageYOffset>(document.getElementsByClassName("c-banner__body")[0].offsetTop+document.getElementsByClassName("c-banner__body")[0].offsetHeight)*1.15}},methods:{updateData:function(){this.$data.menuPageYOffset=window.pageYOffset}},mounted:function(){var n=this;window.addEventListener("scroll",function(){n.updateData()})}});Vue.component("price-table",{props:["price-tiers","can-purchase"],mixins:[MIXIN_CART],template:"#PriceTableTemplate",data:function(){return{processing:!1}},computed:{},methods:{addDisabled:function(){if(!this.cartLoaded)return!0;if(this.$refs.input)for(var n=0;n<this.$refs.input.length;n++)if(this.$refs.input[n].quantity>0)return!1;return!0},priceInteger:function(n){return Math.trunc(n)},priceDecimal:function(n){var r=Math.trunc(n),i=(n-r).toString(),t=".00";return i.indexOf(".")>0&&(t=i.substring(i.indexOf(".")),t.length==2&&(t+="0")),t},addToCart:function(){var n=this,t=[];n.processing=!0;$.each(this.$refs.input,function(n,i){t.push({ItemType:CartItemType.PRODUCT,SKU:i.props.sku,Quantity:i.quantity})});window.CartEventBus.$emit(window.CartEvents.ADD_PRODUCTS,t,function(){n.processing=!1},function(){n.processing=!1})}},mounted:function(){var n=this;$.each(n.$refs.input,function(t,i){i.$watch("quantity",function(){n.$forceUpdate()})})}});Vue.component("reviews",{data:function(){return{reviews:[],pageNumber:0,resultsPerPage:10,hasMoreReviews:!0}},methods:{formatReviewDate:function(n){return moment(n.ReviewDate).format("DD MMM, YYYY")},getRating:function(n){var t=n.Rating.toFixed(1).toString(),i=t.split(".");return i[1]=="0"?i[0]:t},getRatingPercent:function(n){return n.Rating*10},checkMoreReviews:function(){return hasMoreReviews},getReviewSourceImage:function(n){var t="";switch(n.ReviewSource.toLowerCase()){case"google":t="/Content/ReviewIcons/google_logo.png";break;case"ctrip (zh)":t="/Content/ReviewIcons/ctrip_logo.png";break;case"booking":t="/Content/ReviewIcons/booking_logo.png";break;case"wotif":t="/Content/ReviewIcons/wotif_logo.png";break;case"expedia":t="/Content/ReviewIcons/expedia_logo.png";break;case"agoda":t="/Content/ReviewIcons/agoda_logo.png";break;case"facebook":t="/Content/ReviewIcons/facebook_logo.png";break;case"turu":t="/Content/ReviewIcons/turu_logo.png";break;case"hotels.com":t="/Content/ReviewIcons/hotels_logo.jpg"}return t!=""||t!=null?Common.CdnAssetUrl(t):"https://via.placeholder.com/60x60/333333"},RetrieveReviews:function(){var n=this,t;this.pageNumber+=1;request={ParkID:window.Big4ParkID,PageNumber:this.pageNumber,ResultsPerPage:this.resultsPerPage};t="/api/Reviews/GetReviews";$.ajax({type:"POST",url:t,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(request),success:function(t){n.reviews=n.reviews.concat(t.Results);n.hasMoreReviews=t.HasMoreReviews},error:function(){}})}},mounted:function(){this.RetrieveReviews();this.$on("LOAD-MORE-REVIEWS",function(){this.RetrieveReviews()})}});Vue.component("single-park-map-view-widget",{template:"#PARK_MAP_VIEW_TEMPLATE",props:["parks"],methods:{init:function(){window.parkDirectoryMap=new google.maps.Map(document.getElementById("map"),{zoom:15});window.parkDirectoryMapInfowindow=new google.maps.InfoWindow({content:""});this.addParks()},addParks:function(){for(var r,u,f,e,t=this.parks,o=new google.maps.LatLngBounds,i=[],n=0;n<t.length;n++)r={lat:t[n].Latitude,lng:t[n].Longitude},i.push(new google.maps.LatLng(t[n].Latitude,t[n].Longitude)),u={path:"M16 32c7.6-8.2 11.8-13.5 11.8-20.1s-5.3-11.9-11.8-11.9-11.8 5.3-11.8 11.9 4.1 11.9 11.8 20.1zM16 6.7c2.8 0 5.1 2.3 5.1 5.1s-2.3 5.1-5.1 5.1-5.1-2.3-5.1-5.1 2.3-5.1 5.1-5.1z",fillColor:"#0064b6",fillOpacity:1,anchor:new google.maps.Point(16,32),strokeWeight:0,scale:1},f=new google.maps.Marker({position:r,map:window.parkDirectoryMap,title:t[n].ParkName,icon:u,review:t[n].ReviewRating,typeID:t[n].ParkTypeID,image:t[n].Images[0],page:t[n].Url}),google.maps.event.addListener(f,"click",function(){var t="",n="",i="",r;switch(this.typeID){case window.Enums.ParkTypeEnum.Affiliate:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-bullet-rounded c-icon--tertiary-accent"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="227" height="32" viewBox="0 0 227 32"><title>badge-bullet-rounded<\/title> <path d="M-0.012 3.563c0-4.874 69.747-2.011 98.196-2.011s105.767 2.011 115.202 2.011c9.437 0 29.334 27.599-11.15 27.599-40.483 0-169.104 0.273-185.676 0s-16.572-3.135-16.572-27.599z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Affiliate<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMHoliday:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-3 c-icon--primary"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="136" height="32" viewBox="0 0 136 32"><title>badge-holiday<\/title> <path d="M0.879 2.702c1.916-4.48 35.716-2.037 42.326-2.037s67.99 0.646 78.154 0.646c10.165 0 31.658 29.085-11.946 29.085-43.605 0-67.97 1.604-90.122 1.604-22.151 0-18.413-12.376-18.413-29.298z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Holiday<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMClassic:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-1 c-icon--callout-variant-two"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="132" height="32" viewBox="0 0 132 32"><title>badge-trapezoid-1<\/title> <path d="M0.077 0.649c27.028-0.555 38.893 0 68.8 0s56.662 2.811 55.373 2.811c-1.289 0 26.849 26.363-15.713 26.363-42.559 0-72.196 1.774-91.23 1.774s-17.322-4.022-17.231-30.948z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Classic<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMPremier:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-2 c-icon--callout-variant-one"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="135" height="32" viewBox="0 0 135 32"><title>badge-trapezoid-2<\/title> <path d="M0.031 2.025c17.082-1.098 27.529-1.496 41.797-1.496 14.267 0 67.371-0.268 80.033 4.578 12.665 4.845 27.686 26.365-16.198 26.365h-87.823c-19.403 0-17.809-8.562-17.809-29.448z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Premier<\/p><\/span><\/div>'}t=this.image==null||this.image.MapsImageUrl.includes("placehold")?'<img srcset="https://placehold.it/280x158 280w,https://placehold.it/300x169 300w,https://placehold.it/300x169 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="https://placehold.it/300x169" alt="">':'<img style="width:100%" srcset="'+this.image.MapsImageUrl+' 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="'+this.image.MapsImageUrl+'" alt="">';i=this.review!=null&&this.review>0?'<div class="c-ratings"><span><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns: xlink="http://www.w3.org/1999/xlink" width="30" height="32" viewBox="0 0 30 32" class="svg-defs" style="position: absolute; width: 0px; height: 0px;"><clipPath id="star"><path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3                                         c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0                                        c0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path><path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\t                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path><path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><clipPath id="star-empty">                                        <path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path>                                        <path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path>                                        <path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><rect id="rating" width="120" height="30" clip-path="url(#star)"><\/rect><\/svg>                                        <span class="rating-eg"><svg height="12px" viewBox="0 0 170 30" data-rating="1.2" class="rating"><rect x="0" y="0" width="100%" height="100%" clip-path="url(#star-empty)" class="bg-rect" style="fill: rgb(236, 236, 236);"><\/rect><rect x="0" y="0" width="'+this.review*10+'%" height="100%" clip-path="url(#star)" class="rating-rect" style="fill: rgb(55, 55, 55);"><\/rect><\/svg><\/span><\/span> <strong class="u-p4">'+Math.round(this.review*10)/10+"/10<\/strong><\/div >":'<strong class="u-p4" style="padding-left: 10px;">No reviews yet<\/strong>';r='<div class="infoWindow">                         <div class="styleguide-maps" style="background-image: url(\'NaN " data-component="location-map-container" data-component-context="Location Pages">                         <div class="styleguide-maps__card d-none d-md-block">                        <div class="styleguide-maps__card d-none d-md-block"><div data-component="park-card" data-component-context="map" data-component-label="BIG4 Beacon Resort" class="c-card c-card--primary c-card--popup"><div class="c-card__gallery"><a href = "'+this.page+'" class="c-card__img-wrapper"> '+t+"<\/a>"+n+'<\/div ><div class="c-card__body"> <h3 class="u-h6 c-card__title"><a href="'+this.page+'">'+this.title+"<\/a ><\/h3 >"+i+"<\/div>                        <\/div>                       <\/div>";window.parkDirectoryMapInfowindow.setContent(r);window.parkDirectoryMapInfowindow.open(window.parkDirectoryMap,this)});for(n=0;n<i.length;n++)o.extend(i[n]);e=new google.maps.LatLng(t[0].Latitude,t[0].Longitude);window.parkDirectoryMap.setCenter(e)}},mounted:function(){this.init()}});Vue.component("whats-local-data-wrapper",{data:function(){return{filterStore:window.WhatsLocalFilterStore.state,items:[],memberItems:[],ATDWItems:[]}},watch:{categories:{handler:function(){this.$forceUpdate()},deep:!0}},computed:{categories:function(){return this.filterStore.categories.values},SelectedCategories:function(){var t=this,i=Object.keys(this.filterStore.categories.values),n=[];return $.each(i,function(i,r){t.categories[r]&&n.push(r)}),n}},methods:{fetch:function(){var n=this,t={ParkDocumentID:PARK_DOCUMENT_ID,MaxDistance:this.filterStore.distanceFromPark.value,MemberOnly:this.filterStore.memberBenefits.value,Categories:this.SelectedCategories};$.ajax({type:"POST",url:"/api/Park/WhatsLocal",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){n.items=t.ActivityProducts;n.memberItems=t.MemberBenefitActivityProducts;n.ATDWItems=t.ATDWActivityProducts},error:function(){}})}},created:function(){this.fetch()},mounted:function(){var n=this;window.FilterEventBus.$on(window.FilterEvents.UPDATE_FILTERS,function(){n.fetch()})}});window.WhatsLocalFilterStore={state:{memberBenefits:{value:!1,tempValue:!1},distanceFromPark:{value:50},categories:{values:{},tempValues:{}}},commitMemberBenefits:function(){this.state.memberBenefits.value=this.state.memberBenefits.tempValue;window.FilterEventBus.$emit(window.FilterEvents.UPDATE_FILTERS)},commitDistanceFromPark:function(n){this.state.distanceFromPark.value=n;window.FilterEventBus.$emit(window.FilterEvents.UPDATE_FILTERS)},commitCategoriesFilter:function(){this.state.categories.values=JSON.parse(JSON.stringify(this.state.categories.tempValues));window.FilterEventBus.$emit(window.FilterEvents.UPDATE_FILTERS)}};Vue.component("park-directory-map",{template:"#PARK_DIRECTORY_MAP_TEMPLATE",props:["parks"],data:function(){return{markersArray:[]}},methods:{init:function(){window.parkDirectoryMap=new google.maps.Map(document.getElementById("map"),{zoom:4,center:{lat:-25.363,lng:131.044}});window.parkDirectoryMapInfowindow=new google.maps.InfoWindow({content:""});this.addParks();this.clusterMarkers()},addParks:function(){for(var f,e,r,t=this.parks,u=new google.maps.LatLngBounds,i=[],n=0;n<t.length;n++)f={lat:t[n].Latitude,lng:t[n].Longitude},i.push(new google.maps.LatLng(t[n].Latitude,t[n].Longitude)),e={path:"M16 32c7.6-8.2 11.8-13.5 11.8-20.1s-5.3-11.9-11.8-11.9-11.8 5.3-11.8 11.9 4.1 11.9 11.8 20.1zM16 6.7c2.8 0 5.1 2.3 5.1 5.1s-2.3 5.1-5.1 5.1-5.1-2.3-5.1-5.1 2.3-5.1 5.1-5.1z",fillColor:"#0064b6",fillOpacity:1,anchor:new google.maps.Point(16,32),strokeWeight:0,scale:1},r=new google.maps.Marker({position:f,map:window.parkDirectoryMap,title:t[n].ParkName,icon:e,review:t[n].ReviewRating,typeID:t[n].ParkTypeID,image:t[n].Images[0],page:t[n].Url}),this.markersArray.push(r),google.maps.event.addListener(r,"click",function(){var t="",n="",i="",r;switch(this.typeID){case window.Enums.ParkTypeEnum.Affiliate:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-bullet-rounded c-icon--tertiary-accent"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="227" height="32" viewBox="0 0 227 32"><title>badge-bullet-rounded<\/title> <path d="M-0.012 3.563c0-4.874 69.747-2.011 98.196-2.011s105.767 2.011 115.202 2.011c9.437 0 29.334 27.599-11.15 27.599-40.483 0-169.104 0.273-185.676 0s-16.572-3.135-16.572-27.599z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Affiliate<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMHoliday:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-3 c-icon--primary"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="136" height="32" viewBox="0 0 136 32"><title>badge-holiday<\/title> <path d="M0.879 2.702c1.916-4.48 35.716-2.037 42.326-2.037s67.99 0.646 78.154 0.646c10.165 0 31.658 29.085-11.946 29.085-43.605 0-67.97 1.604-90.122 1.604-22.151 0-18.413-12.376-18.413-29.298z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Holiday<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMClassic:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-1 c-icon--callout-variant-two"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="132" height="32" viewBox="0 0 132 32"><title>badge-trapezoid-1<\/title> <path d="M0.077 0.649c27.028-0.555 38.893 0 68.8 0s56.662 2.811 55.373 2.811c-1.289 0 26.849 26.363-15.713 26.363-42.559 0-72.196 1.774-91.23 1.774s-17.322-4.022-17.231-30.948z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Classic<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMPremier:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-2 c-icon--callout-variant-one"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="135" height="32" viewBox="0 0 135 32"><title>badge-trapezoid-2<\/title> <path d="M0.031 2.025c17.082-1.098 27.529-1.496 41.797-1.496 14.267 0 67.371-0.268 80.033 4.578 12.665 4.845 27.686 26.365-16.198 26.365h-87.823c-19.403 0-17.809-8.562-17.809-29.448z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Premier<\/p><\/span><\/div>'}t=this.image==null||this.image.MapsImageUrl.includes("placehold")?'<img srcset="https://placehold.it/280x158 280w,https://placehold.it/300x169 300w,https://placehold.it/300x169 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="https://placehold.it/300x169" alt="">':'<img style="width:100%" srcset="'+this.image.MapsImageUrl+' 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="'+this.image.MapsImageUrl+'" alt="">';i=this.review!=null&&this.review>0?'<div class="c-ratings"><span><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns: xlink="http://www.w3.org/1999/xlink" width="30" height="32" viewBox="0 0 30 32" class="svg-defs" style="position: absolute; width: 0px; height: 0px;"><clipPath id="star"><path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3                                         c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0                                        c0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path><path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\t                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path><path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><clipPath id="star-empty">                                        <path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path>                                        <path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path>                                        <path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><rect id="rating" width="120" height="30" clip-path="url(#star)"><\/rect><\/svg>                                        <span class="rating-eg"><svg height="12px" viewBox="0 0 170 30" data-rating="1.2" class="rating"><rect x="0" y="0" width="100%" height="100%" clip-path="url(#star-empty)" class="bg-rect" style="fill: rgb(236, 236, 236);"><\/rect><rect x="0" y="0" width="'+this.review*10+'%" height="100%" clip-path="url(#star)" class="rating-rect" style="fill: rgb(55, 55, 55);"><\/rect><\/svg><\/span><\/span> <strong class="u-p4">'+Math.round(this.review*10)/10+"/10<\/strong><\/div >":'<strong class="u-p4" style="padding-left: 10px;">No reviews yet<\/strong>';r='<div class="infoWindow">                         <div class="styleguide-maps" style="background-image: url(\'NaN " data-component="location-map-container" data-component-context="Location Pages">                         <div class="styleguide-maps__card d-none d-md-block">                        <div class="styleguide-maps__card d-none d-md-block"><div data-component="park-card" data-component-context="map" data-component-label="BIG4 Beacon Resort" class="c-card c-card--primary c-card--popup"><div class="c-card__gallery"><a href = "'+this.page+'" class="c-card__img-wrapper"> '+t+"<\/a>"+n+'<\/div ><div class="c-card__body"> <h3 class="u-h6 c-card__title"><a href="'+this.page+'">'+this.title+"<\/a ><\/h3 >"+i+"<\/div>                        <\/div>                       <\/div>";window.parkDirectoryMapInfowindow.setContent(r);window.parkDirectoryMapInfowindow.open(window.parkDirectoryMap,this)});for(n=0;n<i.length;n++)u.extend(i[n]);window.parkDirectoryMap.fitBounds(u)},clusterMarkers:function(){window.markerCluster=new MarkerClusterer(window.parkDirectoryMap,this.markersArray,{imagePath:"/Content/Images/GoogleMaps/markerclusterer/images/m"})}},mounted:function(){this.init()}});window.PetFriendlyEventBus=new Vue;window.Iteration=0;Vue.component("pet-friendly-parks",{data:function(){return{parks:[],pageNumber:0,stateList:[],endOfList:!1,i:0,loading:!0}},methods:{getPetFriendlyParks:function(){var n,t;this.loading=!0;n=this;this.pageNumber+=1;request={StateList:this.stateList,PageNumber:this.pageNumber};t="/api/PetFriendlyLandingPage/GetPetFriendlyParks";$.ajax({type:"POST",url:t,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(request),success:function(t){n.parks=n.parks.concat(t.Parks);n.endOfList=t.EndOfList;n.loading=!1},error:function(){n.loading=!1}})},bindFilterEvents:function(){var n=this;window.PetFriendlyEventBus.$on("state-filter-update",function(t){if(window.Iteration!=2){for(n.parks=[],n.stateList=[],n.endOfList=!1,n.pageNumber=0,i=0;i<t.length;i++)n.stateList[i]=t[i];n.getPetFriendlyParks()}window.Iteration++})}},mounted:function(){var n=this;window.Iteration==0&&(n.bindFilterEvents(),n.getPetFriendlyParks());window.Iteration++}});Vue.component("state-pet-friendly-parks",{props:["stateCode"],data:function(){return{parks:[],pageNumber:0,stateList:[],endOfList:!1,i:0,loading:!0}},methods:{getStatePetFriendlyParks:function(){var n,t;this.loading=!0;n=this;this.pageNumber+=1;request={StateList:this.stateList,PageNumber:this.pageNumber};t="/api/PetFriendlyStatePage/GetPetFriendlyParksForState";$.ajax({type:"POST",url:t,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(request),success:function(t){n.parks=n.parks.concat(t.Parks);n.endOfList=t.EndOfList;n.loading=!1},error:function(){n.loading=!1}})}},mounted:function(){var n=this;n.stateList=[this.stateCode];n.getStatePetFriendlyParks()}});Vue.component("my-account-stack-menu",{template:"#MyAccountstackMenuTemplate",props:["class-list","current-menu","location"],data:function(){return{state:{loginStore:window.LoginStore.state},items:[],isActive:!1}},computed:{isLoggedIn:function(){return this.state.loginStore.membership&&this.state.loginStore.membership.MemberID?(document.getElementById("SignInPrompt")!=undefined&&(document.getElementById("SignInPrompt").style.display="none"),!0):!1},props:function(){return{currentMenu:this.currentMenu}}},mounted:function(){var n=this;!this.isLoggedIn&&window.location.href.includes("/myaccount")&&(document.getElementById("SignInPrompt").style.display="inherit",window.LoginStore.showSignInModal())}});Vue.component("any-type-of-stay-widget",{props:["categories"],data:function(){return{categoryList:[],loading:!0}},computed:{IsLoading:function(){return this.loading}},methods:{},mounted:function(){var n=this;n.categoryList=this.categories;n.loading=!1}});Vue.component("marketing-deal-cards-widget",{props:["deals"],data:function(){return{displayDeals:[],pageNumber:1,dealList:[],endOfList:!1,i:0,loading:!0}},methods:{getNextPage:function(){var n=this;n.pageNumber++;n.displayDeals=n.dealList.slice(0,n.pageNumber*24);n.dealList.length<=n.pageNumber*24&&(n.endOfList=!0)}},mounted:function(){var n=this,t;for(n.dealList=this.deals,t=n.dealList.length-1;t>=0;t--)(n.dealList[t].ImageUrl==null||n.dealList[t].ImageUrl==undefined||n.dealList[t].ImageUrl=="")&&n.dealList.splice(t,1);n.displayDeals=n.dealList.slice(0,24);n.dealList.length<=24&&(n.endOfList=!0);n.loading=!1}});Vue.component("marketing-park-cards-widget",{props:["parks"],data:function(){return{displayParks:[],pageNumber:1,parkList:[],endOfList:!1,i:0,loading:!0}},methods:{getNextPage:function(){var n=this;n.pageNumber++;n.displayParks=n.parkList.slice(0,n.pageNumber*24);n.parkList.length<=n.pageNumber*24&&(n.endOfList=!0)}},mounted:function(){var n=this,t;for(n.parkList=this.parks,t=n.parkList.length-1;t>=0;t--)(n.parkList[t].Images==null||n.parkList[t].Images==undefined||n.parkList[t].Images.length==0)&&n.parkList.splice(t,1);n.displayParks=n.parkList.slice(0,24);n.parkList.length<=24&&(n.endOfList=!0);n.loading=!1}});Vue.component("on-your-doorstep-widget",{props:["parks","categories"],data:function(){return{parkList:[],displayParks:[],categoryList:[],loading:!0,currentCategoryId:1,selectedState:""}},computed:{CurrentCategory:function(){return this.currentCategoryId},BackgroundImageUrl:function(){for(var t=this,n=0;n<t.categoryList;n++)if(t.categoryList[n].CategoryID==currentCategoryId)return t.categoryList[n].BackgroundImageUrl},CurrentCategoryName:function(){for(var n=this,t=0;t<n.categoryList.length;t++)if(n.categoryList[t].CategoryID==n.currentCategoryId)return n.categoryList[t].Name},CurrentCategoryDescription:function(){for(var n=this,t=0;t<n.categoryList.length;t++)if(n.categoryList[t].CategoryID==n.currentCategoryId)return n.categoryList[t].Description},IsLoading:function(){return this.loading}},methods:{HasIncludedLocation:function(n,t){var i=this,r=[];return(r=t!==undefined?i.categoryList.filter(function(n){return n.CategoryID==t})[0].IncludedLocationFeatureIDs:i.categoryList.filter(function(n){return n.CategoryID==i.currentCategoryId})[0].IncludedLocationFeatureIDs,r.length>0&&r.indexOf(n.LocationCategoryID)>=0)?!0:!1},HasIncludedParkFeature:function(n,t){var r=this,u=[],i;if(u=t!==undefined?r.categoryList.filter(function(n){return n.CategoryID==t})[0].IncludedParkFeatureIDs:r.categoryList.filter(function(n){return n.CategoryID==r.currentCategoryId})[0].IncludedParkFeatureIDs,u.length>0)for(i=0;i<n.ParkFeatureCategoryIDs.length;i++)if(u.indexOf(n.ParkFeatureCategoryIDs[i])>=0)return!0;return!1},HasExcludedFeature:function(n,t){var i=this,r=[],u=[],f;if(t!==undefined?(r=i.categoryList.filter(function(n){return n.CategoryID==t})[0].ExcludedLocationFeatureIDs,u=i.categoryList.filter(function(n){return n.CategoryID==t})[0].ExcludedParkFeatureIDs):(r=i.categoryList.filter(function(n){return n.CategoryID==i.currentCategoryId})[0].ExcludedLocationFeatureIDs,u=i.categoryList.filter(function(n){return n.CategoryID==i.currentCategoryId})[0].ExcludedParkFeatureIDs),r.length>0&&r.indexOf(n.LocationCategoryID)>=0)return!0;if(u.length>0)for(f=0;f<n.ParkFeatureCategoryIDs.length;f++)if(u.indexOf(n.ParkFeatureCategoryIDs[f])>=0)return!0;return!1},UpdateDisplayParks:function(){for(var t=this,i=[],n=0;n<t.parkList.length;n++)(t.HasIncludedLocation(t.parkList[n])||t.HasIncludedParkFeature(t.parkList[n]))&&!t.HasExcludedFeature(t.parkList[n])&&i.push(t.parkList[n]);for(t.selectedState!==undefined&&t.selectedState.length>0&&(i=i.filter(function(n){return n.ParkCard.StateCode==t.selectedState})),n=0;n<i.length;n++)i[n].AffiliatePark||t.displayParks.push(i[n].ParkCard);for(n=0;n<i.length;n++)i[n].AffiliatePark&&t.displayParks.push(i[n].ParkCard)},CheckCategoryIsEmpty:function(n){for(var t=this,r=[],i=0;i<t.parkList.length;i++)(t.HasIncludedLocation(t.parkList[i],n)||t.HasIncludedParkFeature(t.parkList[i],n))&&!t.HasExcludedFeature(t.parkList[i],n)&&r.push(t.parkList[i]);return t.selectedState!==undefined&&t.selectedState.length>0&&(r=r.filter(function(n){return n.ParkCard.StateCode==t.selectedState})),r.length==0},UpdateCurrentCategory:function(n){var t=this;t.loading=!0;t.displayParks=[];t.currentCategoryId=n;t.UpdateBackgroundImage();t.UpdateDisplayParks();t.loading=!1},RefreshParks:function(){var n=this;n.loading=!0;n.displayParks=[];n.UpdateDisplayParks();n.loading=!1},UpdateBackgroundImage:function(){for(var n=this,t=0;t<n.categoryList.length;t++)n.categoryList[t].CategoryID==n.currentCategoryId&&(document.getElementById("backgroundImage").src=n.categoryList[t].BackgroundImageUrl)}},mounted:function(){var n=this,t;if(n.parkList=this.parks,n.categoryList=this.categories,n.UpdateCurrentCategory(n.categoryList[0].CategoryID),n.displayParks.length==0){for(t=1;t<n.categoryList.length;t++)n.UpdateCurrentCategory(n.categoryList[t].CategoryID);n.displayParks.length>0&&(t=n.categoryList.length)}n.loading=!1}});window.SearchResultsAndFiltersEventBus=new Vue;window.SearchResultsAndFiltersEvents={GET_AVAILABILITY:"get-availability",SUBSCRIBE_TO_SIGNALR:"subscribe-to-signalr",UNSUBSCRIBE_FROM_SIGNALR:"unsubscribe-from-signalr",SIGNALR_CONNECTED:"signalr-connected"};Vue.component("search-results-and-filters-map",{template:"#SEARCH_MAP_TEMPLATE",props:["parks"],data:function(){return{markersArray:[]}},methods:{init:function(){window.searchMap=new google.maps.Map(document.getElementById("map"),{zoom:4,center:{lat:-25.363,lng:131.044}});window.searchMapInfowindow=new google.maps.InfoWindow({content:""});this.parks.length>0&&this.parks.length!=this.markersArray&&this.addParks();this.clusterMarkers()},addParks:function(){var f,e,i,n;if(this.markersArray.length>0)for(n=0;n<this.markersArray.length;n++)this.markersArray[n].setMap(null);var t=window.SearchResultsAndFiltersWidgetStore.state.ParkSearch.FilterResults,u=new google.maps.LatLngBounds,r=[];for(n=0;n<t.length;n++)f={lat:t[n].Latitude,lng:t[n].Longitude},i=new google.maps.LatLng(t[n].Latitude,t[n].Longitude),r.push(i),e={path:"M16 32c7.6-8.2 11.8-13.5 11.8-20.1s-5.3-11.9-11.8-11.9-11.8 5.3-11.8 11.9 4.1 11.9 11.8 20.1zM16 6.7c2.8 0 5.1 2.3 5.1 5.1s-2.3 5.1-5.1 5.1-5.1-2.3-5.1-5.1 2.3-5.1 5.1-5.1z",fillColor:"#0064b6",fillOpacity:1,anchor:new google.maps.Point(16,32),strokeWeight:0,scale:1},i=new google.maps.Marker({position:f,map:window.searchMap,title:t[n].ParkName,icon:e,review:t[n].ReviewRating,typeID:t[n].ParkTypeID,image:t[n].Images[0],page:t[n].Url}),this.markersArray.push(i),google.maps.event.addListener(i,"click",function(){var t="",n="",i="",r;switch(this.typeID){case window.Enums.ParkTypeEnum.Affiliate:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-bullet-rounded c-icon--tertiary-accent"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="227" height="32" viewBox="0 0 227 32"><title>badge-bullet-rounded<\/title> <path d="M-0.012 3.563c0-4.874 69.747-2.011 98.196-2.011s105.767 2.011 115.202 2.011c9.437 0 29.334 27.599-11.15 27.599-40.483 0-169.104 0.273-185.676 0s-16.572-3.135-16.572-27.599z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Affiliate<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMHoliday:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-3 c-icon--primary"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="136" height="32" viewBox="0 0 136 32"><title>badge-holiday<\/title> <path d="M0.879 2.702c1.916-4.48 35.716-2.037 42.326-2.037s67.99 0.646 78.154 0.646c10.165 0 31.658 29.085-11.946 29.085-43.605 0-67.97 1.604-90.122 1.604-22.151 0-18.413-12.376-18.413-29.298z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Holiday<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMClassic:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-1 c-icon--callout-variant-two"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="132" height="32" viewBox="0 0 132 32"><title>badge-trapezoid-1<\/title> <path d="M0.077 0.649c27.028-0.555 38.893 0 68.8 0s56.662 2.811 55.373 2.811c-1.289 0 26.849 26.363-15.713 26.363-42.559 0-72.196 1.774-91.23 1.774s-17.322-4.022-17.231-30.948z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Classic<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMPremier:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-2 c-icon--callout-variant-one"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="135" height="32" viewBox="0 0 135 32"><title>badge-trapezoid-2<\/title> <path d="M0.031 2.025c17.082-1.098 27.529-1.496 41.797-1.496 14.267 0 67.371-0.268 80.033 4.578 12.665 4.845 27.686 26.365-16.198 26.365h-87.823c-19.403 0-17.809-8.562-17.809-29.448z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Premier<\/p><\/span><\/div>'}t=this.image==null||this.image.MapsImageUrl.includes("placehold")?'<img srcset="https://placehold.it/280x158 280w,https://placehold.it/300x169 300w,https://placehold.it/300x169 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="https://placehold.it/300x169" alt="">':'<img style="width:100%" srcset="'+this.image.MapsImageUrl+' 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="'+this.image.MapsImageUrl+'" alt="">';i=this.review!=null&&this.review>0?'<div class="c-ratings"><span><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns: xlink="http://www.w3.org/1999/xlink" width="30" height="32" viewBox="0 0 30 32" class="svg-defs" style="position: absolute; width: 0px; height: 0px;"><clipPath id="star"><path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0                                        c0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path><path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\t                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path><path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><clipPath id="star-empty">                                        <path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path>                                        <path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path>                                        <path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><rect id="rating" width="120" height="30" clip-path="url(#star)"><\/rect><\/svg>                                        <span class="rating-eg"><svg height="12px" viewBox="0 0 170 30" data-rating="1.2" class="rating"><rect x="0" y="0" width="100%" height="100%" clip-path="url(#star-empty)" class="bg-rect" style="fill: rgb(236, 236, 236);"><\/rect><rect x="0" y="0" width="'+this.review*10+'%" height="100%" clip-path="url(#star)" class="rating-rect" style="fill: rgb(55, 55, 55);"><\/rect><\/svg><\/span><\/span> <strong class="u-p4">'+Math.round(this.review*10)/10+"/10<\/strong><\/div>":'<strong class="u-p4" style="padding-left: 10px;">No reviews yet<\/strong>';r='<div class="infoWindow">                         <div class="styleguide-maps" style="background-image: url(\'NaN " data-component="location-map-container" data-component-context="Location Pages">                         <div class="styleguide-maps__card d-none d-md-block">                        <div class="styleguide-maps__card d-none d-md-block"><div data-component="park-card" data-component-context="map" data-component-label="BIG4 Beacon Resort" class="c-card c-card--primary c-card--popup"><div class="c-card__gallery"><a href = "'+this.page+'" class="c-card__img-wrapper"> '+t+"<\/a>"+n+'<\/div ><div class="c-card__body"> <h3 class="u-h6 c-card__title"><a href="'+this.page+'">'+this.title+"<\/a ><\/h3 >"+i+"<\/div>                        <\/div>                       <\/div>";window.searchMapInfowindow.setContent(r);window.searchMapInfowindow.open(window.searchMap,this)});for(n=0;n<r.length;n++)u.extend(r[n]);window.searchMap.fitBounds(u)},clusterMarkers:function(){window.markerCluster=new MarkerClusterer(window.searchMap,this.markersArray,{imagePath:"/Content/Images/GoogleMaps/markerclusterer/images/m"})},reloadMap:function(){this.markersArray=[]}},mounted:function(){this.init()}});Vue.component("search-results-and-filters-widget",{props:["term","editMode"],data:function(){return{loading:!1,moreParksLoading:!1,currentPage:1,resultsPerPage:12,hasMoreParks:!1,searchTerm:"",totalNumResults:0,store:window.SearchResultsAndFiltersWidgetStore,websiteHub:null,signalRConnected:!1,subscribers:[],defaultPetFriendly:!0,markersArray:[],unavailableParks:[]}},computed:{IsLoading:function(){return this.loading},MoreParksLoading:function(){return this.moreParksLoading},ParkResults:function(){return this.store.state.ParkSearch.Results},DisplayParks:function(){return this.store.state.ParkSearch.FilterResults}},methods:{initSignalR:function(){var n=this;this.websiteHub==null&&(this.websiteHub=$.connection.websiteHub,this.websiteHub.client.priceUpdate=this.processSignalRResponse,$.connection.hub.start().done(function(){n.signalRConnected=!0;window.SearchResultsAndFiltersEventBus.$emit(window.SearchResultsAndFiltersEvents.SIGNALR_CONNECTED)}))},processSignalRResponse:function(n){var r=this,i=0,t;if(n.AllAccommodations.length>0){for(i=n.AllAccommodations[0].ParkID,t=0;t<this.subscribers.length;t++)if(this.subscribers[t].parkId==i){this.subscribers[t].updatePrice(n);break}r.setDisplayParks(!0)}},subscribe:function(n){_.some(this.subscribers,{ParkID:n.ParkID})||this.subscribers.push(n)},unsubscribe:function(n){for(var t=0;t<this.subscribers.length;t++)this.subscribers[t].parkID==n.parkID&&this.subscribers.splice(t,1)},doSignalR:function(){if(this.store.state.FiltersChanged||this.store.state.DEFAULT_ADULTS!=this.store.state.NumAdults||this.store.state.DEFAULT_CHILDREN!=this.store.state.NumChildren||this.store.state.DEFAULT_INFANTS!=this.store.state.NumInfants)return!0;if(this.store.state.DEFAULT_START_DATE.isSame(this.store.state.StartDate)){if(!this.store.state.DEFAULT_END_DATE.isSame(this.store.state.EndDate))return!0}else return!0;return!1},updatePricesFromPms:function(){var t,n;if(this.doSignalR()){for(t={ArrivalDate:moment(this.store.state.StartDate).format("YYYY-MM-DD"),DepartingDate:moment(this.store.state.EndDate).format("YYYY-MM-DD"),NumAdults:this.store.state.NumAdults,NumKids:this.store.state.NumChildren,ParkIDs:[]},n=0;n<this.subscribers.length;n++)this.subscribers[n].setPriceLoading(),t.ParkIDs.push(this.subscribers[n].parkId);window.SearchResultsAndFiltersEventBus.$emit(window.SearchResultsAndFiltersEvents.GET_AVAILABILITY,t)}},bindFilterEvents:function(){var n=this;window.SearchResultsAndFiltersEventBus.$on("date-filter-update",function(t){var i=window.SearchResultsAndFiltersWidgetStore.state.DEFAULT_START_DATE.month()+1+"/"+window.SearchResultsAndFiltersWidgetStore.state.DEFAULT_START_DATE.date()+"/"+window.SearchResultsAndFiltersWidgetStore.state.DEFAULT_START_DATE.year(),r=window.SearchResultsAndFiltersWidgetStore.state.DEFAULT_END_DATE.month()+1+"/"+window.SearchResultsAndFiltersWidgetStore.state.DEFAULT_END_DATE.date()+"/"+window.SearchResultsAndFiltersWidgetStore.state.DEFAULT_END_DATE.year();window.SearchResultsAndFiltersWidgetStore.state.dateFilterApplied=t.start.toLocaleDateString()!==i&&t.end.toLocaleDateString()!==r?!0:!1;window.SearchResultsAndFiltersWidgetStore.state.dateFilterApplied==!0?(n.store.state.StartDate=t.start,n.store.state.EndDate=t.end,n.store.state.FiltersChanged=!0,n.subscribers.length===0?(window.SearchResultsAndFiltersEventBus.$once("park-results-updated",function(){n.updatePricesFromPms()}),window.SearchResultsAndFiltersEventBus.$on("park-results-updated",function(){n.store.state.LoadMoreParksClicked&&(n.store.state.LoadMoreParksClicked=!1,n.updatePricesFromPms())})):n.updatePricesFromPms()):(n.store.state.StartDate=n.store.state.DEFAULT_START_DATE,n.store.state.EndDate=n.store.state.DEFAULT_END_DATE,n.store.state.FiltersChanged=!0)});window.SearchResultsAndFiltersEventBus.$on("guest-filter-update",function(t){var r={adults:n.store.state.NumAdults,children:n.store.state.NumChildren,infants:n.store.state.NumInfants},i,u;n.store.state.NumAdults=t.adults;n.store.state.NumChildren=t.children;n.store.state.NumInfants=t.infants;n.store.state.FiltersChanged=!0;i={adults:n.store.state.NumAdults,children:n.store.state.NumChildren,infants:n.store.state.NumInfants};u=i.adults!=r.adults||i.children!=r.children||i.infants!=r.infants;n.subscribers.length===0&&u?window.SearchResultsAndFiltersEventBus.$once("park-results-updated",function(){n.updatePricesFromPms()}):u&&n.updatePricesFromPms()});window.SearchResultsAndFiltersEventBus.$on("pets-filter-update",function(t){var r=n.store.state.PetFriendly,i;n.store.state.PetFriendly=t.isOn;n.store.state.FiltersChanged=!0;i=n.store.state.PetFriendly!=r;n.store.state.ParkSearch.Results.length>0&&i&&n.setDisplayParks(!1)});window.SearchResultsAndFiltersEventBus.$on("state-filter-update",function(t){var i=n.store.state.States;n.store.state.States=t;n.store.state.FiltersChanged=!0;n.setDisplayParks(!1)})},setDisplayParks:function(n){var t=this,i,r;t.loading=!0;i=t.store.state.ParkSearch.Results;r=t.store.state.ParkSearch.FilterResults;i.length>0&&(t.store.state.PetFriendly&&(i=i.filter(function(n){return n.PetFriendly})),t.store.state.States.length>0&&(i=i.filter(function(n){return t.store.state.States.indexOf(n.StateCode)>=0})));t.loading=!1;t.store.state.ParkSearch.FilterResults=i.slice(0,t.currentPage*t.resultsPerPage);t.hasMoreParks=t.store.state.ParkSearch.FilterResults.length<i.length;n&&t.$nextTick(function(){window.SearchResultsAndFiltersEventBus.$emit("park-results-updated")});(r===[]||r!==t.store.state.ParkSearch.FilterResults)&&t.reloadMap()},getParkSearchRequest:function(){var n=this;return{SearchTerm:n.searchTerm,PageNumber:n.currentPage,ResultsPerPage:500,PetFriendly:n.store.state.PetFriendly,StartDate:n.store.state.StartDate,EndDate:n.store.state.EndDate,NumAdults:n.store.state.NumAdults,NumChildren:n.store.state.NumChildren,NumInfants:n.store.state.NumInfants,States:n.store.state.States}},performParkSearch:function(){var n=this,t,i;n.moreParksLoading=!0;n.loading||(n.loading=!0,t=this.getParkSearchRequest(),i="/api/Search/ParkSearchResultsAndFiltersWidgetSearch",$.ajax({type:"POST",url:i,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){t=JSON.parse(t);var i=t.Parks.filter(function(n){return n.Url});n.store.state.ParkSearch.Results=n.store.state.ParkSearch.Results.concat(i);n.totalNumResults=t.TotalNumResults;n.moreParksLoading=!1;n.setDisplayParks(!0)},error:function(){Common.ShowError("Unexpected error trying to load parks.");n.moreParksLoading=!1;n.loading=!1}}))},getNextPage:function(){var n=this,t,i;n.currentPage++;n.moreParksLoading=!0;t=this.getParkSearchRequest();i="/api/Search/ParkSearchResultsAndFiltersWidgetSearch";$.ajax({type:"POST",url:i,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){t=JSON.parse(t);var i=t.Parks.filter(function(n){return n.Url});n.store.state.ParkSearch.Results=n.store.state.ParkSearch.Results.concat(i);n.moreParksLoading=!1;n.setDisplayParks(!0)},error:function(){Common.ShowError("Unexpected error trying to load next page.");n.moreParksLoading=!1}})},nextPage:function(){var n=this;n.currentPage++;n.moreParksLoading=!0;n.store.state.LoadMoreParksClicked=!0;n.setDisplayParks(!0);n.moreParksLoading=!1},initMap:function(){window.searchMap=new google.maps.Map(document.getElementById("map"),{zoom:4,center:{lat:-25.363,lng:131.044}});window.searchMapInfowindow=new google.maps.InfoWindow({content:""});window.SearchResultsAndFiltersWidgetStore.state.ParkSearch.FilterResults.length>0&&window.SearchResultsAndFiltersWidgetStore.state.ParkSearch.FilterResults.length!=this.markersArray&&this.addParks();this.clusterMarkers()},addParks:function(){var f,e,i,n;if(this.markersArray.length>0)for(n=0;n<this.markersArray.length;n++)this.markersArray[n].setMap(null);var t=window.SearchResultsAndFiltersWidgetStore.state.ParkSearch.FilterResults,u=new google.maps.LatLngBounds,r=[];for(n=0;n<t.length;n++)f={lat:t[n].Latitude,lng:t[n].Longitude},i=new google.maps.LatLng(t[n].Latitude,t[n].Longitude),r.push(i),e={path:"M16 32c7.6-8.2 11.8-13.5 11.8-20.1s-5.3-11.9-11.8-11.9-11.8 5.3-11.8 11.9 4.1 11.9 11.8 20.1zM16 6.7c2.8 0 5.1 2.3 5.1 5.1s-2.3 5.1-5.1 5.1-5.1-2.3-5.1-5.1 2.3-5.1 5.1-5.1z",fillColor:"#0064b6",fillOpacity:1,anchor:new google.maps.Point(16,32),strokeWeight:0,scale:1},i=new google.maps.Marker({position:f,map:window.searchMap,title:t[n].ParkName,icon:e,review:t[n].ReviewRating,typeID:t[n].ParkTypeID,image:t[n].Images[0],page:t[n].Url}),this.markersArray.push(i),google.maps.event.addListener(i,"click",function(){var t="",n="",i="",r;switch(this.typeID){case window.Enums.ParkTypeEnum.Affiliate:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-bullet-rounded c-icon--tertiary-accent"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="227" height="32" viewBox="0 0 227 32"><title>badge-bullet-rounded<\/title> <path d="M-0.012 3.563c0-4.874 69.747-2.011 98.196-2.011s105.767 2.011 115.202 2.011c9.437 0 29.334 27.599-11.15 27.599-40.483 0-169.104 0.273-185.676 0s-16.572-3.135-16.572-27.599z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Affiliate<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMHoliday:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-3 c-icon--primary"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="136" height="32" viewBox="0 0 136 32"><title>badge-holiday<\/title> <path d="M0.879 2.702c1.916-4.48 35.716-2.037 42.326-2.037s67.99 0.646 78.154 0.646c10.165 0 31.658 29.085-11.946 29.085-43.605 0-67.97 1.604-90.122 1.604-22.151 0-18.413-12.376-18.413-29.298z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Holiday<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMClassic:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-1 c-icon--callout-variant-two"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="132" height="32" viewBox="0 0 132 32"><title>badge-trapezoid-1<\/title> <path d="M0.077 0.649c27.028-0.555 38.893 0 68.8 0s56.662 2.811 55.373 2.811c-1.289 0 26.849 26.363-15.713 26.363-42.559 0-72.196 1.774-91.23 1.774s-17.322-4.022-17.231-30.948z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Classic<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMPremier:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-2 c-icon--callout-variant-one"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="135" height="32" viewBox="0 0 135 32"><title>badge-trapezoid-2<\/title> <path d="M0.031 2.025c17.082-1.098 27.529-1.496 41.797-1.496 14.267 0 67.371-0.268 80.033 4.578 12.665 4.845 27.686 26.365-16.198 26.365h-87.823c-19.403 0-17.809-8.562-17.809-29.448z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Premier<\/p><\/span><\/div>'}t=this.image==null||this.image.MapsImageUrl.includes("placehold")?'<img srcset="https://placehold.it/280x158 280w,https://placehold.it/300x169 300w,https://placehold.it/300x169 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="https://placehold.it/300x169" alt="">':'<img style="width:100%" srcset="'+this.image.MapsImageUrl+' 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="'+this.image.MapsImageUrl+'" alt="">';i=this.review!=null&&this.review>0?'<div class="c-ratings"><span><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns: xlink="http://www.w3.org/1999/xlink" width="30" height="32" viewBox="0 0 30 32" class="svg-defs" style="position: absolute; width: 0px; height: 0px;"><clipPath id="star"><path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0                                        c0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path><path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\t                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path><path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><clipPath id="star-empty">                                        <path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path>                                        <path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path>                                        <path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><rect id="rating" width="120" height="30" clip-path="url(#star)"><\/rect><\/svg>                                        <span class="rating-eg"><svg height="12px" viewBox="0 0 170 30" data-rating="1.2" class="rating"><rect x="0" y="0" width="100%" height="100%" clip-path="url(#star-empty)" class="bg-rect" style="fill: rgb(236, 236, 236);"><\/rect><rect x="0" y="0" width="'+this.review*10+'%" height="100%" clip-path="url(#star)" class="rating-rect" style="fill: rgb(55, 55, 55);"><\/rect><\/svg><\/span><\/span> <strong class="u-p4">'+Math.round(this.review*10)/10+"/10<\/strong><\/div>":'<strong class="u-p4" style="padding-left: 10px;">No reviews yet<\/strong>';r='<div class="infoWindow">                         <div class="styleguide-maps" style="background-image: url(\'NaN " data-component="location-map-container" data-component-context="Location Pages">                         <div class="styleguide-maps__card d-none d-md-block">                        <div class="styleguide-maps__card d-none d-md-block"><div data-component="park-card" data-component-context="map" data-component-label="BIG4 Beacon Resort" class="c-card c-card--primary c-card--popup"><div class="c-card__gallery"><a href = "'+this.page+'" class="c-card__img-wrapper"> '+t+"<\/a>"+n+'<\/div ><div class="c-card__body"> <h3 class="u-h6 c-card__title"><a href="'+this.page+'">'+this.title+"<\/a ><\/h3 >"+i+"<\/div>                        <\/div>                       <\/div>";window.searchMapInfowindow.setContent(r);window.searchMapInfowindow.open(window.searchMap,this)});for(n=0;n<r.length;n++)u.extend(r[n]);window.searchMap.fitBounds(u)},clusterMarkers:function(){window.markerCluster=new MarkerClusterer(window.searchMap,this.markersArray,{imagePath:"/Content/Images/GoogleMaps/markerclusterer/images/m"})},reloadMap:function(){this.markersArray=[];this.initMap()}},mounted:function(){var n=this;n.searchTerm=n.term;window.SearchResultsAndFiltersEventBus.$on(window.SearchResultsAndFiltersEvents.GET_AVAILABILITY,function(t){n.signalRConnected&&n.websiteHub.server.getAvailability(t)});window.SearchResultsAndFiltersEventBus.$on(window.SearchResultsAndFiltersEvents.SUBSCRIBE_TO_SIGNALR,function(t){n.subscribe(t)});window.SearchResultsAndFiltersEventBus.$on(window.SearchResultsAndFiltersEvents.UNSUBSCRIBE_FROM_SIGNALR,function(t){n.unsubscribe(t)});n.editMode?n.performParkSearch():window.SearchResultsAndFiltersEventBus.$on(window.SearchResultsAndFiltersEvents.SIGNALR_CONNECTED,function(){n.performParkSearch()});n.bindFilterEvents();n.loading=!1},created:function(){this.initSignalR()}});window.SearchResultsAndFiltersWidgetStore={state:{FiltersChanged:!1,SearchTerm:"",StartDate:moment().endOf("day"),EndDate:moment().endOf("day").add(1,"day"),PetFriendly:!1,States:[],Latitude:0,Longitude:0,MaxDistanceRange:0,NumAdults:2,NumChildren:0,NumInfants:0,CanUseDistance:!1,DEFAULT_ADULTS:1,DEFAULT_CHILDREN:0,DEFAULT_INFANTS:0,DEFAULT_START_DATE:moment().endOf("day"),DEFAULT_END_DATE:moment().endOf("day").add(1,"day"),ParkSearch:{PageNumber:1,ResultsPerPage:8,Results:[],FilterResults:[],DisplayResults:[],MoreParksLoading:!1,LoadMoreParksClicked:!1,HasMoreParks:!1,TotalResults:0,IsHidden:!1},PanelLoading:!0},getParkSearchRequest:function(){return{SearchTerm:this.state.SearchTerm,StartDate:this.state.StartDate,EndDate:this.state.EndDate,PetFriendly:this.state.PetFriendly,States:this.state.States,Latitude:this.state.Latitude,Longitude:this.state.Longitude,MaxDistanceRange:this.state.MaxDistanceRange,HolidayType:this.state.HolidayType,ParkType:this.state.ParkType,NumAdults:this.state.NumAdults,NumChildren:this.state.NumChildren,NumInfants:this.state.NumInfants,PageNumber:this.state.ParkSearch.PageNumber,ResultsPerPage:this.state.ParkSearch.ResultsPerPage}},updateDataFromCookie:function(){var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),!n.Dates||(this.state.StartDate=moment(n.Dates.start),this.state.EndDate=moment(n.Dates.end)),!n.Guests||(this.state.NumAdults=n.Guests.adults,this.state.NumChildren=n.Guests.children,this.state.NumInfants=n.Guests.infants))}};window.SearchEventBus=new Vue;window.SearchEvents={GET_AVAILABILITY:"get-availability",SUBSCRIBE_TO_SIGNALR:"subscribe-to-signalr",UNSUBSCRIBE_FROM_SIGNALR:"unsubscribe-from-signalr",SIGNALR_CONNECTED:"signalr-connected",LOAD_MORE_PARKS:"load-more-parks",LOAD_MORE_DEALS:"load-more-deals",LOAD_MORE_ARTICLES:"load-more-articles"};Vue.component("search-filters",{data:function(){return{store:window.SearchStore.state}},computed:{props:function(){return{CanUseDistance:this.store.CanUseDistance}}}});Vue.component("search-handler",{template:"<div style='display:none'><\/div>",data:function(){return{subscribers:[],websiteHub:null,signalRConnected:!1,store:window.SearchStore}},methods:{setSearchLoading:function(){this.store.state.PanelLoading=!0},setSearchFinishedLoading:function(){this.store.state.PanelLoading=!1},initSignalR:function(){var n=this;this.websiteHub==null&&(this.websiteHub=$.connection.websiteHub,this.websiteHub.client.priceUpdate=this.processSignalRResponse,$.connection.hub.start().done(function(){n.signalRConnected=!0;window.SearchEventBus.$emit(window.SearchEvents.SIGNALR_CONNECTED)}))},processSignalRResponse:function(n){var i=0,t;if(n.AllAccommodations.length>0)for(i=n.AllAccommodations[0].ParkID,t=0;t<this.subscribers.length;t++)if(this.subscribers[t].parkId==i){this.subscribers[t].updatePrice(n);break}},subscribe:function(n){_.some(this.subscribers,{ParkID:n.ParkID})||this.subscribers.push(n)},unsubscribe:function(n){for(var t=0;t<this.subscribers.length;t++)this.subscribers[t].parkID==n.parkID&&this.subscribers.splice(t,1)},doSignalR:function(){if(this.store.state.FiltersChanged||this.store.state.DEFAULT_ADULTS!=this.store.state.NumAdults||this.store.state.DEFAULT_CHILDREN!=this.store.state.NumChildren||this.store.state.DEFAULT_INFANTS!=this.store.state.NumInfants)return!0;if(this.store.state.DEFAULT_START_DATE.isSame(this.store.state.StartDate)){if(!this.store.state.DEFAULT_END_DATE.isSame(this.store.state.EndDate))return!0}else return!0;return!1},performParkSearch:function(){var n=this,t=this.store.getParkSearchRequest();$.ajax({type:"POST",url:"/api/Search/ParkSearch",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){n.setSearchFinishedLoading();t=JSON.parse(t);n.store.state.ParkSearch.Results=n.store.state.ParkSearch.Results.concat(t.Parks);n.store.state.ParkSearch.MoreParksLoading=!1;n.store.state.ParkSearch.TotalResults=t.TotalNumResults;n.updateFilterResults()},error:function(){n.setSearchFinishedLoading();n.store.state.ParkSearch.MoreParksLoading=!1;Common.ShowError("Unexpected error trying to load search results.")}})},performDealSearch:function(){var n=this,t=this.store.getDealSearchRequest();$.ajax({type:"POST",url:"/api/Search/DealSearch",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){n.setSearchFinishedLoading();t=JSON.parse(t);n.store.state.DealSearch.Results=n.store.state.DealSearch.Results.concat(t.Deals);n.store.state.DealSearch.MoreDealsLoading=!1;n.store.state.DealSearch.TotalResults=t.TotalNumResults},error:function(){n.setSearchFinishedLoading();n.store.state.DealSearch.MoreDealsLoading=!1;Common.ShowError("Unexpected error trying to load deals.")}})},performArticleSearch:function(){var n=this,t=this.store.getArticleSearchRequest();$.ajax({type:"POST",url:"/api/Search/ArticleSearch",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(t),success:function(t){n.setSearchFinishedLoading();t=JSON.parse(t);n.store.state.ArticleSearch.Results=n.store.state.ArticleSearch.Results.concat(t.Articles);n.store.state.ArticleSearch.MoreArticlesLoading=!1;n.store.state.ArticleSearch.TotalResults=t.TotalNumResults},error:function(){n.setSearchFinishedLoading();n.store.state.ArticleSearch.MoreArticlesLoading=!1;Common.ShowError("Unexpected error trying to load articles.")}})},updatePricesFromPms:function(){var t,n;if(this.doSignalR()){for(t={ArrivalDate:moment(this.store.state.StartDate).format("YYYY-MM-DD"),DepartingDate:moment(this.store.state.EndDate).format("YYYY-MM-DD"),NumAdults:this.store.state.NumAdults,NumKids:this.store.state.NumChildren,ParkIDs:[]},n=0;n<this.subscribers.length;n++)this.subscribers[n].setPriceLoading(),t.ParkIDs.push(this.subscribers[n].parkId);window.SearchEventBus.$emit(window.SearchEvents.GET_AVAILABILITY,t)}},updateFilterResults:function(){var n,t,r,i,u;for(this.store.state.ParkSearch.IsHidden=!0,this.store.state.ParkSearch.FilterResults=[],this.store.state.ParkSearch.PageNumber=1,this.store.state.ParkSearch.FilterResults=this.store.state.ParkSearch.FilterResults.concat(this.store.state.ParkSearch.Results),n=this.store.state.ParkSearch.Results.length-1;n>-1;n--){if(t=this.store.state.ParkSearch.FilterResults[n],this.store.state.PetFriendly&&!t.PetFriendly&&this.store.state.ParkSearch.FilterResults.splice(n,1),this.store.state.States.length>0){for(r=!1,i=0;i<this.store.state.States.length;i++)t.StateCode.toUpperCase()==this.store.state.States[i].toUpperCase()&&(r=!0);r||this.store.state.ParkSearch.FilterResults.splice(n,1)}this.store.state.CanUseDistance&&this.store.state.MaxDistanceRange>0&&t.DistanceFromMe>this.store.state.MaxDistanceRange*1e3&&this.store.state.ParkSearch.FilterResults.splice(n,1)}this.store.state.ParkSearch.HasMoreParks=!0;u=this;setTimeout(function(){u.store.state.ParkSearch.DisplayResults=[];u.moveItemsToDisplayArray()},250)},moveItemsToDisplayArray:function(){var n=this,u=n.store.state.ParkSearch.PageNumber-1,r=n.store.state.ParkSearch.ResultsPerPage,t=u*r+r,f=!1;if(n.store.state.ParkSearch.FilterResults.length>0){for((t>n.store.state.ParkSearch.FilterResults.length||t==n.store.state.ParkSearch.FilterResults.length)&&(t=n.store.state.ParkSearch.FilterResults.length,f=!0),i=u*r;i<t;i++)n.store.state.ParkSearch.DisplayResults=n.store.state.ParkSearch.DisplayResults.concat(n.store.state.ParkSearch.FilterResults[i]);f&&(n.store.state.ParkSearch.MoreParksLoading=!1,n.store.state.ParkSearch.HasMoreParks=!1);n.store.state.ParkSearch.PageNumber+=1;setTimeout(function(){n.store.state.ParkSearch.IsHidden=!1},250)}n.$nextTick(function(){window.SearchEventBus.$emit("park-results-updated")})},bindFilterEvents:function(){var n=this;window.SearchEventBus.$on("date-filter-update",function(t){try{var i=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");i!=""?(i=JSON.parse(i),window.DateFilterStore.state.dateFilterApplied=i.Dates?!0:!1):window.DateFilterStore.state.dateFilterApplied=!1}catch(r){}window.DateFilterStore.state.dateFilterApplied==!0?(n.store.state.StartDate=t.start,n.store.state.EndDate=t.end,n.store.state.FiltersChanged=!0,n.subscribers.length===0?(window.SearchEventBus.$once("park-results-updated",function(){n.updatePricesFromPms()}),window.SearchEventBus.$on("park-results-updated",function(){n.store.state.LoadMoreParksClicked&&(n.store.state.LoadMoreParksClicked=!1,n.updatePricesFromPms())})):n.updatePricesFromPms()):(n.store.state.StartDate=n.store.state.DEFAULT_START_DATE,n.store.state.EndDate=n.store.state.DEFAULT_END_DATE,n.store.state.FiltersChanged=!0)});window.SearchEventBus.$on("guest-filter-update",function(t){var r={adults:n.store.state.NumAdults,children:n.store.state.NumChildren,infants:n.store.state.NumInfants},i,u;n.store.state.NumAdults=t.adults;n.store.state.NumChildren=t.children;n.store.state.NumInfants=t.infants;n.store.state.FiltersChanged=!0;i={adults:n.store.state.NumAdults,children:n.store.state.NumChildren,infants:n.store.state.NumInfants};u=i.adults!=r.adults||i.children!=r.children||i.infants!=r.infants;n.subscribers.length===0&&u?window.SearchEventBus.$once("park-results-updated",function(){n.updatePricesFromPms()}):u&&n.updatePricesFromPms();n.updateFilterPersonaScore()});window.SearchEventBus.$on("pets-filter-update",function(t){var r=n.store.state.PetFriendly,i;n.store.state.PetFriendly=t.isOn;n.store.state.FiltersChanged=!0;i=n.store.state.PetFriendly!=r;n.store.state.ParkSearch.Results.length>0&&i&&n.updateFilterResults()});window.SearchEventBus.$on("state-filter-update",function(t){var r=n.store.state.States,i;n.store.state.States=t;n.store.state.FiltersChanged=!0;i=n.store.state.States.length==r.length&&n.store.state.States.every(function(n,t){return n===r[t]});i||n.store.state.States.length==r.length?i&&n.store.state.States.length==0&&r.length==0&&(i=!1):i=!0;n.store.state.ParkSearch.Results.length>0&&i&&n.updateFilterResults()});window.SearchEventBus.$on("distance-filter-update",function(t){var r=n.store.state.MaxDistanceRange,i;n.store.state.MaxDistanceRange=t.distance;n.store.state.FiltersChanged=!0;i=n.store.state.MaxDistanceRange!=r;n.store.state.ParkSearch.Results.length>0&&i&&n.updateFilterResults()});window.SearchEventBus.$on(window.SearchEvents.LOAD_MORE_PARKS,function(){n.store.state.ParkSearch.MoreParksLoading=!0;n.store.state.LoadMoreParksClicked=!0;n.moveItemsToDisplayArray();n.store.state.ParkSearch.MoreParksLoading=!1});window.SearchEventBus.$on(window.SearchEvents.LOAD_MORE_DEALS,function(){n.store.state.DealSearch.MoreDealsLoading=!0;n.store.state.DealSearch.PageNumber+=1});window.SearchEventBus.$on(window.SearchEvents.LOAD_MORE_ARTICLES,function(){n.store.state.ArticleSearch.MoreArticlesLoading=!0;n.store.state.ArticleSearch.PageNumber+=1;n.performArticleSearch()})},updateFilterPersonaScore:function(){var n=this,t="";n.store.state.NumAdults>2?t+="/api/Personalization/FilteredByGroup":n.store.state.NumChildren>=1||n.store.state.NumInfants?t+="/api/Personalization/FilteredByFamily":n.store.state.NumAdults==2&&n.store.state.NumChildren==0&&n.store.state.NumInfants==0&&(t+="/api/Personalization/FilteredByNomad");t!=""&&$.ajax({type:"POST",url:t,contentType:"application/json; charset=utf-8",success:function(){},error:function(){}})}},computed:{parks:function(){return this.store.state.ParkSearch.Results},filterparks:function(){return this.store.state.ParkSearch.FilterResults},deals:function(){return this.store.state.DealSearch.Results},articles:function(){return this.store.state.ArticleSearch.Results}},mounted:function(){var n=this;window.SearchEventBus.$on(window.SearchEvents.GET_AVAILABILITY,function(t){n.signalRConnected&&n.websiteHub.server.getAvailability(t)});window.SearchEventBus.$on(window.SearchEvents.SUBSCRIBE_TO_SIGNALR,function(t){n.subscribe(t)});window.SearchEventBus.$on(window.SearchEvents.UNSUBSCRIBE_FROM_SIGNALR,function(t){n.unsubscribe(t)});window.SearchEventBus.$on(window.SearchEvents.SIGNALR_CONNECTED,function(){n.setSearchLoading();n.performParkSearch();n.performDealSearch();n.performArticleSearch()});this.bindFilterEvents();this.store.state.SearchTerm=this.URIDecode(Common.GetUrlParameter("search"))},created:function(){this.store.updateDataFromCookie();this.initSignalR();var n=this;navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(t){n.store.state.CanUseDistance=!0;n.store.state.Latitude=t.coords.latitude;n.store.state.Longitude=t.coords.longitude})}});Vue.component("search-map",{template:"#SEARCH_MAP_TEMPLATE",props:["parks"],data:function(){return{markersArray:[]}},methods:{init:function(){window.searchMap=new google.maps.Map(document.getElementById("map"),{zoom:4,center:{lat:-25.363,lng:131.044}});window.searchMapInfowindow=new google.maps.InfoWindow({content:""});this.parks.length>0&&this.parks.length!=this.markersArray&&this.addParks();this.clusterMarkers()},addParks:function(){var f,e,i,n;if(this.markersArray.length>0)for(n=0;n<this.markersArray.length;n++)this.markersArray[n].setMap(null);var t=window.SearchStore.state.ParkSearch.FilterResults,u=new google.maps.LatLngBounds,r=[];for(n=0;n<t.length;n++)f={lat:t[n].Latitude,lng:t[n].Longitude},i=new google.maps.LatLng(t[n].Latitude,t[n].Longitude),r.push(i),e={path:"M16 32c7.6-8.2 11.8-13.5 11.8-20.1s-5.3-11.9-11.8-11.9-11.8 5.3-11.8 11.9 4.1 11.9 11.8 20.1zM16 6.7c2.8 0 5.1 2.3 5.1 5.1s-2.3 5.1-5.1 5.1-5.1-2.3-5.1-5.1 2.3-5.1 5.1-5.1z",fillColor:"#0064b6",fillOpacity:1,anchor:new google.maps.Point(16,32),strokeWeight:0,scale:1},i=new google.maps.Marker({position:f,map:window.searchMap,title:t[n].ParkName,icon:e,review:t[n].ReviewRating,typeID:t[n].ParkTypeID,image:t[n].Images[0],page:t[n].Url}),this.markersArray.push(i),google.maps.event.addListener(i,"click",function(){var t="",n="",i="",r;switch(this.typeID){case window.Enums.ParkTypeEnum.Affiliate:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-bullet-rounded c-icon--tertiary-accent"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="227" height="32" viewBox="0 0 227 32"><title>badge-bullet-rounded<\/title> <path d="M-0.012 3.563c0-4.874 69.747-2.011 98.196-2.011s105.767 2.011 115.202 2.011c9.437 0 29.334 27.599-11.15 27.599-40.483 0-169.104 0.273-185.676 0s-16.572-3.135-16.572-27.599z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Affiliate<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMHoliday:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-3 c-icon--primary"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="136" height="32" viewBox="0 0 136 32"><title>badge-holiday<\/title> <path d="M0.879 2.702c1.916-4.48 35.716-2.037 42.326-2.037s67.99 0.646 78.154 0.646c10.165 0 31.658 29.085-11.946 29.085-43.605 0-67.97 1.604-90.122 1.604-22.151 0-18.413-12.376-18.413-29.298z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Holiday<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMClassic:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-1 c-icon--callout-variant-two"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="132" height="32" viewBox="0 0 132 32"><title>badge-trapezoid-1<\/title> <path d="M0.077 0.649c27.028-0.555 38.893 0 68.8 0s56.662 2.811 55.373 2.811c-1.289 0 26.849 26.363-15.713 26.363-42.559 0-72.196 1.774-91.23 1.774s-17.322-4.022-17.231-30.948z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Classic<\/p><\/span><\/div>';break;case window.Enums.ParkTypeEnum.FCOMPremier:n='<div class="c-card__badge"><span data-component="badge" class="c-badge u-p5 c-badge--secondary"><div class="c-badge__bg"><span class="c-icon badge-trapezoid-2 c-icon--callout-variant-one"><svg preserveAspectRatio="none" version="1.1" xmlns="http://www.w3.org/2000/svg" width="135" height="32" viewBox="0 0 135 32"><title>badge-trapezoid-2<\/title> <path d="M0.031 2.025c17.082-1.098 27.529-1.496 41.797-1.496 14.267 0 67.371-0.268 80.033 4.578 12.665 4.845 27.686 26.365-16.198 26.365h-87.823c-19.403 0-17.809-8.562-17.809-29.448z"><\/path><\/svg><\/span><\/div> <p class="c-badge__label">Premier<\/p><\/span><\/div>'}t=this.image==null||this.image.MapsImageUrl.includes("placehold")?'<img srcset="https://placehold.it/280x158 280w,https://placehold.it/300x169 300w,https://placehold.it/300x169 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="https://placehold.it/300x169" alt="">':'<img style="width:100%" srcset="'+this.image.MapsImageUrl+' 300w" sizes="(min-width: 1024px) 20vw,(min-width: 768px) 30vw,30vw" src="'+this.image.MapsImageUrl+'" alt="">';i=this.review!=null&&this.review>0?'<div class="c-ratings"><span><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns: xlink="http://www.w3.org/1999/xlink" width="30" height="32" viewBox="0 0 30 32" class="svg-defs" style="position: absolute; width: 0px; height: 0px;"><clipPath id="star"><path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0                                        c0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path><path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\t                                        c0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path><path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\t                                        c-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><clipPath id="star-empty">                                        <path d="M29.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.3,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C0.1,11.5,0,11.2,0,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C14.2,0.2,14.5,0,14.9,0s0.6,0.2,0.9,0.7\tl4,8.1l9,1.3C29.4,10.3,29.7,10.5,29.7,11z"><\/path>                                        <path d="M64.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C35.1,11.5,35,11.2,35,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C49.2,0.2,49.5,0,49.9,0\ts0.6,0.2,0.9,0.7l4,8.1l9,1.3C64.4,10.3,64.7,10.5,64.7,11z"><\/path>                                        <path d="M99.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6c-0.1,0.2-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3C70.1,11.5,70,11.2,70,11c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1C84.2,0.2,84.5,0,84.9,0\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C99.4,10.3,99.7,10.5,99.7,11z"><\/path>                                        <path d="M134.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3c-0.1-0.2-0.2-0.4-0.2-0.6\tc0-0.1,0-0.2,0-0.4l1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7\tc0.4,0,0.6,0.2,0.9,0.7l4,8.1l9,1.3C134.4,10.3,134.7,10.5,134.7,11z"><\/path>                                        <path d="M169.7,11c0,0.3-0.2,0.5-0.5,0.9l-6.5,6.3l1.5,8.9c0,0.1,0,0.2,0,0.4c0,0.2-0.1,0.5-0.2,0.6s-0.3,0.3-0.5,0.3\tc-0.2,0-0.5-0.1-0.7-0.2l-8-4.2l-8,4.2c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0-0.4-0.1-0.6-0.3s-0.2-0.4-0.2-0.6c0-0.1,0-0.2,0-0.4\tl1.5-8.9l-6.5-6.3c-0.3-0.3-0.4-0.6-0.4-0.9c0-0.4,0.3-0.7,1-0.8l9-1.3l4-8.1c0.2-0.5,0.5-0.7,0.9-0.7s0.6,0.2,0.9,0.7l4,8.1l9,1.3\tC169.4,10.3,169.7,10.5,169.7,11z"><\/path><\/clipPath><rect id="rating" width="120" height="30" clip-path="url(#star)"><\/rect><\/svg>                                        <span class="rating-eg"><svg height="12px" viewBox="0 0 170 30" data-rating="1.2" class="rating"><rect x="0" y="0" width="100%" height="100%" clip-path="url(#star-empty)" class="bg-rect" style="fill: rgb(236, 236, 236);"><\/rect><rect x="0" y="0" width="'+this.review*10+'%" height="100%" clip-path="url(#star)" class="rating-rect" style="fill: rgb(55, 55, 55);"><\/rect><\/svg><\/span><\/span> <strong class="u-p4">'+Math.round(this.review*10)/10+"/10<\/strong><\/div>":'<strong class="u-p4" style="padding-left: 10px;">No reviews yet<\/strong>';r='<div class="infoWindow">                         <div class="styleguide-maps" style="background-image: url(\'NaN " data-component="location-map-container" data-component-context="Location Pages">                         <div class="styleguide-maps__card d-none d-md-block">                        <div class="styleguide-maps__card d-none d-md-block"><div data-component="park-card" data-component-context="map" data-component-label="BIG4 Beacon Resort" class="c-card c-card--primary c-card--popup"><div class="c-card__gallery"><a href = "'+this.page+'" class="c-card__img-wrapper"> '+t+"<\/a>"+n+'<\/div ><div class="c-card__body"> <h3 class="u-h6 c-card__title"><a href="'+this.page+'">'+this.title+"<\/a ><\/h3 >"+i+"<\/div>                        <\/div>                       <\/div>";window.searchMapInfowindow.setContent(r);window.searchMapInfowindow.open(window.searchMap,this)});for(n=0;n<r.length;n++)u.extend(r[n]);window.searchMap.fitBounds(u)},clusterMarkers:function(){window.markerCluster=new MarkerClusterer(window.searchMap,this.markersArray,{imagePath:"/Content/Images/GoogleMaps/markerclusterer/images/m"})}},mounted:function(){this.init()}});Vue.component("search-map-button",{props:[],template:"#SearchMapButtonTemplate",data:function(){return{}},methods:{viewMap:function(){var n=document.getElementById("mapScrollDiv"),t=document.getElementById("map")!=null;t?n.scrollIntoView({behavior:"smooth",block:"end"}):n.scrollIntoView({behavior:"smooth",block:"start"})}},created:function(){}});Vue.component("search-results-panel",{data:function(){return{store:window.SearchStore.state}},computed:{parks:function(){return this.store.ParkSearch.DisplayResults},isHidden:function(){return this.store.ParkSearch.IsHidden},deals:function(){return this.store.DealSearch.Results},articles:function(){return this.store.ArticleSearch.Results},searchString:function(){return this.store.SearchTerm},parksLoading:function(){return this.store.ParkSearch.MoreParksLoading},dealsLoading:function(){return this.store.DealSearch.MoreDealsLoading},articlesLoading:function(){return this.store.ArticleSearch.MoreArticlesLoading},panelLoading:function(){return this.store.PanelLoading},totalResults:function(){return this.store.ParkSearch.TotalResults+this.store.DealSearch.TotalResults+this.store.ArticleSearch.TotalResults},hasMoreParks:function(){return this.store.ParkSearch.HasMoreParks},hasMoreDeals:function(){return this.store.DealSearch.TotalResults!=this.deals.length},hasMoreArticles:function(){return this.store.ArticleSearch.TotalResults!=this.articles.length}},methods:{loadMoreParks:function(){window.SearchEventBus.$emit(window.SearchEvents.LOAD_MORE_PARKS)},loadMoreDeals:function(){window.SearchEventBus.$emit(window.SearchEvents.LOAD_MORE_DEALS)},loadMoreArticles:function(){window.SearchEventBus.$emit(window.SearchEvents.LOAD_MORE_ARTICLES)},alert:function(){alert("123")}},mounted:function(){}});window.SearchStore={state:{FiltersChanged:!1,SearchTerm:"",StartDate:moment().endOf("day"),EndDate:moment().endOf("day").add(1,"day"),PetFriendly:!1,States:[],Latitude:0,Longitude:0,MaxDistanceRange:0,NumAdults:2,NumChildren:0,NumInfants:0,CanUseDistance:!1,DEFAULT_ADULTS:1,DEFAULT_CHILDREN:0,DEFAULT_INFANTS:0,DEFAULT_START_DATE:moment().endOf("day"),DEFAULT_END_DATE:moment().endOf("day").add(1,"day"),ParkSearch:{PageNumber:1,ResultsPerPage:8,Results:[],FilterResults:[],DisplayResults:[],MoreParksLoading:!1,LoadMoreParksClicked:!1,HasMoreParks:!1,TotalResults:0,IsHidden:!1},DealSearch:{PageNumber:1,ResultsPerPage:8,Results:[],MoreDealsLoading:!1,HasMoreDeals:!1,TotalResults:0},ArticleSearch:{PageNumber:1,ResultsPerPage:8,Results:[],MoreArticlesLoading:!1,HasMoreArticles:!1,TotalResults:0},PanelLoading:!0},getParkSearchRequest:function(){return{SearchTerm:this.state.SearchTerm,StartDate:this.state.StartDate,EndDate:this.state.EndDate,PetFriendly:this.state.PetFriendly,States:this.state.States,Latitude:this.state.Latitude,Longitude:this.state.Longitude,MaxDistanceRange:this.state.MaxDistanceRange,HolidayType:this.state.HolidayType,ParkType:this.state.ParkType,NumAdults:this.state.NumAdults,NumChildren:this.state.NumChildren,NumInfants:this.state.NumInfants,PageNumber:this.state.ParkSearch.PageNumber,ResultsPerPage:24}},getDealSearchRequest:function(){return{SearchTerm:this.state.SearchTerm,StartDate:this.state.StartDate,EndDate:this.state.EndDate,PetFriendly:this.state.PetFriendly,States:this.state.States,Latitude:this.state.Latitude,Longitude:this.state.Longitude,MaxDistanceRange:this.state.MaxDistanceRange,HolidayType:this.state.HolidayType,ParkType:this.state.ParkType,NumAdults:this.state.NumAdults,NumChildren:this.state.NumChildren,NumInfants:this.state.NumInfants,PageNumber:this.state.DealSearch.PageNumber,ResultsPerPage:this.state.DealSearch.ResultsPerPage}},getArticleSearchRequest:function(){return{SearchTerm:this.state.SearchTerm,Latitude:this.state.Latitude,Longitude:this.state.Longitude,MaxDistanceRange:this.state.MaxDistanceRange,PageNumber:this.state.ArticleSearch.PageNumber,ResultsPerPage:this.state.ArticleSearch.ResultsPerPage}},updateDataFromCookie:function(){var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),!n.Dates||(this.state.StartDate=moment(n.Dates.start),this.state.EndDate=moment(n.Dates.end)),!n.Guests||(this.state.NumAdults=n.Guests.adults,this.state.NumChildren=n.Guests.children,this.state.NumInfants=n.Guests.infants))}};Vue.use(AsyncComputed);Vue.component("search-data-wrapper",{mixins:[MIXIN_SEARCH_SAVED_SEARCHES],props:{account:{type:Object,"default":{}},scrolled:{"default":!1},homeBanner:{"default":!1},defaultResults:{type:Array,"default":function(){return[]}}},data:function(){return{searchString:"",error:"",request:[],recentlyViewed:[]}},computed:{hasRecentlyViewed:function(){return this.recentlyViewed.length>0&&this.searchString.length==0},props:function(){return{RecentlyViewed:this.recentlyViewed,HasRecentlyViewed:this.hasRecentlyViewed,GoToUrl:this.GoToUrl,IsScrolled:this.scrolled,IsHomeBanner:this.homeBanner,CloseKeyBoard:this.closeKeyBoard}}},asyncComputed:{data:{get:function(){var n=[];return this.searchString.length>0?axios.get("/api/Search/SiteSearch",{params:{SearchTerm:this.searchString}}).then(function(t){var i;t=JSON.parse(t.data);var r=t.Parks,u=t.Deals,f=t.Articles,e=t.Regions;for(i=0;i<r.length;i++)n.push({icon:"big4",url:r[i].Url,title:r[i].ParkName,location:r[i].Location,state:r[i].State,ParkTypeID:r[i].ParkTypeID,ParkID:r[i].ParkID});for(i=0;i<e.length;i++)n.push({icon:"pin",url:e[i].Url,title:e[i].Name});for(i=0;i<u.length;i++)n.push({icon:"deal",url:u[i].Url,title:u[i].ResultString});for(i=0;i<f.length;i++)n.push({icon:"bulb",url:f[i].Url,title:f[i].Name});return n}).catch(function(){return Common.ShowError("Unexpected error trying to perform search."),this.defaultResults}):this.hasRecentlyViewed?this.recentlyViewed:this.defaultResults}}},methods:{submitSearch:function(n){this.searchString=n},GoToUrl:function(n){this.UpdateCookie(n);window.location.href=n.url},closeKeyBoard:function(){this.$nextTick(function(){document.activeElement==document.getElementById("search")&&document.activeElement.blur()})}},created:function(){var n=CookieHelper.GetCookieValue(".BIG4_SAVED_SEARCHES");n!=""&&(n=JSON.parse(n),!n.Searches||(this.recentlyViewed=n.Searches.reverse()))}});Vue.use(AsyncComputed);Vue.component("site-search",{template:"#SITE_SEARCH_TEMPLATE",props:["scrolled","home-banner"],computed:{IsScrolled:function(){return this.scrolled},IsHomeBanner:function(){return this.homeBanner}}});Vue.component("address-input-component",{template:"#AddressInputComponentTemplate",mixins:[MIXIN_PRISTINE_VALIDATE],data:function(){return{showSearch:!0,showAllFields:!1,addressSearch:"",callingApi:!1,addressesToSelect:[],showAddressDropdown:!1,canCallApi:!0,addressSelected:!1,internationalGuest:!1,address:{AddressLine1:"",UnitNumber:"",StreetNumber:"",StreetName:"",Suburb:"",State:"",Postcode:"",CountryID:19}}},watch:{address:{handler:function(){var n=!1,t="";this.address.UnitNumber!=null&&this.address.UnitNumber!=""&&(t+=this.address.UnitNumber+" ",n=!0);this.address.StreetNumber!=null&&this.address.StreetNumber!=""&&(t+=this.address.StreetNumber+" ",n=!0);this.address.StreetName!=null&&this.address.StreetName!=""&&(t+=this.address.StreetName+" ",n=!0);n&&(this.address.AddressLine1=t.trim())},deep:!0},addressSearch:function(){var n=this,t,i;n.showAddressDropdown=!1;n.addressSelected=!1;n.hasError=!1;t=new Pristine(this.$el);i=t.validate();i&&this.canCallApi&&this.callApi(function(t){n.addressesToSelect=[];$.each(t.Results,function(t,i){var r=i;r.Suburb=r.City;n.addressesToSelect.push(r)});n.showAddressDropdown=!0})}},methods:{setInternationalGuest:function(){this.internationalGuest=!0;this.addressNotFound()},selectAddress:function(n){var t=this;this.canCallApi=!1;setTimeout(function(){t.addressSelected=!0;t.canCallApi=!0;t.validate()},100);this.addressSearch=this.presentationAddress(n);this.address=n;this.address.CountryID=19;this.dismiss()},addressNotFound:function(){this.dismiss();this.address.CountryID=19;this.showAllFields=!0;this.showSearch=!1},dismiss:function(){this.showAddressDropdown=!1},callApi:_.debounce(function(n){var t=this;this.callingApi=!0;$.get({url:"/api/address/typedown",data:{request:this.addressSearch},dataType:"json",success:function(i){t.callingApi=!1;i&&n(i)},error:function(){t.callingApi=!1}})},750),presentationAddress:function(n){var t="";return t+=n.AddressLine1,n.AddressLine2!=null&&n.AddressLine2!=""&&(t+=", "+n.AddressLine2),n.City!=null&&n.City!=""&&(t+=", "+n.City),n.State!=null&&n.State!=""&&(t+=", "+n.State),n.Postcode!=null&&n.Postcode!=""&&(t+=", "+n.Postcode),t.startsWith(", ")&&(t=t.substring(2)),t},populateAddress:function(n){var t=this;n!=null&&(this.address=JSON.parse(JSON.stringify(n)),(Common.isNullOrEmpty(n.StreetName)||Common.isNullOrEmpty(n.StreetNumber)||Common.isNullOrEmpty(n.Suburb)||Common.isNullOrEmpty(n.State)||Common.isNullOrEmpty(n.Postcode))&&Common.isNullOrEmpty(n.Address)||(this.address.AddressLine1=this.address.Address&&this.address.Address!=""?n.Address:n.UnitNumber+" "+n.StreetNumber+" "+n.StreetName+" ",this.address.AddressLine1!=null&&(this.address.AddressLine1=this.address.AddressLine1.trim()),this.addressSearch=this.address.AddressLine1+" "+n.Suburb+" "+n.State+" "+n.Postcode,n.CountryID&&n.CountryID!==19&&(this.internationalGuest=!0,this.showAllFields=!0,this.showSearch=!1),n.CountryID==0&&(n.CountryID=19),setTimeout(function(){t.addressSelected=!0},100)))},backToAddressSearch:function(){var n=this;this.showAllFields=!1;this.showSearch=!0;this.internationalGuest=!1;this.addressSearch="";this.addressSelected=!1;this.address.CountryID=19;setTimeout(function(){n.dismiss()},100)},addCustomValidators:function(){var n=this,t=document.getElementById("address");n.showSearch&&n.pristine.addValidator(t,function(){return n.showSearch&&!n.addressSelected?!1:!0},"An address must be selected",2,!1)}}});Vue.component("car-hire-data-wrapper",{mixins:[MIXIN_CHECK_OVERLAPPING_BOOKINGS],props:["can-sign-up"],data:function(){return{cartState:window.CartStore.state,CheckoutState:window.CheckoutStore.state,IATA:null}},computed:{startDay:function(){return this.CheckoutState.bookingDates.startDate.toDate().getDate()},endDay:function(){return this.CheckoutState.bookingDates.endDate.toDate().getDate()},startMonth:function(){return this.CheckoutState.bookingDates.startDate.toDate().getMonth()+1},endMonth:function(){return this.CheckoutState.bookingDates.endDate.toDate().getMonth()+1},startYear:function(){return this.CheckoutState.bookingDates.startDate.toDate().getFullYear()},endYear:function(){return this.CheckoutState.bookingDates.endDate.toDate().getFullYear()},iataCode:function(){var n=this;return this.$nextTick(function(){$.ajax({type:"GET",url:"/api/Park/GetParkIATA?parkID="+n.CheckoutState.bookingDates.parkID,contentType:"application/json; charset=utf-8",dataType:"json",success:function(t){n.IATA=t.IATACode},error:function(){}})}),this.IATA},iframeUrl:function(){return"https://widget.rentalcars.com/WidgetSearch.do?affiliateCode=big4_rc&adplat=destinationwidget&preflang=en&pickupIATACode="+this.iataCode+"&results=1&pickupMonth="+this.startMonth+"&pickupDate="+this.startDay+"&pickupYear="+this.startYear+"&puHour=9&pickupHour=9&pickupMinute=00&returnDate="+this.endDay+"&returnMonth="+this.endMonth+"&returnYear="+this.endYear+"&returnHour=9&returnMinute=00&adplat=pageconf-csl-big4_rc-click"},isBookingCompletePage:function(){return window.location.href.includes("checkout/complete")},show:function(){return this.isBookingCompletePage?this.cartHasAccommodationItems:!0}},mounted:function(){var n=this}});Vue.component("covid-check-wrapper",{props:["is-quick-booking"],data:function(){return{showRestrictedCalendar:!0}},computed:{covidCalendar:function(){return this.$data.showRestrictedCalendar}},methods:{covidCanBook:function(){var n=this;$.ajax({type:"POST",url:"/api/Park/CovidCanParkBook?parkDocumentID="+PARK_DOCUMENT_ID,contentType:"application/json; charset=utf-8",success:function(t){n.$data.showRestrictedCalendar=!t;n.$el.style.display="inherit";document.getElementById("filterSpinner").style.display="none"},error:function(){}})},covidCanQuickBook:function(){var n=this,t=window.BookingStore.state.quickBooking.ParkSelectionID;window.location.href.includes("/caravan-parks")&&(n=this,$.ajax({type:"POST",url:"/api/Park/CovidCanParkBook?parkDocumentID="+PARK_DOCUMENT_ID,contentType:"application/json; charset=utf-8",success:function(t){n.$data.showRestrictedCalendar=!t},error:function(){}}));t==""||t==0||$.ajax({type:"POST",url:"/api/Park/CovidCanParkBook?parkBig4ID="+t,contentType:"application/json; charset=utf-8",success:function(t){n.$data.showRestrictedCalendar=!t},error:function(){}})}},mounted:function(){var n=this;this.$nextTick(function(){n.isQuickBooking?n.covidCanQuickBook():(n.$el.style.display="none",n.covidCanBook())});window.AccommodationEventBus.$on("new-quick-park-selected",function(){n.covidCanQuickBook()})}});Vue.component("google-map",{props:["props"],data:function(){return{}},mounted:function(){var i=this,t;if(this.props.coords)var n=this.props.coords,r=new google.maps.Map(this.$el,{zoom:15,center:n,disableDefaultUI:!0}),u=new google.maps.Marker({position:n,map:r});else t=new google.maps.Geocoder,t.geocode({address:this.props.address},function(n,t){if(t=="OK")var r={lat:n[0].geometry.location.lat(),lng:n[0].geometry.location.lng()},u=new google.maps.Map(i.$el,{zoom:15,center:r,disableDefaultUI:!0}),f=new google.maps.Marker({position:r,map:u})})}});Vue.component("hygiene-badge",{props:["is-park-card","show-badge"],template:'<a v-if="!isParkCard" href="/brandpromise"><img v-show="displayBadge" title="" class="hygiene-badge" src="/Icons/HygieneBadge/brandPromise.png" /><\/a>                <a v-else href="/brandpromise"><img class="hygiene-badge-card" title="" v-show="displayBadge" src="/Icons/HygieneBadge/brandPromise.png" /><\/a>',data:function(){return{canDisplayBadge:!1}},computed:{displayBadge:function(){return this.$data.canDisplayBadge}},methods:{canDisplay:function(){this.$data.canDisplayBadge=this.isParkCard?window.location.href.includes("/search")?this.$parent.park.HygieneCertified:this.$parent.park.HygieneCertified!==undefined?this.$parent.park.HygieneCertified:this.$parent.$parent.park.HygieneCertified:this.showBadge}},mounted:function(){var n=this;this.$nextTick(function(){n.canDisplay()})}});IdListPickerManager=function(){function t(){function n(n,i,r,u){var f=$(n);f.jstree();t(n,i,r,u)}function t(n,t,r,u){var f=$(t).parent().find("input.ktc-form-control.myclass");$(f).off().on("click",function(){i($(this),n,t,r,u)})}function i(n,t,i,r,u){var f=bootbox.dialog({title:"Select items below",message:$(r),onEscape:!0,backdrop:!0,show:!1,buttons:{cancel:{label:"Cancel",className:"ktc-btn ktc-btn-default"},confirm:{label:"Confirm",className:"ktc-btn ktc-btn-primary",callback:function(){n.val($(u).val())}}}}).on("shown.bs.modal",function(){$(r).show()}).on("hide.bs.modal",function(){$(r).hide().appendTo($(i))}).modal("show");$(document).on("click",".jstree-anchor",function(){$(u).val()==undefined||$(u).val().trim().length==0?$(u).val($(this).closest(".jstree-anchor").attr("data-val")):$(u).val().trim().length>0&&$(this).closest(".jstree-anchor").attr("data-val")!==undefined&&($(u).val().includes($(this).closest(".jstree-anchor").attr("data-val"))||$(u).val($(u).val()+","+$(this).closest(".jstree-anchor").attr("data-val")))})}return{LoadTreeNavigation:function(t,i,r,u){n(t,i,r,u)}}}var n;return{getInstance:function(){return n||(n=t()),n}}}();Vue.component("lazy-loading-image",{props:["src","alt","srcset","picture"],data:function(){return{loading:!0,observer:null,hasLoaded:!1}},template:"#LAZY_LOADING_IMAGE_TEMPLATE",watch:{src:function(){this.hasLoaded&&this.loadImage()}},methods:{isInViewport:function(){var n=this.$el.getBoundingClientRect();return n.top>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)},loadImage:function(){this.$refs.image.setAttribute("src",this.src);this.hasLoaded=!0},createObserver:function(){window.observer=new IntersectionObserver(this.handleIntersect,{root:null,threshold:"0"});window.observer.observe(this.$el)},handleIntersect:function(n,t){var i=this;n.forEach(function(n){n.isIntersecting&&(i.loadImage(),t.unobserve(i.$el))})}},computed:{},mounted:function(){var n=this;this.$refs.image.onload=function(){n.loading=!1};window.IntersectionObserver?this.createObserver():this.loadImage()}});Vue.component("lazy-loading-picture",{props:["src","alt"],data:function(){return{loading:!0,observer:null,isVisible:!1}},template:"#LAZY_LOADING_PICTURE_TEMPLATE",methods:{loadImage:function(){if(this.$refs.image.setAttribute("src",this.src),this.src.includes("quality=")){var n=this.src.indexOf("quality="),t=this.src.slice(0,n)+"format=webp&"+this.src.slice(n);this.$refs.imageWebP.setAttribute("srcset",t)}else this.$refs.imageWebP.setAttribute("srcset",this.src+"&format=webp");this.isVisible=!0},createObserver:function(){window.observer=new IntersectionObserver(this.handleIntersect,{root:null,threshold:"0"});window.observer.observe(this.$el)},handleIntersect:function(n,t){var i=this;n.forEach(function(n){n.isIntersecting&&(i.loadImage(),t.unobserve(i.$el))})}},computed:{},mounted:function(){var n=this;this.$refs.image.onload=function(){n.loading=!1};window.IntersectionObserver?this.createObserver():this.loadImage()},watch:{src:function(){this.isVisible&&this.loadImage()}}});LinkPickerManager=function(){function t(){function n(n,i,r,u){var f=$(n);f.jstree();t(n,i,r,u)}function t(n,t,r,u){var f=$(t).parent().find("input.ktc-form-control.myclass");$(f).off().on("click",function(){i($(this),n,t,r,u)})}function i(n,t,i,r,u){var f=bootbox.dialog({title:"Select link below",message:$(r),onEscape:!0,backdrop:!0,show:!1,buttons:{cancel:{label:"Cancel",className:"ktc-btn ktc-btn-default"},confirm:{label:"Confirm",className:"ktc-btn ktc-btn-primary",callback:function(){n.val($(u).val())}}}}).on("shown.bs.modal",function(){$(r).show()}).on("hide.bs.modal",function(){$(r).hide().appendTo($(i))}).modal("show");$(document).on("click",".jstree-anchor",function(){$(u).val(location.origin+$(this).closest(".jstree-anchor").attr("data-url"))})}return{LoadTreeNavigation:function(t,i,r,u){n(t,i,r,u)}}}var n;return{getInstance:function(){return n||(n=t()),n}}}();Vue.component("loading-spinner",{template:"#LOADING_SPINNER_TEMPLATE"});Vue.component("park-card",{props:["park"],template:"#PARK_CARD_TEMPLATE",data:function(){return{}},computed:{isMobile:function(){return!1},showImageCarousel:function(){return this.isMobile?!1:this.park.Images.length>1?!0:!1},images:function(){var n=[],t=this;return $.each(this.park.Images,function(i,r){n.push({Image:r,Url:t.park.ParkUrl})}),n},firstImage:function(){return this.images[0]},parkId:function(){return this.park.ParkID}},methods:{},mounted:function(){},beforeDestroy:function(){}});Vue.component("park-card-pricing",{template:"#PARK_CARD_PRICING_TEMPLATE",mixins:[MIXIN_MEMBERSHIP],props:["park-price"],data:function(){return{}},computed:{price:function(){return this.RoundPrice(this.parkPrice.Price)},discountPrice:function(){return this.RoundPrice(this.parkPrice.DiscountPrice)},accommodationTypeText:function(){return this.parkPrice.AccommodationTypeText!=null?this.parkPrice.AccommodationTypeText:""}},methods:{showMemberPrice:function(){return this.isLoggedIn&&!this.isHolidayPerksMember||this.isMemberOnlyDeal},memberPriceNotEqualToNonMember:function(){return!(this.discountPrice==this.price)},memberIsVIPerks:function(){return this.isLoggedIn&&this.isVipPerksMember}}});Vue.component("park-card-pricing-accommodation",{template:"#ParkCardPricingAccommodationTemplate",mixins:[MIXIN_MEMBERSHIP],props:["park-price","park"],data:function(){return{signalRPrice:null,cabinsMinStayNotMet:!1,sitesMinStayNotMet:!1,cabinsMinNightsStay:0,sitesMinNightStay:0}},computed:{cabin:function(){return this.signalRPrice!=null&&this.signalRPrice.length>0?this.cheapestSignalRAccommodationForType(1):this.cheapestAccommodationForType("Cabins")},site:function(){return this.signalRPrice!=null&&this.signalRPrice.length>0?this.cheapestSignalRAccommodationForType(2):this.cheapestAccommodationForType("Sites")},dateFilterApplied:function(){return window.DateFilterStore.state.dateFilterApplied},cabinsUnavailable:function(){return this.signalRPrice!=null&&this.signalRPrice.length>0?window.DateFilterStore.state.dateFilterApplied?!this.isAvailableForType(1):!1:!1},cheapestCachePrice:function(){var n=this,t=this.signalRPrice;if(n.cheapestAccommodationForType("Sites")!=undefined&&n.cheapestAccommodationForType("Cabins")!=undefined){if(n.cheapestAccommodationForType("Sites").Standard==undefined&&n.cheapestAccommodationForType("Cabins").Standard!=undefined)return this.cheapestAccommodationForType("Cabins");if(n.cheapestAccommodationForType("Sites").Standard!=undefined&&n.cheapestAccommodationForType("Cabins").Standard==undefined)return this.cheapestAccommodationForType("Sites");if(n.cheapestAccommodationForType("Sites").Standard!=undefined&&n.cheapestAccommodationForType("Cabins").Standard!=undefined)return parseInt(n.cheapestAccommodationForType("Sites").Standard.replace("$",""))<parseInt(n.cheapestAccommodationForType("Cabins").Standard.replace("$",""))?this.cheapestAccommodationForType("Sites"):this.cheapestAccommodationForType("Cabins")}else return{Standard:"$",Discount:"$"}},cheapest:function(){if(this.$parent.setPriceLoading(),this.signalRPrice!=null&&this.signalRPrice.length>1){var n="",i="",t=null;if(n=this.cheapestSignalRAccommodationForType(2),i=this.cheapestSignalRAccommodationForType(1),n!=null&&i!=null){var f=n.Standard,e=i.Standard,r=0,u=0;Common.isNullOrEmpty(f)||(r=parseInt(f.replace("$","")));Common.isNullOrEmpty(e)||(u=parseInt(e.replace("$","")));window.DateFilterStore.state.dateFilterApplied||(r<u?t=n:this.isAvailableForType(1)&&(t=i));r<u&&n&&this.isAvailableForType(2)?t=n:this.isAvailableForType(1)&&(t=i)}else t=n!=null&&this.isAvailableForType(2)?n:i!=null&&this.isAvailableForType(1)?i:{Standard:"null",Discount:"null"}}else window.DateFilterStore.state.dateFilterApplied?t={Standard:"null",Discount:"null"}:this.cheapestCachePrice!=null&&(t=this.cheapestCachePrice);return this.$parent.setPriceFinishedLoading(),t},sitesUnavailable:function(){return this.signalRPrice!=null&&this.signalRPrice.length>0?window.DateFilterStore.state.dateFilterApplied?!this.isAvailableForType(2):!1:!1},isUnavailable:function(){return this.signalRPrice!=null&&this.signalRPrice.length>0?this.sitesUnavailable&&this.cabinsUnavailable:!1},isCabinsMinStayNotMet:function(){return this.cabinsMinStayNotMet},isSitesMinStayNotMet:function(){return this.sitesMinStayNotMet}},methods:{updatePriceFromSignalR:function(n){this.signalRPrice=n;this.$forceUpdate()},isAvailableForType:function(n){for(var i,t=0;t<this.signalRPrice.length;t++)if(this.signalRPrice[t].Allotment!=null)for(i=0;i<this.signalRPrice[t].Allotment.length;i++)if(this.signalRPrice[t].Allotment[i].SiteTypeID==n){if(this.signalRPrice[t].Allotment[i].IsAvailable)return!0;this.signalRPrice[t].Allotment[i].IsStayLengthMet||(n===1?(this.cabinsMinStayNotMet=!0,(!this.cabinsMinNightsStay||this.cabinsMinNightsStay===0||this.cabinsMinNightsStay>this.signalRPrice[t].Allotment[i].MinStay)&&(this.cabinsMinNightsStay=this.signalRPrice[t].Allotment[i].MinStay)):(this.sitesMinStayNotMet=!0,(!this.sitesMinNightsStay||this.sitesMinNightsStay===0||this.sitesMinNightsStay>this.signalRPrice[t].Allotment[i].MinStay)&&(this.sitesMinNightsStay=this.signalRPrice[t].Allotment[i].MinStay)))}return!1},cheapestAccommodationForType:function(n){for(var t=-1,i=0;i<this.parkPrice.length;i++)if(this.parkPrice[i].Name.includes(n)){t=i;break}return t==-1?"-":{Standard:"$"+this.RoundPrice(this.parkPrice[t].Prices[0].Price).toString(),Discount:"$"+this.RoundPrice(this.parkPrice[t].Prices[1].Price).toString()}},cheapestSignalRAccommodationForType:function(n){var t,i,f;try{var e=1e5,u=-1,r=-1;for(t=0;t<this.signalRPrice.length;t++)for(i=0;i<this.signalRPrice[t].Allotment.length;i++)this.signalRPrice[t].Allotment[i].SiteTypeID==n&&this.signalRPrice[t].Allotment[i].IsAvailable&&this.signalRPrice[t].Allotment[i].Total<e&&(e=this.signalRPrice[t].Allotment[i].Total,u=t,r=i);if(r==-1)return"-";f={Standard:"$"+this.RoundPrice(this.signalRPrice[u].Allotment[r].Total).toString(),Discount:"$"+this.RoundPrice(this.signalRPrice[u].Allotment[r].TotalWithDiscount).toString()}}catch(o){f=null}return f}}});Vue.component("park-search-card",{mixins:[MIXIN_SEARCH_SAVED_SEARCHES],props:["park"],template:"#ParkSearchCardTemplate",data:function(){return{state:window.SearchStore.state,priceLoading:!1,pricingUnavailable:!1}},computed:{isMobile:function(){return!1},showImageCarousel:function(){return this.isMobile?!1:this.park.Images.length>1?!0:!1},images:function(){var n=[],t=this;return $.each(this.park.Images,function(i,r){n.push({Image:r,Url:t.park.ParkUrl})}),n},firstImage:function(){return this.images[0]},parkId:function(){return this.park.ParkID},unavailableReason:function(){var n=this;return n.$refs.pricing&&(n.$refs.pricing.cabinsMinStayNotMet||n.$refs.pricing.sitesMinStayNotMet)?n.$refs.pricing.cabinsMinNightsStay&&(!n.$refs.pricing.sitesMinNightsStay||n.$refs.pricing.cabinsMinNightsStay<=n.$refs.pricing.sitesMinNightsStay)?n.$refs.pricing.cabinsMinNightsStay+" night minimum stay required":n.$refs.pricing.sitesMinNightsStay&&(!n.$refs.pricing.cabinsMinNightsStay||n.$refs.pricing.sitesMinNightsStay<=n.$refs.pricing.cabinsMinNightsStay)?n.$refs.pricing.sitesMinNightsStay+" night minimum stay required":"Unavailable":"Unavailable"},props:function(){return{GoToUrl:this.GoToUrl}}},methods:{isUnAvailable:function(){return this.pricingUnavailable&&window.DateFilterStore.state.dateFilterApplied==!0?!0:!1},updatePrice:function(n){typeof this.$refs.pricing!="undefined"&&this.$refs.pricing.updatePriceFromSignalR(n.AllAccommodations);this.setPriceFinishedLoading()},clearPrice:function(){typeof this.$refs.pricing!="undefined"&&this.$refs.pricing.updatePriceFromSignalR(null);this.setPriceFinishedLoading()},setPriceLoading:function(){this.priceLoading=!0},setPriceFinishedLoading:function(){this.priceLoading=!1},GoToUrl:function(){this.UpdateCookie({url:this.park.Url,title:this.park.ParkName,icon:"big4"});window.location.href=this.park.Url}},mounted:function(){var n=this;!window.SearchEventBus||window.SearchEventBus.$emit(window.SearchEvents.SUBSCRIBE_TO_SIGNALR,this);!window.SearchResultsAndFiltersEventBus||window.SearchResultsAndFiltersEventBus.$emit(window.SearchResultsAndFiltersEvents.SUBSCRIBE_TO_SIGNALR,this);SEARCH_PARK_BIG4IDS.length<5&&SEARCH_PARK_BIG4IDS.push(this.parkId);this.$watch("$refs.pricing.isUnavailable",function(){n.pricingUnavailable=n.$refs.pricing.isUnavailable});window.SearchEventBus.$on("date-filter-clear",function(){n.setPriceLoading(!0);n.clearPrice()});window.SearchResultsAndFiltersEventBus.$on("date-filter-clear",function(){n.setPriceLoading(!0);n.clearPrice()})},beforeDestroy:function(){!window.SearchEventBus||window.SearchEventBus.$emit(window.SearchEvents.UNSUBSCRIBE_FROM_SIGNALR,this);!window.SearchResultsAndFiltersEventBus||window.SearchResultsAndFiltersEventBus.$emit(window.SearchResultsAndFiltersEvents.UNSUBSCRIBE_FROM_SIGNALR,this)}});Vue.component("park-type-badge",{props:["park-type"],template:"#PARK_TYPE_BADGE_TEMPLATE",data:function(){return{}},computed:{Enums:function(){return window.Enums}},methods:{}});Vue.component("price-guarantee",{props:{withBorder:{"default":!0},withLink:{"default":!0},optedIn:{"default":!1},covidParkCanBook:{"default":!1},showOptInCovidBanner:{"default":!1},widgetVersion:{"default":!1},parkBookingTermsUrl:{"default":""}},template:"#PRICE_GUARANTEE_TEMPLATE",computed:{selectionMade:function(){var t=!1,n;if(window.CartStore.state.cartItems.length>0)for(n=0;n<window.CartStore.state.cartItems.length;n++)window.CartStore.state.cartItems[n].CartItemTypeID==window.CartItemType.ACCOMMODATION&&(t=!0);return t},WithLink:function(){return $(".c-header--checkout").length>0&&(this.withLink=!1),this.withLink},WithBorder:function(){return this.withBorder},OptedIn:function(){return this.optedIn},CovidParkCanBook:function(){return this.covidParkCanBook},ShowOptInCovidBanner:function(){return this.showOptInCovidBanner},ParkTerms:function(){return this.parkBookingTermsUrl},validForCheckout:function(){var t=!1,n;if(window.CartStore!=undefined&&window.location.href.includes("/checkout"))for(n=0;n<window.CartStore.state.cartItems.length;n++)window.CartStore.state.cartItems[n].CartItemTypeID==1&&window.CartStore.state.cartItems[n].CancellationPolicyOption==!0?t=!0:window.CartStore.state.cartItems[n].CartItemTypeID==1&&window.CartStore.state.cartItems[n].CancellationPolicyOption==!1&&(t=!1);else return t;return t},checkoutTermsUrls:function(){var t=[],n;if(this.validForCheckout)for(n=0;n<window.CartStore.state.cartItems.length;n++)window.CartStore.state.cartItems[n].CartItemTypeID==1?n==window.CartStore.state.cartItems.length-1?t.push({ParkName:window.CartStore.state.cartItems[n].ParkName,Url:window.CartStore.state.cartItems[n].ParkTermsAndConditionsURL,Breaker:""}):t.push({ParkName:window.CartStore.state.cartItems[n].ParkName,Url:window.CartStore.state.cartItems[n].ParkTermsAndConditionsURL,Breaker:", and"}):valid=!1;return t}},methods:{},mounted:function(){}});Vue.component("show-on-scroll",{props:["props"],template:"#SHOW_ON_SCROLL_TEMPLATE",data:function(){return{showOnScroll:!1,observer:null}},methods:{createObserver:function(){this.observer=new IntersectionObserver(this.handleIntersect,{root:null,threshold:"0"});this.observer.observe(this.$el)},handleIntersect:function(n){var t=this;n.forEach(function(n){n.isIntersecting&&(t.showOnScroll=!0,t.observer.unobserve(t.$el))})}},mounted:function(){var n=this;window.IntersectionObserver?this.createObserver():this.showOnScroll=!0}});Vue.component("star-rating",{props:["rating"],template:"#STAR_RATING_TEMPLATE",data:function(){return{}},methods:{}});Vue.component("state-level-message",{props:{optedIn:{"default":!1},covidParkCanBook:{"default":!1},showOptInCovidBanner:{"default":!1},brandPromise:{"default":!1},parkBookingTermsUrl:{"default":""}},template:"#STATE_LEVEL_MESSAGE_TEMPLATE",computed:{OptedIn:function(){return this.optedIn},ParkTerms:function(){return this.parkBookingTermsUrl},CovidParkCanBook:function(){return this.covidParkCanBook},ShowOptInCovidBanner:function(){return this.showOptInCovidBanner},BrandPromise:function(){return this.brandPromise},State:function(){return window.location.href.split("/")[4].toUpperCase()},ParkAlias:function(){return window.location.href.split("/")[6]}},methods:{},mounted:function(){}});Vue.component("virtual-tour-button",{props:[],template:"#VirtualTourTemplate",data:function(){return{}},methods:{},created:function(){}});Vue.component("vr-view",{props:["virtual-tour-url","document-id"],data:function(){return{}},methods:{loadVirtualTour:function(n){var t=new VRView.Player("#vrview",{width:"100%",height:500,image:n,is_stereo:!0})}},created:function(){var i=this.virtualTourUrl,n={documentId:DOCUMENT_ID},t=this;$.ajax({type:"GET",url:"/api/VirtualTour/GetVirtualTourMediaUrl/"+n.documentId,contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){t.loadVirtualTour(n)},error:function(){}})}});Vue.component("quantity-warning",{template:"#QUANTITY_WARNING_TEMPLATE",props:{isAccomCard:!1,isBookingWidget:!1,isQuickBooking:!1,isCart:!1,accommodationId:null},data:function(){return{allotmentAmount:0}},computed:{sellingFast:function(){return this.allotmentAmount<=4&&this.allotmentAmount>1},lastOne:function(){return this.allotmentAmount==1},accommodationCard:function(){return this.isAccomCard},bookingWidget:function(){return this.isBookingWidget},cart:function(){return this.isCart},display:function(){return this.sellingFast||this.lastOne},quantity:function(){return this.allotmentAmount}},mounted:function(){var n=this,t;if(this.isQuickBooking)window.AccommodationEventBus.$on("quantity-update",function(t){t.accommodationID==n.$props.accommodationId&&(n.allotmentAmount=t.quantity)});else if(this.isAccomCard)window.AccommodationEventBus.$on("quantity-update",function(t){t.accommodationID==n.$props.accommodationId&&(n.allotmentAmount=t.quantity)}),window.AccommodationEventBus.$on("quantity-clear",function(){n.allotmentAmount=0});else if(this.isCart)for(t=0;t<window.CartStore.state.cartItems.length;t++)window.CartStore.state.cartItems[t].TransactionLineItem.Booking.AccommodationID==n.accommodationId&&(n.allotmentAmount=window.CartStore.state.cartItems[t].TransactionLineItem.Booking.maxNumberOfRooms);else window.BookingEventBus.$on("quantity-update",function(t){n.allotmentAmount=t.quantity}),this.$mq=="sm"&&window.BookingStore.InitialQuantityCheck()}});Vue.component("something-for-everyone-widget",{props:["categories","articles","title"],template:"#SOMETHING_FOR_EVERYONE_WIDGET_TEMPLATE",data:function(){return{currentCategory:null}},methods:{navigate:function(n){this.currentCategory=n.Value},isActive:function(n){return this.currentCategory===n},articlesForCategory:function(n){return _.filter(this.articles,function(t){return t.CategoryGuid===n})}},mounted:function(){this.categories.length>0&&(this.currentCategory=this.categories[0].Value)}});Vue.component("quick-booking-data-wrapper",{props:["props"],data:function(){return{state:window.BookingStore.state}},computed:{},methods:{populateSearchWithPark:function(){var t=this,n;this.state.quickBooking.ParkSelectionName!=""&&(n=document.getElementById("quickSearch"),setTimeout(function(){n.value=t.$data.state.quickBooking.ParkSelectionName},650))}},created:function(){},mounted:function(){this.populateSearchWithPark()}});Vue.component("quick-booking-widget",{template:"#QUICK_BOOKING_WIDGET_TEMPLATE",props:{parkWidget:!1},computed:{isPark:function(){return this.parkWidget},props:function(){return{isPark:this.isPark}}},data:function(){return{store:window.BookingStore,windowWidth:0}},methods:{prefillPark:function(){}},created:function(){this.store.PopulateEquipmentTypes();this.store.prefillSelections();this.store.state.quickBooking.isPark=this.isPark?!0:!1},mounted:function(){if(CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES")!=""&&CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES")!=""){var n=JSON.parse(CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES"));n.Dates!=null&&n.Dates.start!=""&&n.Dates.end!=""&&(this.store.startDate=n.Dates.start,this.store.endDate=n.Dates.end)}}});Vue.component("quick-booking-search",{template:"#QUICK_BOOKING_SEARCH_TEMPLATE",props:["scrolled","home-banner"],computed:{state:function(){return window.BookingStore.state}},mounted:function(){}});Vue.use(AsyncComputed);Vue.component("quick-booking-search-data-wrapper",{mixins:[MIXIN_SEARCH_SAVED_SEARCHES],props:{account:{type:Object,"default":function(){return{}}},defaultResults:{type:Array,"default":function(){return[]}},store:window.BookingStore},data:function(){return{searchString:"",error:"",request:[],recentlyViewed:[]}},computed:{isPark:function(){return this.props.store.state.quickBooking.isPark},hasRecentlyViewed:function(){return!1},props:function(){return{RecentlyViewed:this.recentlyViewed,HasRecentlyViewed:this.hasRecentlyViewed,SelectPark:this.SelectPark,IsScrolled:this.scrolled,IsHomeBanner:this.homeBanner,CloseKeyBoard:this.closeKeyBoard,SelectPark:this.SelectPark,store:window.BookingStore}}},asyncComputed:{data:{get:function(){var n=[],t=moment().format(),i=moment().add(1,"day").format();return this.searchString.length>0?axios.get("/api/Search/ParkSearchUri",{params:{SearchTerm:this.searchString,StartDate:t,EndDate:i,PetFriendly:"",States:"",Latitude:"",Longitude:"",MaxDistanceRange:"",PageNumber:"",ResultsPerPage:""}}).then(function(t){var r,u,i;for(t=JSON.parse(t.data),r=t.Parks,u=r.length,u>5&&(u=5),i=0;i<u;i++)n.push({icon:"big4",url:r[i].Url,title:r[i].ParkName,location:r[i].Location,state:r[i].State,ParkTypeID:r[i].ParkTypeID,ParkID:r[i].ParkID});return n}).catch(function(){return Common.ShowError("Unexpected error trying to perform search."),this.defaultResults}):this.hasRecentlyViewed?this.recentlyViewed:this.defaultResults}}},methods:{submitSearch:function(n){this.searchString=n},SelectPark:function(n){var i=this,t;$.ajax({type:"GET",url:"/api/Park/GetAccommodations",contentType:"application/json; charset=utf-8",data:{parkID:n.ParkID,parkUrl:n.url},dataType:"json",success:function(t){window.AccommodationStore.state.accommodations=t;window.AccommodationEventBus.$emit("accommodations-loaded");window.AccommodationStore.state.ParkId=n.ParkID;window.BookingStore.state.accommodation=t},error:function(){}});try{t=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");t=t==""?{}:JSON.parse(t);t.QuickBookingParkID=[n.ParkID];t.QuickBookingParkName=[n.title];t.QuickBookingParkURL=[n.url];CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(t))}catch(r){}this.props.store.state.quickBooking.ParkSelectionID=n.ParkID;this.props.store.state.quickBooking.ParkSelectionName=n.title;this.updateSearchText();window.AccommodationEventBus.$emit("new-quick-park-selected")},PrefillPark:function(n){var t=this;$.ajax({type:"GET",url:"/api/Park/GetAccommodationsFromDocumentID",contentType:"application/json; charset=utf-8",data:{parkDocumentID:n},dataType:"json",success:function(n){window.AccommodationStore.state.accommodations=n.Accommodation;window.AccommodationEventBus.$emit("accommodations-loaded");window.AccommodationStore.state.ParkId=n.ParkID;window.BookingStore.state.accommodation=n.Accommodation;t.props.store.state.quickBooking.ParkSelectionID=n.ParkID;t.props.store.state.quickBooking.ParkSelectionName=n.ParkTitle;try{var i=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");i=i==""?{}:JSON.parse(i);i.QuickBookingParkID=[n.ParkID];i.QuickBookingParkName=[n.ParkTitle];i.QuickBookingParkURL=[n.ParkUrl];CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(i))}catch(r){}},error:function(){}})},closeKeyBoard:function(){this.$nextTick(function(){document.activeElement==document.getElementById("quickSearch")&&document.activeElement.blur();this.updateSearchText()})},updateSearchText:function(){var n=this;setTimeout(function(){var t=document.getElementById("quickSearch");t.value=n.props.store.state.quickBooking.ParkSelectionName},650)}},mounted:function(){var t=this,n;t.isPark&&t.PrefillPark(PARK_DOCUMENT_ID);n=CookieHelper.GetCookieValue(".BIG4_SAVED_SEARCHES");n!=""&&(n=JSON.parse(n),!n.Searches||(this.recentlyViewed=n.Searches.reverse()));n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),t.isPark||!n.QuickBookingParkID||!n.QuickBookingParkName||!n.QuickBookingParkURL||this.SelectPark({ParkID:n.QuickBookingParkID[0],title:n.QuickBookingParkName[0],url:n.QuickBookingParkURL[0]}),!n.Accommodation||(n.Accommodation=="Cabins"?this.$nextTick(function(){$("#Cabins").click()}):n.Accommodation=="Sites"&&this.$nextTick(function(){$("#Sites").click()})));$("#Sites").on("click",function(){try{var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n.Accommodation="Sites";CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(t){}});$("#Cabins").on("click",function(){try{var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n.Accommodation="Cabins";CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(t){}});$("#quickSearch").on("blur",function(){t.updateSearchText()})}});Vue.component("quick-booking-accommodation-card",{props:["item","accommodation-type","pms-data","details-button"],template:"#QuickBookingAccommodationCard",mixins:[MIXIN_MEMBERSHIP,Common],data:function(){return{state:window.AccommodationStore.state,bookingState:window.BookingStore.state,priceTotal:"0",discountedTotal:"0",CurrentPMSResult:[],PMSAvailable:!0,unavailableReasons:[],currentOfferCode:0}},methods:{SelectCard:function(n){var i,t;for(window.BookingStore.state.quickBooking.PriceLoading=!0,i=document.getElementsByClassName("c-card--quick-booking"),t=0;t<i.length;t++)i[t].className=i[t].className.replace("is-selected",""),i[t].parentElement.children[1].className.includes("d-none")||(i[t].parentElement.children[1].className+=" d-none");this.$refs.AccommodationID.innerText==n&&(this.$refs.AccomCard.className+=" is-selected",this.$refs.DetailsButton.className=this.$el.children[1].className.replace("d-none",""),this.$refs.DetailsLink.href=this.item.Url,window.BookingStore.state.quickBooking.AccommodationSelectionID=n,window.BookingStore.state.accommodationId=n);window.BookingStore.UpdatePrice()},ProcessPMSResults:function(n){for(var r,u,f=this,i=null,t=0;t<n.AllAccommodations.length;t++)n.AllAccommodations[t].AccommodationID==this.item.AccommodationID&&(i=n.AllAccommodations[t].Allotment);if(f.CurrentPMSResult=[],i!=null&&i.length>0){for(r=0,u=1e5,t=0;t<i.length;t++)f.CurrentPMSResult.push(i[t]),i[t].IsAvailable&&i[t].Total<u&&(r=t,u=i[t].Total);this.currentOfferCode=i[r].Offercode;this.updatePrice()}else this.state.accommodationLoading=!1},updatePrice:function(){for(var t=this.CurrentPMSResult,i=0,n=0;n<t.length;n++)t[n].Offercode==this.currentOfferCode&&(i=n,this.priceTotal=this.RoundPrice(t[n].Total),this.discountedTotal=this.RoundPrice(t[n].Total-t[n].MemberDiscount),this.PMSAvailable=t[n].IsAvailable),this.priceTotal!=0&&(this.state.accommodationLoading=!1),this.discountedTotal!=0&&(this.state.accommodationLoading=!1);this.QuantityCheck(t,i)},showMemberPrice:function(){return this.isLoggedIn&&!this.isHolidayPerksMember||this.isMemberOnlyDeal},memberPriceNotEqualToNonMember:function(){return!(this.DiscountedPrice==this.OriginalPrice)},memberIsVIPerks:function(){return this.isLoggedIn&&this.isVipPerksMember},QuantityCheck:function(n,t){var r=0,t=0,i;if(n!=undefined){for(i=0;i<n[t].DailyAvailability.length-1;i++)i==0?r=n[t].DailyAvailability[i].RoomsAvailable:r>n[t].DailyAvailability[i].RoomsAvailable&&(r=n[t].DailyAvailability[i].RoomsAvailable);window.AccommodationEventBus.$emit("quantity-update",{quantity:r,accommodationID:this.item.AccommodationID})}}},computed:{DefaultDates:function(){return!this.CurrentPMSResult.length>0},OriginalPrice:function(){var i,n,t;if(this.DefaultDates){i=this;try{if(this.item.AvailabilityCacheData)return n=this.priceTotal,n=this.item.AvailabilityCacheData.DailyResults[0].Price,t=n%1,t==0?n:Math.round(n)}catch(r){return this.item.Price}}else return this.priceTotal},accommodationLoading:function(){var n=this;return n.state.accommodationLoading||n.state.callingPms},DiscountedPrice:function(){var i,n,t;if(this.DefaultDates){i=this;try{if(n=this.discountedTotal,this.item.AvailabilityCacheData)return n=this.item.AvailabilityCacheData.DailyResults[0].DiscountPrice,t=n%1,t==0?n:Math.round(n)}catch(r){return this.item.DiscountPrice}}return this.discountedTotal},ItemNotAvailable:function(){var n=this,i=!1,f=!1,u=!0,o=!1,s=!0,t=n.PMSAvailable,r,h,c,e;if(this.unavailableReasons.splice(0),this.CurrentPMSResult.length>0)for(r=0;r<this.CurrentPMSResult.length;r++)if(this.CurrentPMSResult[r].IsAvailable==!1&&this.CurrentPMSResult[r].Offercode==this.currentOfferCode)return this.unavailableReasons.push({priority:1,message:this.CurrentPMSResult[0].UnavailableMessage}),this.$el.parentElement.style.order=2,this.$nextTick(function(){window.BookingStore.state.quickBooking.AllUnavailable=$(".c-card__badge--quick-booking").length==$(".quick-booking-card-col").length&&$(".quick-booking-card-col").length!=0}),!0;return h=n.bookingState.adults+n.bookingState.children+n.bookingState.infants,n.state.PetFriendly&&(n.item.PetAllow?o=!0:this.unavailableReasons.push({priority:3,message:"No pets please"})),c=this.OriginalPrice/window.AccommodationStore.state.numberOfNights>=n.state.MinPriceRange&&this.OriginalPrice/window.AccommodationStore.state.numberOfNights<=n.state.MaxPriceRange,window.AccommodationStore.IsPriceFilterApplied()?typeof this.OriginalPrice=="undefined"||this.OriginalPrice===0?i=!0:c?i=!0:this.unavailableReasons.push({priority:4,message:"Not within selected price range"}):i=!0,n.item.Guest>=h?f=!0:t&&this.unavailableReasons.push({priority:2,message:"Exceeds max occupancy ("+n.item.Guest+" guests)"}),n.item.DateAvailable!=undefined&&window.DateFilterStore.state.dateFilterApplied==!0?u=n.item.DateAvailable:window.DateFilterStore.state.dateFilterApplied?u=t:t=!0,t||(e=_.find(this.CurrentPMSResult,{Offercode:this.currentOfferCode}),e!==null&&this.unavailableReasons.push({priority:1,message:e.UnavailableMessage})),n.item.AvailableInFilter=n.state.PetFriendly?i&&o&&f&&u&&s&&t?!0:!1:i&&f&&u&&s&&t?!0:!1,this.unavailableReasons=_.sortBy(this.unavailableReasons,["priority"]),this.$nextTick(function(){window.BookingStore.state.quickBooking.AllUnavailable=$(".c-card__badge--quick-booking").length==$(".quick-booking-card-col").length&&$(".quick-booking-card-col").length!=0}),!n.item.AvailableInFilter}},mounted:function(){var n=this;window.AccommodationEventBus.$on("all-park-pms-availability-update",function(t){n.ProcessPMSResults(t)});window.AccommodationEventBus.$on("date-filter-clear",function(){n.CurrentPMSResult=[];n.priceTotal=0;n.discountedTotal=0})}});Vue.component("quick-booking-selection",{template:"#QUICK_BOOKING_SELECTION_TEMPLATE",data:function(){return{store:window.BookingStore,accommodationList:window.AccommodationStore.state.accommodations}},computed:{props:function(){var n=this;return{SelectionValid:this.selectionValid,AccommodationSelected:this.accommodationSelected,AccommodationType:this.accommodationType,AccommodationList:this.accommodationList,AllUnavailable:this.allUnavailable,IsBooking:this.isBooking,ParkName:this.parkName,MaxRoomsExceeded:this.maxRoomsExceeded}},isBooking:function(){return this.store.state.addingToCart},accommodationType:function(){this.$data.store.state.quickBooking.AccommodationType},isPark:function(){return this.store.state.quickBooking.isPark},accommodationSelected:function(){return this.$data.store.state.quickBooking.AccommodationSelectionID!=""},selectionValid:function(){var t=this,n=window.BookingStore.state;if(n.quickBooking.AccommodationType=="Site"){$(".c-select__input").on("click",function(){t.hideEquipmentValidation()});$("#width").on("click",function(){t.hideWidthValidation()});$("#length").on("click",function(){t.hideLengthValidation()});return n.quickBooking.AccommodationType!=""&&n.quickBooking.ParkSelectionName!=""&&n.startDate!=null&&n.endDate!=null&&n.equipment.EquipmentTypeID!=null&&n.equipment.Width!=null&&n.equipment.Length!=null}return n.quickBooking.AccommodationType!=""&&n.quickBooking.ParkSelectionName!=""&&n.startDate!=null&&n.endDate!=null},allUnavailable:function(){return this.$data.store.state.quickBooking.AllUnavailable},maxRoomsExceeded:function(){return this.store.state.showMaxAccommodationError}},methods:{datesFailedValidation:function(){return $("#check_in_date_parsed").val()==""?!0:!1},equipmentFailedValidation:function(){return $("#equipment").val()==null?!0:!1},widthFailedValidation:function(){return $("#width").val()==undefined?!0:!1},lengthFailedValidation:function(){return $("#length").val()==undefined?!0:!1},showValidation:function(){if(this.store.state.noTariffsAvailable){$(".no-tariffs-available").addClass("has-error");$("html, body").animate({scrollTop:$(".has-error").offset().top-200},1e3);return}var n=document.getElementById("quickSearch");n!=null&&(n.value==""||n.value!=this.store.state.quickBooking.ParkSelectionName)&&(n.className+=" has-error",$(".c-booking-location-error").css("opacity","100"));this.store.state.quickBooking.AccommodationType==""&&($(".c-booking-type-error").css("opacity","100"),$(".c-radio-accommodation__placeholder").addClass("has-error"));this.datesFailedValidation()&&($(".c-input-date").addClass("has-error"),$(".c-booking-date-error").css("opacity","100"));this.equipmentFailedValidation()&&($(".c-select ").addClass("has-error"),$(".c-booking-equipment-error").css("opacity","100"));this.lengthFailedValidation()&&($("#length").closest(".c-field").addClass("has-error"),$(".c-booking-equipment-size-error").css("opacity","100"));this.widthFailedValidation()&&($("#width").closest(".c-field").addClass("has-error"),$(".c-booking-equipment-size-error").css("opacity","100"))},hideDateValidation:function(){$(".c-input-date").removeClass("has-error");$(".c-booking-date-error").css("opacity",0)},hideEquipmentValidation:function(){$(".c-select ").removeClass("has-error");$(".c-booking-equipment-error").css("opacity",0)},hideWidthValidation:function(){$("#width").closest(".c-field").removeClass("has-error");$("#width").removeClass("has-error");$(".c-booking-equipment-size-error").css("opacity",0)},hideLengthValidation:function(){$("#length").closest(".c-field").removeClass("has-error");$("#length").removeClass("has-error");$(".c-booking-equipment-size-error").css("opacity",0)},hideSearchBarValidation:function(){$(".c-booking-location-error").css("opacity","0");var n=document.getElementById("quickSearch").className=document.getElementById("quickSearch").className.replace("has-error","")},hideTypeValidation:function(){$(".c-booking-type-error").css("opacity","0");$(".c-radio-accommodation__placeholder").removeClass("has-error")}},created:function(){},mounted:function(){var n=this;$(".c-input-date").on("click",function(){n.hideDateValidation()});$("#quickSearch").on("click",function(){n.hideSearchBarValidation()});$("#Cabins").on("click",function(){n.hideTypeValidation()});$("#Sites").on("click",function(){n.hideTypeValidation()});window.AccommodationEventBus.$on("accommodations-loaded",function(){n.accommodationList=window.AccommodationStore.state.accommodations})}});Vue.component("quick-booking-selection-data-wrapper",{props:["accommodation-list"],data:function(){return{state:window.BookingStore.state}},computed:{accommodationType:function(){return this.state.quickBooking.AccommodationType},parkName:function(){return this.state.quickBooking.ParkSelectionName},isLoading:function(){return this.state.quickBooking.PriceLoading||this.state.addingToCart}},mounted:function(){var n=this;this.$nextTick(function(){window.AccommodationEventBus.$emit("quick-booking-date-changed",{start:this.state.startDate,end:this.state.endDate})});$("#quickBookSelectionBackButton").on("click",function(){n.state.quickBooking.AccommodationSelectionID="";n.state.quickBooking.CurrentAllotmentSelection={};n.state.accommodationId=null});$("#quickBookingSelectionCloseButton").on("click",function(){n.state.quickBooking.AccommodationSelectionID="";n.state.quickBooking.CurrentAllotmentSelection={};n.state.accommodationId=null;setTimeout(function(){$("#quickBookingCloseButton").click()},200)});$(".c-selection-modal__overlay").on("click",function(){n.state.quickBooking.AccommodationSelectionID="";n.state.quickBooking.CurrentAllotmentSelection={};n.state.accommodationId=null;setTimeout(function(){$("#quickBookingCloseButton").click()},200)})}});Vue.component("quick-booking-widget-price-display",{template:"#QuickBookingWidgetPriceDisplayTemplate",mixins:[MIXIN_BOOKING_WIDGET,MIXIN_MEMBERSHIP],props:["availability-cache-data","is-quick-booking"],data:function(){return{store:window.BookingStore}},computed:{allotment:function(){return window.BookingStore.state.quickBooking.CurrentAllotmentSelection},price:function(){if(this.isTotalPrice||this.isQuickBooking){if(this.allotment!=undefined)return isNaN(this.RoundPrice(this.allotment.Total))?"":(this.$nextTick(function(){window.BookingStore.state.canAddToCart=!0;window.BookingStore.state.quickBooking.PriceLoading=!1}),this.RoundPrice(this.allotment.Total))}else return this.RoundPrice(this.store.GetCurrentAccommodation().AvailabilityCacheData.DefaultRate.Price)},priceIsLoading:function(){return window.BookingStore.state.quickBooking.PriceLoading},dynamicSummaryString:function(){var n;if(this.store.state.startDate&&this.store.state.endDate){var u=moment(this.store.state.startDate._d),f=moment(this.store.state.endDate._d),t=this.store.state.children>0?", "+this.store.state.children+" children":"";this.store.state.children==1&&(t=t.replace("children","child"));n=this.store.state.infants>0?", "+this.store.state.infants+" infants":"";this.store.state.infants==1&&(n=n.replace("infants","infant"));var e=this.store.state.adults==1?this.store.state.adults+" adult":this.store.state.adults+" adults",r=f.diff(u,"days"),i=r+" nights - ";return r==1&&(i=i.replace("nights","night")),i+e+t+n}return""},discountPrice:function(){if(this.isTotalPrice||this.isQuickBooking){if(this.allotment!=undefined)return isNaN(this.RoundPrice(this.allotment.Total))?"":(this.$nextTick(function(){window.BookingStore.state.canAddToCart=!0;window.BookingStore.state.quickBooking.PriceLoading=!1}),this.RoundPrice(this.allotment.Total-this.allotment.MemberDiscount))}else return this.RoundPrice(this.store.GetCurrentAccommodation().AvailabilityCacheData.DefaultRate.DiscountPrice)},discountAmount:function(){return this.RoundDiscountPrice(this.allotment.Discount)},isDeal:function(){return this.isTotalPrice&&this.allotment.IsSpecialRate},isTotalPrice:function(){return!!this.allotment},isMemberOnlyDeal:function(){return this.isDeal},showMemberPrice:function(){return this.isLoggedIn&&!this.isHolidayPerksMember||this.isMemberOnlyDeal},memberPriceEqualToNonMember:function(){return this.discountPrice==this.price},state:function(){return this.store.state},membershipLevelClass:function(){return this.isDeal?this.allotment.MemberOnly?this.isVipPerksMember?"c-pricing__membership--vip":"c-pricing__membership--plus":"c-pricing__membership--holiday":this.isVipPerksMember?"c-pricing__membership--vip":"c-pricing__membership--plus"},membershipLevelLogo:function(){return this.isDeal?this.allotment.MemberOnly?this.isVipPerksMember?this.logos.vipPerks:this.logos.perksPlus:this.logos.holidayPerks:this.isVipPerksMember?this.logos.vipPerks:this.logos.perksPlus},mounted:function(){}}});Vue.component("accommodation-filter",{props:["store-name","apply-filter-function-name","items"],data:function(){return{}},methods:{toggle:function(){this.$parent.toggle()},close:function(){this.$parent.close()},applyFilter:function(){window[this.storeName][this.applyFilterFunctionName]();this.toggle();var n=this;this.$nextTick(function(){n.$forceUpdate()})},active:function(){var t=this.store.categories.values,n;if(Object.entries(t).length>0){for(n=0;n<Object.entries(t).length;n++)if(Object.entries(t)[n][1]==!0)return!0}else return!1},clear:function(){this.store.categories.values={};this.store.categories.tempValues={};this.toggle();window[this.storeName][this.applyFilterFunctionName]();this.$nextTick(function(){self.$forceUpdate()})}},computed:{store:function(){return window[this.storeName].state},visible:function(){return this.$parent.visible}}});window.AccommodationFilterStore={state:[],"default":["Cabins"],subscribeFilter:function(n){var i=this.default,t;try{t=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");t!=""&&(t=JSON.parse(t),!t[n]||(i=t[n]))}catch(r){}return this.state.push({id:this.state.length,data:i}),this.state.length-1},applyFilter:function(n,t,i){if(this.state[n].data!=t){try{var r=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");r=r==""?{}:JSON.parse(r);r[i]=t;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(r))}catch(u){}this.state[n].data=t}},setDefault:function(n){this.state[n].data=this.default}};Vue.component("accommodation-toggle-filter-component",{props:["event-bus","update-event","items","cookie-value"],data:function(){return{store:window.AccommodationFilterStore,id:null,isOpen:!1,scrollPos:0}},methods:{toggle:function(){var t,n;if(this.isOpen=!this.isOpen,this.$parent.toggle(),this.isOpen){for(this.$mq=="sm"&&(this.$data.scrollPos=window.scrollY,this.$nextTick(function(){document.getElementsByTagName("body")[0].style.position="fixed"})),n=0;n<this.$refs.toggle.length;n++)this.$refs.toggle[n].checked=!1;for(t=0;t<this.state.data.length;t++)for(n=0;n<this.$refs.toggle.length;n++)this.state.data[t]==this.$refs.toggle[n].value&&(this.$refs.toggle[n].checked=!0)}window[this.eventBus].$emit("filter-toggle-event",this.$el)},close:function(){this.applyFilter();this.$refs.toggle.checked=this.state.data.isOn;this.$parent.close();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")))},applyFilter:function(){for(var t=[],n=0;n<this.$refs.toggle.length;n++)this.$refs.toggle[n].checked&&t.push(this.$refs.toggle[n].value);this.store.applyFilter(this.id,t,this.cookieValue);this.toggle();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")));window[this.eventBus].$emit(this.updateEvent,t)},applyOnFilterChange:function(){for(var t=[],n=0;n<this.$refs.toggle.length;n++)this.$refs.toggle[n].checked&&t.push(this.$refs.toggle[n].value);this.store.applyFilter(this.id,t,this.cookieValue);window[this.eventBus].$emit(this.updateEvent,t)},clear:function(){var t,i,n;for(this.store.setDefault(this.id),t=0;t<this.$refs.toggle.length;t++)this.$refs.toggle[t].checked&&(this.$refs.toggle[t].checked=!1);i=this.state.data;try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n[this.cookieValue]=i;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(r){}window[this.eventBus].$emit(this.updateEvent,i)},updateValues:function(){for(var t=[],n=0;n<this.$refs.toggle.length;n++)this.$refs.toggle[n].checked&&t.push(this.$refs.toggle[n].value);this.state.data=t}},computed:{state:function(){return this.id!=null?this.store.state[this.id]:{}},dynamicButtonAccommodationFilterString:function(){var n="";return this.state&&this.state.data&&(this.state.data=="Sites"?this.state.data=["Sites"]:this.state.data=="Cabins"&&(this.state.data=["Cabins"]),this.state.data.length>0&&(n=this.state.data.length>1?this.state.data[0]+" + "+(this.state.data.length-1)+" more":this.state.data[0],this.state.data.length==2&&(n=this.state.data[0]+" + "+this.state.data[1]))),n},visible:function(){return this.$parent.visible},isActive:function(){return this.state&&this.state.data?this.isOpen?!0:this.state.data.length>0:!1}},mounted:function(){var n=this;this.id=window.AccommodationFilterStore.subscribeFilter(this.cookieValue);this.$nextTick(function(){this.state.data!=this.store.default&&window[this.eventBus].$emit(this.updateEvent,this.state.data)});window[this.eventBus].$on("filter-toggle-event",function(t){t!=n.$el&&n.isOpen&&(n.applyOnFilterChange(),n.state.data=n.state.data,n.isOpen=!1)})}});Vue.component("accommodation-toggle",{props:["store-name","apply-filter-function-name","items"],data:function(){return{}},methods:{applyFilter:function(){window[this.storeName][this.applyFilterFunctionName]();var n=this;this.$nextTick(function(){n.$forceUpdate()})},active:function(){var t=this.store.categories.values,n;if(Object.entries(t).length>0){for(n=0;n<Object.entries(t).length;n++)if(Object.entries(t)[n][1]==!0)return!0}else return!1},clear:function(){this.store.categories.values={};this.store.categories.tempValues={};window[this.storeName][this.applyFilterFunctionName]();this.$nextTick(function(){self.$forceUpdate()})}},computed:{store:function(){return window[this.storeName].state},visible:function(){return this.$parent.visible}}});Vue.component("accommodation-toggle-component",{props:["event-bus","update-event","items","cookie-value"],data:function(){return{store:window.AccommodationFilterStore,id:null,scrollPos:0}},methods:{applyFilter:function(n){this.store.applyFilter(0,n,"Accommodation");this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")));window[this.eventBus].$emit(this.updateEvent,n)}},computed:{state:function(){return this.id!=null?this.store.state[this.id]:{}},visible:function(){return this.$parent.visible},isActiveCabins:function(){return this.store.state&&this.store.state[0].data?this.store.state[0].data.length>0&&this.store.state[0].data[0]=="Cabins":!1},isActiveSites:function(){return this.store.state&&this.store.state[0].data?this.store.state[0].data.length>0&&this.store.state[0].data[0]=="Sites":!1}},mounted:function(){}});Vue.component("checkbox-filter",{props:["store-name","apply-filter-function-name","items"],data:function(){return{}},methods:{toggle:function(){this.$parent.toggle()},close:function(){this.$parent.close()},applyFilter:function(){window[this.storeName][this.applyFilterFunctionName]();this.toggle();var n=this;this.$nextTick(function(){n.$forceUpdate()})},active:function(){var t=this.store.categories.values,n;if(Object.entries(t).length>0){for(n=0;n<Object.entries(t).length;n++)if(Object.entries(t)[n][1]==!0)return!0}else return!1},clear:function(){this.store.categories.values={};this.store.categories.tempValues={};this.toggle();window[this.storeName][this.applyFilterFunctionName]();this.$nextTick(function(){self.$forceUpdate()})}},computed:{store:function(){return window[this.storeName].state},visible:function(){return this.$parent.visible}}});window.CheckboxFilterStore={state:[],"default":[],subscribeFilter:function(n){var i=this.default,t;try{t=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");t!=""&&(t=JSON.parse(t),!t[n]||(i=t[n]))}catch(r){}return this.state.push({id:this.state.length,data:i}),this.state.length-1},applyFilter:function(n,t,i){if(this.state[n].data!=t){try{var r=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");r=r==""?{}:JSON.parse(r);r[i]=t;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(r))}catch(u){}this.state[n].data=t}},setDefault:function(n){this.state[n].data=this.default}};Vue.component("checkbox-filter-component",{props:["event-bus","update-event","items","cookie-value","default-values"],data:function(){return{store:window.CheckboxFilterStore,id:null,isOpen:!1,scrollPos:0}},methods:{toggle:function(){var t,n;if(this.isOpen=!this.isOpen,this.$parent.toggle(),this.isOpen){for(this.$mq=="sm"&&(this.$data.scrollPos=window.scrollY,this.$nextTick(function(){document.getElementsByTagName("body")[0].style.position="fixed"})),n=0;n<this.$refs.toggle.length;n++)this.$refs.toggle[n].checked=!1;for(t=0;t<this.state.data.length;t++)for(n=0;n<this.$refs.toggle.length;n++)this.state.data[t]==this.$refs.toggle[n].value&&(this.$refs.toggle[n].checked=!0)}window[this.eventBus].$emit("filter-toggle-event",this.$el)},close:function(){this.applyFilter();this.$refs.toggle.checked=this.state.data.isOn;this.$parent.close();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")))},applyFilter:function(){for(var t=[],n=0;n<this.$refs.toggle.length;n++)this.$refs.toggle[n].checked&&t.push(this.$refs.toggle[n].value);this.store.applyFilter(this.id,t,this.cookieValue);this.toggle();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")));window[this.eventBus].$emit(this.updateEvent,t)},applyOnFilterChange:function(){for(var t=[],n=0;n<this.$refs.toggle.length;n++)this.$refs.toggle[n].checked&&t.push(this.$refs.toggle[n].value);this.store.applyFilter(this.id,t,this.cookieValue);window[this.eventBus].$emit(this.updateEvent,t)},clear:function(){var t,i,n;for(this.store.setDefault(this.id),t=0;t<this.$refs.toggle.length;t++)this.$refs.toggle[t].checked&&(this.$refs.toggle[t].checked=!1);i=this.state.data;try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n[this.cookieValue]=i;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(r){}window[this.eventBus].$emit(this.updateEvent,i)},updateValues:function(){for(var t=[],n=0;n<this.$refs.toggle.length;n++)this.$refs.toggle[n].checked&&t.push(this.$refs.toggle[n].value);this.state.data=t}},computed:{state:function(){return this.id!=null?this.store.state[this.id]:{}},dynamicButtonCheckBoxString:function(){var n="";return this.state&&this.state.data&&this.state.data.length>0&&(n=this.state.data.length>1?this.state.data[0]+" + "+(this.state.data.length-1)+" more":this.state.data[0],this.state.data.length==2&&(n=this.state.data[0]+" + "+this.state.data[1])),n},visible:function(){return this.$parent.visible},isActive:function(){return this.state&&this.state.data?this.isOpen?!0:this.state.data.length>0:!1}},mounted:function(){var n=this;this.id=window.CheckboxFilterStore.subscribeFilter(this.cookieValue);this.$nextTick(function(){this.state.data!=this.store.default&&window[this.eventBus].$emit(this.updateEvent,this.state.data)});this.defaultValues&&this.defaultValues.length>0&&(n.state.data=this.defaultValues);window[this.eventBus].$on("filter-toggle-event",function(t){t!=n.$el&&n.isOpen&&(n.applyOnFilterChange(),n.state.data=n.state.data,n.isOpen=!1)})}});window.DateFilterStore={state:[{dateFilterApplied:!1,previousDateRange:{start:moment().toDate(),end:moment().add(1,"day").toDate()},adjustmentDate:null,adjustedStart:!1,adjustedEnd:!1,selectedRange:!1,disabledHighlightDates:null}],"default":{start:moment().toDate(),end:moment().add(1,"day").toDate()},subscribeFilter:function(){var t={start:moment(this.state[0].previousDateRange.start).toDate(),end:moment(this.state[0].previousDateRange.end).toDate()},n;try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),!n.Dates||n.Dates.start==null||n.Dates.end==null||moment(n.Dates.end).toDate()>moment().toDate()&&moment(n.Dates.start).toDate()>moment().toDate()&&(t.start=moment(n.Dates.start).toDate(),t.end=moment(n.Dates.end).toDate(),window.DateFilterStore.state.rangeSelected=!0))}catch(i){}return this.state.push({id:this.state.length,data:t}),this.state.length-1},applyFilter:function(n,t){this.state[n].data=t;try{var i=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");i=i==""?{}:JSON.parse(i);i.Dates=t;this.state[n].previousDateRange=t;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(i))}catch(r){}},setDefault:function(n){var t={start:moment(this.state[0].previousDateRange.start).toDate(),end:moment(this.state[0].previousDateRange.end).toDate()};this.state[n].data=t}};Vue.component("date-filter-component",{props:["event-bus","update-event","default-start-date","default-end-date"],data:function(){return{store:window.DateFilterStore,id:null,isOpen:!1,errorOpacity:0,maxNightsError:!1,scrollPos:0}},methods:{toggle:function(){if(this.isOpen=!this.isOpen,this.$parent.toggle(),this.isOpen){this.$mq=="sm"&&(this.$data.scrollPos=window.scrollY,this.$nextTick(function(){document.getElementsByTagName("body")[0].style.position="fixed"}));var n=moment(this.state.data.start).format("M"),t=moment(this.state.data.start).format("YYYY");this.$refs.dateFilter.selectedDate=this.state.data;window.VcalendarMobileEventBus.$emit("month-change")}else document.getElementsByTagName("body")[0].style.position="",document.body.style.top="";this.toggleStyling();window[this.eventBus].$emit("filter-toggle-event",this.$el)},DateFilterApplied:function(){if(this.defaultStartDate&&this.defaultEndDate)return this.store.state.dateFilterApplied;try{var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");if(n!="")return(n=JSON.parse(n),!!n.Dates)?(this.store.state.dateFilterApplied=!0,this.updateNights(),!0):(this.store.state.dateFilterApplied=!1,!1)}catch(t){}},isActive:function(){return this.DateFilterApplied()||this.isOpen},close:function(){this.isDefault&&this.store.state.adjustmentDate==undefined?(this.$parent.close(),this.isOpen=!1):(this.$parent.close(),this.applyFilter());this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")))},updateNights:function(n){var t,i;window.AccommodationStore!=undefined?n?window.AccommodationStore.state.numberOfNights=1:(t=moment(this.state.data.start),i=moment(this.state.data.end),this.$refs.dateFilter.selectedDate!=null&&(t=moment(this.$refs.dateFilter.selectedDate.start),i=moment(this.$refs.dateFilter.selectedDate.end)),window.AccommodationStore.state.numberOfNights=t.diff(i,"days")*-1):window.SearchResultsAndFiltersWidgetStore!=undefined&&(n?window.SearchResultsAndFiltersWidgetStore.state.numberOfNights=1:(t=moment(this.state.data.start),i=moment(this.state.data.end),this.$refs.dateFilter.selectedDate!=null&&(t=moment(this.$refs.dateFilter.selectedDate.start),i=moment(this.$refs.dateFilter.selectedDate.end)),window.SearchResultsAndFiltersWidgetStore.state.numberOfNights=t.diff(i,"days")*-1))},applyFilter:function(){if(this.isDefault&&this.store.state.adjustmentDate==undefined)this.close();else{var n=!1;this.store.applyFilter(this.id,this.$refs.dateFilter.selectedDate);this.toggle();this.isOpen=!1;this.updateNights();this.state.data.start!=null&&this.state.data.end!=null||(this.state.data.end=moment(this.state.data.start).add(1,"days")._d,n=!0);this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")));n&&(this.store.applyFilter(this.id,this.$refs.dateFilter.selectedDate),this.disableRangeSelect());this.$refs.ParkID!=null?(this.state.data.ParkID=parseInt(this.$refs.ParkID.innerText),window[this.eventBus].$emit(this.updateEvent,this.state.data)):window[this.eventBus].$emit(this.updateEvent,this.state.data)}},applyOnFilterChange:function(){if(!this.isDefault||this.store.state.adjustmentDate!=undefined){var n=!1;this.store.applyFilter(this.id,this.$refs.dateFilter.selectedDate);this.state.data.start!=null&&this.state.data.end!=null||(this.state.data.end=moment(this.state.data.start).add(1,"days")._d,n=!0);this.$refs.ParkID!=null?(this.state.data.ParkID=parseInt(this.$refs.ParkID.innerText),window[this.eventBus].$emit(this.updateEvent,this.state.data)):window[this.eventBus].$emit(this.updateEvent,this.state.data);n&&this.disableRangeSelect()}},toggleStyling:function(){var n=this;this.$nextTick(function(){this.isDefault&&!this.DateFilterApplied()&&n.store.state.adjustmentDate==undefined&&(this.$refs.dateFilter.$refs.datePicker.value=null,this.$refs.dateFilter.selectedDate=null)})},disableRangeSelect:function(){var n=this;n.$nextTick(function(){var t=n.$refs.dateFilter.$refs.datePicker;t.dragValue!=null&&(t.$children[0].dragValue=null,t.$children[0].value.start=n.state.data.start,t.$children[0].value.end=n.state.data.end,n.$refs.dateFilter.isDragging=!1);n.toggleStyling()})},enableRangeSelect:function(){var i=this,t=i.$refs.dateFilter.$refs.datePicker,n=i.$refs.dateFilter;n.selectedDate&&this.store.state.adjustmentDate&&(n.selectedDate.start.toDateString()==this.store.state.adjustmentDate.toDateString()?(t.$children[0].dragValue={start:n.selectedDate.start,end:moment(n.selectedDate.start).add(1,"days")._d},t.$children[0].value.start=n.selectedDate.start,t.$children[0].value.end=null):n.selectedDate.end.toDateString()==this.store.state.adjustmentDate.toDateString()&&(t.$children[0].dragValue={start:n.selectedDate.end,end:moment(n.selectedDate.end).add(1,"days")._d},t.$children[0].value.start=n.selectedDate.end,t.$children[0].value.end=null),i.$refs.dateFilter.isDragging=!0,window.DateFilterStore.state.rangeSelected=!1)},adjustStart:function(n,t){var i=this;i.clear();i.$refs.dateFilter.selectedDate.start=t;i.$refs.dateFilter.selectedDate.end=n;window.DateFilterStore.state.rangeSelected=!0},adjustEnd:function(n,t){var i=this;i.clear();i.$refs.dateFilter.selectedDate.end=t;i.$refs.dateFilter.selectedDate.start=n;window.DateFilterStore.state.rangeSelected=!0},applyRangeAdjustment:function(){var n=this,t=n.store.state.adjustmentDate,i=null,r=null;n.$refs.dateFilter.selectedDate!=null?(i=n.$refs.dateFilter.selectedDate.start,r=n.$refs.dateFilter.selectedDate.end):(i=t!=null?t:null,this.state.data={start:i,end:null});var u=moment(t),f=moment(i),e=moment(r),o=u.diff(f,"days")*-1,s=u.diff(e,"days");(o<-27||s<-27)&&(window.DateFilterStore.state.rangeSelected=!1);n.$refs.dateFilter.selectedDate&&i!=null&&r!=null&&window.DateFilterStore.state.rangeSelected?t>i&&t<r&&n.store.state[0].adjustedEnd?(n.adjustStart(r,t),n.store.state[0].adjustedEnd=!1,n.store.state[0].adjustedStart=!0):t>i&&t<r&&n.store.state[0].adjustedEnd==!1?(n.adjustEnd(i,t),n.store.state[0].adjustedEnd=!0,n.store.state[0].adjustedStart=!1):t<i?n.store.state[0].adjustedStart?(n.store.state[0].adjustedEnd=!1,n.store.state[0].adjustedStart=!0,this.enableRangeSelect()):(n.adjustStart(r,t),n.store.state[0].adjustedEnd=!1,n.store.state[0].adjustedStart=!0):t>r&&(n.store.state[0].adjustedStart?(n.adjustEnd(i,t),n.store.state[0].adjustedEnd=!0,n.store.state[0].adjustedStart=!1):(n.store.state[0].adjustedEnd=!1,n.store.state[0].adjustedStart=!0,this.enableRangeSelect())):(n.clear(),r?(n.$refs.dateFilter.selectedDate.start=t,n.$refs.dateFilter.selectedDate.end=null):(n.$refs.dateFilter.selectedDate.start=i,n.$refs.dateFilter.selectedDate.end=t));this.toggleStyling()},clear:function(n){this.updateNights(!0);this.store.state[0].adjustedEnd=!0;this.store.state[0].adjustedStart=!1;window.DateFilterStore.state.rangeSelected=!1;this.$refs.dateFilter.selectedDate!=null&&this.store.applyFilter(this.id,this.$refs.dateFilter.selectedDate);this.state.data.start!=null&&this.state.data.end!=null||(this.state.data.end=moment(this.state.data.start).add(1,"days")._d);this.$data.errorOpacity=0;this.store.setDefault(this.id);this.$refs.dateFilter.selectedDate=this.state.data;n&&(this.disableRangeSelect(),this.store.state.adjustmentDate=undefined);this.$refs.ParkID!=null&&(this.state.data.ParkID=parseInt(this.$refs.ParkID.innerText));try{var t=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");t=t==""?{}:JSON.parse(t);delete t.Dates;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(t))}catch(i){}window[this.eventBus].$emit(this.updateEvent,this.state.data);window[this.eventBus].$emit("date-filter-clear",this.state.data);window[this.eventBus].$emit("quantity-clear");this.toggleStyling()}},computed:{state:function(){return this.id!=null?this.store.state[this.id]:{}},dynamicDateStrings:function(){var i,r,n,t;return this.state.data!=undefined&&(!this.isDefault||this.isDefault&&this.dateFilterApplied)||this.store.state.adjustmentDate!=undefined?this.state.data.end!=null?(i=moment(this.state.data.start),r=moment(this.state.data.end),this.$refs.dateFilter.selectedDate!=null&&(i=moment(this.$refs.dateFilter.selectedDate.start),r=moment(this.$refs.dateFilter.selectedDate.end)),n=i.diff(r,"days")*-1,t=" ("+n+" Nights)",n==1&&(t=t.replace("s","")),n>27)?(this.$data.maxNightsError=!0,this.enableRangeSelect(),"Maximum 27 nights"):this.$refs.dateFilter.selectedDate!=null&&this.state.data.end!=this.$refs.dateFilter.selectedDate.end&&this.$refs.dateFilter.selectedDate.end!=null?this.state.data.start.toDateString().replace(this.state.data.start.getFullYear(),"")+" - "+this.$refs.dateFilter.selectedDate.end.toDateString().replace(this.state.data.end.getFullYear(),"")+t:this.$data.maxNightsError?(this.$data.maxNightsError=!1,"Maximum 27 nights"):isNaN(n)?this.state.data.start.toDateString().replace(this.state.data.start.getFullYear(),"")+" - Check Out":this.state.data.start.toDateString().replace(this.state.data.start.getFullYear(),"")+" - "+this.state.data.end.toDateString().replace(this.state.data.end.getFullYear(),"")+t:this.state.data.start.toDateString().replace(this.state.data.start.getFullYear(),"")+" - Check Out":""},dynamicButtonDateStrings:function(){return this.state.data!=undefined&&(!this.isDefault||this.isDefault&&this.DateFilterApplied())||this.store.state.adjustmentDate!=undefined?this.state.data.end!=null?this.$refs.dateFilter.selectedDate!=null?(start=moment(this.$refs.dateFilter.selectedDate.start)._d,end=moment(this.$refs.dateFilter.selectedDate.end)._d,start&&end&&this.$refs.dateFilter.selectedDate.end!=null?start.toDateString().replace(start.getFullYear(),"").substring(3)+" - "+end.toDateString().replace(end.getFullYear(),"").substring(3):this.state.data.start.toDateString().replace(this.state.data.start.getFullYear(),"").substring(3)+" - Check Out"):this.state.data.start.toDateString().replace(this.state.data.start.getFullYear(),"").substring(3)+" - "+this.state.data.end.toDateString().replace(this.state.data.end.getFullYear(),"").substring(3):this.state.data.start.toDateString().replace(this.state.data.start.getFullYear(),"").substring(3)+" - Check Out":"Dates"},errorOpacityLevel:function(){return this.$data.errorOpacity},visible:function(){return this.$parent.visible},isDefault:function(){return moment(this.state.data.start).diff(moment(this.store.default.start),"months")==0&&moment(this.state.data.start).diff(moment(this.store.default.start),"days")==0&&moment(this.state.data.start).diff(moment(this.store.default.start),"years")==0&&moment(this.state.data.end).diff(moment(this.store.default.end),"months")==0&&moment(this.state.data.end).diff(moment(this.store.default.end),"days")==0&&moment(this.state.data.end).diff(moment(this.store.default.end),"years")==0}},mounted:function(){var n=this;this.id=window.DateFilterStore.subscribeFilter();this.$nextTick(function(){if(this.$refs.ParkID!=null)try{var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),!n.Dates||n.Dates.start==null||n.Dates.end==null||(moment(n.Dates.end).toDate()>moment().toDate()&&moment(n.Dates.start).toDate()>moment().toDate()?window[this.eventBus].$emit(this.updateEvent,this.state.data):this.clear()))}catch(t){}else window[this.eventBus].$emit(this.updateEvent,this.state.data)});this.defaultStartDate&&this.defaultStartDate.length>0&&this.defaultEndDate&&this.defaultEndDate.length>0&&moment(this.defaultEndDate).toDate()>moment().toDate()&&moment(this.defaultStartDate).toDate()>moment().toDate()&&(n.state.data.start=new Date(this.defaultStartDate),n.state.data.end=new Date(this.defaultEndDate),this.store.state.dateFilterApplied=!0,this.updateNights(),window[this.eventBus].$emit(this.updateEvent,this.state.data));window.FilterEventBus.$on("date-adjusted",function(){n.applyRangeAdjustment();var t=n.$refs.dateFilter.$refs.datePicker;this.$nextTick(function(){t.dragValue!=null&&window.DateFilterStore.state.rangeSelected&&n.disableRangeSelect()})});window.FilterEventBus.$on("page-change",function(){n.$nextTick(function(){n.toggleStyling()})});window[this.eventBus].$on("filter-toggle-event",function(t){t!=n.$el&&n.isOpen&&(n.applyOnFilterChange(),n.state.data=n.state.data,n.isOpen=!1)})}});window.DistanceFilterStore={state:[],"default":{distance:100},subscribeFilter:function(){return this.state.push({id:this.state.length,data:this.default}),this.state.length-1},applyFilter:function(n,t){this.state[n].data=t},setDefault:function(n){this.state[n].data=this.default},clearFilter:function(n){this.state[n].data=this.default}};Vue.component("distance-filter-component",{props:["event-bus","update-event"],data:function(){return{store:window.DistanceFilterStore,id:null,isOpen:!1,scrollPos:0}},methods:{toggle:function(){this.isOpen=!this.isOpen;this.$parent.toggle();var n=this;this.isOpen&&(this.$mq=="sm"&&(this.$data.scrollPos=window.scrollY,this.$nextTick(function(){document.getElementsByTagName("body")[0].style.position="fixed"})),this.$nextTick(function(){n.$refs.slider.value=this.state.data.distance}));window[this.eventBus].$emit("filter-toggle-event",this.$el)},close:function(){this.$refs.slider.value!=this.store.default.distance&&this.applyFilter();this.$refs.slider.value=this.state.data.distance;this.$parent.close();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")))},applyFilter:function(){var n={distance:this.$refs.slider.value};this.store.applyFilter(this.id,n);this.toggle();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")));window[this.eventBus].$emit(this.updateEvent,this.state.data)},applyOnFilterChange:function(){if(this.$refs.slider!=null){var n={distance:this.$refs.slider.value};this.store.applyFilter(this.id,n);window[this.eventBus].$emit(this.updateEvent,this.state.data)}},updateValues:function(){var n={distance:this.$refs.slider.value};this.store.applyFilter(this.id,n);this.$refs.slider.value=this.state.data.distance},clear:function(){this.store.clearFilter(this.id);this.$refs.slider.value=this.state.data.distance;window[this.eventBus].$emit(this.updateEvent,0)}},computed:{state:function(){return this.id!=null?this.store.state[this.id]:{}},dynamicButtonDistanceString:function(){var n=this.state.data!=undefined?this.state.data.distance!=this.store.default.distance:!1,t=this.state.data!=undefined&&this.$refs.slider!=undefined&&this.$refs.slider.value!=this.store.default.distance;return t?this.$refs.slider.value+" km from me":n?this.state.data!=undefined&&this.$refs.slider!=undefined&&this.$refs.slider.value!=this.store.default.distance?this.$refs.slider.value+" km from me":"Distance from me":"Distance from me"},visible:function(){return this.$parent.visible},isActive:function(){return this.state&&this.state.data?this.isOpen?!0:this.state.data.distance!=this.store.default.distance:!1}},mounted:function(){var n=this;this.id=window.DistanceFilterStore.subscribeFilter();window[this.eventBus].$on("filter-toggle-event",function(t){t!=n.$el&&n.isOpen&&(n.applyOnFilterChange(),n.state.data=n.state.data,n.isOpen=!1)})}});window.FilterEventBus=new Vue;window.FilterEvents={UPDATE_FILTERS:"update-filters"};window.GuestFilterStore={state:[],"default":{adults:1,children:0,infants:0},subscribeFilter:function(){var t=this.default,n;try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),!n.Guests||(t=n.Guests))}catch(i){}return this.state.push({id:this.state.length,data:t}),this.state.length-1},applyFilter:function(n,t){this.state[n].data=t;try{var i=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");i=i==""?{}:JSON.parse(i);i.Guests=t;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(i))}catch(r){}},setDefault:function(n){this.state[n].data=this.default}};Vue.component("guest-filter-component",{props:["event-bus","update-event","default-adults","default-children","default-infants"],data:function(){return{store:window.GuestFilterStore,id:null,isOpen:!1,scrollPos:0}},methods:{toggle:function(){this.isOpen=!this.isOpen;this.$parent.toggle();this.isOpen&&(this.$mq=="sm"&&(this.$data.scrollPos=window.scrollY,this.$nextTick(function(){document.getElementsByTagName("body")[0].style.position="fixed"})),this.$refs.adults.quantity=this.state.data.adults,this.$refs.children.quantity=this.state.data.children,this.$refs.infants.quantity=this.state.data.infants);window[this.eventBus].$emit("filter-toggle-event",this.$el)},isActive:function(){return this.state.data!=undefined&&(this.state.data.adults!=this.store.default.adults||this.state.data.children!=this.store.default.children||this.state.data.infants!=this.store.default.infants||this.isOpen)?!0:!1},close:function(){this.applyFilter();this.$refs.adults.quantity=this.state.data.adults;this.$refs.children.quantity=this.state.data.children;this.$refs.infants.quantity=this.state.data.infants;this.$parent.close();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")))},applyFilter:function(){var n={adults:this.$refs.adults.quantity,children:this.$refs.children.quantity,infants:this.$refs.infants.quantity};this.store.applyFilter(this.id,n);this.toggle();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")));window[this.eventBus].$emit(this.updateEvent,n)},applyOnFilterChange:function(){var n={adults:this.$refs.adults.quantity,children:this.$refs.children.quantity,infants:this.$refs.infants.quantity};this.store.applyFilter(this.id,n);window[this.eventBus].$emit(this.updateEvent,n)},clear:function(){var t,n;this.store.setDefault(this.id);this.$refs.adults.quantity=this.$data.store.default.adults;this.$refs.children.quantity=this.$data.store.default.children;this.$refs.infants.quantity=this.$data.store.default.infants;t={adults:this.state.data.adults,children:this.state.data.children,infants:this.state.data.infants};try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n.Guests=t;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(i){}window[this.eventBus].$emit(this.updateEvent,t)}},computed:{state:function(){return this.id!=null?this.store.state[this.id]:{}},canDecreaseAdults:function(){return this.state.data.adults>1},visible:function(){return this.$parent.visible},dynamicButtonGuestsString:function(){if(this.state.data!=undefined)return this.isOpen||(this.$refs.adults.quantity=this.state.data.adults,this.$refs.children.quantity=this.state.data.children,this.$refs.infants.quantity=this.state.data.infants),this.$refs.adults.quantity>1||this.$refs.children.quantity>0||this.$refs.infants.quantity>0?(result=this.$refs.adults.quantity==1?this.$refs.adults.quantity+" Guest":this.$refs.adults.quantity+" Guests",this.$refs.children.quantity>0&&(result=this.$refs.children.quantity+this.$refs.adults.quantity+" Guests"),this.$refs.infants.quantity>0&&(result+=this.$refs.infants.quantity==1?", "+this.$refs.infants.quantity+" Infant":", "+this.$refs.infants.quantity+" Infants"),result):"Guests"},isDefault:function(){return this.state.data.adults!=this.store.default.adults?!1:this.state.data.children!=this.store.default.children||this.state.data.infants!=this.store.default.infants?!1:!0}},mounted:function(){var n=this,t;this.id=window.GuestFilterStore.subscribeFilter();this.$nextTick(function(){this.state.data!=this.store.default});try{t=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");t=t==""?{}:JSON.parse(t);t.Guests&&(t.Guests.adults!==1||t.Guests.children!==0||t.Guests.infants!==0)||(this.defaultAdults&&this.defaultAdults>0&&(n.state.data.adults=this.defaultAdults),this.defaultChildren&&this.defaultChildren>0&&(n.state.data.children=this.defaultChildren),this.defaultInfants&&this.defaultInfants>0&&(n.state.data.infants=this.defaultInfants))}catch(i){}window[this.eventBus].$on("filter-toggle-event",function(t){t!=n.$el&&n.isOpen&&(n.applyOnFilterChange(),n.state.data=n.state.data,n.isOpen=!1)})}});Vue.component("slider-filter",{props:["store-name","apply-filter-function-name"],data:function(){return{}},methods:{toggle:function(){this.$parent.toggle();this.$nextTick(function(){window.dispatchEvent(new Event("resize"))})},close:function(){this.$parent.close()},applyFilter:function(){var n=this.$refs.slider.value;window[this.storeName][this.applyFilterFunctionName](n);this.toggle()},active:function(){var n=this.store.distanceFromPark.value;return n!=undefined?!0:!1},clear:function(){var n=window.SliderFilterStore.default.startPoint;window[this.storeName][this.applyFilterFunctionName](n);this.toggle()}},computed:{store:function(){return window[this.storeName].state},visible:function(){return this.$parent.visible}}});window.SliderFilterStore={state:[],"default":{distance:100},subscribeFilter:function(){return this.state.push({id:this.state.length,data:this.default}),this.state.length-1},applyFilter:function(n,t){this.state[n].data=t},setDefault:function(n){this.state[n].data=this.default}};Vue.component("slider-filter-component",{props:["event-bus","update-event"],data:function(){return{store:window.SliderFilterStore,id:null,isOpen:!1,scrollPos:0}},methods:{toggle:function(){this.isOpen=!this.isOpen;this.$parent.toggle();var n=this;this.isOpen&&(this.$mq=="sm"&&(this.$data.scrollPos=window.scrollY,this.$nextTick(function(){document.getElementsByTagName("body")[0].style.position="fixed"})),this.$nextTick(function(){n.$refs.slider.value=this.state.data.distance}));this.$nextTick(function(){window.dispatchEvent(new Event("resize"))});window[this.eventBus].$emit("filter-toggle-event",this.$el)},close:function(){this.$refs.slider.value=this.state.data.distance;this.$parent.close();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")))},applyFilter:function(){var n={distance:this.$refs.slider.value};this.store.applyFilter(this.id,n);this.toggle();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")));window[this.eventBus].$emit(this.updateEvent,this.state.data)},applyOnFilterChange:function(){var n={distance:this.$refs.slider.value};this.store.applyFilter(this.id,n);window[this.eventBus].$emit(this.updateEvent,this.state.data)},clear:function(){this.store.setDefault(this.id);this.$parent.close();this.isOpen=!1;window[this.eventBus].$emit(this.updateEvent,this.state.data)}},computed:{state:function(){return this.id!=null?this.store.state[this.id]:{}},visible:function(){return this.$parent.visible},isActive:function(){return this.state&&this.state.data?this.isOpen?!0:this.state.data.isOn:!1}},mounted:function(){this.id=window.SliderFilterStore.subscribeFilter();window[this.eventBus].$on("filter-toggle-event",function(n){n!=self.$el&&self.isOpen&&(self.applyOnFilterChange(),self.state.data=self.state.data,self.isOpen=!1)})}});Vue.component("toggle-filter",{props:["store-name","apply-filter-function-name"],data:function(){return{}},methods:{toggle:function(){this.$parent.toggle()},close:function(){this.$parent.close()},applyFilter:function(){window[this.storeName][this.applyFilterFunctionName]();this.toggle()},active:function(){return this.store.memberBenefits.value}},computed:{store:function(){return window[this.storeName].state},visible:function(){return this.$parent.visible}}});window.ToggleFilterStore={state:[],"default":{isOn:!1},subscribeFilter:function(){var t=this.default,n;try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),!n.Toggle||(t=n.Toggle))}catch(i){}return this.state.push({id:this.state.length,data:t}),this.state.length-1},applyFilter:function(n,t){this.state[n].data=t},setDefault:function(n){this.state[n].data=this.default}};Vue.component("toggle-filter-component",{props:["event-bus","update-event","default-value"],data:function(){return{store:window.ToggleFilterStore,id:null,isOpen:!1,scrollPos:0}},methods:{toggle:function(){this.isOpen=!this.isOpen;this.$parent.toggle();this.isOpen&&(this.$mq=="sm"&&(this.$data.scrollPos=window.scrollY,this.$nextTick(function(){document.getElementsByTagName("body")[0].style.position="fixed"})),this.$refs.toggle.checked=this.state.data.isOn);window[this.eventBus].$emit("filter-toggle-event",this.$el)},close:function(){this.$refs.toggle.checked=this.state.data.isOn;this.$parent.close();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")))},applyFilter:function(){var t={isOn:this.$refs.toggle.checked},n;try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n.Toggle=t;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(i){}this.store.applyFilter(this.id,t);this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")));window[this.eventBus].$emit(this.updateEvent,t)},applyOnFilterChange:function(){var t={isOn:this.$refs.toggle.checked},n;try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n.Toggle=t;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(i){}this.store.applyFilter(this.id,t);window[this.eventBus].$emit(this.updateEvent,t)},clear:function(){this.store.setDefault(this.id);this.$parent.close();this.isOpen=!1;var n={isOn:this.state.data.isOn};window[this.eventBus].$emit(this.updateEvent,n)}},computed:{state:function(){return this.id!=null?this.store.state[this.id]:{}},visible:function(){return this.$parent.visible},isActive:function(){return this.state&&this.state.data?this.isOpen?!0:this.state.data.isOn:!1},isApplied:function(){return this.state&&this.state.data?this.state.data.isOn:!1}},mounted:function(){var n=this,t;this.id=window.ToggleFilterStore.subscribeFilter();try{t=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");t=t==""?{}:JSON.parse(t);this.defaultValue&&!t.Toggle.isOn&&(this.state.data.isOn=n.defaultValue)}catch(i){}this.$nextTick(function(){this.state.data!=this.store.default&&window[this.eventBus].$emit(this.updateEvent,this.state.data)});window[this.eventBus].$on("filter-toggle-event",function(t){t!=n.$el&&n.isOpen&&(n.applyOnFilterChange(),n.state.data=n.state.data,n.isOpen=!1)})}});Vue.component("two-way-slider-filter",{props:["store-name","apply-filter-function-name"],data:function(){return{}},methods:{toggle:function(){this.$parent.toggle();this.$nextTick(function(){window.dispatchEvent(new Event("resize"))})},close:function(){this.$parent.close()},applyFilter:function(){var n=this.$refs.slider.value;window[this.storeName][this.applyFilterFunctionName](n);this.toggle()}},computed:{store:function(){return window[this.storeName].state},visible:function(){return this.$parent.visible}}});window.TwoSliderFilterStore={state:[],"default":{startPoint:0,endPoint:999},subscribeFilter:function(){var t=this.default,n;try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),!n.Price||(t=n.Price))}catch(i){}return this.state.push({id:this.state.length,data:t}),this.state.length-1},applyFilter:function(n,t){try{var i=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");i=i==""?{}:JSON.parse(i);i.Price=t;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(i))}catch(r){}this.state[n].data=t},setDefault:function(n){this.state[n].data=this.default}};Vue.component("two-way-slider-filter-component",{props:["event-bus","update-event"],data:function(){return{store:window.TwoSliderFilterStore,id:null,isOpen:!1,scrollPos:0}},methods:{toggle:function(){this.isOpen=!this.isOpen;this.$parent.toggle();var n=this;this.isOpen&&(this.$mq=="sm"&&(this.$data.scrollPos=window.scrollY,this.$nextTick(function(){document.getElementsByTagName("body")[0].style.position="fixed"})),this.$nextTick(function(){n.$refs.slider.value[0]=this.state.data.startPoint;n.$refs.slider.value[1]=this.state.data.endPoint}));this.$nextTick(function(){window.dispatchEvent(new Event("resize"))});window[this.eventBus].$emit("filter-toggle-event",this.$el)},close:function(){this.state.data!=this.default&&this.applyFilter();this.$refs.slider.value[0]=this.state.data.startPoint;this.$refs.slider.value[1]=this.state.data.endPoint;this.$parent.close();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")))},applyFilter:function(){var n={startPoint:this.$refs.slider.value[0],endPoint:this.$refs.slider.value[1]};this.store.applyFilter(this.id,n);this.toggle();this.isOpen=!1;this.$mq=="sm"&&(document.getElementsByTagName("body")[0].style.position="",window.scrollTo(0,parseInt(this.$data.scrollPos||"0")));window[this.eventBus].$emit(this.updateEvent,this.state.data)},applyOnFilterChange:function(){var n={startPoint:this.$refs.slider.value[0],endPoint:this.$refs.slider.value[1]};this.store.applyFilter(this.id,n);window[this.eventBus].$emit(this.updateEvent,this.state.data)},clear:function(){var t,n;this.store.setDefault(this.id);this.$refs.slider.value=[this.state.data.startPoint,this.state.data.endPoint];t=this;try{n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n.Price=t.store.default;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(i){}window[this.eventBus].$emit(this.updateEvent,this.state.data)}},computed:{state:function(){return this.id!=null?this.store.state[this.id]:{}},dynamicButtonValueOneString:function(){var n=this.state.data!=undefined?this.state.data.endPoint!=this.store.default.endPoint||this.state.data.startPoint!=this.store.default.startPoint:!1,t=this.state.data!=undefined?this.$refs.slider.value[1]!=this.store.default.endPoint||this.$refs.slider.value[0]!=this.store.default.startPoint:!1;return t?this.state.data!=undefined&&this.$refs.slider!=undefined?this.$refs.slider.value[0]:"":n?this.state.data!=undefined&&this.$refs.slider!=undefined?this.state.data.startPoint:"":void 0},dynamicButtonValueTwoString:function(){var n=this.state.data!=undefined?this.state.data.endPoint!=this.store.default.endPoint||this.state.data.startPoint!=this.store.default.startPoint:!1,t=this.state.data!=undefined?this.$refs.slider.value[1]!=this.store.default.endPoint||this.$refs.slider.value[0]!=this.store.default.startPoint:!1;return t?this.state.data!=undefined&&this.$refs.slider!=undefined?this.$refs.slider.value[1]:"":n?this.state.data!=undefined&&this.$refs.slider!=undefined?this.state.data.endPoint:"":void 0},visible:function(){return this.$parent.visible},isActive:function(){return this.state&&this.state.data?this.isOpen?!0:this.state.data.endPoint!=this.store.default.endPoint||this.state.data.startPoint!=this.store.default.startPoint:!1}},mounted:function(){var n=this;this.id=window.TwoSliderFilterStore.subscribeFilter();this.$nextTick(function(){this.state.data!=this.store.default&&window[this.eventBus].$emit(this.updateEvent,this.state.data)});window[this.eventBus].$on("filter-toggle-event",function(t){t!=n.$el&&n.isOpen&&(n.applyOnFilterChange(),n.state.data=n.state.data,n.isOpen=!1)})}});Vue.component("v-calendar-mobile-wrapper",{props:{toDateOnly:{"default":!1}},template:'<div style="display:none;"><\/div>',computed:{filterWindowOpen:function(){return window.AccommodationStore.state.filterWindowOpen}},methods:{IosSelect:function(){var r=this,t=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform),n=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),i=n!=null?[parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3]||0,10)]:[0];if(t&&i[0]<12){$(".c-day").unbind("mouseover");$(".c-day").on("mouseover",function(n){t&&n.target.click()})}},DynamicZindex:function(){var n;if(window.AccommodationStore!=undefined&&window.AccommodationStore!=null){var t=!1,r=new MutationObserver(function(n){n.forEach(function(){t?($(".c-accommodation-filter-wrapper").css("z-index","7"),t=!1):($(".c-accommodation-filter-wrapper").css("z-index","10"),t=!0)})}),i=$(".c-filter__panel");if(i.length>0)for(n=0;n<i.length;n++)r.observe(i[n],{attributes:!0,attributeFilter:["style"]})}}},mounted:function(){window.VcalendarMobileEventBus=new Vue;var n=this;n.DynamicZindex();n.IosSelect();$(".c-button--calendar-nav").on("click",function(){setTimeout(function(){n.IosSelect()},450)});window.AccommodationEventBus.$on("from-date-selected",function(){n.toDateOnly=!0});window.VcalendarMobileEventBus.$on("month-change",function(){setTimeout(function(){n.IosSelect()},450)})}});Vue.use(AsyncComputed);Vue.component("accommodation-calendar",{mixins:[MIXIN_BOOKING_WIDGET],data:function(){return{store:window.BookingStore,availabilityLoading:!1,cleared:!1,maxNightsError:!1,currentPage:{}}},computed:{availableDateRangesForCalendar:function(){var n=moment(this.currentPage.year+"-"+this.currentPage.month+"-01","YYYY-MM-DD"),t=moment(n).add(1,"month").endOf("month");return this.getAvailableRangesForDateRange(n,t)},state:function(){return this.store.state},props:function(){return{ClearDates:this.ClearDates,DatesSelected:this.datesSelected,CheckoutAvailability:this.CheckoutAvailability,dateSelectionObject:this.dateSelectionObject,dynamicDateStrings:this.dynamicDateStrings}},dynamicDateStrings:function(){var i,n;if(this.state.startDate!=null){if(this.state.endDate!=null){var r=moment(this.state.startDate),u=moment(this.state.endDate),t=r.diff(u,"days")*-1,n=" ("+t+" Nights)";return(t==1&&(n=n.replace("s","")),this.$refs.dateInput.selectedDate!=null&&this.state.endDate._d!=this.$refs.dateInput.selectedDate.end&&this.$refs.dateInput.selectedDate.end!=null)?this.state.startDate._d.toDateString().replace(this.state.startDate._d.getFullYear(),"")+" - "+this.$refs.dateInput.selectedDate.end.toDateString().replace(this.state.endDate._d.getFullYear(),"")+n:isNaN(t)?this.state.data.start.toDateString().replace(this.state.data.start.getFullYear(),"")+" - Check Out":this.state.startDate._d.toDateString().replace(this.state.startDate._d.getFullYear(),"")+" - "+this.state.endDate._d.toDateString().replace(this.state.startDate._d.getFullYear(),"")+n}if(i="",n="",this.$refs.dateInput.$refs.calendar.dragValue!=null&&this.$refs.dateInput.$refs.calendar.dragValue!=undefined){i=this.state.startDate._d.toDateString().replace(this.state.startDate._d.getFullYear(),"")+" - "+this.$refs.dateInput.$refs.calendar.dragValue.end.toDateString().replace(this.$refs.dateInput.$refs.calendar.dragValue.end.getFullYear(),"");var r=moment(this.state.startDate),u=moment(this.$refs.dateInput.$refs.calendar.dragValue.end),t=r.diff(u,"days")*-1;t==0?(n="Check out",i=this.state.startDate._d.toDateString().replace(this.state.startDate._d.getFullYear(),"")+" - "):n=t==1?" ("+t+" Night)":"("+t+" Nights)"}return i+n}return""}},methods:{GetMoreAvailability:_.debounce(function(n){var t=this,i=moment(n.year+"-"+n.month+"-01","YYYY-MM-DD"),r=moment(i).add(1,"month").endOf("month").add(1,"days"),u={ParkID:t.currentAccommodation.ParkID,StartDate:i.format(),EndDate:r.format()};t.availabilityLoading=!0;t.store.GetAvailability(u,function(){t.availabilityLoading=!1},function(){Common.ShowError("Unable to retrieve availability.");t.availabilityLoading=!1})},750),ClearDates:function(n){var t=this,i;t.store.clearDates();n&&(this.store.state.showMaxAccommodationError=!1,this.disableRangeSelect(),this.$data.cleared=!0,this.store.state.rangeSelected=!1,this.store.state.adjustmentDate=null,window.BookingEventBus.$emit("accommodation-calendar-cleared"),i=window.BookingStore.GetCurrentAccommodation(),window.BookingStore.state.currentOfferCode=i.AvailabilityCacheData.DefaultRateID);window.BookingEventBus.$emit("DATE-CHANGED");t.UpdateCookie(null)},CheckoutAvailability:function(){Vue.nextTick(function(){var n=this;this.$(".c-day").unbind("click");this.$(".c-day").on("click",function(t){n.window.BookingEventBus.$emit("day-clicked",t.target)});$(".c-day").unbind("mouseover");$(".c-day").on("mouseover",function(t){var i=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);i&&n.toDateOnly?(t.target.click(),toDateOnly=!1):(i&&n.fromDateSelected&&t.target.click(),n.fromDateSelected=!n.fromDateSelected)})})},enableRangeSelect:function(){var i=this,t=i.$refs.dateInput.$refs.calendar,n=i.$refs.dateInput;n.selectedDate.start.toDateString()==this.store.state.adjustmentDate.toDateString()?(t.$children[0].dragValue={start:n.selectedDate.start,end:moment(n.selectedDate.start).add(1,"days")._d},t.$children[0].value.start=n.selectedDate.start,t.$children[0].value.end=null):n.selectedDate.end.toDateString()==this.store.state.adjustmentDate.toDateString()&&(t.$children[0].dragValue={start:n.selectedDate.end,end:moment(n.selectedDate.end).add(1,"days")._d},t.$children[0].value.start=n.selectedDate.end,t.$children[0].value.end=null);n.isDragging=!0;window.DateFilterStore.state.rangeSelected=!1},disableRangeSelect:function(n,t){var i=this;i.$nextTick(function(){var r=i.$refs.dateInput.$refs.calendar,u=i.$refs.dateInput;r.dragValue!=null&&(r.$children[0].dragValue=null,r.$children[0].value={start:n,end:t},i.$refs.dateInput.isDragging=!1);i.$refs.dateInput.selectedDate={start:n,end:t};i.$forceUpdate()})},adjustStart:function(n,t){var i=this;i.ClearDates();i.$refs.dateInput.selectedDate.start=t;i.$refs.dateInput.selectedDate.end=n;window.DateFilterStore.state.rangeSelected=!0},adjustEnd:function(n,t){var i=this;i.ClearDates();i.$refs.dateInput.selectedDate.end=t;i.$refs.dateInput.selectedDate.start=n;window.DateFilterStore.state.rangeSelected=!0},applyRangeAdjustment:function(){var n=this,t=n.store.state.adjustmentDate,r=null,i=null;if(n.$refs.dateInput.selectedDate!=null){r=n.$refs.dateInput.selectedDate.start;i=n.$refs.dateInput.selectedDate.end;var u=moment(t),f=moment(r),e=moment(i),o=u.diff(f,"days")*-1,s=u.diff(e,"days");(o<-27||s<-27)&&(window.BookingStore.state.rangeSelected=!1);t>i&&!n.store.state.adjustedStart?(window.BookingStore.state.rangeSelected=!1,n.store.state.adjustedEnd=!1,n.store.state.adjustedStart=!1):t<i&&n.store.state.adjustedStart&&(window.BookingStore.state.rangeSelected=!1,n.store.state.adjustedEnd=!1,n.store.state.adjustedStart=!1);n.$refs.dateInput.selectedDate&&r!=null&&i!=null&&window.BookingStore.state.rangeSelected?(t>r&&t<i&&n.store.state.adjustedEnd?(n.adjustStart(i,t),n.store.state.adjustedEnd=!1,n.store.state.adjustedStart=!0):t>r&&t<i&&n.store.state.adjustedEnd==!1?(n.adjustEnd(r,t),n.store.state.adjustedEnd=!0,n.store.state.adjustedStart=!1):t<r?(n.adjustStart(i,t),n.store.state.adjustedEnd=!1,n.store.state.adjustedStart=!0):t>i&&(n.adjustEnd(r,t),n.store.state.adjustedEnd=!0,n.store.state.adjustedStart=!1),n.store.state.startDate=moment(n.$refs.dateInput.$refs.calendar.value.start),n.store.state.endDate=moment(n.$refs.dateInput.$refs.calendar.value.end)):(n.ClearDates(),i?(n.$refs.dateInput.selectedDate.start=t,n.$refs.dateInput.selectedDate.end=null):(n.$refs.dateInput.selectedDate.start=n.$refs.dateInput.$refs.calendar.value.start,n.$refs.dateInput.selectedDate.end=t))}},UpdateCookie:function(n){var t=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");t=t==""?{}:JSON.parse(t);t.Dates=n;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(t))}},mounted:function(){var n=this;n.$nextTick(function(){n.CheckoutAvailability()});this.$refs.dateInput.$refs.calendar.$on("update:fromPage",function(t){if(!t){var i=new moment,r={year:i.year(),month:i.month()+1};n.currentPage=r;n.availabilityLoading=!0;n.GetMoreAvailability(r)}else n.currentPage=t,n.availabilityLoading=!0,n.GetMoreAvailability(t)});n.$watch("$refs.dateInput.selectedDate",function(t){if(t!=null)if(t.start!=null&&t.end!=null){var i=moment(t.start),r=moment(t.end);if(n.store.state.startDate!=null&&n.store.state.endDate!=null&&n.store.state.startDate.isSame(i)&&n.store.state.endDate.isSame(r))return;n.store.state.startDate=moment(t.start);n.store.state.endDate=moment(t.end);window.BookingEventBus.$emit("DATE-CHANGED");n.UpdateCookie(t);n.store.UpdatePrice()}else t.start!=null&&t.end==null&&(n.store.state.startDate=moment(n.$refs.dateInput.$refs.calendar.value.start))});window.BookingEventBus.$on("DATE-CHANGED",function(){this.$nextTick(function(){n.$refs.dateInput.selectedDate=n.state.startDate&&n.state.endDate?{start:n.state.startDate.toDate(),end:n.state.endDate.toDate()}:null;n.$forceUpdate()})});this.state.startDate!=null&&this.state.endDate!=null&&this.$nextTick(function(){n.$refs.dateInput.selectedDate={start:n.state.startDate.toDate(),end:n.state.endDate.toDate()}});window.BookingEventBus.$on("range-contains-unavailable",function(){window.BookingStore.state.rangeSelected=!1});window.BookingEventBus.$on("date-adjusted",function(t){var i,r,u;t!="widget"&&(i=n.$refs.dateInput.$refs.calendar,i.value!=null?n.store.state.savedCalendarValue=i.value:n.$data.cleared?n.$data.cleared=!1:(i.value=n.store.state.savedCalendarValue,n.$refs.dateInput.selectedDate=n.store.state.savedCalendarValue),n.applyRangeAdjustment(),i.value!=null&&(r=i.value.start,u=i.value.end),this.$nextTick(function(){i.dragValue!=null&&window.BookingStore.state.rangeSelected&&n.disableRangeSelect(r,u)}))})}});Vue.component("accommodation-type",{mixins:[MIXIN_BOOKING_WIDGET],template:"#AccommodationTypeTemplate",data:function(){return{}},computed:{accommodations:function(){return this.store.state.accommodation},datesAreDefault:function(){return!this.store.state.startDate&&!this.store.state.endDate}},methods:{changeAccommodation:function(){this.datesAreDefault||this.store.UpdatePrice()}}});Vue.component("booking-add-to-cart-wrapper",{mixins:[MIXIN_BOOKING_WIDGET],props:{isQuickBooking:!1},data:function(){return{store:window.BookingStore,addingToCart:!1}},computed:{state:function(){return this.store.state},isLoading:function(){return this.isQuickBooking?this.state.quickBooking.PriceLoading||this.state.addingToCart:this.state.priceLoading||this.state.addingToCart},canQuickBook:function(){return this.isQuickBooking?this.state.canAddToCart:!1}},methods:{datesFailedValidation:function(){return $("#check_in_date_parsed").val()==""?!0:!1},equipmentFailedValidation:function(){return $("#equipment").val()==null?!0:!1},widthFailedValidation:function(){return $("#width").val()==undefined?!0:!1},lengthFailedValidation:function(){return $("#length").val()==undefined?!0:!1},showValidation:function(){if(this.store.state.noTariffsAvailable){$(".no-tariffs-available").addClass("has-error");$("html, body").animate({scrollTop:$(".has-error").offset().top-200},1e3);return}this.datesFailedValidation()&&($(".c-input-date").addClass("has-error"),$(".c-booking-date-error").css("opacity","100"));this.equipmentFailedValidation()&&($(".c-select ").addClass("has-error"),$(".c-booking-equipment-error").css("opacity","100"));this.lengthFailedValidation()&&($("#length").closest(".c-field").addClass("has-error"),$(".c-booking-equipment-size-error").css("opacity","100"));this.widthFailedValidation()&&($("#width").closest(".c-field").addClass("has-error"),$(".c-booking-equipment-size-error").css("opacity","100"))},hideDateValidation:function(){$(".c-input-date").removeClass("has-error");$(".c-booking-date-error").css("opacity",0)},hideEquipmentValidation:function(){$(".c-select ").removeClass("has-error");$(".c-booking-equipment-error").css("opacity",0)},hideWidthValidation:function(){$("#width").closest(".c-field").removeClass("has-error");$(".c-booking-equipment-size-error").css("opacity",0)},hideLengthValidation:function(){$("#length").closest(".c-field").removeClass("has-error");$(".c-booking-equipment-size-error").css("opacity",0)},addToCart:function(){this.store.addToCart()}},mounted:function(){var n=this;$(".c-input-date").on("click",function(){n.hideDateValidation()});$(".c-select__input").on("click",function(){n.hideEquipmentValidation()});$("#width").on("click",function(){n.hideWidthValidation()});$("#length").on("click",function(){n.hideLengthValidation()})}});window.BookingEventBus=new Vue;window.eEquipmentUnitOfLength={Metres:0,Feet:1};window.BookingStore={state:{equipment:{Width:null,Length:null,Unit:window.eEquipmentUnitOfLength.Metres,EquipmentTypeID:null},quickBooking:{AccommodationType:"",ParkSelectionID:"",ParkSelectionName:"",AccommodationSelectionID:"",PriceLoading:!0,CurrentAllotmentSelection:[],AllUnavailable:!1,isPark:!1},EquipmentTypes:[],accommodation:[],showPriceError:!1,canAddToCart:!1,priceLoading:!0,loadingCounter:0,priceLoadError:!1,addingToCart:!1,UnitValuesMetres:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],UnitValuesFeet:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],adults:2,children:0,infants:0,startDate:null,endDate:null,selectingDates:!1,stayToDateOnly:!1,dateClicked:null,accommodationId:null,currentOfferCode:null,dataPrefilled:!1,isOnDealPage:!1,minDate:null,maxDate:null,adjustmentDate:null,adjustedEnd:!1,adjustedStart:!1,savedCalendarValue:null,bookingWidgetCalendarOpen:!1,isCheckIn:!1,showChevrons:!1,rangeSelected:!1,currentAvailabilityRange:{},noTariffsAvailable:!1,showMaxAccommodationError:!1},clearDates:function(){var n,t;if(this.state.startDate=null,this.state.endDate=null,this.state.canCheckout=!0,this.state.canCheckin=!0,this.state.accommodation.length>0)for(n=0;n<this.state.accommodation.length;n++)t=JSON.parse(JSON.stringify(this.state.accommodation[n])),this.state.accommodation.splice(n,1),t.CurrentPMSResult=[],this.state.accommodation.push(t);window.BookingEventBus.$emit("quantity-update",0)},showPriceError:function(){this.state.showPriceError=!0;this.state.canAddToCart=!1},populateAccommodation:function(n){var t,i,r;if(n.length>0){for(t=0;t<n.length;t++)i={AvailabilityCacheData:{},CurrentPMSResult:[]},r=$.extend(n[t],i),this.state.accommodation.push(r);this.state.accommodationId=this.state.accommodation[0].AccommodationID}else console.error("No accommodation found")},GetCurrentAccommodation:function(){return _.find(this.state.accommodation,{AccommodationID:this.state.accommodationId})},GetCurrentAllotment:function(){var n=_.find(this.GetCurrentAccommodation().CurrentPMSResult,{Offercode:this.state.currentOfferCode});return this.state.quickBooking.CurrentAllotmentSelection=n,n},ReloadPrice:function(){this.UpdatePrice()},UpdatePrice:function(){var n,i,t;this.SetPriceLoading();this.state.showMaxAccommodationError=!1;n=this;i=this.GetCurrentAccommodation();i!=undefined&&(t={AccommodationID:i.AccommodationID,NumAdults:n.state.adults,NumKids:n.state.children,NumInfants:n.state.infants,Width:n.state.equipment.Width,Length:n.state.equipment.Length,Unit:n.state.equipment.Unit,Type:n.state.equipment.EquipmentTypeID,UseCache:!0},t.ArrivalDate=n.state.startDate?n.state.startDate.format("YYYY-MM-DD"):moment().format("YYYY-MM-DD"),t.DepartingDate=n.state.endDate?n.state.endDate.format("YYYY-MM-DD"):moment().add(1,"day").format("YYYY-MM-DD"),$.ajax({type:"GET",url:"/api/Booking/GetBookingAvailability",contentType:"application/json; charset=utf-8",data:t,success:function(t){t.ResponseStatus==eHttpResponseStatus.Ok?(n.ProcessPMSResults(t),n.SetPriceFinishedLoading()):(n.SetPriceLoadingError(),Common.ShowErrorStatusMessages(t.StatusMessages))},error:function(){n.SetPriceLoadingError()}}))},ProcessAvailabilityCacheData:function(n){for(var t,f,i,e,u,s=this,o=!1,r=0;r<this.state.accommodation.length;r++)for(t=0;t<n.length;t++)if(this.state.accommodation[r].AccommodationID==n[t].AccommodationID){if(typeof this.state.accommodation[r].AvailabilityCacheData.DefaultRate=="undefined"&&(o=!0),f=JSON.parse(JSON.stringify(this.state.accommodation[r])),this.state.accommodation.splice(r,1),o)f.AvailabilityCacheData=n[t];else for(i=0;i<n[t].Rates.length;i++)e=_.find(f.AvailabilityCacheData.Rates,{RateID:n[t].Rates[i].RateID}),typeof e!="undefined"?(u=e.Dates.concat(n[t].Rates[i].Dates),u.length>=90&&n[t].Rates[i].Dates.length>30&&(this.state.currentAvailabilityRange=n[t]),u=_.uniqBy(u,function(n){return n.Date}),u.sort(function(n,t){var i=moment(n.Date),r=moment(t.Date);return i.isSame(r)?0:i.isAfter(r)?1:i.isBefore(r)?-1:void 0}),e.Dates=u):f.AvailabilityCacheData.Rates.push(n[t].Rates[i]);this.state.accommodation.push(f)}},ProcessPMSResults:function(n){var u=this.GetCurrentAccommodation(),r,t;if(u!=undefined){u.CurrentPMSResult=[];var i=null,f=null,e=!0;if(this.state.isOnDealPage)for(t=0;t<n.AllAllotments.length;t++)n.AllAllotments[t].Offercode==this.state.currentOfferCode&&(u.CurrentPMSResult.push(n.AllAllotments[t]),e=!1);else{if(n.AllAllotments.length>0){for(r=0,t=0;t<n.AllAllotments.length;t++)e=!1,u.CurrentPMSResult.push(n.AllAllotments[t]),n.AllAllotments[t].IsAvailable&&(n.AllAllotments[t].Total<n.AllAllotments[r].Total||n.AllAllotments[r].IsAvailable==!1)&&(r=t),this.state.currentOfferCode!=null&&this.state.currentOfferCode==n.AllAllotments[t].Offercode&&(f=n.AllAllotments[t]);this.state.currentOfferCode!=null&&this.state.currentOfferCode!=n.AllAllotments[r].Offercode?i=n.AllAllotments[r]:this.state.currentOfferCode=n.AllAllotments[r].Offercode}f!==null&&i!==null&&f.Offercode!==i.Offercode&&i.IsAvailable&&(this.state.currentOfferCode=i.Offercode);f==null&&i!=null&&(this.state.currentOfferCode=i.Offercode)}this.state.noTariffsAvailable=e}this.state.quickBooking.ParkSelectionID!=""&&this.GetCurrentAllotment()},GetInitialAvailability:function(){var t=this,i,n;t.SetPriceLoading();i=this.GetCurrentAccommodation();n={ParkID:i.ParkID};n.StartDate=moment().startOf("month");n.EndDate=t.state.endDate?moment(t.state.endDate).endOf("month").add(1,"days"):moment(n.StartDate).endOf("month").add(1,"days");n.StartDate=n.StartDate.format();n.EndDate=n.EndDate.format();n.StandardRateOnly=!this.state.isOnDealPage;$.ajax({type:"GET",url:"/api/Booking/GetRates",contentType:"application/json; charset=utf-8",data:n,success:function(n){n.ResponseStatus==eHttpResponseStatus.Ok?(t.ProcessAvailabilityCacheData(n.Results),t.SetPriceFinishedLoading()):t.SetPriceLoadingError()},error:function(){t.SetPriceLoadingError()}})},GetAvailability:function(n,t,i){var r=this;n.StandardRateOnly=!this.state.isOnDealPage;$.ajax({type:"GET",url:"/api/Booking/GetRates",contentType:"application/json; charset=utf-8",data:n,success:function(n){n.ResponseStatus==eHttpResponseStatus.Ok?(r.ProcessAvailabilityCacheData(n.Results),!t||t()):(r.showPriceError(),!i||i())},error:function(){!i||i()}})},SetPriceLoading:function(){this.state.priceLoading=!0;this.state.canAddToCart=!1;this.state.priceLoadError=!1;this.state.loadingCounter++},SetPriceFinishedLoading:function(){this.state.loadingCounter--;this.state.loadingCounter==0&&(this.state.priceLoading=!1,this.state.canAddToCart=!0,this.state.priceLoadError=!1);this.InitialQuantityCheck()},SetPriceLoadingError:function(){this.state.loadingCounter--;this.state.loadingCounter==0&&(this.state.priceLoading=!1,this.state.canAddToCart=!1,this.state.priceLoadError=!0)},PopulateEquipmentTypes:function(){var n=this;$.ajax({type:"GET",url:"/api/Booking/GetEquipmentTypes",contentType:"application/json; charset=utf-8",success:function(t){n.state.EquipmentTypes=t.Equipment},error:function(){Common.ShowError("An unexpected error has occurred.")}})},prefillSelections:function(){var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),!n.Dates||(this.state.startDate=moment(n.Dates.start),this.state.endDate=moment(n.Dates.end),this.state.dataPrefilled=!0),!n.Guests||(this.state.adults=n.Guests.adults,this.state.children=n.Guests.children,this.state.infants=n.Guests.infants,window.AccommodationStore!=undefined&&(window.AccommodationStore.state.NumAdults=n.Guests.adults,window.AccommodationStore.state.NumChildren=n.Guests.children,window.AccommodationStore.state.NumInfants=n.Guests.infants),this.state.dataPrefilled=!0))},CheckBookingIsWithinCartAccommodationTimeframe:function(n,t){var i=moment(n).format("YYYY-MM-DD"),r=moment(t).format("YYYY-MM-DD"),u=this.state.startDate.format("YYYY-MM-DD"),f=this.state.endDate.format("YYYY-MM-DD"),e=moment(i).isSame(u)||moment(u).isAfter(i)&&(moment(r).isSame(f)||moment(f)).isBefore(r);return e||(e=(moment(u).isAfter(i)||moment(u).isSame(i))&&moment(u).isBefore(r)||(moment(f).isBefore(r)||moment(f).isSame(r))&&moment(f).isAfter(i),e||(e=moment(u).isSame(r)||moment(f).isSame(i))),e},CheckNumberAvailable:function(n){var f=window.CartStore.state.cartItems,e=0,u=0,i=0,r,t,o;if(window.BookingStore.state.quickBooking.AccommodationSelectionID!="")for(t=0;t<this.state.accommodation.length;t++)this.state.accommodation[t].AccommodationID==window.BookingStore.state.quickBooking.AccommodationSelectionID&&(i=t);if(r=0,this.state.accommodation[i].CurrentPMSResult.length>1&&this.state.currentOfferCode!==null&&this.state.currentOfferCode!==undefined)for(t=0;t<this.state.accommodation[i].CurrentPMSResult.length;t++)this.state.accommodation[i].CurrentPMSResult[t].Offercode===this.state.currentOfferCode&&(r=t);if(this.state.accommodation[i].CurrentPMSResult[r]!=undefined){for(t=0;t<this.state.accommodation[i].CurrentPMSResult[r].DailyAvailability.length-1;t++)t==0?u=this.state.accommodation[i].CurrentPMSResult[r].DailyAvailability[t].RoomsAvailable:u>this.state.accommodation[i].CurrentPMSResult[r].DailyAvailability[t].RoomsAvailable&&(u=this.state.accommodation[i].CurrentPMSResult[r].DailyAvailability[t].RoomsAvailable);for(t=0;t<f.length;t++)if(f[t].AccommodationType!=null){var s=f[t].TransactionLineItem.Booking.AccommodationID,h=f[t].TransactionLineItem.ArrivalDate,c=f[t].TransactionLineItem.DepartureDate;n.AccommodationID==s&&(o=this.CheckBookingIsWithinCartAccommodationTimeframe(h,c),o&&e++)}return window.BookingEventBus.$emit("quantity-update",{quantity:u,accommodationID:this.state.accommodation[i].AccommodationID}),e>=u||u==0?(this.state.canAddToCart=!1,this.state.showMaxAccommodationError=!0,!1):(this.state.showMaxAccommodationError=!1,this.state.canAddToCart=!0,!0)}return!0},InitialQuantityCheck:function(){var i=0,t=0,n;if(window.BookingStore.state.quickBooking.AccommodationSelectionID!="")for(n=0;n<this.state.accommodation.length;n++)this.state.accommodation[n].AccommodationID==window.BookingStore.state.quickBooking.AccommodationSelectionID&&(t=n);if(this.state.accommodation[t].CurrentPMSResult[0]!=undefined){for(n=0;n<this.state.accommodation[t].CurrentPMSResult[0].DailyAvailability.length-1;n++)n==0?i=this.state.accommodation[t].CurrentPMSResult[0].DailyAvailability[n].RoomsAvailable:i>this.state.accommodation[t].CurrentPMSResult[0].DailyAvailability[n].RoomsAvailable&&(i=this.state.accommodation[t].CurrentPMSResult[0].DailyAvailability[n].RoomsAvailable);window.BookingEventBus.$emit("quantity-update",{quantity:i,accommodationID:this.state.accommodation[t].AccommodationID})}},addToCart:function(){var i=this,n;this.state.addingToCart=!0;var t=this.GetCurrentAccommodation(),r=this.GetCurrentAllotment(),u=this.CheckNumberAvailable(t);u?(n={ArrivalDate:this.state.startDate.format("YYYY-MM-DD"),DepartureDate:this.state.endDate.format("YYYY-MM-DD"),ParkID:t.ParkID,AccommodationID:t.AccommodationID,Adults:this.state.adults,Children:this.state.children,Infants:this.state.infants,ChargeTypeID:this.state.currentOfferCode,SpecialOfferID:r.SpecialOfferID},t.AccommodationType.toUpperCase()=="SITES"&&(n.EquipmentType=this.state.equipment.EquipmentTypeID,n.EquipmentWidth=this.state.equipment.Width,n.EquipmentLength=this.state.equipment.Length,n.EquipmentUnitOfLength=this.state.equipment.Unit),n.ParkID==undefined&&window.BookingStore.state.quickBooking.ParkSelectionID!=""&&(n.ParkID=window.BookingStore.state.quickBooking.ParkSelectionID),window.CartEventBus.$emit(window.CartEvents.ADD_BOOKING,n,function(){i.state.addingToCart=!1},function(n){i.state.addingToCart=!1;n?Common.ShowError(n):Common.ShowError("Unable to add to cart, please try again.")})):this.state.addingToCart=!1}};Vue.component("booking-widget",{template:"#BookingWidgetTemplate",props:["accommodations","is-on-deal-page","offer-code","min-date","max-date"],data:function(){return{store:window.BookingStore,windowWidth:0}},computed:{state:function(){return this.store.state},props:function(){var n=this;return{minDate:function(){return n.store.state.minDate?n.store.state.minDate.format("D MMM YYYY"):null},maxDate:function(){return n.store.state.minDate?n.store.state.maxDate.format("D MMM YYYY"):null},isLandScapeTablet:function(){return window.innerWidth>=1024&&window.innerWidth<=1367}}}},methods:{addToCart:function(){this.store.addToCart()}},created:function(){if(this.store.populateAccommodation(this.accommodations),this.store.state.isOnDealPage=this.isOnDealPage,this.isOnDealPage&&(this.store.state.currentOfferCode=this.offerCode),this.store.prefillSelections(),this.store.PopulateEquipmentTypes(),this.store.GetInitialAvailability(),this.state.dataPrefilled&&this.store.UpdatePrice(),this.minDate&&this.maxDate){var n=moment(this.minDate),t=moment(this.maxDate);n.isValid()&&(this.store.state.minDate=n);t.isValid()&&(this.store.state.maxDate=t)}},mounted:function(){var n=this;window.addEventListener("orientationchange",function(){setTimeout(function(){n.$refs.bookingPanel.$forceUpdate()},500)})}});Vue.component("booking-widget-chevron",{template:"#BookingWidgetChevronTemplate",props:{isQuickBooking:!1},data:function(){return{store:window.BookingStore}},computed:{showCheckInChevron:function(){if(this.store.state.isCheckIn)return this.isQuickBooking&&($(".c-input-date__picker").css("margin-left","0"),$(".c-input-date__picker").css("margin-right","auto")),!0},showCheckOutChevron:function(){if(!this.store.state.isCheckIn)return this.isQuickBooking&&($(".c-input-date__picker").css("margin-left","auto"),$(".c-input-date__picker").css("margin-right","0")),!0}},mounted:function(){}});Vue.component("booking-widget-compare-deals",{template:"#BookingWidgetCompareDealsTemplate",props:["show-deals-widget"],mixins:[MIXIN_BOOKING_WIDGET],computed:{Show:function(){return this.showDealsWidget&&this.currentAccommodation.CurrentPMSResult.length>1},CanAddToCart:function(){return this.canAddToCart}}});Vue.component("booking-widget-compare-deals-wrapper",{mixins:[MIXIN_BOOKING_WIDGET],data:function(){return{store:window.BookingStore}},computed:{dealsToCompare:function(){return this.currentAccommodation.CurrentPMSResult}},methods:{hideModal:function(){this.$parent.closeModal()}}});Vue.use(AsyncComputed);Vue.component("booking-widget-date-wrapper",{data:function(){return{store:window.BookingStore,availabilityLoading:!1,isOpen:!1,fadeCalendar:!0,cleared:!1,rangeDisabled:!1,keepCalendarClosed:!1,currentPage:{}}},props:{isQuickBooking:!1},mixins:[MIXIN_BOOKING_WIDGET],computed:{state:function(){return this.store.state},availableDateRangesForWidget:function(){var n=moment(this.currentPage.year+"-"+this.currentPage.month+"-01","YYYY-MM-DD"),t=moment(n).add(1,"month").endOf("month");return this.getAvailableRangesForDateRange(n,t)},props:function(){var n=this;return{endSelected:function(){n.$data.keepCalendarClosed=!1;n.CalendarOpen()?n.SwapChevrons(!0):(n.$refs.dateInput.openDatepicker(),n.SwapChevrons(!0))},startSelected:function(){n.$data.keepCalendarClosed=!1;n.CalendarOpen()?n.SwapChevrons(!1):(n.$refs.dateInput.openDatepicker(),n.SwapChevrons(!1))},ClearDates:this.ClearDates,DatesSelected:this.datesSelected,CheckoutAvailability:this.CheckoutAvailability,IsCheckIn:this.store.state.isCheckIn,SwapChevrons:this.SwapChevrons,FadeCalendar:this.$data.fadeCalendar,IsOpen:this.$data.isOpen,CloseDatepicker:this.closeDatepicker}},chevronTransition:function(){return this.store.state.chevronsSwapped?(this.store.state.chevronsSwapped=!1,!0):!1}},methods:{UpdateCookie:function(n){var t=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");t=t==""?{}:JSON.parse(t);t.Dates=n;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(t))},CloseCalendar:function(){var t,i,n;this.$refs.dateInput.isDragging&&this.$refs.dateInput.selectedDate!=null&&(this.$refs.dateInput.isDragging=!1,t=moment(this.$refs.dateInput.selectedDate.start)._d,i=moment(this.$refs.dateInput.selectedDate.start).add(1,"days")._d,this.disableRangeSelect(t,i));n=document.getElementById("booking_calendar_close");n&&(n.style.display="none");this.$data.isOpen=!1;this.$refs.dateInput.closeDatepicker();this.$data.fadeCalendar=!0},ClearDates:function(n){var t=this;t.store.clearDates();window.BookingEventBus.$emit("DATE-CHANGED");t.UpdateCookie(null);n&&(this.disableRangeSelect(),this.store.state.adjustmentDate=null,this.$data.cleared=!0,this.store.state.isCheckIn||this.SwapChevrons(null),window.BookingStore.state.rangeSelected=!1);setTimeout(function(){t.$refs.dateInput.isFocused=!0},200)},CheckoutAvailability:function(){Vue.nextTick(function(){var n=this;this.$(".c-day").unbind("click");this.$(".c-day").on("click",function(t){n.window.BookingEventBus.$emit("day-clicked",t.target)});$(".c-day").unbind("mouseover");$(".c-day").on("mouseover",function(t){var i=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);i&&n.toDateOnly?(t.target.click(),toDateOnly=!1):(i&&n.fromDateSelected&&t.target.click(),n.fromDateSelected=!n.fromDateSelected)})})},enableRangeSelect:function(){var i=this,t=i.$refs.dateInput.$refs.datepicker,n=i.$refs.dateInput;n.selectedDate.start.toDateString()==this.store.state.adjustmentDate.toDateString()?(t.$children[0].dragValue={start:n.selectedDate.start,end:moment(n.selectedDate.start).add(1,"days")._d},t.$children[0].value.start=n.selectedDate.start,t.$children[0].value.end=null):n.selectedDate.end.toDateString()==this.store.state.adjustmentDate.toDateString()&&(t.$children[0].dragValue={start:n.selectedDate.end,end:moment(n.selectedDate.end).add(1,"days")._d},t.$children[0].value.start=n.selectedDate.end,t.$children[0].value.end=null);n.isDragging=!0;window.DateFilterStore.state.rangeSelected=!1},disableRangeSelect:function(n,t){var i=this;i.$nextTick(function(){var r=i.$refs.dateInput.$refs.datepicker,u=i.$refs.dateInput;r.dragValue!=null&&n!=undefined&&t!=undefined?(r.$children[0].dragValue=null,r.$children[0].value={start:n,end:t},i.$refs.dateInput.isDragging=!1,i.$refs.dateInput.selectedDate={start:n,end:t}):(r.$children[0].dragValue=null,r.$children[0].value=null,i.$refs.dateInput.isDragging=!1,i.$refs.dateInput.selectedDate=null,i.SwapChevrons(!1));i.$forceUpdate()})},adjustStart:function(n,t){var i=this;i.ClearDates();t.toDateString()!=n.toDateString()?(i.$refs.dateInput.selectedDate.start=t,i.$refs.dateInput.selectedDate.end=n):(i.$refs.dateInput.selectedDate.start=t,i.$refs.dateInput.selectedDate.end=moment(n).add(1,"days")._d);window.DateFilterStore.state.rangeSelected=!0},adjustEnd:function(n,t){var i=this;i.ClearDates();t.toDateString()!=n.toDateString()?(i.$refs.dateInput.selectedDate.end=t,i.$refs.dateInput.selectedDate.start=n):(i.$refs.dateInput.selectedDate.end=moment(t).add(1,"days")._d,i.$refs.dateInput.selectedDate.start=n);window.DateFilterStore.state.rangeSelected=!0},adjustStartAfterEndCheckIn:function(n){var t=this;t.ClearDates();t.$refs.dateInput.selectedDate.start=n;t.$refs.dateInput.selectedDate.end=moment(n).add(1,"day")._d;window.DateFilterStore.state.rangeSelected=!1},applyRangeAdjustment:function(){var n=this,t=n.store.state.adjustmentDate,r=null,i=null;if(n.$refs.dateInput.selectedDate!=null){r=n.$refs.dateInput.selectedDate.start;i=n.$refs.dateInput.selectedDate.end;var u=moment(t),f=moment(r),e=moment(i),o=u.diff(f,"days")*-1,s=u.diff(e,"days");(o<-27||s<-27)&&(window.BookingStore.state.rangeSelected=!1);n.$refs.dateInput.selectedDate&&r!=null&&i!=null&&window.BookingStore.state.rangeSelected?n.store.state.isCheckIn?t<r?(n.adjustStartAfterEndCheckIn(t),n.store.state.adjustedStart=!0,n.store.state.adjustedEnd=!1):(n.adjustEnd(r,t),n.store.state.adjustedStart=!1,n.store.state.adjustedEnd=!0):t>i?(n.adjustStartAfterEndCheckIn(t),n.store.state.adjustedStart=!0,n.store.state.adjustedEnd=!1):(n.adjustStart(i,t),n.store.state.adjustedStart=!0,n.store.state.adjustedEnd=!1):(n.ClearDates(),i?(n.$refs.dateInput.selectedDate.start=t,n.$refs.dateInput.selectedDate.end=null):(n.$refs.dateInput.selectedDate.start=n.$refs.dateInput.$refs.datepicker.value.start,n.$refs.dateInput.selectedDate.end=t))}},GetMoreAvailability:_.debounce(function(n){var t=this,r=moment(n.year+"-"+n.month+"-01","YYYY-MM-DD"),u=moment(r).add(1,"month").endOf("month").add(1,"days"),i;t.currentAccommodation!=undefined&&(i={ParkID:t.currentAccommodation.ParkID,StartDate:r.format(),EndDate:u.format()},i.ParkID!=undefined&&(t.availabilityLoading=!0,t.store.GetAvailability(i,function(){t.availabilityLoading=!1},function(){Common.ShowError("Unable to retrieve availability.");t.availabilityLoading=!1})))},750),FadeCalendar:function(){var n=this;n.$data.fadeCalendar?setTimeout(function(){n.$data.fadeCalendar=!1},155):(n.$data.fadeCalendar=!0,setTimeout(function(){n.$data.fadeCalendar=!1},230))},SwapChevrons:function(n){if(this.FadeCalendar(),this.$refs.dateInput.isDragging||this.isDragging&&n!=null)n==null&&(this.$data.keepCalendarClosed=!0);else if(this.CalendarOpen()?n==!0?this.store.state.isCheckIn=!1:n==!1&&n!=null&&(this.store.state.isCheckIn=!0):this.store.state.isCheckIn=!0,window.BookingStore.state.rangeSelected||n==null)window.BookingStore.state.rangeSelected||n!=null?window.BookingStore.state.rangeSelected&&n==null&&this.store.state.isCheckIn?(this.store.state.isCheckIn=!1,this.FadeCalendar(),this.$data.keepCalendarClosed=!1):window.BookingStore.state.rangeSelected&&n==null&&!this.store.state.isCheckIn&&(this.store.state.isCheckIn=!0,this.FadeCalendar(),this.$data.keepCalendarClosed=!0):(this.store.state.isCheckIn=!this.store.state.isCheckIn,this.$data.keepCalendarClosed=!0);else if(CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES")!=""){var t=JSON.parse(CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES"));t.Dates!=null&&t.Dates.start!=""&&t.Dates.end!=""||(this.store.state.isCheckIn=!0)}},CalendarOpen:function(){return this.$refs.dateInput&&this.store.state?this.$refs.dateInput.showDatepicker:!1}},mounted:function(){var n=this;n.$nextTick(function(){if(n.CheckoutAvailability(),CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES")!=""&&CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES")!=""){var t=JSON.parse(CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES"));t.Dates!=null&&t.Dates.start!=""&&t.Dates.end!=""&&(this.store.state.rangeSelected=!0)}});n.$refs.dateInput.$refs.datepicker.$on("update:fromPage",function(t){if(!t){var i=new moment,r={year:i.year(),month:i.month()+1};n.currentPage=r}else n.availabilityLoading=!0,n.GetMoreAvailability(t),n.currentPage=t});n.$watch("$refs.dateInput.selectedDate",function(t){if(t!=null&&t.start!=null&&t.end!=null){var i=moment(t.start),r=moment(t.end);if(n.store.state.startDate!=null&&n.store.state.endDate!=null&&n.store.state.startDate.isSame(i)&&n.store.state.endDate.isSame(r))return;n.store.state.startDate=moment(t.start);n.store.state.endDate=moment(t.end);window.BookingEventBus.$emit("DATE-CHANGED");n.UpdateCookie(t);n.store.UpdatePrice()}});window.BookingEventBus.$on("DATE-CHANGED",function(){this.$nextTick(function(){n.$refs.dateInput&&(n.$refs.dateInput.selectedDate=n.state.startDate&&n.state.endDate?{start:n.state.startDate.toDate(),end:n.state.endDate.toDate()}:null,n.$forceUpdate(),n.CloseCalendar())})});n.$watch("$refs.dateInput.isFocused",function(){this.$nextTick(function(){n.store.state.adjustmentDate!=null&&n.store.state.rangeSelected&&n.$data.keepCalendarClosed?n.CloseCalendar():(n.isOpen=n.$refs.dateInput.isFocused||n.$refs.dateInput.isActive,n.$data.store.state.bookingWidgetCalendarOpen=n.isOpen)})});n.$watch("$refs.dateInput.isActive",function(){n.isOpen=n.$refs.dateInput.isFocused||n.$refs.dateInput.isActive;n.$data.store.state.bookingWidgetCalendarOpen=n.isOpen});this.state.startDate!=null&&this.state.endDate!=null&&this.$nextTick(function(){n.$refs.dateInput.selectedDate={start:n.state.startDate.toDate(),end:n.state.endDate.toDate()};window.BookingEventBus.$emit("DATE-CHANGED")});document.getElementById("booking_calendar_close").addEventListener("click",function(){n.CloseCalendar()});window.BookingEventBus.$on("accommodation-calendar-cleared",function(){n.$data.cleared=!0});window.BookingEventBus.$on("date-adjusted",function(t){var i,r,u;if(t=="widget"&&n.$refs.dateInput!=undefined){if(i=n.$refs.dateInput.$refs.datepicker,i.value!=null?n.store.state.savedCalendarValue=i.value:n.$data.cleared?n.$data.cleared=!1:(i.value=n.store.state.savedCalendarValue,n.$refs.dateInput.selectedDate=n.store.state.savedCalendarValue),n.applyRangeAdjustment(),i.value&&(r=i.value.start,u=i.value.end),i.dragValue){var f=moment(i.dragValue.start),e=moment(i.dragValue.end),o=f.diff(e,"days")*-1;o>27&&n.enableRangeSelect()}this.$nextTick(function(){i.dragValue!=null&&window.BookingStore.state.rangeSelected&&r!=null&&u!=null&&(n.disableRangeSelect(r,u),n.$data.rangeDisabled=!0)})}})}});Vue.use(AsyncComputed);Vue.component("booking-widget-guest-wrapper",{props:{isQuickBooking:!1},data:function(){return{store:window.BookingStore,active:!1}},methods:{apply:function(){var n=this,t,i;this.$refs.adultInput!=undefined&&(t={adults:this.$refs.adultInput.quantity,children:this.$refs.childrenInput.quantity,infants:this.$refs.infantInput.quantity},this.isQuickBooking&&window.AccommodationEventBus.$emit("guest-filter-update",t),i=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES"),i=i==""?{}:JSON.parse(i),i.Guests=t,CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(i)),this.state.adults=t.adults,this.state.children=t.children,this.state.infants=t.infants,n.isQuickBooking&&this.state.quickBooking.isPark?n.updateFilterPersonaScore():n.isQuickBooking||n.updateFilterPersonaScore(),n.toggle(),n.store.UpdatePrice())},updateFilterPersonaScore:function(){var n=this,t="";n.store.state.adults>2?t+="/api/Personalization/FilteredByGroup":n.store.state.children>=1||n.store.state.infants?t+="/api/Personalization/FilteredByFamily":n.store.state.adults==2&&n.store.state.children==0&&n.store.state.infants==0&&(t+="/api/Personalization/FilteredByNomad");t!=""&&$.ajax({type:"POST",url:t,contentType:"application/json; charset=utf-8",success:function(){},error:function(){}})},toggle:function(){var n=this;this.active=!this.active;n=this;$("body").one("click",function(){});this.active&&(this.$refs.adultInput.quantity=this.state.adults,this.$refs.childrenInput.quantity=this.state.children,this.$refs.infantInput.quantity=this.state.infants,this.$nextTick(function(){$("body").one("click",function(){})}))},close:function(){var n=this;n.active&&this.apply()}},computed:{guestTotal:function(){var n="";return(adultCount=this.store.state.adults,childrenCount=this.store.state.children,infantCount=this.store.state.infants,adultCount>0&&(n+=adultCount==1?", "+adultCount+" adult":", "+adultCount+" adults"),childrenCount>0&&(n+=childrenCount==1?", "+childrenCount+" child":", "+childrenCount+" children"),infantCount>0&&(n+=infantCount==1?", "+infantCount+" infant":", "+infantCount+" infants"),n.startsWith(", ")&&(n=n.substring(2)),n=="")?"Select guests":n},state:function(){return this.store.state}},mounted:function(){var n=this,t=$(".c-booking-widget"),i=t.on("click",function(n){n.stopPropagation()});$(document).on("click",function(){n.close()})}});Vue.component("booking-widget-price-display",{template:"#BookingWidgetPriceDisplayTemplate",mixins:[MIXIN_BOOKING_WIDGET,MIXIN_MEMBERSHIP],props:["allotment","availability-cache-data"],data:function(){return{store:window.BookingStore}},computed:{price:function(){if(this.isTotalPrice){if(this.allotment!=undefined)return this.RoundPrice(this.allotment.Total)}else return this.RoundPrice(this.store.GetCurrentAccommodation().AvailabilityCacheData.DefaultRate.Price)},dynamicSummaryString:function(){var n;if(this.store.state.startDate&&this.store.state.endDate){var u=moment(this.store.state.startDate._d),f=moment(this.store.state.endDate._d),t=this.store.state.children>0?", "+this.store.state.children+" children":"";this.store.state.children==1&&(t=t.replace("children","child"));n=this.store.state.infants>0?", "+this.store.state.infants+" infants":"";this.store.state.infants==1&&(n=n.replace("infants","infant"));var e=this.store.state.adults==1?this.store.state.adults+" adult":this.store.state.adults+" adults",r=f.diff(u,"days"),i=r+" nights - ";return r==1&&(i=i.replace("nights","night")),i+e+t+n}return""},discountPrice:function(){if(this.isTotalPrice){if(this.allotment!=undefined)return this.RoundPrice(this.allotment.Total-this.allotment.MemberDiscount)}else return this.RoundPrice(this.store.GetCurrentAccommodation().AvailabilityCacheData.DefaultRate.DiscountPrice)},discountAmount:function(){return this.RoundDiscountPrice(this.allotment.Discount)},isDeal:function(){return this.isTotalPrice&&this.allotment.IsSpecialRate},isTotalPrice:function(){return!!this.allotment},isMemberOnlyDeal:function(){return this.isDeal},showMemberPrice:function(){return this.isLoggedIn&&!this.isHolidayPerksMember||this.isMemberOnlyDeal},memberPriceEqualToNonMember:function(){return this.discountPrice==this.price},state:function(){return this.store.state},membershipLevelClass:function(){return this.isDeal?this.allotment.MemberOnly?this.isVipPerksMember?"c-pricing__membership--vip":"c-pricing__membership--plus":"c-pricing__membership--holiday":this.isVipPerksMember?"c-pricing__membership--vip":"c-pricing__membership--plus"},membershipLevelLogo:function(){return this.isDeal?this.allotment.MemberOnly?this.isVipPerksMember?this.logos.vipPerks:this.logos.perksPlus:this.logos.holidayPerks:this.isVipPerksMember?this.logos.vipPerks:this.logos.perksPlus},mounted:function(){}}});Vue.component("booking-widget-price-header",{template:"#BookingWidgetPriceHeaderTemplate",mixins:[MIXIN_BOOKING_WIDGET,MIXIN_MEMBERSHIP],data:function(){return{store:window.BookingStore}},computed:{isDeal:function(){return this.isTotalPrice&&this.selectedAllotment.IsSpecialRate},maxRoomsExceeded:function(){return this.store.state.showMaxAccommodationError},isTotalPrice:function(){return this.currentAccommodation.CurrentPMSResult.length>0},availabilityCacheData:function(){return this.currentAccommodation.AvailabilityCacheData},dealName:function(){return this.selectedAllotment.Name},state:function(){return this.store.state},isUnavailable:function(){return this.isTotalPrice?!this.selectedAllotment.IsAvailable:!1},unavailableMessage:function(){return this.selectedAllotment.UnavailableMessage},unavailableHeading:function(){return this.selectedAllotment.UnavailableHeading},showSelectDates:function(){return this.state.startDate!=null&&this.state.endDate!=null?!1:this.isOnDealPage?!0:!1}},methods:{reloadPrice:function(){this.store.ReloadPrice()}}});Vue.component("booking-widget-responsive-price-wrapper",{mixins:[MIXIN_BOOKING_WIDGET],props:["is-quick-booking"],data:function(){return{store:window.BookingStore}},computed:{props:function(){return this.$parent.props},accommodationName:function(){if(window.AccommodationStore!=undefined){var n=this.store.GetCurrentAccommodation();return n!=undefined?n.AccommodationName:""}}}});Vue.component("equipment",{mixins:[MIXIN_BOOKING_WIDGET],template:"#EquipmentTemplate",data:function(){return{store:window.BookingStore,equipmentUnitStore:window.eEquipmentUnitOfLength,realWidth:0,realLength:0}},computed:{isMetres:function(){return this.store.state.equipment.Unit==this.equipmentUnitStore.Metres},unit:function(){return this.isMetres?"m":"ft"},equipment:function(){return this.store.state.equipment},equipmentTypes:function(){return this.store.state.EquipmentTypes},unitValues:function(){return this.isMetres?this.store.state.UnitValuesMetres:this.store.state.UnitValuesFeet}},watch:{equipment:{handler:function(){this.checkforUpdate()},deep:!0}},methods:{toggleUnits:function(){this.unit=="m"?(this.store.state.equipment.Unit=1,this.realWidth=this.realWidth/.3048,this.realLength=this.realLength/.3048):(this.store.state.equipment.Unit=0,this.realWidth=this.realWidth*.3048,this.realLength=this.realLength*.3048);this.realWidth>0&&(this.store.state.equipment.Width=Math.round(this.realWidth));this.realLength>0&&(this.store.state.equipment.Length=Math.round(this.realLength))},lengthChanged:function(n){this.realLength=parseInt(n.target.value)},widthChanged:function(n){this.realWidth=parseInt(n.target.value)},checkCookieForEquipment:function(){try{var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n!=""&&(n=JSON.parse(n),!n.EquipmentTypeID||!n.EquipmentWidth||!n.EquipmentLength||(this.equipment.EquipmentTypeID=n.EquipmentTypeID,this.equipment.Width=n.EquipmentWidth,this.equipment.Length=n.EquipmentLength))}catch(t){}},checkforUpdate:_.debounce(function(){if(this.equipment.Width!=null&&this.equipment.Width!=""&&this.equipment.Length!=null&&this.equipment.Length!=""&&this.equipment.EquipmentTypeID!=""){try{var n=CookieHelper.GetCookieValue(".BIG4_SEARCH_PREFERENCES");n=n==""?{}:JSON.parse(n);n.EquipmentTypeID=this.equipment.EquipmentTypeID;n.EquipmentWidth=this.equipment.Width;n.EquipmentLength=this.equipment.Length;CookieHelper.SetCookieValue(".BIG4_SEARCH_PREFERENCES",JSON.stringify(n))}catch(t){}this.store.UpdatePrice()}},500)},mounted:function(){this.checkCookieForEquipment()}})