{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/components/helpers/helpers.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/same-height/SameHeight.js","webpack:///./src/js/components/helpers/TrackingHelper.js","webpack:///./src/js/components/helpers/urlHelper.js","webpack:///./node_modules/layout-queue/src/LayoutQueue.js","webpack:///(webpack)/buildin/module.js","webpack:///./src/js/components/globalnotification/globalnotification.js","webpack:///./src/js/components/Accordions/accordion-text.js","webpack:///./src/js/components/funnelback/funnelback.js","webpack:///./src/js/components/_init/app.js","webpack:///./src/js/components/_loaders/nestedLoader.js","webpack:///./src/js/components/modals/video.js","webpack:///./src/js/components/timeline/treatment.js","webpack:///./src/js/components/Accordions/section-text.js","webpack:///./src/js/components/Stickynav/stickynav.js","webpack:///./src/js/components/Carousels/consultants.js","webpack:///./src/js/components/Carousels/home.js","webpack:///./src/js/components/Carousels/Gallery.js","webpack:///./src/js/components/TreatmentareaAz/treatmentareaAz.js","webpack:///./src/js/components/finders/locationFinder.js","webpack:///./src/js/components/enquiryForms/callToAction.js","webpack:///./src/js/components/cookies/cookies.js","webpack:///./src/js/components/enquiryForms/enquiryUrlCheck.js","webpack:///./src/js/components/content/relatedContent.js","webpack:///./src/js/components/finders/consultantFinder.js","webpack:///./src/js/components/HospitalHome/HowCanWeHelp.js","webpack:///./src/js/components/helpers/OnlinePaymentHelper.js","webpack:///./src/js/components/financeCalculator/financeCalculator.js","webpack:///./src/js/components/financeCalculator/financeEligibility.js","webpack:///./src/js/components/financeCalculator/address.js","webpack:///./src/js/components/Carousels/ratings.js","webpack:///./src/js/components/ratings/ratings-summary.js","webpack:///./src/js/components/ratings/ratings-list.js","webpack:///./node_modules/url/url.js","webpack:///./node_modules/punycode/punycode.js","webpack:///./node_modules/url/util.js","webpack:///./node_modules/querystring-es3/index.js","webpack:///./node_modules/querystring-es3/decode.js","webpack:///./node_modules/querystring-es3/encode.js","webpack:///./src/js/components/teamlist/teamlist.js","webpack:///./src/js/components/finders/dropdownFinders.js","webpack:///./src/js/components/filters/consultantFilter.js","webpack:///./src/js/components/Consultants/Consultant.js","webpack:///./src/js/components/Carousels/TreatmentCarousel.js","webpack:///./src/js/components/Carousels/PatientFeedbackCarousel.js","webpack:///./src/js/components/healthcareHome/healthcareHome.js","webpack:///./src/js/components/covidsurveyForms/covidsurvey.js","webpack:///./src/js/components/TextReadMore/TextReadMore.js","webpack:///./src/js/components/Articles/articleLoadMore.js","webpack:///./src/js/components/healthcareHome/ScrollToBottom.js","webpack:///./src/js/components/BodyMap/bodyMap.js","webpack:///./src/js/components/enquiryForms/ir35enquiryForm.js","webpack:///./src/js/components/splitContentPanel/splitContentPanel.js","webpack:///./src/js/components/consultantSearchForm/consultantSearchForm.js","webpack:///./src/js/components/Accordions/hospital-locations-list.js","webpack:///./src/js/components/Pricing/pricing.js","webpack:///./src/js/components/Carousels/multiTopSlidingPanel.js","webpack:///./src/js/components/cobpsCalendar/cobps-calendar.js","webpack:///./src/js/components/SearchOverlay/search-overlay.js","webpack:///./src/js/components/LocationApiLoader/location-api-loader.js","webpack:///./src/js/components/Carousels/PromoCarousel.js","webpack:///./src/js/components/Articles/simpleArticlesList.js","webpack:///./src/js/components/TabbedCardListPanel/tabbedCardList.js","webpack:///./src/js/components/_loaders/trackingLoader.js","webpack:///./src/js/components/helpers/SlickTrackingHelper.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","HelpersModule","_classCallCheck","this","init","variable","vars","window","location","search","substring","split","length","pair","replace","results","RegExp","exec","decodeURIComponent","lat1","lon1","lat2","lon2","radlat1","Math","PI","radlat2","theta","radtheta","dist","sin","cos","acos","y","today","Date","thisYear","getFullYear","thisMonth","getMonth","thisDate","getDate","age","vp","innerWidth","desktop","tablet","mobileNav","func","wait","immediate","timeout","context","args","arguments","callNow","clearTimeout","setTimeout","apply","url","href","endsWith","g","Function","eval","e","LayoutQueue","SameHeight","conditionalSetHeights","selector","mediaRule","undefined","matchMedia","matches","setHeights","biggestHeight","forEach","document","querySelectorAll","element","clientHeight","getBiggestHeight","style","height","unsetHeights","add","enqueue","set","unset","TrackingModule","category","action","opt_label","opt_value","opt_noninteraction","ga","nonInteraction","dimension1","dimension2","dimension3","item","text","trim","dest","attr","gaTrackEvent","_this","$","on","trackClickItem","find","children","hasClass","locationItems","secondaryItems","miscItems","UrlHelperModule","mackApi","apilocation","surfacelocation","hostname","indexOf","mockApi","queue","processQueue","task","handleLoad","addEventListener","push","readyState","removeEventListener","trigger","list","clear","webpackPolyfill","deprecate","paths","GlobalNotificationModule","registerClick","preventDefault","removeClass","AccordionTextModule","each","index","addClass","elContent","is","show","hide","next","console","log","onresize","onResize","bindClick","registerResizeHandler","FunnelBackModule","domain","val","col","profile","suggestProfile","collection","searchPathUrl","maxdist","urlParam","cord","query","all","consultants","treatments","other","hospitalProfile","replaceAll","hospital","convertStringToUpperCaseEachWord","showList","setClickEvents","inp","currentFocus","that","addActive","x","classList","remove","removeActive","requestAutocompleteResults","data","html","append","disp","keyCode","path","target","parents","success","ajax","type","autocomplete","getElementById","textContent","click","submitForm","str","words","toUpperCase","substr","join","_nestedLoader","_trackingLoader","NestedLoader","SlickTrackingLoader","_video","_treatment","_sectionText","_accordionText","_stickynav","_consultants","_home","_Gallery","_treatmentareaAz","_locationFinder","_callToAction","_enquiryUrlCheck","_relatedContent","_consultantFinder","_HowCanWeHelp","_OnlinePaymentHelper","_financeCalculator","_financeEligibility","_ratings","_ratingsSummary","_ratingsList","_teamlist","_dropdownFinders","_consultantFilter","_globalnotification","_Consultant","_TreatmentCarousel","_PatientFeedbackCarousel","_healthcareHome","_covidsurvey","_TextReadMore","_articleLoadMore","_ScrollToBottom","_bodyMap","_ir35enquiryForm","_splitContentPanel","_consultantSearchForm","_hospitalLocationsList","_pricing","_multiTopSlidingPanel","_cobpsCalendar","_funnelback","_searchOverlay","_locationApiLoader","_PromoCarousel","_simpleArticlesList","_tabbedCardList","mapApiCallbacks","LocationApiLoader","SearchOverlayModule","funnelBackModule","VideoModalModule","GalleryModule","RelatedContentModule","CarouselConsultantModule","TreatmentareasAzModule","ConsultantSearchFormModule","ConsultantFinderModule","CarouselHomeModule","ArticleLoadMoreModule","BodyMapModule","SplitContentPanelModule","TabbedCardListModule","TimelineModule","AccordionSectionTextModule","LocationFinderModule","StickynavModule","CallToActionModule","EnquiryUrlCheckModule","FinanceCalculatorModule","FinanceEligibilityModule","TreatmentCarouselModule","HomeIntroductionPanelModule","ScrollToBottomModule","ir35enquiryFormModule","PromoCarousel","SimpleArticlesListModule","PatientFeedBackCarouselModule","HowCanWeHelpModule","TextReadMoreModule","CarouselRatingsModule","OnlinePaymentModule","RatingsSummaryModule","RatingsListModule","Teamlistmodule","ConsultantProfilemodule","CobpsCalendarModule","DropdownFindersModule","ConsultantFilterModule","CovidSurveyModule","HospitalLocationsListModule","PricingModule","MultiTopSlidingPanelModule","dataType","getElementsByTagName","dataset","dtype","loadFunnelBack","loadSearchOverlay","loadAcord","loadHome","loadHomeCarousel","loadPrices","loadHospitalHome","loadTreatments","loadSymptoms","loadScans","loadConditions","loadLocations","loadTreatmentareas","loadTreatmentareasAz","loadModuleContentPage","loadOnlinePayments","loadFinanceCalculator","loadFinanceEligibility","loadRatings","loadSimpleFacilityHome","loadTeamlist","loadConsultantsProfile","loadConsultants","loadVideoModule","loadPromoContent","loadCovidModule","loadContentHubArticle","loadArticleLoadMore","loadEnquiries","loadLocationApiLoader","videoSrc","removeData","dataURL","async","cache","response","con","header","copy","Description","accordionContent","AccordionItems","prev","properties","timelineSlider","timelineSlickArrow","timelineRange","slick","mobileFirst","responsive","breakpoint","settings","dots","infinite","slidesToShow","slidesToScroll","arrows","fadeOut","fadeIn","rangeIndex","rangeSliderIsHidden","newSlickIndex","calcRangeIndexToSlickIndex","moveSliderByIndex","updateGradientIfSlickIsDisabled","event","slickIndex","getSlickIndex","setRangeIndex","resizeTimeout","equalHeights","off","highestBox","loadSlick","bindRangeChange","bindSlickArrowClick","bindSlickSwipe","bindToggleTimelineView","bindResize","bindInteractiveView","ShowTimeLineViewAsBulletedList","ShowTimeLineViewAsList","unbindResize","navigationSelector","elem","bounding","getBoundingClientRect","top","left","bottom","innerHeight","documentElement","right","clientWidth","selectCurrentSection","itemSelected","closest","closestDist","el","querySelector","rect","abs","raf","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","oRequestAnimationFrame","$window","lastScrollTop","scrollTop","loop","scroll","_this2","toggle","css","registerScrollListener","sliderSelector","sliderItemSelector","initialSlide","nodeId","hospitalId","treatmentId","documentType","contentId","consultantsRepoItems","consultantsRepoDate","refreshTimeInMinutes","usePicker","hidePractisingAt","disableLocalStorage","Storage","localStorage","getConsultantsRepoLocalStorage","c_baseUrl","hospitalid","treatmentid","treatmentAreaId","nodeid","saveConsultantsRepoDateLocalStorage","saveConsultantsRepoLocalStorage","loadHandleBars","hasLocalStorage","setItem","JSON","stringify","getCurrentIsoDate","getItem","json","parse","now","toISOString","date","minutes","getTime","saveConsultantsRepoDate","expirationDate","addMinutes","imgLiquid","horizontalAlign","archive","keys","allStorage","hasItems","isToday","currentConsultant","consultantsRepoDateKey","repoDateValue","repoDate","formatDate","removeItem","dd","mm","yyyy","addOpacity","hideAvailability","HideAvailability","source","Handlebars","compile","template","after","addImageLiquid","validDateToUseLocalRepo","loadLocal","loadRemote","removeOldLocaleStorage","centerMode","treatmentLinks","letter","searchBarRow","searchCriteriaIsMatched","letterClassName","Text","toLowerCase","subLetterClassName","alphaTemplate","Url","addToAlphaResults","remainder","selectedLetterClassName","emptyItems","$this","currentTarget","isSubletter","parent","buildAzBar","showHideContent","_this3","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","iterator","done","includes","addToSearchResults","err","return","_this4","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","_this5","treatmentareaazToggle","isHidden","animate","offset","_this6","offsetParent","content","isMobile","isCurrentlyOn","registerAlphaLinkClick","registerSearchTermTypeahead","registerSearchTermSubmit","registerViewAllButton","registerCloseSearchButton","mobileAccordion","helpersModule","lat","lng","treatment","doctype","default","showAll","max","totalRecords","hasSpirgpSetUp","hasBupaEnabled","hasBreastClinicEnabled","setup","scrollToResolver","isMobileDevice","jump","parseInt","body","lastjump","finders","$body","groupTreatmentArea","setupGoogleApi","orientation","navigator","userAgent","getParameterByName","latlng","parseFloat","google","maps","Geocoder","geocode","status","address","formatted_address","searchInput","locationFinderBindResults","componentipc","showCount","options","componentRestrictions","country","types","getUrlParams","jQuery","places","Autocomplete","showMoreClick","input","_addEventListener","attachEvent","addEventListenerWrapper","listener","orig_listener","suggestion_selected","which","simulated_downarrow","Event","selectFirstOnEnter","addDomListener","cancelBubble","addListener","place","getPlace","address_components","LatLng","geometry","appendTrailingSlash","navigationUrl","setUrlParamsAndNavigateToDataUrl","allowScroll","componentForm","redirectToDataUrl","showResults","addressurl","userLatLong","filterString","useHcpUrl","specialityId","method","params","callMethod","locations","latlong","distance","calculateDistance","lon","distanceFriendly","toFixed","sort","a","b","unbind","$content","$contentMini","slice","accordion_click","hasBreastClinicSetup","trimmedList","lt","dataUrl","hasSpireGpSetup","useHeroSetup","sortLocationsByDistance","resultsInHeroStyle","resultsInSpireGpStyle","resultsStandardStyleWithOneStopeBreastFilter","error","XMLHttpRequest","textStatus","errorThrown","getScriptOnce","successhandler","loaded","getScript","script","jqXHR","_helpers","_cookies","cookiesHelper","CookieHelper","config","ctaSelector","$ctaHandle","sessionStorage","writeCookie","$cta","cookieKey","cookieKeySurvey","cookie","readCookie","$bannerContent","$bannerToggle","$bannerCTA","bannerMaximised","desktopSurveyMaxCount","mobileSurveyMaxCount","$surveyModal","surveyMaxCount","isDesktop","firstPage","modalUrl","protocol","host","open","days","setTime","cookieString","toGMTString","cookies","charAt","dataEnquiry","toggleClass","hospitalIds","ready","consultantType","URLSearchParams","Promise","resolve","reject","result","jsonResponse","parseJSON","suggestions","Suggestions","Error","count","ajaxUrl","getFinderResults","then","NodeId","Display","prop","consultantRadioButtonValue","hosVal","postcode","SetMap","$form","filterConsultantType","filterTreatmentSpeciality","filterLocation","filterName","submit","GeocoderStatus","OK","contentType","panelRqst","getAttribute","filter","availableTags","fetch","res","setupHospitalDropdown","setupTreatmentDropdown","setupSpecialityDropdown","handleRadioChange","registerDropdownClicks","resetClick","searchClick","navigation","setupFilter","setupAutoComplete","ConsultantSearchClick","hospitalName","selectedHospitalId","tfilter","sfilter","nStr","x1","x2","rgx","test","humanizeNumber","intLoanAmountPercent","intTotalMonthlyPayment","interestPercent","round","decLoanAmountDeg","interestDeg","formattedCurrency","currentTotalPercent","currentRepayAmount","currentInterestPercent","updateChart","animateUpdateChart","intPrice","intDeposit","intLoanTermInMonths","fnDone","fnFail","calculateFinanceArguments","price","deposit","loanTermInMonths","decApr","APR","intLoanValue","LoanValue","decTotalInterestPayable","TotalInterestPayable","Term","intDepositAmount","Deposit","strRateCardProductId","RateCardProductId","fail","always","treatmentPrice","treatmentPriceValue","Number","depositAmount","intLoanPeriod","getLoanPeriodInMonths","isNaN","calculateFinance","apr","intLoanAmount","loanAmountFormatted","depositAmountFormatted","loanPeriodFormatted","aprFormatted","decTotalRepayAmount","totalRepayAmountFormatted","totalRepayAmountPerMonthFormatted","decTotalToRepayPlusDeposit","intTreatmentPrice","decInterestPercent","decLoanAmountPercent","decTotalMonthlyPayment","strEligibilityLink","constructEligibilityLink","strTreatmentCode","strTreatmentName","strHospitalName","$checkEligibilityButton","clearErrorMessage","setErrorMessage","slider","min","enforcedMin","supportsProgressTrack","percent","$sliderInput","intNewMaximum","$dataLabels","$rangeLabels","$rangeLabelsMobile","intRangeCount","intScaleStep","floor","strNewRangeLabels","intScaleStepMobile","strNewRangeLabelsMobile","$currencyInput","stringCurrencyInputValue","$slider","_typeof","fnFormatter","updateSlider","strValue","depositSliderMin","ceil","depositSliderMax","loanAmountSliderMin","loanAmountSliderMax","depositMin","depositMax","loanAmountMin","loanAmountMax","$loanPeriodSlider","$loanAmountSlider","$depositSlider","$updateQuote","disableAllButPrice","$treatmentPriceInput","strErrorMessage","$errorContainer","getIntFromCurrencyInput","calculateSliderLimits","match","isWebKit","isInternetExplorer","returnValue","strEligibilityPageUrl","$calculatorContainer","disableUserInput","updateSliderAndTextField","intLoanAmountVal","formatAsMonths","toString","$input","strSanitisedVal","minMaxValues","blnHasValidValues","setMonetaryScale","enableUserInput","intVal","intOriginalPrice","updateQuote","isFF","sheet","head","appendChild","createElement","hasValidPrice","priceIsBlank","MINIMUM_ADDRESS_HISTORY_YEARS","$addressForms","showHideNextYears","$addressForm","$yearsAtAddress","$nextYears","$prevYears","prevAll","sumOfYears","currentVal","sumPreviousYears","$nextYear","first","$addressNotFound","$addressSection","$addressDropdown","$fieldsWithValues","nextAll","_address2","validator","setDefaults","highlight","unhighlight","submitHandler","form","$submitButtons","$submitContainers","ignore","defaultRangeValidator","methods","range","param","checked","addMethod","$day","$month","month","$year","year","$threeFieldDateOfBirth","valid","rules","threeFieldDateOfBirth","$financeEligibility","$monthlyRentAmount","$residentialStatusSelect","$selfEmployedGroup","$employedGroup","$notEmployedGroup","$employmentStatusSelect","$allEmploymentFields","strSelectedVal","not","formId","wrapper","eq","empty","Id","lookupId","Address1","blur","BuildingNumber","Address2","Street","City","Postcode","items","ratings","r_baseUrl","summary","chart","barInners","obj","width","loadBars","hasHospital","Hospital","HospitalCode","getResults","seed","dataContainer","listingContainer","output","pagination","dataSource","locator","totalNumberLocator","TotalRows","prevText","nextText","pageSize","callback","stars","RatingVal","comment","Headline","Reason","gethospitals","punycode","util","slashes","auth","port","hash","pathname","urlParse","relative","resolveObject","format","isString","protocolPattern","portPattern","simplePathPattern","unwise","concat","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","file","http:","https:","ftp:","gopher:","file:","querystring","parseQueryString","slashesDenoteHost","isObject","u","TypeError","queryIndex","splitter","uSplit","rest","simplePath","proto","lowerProto","atSign","hostEnd","hec","lastIndexOf","parseHost","ipv6Hostname","hostparts","part","newpart","j","k","charCodeAt","validParts","notHost","bit","unshift","toASCII","h","ae","esc","encodeURIComponent","escape","qm","rel","tkeys","tk","tkey","rkeys","rk","rkey","v","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","pop","isNullOrUndefined","authInHost","isNull","last","hasTrailingSlash","up","splice","isAbsolute","global","__WEBPACK_AMD_DEFINE_RESULT__","root","nodeType","freeGlobal","self","maxInt","base","tMin","tMax","skew","damp","initialBias","initialN","delimiter","regexPunycode","regexNonASCII","regexSeparators","errors","overflow","not-basic","invalid-input","baseMinusTMin","stringFromCharCode","String","fromCharCode","RangeError","map","array","fn","mapDomain","string","parts","ucs2decode","extra","counter","ucs2encode","basicToDigit","codePoint","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","decode","out","basic","oldi","w","baseMinusT","inputLength","bias","encode","handledCPCount","basicLength","q","currentValue","handledCPCountPlusOne","qMinusT","version","ucs2","toUnicode","arg","qs","sep","regexp","maxKeys","len","kstr","vstr","idx","isArray","Array","xs","stringifyPrimitive","isFinite","objectKeys","ks","f","scrollToTargetAdjusted","loadCarousel","buildHeaderContentLinks","links","els","cp","linkName","setAttribute","title","innerText","rowObj","link","headerOffset","offsetPositon","scrollTo","behavior","_container","_selectedId","_selectedText","_value","select","dropdown","selected","display","before","delegate","removeAttr","stopPropagation","focused_option","valThis","_p","create_custom_dropdowns","CollapseOnlyOnMobile","actionUrl","selectedCheckboxes","bookable","searchParams","treatmentOrSpeciality","locationChkBox","lettercheckbox","pageload","ButtonClicks","toggleReadMoreButton","setFocusToEnquiryForm","$button","$textContainer","scrollX","position","scrollY","autoplay","autoplaySpeed","pauseOnHover","getCurrentIndex","LoadCarousel","cssEase","variableWidth","surveyForm","update","getParsleyConfig","errorsContainer","pEle","$element","uiEnabled","customValidator","Parsley","addValidator","requirementType","validateString","requirements","parsleyInstance","recaptchaExpired","grecaptcha","reset","thisForm","sumbitForm","parsley","getResponse","$submitButton","validate","answer1","answer2","answer3","answer4","answer5","answer6","answer7","answer8","answer9","answer10","answer11","surveyFields","clinicalOrderId","getQueryStringByName","Answer1","Answer2","Answer3","Answer4","Answer5","Answer6","Answer7","Answer8","Answer9","Answer10","Answer11","ResultCode","successData","SurveyStatus","ResponseCovid","tooltip","placement","compId","articleLoadMoreButton","changeFilter","newToHealthCareFilterChange","resetFilters","button","listingId","topic","perPage","parentId","listingWrapper","opacity","processData","filterValue","totalArticles","swapTags","parentDiv","getElementsByClassName","childArticlesonPage","articleCount","MaxCount","lastSectionText","clickPainPoint","changeGender","genderProcess","gender","bodyPartId","xhr","_TrackingHelper","enquiryForm","classHandler","$dobErrorRequiredContainer","$dobContainer","day","$row","getAge","messages","en","emailValidator","_","debounce","removeLastComma","$spinner","selectedHospital","selectedHospitalValue","selectedSpeciality","firstName","surname","emailAddress","phoneNum","enquiryFields","Location","speciality","physicianCode","comments","nearestHospitalName","nearestHospitalId","postForm","postToThankYou","containerPanel","parentPanel","filterByBookable","assign","ConsultantSearchFormClicks","resize","ClickEvents","amount","addCommas","treatmentName","treatmentCode","showFinanceCalculatorLink","initialConsultantFeeMissingText","overridePriceFeeMissingText","enquiryFormUrl","innerTemplate","ProceduresApi","monthlyPayment","loanAmount","depositTyped","term","representativeAprTyped","totalAmountPayable","procedureName","Procedure","procedureCode","ProcedureCode","initialConsultantFee","InitialConsultation","formatToCurrency","TreatmentPrice","guidePrice","GuidePrice","TreatmentLoan","MonthlyPayment","LoanAmount","formatToPercentage","RepresentativeAPR","TotalAmountPayable","financeCalculatorlink","RateCardPrice","ConsultantPrice","AnaesthetistPrice","ison","treatmentUrl","loadPricingTemplate","id","endpoint","accordionId","ShowInPriceList","TreatmentName","Code","GenerateMultiTopSlidingPanelTemplate","injected","dataIcon","dataText","GenerateMultiTopSlidingPanelHtml","icon","active","funnelbackModule","bodyOverflow","locationLookupSetup","searchOverlay","clearAndHideSuggestions","geolocation","getCurrentPosition","coords","latitude","longitude","lookup","fields","strictBounds","callbacks","mobileSize","refresh","addBack","panelToShow","setupClicks","_SlickTrackingHelper","SlickTrackingModule","slickItems"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,aAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAzB,EAAA6B,EAAA,SAAA1B,GACA,IAAAS,EAAAT,KAAAqB,WACA,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DjC,EANXxG,MAMmB2G,KAAK,sBAAsBlG,QAGxD+F,EATUxG,MASFiJ,4VCpBC8H,gCAET,SAAAA,iGAAchR,CAAAC,KAAA+Q,GAENvK,EAAE,qBAAqB/F,OAAS,GAChCT,KAAKC,uDAKTuG,EAAE,qCAAqCC,GAAG,QAAS,SAAU3C,GAGzD,GAFAA,EAAE0E,iBAEEhC,EAAExG,MAAM+f,SAASlZ,SAAS,cAC1BsC,QAAQC,IAAI,qBADhB,CAKA5C,EAAE,4DAA4DiC,YAAY,wBAC1EjC,EAAE,4DAA4DqC,SAAS,wBACvErC,EAAE,0DAA0DiC,YAAY,cAExEjC,EAAExG,MAAMyI,YAAY,wBACpBjC,EAAExG,MAAM6I,SAAS,wBACjBrC,EAAExG,MAAM+f,SAASlX,SAAS,cAE1B,IAAI4vC,EAAcjyC,EAAExG,MAAMqG,KAAK,OAE/BG,EAAE,+BAA+BiC,YAAY,oBAG7CjC,EAFoB,IAAMiyC,GAET5vC,SAAS,sDAQ9B7I,KAAK04C,+ZCvCbC,EAAAj7C,EAAA,OAEasP,+BACR,SAAAA,iGAAcjN,CAAAC,KAAAgN,GACVhN,KAAKC,gDAGiB,IAAI24C,oYCPnCl7C,EAAA,MAEak7C,+BACR,SAAAA,iGAAc74C,CAAAC,KAAA44C,GACV54C,KAAKC,sDAMLuG,EAAE,kBAAkBC,GAAG,QAAS,SAAU,6CAQ1CzG,KAAK64C","file":"app.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 80);\n","/* Null optional values should not be passed to ga send as subsequent optional values will not register:\r\n\"If you want to provide a value only for the second or 3rd optional parameter, you need to pass in undefined for the preceding optional parameter.\"\r\nhttps://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiEventTracking#_gat.GA_EventTracker_._trackEvent\r\n*/\r\n\r\nexport class HelpersModule {\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n getQueryVariable(variable) {\r\n\r\n const query = window.location.search.substring(1);\r\n const vars = query.split(\"&\");\r\n for (var i = 0; i < vars.length; i++) {\r\n const pair = vars[i].split(\"=\");\r\n if (pair[0] == variable) { return pair[1]; }\r\n }\r\n return (false);\r\n }\r\n\r\n getQueryStringByName(name) {\r\n\r\n name = name.replace(\"/[\\[]/\", \"\\\\[\").replace(\"/[\\]]/\", \"\\\\]\");\r\n const regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\r\n results = regex.exec(location.search);\r\n return results === null ? \"\" : decodeURIComponent(decodeURIComponent(results[1].replace(/\\+/g, \" \")));\r\n }\r\n\r\n getCalculatedDistance(lat1, lon1, lat2, lon2) {\r\n\r\n const radlat1 = Math.PI * lat1 / 180;\r\n const radlat2 = Math.PI * lat2 / 180;\r\n const radlon1 = Math.PI * lon1 / 180;\r\n const radlon2 = Math.PI * lon2 / 180;\r\n const theta = lon1 - lon2;\r\n const radtheta = Math.PI * theta / 180;\r\n let dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\r\n dist = Math.acos(dist);\r\n dist = dist * 180 / Math.PI;\r\n dist = dist * 60 * 1.1515;\r\n \r\n return dist;\r\n }\r\n\r\n getAge(d,m,y){\r\n\r\n const today = new Date(),\r\n thisYear = today.getFullYear(),\r\n thisMonth = today.getMonth() + 1,\r\n thisDate = today.getDate();\r\n\r\n let age = thisYear - y;\r\n\r\n if(thisMonth < m || thisMonth === m && d <= thisDate){\r\n age--;\r\n }\r\n\r\n return age;\r\n }\r\n\r\n breakpoints(vp) {\r\n var bp = {\r\n desktop: 991, //960\r\n tablet: 600,\r\n mobileNav: 480,\r\n };\r\n let output = (window.innerWidth > bp[vp]);\r\n return output;\r\n }\r\n\r\n debounce(func, wait, immediate) {\r\n var timeout;\r\n return function() {\r\n var context = this, args = arguments;\r\n var later = function() {\r\n timeout = null;\r\n if (!immediate) func.apply(context, args);\r\n };\r\n var callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n }\r\n\r\n getParameterByName(name, url) {\r\n if (!url) url = window.location.href;\r\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\r\n var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),\r\n results = regex.exec(url);\r\n if (!results) return null;\r\n if (!results[2]) return '';\r\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\r\n }\r\n\r\n appendTrailingSlash(url) {\r\n return url += url.endsWith(\"/\") ? \"\" : \"/\";\r\n }\r\n\r\n init() {\r\n }\r\n\r\n}\r\n\r\n","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\r\n} catch (e) {\r\n\t// This works if the window reference is available\r\n\tif (typeof window === \"object\") g = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n","\"use strict\";\n\nvar LayoutQueue = require('layout-queue');\n\nvar SameHeight = (function () {\n\n function getBiggestHeight(selector) {\n var biggestHeight = 0;\n [].forEach.call(document.querySelectorAll(selector), function(element) { \n if (element.clientHeight > biggestHeight) {\n biggestHeight = element.clientHeight;\n }\n });\n return biggestHeight;\n }\n\n function enqueue(selector, mediaRule) {\n LayoutQueue.add(unsetHeights, [selector]); \n LayoutQueue.add(conditionalSetHeights, [selector, mediaRule]); \n }\n\n function conditionalSetHeights(selector, mediaRule) {\n if (mediaRule === undefined || window.matchMedia(mediaRule).matches) {\n setHeights(selector);\n }\n }\n\n function setHeights(selector) {\n var biggestHeight = getBiggestHeight(selector);\n [].forEach.call(document.querySelectorAll(selector), function(element) {\n element.style.height = biggestHeight + 'px';\n });\n }\n\n function unsetHeights(selector) {\n [].forEach.call(document.querySelectorAll(selector), function(element) {\n element.style.height = \"auto\";\n });\n }\n \n return {\n init: function (selector, mediaRule) {\n enqueue(selector, mediaRule);\n },\n set: function (selector) {\n setHeights (selector);\n },\n unset: function (selector) {\n unsetHeights(selector);\n }\n } \n})();\n\nmodule.exports = SameHeight;","\r\n\r\nexport class TrackingModule {\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n gaTrackEvent(category, action, opt_label, opt_value, opt_noninteraction) {\r\n if (opt_label === null) opt_label = undefined;\r\n if (opt_value === null) opt_value = undefined;\r\n\r\n try {\r\n ga('send', 'event', category, action, opt_label, opt_value,\r\n {\r\n nonInteraction: opt_noninteraction,\r\n 'dimension1': 'New Website Hit',\r\n 'dimension2': 'New Website Session',\r\n 'dimension3': 'New Website User'\r\n\r\n });\r\n\r\n } catch (e) {\r\n // console.log(e);\r\n }\r\n }\r\n\r\n trackClickItem(item, category, location) {\r\n var name = item.text().trim();\r\n var dest = item.attr('href').trim();\r\n this.gaTrackEvent(category, \"Click\", \"Current URL: \" + location + \", Navigation item: \" + name + \", Link: \" + dest, undefined, true);\r\n }\r\n\r\n globalItems() {\r\n\r\n var _this = this;\r\n\r\n $(\".site-header__top-menu\").on(\"click\", \".site-header__top-menu__item:not(.js-toggle-site-header__locations) \", function (e) {\r\n _this.trackClickItem( $(this).find('a'), \"Global Navigation\", window.location.href);\r\n });\r\n }\r\n\r\n locationItems() {\r\n\r\n var _this = this;\r\n\r\n $(\".site-header__locations .site-header__locations__list\").on(\"click\", \"li\", function (e) {\r\n _this.trackClickItem( $(this).children('a'), \"Location Navigation\", window.location.href);\r\n });\r\n }\r\n\r\n primaryItems() {\r\n \r\n var _this = this;\r\n\r\n $(\".site-header__nav\").on(\"click\", \".site-nav__list__item\", function (e) {\r\n _this.trackClickItem( $(this).children('a'), \"Primary Navigation\", window.location.href);\r\n });\r\n\r\n //Mobile\r\n $(\".site-nav-mobile\").on(\"click\", \".site-nav-mobile__list__item\", function (e) {\r\n _this.trackClickItem( $(this).children('a'), \"Primary Navigation\", window.location.href);\r\n });\r\n }\r\n\r\n secondaryItems() {\t\t\r\n\r\n var _this = this;\r\n\r\n $(\".site-nav__l1 .site-nav__l2\").on(\"click\", \".site-nav__column__item\", function (e) {\r\n _this.trackClickItem( $(this).children('a'), \"Secondary Navigation\", window.location.href);\r\n });\r\n\r\n //Mobile\r\n $(\".site-nav-mobile__l1 .site-nav-mobile__l2\").on(\"click\", \".site-nav-mobile__list__item\", function (e) {\r\n _this.trackClickItem( $(this).children('a'), \"Secondary Navigation\", window.location.href);\r\n });\r\n }\r\n\r\n footerItems() {\t\t\r\n\r\n var _this = this;\r\n\r\n $(\".footerlinks\").on(\"click\", \".footerlinks__item\", function (e) {\r\n _this.trackClickItem( $(this).children('a'), \"Footer Navigation\", window.location.href);\r\n });\r\n }\r\n\r\n miscItems() {\t\t\r\n\r\n var _this = this;\r\n\r\n // homepage hero button\r\n //$(\".hero-home__text-inner\").on(\"click\", \"p\", function (e) {\r\n //_this.trackClickItem( $(this).children('a'), \"Button\", window.location.href);\r\n //});\r\n\r\n // enquire online button\r\n $('*[data-enquiry-url-check]').on(\"click\", function (e) {\r\n _this.trackClickItem( $(this), \"Enquiry CTA\", window.location.href);\r\n });\r\n\r\n //Enquiry form CTA buttons\r\n $('.call-to-action__link').on('click', function () {\r\n if ($(this).hasClass('call-to-action__link--enquiry')) {\r\n _this.trackClickItem( $(this), \"Enquiry CTA\", window.location.href);\r\n }\r\n if ($(this).hasClass('call-to-action__link--callback')) {\r\n _this.trackClickItem( $(this), \"Call back CTA\", window.location.href);\r\n }\r\n });\t\r\n\r\n //Mobile enquiry form CTA phone numbers\r\n //$('.call-to-action--mobile-nav').on('click', '.call-to-action__tel', function () {\r\n // _this.trackClickItem( $(this), \"Telephone number CTA\", window.location.href);\r\n //});\t\r\n\r\n }\r\n \r\n\r\n allItems() {\r\n //this.globalItems();\r\n this.locationItems();\r\n // this.primaryItems();\t \r\n this.secondaryItems();\r\n //this.footerItems();\r\n this.miscItems();\r\n }\r\n\r\n\r\n init() {\r\n \r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n","export class UrlHelperModule {\r\n constructor() {\r\n this.mackApi = false;\r\n this.apilocation = \"/uapi/\";\r\n this.surfacelocation = \"/usurface/\";\r\n this.init();\r\n }\r\n\r\n init() {\r\n var that = this;\r\n //comment this out on live\r\n if (location.hostname.indexOf('localhost') > -1 || location.hostname.indexOf(\".\") === -1) {\r\n that.apilocation = '/umbraco/api/';\r\n that.surfacelocation = '/umbraco/surface/';\r\n that.mockApi = true;\r\n }\r\n }\r\n}","\"use strict\";\n\nvar LayoutQueue = (function () {\n var queue = [];\n\n function processQueue() {\n queue.forEach(function(task) {\n task.action.apply(this, task.args);\n });\n }\n\n function handleLoad() {\n return processQueue();\n }\n\n window.addEventListener('resize', function() {\n processQueue('resize');\n }); \n\n return {\n add: function (action, args) {\n queue.push({\n action: action,\n args: args\n });\n if(document.readyState === \"complete\") {\n processQueue();\n } else {\n window.removeEventListener('load', handleLoad);\n window.addEventListener('load', handleLoad);\n }\n },\n trigger: function () {\n processQueue();\n },\n list: function () {\n return queue;\n },\n clear: function () {\n queue = [];\n }\n };\n})();\n\nmodule.exports = LayoutQueue;","module.exports = function(module) {\r\n\tif (!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif (!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n","export class GlobalNotificationModule {\r\n constructor() {\r\n \r\n this.init();\r\n \r\n }\r\n\r\n init() {\r\n let _this = this;\r\n\r\n $(window).on('load', function () {\r\n \r\n _this.registerClick();\r\n \r\n });\r\n }\r\n\r\n registerClick() {\r\n $('.panel-title').on('click', function (e) {\r\n e.preventDefault();\r\n // $('#collapseTwo').removeClass('DefaultDiv');\r\n $('#collapseTwo').removeClass('toggleDiv');\r\n });\r\n }\r\n}","export class AccordionTextModule {\r\n constructor() {\r\n if ($(\".container-component__accordion-text\").length > 0) {\r\n this.init(); \r\n }\r\n }\r\n\r\n applyCssOnMobile() {\r\n const mq = window.matchMedia( \"(min-width: 480px)\" );\r\n\r\n if (mq.matches) {\r\n $('.container-component__accordion-text').removeClass('container-component__accordion-text'); \r\n } else {\r\n\r\n $( \".container-component__accordion-text\" ).each(function( index ) {\r\n\r\n if (index >= 2) {\r\n $(this).addClass('container-component__accordion-text');\r\n }\r\n });\r\n }\r\n }\r\n\r\n hideContent() {\r\n let elContent = '.container-component__accordion-text .accordion-text__content';\r\n if ($(elContent).is(\":hidden\")){\r\n $(elContent).show();\r\n } else {\r\n $(elContent).hide();\r\n } \r\n }\r\n\r\n bindClick() {\r\n\r\n let elHeading = '.container-component__accordion-text .accordion-text__heading';\r\n \r\n $(document).on( \"click\", elHeading, function() {\r\n\r\n let currentContent = $(this).next('.accordion-text__content');\r\n let isHidden = currentContent.is(\":hidden\");\r\n \r\n if (isHidden){\r\n $(this).next('.accordion-text__content').show();\r\n $(this).addClass('accordion-text__heading--active');\r\n } else {\r\n $(this).next('.accordion-text__content').hide();\r\n $(this).removeClass('accordion-text__heading--active');\r\n }\r\n });\r\n\r\n $(document).on(\"click\", \".js-accordion__toggle\", function (e) {\r\n e.preventDefault();\r\n\r\n console.log($(this));\r\n\r\n if ($(this).hasClass('is-on')) {\r\n $(this).removeClass(\"is-on\");\r\n }\r\n else {\r\n $(this).addClass(\"is-on\");\r\n }\r\n });\r\n\r\n }\r\n\r\n registerResizeHandler(){\r\n window.onresize = this.onResize.bind(this);\r\n }\r\n\r\n onResize(){\r\n //this.applyCssOnMobile();\r\n }\r\n\r\n init() { \r\n this.bindClick();\r\n this.registerResizeHandler();\r\n }\r\n}\r\n \r\n \r\n\r\n\r\n\r\n\r\n","export class FunnelBackModule {\r\n\r\n constructor() {\r\n this.domain = $(\"#funnelbackDomain\").val();\r\n const col = $(\"#funnelbackCollection\").val();\r\n this.profile = \"/s/search.json?profile=spire-website\";\r\n this.suggestProfile = \"/s/suggest.json?profile=spire-website\"; \r\n this.collection = \"collection=\" + col;\r\n this.searchPathUrl = \"/search\";\r\n\r\n this.maxdist = this.urlParam('maxdist'); // miles\r\n this.cord = this.urlParam('origin');\r\n this.query = this.urlParam('query');\r\n let profile = this.urlParam('profile');\r\n\r\n // Filter\r\n this.all = false;\r\n this.consultants = false;\r\n this.treatments = false;\r\n this.other = false;\r\n\r\n let hospitalProfile = profile.replace(\"spire-\", \"\").replace(\"spire+\", \"\").replaceAll(\"-\", \" \");\r\n\r\n this.hospital = this.convertStringToUpperCaseEachWord(hospitalProfile);\r\n\r\n this.showList = (this.cord.length > 0 || this.hospital.length > 0);\r\n\r\n if ($(\"#funnelback\").length > 0) {\r\n this.init();\r\n }\r\n\r\n }\r\n\r\n \r\n\r\n init() {\r\n\r\n const that = this;\r\n\r\n\r\n that.setClickEvents();\r\n }\r\n\r\n autocomplete(inp) {\r\n\r\n var that = this;\r\n\r\n var currentFocus;\r\n\r\n inp.addEventListener(\"input\", function (e) {\r\n var a, b, i, val = this.value;\r\n\r\n var outerThat = that;\r\n\r\n $(\".spire-autocomplete\").hide();\r\n\r\n if (!val) { return false; }\r\n currentFocus = -1;\r\n\r\n let query = $(this).val();\r\n that.requestAutocompleteResults(query, function (data) {\r\n $(\".spire-autocomplete\").show();\r\n\r\n if (data.length == 0) {\r\n $(\".spire-autocomplete\").hide();\r\n return;\r\n }\r\n\r\n if (data.length > 0) {\r\n $(\".spire-autocomplete ul\").html(\"\");\r\n $(\".spire-autocomplete\").show();\r\n\r\n for (i = 0; i < data.length; i++) {\r\n $(\".spire-autocomplete ul\").append(`
  • ${data[i].disp}
  • `)\r\n }\r\n\r\n }\r\n });\r\n\r\n });\r\n\r\n inp.addEventListener(\"keydown\", function (e) {\r\n\r\n let x = $(\".spire-autocomplete ul li\");\r\n\r\n if (e.keyCode == 40) {\r\n currentFocus++;\r\n addActive(x);\r\n }\r\n else if (e.keyCode == 38) {\r\n currentFocus--;\r\n addActive(x);\r\n } else if (e.keyCode == 13) {\r\n e.preventDefault();\r\n\r\n if (currentFocus > -1) {\r\n if (x) {\r\n const obj = $(x[currentFocus]);\r\n const aobj = obj.find(\"a\");\r\n const path = aobj.attr(\"href\");\r\n window.location.href = path;\r\n }\r\n }\r\n else {\r\n const path = that.searchPathUrl + \"/?query=\" + $(this).val().replaceAll(\" \", \"+\");\r\n window.location.href = path;\r\n }\r\n }\r\n\r\n });\r\n\r\n // close autocomplete if mouse clicked outside.\r\n $(document).on(\"click\", \"body\", function (e) {\r\n if ($(e.target).parents(\".spire-autocomplete\").length === 0) {\r\n that.currentFocus = -1;\r\n $(\".spire-autocomplete ul li\").remove();\r\n $(\".spire-autocomplete\").hide();\r\n }\r\n });\r\n\r\n function addActive(x) {\r\n if (!x) return false;\r\n removeActive(x);\r\n if (currentFocus >= x.length) currentFocus = 0;\r\n if (currentFocus < 0) currentFocus = (x.length - 1);\r\n\r\n if (x[currentFocus] != undefined) {\r\n x[currentFocus].classList.add(\"autocomplete-active\");\r\n }\r\n \r\n }\r\n\r\n function removeActive(x) {\r\n /*a function to remove the \"active\" class from all autocomplete items:*/\r\n for (var i = 0; i < x.length; i++) {\r\n x[i].classList.remove(\"autocomplete-active\");\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n requestAutocompleteResults(query, success) {\r\n let url = this.domain + this.suggestProfile + \"&\" + this.collection + \"&fmt=json++&alpha=0.5&show=10&sort=0&partial_query=\" + query;\r\n $.ajax({\r\n type: \"GET\",\r\n url: url,\r\n success: success\r\n });\r\n }\r\n\r\n /* Click Events */\r\n setClickEvents() {\r\n\r\n let that = this;\r\n\r\n this.autocomplete(document.getElementById(\"query-finder\"));\r\n \r\n $(\"#funnelback\").on(\"click\", \"#clear-search\", function (e) {\r\n e.preventDefault();\r\n\r\n $(\"#query-finder\").val(\"\");\r\n\r\n });\r\n\r\n $(\".spire-autocomplete ul\").on(\"click\", function (e) {\r\n e.preventDefault();\r\n let query = e.target.textContent;\r\n $(\"#query-finder\").val(query);\r\n $(\"#siteSearchSubmit\").click();\r\n })\r\n \r\n $(\"#hospital\").on(\"change\", function (e) {\r\n submitForm();\r\n });\r\n \r\n $(\"input[name=region]\").on(\"change\", function (e) {\r\n submitForm();\r\n });\r\n \r\n $(\"input[name=searchFilter]\").on(\"change\", function (e) {\r\n submitForm();\r\n })\r\n \r\n let submitForm = function() {\r\n $(\"#globalSpinner\").show();\r\n $(\"#siteSearchSubmit\").click();\r\n }\r\n }\r\n /* End Click Events */\r\n\r\n\r\n\r\n\r\n /* Utilities */\r\n\r\n convertStringToUpperCaseEachWord(str) {\r\n\r\n if (str.length > 0) {\r\n const words = str.split(\" \");\r\n for (let i = 0; i < words.length; i++) {\r\n words[i] = words[i][0].toUpperCase() + words[i].substr(1);\r\n }\r\n return words.join(\" \");\r\n }\r\n return \"\";\r\n }\r\n\r\n urlParam(name) {\r\n let results = new RegExp('[\\?&]' + name + '=([^&#]*)')\r\n .exec(decodeURIComponent(window.location.search));\r\n\r\n return (results !== null) ? results[1] || \"\" : \"\";\r\n }\r\n\r\n /* Utilities */\r\n}","import { NestedLoader } from \"../_loaders/nestedLoader\";\r\nimport { SlickTrackingLoader } from \"../_loaders/trackingLoader\";\r\n\r\nconst nestedLoader = new NestedLoader();\r\nconst slickTrackingLoader = new SlickTrackingLoader();\r\n\r\n","import { VideoModalModule } from \"../modals/video\";\r\nimport { TimelineModule } from \"../timeline/treatment\";\r\nimport { AccordionSectionTextModule } from \"../Accordions/section-text\";\r\nimport { AccordionTextModule } from \"../Accordions/accordion-text\";\r\nimport { StickynavModule } from \"../Stickynav/stickynav\";\r\nimport { CarouselConsultantModule } from \"../Carousels/consultants\";\r\nimport { CarouselHomeModule } from \"../Carousels/home\";\r\nimport { GalleryModule } from \"../Carousels/Gallery\";\r\nimport { TreatmentareasAzModule } from \"../TreatmentareaAz/treatmentareaAz\";\r\nimport { LocationFinderModule } from \"../finders/locationFinder\";\r\nimport { CallToActionModule } from \"../enquiryForms/callToAction\";\r\nimport { EnquiryUrlCheckModule } from \"../enquiryForms/enquiryUrlCheck\";\r\nimport { RelatedContentModule } from \"../content/relatedContent\";\r\nimport { ConsultantFinderModule } from \"../finders/consultantFinder\";\r\nimport { HowCanWeHelpModule } from \"../HospitalHome/HowCanWeHelp\";\r\nimport { OnlinePaymentModule } from \"../helpers/OnlinePaymentHelper\";\r\nimport { FinanceCalculatorModule } from \"../financeCalculator/financeCalculator\";\r\nimport { FinanceEligibilityModule } from \"../financeCalculator/financeEligibility\";\r\nimport { CarouselRatingsModule } from \"../Carousels/ratings\";\r\nimport { RatingsSummaryModule } from \"../ratings/ratings-summary\";\r\nimport { RatingsListModule } from \"../ratings/ratings-list\";\r\nimport { Teamlistmodule } from \"../teamlist/teamlist\";\r\nimport { DropdownFindersModule } from \"../finders/dropdownFinders\";\r\nimport { ConsultantFilterModule } from \"../filters/consultantFilter\";\r\nimport { GlobalNotificationModule } from \"../globalnotification/globalnotification\";\r\nimport { ConsultantProfilemodule } from \"../Consultants/Consultant\";\r\nimport { TreatmentCarouselModule } from \"../Carousels/TreatmentCarousel\";\r\nimport { PatientFeedBackCarouselModule } from \"../Carousels/PatientFeedbackCarousel\";\r\nimport { HomeIntroductionPanelModule } from \"../healthcareHome/healthcareHome\";\r\nimport { CovidSurveyModule } from \"../covidsurveyForms/covidsurvey\";\r\nimport { TextReadMoreModule } from \"../TextReadMore/TextReadMore\";\r\nimport { ArticleLoadMoreModule } from \"../Articles/articleLoadMore\";\r\nimport { ScrollToBottomModule } from \"../healthcareHome/ScrollToBottom\";\r\nimport { BodyMapModule } from \"../BodyMap/bodyMap\";\r\nimport { ir35enquiryFormModule } from \"../enquiryForms/ir35enquiryForm\";\r\nimport { SplitContentPanelModule } from \"../splitContentPanel/splitContentPanel\";\r\nimport { ConsultantSearchFormModule } from \"../consultantSearchForm/consultantSearchForm.js\";\r\nimport { HospitalLocationsListModule } from \"../Accordions/hospital-locations-list.js\";\r\nimport { PricingModule } from \"../Pricing/pricing\";\r\nimport { MultiTopSlidingPanelModule } from \"../Carousels/multiTopSlidingPanel\";\r\nimport { CobpsCalendarModule } from \"../cobpsCalendar/cobps-calendar\";\r\nimport { FunnelBackModule } from \"../funnelback/funnelback\";\r\nimport { SearchOverlayModule } from \"../SearchOverlay/search-overlay\";\r\nimport { LocationApiLoader } from \"../LocationApiLoader/location-api-loader\";\r\nimport { PromoCarousel } from \"../Carousels/PromoCarousel\"\r\nimport { SimpleArticlesListModule } from \"../Articles/simpleArticlesList\";\r\nimport { TabbedCardListModule } from \"../TabbedCardListPanel/tabbedCardList\"\r\n\r\nexport class NestedLoader {\r\n constructor() {\r\n this.mapApiCallbacks = [];\r\n this.init();\r\n }\r\n \r\n loadLocationApiLoader() {\r\n const locationLookupModule = new LocationApiLoader(this.mapApiCallbacks); // NOSONAR\r\n }\r\n \r\n loadSearchOverlay() {\r\n const overlaySearchModule = new SearchOverlayModule(this.funnelBackModule, this.mapApiCallbacks); // NOSONAR\r\n }\r\n\r\n loadFunnelBack() {\r\n this.funnelBackModule = new FunnelBackModule(); // NOSONAR\r\n }\r\n\r\n loadTreatmentareas() {\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const galleryModule = new GalleryModule(); // NOSONAR\r\n const relatedContentModule = new RelatedContentModule(); // NOSONAR\r\n const carouselConsultant = new CarouselConsultantModule(); // NOSONAR\r\n const treatmentareaAzModal = new TreatmentareasAzModule(); // NOSONAR\r\n const consultantSearchFormModule = new ConsultantSearchFormModule(); // NOSONAR\r\n const consultantFinderModule = new ConsultantFinderModule(); // NOSONAR\r\n const homeCarouselModule = new CarouselHomeModule(); // NOSONAR\r\n }\r\n\r\n loadArticleLoadMore() {\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const articleLoadMoreModule = new ArticleLoadMoreModule(); // NOSONAR\r\n const treatmentareaAzModal = new TreatmentareasAzModule(); // NOSONAR\r\n const bodyMapModule = new BodyMapModule(); // NOSONAR\r\n const splitContentPanelModule = new SplitContentPanelModule(); // NOSONAR\r\n const tabbedCardListModule = new TabbedCardListModule(); // NOSONAR\r\n }\r\n\r\n loadTreatmentareasAz() {\r\n const treatmentareaAzModal = new TreatmentareasAzModule(); // NOSONAR\r\n }\r\n\r\n loadTreatments() {\r\n\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const timelineModule = new TimelineModule(); // NOSONAR\r\n const accordionSectionText = new AccordionSectionTextModule(); // NOSONAR\r\n const carouselConsultant = new CarouselConsultantModule(); // NOSONAR\r\n const consultantFinderModule = new ConsultantFinderModule(); // NOSONAR\r\n const locationFinderModule = new LocationFinderModule(this.mapApiCallbacks); // NOSONAR\r\n const stickynavModule = new StickynavModule(); // NOSONAR\r\n const callToActionModule = new CallToActionModule(); // NOSONAR\r\n const relatedContentModule = new RelatedContentModule(); // NOSONAR\r\n const enquiryUrlCheckModule = new EnquiryUrlCheckModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n const financeCalculatorModule = new FinanceCalculatorModule(); // NOSONAR\r\n const financeEligibilityModule = new FinanceEligibilityModule(); // NOSONAR\r\n const consultantSearchFormModule = new ConsultantSearchFormModule(); // NOSONAR\r\n }\r\n\r\n loadContentHubArticle() { \r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const consultantFinderModule = new ConsultantFinderModule(); // NOSONAR\r\n const financeCalculatorModule = new FinanceCalculatorModule(); // NOSONAR\r\n const financeEligibilityModule = new FinanceEligibilityModule(); // NOSONAR\r\n const accordionSectionText = new AccordionSectionTextModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n const bodyMapModule = new BodyMapModule(); // NOSONAR\r\n const consultantSearchForm = new ConsultantSearchFormModule(); // NOSONAR\r\n const locationFinderModule = new LocationFinderModule(this.mapApiCallbacks); // NOSONAR\r\n }\r\n\r\n loadModuleContentPage() {\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const timelineModule = new TimelineModule(); // NOSONAR\r\n const accordionSectionText = new AccordionSectionTextModule(); // NOSONAR\r\n const locationFinderModule = new LocationFinderModule(this.mapApiCallbacks); // NOSONAR\r\n const consultantFinderModule = new ConsultantFinderModule(); // NOSONAR\r\n const homeCarouselModule = new CarouselHomeModule(); // NOSONAR\r\n const carouselConsultant = new CarouselConsultantModule(); // NOSONAR\r\n const treatmentCarouselModule = new TreatmentCarouselModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n const homeIntroductionPanelModule = new HomeIntroductionPanelModule(); // NOSONAR\r\n const scrollToBottomModule = new ScrollToBottomModule(); // NOSONAR\r\n const ir35enquiryModule = new ir35enquiryFormModule(); // NOSONAR\r\n const consultantSearchFormModule = new ConsultantSearchFormModule(); // NOSONAR\r\n const promoCarousel = new PromoCarousel(); // NOSONAR\r\n const simpleArticlesList = new SimpleArticlesListModule(); // NOSONAR\r\n // if the following file gets added to a group module content page it potentially cause a crash.\r\n const patientFeedBackCarouselModule = new PatientFeedBackCarouselModule(); // NOSONAR\r\n const tabbedCardListModule = new TabbedCardListModule(); // NOSONAR\r\n }\r\n\r\n loadSymptoms() {\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const relatedContentModule = new RelatedContentModule(); // NOSONAR\r\n const accordionSectionText = new AccordionSectionTextModule(); // NOSONAR\r\n const enquiryUrlCheckModule = new EnquiryUrlCheckModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n }\r\n\r\n loadConditions() {\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const relatedContentModule = new RelatedContentModule(); // NOSONAR\r\n const accordionSectionText = new AccordionSectionTextModule(); // NOSONAR\r\n const enquiryUrlCheckModule = new EnquiryUrlCheckModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n }\r\n\r\n loadAcord() {\r\n const accordionSectionText = new AccordionSectionTextModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n }\r\n\r\n loadScans() {\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const relatedContentModule = new RelatedContentModule(); // NOSONAR\r\n const accordionSectionText = new AccordionSectionTextModule(); // NOSONAR\r\n const enquiryUrlCheckModule = new EnquiryUrlCheckModule(); // NOSONAR\r\n const carouselConsultant = new CarouselConsultantModule(); // NOSONAR\r\n }\r\n\r\n loadLocations() {\r\n const locationFinderModule = new LocationFinderModule(this.mapApiCallbacks); // NOSONAR\r\n }\r\n\r\n loadHospitalHome() {\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const carouselHomeModule = new CarouselHomeModule(); // NOSONAR\r\n const howCanWeHelpModule = new HowCanWeHelpModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n const galleryModule = new GalleryModule(); // NOSONAR\r\n const textReadMoreModule = new TextReadMoreModule(); // NOSONAR\r\n const consultantFinderModule = new ConsultantFinderModule(); // NOSONAR\r\n const consultantSearchFormModule = new ConsultantSearchFormModule(); // NOSONAR\r\n const tabbedCardListModule = new TabbedCardListModule(); // NOSONAR\r\n }\r\n\r\n loadSimpleFacilityHome() {\r\n const carouselConsultant = new CarouselConsultantModule(); // NOSONAR\r\n const galleryModule = new GalleryModule(); // NOSONAR\r\n const carouselHomeModule = new CarouselHomeModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n }\r\n\r\n loadPromoContent() {\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const locationFinderModule = new LocationFinderModule(this.mapApiCallbacks); // NOSONAR\r\n const consultantSearchFormModule = new ConsultantSearchFormModule(); // NOSONAR\r\n const splitContentPanelModule = new SplitContentPanelModule(); // NOSONAR\r\n const consultantFinderModule = new ConsultantFinderModule(); // NOSONAR\r\n const homeIntroductionPanelModule = new HomeIntroductionPanelModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n const accordionSectionText = new AccordionSectionTextModule(); // NOSONAR\r\n const promoCarousel = new PromoCarousel(); // NOSONAR\r\n const tabbedCardListModule = new TabbedCardListModule(); // NOSONAR\r\n }\r\n\r\n loadHome() {\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const carouselHomeModule = new CarouselHomeModule(); // NOSONAR\r\n const locationFinderModule = new LocationFinderModule(this.mapApiCallbacks); // NOSONAR\r\n const consultantFinderModule = new ConsultantFinderModule(); // NOSONAR\r\n const carouselRatingsModule = new CarouselRatingsModule(); // NOSONAR\r\n const globalNotification = new GlobalNotificationModule(); // NOSONAR\r\n const splitContentPanelModule = new SplitContentPanelModule(); // NOSONAR\r\n const consultantSearchFormModule = new ConsultantSearchFormModule(); // NOSONAR\r\n const tabbedCardListModule = new TabbedCardListModule(); // NOSONAR\r\n }\r\n\r\n loadOnlinePayments() {\r\n const onlinePaymentModule = new OnlinePaymentModule(); // NOSONAR\r\n }\r\n\r\n loadFinanceCalculator() {\r\n const financeCalculatorModule = new FinanceCalculatorModule(); // NOSONAR\r\n }\r\n\r\n loadFinanceEligibility() {\r\n const financeEligibilityModule = new FinanceEligibilityModule(); // NOSONAR\r\n }\r\n\r\n loadRatings() {\r\n const ratingsSummaryModule = new RatingsSummaryModule(); // NOSONAR\r\n const ratingsListModule = new RatingsListModule(); // NOSONAR\r\n }\r\n\r\n loadTeamlist() {\r\n const teamlistmodule = new Teamlistmodule(); // NOSONAR\r\n const relatedContentModule = new RelatedContentModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n }\r\n\r\n loadConsultantsProfile() {\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n const consultantModule = new ConsultantProfilemodule(); // NOSONAR\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const cobpsCalendar = new CobpsCalendarModule(); // NOSONAR\r\n }\r\n\r\n loadConsultants() {\r\n const dropdownFindersModule = new DropdownFindersModule(); // NOSONAR\r\n const consultantFilterModule = new ConsultantFilterModule(); // NOSONAR\r\n const consultantFinderModule = new ConsultantFinderModule(); // NOSONAR\r\n const locationFinderModule = new LocationFinderModule(this.mapApiCallbacks); // NOSONAR\r\n }\r\n\r\n loadHomeCarousel() {\r\n const locationFinderModule = new LocationFinderModule(this.mapApiCallbacks); // NOSONAR\r\n const homeCarousel = new CarouselHomeModule(); // NOSONAR\r\n const carouselConsultant = new CarouselConsultantModule(); // NOSONAR\r\n const accordionText = new AccordionTextModule(); // NOSONAR\r\n }\r\n\r\n\r\n loadVideoModule() {\r\n const locationFinderModule = new LocationFinderModule(this.mapApiCallbacks); // NOSONAR\r\n const videoModal = new VideoModalModule(); // NOSONAR\r\n const consultantFinderModule = new ConsultantFinderModule(); // NOSONAR\r\n const treatmentCarouselModule = new TreatmentCarouselModule(); // NOSONAR\r\n const patientFeedBackCarouselModule = new PatientFeedBackCarouselModule(); // NOSONAR\r\n const covidModule = new CovidSurveyModule(); // NOSONAR\r\n }\r\n\r\n loadCovidModule() {\r\n const covidModule = new CovidSurveyModule(); // NOSONAR\r\n }\r\n\r\n loadPrices() {\r\n const hospitalLocationsListModule = new HospitalLocationsListModule(); // NOSONAR\r\n const accordionTextModule = new AccordionTextModule(); // NOSONAR\r\n const pricingModule = new PricingModule(); // NOSONAR\r\n }\r\n\r\n loadEnquiries() {\r\n const multiTopSlidingPanelModule = new MultiTopSlidingPanelModule(); // NOSONAR\r\n }\r\n\r\n init() {\r\n \r\n let bodyElement = document.getElementsByTagName('body')[0];\r\n let dataType = bodyElement.dataset.dtype;\r\n\r\n //console.log('DataType loaded is: ' + dataType)\r\n \r\n this.loadFunnelBack();\r\n this.loadSearchOverlay();\r\n\r\n /* Doc types needed */\r\n if (dataType === 'events') this.loadAcord();\r\n\r\n if (dataType === 'grouphome') this.loadHome();\r\n\r\n if (dataType === 'groupfolder' || dataType === 'hospitalfolder' || dataType === 'promomodulecontentpage') this.loadHomeCarousel();\r\n\r\n if (dataType === 'grouptreatmentprices' || dataType === 'hospitaltreatmentprices') this.loadPrices();\r\n\r\n if (dataType === 'GroupHome') this.loadHome();\r\n\r\n if (dataType === 'hospitalhome') this.loadHospitalHome();\r\n\r\n if (dataType === 'hospitaltreatment' || dataType === 'grouptreatment') this.loadTreatments();\r\n\r\n if (dataType === 'hospitalsymptom' || dataType === 'groupsymptom') this.loadSymptoms();\r\n\r\n if (dataType === 'hospitalscan' || dataType === 'groupscan') this.loadScans();\r\n\r\n if (dataType === 'hospitalcondition' || dataType === 'groupcondition') this.loadConditions();\r\n\r\n if (dataType === 'grouplocations' || dataType === 'grouptreatmentarea' || dataType === 'groupfolder') this.loadLocations();\r\n\r\n if (dataType === 'grouptreatmentarea' || dataType === 'hospitaltreatmentarea' || dataType === 'grouptreatmentareas' || dataType === 'hospitaltreatmentareas') this.loadTreatmentareas();\r\n\r\n if (dataType === 'grouptreatmentareasaz' || dataType == 'hospitaltreatmentareasaz') this.loadTreatmentareasAz();\r\n\r\n if (dataType === 'groupmodulecontentpage' || dataType == 'hospitalmodulecontentpage') this.loadModuleContentPage();\r\n\r\n if (dataType === 'onlinepaymentprocess') this.loadOnlinePayments();\r\n\r\n if (dataType === 'healthcarefinancecalculator') this.loadFinanceCalculator();\r\n\r\n if (dataType === 'healthcarefinanceeligibility') this.loadFinanceEligibility();\r\n\r\n if (dataType === 'groupratings') this.loadRatings();\r\n\r\n if (dataType === 'simplefacilityhome' || dataType == 'standaloneclinichome') this.loadSimpleFacilityHome();\r\n\r\n if (dataType === 'teamlist') this.loadTeamlist();\r\n if (dataType === 'consultant' || dataType === 'hospitalconsultant') this.loadConsultantsProfile();\r\n\r\n if (dataType === 'groupconsultantaz' || dataType === 'hospitalconsultantaz') this.loadConsultants();\r\n\r\n if (dataType === 'grouplocations' || dataType === 'groupfolder' || dataType === 'hospitalfolder' || dataType === 'promomodulecontentpage') this.loadVideoModule();\r\n\r\n if (dataType === 'promomodulecontentpage') this.loadPromoContent();\r\n\r\n if (dataType === \"covidsurvey\") this.loadCovidModule();\r\n \r\n if (dataType === \"article\") this.loadContentHubArticle();\r\n\r\n if (dataType === \"contenthub\" || dataType === \"newtoprivatehealthcarehub\" || dataType === \"specialitycontent\" || dataType === \"specialityhub\") this.loadArticleLoadMore();\r\n\r\n if (dataType === \"groupenquiryform\" || dataType === \"ghospitalenquiryform\") this.loadEnquiries();\r\n\r\n this.loadLocationApiLoader();\r\n }\r\n\r\n}\r\n\r\n","import { AccordionTextModule } from \"../Accordions/accordion-text\";\r\n\r\nexport class VideoModalModule {\r\n\r\n constructor() {\r\n this.init();\r\n\r\n }\r\n\r\n init() {\r\n\r\n if ($(\".modal-video__link\")) {\r\n var videoSrc;\r\n\r\n $(\".modal-video__link\").on(\"click\", function () {\r\n videoSrc = $(this).data(\"src\");\r\n $(\"#video-youtube\").attr('src', videoSrc);\r\n\r\n });\r\n\r\n $('#modal-video').on('shown.bs.modal', function () {\r\n\r\n });\r\n\r\n $('body').on('hidden.bs.modal', '.modal', function () {\r\n $(this).removeData('bs.modal');\r\n $(\"#video-youtube\").attr('src', videoSrc);\r\n });\r\n }\r\n\r\n // $(\"body\").on(\"click\", \".feature-grid__item--image a\", function (e) {\r\n\r\n // var button = $(this); \r\n $(\".button.button--green-rounded.button--centered\").on(\"click\", function (e) {\r\n e.preventDefault();\r\n var dataURL = $(this).data('src');\r\n if (dataURL != '' && dataURL != 'undefined') {\r\n var url = 'CustomApi/PageContent?url=' + dataURL;\r\n $.ajax({\r\n type: \"GET\",\r\n url: apilocation + url,\r\n dataType: \"json\",\r\n async: false,\r\n cache: false,\r\n success: function (response) {\r\n $('.modal-title').html(response.con.header);\r\n $('.modal-header h6').html(response.con.copy);\r\n $('.modal-body p').html(response.con.Description);\r\n var accordionContent = \"\";\r\n var i = 1;\r\n $.each(response.con.AccordionItems, function (key, val) {\r\n \r\n \r\n var html = '
    '\r\n html += '
    '\r\n html += '

    '\r\n html += '

    '\r\n // html += ''\r\n html += '
    '\r\n html += '
    '\r\n html += '

    ' + val.Description + '

    '\r\n html += '
    ';\r\n accordionContent += html;\r\n \r\n i = i + 1;\r\n });\r\n $(\".accordion\").html(accordionContent);\r\n }\r\n\r\n });\r\n }\r\n $(\".collapse.show\").each(function () {\r\n $(this).prev(\".card-title\").find(\"i\").addClass(\"fa-minus\").removeClass(\"fa-plus\");\r\n });\r\n\r\n // Toggle plus minus icon on show hide of collapse element\r\n $(\".collapse\").on('show.bs.collapse', function () {\r\n $(this).prev(\".card-title\").find(\"i\").removeClass(\"fa-plus\").addClass(\"fa-minus\");\r\n }).on('hide.bs.collapse', function () {\r\n $(this).prev(\".card-title\").find(\"i\").removeClass(\"fa-minus\").addClass(\"fa-plus\");\r\n });\r\n });\r\n\r\n\r\n \r\n \r\n \r\n\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n","export class TimelineModule {\r\n constructor() {\r\n if ($(\"#component-timeline\").length > 0) {\r\n this.properties();\r\n this.init();\r\n }\r\n }\r\n\r\n properties() {\r\n this.timelineSlider = $(\"#component-timeline .timeline__slider\");\r\n this.timelineSlickArrow = $(\"#component-timeline .slick-arrow\");\r\n this.timelineRange = $(\"#component-timeline .timeline__range\");\r\n // this.slidesToShow = 3.2;\r\n // this.slidesToScroll = 1;\r\n }\r\n\r\n loadSlick() {\r\n /* if the browser width is greater than the breakpoint it will render */\r\n /* this is how slick gets the width var windowWidth = window.innerWidth || $(window).width(). This includes the scroll bar */\r\n\r\n let _this = this;\r\n this.timelineSlider.slick({\r\n // dots: false,\r\n // infinite: false,\r\n // slidesToShow: 1.1,\r\n // slidesToScroll: 1,\r\n // arrows: false,\r\n mobileFirst: true,\r\n responsive: [\r\n {\r\n breakpoint: 0,\r\n settings: {\r\n dots: false,\r\n infinite: false,\r\n slidesToShow: 1.1,\r\n slidesToScroll: 1,\r\n arrows: false\r\n }\r\n },\r\n {\r\n breakpoint: 767,\r\n settings: {\r\n dots: false,\r\n infinite: false,\r\n slidesToShow: 2.2,\r\n slidesToScroll: 2,\r\n arrows: false\r\n }\r\n },\r\n {\r\n breakpoint: 1023,\r\n settings: {\r\n dots: false,\r\n infinite: false,\r\n slidesToShow: 3.2,\r\n slidesToScroll: 1,\r\n arrows: false\r\n }\r\n },\r\n {\r\n breakpoint: 1100,\r\n settings: {\r\n dots: false,\r\n infinite: false,\r\n slidesToShow: 3.2,\r\n slidesToScroll: 1,\r\n arrows: true\r\n }\r\n }\r\n ]\r\n });\r\n }\r\n\r\n /* checks if slick is disable, if so changes the gradient */\r\n updateGradientIfSlickIsDisabled() {\r\n\r\n setTimeout(() => {\r\n\r\n if ($(\"#component-timeline .slick-prev\").hasClass('slick-disabled')) {\r\n $(\"#component-timeline .timeline__gradient--left\").fadeOut();\r\n } else {\r\n $(\"#component-timeline .timeline__gradient--left\").fadeIn();\r\n }\r\n\r\n if ($(\"#component-timeline .slick-next\").hasClass('slick-disabled')) {\r\n $(\"#component-timeline .timeline__gradient--right\").fadeOut();\r\n } else {\r\n $(\"#component-timeline .timeline__gradient--right\").fadeIn();\r\n }\r\n\r\n }, 200);\r\n }\r\n\r\n calcRangeIndexToSlickIndex(rangeIndex) {\r\n return rangeIndex;\r\n }\r\n\r\n /* get index of range */\r\n getRangeIndex() {\r\n return this.timelineRange.val();\r\n }\r\n /* set index of range */\r\n setRangeIndex(index) {\r\n\r\n return this.timelineRange.val(index);\r\n }\r\n /* change range by index */\r\n moveSliderByIndex(index) {\r\n this.timelineSlider.slick('slickGoTo', index);\r\n // $(\".timeline__slider\").slick('slickGoTo', index);\r\n }\r\n /* get slick index */\r\n getSlickIndex() {\r\n return $(\"#component-timeline .slick-active\").data(\"slick-index\");\r\n }\r\n /* change range on change event */\r\n bindRangeChange() {\r\n if (this.rangeSliderIsHidden()) {\r\n return;\r\n }\r\n\r\n let _this = this;\r\n this.timelineRange.on('change', function () {\r\n let rangeIndex = $(this).val();\r\n let newSlickIndex = _this.calcRangeIndexToSlickIndex(rangeIndex);\r\n _this.moveSliderByIndex(newSlickIndex);\r\n _this.updateGradientIfSlickIsDisabled();\r\n });\r\n }\r\n /* moves below carousel and list view */\r\n bindToggleTimelineView() {\r\n var _this = this;\r\n $(document).on('click', '#component-timeline .button__full-timeline-toggle', function (event) {\r\n event.preventDefault();\r\n let listStyle = _this.timelineSlider.data('list-style');\r\n if (listStyle === 'carousel') {\r\n $('#component-timeline .wrapper-timeline--carousel').hide();\r\n $('#component-timeline .wrapper-timeline--list').show();\r\n _this.timelineSlider.data('list-style', 'list');\r\n $(\".button__full-timeline-toggle--carousel\").hide();\r\n $(\".button__full-timeline-toggle--list\").show();\r\n } else {\r\n $('#component-timeline .wrapper-timeline--carousel').show();\r\n $('#component-timeline .wrapper-timeline--list').hide();\r\n _this.timelineSlider.data('list-style', 'carousel');\r\n // $(\"#component-timeline .timeline__range-container\").show();\r\n $(\".button__full-timeline-toggle--carousel\").show();\r\n $(\".button__full-timeline-toggle--list\").hide();\r\n }\r\n });\r\n }\r\n /* bind arrow click */\r\n bindSlickArrowClick() {\r\n let _this = this;\r\n if (this.rangeSliderIsHidden()) {\r\n return;\r\n }\r\n $(document).on('click', \"#component-timeline .slick-arrow\", function () {\r\n\r\n _this.updateGradientIfSlickIsDisabled();\r\n let slickIndex = _this.getSlickIndex();\r\n _this.moveSliderByIndex(slickIndex);\r\n _this.setRangeIndex(slickIndex);\r\n });\r\n\r\n }\r\n /* bind browser resize to reload click */\r\n bindResize() {\r\n let _this = this;\r\n var resizeTimeout;\r\n\r\n $(window).on(\"resize.treatmentTimeline\", function () {\r\n // console.log(\"timeline 2\");\r\n $(\"#component-timeline .timeline__slider\").slick('slickGoTo', 0);\r\n // $(\"#component-timeline .timeline__slider\").slick('unslick');\r\n clearTimeout(resizeTimeout);\r\n resizeTimeout = setTimeout(function () {\r\n _this.equalHeights();\r\n }, 500);\r\n });\r\n }\r\n\r\n unbindResize() {\r\n $(window).off(\"resize.treatmentTimeline\");\r\n // If we wanted to be purist, also remove the slick instance from the carousel element\r\n }\r\n \r\n /* bind slick swipe */\r\n bindSlickSwipe() {\r\n let _this = this;\r\n\r\n\r\n $(document).on('swipe', '#component-timeline .timeline__slider', function () {\r\n\r\n if (!_this.rangeSliderIsHidden()) {\r\n let slickIndex = _this.getSlickIndex();\r\n _this.setRangeIndex(slickIndex);\r\n }\r\n\r\n _this.updateGradientIfSlickIsDisabled();\r\n\r\n });\r\n }\r\n /* equal heights */\r\n equalHeights() {\r\n\r\n $(\".timeline__slider\").each(function () {\r\n var highestBox = 0;\r\n\r\n $(\".timeline__item\", this).each(function () {\r\n if ($(this).height() > highestBox) {\r\n highestBox = $(this).height();\r\n }\r\n });\r\n\r\n $('.timeline__item').height(highestBox);\r\n $('.timeline__gradient--left').height(highestBox + 20);\r\n $('.timeline__gradient--right').height(highestBox + 20);\r\n\r\n });\r\n\r\n }\r\n\r\n rangeSliderIsHidden() {\r\n return $(\".wrapper-range\").is(\":hidden\");\r\n }\r\n\r\n init() {\r\n\r\n if ($(\"#component-timeline\").length === 0) return;\r\n this.loadSlick();\r\n this.bindRangeChange();\r\n this.bindSlickArrowClick();\r\n this.bindSlickSwipe();\r\n\r\n // Carousel mode\r\n if ($(\".button__full-timeline-toggle--bulletedlist\").is(\":hidden\")) {\r\n\r\n this.bindToggleTimelineView();\r\n this.bindResize();\r\n $(\"#component-timeline .timeline__loading\").hide();\r\n this.equalHeights();\r\n }\r\n // Bulleted list mode\r\n else {\r\n this.bindInteractiveView();\r\n\r\n $(\"#component-timeline .timeline__loading\").hide();\r\n\r\n $(\".button__full-timeline-toggle--carousel\").hide();\r\n $(\".button__full-timeline-toggle--list\").hide();\r\n $('#component-timeline .wrapper-timeline--carousel').hide();\r\n $('#component-timeline .wrapper-timeline--bulletedlist').show();\r\n\r\n this.ShowTimeLineViewAsBulletedList();\r\n this.ShowTimeLineViewAsList();\r\n }\r\n }\r\n\r\n // This will be triggered when clicking view interactive timeline button\r\n bindInteractiveView() {\r\n let that = this;\r\n $(document).on('click', '.button__full-timeline-toggle--bulletedlist', function (e) {\r\n e.preventDefault();\r\n\r\n $(\".button__full-timeline-toggle--carousel\").show();\r\n $('.wrapper-timeline--carousel').show();\r\n\r\n $('.wrapper-timeline--bulletedlist').hide();\r\n $(\".button__full-timeline-toggle--bulletedlist\").hide();\r\n $(\".button__full-timeline-toggle--list\").hide();\r\n $('.wrapper-timeline--list').hide(); \r\n\r\n // Bind resize, then trigger a fake resize event.\r\n that.bindResize();\r\n $(document).trigger(\"resize\"); \r\n });\r\n }\r\n\r\n //Triggered When clicking on viewfull timeline button\r\n ShowTimeLineViewAsList() {\r\n let that = this;\r\n $(document).on('click', '.button__full-timeline-toggle--carousel', function (e) {\r\n e.preventDefault();\r\n that.unbindResize();\r\n\r\n $('.wrapper-timeline--bulletedlist').hide();\r\n $(\".button__full-timeline-toggle--bulletedlist\").hide();\r\n\r\n $('.wrapper-timeline--carousel').hide();\r\n $('.wrapper-timeline--list').show();\r\n $(\".button__full-timeline-toggle--list\").show();\r\n $(\".button__full-timeline-toggle--carousel\").hide();\r\n // Unbind slick\r\n // Pseudo code - $(document).off(\"resize\")\r\n\r\n });\r\n\r\n }\r\n\r\n //Triggered When clicking on close button\r\n ShowTimeLineViewAsBulletedList() {\r\n let that = this;\r\n $(document).on('click', '.button__full-timeline-toggle--list', function (e) {\r\n e.preventDefault();\r\n that.unbindResize();\r\n\r\n // Displays the data in bulleted list format\r\n $('.wrapper-timeline--bulletedlist').show();\r\n $(\".button__full-timeline-toggle--bulletedlist\").show();\r\n\r\n $('.wrapper-timeline--carousel').hide();\r\n $('.wrapper-timeline--list').hide();\r\n $(\".button__full-timeline-toggle--carousel\").hide();\r\n $(\".button__full-timeline-toggle--list\").hide();\r\n });\r\n }\r\n}\r\n\r\n","export class AccordionSectionTextModule {\r\n constructor() { \r\n\r\n if ($(\".container-component__section-text\").length > 0 ) {\r\n this.init(); \r\n }\r\n }\r\n\r\n applyCssOnMobile() {\r\n const mq = window.matchMedia( \"(min-width: 480px)\" );\r\n\r\n if (mq.matches) {\r\n $('.container-component__section-text').removeClass('container-component__section-text--mobile'); \r\n } else {\r\n\r\n $( \".container-component__section-text\" ).each(function( index ) {\r\n\r\n if (index >= 2) {\r\n $(this).addClass('container-component__section-text--mobile');\r\n }\r\n });\r\n }\r\n }\r\n\r\n hideContent() {\r\n let elContent = '.container-component__section-text--mobile .section-text__content';\r\n if ($(elContent).is(\":hidden\")){\r\n $(elContent).show();\r\n } else {\r\n $(elContent).hide();\r\n } \r\n }\r\n\r\n bindClick() {\r\n\r\n let elHeading = '.container-component__section-text--mobile .section-text__heading';\r\n \r\n $(document).on( \"click\", elHeading, function() {\r\n\r\n let currentContent = $(this).next('.section-text__content');\r\n let isHidden = currentContent.is(\":hidden\");\r\n \r\n if (isHidden){\r\n $(this).next('.section-text__content').show();\r\n $(this).addClass('section-text__heading--active');\r\n } else {\r\n $(this).next('.section-text__content').hide();\r\n $(this).removeClass('section-text__heading--active');\r\n }\r\n });\r\n }\r\n\r\n registerResizeHandler(){\r\n window.onresize = this.onResize.bind(this);\r\n }\r\n\r\n onResize(){\r\n //this.applyCssOnMobile();\r\n }\r\n\r\n init() {\r\n //this.applyCssOnMobile(); \r\n //this.bindClick();\r\n //this.registerResizeHandler();\r\n }\r\n}\r\n \r\n \r\n\r\n\r\n\r\n\r\n","export class StickynavModule {\r\n\r\n constructor() {\r\n\r\n if ($(\"#navigation-sticky\").length > 0) {\r\n this.properties();\r\n this.init();\r\n }\r\n }\r\n\r\n properties() {\r\n this.navigationSelector = '#navigation-sticky .navbar-nav a';\r\n }\r\n\r\n isInViewport(elem) {\r\n\r\n if (elem === undefined || elem === null) {\r\n return false;\r\n }\r\n\r\n let bounding = elem.getBoundingClientRect();\r\n return (\r\n bounding.top >= 0 &&\r\n bounding.left >= 0 &&\r\n bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\r\n bounding.right <= (window.innerWidth || document.documentElement.clientWidth)\r\n );\r\n }\r\n\r\n scroll() {\r\n this.selectCurrentSection();\r\n }\r\n\r\n selectCurrentSection() {\r\n let _this = this;\r\n let itemSelected = false;\r\n let closest = null;\r\n let closestDist = 0;\r\n\r\n $.each($(this.navigationSelector), function (key, value) {\r\n\r\n let data = $(this).data(\"component\");\r\n let el = document.querySelector(data);\r\n\r\n if (el !== undefined && data !== undefined && itemSelected !== true) {\r\n var rect = el.getBoundingClientRect()\r\n var dist = Math.abs(window.innerHeight / 2 - (rect.y + (rect.height / 2)));\r\n if (closest === null || dist < closestDist) {\r\n closest = this;\r\n closestDist = dist;\r\n }\r\n }\r\n });\r\n\r\n if (closest !== null) {\r\n $(_this.navigationSelector).removeClass(\"is-selected\");\r\n $(closest).addClass(\"is-selected\");\r\n itemSelected = true;\r\n return false;\r\n }\r\n }\r\n\r\n registerScrollListener() {\r\n\r\n let _this = this;\r\n\r\n var raf = window.requestAnimationFrame ||\r\n window.webkitRequestAnimationFrame ||\r\n window.mozRequestAnimationFrame ||\r\n window.msRequestAnimationFrame ||\r\n window.oRequestAnimationFrame;\r\n var $window = $(window);\r\n var lastScrollTop = $window.scrollTop();\r\n\r\n if (raf) {\r\n loop();\r\n }\r\n\r\n function loop() {\r\n var scrollTop = $window.scrollTop();\r\n if (lastScrollTop === scrollTop) {\r\n raf(loop);\r\n return;\r\n } else {\r\n lastScrollTop = scrollTop;\r\n\r\n // fire scroll function if scrolls vertically\r\n _this.scroll();\r\n raf(loop);\r\n }\r\n }\r\n }\r\n\r\n registerClick() {\r\n\r\n $(document).on('click', \"#navigation-sticky .nav-link\", function () {\r\n let _this = this;\r\n\r\n setTimeout(() => {\r\n $(\"#navigation-sticky .nav-link\").removeClass(\"is-selected\");\r\n $(this).addClass(\"is-selected\")\r\n }, 200);\r\n });\r\n\r\n $(document).on('click', \"#navigation-sticky-mobile .nav-link\", function () {\r\n let _this = this;\r\n\r\n setTimeout(() => {\r\n $(\".select-wrapper-nav-items\").toggle();\r\n\r\n if ($('.select-wrapper-nav-items').css('display') == 'block') {\r\n $(\".js-select-wrapper-nav--selector\").addClass(\"select-wrapper-nav--selector--open\");\r\n } else {\r\n $(\".js-select-wrapper-nav--selector\").removeClass(\"select-wrapper-nav--selector--open\");\r\n }\r\n\r\n }, 200);\r\n });\r\n\r\n $(document).on('click', '.js-select-wrapper-nav--selector', function () {\r\n $(\".select-wrapper-nav-items\").toggle();\r\n\r\n if ($('.select-wrapper-nav-items').css('display') == 'block') {\r\n $(\".js-select-wrapper-nav--selector\").addClass(\"select-wrapper-nav--selector--open\");\r\n } else {\r\n $(\".js-select-wrapper-nav--selector\").removeClass(\"select-wrapper-nav--selector--open\");\r\n }\r\n });\r\n\r\n }\r\n\r\n init() {\r\n this.registerScrollListener();\r\n this.registerClick();\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n","export class CarouselConsultantModule {\r\n \r\n constructor() {\r\n if ($(\"#component-consultant-carousel\").length > 0) {\r\n this.properties();\r\n this.init(); \r\n } \r\n }\r\n\r\n properties() {\r\n this.sliderSelector = \"#component-consultant-carousel .consultant-carousel__slider\";\r\n this.sliderItemSelector = \"#component-consultant-carousel .consultant-carousel__item\";\r\n this.initialSlide = 0;\r\n this.consultants = [];\r\n this.nodeId = $(\"body\").data(\"content\");\r\n this.hospitalId = $(\"body\").data(\"hospital-id\");\r\n this.treatmentId = $(\"body\").data(\"treatment-id\");\r\n this.documentType = $(\"body\").data(\"dtype\");\r\n this.contentId = $(\"body\").data(\"content\");\r\n this.consultantsRepoItems = `consultantsRepoItems${this.contentId}`;\r\n this.consultantsRepoDate = `consultantsRepoDate${this.contentId}`;\r\n this.refreshTimeInMinutes = 5;\r\n this.usePicker = $(\"span.consultantpicker\").data(\"usepicker\");\r\n this.hidePractisingAt = $(\"span.consultantpicker\").data(\"hidepractisingat\");\r\n this.disableLocalStorage = false;\r\n \r\n }\r\n\r\n hasLocalStorage() {\r\n if (this.disableLocalStorage) return false;\r\n if (typeof(Storage) === \"undefined\") return false;\r\n if (window.localStorage === \"undefined\") return false;\r\n return true;\r\n }\r\n\r\n loadLocal() {\r\n this.getConsultantsRepoLocalStorage();\r\n }\r\n //\r\n loadRemote() {\r\n let _this = this;\r\n \r\n $(this.sliderItemSelector).slick('slickRemove');\r\n var c_baseUrl = apilocation + \"consultantapi/GetConsultantsForCarousel\";\r\n\r\n \r\n\r\n let data = {\r\n hospitalid: this.hospitalId\r\n };\r\n\r\n if (this.treatmentId !== 0) {\r\n data = {\r\n hospitalid: this.hospitalId,\r\n treatmentid: this.treatmentId\r\n }\r\n } else if (this.treatmentId === 0 && this.contentId > 0 && this.documentType === \"hospitaltreatmentarea\") {\r\n c_baseUrl = apilocation + \"consultantapi/GetHospitalConsultantsForCarouselByTreatmentArea\";\r\n data = {\r\n hospitalid: this.hospitalId,\r\n treatmentAreaId: this.contentId\r\n }\r\n }\r\n\r\n if (this.usePicker) {\r\n c_baseUrl = apilocation + \"consultantapi/GetPickedConsultantsForCarousel\";\r\n data = {\r\n nodeid: this.nodeId,\r\n hospitalid: this.hospitalId\r\n }\r\n\r\n }\r\n\r\n $.ajax({\r\n type: 'get',\r\n data: data,\r\n url: c_baseUrl,\r\n dataType: \"json\",\r\n success: function( response ) {\r\n let consultants = response;\r\n if (consultants.length > 0) {\r\n _this.saveConsultantsRepoDateLocalStorage();\r\n _this.saveConsultantsRepoLocalStorage(consultants);\r\n _this.loadHandleBars(consultants);\r\n }\r\n else {\r\n $(\"#component-consultant-carousel\").hide();\r\n }\r\n \r\n }\r\n });\r\n }\r\n\r\n saveConsultantsRepoLocalStorage(consultants) {\r\n if (this.hasLocalStorage()) {\r\n localStorage.setItem(this.consultantsRepoItems, JSON.stringify(consultants)); \r\n } \r\n }\r\n\r\n saveConsultantsRepoDateLocalStorage() {\r\n if (this.hasLocalStorage()) {\r\n localStorage.setItem(this.consultantsRepoDate, this.getCurrentIsoDate());\r\n } \r\n }\r\n\r\n getConsultantsRepoLocalStorage() {\r\n if (this.hasLocalStorage()) {\r\n let consultants = localStorage.getItem(this.consultantsRepoItems);\r\n var json = JSON.parse(consultants);\r\n console.log(\"*** getting data from local storage\")\r\n this.loadHandleBars(json);\r\n } \r\n }\r\n\r\n getConsultantsRepoDateLocalStorage() {\r\n if (this.hasLocalStorage()) {\r\n localStorage.getItem(this.consultantsRepoDate);\r\n } \r\n }\r\n\r\n getCurrentIsoDate() {\r\n var now = new Date();\r\n return new Date(now).toISOString();\r\n }\r\n\r\n addMinutes(date, minutes) {\r\n return new Date(date.getTime() + minutes*60000);\r\n }\r\n\r\n validDateToUseLocalRepo() {\r\n if (this.hasLocalStorage()) {\r\n if (localStorage.getItem(this.consultantsRepoDate) === null) return false;\r\n let consultantsRepoDate = localStorage.getItem(this.consultantsRepoDate);\r\n let saveConsultantsRepoDate = new Date(consultantsRepoDate);\r\n let expirationDate = this.addMinutes(saveConsultantsRepoDate, this.refreshTimeInMinutes);\r\n if (new Date() > expirationDate){\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n addImageLiquid() {\r\n $('.consultant-carousel__image').imgLiquid({\r\n horizontalAlign: '74%'\r\n });\r\n }\r\n \r\n removeOldLocaleStorage() {\r\n\r\n let _this = this;\r\n function allStorage() {\r\n\r\n let archive = [],\r\n keys = Object.keys(localStorage),\r\n i = 0, key;\r\n \r\n for (; key = keys[i]; i++) {\r\n archive.push(key);\r\n }\r\n \r\n return archive;\r\n }\r\n \r\n let keys = allStorage();\r\n \r\n keys.forEach(function(key) {\r\n \r\n if (key) {\r\n let hasItems = key.indexOf(\"consultantsRepoItems\") !== -1;\r\n let isToday = false; \r\n let currentConsultant = key.indexOf(_this.contentId) !== -1; \r\n if (hasItems && !currentConsultant) { \r\n let consultantsRepoDateKey = key.replace(\"consultantsRepoItems\", \"consultantsRepoDate\");\r\n let repoDateValue = localStorage.getItem(consultantsRepoDateKey);\r\n let repoDate = new Date(repoDateValue); \r\n let formattedDate = _this.formatDate(repoDate);\t\t\t\r\n let currentDate = _this.formatDate(new Date()); \r\n if (formattedDate === currentDate) isToday = true;\r\n if (!isToday) {\r\n localStorage.removeItem(key); \r\n localStorage.removeItem(consultantsRepoDateKey);\r\n }\r\n } \r\n }\r\n \r\n });\r\n \r\n }\r\n\r\n formatDate(date) {\r\n \r\n let dd = date.getDate();\r\n let mm = date.getMonth() + 1; //January is 0! \r\n let yyyy = date.getFullYear();\r\n if (dd < 10) {\r\n dd = '0' + dd;\r\n } \r\n if (mm < 10) {\r\n mm = '0' + mm;\r\n } \r\n let output = dd + '/' + mm + '/' + yyyy; \r\n return output; \r\n }\r\n\r\n loadSlick() {\r\n\r\n let _this = this;\r\n $(this.sliderSelector).slick({\r\n slidesToScroll: 1.1,\r\n slidesToShow: 1,\r\n initialSlide: 0,\r\n arrows: false,\r\n dots: false,\r\n mobileFirst: true,\r\n responsive: [\r\n {\r\n breakpoint: 300, \r\n settings: {\r\n dots: false,\r\n infinite: false,\r\n slidesToShow: 1.1,\r\n slidesToScroll: 1,\r\n arrows: false\r\n }\r\n },\r\n {\r\n breakpoint: 767, \r\n settings: {\r\n dots: false,\r\n infinite: false,\r\n slidesToShow: 2.2,\r\n slidesToScroll: 2,\r\n arrows: false\r\n }\r\n },\r\n {\r\n breakpoint: 1024, \r\n settings: {\r\n dots: false,\r\n infinite: false,\r\n slidesToShow: 3.2,\r\n slidesToScroll: 3,\r\n arrows: true\r\n }\r\n },\r\n {\r\n breakpoint: 1100, \r\n settings: {\r\n dots: false,\r\n infinite: false,\r\n slidesToShow: 3.2,\r\n slidesToScroll: 1,\r\n arrows: true\r\n }\r\n }\r\n ]\r\n }); \r\n\r\n $(this.sliderSelector).on('afterChange', function(){\r\n _this.addOpacity();\r\n });\r\n\r\n _this.addOpacity();\r\n }\r\n\r\n addOpacity() {\r\n\r\n $(\".consultant-carousel__item\").removeClass(\"consultant-carousel__opacity\");\r\n let index = 0;\r\n $(\".consultant-carousel__item.slick-active\").each(function(){\r\n\r\n if (index === 2) {\r\n $(this).addClass(\"consultant-carousel__opacity\");\r\n } \r\n\r\n index++;\r\n });\r\n }\r\n\r\n loadHandleBars(consultants) {\r\n\r\n if (consultants === null || consultants.length === 0) {\r\n $(\"#component-consultant-carousel\").hide();\r\n return;\r\n }\r\n\r\n // check for hideAvailability flag from hidden flag in markup.\r\n const hideAvailability = $(\"#hideAvailability\").val();\r\n if (hideAvailability == \"true\") {\r\n consultants.forEach((element => {\r\n element.HideAvailability = (hideAvailability === 'true' || hideAvailability === 'True');\r\n }));\r\n }\r\n\r\n let source = $(\"#consultant-template\").html(),\r\n template,\r\n context,\r\n html;\r\n\r\n if(source) {\r\n template = Handlebars.compile(source);\r\n context = {consultants: consultants, hidePractisingAt: this.hidePractisingAt};\r\n html = template(context);\t\t\t\t\r\n $(\"#consultant-template\").after(html);\r\n }\r\n\r\n let _this = this;\r\n setTimeout(function () {\r\n if (consultants === null || consultants.length === 0) {\r\n $(\"#component-consultant-carousel\").hide();\r\n return;\r\n }\r\n\r\n $('#component-consultant-carousel').show();\r\n _this.loadSlick();\r\n _this.addImageLiquid();\r\n _this.equalHeights();\r\n _this.bindSlickArrowClick();\r\n }, \r\n 300);\r\n \r\n }\r\n\r\n equalHeights() {\r\n $(\".consultant-carousel__slider\").each(function () {\r\n var highestBox = 0;\r\n\r\n $(\".consultant-carousel__panel\", this).each(function () {\r\n if ($(this).height() > highestBox) {\r\n highestBox = $(this).height(); \r\n }\r\n });\r\n\r\n $('.consultant-carousel__panel', this).height(highestBox);\r\n $('.consultant-carousel__gradient--right').show().height(highestBox + 20);\r\n $('.consultant-carousel__gradient--left').height(highestBox + 20);\r\n });\r\n }\r\n\r\n /* bind arrow click */\r\n bindSlickArrowClick () {\r\n let _this = this; \r\n $(document).on('click',\"#component-consultant-carousel .slick-arrow\", function(){\r\n _this.updateGradientIfSlickIsDisabled(); \r\n });\r\n }\r\n\r\n updateGradientIfSlickIsDisabled () {\r\n \r\n setTimeout(() => {\r\n\r\n if ($(\"#component-consultant-carousel .slick-prev\").hasClass('slick-disabled')) {\r\n $(\"#component-consultant-carousel .consultant-carousel__gradient--left\").fadeOut();\r\n } else {\r\n $(\"#component-consultant-carousel .consultant-carousel__gradient--left\").fadeIn();\r\n }\r\n\r\n if ($(\"#component-consultant-carousel .slick-next\").hasClass('slick-disabled')) {\r\n $(\"#component-consultant-carousel .consultant-carousel__gradient--right\").fadeOut();\r\n } else {\r\n $(\"#component-consultant-carousel .consultant-carousel__gradient--right\").fadeIn();\r\n }\r\n\r\n }, 200);\r\n }\r\n\r\n init() {\r\n let validDateToUseLocalRepo = this.validDateToUseLocalRepo();\r\n if (validDateToUseLocalRepo) {\r\n this.loadLocal(); \r\n } else {\r\n this.loadRemote(); \r\n }\r\n \r\n // remove old storage items\r\n if (this.hasLocalStorage()) {\r\n this.removeOldLocaleStorage();\r\n }\r\n }\r\n}\r\n \r\n \r\n\r\n\r\n\r\n\r\n","export class CarouselHomeModule {\r\n\r\n constructor() {\r\n\r\n if ($(\"#component-home-carousel\").length > 0) {\r\n this.properties();\r\n this.init(); \r\n } \r\n }\r\n\r\n properties() {\r\n this.sliderSelector = \"#component-home-carousel .home-carousel\";\r\n this.slidesToShow = 1;\r\n this.slidesToScroll = 1;\r\n this.initialSlide = 0;\r\n }\r\n\r\n init() {\r\n this.loadSlick() \r\n }\r\n\r\n loadSlick() {\r\n\r\n var _this = this;\r\n $(this.sliderSelector).slick({\r\n mobileFirst: true,\r\n responsive: [\r\n {\r\n breakpoint: 0,\r\n settings: {\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 1,\r\n slidesToScroll: 1,\r\n initialSlide: _this.initialSlide,\r\n arrows: false\r\n }\r\n },\r\n {\r\n breakpoint: 1200,\r\n settings: {\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 1,\r\n slidesToScroll: 1,\r\n arrows: true\r\n }\r\n }\r\n ]\r\n });\r\n }\r\n}\r\n \r\n \r\n\r\n\r\n\r\n\r\n","export class GalleryModule {\r\n\r\n constructor() {\r\n\r\n if ($(\"#component-gallery\").length > 0) {\r\n this.properties();\r\n this.init(); \r\n } \r\n }\r\n\r\n properties() {\r\n this.sliderSelector = \"#component-gallery .gallery-carousel__slider\";\r\n this.slidesToShow = 1.2;\r\n this.slidesToScroll = 1;\r\n this.initialSlide = 0;\r\n }\r\n\r\n init() {\r\n this.loadSlick() \r\n }\r\n\r\n loadSlick() {\r\n\r\n\r\n $(this.sliderSelector).slick({\r\n\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 1,\r\n slidesToScroll: 1,\r\n centerMode: true, \r\n initialSlide: 0,\r\n arrows: false,\r\n mobileFirst: true, \r\n responsive: [\r\n {\r\n breakpoint: 1100, \r\n settings: {\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 1,\r\n slidesToScroll: 1,\r\n centerMode: true, \r\n initialSlide: 0,\r\n arrows: true\r\n }\r\n }\r\n ]\r\n });\r\n }\r\n}\r\n \r\n \r\n\r\n\r\n\r\n\r\n","\r\nexport class TreatmentareasAzModule {\r\n\r\n constructor() {\r\n\r\n if ($(\"#component-treatmentarea-az\").length > 0) {\r\n this.properties();\r\n this.init(); \r\n } \r\n }\r\n\r\n properties() {\r\n /* treatmentLinks global variable */\r\n this.data = treatmentLinks;\r\n }\r\n \r\n buildAzBar(letter, searchBarRow) {\r\n\r\n let _this = this;\r\n $(searchBarRow).html(\"\");\r\n $(\".treatmentareaaz__search-term\").val(\"\");\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list\").html(\"\");\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list-header\").html(`Results for '${letter.toUpperCase()}':`);\r\n $.each(_this.data, function(i, item) {\r\n if (_this.searchCriteriaIsMatched(item, letter)) {\r\n let letterClassName = `letter-${item.Text.substring(0,1).toLowerCase()}`;\r\n\r\n if (item.Text.substring(1,2) !== \"-\") {\r\n let subLetterClassName = `subletter-${item.Text.substring(0,2).toLowerCase()}`;\r\n if (!$(\".\" + subLetterClassName).length) { \r\n let alphaTemplate = `
    ${item.Text.substring(0,1).toLowerCase()}${item.Text.substring(1,2).toLowerCase()}
    `;\r\n $(searchBarRow).append(alphaTemplate); \r\n }\r\n }\r\n \r\n _this.addToAlphaResults(item); \r\n } \r\n });\r\n\r\n let selectedLetterClassName = `.letter-${letter}`;\r\n var letterLength = $(selectedLetterClassName).length;\r\n let remainder = (letterLength % 6);\r\n \r\n if (remainder > 0) {\r\n let emptyItems = 6 - remainder;\r\n for (var i = 0; i < emptyItems; i++) { \r\n $(\".treatmentareaaz__subletters\").append(`
    `); \r\n }\r\n }\r\n }\r\n\r\n addToAlphaResults(item) {\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list\").append(`
  • ${item.Text}
  • `); \r\n }\r\n\r\n addToSearchResults(item) {\r\n var isMobile = $(\".treatmentareaaz__list-mobile\").is(\":visible\");\r\n if (isMobile) {\r\n $(\".treatmentareaaz__list-mobile .treatmentareaaz__list\").append(`
  • ${item.Text}
  • `); \r\n } else {\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list\").append(`
  • ${item.Text}
  • `); \r\n }\r\n } \r\n\r\n searchCriteriaIsMatched(item, letter) {\r\n let length = letter.length; \r\n let isMatch = item.Text.substring(0,length).toLowerCase() == letter.toLowerCase();\r\n return isMatch;\r\n }\r\n\r\n registerAlphaLinkClick() { \r\n\r\n $(\"body\").on(\"click\", \".alpha-link\", (e) => { \r\n e.preventDefault();\r\n \r\n let $this = $(e.currentTarget);\r\n let isSubletter = $this.parent().parent().hasClass(\"treatmentareaaz__subletters\");\r\n let searchBarRow = $this.parent().parent().next(\".treatmentareaaz__subletters\");\r\n\r\n if (!isSubletter) {\r\n $(\".alpha-link\").removeClass(\"is-on\");\r\n $this.addClass(\"is-on\"); \r\n $(\".treatmentareaaz__subletters\").removeClass(\"is-on\"); \r\n $(searchBarRow).addClass(\"is-on\");\r\n } else { \r\n $(\".treatmentareaaz__subletters .alpha-link\").removeClass(\"is-on\");\r\n $this.addClass(\"is-on\");\r\n }\r\n\r\n let letter = $this.text().toLowerCase();\r\n this.buildAzBar(letter, searchBarRow);\r\n this.showHideContent(\"alpha\"); \r\n });\r\n\r\n }\r\n\r\n registerSearchTermSubmit() { \r\n\r\n document.querySelector(\".treatmentareaaz__search-bar form\").addEventListener(\"submit\", (e) => {\r\n\r\n e.preventDefault();\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list\").html(\"\");\r\n let letter = $(\".treatmentareaaz__search-term\").val();\r\n if (letter.length > 2) {\r\n for (var item of this.data) { \r\n if (item.Text.includes(letter)) this.addToSearchResults(item);\r\n }\r\n this.showHideContent(\"search\"); \r\n }\r\n \r\n });\r\n }\r\n\r\n registerSearchTermTypeahead() {\r\n $(\".treatmentareaaz__search-term\").on('input', (e) => { \r\n\r\n let $this = $(e.currentTarget);\r\n var letter = $this.val();\r\n if (letter.length < 3) {\r\n this.showHideContent(\"default\"); \r\n return;\r\n }\r\n \r\n var isMobile = $(\".treatmentareaaz__list-mobile\").is(\":visible\");\r\n if (isMobile) {\r\n $(\".treatmentareaaz__list-mobile .treatmentareaaz__list-header\").html(`Results for '${letter}':`); \r\n $(\".treatmentareaaz__list-mobile .treatmentareaaz__list\").html('');\r\n } else {\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list-header\").html(`Results for '${letter}':`); \r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list\").html('');\r\n }\r\n for (var item of this.data) {\r\n \r\n if (this.searchCriteriaIsMatched(item, letter)) {\r\n this.addToSearchResults(item); \r\n }\r\n }\r\n\r\n this.showHideContent(\"search\");\r\n\r\n });\r\n }\r\n\r\n registerViewAllButton() {\r\n\r\n $(\"body\").on(\"click\", \".js-treatmentareaaz__toggle\", (e) => { \r\n\r\n e.preventDefault();\r\n let treatmentareaazToggle = document.querySelector(\".treatmentareaaz__showall\");\r\n if (this.isHidden(treatmentareaazToggle)) {\r\n $(\".treatmentareaaz__showall\").removeClass(\"hide\").addClass(\"display-flex\");\r\n $(\".treatmentareaaz__showall-show\").hide();\r\n $('html, body').animate({\r\n scrollTop: $(\"#treatmentareaaz__showall\").offset().top\r\n }, 0);\r\n } else {\r\n $(\".treatmentareaaz__showall\").removeClass(\"display-flex\").addClass(\"hide\");\r\n $(\".treatmentareaaz__showall-show\").show();\r\n $('html, body').animate({\r\n scrollTop: $(\"body\").offset().top\r\n }, 0); \r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n registerCloseSearchButton() {\r\n document.querySelector(\".treatmentareaaz__search-close\").addEventListener(\"click\", (e) => { \r\n e.preventDefault();\r\n $(\".treatmentareaaz__search-term\").val(\"\");\r\n this.showHideContent(\"default\");\r\n });\r\n }\r\n\r\n isHidden(el) {\r\n return (el.offsetParent === null)\r\n }\r\n\r\n showHideContent(content) {\r\n \r\n var isMobile = $(\".treatmentareaaz__list-mobile\").is(\":visible\");\r\n if (content === \"default\") {\r\n $(\".treatmentareaaz__introduction\").show();\r\n $(\".treatmentareaaz__list-header\").hide();\r\n $(\".treatmentareaaz__list\").hide();\r\n $(\".alpha-link\").removeClass(\"is-on\"); \r\n $(\".treatmentareaaz__subletters\").removeClass(\"is-on\"); \r\n }\r\n\r\n if (content === \"alpha\") {\r\n\r\n $(\".treatmentareaaz__search-term\").val();\r\n $(\".treatmentareaaz__introduction\").hide();\r\n $(\".treatmentareaaz__list-mobile .treatmentareaaz__list-header\").hide();\r\n $(\".treatmentareaaz__list-mobile .treatmentareaaz__list\").hide();\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list-header\").show();\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list\").show(); \r\n }\r\n\r\n if (content === \"search\") {\r\n\r\n $(\".treatmentareaaz__introduction\").hide();\r\n if (isMobile) {\r\n $(\".treatmentareaaz__list-mobile .treatmentareaaz__list-header\").show();\r\n $(\".treatmentareaaz__list-mobile .treatmentareaaz__list\").show();\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list-header\").hide();\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list\").hide();\r\n } else {\r\n $(\".treatmentareaaz__list-mobile .treatmentareaaz__list-header\").hide();\r\n $(\".treatmentareaaz__list-mobile .treatmentareaaz__list\").hide();\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list-header\").show();\r\n $(\".treatmentareaaz__list-default .treatmentareaaz__list\").show();\r\n }\r\n\r\n $(\".alpha-link\").removeClass(\"is-on\"); \r\n $(\".treatmentareaaz__subletters\").removeClass(\"is-on\"); \r\n }\r\n }\r\n\r\n mobileAccordion() {\r\n\r\n $(\".treatmentareaaz__showall-text\").on('click', (e) => { \r\n\r\n let $this = $(e.currentTarget);\r\n let isCurrentlyOn = $this.hasClass(\"is-on\");\r\n $(\".treatmentareaaz__showall-text\").removeClass('is-on');\r\n let currentContent = $this.find('.treatmentareaaz__showall-content');\r\n let isHidden = currentContent.is(\":hidden\"); \r\n if (isHidden && !isCurrentlyOn){\r\n // $this.find('.treatmentareaaz__showall-content').show();\r\n $this.addClass('is-on');\r\n } else {\r\n // $this.find('.treatmentareaaz__showall-content').hide();\r\n $this.removeClass('is-on');\r\n }\r\n });\r\n }\r\n\r\n init() {\r\n this.properties();\r\n this.registerAlphaLinkClick();\r\n this.registerSearchTermTypeahead();\r\n this.registerSearchTermSubmit();\r\n this.registerViewAllButton();\r\n this.registerCloseSearchButton();\r\n this.mobileAccordion();\r\n }\r\n}\r\n \r\n \r\n\r\n\r\n\r\n\r\n","import { HelpersModule } from \"../helpers/helpers\";\r\n\r\nconst helpersModule = new HelpersModule();\r\n\r\nexport class LocationFinderModule {\r\n\r\n constructor(mapApiCallbacks) {\r\n\r\n this.lat = null;\r\n this.lng = null;\r\n this.treatment = null;\r\n this.location = null;\r\n this.doctype = \"\";\r\n this.show = 3;\r\n this.default = 3;\r\n this.showAll = false;\r\n this.max = 9;\r\n this.totalRecords = 0;\r\n this.isMobile = false;\r\n this.mapApiCallbacks = mapApiCallbacks;\r\n\r\n this.hasSpirgpSetUp = false; \r\n this.hasBupaEnabled = false; \r\n this.hasBreastClinicEnabled = false; \r\n\r\n if ($(\"#SpireGPModule\").length > 0) {\r\n this.hasSpirgpSetUp = ($(\"#SpireGPModule\").val() == 1 ? true : false );\r\n }\r\n\r\n if ($(\"#BupaEnabled\").length > 0) {\r\n this.hasBupaEnabled = ($(\"#BupaEnabled\").val() == 1 ? true : false);\r\n }\r\n\r\n if ($(\"#BreastClinicEnabled\").length > 0) {\r\n this.hasBreastClinicEnabled = ($(\"#BreastClinicEnabled\").val() == 1 ? true : false);\r\n }\r\n\r\n if ($(\".js-location-finder\").length > 0) {\r\n this.setup();\r\n }\r\n\r\n }\r\n\r\n scrollTo(name) {\r\n this.scrollToResolver(document.getElementById(name));\r\n }\r\n\r\n scrollToResolver(elem) {\r\n let that = this;\r\n let offset = 30;\r\n if (that.isMobileDevice()) {\r\n offset = 100;\r\n }\r\n let jump = parseInt(elem.getBoundingClientRect().top * .2) - offset;\r\n document.body.scrollTop += jump;\r\n document.documentElement.scrollTop += jump;\r\n //lastjump detects anchor unreachable, also manual scrolling to cancel animation if scroll > jump\r\n if (!elem.lastjump || elem.lastjump > Math.abs(jump)) {\r\n elem.lastjump = Math.abs(jump);\r\n setTimeout(function () {\r\n that.scrollToResolver(elem);\r\n }, \"100\");\r\n } else {\r\n elem.lastjump = null;\r\n }\r\n }\r\n\r\n setup() {\r\n\r\n let that = this;\r\n let finders = $(\".js-location-finder\");\r\n\r\n if (finders == undefined || finders.length == 0) return;\r\n\r\n let $body = $(\"body\");\r\n\r\n that.doctype = $body.attr(\"data-dtype\");\r\n that.groupTreatmentArea = that.doctype === \"grouptreatmentarea\" ? $body.data(\"content\") : null;\r\n that.isMobile = that.isMobileDevice();\r\n\r\n if (that.doctype == \"grouplocations\") {\r\n that.max = -1;\r\n that.default = 6;\r\n\r\n if (that.isMobile) {\r\n that.show = 2;\r\n }\r\n else {\r\n that.show = 6;\r\n }\r\n }\r\n that.setupGoogleApi();\r\n }\r\n\r\n isMobileDevice() {\r\n return (typeof window.orientation !== \"undefined\") || (navigator.userAgent.indexOf('IEMobile') !== -1);\r\n }\r\n\r\n //filterLocationsForSpireGP(locations) {\r\n // var spireGPModule = document.getElementById(\"SpireGPModule\");\r\n // if (spireGPModule != null && spireGPModule != \"undefined\") {\r\n\r\n // var hasSpirgpSetUp = $(\"#SpireGPModule\").val();\r\n // if (hasSpirgpSetUp) {\r\n // locations = $.grep(locations, function (el, idx) { return el.SpireGPEnabled }, false);\r\n // }\r\n // }\r\n // return locations;\r\n //}\r\n // Filtering bupa enabled hospitals - SW-1888\r\n //filterLocationsForBupa(locations) {\r\n // var hasBupaEnabled = $(\"#BupaEnabled\");\r\n // if (hasBupaEnabled != null && hasBupaEnabled != \"undefined\") {\r\n\r\n // var hasBupaSetUp = $(\"#BupaEnabled\").val();\r\n // if (hasBupaSetUp) {\r\n // locations = $.grep(locations, function (el, idx) { return el.BupaEnabledHospital }, false);\r\n // }\r\n // }\r\n // return locations;\r\n //}\r\n\r\n //filterOneStopBreastClinic(locations) {\r\n // var hasBreastClinicEnabled = $(\"#BreastClinicEnabled\");\r\n // if (hasBreastClinicEnabled != null && hasBreastClinicEnabled != \"undefined\") {\r\n\r\n // var hasBreastClinicSetUp = $(\"#BreastClinicEnabled\").val();\r\n // if (hasBreastClinicSetUp == 1) {\r\n // locations = $.grep(locations, function (el, idx) { return el.BreastClinicEnabled }, false);\r\n // }\r\n // }\r\n // return locations;\r\n //}\r\n\r\n getUrlParams() {\r\n var that = this;\r\n that.lat = helpersModule.getParameterByName(\"lat\");\r\n that.lng = helpersModule.getParameterByName(\"lon\");\r\n that.location = helpersModule.getParameterByName(\"location\");\r\n if (that.lat != undefined && that.lng != undefined) {\r\n // set the location in the search box.\r\n var latlng = { lat: parseFloat(that.lat), lng: parseFloat(that.lng) };\r\n var geocoder = new google.maps.Geocoder;\r\n geocoder.geocode({ 'location': latlng }, function (results, status) {\r\n if (status === 'OK') {\r\n if (results[0]) {\r\n\r\n let address = results[0].formatted_address;\r\n const searchInput = $(\"#location-finder\");\r\n $(searchInput).val(address);\r\n that.lat = latlng.lat;\r\n that.lng = latlng.lng;\r\n that.locationFinderBindResults(searchInput, false, 3);\r\n\r\n //that.filterLocationsForSpireGP(that.location);\r\n //that.filterLocationsForBupa(that.location);\r\n //that.filterOneStopBreastClinic(that.location);\r\n\r\n } else {\r\n console.log(\"err - No results were found!\");\r\n }\r\n } else {\r\n console.log(\"Geocoder failed due to: \" + status);\r\n }\r\n });\r\n }\r\n }\r\n\r\n showMoreClick(searchInput) {\r\n var that = this\r\n var componentipc = $(searchInput).parents('[data-c-name]:first');\r\n\r\n if (componentipc != null) {\r\n $(componentipc).attr('data-show-count', '3');\r\n }\r\n\r\n $(componentipc).find(\".js-finder__hospital-treatment--show-more\").off(\"click\");\r\n\r\n $(componentipc).find(\".js-finder__hospital-treatment--show-more\").on(\"click\", function (e) {\r\n e.preventDefault();\r\n\r\n let showCount = $(componentipc).data(\"show-count\");\r\n\r\n if (showCount == null) {\r\n showCount = 3;\r\n $(componentipc).data(\"show-count\", '3');\r\n }\r\n else if (showCount >= 3 && showCount < 6) {\r\n showCount = 6;\r\n $(componentipc).data(\"show-count\", '6');\r\n }\r\n else {\r\n showCount = -1;\r\n $(componentipc).data(\"show-count\", '-1');\r\n }\r\n\r\n that.locationFinderBindResults(searchInput, false, showCount);\r\n\r\n });\r\n \r\n }\r\n\r\n setupGoogleApi() {\r\n var that = this;\r\n const finders = $(\".js-location-finder\");\r\n const options = {\r\n componentRestrictions: { 'country': 'gb' },\r\n types: ['geocode'] // (cities)\r\n };\r\n const googleApiUrl = 'https://maps.googleapis.com/maps/api/js?key=AIzaSyALpZboQbieD8FePSqE0JK2LdTvHlnAZy4&libraries=places';\r\n\r\n\r\n var selectFirstOnEnter = function (input) { // store the original event binding function\r\n var _addEventListener = (input.addEventListener) ? input.addEventListener : input.attachEvent;\r\n function addEventListenerWrapper(type, listener) { // Simulate a 'down arrow' keypress on hitting 'return' when no pac suggestion is selected, and then trigger the original listener.\r\n if (type == \"keydown\") {\r\n var orig_listener = listener;\r\n listener = function (event) {\r\n var suggestion_selected = $(\".pac-item-selected\").length > 0;\r\n if (event.which == 13 && !suggestion_selected) {\r\n var simulated_downarrow = $.Event(\"keydown\", { keyCode: 40, which: 40 });\r\n orig_listener.apply(input, [simulated_downarrow]);\r\n }\r\n orig_listener.apply(input, [event]);\r\n };\r\n }\r\n _addEventListener.apply(input, [type, listener]); // add the modified listener\r\n }\r\n if (input.addEventListener) {\r\n input.addEventListener = addEventListenerWrapper;\r\n } else if (input.attachEvent) {\r\n input.attachEvent = addEventListenerWrapper;\r\n }\r\n };\r\n\r\n that.mapApiCallbacks.push( function () {\r\n\r\n that.getUrlParams();\r\n\r\n\r\n jQuery.each(finders, function (key, value) {\r\n const searchInput = finders[key];\r\n\r\n const autocomplete = new google.maps.places.Autocomplete(\r\n searchInput,\r\n options\r\n );\r\n\r\n let hasDownBeenPressed = false;\r\n\r\n that.showMoreClick(searchInput);\r\n\r\n selectFirstOnEnter(searchInput);\r\n\r\n google.maps.event.addDomListener(searchInput, \"keydown\", e => {\r\n // Maps API e.stopPropagation();\r\n e.cancelBubble = true;\r\n // If enter key, or tab key\r\n //if (e.keyCode === 13 && searchInput.length > 0) { //|| e.keyCode === 9) {\r\n // // If user isn't navigating using arrows and this hasn't ran yet\r\n // if (!hasDownBeenPressed && !e.hasRanOnce) {\r\n // e.preventDefault();\r\n // google.maps.event.trigger(e.target, \"keydown\", {\r\n // keyCode: 40,\r\n // hasRanOnce: true\r\n // });\r\n // }\r\n //}\r\n\r\n });\r\n\r\n google.maps.event.addListener(autocomplete, \"place_changed\", function () {\r\n var LatLng;\r\n // Get the place info from the autocomplete Api\r\n const place = autocomplete.getPlace();\r\n\r\n\r\n\r\n $(\".js-finder__hospital-treatment--error\").hide();\r\n //If we can find the place lets go to it\r\n if (typeof place.address_components !== \"undefined\") {\r\n // reset hasDownBeenPressed in case they don't unfocus\r\n hasDownBeenPressed = false;\r\n\r\n // Get returned location\r\n const returnedCoords = new google.maps.LatLng(\r\n place.geometry.location.lat(),\r\n place.geometry.location.lng()\r\n );\r\n\r\n if (place.geometry.location) {\r\n that.lat = place.geometry.location.lat();\r\n that.lng = place.geometry.location.lng();\r\n that.locationFinderBindResults(searchInput, false, 3);\r\n }\r\n\r\n }\r\n else {\r\n $(\".js-finder__hospital-treatment--error\").show();\r\n }\r\n });\r\n\r\n });\r\n\r\n });\r\n\r\n }\r\n\r\n setUrlParamsAndNavigateToDataUrl() {\r\n let that = this;\r\n let url = helpersModule.appendTrailingSlash(that.navigationUrl);\r\n let address = \"?lat=\" + that.lat + \"&lon=\" + that.lng;\r\n window.location.href = url + address;\r\n }\r\n\r\n redirectToDataUrl(navigationUrl) {\r\n this.navigationUrl = navigationUrl;\r\n return this.setUrlParamsAndNavigateToDataUrl(); // Navigate to the calling URL instead of showing the results.\r\n }\r\n\r\n locationFinderBindResults(searchInput, allowScroll, show) {\r\n let that = this;\r\n // using the searchInput control, get closest form and find the data-navigation-url.\r\n let componentForm = $(searchInput).closest('form');\r\n\r\n // Check we are on a treatment page\r\n that.treatment = $(document).find('body').data('treatment-id');\r\n if (that.treatment == undefined) {\r\n that.treatment = \"\";\r\n }\r\n\r\n // if the data-navigation-url exists then change window location.\r\n\r\n let navigationUrl = $(componentForm).data(\"navigation-url\");\r\n if (navigationUrl != undefined && navigationUrl.length > 0) {\r\n that.redirectToDataUrl(navigationUrl);\r\n }\r\n else {\r\n let componentipc = $(searchInput).parents('[data-c-name]:first');\r\n let showResults = $(componentipc).data(\"show-results\");\r\n\r\n if (showResults == undefined)\r\n showResults = true;\r\n\r\n if (showResults) {\r\n $(\".js-finder__hospital-treatment--error\").hide();\r\n\r\n if (that.lat == undefined || that.lng == undefined) {\r\n return;\r\n } else {\r\n if (that.lat == null || that.lng == null) {\r\n return;\r\n }\r\n else {\r\n if (that.lat == \"null\" || that.lng == \"null\") {\r\n return;\r\n }\r\n }\r\n }\r\n let addressurl = \"\";\r\n let userLatLong = that.lat + \";\" + that.lng;\r\n if (that.lat !== \"\" && that.lng !== \"\") {\r\n let laturl = \"&lat=\",\r\n lonurl = \"&lon=\";\r\n addressurl = laturl + that.lat + lonurl + that.lng;\r\n }\r\n\r\n let filterString = \"&filterBupa=\" + that.hasBupaEnabled + \"&filterOneStopBreastClinics=\" + that.hasBreastClinicEnabled + \"&filterSpireGp=\" + that.hasSpirgpSetUp;\r\n\r\n let useHcpUrl = $(\"#UseHCPUrl\").val();\r\n let specialityId = $(\"#SpireSpecialityId\").val();\r\n let method = \"\";\r\n if (specialityId != \"0\" && specialityId != \"\" && specialityId != 'undefined' && specialityId != undefined) {\r\n\r\n let params = addressurl + \"&treatment=\" + that.treatment + \"&speciality=\" + specialityId + filterString;\r\n params = params.trim();\r\n params = params.replace(\"&&\", \"&\");\r\n params = (params[0] == '&') ? params.substr(1) : params;\r\n method = 'CustomApi/GetGroupMapHospitalsBySpecialty/?' + params;\r\n }\r\n else {\r\n\r\n if (useHcpUrl == undefined) {\r\n useHcpUrl = 0;\r\n }\r\n\r\n let params = addressurl + \"&treatment=\" + that.treatment + \"&max=\" + that.max +\r\n (that.groupTreatmentArea ? (\"&treatmentAreaId=\" + that.groupTreatmentArea) : \"\") + \"&useHcpUrl=\" + useHcpUrl + filterString;\r\n params = params.trim();\r\n params = params.replace(\"&&\", \"&\");\r\n params = (params[0] == '&') ? params.substr(1) : params;\r\n\r\n method = 'CustomApi/GetGroupMapHospitalsP2/?' + params\r\n }\r\n\r\n that.callMethod(method, userLatLong, allowScroll, componentipc, show);\r\n }\r\n else {\r\n return;\r\n }\r\n\r\n \r\n\r\n }\r\n\r\n\r\n }\r\n\r\n sortLocationsByDistance(locations, userLatLong) {\r\n\r\n var that = this;\r\n\r\n function sorter(a, b) {\r\n return a.distance - b.distance;\r\n }\r\n\r\n var latlong = userLatLong.split(\";\");\r\n\r\n for (var i = 0; i < locations.length; i++) {\r\n locations[i].distance = that.calculateDistance(latlong[0], latlong[1], locations[i].lat, locations[i].lon);\r\n locations[i].distanceFriendly = locations[i].distance.toFixed(2) + \" miles\";\r\n }\r\n\r\n locations.sort(sorter);\r\n\r\n return locations;\r\n\r\n }\r\n\r\n calculateDistance(lat1, lon1, lat2, lon2) {\r\n\r\n var radlat1 = Math.PI * lat1 / 180;\r\n var radlat2 = Math.PI * lat2 / 180;\r\n var radlon1 = Math.PI * lon1 / 180;\r\n var radlon2 = Math.PI * lon2 / 180;\r\n var theta = lon1 - lon2;\r\n var radtheta = Math.PI * theta / 180;\r\n var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\r\n dist = Math.acos(dist);\r\n dist = dist * 180 / Math.PI;\r\n dist = dist * 60 * 1.1515;\r\n\r\n return dist;\r\n }\r\n\r\n accordion_click() {\r\n\r\n $('.js-accordion__toggle').unbind(\"click\");\r\n $('.js-accordion__toggle').on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n\r\n var $content = $(this).parents(\".js-accordion\").find(\".js-accordion__content\");\r\n\r\n if ($(this).hasClass(\"is-on\")) {\r\n $(this).removeClass(\"is-on\");\r\n $content.removeClass(\"is-on\");\r\n //gaHelper.trackEvent(\"Accordion\", \"Close\", $(this).text(), null, true);\r\n } else {\r\n $(this).addClass(\"is-on\");\r\n $content.addClass(\"is-on\");\r\n //gaHelper.trackEvent(\"Accordion\", \"Open\", $(this).text(), null, true);\r\n }\r\n });\r\n\r\n\r\n $('.js-accordion--reverse__toggle').on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n\r\n var $content = $(this).parents(\".js-accordion--reverse\").find(\".js-accordion--reverse__content\");\r\n var $contentMini = $(this).parents(\".js-accordion--reverse\").find(\".js-accordion--reverse__content--minimised\");\r\n\r\n if ($(this).hasClass(\"is-on\")) {\r\n $(this).removeClass(\"is-on\");\r\n $contentMini.removeClass(\"is-on\");\r\n $content.removeClass(\"is-on\");\r\n //gaHelper.trackEvent(\"Mancester Banner Close\", \"Close\", $(this).text(), null, true);\r\n } else {\r\n $(this).addClass(\"is-on\");\r\n $contentMini.addClass(\"is-on\");\r\n $content.addClass(\"is-on\");\r\n //gaHelper.trackEvent(\"Mancester Banner Open\", \"Open\", $(this).text(), null, true);\r\n }\r\n });\r\n }\r\n\r\n resultsInSpireGpStyle(componentipc, locations) {\r\n\r\n let that = this;\r\n\r\n //locations = that.filterLocationsForSpireGP(locations);\r\n\r\n if (locations.length > 0) {\r\n locations = locations.slice(0, 3);\r\n\r\n // using componentipc find the template associated\r\n\r\n let source = $(componentipc).find(\"#location-template\").html(),\r\n template,\r\n context,\r\n html;\r\n\r\n if (source) {\r\n template = Handlebars.compile(source);\r\n context = { locations: locations };\r\n $(componentipc).find(\".js-location-accordions\").remove();\r\n html = template(context);\r\n\r\n $(componentipc).find(\"#location-template\").after(html);\r\n\r\n that.accordion_click();\r\n }\r\n }\r\n }\r\n\r\n resultsStandardStyleWithOneStopeBreastFilter(componentipc, locations, hasBreastClinicSetup, show) {\r\n\r\n let that = this;\r\n\r\n //if (hasBreastClinicSetup == \"1\") {\r\n // locations = that.filterOneStopBreastClinic(locations);\r\n //}\r\n\r\n if (locations.length > 0) {\r\n that.totalRecords = locations.length;\r\n $(componentipc).find(\".js-finder__hospital-treatment--item\").remove();\r\n\r\n let trimmedList = locations.slice(0, show);\r\n\r\n if (that.showAll) {\r\n trimmedList = locations;\r\n }\r\n\r\n let source = $(componentipc).find(\"#location-template\").html(),\r\n template,\r\n context,\r\n html;\r\n\r\n if (source) {\r\n template = Handlebars.compile(source);\r\n context = { locations: trimmedList };\r\n html = template(context);\r\n\r\n $(componentipc).find(\"#location-template\").after(html);\r\n }\r\n }\r\n\r\n if (show > 6 || show == -1) {\r\n $(componentipc).find(\".js-finder__hospital-treatment--show-more-bar\").hide();\r\n }\r\n else {\r\n $(componentipc).find(\".js-finder__hospital-treatment--show-more-bar\").show();\r\n }\r\n\r\n }\r\n\r\n resultsInHeroStyle(componentipc, locations) {\r\n\r\n let that = this;\r\n\r\n if (locations.length > 0) {\r\n locations = locations.slice(0, 3);\r\n\r\n let lt = $(componentipc).find(\"#location-template\");\r\n \r\n let source = lt.html(),\r\n template,\r\n context,\r\n html;\r\n\r\n if (source) {\r\n template = Handlebars.compile(source);\r\n context = { locations: locations };\r\n html = template(context);\r\n\r\n lt.after(html);\r\n }\r\n }\r\n }\r\n\r\n callMethod(method, userLatLong, allowScroll, componentipc, show) {\r\n\r\n let dataUrl = apilocation + method;\r\n\r\n $(\"#globalSpinner\").show();\r\n\r\n let that = this;\r\n\r\n if (allowScroll == undefined) {\r\n allowScroll = true;\r\n }\r\n\r\n let hasSpireGpSetup = $(componentipc).find(\"#SpireGPModule\").val(); \r\n let hasBreastClinicSetup = $(componentipc).find(\"#BreastClinicEnabled\").val();\r\n let useHeroSetup = $(componentipc).find(\"#LocationSearchHero\").val();\r\n\r\n $.ajax({\r\n url: dataUrl,\r\n async: true,\r\n dataType: 'json',\r\n success: function (json) {\r\n\r\n let locations = json;\r\n\r\n locations = that.sortLocationsByDistance(locations, userLatLong);\r\n\r\n if(useHeroSetup === \"1\") {\r\n that.resultsInHeroStyle(componentipc, locations);\r\n } else if (hasSpireGpSetup === \"1\") {\r\n that.resultsInSpireGpStyle(componentipc, locations);\r\n }\r\n else {\r\n that.resultsStandardStyleWithOneStopeBreastFilter(componentipc, locations, hasBreastClinicSetup, show);\r\n }\r\n\r\n $(\"#globalSpinner\").hide();\r\n\r\n },\r\n error: function (XMLHttpRequest, textStatus, errorThrown) {\r\n $(\"#globalSpinner\").hide();\r\n }\r\n });\r\n }\r\n\r\n}\r\n\r\n// Function to execute a script only once.\r\n(function ($) {\r\n $.getScriptOnce = function (url, successhandler) {\r\n if ($.getScriptOnce.loaded.indexOf(url) === -1) {\r\n $.getScriptOnce.loaded.push(url);\r\n if (successhandler === undefined) {\r\n return $.getScript(url);\r\n } else {\r\n return $.getScript(url, function (script, textStatus, jqXHR) {\r\n successhandler(script, textStatus, jqXHR);\r\n });\r\n }\r\n } else {\r\n return false;\r\n }\r\n\r\n };\r\n\r\n $.getScriptOnce.loaded = [];\r\n\r\n}(jQuery));","import { HelpersModule } from \"../helpers/helpers\";\r\nimport { CookieHelper } from \"../cookies/cookies\";\r\n\r\nconst helpersModule = new HelpersModule();\r\nconst cookiesHelper = new CookieHelper();\r\n\r\nlet config = {\r\n ctaSelector: \".js-call-to-action--desktop\",\r\n $ctaHandle : $(\".js-call-to-action__handle\")\r\n }\r\n\r\nexport class CallToActionModule {\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n //toggleVisibility() {\r\n // var c = config,\r\n // $window = $(window);\r\n // var $cta = $(config.ctaSelector);\r\n\r\n // if (\r\n // //SP-840: Stop content being obstructed at certain resolutions \r\n // (($window.height() < 1100 && $window.width() < 1550 && $window.width() > 1150 || $window.width() < 1250) && (sessionStorage.getItem('isExistingSpireSession') == null || cookiesHelper.readCookie('ctaClosed') != 0))\r\n // || cookiesHelper.readCookie('ctaClosed') && cookiesHelper.readCookie('ctaClosed') != 0) {\r\n // $cta.removeClass(\"is-on\");\r\n // } else {\r\n // $cta.addClass(\"is-on\");\r\n // }\r\n //};\r\n\r\n init() {\r\n var that = this;\r\n var c = config;\r\n\r\n if (sessionStorage.getItem('isExistingSpireSession') == null) {\r\n cookiesHelper.writeCookie('ctaClosed', 0, 10);\r\n try {\r\n sessionStorage.setItem('isExistingSpireSession', 1);\r\n } catch (e) {\r\n // console.log(e);\r\n }\r\n }\r\n\r\n var $cta = $(config.ctaSelector);\r\n\r\n //if ($(\"body\").find(\"section\").hasClass(\"enquiry-form\")) {\r\n // $cta.removeClass(\"is-on\");\r\n // cookiesHelper.writeCookie('ctaClosed', 1, 10);\r\n //} else {\r\n // $cta.addClass(\"is-on\");\r\n // cookiesHelper.writeCookie('ctaClosed', 0, 10);\r\n //}\r\n\r\n //that.toggleVisibility();\r\n\r\n $cta.removeClass(\"call-to-action--desktop--initial-hide\");\r\n\r\n $(\".js-call-to-action__handle\").on(\"click\", function (e) {\r\n e.preventDefault();\r\n var $cta = $(config.ctaSelector);\r\n\r\n if ($cta.hasClass(\"is-on\") || ($(\"body\").hasClass(\"enquiry-form\"))) {\r\n $cta.removeClass(\"is-on\");\r\n //cookiesHelper.writeCookie('ctaClosed', 1, 10);\r\n } else {\r\n $cta.addClass(\"is-on\");\r\n //cookiesHelper.writeCookie('ctaClosed', 0, 10);\r\n }\r\n });\r\n\r\n //var toggleCtaVisibility = helpersModule.debounce(function (element) {\r\n // that.toggleVisibility();\r\n //}, 250);\r\n\r\n //window.addEventListener('resize', toggleCtaVisibility);\r\n }\r\n\r\n}\r\n\r\n\r\n","export class CookieHelper {\r\n\r\n constructor() {\r\n this.cookieKey = \"cookieAgreementSpire\";\r\n this.cookieKeySurvey = 'closeEnquiery';\r\n this.init();\r\n }\r\n\r\n bannerCookies() {\r\n var that = this;\r\n var cookieKeyBase = 'collapseBanner';\r\n\r\n $(\".topAdvert-banner\").each(function () {\r\n\r\n var bannerId = $(this).data(\"bannerid\");\r\n var cookieKey = cookieKeyBase + bannerId;\r\n var cookie = that.readCookie(cookieKey);\r\n var $bannerContent = $(this).find('.js-accordion--reverse__content');\r\n var $bannerToggle = $(this).find('.js-accordion--reverse__toggle');\r\n var $bannerCTA = $(this).find('.button');\r\n var bannerMaximised = false;\r\n\r\n if (!cookie) {\r\n\r\n $bannerContent.addClass('is-on');\r\n $bannerToggle.addClass('is-on');\r\n bannerMaximised = true;\r\n\r\n //gaHelper.trackEvent(\"Banner-\" + bannerId, \"Banner Displayed Maximised\", undefined, undefined, true);\r\n\r\n\r\n } else {\r\n\r\n $bannerContent.removeClass('is-on');\r\n $bannerToggle.removeClass('is-on');\r\n $('.js-accordion--reverse__content--minimised').removeClass('is-on');\r\n\r\n bannerMaximised = false;\r\n\r\n //gaHelper.trackEvent(\"Banner-\" + bannerId, \"Banner Displayed Minimised\", undefined, undefined, true);\r\n }\r\n\r\n $bannerToggle.on(\"click\", function (e) {\r\n if (bannerMaximised) {\r\n if (cookie === null) {\r\n that.writeCookie(cookieKey, true, 1);\r\n }\r\n //gaHelper.trackEvent(\"Banner-\" + bannerId, \"User Minimised Banner\");\r\n } else {\r\n //gaHelper.trackEvent(\"Banner-\" + bannerId, \"User Maximised Banner\");\r\n }\r\n });\r\n\r\n $bannerCTA.on(\"click\", function (e) {\r\n if ($bannerToggle.hasClass(\"is-on\")) {\r\n //gaHelper.trackEvent(\"Banner-\" + bannerId, \"User Clicked CTA - Banner Maximised\");\r\n } else {\r\n //gaHelper.trackEvent(\"Banner-\" + bannerId, \"User Clicked CTA - Banner Minimised\");\r\n }\r\n });\r\n });\r\n }\r\n\r\n surveyCookies() {\r\n\r\n var that = this;\r\n var desktopSurveyMaxCount = $(\"#desktopSurveyMaxCount\").val();\r\n var mobileSurveyMaxCount = $(\"#mobileSurveyMaxCount\").val();\r\n\r\n // if survey is disabled forget it\r\n if (desktopSurveyMaxCount == -1 && mobileSurveyMaxCount == -1) return;\r\n var $surveyModal = $(\".js-modal--survey\");\r\n var cookie = that.readCookie(that.cookieKeySurvey);\r\n\r\n // if the cookie is not there\r\n if (cookie === null) {\r\n\r\n // decide on max value dependant on desktop/mobile\r\n var surveyMaxCount = -1;\r\n var isDesktop = true;\r\n\r\n if ($(\".site-header\").is(':visible')) {\r\n isDesktop = true;\r\n surveyMaxCount = desktopSurveyMaxCount;\r\n }\r\n else {\r\n isDesktop = false;\r\n surveyMaxCount = mobileSurveyMaxCount;\r\n }\r\n\r\n // get the counter i.e. should we show the survey ?\r\n $.ajax({\r\n url: apilocation + 'SurveyApi/ShowSurvey',\r\n method: \"GET\",\r\n dataType: \"xml\",\r\n data: {\r\n \"surveyMaxCount\": surveyMaxCount,\r\n \"isDesktop\": isDesktop\r\n }\r\n }).done(function (data) {\r\n\r\n if (data === true) {\r\n\r\n // write the cookie so this person does not see again for 30 days\r\n that.writeCookie(that.cookieKeySurvey, \"1\", 30);\r\n\r\n // incrment the relevant counter\r\n $.ajax({\r\n url: apilocation + 'SurveyApi/' + (isDesktop ? \"IncrementDesktopSurveyCount\" : \"IncrementMobileSurveyCount\"),\r\n method: \"POST\",\r\n });\r\n\r\n // show the survey in a while\r\n setTimeout(function () {\r\n $surveyModal.addClass(\"is-on\");\r\n }, 15000);\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n $surveyModal.on(\"click\", \".js-enquiry-form-modal__close\", function (e) {\r\n $(this).parents(\".js-modal\").removeClass(\"is-on\");\r\n });\r\n $surveyModal.on(\"click\", \".js-enquiry-form__give-feedback\", function (e) {\r\n\r\n //get the page url the user have been to before click the \"Give feedback\" button\r\n var firstPage = window.location.href;;\r\n localStorage.setItem(\"firstPage\", firstPage);\r\n var storedfirstPage = localStorage.getItem('firstPage');\r\n\r\n\r\n $(this).parents(\".js-modal\").removeClass(\"is-on\");\r\n //var myWindow = window.open(\"\", \"_blank\", \"toolbar=no,scrollbars=yes,resizable=yes,top=0,left=0,width='700',height=700\" );\r\n var modalUrl = location.protocol + '//' + location.host + '/please-wait.html'\r\n var myWindow = window.open(modalUrl, \"myWindow\", \"scrollbars=1,menubar=1,resizable=1,width=660,height=700\"); // Opens a new window\r\n ;\r\n });\r\n\r\n\r\n }\r\n\r\n writeCookie(name, value, days) {\r\n var date = new Date();\r\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\r\n var expires = \"; expires=\" + date.toGMTString();\r\n var cookieString = name + \"=\" + value + expires + \"; path=/\";\r\n document.cookie = cookieString;\r\n return this;\r\n }\r\n\r\n readCookie(name) {\r\n var cookies = document.cookie.split(';');\r\n for (var i = 0; i < cookies.length; i++) {\r\n var cookie = cookies[i];\r\n while (cookie.charAt(0) == ' ') {\r\n cookie = cookie.substring(1, cookie.length);\r\n }\r\n if (cookie.indexOf(name + \"=\") == 0) {\r\n return cookie.substring(name.length + 1, cookie.length);\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n init() {\r\n\r\n var that = this;\r\n\r\n if (!that.readCookie(that.cookieKey)) {\r\n $('.js-cookie-bar').addClass('show');\r\n }\r\n else {\r\n $('.js-cookie-bar').removeClass('show');\r\n }\r\n\r\n $('.js-cookie-bar-agree').on(\"click\", function (e) {\r\n e.preventDefault();\r\n that.writeCookie(that.cookieKey, \"1\", 30);\r\n $('.js-cookie-bar').removeClass(\"show\");\r\n });\r\n\r\n //that.surveyCookies();\r\n }\r\n}\r\n\r\n","export class EnquiryUrlCheckModule {\r\n\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n init() {\r\n let dataEnquiry = $('*[data-enquiry-url-check]');\r\n if ($(\"#component-enquiryform\").length > 0) {\r\n dataEnquiry.attr(\"href\", \"#accustomerenquiryform\"); \r\n } else {\r\n dataEnquiry.attr(\"href\", \"/enquire\");\r\n }\r\n\r\n }\r\n\r\n}\r\n\r\n\r\n","\r\nexport class RelatedContentModule {\r\n constructor() {\r\n if ($(\".related-content\").length > 0 ) {\r\n this.init(); \r\n } \r\n }\r\n\r\n init() {\r\n let _this = this;\r\n \r\n $(window).on('load', function () {\r\n if ($(\".related-content\")) {\r\n _this.registerClick();\r\n }\r\n });\r\n }\r\n\r\n registerClick() {\r\n $('.related-content .more').on('click', function (e) {\r\n e.preventDefault();\r\n $(this).text($(this).text() == 'Show more topics' ? 'Show fewer topics' : 'Show more topics');\r\n $(this).toggleClass('active');\r\n $('.related-content li.extra').toggleClass('hidden');\r\n });\r\n }\r\n}\r\n\r\n","import { HelpersModule } from \"../helpers/helpers\";\r\n\r\nimport SameHeight from 'same-height';\r\n\r\nconst helpersModule = new HelpersModule();\r\n\r\nexport class ConsultantFinderModule {\r\n\r\n constructor() {\r\n this.lat = null;\r\n this.lng = null;\r\n this.hospitalIds = \"\";\r\n this.init();\r\n }\r\n\r\n isJson(str) {\r\n try {\r\n return (JSON.parse(str) && !!str);\r\n } catch (e) {\r\n return false;\r\n }\r\n }\r\n\r\n isMobileDevice() {\r\n return (typeof window.orientation !== \"undefined\") || (navigator.userAgent.indexOf('IEMobile') !== -1);\r\n }\r\n\r\n pageload() {\r\n $(document).ready(function () {\r\n var searchParams = new URLSearchParams(window.location.search);\r\n var consultantType = searchParams.get(\"filterConsultantType\");\r\n $(\"#consultantType option:selected\").val(consultantType).attr(\"selected\", \"selected\");\r\n\r\n if (consultantType == \"GP\") {\r\n $(\"#filterByBookable\").attr(\"disabled\", true);\r\n }\r\n });\r\n }\r\n\r\n getFinderResults(url, method) {\r\n return new Promise(function (resolve, reject) {\r\n\r\n let result = [];\r\n $.ajax({\r\n url: url,\r\n success: function (data) {\r\n let jsonResponse = $.parseJSON(data);\r\n let suggestions = jsonResponse.Suggestions;\r\n let error = jsonResponse.Error;\r\n if (error.indexOf(\"find a match for your search\") > -1) {\r\n console.log(method + \" - returned an error\");\r\n }\r\n else {\r\n result = suggestions;\r\n if (result.count == 0) {\r\n console.log(method + \" - returned 0 results\");\r\n }\r\n }\r\n resolve(result);\r\n },\r\n error: function (XMLHttpRequest, textStatus, errorThrown) {\r\n console.log(method + \" - \" + errorThrown);\r\n resolve(result);\r\n }\r\n });\r\n\r\n });\r\n }\r\n\r\n setupHospitalDropdown() {\r\n const ajaxUrl = apilocation + \"Finders/SuggestHospitals/\";\r\n const that = this;\r\n let html = \"\";\r\n that.getFinderResults(ajaxUrl, \"setupHospitalDropdown\").then(function (suggestions) {\r\n $.each(suggestions, function (index, item) {\r\n html += \"
  • \" + item.Display + \"
  • \";\r\n });\r\n $(\"#hospitalDropdown .results\").append(html);\r\n });\r\n }\r\n\r\n setupTreatmentDropdown() {\r\n const ajaxUrl = apilocation + \"Finders/SuggestOnlyTreatments/\";\r\n const that = this;\r\n let html = \"\";\r\n that.getFinderResults(ajaxUrl, \"setupTreatmentDropdown\").then(function (suggestions) {\r\n $.each(suggestions, function (index, item) {\r\n html += \"
  • \" + item.Display + \"
  • \";\r\n });\r\n $(\"#treatmentDropdown .results\").append(html);\r\n });\r\n }\r\n\r\n setupSpecialityDropdown() {\r\n const ajaxUrl = apilocation + \"Finders/SuggestSpecialties/\";\r\n const that = this;\r\n let html = \"\";\r\n that.getFinderResults(ajaxUrl, \"setupSpecialityDropdown\").then(function (suggestions) {\r\n $.each(suggestions, function (index, item) {\r\n html += \"
  • \" + item.Display + \"
  • \";\r\n });\r\n $(\"#specialityDropdown .results\").append(html);\r\n });\r\n }\r\n\r\n\r\n handleRadioChange() {\r\n $(\"input[type=radio][name='hospital-search']\").on('change',function () {\r\n if (this.value == \"speciality\") {\r\n $(\"#treatmentDropdown\").hide();\r\n $(\"#specialityDropdown\").show();\r\n }\r\n else {\r\n $(\"#specialityDropdown\").hide();\r\n $(\"#treatmentDropdown\").show();\r\n }\r\n });\r\n }\r\n\r\n registerDropdownClicks() {\r\n $(\"#hospitalDropdown .results\").on(\"click\", \"li\", function (event) {\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").text($(this).text());\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").val($(this).data(\"value\"));\r\n });\r\n\r\n $(\"#treatmentDropdown .results\").on(\"click\", \"li\", function (event) {\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").text($(this).text());\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").val($(this).data(\"value\"));\r\n });\r\n\r\n $(\"#specialityDropdown .results\").on(\"click\", \"li\", function (event) {\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").text($(this).text());\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").val($(this).data(\"value\"));\r\n });\r\n\r\n }\r\n\r\n resetClick() {\r\n\r\n $(\"#component-home-introduction-reset\").on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n\r\n $(\"#component-home-introduction-postcode\").val(\"\");\r\n\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").text(\"Hospital\");\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").val(\"\");\r\n\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").text(\"Treatment\");\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").val(\"\");\r\n\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").text(\"Speciality\");\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").val(\"\");\r\n\r\n $(\"#component-home-introduction-treatment\").prop(\"checked\", true);\r\n $(\"#specialityDropdown\").hide();\r\n $(\"#treatmentDropdown\").show();\r\n\r\n });\r\n\r\n }\r\n\r\n searchClick() {\r\n\r\n let that = this;\r\n $(\"#component-home-introduction-search\").on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n\r\n let url = $(\"#component-home-introduction--consultant\").data(\"navigation-url\");\r\n let filterString = \"?filterByTreatment=&filterBySpecialty=\";\r\n let consultantRadioButtonValue = $(\"input[name='hospital-search']:checked\").val();\r\n\r\n if (consultantRadioButtonValue == \"treatment\") {\r\n let val = $(\"#treatmentDropdown .dropdown-toggle:first-child\").val();\r\n let text = $(\"#treatmentDropdown .dropdown-toggle:first-child\").text();\r\n if (val.length == 0) {\r\n text = \"\";\r\n }\r\n filterString = \"?filterByTreatment=\" + val + \"&filterBySpecialty=\" + \"&filterTreatmentSpeciality=\" + text;\r\n }\r\n else if (consultantRadioButtonValue == \"speciality\") {\r\n let val = $(\"#specialityDropdown .dropdown-toggle:first-child\").val();\r\n let text = $(\"#specialityDropdown .dropdown-toggle:first-child\").text();\r\n if (val.length == 0) {\r\n text = \"\";\r\n }\r\n filterString = \"?filterByTreatment=&filterBySpecialty=\" + val + \"&filterTreatmentSpeciality=\" + text;\r\n }\r\n let hosVal = $(\"#hospitalDropdown .dropdown-toggle:first-child\").val();\r\n let postcode = $(\"#component-home-introduction-postcode\").val();\r\n\r\n filterString += \"&filterByHospital=\" + hosVal;\r\n filterString += \"&filterByName=&filterByPostCode=\" + postcode + \"&filterByBookable=false\";\r\n\r\n if (url === undefined) {\r\n url = \"/consultants/profiles/\";\r\n }\r\n\r\n that.SetMap(postcode);\r\n \r\n window.location = url + filterString;\r\n });\r\n }\r\n\r\n ConsultantSearchClick() {\r\n \r\n $(\".js-consultant-filter-submit\").on('click', function (e) {\r\n e.preventDefault();\r\n\r\n let $form = $(\"#DetailsSearchForm\"),\r\n filterConsultantType = $form.find(\"#consultantType option:selected\").val(),\r\n filterTreatmentSpeciality = $form.find(\"#treatmentSpecialitySearch\").val(),\r\n filterLocation = $form.find(\"#location-finder\").val(),\r\n filterName = $form.find(\"#nameSearch\").val(),\r\n url = $form.attr(\"action\"); \r\n url += \"?filterConsultantType=\" + filterConsultantType + \"&filterTreatmentSpeciality=\" + filterTreatmentSpeciality\r\n + \"&filterLocation=\" + filterLocation + \"&filterName=\" + filterName;\r\n\r\n $form.attr('action', url).submit();\r\n });\r\n }\r\n \r\n\r\n\r\n SetMap(postcode) {\r\n let that = this;\r\n if (postcode != '') {\r\n let geocoder = new google.maps.Geocoder;\r\n geocoder.geocode({ 'address': postcode }, function (results, status) {\r\n\r\n if (status == google.maps.GeocoderStatus.OK) {\r\n that.lat = results[0].geometry.location.lat();\r\n that.lng = results[0].geometry.location.lng();\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: apilocation + 'EnquiryFormApi/NearestHospitalList',\r\n data: JSON.stringify({ \"postcode\": postcode }),\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\"\r\n }).done(function (data) {\r\n\r\n if (data.length > 0) {\r\n // alert(data)\r\n that.hospitalIds = data;\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n });\r\n }\r\n return that.hospitalIds;\r\n\r\n }\r\n\r\n sortLocationsByDistance(locations, userLatLong) {\r\n\r\n let that = this;\r\n\r\n function sorter(a, b) {\r\n return a.distance - b.distance;\r\n }\r\n\r\n let latlong = userLatLong.split(\";\");\r\n\r\n for (const element of locations) {\r\n element.distance = that.calculateDistance(latlong[0], latlong[1], element.lat, element.lon);\r\n element.distanceFriendly = element.distance.toFixed(2) + \" miles\";\r\n }\r\n\r\n locations.sort(sorter);\r\n\r\n return locations;\r\n }\r\n\r\n calculateDistance(lat1, lon1, lat2, lon2) {\r\n let radlat1 = Math.PI * lat1 / 180;\r\n let radlat2 = Math.PI * lat2 / 180;\r\n let theta = lon1 - lon2;\r\n let radtheta = Math.PI * theta / 180;\r\n let dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);\r\n dist = Math.acos(dist);\r\n dist = dist * 180 / Math.PI;\r\n dist = dist * 60 * 1.1515;\r\n\r\n return dist;\r\n }\r\n\r\n\r\n navigation() {\r\n $(\"#component-home-introduction\").on('click', '.js-home-introduction--menu-item', function (e) {\r\n e.preventDefault();\r\n let panelRqst = $(this)[0].getAttribute(\"value\");\r\n $(\"#component-home-introduction--home\").hide();\r\n $(\"#component-home-introduction--hospital\").hide();\r\n $(\"#component-home-introduction--treatment\").hide();\r\n $(\"#component-home-introduction--consultant\").hide();\r\n $(\"#component-home-introduction--\" + panelRqst).show();\r\n });\r\n\r\n $(\"#component-home-introduction\").on('click', '.js-home-introduction__panel', function (e) {\r\n e.preventDefault();\r\n let panelRqst = $(this).data(\"value\");\r\n $(\"#component-home-introduction--home\").hide();\r\n $(\"#component-home-introduction--\" + panelRqst).show();\r\n });\r\n }\r\n\r\n setupFilter() {\r\n $(\"#hospitalSearch\").on(\"keyup\", function () {\r\n let value = $(this).val().toLowerCase();\r\n $(\".dropdown-menu-hospital > li> ul > li\").filter(function () {\r\n $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);\r\n });\r\n });\r\n\r\n $(\"#treatmentSearch\").on(\"keyup\", function () {\r\n let value = $(this).val().toLowerCase();\r\n $(\".dropdown-menu-treatment > li> ul > li\").filter(function () {\r\n $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);\r\n });\r\n });\r\n\r\n $(\"#specialitySearch\").on(\"keyup\", function () {\r\n let value = $(this).val().toLowerCase();\r\n $(\".dropdown-menu-speciality > li> ul > li\").filter(function () {\r\n $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);\r\n });\r\n });\r\n }\r\n\r\n equalHeights() {\r\n SameHeight.init(\".home-introduction__panel-lead\", \"screen and (min-width: 992px)\");\r\n }\r\n\r\n setupAutoComplete() {\r\n\r\n $(\"#treatmentSpecialitySearch\").attr(\"disabled\", \"disabled\");\r\n\r\n let availableTags = [];\r\n availableTags.length = 0;\r\n\r\n let ajaxUrl = apilocation + \"Finders/SuggestFilteredTreatmentsOrSpecialties\";\r\n fetch(ajaxUrl)\r\n .then(function (response) {\r\n\r\n response.json().then(data => ({\r\n data: data,\r\n status: response.status\r\n })\r\n ).then(res => {\r\n let data = JSON.parse(res.data);\r\n $.each(data.Suggestions, function (index, item) {\r\n availableTags.push(item.Display);\r\n });\r\n if (availableTags.length > 0) {\r\n $(\"#treatmentSpecialitySearch\").prop(\"disabled\", false);\r\n }\r\n });\r\n\r\n });\r\n\r\n $(\"#treatmentSpecialitySearch\").autocomplete({\r\n source: availableTags\r\n });\r\n\r\n }\r\n\r\n init() {\r\n $(\"#component-home-introduction-treatment\").prop(\"checked\", true);\r\n $(\"#treatmentDropdown\").show();\r\n this.setupHospitalDropdown();\r\n this.setupTreatmentDropdown();\r\n this.setupSpecialityDropdown();\r\n this.handleRadioChange();\r\n this.registerDropdownClicks();\r\n this.resetClick();\r\n this.searchClick();\r\n this.navigation();\r\n this.setupFilter();\r\n this.equalHeights();\r\n this.setupAutoComplete();\r\n this.ConsultantSearchClick();\r\n }\r\n}\r\n","import { HelpersModule } from \"../helpers/helpers\";\r\nimport SameHeight from 'same-height';\r\n\r\nconst helpersModule = new HelpersModule();\r\n\r\nexport class HowCanWeHelpModule {\r\n\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n isMobileDevice() {\r\n return (typeof window.orientation !== \"undefined\") || (navigator.userAgent.indexOf('IEMobile') !== -1);\r\n }\r\n\r\n setupHospitalDropdown() {\r\n var ajaxUrl = apilocation + \"Finders/SuggestHospitals/\";\r\n var html = \"\";\r\n fetch(ajaxUrl)\r\n .then(function (response) {\r\n response.json().then(data => ({\r\n data: data,\r\n status: response.status\r\n })\r\n ).then(res => {\r\n if (res.status == 500) {\r\n return;\r\n }\r\n var data = JSON.parse(res.data);\r\n $.each(data.Suggestions, function (index, item) {\r\n html += \"
  • \" + item.Display + \"
  • \";\r\n });\r\n $(\"#hospitalDropdown .results\").append(html);\r\n\r\n var hospitalId = $(\"body\").data(\"hospital-id\");\r\n var hospitalName = $(\"body\").data(\"hospital-name\");\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").text(hospitalName);\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").val(hospitalId);\r\n \r\n });\r\n });\r\n }\r\n\r\n setupTreatmentDropdown() {\r\n var selectedHospitalId = $(\"#treatmentDropdown .dropdown-toggle:first-child\").val();\r\n var tfilter = \"\";\r\n if (selectedHospitalId == '' || selectedHospitalId == 0) {\r\n selectedHospitalId = $(\"body\").data(\"hospital-id\");\r\n }\r\n if (selectedHospitalId > 0) {\r\n tfilter = selectedHospitalId > 0 ? \"?filterByHospital=\" + selectedHospitalId : \"\";\r\n }\r\n var ajaxUrl = apilocation + \"Finders/SuggestTreatments/\" + tfilter;\r\n var html = \"\";\r\n fetch(ajaxUrl)\r\n .then(function (response) {\r\n if (response.status == 500) {\r\n return;\r\n }\r\n response.json().then(data => ({\r\n data: data,\r\n status: response.status\r\n })\r\n ).then(res => {\r\n //if (res.status == 200) {\r\n // return;\r\n //}\r\n if (res.data !== null) {\r\n var data = JSON.parse(res.data);\r\n $.each(data.Suggestions, function (index, item) {\r\n html += \"
  • \" + item.Display + \"
  • \";\r\n });\r\n $(\"#treatmentDropdown .results\").append(html);\r\n } \r\n });\r\n });\r\n }\r\n\r\n setupSpecialityDropdown() {\r\n var selectedHospitalId = $(\"#specialityDropdown .dropdown-toggle:first-child\").val();\r\n var sfilter = \"\";\r\n if (selectedHospitalId == '' || selectedHospitalId == 0) {\r\n selectedHospitalId = $(\"body\").data(\"hospital-id\");\r\n }\r\n if (selectedHospitalId > 0) {\r\n sfilter = selectedHospitalId > 0 ? \"?filterByHospital=\" + selectedHospitalId : \"\";\r\n }\r\n var ajaxUrl = apilocation + \"Finders/SuggestSpecialties/\" + sfilter;\r\n var html = \"\";\r\n console.log(ajaxUrl);\r\n fetch(ajaxUrl)\r\n .then(function (response) {\r\n if (response.status == 500) {\r\n return;\r\n }\r\n response.json().then(data => ({\r\n data: data,\r\n status: response.status\r\n })\r\n ).then(res => {\r\n var data = JSON.parse(res.data);\r\n $.each(data.Suggestions, function (index, item) {\r\n html += \"
  • \" + item.Display + \"
  • \";\r\n });\r\n $(\"#specialityDropdown .results\").append(html);\r\n });\r\n });\r\n }\r\n\r\n handleRadioChange() {\r\n $(\"input[type=radio][name='hospital-search']\").on('change',function () {\r\n if (this.value == \"speciality\") {\r\n $(\"#treatmentDropdown\").hide();\r\n $(\"#specialityDropdown\").show();\r\n }\r\n else {\r\n $(\"#specialityDropdown\").hide();\r\n $(\"#treatmentDropdown\").show();\r\n }\r\n });\r\n }\r\n\r\n registerDropdownClicks() {\r\n $(\"#hospitalDropdown .results\").on(\"click\", \"li\", function (event) {\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").text($(this).text());\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").val($(this).data(\"value\"));\r\n });\r\n\r\n $(\"#treatmentDropdown .results\").on(\"click\", \"li\", function (event) {\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").text($(this).text());\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").val($(this).data(\"value\"));\r\n });\r\n\r\n $(\"#specialityDropdown .results\").on(\"click\", \"li\", function (event) {\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").text($(this).text());\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").val($(this).data(\"value\"));\r\n });\r\n\r\n }\r\n\r\n resetClick() {\r\n\r\n $(\"#component-home-introduction-reset\").on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n\r\n $(\"#component-home-introduction-postcode\").val(\"\");\r\n\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").text(\"Hospital\");\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").val(\"\");\r\n\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").text(\"Treatment\");\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").val(\"\");\r\n\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").text(\"Speciality\");\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").val(\"\");\r\n\r\n $(\"#component-home-introduction-treatment\").prop(\"checked\", true);\r\n $(\"#specialityDropdown\").hide();\r\n $(\"#treatmentDropdown\").show();\r\n\r\n });\r\n\r\n }\r\n\r\n searchClick() {\r\n\r\n $(\"#component-home-introduction-search\").on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n var url = \"/consultants/profiles/\";\r\n var filterString = \"?filterByTreatment=&filterBySpecialty=\";\r\n var consultantRadioButtonValue = $(\"input[name='hospital-search']:checked\").val();\r\n\r\n if (consultantRadioButtonValue == \"treatment\") {\r\n //var val = $(\"#treatmentDropdown .dropdown-toggle:first-child\").val();\r\n var val = $(\"#treatmentDropdown\").find(\".dropdown-toggle\").val();\r\n filterString = \"?filterByTreatment=\" + val + \"&filterBySpecialty=\";\r\n }\r\n else if (consultantRadioButtonValue == \"speciality\") {\r\n //var val = $(\"#specialityDropdown .dropdown-toggle:first-child\").val();\r\n var val = $(\"#specialityDropdown\").find(\".dropdown-toggle\").val();\r\n filterString = \"?filterByTreatment=&filterBySpecialty=\" + val;\r\n }\r\n //var hosVal = $(\"#hospitalDropdown .dropdown-toggle:first-child\").val();\r\n var hosVal = $(\"#hospitalDropdown\").find(\".dropdown-toggle\").val();\r\n var postcode = $(\"#component-home-introduction-postcode\").val();\r\n filterString += \"&filterByHospital=\" + hosVal;\r\n filterString += \"&filterByName=&filterByPostCode=\" + postcode + \"&filterByBookable=false\";\r\n window.location = url + filterString;\r\n });\r\n }\r\n\r\n navigation() {\r\n \r\n $(\".component-home-introduction\").hide();\r\n\r\n $(\"#component-home-introduction\").on('click', '.js-home-introduction--menu-item', function (e) {\r\n e.preventDefault();\r\n var panelRqst = $(this)[0].getAttribute(\"value\");\r\n $(\".component-home-introduction\").hide();\r\n $(\"#component-home-introduction--\" + panelRqst).show();\r\n });\r\n\r\n $(\"#component-home-introduction\").on('click', '.js-home-introduction__panel', function (e) {\r\n e.preventDefault();\r\n var panelRqst = $(this).data(\"value\");\r\n $(\"#component-home-introduction--home\").hide();\r\n $(\"#component-home-introduction--\" + panelRqst).show();\r\n });\r\n\r\n }\r\n\r\n setupFilter() {\r\n $(\"#hospitalSearch\").on(\"keyup\", function () {\r\n var value = $(this).val().toLowerCase();\r\n $(\".dropdown-menu-hospital > li> ul > li\").filter(function () {\r\n $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);\r\n });\r\n });\r\n\r\n $(\"#treatmentSearch\").on(\"keyup\", function () {\r\n var value = $(this).val().toLowerCase();\r\n $(\".dropdown-menu-treatment > li> ul > li\").filter(function () {\r\n $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);\r\n });\r\n });\r\n\r\n $(\"#specialitySearch\").on(\"keyup\", function () {\r\n var value = $(this).val().toLowerCase();\r\n $(\".dropdown-menu-speciality > li> ul > li\").filter(function () {\r\n $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1);\r\n });\r\n });\r\n }\r\n\r\n equalHeights() {\r\n SameHeight.init(\".home-introduction__panel-lead\", \"screen and (min-width: 992px)\");\r\n }\r\n\r\n init() {\r\n $(\"#component-home-introduction-treatment\").prop(\"checked\", true);\r\n $(\"#treatmentDropdown\").show();\r\n this.setupHospitalDropdown();\r\n this.setupTreatmentDropdown();\r\n this.setupSpecialityDropdown();\r\n this.handleRadioChange();\r\n this.registerDropdownClicks();\r\n this.resetClick();\r\n this.searchClick();\r\n this.navigation();\r\n this.setupFilter();\r\n this.equalHeights();\r\n }\r\n}\r\n","export class OnlinePaymentModule {\r\n constructor() {\r\n this.init();\r\n }\r\n \r\n init() {\r\n\r\n $(\".toggle-tt\").on(\"click\", function () {\r\n $(\".tooltip\").removeClass('fade in active');\r\n $(this).parent('li').find(\".tooltip\").toggleClass('fade in active');\r\n\r\n });\r\n\r\n $('[id^=\"close\"]').on('click', function () {\r\n $(this).parent(\".tooltip\").removeClass('fade in active');\r\n });\r\n\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n","export class FinanceCalculatorModule {\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n humanizeNumber(nStr) {\r\n nStr += '';\r\n var x = nStr.split('.');\r\n var x1 = x[0];\r\n var x2 = x.length > 1 ? '.' + x[1] : '';\r\n var rgx = /(\\d+)(\\d{3})/;\r\n\r\n while (rgx.test(x1)) {\r\n x1 = x1.replace(rgx, '$1' + ',' + '$2');\r\n }\r\n\r\n if (x2 > 0)\r\n return x1 + x2;\r\n else\r\n return x1;\r\n }\r\n\r\n formattedCurrency(n) {\r\n return '£' + this.humanizeNumber(parseFloat(n).toFixed(2));\r\n }\r\n\r\n updateChart(el, intLoanAmountPercent, intTotalMonthlyPayment, interestPercent) {\r\n \r\n intLoanAmountPercent = Math.round(intLoanAmountPercent);\r\n interestPercent = Math.round(interestPercent);\r\n\r\n if (intLoanAmountPercent > 100) {\r\n intLoanAmountPercent = 100;\r\n } else if (intLoanAmountPercent < 0) {\r\n intLoanAmountPercent = 0;\r\n }\r\n var decLoanAmountDeg = Math.round(360 * (intLoanAmountPercent / 100)); \r\n\r\n if (interestPercent > 100) {\r\n interestPercent = 100;\r\n } else if (interestPercent < 0) {\r\n interestPercent = 0;\r\n }\r\n var interestDeg = Math.round(360 * (interestPercent / 100));\r\n\r\n \r\n if (intLoanAmountPercent > 50) {\r\n $(el + ' .pie').css('clip', 'rect(auto, auto, auto, auto)');\r\n $(el + ' .pie .right-side').css('transform', 'rotate(180deg)');\r\n\r\n } else {\r\n $(el + ' .pie').css('clip', 'rect(0, 1em, 1em, 0.5em)');\r\n $(el + ' .pie .right-side').css('transform', 'rotate(0deg)');\r\n }\r\n\r\n\r\n if (interestPercent > 50) {\r\n $(el + ' .interest').css('clip', 'rect(auto, auto, auto, auto)');\r\n $(el + ' .interest .right-side').css('transform', 'rotate(180deg)');\r\n\r\n } else {\r\n $(el + ' .interest').css('clip', 'rect(0, 1em, 1em, 0.5em)');\r\n $(el + ' .interest .right-side').css('transform', 'rotate(0deg)');\r\n }\r\n\r\n\r\n $(el + ' .pie .left-side').css('transform', 'rotate(' + decLoanAmountDeg + 'deg)');\r\n $(el + ' .interest .left-side').css('transform', 'rotate(' + interestDeg + 'deg)');\r\n\r\n\r\n $(el + ' .shadow').css('border-width', '0.077em');\r\n $(el + ' .num').text('Monthly payments');\r\n $(el + ' .smaller').text(this.formattedCurrency(intTotalMonthlyPayment));\r\n\r\n }\r\n\r\n animateUpdateChart(el, intLoanAmountPercent, intTotalMonthlyPayment, interestPercent, currentTotalPercent, currentRepayAmount, currentInterestPercent) {\r\n\r\n if (currentTotalPercent < intLoanAmountPercent) {\r\n\r\n this.updateChart(el, currentTotalPercent, currentRepayAmount, currentInterestPercent)\r\n\r\n currentTotalPercent++;\r\n currentRepayAmount = intTotalMonthlyPayment / intLoanAmountPercent * currentTotalPercent;\r\n currentInterestPercent += interestPercent / intLoanAmountPercent;\r\n\r\n let that = this;\r\n setTimeout(function () { \r\n that.animateUpdateChart(el, intLoanAmountPercent, intTotalMonthlyPayment, interestPercent, currentTotalPercent, currentRepayAmount, currentInterestPercent);\r\n }, 5)\r\n }\r\n else {\r\n this.updateChart(el, intLoanAmountPercent, intTotalMonthlyPayment, interestPercent)\r\n }\r\n }\r\n\r\n calculateFinance(intPrice, intDeposit, intLoanTermInMonths, fnDone, fnFail) {\r\n\r\n var calculateFinanceArguments = { price: intPrice, deposit: intDeposit, loanTermInMonths: intLoanTermInMonths};\r\n\r\n $.ajax({\r\n type: \"GET\",\r\n url: apilocation + \"FinanceCalculatorApi/CalculateFinance\",//\"?price=2000&deposit=200&loanTermInMonths=12\",\r\n data: calculateFinanceArguments,\r\n contentType: false\r\n }).done(function (data) {\r\n var decApr = data.APR;\r\n var intLoanValue = data.LoanValue;\r\n var decTotalInterestPayable = data.TotalInterestPayable;\r\n var intLoanTermInMonths = data.Term;\r\n var intDepositAmount = data.Deposit;\r\n var strRateCardProductId = data.RateCardProductId;\r\n fnDone(decApr, intLoanValue, decTotalInterestPayable, intLoanTermInMonths, intDepositAmount, strRateCardProductId);\r\n }).fail(function (XMLHttpRequest, textStatus, errorThrown) {\r\n fnFail(textStatus); \r\n }).always(function () {\r\n });\r\n }\r\n\r\n updateQuote(fnDone, fnFail) {\r\n\r\n var that = this;\r\n\r\n // get the treatment price from the input, this may be read only or filled in by user\r\n var treatmentPrice = $(\"#treatmentPrice\").val().replace(/[£,]+/g, \"\");\r\n var treatmentPriceValue = Number(treatmentPrice.replace(/[^0-9\\.]+/g, \"\"));\r\n \r\n var depositAmount = $('#depositAmountSlider').val();\r\n var intLoanPeriod = this.getLoanPeriodInMonths($('#loanPeriodSlider'));\r\n\r\n var intDeposit = parseInt(depositAmount, 10);\r\n if (isNaN(intDeposit)) {\r\n return; // TODO - Handle properly\r\n }\r\n\r\n //console.log(\"Loan period amount\", intLoanPeriod);\r\n \r\n var onDone = function (apr, intLoanAmount, decTotalInterestPayable, intLoanTermInMonths, intDepositAmount, strRateCardProductId) {\r\n var loanAmountFormatted = that.formattedCurrency(intLoanAmount);\r\n var depositAmountFormatted = that.formattedCurrency(intDepositAmount);\r\n var loanPeriodFormatted = intLoanPeriod + ' months';\r\n var aprFormatted = apr.toFixed(2) + '%';\r\n var decTotalRepayAmount = intLoanAmount + decTotalInterestPayable;\r\n var totalRepayAmountFormatted = that.formattedCurrency(decTotalRepayAmount);\r\n var totalRepayAmountPerMonthFormatted = that.formattedCurrency(decTotalRepayAmount / 12);\r\n var decTotalToRepayPlusDeposit = intDepositAmount + decTotalRepayAmount;\r\n var intTreatmentPrice = intLoanAmount + intDeposit;\r\n\r\n $('#totalAmountPerMonth').html(totalRepayAmountPerMonthFormatted);\r\n $('#totalAmount').html(totalRepayAmountFormatted);\r\n $('#rightPanelLoanAmount').html(loanAmountFormatted);\r\n $('#rightPanelDepositAmount').html(depositAmountFormatted);\r\n $('#rightPanelLoanPeriod').html(loanPeriodFormatted);\r\n $('#rightPanelAPR').html(aprFormatted);\r\n\r\n var decInterestPercent = decTotalInterestPayable / decTotalToRepayPlusDeposit * 100;\r\n \r\n // We need to include the interest here as well because the interest will\r\n // hide some of the loan amount's proportion\r\n var decLoanAmountPercent = parseFloat(intLoanAmount + decTotalInterestPayable) / decTotalToRepayPlusDeposit * 100;\r\n var decTotalMonthlyPayment = decTotalRepayAmount / intLoanTermInMonths;\r\n\r\n var strEligibilityLink = that.constructEligibilityLink(\r\n strRateCardProductId, intTreatmentPrice, intDepositAmount, that.strTreatmentCode, that.strTreatmentName, that.strHospitalName);\r\n that.$checkEligibilityButton.attr(\"href\", strEligibilityLink);\r\n\r\n /*console.log(\"decTotalRepayAmount\", decTotalRepayAmount)\r\n console.log(\"decLoanAmountPercent\", decLoanAmountPercent);\r\n console.log(\"decTotalMonthlyPayment\", decTotalMonthlyPayment);\r\n console.log(\"decInterestPercent\", decInterestPercent);*/\r\n\r\n //animateUpdateChart(el, intLoanAmountPercent, intTotalMonthlyPayment, interestPercent, currentTotalPercent, currentRepayAmount, currentInterestPercent) {\r\n that.animateUpdateChart('#demo',\r\n decLoanAmountPercent,\r\n decTotalMonthlyPayment,\r\n decInterestPercent,\r\n 0,\r\n 0,\r\n 0);\r\n\r\n that.clearErrorMessage();\r\n\r\n fnDone(); \r\n\r\n }\r\n\r\n var onFail = function(textStatus) {\r\n that.setErrorMessage(\"We're sorry but your finance could not be calculated at this time, please try again later.\");\r\n fnFail();\r\n }\r\n \r\n /*\r\n * Go off and get the APR and total interest payable from Omni\r\n */\r\n this.calculateFinance(treatmentPriceValue, intDeposit, intLoanPeriod, onDone, onFail);\r\n\r\n }\r\n\r\n updateSlider(slider) {\r\n\r\n var min = $(slider).prop('min');\r\n var max = $(slider).prop('max');\r\n var val = $(slider).prop('value');\r\n //console.log('updateslider ' + val);\r\n var enforcedMin = $(slider).data('enforcedmin');\r\n //console.log(enforcedMin);\r\n\r\n if (enforcedMin) {\r\n if (val < enforcedMin) {\r\n val = enforcedMin;\r\n $(slider).val(val);\r\n }\r\n }\r\n //console.log(\"val is \", val, \"enforced min is \", enforcedMin, \"actual slider val is\", $(slider).val());\r\n if (!this.supportsProgressTrack()) {\r\n var percent = ((val - min) / (max - min)) * 100.0;\r\n $(slider).css('background', 'linear-gradient(to right, #16ccbb 0%, #16ccbb ' + percent + '%, #cfcfcf ' + percent + '%, #cfcfcf 100%)');\r\n } \r\n }\r\n\r\n setMonetaryScale($sliderInput, intNewMaximum) {\r\n var $wrapper = $sliderInput.closest(\".slider-wrapper\");\r\n var $dataLabels = $wrapper.find(\".data-labels\");\r\n var $rangeLabels = $dataLabels.find(\".range-labels\");\r\n var $rangeLabelsMobile = $dataLabels.find(\".range-labels-mobile\");\r\n\r\n // Desktop\r\n var intRangeCount = parseInt($rangeLabels.attr(\"data-rangeCount\"), 10);\r\n var intScaleStep = Math.floor(intNewMaximum / intRangeCount);\r\n var strNewRangeLabels = \"\"; \r\n for (var i = 1; i <= intRangeCount; i++) { \r\n strNewRangeLabels += \"
  •  £\"\r\n + (i === intRangeCount ? (intNewMaximum) : (i * intScaleStep))\r\n + \"
  • \";\r\n\r\n }\r\n $rangeLabels.html(strNewRangeLabels); \r\n\r\n // For mobile we always set a range of 3\r\n const FIXED_MOBILE_RANGE_COUNT = 2;\r\n var intScaleStepMobile = Math.floor(intNewMaximum / FIXED_MOBILE_RANGE_COUNT);\r\n var strNewRangeLabelsMobile = \"\"; \r\n for (var i = 1; i <= FIXED_MOBILE_RANGE_COUNT; i++) {\r\n strNewRangeLabelsMobile += \"
  •  £\"\r\n + (i === FIXED_MOBILE_RANGE_COUNT ? (intNewMaximum) : (i * intScaleStepMobile))\r\n + \"
  • \";\r\n }\r\n $rangeLabelsMobile.html(strNewRangeLabelsMobile);\r\n }\r\n\r\n getIntFromCurrencyInput($currencyInput) {\r\n\r\n if ($currencyInput.val() !== undefined) {\r\n var stringCurrencyInputValue = $currencyInput.val().replace(/[£,]+/g, \"\");\r\n var intCurrencyInputValue = parseInt(stringCurrencyInputValue.replace(/[^0-9\\.]+/g, \"\"), 10);\r\n return intCurrencyInputValue;\r\n }\r\n }\r\n\r\n getMinimumValue($slider) {\r\n var enforcedMin = $slider.data('enforcedmin');\r\n return typeof(enforcedMin) === undefined ? $slider.prop(\"min\") : enforcedMin;\r\n }\r\n\r\n updateSliderAndTextField($slider, fnFormatter) {\r\n this.updateSlider($slider[0]);\r\n var loanAmountFormatted = fnFormatter($slider.val());// this.formattedCurrency($slider.val());\r\n var $totalField = $slider.closest(\".dataItem\").find(\".inlineTotal input\"); \r\n $totalField.val(loanAmountFormatted);\r\n }\r\n\r\n formatAsMonths(strValue) {\r\n return strValue + ' months';\r\n }\r\n\r\n calculateSliderLimits(intTreatmentPrice) {\r\n const MinDepositProportion = 0.1; // 0 -> 1.0\r\n const MaxDepositProportion = 0.5; // 0 -> 1.0\r\n const MinLoanAmount = 1000;\r\n const MaxLoanAmount = 25000;\r\n \r\n // We need to use ceil because the Omni API doesn't support fractional amounts, but enforces fractional business rules\r\n var depositSliderMin = Math.ceil(Math.max(intTreatmentPrice * MinDepositProportion, intTreatmentPrice - MaxLoanAmount));\r\n \r\n var depositSliderMax = Math.floor(Math.min(intTreatmentPrice * MaxDepositProportion, intTreatmentPrice - MinLoanAmount));\r\n \r\n var loanAmountSliderMin = Math.max(MinLoanAmount, intTreatmentPrice - depositSliderMax);\r\n var loanAmountSliderMax = Math.min(MaxLoanAmount, intTreatmentPrice - depositSliderMin);\r\n\r\n //debugger;\r\n\r\n if (depositSliderMin > depositSliderMax || loanAmountSliderMin > loanAmountSliderMax\r\n || isNaN(depositSliderMin) || isNaN(depositSliderMax) || isNaN(loanAmountSliderMin) || isNaN(loanAmountSliderMax)) {\r\n return null;\r\n }\r\n else {\r\n return { depositMin: depositSliderMin, depositMax: depositSliderMax, loanAmountMin: loanAmountSliderMin, loanAmountMax: loanAmountSliderMax };\r\n } \r\n }\r\n\r\n getLoanPeriodInMonths($loanPeriodSlider) {\r\n var customScale = $loanPeriodSlider.data(\"customscale\"); \r\n var intStepVal = parseInt($loanPeriodSlider.val(), 10);\r\n var mappedValue = customScale[intStepVal - 1];\r\n return mappedValue;\r\n }\r\n\r\n disableAllButPrice() {\r\n this.$loanAmountSlider.attr(\"disabled\", \"disabled\");\r\n this.$depositSlider.attr(\"disabled\", \"disabled\");\r\n this.$loanPeriodSlider.attr(\"disabled\", \"disabled\");\r\n this.$updateQuote.attr(\"disabled\", \"disabled\");\r\n this.$checkEligibilityButton.attr(\"href\", null);\r\n }\r\n\r\n disableUserInput() { \r\n this.disableAllButPrice();\r\n this.$treatmentPriceInput.attr(\"disabled\", \"disabled\"); \r\n }\r\n\r\n enableUserInput() {\r\n this.$treatmentPriceInput.attr(\"disabled\", null);\r\n this.$loanAmountSlider.attr(\"disabled\", null);\r\n this.$depositSlider.attr(\"disabled\", null);\r\n this.$loanPeriodSlider.attr(\"disabled\", null);\r\n this.$updateQuote.attr(\"disabled\", null);\r\n }\r\n\r\n setErrorMessage(strErrorMessage) {\r\n this.$errorContainer.text(strErrorMessage);\r\n }\r\n\r\n clearErrorMessage() {\r\n this.$errorContainer.text(\"\");\r\n }\r\n\r\n hasValidPrice() {\r\n var intTreatmentPrice = this.getIntFromCurrencyInput(this.$treatmentPriceInput);\r\n return this.calculateSliderLimits(intTreatmentPrice) !== null;\r\n }\r\n\r\n priceIsBlank() {\r\n var intTreatmentPrice = this.getIntFromCurrencyInput(this.$treatmentPriceInput);\r\n return isNaN(intTreatmentPrice);\r\n }\r\n\r\n isInternetExplorer() {\r\n var ua = window.navigator.userAgent;\r\n var msie = ua.indexOf('MSIE ');\r\n if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\\:11\\./) || navigator.userAgent.match(/Edge\\/\\d+/)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n isWebKit() {\r\n var isWebkit = /WebKit/.test(navigator.userAgent);\r\n return isWebkit;\r\n }\r\n\r\n supportsProgressTrack() {\r\n return !this.isWebKit();\r\n }\r\n\r\n supportsSliderInputEvents() {\r\n return !this.isInternetExplorer();\r\n } \r\n\r\n constructEligibilityLink(strRateCardProductId, intTreatmentPrice, intDepositAmount, strTreatmentCode, strTreatmentName, strHospitalName) {\r\n var returnValue = this.strEligibilityPageUrl;\r\n returnValue += (\"?rateCardProductId=\" + strRateCardProductId\r\n + \"&treatmentPrice=\" + intTreatmentPrice\r\n + \"&depositAmount=\" + intDepositAmount\r\n + \"&treatmentCode=\" + strTreatmentCode\r\n + \"&treatmentName=\" + strTreatmentName\r\n + \"&hospitalName=\" + strHospitalName);\r\n return returnValue;\r\n }\r\n\r\n init() {\r\n\r\n const DEFAULT_LOAN_AMOUNT_MAX = 9000;\r\n const DEFAULT_LOAN_AMOUNT_MIN = 0;\r\n const DEFAULT_DEPOSIT_AMOUNT_MAX = 4500;\r\n const DEFAULT_DEPOSIT_AMOUNT_MIN = 0;\r\n\r\n var that = this;\r\n \r\n var $treatmentPriceInput = $('#treatmentPrice');\r\n var $loanAmountSlider = $('#loanAmountSlider');\r\n var $depositSlider = $('#depositAmountSlider');\r\n var $loanPeriodSlider = $('#loanPeriodSlider');\r\n var $updateQuote = $('#updateQuote');\r\n \r\n\r\n // TODO - Use these instead\r\n this.$treatmentPriceInput = $treatmentPriceInput;\r\n this.$loanAmountSlider = $loanAmountSlider;\r\n this.$depositSlider = $depositSlider;\r\n this.$loanPeriodSlider = $loanPeriodSlider; \r\n this.$updateQuote = $updateQuote;\r\n this.$calculatorContainer = $(\".finance-calculator\");\r\n this.$errorContainer = this.$calculatorContainer.find(\".error\");\r\n this.$checkEligibilityButton = this.$calculatorContainer.find(\"#check-eligibility\");\r\n this.strTreatmentCode = this.$calculatorContainer.data(\"treatment-code\");\r\n this.strTreatmentName = this.$calculatorContainer.data(\"treatment-name\");\r\n this.strHospitalName = this.$calculatorContainer.data(\"hospital-name\");\r\n this.strEligibilityPageUrl = this.$checkEligibilityButton.data(\"eligibility-url\")\r\n \r\n if (!this.supportsProgressTrack()) {\r\n this.$calculatorContainer.find(\".slider input\").css('background', 'linear-gradient(to right, #16ccbb 0%, #16ccbb 0%, #cfcfcf 0%, #cfcfcf 100%)');\r\n } \r\n\r\n this.disableUserInput();\r\n\r\n $(document).on('input', '#loanAmountSlider', function () {\r\n that.updateSliderAndTextField($(this), function(s) { return that.formattedCurrency(s); });\r\n\r\n // Synchronise deposit amount\r\n var intLoanAmountVal = $(this).val();\r\n var treatmentPrice = that.getIntFromCurrencyInput($treatmentPriceInput);\r\n var intDepositAmount = treatmentPrice - intLoanAmountVal;\r\n $depositSlider.val(intDepositAmount);\r\n that.updateSliderAndTextField($depositSlider, function(s) { return that.formattedCurrency(s); });\r\n });\r\n\r\n $(document).on('input', '#depositAmountSlider', function () {\r\n that.updateSliderAndTextField($(this), function(s) { return that.formattedCurrency(s); })\r\n \r\n // Synchronise loan amount\r\n var intDepositAmount = $(this).val();\r\n var treatmentPrice = that.getIntFromCurrencyInput($treatmentPriceInput);\r\n var intLoanAmount = treatmentPrice - intDepositAmount;\r\n $loanAmountSlider.val(intLoanAmount);\r\n that.updateSliderAndTextField($loanAmountSlider, function(s) { return that.formattedCurrency(s); });\r\n });\r\n\r\n $(document).on('input', '#loanPeriodSlider', function () {\r\n var $loanPeriodSlider = $(this);\r\n that.updateSliderAndTextField($loanPeriodSlider,\r\n function(s) {\r\n var intLoanPeriod = that.getLoanPeriodInMonths($loanPeriodSlider);\r\n return that.formatAsMonths(intLoanPeriod.toString());\r\n });\r\n }); \r\n\r\n $(document).on('input', '#treatmentPrice', function (x) {\r\n \r\n // Sanitise values to only include digits, then reformat as currency\r\n var $input = $(this); \r\n var nonDigitRegex = /[^\\d]/gi;\r\n var strCurrentVal = $input.val();\r\n var strSanitisedVal = strCurrentVal.replace(nonDigitRegex, '');\r\n $input.val(strSanitisedVal === '' ? '£' : that.formattedCurrency(strSanitisedVal)); \r\n var intTreatmentPrice = parseInt(strSanitisedVal, 10); \r\n \r\n if (isNaN(intTreatmentPrice)) {\r\n intTreatmentPrice = 0;\r\n } \r\n \r\n // Update the scale and min/max values of the sliders based on the treatment price \r\n var minMaxValues = that.calculateSliderLimits(intTreatmentPrice);\r\n\r\n var blnHasValidValues = minMaxValues !== null;\r\n \r\n //console.log(\"minMaxValues\", minMaxValues); \r\n\r\n // Loan amount maximum\r\n $loanAmountSlider.prop(\"max\", blnHasValidValues ? minMaxValues.loanAmountMax : DEFAULT_LOAN_AMOUNT_MAX);\r\n that.setMonetaryScale($loanAmountSlider, blnHasValidValues ? minMaxValues.loanAmountMax : DEFAULT_LOAN_AMOUNT_MAX);\r\n $loanAmountSlider.data(\"enforcedmin\", blnHasValidValues ? minMaxValues.loanAmountMin : DEFAULT_LOAN_AMOUNT_MIN);\r\n $loanAmountSlider.val(blnHasValidValues ? minMaxValues.loanAmountMax : DEFAULT_DEPOSIT_AMOUNT_MIN);\r\n\r\n // Deposit maximum\r\n $depositSlider.prop(\"max\", blnHasValidValues ? minMaxValues.depositMax : DEFAULT_DEPOSIT_AMOUNT_MAX);\r\n that.setMonetaryScale($depositSlider, blnHasValidValues ? minMaxValues.depositMax : DEFAULT_DEPOSIT_AMOUNT_MAX);\r\n $depositSlider.data(\"enforcedmin\", blnHasValidValues ? minMaxValues.depositMin : DEFAULT_DEPOSIT_AMOUNT_MIN); \r\n\r\n if (blnHasValidValues) { \r\n // As soon as we hit a valid price remove and don't readd, this is for initial load only\r\n that.$calculatorContainer.removeClass(\"blank-price\");\r\n \r\n // Force deposit to update value based on loan amount\r\n $loanAmountSlider.trigger(\"input\");\r\n that.clearErrorMessage();\r\n that.enableUserInput();\r\n }\r\n else {\r\n that.setErrorMessage(\"You seem to have entered an invalid treatment price. Please try increasing it above.\");\r\n that.disableAllButPrice(); \r\n that.$depositSlider.val(DEFAULT_DEPOSIT_AMOUNT_MIN);\r\n that.updateSliderAndTextField(that.$loanAmountSlider, function(s) { return that.formattedCurrency(s); }); \r\n that.updateSliderAndTextField(that.$depositSlider, function(s) { return that.formattedCurrency(s); });\r\n } \r\n\r\n });\r\n\r\n // TODO - Reconcile this and the validation code above\r\n $(document).on('blur', '#treatmentPrice', function (x) {\r\n //const intStep = 50;\r\n var $input = $(this); \r\n var nonDigitRegex = /[^\\d]/gi;\r\n var strCurrentVal = $input.val();\r\n var strSanitisedVal = strCurrentVal.replace(nonDigitRegex, '');\r\n var intVal = parseInt(strSanitisedVal, 10); \r\n var intOriginalPrice = $input.data(\"originalprice\");\r\n if (isNaN(intVal)) { \r\n $input.val(that.formattedCurrency(intOriginalPrice + ''));\r\n }\r\n else {\r\n // Uncomment to round to a specific step value\r\n // var intRemainder = intVal % intStep;\r\n // if (intRemainder !== 0) {\r\n // intVal = intVal - intRemainder;\r\n // $input.val(that.formattedCurrency(intVal + ''));\r\n // }\r\n\r\n //var minMaxValues = that.calculateSliderLimits(intVal);\r\n //var blnHasValidValues = minMaxValues !== null;\r\n // if (!blnHasValidValues) { \r\n // $input.val(that.formattedCurrency(intOriginalPrice + ''));\r\n // }\r\n }\r\n $input.trigger(\"input\");\r\n });\r\n\r\n $(document).on('click', '#updateQuote', function () {\r\n that.disableUserInput();\r\n that.updateQuote(\r\n function() {\r\n that.enableUserInput();\r\n }, \r\n function() {\r\n that.enableUserInput();\r\n } \r\n );\r\n });\r\n\r\n if (this.isInternetExplorer()) {\r\n $(\".slider input\").on(\"change\", function() {\r\n $(this).trigger(\"input\");\r\n });\r\n }\r\n\r\n // slider - firefox\r\n var isFF = true;\r\n var addRule = (function (style) {\r\n var sheet = document.head.appendChild(style).sheet;\r\n return function (selector, css) {\r\n if (isFF) {\r\n if (sheet.cssRules.length > 0) {\r\n sheet.deleteRule(0);\r\n }\r\n\r\n try {\r\n sheet.insertRule(selector + \"{\" + css + \"}\", 0);\r\n } catch (ex) {\r\n isFF = false;\r\n }\r\n }\r\n };\r\n })(document.createElement(\"style\"));\r\n\r\n this.$loanPeriodSlider.trigger(\"input\");\r\n\r\n if (this.hasValidPrice()) { \r\n $treatmentPriceInput.trigger(\"input\");\r\n this.updateQuote(\r\n function() {\r\n that.enableUserInput();\r\n },\r\n function() {\r\n that.enableUserInput();\r\n }\r\n ); \r\n } else {\r\n \r\n if (!this.priceIsBlank()) { \r\n this.$calculatorContainer.removeClass(\"blank-price\");\r\n }\r\n\r\n this.enableUserInput();\r\n this.disableAllButPrice();\r\n }\r\n }\r\n\r\n}\r\n","import address from './address'; \r\n\r\nexport class FinanceEligibilityModule {\r\n\r\n constructor() {\r\n\r\n var MINIMUM_ADDRESS_HISTORY_YEARS = 3;\r\n\r\n /*\r\n * TODO - much of the below is generic bootstrapping code\r\n * and should be centralised where possible.\r\n */\r\n\r\n // Generic - initialise address\r\n var $addressForms = $(\".address-form-wrapper\");\r\n $addressForms.each(function () {\r\n var $addressForm = $(this);\r\n var $addressNotFound = $addressForm.find(\".address-not-found\");\r\n var $addressSection = $addressForm.find(\".address-section\");\r\n var $addressDropdown = $addressForm.find(\".address-dropdown\");\r\n var $fieldsWithValues = $addressSection.find(\":not(.address-dropdown) :input\").filter(function () { return $(this).val() !== ''; });\r\n\r\n $addressNotFound.hide();\r\n $addressDropdown.hide();\r\n \r\n if ($fieldsWithValues.length) {\r\n\r\n } else {\r\n $addressSection.hide();\r\n }\r\n\r\n });\r\n\r\n function sumPreviousYears($addressForm, $yearsAtAddress) {\r\n var $prevYears = $addressForm.prevAll(\".address-form-wrapper\").find(\".years-at-address\");\r\n var sumOfYears = 0;\r\n $yearsAtAddress.add($prevYears).each(function () {\r\n var currentVal = parseInt($(this).val(), 10);\r\n sumOfYears += (isNaN(currentVal) ? 0 : currentVal);\r\n });\r\n return sumOfYears;\r\n }\r\n\r\n function showHideNextYears($addressForm, $yearsAtAddress, $nextYears) {\r\n if ($yearsAtAddress.val()) {\r\n var sumOfYears = sumPreviousYears($addressForm, $yearsAtAddress);\r\n if (sumOfYears < MINIMUM_ADDRESS_HISTORY_YEARS) {\r\n var $nextYear = $nextYears.first();\r\n $nextYear.show();\r\n $nextYear.find(\".years-at-address\").trigger(\"change\");\r\n } else {\r\n $nextYears.hide();\r\n }\r\n }\r\n }\r\n\r\n // Non-generic\r\n $addressForms.each(function () {\r\n var $addressForm = $(this);\r\n var $yearsAtAddress = $addressForm.find(\".years-at-address\");\r\n var $nextYears = $addressForm.nextAll(\".address-form-wrapper\");\r\n $yearsAtAddress.on('change', function () {\r\n showHideNextYears($addressForm, $yearsAtAddress, $nextYears);\r\n });\r\n });\r\n\r\n var $firstAddress = $addressForms.first();\r\n var $firstYearsAtAddress = $firstAddress.find(\".years-at-address\");\r\n $firstYearsAtAddress.trigger(\"change\");\r\n\r\n address();\r\n\r\n // Initialise validator\r\n $.validator.setDefaults({\r\n highlight: function(element) {\r\n $(element)\r\n .closest(\".element-container\")\r\n .addClass(\"container-error\")\r\n .parents(\".element-group\")\r\n .show();\r\n },\r\n unhighlight: function(element) {\r\n $(element)\r\n .closest(\".element-container\")\r\n .removeClass(\"container-error\");\r\n },\r\n submitHandler: function (form) {\r\n var $submitButtons = $(form).find(\":input.disable-on-submit\");\r\n var $submitContainers = $submitButtons.closest(\".element-container\");\r\n $submitButtons.prop('disabled', true);\r\n $submitContainers.addClass(\"submitting\");\r\n form.submit();\r\n },\r\n ignore: [\":input[type='hidden']\"]\r\n });\r\n\r\n // Find server-side validated elements in error\r\n $(\":input.input-validation-error\").each(function() {\r\n $(this).closest(\".element-container\")\r\n .addClass(\"container-error\")\r\n .parents(\".element-group\")\r\n .show();\r\n });\r\n\r\n // extend jquery range validator to work for required checkboxes (https://dotnetfiddle.net/JbPh0X)\r\n var defaultRangeValidator = $.validator.methods.range;\r\n $.validator.methods.range = function(value, element, param) {\r\n if(element.type === 'checkbox') {\r\n // if it's a checkbox return true if it is checked\r\n return element.checked;\r\n } else {\r\n // otherwise run the default validation function\r\n return defaultRangeValidator.call(this, value, element, param);\r\n }\r\n }\r\n\r\n // Sanitise values to only include digits, particularly useful for removing commas etc (which don't play nicely with MVC)\r\n $(\"input[data-val-number][type!='hidden']\").on(\"input\", function() {\r\n\r\n var $input = $(this);\r\n var nonDigitRegex = /[^\\d]/gi;\r\n var strCurrentVal = $input.val();\r\n var strSanitisedVal = strCurrentVal.replace(nonDigitRegex, '');\r\n $input.val(strSanitisedVal);\r\n });\r\n\r\n $(\":input[data-val-required]\").each(function() {\r\n $(this).closest(\".element-container\").addClass(\"required-field\");\r\n }); \r\n \r\n jQuery.validator.addMethod(\r\n \"threeFieldDateOfBirth\",\r\n function (value, element, params) {\r\n //debugger;\r\n var $day = $(element);\r\n var $month = params.month;\r\n var $year = params.year;\r\n \r\n return !$day.is(\":blank\") && !$month.is(\":blank\") && !$year.is(\":blank\");\r\n },\r\n \"Please complete this information\"\r\n );\r\n\r\n var $threeFieldDateOfBirth = $(\".finance-eligibility .dob-editor\");\r\n var $day = $threeFieldDateOfBirth.find(\".day\");\r\n var $month = $threeFieldDateOfBirth.find(\".month\");\r\n var $year = $threeFieldDateOfBirth.find(\".year\");\r\n $month.add($year).on('change',function() {\r\n $day.valid();\r\n }); \r\n\r\n $(document).ready(function() { \r\n $day.rules(\"add\", {\r\n threeFieldDateOfBirth: {\r\n month: $month,\r\n year: $year\r\n }\r\n });\r\n });\r\n\r\n\r\n this.init();\r\n }\r\n\r\n init() {\r\n\r\n var RESIDENTIAL_STATUS_OWNER = \"Owner\";\r\n\r\n var EMPLOYMENT_STATUS_SELF_EMPLOYED = \"Self-employed\";\r\n var EMPLOYMENT_STATUS_EMPLOYED = \"Employed\";\r\n var EMPLOYMENT_STATUS_NOT_EMPLOYED = \"Not-employed\";\r\n\r\n var that = this;\r\n\r\n var $financeEligibility = $(\".finance-eligibility\");\r\n var $monthlyRentAmount = $financeEligibility.find(\".monthly-rent-amount\");\r\n var $residentialStatusSelect = $financeEligibility.find(\".residential-status select\");\r\n var $selfEmployedGroup = $financeEligibility.find(\".self-employed-group\");\r\n var $employedGroup = $financeEligibility.find(\".employed-group\");\r\n var $notEmployedGroup = $financeEligibility.find(\".not-employed-group\");\r\n var $employmentStatusSelect = $financeEligibility.find(\".employment-status select\");\r\n var $allEmploymentFields = $selfEmployedGroup.add($employedGroup).add($notEmployedGroup);\r\n\r\n $residentialStatusSelect.on('change',function () {\r\n var strSelectedVal = $(this).val();\r\n if (strSelectedVal && strSelectedVal !== RESIDENTIAL_STATUS_OWNER) {\r\n $monthlyRentAmount.show();\r\n } else {\r\n $monthlyRentAmount.hide();\r\n }\r\n });\r\n\r\n $residentialStatusSelect.trigger(\"change\");\r\n\r\n $employmentStatusSelect.on('change',function () {\r\n var strSelectedVal = $(this).val();\r\n if (strSelectedVal === EMPLOYMENT_STATUS_SELF_EMPLOYED) {\r\n $allEmploymentFields.not($selfEmployedGroup).hide();\r\n $selfEmployedGroup.show();\r\n } else if (strSelectedVal === EMPLOYMENT_STATUS_EMPLOYED) {\r\n $allEmploymentFields.not($employedGroup).hide();\r\n $employedGroup.show();\r\n } else if (strSelectedVal === EMPLOYMENT_STATUS_NOT_EMPLOYED) {\r\n $allEmploymentFields.not($notEmployedGroup).hide();\r\n $notEmployedGroup.show();\r\n } else {\r\n $allEmploymentFields.hide();\r\n }\r\n });\r\n\r\n $employmentStatusSelect.trigger(\"change\");\r\n\r\n // Show the form once initialised\r\n $financeEligibility.addClass(\"js\");\r\n }\r\n\r\n}\r\n","const Address = () => {\r\n\r\n\tvar formId = \".address-form-wrapper\";\r\n\t$(formId + \" .search-box__submit\").on(\"click\", function (e) {\r\n\t\t\r\n\t\tvar wrapper = $(this).parents().eq(2);\r\n\t\tvar input = wrapper.find(\".search-box__input\");\r\n\t\tvar postcode = input.val();\r\n\t\t\r\n\t\tif (postcode !== '') {\r\n\r\n $.get(apilocation + \"postcodeapi/PostcodeLookup?postcode=\" + postcode, function (response) {\r\n\r\n\t\t\t\tif (response.length > 0) {\r\n\t\t\t\t\twrapper.find(\".address-not-found\").hide();\r\n\t\t\t\t\twrapper.find(\".address-section\").show();\r\n\t\t\t\t\twrapper.find(\".address-dropdown\").show();\r\n\t\t\t\t\twrapper.find(\".dropdown__select\").empty();\r\n\r\n\r\n\t\t\t\t\twrapper.find(\".dropdown__select\").append($('';\r\n items.forEach(element => {\r\n if (hospitalName.length != 0 && element.Hospital.toLowerCase().includes(hospitalName)) {\r\n options += \"\";\r\n hasHospital = true;\r\n }\r\n else {\r\n options += \"\";\r\n }\r\n });\r\n\r\n $(\".js-customer-ratings--hospital\").html(options);\r\n\r\n if (hasHospital) {\r\n var filter = $(\".js-customer-ratings--hospital option:selected\").val();\r\n _this.getResults(filter);\r\n }\r\n else {\r\n _this.getResults(filter);\r\n }\r\n }\r\n });\r\n\r\n $(\".js-customer-ratings--hospital\").on('change',function () {\r\n var filter = $(\".js-customer-ratings--hospital option:selected\").val();\r\n _this.getResults(filter);\r\n });\r\n \r\n }\r\n\r\n getResults(filter) {\r\n var _this = this;\r\n var seed = document.getElementById(\"hdnSeed\").value;\r\n var r_baseUrl = apilocation + \"RatingsApi/GetRatings?filter=\" + filter + \"&seed=\" + seed;\r\n var data = filter;\r\n var dataContainer = $(\".js-customer-ratings--list\");\r\n var listingContainer = $(dataContainer).find(\".customer-ratings--list--results\");\r\n var output = \"\";\r\n //'TotalRows'\r\n\r\n\r\n\r\n $(dataContainer).pagination({\r\n dataSource: r_baseUrl,\r\n ajax: {\r\n contentType: null\r\n },\r\n locator: 'Rows',\r\n totalNumberLocator: function (response) {\r\n return response.TotalRows;\r\n },\r\n prevText: 'Previous',\r\n nextText: 'Next',\r\n pageSize: 10,\r\n callback: function (data, pagination) {\r\n output = \"\";\r\n data.forEach(element => {\r\n\r\n var i;\r\n var stars = '';\r\n for (i = 0; i < 5; i++) {\r\n if (i < element.RatingVal) {\r\n stars += ''\r\n }\r\n else {\r\n stars += ''\r\n }\r\n }\r\n\r\n var comment = `\r\n
    \r\n ${element.Hospital}, ${element.Date}\r\n
    \r\n \r\n
    \r\n ${stars}\r\n
    \r\n
    \r\n ${element.Headline}\r\n
    \r\n
    ${element.Reason}
    \r\n \r\n
    \r\n `\r\n output += comment;\r\n\r\n //output += \"
    \" + element.Headline + \"
    \";\r\n });\r\n\r\n listingContainer.html(output);\r\n }\r\n });\r\n\r\n //$(dataContainer).pagination({\r\n // dataSource: function (done) {\r\n // $.ajax({\r\n // type: 'get',\r\n // data: data,\r\n // url: r_baseUrl,\r\n // dataType: \"json\",\r\n // success: function (response) {\r\n // done(response.Rows);\r\n // }\r\n // });\r\n // },\r\n // locator: 'rows',\r\n // totalNumber: 120,\r\n // pageSize: 10,\r\n // callback: function (data, pagination) {\r\n // data.forEach(element => {\r\n // output += \"
    \" + element.Headline + \"
    \";\r\n // });\r\n\r\n // listingContainer.html(output);\r\n // }\r\n //});\r\n\r\n\r\n //$.ajax({\r\n // type: 'get',\r\n // data: data,\r\n // url: r_baseUrl,\r\n // dataType: \"json\",\r\n // success: function (response) {\r\n\r\n // console.log(response);\r\n\r\n // }\r\n //});\r\n\r\n\r\n\r\n //$('#js-customer-ratings--list').pagination({\r\n // dataSource: r_baseUrl,\r\n // locator: 'rows',\r\n // totalNumberLocator: function (response) {\r\n // return Math.floor(math.random() * (1000 - 100)) + 100;\r\n // },\r\n // pageSize: 10,\r\n // ajax: {\r\n // //beforeSend: function () {\r\n // // dataContainer.html('Loading Data');\r\n // //}\r\n // },\r\n // callback: function (data, pagination) {\r\n // // template method of yourself\r\n // var html = template(data);\r\n // dataContainer.html(html);\r\n // }\r\n //})\r\n\r\n\r\n }\r\n\r\n init() {\r\n\r\n this.gethospitals();\r\n //this.getResults();\r\n\r\n }\r\n\r\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n","export class Teamlistmodule {\r\n constructor() {\r\n this.addImageLiquid();\r\n this.properties();\r\n this.scrollToTargetAdjusted();\r\n\r\n if ($(\"#component-teamlist-carousel\").length > 0) { \r\n this.loadCarousel();\r\n } \r\n\r\n this.buildHeaderContentLinks()\r\n }\r\n\r\n properties() {\r\n this.sliderSelector = \"#component-teamlist-carousel .consultant-carousel__slider\";\r\n this.slidesToShow = 1;\r\n this.slidesToScroll = 1;\r\n this.initialSlide = 0;\r\n }\r\n\r\n loadCarousel() {\r\n this.loadSlick()\r\n }\r\n\r\n\r\n loadSlick() {\r\n\r\n var _this = this;\r\n $(this.sliderSelector).slick({\r\n mobileFirst: true,\r\n responsive: [\r\n {\r\n breakpoint: 0,\r\n settings: {\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 1,\r\n slidesToScroll: 1,\r\n initialSlide: _this.initialSlide,\r\n arrows: false\r\n }\r\n },\r\n {\r\n breakpoint: 1200,\r\n settings: {\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 3,\r\n slidesToScroll: 1,\r\n arrows: true\r\n }\r\n }\r\n ]\r\n });\r\n\r\n }\r\n\r\n buildHeaderContentLinks() {\r\n var links = {};\r\n links.items = [];\r\n \r\n var els = $(\".section-text__content strong\");\r\n var cp = $(\"#meettheteam\");\r\n els = els.add(cp);\r\n\r\n if (els.length > 0) {\r\n $.each(els, function (index, el) {\r\n var linkName = \"pageContent\" + index;\r\n els[index].setAttribute(\"id\", linkName);\r\n\r\n links.items.push({\r\n name: linkName,\r\n title: els[index].innerText\r\n });\r\n });\r\n\r\n var rowObj = $(\".container-component__hero\")[0].children[0];\r\n var output = \"

    On this page:

    \";\r\n $(rowObj).append(output);\r\n }\r\n\r\n }\r\n\r\n addImageLiquid() {\r\n $('.consultant-listing__item__image--cropped').imgLiquid({\r\n horizontalAlign: '74%'\r\n });\r\n } \r\n\r\n scrollToTargetAdjusted() {\r\n $(\".container-component__hero\").on(\"click\", \".scrolltolink\", function (e) {\r\n\r\n e.preventDefault();\r\n var $window = $(window);\r\n\r\n var link = $(this).attr(\"href\").replace(\"#\",\"\");\r\n\r\n var element = document.getElementById(link);\r\n var headerOffset = 140;\r\n var windowsize = $window.width();\r\n if (windowsize > 500) {\r\n headerOffset = 200;\r\n }\r\n\r\n //console.log(windowsize);\r\n\r\n var elementPosition = element.getBoundingClientRect().top;\r\n var offsetPositon = elementPosition - headerOffset;\r\n window.scrollTo({\r\n top: offsetPositon,\r\n behavior: \"smooth\"\r\n });\r\n \r\n });\r\n }\r\n}\r\n\r\n\r\n\r\n\r\n\r\n","import { HelpersModule } from \"../helpers/helpers\";\r\nimport { UrlHelperModule } from \"../helpers/urlHelper\";\r\n\r\nconst helpersModule = new HelpersModule();\r\n\r\nexport class DropdownFindersModule {\r\n\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n create_custom_dropdowns() {\r\n var _this = this;\r\n\r\n // Setup all data for each dropdown\r\n $('.search-dropdown').each(function () {\r\n\r\n var _container = this;\r\n var url = apilocation + $(this).data(\"url\");\r\n\r\n fetch(url)\r\n .then(function (response) {\r\n response.json().then(data => ({\r\n data: data,\r\n status: response.status\r\n })\r\n ).then(res => {\r\n var data = JSON.parse(res.data);\r\n var _selectedId = $(_container).find(\"input[type=hidden]\").val();\r\n var _selectedText = \"Please select\";\r\n $(_container).find(\".dropdown-select\").find(\"ul li\").removeClass(\"selected\");\r\n $.each(data.Suggestions, function (index, item) {\r\n var _value = \"
  • \" + item.Display + \"
  • \";\r\n if (_selectedId == item.NodeId) {\r\n _value = \"
  • \" + item.Display + \"
  • \";\r\n _selectedText = item.Display;\r\n }\r\n $(_container).find(\".dropdown-select\").find(\"ul\").append(_value);\r\n });\r\n\r\n $(_container).find(\".dropdown-select\").find(\".current\").html(_selectedText);\r\n\r\n });\r\n });\r\n \r\n });\r\n\r\n $('.search-dropdown').find(\"select\").each(function (i, select) {\r\n if (!$(this).next().hasClass('dropdown-select')) {\r\n $(this).after('
      ');\r\n var dropdown = $(this).next();\r\n var options = $(select).find('option');\r\n var selected = $(this).find('option:selected');\r\n dropdown.find('.current').html(selected.data('display-text') || selected.text());\r\n options.each(function (j, o) {\r\n var display = $(o).data('display-text') || '';\r\n dropdown.find('ul').append('
    • ' + $(o).text() + '
    • ');\r\n });\r\n }\r\n });\r\n\r\n $('.dropdown-select ul').before('
      ');\r\n\r\n $(\".dropdown-select\").delegate(\".dd-searchbox\", 'keyup', function (e) {\r\n _this.filter(this);\r\n });\r\n\r\n // Open/close\r\n $(document).on('click', '.dropdown-select', function (event) {\r\n if ($(event.target).hasClass('dd-searchbox')) {\r\n return;\r\n }\r\n var _this = this;\r\n //$('.dropdown-select').not($(this)).removeClass('open');\r\n $(_this).not($(this)).removeClass('open');\r\n $(this).toggleClass('open');\r\n if ($(this).hasClass('open')) {\r\n $(this).find('.option').attr('tabindex', 0);\r\n $(this).find('.selected').trigger('focus');\r\n } else {\r\n $(this).find('.option').removeAttr('tabindex');\r\n $(this).trigger('focus');\r\n }\r\n });\r\n\r\n // Close when clicking outside\r\n $(document).on('click', function (event) {\r\n if ($(event.target).closest('.dropdown-select').length === 0) {\r\n $('.dropdown-select').removeClass('open');\r\n $('.dropdown-select .option').removeAttr('tabindex');\r\n }\r\n event.stopPropagation();\r\n });\r\n\r\n // Option click\r\n $(document).on('click', '.dropdown-select .option', function (event) {\r\n $(this).closest('.list').find('.selected').removeClass('selected');\r\n $(this).addClass('selected');\r\n var text = $(this).data('display-text') || $(this).text();\r\n var nodeid = $(this).data('value');\r\n $(this).parent().parent().parent().parent().find('input[type=hidden]').first().val(nodeid); // might need to get id\r\n $(this).closest('.dropdown-select').find('.current').text(text);\r\n $(this).closest('.dropdown-select').prev('select').val($(this).data('value')).trigger('change');\r\n });\r\n\r\n // Keyboard events\r\n $(document).on('keydown', '.dropdown-select', function (event) {\r\n var focused_option = $($(this).find('.list .option:focus')[0] || $(this).find('.list .option.selected')[0]);\r\n // Space or Enter\r\n //if (event.keyCode == 32 || event.keyCode == 13) {\r\n if (event.keyCode == 13) {\r\n if ($(this).hasClass('open')) {\r\n focused_option.trigger('click');\r\n } else {\r\n $(this).trigger('click');\r\n }\r\n return false;\r\n // Down\r\n } else if (event.keyCode == 40) {\r\n if (!$(this).hasClass('open')) {\r\n $(this).trigger('click');\r\n } else {\r\n focused_option.next().trigger('focus');\r\n }\r\n return false;\r\n // Up\r\n } else if (event.keyCode == 38) {\r\n if (!$(this).hasClass('open')) {\r\n $(this).trigger('click');\r\n } else {\r\n var focused_option = $($(this).find('.list .option:focus')[0] || $(this).find('.list .option.selected')[0]);\r\n focused_option.prev().trigger('focus');\r\n }\r\n return false;\r\n // Esc\r\n } else if (event.keyCode == 27) {\r\n if ($(this).hasClass('open')) {\r\n $(this).trigger('click');\r\n }\r\n return false;\r\n }\r\n });\r\n\r\n }\r\n\r\n filter(e) {\r\n\r\n var valThis = $(e).val();\r\n var _p = $(e).parent().parent().parent().parent();\r\n $(_p).find('ul > li').each(function () {\r\n var text = $(this).text();\r\n (text.toLowerCase().indexOf(valThis.toLowerCase()) > -1) ? $(this).show() : $(this).hide();\r\n });\r\n };\r\n\r\n init() {\r\n\r\n this.create_custom_dropdowns();\r\n\r\n }\r\n}\r\n","import { HelpersModule } from \"../helpers/helpers\";\r\nimport { UrlHelperModule } from \"../helpers/urlHelper\";\r\n\r\nconst helpersModule = new HelpersModule();\r\n\r\nexport class ConsultantFilterModule {\r\n\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n pageload() {\r\n var that = this;\r\n\r\n $(document).ready(function () { \r\n \r\n var searchParams = new URLSearchParams(window.location.search);\r\n var consultantType = searchParams.get(\"filterConsultantType\");\r\n $(\"#consultantType\").val(consultantType);\r\n if (consultantType == \"GP\") {\r\n $(\"#filterByBookable\").attr(\"disabled\", true);\r\n }\r\n\r\n that.CollapseOnlyOnMobile();\r\n \r\n });\r\n } \r\n\r\n isMobileDevice() {\r\n var windowWidth = jQuery(window).width();\r\n if (windowWidth < 992) \r\n {\r\n return true;\r\n }\r\n }\r\n\r\n CollapseOnlyOnMobile() {\r\n if (this.isMobileDevice()) {\r\n $(\"#DetailsSearchForm\").find(\".accordion-text__header\").trigger('click');\r\n $(\".consultant-search-form__filter-bar .accordion-text__header\").trigger('click');\r\n }\r\n }\r\n\r\n ButtonClicks() {\r\n $(\"#filterConsultants\").submit(function (e) {\r\n e.preventDefault();\r\n\r\n var actionUrl = $(this).find(\"input[name='actionUrl']\").val();\r\n \r\n // store the checkbox value in a hidden field\r\n var selectedCheckboxes = [];\r\n $(\".locationarea\").find(\".locationcb:checked\").each(function () {\r\n selectedCheckboxes.push($(this).val());\r\n });\r\n if (selectedCheckboxes.length > 0) {\r\n $(\"#filterByLocation\").val(selectedCheckboxes.join(\"-\"))\r\n }\r\n\r\n var letter = $(this).find(\"input[name='filterByLetter']:checked\").val();\r\n if (typeof letter == 'undefined') {\r\n letter = \"\";\r\n }\r\n\r\n var bookable = $(\"#filterByBookable\").prop(\"checked\");\r\n if (typeof bookable == 'undefined') {\r\n bookable = \"\";\r\n }\r\n\r\n var searchParams = new URLSearchParams(window.location.search); \r\n \r\n var consultantType = searchParams.get(\"filterConsultantType\");\r\n var treatmentOrSpeciality = searchParams.get(\"filterTreatmentSpeciality\");\r\n\r\n if (consultantType == \"GP\") {\r\n $(\"#filterByBookable\").attr(\"disabled\", \"disabled\");\r\n }\r\n else if (consultantType == null) {\r\n consultantType = \"consultant\";\r\n treatmentOrSpeciality = \"\";\r\n }\r\n\r\n location.href = actionUrl + \"?filterByLetter=\" + letter + \"&filterByLocation=\" + $(\"#filterByLocation\").val() + \"&filterByTreatment=\" + $(\"#filterByTreatment\").val() + \"&filterBySpecialty=\" + $(\"#filterBySpecialty\").val() + \"&filterTreatmentSpeciality=\" + treatmentOrSpeciality + \"&filterConsultantType=\" + consultantType;\r\n return true;\r\n });\r\n\r\n $(\"#resetSearch\").on('click', function () {\r\n var actionUrl = $(\"#filterConsultants\").find(\"input[name='actionUrl']\").val();\r\n var locationChkBox = $(\".locationarea\").find(\".locationcb:checked\");\r\n $(locationChkBox).removeAttr(\"checked\");\r\n $(\"#filterByLocation\").val(\"\");\r\n $(\"#filterByTreatment\").val(\"\");\r\n $(\"#filterBySpecialty\").val(\"\");\r\n $(\"#filterByBookable\").attr(\"checked\", false);\r\n $(\".radio-custom\").next(\"label\").removeClass(\"checked~label\");\r\n\r\n var lettercheckbox = $(\"#filterConsultants\").find(\"input[name=filterByLetter]:checked\");\r\n $(lettercheckbox).removeAttr(\"checked\");\r\n\r\n $(\".filterByLetter\").removeAttr(\"checked\");\r\n var url = actionUrl + \"?filterByLetter=\" + \"\" + \"&filterByLocation=\" + $(\"#filterByLocation\").val() + \"&filterByTreatment=\" + $(\"#filterByTreatment\").val() + \"&filterBySpecialty=\" + $(\"#filterBySpecialty\").val() + \"&filterTreatmentSpeciality=\" + treatmentOrSpeciality;\r\n\r\n $(\"#filterConsultants\").attr('action', url).submit();\r\n\r\n });\r\n }\r\n\r\n init() {\r\n this.pageload();\r\n this.ButtonClicks();\r\n }\r\n}\r\n","export class ConsultantProfilemodule {\r\n constructor() {\r\n\r\n this.toggleReadMoreButton();\r\n this.addImageLiquid();\r\n this.setFocusToEnquiryForm();\r\n }\r\n\r\n\r\n\r\n toggleReadMoreButton() {\r\n $('#ReadMore').on(\"click\", function (e) {\r\n e.preventDefault();\r\n var $button = $(this);\r\n var $textContainer = $button.closest(\".read-more\");\r\n $textContainer.toggleClass(\"expanded\");\r\n\r\n if ($textContainer.hasClass(\"expanded\")) {\r\n $button.text(\"Read less\");\r\n // window.scrollTo(window.scrollX, window.scrollY - 100); \r\n\r\n } else {\r\n $button.text(\"Read more…\");\r\n window.scrollTo(window.scrollX, $(e.target.hash).position().top - 150);\r\n }\r\n\r\n\r\n });\r\n\r\n\r\n }\r\n\r\n setFocusToEnquiryForm() {\r\n $('#btnEnquiry').on(\"click\", function (e) {\r\n e.preventDefault();\r\n window.scrollTo(window.scrollX, window.scrollY + document.querySelector('#component-enquiryform').getBoundingClientRect().top - 200);\r\n });\r\n }\r\n\r\n addImageLiquid() {\r\n $('.consultant-listing__item__image--cropped').imgLiquid({\r\n horizontalAlign: '74%'\r\n });\r\n }\r\n}\r\n\r\n","export class TreatmentCarouselModule {\r\n\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n getCurrentIndex() {\r\n return parseInt($('.slick-current').attr('data-slick-index'), 10) + 1;\r\n }\r\n LoadCarousel() {\r\n $('.treatment-carousel').slick({\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 3,\r\n slidesToScroll: 1,\r\n arrows: true,\r\n autoplay: false,\r\n autoplaySpeed: 6000,\r\n pauseOnHover: false,\r\n responsive: [\r\n {\r\n breakpoint: 991,\r\n settings: {\r\n slidesToShow: 1\r\n }\r\n }\r\n ]\r\n });\r\n }\r\n\r\n init() {\r\n var that = this;\r\n that.getCurrentIndex();\r\n that.LoadCarousel();\r\n }\r\n\r\n}","export class PatientFeedBackCarouselModule {\r\n\r\n constructor() {\r\n if ($(\".js-patient-feedback-carousel\").length > 0) {\r\n this.init();\r\n } \r\n }\r\n\r\n getCurrentIndex() {\r\n return parseInt($('.slick-current').attr('data-slick-index'), 10) + 1;\r\n }\r\n LoadCarousel() {\r\n $('.slider').slick({\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 2,\r\n slidesToScroll: 1,\r\n arrows: true,\r\n autoplay: false,\r\n autoplaySpeed: 6000,\r\n pauseOnHover: false,\r\n cssEase: 'linear',\r\n variableWidth:true,\r\n responsive: [\r\n {\r\n breakpoint: 991,\r\n settings: {\r\n slidesToShow: 2\r\n }\r\n }\r\n ]\r\n });\r\n }\r\n\r\n init() {\r\n var that = this;\r\n that.getCurrentIndex();\r\n that.LoadCarousel();\r\n }\r\n\r\n}","export class HomeIntroductionPanelModule {\r\n\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n navigation() {\r\n\r\n $(\".js-home-introduction--menu-item\").on('click', function (e) {\r\n e.preventDefault();\r\n var panelRqst = $(this)[0].getAttribute(\"value\");\r\n $(\"#component-home-introduction--home\").hide();\r\n $(\"#component-home-introduction--block-1\").hide();\r\n $(\"#component-home-introduction--block-2\").hide();\r\n $(\"#component-home-introduction--block-3\").hide();\r\n $(\"#\" + panelRqst).show();\r\n });\r\n\r\n $(\"#component-home-introduction\").on('click', '.js-home-introduction__panel', function (e) {\r\n e.preventDefault();\r\n var panelRqst = $(this).data(\"value\");\r\n $(\"#component-home-introduction--home\").hide();\r\n $(\"#\" + panelRqst).show();\r\n });\r\n\r\n }\r\n\r\n resetClick() {\r\n\r\n $(\"#component-healthcare-home-introduction-reset\").on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n\r\n $(\"#component-home-introduction-postcode\").val(\"\");\r\n\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").text(\"Hospital\");\r\n $(\"#hospitalDropdown .dropdown-toggle:first-child\").val(\"\");\r\n\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").text(\"Treatment\");\r\n $(\"#treatmentDropdown .dropdown-toggle:first-child\").val(\"\");\r\n\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").text(\"Speciality\");\r\n $(\"#specialityDropdown .dropdown-toggle:first-child\").val(\"\");\r\n\r\n $(\"#component-home-introduction-treatment\").prop(\"checked\", true);\r\n $(\"#specialityDropdown\").hide();\r\n $(\"#treatmentDropdown\").show();\r\n\r\n });\r\n\r\n }\r\n\r\n searchClick() {\r\n\r\n var that = this;\r\n $(\"#component-healthcare-home-introduction-search\").on(\"click\", function (e) {\r\n\r\n //console.log(\"component-home-introduction-search - clicked\");\r\n e.preventDefault();\r\n\r\n var url = $(\"#component-healthcare-home-introduction--consultant\").data(\"navigation-url\");\r\n var filterString = \"?filterByTreatment=&filterBySpecialty=\";\r\n var consultantRadioButtonValue = $(\"input[name='hospital-search']:checked\").val();\r\n\r\n if (consultantRadioButtonValue == \"treatment\") {\r\n var val = $(\"#treatmentDropdown .dropdown-toggle:first-child\").val();\r\n filterString = \"?filterByTreatment=\" + val + \"&filterBySpecialty=\";\r\n }\r\n else if (consultantRadioButtonValue == \"speciality\") {\r\n var val = $(\"#specialityDropdown .dropdown-toggle:first-child\").val();\r\n filterString = \"?filterByTreatment=&filterBySpecialty=\" + val;\r\n }\r\n var hosVal = $(\"#hospitalDropdown .dropdown-toggle:first-child\").val();\r\n var postcode = $(\"#component-home-introduction-postcode\").val();\r\n\r\n filterString += \"&filterByHospital=\" + hosVal;\r\n filterString += \"&filterByName=&filterByPostCode=\" + postcode + \"&filterByBookable=false\";\r\n\r\n if (url === undefined) {\r\n url = \"/consultants/profiles/\";\r\n }\r\n\r\n\r\n that.SetMap(postcode);\r\n // alert(that.hospitalIds + ' h i');\r\n // url += \"&filterByHospital=\" + that.hospitalIds;\r\n // alert(url);\r\n\r\n //console.log(\"component-home-introduction-URL - \" + url + filterString);\r\n //console.log(\"component-home-introduction-URL - \" + url + filterString);\r\n window.location = url + filterString;\r\n });\r\n\r\n //$(\".js-consultant-search-form-submit\").on('click', function (e) {\r\n // e.preventDefault();\r\n\r\n // var $form = $(\"#consultantSearchForm\"),\r\n // filterConsultantType = $form.find(\"input:radio[name=filterConsultantType]:checked\").val(),\r\n // filterTreatmentSpeciality = $form.find(\"#treatmentSpecialitySearch\").val(), // Might need to tell results page if speciality or treatment\r\n // filterLocation = $form.find(\"#location-finder\").val(),\r\n // filterName = $form.find(\"#nameSearch\").val(),\r\n // url = $form.attr(\"action\");\r\n // // var locationSuggested = this.SetMap(filterLocation);\r\n // url += \"?filterConsultantType=\" + filterConsultantType + \"&filterTreatmentSpeciality=\" + filterTreatmentSpeciality\r\n // + \"&filterLocation=\" + filterLocation + \"&filterName=\" + filterName;\r\n\r\n // //if (filterLocation != '') {\r\n\r\n // // url += \"&filterByHospital=\" + that.SetMap(filterLocation);\r\n\r\n // //}\r\n\r\n // $form.attr('action', url).submit();\r\n\r\n //});\r\n\r\n }\r\n\r\n \r\n\r\n SetMap(postcode) {\r\n var that = this;\r\n if (postcode != '') {\r\n var geocoder = new google.maps.Geocoder;\r\n geocoder.geocode({ 'address': postcode }, function (results, status) {\r\n\r\n if (status == google.maps.GeocoderStatus.OK) {\r\n that.lat = results[0].geometry.location.lat();\r\n that.lng = results[0].geometry.location.lng();\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: apilocation + 'EnquiryFormApi/NearestHospitalList',\r\n data: JSON.stringify({ \"postcode\": postcode }),\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\"\r\n }).done(function (data) {\r\n\r\n if (data.length > 0) {\r\n // alert(data)\r\n that.hospitalIds = data;\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n });\r\n }\r\n // alert(that.hospitalIds);\r\n return that.hospitalIds;\r\n\r\n }\r\n\r\n\r\n init() {\r\n var that = this;\r\n // $.getScript('https://maps.googleapis.com/maps/api/js?key=AIzaSyALpZboQbieD8FePSqE0JK2LdTvHlnAZy4&libraries=places', function () { that.SetMap($('#location-finder').val()); });\r\n $('.home-introduction-healthcare--content').find('li').find('a').on(\"click\", function (e) {\r\n if ($(this).text() == \"NHS referrals\") {\r\n \r\n $(this).attr(\"href\", $(this).attr(\"href\") + \"?scroll=bottom\");\r\n \r\n }\r\n\r\n });\r\n this.navigation();\r\n this.searchClick(); \r\n this.resetClick();\r\n\r\n \r\n\r\n }\r\n\r\n}","\r\nvar surveyForm = {\r\n\r\n\r\n update: function () {\r\n var val = $(\"input[name=Answer1]:checked\").val();\r\n\r\n // return false;\r\n },\r\n getParsleyConfig: function () {\r\n return {\r\n errorsContainer: function (pEle) {\r\n var $err = pEle.$element.parents('.covid-survey__element').find('.error');\r\n return $err;\r\n },\r\n\r\n uiEnabled: true\r\n };\r\n },\r\n\r\n customValidator: function () {\r\n\r\n window.Parsley.addValidator('answer1', {\r\n requirementType: 'string',\r\n validateString: function (value, requirements, parsleyInstance) {\r\n\r\n var $row = $(parsleyInstance.$element).parents(\".covid-survey__element\");\r\n\r\n var answer1 = $row.find(\"input[name = Answer1]:checked\").val();\r\n\r\n if (typeof answer1 === 'Y') {\r\n\r\n $(\"#Info1Yes\").toggle();\r\n }\r\n }\r\n });\r\n },\r\n\r\n recaptchaExpired: function () {\r\n grecaptcha.reset();\r\n var $submitButton = $(thisForm).find(\".js-covid-form__submit\");\r\n $submitButton.prop('disabled', false);\r\n },\r\n\r\n sumbitForm: function (thisForm) {\r\n var that = this;\r\n var form = $(thisForm).parsley(that.getParsleyConfig());\r\n var response = grecaptcha.getResponse();\r\n if (response.length == 0) {\r\n $(\"#recaptchaError\").toggle();\r\n }\r\n else {\r\n $(\"#recaptchaError\").hide();\r\n var $submitButton = $(thisForm).find(\".js-covid-form__submit\");\r\n if (form.validate()) {\r\n $submitButton.prop('disabled', true);\r\n $(\"#survey-success\").trigger('focus');\r\n // thisForm.find(\"input[name='cofnirm']\").prop(\"checked\");\r\n var answer1 = $('input[name=\"Answer1\"]:checked').val();\r\n var answer2 = $('input[name=\"Answer2\"]:checked').val();\r\n var answer3 = $('input[name=\"Answer3\"]:checked').val();\r\n var answer4 = $('input[name=\"Answer4\"]:checked').val();\r\n var answer5 = $('input[name=\"Answer5\"]:checked').val();\r\n var answer6 = $('input[name=\"Answer6\"]:checked').val();\r\n var answer7 = $('input[name=\"Answer7\"]:checked').val();\r\n var answer8 = $('input[name=\"Answer8\"]:checked').val();\r\n var answer9 = $('input[name=\"Answer9\"]:checked').val();\r\n var answer10 = $('input[name=\"Answer10\"]:checked').val();\r\n var answer11 = $('input[name=\"Answer11\"]:checked').val();\r\n var urlParam = that.getQueryStringByName(\"aptid\");\r\n var surveyFields = {\r\n \"clinicalOrderId\": urlParam,\r\n \"Answer1\": answer1,\r\n \"Answer2\": answer2,\r\n \"Answer3\": answer3,\r\n \"Answer4\": answer4,\r\n \"Answer5\": answer5,\r\n \"Answer6\": answer6,\r\n \"Answer7\": answer7,\r\n \"Answer8\": answer8,\r\n \"Answer9\": answer9,\r\n \"Answer10\": answer10,\r\n \"Answer11\": answer11\r\n }\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: apilocation + \"CovidSurveyApi/PostSurveyData\",\r\n data: JSON.stringify(surveyFields),\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\"\r\n }).done(function (data) {\r\n\r\n if (data == null) {\r\n $(\"#covidsurvey\").hide();\r\n $(\"#heroBlock\").hide();\r\n $(\"#SectionText\").hide();\r\n $(\"#survey-failure\").show();\r\n }\r\n else if (data.ResultCode == \"01\") \r\n {\r\n $(\"#covidsurvey\").hide();\r\n $(\"#heroBlock\").hide();\r\n $(\"#SectionText\").hide();\r\n $(\"#survey-failure\").show();\r\n }\r\n else if (data.ResultCode == \"03\")\r\n {\r\n that.successData(data);\r\n }\r\n else if (data.SurveyStatus == \"04\") {\r\n that.successData(data);\r\n $(\"#cancelappointment\").show();\r\n }\r\n else if (data.SurveyStatus == \"05\") {\r\n that.successData(data);\r\n $(\"#contactpatient\").show();\r\n }\r\n else if (data.SurveyStatus == \"03\") {\r\n that.successData(data);\r\n $(\"#surveycompleted\").show();\r\n }\r\n else {\r\n that.successData(data);\r\n }\r\n\r\n });\r\n }\r\n }\r\n\r\n },\r\n\r\n successData: function (data) {\r\n $(\"#covidsurvey\").hide();\r\n $(\"#heroBlock\").hide();\r\n $(\"#SectionText\").hide();\r\n $(\"#survey-success\").show();\r\n $(\"#survey-success\").trigger('focus');\r\n\r\n var source = $(\"#covid-template\").html(),\r\n template,\r\n context,\r\n html;\r\n if (source) {\r\n template = Handlebars.compile(source);\r\n context = { ResponseCovid: data };\r\n html = template(context);\r\n $(\"#covid-template\").after(html);\r\n }\r\n },\r\n getQueryStringByName: function (name) {\r\n\r\n name = name.replace(\"/[\\[]/\", \"\\\\[\").replace(\"/[\\]]/\", \"\\\\]\");\r\n const regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\r\n results = regex.exec(location.search);\r\n return results === null ? \"\" : decodeURIComponent(decodeURIComponent(results[1].replace(/\\+/g, \" \")));\r\n },\r\n init: function () {\r\n var that = this;\r\n\r\n\r\n\r\n var isCovidSurveyForm = $(\"#covid-survey-form\").length > 0;\r\n if (!isCovidSurveyForm) {\r\n return;\r\n }\r\n\r\n\r\n\r\n $(\".js-covid-form__submit\").on('click', function (e) {\r\n e.preventDefault();\r\n var thisForm = $(\"#covid-survey-form\");\r\n $(thisForm).parsley();\r\n //var ans1 = $(thisForm).find(\"input[name=Answer1]\").val();\r\n //if (typeof ans1 === 'undefined') {\r\n // that.update();\r\n //}\r\n //else {\r\n that.sumbitForm(thisForm);\r\n // }\r\n });\r\n\r\n }\r\n}\r\n\r\nfunction CovidSurveyModule() {\r\n $(window).on('load', function () {\r\n\r\n surveyForm.init();\r\n\r\n });\r\n\r\n $(\"input[name$='Answer1']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"Y\") {\r\n $(\"#Info1Yes\").show();\r\n }\r\n else {\r\n $(\"#Info1Yes\").hide();\r\n }\r\n\r\n });\r\n\r\n $(\"input[name$='Answer2']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"Y\") {\r\n $(\"#Info2Yes\").show();\r\n }\r\n else {\r\n $(\"#Info2Yes\").hide();\r\n }\r\n\r\n });\r\n\r\n $(\"input[name$='Answer3']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"Y\") {\r\n $(\"#Info3Yes\").show();\r\n }\r\n else {\r\n $(\"#Info3Yes\").hide();\r\n }\r\n\r\n });\r\n\r\n $(\"input[name$='Answer4']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"Y\") {\r\n $(\"#Info4Yes\").show();\r\n }\r\n else {\r\n $(\"#Info4Yes\").hide();\r\n }\r\n\r\n });\r\n\r\n $(\"input[name$='Answer5']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"Y\") {\r\n $(\"#Info5Yes\").show();\r\n }\r\n else {\r\n $(\"#Info5Yes\").hide();\r\n }\r\n\r\n });\r\n\r\n $(\"input[name$='Answer11']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"N\") {\r\n $(\"#Info11\").show();\r\n }\r\n else {\r\n $(\"#Info11\").hide();\r\n }\r\n\r\n });\r\n\r\n $(\"input[name$='Answer6']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"N\") {\r\n $(\"#Info6\").show();\r\n }\r\n else {\r\n $(\"#Info6\").hide();\r\n }\r\n\r\n });\r\n $(\"input[name$='Answer7']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"N\") {\r\n $(\"#Info7\").show();\r\n }\r\n else {\r\n $(\"#Info7\").hide();\r\n }\r\n\r\n });\r\n $(\"input[name$='Answer8']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"N\") {\r\n $(\"#Info8\").show();\r\n }\r\n else {\r\n $(\"#Info8\").hide();\r\n }\r\n\r\n });\r\n $(\"input[name$='Answer10']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"N\") {\r\n $(\"#Info10\").show();\r\n }\r\n else {\r\n $(\"#Info10\").hide();\r\n }\r\n\r\n });\r\n\r\n $(\"input[name$='Answer4']\").on('click', function (e) {\r\n var val = $(this).val();\r\n\r\n if (val == \"y\") {\r\n $(\"#Info4\").show();\r\n }\r\n else {\r\n $(\"#Info4\").hide();\r\n }\r\n\r\n });\r\n\r\n $('[tool-tip-toggle=\"tooltip-demo\"]').tooltip({\r\n placement: 'top'\r\n\r\n });\r\n}\r\n\r\nexport { CovidSurveyModule };","export class TextReadMoreModule {\r\n constructor() {\r\n\r\n this.toggleReadMoreButton();\r\n }\r\n\r\n toggleReadMoreButton() {\r\n\r\n $('.text-read-more').on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n var $button = $(this);\r\n var compId = $button.attr(\"data-comp-key\");\r\n \r\n $(\".limit-text-\" + compId).hide();\r\n $(\".full-text-\" + compId).show();\r\n });\r\n\r\n $('.text-read-less').on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n var $button = $(this);\r\n var compId = $button.attr(\"data-comp-key\");\r\n\r\n $(\".limit-text-\" + compId).show();\r\n $(\".full-text-\" + compId).hide();\r\n });\r\n }\r\n\r\n}","export class ArticleLoadMoreModule {\r\n constructor() {\r\n\r\n this.articleLoadMoreButton();\r\n this.changeFilter();\r\n this.newToHealthCareFilterChange();\r\n this.resetFilters();\r\n }\r\n\r\n resetFilters() {\r\n $('#article-reset-filter').on(\"click\", function(e) {\r\n\r\n e.preventDefault();\r\n var button = $(this);\r\n var listingId = button.attr(\"data-listing-id\");\r\n var topic = $(\".article-filter-topic_\" + listingId);\r\n var content = $(\".article-filter-content_\" + listingId);\r\n var location = $(\".article-filter-location_\" + listingId);\r\n\r\n topic.val(\"\");\r\n content.val(\"\");\r\n location.val(\"\");\r\n\r\n var perPage = button.attr(\"data-article-per-page\");\r\n var parentId = button.attr(\"data-parent-id\");\r\n var listingWrapper = $(\"#\" + listingId);\r\n listingWrapper.css({ opacity: 0.3 });\r\n\r\n var url = surfacelocation + \"ArticleLoad/LoadNext?take=\" + perPage + \"&skip=0&parent=\" + parentId + \"&topic=&content=&location=&uniqueId=\" + listingId + \"&swapTags=false\";\r\n\r\n $.ajax({\r\n type: \"GET\",\r\n url: url,\r\n processData: false,\r\n contentType: false\r\n }).done(function (data) {\r\n\r\n setTimeout(function () {\r\n\r\n if (data.trim() !== 'none') {\r\n listingWrapper.html(data);\r\n button.show();\r\n\r\n } else {\r\n listingWrapper.html(\"\");\r\n }\r\n\r\n listingWrapper.css({ opacity: 1 });\r\n $(\".article-load-more-spinner\").hide();\r\n }, 1500);\r\n\r\n });\r\n });\r\n }\r\n\r\n newToHealthCareFilterChange() {\r\n\r\n $('input[type=radio][name=filterNewToPrivateType]').on('change', function() {\r\n\r\n var button = $(this);\r\n var filterValue = button.val();\r\n\r\n var perPage = $(\"#perPage\").val();\r\n var listingId = $(\"#listingId\").val();\r\n var parentId = $(\"#parentId\").val();\r\n var articleCount = 0;\r\n var listingWrapper = $(\"#\" + listingId);\r\n\r\n listingWrapper.css({ opacity: 0.3 });\r\n\r\n var url = surfacelocation + \"ArticleLoad/LoadPrivateNext?take=\" + perPage + \"&skip=\" + articleCount + \"&parent=\" + parentId + \"&uniqueId=\" + listingId + \"&filter=\" + filterValue;\r\n\r\n $.ajax({\r\n type: \"GET\",\r\n url: url,\r\n processData: false,\r\n contentType: false\r\n }).done(function (data) {\r\n\r\n setTimeout(function () {\r\n\r\n if (data.trim() !== 'none') {\r\n listingWrapper.html(data);\r\n button.show();\r\n\r\n } else {\r\n listingWrapper.html(\"\");\r\n }\r\n\r\n listingWrapper.css({ opacity: 1 });\r\n $(\".article-load-more-spinner\").hide();\r\n }, 1500);\r\n\r\n });\r\n });\r\n }\r\n\r\n changeFilter() {\r\n $('.article-filter-attr').on(\"change\", function(e) {\r\n\r\n var button = $(\"#article-load-more\");\r\n var listingId = button.attr(\"data-article-list-id\");\r\n var parentId = button.attr(\"data-parent-id\");\r\n var topic = $(\".article-filter-topic_\" + listingId).val();\r\n var content = $(\".article-filter-content_\" + listingId).val();\r\n //var location = $(\".article-filter-location_\" + listingId).val();\r\n var location = \"\";\r\n \r\n var perPage = button.attr(\"data-article-per-page\"); \r\n \r\n button.hide();\r\n $(\".article-load-more-spinner\").show();\r\n var listingWrapper = $(\"#\" + listingId);\r\n var url = surfacelocation + \"ArticleLoad/LoadNext?take=\" + perPage + \"&skip=\" + 0 + \"&parent=\" + parentId + \"&topic=\" + topic + \"&content=\" + content + \"&location=\" + location + \"&uniqueId=\" + listingId + \"&swapTags=false\";\r\n\r\n $.ajax({\r\n type: \"GET\",\r\n url: url,\r\n processData: false,\r\n contentType: false\r\n }).done(function (data) {\r\n\r\n setTimeout(function () {\r\n\r\n if (data.trim() !== 'none') {\r\n listingWrapper.html(data);\r\n button.show();\r\n\r\n } else {\r\n listingWrapper.html(\"\");\r\n }\r\n\r\n $(\".article-load-more-spinner\").hide();\r\n }, 1500);\r\n\r\n });\r\n\r\n });\r\n }\r\n\r\n articleLoadMoreButton() {\r\n\r\n $('#article-load-more').on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n\r\n var button = $(this);\r\n var listingId = button.attr(\"data-article-list-id\");\r\n var topic = $(\".article-filter-topic_\" + listingId).val();\r\n var content = $(\".article-filter-content_\" + listingId).val();\r\n //var location = $(\".article-filter-location_\" + listingId).val();\r\n var location = \"\";\r\n var perPage = button.attr(\"data-article-per-page\");\r\n var totalArticles = button.attr(\"data-total-articles\");\r\n var parentId = button.attr(\"data-parent-id\");\r\n var swapTags = button.attr(\"data-swap-tags\");\r\n var parentDiv = document.getElementsByClassName(\"article-listing-full-width\");\r\n\r\n var childArticlesonPage = $(parentDiv).children().length;\r\n\r\n if (topic === undefined) {\r\n topic = \"\";\r\n }\r\n\r\n if (content === undefined) {\r\n content = \"\";\r\n }\r\n\r\n if (location === undefined) {\r\n location = \"\";\r\n }\r\n\r\n var articleCount = $(\".article-item-\" + listingId).length;\r\n\r\n button.hide();\r\n $(\".article-load-more-spinner\").show();\r\n var listingWrapper = $(\"#\" + listingId);\r\n\r\n var url = surfacelocation + \"ArticleLoad/LoadNext?take=\" + perPage + \"&skip=\" + childArticlesonPage + \"&parent=\" + parentId + \"&topic=\" + topic + \"&content=\" + content + \"&location=\" + location + \"&uniqueId=\" + listingId + \"&swapTags=\" + swapTags;\r\n\r\n $.ajax({\r\n type: \"GET\",\r\n url: url,\r\n processData: false,\r\n contentType: false\r\n }).done(function (data) {\r\n\r\n setTimeout(function () {\r\n\r\n if (data.trim() !== 'none') {\r\n listingWrapper.append(data);\r\n }\r\n\r\n // recount articles to figure out if we've hit the end\r\n var newCount = parseInt(articleCount) + parseInt(perPage);\r\n var MaxCount = parseInt(childArticlesonPage) + parseInt(perPage);\r\n if (totalArticles == MaxCount) {\r\n button.hide();\r\n }\r\n else {\r\n button.show();\r\n }\r\n \r\n\r\n $(\".article-load-more-spinner\").hide();\r\n }, 1500);\r\n\r\n });\r\n });\r\n }\r\n}","export class ScrollToBottomModule {\r\n constructor() {\r\n \r\n this.init();\r\n \r\n }\r\n\r\n init() {\r\n \r\n $(window).on('load', function () {\r\n\r\n var lastSectionText = $('.container-component__section-text').children().last();\r\n var searchParams = new URLSearchParams(window.location.search);\r\n var scroll = searchParams.get(\"scroll\"); \r\n if (scroll == \"bottom\") {\r\n $('html, body').animate({\r\n scrollTop: $(lastSectionText).offset().top\r\n });\r\n }\r\n });\r\n }\r\n\r\n \r\n}","export class BodyMapModule {\r\n constructor() {\r\n\r\n this.clickPainPoint();\r\n this.changeGender();\r\n }\r\n\r\n changeGender() {\r\n\r\n function genderProcess(gender) {\r\n if (gender === \"male\") {\r\n\r\n $(\"#bodymap-male-back\").removeClass(\"hidden\");\r\n $(\"#bodymap-female-back\").addClass(\"hidden\");\r\n $(\"#bodymap-male-front\").removeClass(\"hidden\");\r\n $(\"#bodymap-female-front\").addClass(\"hidden\");\r\n $(\".bodypart-filter-attr\").val('');\r\n $(\".show-only-for-male\").removeClass(\"hidden\");\r\n $(\".show-only-for-female\").addClass(\"hidden\");\r\n\r\n } else {\r\n\r\n $(\"#bodymap-male-back\").addClass(\"hidden\");\r\n $(\"#bodymap-female-back\").removeClass(\"hidden\");\r\n $(\"#bodymap-male-front\").addClass(\"hidden\");\r\n $(\"#bodymap-female-front\").removeClass(\"hidden\");\r\n $(\".bodypart-filter-attr\").val('');\r\n $(\".show-only-for-male\").addClass(\"hidden\");\r\n $(\".show-only-for-female\").removeClass(\"hidden\");\r\n }\r\n\r\n $(\"#bodymap-content-partview\").html('');\r\n $(\"#bodymap-content-defaultview\").show();\r\n\r\n $('html, body').animate({\r\n scrollTop: $(\".container-component__body-map--wrapper\").offset().top - 90\r\n });\r\n }\r\n\r\n $(\"#bodypart-filter-attr-gender\").on(\"change\", function(e) {\r\n\r\n e.preventDefault();\r\n genderProcess($(this).val());\r\n\r\n });\r\n\r\n $(\"input[type=radio][name=bodymapGender]\").on(\"change\", function (e) {\r\n\r\n e.preventDefault();\r\n genderProcess($(this).val());\r\n\r\n });\r\n }\r\n \r\n clickPainPoint() {\r\n\r\n $(\".bodypart-filter-attr\").on(\"change\", function (e) {\r\n\r\n e.preventDefault();\r\n $(\".loading\").show();\r\n\r\n var bodyPartId = $(this).val();\r\n $.ajax({\r\n type: \"GET\",\r\n url: surfacelocation + \"BodyPart/LoadBodyPart?key=\" + bodyPartId,\r\n processData: false,\r\n contentType: false\r\n }).done(function (data) {\r\n\r\n setTimeout(function () {\r\n $(\"#bodymap-content-defaultview\").hide();\r\n $(\"#bodymap-content-partview\").html(data);\r\n $(\".loading\").hide();\r\n\r\n $('html, body').animate({\r\n scrollTop: $(\".bodymap-content\").offset().top - 90\r\n });\r\n\r\n }, 1000);\r\n\r\n }).fail(function (xhr, status, error) {\r\n\r\n setTimeout(function () {\r\n $(\"#bodymap-content-defaultview\").show();\r\n $(\"#bodymap-content-partview\").html('');\r\n $(\".loading\").hide();\r\n\r\n $('html, body').animate({\r\n scrollTop: $(\".bodymap-content\").offset().top - 90\r\n });\r\n\r\n }, 1000);\r\n\r\n });\r\n\r\n });\r\n\r\n\r\n $('.bodymap-item').on(\"click\", function (e) {\r\n\r\n e.preventDefault();\r\n $(\".loading\").show();\r\n\r\n var bodyPartId = $(this).attr(\"data-bodyitem-id\");\r\n $.ajax({\r\n type: \"GET\",\r\n url: surfacelocation + \"BodyPart/LoadBodyPart?key=\" + bodyPartId,\r\n processData: false,\r\n contentType: false\r\n }).done(function (data) {\r\n\r\n setTimeout(function () {\r\n $(\"#bodymap-content-defaultview\").hide();\r\n $(\"#bodymap-content-partview\").html(data);\r\n $(\".loading\").hide();\r\n $(\".bodypart-filter-attr\").val(bodyPartId);\r\n\r\n $('html, body').animate({\r\n scrollTop: $(\".bodymap-content\").offset().top - 90\r\n });\r\n \r\n }, 1000);\r\n\r\n }).fail(function (xhr, status, error) {\r\n\r\n setTimeout(function () {\r\n $(\"#bodymap-content-defaultview\").hide();\r\n $(\"#bodymap-content-partview\").html(data);\r\n $(\".loading\").hide();\r\n\r\n $('html, body').animate({\r\n scrollTop: $(\".bodymap-content\").offset().top - 90\r\n });\r\n\r\n }, 1000);\r\n\r\n });\r\n \r\n });\r\n\r\n }\r\n}","import { HelpersModule } from \"../helpers/helpers\";\r\nimport { TrackingModule } from \"../helpers/TrackingHelper\";\r\n\r\nconst helpersModule = new HelpersModule();\r\nconst trackingModule = new TrackingModule();\r\n\r\nvar enquiryForm = {\r\n setupSpecialityDropdown: function () {\r\n var ajaxUrl = apilocation + \"Finders/SuggestSpecialties/\";\r\n var html = \"\";\r\n fetch(ajaxUrl)\r\n .then(function (response) {\r\n response.json().then(data => ({\r\n data: data,\r\n status: response.status\r\n })\r\n ).then(res => {\r\n var data = JSON.parse(res.data);\r\n $.each(data.Suggestions, function (index, item) {\r\n html += \"
    • \" + item.Display + \"
    • \";\r\n });\r\n $(\"#ir35specialityDropdown .results\").append(html);\r\n });\r\n });\r\n },\r\n getParsleyConfig: function () {\r\n return {\r\n errorsContainer: function (pEle) {\r\n var $err = pEle.$element.parents('.ir35-js-enquiry-form__tabs__content__inner__container__element').find('.error');\r\n return $err;\r\n },\r\n classHandler: function (el) {\r\n return el.$element.closest('.ir35-js-enquiry-form__tabs__content__inner__container__element');\r\n },\r\n uiEnabled: true\r\n };\r\n },\r\n customValidator: function () {\r\n\r\n var $dobErrorRequiredContainer = $('.js-date-required-concatenate'),\r\n $dobContainer = $('.enquiry-form__tabs__content__inner__container__element--dob--required');\r\n\r\n $('.js-enquiry-form__submit').on(\"click\", function () {\r\n\r\n var thisForm = $(this).parents(\".js-enquiry-form\");\r\n\r\n $dobErrorRequiredContainer = $(thisForm).find('.js-date-required-concatenate');\r\n $dobContainer = $(thisForm).find('.enquiry-form__tabs__content__inner__container__element--dob--required');\r\n\r\n var day = parseInt($(thisForm).find(\".js-dob-day-required\").val(), 10);\r\n var month = parseInt($(thisForm).find(\".js-dob-month-required\").val(), 10);\r\n var year = parseInt($(thisForm).find(\".js-dob-year-required\").val(), 10);\r\n\r\n if (isNaN(day) || isNaN(month) || isNaN(year)) {\r\n\r\n $dobErrorRequiredContainer.text('Please complete this information.').show();\r\n $dobContainer.addClass('enquiry-form__tabs__content__inner__container__element--error');\r\n\r\n\r\n } else {\r\n $dobErrorRequiredContainer.hide();\r\n $dobContainer.removeClass('enquiry-form__tabs__content__inner__container__element--error');\r\n\r\n }\r\n\r\n });\r\n\r\n var $form = $(\".ir35-js-enquiry-form\");\r\n\r\n $form.find(\".js-dob-day, .js-dob-month, .js-dob-year\").on(\"change\", function () {\r\n\r\n var thisForm = $(this).parents(\".js-enquiry-form\");\r\n\r\n $dobErrorRequiredContainer = $(thisForm).find('.js-date-required-concatenate');\r\n $dobContainer = $(thisForm).find('.enquiry-form__tabs__content__inner__container__element--dob--required');\r\n\r\n var day = parseInt($(thisForm).find(\".js-dob-day\").val(), 10);\r\n var month = parseInt($(thisForm).find(\".js-dob-month\").val(), 10);\r\n var year = parseInt($(thisForm).find(\".js-dob-year\").val(), 10);\r\n\r\n if (!isNaN(day) && !isNaN(month) && !isNaN(year)) {\r\n $(thisForm).find(\".js-dob-concatenate\").val(day + \"/\" + month + \"/\" + year);\r\n }\r\n\r\n if (isNaN(day) || isNaN(month) || isNaN(year)) {\r\n\r\n $dobErrorRequiredContainer.text('Please complete this information.').show();\r\n $dobContainer.addClass('enquiry-form__tabs__content__inner__container__element--error');\r\n\r\n\r\n } else {\r\n $dobErrorRequiredContainer.hide();\r\n $dobContainer.removeClass('enquiry-form__tabs__content__inner__container__element--error');\r\n\r\n }\r\n });\r\n\r\n // new appointment for verify eror on select field\r\n $form.find(\".js-dob-day-required, .js-dob-month-required, .js-dob-year-required\").on(\"change\", function () {\r\n\r\n var thisForm = $(this).parents(\".js-enquiry-form\");\r\n\r\n $dobErrorRequiredContainer = $(thisForm).find('.js-date-required-concatenate');\r\n $dobContainer = $(thisForm).find('.enquiry-form__tabs__content__inner__container__element--dob--required');\r\n\r\n var day = parseInt($(thisForm).find(\".js-dob-day-required\").val(), 10);\r\n var month = parseInt($(thisForm).find(\".js-dob-month-required\").val(), 10);\r\n var year = parseInt($(thisForm).find(\".js-dob-year-required\").val(), 10);\r\n\r\n if (isNaN(day) || isNaN(month) || isNaN(year)) {\r\n\r\n $dobErrorRequiredContainer.text('Please complete this information.').show();\r\n $dobContainer.addClass('enquiry-form__tabs__content__inner__container__element--error');\r\n\r\n\r\n } else {\r\n $dobErrorRequiredContainer.hide();\r\n $dobContainer.removeClass('enquiry-form__tabs__content__inner__container__element--error');\r\n\r\n }\r\n\r\n\r\n });\r\n\r\n window.Parsley.addValidator('date', {\r\n requirementType: 'string',\r\n validateString: function (value, requirements, parsleyInstance) {\r\n\r\n var $row = $(parsleyInstance.$element).parents(\".js-enquiry-form__tabs__content__inner__container__element\");\r\n\r\n var day = parseInt($row.find(\".js-dob-day\").val(), 10);\r\n var month = parseInt($row.find(\".js-dob-month\").val(), 10);\r\n var year = parseInt($row.find(\".js-dob-year\").val(), 10);\r\n\r\n if (!isNaN(day) && !isNaN(month) && !isNaN(year)) {\r\n\r\n var age = helpersModule.getAge(day, month, year);\r\n\r\n return age > 17;\r\n }\r\n },\r\n messages: {\r\n en: 'You must be over 18 to submit an enquiry',\r\n }\r\n });\r\n },\r\n emailValidator: function () {\r\n\r\n window.Parsley.addValidator('customequalto', {\r\n requirementType: 'string',\r\n\r\n validateString: function (value, elem, parsleyInstance) {\r\n\r\n $(elem).on(\"keyup\", _.debounce(function () {\r\n parsleyInstance.validate();\r\n }, 100));\r\n\r\n if (value.length > 0 && $(elem).length > 0) {\r\n return value.toLowerCase() === $(elem).val().toLowerCase();\r\n }\r\n return false;\r\n }\r\n });\r\n },\r\n\r\n removeLastComma: function (str) {\r\n return str.replace(/,\\s*$/, \"\")\r\n },\r\n\r\n submitForm: function (thisForm) {\r\n\r\n var that = this;\r\n var form = $(thisForm).parsley(that.getParsleyConfig());\r\n var $submitButton = $(thisForm).find(\".ir35-js-enquiry-form__submit\");\r\n\r\n if (form.validate()) {\r\n\r\n $submitButton.prop('disabled', true);\r\n var $spinner = thisForm.find('.ir35-enquiry-form__button-container__spinner');\r\n $spinner.addClass('ir35-enquiry-form__button-container__spinner--on');\r\n\r\n var selectedHospital = thisForm.find('#select-hospital');\r\n var selectedHospitalValue = $(selectedHospital).find('option:selected').text();\r\n\r\n var selectedSpeciality = thisForm.find('#specialityDropdown').find(\".dropdown-toggle\").text();\r\n var title = thisForm.find('#title').val();\r\n var firstName = thisForm.find('#first-name').val();\r\n var surname = thisForm.find('#surname').val(); \r\n var emailAddress = thisForm.find('#enquiry-email').val(); // CHECK NAME\r\n var phoneNum = thisForm.find('#phone-number').val();\r\n var physiciancode = thisForm.find('#physician-code').val();\r\n var comments = thisForm.find('#comments').val();\r\n\r\n\r\n var enquiryFields = {\r\n \r\n \"title\": title,\r\n \"firstName\": firstName,\r\n \"surname\": surname, \r\n \"Location\": selectedHospitalValue,\r\n \"speciality\": selectedSpeciality,\r\n \"physicianCode\": physiciancode,\r\n \"emailAddress\": emailAddress, \r\n \"phoneNum\": phoneNum,\r\n \"comments\": comments,\r\n \r\n };\r\n \r\n enquiryFields.nearestHospitalName = $(selectedHospital).find('option:selected').text();\r\n enquiryFields.nearestHospitalId = selectedHospitalValue;\r\n postForm(enquiryFields, thisForm, $submitButton, $spinner);\r\n \r\n }\r\n },\r\n \r\n init: function () {\r\n var isEnquiryForm = $(\"#ir35-enquiry-form\").length > 0;\r\n if (!isEnquiryForm) {\r\n return;\r\n }\r\n var that = this; \r\n that.emailValidator();\r\n\r\n that.setupSpecialityDropdown();\r\n $(\".ir35-js-enquiry-form__submit\").on('click', function (e) {\r\n e.preventDefault();\r\n var thisForm = $(this).parents(\".ir35-js-enquiry-form\");\r\n \r\n that.submitForm(thisForm);\r\n\r\n setTimeout(function () { \r\n\r\n }, 2000);\r\n\r\n\r\n });\r\n\r\n $(\".ir35-js-enquiry-form\").each(function (index) {\r\n\r\n if ($(this).parsley !== null) {\r\n $(this).parsley(that.getParsleyConfig()).on('field:validated', function () { });\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n};\r\n\r\nvar postForm = function (enquiryFields, thisForm, $submitButton, $spinner) {\r\n\r\n $.ajax({\r\n type: \"POST\",\r\n url: apilocation + 'EnquiryFormApi/IR35SendEnquiry',\r\n data: JSON.stringify(enquiryFields),\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\"\r\n }).done(function (data) {\r\n\r\n postToThankYou(); \r\n\r\n\r\n });\r\n};\r\n\r\nvar postToThankYou = function () {\r\n\r\n var thankYouPostForm = $(\"#ir35-thankYouPost\");\r\n \r\n thankYouPostForm.submit();\r\n};\r\n\r\n\r\n\r\nfunction ir35enquiryFormModule() {\r\n $(window).on('load', function () {\r\n \r\n if ($(\".ir35-js-inpageEnquiryForm\").length !== 0) {\r\n enquiryForm.init();\r\n \r\n } \r\n\r\n });\r\n}\r\n\r\nexport { ir35enquiryFormModule };","import SameHeight from 'same-height';\r\n\r\nexport class SplitContentPanelModule {\r\n constructor() {\r\n this.selector();\r\n this.init();\r\n }\r\n\r\n selector() {\r\n\r\n $(\".split-panel-select\").on(\"change\", function (e) {\r\n\r\n e.preventDefault();\r\n\r\n var parentPanel = $(this).val();\r\n $(\".container-component-split-content-panel__grid\").hide();\r\n $(\".container-component-split-content-panel__wrapper\").hide();\r\n $(\"#split-panel-\" + containerPanel).show();\r\n });\r\n\r\n $('.split-content-panel-link').on(\"click\", function(e) {\r\n\r\n e.preventDefault();\r\n\r\n var parentPanel = $(this).attr('data-parent-id');\r\n var containerPanel = $(this).attr('data-model-id');\r\n\r\n $(\".container-component-split-content-panel__grid\").hide();\r\n $(\".container-component-split-content-panel__wrapper\").hide();\r\n $(\"#split-panel-\" + parentPanel).show();\r\n\r\n $(\"#split-content-parent-\" + containerPanel).removeClass('restrict-width-mode');\r\n });\r\n }\r\n\r\n equalHeights() {\r\n SameHeight.init(\".container-component-split-content-panel__grid--item--content\", \"screen and (min-width: 992px)\");\r\n }\r\n\r\n init() {\r\n var that = this;\r\n this.equalHeights();\r\n }\r\n}","import { HelpersModule } from \"../helpers/helpers\";\r\n\r\nconst helpersModule = new HelpersModule();\r\n\r\nexport class ConsultantSearchFormModule {\r\n\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n ConsultantSearchFormClicks() {\r\n $(\".js-consultant-search-form-submit\").on('click', function (e) {\r\n e.preventDefault();\r\n\r\n var $form = $(\"#consultantSearchForm\"),\r\n filterConsultantType = $form.find(\"input:radio[name=filterConsultantType]:checked\").val(),\r\n filterTreatmentSpeciality = $form.find(\"#treatmentSpecialitySearch\").val(), // Might need to tell results page if speciality or treatment\r\n filterLocation = $form.find(\"#location-finder\").val(),\r\n filterName = $form.find(\"#nameSearch\").val(),\r\n filterByBookable = $form.find(\"#filterByBookable\").val(),\r\n url = $form.attr(\"action\");\r\n\r\n url += \"?filterConsultantType=\" + filterConsultantType + \"&filterTreatmentSpeciality=\" + filterTreatmentSpeciality\r\n + \"&filterLocation=\" + filterLocation + \"&filterName=\" + filterName + \"&filterByBookable=\" + filterByBookable;\r\n\r\n window.location.assign(url);\r\n\r\n });\r\n }\r\n\r\n init() {\r\n\r\n this.ConsultantSearchFormClicks();\r\n\r\n }\r\n\r\n}","export class HospitalLocationsListModule {\r\n constructor() {\r\n if ($(\".hospital-locations-list\").length > 0) {\r\n this.init(); \r\n }\r\n }\r\n\r\n init() { \r\n\r\n $(\".list-block-wrapper\").on(\"click\", \".list-block-content>a\", function (e) {\r\n e.preventDefault();\r\n if (document.documentElement.clientWidth < 975) {\r\n $(this).parent().find(\"ul\").toggle();\r\n $(this).hasClass(\"active\") ? $(this).removeClass(\"active\") : $(this).addClass(\"active\");\r\n $(this).parent().find(\"ul\").attr(\"aria-expanded\", $(this).parent().find(\"ul\").is(':visible'));\r\n }\r\n \r\n });\r\n\r\n $(window).resize(function () {\r\n document.documentElement.clientWidth > 975 ?\r\n $(\".list-block-wrapper\").find(\"ul\").show() : $(\".list-block-wrapper\").find(\"ul\").hide();\r\n })\r\n\r\n\r\n }\r\n}\r\n \r\n \r\n\r\n\r\n\r\n\r\n","export class PricingModule {\r\n\r\n constructor() {\r\n if ($(\"#hospitaltreatmentpricesapi\").length > 0) {\r\n this.init();\r\n }\r\n\t}\r\n\r\n init() {\r\n this.loadPrices();\r\n this.ClickEvents();\r\n }\r\n\r\n addCommas(nStr) {\r\n nStr += '';\r\n var x = nStr.split('.');\r\n var x1 = x[0];\r\n var x2 = x.length > 1 ? '.' + x[1] : '';\r\n var rgx = /(\\d+)(\\d{3})/;\r\n while (rgx.test(x1)) {\r\n x1 = x1.replace(rgx, '$1' + ',' + '$2');\r\n }\r\n return x1 + x2;\r\n }\r\n\r\n formatToPercentage(amount) {\r\n return parseFloat(amount * 100).toFixed(1) + \"%\";\r\n }\r\n\r\n formatToCurrency(amount) {\r\n return \"£\" + this.addCommas(Math.round(amount));\r\n }\r\n\r\n loadPricingTemplate(element, url, treatmentName, treatmentCode) {\r\n\r\n var that = this;\r\n let bodyElement = document.getElementsByTagName('body')[0];\r\n var hospitalName = bodyElement.dataset.hospitalName;\r\n var paymentButtonText = \"Find a payment plan that suits you\";\r\n var showFinanceCalculatorLink = document.getElementById(\"showFinanceCalculatorLink\").value;\r\n var initialConsultantFeeMissingText = document.getElementById(\"initialConsultantFeeMissingText\").value;\r\n var overridePriceFeeMissingText = document.getElementById(\"overridePriceFeeMissingText\").value;\r\n var enquiryFormUrl = document.getElementById(\"enquiryFormUrl\").value;\r\n\r\n var template = ``;\r\n var innerTemplate = ``;\r\n\r\n template +=\r\n ``;\r\n\r\n for (var i = 0; i < element.ProceduresApi.length; i++) {\r\n\r\n var item = element.ProceduresApi[i];\r\n\r\n var monthlyPayment, loanAmount, depositTyped, term, representativeAprTyped, totalAmountPayable = 0;\r\n var procedureName = item.Procedure;\r\n var procedureCode = item.ProcedureCode;\r\n var initialConsultantFee = item.InitialConsultation;\r\n var treatmentPrice = that.formatToCurrency(item.TreatmentPrice);\r\n var guidePrice = \"from \" + that.formatToCurrency(item.GuidePrice);\r\n\r\n\r\n /* Treatment Loan values */\r\n if (item.TreatmentLoan != null) {\r\n\r\n if (item.TreatmentLoan.MonthlyPayment == null) {\r\n monthlyPayment = \"\";\r\n }\r\n else {\r\n monthlyPayment = that.formatToCurrency(item.TreatmentLoan.MonthlyPayment);\r\n }\r\n\r\n loanAmount = that.formatToCurrency(item.TreatmentLoan.LoanAmount);\r\n depositTyped = that.formatToCurrency(item.TreatmentLoan.Deposit);\r\n term = item.TreatmentLoan.Term + \" months\";\r\n representativeAprTyped = that.formatToPercentage(item.TreatmentLoan.RepresentativeAPR);\r\n totalAmountPayable = that.formatToCurrency(item.TreatmentLoan.TotalAmountPayable);\r\n }\r\n /* End treatment loan values */\r\n\r\n\r\n var financeCalculatorlink = \"/patient-information/finance-calculator/?treatmentAmount=\" + item.TreatmentPrice + \"&treatmentCode=\" + treatmentCode + \"&treatmentName=\" + treatmentName + \"&hospitalName=\" + hospitalName;\r\n\r\n if (initialConsultantFee == \"0\" || initialConsultantFee == \"-9999\") {\r\n initialConsultantFee = initialConsultantFeeMissingText;\r\n }\r\n else {\r\n initialConsultantFee = \"from \" + that.formatToCurrency(initialConsultantFee);\r\n }\r\n\r\n if (item.RateCardPrice != 0 && item.RateCardPrice != -9999\r\n && item.ConsultantPrice != 0 && item.ConsultantPrice != -9999\r\n && item.AnaesthetistPrice != 0 && item.AnaesthetistPrice != -9999) {\r\n\r\n innerTemplate += `\r\n
      \r\n
      \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n `;\r\n\r\n if (showFinanceCalculatorLink) {\r\n innerTemplate += `\r\n \r\n \r\n \r\n `; \r\n }\r\n \r\n innerTemplate += `
      ${procedureName}
      Initial consultation${initialConsultantFee}
      Treatment${treatmentPrice}
      AftercareIncluded
      From price${guidePrice}
      \r\n Monthly treatment price
      \r\n (Loan applicable to the treatment cost and excludes the initial consultation)\r\n
      ${monthlyPayment}
      \r\n ${paymentButtonText}\r\n
      `;\r\n\r\n if (loanAmount.length > 0) {\r\n innerTemplate += `\r\n
      \r\n
      \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
      \r\n Representative example:\r\n
      Loan amount${loanAmount}
      Deposit${depositTyped}
      Loan period${term}
      Representative APR${representativeAprTyped}
      Total amount repayable${totalAmountPayable}
      \r\n
      \r\n \r\n
      \r\n `;\r\n }\r\n \r\n\r\n }\r\n }\r\n\r\n if (innerTemplate == \"\") {\r\n innerTemplate += `

      ` + overridePriceFeeMissingText + `

      `;\r\n\r\n innerTemplate += `\r\n `;\r\n }\r\n\r\n template += innerTemplate;\r\n\r\n return template;\r\n }\r\n\r\n ClickEvents() {\r\n var root = this;\r\n $(\"body\").on(\"click\", \".js-getprices\", function (e) {\r\n e.preventDefault()\r\n var that = this;\r\n var ison = $(this).hasClass(\"collapsed\");\r\n \r\n if (typeof ison !== 'undefined' && ison !== false) {\r\n\r\n var treatmentId = $(this).closest(\".spire-accordion\").data(\"id\");\r\n var treatmentUrl = $(this).closest(\".spire-accordion\").data(\"treatmenturl\");\r\n var enquiryFormUrl = document.getElementById(\"enquiryFormUrl\").value;\r\n var treatmentName = $(this).closest(\".spire-accordion\").data(\"treatmentname\");\r\n var treatmentCode = $(this).closest(\".spire-accordion\").data(\"code\");\r\n var url = apilocation + \"pricingapi/GetHospitalTreatmentPrices?id=\" + treatmentId;\r\n var overridePriceFeeMissingText = document.getElementById(\"overridePriceFeeMissingText\").value;\r\n\r\n $(\".loading\").addClass(\"show\");\r\n\r\n $.ajax({\r\n method: \"GET\",\r\n url: url,\r\n dataType: \"json\",\r\n }).done(function (data) {\r\n var template = ``;\r\n if (data.ProceduresApi.length > 0) {\r\n template = root.loadPricingTemplate(data, treatmentUrl, treatmentName, treatmentCode);\r\n }\r\n else {\r\n\r\n template = `\r\n\r\n
      \r\n
      \r\n

      ${overridePriceFeeMissingText}

      \r\n
      \r\n
      \r\n
      \r\n \r\n
      `;\r\n }\r\n $(that).closest(\".spire-accordion\").find(\".accordion-body\").html(template);\r\n\r\n }).always(function () {\r\n $(\".loading\").removeClass(\"show\");\r\n });\r\n\r\n }\r\n\r\n\r\n });\r\n }\r\n\r\n loadPrices() {\r\n let bodyElement = document.getElementsByTagName('body')[0];\r\n var hospitalid = bodyElement.dataset.id;\r\n var that = this;\r\n var endpoint = apilocation + \"treatmentapi/GetCurrentHospitalTreatments?hospitalid=\" + hospitalid;\r\n\r\n $(\".loading\").addClass(\"show\");\r\n\r\n $.ajax({\r\n method: \"GET\",\r\n url: endpoint,\r\n dataType: \"json\",\r\n }).done(function (data) {\r\n var template = ``;\r\n var accordionId = 0;\r\n data.treatments.forEach(element => {\r\n\r\n if (element.ShowInPriceList) {\r\n accordionId++;\r\n\r\n template += `\r\n
      \r\n
      \r\n \r\n

      \r\n ${element.TreatmentName}\r\n

      \r\n
      \r\n
      \r\n
      \r\n
      \r\n
      \r\n

      We can't display a fee for this procedure just now. Call us for a quote.

      \r\n
      \r\n
      \r\n
      \r\n `;\r\n }\r\n\r\n });\r\n\r\n $(\".js-pricing\").html(template);\r\n })\r\n .always(function () {\r\n $(\".loading\").removeClass(\"show\");\r\n });\r\n }\r\n\r\n}","export class MultiTopSlidingPanelModule {\r\n constructor() {\r\n if ($(\".container-component__multi-top-sliding-panel\").length > 0) {\r\n this.init();\r\n }\r\n }\r\n\r\n init() {\r\n\r\n var that = this;\r\n var output = that.GenerateMultiTopSlidingPanelTemplate();\r\n var injected = \"\";\r\n $(\"#multiTopSlidingPanel .slideItem\").each(function (index) {\r\n\r\n var dataIcon = $(this).data(\"iconurl\");\r\n var dataText = $(this).data(\"text\");\r\n\r\n injected += that.GenerateMultiTopSlidingPanelHtml(dataIcon, dataText, index)\r\n\r\n });\r\n \r\n $(\".js-multi-top-sliding-panel\").html(output);\r\n\r\n $(\".js-multi-top-sliding-panel\").find(\".js-top-sliding-panel-carousel-items\").html(injected);\r\n \r\n }\r\n\r\n GenerateMultiTopSlidingPanelTemplate() {\r\n return `
      \r\n
      \r\n\r\n
      \r\n \r\n \r\n \r\n
      \r\n\r\n
      \r\n
      \r\n
      \r\n\r\n
      \r\n
      \r\n
      \r\n\r\n
      \r\n \r\n \r\n \r\n
      \r\n
      \r\n
      `;\r\n\r\n }\r\n\r\n GenerateMultiTopSlidingPanelHtml(icon, text, index) {\r\n var active = \"\";\r\n if (index == 0) {\r\n active = \"active\";\r\n }\r\n\r\n if (icon == \"\") {\r\n return `
      \r\n
      \r\n
      \r\n ${text}\r\n
      \r\n
      \r\n
      `;\r\n }\r\n else {\r\n return `
      \r\n
      \r\n
      \r\n \r\n
      \r\n
      \r\n ${text}\r\n
      \r\n
      \r\n
      `;\r\n }\r\n\r\n \r\n }\r\n\r\n}\r\n\r\n\r\n\r\n","/*import { CalendarDay } from \"models/appointment-calendar-models\";*/\r\n\r\nexport class CobpsCalendarModule {\r\n constructor() {\r\n if ($(\".container-component__cobps-calendar\").length > 0) {\r\n this.init();\r\n }\r\n }\r\n\r\n init() {\r\n \r\n\r\n // console.log(appointmentCalendarApp);\r\n\r\n //console.log('loaded');\r\n }\r\n}","import {FunnelBackModule} from \"../funnelback/funnelback\";\r\n\r\nexport class SearchOverlayModule {\r\n constructor(funnelbackModule, mapApiCallbacks) {\r\n const that = this;\r\n let bodyOverflow;\r\n\r\n if (that.locationLookupSetup.length !== 0) {\r\n mapApiCallbacks.push(that.locationLookupSetup);\r\n }\r\n \r\n let searchOverlay = $('.search-overlay');\r\n $('#search-overlay-close').on('click', function () {\r\n searchOverlay.hide();\r\n $('body').css('overflow', bodyOverflow);\r\n\r\n $('#search-overlay-text-input').val('');\r\n $('#search-overlay-location-input').val('');\r\n $('#search-overlay-location-input-geo').val('');\r\n that.clearAndHideSuggestions(); \r\n });\r\n \r\n $('.open-overlay-search-button').on('click', function () {\r\n searchOverlay.show();\r\n let body = $('body');\r\n bodyOverflow = body.css('overflow');\r\n body.css('overflow', 'hidden');\r\n });\r\n \r\n $('#search-overlay-submit').on('click', function () {\r\n that.search();\r\n });\r\n \r\n $('#search-overlay-text-input').on('input', function() { \r\n funnelbackModule.requestAutocompleteResults($(this).val(), function (data) {\r\n let list = $('#search-overlay-suggestion-list');\r\n \r\n if(data.length < 1) {\r\n that.clearAndHideSuggestions();\r\n return;\r\n }\r\n \r\n $('.search-overlay-suggestions-container').show();\r\n \r\n list.html('');\r\n\r\n for (let i = 0; i < data.length; i++) {\r\n list.append(`
    • ${data[i].disp}
    • `);\r\n if(i === 8) {\r\n break;\r\n }\r\n }\r\n })\r\n });\r\n \r\n $('#search-overlay-suggestion-list').on('click', 'li', function () {\r\n let input = $('#search-overlay-text-input');\r\n input.val($(this).text());\r\n input.trigger('input');\r\n that.search();\r\n });\r\n \r\n $('#search-overlay-text-input').on('keydown', function(e) {\r\n if(e.keyCode === 13) {\r\n that.search();\r\n }\r\n });\r\n \r\n $('#search-overlay-location-mylocation').on('click', function() {\r\n let setLocation = function (position) {\r\n $('#search-overlay-location-input').val('My Location');\r\n $('#search-overlay-location-input-geo').val(position.coords.latitude + ';' + position.coords.longitude)\r\n }\r\n \r\n if(navigator.geolocation) {\r\n navigator.geolocation.getCurrentPosition(setLocation);\r\n }\r\n });\r\n \r\n $('#clear-search').on('click', function () {\r\n $('#search-overlay-text-input').val(\"\");\r\n }); \r\n }\r\n \r\n search() {\r\n let query = $('#search-overlay-text-input').val();\r\n let origin = $('#search-overlay-location-input-geo').val();\r\n \r\n if(query.length > 0) {\r\n window.location.href = '/search/?query=' + encodeURIComponent(query);\r\n } \r\n }\r\n \r\n locationLookupSetup() {\r\n const lookup = document.querySelector('.location-lookup-input');\r\n const options = {\r\n fields: [\"formatted_address\", \"geometry\", \"name\"],\r\n strictBounds: false,\r\n componentRestrictions: { 'country': 'gb' },\r\n types: ['geocode']\r\n };\r\n\r\n const autocomplete = new google.maps.places.Autocomplete(lookup, options);\r\n\r\n autocomplete.addListener(\"place_changed\", function () {\r\n let place = autocomplete.getPlace();\r\n let latlong = place.geometry.location;\r\n $('#' + lookup.id + '-geo').val(latlong.lat() + ';' + latlong.lng());\r\n });\r\n }\r\n \r\n clearAndHideSuggestions() {\r\n $('#search-overlay-suggestion-list').html('');\r\n $('.search-overlay-suggestions-container').hide();\r\n }\r\n}","export class LocationApiLoader {\r\n constructor(callbacks) { \r\n $.ajax({\r\n dataType: \"script\",\r\n cache: true,\r\n url: 'https://maps.googleapis.com/maps/api/js?key=AIzaSyALpZboQbieD8FePSqE0JK2LdTvHlnAZy4&libraries=places&callback=Function.prototype',\r\n success: function () {\r\n for (const callback of callbacks) {\r\n callback();\r\n }\r\n }\r\n });\r\n }\r\n}","export class PromoCarousel {\r\n\r\n constructor() {\r\n console.log('loaded');\r\n if ($(\".component-promo-carousel\").length > 0) {\r\n this.properties();\r\n this.init();\r\n }\r\n }\r\n\r\n properties() {\r\n this.mobileSize = 768;\r\n this.isMobile = window.innerWidth < this.mobileSize;\r\n this.sliderSelector = \".component-promo-carousel\";\r\n this.slidesToShow = 1.2;\r\n this.slidesToScroll = 1;\r\n this.initialSlide = 0;\r\n }\r\n\r\n init() {\r\n this.registerResizeHandler();\r\n this.loadSlick();\r\n }\r\n\r\n registerResizeHandler() {\r\n window.onresize = this.onResize.bind(this);\r\n }\r\n\r\n onResize() {\r\n $(this.sliderSelector)[0].slick.refresh();\r\n }\r\n\r\n loadSlick() {\r\n\r\n $(this.sliderSelector).slick({\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 1,\r\n slidesToScroll: 1,\r\n centerMode: false,\r\n initialSlide: 0,\r\n arrows: true,\r\n mobileFirst: true,\r\n responsive: [\r\n {\r\n breakpoint: 1100,\r\n settings: {\r\n dots: true,\r\n infinite: true,\r\n slidesToShow: 1,\r\n slidesToScroll: 1,\r\n centerMode: true,\r\n initialSlide: 0,\r\n arrows: true\r\n }\r\n }\r\n ]\r\n });\r\n\r\n }\r\n\r\n\r\n\r\n}","export class SimpleArticlesListModule {\r\n\r\n\tconstructor() {\r\n\t\tif ($(\".component-simple-article\").length > 0) {\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t}\r\n\r\n\tinit() {\r\n\r\n\t\t$(\".js-article-simple-show-more-button\").on(\"click\", function (e) {\r\n\t\t\tvar that = this;\r\n\r\n\t\t\tconsole.log(that);\r\n\r\n\t\t\t$(\".js-article-listing-full-width-simple\").find(\".article-item-hide\").nextAll().addBack().slice(0, 3).removeClass(\"article-item-hide\");\r\n\r\n\t\t\tlet remainingHidden = $(that).find(\".article-item-hide\").length;\r\n\r\n\t\t\tif (remainingHidden == 0) {\r\n\t\t\t\t$(that).hide();\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n}","export class TabbedCardListModule {\r\n\r\n constructor() {\r\n\r\n if ($(\".tabbed-card-list\").length > 0) {\r\n this.init();\r\n }\r\n }\r\n\r\n setupClicks() {\r\n $(\".tabbed-card-list .dash-tabs>li>a\").on(\"click\", function (e) {\r\n e.preventDefault();\r\n\r\n if ($(this).parent().hasClass(\"active-tab\")) {\r\n console.log(\"Aborting call\");\r\n return;\r\n }\r\n\r\n $(\".tabbed-card-list .tabs-panel .dash-tabs li.active-tab a\").removeClass(\"button--teal-rounded\");\r\n $(\".tabbed-card-list .tabs-panel .dash-tabs li.active-tab a\").addClass(\"button--grey-rounded\");\r\n $(\".tabbed-card-list .tabs-panel .dash-tabs li.active-tab\").removeClass('active-tab');\r\n\r\n $(this).removeClass(\"button--grey-rounded\");\r\n $(this).addClass(\"button--teal-rounded\");\r\n $(this).parent().addClass(\"active-tab\");\r\n\r\n let panelToShow = $(this).attr(\"rel\");\r\n\r\n $(\".tab-panel.active-tab-panel\").removeClass(\"active-tab-panel\");\r\n let panelToShowId = \"#\" + panelToShow;\r\n\r\n $(panelToShowId).addClass(\"active-tab-panel\");\r\n });\r\n\r\n \r\n\r\n }\r\n\r\n init() {\r\n this.setupClicks();\r\n }\r\n\r\n process() {\r\n return undefined;\r\n }\r\n\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import { SlickTrackingModule } from \"../helpers/SlickTrackingHelper\";\r\n\r\nexport class SlickTrackingLoader {\r\n constructor() {\r\n this.init();\r\n }\r\n init() {\r\n const slickTracking = new SlickTrackingModule(); \r\n }\r\n} ","import { TrackingModule } from \"../helpers/TrackingHelper\";\r\n\r\nexport class SlickTrackingModule {\r\n constructor() {\r\n this.init();\r\n }\r\n slickItems() {\t\t\r\n var _this = this;\r\n \r\n //Carousel dots\r\n $('.slick-dots li').on('click', 'button', function () {\r\n //const trackingModule = new TrackingModule()\r\n //var name = $(this).text();\r\n //trackingModule.gaTrackEvent(\"Carousel\", \"Click\", \"Current URL: \" + window.location.href + \", Name: dot \" + name, undefined, false);\r\n });\t\r\n }\r\n \r\n init() {\r\n this.slickItems();\r\n }\r\n}\r\n\r\n"],"sourceRoot":""}