{"version":3,"sources":["site/gallery/config.js","lib/polyfill-ie/index.js","components/notFound/notFound.js","env.js","lib/app-version/index.js","components/form/buttons/button.js","lib/ui-error/errorMessage.js","lib/ui-error/errorPopup.js","lib/icons-svg/icons/NarrowRight.js","cssInJs/variables.js","config.js","lib/icons-svg/icons/Loading--circle.js","lib/ui-loading-v2/sectionLoading.js","lib/utils-core/url.js","lib/utils-core/form.js","lib/utils-core/array.js","lib/utils-core/date.js","lib/utils-core/css.js","lib/utils-core/ui.js","lib/utils-core/money.js","lib/utils-core/text.js","lib/utils-core/random.js","lib/utils-core/object.js","lib/utils-core/media.js","lib/utils-core/index.js","lib/css-emotion/breakpoints.js","lib/css-emotion/mixin.js","site/siteUtils.js","utils/index.js","lib/net-api/index.js","lib/dev-mediaQueryStatus/index.js","lib/seo/meta-tag.js","lib/seo/tracking--deprecated.js","lib/animation/animationUtils.js","lib/net-loader/loadJs.js","lib/ui-parallax/index.js","lib/router/useRouter.js","lib/store/reducers.js","lib/store/storeProvider.js","lib/router/useHistoryStore.js","lib/router/handleLink.js","lib/router/siteLink.js","lib/instagram-feed/feedStyle.js","lib/instagram-feed/feed.js","lib/utils-core/debounce.js","lib/youtube/iframeApi.js","lib/youtube/youtubeEmbedPopup.js","site/_cmsItems/cmsUtils.js","site/_cmsItems/code-instagram/render.js","site/_offline/index.js","lib/form/formModelHelper.js","lib/form/formBuilder.js","lib/form/validatorHelper.js","lib/form/validators/required.js","lib/form/validators/email.js","lib/form/validators/date.js","lib/form/validators/length.js","lib/form/validators.js","lib/form/formRenderHelper.js","lib/form/components/ValidationAlert.js","lib/form/controls/TextInput.js","lib/form/controls/RadioListInput.js","lib/form/controls/CheckboxListInput.js","lib/form/controls/DateSeparateInput.js","lib/form/controls/FileInput.js","lib/form/controls/index.js","lib/form/controls/TextareaInput.js","lib/form/controls/CheckboxInput.js","lib/form/controls/SelectInput.js","lib/form/controls/HiddenInput.js","lib/form/controlRenderer.js","lib/form/formValidate.js","lib/form/useForm.js","lib/tracking/gtm.js","site/button/buttonStyle.js","site/button/formButton.js","site/_cmsItems/code-subscribe/subscribe.js","site/_cmsItems/code-subscribe/subscribeFormModel.js","site/_cmsItems/code-subscribe/render.js","site/_cmsItems/html/view/renderHtml.js","site/_cmsItems/html/view/html.js","site/_cmsItems/html/render.js","site/bannerSize/bannerSize.js","site/_cmsItems/imagePanel/view/imagePanelStyle.js","site/useParallax/useParallax.js","site/_cmsItems/imagePanel/view/imagePanel.js","site/_cmsItems/imagePanel/render.js","site/_cmsItems/multiColumnPanel2/view/multiColumnPanel2Style.js","site/_cmsItems/multiColumnPanel2/view/renderHtml.js","cms/items/videoPanelNew/VideoPanelStyle.js","cms/items/videoPanelNew/view.js","site/_cmsItems/multiColumnPanel2/view/multiColumnPanel2.js","site/_cmsItems/multiColumnPanel2/view/iframeApi.js","site/_cmsItems/multiColumnPanel2/render.js","site/tileList/tileList.js","site/tileList/tileListStyle.js","site/_cmsItems/pageTiles/view/pageTile/pageTile.js","site/_cmsItems/pageTiles/view/pageTile/pageTileStyle.js","site/_cmsItems/pageTiles/view/pageTiles.js","site/_cmsItems/pageTiles/render.js","site/_cmsItems/panel/view/panel.js","site/_cmsItems/panel/render.js","site/gallery/galleryTiles.js","site/gallery/galleryStyle.js","site/portal/portal.js","site/gallery/gallery.js","site/_cmsItems/photoGallery/view/photoGallery.js","site/_cmsItems/photoGallery/render.js","site/shareButtons/shareButtons.js","site/shareButtons/shareButtonStyle.js","site/_cmsItems/sharingIcons/view/sharingIcons.js","cms/items/youtubeNew/view.js","site/_cmsItems/videoPanel/view/videoPanel.js","site/_cmsItems/videoPanel/render.js","site/_cmsItems/items-generated.js","site/_cmsItems/sharingIcons/render.js","cms/utils/cmsUtils.js","cms/items/bannerPanel/view.js","cms/items/bannerItem/view.js","cms/items/panel/view.js","cms/items/html/view.js","cms/items/imagePanel/view.js","cms/items/pageTiles/view.js","components/tiles/bsyc/style.js","components/tiles/bsyc/view.js","cms/items/singleBanner/view.js","cms/items/contactForm/contactForm.js","cms/items/contactForm/contactFormModel.js","cms/items/contactForm/view.js","cms/items/VideoPanel/view.js","site/searchResult/searchResult.js","components/TextWithJavaScript/view.js","components/jotformIframe/view.js","components/jotformLightbox/style.js","components/jotformLightbox/view.js","cms/items/code/view.js","cms/items/blogPosts/view.js","cms/items/blogPostTitle/view.js","cms/items/videoHolder/view.js","cms/items/videoItem/view.js","cms/items/multiColumnPanel/view.js","cms/items/expandableHtml/view.js","components/photoGallery/style.js","components/photoGallery/view.js","components/testimonial/testimonialPanel/style.js","components/testimonial/testimonialItem/style.js","components/testimonial/testimonialItem/view.js","components/testimonial/testimonialPanel/view.js","components/expandablePanel/style.js","components/expandablePanel/view.js","components/SliderAward/SliderAwardPanel/style.js","components/SliderAward/SliderAwardPanel/view.js","cms/items/accordionPanel/view.js","components/PhotoSlide/PhotoSlide/style.js","components/PhotoSlide/PhotoSlide/view.js","cms/items/clubsTilesItem/view.js","cms/items/clubsTilesPanel/view.js","cms/items/googleDoc/view.js","cms/items/accordionParentPanel/view.js","cms/items/youTubeWithPlaylist/view.js","cms/items/item.js","cms/pages/viewPage/viewPage.js","lib/instagram-useInstagram/index.js","cms/services/cms-radio-sender.js","cms/services/cms-radio-receiver.js","cms/services/cms-html-editor.js","cms/services/cms-page-controller.js","cms/pages/editPage/editPage.js","layout/topHeader/navBar.js","layout/backButton/backButtonStyle.js","layout/backButton/backButton.js","layout/hamburger/hamburgerStyle.js","layout/hamburger/hamburger.js","layout/topHeader/topHeaderStyle.js","layout/topHeader/searchBar2.js","layout/topHeader/navBarHori.js","layout/topHeader/topHeader2.js","layout/bottomDock/bottomDock.js","layout/popup/commonVideoPopup.js","AppRouteChanged.js","App.js","serviceWorker.js","index.js","site/tileList/config.js"],"names":["exports","settings","breakpointNames","numOfTilesPerBreakpoints","marginLR","marginTB","Element","prototype","matches","msMatchesSelector","webkitMatchesSelector","closest","s","el","this","parentElement","parentNode","nodeType","NotFound","props","debugInfo","className","href","onClick","e","preventDefault","window","location","reload","refreshPage","history","back","goBack","style","marginTop","color","fontSize","pageUrl","loadFrom","config","isProd","process","locale","REACT_APP_COUNTRY_LOCALE","hostname","toLowerCase","indexOf","search","getCountry","siteName","titleSuffix","siteCode","apiBase","resourceBase","baseOrigin","origin","GATSBY_BASEURL","getBaseUrl","cmsEndpoint","ver","updateDate","stripeKey","reCaptchaSiteKey","console","log","getDevCartId","localStorage","getItem","setDevCartId","cartId","setItem","AppVersion","React","useState","checkStatus","setCheckStatus","env","useEffect","updateSW","then","timer","setTimeout","clearTimeout","button","type","AppVersionPage","margin","width","Button","status","children","btnStyle","buttonStyle","disabled","role","aria-hidden","ErrorMessage","errors","summaryMessage","length","message","Array","isArray","map","error","index","key","ErrorPopup","title","messages","push","css","position","padding","maxWidth","maxHeight","background","top","left","transform","zIndex","inx","dangerouslySetInnerHTML","__html","SvgNarrowRight","colors","colorBlue","variables","familyBase","familyHeader","primaryColor","fontColor","bgColor","breakpoints","cssEmotion","iconColors","siteConfig","primary","secondary","SvgLoading","height","viewBox","preserveAspectRatio","cx","cy","r","fill","stroke","strokeWidth","attributeName","repeatCount","dur","values","keyTimes","keySplines","calcMode","begin","Loading","undefined","loaded","setLoaded","loading","minHeight","display","justifyContent","alignItems","opacity","transition","isExternalLink","link","getLinkFromElement","linkEl","getAttribute","getLinkInfo","currentPath","pathname","linkFiltered","replace","linkLower","isExternal","isHash","isTel","isMailTo","url","path","i","exts","isStaticFile","ext","getExtension","filename","split","pop","getFilename","getFolderPath","parentDepth","slice","join","toQueryString","params","Object","keys","encodeURIComponent","getYoutubeId","getSlug","text","getWebUrl","schema","getErrors","result","forEach","err","errorMessage","getErrorMessage","convertToObject","array","reduce","obj","item","convertToKeyValues","value","moveItem","list","fromIndex","toIndex","splice","removed","removeItem","insertItem","find","fn","findIndex","contains","distinct","comparer","filtered","x","sum","total","equal","list1","list2","found","j","caseInsensitiveCompare","a","b","localeCompare","compareIgnoreEmpty","asc","isNaN","addDays","date","days","Date","setDate","getDate","formatDate","dateObj","formatStr","toDate","format","formatYYYYMMDDToday","dd","mm","getMonth","yyyy","getFullYear","formatYYYYMMDD","formatDDMMYYYY","parseDate","parseISO","toDateTime","dateStr","parse","isValidDate","d","bgUrl","imageUrl","encodeURI","decodeURI","bgUrlStyle","screenWidth","innerWidth","document","documentElement","clientWidth","body","screenHeight","innerHeight","clientHeight","outerWidth","offsetWidth","outerHeight","offsetHeight","hasClass","classList","match","RegExp","addClass","add","removeClass","remove","reg","toggleClass","scrollTo","selector","duration","delay","findElement","offset","elementOffset","gsap","to","ease","querySelectorOrNull","querySelector","rect","getBoundingClientRect","scrollLeft","pageXOffset","scrollTop","pageYOffset","isElementInViewport","bottom","right","getCurrentBreakpoint","bpHolder","getComputedStyle","getPropertyValue","formatMoney","number","fraction","formatter","Intl","NumberFormat","currency","minimumFractionDigits","toMonthlyCost","amount","frequency","isBlank","str","test","isEmpty","isNumeric","num","capitalize","expression","charAt","toUpperCase","toFieldName","trim","toHtml","truncateWords","maxLen","separator","ellipsis","pos","lastIndexOf","substr","numberWithCommas","parts","toString","registerPlugin","ScrollToPlugin","formatNumber","Math","round","toTelephoneNumber","like","shortId","shortid","guid","uuid","toCamel","o","newO","origKey","newKey","hasOwnProperty","constructor","getImageSetPath","setId","info","getPathDetails","baseFolder","setIds","lastFolder","classNames","form","ui","money","random","object","media","mq","facepaint","bp","mqMin","mqMax","mediaQuery","matchMedia","isMin","isMax","overlay","content","isMobile","md","resourcePath","utils","fullUrl","isNZ","coreUtils","site","useApi","response","setResponse","setErrors","setStatus","request","setRequest","options","apiNetJwt","fetch","res","ok","json","statusText","JSON","fetchData","hasErrors","containsErrorMessage","msg","finding","some","addErrors","errs","done","send","sendRaw","httpOptionFn","args","setResult","reset","usePost","formDataFn","data","method","post","headers","stringify","sending","sendFormData","useGet","get","MediaQueryStatus","MetaTag","seoData","assign","description","name","keywords","language","country","faceBookDomainVerifi","heroImageUrl","rel","canonical","alternates","hreflang","MAX","MIN","getScrollProgress","scroll","scrollY","progress","boundsTop","viewport","bounds","setClass","pr","range","prVal","min","max","y","removeTransform","getScreenSize","defaultHolder","storeName","loadJs","promises","scripts","script","loadScript","Promise","all","holder_","forceToReload","holder","resolve","reject","networkLoaded","existing","createElement","src","onload","onerror","getElementsByTagName","appendChild","defaultSettings","cutoffPadding","speed","ParallaxData","screenSize","panels","imageRatio","panelHeight","elements","timeoutId","useParallax","handleScroll","element","au","calculated","fromTop","toTop","backgroundPositionY","init","useLayoutEffect","addEventListener","removeEventListener","cnt","panel","querySelectorAll","autoPanelHeight","parseFloat","shadowHeight","shadowWidth","baseHeight","backgroundSize","useRouter","useParams","useLocation","useHistory","useRouteMatch","useMemo","navigate","Redirect","hash","query","queryString","initialState","page","menu","popup","reducer","state","action","payload","Error","StoreContext","createContext","StoreProvider","useReducer","dispatch","Provider","useStore","useContext","useHistoryStore","loc","setHistory","last","handleElementLink","externalHandler","linkInfo","handled","SiteLink","target","other","goToLink","stopPropagation","tiles","marginLeft","marginRight","flexWrap","tile","flexBasis","cursor","tileImage","mixin","backgroundColor","tileIcon","InstagramFeed","Feeds","posts","numOfPost","xs","sm","lg","xl","xxl","displayingPosts","Feed","alt","debounce","ms","_","apply","arguments","loadApi","onApiReady","YT","tag","id","onYouTubeIframeAPIReady","firstScriptTag","insertBefore","thumbnailMax","videoId","getYoutubeCode","YoutubeEmbedPopup","posterUrl","yt","posterImageUrl","popupIndex","setPopupIndex","backgroundImage","sources","defaultVal","payloads","hasItemInPageData","pageData","matchFn","sections","hasItemInItems","items","getCodeJson","code","hasItemInPageDataByItemTypeCode","itemTypeCode","renderRule","cmsOption","cmsUtils","itemElt","navigator","onLine","findControl","controlNameOrIndex","root","controls","findControlTraverse","controlName","control","getValue","getValueTraverse","helperFns","getFilesTraverse","getKeyValueTraverse","keyValue","controlType","customValueFn","files","abstractControl","controlObject","validators","controlOptions","touched","incomplete","findValidator","controlArray","ctrl","disableValidators","formModelHelper","parent","hasRequiredValidator","getNameForValidator","label","createValidator","opt","validate","defaultOpt","continueToValidate","getValidatorOptions","val","isValidEmail","mail","isDate","isPast","now","getTime","isValidLength","validator","Required","validateOpt","triggeredByChange","Email","PastDate","PastDateNullAllowed","Length","validateControl","getLabel","formOption","requiredMark","getLabelAsString","ValidationAlert","TextInput","handleChange","helpText","attrs","forceUsePlaceholder","fieldId","usePlaceholder","fieldLabel","placeHolder","valueStr","prependText","htmlFor","onChange","onKeyDown","onBlur","autoComplete","placeholder","checked","optionValue","includes","DateSeparateInput","thisYear","year","setYear","month","setMonth","day","setDay","handleChangeInner","persist","months","selectStyle","fromYear","recentYear","handleChangeDay","handleChangeMonth","m","handleChangeYear","FileInput","Components","RadioListInput","helpLabelText","option","inline","TextareaInput","textAreaRef","useRef","textAreaHeight","setTextAreaHeight","parentHeight","setParentHeight","disableAutoHeight","current","h","scrollHeight","rows","ref","CheckboxInput","linkText","CheckboxListInput","SelectInput","mainCategory","filter","selected","defaultValue","HiddenInput","renderControlDirect","Component","getControl","renderControl","formRoot","nameOrIndex","validateTraverse","errorsFromControl","errorsFromSub","useForm","initialFormModel","formModel","setFormModel","template","onControlChanged","controlFromEvent","getControlValue","onBeforeUpdateValue","validateGroup","successHandler","errorHandler","formValidate","model","controlRenderer","validateForm","getFiles","hasGTM","dataLayer","pageView","pageTitle","pageOpt","event","sendEvent","eventName","sendGAEvent","category","buttonColor","baseStyle","overflow","appearance","darken","textDecoration","buttonBg","borderRadius","buttonTxt","smallStyle","fontWeight","letterSpacing","FormButton","overridingStyle","ss","Subscribe","fb","email","sendingStatus","setSendingStatus","gtm","contactEmail","render","textAlign","node","attribs","attributesToProps","replaceImg","class","domToReact","replaceButton","_embedDataList","codeType","renderHtml","_cmsOption","replaceEmbedCode","html","isCmsEdit","cmsViewMode","embedDataList","Html","htmlBlock","URL","isPDF","endsWith","hasButtonClass","cssClass","anchorName","data-cms-html","data-cms-item-id","itemId","processed","aLink","_href","targetId","targetElt","wrapper","nextElt","nextElementSibling","insertAdjacentElement","setAttribute","handleClick","mqBanner","bannerThin","bannerStandard","getImageBannerStyle","heightSet","setName","bannerSize","bannerHeight","backgroundPositionX","photoCredit","transformOrigin","panelRef","_settings","paddingHeightRatio","stretchToFit","actionRange","cutTop","cutBottom","getSettings","onScroll","bgHeight","bgWidth","cutTopPx","cutBottomPx","onResize","ImagePanel","photoCreditUrl","hideTop","hideBottom","pageOptions","imagePath","cssClass2","parallaxSetting","container","paddingLeft","paddingRight","alignSelf","order","aspectRatio","html__wrapper","flexDirection","html__container","html__item","videoContainer","videolink","playIcon","backImgContainer","VideoPanelNew","openVideo","posterFrameUrl","MultiColumnPanel","bgTheme","backgroundTile","leftPanel","leftPanelBanner","leftTextVertical","leftTextHorizontal","leftTextBgColor","leftTextWidth","leftYoutube","leftPosterFrameUrl","rightPanel","rightPanelBanner","rightTextVertical","rightTextHorizontal","rightTextBgColor","rightTextWidth","rightYoutube","rightPosterFrameUrl","linkUrl","content2","idFirstUse","GetItem","itemName","bannerItems","checkOtherPanel","textVertical","textHorizontal","textBgColor","textWidth","youtubeCode","video","videoLinkOrId","playerId","toggler","setToggler","popupImages","enablejsapi","autoplay","loop","showinfo","modestbranding","allowfullscreen","wmode","allow","frameBorder","_imgs","_aLink","download","click","removeChild","downloadPdf","data-cms-item-id2","sourceIndex","dots","infinite","autoplaySpeed","fade","slidesToShow","slidesToScroll","ImgItem","TileList","useSlider","slickSettings","tilesSlider","getTileListStyle","marginBottom","PageTile","tileLink","disableLink","desc","tileDesc","paddingTop","paddingBottom","flexGrow","flexShrink","rgba","tileSlider","tileBg","backgroundPosition","backgroundRepeat","tileContent","lineHeight","textTransform","WebkitLineClamp","WebkitBoxOrient","getTileStyle","PageTiles","pagesSerialized","getPages","Panel","subItems","subItemsElts","subItem","Item","GalleryTiles","images","openPopupImage","img","ImageTile","image","getImageTileStyle","thumbnailUrl","Portal","mount","getElementById","createPortal","set","Gallery","galleryImages","caption","Fragment","marginInline","PhotoGallery","ShareButtons","shareUrl","topLabel","shareButtons","shareButtonTitle","shareButton","FacebookShareButton","FacebookIcon","size","WhatsappShareButton","WhatsappIcon","EmailShareButton","subject","EmailIcon","SharingIcons","YoutubeNew","youtubeBannerRef","playerStatus","setPlayerStatus","playerSize","setPlayerSize","ytPlayer","setYtPlayer","muted","setMuted","countPlayedRef","mobileImageUrl","canPlayVideo","loadVideo","sizeCalculator","containerSize","w","getSize","player","Player","events","onStateChange","PlayerState","ENDED","countPlayed","playVideo","onReady","mute","onError","resized","canPlay","pauseVideo","unMute","VideoPanel","videoCode","code_instagram","code_subscribe","imagePanel","multiColumnPanel2","pageTiles","photoGallery","BannerPanel","slides","BannerItem","alignV","captionTitle","captionButton","titlePanel","linkOverlay","block","embed","ReactDOM","replaceEmbedCodes","buttons","restructureButton","span","innerHTML","data-pxh","pageTileElts","Tile","responsive","breakpoint","data-aos","data-aos-delay","pageTile__tile","flex","tile__content","tile__flip__wrapper","tile__bg","tile__bg2","tile__details","PageTilesBsyc","idx","colorTheme","SingleBanner","Contact","emailReceiver","fileAttachment","mailchimpApiKey","mailchimpAudienceKey","phone","enquiry","attachments","mailChimpError","setMailChimpError","mailChimpErrorMemo","results","MailChimpError","grecaptcha","ready","execute","token","grecaptchaToken","formData","FormData","append","file","uploadFile","ContactForm","SearchResult","keyword","q","pages","PageList","searchHighlight","TextWithJavScript","javaScriptCode","substring","nonjavaScriptCode","javaScriptTopCode","javaScriptInsideCode","_src","async","defer","_functionName","functionName","JotformIframe","existingScript","jotform__lightbox__container","JotformLightbox","codes","javsScriptCodes","GetJotformLightbox","setIndex","Code","codeJson","border","BlogPosts","numOfTileLines","parseInt","tilesPerLine","step","tilesToShow","setTilesToShow","showMore","postDate","categoryName","categoryName1","BlogPostTitle","VideoHolder","VideoItem","captionTitleYoutube","shortDesc","reverse","columnWidths","mobileColumnWidths","countItem","countD","countM","col","panelWidth","ExpandableHtml","open","setOpen","buttonTitle","icon","iconOpen","iconClosed","panelCollapsed","panelOpen","thumbnails","thumbnail","bg","_images","_thumbImages","_texts","_text","testimonialPanel","testimonialItem","testimonialItem_title","testimonialItem_desc","testimonialItem_bottom","TestimonialItem","startRatingColor","ratingValue","rating","TestimonialPanel","testimonialItems","exTextItem","ExpandablePanel","data-anchor-status","data-cms-item-anchor","data-cms-anchor","sliderAwardPanel","sliderImageWrapper","sliderImageWrapper2","sliderImage","SliderAwardPanel","sliderAwardItems","bottomText","numOfSlides","maxNum","AccordionPanel","setSelected","borderStyle","borderTop","borderBottom","toggle","xmlns","points","replaceAll","photoSlide","PhotoSlide","original","setImageUrl","disableBackgroundClose","slideInterval","showFullscreenButton","ClubsTilesItem","teamName","addressLine1","suburb","postcode","websiteAddress","heroImg","homeUniformImg","guestUniformImg","googleMapLink","currentImg","setCurrentImg","onMouseEnter","onMouseLeave","ClubsTilesPanel","sectionRefs","sortedTeams","sort","teamA","teamB","acc","team","firstLetter","group","letter","scrollIntoView","behavior","handleScrollTo","GoogleDoc","googleDocID","jsonData","setJsonData","searchInput","setSearchInput","sortColumn","setSortColumn","sortOrder","setSortOrder","inputRef","Papa","header","skipEmptyLines","complete","fetchGoogleSheet","filteredData","row","focus","firstRow","column","newOrder","sortedData","valA","valB","handleSort","AccordionParentPanel","firstAccordionTopic","selectedAnchor","setSelectedAnchor","accordionTopic","YouTubeWithPlaylist","videoList","setVideoList","currentVideoId","setCurrentVideoId","startIndex","setStartIndex","playlistId","API_URL","allVideos","nextPageToken","axios","videos","snippet","resourceId","medium","fetchAllVideos","catch","opts","playerVars","prev","_tileType","PageMemo","memo","sectionItems","section","Section","sectionName","getMetaTag","pageTypeCode","prevProps","nextProps","ViewPage","pageLoaded","setPageLoaded","setData","embedStatus","setEmbedStatus","loadEmbedJs","instgrm","Embeds","useInstagram","redirectTo","CmsRadioSender","controller","cloned","postMessage","htmlChanges","sendMessageToParent","returnTo","CmsRadioReceiver","self","selectItem","mediaSelectedCKEditor","getAllDirtyHtml","sender","returnAllDirtyHtml","getHtml","returnHtml","tools","callFunction","funcNum","selectedPath","selectItemFromController","CmsHtmlEditor","ckeditorConfig","startupFocus","filebrowserBrowseUrl","filebrowserImageBrowseUrl","extraPlugins","toolbar","groups","extraAllowedContent","ckeditorStylesSet","attributes","$editor","CKEDITOR","disableAutoInline","editor","stylesSet","on","evt","ed","markDirtyHtml","instances","cmsCurrentEditor","getData","destroy","CmsPageController","viewOnly","receiver","htmlEditor","$","initGlobalVars","prop","off","attr","is","change","_value","ctrlKey","which","saveAllDirtyHtml","$item","fromController","doubleclicked","cke_top","closeEditingItem","findItem","removeAttr","depth","showHtmlEditor","each","selectControllerItem","openEdit","editableParent","parents","first","close","dataCmsItemId2","show","extend","htmleditor","getAnchors","anchors","htmlbody","floor","animate","$section","getCurrentHtml","ItemId","SectionId","Content","SectionId2","Content2","itemid","formvals","cms_replace_item_html","EditPage","publishVer","editVer","pageId","cmsPageController","NavBar","currentLocation","menuItemElts","MenuItem","onCloseMenu","subMenuOpened","setSubMenuOpened","SubMenuItem","toggleSubmenu","BackButton","rs","barW","barH","space","line","transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction","outline","font","buttonScrolled","hamburger","line1","line2","line3","lineActive1","lineActive2","lineActive3","Hamburger","opened","toggleMenu","scrolled","aria-label","logo","logoImg","logoScrolled","day__night__button__bar","search__button","svg","top__navi__con__wrap","top__navi__con","visibility","top__navi__item","mast__head__svg__warpp","mast__head__svg__warpp__scroll","mast__head__svg__con","mast__head__svg__con__scroll","top_sa_logo","top__logo__img","home__toggle__contents__conv","home__toggle__contents__conv__scoll","home__toggle__contents__con","home__toggle__contents__item","gap","popup__container","popup__container__item","top__autocomplete","overflowY","SearchBar","setSearchOpened","setKeyword","onSubmit","NavBarHori","searchOpened","level","childItem","childElts","TopHeader","menuOpened","setMenuOpened","setScrolled","useScrollPosition","prevPos","currPos","topScrolled","isDarkMode","top__logo__img__scroll","BottomDock","isCurrent","linkElts","iconHover","CommonVideoPopup","setSources","onOpen","AppRouteChanged","parallax","dataArr","getPositionData","ts","shift","setCurrentPositionInArray","setPositionData","saveScrollPosition","foundIndex","findIndexReverse","getPreviousPostitionInArray","getPreviousPostition","anchor","dataStr","AppLayout","AOS","App","isLocalhost","Boolean","serviceUpdateCheckerInterval","registerValidSW","swUrl","serviceWorker","register","updateViaCache","registration","scope","waiting","clearInterval","setInterval","update","preventDevToolsReloadLoop","getRegistration","active","oldSw","ev","newSw","onupdatefound","installing","installingWorker","onstatechange","onUpdate","onSuccess","contentType","unregister","checkValidServiceWorker"],"mappings":"yGASAA,EAAQC,SATS,CAGfC,gBAA0B,CAAC,KAAM,KAAO,KAAO,KAAO,KAAO,OAC7DC,yBAA0B,CAAC,EAAO,EAAO,EAAO,EAAO,EAAO,GAC9DC,SAA0B,CAAC,GAAO,GAAO,GAAO,GAAO,GAAO,IAC9DC,SAA0B,CAAC,GAAO,GAAO,GAAO,GAAO,GAAO,M,wDCJ3DC,QAAQC,UAAUC,UACrBF,QAAQC,UAAUC,QAAUF,QAAQC,UAAUE,mBAClBH,QAAQC,UAAUG,uBAG3CJ,QAAQC,UAAUI,UACrBL,QAAQC,UAAUI,QAAU,SAASC,GACnC,IAAIC,EAAKC,KAET,EAAG,CACD,GAAID,EAAGL,QAAQI,GAAI,OAAOC,EAC1BA,EAAKA,EAAGE,eAAiBF,EAAGG,iBACd,OAAPH,GAA+B,IAAhBA,EAAGI,UAC3B,OAAO,Q,qrICbJ,SAASC,EAASC,GACvB,IAAMC,EAAYD,EAAMC,UAgBxB,OACE,yBAAKC,UAAU,eACb,yBAAKA,UAAU,aACb,yCAEA,qCAAU,uBAAGC,KAAK,IAAIC,QAAS,SAACC,GAAD,OAnBrC,SAAqBA,GACnBA,EAAEC,iBACE,qBAAOC,QACTA,OAAOC,SAASC,SAgBwBC,CAAYL,KAAxC,WAAV,kBACA,6BACE,4BAAQD,QAAS,SAACC,GAAD,OAdzB,SAAgBA,GACdA,EAAEC,iBACE,qBAAOC,QACTA,OAAOI,QAAQC,OAWaC,CAAOR,KAA/B,eAIAJ,GACA,yBAAKa,MAAO,CAAEC,UAAW,OAAQC,MAA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BAAtB3a,EAAKua,aACH,kBAACme,GAAD,CAAc14B,KAAMA,EAAMya,UAAWA,IACjB,gBAAtBza,EAAKua,aACH,kBAAC2f,GAAD,CAAal6B,KAAMA,EAAMya,UAAWA,IAChB,eAAtBza,EAAKua,aACH,kBAAC,GAAD,CAAYva,KAAMA,EAAMya,UAAWA,IACf,SAAtBza,EAAKua,aACH,kBAACqhB,GAAD,CAAM57B,KAAMA,EAAMya,UAAWA,IACT,eAAtBza,EAAKua,aACH,kBAACwhB,GAAD,CAAW/7B,KAAMA,EAAMya,UAAWA,IACd,mBAAtBza,EAAKua,aACH,kBAACmiB,GAAD,CAAe18B,KAAMA,EAAMya,UAAWA,IAClB,qBAAtBza,EAAKua,aACH,kBAAC,GAAD,CAAkBva,KAAMA,EAAMya,UAAWA,IACrB,mBAAtBza,EAAKua,aACH,kBAACgjB,GAAD,CAAgBv9B,KAAMA,EAAMya,UAAWA,IACnB,gBAAtBza,EAAKua,aACH,kBAACoiB,GAAD,CAAa38B,KAAMA,EAAMya,UAAWA,IAChB,cAAtBza,EAAKua,aACH,kBAACqiB,GAAD,CAAW58B,KAAMA,EAAMya,UAAWA,IACd,iBAAtBza,EAAKua,aACH,kBAAC,GAAD,CAAcva,KAAMA,EAAMya,UAAWA,IACjB,oBAAtBza,EAAKua,aACH,kBAAC4kB,GAAD,CAAiBn/B,KAAMA,EAAMya,UAAWA,IACpB,qBAAtBza,EAAKua,aACH,kBAAColB,GAAD,CAAkB3/B,KAAMA,EAAMya,UAAWA,IACrB,mBAAtBza,EAAKua,aACJ,kBAACylB,GAAD,CAAgBhgC,KAAMA,EAAMya,UAAWA,IAClB,eAAtBza,EAAKua,aACJ,kBAACmmB,GAAD,CAAY1gC,KAAMA,EAAMya,UAAWA,IACd,oBAAtBza,EAAKua,aACJ,kBAACunB,GAAD,CAAiB9hC,KAAMA,EAAMya,UAAWA,IACnB,cAAtBza,EAAKua,aACJ,kBAACqoB,GAAD,CAAW5iC,KAAMA,EAAMya,UAAW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IAGpB,CACEmI,WAAY,IACZtlC,SAAU,CACRk9B,aAAc,EACdC,eAAgB,S","file":"static/js/main.7e1c4ecb.chunk.js","sourcesContent":["const settings = {\n // xs, sm, md, lg, xl, xxl <-- only sample, check your breakpoints settings.\n // < 576 768 992 1200 1600\n breakpointNames: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'],\n numOfTilesPerBreakpoints: [2, 2, 2, 3, 4, 6],\n marginLR: [14, 20, 20, 20, 20, 20],\n marginTB: [14, 20, 20, 20, 20, 20],\n}\n\nexports.settings = settings","// closest\r\n\r\nif (!Element.prototype.matches) {\r\n Element.prototype.matches = Element.prototype.msMatchesSelector || \r\n Element.prototype.webkitMatchesSelector;\r\n}\r\n\r\nif (!Element.prototype.closest) {\r\n Element.prototype.closest = function(s) {\r\n var el = this;\r\n\r\n do {\r\n if (el.matches(s)) return el;\r\n el = el.parentElement || el.parentNode;\r\n } while (el !== null && el.nodeType === 1);\r\n return null;\r\n };\r\n}\r\n\r\n\r\n// getBoundingClientRect","import React from 'react';\n\nexport function NotFound(props) {\n const debugInfo = props.debugInfo;\n\n function refreshPage(e) {\n e.preventDefault();\n if (typeof window !== `undefined`) {\n window.location.reload();\n }\n }\n\n function goBack(e) {\n e.preventDefault();\n if (typeof window !== `undefined`) {\n window.history.back();\n }\n }\n\n return (\n
\n
\n

404 Error

\n\n

Please refreshPage(e)}>refresh your browser.

\n
\n \n
\n\n {\n debugInfo &&\n
Error message: {debugInfo.pageUrl} - {debugInfo.loadFrom} 
\n }\n\n
\n\n
\n\n )\n}","const config = {\n isProd: process.env.NODE_ENV === \"production\",\n locale: getLocale(),\n siteName: process.env.REACT_APP_SITENAME,\n titleSuffix: process.env.REACT_APP_TITLESUFFIX,\n siteCode: process.env.REACT_APP_SITECODE,\n apiBase: process.env.REACT_APP_API_ENDPOINT,\n resourceBase: process.env.REACT_APP_RESOURCE_BASEURL,\n baseOrigin: getBaseUrl(),\n cmsEndpoint: process.env.REACT_APP_CMS_ENDPOINT,\n ver: process.env.REACT_APP_VERSION,\n updateDate: process.env.REACT_APP_UPDATED_AT,\n stripeKey: process.env.REACT_APP_STRIPE_KEY,\n reCaptchaSiteKey: process.env.REACT_APP_RECAPTCHASITEKEY,\n \n //bvClientId: process.env.REACT_APP_BAZZAR_CLIENT_ID,\n //bvSiteId: process.env.REACT_APP_BAZZAR_SITE_ID,\n //bvEnv: process.env.REACT_APP_BAZZAR_ENV,\n //bvLocale: getLocale() === 'nz' ? 'en_NZ' : 'en_AU',\n}\n\nfunction getLocale() {\n return process.env.REACT_APP_COUNTRY_LOCALE || getCountry()\n}\n\nfunction getCountry() {\n if (typeof window !== `undefined`) {\n if (window.location.hostname.toLowerCase().indexOf(\".nz\") >= 0) return 'nz';\n if (window.location.hostname.toLowerCase().indexOf(\"-nz\") >= 0) return 'nz';\n if (window.location.search === '?nz=true') return 'nz';\n }\n return 'au';\n}\n\nfunction getBaseUrl() {\n if (typeof window !== `undefined`) {\n return window.location.origin;\n }\n return process.env.GATSBY_BASEURL;\n}\n\nconsole.log(process.env, config)\nexport default {\n ...config,\n getDevCartId: function() {\n return !config.isProd && typeof window !== `undefined` ? window.localStorage.getItem('cart') : null\n },\n setDevCartId: function(cartId) {\n if(!config.isProd && typeof window !== `undefined`) window.localStorage.setItem('cart', cartId)\n }\n}","import React from 'react';\r\nimport env from '../../env';\r\n\r\nexport function AppVersion(props) {\r\n\r\n const [checkStatus, setCheckStatus] = React.useState('idle')\r\n //const [secs, setSecs] = React.useState(10)\r\n const ver = env.ver;\r\n const updateDate = env.updateDate;\r\n\r\n React.useEffect(() => {\r\n console.log(checkStatus);\r\n if (checkStatus === 'checking') {\r\n if (typeof window !== `undefined`) {\r\n window.updateSW().then(function () {\r\n console.log('sw update called');\r\n setCheckStatus('checked')\r\n })\r\n }\r\n\r\n let timer = setTimeout(() => {\r\n if (typeof window !== `undefined`) {\r\n window.location.reload()\r\n }\r\n }, 5000)\r\n return () => { clearTimeout(timer) }\r\n }\r\n }, [checkStatus])\r\n\r\n function checkUpdates(e) {\r\n if (typeof window !== `undefined`) {\r\n if (window.updateSW) {\r\n setCheckStatus('checking')\r\n } else {\r\n window.location.reload();\r\n }\r\n }\r\n }\r\n\r\n function refreshApp(e) {\r\n if (typeof window !== `undefined`) {\r\n window.location.reload();\r\n }\r\n }\r\n\r\n let button = null\r\n if (checkStatus === 'checking') {\r\n button = ;\r\n } else if (checkStatus === 'checked') {\r\n button = <>
(If this does't reload automatically, please click the above button)
;\r\n } else {\r\n button = ;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n Version: {ver} ({updateDate})\r\n
\r\n
\r\n {button}\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport function AppVersionPage(props) {\r\n return (\r\n
\r\n \r\n
);\r\n}","import React from 'react';\n\nexport function Button({onClick, status, children, btnStyle='primary', className}) {\n let buttonStyle = 'btn-' + btnStyle;\n return (\n \n );\n}","import React from 'react';\r\n\r\nexport const ErrorMessage = ({ errors, summaryMessage = null }) => {\r\n if (!errors) return null;\r\n if (typeof errors.length !== 'undefined' && errors.length === 0) return null;\r\n\r\n if (summaryMessage)\r\n return (\r\n
\r\n {summaryMessage}\r\n
\r\n );\r\n let message = errors;\r\n if (Array.isArray(errors)) {\r\n if (errors.length === 0) return null;\r\n message = errors.map((error, index) =>
{error}
);\r\n }\r\n\r\n return (\r\n
\r\n {message}\r\n
\r\n );\r\n};\r\n","//import React from 'react';\r\n/** @jsx jsx */\r\nimport { css, jsx } from '@emotion/core'\r\n\r\nexport const ErrorPopup = (props) => {\r\n const title = props.title || 'Errors';\r\n const errors = props.errors;\r\n let messages = [];\r\n if (errors) {\r\n if (Array.isArray(errors)) {\r\n messages = errors;\r\n } else {\r\n messages.push(errors);\r\n }\r\n }\r\n\r\n const style = css({\r\n position: 'fixed',\r\n padding: '3rem',\r\n width: '800px',\r\n maxWidth: '90vw',\r\n maxHeight: '90vw',\r\n background: 'white',\r\n color: 'red',\r\n top: '50%',\r\n left: '50%',\r\n transform: 'translate(-50%, -50%)',\r\n zIndex: '1000'\r\n })\r\n\r\n return
\r\n

{title}

\r\n {props.children}\r\n {messages.map((error, inx) => (\r\n
\r\n ))}\r\n \r\n
\r\n}\r\n","import React from \"react\";\r\n\r\nfunction SvgNarrowRight(props) {\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default SvgNarrowRight;\r\n","const overloading = {\n breakpointNames: ['sm', 'md', 'lg', 'xl', 'xxl'],\n breakpoints: [576, 768, 992, 1200, 1600]\n}\n\nconst colors = {\n colorBlue : '#007bff'\n}\n\nconst variables = {\n familyBase: '\"proxima-nova\",sans-serif',\n familyHeader: '\"proxima-nova\",serif',\n\n primaryColor: colors.colorBlue,\n fontColor: '#404040',\n bgColor: '#ebebeb',\n\n ...colors,\n ...overloading\n}\n\nexport default variables;","import variables from './cssInJs/variables';\n\nconst cssEmotion = {\n breakpointNames: variables.breakpointNames,\n breakpoints: variables.breakpoints\n}\n\nexport default {\n cssEmotion\n}","import * as React from \"react\";\r\nimport siteConfig from '../../../config';\r\n\r\nconst iconColors = (siteConfig && siteConfig.iconColors) || { primary: \"#eee\", secondary: \"#000\" }\r\n\r\nfunction SvgLoading(props) {\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\nexport default SvgLoading;","import React from \"react\";\r\nimport { LoadingCircle } from \"../../icons\";\r\n/** @jsx jsx */\r\nimport { css, jsx } from \"@emotion/core\";\r\n\r\nexport function Loading({ children = undefined }) {\r\n const [loaded, setLoaded] = React.useState(false);\r\n\r\n const style = {\r\n loading: css({\r\n minHeight: \"300px\",\r\n display: \"flex\",\r\n justifyContent: \"center\",\r\n alignItems: \"center\",\r\n opacity: \"0\",\r\n transition: \"all 1s\",\r\n }),\r\n loaded: css({\r\n opacity: \"1\",\r\n }),\r\n };\r\n\r\n React.useEffect(() => {\r\n let timer = setTimeout(() => setLoaded(true), 500);\r\n return () => {\r\n clearTimeout(timer);\r\n };\r\n }, []);\r\n\r\n return (\r\n
\r\n
\r\n \r\n {children}\r\n
\r\n
\r\n );\r\n}\r\n","export function isExternalLink(link){\r\n return link && (link.indexOf('https://') === 0 || link.indexOf('http://') === 0 || link.indexOf('://') === 0);\r\n}\r\n\r\nexport function getLinkFromElement(el){\r\n if (!el) return null;\r\n const linkEl = el.closest('a');\r\n //console.log(el, linkEl);\r\n if (linkEl){\r\n return linkEl.getAttribute('href');\r\n }\r\n return null;\r\n}\r\n\r\n\r\n// router utils\r\nexport function getLinkInfo(link) {\r\n if (!link) return null;\r\n\r\n const origin = typeof window !== `undefined` && window.location && window.location.origin;\r\n const currentPath = typeof window !== `undefined` && window.location && window.location.pathname;\r\n let linkFiltered = link.replace(origin, '').replace(currentPath + '#', '#');\r\n let linkLower = link.toLowerCase();\r\n\r\n //if (isStaticFile(linkLower)) return null;\r\n const isExternal = isExternalLink(linkFiltered);\r\n const isHash = linkFiltered.indexOf('#') === 0;\r\n const isTel = linkFiltered.indexOf('tel:') === 0;\r\n const isMailTo = linkFiltered.indexOf('mailto:') === 0;\r\n const type = (isHash && 'hash') || (isTel && 'tel') || (isMailTo && 'mailto') || \r\n (isStaticFile(linkLower) && 'static') || (isExternal && 'external') || 'internal';\r\n\r\n return { url: linkFiltered, type: type, ext: getExtension(link) };\r\n}\r\n\r\nvar exts = ['.pdf', '.jpg', '.png', '.gif', '.docx', '.doc']\r\nfunction isStaticFile(path) {\r\n for(let i = 0; i < exts.length; i++) {\r\n if (path.indexOf(exts[i]) >= 0) return true;\r\n }\r\n return false;\r\n}\r\n\r\nexport function getExtension(filename) {\r\n if (!filename || filename.indexOf('.') < 0) return null;\r\n return filename.split('.').pop().toLowerCase();\r\n}\r\n\r\nexport function getFilename(url) {\r\n return url.split('/').pop().split('?')[0];\r\n}\r\n\r\nexport function getFolderPath(url, parentDepth = -1) {\r\n return url.split('/').slice(0, parentDepth).join('/');\r\n}\r\n\r\n//\r\nexport function toQueryString(params) {\r\n var queryString = Object.keys(params).map((key) => {\r\n return encodeURIComponent(key) + '=' + encodeURIComponent(params[key])\r\n }).join('&');\r\n return queryString;\r\n}\r\n\r\nexport function getYoutubeId(url){\r\n url = url.split(/(vi\\/|v=|\\/v\\/|youtu\\.be\\/|\\/embed\\/)/);\r\n return (url[2] !== undefined) ? url[2].split(/[^0-9a-z_-]/i)[0] : url[0];\r\n}\r\n\r\nexport function getSlug(text){\r\n return text.toLowerCase().replace(/ /g,'-').replace(/[-]+/g, '-').replace(/[^\\w-]+/g,'');\r\n}\r\n\r\nexport function getWebUrl(url, schema = 'https://'){\r\n if (!url) return null;\r\n if (url.indexOf('https:') >= 0 || url.indexOf('http:') >= 0 || url.indexOf(':') >= 0) {\r\n return url;\r\n }\r\n return schema + url;\r\n}","//#region error json parsing\r\nexport const getErrors = (result) => {\r\n let errors = [];\r\n if (result && result.errors && result.errors.length > 0) {\r\n result.errors.forEach(err => {\r\n errors.push(err.errorMessage);\r\n });\r\n }\r\n return errors;\r\n}\r\n\r\nexport const getErrorMessage = (result) => {\r\n let errors = getErrors(result);\r\n return errors.join(\" \");\r\n}\r\n//#endregion","//#region conversion between array and object\r\nexport const convertToObject = (array, key) => {\r\n const initialValue = {};\r\n return array.reduce((obj, item) => {\r\n return {\r\n ...obj,\r\n [item[key]]: item,\r\n };\r\n }, initialValue);\r\n};\r\n\r\nexport const convertToKeyValues = (array, key, value) => {\r\n const initialValue = {};\r\n return array.reduce((obj, item) => {\r\n return {\r\n ...obj,\r\n [item[key]]: item[value],\r\n };\r\n }, initialValue);\r\n};\r\n//#endregion\r\n\r\n//#region array helper functions\r\nexport const moveItem = (list, fromIndex, toIndex) => {\r\n //const list = Array.from(array);\r\n const [removed] = list.splice(fromIndex, 1);\r\n list.splice(toIndex, 0, removed);\r\n\r\n return list;\r\n};\r\n\r\nexport const removeItem = (list, index) => {\r\n //const list = Array.from(array);\r\n list.splice(index, 1);\r\n\r\n return list;\r\n};\r\n\r\nexport const insertItem = (list, index, item) => {\r\n //const list = Array.from(array);\r\n list.splice(index, 0, item);\r\n\r\n return list;\r\n};\r\n\r\n\r\nexport const find = (list, fn) => {\r\n if (!list) return null;\r\n for (let i = 0; i < list.length; i++) {\r\n if (fn(list[i])) {\r\n return list[i];\r\n }\r\n }\r\n return null;\r\n};\r\n\r\nexport const findIndex = (list, fn) => {\r\n if (!list) return -1;\r\n for (let i = 0; i < list.length; i++) {\r\n if (fn(list[i])) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n};\r\n\r\nexport const contains = (list, fn) => {\r\n return findIndex(list, fn) >= 0;\r\n}\r\n\r\n// utils.array.distinct(images, (x, y) => x.imageUrl === y.imageUrl)\r\nexport const distinct = (list, comparer) => {\r\n const filtered = []\r\n for (let i = 0; i < list.length; i++) {\r\n if (!contains(filtered, (x) => comparer(x, list[i]))) {\r\n filtered.push(list[i])\r\n }\r\n }\r\n return filtered;\r\n}\r\n\r\nexport const sum = (list, fn) => {\r\n if (!list) return 0;\r\n let total = 0;\r\n for (let i = 0; i < list.length; i++) {\r\n total += fn(list[i]) || 0\r\n }\r\n return total\r\n}\r\n\r\nexport const equal = (list1, list2, fn) => {\r\n if (!list1 && !list2) return true;\r\n if (!list1 || !list2) return false;\r\n if (list1.length !== list2.length) return false;\r\n for (let i = 0; i < list1.length; i++) {\r\n let found = false;\r\n for (let j = 0; j < list2.length; j++) {\r\n if(fn(list1[i], list2[i])) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) return false;\r\n }\r\n return true;\r\n}\r\n//#endregion\r\n\r\n//#region sorting helpers\r\nexport const caseInsensitiveCompare = function (a, b) {\r\n return a.toLowerCase().localeCompare(b.toLowerCase());\r\n}\r\n\r\n// put the null items at the end.\r\nexport const compareIgnoreEmpty = function (asc) {\r\n return asc ?\r\n function (a, b) {\r\n return (a === null || isNaN(a)) - (b === null || isNaN(b)) || +(a > b) || -(a < b);\r\n }\r\n :\r\n function (a, b) {\r\n return (a === null || isNaN(a)) - (b === null || isNaN(b)) || -(a > b) || +(a < b);\r\n }\r\n}\r\n//#endregion","import parse from \"date-fns/parse\";\r\nimport parseISO from \"date-fns/parseISO\";\r\nimport format from \"date-fns/format\";\r\n\r\n//#region manipulation\r\nexport const addDays = (date, days) => {\r\n var result = new Date(date);\r\n result.setDate(result.getDate() + days);\r\n return result;\r\n};\r\n//#endregion\r\n\r\n//#region format\r\nexport function formatDate(dateObj, formatStr) {\r\n const date = toDate(dateObj);\r\n if (!date) return \"\";\r\n return format(date, formatStr);\r\n}\r\n\r\nexport function formatYYYYMMDDToday() {\r\n const date = new Date();\r\n //console.log(dateObj, date)\r\n if (!date) return '';\r\n var dd = date.getDate();\r\n var mm = date.getMonth() + 1; //January is 0!\r\n\r\n var 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 return (`${yyyy}-${mm}-${dd}`)\r\n}\r\n\r\nexport function formatYYYYMMDD(dateObj) {\r\n const date = toDate(dateObj);\r\n //console.log(dateObj, date)\r\n if (!date) return \"\";\r\n var dd = date.getDate();\r\n var mm = date.getMonth() + 1; //January is 0!\r\n\r\n var 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 return `${yyyy}-${mm}-${dd}`;\r\n}\r\n\r\nexport function formatDDMMYYYY(dateObj) {\r\n const date = toDate(dateObj);\r\n //console.log(dateObj, date)\r\n if (!date) return \"\";\r\n var dd = date.getDate();\r\n var mm = date.getMonth() + 1; //January is 0!\r\n\r\n var 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 return `${dd}-${mm}-${yyyy}`;\r\n}\r\n//#endregion\r\n\r\n//#region parse\r\nexport function toDate(dateObj) {\r\n if (!dateObj) return null;\r\n if (typeof dateObj === \"string\") {\r\n return (\r\n parseDate(dateObj, \"yyyy-MM-dd\") ||\r\n parseDate(dateObj, \"yyyy-M-d\") ||\r\n parseDate(dateObj, \"dd/MM/yyyy\") ||\r\n parseDate(dateObj, \"d/M/yyyy\") ||\r\n parseISO(dateObj)\r\n );\r\n } else {\r\n return dateObj;\r\n }\r\n}\r\n\r\nexport function toDateTime(dateObj) {\r\n if (!dateObj) return null;\r\n if (typeof dateObj === \"string\") {\r\n return (\r\n parseDate(dateObj, \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\") ||\r\n parseDate(dateObj, \"yyyy-MM-dd HH:mm:ss.SSSxxx\") ||\r\n parseDate(dateObj, \"yyyy-M-d HH:mm:ss.SSSxxx\") ||\r\n parseDate(dateObj, \"dd/MM/yyyy HH:mm:ss.SSSxxx\") ||\r\n parseDate(dateObj, \"d/M/yyyy HH:mm:ss.SSSxxx\") ||\r\n parseISO(dateObj)\r\n );\r\n } else {\r\n return dateObj;\r\n }\r\n}\r\n\r\nexport function parseDate(dateStr, format) {\r\n const date = parse(dateStr, format, new Date());\r\n return date && isValidDate(date) ? date : null;\r\n}\r\n\r\nexport function isValidDate(d) {\r\n return d instanceof Date && !isNaN(d);\r\n}\r\n//#endregion\r\n","//#region background images\r\nexport const bgUrl = (imageUrl) => {\r\n return `background-image:url(\"` + encodeURI(decodeURI(imageUrl)) + `\")`\r\n}\r\n\r\nexport const bgUrlStyle = (imageUrl) => {\r\n return `url(\"` + encodeURI(decodeURI(imageUrl)) + `\")`\r\n}\r\n//#endregion\r\n\r\n//#region screen/element size\r\nexport const screenWidth = () => {\r\n if (typeof window !== `undefined`) { \r\n return window.innerWidth ||\r\n document.documentElement.clientWidth ||\r\n document.body.clientWidth\r\n } else {\r\n return 0;\r\n }\r\n}\r\n\r\nexport const screenHeight = () => {\r\n if (typeof window !== `undefined`) { \r\n return window.innerHeight ||\r\n document.documentElement.clientHeight ||\r\n document.body.clientHeight\r\n } else {\r\n return 0;\r\n }\r\n}\r\n\r\nexport const outerWidth = el => el.offsetWidth\r\nexport const outerHeight = el => el.offsetHeight\r\n//#endregion\r\n\r\n//#region css class\r\n/**\r\n * Check if element has the css class on it.\r\n */\r\nexport const hasClass = (el, className) => {\r\n if (el.classList) {\r\n return el.classList.contains(className)\r\n }\r\n\r\n return !!el.className.match(new RegExp(`(\\\\s|^)${className}(\\\\s|$)`))\r\n}\r\n\r\n/**\r\n * Adds the provided css className to the element.\r\n */\r\nexport const addClass = (el, className) => {\r\n if (el.classList) {\r\n el.classList.add(className)\r\n return\r\n }\r\n\r\n if (!hasClass(el, className)) {\r\n el.className += ` ${className}`\r\n }\r\n}\r\n\r\n/**\r\n * Remove the provided css className from the element.\r\n */\r\nexport const removeClass = (el, className) => {\r\n if (el.classList) {\r\n el.classList.remove(className)\r\n return\r\n }\r\n\r\n if (hasClass(el, className)) {\r\n const reg = new RegExp(`(\\\\s|^)${className}(\\\\s|$)`)\r\n el.className = el.className.replace(reg, ' ')\r\n }\r\n}\r\n\r\n/**\r\n * Adds or removes a class name on the input depending on the status flag.\r\n */\r\nexport const toggleClass = (el, className, status) => {\r\n if (!el || !className) return\r\n\r\n if (status) {\r\n return addClass(el, className)\r\n }\r\n\r\n removeClass(el, className)\r\n}\r\n//#endregion","import { gsap } from 'gsap';\r\nimport { ScrollToPlugin } from 'gsap/ScrollToPlugin';\r\n\r\ngsap.registerPlugin(ScrollToPlugin);\r\n\r\nexport function scrollTo(selector, duration = 750, delay = 0) {\r\n const el = findElement(selector);\r\n if (el) {\r\n setTimeout(() => {\r\n //console.log(element);\r\n const offset = elementOffset(el);\r\n //console.log(offset)\r\n //window.scrollTo(0, offset.top - 300);\r\n\r\n gsap.to(window, {duration: (duration/1000), scrollTo: offset.top - 100, ease: 'power1'});\r\n\r\n }, delay);\r\n //el.scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'smooth' }); }, timeout);\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\nexport function findElement(selector) {\r\n if (typeof selector !== 'string') return selector;\r\n\r\n let found = querySelectorOrNull(selector)\r\n || querySelectorOrNull('#' + selector)\r\n || querySelectorOrNull('.' + selector)\r\n \r\n return found;\r\n}\r\n\r\nexport function querySelectorOrNull(selector) {\r\n try {\r\n return document.querySelector(selector);\r\n } catch(e){\r\n return null;\r\n };\r\n}\r\n\r\nexport function elementOffset(el) {\r\n var rect = el.getBoundingClientRect(),\r\n scrollLeft = typeof window !== `undefined` ? (window.pageXOffset || document.documentElement.scrollLeft) : 0,\r\n scrollTop = typeof window !== `undefined` ? (window.pageYOffset || document.documentElement.scrollTop) : 0;\r\n\r\n return { top: rect.top + scrollTop, left: rect.left + scrollLeft, width: el.offsetWidth, height: el.offsetHeight }\r\n}\r\n\r\nexport function isElementInViewport (el) {\r\n if (typeof window !== `undefined`) {\r\n var rect = el.getBoundingClientRect();\r\n\r\n return (\r\n rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /* or $(window).height() */\r\n rect.right <= (window.innerWidth || document.documentElement.clientWidth) /* or $(window).width() */\r\n );\r\n } else {\r\n return true;\r\n }\r\n}\r\n\r\nexport function getCurrentBreakpoint() {\r\n if (typeof window === `undefined`) return null;\r\n \r\n const bpHolder = document.querySelector('.devMediaQueryStatus__current');\r\n if (!bpHolder) return null;\r\n return window.getComputedStyle(bpHolder, ':before').getPropertyValue('content').replace(/[\"']/g, '');\r\n}\r\n\r\n","export function formatMoney(number, fraction = 0) {\r\n var formatter = new Intl.NumberFormat('en-AU', {\r\n style: 'currency',\r\n currency: 'AUD',\r\n minimumFractionDigits: fraction,\r\n });\r\n\r\n return formatter.format(number);\r\n}\r\n\r\nexport function toMonthlyCost(amount, frequency) {\r\n if (!amount) return 0;\r\n if (frequency === 'Week') {\r\n return amount * 52.1429 / 12.0;\r\n } else if (frequency === 'Fortnight') {\r\n return amount * 52.1429 / 2.0 / 12.0;\r\n } else if (frequency === 'Month') {\r\n return amount;\r\n } else if (frequency === 'Quarter') {\r\n return amount * 4.0 / 12.0;\r\n } else if (frequency === 'Year') {\r\n return amount / 12.0;\r\n } else {\r\n return amount;\r\n }\r\n}\r\n","export function isBlank(str) {\r\n return (!str || /^\\s*$/.test(str))\r\n}\r\n\r\nexport function isEmpty(str) {\r\n return (!str || str.length === 0)\r\n}\r\n\r\nexport function isNumeric(num){\r\n return !isNaN(num)\r\n}\r\n\r\nexport function capitalize(expression) {\r\n return expression.charAt(0).toUpperCase() + expression.slice(1);\r\n}\r\n\r\nexport function toFieldName(str) {\r\n if (!str) return null;\r\n return capitalize((str.replace(/([A-Z]+)/g, ' $1').replace(/([A-Z][a-z])/g, ' $1')).trim());\r\n}\r\n\r\nexport function toHtml(str) {\r\n if (!str) return null;\r\n return str.replace(/[\\n\\r]/g, '
')\r\n}\r\n\r\n// Shorten a string to less than maxLen characters without truncating words.\r\nexport function truncateWords(str, maxLen, separator = ' ', ellipsis = '...') {\r\n if (str.length <= maxLen) return str\r\n var pos = str.lastIndexOf(separator, maxLen)\r\n return str.substr(0, pos) + ellipsis\r\n}\r\n\r\nexport function numberWithCommas(x) {\r\n var parts = x.toString().split(\".\");\r\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n return parts.join(\".\");\r\n}\r\n\r\nexport const formatNumber = (value) => {\r\n if (value === 0) return '0';\r\n if (!value) return '';\r\n return Math.round(value * 100) / 100\r\n}\r\n\r\nexport const toTelephoneNumber = (str) => {\r\n return (str || []).replace(/[^+\\d]+/g, \"\");\r\n\r\n}\r\n\r\n// utils.text.like('text here', '%keyword%')\r\nexport const like = (str, search) => {\r\n if (typeof search !== 'string' || str === null) { return false; }\r\n // Remove special chars\r\n search = search.replace(new RegExp(\"([\\\\.\\\\\\\\\\\\+\\\\*\\\\?\\\\[\\\\^\\\\]\\\\$\\\\(\\\\)\\\\{\\\\}\\\\=\\\\!\\\\<\\\\>\\\\|\\\\:\\\\-])\", \"g\"), \"\\\\$1\");\r\n // Replace % and _ with equivalent regex\r\n search = search.replace(/%/g, '.*').replace(/_/g, '.');\r\n // Check matches\r\n return RegExp('^' + search + '$', 'gi').test(str);\r\n\r\n}","import shortid from 'shortid';\r\nimport uuid from 'uuid/v4';\r\n\r\nexport function shortId() {\r\n return shortid();\r\n}\r\n\r\nexport function guid() {\r\n return uuid();\r\n}","export function toCamel(o) {\r\n var newO, origKey, newKey, value\r\n if (o instanceof Array) {\r\n return o.map(function(value) {\r\n if (typeof value === \"object\") {\r\n value = toCamel(value)\r\n }\r\n return value\r\n })\r\n } else {\r\n newO = {}\r\n for (origKey in o) {\r\n if (o.hasOwnProperty(origKey)) {\r\n newKey = (origKey.charAt(0).toLowerCase() + origKey.slice(1) || origKey).toString()\r\n value = o[origKey]\r\n if (value instanceof Array || (value !== null && value.constructor === Object)) {\r\n value = toCamel(value)\r\n }\r\n newO[newKey] = value\r\n }\r\n }\r\n }\r\n return newO\r\n}","import { getFilename } from './url';\r\nimport { contains } from './array';\r\nexport function getImageSetPath(url, setId) {\r\n const info = getPathDetails(url)\r\n if (!info) return url;\r\n //console.log(url, info);\r\n return info.baseFolder + \"/@\" + setId + '/' + info.filename\r\n}\r\n\r\nexport function getPathDetails(url, setIds) {\r\n if (!url) return null;\r\n const parts = url.split('/').slice(0, -1);\r\n if (parts.length <= 1) return { baseFolder: '/', setId: null, filename: getFilename(url) };\r\n\r\n const lastFolder = parts[parts.length - 1];\r\n const hasSet = setIds && setIds.length > 0 ? contains(setIds, x => x === lastFolder) : lastFolder.indexOf('@') === 0;\r\n\r\n return hasSet ?\r\n { baseFolder: parts.slice(0, -1).join('/'), setId: lastFolder, filename: getFilename(url) } :\r\n { baseFolder: parts.join('/'), setId: null, filename: getFilename(url) }\r\n}","import classNames from 'classnames';\r\nimport * as url from './url';\r\nimport * as form from './form';\r\nimport * as array from './array';\r\nimport * as date from './date';\r\nimport * as css from './css';\r\nimport * as ui from './ui';\r\nimport * as money from './money';\r\nimport * as text from './text';\r\nimport * as random from './random';\r\nimport * as object from './object';\r\nimport * as media from './media';\r\n\r\nexport default { classNames, url, form, array, date, css, ui, money, text, random, object, media};","import facepaint from 'facepaint'\r\nimport siteConfig from '../../config';\r\n\r\nconst config = siteConfig.cssEmotion\r\nconst breakpointNames = (config && config.breakpointNames) || ['sm', 'md', 'lg', 'xl', 'xxl']\r\nconst breakpoints = (config && config.breakpoints) || [576, 768, 992, 1200, 1600]\r\n\r\nconst mq = facepaint(\r\n breakpoints.map(bp => `@media (min-width: ${bp}px)`)\r\n)\r\n\r\nconst mqMin = {};\r\nbreakpointNames.forEach((bp, index) => mqMin[bp] = `@media (min-width: ${breakpoints[index]}px)`)\r\n\r\nconst mqMax = {};\r\nbreakpointNames.forEach((bp, index) => mqMax[bp] = `@media (max-width: ${breakpoints[index] - 1}px)`)\r\n//console.log(mqMin, mqMax)\r\n\r\nconst matches = (mediaQuery) => !!window.matchMedia(mediaQuery).matches\r\nconst isMin = {};\r\nbreakpointNames.forEach((bp, index) => isMin[bp] = () => matches(`(min-width: ${breakpoints[index]}px)`))\r\n\r\nconst isMax = {};\r\nbreakpointNames.forEach((bp, index) => isMax[bp] = () => matches(`(max-width: ${breakpoints[index] - 1}px)`))\r\n\r\nexport { mq, mqMin, mqMax, isMin, isMax }","export function overlay() {\r\n return {\r\n content: `''`,\r\n position: 'absolute',\r\n top:0,\r\n bottom:0,\r\n left: 0,\r\n right: 0,\r\n transition: 'all 0.5s'\r\n }\r\n}","import utils from \"../utils\";\nimport env from '../env';\nimport { isMin } from '../lib/css-emotion'\n\nexport const isMobile = () => {\n // isMin.md() ==> min-width: 768px\n return !isMin.md()\n}\n\nexport function resourcePath(url){\n if (!url) return null;\n if (url && url.indexOf('/assets/') === 0) return url;\n return utils.url.isExternalLink(url)? url : env.resourceBase + url;\n}\n\nexport function fullUrl(url){\n return utils.url.isExternalLink(url)? url : env.baseOrigin + url;\n}\n\n\nexport const isNZ = env.locale === 'nz'\n\n","import coreUtils from '../lib/utils-core';\nimport * as site from '../site/siteUtils';\n\nexport default { ...coreUtils, site };","import { useState, useEffect } from 'react';\r\nimport utils from '../../utils';\r\nimport siteConfig from '../../config';\r\n\r\nexport function useApi(fn) {\r\n //console.log('useApi')\r\n const [response, setResponse] = useState({});\r\n const [errors, setErrors] = useState([]);\r\n const [status, setStatus] = useState('ready');\r\n const [request, setRequest] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!request) return;\r\n\r\n //console.log('fetch now')\r\n setResponse(null);\r\n setErrors([]);\r\n setStatus('ready');\r\n\r\n const fetchData = async () => {\r\n setStatus('pending');\r\n try {\r\n //console.log(request);\r\n const options = request.options || {}\r\n siteConfig.apiNetJwt && await siteConfig.apiNetJwt(options);\r\n\r\n const res = await fetch(request.url, options);\r\n //console.log(res);\r\n\r\n if (!res.ok) {\r\n try {\r\n const json = await res.json();\r\n console.log(json);\r\n\r\n if (json.message) {\r\n setErrors([json.message]);\r\n setStatus('error')\r\n return;\r\n }\r\n } catch (e) { }\r\n\r\n const statusText = res.status === 401 ? 'Permission denied. Please login first.' : res.statusText\r\n setErrors(['Error - [' + res.status + ']' + (statusText && (' - ' + statusText))]);\r\n setStatus('error')\r\n return;\r\n }\r\n\r\n //const json = await res.json();\r\n const text = await res.text();\r\n const json = text && text.length ? JSON.parse(text) : null;\r\n //console.log(json);\r\n\r\n // check if ajax result from c#\r\n if (json && json.errors && json.errors.length > 0) {\r\n setErrors(utils.form.getErrors(json));\r\n setStatus('error')\r\n return;\r\n }\r\n\r\n setResponse(json);\r\n setStatus('done')\r\n } catch (err) {\r\n //console.log(error, error.toString(), typeof error, JSON.stringify(error))\r\n setErrors([err.toString()]);\r\n setStatus('error')\r\n }\r\n };\r\n fetchData();\r\n }, [request]);\r\n\r\n const containsErrorMessage = (msg) => {\r\n const finding = (msg || '').toLowerCase()\r\n return errors.some(x => (x || '').toLowerCase().indexOf(finding) >= 0)\r\n }\r\n\r\n //return [ response, error, status, (...args) => setRequest(fn(...args)) ];\r\n return {\r\n request: request,\r\n response: response,\r\n errors: errors,\r\n status: status,\r\n hasErrors: () => status === 'error',\r\n containsErrorMessage: containsErrorMessage,\r\n addErrors: (errs) => {\r\n setErrors(...errors, ...errs)\r\n setStatus('error')\r\n },\r\n done: () => status === 'done',\r\n send: (...args) => { setStatus('ready'); setRequest(fn(...args)) },\r\n sendRaw: (httpOptionFn, ...args) => { setStatus('ready'); setRequest(httpOptionFn(...args)) },\r\n setResult: (json) => { setResponse(json); setStatus('done') },\r\n reset: () => {\r\n setStatus('ready');\r\n setErrors([]);\r\n }\r\n };\r\n}\r\n\r\nexport function usePost() {\r\n const formDataFn = (url, data, options = {}) =>\r\n ({\r\n url: url,\r\n options: {\r\n ...options,\r\n method: 'POST',\r\n body: data // FormData\r\n }\r\n });\r\n const post = useApi((url, data, options = {}) =>\r\n ({\r\n url: url,\r\n options: {\r\n ...options,\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/json' },\r\n body: JSON.stringify(data)\r\n }\r\n })\r\n );\r\n return {\r\n ...post,\r\n loading: () => post.status === 'ready' || post.status === 'pending',\r\n sending: () => post.status === 'pending',\r\n sendFormData: (...args) => post.sendRaw(formDataFn, ...args)\r\n }\r\n}\r\n\r\nexport function useGet() {\r\n const get = useApi((url, options = {}) =>\r\n ({\r\n url: url,\r\n options: {\r\n ...options,\r\n method: 'GET'\r\n }\r\n })\r\n );\r\n return {\r\n ...get,\r\n loading: () => get.status === 'ready' || get.status === 'pending'\r\n }\r\n}\r\n\r\n//https://medium.com/@jaryd_34198/seamless-api-requests-with-react-hooks-part-2-3ab42ba6ad5c","import React from 'react';\r\nimport env from '../../env';\r\n\r\nexport function MediaQueryStatus(props) {\r\n return (\r\n
\r\n
\r\n
\r\n );\r\n}\r\n","import React from 'react';\r\nimport { Helmet } from 'react-helmet-async';\r\n\r\nexport function MetaTag({ data: seoData }) {\r\n //console.log(seoData)\r\n const data = Object.assign({}, {\r\n title: ''\r\n }, seoData)\r\n\r\n return (<>\r\n \r\n {data.title}\r\n {data.description && }\r\n {data.keywords && }\r\n {data.language && }\r\n {data.country && }\r\n {\r\n (data.faceBookDomainVerifi && data.faceBookDomainVerifi !== '') &&\r\n \r\n }\r\n \r\n \r\n \r\n {data.description && }\r\n {data.heroImageUrl && }\r\n\r\n \r\n \r\n \r\n {data.description && }\r\n {data.heroImageUrl && }\r\n\r\n\r\n \r\n\r\n {(data.alternates || []).map((x, index) => )}\r\n\r\n \r\n )\r\n}\r\n\r\n\r\n// function MetaContent({ name, content }) {\r\n// console.log(name, content)\r\n// if (!content) return null;\r\n// return \r\n// }\r\n\r\n","import env from '../../env';\r\n\r\nexport const pageView = (url) => {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.warn(`Tracking is deprecated.`, `Use seperate tracking helper instead`);\r\n }\r\n if (hasGTM()) gtmPageView(url)\r\n if (hasGtag()) gaPageView(url)\r\n if (hasFBPixel()) fbPageView(url)\r\n}\r\n\r\nexport const sendFormEvent = (formName, params) => {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.warn(`Tracking is deprecated.`, `Use seperate tracking helper instead`);\r\n }\r\n const p = Object.assign({ 'gtm.elementId': formName }, params || {})\r\n\r\n if (hasGTM()) gtmSendEvent('form', p)\r\n if (hasGtag()) gaSendEvent('form', p)\r\n if (hasFBPixel()) fbSendEvent('form', p)\r\n}\r\n\r\nexport const sendEvent = (eventName, params) => {\r\n if (process.env.NODE_ENV === 'development') {\r\n console.warn(`Tracking is deprecated.`, `Use seperate tracking helper instead`);\r\n }\r\n if (hasGTM()) gtmSendEvent(eventName, params)\r\n if (hasGtag()) gaSendEvent(eventName, params)\r\n if (hasFBPixel()) fbSendEvent(eventName, params)\r\n}\r\n\r\n//#region GTM\r\nexport const hasGTM = () => {\r\n return !!(typeof window !== `undefined` && window.dataLayer);\r\n}\r\n\r\nexport const gtmPageView = (url) => {\r\n if (typeof window !== `undefined`) {\r\n window.dataLayer.push({\r\n event: 'pageview',\r\n page: {\r\n path: url\r\n }\r\n })\r\n }\r\n}\r\nexport const gtmSendEvent = (eventName, params) => {\r\n if (typeof window !== `undefined`) {\r\n window.dataLayer.push(Object.assign({ event: eventName }, params || {}))\r\n }\r\n}\r\n//#endregion\r\n\r\n//#region Gtag / GA\r\nexport const hasGtag = () => {\r\n return !!(typeof window !== `undefined` && window.gtag);\r\n}\r\n\r\nexport const gaPageView = (url) => {\r\n if (typeof window !== `undefined`) {\r\n if (env.gaAccounts) {\r\n env.gaAccounts.forEach(id => {\r\n window.gtag('config', id, { 'page_path': url });\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport const gaSendEvent = (eventName, params) => {\r\n if (typeof window !== `undefined`) {\r\n if (env.gaAccounts && env.gaAccounts.length > 0) {\r\n window.gtag('event', eventName, params || {});\r\n }\r\n }\r\n}\r\n//#endregion\r\n\r\n//#region Facebook Pixel\r\nexport const hasFBPixel = () => {\r\n return !!(typeof window !== `undefined` && window.fbq);\r\n}\r\n\r\nexport const fbPageView = (url) => {\r\n if (typeof window !== `undefined`) {\r\n window.fbq('track', 'PageView');\r\n }\r\n}\r\n\r\nexport const fbSendEvent = (eventName, params) => {\r\n if (typeof window !== `undefined`) {\r\n window.fbq('track', eventName, params || {});\r\n }\r\n}\r\n//#endregion\r\n\r\n\r\n\r\n","import utils from '../../utils';\r\n\r\nexport const MAX = 100000;\r\nexport const MIN = -100000;\r\n\r\nexport function getScrollProgress(el) {\r\n if (typeof window !== `undefined`) {\r\n const scroll = window.scrollY || window.pageYOffset\r\n if (!el) {\r\n console.log('not exists', el)\r\n return {\r\n progress: 0,\r\n top: scroll\r\n }\r\n }\r\n const boundsTop = el.getBoundingClientRect().top + scroll\r\n\r\n const viewport = {\r\n top: scroll,\r\n bottom: scroll + window.innerHeight,\r\n height: window.innerHeight\r\n }\r\n\r\n const bounds = {\r\n top: boundsTop,\r\n bottom: boundsTop + el.clientHeight,\r\n height: el.clientHeight\r\n }\r\n\r\n //const scrollTop = window.scrollY || window.pageYOffset || document.documentElement.scrollTop;\r\n\r\n // const status = {\r\n // viewport: viewport,\r\n // bound: bounds,\r\n // inViewport: (bounds.bottom >= viewport.top && bounds.bottom <= viewport.bottom)\r\n // || (bounds.top <= viewport.bottom && bounds.top >= viewport.top)\r\n // }\r\n\r\n //console.log((viewport.bottom - bounds.top) / (bounds.height + viewport.height))\r\n return {\r\n progress: (viewport.bottom - bounds.top) / (bounds.height + viewport.height),\r\n top: (viewport.bottom - bounds.top) / (viewport.height)\r\n }\r\n } else {\r\n return {\r\n progress: 0,\r\n top: 0\r\n }\r\n }\r\n}\r\n\r\n//au.setClass(section, 'animated', pr, [0.3, au.MAX])\r\nexport function setClass(el, className, pr, range)\r\n{\r\n if (pr >= range[0] && pr <= range[1]) {\r\n utils.css.addClass(el, className);\r\n } else {\r\n utils.css.removeClass(el, className);\r\n }\r\n}\r\n\r\nexport function prVal(min, max, pr, range = [0, 1]) {\r\n //console.log(min, max, typeof min, typeof to)\r\n if (pr < range[0]) return min;\r\n if (pr > range[1]) return max;\r\n return min + (max - min) * ((pr - range[0])/(range[1] - range[0]));\r\n}\r\n\r\nexport function transform(el, x, y) {\r\n el.style.transform = 'translate(' + x + ',' + y + ')';\r\n}\r\n\r\nexport function removeTransform(el) {\r\n\r\n}\r\n\r\n// requestAnimationFrame\r\n// const raf =\r\n// (window).requestAnimationFrame ||\r\n// (window).webkitRequestAnimationFrame ||\r\n// (window).mozRequestAnimationFrame ||\r\n// function (callback) {\r\n// (window).setTimeout(callback, 1000 / 60)\r\n// }\r\nexport function getScreenSize() {\r\n const w = utils.css.screenWidth()\r\n const h = utils.css.screenHeight()\r\n return { width: w, height: h };\r\n}\r\n","const defaultHolder = typeof window !== `undefined` ? window : {};\r\nconst storeName = '__j6_lazy_js'\r\n\r\nexport function loadJs(...scripts) {\r\n const promises = [];\r\n scripts.forEach((script) => promises.push(loadScript(script, defaultHolder)));\r\n return Promise.all(promises);\r\n}\r\n\r\nexport function loadedJs(url, holder = defaultHolder) {\r\n if (!holder[storeName]) return false;\r\n return holder[storeName][url] && holder[storeName][url].loaded\r\n}\r\n\r\nexport function loadScript(url, holder_, forceToReload = false) {\r\n const holder = holder_ || defaultHolder\r\n if (!holder[storeName]) holder[storeName] = {};\r\n\r\n return new Promise((resolve, reject) => {\r\n //resolve if already loaded\r\n if (!forceToReload && holder[storeName][url] && holder[storeName][url].loaded) {\r\n resolve({ script: url, loaded: true, networkLoaded: false , status: 'Already Loaded' });\r\n }\r\n else {\r\n // remove previous\r\n const existing = document.querySelector('script[src=\"' + url +'\"]')\r\n if (existing) existing.remove();\r\n\r\n // load script\r\n let script = document.createElement('script');\r\n script.type = 'text/javascript';\r\n script.src = url;\r\n script.onload = () => {\r\n holder[storeName][url] = { loaded: true };\r\n resolve({ script: url, loaded: true, networkLoaded: true, status: 'Loaded' });\r\n };\r\n script.onerror = (error) => resolve({ script: url, loaded: false, status: 'Load failed' });\r\n document.getElementsByTagName('head')[0].appendChild(script);\r\n }\r\n });\r\n}","import { useLayoutEffect } from 'react';\r\n//import useWindowScroll from '@react-hook/window-scroll';\r\nimport { au } from '../../components';\r\n\r\n/* background image height =\r\n + cutoff padding = always hidden padding - usually 10 px\r\n + panel height (desired parallax panel height)\r\n + padding height = panel height * padding height ratio\r\n + cutoff padding = always hidden padding - usually 10 px\r\n*/\r\n\r\nconst defaultSettings = {\r\n cutoffPadding: 10,\r\n speed: 15, // 5% of image/100px scroll\r\n //paddingHeightRatio: 0.3\r\n //screenSize\r\n}\r\n\r\nexport const ParallaxData = {\r\n settings: {\r\n screenSize: null\r\n },\r\n panels: [\r\n { selector: '.parallax', imageRatio: 1080 / 1920, panelHeight: 'auto' },\r\n ],\r\n elements: [],\r\n timeoutId: null\r\n}\r\n\r\nexport function useParallax() {\r\n const handleScroll = () => {\r\n //console.log('useParallax - scrolling')\r\n onScroll(ParallaxData);\r\n }\r\n\r\n const reset = () => {\r\n //console.log('useParallax - reset');\r\n setTimeout(() => { init(ParallaxData); handleScroll(); }, 300)\r\n }\r\n\r\n useLayoutEffect(() => {\r\n //console.log('useParallax - effect');\r\n setTimeout(() => { init(ParallaxData); handleScroll(); }, 300)\r\n if (typeof window !== `undefined`) {\r\n window.addEventListener('scroll', handleScroll)\r\n window.addEventListener('resize', reset)\r\n }\r\n return () => {\r\n //console.log('useParallax - removed');\r\n if (typeof window !== `undefined`) {\r\n window.removeEventListener('scroll', handleScroll)\r\n window.removeEventListener('resize', reset)\r\n }\r\n }\r\n\r\n // eslint-disable-next-line \r\n }, []);\r\n\r\n return { reset };\r\n};\r\n\r\n// export function useParallax(opt) {\r\n// // const settings = Object.assign({}, defaultSettings, opt);\r\n\r\n// const [resetCounter, setResetCounter] = useState(0);\r\n// const [parallaxData,] = useState(ParallaxData);\r\n\r\n// //const scrollY = useWindowScroll(60 /*fps*/)\r\n// const reset = () => {\r\n// setResetCounter(resetCounter + 1);\r\n// }\r\n\r\n// const handleScroll = () => {\r\n// onScroll(parallaxData);\r\n// }\r\n\r\n// useLayoutEffect(() => {\r\n// console.log('useParallax - effect');\r\n\r\n// setTimeout(() => { init(parallaxData); handleScroll(); }, 300)\r\n\r\n// //const handleScroll = (): void => setThrottledScroll(getScrollY())\r\n// window.addEventListener('scroll', handleScroll)\r\n// window.addEventListener('resize', handleScroll)\r\n// return (): void => {\r\n// window.removeEventListener('scroll', handleScroll)\r\n// window.removeEventListener('resize', handleScroll)\r\n// }\r\n\r\n// // eslint-disable-next-line \r\n// }, [resetCounter]);\r\n// //console.log(scrollY, resetCounter)\r\n\r\n// return { reset };\r\n// };\r\n\r\nexport function init(data) {\r\n //console.log('parallax init');\r\n const screenSize = data.settings.screenSize = au.getScreenSize();\r\n data.settings = Object.assign({}, defaultSettings, data.settings)\r\n let cnt = 0;\r\n data.panels.forEach(panel => {\r\n const elements = document.querySelectorAll(panel.selector) || [];\r\n for (let i = 0; i < elements.length; i++) {\r\n cnt++;\r\n const el = elements[i];\r\n //const el = document.querySelector(panel.selector);\r\n //console.log(panel.selector, el)\r\n //if (!el) { panel.el = null; return; }\r\n const autoPanelHeight = !panel.panelHeight || panel.panelHeight === 'auto';\r\n const panelHeight = autoPanelHeight ? el.offsetHeight : parseFloat(panel.panelHeight);\r\n //console.log(autoPanelHeight, panelHeight)\r\n\r\n const calculated = { shadowHeight: 0, shadowWidth: 0, fromTop: 0, toTop: 0 };\r\n // calculated.shadowHeight = panelHeight * (1 + data.settings.paddingHeightRatio) + 2 * data.settings.cutoffPadding;\r\n // calculated.shadowWidth = calculated.shadowHeight / panel.imageRatio;\r\n // if (calculated.shadowWidth < data.settings.screenSize.width) {\r\n // // magnifying the background image to fix the full width of the browser\r\n // calculated.shadowWidth = data.settings.screenSize.width;\r\n // calculated.shadowHeight = calculated.shadowWidth * panel.imageRatio;\r\n // }\r\n\r\n const speed = data.settings.speed * (screenSize.width > 1000 ? 1 : 2) \r\n let baseHeight = data.settings.screenSize.width * panel.imageRatio > panelHeight ? data.settings.screenSize.width * panel.imageRatio : panelHeight\r\n baseHeight = baseHeight + (data.settings.screenSize.height + panelHeight) * (speed * 0.01)\r\n calculated.shadowHeight = baseHeight + 2 * data.settings.cutoffPadding;\r\n calculated.shadowWidth = calculated.shadowHeight / panel.imageRatio;\r\n if (calculated.shadowWidth < data.settings.screenSize.width) {\r\n // magnifying the background image to fix the full width of the browser\r\n calculated.shadowWidth = data.settings.screenSize.width;\r\n calculated.shadowHeight = calculated.shadowWidth * panel.imageRatio;\r\n }\r\n\r\n calculated.fromTop = -data.settings.cutoffPadding;\r\n calculated.toTop = -calculated.shadowHeight + panelHeight + data.settings.cutoffPadding;\r\n\r\n if (!autoPanelHeight)\r\n (el).style.height = panel.panelHeight + 'px';\r\n\r\n (el).style.backgroundSize = calculated.shadowWidth + 'px ' + calculated.shadowHeight + 'px'\r\n\r\n //panel.el = el;\r\n panel.calculated = calculated;\r\n data.elements.push({ el: el, calculated: calculated });\r\n //console.log(panelHeight, baseHeight, calculated)\r\n }\r\n })\r\n\r\n //console.log('parallax init - ' + cnt)\r\n if (cnt === 0) {\r\n if (data.timeoutId) {\r\n try {\r\n if (typeof window !== `undefined`) { \r\n window.clearTimeout(data.timeoutId)\r\n }\r\n } catch(e){}\r\n }\r\n // reschedule\r\n if (typeof window !== `undefined`) { \r\n data.timeoutId = window.setTimeout(() => init(data), 500)\r\n }\r\n }\r\n}\r\n\r\n\r\nexport function onScroll(data) {\r\n //console.log(data);\r\n data.elements.forEach(element => {\r\n if (!element.el) return;\r\n const pr = au.getScrollProgress(element.el).progress;\r\n //console.log(pr);\r\n\r\n const min = element.calculated.fromTop;\r\n const max = element.calculated.toTop;\r\n const top = au.prVal(min, max, pr, [0, 1]);\r\n //console.log(top);\r\n (element.el).style.backgroundPositionY = top + 'px'\r\n })\r\n\r\n}","import { useMemo } from 'react';\r\nimport { useParams, useLocation, useHistory, useRouteMatch, Redirect } from 'react-router-dom';\r\nimport queryString from 'query-string';\r\n\r\nexport function useRouter() {\r\n const params = useParams();\r\n const location = useLocation();\r\n const history = useHistory();\r\n const match = useRouteMatch();\r\n\r\n // Return our custom router object\r\n // Memoize so that a new object is only returned if something changes\r\n return useMemo(() => {\r\n return {\r\n // For convenience add push(), replace(), pathname at top level\r\n navigate: history.push,\r\n push: history.push,\r\n Redirect: Redirect,\r\n replace: history.replace,\r\n pathname: location.pathname,\r\n path: location.pathname + location.hash + location.search,\r\n // Merge params and parsed query string into single \"query\" object\r\n // so that they can be used interchangeably.\r\n // Example: /:topic?sort=popular -> { topic: \"react\", sort: \"popular\" }\r\n query: {\r\n ...queryString.parse(location.search), // Convert string to object\r\n ...params\r\n },\r\n // Include match, location, history objects so we have\r\n // access to extra React Router functionality if needed.\r\n match,\r\n location,\r\n history\r\n };\r\n }, [params, match, location, history]);\r\n}","const initialState = {\r\n page: null,\r\n menu: null,\r\n popup: null,\r\n history: null\r\n};\r\n\r\nconst reducer = (state = initialState, action) => {\r\n //console.log('reducer', action)\r\n switch (action.type) {\r\n case 'SET_PAGE':\r\n return {\r\n ...state,\r\n page: action.payload\r\n };\r\n case 'SET_MENU':\r\n return {\r\n ...state,\r\n menu: action.payload\r\n };\r\n case 'SET_POPUP':\r\n return {\r\n ...state,\r\n popup: action.payload\r\n };\r\n case 'SET_HISTORY':\r\n return {\r\n ...state,\r\n history: action.payload\r\n };\r\n case 'SET_STATE':\r\n return {\r\n ...state,\r\n ...action.payload\r\n };\r\n default:\r\n throw new Error(\"Unexpected action\");\r\n }\r\n};\r\n\r\nexport { initialState, reducer };","import React, { createContext, useReducer, useContext, useEffect } from 'react';\r\nimport { initialState, reducer } from '../../store';\r\n\r\nconst StoreContext = createContext(initialState);\r\n\r\nconst StoreProvider = ({ children }) => {\r\n // Get state and dispatch from Reacts new API useReducer. \r\n const [state, dispatch] = useReducer(reducer, initialState);\r\n //console.log('StoreProvider')\r\n // Log new state\r\n useEffect(() => {\r\n //console.log('-- new state', state);\r\n //console.trace();\r\n }, [state]);\r\n // Render state, dispatch and special case actions\r\n return (\r\n \r\n {children}\r\n \r\n );\r\n};\r\nexport { StoreContext, StoreProvider };\r\n\r\nexport const useStore = () => useContext(StoreContext);","import { useStore } from '../../store';\r\n\r\n// loc data: {path:'', title:''}\r\nexport function useHistoryStore() {\r\n const { state, dispatch } = useStore();\r\n const history = state.history || [];\r\n\r\n function push(loc) {\r\n const same = history.length > 0 \r\n && (JSON.stringify(history[history.length - 1]) === JSON.stringify(loc))\r\n if (!same) {\r\n // console.log(JSON.stringify(history[history.length - 1]), JSON.stringify(loc))\r\n setHistory([...history, loc]);\r\n }\r\n }\r\n\r\n function setHistory(history){\r\n // console.log('history set', history)\r\n dispatch({ type: 'SET_HISTORY', payload: history })\r\n }\r\n\r\n const last = () => {\r\n // console.log('last history', history)\r\n if (history.length < 2) return null;\r\n return history[history.length - 2].path;\r\n }\r\n\r\n const pop = () => {\r\n if (history.length === 0) return null;\r\n history.pop(); // remove the current first\r\n const item = history.pop();\r\n return item;\r\n }\r\n\r\n return { history, push, pop, last };\r\n};","import utils from '../../utils';\r\n\r\nexport function handleElementLink(el, externalHandler) {\r\n // externalHandler = (url) => {\r\n // if (typeof window !== `undefined`) window.location.href = url;\r\n // }\r\n\r\n const link = utils.url.getLinkFromElement(el);\r\n const linkInfo = utils.url.getLinkInfo(link);\r\n //console.log(link, linkInfo)\r\n if (!linkInfo) return { handled: false, linkInfo: linkInfo };\r\n\r\n if (linkInfo.type === 'hash') {\r\n utils.ui.scrollTo(linkInfo.url);\r\n } else if (linkInfo.type === 'tel' || linkInfo.type === 'mailto') {\r\n\r\n } else if (linkInfo.type === 'external' && externalHandler) {\r\n // let the external handler process.\r\n externalHandler(linkInfo.url);\r\n return { handled: true, linkInfo: linkInfo };;\r\n }\r\n return { handled: false, linkInfo: linkInfo };\r\n}","import React from \"react\";\r\nimport { Link } from \"react-router-dom\";\r\nimport utils from \"../../utils\";\r\nimport { handleElementLink } from \"./handleLink\";\r\n\r\nexport function SiteLink(props) {\r\n const { children, to, target, onClick, ...other } = props;\r\n\r\n function goToLink(e) {\r\n try {\r\n const isCmsEdit = document.querySelector(\"body\").classList.contains(\"cmsedit\");\r\n if (isCmsEdit) {\r\n e.preventDefault();\r\n return;\r\n }\r\n } catch (e) {}\r\n\r\n //console.log(e, e.target);\r\n if (onClick) onClick(e);\r\n const processed = handleElementLink(e.target);\r\n //console.log(processed)\r\n if (processed.handled) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n }\r\n\r\n return utils.url.isExternalLink(to) ? (\r\n goToLink(e)} {...other}>\r\n {children}\r\n \r\n ) : (\r\n goToLink(e)} {...other}>\r\n {children}\r\n \r\n );\r\n}\r\n","import { css } from '@emotion/core'\r\nimport { mixin, mq } from '../../cssInJs'\r\n\r\nexport default {\r\n tiles: css(mq({\r\n marginLeft: [0, -5, null, -10],\r\n marginRight: [0, -5, null, -10],\r\n display: 'flex',\r\n justifyContent: 'center',\r\n flexWrap: 'wrap'\r\n })),\r\n tile: css(mq({\r\n flexBasis: ['50%', '33.33%', '25%', '25%', '20%', '16.66%'],\r\n padding: [0, 5, null, 10],\r\n cursor: 'pointer'\r\n })),\r\n tileImage: css({\r\n position: 'relative',\r\n display: 'block',\r\n ':after': { ...mixin.overlay() },\r\n ':hover, :focus': {\r\n ':after': {\r\n backgroundColor: 'rgba(0, 0, 0, 0.2)'\r\n }\r\n }\r\n }),\r\n tileIcon: css({\r\n position: 'absolute',\r\n top: 10,\r\n right: 10,\r\n fontSize: 30,\r\n color: 'white',\r\n zIndex: 1\r\n })\r\n}","import React from 'react';\r\n/** @jsx jsx */\r\nimport { jsx } from '@emotion/core'\r\nimport env from '../../env';\r\nimport utils from '../../utils';\r\nimport { useGet, ErrorPopup, Loading } from '../../components';\r\nimport style from './feedStyle';\r\nimport {FaRegCaretSquareRight, FaRegClone} from 'react-icons/fa';\r\n\r\nexport function InstagramFeed(props){\r\n const get = useGet();\r\n\r\n React.useEffect(() => {\r\n get.send(env.apiBase + `/api/instagram/GetInstagramFeeds`);\r\n // eslint-disable-next-line\r\n }, []);\r\n\r\n if (get.loading()) {\r\n return \r\n } else if (get.hasErrors()) {\r\n return \r\n }\r\n\r\n // console.log(get)\r\n const data = get.response;\r\n if (data.length === 0) return null\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction Feeds({posts}) {\r\n const numOfTileLines = 2;\r\n const bp = utils.ui.getCurrentBreakpoint();\r\n const tilesPerLine = {xs:2, sm:3, md:4, lg:4, xl:5, xxl:6}\r\n const numOfPost = numOfTileLines * (tilesPerLine[bp] || 6);\r\n console.log(bp, numOfTileLines, numOfPost)\r\n const displayingPosts = posts.length > numOfPost ? posts.slice(0, numOfPost) : posts;\r\n\r\n return (\r\n
\r\n {displayingPosts.map((item, index) =>\r\n )}\r\n
\r\n )\r\n}\r\n\r\nfunction Feed({item}) {\r\n return (\r\n \r\n )\r\n}","// https://www.pluralsight.com/guides/re-render-react-component-on-window-resize\r\nexport function debounce(fn, ms) {\r\n let timer\r\n return _ => {\r\n clearTimeout(timer)\r\n timer = setTimeout(_ => {\r\n timer = null\r\n fn.apply(this, arguments)\r\n }, ms)\r\n };\r\n}","import utils from '../../utils';\r\n\r\nexport function loadApi(onApiReady) {\r\n if (typeof window !== `undefined` && !window.YT) { // If not, load the script asynchronously\r\n const tag = document.createElement('script');\r\n tag.src = 'https://www.youtube.com/iframe_api';\r\n tag.id = 'youtubeIframeApJaba';\r\n\r\n // onYouTubeIframeAPIReady will load the video after the script is loaded\r\n window.onYouTubeIframeAPIReady = () => onApiReady(true);\r\n\r\n const firstScriptTag = document.getElementsByTagName('script')[0];\r\n firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\r\n } else { // If script is already there, load the video directly\r\n onApiReady(false);\r\n }\r\n\r\n}\r\n\r\n// export function player(playerId, videoId, playerVars = {}, events = {}) {\r\n// //let player = null;\r\n// const defaultPlayerVars = {\r\n// 'autoplay': 1,\r\n// 'controls': 0,\r\n// 'loop': 1,\r\n// 'showinfo': 0,\r\n// 'rel': 0,\r\n// 'modestbranding': 1,\r\n// 'origin': window.location.origin,\r\n// 'allowfullscreen': true,\r\n// 'wmode': 'transparent'\r\n// }\r\n// const defaultEvents = {\r\n// 'onStateChange': (e) => { },\r\n// 'onReady': (e) => { console.log('onReady'); player.mute() },\r\n// 'onError': (e) => { console.log(e) }\r\n// }\r\n\r\n// const player = new window.YT.Player(playerId, {\r\n// videoId: videoId,\r\n// playerVars: Object.assign({}, defaultPlayerVars, playerVars),\r\n// events: Object.assign({}, defaultEvents, events),\r\n// });\r\n// return player;\r\n// }\r\n\r\nexport function thumbnailMax(videoId){\r\n return `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`\r\n}\r\n\r\n// onPlayerStateChange(event){\r\n// switch (event.data){\r\n// case window['YT'].PlayerState.PLAYING:\r\n// //console.log('Playing');\r\n// //this.player.mute();\r\n// break;\r\n// case window['YT'].PlayerState.PAUSED:\r\n// //console.log('Pafdsu');\r\n// break;\r\n// case window['YT'].PlayerState.ENDED:\r\n// //console.log('ended ');\r\n// //this.player.playVideo();\r\n// this.player.stopVideo();\r\n// break;\r\n// }\r\n// }\r\n\r\n// toggleBannerYoutueInCMS(toggleItem:string){ \r\n// if(toggleItem == 'youtube'){\r\n// //location.reload();\r\n// this.toggleBannerOrYoutube = toggleItem;\r\n// this.player.playVideo();\r\n// this.init();\r\n// }\r\n// else{\r\n// this.toggleBannerOrYoutube = toggleItem;\r\n// this.player.stopVideo();\r\n// }\r\n// }\r\n\r\n\r\nexport function getYoutubeCode(src) {\r\n // if (src.indexOf('http') >= 0) {\r\n // if (src.indexOf('v=') >= 0) {\r\n // return src.split('v=')[1];\r\n // }\r\n // }\r\n // return src;\r\n return utils.url.getYoutubeId(src);\r\n}","import React from 'react';\r\nimport utils from '../../utils';\r\nimport * as yt from './iframeApi';\r\nimport { FaRegPlayCircle } from 'react-icons/fa';\r\nimport { useStore } from '../../store';\r\n\r\nexport function YoutubeEmbedPopup({ url, title, posterUrl }) {\r\n const { dispatch } = useStore();\r\n\r\n const videoId = yt.getYoutubeCode(url);\r\n const posterImageUrl = utils.site.resourcePath(posterUrl || yt.thumbnailMax(videoId));\r\n const [popupIndex, setPopupIndex] = React.useState(0);\r\n\r\n function openVideo() {\r\n setPopupIndex(popupIndex + 1);\r\n dispatch({ type: 'SET_POPUP', payload: { sources: [\r\n // \r\n 'https://www.youtube.com/watch?v=' + videoId\r\n ], popupIndex: popupIndex + 1} });\r\n }\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n","function payload(item, key, defaultVal = '') {\n const found = item.payloads.find(x => x.key === key);\n return found ? found.value : defaultVal;\n}\n\nfunction getCodeJson(item) {\n const code = payload(item, 'Code');\n const codeType = payload(item, 'CodeType');\n if (codeType === 'Json') {\n const codeJson = JSON.parse(code);\n return codeJson\n }\n return null\n}\n\n\nfunction hasItemInPageDataByItemTypeCode(pageData, itemTypeCode) {\n return hasItemInPageData(pageData, item => item.itemTypeCode === itemTypeCode);\n}\n\n// hasItemInPageData(cmsOption.pageData, '')\n// matchFn = (item) => item.itemTypeCode === itemTypeCode\nfunction hasItemInPageData(pageData, matchFn) {\n if (!pageData) return false;\n for (let i = 0; i < pageData.sections.length; i++) {\n if (hasItemInItems(pageData.sections[i].items, matchFn)) return true;\n }\n return false;\n}\n\nfunction hasItemInItems(items, matchFn) {\n if (!items) return false;\n for (let i = 0; i < items.length; i++) {\n if (matchFn(items[i])) return true;\n if (hasItemInItems(items[i].items, matchFn)) return true;\n }\n return false;\n}\n\nexport default { payload, getCodeJson, hasItemInPageData, hasItemInItems, hasItemInPageDataByItemTypeCode };","import React from 'react';\nimport cmsUtils from '../cmsUtils';\nimport { InstagramFeed } from 'components';\nimport { isOffline } from '@site/_offline';\n\nexport const renderRule = {\n match: (item, cmsOption) => (cmsUtils.getCodeJson(item) || {})['control'] === 'instagram', \n itemElt: (item, cmsOption) => (!isOffline() && )\n}","// export { getOfflinePage, getOperators, getOperator, getOperatorById, getFeaturedOperators, getDestination, getExpTypes, getExpType } from './dbSelect'\n// export { indexOfflineData } from './dbInsert'\n// export { addCache, checkCache, existInCache, getAllImagesInCache } from './cache'\n// export { getOfflineMedia } from './media'\n// export { initInstallEventHandler, isInPWA } from './pwa'\n// export { isIOS } from './device'\n\nexport function isOffline() {\n // return true;\n return !navigator.onLine;\n}\n\n\nexport async function getStorageInfo() {\n const messages = []\n if (!('indexedDB' in window)) {\n console.log('not supported')\n }\n if ('caches' in window) {\n messages.push('Cache available')\n }\n if (navigator.storage && navigator.storage.estimate) {\n const quota = await navigator.storage.estimate();\n // quota.usage -> Number of bytes used.\n // quota.quota -> Maximum number of bytes available.\n const percentageUsed = ((quota.usage / quota.quota) * 100).toFixed(2);\n messages.push(`You've used ${percentageUsed}% of the available storage.`);\n const remaining = ((quota.quota - quota.usage) / 1024 / 1024).toFixed(2);\n messages.push(`You can write up to ${remaining} more MBs.`);\n }\n\n if (navigator.storage && navigator.storage.persist) {\n const persistent = await navigator.storage.persist();\n if (persistent)\n messages.push(\"Storage will not be cleared except by explicit user action\");\n else\n messages.push(\"Storage may be cleared by the UA under storage pressure.\");\n }\n\n return messages;\n}\n","export function findControl(controlNameOrIndex, root) {\r\n if (typeof controlNameOrIndex === 'number' && root && root.controls.length > controlNameOrIndex) return root.controls[controlNameOrIndex];\r\n return findControlTraverse(controlNameOrIndex, root);\r\n}\r\n\r\nfunction findControlTraverse(controlName, control) {\r\n if (!control) return null;\r\n if (control.name === controlName) return control;\r\n if (control.controls && control.controls.length > 0) {\r\n for (let i = 0; i < control.controls.length; i++) {\r\n const found = findControlTraverse(controlName, control.controls[i]);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nexport function findControlById(id, root) {\r\n return findControlByIdTraverse(id, root);\r\n}\r\n\r\nfunction findControlByIdTraverse(id, control) {\r\n if (!control) return null;\r\n if (control.id === id) return control;\r\n if (control.controls && control.controls.length > 0) {\r\n for (let i = 0; i < control.controls.length; i++) {\r\n const found = findControlByIdTraverse(id, control.controls[i]);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nexport function getValue(root) {\r\n //console.log(root)\r\n return getValueTraverse(root);\r\n}\r\n\r\nconst helperFns = {\r\n getValueTraverse: getValueTraverse,\r\n getFilesTraverse: getFilesTraverse\r\n}\r\n\r\nfunction getKeyValueTraverse(control) {\r\n let keyValue = {};\r\n keyValue[control.name] = getValueTraverse(control);\r\n return keyValue\r\n}\r\n\r\nfunction getValueTraverse(control) {\r\n //console.log(control);\r\n if (control.controlType === 'control') {\r\n if (control.customValueFn)\r\n return control.customValueFn(control, helperFns);\r\n\r\n return control.value;\r\n } else if (control.controlType === 'group') {\r\n if (control.customValueFn)\r\n return control.customValueFn(control, helperFns);\r\n\r\n let value = {};\r\n for (let i = 0; i < control.controls.length; i++) {\r\n value = { ...value, ...getKeyValueTraverse(control.controls[i]) };\r\n }\r\n return value;\r\n } else if (control.controlType === 'array') {\r\n if (control.customValueFn)\r\n return control.customValueFn(control, helperFns);\r\n\r\n const array = [];\r\n for (let i = 0; i < control.controls.length; i++) {\r\n array.push(getValueTraverse(control.controls[i]))\r\n }\r\n return array;\r\n }\r\n return null;\r\n}\r\n\r\nexport function getFiles(root) {\r\n //console.log(root)\r\n return getFilesTraverse(root);\r\n}\r\n\r\nfunction getFilesTraverse(control) {\r\n if (control.controlType === 'control') {\r\n return control.files ? [{ name: control.name, files: control.files }] : [];\r\n } else if (control.controlType === 'group') {\r\n let files = [];\r\n for (let i = 0; i < control.controls.length; i++) {\r\n files.push(...getFilesTraverse(control.controls[i]));\r\n }\r\n return files;\r\n } else if (control.controlType === 'array') {\r\n let files = [];\r\n for (let i = 0; i < control.controls.length; i++) {\r\n files.push(...getFilesTraverse(control.controls[i]));\r\n }\r\n return files;\r\n }\r\n return [];\r\n}","//import uuid from 'uuid/v4';\r\nimport shortid from 'shortid';\r\nimport * as formModelHelper from './formModelHelper';\r\n\r\n//#region helpers\r\nfunction findIndexById(id) {\r\n for (let i = 0; i < this.controls.length; i++) {\r\n if (this.controls[i].id === id) return i;\r\n }\r\n return -1;\r\n}\r\n//#endregion\r\n\r\nconst group = (controls) => {\r\n const controlArray = [];\r\n //console.log('group', controls, typeof controls);\r\n if (controls && typeof controls === 'object') {\r\n Object.keys(controls).forEach((key) => {\r\n controlArray.push(abstractControl(key, controls[key]));\r\n });\r\n }\r\n\r\n const ctrl = {\r\n controlType: 'group',\r\n id: shortid(),\r\n controls: controlArray,\r\n find: (name) => controlArray.find((x) => x.name === name),\r\n customValueFn: null, // function\r\n disableValidators: false,\r\n };\r\n ctrl.getValue = () => formModelHelper.getValue(ctrl);\r\n ctrl.controls.forEach((x) => (x.parent = ctrl));\r\n\r\n return ctrl;\r\n};\r\n\r\nconst array = (controls) => {\r\n //console.log('array', controls);\r\n const ctrl = {\r\n controlType: 'array',\r\n id: shortid(),\r\n controls: controls,\r\n findIndexById: findIndexById,\r\n };\r\n ctrl.getValue = () => formModelHelper.getValue(ctrl);\r\n ctrl.controls.forEach((x) => (x.parent = ctrl));\r\n\r\n return ctrl;\r\n};\r\n\r\nconst abstractControl = (name, controlObject) => {\r\n //console.log('abstractControl', name, controlObject);\r\n if (!controlObject) return null;\r\n // array or group\r\n if (controlObject.controlType) {\r\n controlObject.name = name;\r\n return controlObject;\r\n } else {\r\n return control(name, controlObject);\r\n }\r\n};\r\n\r\nconst control = (name, [value, validators, controlOptions]) => {\r\n //const { label, type, options, style } = controlOptions || {};\r\n //console.log(value, validators, label, type, options)\r\n return {\r\n ...{\r\n controlType: 'control',\r\n id: shortid(),\r\n name: name,\r\n value: value,\r\n validators: validators || [],\r\n touched: false,\r\n incomplete: false,\r\n findValidator: (type) => (validators || []).find((x) => x.type === type),\r\n // label: label,\r\n // type: type,\r\n // options: options,\r\n // style: style\r\n },\r\n ...controlOptions,\r\n };\r\n};\r\n\r\nexport default { group, array };\r\n","import utils from '../../utils';\r\n\r\nexport function hasRequiredValidator(control) {\r\n if (!control) return false;\r\n return !!control.findValidator('required')\r\n}\r\n\r\nexport function getNameForValidator(label, name) {\r\n return utils.text.toFieldName(label || name);\r\n}\r\n\r\nexport function getValidatorOptions(params) {\r\n const defaultOpt = { continueToValidate: false }\r\n return params ? { ...defaultOpt, ...params } : defaultOpt;\r\n}\r\n\r\nexport function createValidator(type, message, opt, validate) {\r\n const validator =\r\n {\r\n type: type,\r\n disabled: false,\r\n ...getValidatorOptions(opt),\r\n message: message,\r\n validate: validate\r\n }\r\n return validator;\r\n}","import { createValidator, getNameForValidator } from '../validatorHelper';\r\n\r\nexport function Required(message = null, opt = null) {\r\n return createValidator('required', message, opt, function(control, e, validateOpt) {\r\n if (validateOpt.triggeredByChange && control.incomplete) return null;\r\n return isEmpty(control.value) ? (message || (getNameForValidator(control.label, control.name) + ' is required.')) : null\r\n })\r\n}\r\n\r\nfunction isEmpty(val) {\r\n if (Array.isArray(val))\r\n return val.length === 0;\r\n return !val && val !== 0;\r\n}\r\n","import { createValidator, getNameForValidator } from '../validatorHelper';\r\n\r\nexport function Email(message = null, opt = null) {\r\n return createValidator('email', message, opt, function(control, e, validateOpt) {\r\n if (validateOpt.triggeredByChange && control.incomplete) return null;\r\n // only validate for blur keydown tab\r\n if (e && e.type === 'change') return null;\r\n return !isEmpty(control.value) && !isValidEmail(control.value) ? (message || (getNameForValidator(control.label, control.name) + ' - Invalid email.')) : null\r\n })\r\n}\r\n\r\n\r\nexport const isValidEmail = mail => {\r\n const regex = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return regex.test(mail);\r\n}\r\n\r\nfunction isEmpty(val) {\r\n if (Array.isArray(val))\r\n return val.length === 0;\r\n return !val && val !== 0;\r\n}\r\n","import { createValidator, getNameForValidator } from '../validatorHelper';\r\nimport utils from '../../../utils';\r\n\r\nexport function ValidateDate(message = null, opt = null) {\r\n return createValidator('date', message, opt, function (control, e, validateOpt) {\r\n if (validateOpt.triggeredByChange && control.incomplete) return null;\r\n return !isDate(control.value) ? message || getNameForValidator(control.label, control.name) + ' is invalid.' : null;\r\n });\r\n}\r\n\r\nexport function PastDate(message = null, opt = null) {\r\n return createValidator('past-date', message, opt, function (control, e, validateOpt) {\r\n if (validateOpt.triggeredByChange && control.incomplete) return null;\r\n return !isPast(control.value) ? message || getNameForValidator(control.label, control.name) + ' is invalid.' : null;\r\n });\r\n}\r\n\r\nexport function PastDateNullAllowed(message = null, opt = null) {\r\n return createValidator('past-date', message, opt, function (control, e, validateOpt) {\r\n if (validateOpt.triggeredByChange && control.incomplete) return null;\r\n return control.value && !isPast(control.value) ? message || getNameForValidator(control.label, control.name) + ' is invalid.' : null;\r\n });\r\n}\r\n\r\nfunction isDate(val) {\r\n if (val) {\r\n const date = utils.date.toDate(val);\r\n return !!date;\r\n }\r\n return false;\r\n}\r\n\r\nfunction isPast(val) {\r\n if (val) {\r\n const date = utils.date.toDate(val);\r\n //console.log(date, typeof date)\r\n if (date) {\r\n const now = new Date();\r\n return date.getTime() < now.getTime();\r\n }\r\n }\r\n return false;\r\n}\r\n","import { createValidator, getNameForValidator } from '../validatorHelper';\r\n\r\nexport function Length(message = null, opt = null) {\r\n return createValidator('email', message, opt, function(control, e, validateOpt, validator) {\r\n if (validateOpt.triggeredByChange && control.incomplete) return null;\r\n return !isValidLength(control.value, validator) ? (message || (getNameForValidator(control.label, control.name) + ' - Invalid length.')) : null\r\n })\r\n}\r\n\r\n\r\nexport const isValidLength = (text, validator) => {\r\n const length = (text || '').length;\r\n if (validator.min && length < validator.min) return false;\r\n if (validator.max && length > validator.max) return false;\r\n return true;\r\n}\r\n","import { Required } from './validators/required';\r\nimport { Email } from './validators/email';\r\nimport { ValidateDate, PastDate, PastDateNullAllowed } from './validators/date';\r\nimport { Length } from './validators/length';\r\n\r\nconst validateControl = (control, e, validateOpt) => {\r\n const errors = [];\r\n const validators = control.validators || [];\r\n for (let i = 0; i < validators.length; i++) {\r\n const validator = validators[i];\r\n if (!validator.disabled) {\r\n const error = validator.validate && validator.validate(control, e, validateOpt, validator);\r\n if (error) {\r\n errors.push(error);\r\n //console.log(error, control, validator, e)\r\n\r\n if (!validator.continueToValidate) break;\r\n }\r\n }\r\n }\r\n control.errors = errors;\r\n return errors;\r\n};\r\n\r\nexport default {\r\n Required,\r\n Email,\r\n Date: ValidateDate,\r\n PastDate,\r\n PastDateNullAllowed,\r\n Length,\r\n validateControl,\r\n};\r\n","import utils from '../../utils';\r\nimport React from 'react';\r\nimport { hasRequiredValidator } from './validatorHelper';\r\n\r\nexport function getLabel(control, formOption) {\r\n //console.log(label, label == null, label === null, name, label || name)\r\n const { label, name } = control\r\n const requiredMark = hasRequiredValidator(control) && (formOption.requiredMark || '*')\r\n if (label === null) return \"\";\r\n return <>\r\n \r\n {requiredMark && {requiredMark}}\r\n ;\r\n}\r\n\r\nexport function getLabelAsString(control, formOption) {\r\n //console.log(label, label == null, label === null, name, label || name)\r\n const { label, name } = control\r\n const requiredMark = hasRequiredValidator(control) && (formOption.requiredMark || '*')\r\n if (label === null) return \"\";\r\n \r\n return (label || utils.text.toFieldName(name)) + (requiredMark ? requiredMark : '');\r\n}","import React from 'react';\r\n\r\nconst ValidationAlert = ({ errors }) => {\r\n if (!errors || errors.length === 0) return null;\r\n return
') }}>
\r\n}\r\n\r\nexport default ValidationAlert;","import * as React from 'react';\r\nimport ValidationAlert from '../components/ValidationAlert';\r\nimport utils from '../../../utils';\r\nimport { getLabel, getLabelAsString } from '../formRenderHelper';\r\n\r\nfunction TextInput({ control, handleChange, formOption }) {\r\n const { name, label, type, value, errors, style, helpText, attrs, forceUsePlaceholder } = control;\r\n //const { template = 'bootstrap', usePlaceholder = false } = formOption;\r\n const fieldId = utils.random.shortId();\r\n const { usePlaceholder = false } = formOption;\r\n const fieldLabel = getLabel(control, formOption);\r\n //console.log(control, formOption)\r\n const placeHolder = usePlaceholder ? getLabelAsString(control, formOption) : null;\r\n let valueStr = value === 0 ? 0 : (value || \"\");\r\n if (type === 'date' && value) {\r\n valueStr = utils.date.formatYYYYMMDD(value);\r\n }\r\n\r\n let prependText = null;\r\n if (style && style.prependText) {\r\n prependText = style.prependText\r\n }\r\n //console.log(name, !!(style && style.autoFocus))\r\n //const autoFocus = !!(style && style.autoFocus)\r\n\r\n function keyDown(e) {\r\n //console.log(e.key)\r\n if (e.key === \"Enter\" || e.key === 'Tab') {\r\n handleChange(e, control)\r\n }\r\n }\r\n function changed(e) {\r\n //console.log('changed', name, e.target.value)\r\n handleChange(e, control)\r\n }\r\n function blur(e) {\r\n //console.log('blur', name, e.target.value)\r\n handleChange(e, control)\r\n }\r\n\r\n // function focus(e) {\r\n // console.log('focus', name, e.target.value)\r\n // }\r\n\r\n return (\r\n
\r\n {!usePlaceholder && fieldLabel && }\r\n
\r\n {prependText &&
\r\n
{prependText}
\r\n
\r\n }\r\n\r\n handleChange(e, control)} \r\n // onBlur={(e) => handleChange(e, control, true)}\r\n onChange={changed}\r\n onKeyDown={keyDown}\r\n onBlur={blur}\r\n autoComplete=\"new-password\"\r\n //onFocus={focus}\r\n //autoFocus={autoFocus}\r\n placeholder={(forceUsePlaceholder && forceUsePlaceholder !== '') ? forceUsePlaceholder : placeHolder}\r\n className={\"form-control\" + (errors && errors.length > 0 ? ' is-invalid' : '')} {...attrs} />\r\n
\r\n {helpText &&
}\r\n \r\n
\r\n )\r\n}\r\n\r\nexport default TextInput;","import React from 'react';\r\nimport ValidationAlert from '../components/ValidationAlert';\r\nimport utils from '../../../utils';\r\nimport { getLabel } from '../formRenderHelper';\r\n\r\nfunction RadioListInput({ control, handleChange, formOption }) {\r\n const { name, label, value, errors, style, options, helpText, helpLabelText, attrs } = control;\r\n const fieldId = utils.random.shortId();\r\n const fieldLabel = getLabel(control, formOption);\r\n return (\r\n
\r\n {fieldLabel && }\r\n
\r\n {options && options.map((option, index) =>\r\n
\r\n handleChange(e, control)}\r\n value={option.value} id={fieldId + '_' + index} {...attrs} />\r\n \r\n {\r\n (option.helpText && option.helpText !== '') &&\r\n \r\n }\r\n
)}\r\n
\r\n {helpText &&
}\r\n \r\n
\r\n )\r\n}\r\n\r\nfunction checked(value, optionValue) {\r\n if (optionValue === null || typeof optionValue === 'undefined') return false;\r\n return value === optionValue;\r\n}\r\n\r\nexport default RadioListInput;","import React from 'react';\r\nimport ValidationAlert from '../components/ValidationAlert';\r\nimport utils from '../../../utils';\r\nimport { getLabel } from '../formRenderHelper';\r\n\r\nconst CheckboxListInput = ({ control, handleChange, formOption }) => {\r\n const { name, label, value, errors, style, options, helpText, attrs } = control;\r\n const fieldId = utils.random.shortId();\r\n const fieldLabel = getLabel(control, formOption);\r\n const values = value ? [...value] : [];\r\n return (\r\n
\r\n {fieldLabel && }\r\n
\r\n
\r\n {options && options.map((option, index) =>\r\n
\r\n handleChange(e, control)}\r\n value={option.value} id={fieldId + '_' + index} {...attrs}/>\r\n \r\n
)}\r\n\r\n
\r\n
\r\n {helpText &&
}\r\n \r\n
\r\n )\r\n}\r\n\r\nfunction checked(values, value) {\r\n if (value === null || typeof value === 'undefined') return false;\r\n return values.includes(value);\r\n}\r\n\r\nexport default CheckboxListInput;","import * as React from 'react';\r\nimport ValidationAlert from '../components/ValidationAlert';\r\nimport utils from '../../../utils';\r\nimport { getLabel } from '../formRenderHelper';\r\n\r\nfunction DateSeparateInput({ control, handleChange, formOption }) {\r\n //const { name, label, value, errors, style } = control;\r\n const { name, label, errors, style, helpText, attrs } = control;\r\n const thisYear = (new Date()).getFullYear();\r\n //console.log(name, value)\r\n const [year, setYear] = React.useState('')\r\n const [month, setMonth] = React.useState('')\r\n const [day, setDay] = React.useState('')\r\n\r\n //const { template = 'bootstrap', usePlaceholder = false } = formOption;\r\n const fieldId = utils.random.shortId();\r\n const { usePlaceholder = false } = formOption;\r\n const fieldLabel = getLabel(control, formOption);\r\n //console.log(label, name + '|'+ fieldLabel)\r\n //const placeHolder = usePlaceholder ? fieldLabel : null;\r\n // let valueStr = value === 0 ? 0 : (value || \"\");\r\n // if (type === 'date' && value) {\r\n // valueStr = utils.date.formatYYYYMMDD(value);\r\n // }\r\n\r\n function handleChangeDay(e) {\r\n setDay(e.target.value)\r\n handleChangeInner(year, month, e.target.value)\r\n }\r\n\r\n function handleChangeMonth(e) {\r\n setMonth(e.target.value)\r\n handleChangeInner(year, e.target.value, day)\r\n }\r\n\r\n function handleChangeYear(e) {\r\n setYear(e.target.value)\r\n handleChangeInner(e.target.value, month, day)\r\n }\r\n\r\n function handleChangeInner(yyyy, mm, dd) {\r\n control.incomplete = !(yyyy !== '' && mm !== '' && dd !== '')\r\n const newVal = yyyy + '-' + mm + '-' + dd;\r\n //console.log(newVal)\r\n //mimic event\r\n handleChange({\r\n persist: () => { },\r\n target: { name: name, value: newVal, checked: false }\r\n }, control)\r\n }\r\n\r\n //const monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\r\n const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\r\n const selectStyle = { width: 'auto', display: 'inline-block', marginRight: '0.5em' };\r\n\r\n const fromYear = style && style.recentYear ? thisYear : thisYear - 10;\r\n const recentYear = style && style.recentYear ? style.recentYear : 100;\r\n return (\r\n
\r\n {!usePlaceholder && fieldLabel && }\r\n
\r\n \r\n \r\n \r\n
\r\n {helpText &&
}\r\n \r\n
\r\n )\r\n}\r\n\r\nexport default DateSeparateInput;","import * as React from 'react';\r\nimport ValidationAlert from '../components/ValidationAlert';\r\nimport utils from '../../../utils';\r\nimport { getLabel } from '../formRenderHelper';\r\n\r\nfunction FileInput({ control, handleChange, formOption }) {\r\n const { name, label, type, value, errors, style, helpText, attrs } = control;\r\n //const { template = 'bootstrap', usePlaceholder = false } = formOption;\r\n const fieldId = utils.random.shortId();\r\n const { usePlaceholder = false } = formOption;\r\n const fieldLabel = getLabel(control, formOption);\r\n //console.log(label, control)\r\n const placeHolder = usePlaceholder ? fieldLabel : null;\r\n let valueStr = value === 0 ? 0 : (value || \"\");\r\n if (type === 'date' && value) {\r\n valueStr = utils.date.formatYYYYMMDD(value);\r\n }\r\n return (\r\n
\r\n {!usePlaceholder && fieldLabel && }\r\n
\r\n handleChange(e, control)} onBlur={(e) => handleChange(e, control)}\r\n placeholder={placeHolder}\r\n className={\"form-control-file\" + (errors && errors.length > 0 ? ' is-invalid' : '')} {...attrs}/>\r\n
\r\n \r\n
\r\n { valueStr === '' ? 'No File Chosen' : valueStr.replace(/^.*\\\\/, \"\")}\r\n
\r\n
\r\n
\r\n {helpText &&
}\r\n \r\n
\r\n )\r\n}\r\n\r\nexport default FileInput;","import TextInput from './TextInput';\r\nimport RadioListInput from './RadioListInput';\r\nimport TextareaInput from './TextareaInput';\r\nimport CheckboxInput from './CheckboxInput';\r\nimport CheckboxListInput from './CheckboxListInput';\r\nimport SelectInput from './SelectInput';\r\nimport HiddenInput from './HiddenInput';\r\n//import HtmlInput from './HtmlInput';\r\nimport DateSeparateInput from './DateSeparateInput';\r\nimport FileInput from './FileInput';\r\n\r\nconst Components = { TextInput, RadioListInput, TextareaInput, CheckboxInput, CheckboxListInput, SelectInput, HiddenInput, DateSeparateInput, FileInput };\r\n\r\nconst capitalize = expression => expression.charAt(0).toUpperCase() + expression.slice(1);\r\n\r\nexport function getControl(control, formOption) {\r\n let Component = null;\r\n if (control.type === 'number' || control.type === 'email' || control.type === 'date' || control.type === 'password' || control.type === 'tel')\r\n Component = TextInput;\r\n else if (control.type === \"dob\")\r\n Component = DateSeparateInput;\r\n else\r\n Component = Components[capitalize(control.type || '') + 'Input'];\r\n\r\n return Component;\r\n}\r\n\r\n","import React from \"react\";\r\nimport ValidationAlert from \"../components/ValidationAlert\";\r\nimport utils from \"../../../utils\";\r\nimport { getLabel, getLabelAsString } from \"../formRenderHelper\";\r\n\r\nfunction TextareaInput({ control, handleChange, formOption }) {\r\n const { name, label, type, value, errors, style, helpText, attrs } = control;\r\n const fieldId = utils.random.shortId();\r\n const fieldLabel = getLabel(control, formOption);\r\n //const { template = 'bootstrap', usePlaceholder = false } = formOption;\r\n const { usePlaceholder = false } = formOption;\r\n const placeHolder = usePlaceholder\r\n ? getLabelAsString(control, formOption)\r\n : null;\r\n const valueStr = value === 0 ? 0 : value || \"\";\r\n\r\n const textAreaRef = React.useRef(null);\r\n const [textAreaHeight, setTextAreaHeight] = React.useState(\"auto\");\r\n const [parentHeight, setParentHeight] = React.useState(\"auto\");\r\n\r\n React.useEffect(() => {\r\n const disableAutoHeight = (style && style.disableAutoHeight) || false;\r\n if (!disableAutoHeight) {\r\n if (textAreaRef.current) {\r\n const h =\r\n textAreaRef.current.scrollHeight > 60\r\n ? textAreaRef.current.scrollHeight\r\n : 60;\r\n setParentHeight(`${h}px`);\r\n setTextAreaHeight(`${h}px`);\r\n }\r\n }\r\n }, [valueStr, style]);\r\n\r\n function onChangeInternal(e) {\r\n const disableAutoHeight = (style && style.disableAutoHeight) || false;\r\n if (!disableAutoHeight) {\r\n setTextAreaHeight(\"auto\");\r\n if (textAreaRef.current) {\r\n const h =\r\n textAreaRef.current.scrollHeight > 60\r\n ? textAreaRef.current.scrollHeight\r\n : 60;\r\n setParentHeight(`${h}px`);\r\n }\r\n }\r\n handleChange(e, control);\r\n }\r\n\r\n return (\r\n
\r\n {!usePlaceholder && fieldLabel && (\r\n \r\n )}\r\n
\r\n 0 ? \" is-invalid\" : \"\")\r\n }\r\n {...attrs}\r\n >\r\n
\r\n {helpText && (\r\n
\r\n )}\r\n \r\n \r\n );\r\n}\r\n\r\nexport default TextareaInput;\r\n","import React from \"react\";\r\nimport ValidationAlert from \"../components/ValidationAlert\";\r\nimport utils from \"../../../utils\";\r\nimport { getLabel } from \"../formRenderHelper\";\r\nimport { SiteLink } from \"../../../components\";\r\n\r\nconst CheckboxInput = ({ control, handleChange, formOption }) => {\r\n const {\r\n name,\r\n label,\r\n type,\r\n value,\r\n errors,\r\n style,\r\n helpText,\r\n attrs,\r\n link,\r\n linkText,\r\n } = control;\r\n const fieldId = utils.random.shortId();\r\n const fieldLabel = getLabel(control, formOption);\r\n return (\r\n
\r\n handleChange(e, control)}\r\n className={\"form-check-input\"}\r\n {...attrs}\r\n />\r\n \r\n\r\n {helpText && (\r\n
\r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default CheckboxInput;\r\n","import React from 'react'\r\nimport ValidationAlert from '../components/ValidationAlert'\r\nimport utils from '../../../utils'\r\nimport { getLabel } from '../formRenderHelper'\r\n\r\nfunction SelectInput({ control, handleChange, formOption }) {\r\n // eslint-disable-next-line\r\n const { name, label, type, value, errors, style, options, helpText, attrs } =\r\n control\r\n const fieldId = utils.random.shortId()\r\n const fieldLabel = getLabel(control, formOption)\r\n // console.log(value, typeof value);\r\n let mainCategory = ''\r\n if (options.filter((option) => option.selected)) {\r\n if (\r\n options.filter((option) => option.selected).length !== 0 &&\r\n options.filter((option) => option.selected)[0].hasOwnProperty('name')\r\n ) {\r\n mainCategory = options.filter((option) => option.selected)[0].name\r\n }\r\n }\r\n\r\n return (\r\n
\r\n {fieldLabel && (\r\n \r\n )}\r\n
\r\n handleChange(e, control)}\r\n defaultValue={mainCategory === null ? '' : value}\r\n className={\r\n 'form-control' + (errors && errors.length > 0 ? ' is-invalid' : '')\r\n }\r\n {...attrs}\r\n > \r\n {\r\n mainCategory && mainCategory !== '' &&\r\n \r\n }\r\n {options &&\r\n options.map((option) =>\r\n option.name !== mainCategory ? (\r\n \r\n {option.name}\r\n \r\n ) : (\r\n ''\r\n )\r\n )}\r\n \r\n
\r\n {helpText && (\r\n
\r\n )}\r\n \r\n \r\n )\r\n}\r\n\r\nexport default SelectInput\r\n","import * as React from 'react';\r\nimport utils from '../../../utils';\r\n\r\nfunction TextInput({ control, handleChange, formOption }) {\r\n const { name, value } = control;\r\n const fieldId = utils.random.shortId();\r\n let valueStr = value === 0 ? 0 : (value || \"\");\r\n\r\n\r\n return (\r\n \r\n )\r\n}\r\n\r\nexport default TextInput;","import React from 'react';\r\nimport * as formModelHelper from './formModelHelper';\r\nimport { getControl } from './controls';\r\nimport { getSiteControl } from '../../form';\r\n\r\nexport function renderControlDirect(control, handleChange, formOption) {\r\n if (control === null) return null;\r\n let Component = getSiteControl(control, formOption) || getControl(control, formOption);\r\n if (!Component) return control.value;\r\n return ;\r\n}\r\n\r\n\r\nexport function renderControl(formRoot, nameOrIndex, handleChange, formOption) {\r\n //console.log(formRoot, name);\r\n const control = formModelHelper.findControl(nameOrIndex, formRoot);\r\n //console.log(control, formRoot, name, handleChange, formOption)\r\n if (control) {\r\n return renderControlDirect(control, handleChange, formOption);\r\n }\r\n}\r\n\r\nexport default { renderControl, renderControlDirect }","import validators from './validators';\r\n\r\nexport function validate(root, validateOpt = {}) {\r\n //console.log({...{ triggeredByChange: false }, ...validateOpt})\r\n //console.log(root, validateOpt)\r\n const errors = validateTraverse(root, {...{ triggeredByChange: false }, ...validateOpt});\r\n return errors;\r\n}\r\n\r\nfunction validateTraverse(control, validateOpt) {\r\n if (!control) return [];\r\n //console.log(!!control.disableValidators, control)\r\n if (!!control.disableValidators) { control.errors =[]; return []; }\r\n const errors = [];\r\n const errorsFromControl = validators.validateControl(control, null, validateOpt);\r\n errors.push(...errorsFromControl);\r\n //console.log(errorsFromControl, errors)\r\n if (control.controls && control.controls.length > 0) {\r\n for (let i = 0; i < control.controls.length; i++) {\r\n const errorsFromSub = validateTraverse(control.controls[i], validateOpt);\r\n errors.push(...errorsFromSub);\r\n }\r\n }\r\n control.errors = errors;\r\n return errors;\r\n}\r\n\r\n","import { useState } from 'react';\r\nimport controlRenderer from './controlRenderer';\r\nimport * as formModelHelper from './formModelHelper';\r\nimport * as formValidate from './formValidate';\r\nimport validators from './validators';\r\n\r\nconst useForm = (initialFormModel, option) => {\r\n const [formModel, setFormModel] = useState(initialFormModel);\r\n const formOption = {\r\n ...{\r\n template: 'bootstrap',\r\n usePlaceholder: false,\r\n requiredMark: '*',\r\n onControlChanged: null,\r\n },\r\n ...option,\r\n };\r\n\r\n const handleChange = (e, controlFromEvent) => {\r\n e.persist();\r\n const control =\r\n controlFromEvent || formModelHelper.findControl(e.target.name, formModel);\r\n //console.log(control)\r\n // const control = controlId? formModelHelper.findControlById(controlId, formModel)\r\n // : formModelHelper.findControl(e.target.name, formModel);\r\n if (!control) return;\r\n\r\n //console.log(control.value, e.target)\r\n control.touched = true;\r\n control.value = getControlValue(control, e.target);\r\n if (control.type === 'file') {\r\n control.files = e.target.files;\r\n }\r\n\r\n // parseInput(control);\r\n if (control.onBeforeUpdateValue) {\r\n control.onBeforeUpdateValue(control, formModel);\r\n }\r\n\r\n validators.validateControl(control, e, { triggeredByChange: true });\r\n setFormModel({ ...formModel });\r\n\r\n if (formOption.onControlChanged) {\r\n formOption.onControlChanged(e, control);\r\n }\r\n };\r\n\r\n const validateForm = (e, successHandler, errorHandler) => {\r\n validateGroup(formModel, e, successHandler, errorHandler);\r\n };\r\n\r\n const validateGroup = (control, e, successHandler, errorHandler) => {\r\n e && e.preventDefault();\r\n const errors = formValidate.validate(control);\r\n\r\n if (errors.length === 0) successHandler && successHandler();\r\n else {\r\n setFormModel({ ...formModel });\r\n errorHandler && errorHandler(errors);\r\n }\r\n };\r\n\r\n const reset = (model) =>\r\n setFormModel(model ? { ...model } : { ...formModel });\r\n\r\n // const parseInput = input => input.value = input.parseFun ? input.parseFun(input.value) : input.value;\r\n\r\n const renderControl = (name, formRoot) =>\r\n controlRenderer.renderControl(\r\n formRoot || formModel,\r\n name,\r\n handleChange,\r\n formOption\r\n );\r\n const renderControlDirect = (control) =>\r\n controlRenderer.renderControlDirect(control, handleChange, formOption);\r\n\r\n const getValue = (formRoot) =>\r\n formModelHelper.getValue(formRoot || formModel);\r\n\r\n const getFiles = (formRoot) =>\r\n formModelHelper.getFiles(formRoot || formModel);\r\n\r\n const findControl = (name, formRoot) => {\r\n const control = formModelHelper.findControl(name, formRoot || formModel);\r\n return control;\r\n };\r\n //return [controls, handleChange, handleSubmit, getValue]\r\n return {\r\n model: formModel,\r\n errors: formModel.errors,\r\n reset: reset,\r\n renderControl: renderControl,\r\n renderControlDirect: renderControlDirect,\r\n findControl: findControl,\r\n validateForm: validateForm,\r\n validateGroup: validateGroup,\r\n getValue: getValue,\r\n getFiles: getFiles,\r\n };\r\n};\r\n\r\nfunction getControlValue(control, el) {\r\n //console.log(control, el)\r\n if (control.type === 'checkboxList') {\r\n const options = el.closest('.controlOptions');\r\n if (options) {\r\n return [...options.querySelectorAll('input:checked')].map((x) => x.value);\r\n }\r\n return [];\r\n } else if (control.type === 'radioList') {\r\n const options = el.closest('.controlOptions');\r\n if (options) {\r\n const val = [...options.querySelectorAll('input:checked')].map(\r\n (x) => x.value\r\n );\r\n return val && val.length > 0 ? val[0] : null;\r\n }\r\n return null;\r\n }\r\n return control.type === 'checkbox' ? el.checked : el.value;\r\n}\r\n\r\nexport { useForm };\r\n","//#region GTM\r\nexport const hasGTM = () => {\r\n return !!(typeof window !== `undefined` && window.dataLayer);\r\n}\r\n\r\nexport const pageView = (url, pageTitle = null) => {\r\n if (!hasGTM()) return;\r\n\r\n const pageOpt = pageTitle ? {\r\n path: url,\r\n title: pageTitle\r\n } : { path: url }\r\n //console.log(url, pageOpt)\r\n window.dataLayer.push({\r\n event: 'pageview',\r\n page: pageOpt\r\n })\r\n}\r\n\r\n// \r\nexport const sendEvent = (eventName, params) => {\r\n if (!hasGTM()) return;\r\n window.dataLayer.push(Object.assign({ event: eventName }, params || {}))\r\n}\r\n\r\nexport const sendGAEvent = (category, action, label, value) => {\r\n if (!hasGTM()) return;\r\n window.dataLayer.push(Object.assign({ event: 'gaEvent' }, { category: category || '', action: action || '', label: label || '', value: value || '' }))\r\n}\r\n//#endregion\r\n\r\n\r\n","import { css } from '@emotion/core'\nimport { variables, mq } from '../../cssInJs';\nimport { darken } from 'polished';\n\nconst buttonColor = variables.primaryColor;\n\nconst baseStyle = {\n button: mq({\n color: 'white',\n padding: '0.7rem 1.5rem 1rem 1.5rem',\n position: 'relative',\n overflow: 'hidden',\n display: 'inline-block',\n appearance: 'none',\n '-webkit-appearance': 'none',\n //margin: '0 0.5rem',\n '&:hover .buttonBg': {\n background: darken(0.1, buttonColor),\n },\n '&:hover': {\n color: 'white',\n textDecoration: 'none',\n }\n }),\n buttonBg: {\n transition: 'all 0.3s',\n borderRadius: '100%',\n position: 'absolute',\n background: buttonColor,\n right: '-200px',\n left: '-200px',\n top: '-200px',\n content: '\"\"',\n bottom: '0',\n zIndex: '0',\n },\n buttonTxt: {\n zIndex: '1',\n position: 'relative',\n }\n}\n\nconst smallStyle = {\n button: css(baseStyle.button, {\n fontSize: '0.85rem',\n fontWeight: 600,\n letterSpacing: 1,\n padding: '0.3rem 1.5rem 0.3rem 1.5rem',\n '&:hover .buttonBg': {\n background: darken(0.1, buttonColor),\n },\n }),\n buttonBg: css(baseStyle.buttonBg, {\n background: buttonColor,\n }),\n buttonTxt: baseStyle.buttonTxt\n}\n\nexport function getButtonStyle(type) {\n if (type === 'small') {\n return smallStyle\n }\n return baseStyle\n} \n","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport { getButtonStyle } from './buttonStyle';\n\nexport function FormButton({ onClick, status, children, buttonStyle, overridingStyle, to, ...other }) {\n const s = getButtonStyle(buttonStyle);\n const ss = overridingStyle || {};\n return \n \n \n {status === 'pending' && }\n {children}\n \n}\n","import React from 'react';\nimport env from '../../../env';\nimport { usePost } from '../../../components';\nimport { useForm } from '../../../form';\nimport { ErrorMessage } from '../../../components';\nimport { getModel } from './subscribeFormModel';\nimport { gtm } from '../../../lib/tracking';\nimport { FormButton } from '../../button/formButton';\nimport { variables } from 'cssInJs';\n\nimport { darken } from 'polished';\n\nexport function Subscribe() {\n\n const model = getModel({});\n const form = useForm(model, { usePlaceholder: true });\n const [sendingStatus, setSendingStatus] = React.useState(null);\n const post = usePost();\n\n function onSubmit(e) {\n e.preventDefault();\n e.stopPropagation();\n form.validateForm(e, () => {\n const value = { ...form.getValue() };\n post.send(env.apiBase + \"/api/contact/subscribe\", value);\n setSendingStatus('pending')\n })\n }\n\n\n if (post.done() && sendingStatus === 'pending') {\n var value = form.getValue();\n gtm.sendEvent('subscribeFormSubmitted', {contactEmail: value.email} )\n form.reset(model)\n setSendingStatus(null)\n }\n\n const render = (name) => form.renderControl(name, null);\n\n const overridingStyle = {\n button: {\n '&:hover .buttonBg': {\n background: darken(0.1, variables.colorBlue),\n },\n },\n buttonBg: {\n background: variables.colorBlue,\n },\n buttonTxt: {\n fontWeight: 900,\n color: 'white'\n },\n }\n\n return (\n
\n
\n
{render('name')}
\n {/*
{render('phone')}
*/}\n
{render('email')}
\n
\n
\n
\n \n

By subscribing to Ecotourism Australia’s monthly newsletter, you accept the terms of our Privacy Policy

\n
\n

SUBSCRIBE NOW

\n \n \n {post.done() && Successfully registered!}\n
\n
\n
\n
\n );\n}","import { fb, validators } from '../../../lib/form';\n\nexport function getModel(data) {\n const model = fb.group({\n name: [data.name || '', [validators.Required()], { label: 'Name', type: 'text' }],\n //phone: [data.phone || '', [validators.Required()], { label: 'Phone', type: 'text' }],\n email: [data.email || '', [validators.Required(), validators.Email()], { label: 'Email', type: 'email' }],\n }); \n return model;\n}","import React from 'react';\nimport cmsUtils from '../cmsUtils';\nimport { Subscribe } from './subscribe';\n\nexport const renderRule = {\n match: (item, cmsOption) => (cmsUtils.getCodeJson(item) || {})['control'] === 'subscribe', \n itemElt: (item, cmsOption) => \n}","import React from 'react';\nimport parse, { domToReact, attributesToProps } from 'html-react-parser';\nimport utils from '../../../../utils';\nimport env from '../../../../env';\n\n//https://github.com/remarkablemark/html-react-parser\n\nconst options = {\n replace\n};\nlet _embedDataList = []\nlet _cmsOption = {}\n\nexport function renderHtml(html, cmsOption) {\n _cmsOption = cmsOption\n if (!cmsOption.isCmsEdit || cmsOption.cmsViewMode === 'viewonly') {\n _embedDataList = cmsOption?.pageData?.embedDataList;\n return parse(html || '', options)\n } else {\n return parse(html || '', {})\n }\n}\n\nfunction replace(node) {\n //console.log(node)\n if (!env.isProd && node.type === 'tag' && node.name === 'img') {\n return replaceImg(node)\n } else if (node.type === 'tag' && node.attribs.class === 'button') {\n return replaceButton(node)\n } else if (node.type === 'tag' && node.attribs['data-embed-jaba']) {\n return replaceEmbedCode(node)\n }\n\n}\n\nfunction replaceImg(node) {\n if (node.attribs && node.attribs.src) {\n const props = attributesToProps(node.attribs)\n props.src = utils.site.resourcePath(node.attribs.src)\n // eslint-disable-next-line\n return \n }\n return null\n}\n\nfunction replaceButton(node) {\n if (node.children && node.children.some(x => x.name === 'span')) return null;\n const props = attributesToProps(node.attribs)\n return React.createElement(node.name, props, {domToReact(node.children, options)});\n}\n\nfunction replaceEmbedCode(node) {\n const id = node.attribs['data-embed-jaba'];\n const found = utils.array.find(_embedDataList, x => x.id === id);\n if (found) {\n //console.log(found)\n return
{renderHtml(found.code, _cmsOption)}
\n }\n else return null;\n}","import React, { useRef, useEffect } from 'react';\nimport cmsUtils from '../../cmsUtils';\nimport utils from '../../../../utils';\n\nimport { useRouter } from '../../../../components';\n\nimport { handleElementLink } from '../../../../components';\nimport env from '../../../../env';\nimport { renderHtml } from './renderHtml';\n\n//import { Document, Page } from 'react-pdf'\n//import { Document, Page } from 'react-pdf/dist/entry.webpack';\n\nexport function Html(props) {\n const ver = env.ver;\n const item = props.item;\n //const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n const { history } = useRouter();\n //const [ pdfViewPath, setPdfViewPath ] = React.useState(null)\n //console.log('item', item, cmsOption);\n\n const year = (new Date()).getFullYear();\n let content = cmsOption.isCmsEdit ?\n cmsUtils.payload(item, 'Content') :\n cmsUtils.payload(item, 'Content')\n .replace(/__year__/g, year)\n .replace(\"__version__\", \" PWA \" + ver + \"\");\n\n content = content\n .replace(\n /class=\"aos_effect_up\"/gi,\n `class=\"aos_effect_up\" data-aos=\"fade-up\"`\n )\n .replace(\n /class=\"aos_effect_down\"/gi,\n `class=\"aos_effect_down\" data-aos=\"fade-down\"`\n )\n .replace(\n /class=\"aos_effect_left\"/gi,\n `class=\"aos_effect_left\" data-aos=\"fade-left\"`\n )\n .replace(\n /class=\"aos_effect_right\"/gi,\n `class=\"aos_effect_right\" data-aos=\"fade-right\"`\n ).replace(/.xlsx\"/gi, `.xlsx\" download`);\n \n useEffect(() => {\n if (!htmlBlock.current) return;\n \n const updateLinkClasses = () => {\n const links = htmlBlock.current.querySelectorAll(\"a\");\n \n links.forEach((link) => {\n const href = link.href.trim();\n \n const url = new URL(href, window.location.origin);\n const isPDF = href.toLowerCase().endsWith(\".pdf\");\n const hasButtonClass = link.classList.contains(\"button\");\n \n // 清除旧的 class,防止重复添加\n link.classList.remove(\"pdf-download-button\", \"external-website-button\", \"internal-website-button\");\n \n if (!hasButtonClass) {\n return;\n }\n\n if (isPDF) {\n // PDF 链接\n link.classList.add(\"pdf-download-button\");\n } else if (url.origin === window.location.origin) {\n // 内部链接\n link.classList.add(\"internal-website-button\");\n } else {\n // 外部链接\n link.classList.add(\"external-website-button\");\n }\n });\n };\n \n updateLinkClasses();\n }, []);\n\n const cssClass = utils.classNames('cms_item', 'htmlPanel','JamesTest', cmsOption.isCmsEdit && 'html', item.cssClass || item.anchorName || '');\n\n //let itemElt = (
);\n\n function handleClick(e) {\n\n let target = \"\";\n if (e.target.closest('a')) {\n target = e.target.closest('a').getAttribute('target');\n }\n\n if (e.target.getAttribute(\"href\").includes(\".xlsx\")) {\n console.log(\"sdkfjslkfjsdlkjsdklf------ \");\n\n return;\n }\n\n const processed = (target === \"_blank\" ? handleElementLink(e.target, null) : handleElementLink(e.target));\n //const link = utils.url.getLinkFromElement(e.target);\n //console.log('clicked', e, e.target, processed);\n\n if (processed.handled) {\n e.preventDefault();\n e.stopPropagation();\n } else if (processed.linkInfo && processed.linkInfo.type === 'internal') {\n e.preventDefault();\n e.stopPropagation();\n history.push(processed.linkInfo.url)\n } else {\n //e.preventDefault();\n //e.stopPropagation();\n // setPdfViewPath(utils.site.resourcePath(link))\n\n // process expandable old\n // if(e.target.closest('a')){\n // let href = e.target.closest('a').getAttribute('href') + \"\";\n // if(href.indexOf('#') !== -1){\n // let _href = href.split('#');\n // console.log(\"_href\", _href);\n // let el = document.querySelector('section[data-cms-item-anchor=\"' + _href[1] + '\"]');\n // if (el) {\n // let anchorStatus = el.getAttribute('data-anchor-status');\n // if(anchorStatus === \"collapse\"){\n // el.setAttribute('data-anchor-status', 'expand');\n // el.classList.add(\"expand\");\n // }\n // else{\n // el.setAttribute('data-anchor-status', 'collapse');\n // el.classList.remove(\"expand\");\n // }\n // }\n // e.preventDefault();\n // e.stopPropagation(); \n // }\n // }\n\n // process expandable\n if (e.target.closest('a')) {\n let aLink = e.target.closest('a')\n let href = aLink.getAttribute('href') + \"\";\n if (href.indexOf('#') !== -1) {\n let _href = href.split('#');\n console.log(\"_href\", _href);\n const targetId = _href[1]\n let targetElt = document.querySelector('section[data-cms-item-anchor=\"' + _href[1] + '\"]');\n\n const runEffect = () => {\n let anchorStatus = targetElt.getAttribute('data-anchor-status');\n if (anchorStatus === \"collapse\") {\n targetElt.setAttribute('data-anchor-status', 'expand');\n targetElt.classList.add(\"expand\");\n }\n else {\n targetElt.setAttribute('data-anchor-status', 'collapse');\n targetElt.classList.remove(\"expand\");\n }\n }\n\n if (targetElt) {\n const wrapper = aLink.closest('p, div, h1, h2, h3, h4, h5')\n const nextElt = wrapper.nextElementSibling\n //console.log(wrapper, nextElt)\n\n if (nextElt && nextElt.getAttribute('data-cms-item-anchor') === targetId) {\n // already in wrapper\n } else {\n // no wrapper\n wrapper.insertAdjacentElement(\"afterend\", targetElt);\n }\n\n window.setTimeout(runEffect, 100)\n\n e.preventDefault();\n e.stopPropagation();\n }\n }\n }\n\n\n }\n }\n\n const htmlBlock = useRef(null);\n return (\n <>\n
handleClick(e)}>\n {renderHtml(content, cmsOption)}\n
\n \n )\n}\n","import React from 'react';\nimport { Html } from './view/html';\n\nexport const renderRule = {\n match: (item, cmsOption) => item.itemTypeCode === 'Html', \n itemElt: (item, cmsOption) => \n}","import facepaint from 'facepaint'\n// 'sm', 'md', 'lg', 'xl', 'xxl'\nconst breakpoints = [576, 768, 992, 1200, 1600, 1900, 2200] \n\nexport const mqBanner = facepaint(\n breakpoints.map(bp => `@media (min-width: ${bp}px)`)\n)\n\n// 576, 768, 992, 1200, 1600, 1900, 2200\nexport const bannerThin = [180, 190, 200, 220, 250, 270, 290, 300]\nexport const bannerStandard = [350, 350, 400, 450, 500, 550, 600, 700]\n\nexport const getBannerSize = (setName) => {\n if (setName === 'standard')\n return bannerStandard\n else if (setName === 'thin')\n return bannerThin\n else\n return bannerStandard\n}","import { mqBanner, getBannerSize } from 'site/bannerSize/bannerSize';\n\nexport function getImageBannerStyle(heightSet) {\n const bannerSize = getBannerSize(heightSet);\n\n return {\n bannerHeight: mqBanner({\n height: bannerSize,\n backgroundPositionX: 'center'\n }),\n photoCredit: mqBanner({\n color: 'white',\n fontSize: '0.8rem',\n transform: 'rotate(-90deg) translate(-50%, 10px)',\n position: 'absolute',\n top: '50%',\n left: '0',\n textAlign: 'center',\n transformOrigin: 'left top',\n maxWidth: bannerSize.map(x => x * 0.9),\n '&:hover, &:active': {\n color: 'white'\n }\n })\n }\n}","import React from 'react';\nimport { au } from 'components';\n\nexport function useParallax(panelRef, _settings) {\n const [settings,] = React.useState(getSettings(_settings));\n const handleScroll = () => {\n //console.log('useParallax - scrolling')\n onScroll(settings, panelRef.current);\n }\n\n const reset = () => {\n //console.log('useParallax - reset');\n setTimeout(() => { onResize(settings, panelRef.current); handleScroll(); }, 300)\n }\n\n React.useEffect(() => {\n\n reset();\n if (typeof window !== `undefined`) {\n window.addEventListener('scroll', handleScroll)\n window.addEventListener('resize', reset)\n }\n return () => {\n if (typeof window !== `undefined`) {\n window.removeEventListener('scroll', handleScroll)\n window.removeEventListener('resize', reset)\n }\n }\n // eslint-disable-next-line \n }, []);\n return { reset };\n}\n\nfunction getSettings(settings) {\n const defaultSettings = {\n cutoffPadding: 10,//px\n paddingHeightRatio: 1,\n stretchToFit: true,\n actionRange: [0.1, 0.9],\n imageRatio: 1080 / 1920,\n panelHeight: 'auto',\n cutTop: 0,\n cutBottom: 0\n }\n return Object.assign({}, defaultSettings, settings);\n}\n\n\nexport function onResize(settings, el) {\n const screenSize = au.getScreenSize();\n const autoPanelHeight = !settings.panelHeight || settings.panelHeight === 'auto';\n const panelHeight = autoPanelHeight ? el.offsetHeight : parseFloat(settings.panelHeight);\n //console.log(autoPanelHeight, panelHeight)\n\n let bgHeight = 0, bgWidth = 0;\n bgHeight = panelHeight * (1 + settings.paddingHeightRatio) + 2 * settings.cutoffPadding;\n bgWidth = (bgHeight * (1 + settings.cutTop + settings.cutBottom)) / settings.imageRatio;\n //console.log(panelHeight, settings.paddingHeightRatio, bgHeight, bgWidth)\n if (settings.stretchToFit && bgWidth < screenSize.width) {\n // magnifying the background image to fix the full width of the browser\n bgHeight = screenSize.width * settings.imageRatio;\n bgWidth = (bgHeight * (1 + settings.cutTop + settings.cutBottom)) / settings.imageRatio;\n //console.log('magnified', bgHeight, bgWidth, screenSize)\n }\n \n const cutTopPx = bgHeight * (1 + settings.cutTop + settings.cutBottom) * settings.cutTop\n const cutBottomPx = bgHeight * (1 + settings.cutTop + settings.cutBottom) * settings.cutBottom\n let fromTop = -settings.cutoffPadding;\n let toTop = -(bgHeight - panelHeight - settings.cutoffPadding);\n fromTop += (fromTop - toTop) > cutTopPx ? cutTopPx : 0\n toTop += (fromTop - toTop) > cutBottomPx ? cutBottomPx : 0\n //console.log('shift', cutTopPx, cutBottomPx, bgHeight, fromTop, toTop)\n\n el.setAttribute('data-fromTop', fromTop)\n el.setAttribute('data-toTop', toTop)\n\n if (!autoPanelHeight)\n el.style.height = settings.panelHeight + 'px';\n\n el.style.backgroundSize = bgWidth + 'px ' + bgHeight + 'px'\n}\n\nexport function onScroll(settings, el) {\n const pr = au.getScrollProgress(el).progress;\n //console.log(pr, panel.calculated);\n\n const min = parseFloat(el.getAttribute('data-fromTop'));\n const max = parseFloat(el.getAttribute('data-toTop'));\n const top = au.prVal(min, max, pr, settings.actionRange/*[0, 1]*/);\n //console.log(min, max, top);\n el.style.backgroundPositionY = top + 'px'\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport React from 'react';\nimport cmsUtils from '../../cmsUtils';\nimport utils from 'utils';\nimport { SiteLink } from 'components';\nimport { getImageBannerStyle } from './imagePanelStyle';\nimport { useParallax } from 'site/useParallax/useParallax';\n\nexport function ImagePanel(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n //console.log(cmsOption)\n //console.log('item', item);\n const heightSet = cmsUtils.payload(item, 'HeightSet') || 'standard';\n const photoCredit = cmsUtils.payload(item, 'PhotoCredit');\n const photoCreditUrl = cmsUtils.payload(item, 'PhotoCreditUrl');\n const hideTop = cmsUtils.payload(item, 'HideTop') || '0';\n const hideBottom = cmsUtils.payload(item, 'HideBottom') || '0';\n \n const cssClass = utils.classNames('cms_item', 'imagePanel', 'parallax_notused', `bannerSize_notused--${heightSet}`, item.cssClass || item.anchorName || '');\n \n const bgUrl = cmsOption.pageOptions && cmsOption.pageOptions.imagePath ?\n utils.site.resourcePath(cmsOption.pageOptions.imagePath):\n utils.site.resourcePath(cmsUtils.payload(item, 'ImageUrl'));\n\n const htmlBlock = React.useRef(null);\n const cssClass2 = utils.classNames('cms_item', 'htmlPanel', cmsOption.isCmsEdit && 'html', item.cssClass || item.anchorName || '');\n const content = cmsUtils.payload(item, 'Content');\n\n const parallaxSetting = {\n cutoffPadding: 10,//px\n paddingHeightRatio: 1,\n stretchToFit: true,\n actionRange: [0.1, 0.9],\n imageRatio: 1080 / 1920,\n panelHeight: 'auto',\n cutTop: hideTop? parseFloat(hideTop) : 0,\n cutBottom: hideBottom? parseFloat(hideBottom) : 0\n }\n //console.log(parallaxSetting)\n \n const panelRef = React.useRef(null);\n useParallax(panelRef, parallaxSetting);\n\n const s = getImageBannerStyle(heightSet);\n\n return (\n
\n
\n
\n \n {(photoCredit && !photoCreditUrl) &&
{photoCredit}
}\n {(photoCredit && photoCreditUrl) && {photoCredit}}\n
\n );\n}\n","import React from 'react';\nimport { ImagePanel } from './view/imagePanel';\n\nexport const renderRule = {\n match: (item, cmsOption) => item.itemTypeCode === 'ImagePanel', \n itemElt: (item, cmsOption) => \n}","import { mq } from \"cssInJs\";\n\nexport default {\n container: mq({\n //border: '1px solid red',\n //maxWidth: ['1700px'],\n maxWidth: [\"100%\"],\n paddingLeft: \"0px\",\n paddingRight: \"0px\",\n \".row\": {\n marginRight: \"0px\",\n marginLeft: \"0px\",\n },\n \".col__item\": {\n paddingRight: \"0\",\n paddingLeft: \"0\",\n alignSelf: \"center\"\n },\n \".col__item.change__flex__order\": mq({\n order: [\"0\", null, \"unset\"],\n //order: [\"0\", null, \"unset\"],\n }),\n \".col__item.change__flex__order__two\": mq({\n order: [\"-1\", null, \"unset\"],\n //order: [\"0\", null, \"unset\"],\n }),\n \".bannerSize--standard, .bannerSize, .youtubePlayer\": mq({\n //height: ['460px']\n aspectRatio: \"16/9\",\n height: \"auto\",\n }),\n\n \".bannerPanel .slick-slider .slick-track\": {\n backgroundColor: \"transparent\",\n },\n }),\n html__wrapper: {\n display: \"flex\",\n height: \"100%\",\n justifyContent: \"center\",\n flexDirection: \"column\",\n },\n html__container: mq({\n //backgroundColor: variables.lightGray,\n //height: '100%',\n //flex: '1 0 auto',\n //position: 'relative',\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n paddingLeft: \"2rem\",\n paddingRight: \"2rem\",\n justifyContent: \"center\",\n maxHeight: [\"100%\", null, \"100%\"],\n overflow: \"hidden\",\n\n \"&.top\": { justifyContent: \"flex-start\" },\n \"&.middle\": {\n justifyContent: \"center\",\n },\n \"&.bottom\": { justifyContent: \"flex-end\" },\n \"&.left\": {\n alignItems: \"flex-start\",\n },\n \"&.centre\": {\n alignItems: \"center\",\n },\n \"&.right\": {\n alignItems: \"flex-end\",\n },\n\n \"&.check_other_panel_banner, &.check_other_panel_youtube\": mq({\n marginTop: [\"1rem\", null, \"unset\"],\n height: [\"100%\", null, \"100%\"],\n }),\n }),\n html__item: {\n //position: 'absolute',\n width: \"100%\",\n margin: \"unset\",\n \"&.width__short\": {\n maxWidth: \"250px\",\n },\n \"&.width__middle\": {\n maxWidth: \"400px\",\n },\n \"&.width__wild\": {\n //maxWidth:'100%'\n maxWidth: \"620px\",\n },\n },\n};\n","import React from 'react';\nimport parse, { domToReact, attributesToProps } from 'html-react-parser';\nimport utils from '../../../../utils';\nimport env from '../../../../env';\n\n//https://github.com/remarkablemark/html-react-parser\n\nconst options = {\n replace\n};\nlet _embedDataList = []\nlet _cmsOption = {}\n\nexport function renderHtml(html, cmsOption) {\n _cmsOption = cmsOption\n if (!cmsOption.isCmsEdit || cmsOption.cmsViewMode === 'viewonly') {\n _embedDataList = cmsOption?.pageData?.embedDataList;\n return parse(html || '', options)\n } else {\n return parse(html || '', {})\n }\n}\n\nfunction replace(node) {\n //console.log(node)\n if (!env.isProd && node.type === 'tag' && node.name === 'img') {\n return replaceImg(node)\n } else if (node.type === 'tag' && node.attribs.class === 'button') {\n return replaceButton(node)\n } else if (node.type === 'tag' && node.attribs['data-embed-jaba']) {\n return replaceEmbedCode(node)\n }\n\n}\n\nfunction replaceImg(node) {\n if (node.attribs && node.attribs.src) {\n const props = attributesToProps(node.attribs)\n props.src = utils.site.resourcePath(node.attribs.src)\n // eslint-disable-next-line\n return \n }\n return null\n}\n\nfunction replaceButton(node) {\n if (node.children && node.children.some(x => x.name === 'span')) return null;\n const props = attributesToProps(node.attribs)\n return React.createElement(node.name, props, {domToReact(node.children, options)});\n}\n\nfunction replaceEmbedCode(node) {\n const id = node.attribs['data-embed-jaba'];\n const found = utils.array.find(_embedDataList, x => x.id === id);\n if (found) {\n //console.log(found)\n return
{renderHtml(found.code, _cmsOption)}
\n }\n else return null;\n}","export default {\n videoContainer: {\n position: \"relative\",\n margin: \"auto\",\n },\n videolink: {\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n transform: \"translate(-50%, -50%)\",\n zIndex: \"2\",\n },\n playIcon: {\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n transform: \"translate(-50%, -50%)\",\n zIndex: \"1\",\n width: \"100px\",\n height: \"100px\",\n color: \"white\",\n cursor: \"pointer\",\n transition: \"all 0.5s ease-out\",\n \"&:hover\": {\n color: \"#FFC300\",\n transition: \"all 0.5s ease-out\",\n },\n },\n backImgContainer: {\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n transform: \"translate(-50%, -50%)\",\n zIndex: \"1\",\n height: \"100%\",\n },\n };\n ","/** @jsx jsx */\nimport { jsx } from \"@emotion/core\";\nimport style from \"./VideoPanelStyle\";\nimport { MdPlayCircleOutline } from \"react-icons/md\";\n\nexport function VideoPanelNew({ openVideo, videoId, posterFrameUrl }) {\n return (\n
\n
\n {\n e.preventDefault();\n openVideo(0);\n }}\n >\n \n \n \n
\n
\n );\n}\n","/** @jsx jsx */\n// eslint-disable-next-line\nimport React from \"react\";\nimport { jsx } from \"@emotion/core\";\nimport cmsUtils from \"../../cmsUtils\";\nimport utils from \"../../../../utils\";\nimport style from \"./multiColumnPanel2Style\";\nimport { renderHtml } from \"./renderHtml\";\nimport Slider from \"react-slick\";\nimport { handleElementLink, useRouter, SiteLink } from \"../../../../components\";\nimport { useState, useEffect } from \"react\";\nimport FsLightbox from \"fslightbox-react\";\n// import { YoutubeBannerMobilePopup } from \"../../../../lib/youtube/youtubeBanner--mobilePopup\";\n// import { YoutubeBannerNew } from \"cms/items/youtubeBannerNew/view\";\nimport { VideoPanelNew } from \"cms/items/videoPanelNew/view\";\nimport * as yt from \"./iframeApi\";\n\nexport function MultiColumnPanel(props) {\n const item = props.item;\n\n const cmsOption = props.cmsOption || {};\n const bgColor = cmsUtils.payload(item, \"BgColor\");\n const bgTheme = cmsUtils.payload(item, \"TextColorTheme\") || \"white\";\n const cssClass = utils.classNames(\n \"cms_item\",\n \"contentPanel\",\n \"multiColumnPanelv2\",\n \"contentPanel--\" + bgTheme,\n item.cssClass || item.anchorName || \"\"\n );\n const imageUrl = cmsUtils.payload(item, \"ImageUrl\");\n const backgroundTile = cmsUtils.payload(item, \"BackgroundTile\");\n\n const leftPanel = cmsUtils.payload(item, \"LeftPanel\") || \"text\"; //text, banner\n const leftPanelBanner = cmsUtils.payload(item, \"LeftPanelBanner\") || \"\";\n const leftTextVertical =\n cmsUtils.payload(item, \"LeftTextVertical\") || \"middle\"; //top, middle, bottom\n const leftTextHorizontal =\n cmsUtils.payload(item, \"LeftTextHorizontal\") || \"centre\"; // left, centre, right\n const leftTextBgColor =\n cmsUtils.payload(item, \"LeftTextBgColor\") || \"transparent\";\n const leftTextWidth = cmsUtils.payload(item, \"LeftTextWidth\") || \"middle\"; //short, middle, wild\n const leftYoutube = cmsUtils.payload(item, \"LeftYoutube\") || \"\";\n const leftPosterFrameUrl = cmsUtils.payload(item, \"LeftPosterFrameUrl\") || \"\";\n\n const rightPanel = cmsUtils.payload(item, \"RightPanel\") || \"text\";\n const rightPanelBanner = cmsUtils.payload(item, \"RightPanelBanner\") || \"\";\n const rightTextVertical =\n cmsUtils.payload(item, \"RightTextVertical\") || \"middle\"; //top, middle, bottom\n const rightTextHorizontal =\n cmsUtils.payload(item, \"RightTextHorizontal\") || \"centre\"; // left, centre, right\n const rightTextBgColor =\n cmsUtils.payload(item, \"RightTextBgColor\") || \"transparent\"; // left, centre, right\n const rightTextWidth = cmsUtils.payload(item, \"RightTextWidth\") || \"middle\"; //short, middle, wild\n const rightYoutube = cmsUtils.payload(item, \"RightYoutube\") || \"\";\n const rightPosterFrameUrl =\n cmsUtils.payload(item, \"RightPosterFrameUrl\") || \"\";\n\n const linkUrl = cmsUtils.payload(item, \"LinkUrl\") || \"\";\n\n //const mobileReverse = cmsUtils.payload(item, 'MobileReverse', 'no');\n //const subItems = (mobileReverse === \"yes\" && utils.css.screenWidth() <= 550) ? item.items.reverse() || [] : item.items || [];\n //const columnWidths = cmsUtils.payload(item, 'ColumnWidths').split(\",\");\n //const mobileColumnWidths = cmsUtils.payload(item, 'MobileColumnWidths').split(\",\");\n //const countItem = { countD: 0, countM: 0, col: \"\" };\n\n let content = cmsUtils.payload(item, \"Content\") || \"Please add text\";\n let content2 = cmsUtils.payload(item, \"Content2\") || \"Please add text\";\n\n let bgUrl = null;\n if (imageUrl) bgUrl = utils.site.resourcePath(imageUrl);\n else if (backgroundTile)\n bgUrl = utils.site.resourcePath(\n `/dist/transparent-textures/textures/${backgroundTile}`\n );\n\n let idFirstUse = 1;\n if (leftPanel !== \"text\") {\n idFirstUse = 2;\n }\n\n return (\n \n
\n
\n
\n \n \n
\n \n \n
\n \n \n \n );\n}\n\nfunction GetItem({\n itemName,\n index,\n content,\n cmsOption,\n itemId,\n bannerItems,\n checkOtherPanel,\n textVertical,\n textHorizontal,\n idFirstUse,\n textBgColor,\n textWidth,\n linkUrl,\n youtubeCode,\n posterFrameUrl,\n}) {\n const { history } = useRouter();\n const settings = {\n dots: false,\n infinite: true,\n speed: 1500,\n autoplaySpeed: 3000,\n fade: true,\n autoplay: false,\n slidesToShow: 1,\n slidesToScroll: 1,\n };\n // eslint-disable-next-line\n const canPlayVideo = () => {\n return false;\n };\n const video = {\n heightSet: \"standard\",\n videoLinkOrId: youtubeCode,\n posterFrameUrl: posterFrameUrl,\n playerId: \"ytBanner-\" + itemId.substr(0, 8) + \"-\" + index,\n };\n\n const [toggler, setToggler] = useState(false);\n const [popupIndex, setPopupIndex] = useState(0);\n function openVideo(index) {\n setPopupIndex(index);\n setToggler(!toggler);\n }\n const playerVars = {\n enablejsapi: 1,\n autoplay: 1,\n controls: 1,\n loop: 1,\n showinfo: 0,\n rel: 0,\n modestbranding: 1,\n allowfullscreen: true,\n wmode: \"transparent\",\n };\n const { videoLinkOrId, playerId } = video;\n const videoId = yt.getYoutubeCode(videoLinkOrId);\n const popupImages = [\n ,\n ];\n\n const _imgs = (bannerItems === \"\" ? \"logo.png\" : bannerItems).split(\"|\");\n\n useEffect(() => {\n const pdfLinks = document.querySelectorAll('a[href$=\".pdf\"]');\n pdfLinks.forEach((link) => {\n link.classList.add(\"pdf-download-button\");\n });\n }, []);\n\n function downloadPdf(url) {\n const link = document.createElement(\"a\");\n link.href = url;\n link.download = url.split(\"/\").pop();\n link.target = \"_blank\";\n link.rel = \"noopener noreferrer\";\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n\n function handleClick(e) {\n let target = \"\";\n if (e.target.closest(\"a\")) {\n target = e.target.closest(\"a\").getAttribute(\"target\");\n }\n const processed =\n target === \"_blank\"\n ? handleElementLink(e.target, null)\n : handleElementLink(e.target);\n //const link = utils.url.getLinkFromElement(e.target);\n //console.log('clicked', e, e.target, processed);\n\n const _aLink = e.target.closest(\"a\");\n const href = _aLink ? _aLink.getAttribute(\"href\") : \"\";\n\n if (href && href.toLowerCase().endsWith(\".pdf\")) {\n e.preventDefault();\n downloadPdf(href);\n return;\n }\n\n if (processed.handled) {\n e.preventDefault();\n e.stopPropagation();\n } else if (processed.linkInfo && processed.linkInfo.type === \"internal\") {\n e.preventDefault();\n e.stopPropagation();\n history.push(processed.linkInfo.url);\n } else {\n if (e.target.closest(\"a\")) {\n let href = e.target.closest(\"a\").getAttribute(\"href\") + \"\";\n if (href.indexOf(\"#\") !== -1) {\n let _href = href.split(\"#\");\n console.log(\"_href\", _href);\n let el = document.querySelector(\n 'section[data-cms-item-anchor=\"' + _href[1] + '\"]'\n );\n if (el) {\n let anchorStatus = el.getAttribute(\"data-anchor-status\");\n if (anchorStatus === \"collapse\") {\n el.setAttribute(\"data-anchor-status\", \"expand\");\n el.classList.add(\"expand\");\n } else {\n el.setAttribute(\"data-anchor-status\", \"collapse\");\n el.classList.remove(\"expand\");\n }\n }\n e.preventDefault();\n e.stopPropagation();\n }\n }\n }\n }\n\n if (itemName === \"text\") {\n return (\n
\n \n handleClick(e)}\n >\n {renderHtml(content, cmsOption)}\n
\n \n \n );\n } else if (itemName === \"youtube\") {\n return (\n <>\n \n \n {/* */}\n {/* */}\n \n \n \n );\n } else if (itemName === \"banner\") {\n return (\n
\n \n {_imgs.map((item, index) => {\n return ;\n })}\n \n
\n );\n }\n\n return
No Item
;\n}\n\nfunction ImgItem({ item, linkUrl }) {\n if (linkUrl && linkUrl !== \"\") {\n return (\n \n \n \n );\n }\n\n return (\n \n );\n}\n\n//\"https://jaba.com.au/sites/newjaba/media/banners/ocean1_269430438.jpg\"\n","import utils from \"utils\";\n\nexport function loadApi(onApiReady) {\n if (typeof window !== `undefined` && !window.YT) {\n // If not, load the script asynchronously\n const tag = document.createElement(\"script\");\n tag.src = \"https://www.youtube.com/iframe_api\";\n tag.id = \"youtubeIframeApJaba\";\n\n // onYouTubeIframeAPIReady will load the video after the script is loaded\n window.onYouTubeIframeAPIReady = () => onApiReady(true);\n\n const firstScriptTag = document.getElementsByTagName(\"script\")[0];\n firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);\n } else {\n // If script is already there, load the video directly\n onApiReady(false);\n }\n}\n\n// export function player(playerId, videoId, playerVars = {}, events = {}) {\n// //let player = null;\n// const defaultPlayerVars = {\n// 'autoplay': 1,\n// 'controls': 0,\n// 'loop': 1,\n// 'showinfo': 0,\n// 'rel': 0,\n// 'modestbranding': 1,\n// 'origin': window.location.origin,\n// 'allowfullscreen': true,\n// 'wmode': 'transparent'\n// }\n// const defaultEvents = {\n// 'onStateChange': (e) => { },\n// 'onReady': (e) => { console.log('onReady'); player.mute() },\n// 'onError': (e) => { console.log(e) }\n// }\n\n// const player = new window.YT.Player(playerId, {\n// videoId: videoId,\n// playerVars: Object.assign({}, defaultPlayerVars, playerVars),\n// events: Object.assign({}, defaultEvents, events),\n// });\n// return player;\n// }\n\nexport function thumbnailMax(videoId) {\n return `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`;\n}\n\n// onPlayerStateChange(event){\n// switch (event.data){\n// case window['YT'].PlayerState.PLAYING:\n// //console.log('Playing');\n// //this.player.mute();\n// break;\n// case window['YT'].PlayerState.PAUSED:\n// //console.log('Pafdsu');\n// break;\n// case window['YT'].PlayerState.ENDED:\n// //console.log('ended ');\n// //this.player.playVideo();\n// this.player.stopVideo();\n// break;\n// }\n// }\n\n// toggleBannerYoutueInCMS(toggleItem:string){\n// if(toggleItem == 'youtube'){\n// //location.reload();\n// this.toggleBannerOrYoutube = toggleItem;\n// this.player.playVideo();\n// this.init();\n// }\n// else{\n// this.toggleBannerOrYoutube = toggleItem;\n// this.player.stopVideo();\n// }\n// }\n\nexport function getYoutubeCode(src) {\n // if (src.indexOf('http') >= 0) {\n // if (src.indexOf('v=') >= 0) {\n // return src.split('v=')[1];\n // }\n // }\n // return src;\n return utils.url.getYoutubeId(src);\n}\n","import React from 'react';\nimport { MultiColumnPanel } from './view/multiColumnPanel2';\n\nexport const renderRule = {\n match: (item, cmsOption) => item.itemTypeCode === 'MultiColumnPanel2', \n itemElt: (item, cmsOption) => \n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport Slider from \"react-slick\";\nimport { settings as defaultSettings} from './config';\n\n/**\n * Tile List\n * @param {Array} tiles React elements, required\n * @param {Object} style Style object, required\n * @param {string} cssClass\n * @param {string} useSlider Use SlickSlider, default: false\n * @param {Object} settings Tile Settings, required\n * @param {...Object} attrs Other attributes in the list level\n */\nexport function TileList({tiles, style, overridingStyle, cssClass, useSlider = false, settings = defaultSettings, ...attrs}) {\n const s = style || {};\n const ss = overridingStyle || {};\n const slickSettings = settings.slickSettings;\n\n useSlider = useSlider && tiles.length > 1\n slickSettings.infinite = tiles.length > 2\n\n if (useSlider) {\n return (\n
\n
\n \n {tiles}\n \n
\n
\n );\n } else {\n return (\n
\n
\n {tiles}\n
\n
\n );\n }\n\n}","import { variables, mq } from '../../cssInJs';\nimport { settings as defaultSettings} from './config';\n/**\n * Tile List Style. This is only for list wrapper, not tile itself\n * @param {Object} settings Tile Settings, required\n */\nexport function getTileListStyle(settings = defaultSettings) {\n const marginLR = settings.marginLR;\n const marginTB = settings.marginTB;\n return {\n holder: mq({\n //maxWidth: 1000,\n margin: 'auto',\n marginTop: [30, null, 40],\n marginBottom: [30, null, 40],\n '.slick-prev, .slick-next': {\n top: [100],\n transform: 'translate(0, 0)',\n },\n '.slick-prev': {\n left: [10, null, -20]\n },\n '.slick-next': {\n right: [10, null, -20]\n },\n '.slick-prev:before, .slick-next:before': {\n color: variables.fontColor\n }\n }),\n tiles: mq({\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'stretch',\n flexWrap: 'wrap',\n marginLeft: marginLR.map(x => x === null? null : -x / 2),\n marginRight: marginLR.map(x => x === null? null : -x / 2),\n marginTop: marginTB.map(x => x === null? null : x / 2),\n marginBottom: marginTB.map(x => x === null? null : x / 2),\n }),\n tilesSlider: mq({\n display: 'block',\n marginLeft: [15, null, 15],\n marginRight: [15, null, 15],\n })\n }\n}\n\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport utils from 'utils';\nimport { SiteLink } from 'components';\nimport { getTileStyle } from './pageTileStyle';\n\nexport function PageTile({ page, useSlider, disableLink }) {\n const tileLink = page.pageUrl;\n const imageUrl = utils.site.resourcePath(page.imageUrl);\n const title = page.pageTitle;\n const desc = page.tileDesc || page.description;\n const s = getTileStyle();\n return (\n \n
\n
\n
{title}
\n
{desc}
\n
\n
\n )\n}\n","import { variables, mq } from 'cssInJs';\nimport { settings as defaultSettings } from 'site/tileList/config';\n\nimport { rgba } from 'polished';\n\nexport function getTileStyle(settings = defaultSettings) {\n const numOfTilesPerBreakpoints = settings.numOfTilesPerBreakpoints\n const marginLR = settings.marginLR\n const marginTB = settings.marginTB\n\n return {\n tile: mq({\n paddingLeft: marginLR.map(x => x === null ? null : x / 2),\n paddingRight: marginLR.map(x => x === null ? null : x / 2),\n paddingTop: marginTB.map(x => x === null ? null : x / 2),\n paddingBottom: marginTB.map(x => x === null ? null : x / 2),\n maxWidth: numOfTilesPerBreakpoints.map(x => x === null ? null : 100 / x + '%'),\n flexBasis: numOfTilesPerBreakpoints.map(x => x === null ? null : 100 / x + '%'),\n flexGrow: 0,\n flexShrink: 0,\n textAlign: 'left',\n display: 'flex',\n flexDirection: 'column',\n color: 'inherit',\n ':hover': {\n textDecoration: 'none',\n color: 'inherit',\n '.tileBg': {\n transform: 'scale(1.02)',\n transition: 'all .2s ease-in-out'\n },\n '.tileContent': {\n backgroundColor: rgba(variables.primaryColor, 0.3),\n }\n }\n }),\n tileSlider: mq({\n maxWidth: '100% !important'\n }),\n tileBg: mq({\n backgroundColor: 'white',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n height: 0,\n paddingBottom: '56.25%',\n }),\n tileContent: mq({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n lineHeight: 1.3,\n //boxShadow: '4px 4px 14px 4px rgba(190,190,190,0.5)',\n backgroundColor: '#fff',\n marginTop: [10],\n padding: [20],\n transition: 'all .2s ease-in-out'\n }),\n title: mq({\n //fontFamily: variables.familyHeader,\n fontSize: '1.3rem',\n textTransform: 'uppercase',\n lineHeight: 1.3,\n fontWeight: 900,\n textAlign: 'center',\n }),\n desc: mq({\n marginTop: 5,\n fontSize: '0.9rem',\n display: '-webkit-box',\n WebkitLineClamp: '9',\n WebkitBoxOrient: 'vertical',\n overflow: 'hidden',\n }),\n }\n}\n\nexport function getTileListOverridingStyle() {\n return {\n tiles: mq({\n alignItems: 'flex-start',\n })\n }\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport cmsUtils from '../../cmsUtils';\nimport { TileList } from 'site/tileList/tileList'\nimport { getTileListStyle } from 'site/tileList/tileListStyle';\n\nimport { PageTile } from './pageTile/pageTile'\n\nexport function PageTiles(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n //console.log(cmsOption)\n //console.log('item', item);\n const useSlider = cmsUtils.payload(item, 'UseSlider') === 'slider';\n const pages = getPages(cmsUtils.payload(item, 'PageObjects'))\n\n const tiles = pages.map((page, index) => )\n \n return (\n \n );\n}\n\nfunction getPages(pagesSerialized) {\n if (pagesSerialized) {\n return JSON.parse(pagesSerialized);\n }\n return [];\n}","import React from 'react';\nimport { PageTiles } from './view/pageTiles';\n\nexport const renderRule = {\n match: (item, cmsOption) => item.itemTypeCode === '_PageTiles', \n itemElt: (item, cmsOption) => \n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport cmsUtils from '../../cmsUtils';\nimport { Item } from '../../../../cms/items/item';\nimport utils from '../../../../utils';\n\nexport function Panel(props) {\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item, subItems);\n //console.log(cmsUtils.hasItemInPageDataByItemTypeCode(cmsOption.pageData, 'DestinationOperators'))\n\n const bgColor = cmsUtils.payload(item, 'BgColor');\n //const textColorTheme = cmsUtils.payload(item, 'TextColorTheme');\n const imageUrl = cmsUtils.payload(item, 'ImageUrl');\n const backgroundTile = cmsUtils.payload(item, 'BackgroundTile');\n const bgTheme = cmsUtils.payload(item, 'TextColorTheme') || 'white';\n //console.log(bgTheme)\n\n let bgUrl = null;\n if (imageUrl)\n bgUrl = utils.site.resourcePath(imageUrl);\n else if (backgroundTile)\n bgUrl = utils.site.resourcePath(`/dist/transparent-textures/textures/${backgroundTile}`);\n\n const cssClass = utils.classNames('cms_item', 'contentPanel', 'contentPanel--' + bgTheme, item.cssClass || item.anchorName || '');\n\n const subItemsElts = subItems.map((subItem, index) =>\n \n );\n\n return (\n
\n
\n
{subItemsElts}
\n
\n );\n}\n","import React from 'react';\nimport { Panel } from './view/panel';\n\nexport const renderRule = {\n match: (item, cmsOption) => item.itemTypeCode === 'Panel', \n itemElt: (item, cmsOption) => \n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport utils from '../../utils';\nimport { SiteLink } from '../../components';\n\nimport { TileList } from '../tileList/tileList'\nimport { getTileListStyle } from '../tileList/tileListStyle';\nimport { settings } from './config';\n\nimport { getImageTileStyle } from './galleryStyle';\n\nexport function GalleryTiles({ images, openPopupImage, useSlider = false }) {\n if (images.length === 0) return null;\n const tiles = images.map((img, index) => )\n return \n}\n\nfunction ImageTile({ image, useSlider, disableLink, openPopupImage }) {\n const s = getImageTileStyle(settings);\n //const imageUrl = utils.site.resourcePath(image.imageUrl);\n const thumbnailUrl = image.thumbnailUrl || image.imageUrl;\n const tileLink = image.imageUrl;\n\n return openPopupImage(e, image)}>\n
\n
\n}\n","import { mq } from '../../cssInJs';\nimport { settings as defaultSettings} from '../tileList/config';\n\nexport function getImageTileStyle(settings = defaultSettings) {\n const numOfTilesPerBreakpoints = settings.numOfTilesPerBreakpoints\n const marginLR = settings.marginLR\n const marginTB = settings.marginTB\n\n return {\n tile: mq({\n paddingLeft: marginLR.map(x => x === null? null : x / 2),\n paddingRight: marginLR.map(x => x === null? null : x / 2),\n paddingTop: marginTB.map(x => x === null? null : x / 2),\n paddingBottom: marginTB.map(x => x === null? null : x / 2),\n maxWidth: numOfTilesPerBreakpoints.map(x => x === null? null : 100 / x + '%'),\n flexBasis: numOfTilesPerBreakpoints.map(x => x === null? null : 100 / x + '%'),\n // flexBasis: [\"33.33%\", \"33.33%\", \"33.33%\", \"33.33%\", \"33.33%\", \"33.33%\"],\n flexGrow: 0,\n flexShrink: 0,\n textAlign: 'left',\n display: 'flex',\n flexDirection: 'column',\n color: 'inherit',\n ':hover': {\n textDecoration: 'none',\n color: 'inherit',\n '.tileBg': {\n transform: 'scale(1.02)',\n transition: 'all .2s ease-in-out'\n }\n }\n }),\n tileSlider: mq({\n maxWidth: '100% !important'\n }),\n tileBg: mq({\n backgroundColor: 'white',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n height: 0,\n paddingBottom: '100%',//'56.25%',\n }),\n }\n}\n\n","import React from 'react';\nimport { createPortal } from \"react-dom\";\n\nexport function Portal({children}){\n const [el] = React.useState(document.createElement('div'));\n React.useEffect(() => {\n let mount = document.getElementById(\"portal-root\");\n mount.appendChild(el);\n return () => mount.removeChild(el);\n }, [el]);\n return createPortal(children, el);\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport React from 'react';\nimport utils from 'utils';\nimport { GalleryTiles } from './galleryTiles';\n\nimport { Portal } from \"site/portal/portal\";\nimport FsLightbox from 'fslightbox-react';\n\nconst r = utils.site.resourcePath\nconst set = utils.media.getImageSetPath\n\nexport function Gallery({ images, useSlider = false }) {\n\n const [toggler, setToggler] = React.useState(false);\n const [popupIndex, setPopupIndex] = React.useState(0);\n\n const filtered = utils.array.distinct(images, (x, y) => x.imageUrl === y.imageUrl)\n if (filtered.length === 0) return null;\n\n const popupImages = filtered.map(x => r(x.imageUrl));\n const galleryImages = filtered.map(x => ({ imageUrl: r(x.imageUrl), thumbnailUrl: r(set(x.imageUrl, 'thumb')), caption: x.caption }));\n // console.log(popupImages)\n\n function openPopupImage(e, image) {\n e.stopPropagation(); e.preventDefault();\n const imageUrl = r(image.imageUrl);\n const inx = utils.array.findIndex(popupImages, x => x === imageUrl);\n setPopupIndex(inx >= 0 ? inx : 0)\n setToggler(!toggler)\n }\n\n return \n
\n \n \n \n \n
\n\n
\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport cmsUtils from '../../cmsUtils';\nimport utils from 'utils'\nimport { Gallery } from '@site/gallery/gallery'\n\nexport function PhotoGallery(props) {\n const item = props.item;\n //const cmsOption = props.cmsOption || {};\n //console.log(cmsOption)\n //console.log('item', item);\n\n const cssClass = utils.classNames('cms_item', 'photoGallery', item.cssClass || item.anchorName || '');\n const images = cmsUtils.payload(item, 'ImageUrl') ? cmsUtils.payload(item, 'ImageUrl').split(\"|\") : [];\n const galleryImages = images.map(x => ({imageUrl: x, thumbnailUrl: x, caption: null}));\n \n return (\n \n );\n}\n","import React from 'react';\nimport { PhotoGallery } from './view/photoGallery';\n\nexport const renderRule = {\n match: (item, cmsOption) => item.itemTypeCode === 'PhotoGallery', \n itemElt: (item, cmsOption) => \n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport { FacebookShareButton, FacebookIcon } from \"react-share\";\n// import { LinkedinShareButton, LinkedinIcon } from \"react-share\";\n// import { TwitterShareButton, TwitterIcon } from \"react-share\";\nimport { WhatsappShareButton, WhatsappIcon } from \"react-share\";\nimport { EmailShareButton, EmailIcon } from \"react-share\";\n\nimport { getShareButtonStyle } from './shareButtonStyle';\n\nexport function ShareButtons({ shareUrl, pageTitle = null, topLabel = 'SHARE THIS PAGE:' }) {\n const s = getShareButtonStyle();\n const title = pageTitle || window.document.title;\n console.log(title)\n return
\n {topLabel &&
{topLabel}
}\n \n \n \n \n \n {/* \n \n \n \n */}\n {/* \n \n \n \n */}\n \n \n \n \n \n \n \n \n \n \n
\n}\n","//import { mq } from '../../cssInJs';\n\nexport function getShareButtonStyle() {\n return {\n shareButtons: {\n marginTop: '1.5rem',\n },\n shareButtonTitle: {\n fontSize: '0.8rem',\n marginLeft: '0.5rem',\n marginBottom: '0.3rem'\n },\n shareButton: {\n margin: 5\n },\n }\n} \n","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\n// import cmsUtils from '../../cmsUtils';\nimport utils from 'utils'\nimport { ShareButtons } from 'site/shareButtons/shareButtons'\n\nexport function SharingIcons(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n //console.log(cmsOption)\n //console.log('item', item);\n\n const cssClass = utils.classNames('cms_item', item.cssClass || item.anchorName || '');\n const shareUrl = utils.site.fullUrl(window.location.pathname + window.location.search)\n\n return
\n \n
\n}\n","import React, { useState, useRef } from 'react';\nimport utils from '../../../utils';\nimport { debounce } from '../../../lib/utils-core/debounce';\nimport * as yt from '../../../lib/youtube/iframeApi';\nimport { FiVolumeX, FiVolume2 } from 'react-icons/fi';\n\nexport function YoutubeNew(props) {\n const youtubeBannerRef = React.useRef(null);\n const [playerStatus, setPlayerStatus] = useState('loading');\n const [playerSize, setPlayerSize] = useState(null);\n // eslint-disable-next-line\n const [ytPlayer, setYtPlayer] = useState(null);\n const [muted, setMuted] = useState(true);\n const countPlayedRef = useRef(0);\n const { heightSet, videoLinkOrId, playerId } = props.video;\n const videoId = yt.getYoutubeCode(videoLinkOrId);\n const posterImageUrl =\n props.posterImageUrl && props.posterImageUrl !== ''\n ? props.posterImageUrl\n : yt.thumbnailMax(videoId);\n const mobileImageUrl = props.mobileImageUrl;\n const canPlayVideo = () =>\n typeof window !== `undefined` && typeof props.canPlayVideo === `undefined`\n ? window.innerWidth >= 0\n : !!(typeof props.canPlayVideo === 'function'\n ? props.canPlayVideo()\n : props.canPlayVideo);\n\n const playerVars = {\n enablejsapi: 1,\n //'autoplay': 1,\n controls: 0,\n loop: 1,\n showinfo: 0,\n rel: 0,\n modestbranding: 1,\n //'origin': typeof window !== `undefined` && window.location.origin,\n allowfullscreen: true,\n wmode: 'transparent',\n };\n\n React.useEffect(() => {\n const resized = debounce(() => {\n loadVideo();\n });\n loadVideo();\n if (typeof window !== `undefined`)\n window.addEventListener('resize', resized);\n return () => {\n if (typeof window !== `undefined`)\n window.removeEventListener('resize', resized);\n };\n // eslint-disable-next-line\n }, []);\n\n function loadVideo() {\n if (youtubeBannerRef.current)\n setPlayerSize(getSize(youtubeBannerRef.current, props.sizeCalculator));\n if (canPlayVideo()) {\n yt.loadApi((loadJs) => {\n loadJs ? init() : setTimeout(init, 100);\n });\n }\n }\n\n function init() {\n let player = null;\n if (typeof window !== `undefined`) {\n player = new window.YT.Player(playerId, {\n events: {\n onStateChange: (e) => {\n switch (e.data) {\n case window.YT.PlayerState.ENDED:\n const countPlayed = countPlayedRef.current;\n if (countPlayed < 3 - 1) {\n console.log('ended', countPlayed + 1);\n countPlayedRef.current = countPlayed + 1;\n if (player && player.playVideo) {\n player.playVideo();\n } else {\n setPlayerStatus('finished');\n }\n } else {\n setPlayerStatus('finished');\n }\n break;\n default:\n }\n },\n onReady: (e) => {\n if (player && player.mute && player.playVideo) {\n player.mute();\n player.playVideo();\n }\n setTimeout(() => setPlayerStatus('loaded'), 1000);\n },\n onError: (e) => {\n console.log(e);\n },\n },\n });\n setYtPlayer(player);\n }\n }\n\n function soundToggle(e) {\n e.preventDefault();\n e.stopPropagation();\n if (ytPlayer) {\n if (muted) {\n setMuted(false);\n setTimeout(() => {\n if (\n ytPlayer &&\n ytPlayer.pauseVideo &&\n ytPlayer.unMute &&\n ytPlayer.playVideo\n ) {\n ytPlayer.pauseVideo();\n ytPlayer.unMute();\n ytPlayer.playVideo();\n }\n }, 100);\n } else {\n setMuted(true);\n setTimeout(() => {\n if (\n ytPlayer &&\n ytPlayer.pauseVideo &&\n ytPlayer.unMute &&\n ytPlayer.playVideo\n ) {\n ytPlayer.pauseVideo();\n ytPlayer.mute();\n ytPlayer.playVideo();\n }\n }, 100);\n }\n }\n //https://developers.google.com/web/updates/2017/09/autoplay-policy-changes\n }\n\n function getSize(container, sizeCalculator) {\n const containerSize = container\n ? { w: container.offsetWidth, h: container.offsetHeight }\n : { w: window.innerWidth, h: window.innerHeight };\n if (sizeCalculator) {\n const size = sizeCalculator(containerSize, canPlayVideo());\n if (size) return size;\n }\n\n const overSize = 1;\n const rate = 9 / 16;\n const w = containerSize.w * overSize;\n const h = containerSize.h * overSize;\n const size = { width: w, height: w * rate, left: 0, top: 0 };\n if (size.height < h) {\n // stretch horizontally\n size.height = h;\n size.width = h / rate;\n }\n //console.log(size)\n size.left = -(size.width - containerSize.w) / 2;\n size.top = -(size.height - containerSize.h) / 2;\n return size;\n }\n const canPlay = canPlayVideo();\n const imageUrl = !canPlay && mobileImageUrl ? mobileImageUrl : posterImageUrl;\n return (\n \n \n
\n
\n \n {playerSize && (\n \n )}\n {canPlay && playerStatus === 'loaded' && (\n \n {muted ? : }\n \n )}\n \n
\n );\n}\n","import React from \"react\";\nimport cmsUtils from \"../../cmsUtils\";\nimport utils from \"../../../../utils\";\nimport { YoutubeNew } from \"cms/items/youtubeNew/view\";\n\nexport function VideoPanel(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n const heightSet = cmsUtils.payload(item, \"HeightSet\") || \"standard\";\n const videoCode = cmsUtils.payload(item, \"YoutubeCode\");\n const posterFrameUrl = cmsUtils.payload(item, \"PosterFrameUrl\", null);\n const playerId = \"ytBanner-\" + item.itemId.substr(0, 8);\n const video = {\n heightSet: heightSet,\n videoLinkOrId: videoCode,\n playerId: playerId,\n };\n const canPlayVideo = () => utils.css.screenWidth() >= 0;\n const cssClass = utils.classNames(\n \"cms_item\",\n \"youtubePanel\",\n item.cssClass || item.anchorName || \"\"\n );\n\n return (\n \n \n \n );\n}\n","import React from 'react';\nimport { VideoPanel } from './view/videoPanel';\n\nexport const renderRule = {\n match: (item, cmsOption) => item.itemTypeCode === 'VideoPanel', \n itemElt: (item, cmsOption) => \n}","\nimport { renderRule as code_instagram } from './code-instagram/render';\nimport { renderRule as code_subscribe } from './code-subscribe/render';\nimport { renderRule as html } from './html/render';\nimport { renderRule as imagePanel } from './imagePanel/render';\nimport { renderRule as multiColumnPanel2 } from './multiColumnPanel2/render';\nimport { renderRule as pageTiles } from './pageTiles/render';\nimport { renderRule as panel } from './panel/render';\nimport { renderRule as photoGallery } from './photoGallery/render';\nimport { renderRule as sharingIcons } from './sharingIcons/render';\nimport { renderRule as videoPanel } from './videoPanel/render';\nexport const items = [\n code_instagram,\n code_subscribe,\n html,\n imagePanel,\n multiColumnPanel2,\n pageTiles,\n panel,\n photoGallery,\n sharingIcons,\n videoPanel,\n]","import React from 'react';\nimport { SharingIcons } from './view/sharingIcons';\n\nexport const renderRule = {\n match: (item, cmsOption) => item.itemTypeCode === 'SharingIcons', \n itemElt: (item, cmsOption) => \n}","function payload(item, key, defaultVal = '') {\n const found = item.payloads.find(x => x.key === key);\n return found ? found.value : defaultVal;\n}\n\nexport default { payload };","import React from 'react';\nimport { Item } from '../../items/item';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport Slider from \"react-slick\";\n\nexport function BannerPanel(props) {\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item, subItems);\n\n const heightSet = cmsUtils.payload(item, 'HeightSet') || 'standard';\n\n const slides = subItems.map((subItem, index) =>\n \n );\n\n var settings = {\n dots: false,\n infinite: true,\n speed: 1500,\n autoplaySpeed: 3000,\n fade: true,\n autoplay: true,\n slidesToShow: 1,\n slidesToScroll: 1\n };\n\n const cssClass = utils.classNames('cms_item', 'bannerPanel', `bannerWrapperSize--${heightSet}`, item.cssClass || item.anchorName || '');\n\n return (\n
\n \n {slides}\n \n
\n );\n}","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { SiteLink } from '../../../components';\n\nexport function BannerItem(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item);\n\n const bgUrl = utils.site.resourcePath(cmsUtils.payload(item, 'ImageUrl'));\n const alignV = cmsUtils.payload(item, 'VAlign') || '50%';\n\n const captionTitle = cmsUtils.payload(item, 'CaptionTitle2') || cmsUtils.payload(item, 'CaptionTitle');\n const captionButton = cmsUtils.payload(item, 'CaptionButton') && cmsUtils.payload(item, 'CaptionButton') !== \"\" ? cmsUtils.payload(item, 'CaptionButton') : \"READ MORE\";\n \n const linkUrl = cmsUtils.payload(item, 'LinkUrl2') || cmsUtils.payload(item, 'LinkUrl');\n\n const titlePanel = captionTitle ? (\n linkUrl ? (
\n
\n { captionButton } \n
\n ) : (
)\n ) : null;\n\n const linkOverlay = linkUrl && !captionTitle ? (\n \n ) : null;\n\n const cssClass = utils.classNames('cms_item', 'banner-item', 'bannerSize', item.cssClass || item.anchorName || '', titlePanel && 'bannerHasTitlePanel');\n\n return (\n
\n {titlePanel &&
{titlePanel}
}\n {linkOverlay && linkOverlay}\n
\n );\n\n\n}\n","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport { Item } from '../../items/item';\nimport utils from '../../../utils';\n\nexport function Panel(props) {\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item, subItems);\n \n const bgColor = cmsUtils.payload(item, 'BgColor');\n //const textColorTheme = cmsUtils.payload(item, 'TextColorTheme');\n const imageUrl = cmsUtils.payload(item, 'ImageUrl');\n const backgroundTile = cmsUtils.payload(item, 'BackgroundTile');\n const bgTheme = cmsUtils.payload(item, 'TextColorTheme') || 'white';\n //console.log(bgTheme)\n\n\n let bgUrl = null;\n if (imageUrl)\n bgUrl = utils.site.resourcePath(imageUrl);\n else if (backgroundTile)\n bgUrl = utils.site.resourcePath(`/dist/transparent-textures/textures/${backgroundTile}`);\n\n const cssClass = utils.classNames('cms_item', 'contentPanel', 'contentPanel--' + bgTheme, item.cssClass || item.anchorName || '');\n\n const subItemsElts = subItems.map((subItem, index) =>\n \n );\n\n return (\n
\n
\n
\n {subItemsElts}\n
\n
\n );\n}\n","import React, { useLayoutEffect, useRef } from 'react';\nimport ReactDOM from 'react-dom';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\n\nimport { useRouter } from '../../../components';\n\nimport { handleElementLink } from '../../../components';\nimport env from '../../../env';\n\n//import { Document, Page } from 'react-pdf'\n//import { Document, Page } from 'react-pdf/dist/entry.webpack';\n\nexport function Html(props) {\n const ver = env.ver;\n const item = props.item;\n //const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n const { history } = useRouter();\n //const [ pdfViewPath, setPdfViewPath ] = React.useState(null)\n //console.log('item', item, cmsOption);\n\n const year = (new Date()).getFullYear();\n let content = cmsOption.isCmsEdit? \n cmsUtils.payload(item, 'Content'): \n cmsUtils.payload(item, 'Content')\n .replace(/__year__/g, year)\n .replace(\"__version__\", \" PWA \"+ ver +\"\");\n\n content = content\n .replace(\n /class=\"aos_effect_up\"/gi,\n `class=\"aos_effect_up\" data-aos=\"fade-up\"`\n )\n .replace(\n /class=\"aos_effect_down\"/gi,\n `class=\"aos_effect_down\" data-aos=\"fade-down\"`\n )\n .replace(\n /class=\"aos_effect_left\"/gi,\n `class=\"aos_effect_left\" data-aos=\"fade-left\"`\n )\n .replace(\n /class=\"aos_effect_right\"/gi,\n `class=\"aos_effect_right\" data-aos=\"fade-right\"`\n ).replace(/.xlsx\"/gi, `.xlsx\" download`);;\n\n\n const cssClass = utils.classNames('cms_item', 'htmlPanel', cmsOption.isCmsEdit && 'html', item.cssClass || item.anchorName || '');\n\n //let itemElt = (
);\n\n function handleClick(e) {\n \n let target = \"\";\n if(e.target.closest('a')){\n target = e.target.closest('a').getAttribute('target');\n }\n\n if (e.target.getAttribute(\"href\").includes(\".xlsx\")) {\n return;\n }\n const processed = (target === \"_blank\" ? handleElementLink(e.target, null) : handleElementLink(e.target));\n //const link = utils.url.getLinkFromElement(e.target);\n //console.log('clicked', e, e.target, processed);\n \n if (processed.handled) {\n e.preventDefault();\n e.stopPropagation();\n } else if (processed.linkInfo && processed.linkInfo.type === 'internal') {\n e.preventDefault();\n e.stopPropagation();\n history.push(processed.linkInfo.url)\n } else {\n //e.preventDefault();\n //e.stopPropagation();\n // setPdfViewPath(utils.site.resourcePath(link))\n\n if(e.target.closest('a')){\n let href = e.target.closest('a').getAttribute('href') + \"\";\n if(href.indexOf('#') !== -1){\n let _href = href.split('#');\n console.log(\"_href\", _href);\n let el = document.querySelector('section[data-cms-item-anchor=\"' + _href[1] + '\"]');\n let anchorStatus = el.getAttribute('data-anchor-status');\n if(anchorStatus === \"collapse\"){\n el.setAttribute('data-anchor-status', 'expand');\n el.classList.add(\"expand\");\n }\n else{\n el.setAttribute('data-anchor-status', 'collapse');\n el.classList.remove(\"expand\");\n }\n e.preventDefault();\n e.stopPropagation(); \n }\n }\n\n }\n }\n //console.log(pdfViewPath)\n const pdfView = \n // pdfViewPath ? \n // : \n null;\n\n const htmlBlock = useRef(null);\n // function iframeSizer() {\n // //console.log('iframesizer')\n // let iframesContainer = htmlBlock.current.querySelectorAll('iframe.youtube, .ytvideo iframe');\n // //console.log('iframesizer', iframesContainer)\n // if (iframesContainer && iframesContainer.length) {\n // iframesContainer.forEach(element => {\n // let height = (element.parentElement.offsetWidth * 9) / 16\n // //console.log(height, element.parentElement.offsetWidth)\n // element.style.height = height + 'px';\n // });\n // }\n // }\n\n\n useLayoutEffect(() => {\n //console.log(cmsOption.isCmsEdit)\n if (!cmsOption.isCmsEdit || cmsOption.cmsViewMode === 'viewonly') {\n replaceEmbedCodes(htmlBlock.current, cmsOption);\n }\n \n const buttons = htmlBlock.current.querySelectorAll('.button');\n for (let i = 0; buttons && i < buttons.length; i++) {\n restructureButton(buttons[i])\n }\n\n // iframeSizer();\n // window.addEventListener('resize', iframeSizer)\n // return (): void => {\n // window.removeEventListener('resize', iframeSizer)\n // }\n\n }, [cmsOption])\n\n return (\n <>\n
handleClick(e)}>
\n {pdfView}\n \n )\n}\n\n\nfunction restructureButton(el) {\n if (!el.querySelector('span')) {\n const span = document.createElement('span');\n span.innerHTML = el.innerHTML;\n el.innerHTML = '';\n el.appendChild(span);\n }\n}\n\n\nfunction replaceEmbedCodes(block, cmsOption) {\n const embedDataList = cmsOption?.pageData?.embedDataList;\n const embedCodes = block.querySelectorAll('[data-embed-jaba]')\n embedCodes.forEach(embed => {\n const id = embed.getAttribute(\"data-embed-jaba\");\n const found = utils.array.find(embedDataList, x => x.id === id);\n if (found){\n //console.log(found)\n ReactDOM.render(
, embed);\n }\n })\n //console.log(embedCodes, embedDataList)\n}\n\n","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\n\nexport function ImagePanel(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n //console.log(cmsOption)\n //console.log('item', item);\n const heightSet = cmsUtils.payload(item, 'HeightSet') || 'standard';\n \n const cssClass = utils.classNames('cms_item', 'imagePanel', 'parallax', `bannerSize--${heightSet}`, item.cssClass || item.anchorName || '');\n \n const bgUrl = cmsOption.pageOptions && cmsOption.pageOptions.imagePath ?\n utils.site.resourcePath(cmsOption.pageOptions.imagePath):\n utils.site.resourcePath(cmsUtils.payload(item, 'ImageUrl'));\n\n const htmlBlock = React.useRef(null);\n const cssClass2 = utils.classNames('cms_item', 'htmlPanel', cmsOption.isCmsEdit && 'html', item.cssClass || item.anchorName || '');\n const content = cmsUtils.payload(item, 'Content');\n\n return (\n
\n
\n
\n
\n );\n}","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { SiteLink } from '../../../components';\n\nimport Slider from \"react-slick\";\n\nexport function PageTiles(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item);\n const useSlider = cmsUtils.payload(item, 'UseSlider') === 'slider';\n const pages = getPages(cmsUtils.payload(item, 'PageObjects'))\n //console.log(pages);\n const pageTileElts = pages.map((page, index) =>\n \n );\n\n var settings = {\n dots: false,\n infinite: true,\n speed: 500,\n autoplaySpeed: 3000,\n fade: false,\n autoplay: true,\n slidesToShow: 3,\n slidesToScroll: 1,\n responsive: [\n {\n breakpoint: 992,\n settings: {\n slidesToShow: 2,\n slidesToScroll: 1\n }\n },\n {\n breakpoint: 576,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1\n }\n }\n // You can unslick at a given breakpoint now by adding:\n // settings: \"unslick\"\n // instead of a settings object\n ]\n };\n\n const cssClass = utils.classNames('cms_item', 'pageTiles tiles', useSlider && 'useSlider', item.cssClass || item.anchorName || '');\n\n if (useSlider){\n return (\n
\n \n {pageTileElts}\n \n
\n );\n } else {\n return (\n
\n {pageTileElts}\n
\n ); \n }\n}\n\nfunction getPages(pagesSerialized) {\n if (pagesSerialized) {\n return JSON.parse(pagesSerialized);\n }\n return [];\n}\n\nfunction Tile(props) {\n const page = props.page;\n const imageUrl = utils.site.resourcePath(page.imageUrl);\n const disableLink = props.disableLink;\n\n console.log(\"page:\", page);\n return (\n //
\n // \n //
\n //
\n //
\n // {page.pageTitle}\n //
\n //
\n // {page.tileDesc || page.description}\n //
\n //
\n //
\n //
\n
\n \n
\n
\n \n {page.pageTitle}\n
\n {/* */}\n \n {page.tileDesc || page.description}\n \n \n \n \n \n )\n}","//import { css, keyframes } from '@emotion/core'\n//import { variables, mq } from 'cssInJs'\n\nimport { css } from '@emotion/core'\nimport { mq, variables } from '../../../cssInJs'\n\nexport default {\n pageTiles : css({\n display: 'flex',\n justifyContent: 'flex-start',\n flexWrap: 'wrap',\n margin: '2rem -10px',\n overflow:'hidden'\n }),\n pageTile__tile : css(mq({\n flex: '0 0 100%',\n maxWidth: '100%',\n padding: '10px',\n '&:nth-of-type(even)' : {\n '.pageTile__bsyc__bg' : mq({\n order: ['0',null,'2'],\n }),\n '.pageTile__bsyc__content__details' : mq({\n order: '1'\n })\n }\n })),\n\n tile__content : css({\n // display: 'flex',\n // flexDirection: 'row',\n // justifyContent: 'space-between',\n // width: '100%',\n // height: '100%',\n // cursor: 'pointer',\n // position: 'relative',\n // flexWrap: 'wrap',\n '&:hover' : {\n textDecoration: 'none',\n '& .pageTile__bsyc__content__details' : {\n color: '#e20039',\n // backgroundColor: 'rgba(170, 150, 119,1)'\n // '&.default' : css({\n // backgroundColor: 'rgba(0,113,188,1)'\n // }),\n // '&.red' : css({\n // backgroundColor: 'rgba(211,61,2,1)'\n // }),\n // '&.green' : css({\n // backgroundColor: 'rgba(0, 146, 69,1)'\n // })\n },\n '& .pageTile__bsyc__bg2' : {\n //transform: scale(1.05)\n transform : 'scale(1.05)'\n }\n }\n }),\n\n tile__flip__wrapper : css({\n zIndex:'-1', \n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n width: '100%',\n height: '100%',\n cursor: 'pointer',\n position: 'relative',\n flexWrap: 'wrap'\n }),\n\n// tile__bg : css(mq({\n// height: '0',\n// //paddingTop: '30%',\n// paddingTop: ['50%','35%','30%'],\n// backgroundPosition: '50%',\n// backgroundRepeat: 'no-repeat',\n// backgroundSize: 'cover',\n// flex: '1 1 300px'\n// })),\n\ntile__bg : css(mq({\n height: '0',\n paddingTop: ['50%','35%','30%'],\n //height: ['50%','35%','30%'],\n flex: '1 1 300px',\n overflow:'hidden',\n position:'relative'\n})),\n\ntile__bg2 : css(mq({\n height: '100%',\n backgroundPosition: '50%',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n //overflow:'hidden',\n transition:'all .2s',\n position:'absolute',\n top:'0px',\n width:'100%'\n})),\n\n tile__details : css({\n overflow: 'hidden',\n flexGrow: '1',\n textAlign: 'center',\n width: '100%',\n bottom: '0',\n // backgroundColor: variables.primaryColor,\n // '&.default' : css({\n // backgroundColor: 'rgba(0, 113, 188,.5)'\n // }),\n // '&.red' : css({\n // backgroundColor: 'rgba(211, 61, 2,.5)'\n // }),\n // '&.green' : css({\n // backgroundColor: 'rgba(0, 146, 69,.5)'\n // }),\n //backgroundColor : '#77cf22',\n flex: '1 1 300px',\n transition: 'all .2s ease-in-out',\n color: '#002e5b',\n position:'relative',\n '& .pageTile__bsyc__container' : mq({\n //position: 'absolute',\n position: ['static,',null,'absolute'],\n top: '50%',\n left:'50%',\n transform: ['none',null,'translate(-50%, -50%)'],\n width:['100%',null,'90%'],\n padding:['1rem',null,'0px'],\n '& .pageTile__bsyc__title' : {\n //fontFamily: 'proxima-soft, sans-serif',\n fontSize: '48px',\n //textTransform: 'uppercase',\n fontWeight: '700',\n lineHeight: '1',\n margin: '0',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n // color:'inherit'\n },\n '& .pageTile__bsyc__desc' : {\n lineHeight: '1.3',\n fontSize: '21px',\n //color: '#3d3d3d',\n minHeight: '70px',\n // color:'inherit'\n }\n })\n })\n}","//import React from 'react';\nimport cmsUtils from '../../../cms/utils/cmsUtils';\nimport utils from '../../../utils';\nimport { SiteLink } from '../../../components';\n\n/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport style from './style';\n\nexport function PageTilesBsyc(props) {\n const item = props.item;\n //const detailHoverBgColor = props.detailHoverBgColor ? props.detailHoverBgColor : \"black\";\n const cmsOption = props.cmsOption || {};\n const pages = getPages(cmsUtils.payload(item, 'PageObjects'))\n const pageTileElts = pages.map((page, index) =>\n \n );\n\n //const cssClass = utils.classNames('cms_item', 'pageTiles tiles', item.cssClass || item.anchorName || '');\n const cssClass = utils.classNames('cms_item', 'pageTiles__bsyc', item.cssClass || item.anchorName || '');\n\n return (\n
\n {pageTileElts}\n
\n );\n}\n\nfunction getPages(pagesSerialized) {\n if (pagesSerialized) {\n return JSON.parse(pagesSerialized);\n }\n return [];\n}\n\nfunction Tile(props) {\n const page = props.page;\n const imageUrl = utils.site.resourcePath(page.imageUrl);\n const disableLink = props.disableLink;\n const colorTheme = page.colorTheme;\n const index = props.idx;\n return (\n \n
\n \n
\n\n
\n
\n
\n \n
\n
\n \n {\n (page.pageTitle && page.pageTitle !== '') &&\n
\n {page.pageTitle}\n
\n }\n\n
\n {page.tileDesc || page.description}\n
\n
\n
\n
\n
\n
\n )\n}","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { SiteLink } from '../../../components';\n\nexport function SingleBanner(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item);\n const heightSet = cmsUtils.payload(item, 'HeightSet') || 'standard';\n const alignV = cmsUtils.payload(item, 'AlignV') || '50%';\n\n const cssClass = utils.classNames('cms_item', 'single-banner', 'banner-item', `bannerSize--${heightSet}`, item.cssClass || item.anchorName || '');\n const bgUrl = utils.site.resourcePath(cmsUtils.payload(item, 'ImageUrl'));\n\n const captionTitle = cmsUtils.payload(item, 'CaptionTitle2') || cmsUtils.payload(item, 'CaptionTitle');\n const linkUrl = cmsUtils.payload(item, 'LinkUrl2') || cmsUtils.payload(item, 'LinkUrl');\n\n const titlePanel = captionTitle ? (\n linkUrl ? (\n
\n
) : (
)\n ) : null;\n\n return (\n
\n {titlePanel &&
{titlePanel}
}\n
\n );\n\n\n}\n","import React from 'react';\nimport env from '../../../env';\nimport { usePost } from '../../../components';\nimport { useForm } from '../../../form';\nimport { Button, ErrorMessage } from '../../../components';\nimport { getContactModel } from './contactFormModel';\nimport { gtm } from '../../../lib/tracking';\n\nexport function Contact(props) {\n\n const emailReceiver = props.emailReceiver;\n const fileAttachment = props.fileAttachment || 'false';\n const mailchimpApiKey = props.mailchimpApiKey;\n const mailchimpAudienceKey = props.mailchimpAudienceKey;\n \n const model = getContactModel({});\n const form = useForm(model, { usePlaceholder: true });\n const [sendingStatus, setSendingStatus] = React.useState(null);\n const [mailChimpError, setMailChimpError] = React.useState();\n const post = usePost();\n\n const mailChimpErrorMemo = React.useMemo(() => {\n return mailChimpError\n }, [mailChimpError]);\n\n // function onSubmit(e) {\n // setMailChimpError(null);\n // form.validateForm(e, () => {\n // const value = { \n // ...form.getValue(),\n // emailReceiver: emailReceiver,\n // mailchimpApiKey : mailchimpApiKey,\n // mailchimpAudienceKey : mailchimpAudienceKey\n // };\n // var files = form.getFiles();\n // var formData = new FormData();\n // formData.append('jsonData', JSON.stringify(value))\n // files.forEach(file => {\n // (file.files || []).forEach(uploadFile => {\n // formData.append(file.name, uploadFile)\n // })\n // });\n // //post.send(env.apiBase + \"/api/contact/send\", value);\n // post.sendFormData(env.apiBase + \"/api/contact/send\", formData);\n // setSendingStatus('pending')\n // })\n\n // console.log('submitting')\n // }\n\n function onSubmit(e) {\n setMailChimpError(null);\n form.validateForm(e, () => {\n window.grecaptcha.ready(function () {\n window.grecaptcha.execute(env.reCaptchaSiteKey, { action: 'submit' }).then(function (token) {\n\n const value = {\n ...form.getValue(),\n emailReceiver: emailReceiver,\n mailchimpApiKey: mailchimpApiKey,\n mailchimpAudienceKey: mailchimpAudienceKey,\n grecaptchaToken : token\n };\n \n var files = form.getFiles();\n var formData = new FormData();\n formData.append('jsonData', JSON.stringify(value))\n files.forEach(file => {\n (file.files || []).forEach(uploadFile => {\n formData.append(file.name, uploadFile)\n })\n });\n post.sendFormData(env.apiBase + \"/api/contact/send\", formData);\n setSendingStatus('pending');\n\n });\n });\n })\n }\n\n // if (status === 'done') {\n // //navigate(`/task/view/${taskId}`)\n // window.location.reload();\n // }\n\n if (post.done() && sendingStatus === 'pending') {\n var value = form.getValue();\n gtm.sendEvent('contactFormSubmitted', {contactEmail: value.email} )\n form.reset(model);\n setSendingStatus(null);\n\n if(post.response.results && (post.response.results.MailChimpError && post.response.results.MailChimpError !== \"\")){\n setMailChimpError(\"Mail Chimp Error : \" + post.response.results.MailChimpError);\n }\n }\n\n const render = (name) => form.renderControl(name, null);\n\n return (\n
\n
\n
{render('name')}
\n
\n
\n
{render('phone')}
\n
\n
\n
{render('email')}
\n
\n
\n
{render('enquiry')}
\n
\n\n { fileAttachment === 'true' &&\n
\n
{render('attachments')}
\n
\n }\n\n
\n
\n
\n \n \n \n \n {post.done() && Successfully sent!}\n
\n
\n
\n
\n );\n}","import { fb, validators } from '../../../lib/form';\n\nexport function getContactModel(data) {\n const model = fb.group({\n name: [data.name || '', [validators.Required()], { label: 'Name', type: 'text' }],\n phone: [data.phone || '', [validators.Required()], { label: 'Phone', type: 'text' }],\n email: [data.email || '', [validators.Required(), validators.Email()], { label: 'Email', type: 'email' }],\n enquiry: [data.enquiry || '', [validators.Required()], { label: 'Your Message', type: 'textarea' }],\n attachments: [data.attachments || '', [], { label: 'Attachments', type: 'file' }]\n }); \n return model;\n}","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { Contact } from './contactForm';\n\nexport function ContactForm(props) {\n const item = props.item;\n console.log('item', item);\n //const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item, cmsOption);\n\n const emailReceiver = cmsUtils.payload(item, 'EmailReceiver');\n const fileAttachment = cmsUtils.payload(item, 'FileAttachment') || \"false\";\n\n const mailchimpApiKey = cmsUtils.payload(item, 'MailchimpApiKey');\n const mailchimpAudienceKey = cmsUtils.payload(item, 'MailchimpAudienceKey');\n\n const cssClass = utils.classNames('cms_item', 'htmlPanel', cmsOption.isCmsEdit && 'html', item.cssClass || item.anchorName || '');\n\n //let itemElt = (
);\n\n return (\n
\n\n
\n \n
\n\n
\n )\n}","import React from \"react\";\nimport cmsUtils from \"../../utils/cmsUtils\";\nimport utils from \"../../../utils\";\nimport { YoutubeNew } from \"cms/items/youtubeNew/view\";\n\nexport function VideoPanel(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n //console.log('item', item);\n const heightSet = cmsUtils.payload(item, \"HeightSet\") || \"standard\";\n const videoCode = cmsUtils.payload(item, \"YoutubeCode\");\n const posterFrameUrl = cmsUtils.payload(item, \"PosterFrameUrl\", null);\n const playerId = \"ytBanner-\" + item.itemId.substr(0, 8);\n const video = {\n heightSet: heightSet,\n videoLinkOrId: videoCode,\n playerId: playerId,\n };\n const canPlayVideo = () => utils.css.screenWidth() >= 0;\n const cssClass = utils.classNames(\n \"cms_item\",\n \"youtubePanel\",\n item.cssClass || item.anchorName || \"\"\n );\n return (\n \n \n \n );\n}\n","import React from 'react';\nimport env from '../../env';\nimport { SiteLink} from '../../components';\nimport { usePost } from '../../components';\nimport { ErrorPopup, Loading } from '../../components';\nimport { useRouter } from '../../components';\n\nexport function SearchResult(props) {\n const { query } = useRouter();\n const post = usePost();\n const keyword = query.q;\n //console.log(keyword);\n\n React.useEffect(() => {\n post.send(env.apiBase + '/api/search/search', { keyword: keyword });\n // eslint-disable-next-line\n }, [keyword]);\n\n if (post.loading()) {\n return \n } else if (post.hasErrors()) {\n return \n }\n\n //console.log(post)\n const data = post.response;\n\n const pages = data.pages;\n\n if (pages.length === 0) return (\n
\n No result found.\n
\n )\n return (\n <>\n {pages.length > 0 &&
\n

Pages

\n \n
}\n \n );\n}\n\nfunction PageList({pages}) {\n return (\n
\n {pages.map((page, index) =>\n
\n
\n {page.pageTitle}\n
\n
\n
\n )}\n
\n );\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport cmsUtils from '../../cms/utils/cmsUtils';\nimport { useEffect } from 'react';\n//import style from './style';\n\nexport function TextWithJavScript(props){\n \n const item = props.item;\n const cssClass = props.cssClass;\n const code = cmsUtils.payload(item, 'Code') || '';\n\n const javaScriptCode = code.substring(code.indexOf(\"\") + 9)).trim();\n const nonjavaScriptCode = code.replace(javaScriptCode, '').trim();\n console.log('nonjavaScriptCode', nonjavaScriptCode);\n\n useEffect(() => {\n \n const javaScriptTopCode = javaScriptCode.substring(javaScriptCode.indexOf(\"\") + 1)).trim();\n const javaScriptInsideCode = javaScriptCode.substring((javaScriptCode.indexOf(\">\") + 1), (javaScriptCode.indexOf(\"\"))).trim();\n\n const script = document.createElement('script');\n script.type = `text/javascript`;\n \n if(javaScriptInsideCode !== ''){\n script.text = javaScriptInsideCode;\n }\n\n if(javaScriptTopCode.includes(\"src=\")){\n let _src = javaScriptTopCode.indexOf('src=\"') === -1 ? '' : javaScriptTopCode.substring(javaScriptTopCode.indexOf('src=\"')).trim();\n let src = _src.substring((_src.indexOf('src=\"') + 5), _src.indexOf('\"',5));\n script.src = src;\n }\n\n if(javaScriptTopCode.includes(\"async\")){\n script.async = true;\n }\n\n if(javaScriptTopCode.includes(\"defer\")){\n script.defer = true;\n }\n\n if(javaScriptTopCode.includes(\"onload=\")){\n \n let _functionName = javaScriptTopCode.substring(javaScriptTopCode.indexOf('onload=') + 8);\n let functionName = _functionName.substring(0, _functionName.indexOf('\"')-1).replace('()','');\n script.onload = function(){\n window[functionName]();\n };\n }\n\n document.body.appendChild(script);\n }, [javaScriptCode]);\n\n return(\n
\n
\n )\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport cmsUtils from '../../cms/utils/cmsUtils';\nimport { useLayoutEffect } from 'react';\n//import style from './style';\n\nexport function JotformIframe(props) {\n\n const item = props.item;\n const cssClass = props.cssClass;\n const code = cmsUtils.payload(item, 'Code') || '';\n\n const javaScriptCode = code.substring(code.indexOf(\"<_script\"), (code.indexOf(\"\") + 10)).trim();\n const nonjavaScriptCode = code.replace(javaScriptCode, '').trim();\n\n useLayoutEffect(() => {\n\n const existingScript = document.getElementById('jotformIframe');\n if (existingScript) {\n document.body.removeChild(existingScript);\n }\n\n const javaScriptInsideCode = javaScriptCode.substring((javaScriptCode.indexOf(\">\") + 1), (javaScriptCode.indexOf(\"\"))).trim();\n\n const script = document.createElement('script');\n script.type = `text/javascript`;\n script.text = javaScriptInsideCode;\n script.id = 'jotformIframe';\n\n document.body.appendChild(script);\n\n // eslint-disable-next-line\n }, []);\n\n return (\n
\n {nonjavaScriptCode && nonjavaScriptCode !== '' &&
}\n
\n )\n}","export default {\n jotform__lightbox__container : {\n 'a' : {\n cursor: 'pointer'\n }\n }\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport cmsUtils from '../../cms/utils/cmsUtils';\nimport { useEffect, useLayoutEffect, useState } from 'react';\nimport { Loading } from '../../components';\nimport style from './style';\n\nexport function JotformLightbox(props) {\n\n const item = props.item;\n const cssClass = props.cssClass;\n const code = cmsUtils.payload(item, 'Code') || '';\n const codes = code.split(\"\");\n\n const [result, setResult] = useState();\n console.log(\"codes --->\", codes);\n\n useEffect(() => {\n\n const javsScriptCodes = [];\n let nonjavaScriptCode = \"\";\n let index = 1;\n\n codes.forEach(code => {\n\n if (code.includes(\"<_script\")) {\n const script = document.createElement('script');\n script.type = `text/javascript`;\n script.id = 'jotformLightbox' + index;\n\n const javaScriptTopCode = code.substring(code.indexOf(\"<_script\"), (code.indexOf(\">\") + 1)).trim().replace(\"src =\", \"src=\").replace(\"src = \", \"src=\").replace(\"src= \", \"src=\").trim();\n const javaScriptInsideCode = code.substring((code.indexOf(\">\") + 1)).trim();\n\n console.log(\"javaScriptTopCode\", javaScriptTopCode);\n\n if (javaScriptTopCode.includes(\"src=\")) {\n let _src = javaScriptTopCode.indexOf('src=\"') === -1 ? '' : javaScriptTopCode.substring(javaScriptTopCode.indexOf('src=\"')).trim();\n let src = _src.substring((_src.indexOf('src=\"') + 5), _src.indexOf('\"', 5));\n script.src = src;\n }\n\n if (javaScriptInsideCode !== '') {\n script.text = javaScriptInsideCode;\n }\n javsScriptCodes.push(script);\n }\n else {\n nonjavaScriptCode = code.trim();\n }\n\n index++;\n\n });\n\n setResult({ javsScriptCodes: javsScriptCodes, nonjavaScriptCode: nonjavaScriptCode });\n\n // eslint-disable-next-line\n }, []);\n\n return (\n
\n {\n result ? : \n }\n
\n )\n}\n\n\nfunction GetJotformLightbox({ result }) {\n\n const javsScriptCodes = result.javsScriptCodes;\n const nonjavaScriptCode = result.nonjavaScriptCode;\n const [index, setIndex] = useState(0);\n\n useLayoutEffect(() => {\n\n if (!javsScriptCodes || (javsScriptCodes && javsScriptCodes.length <= 0)) {\n return;\n }\n\n const existingScript = document.getElementById(javsScriptCodes[index].id);\n if (existingScript) {\n document.body.removeChild(existingScript);\n }\n document.body.appendChild(javsScriptCodes[index]);\n\n let timer = null;\n\n if (javsScriptCodes.length > (index + 1)) {\n timer = setTimeout(() => {\n setIndex(index + 1);\n }, 1000);\n }\n\n return () => {\n if(timer){\n clearTimeout(timer);\n }\n }\n\n // eslint-disable-next-line\n }, [index]);\n\n return (\n
\n )\n}","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { SearchResult } from '../../../site/searchResult/searchResult';\nimport { InstagramFeed } from '../../../components';\nimport { AppVersion } from '../../../components';\nimport { TextWithJavScript } from '../../../components/TextWithJavaScript/view';\nimport { JotformIframe } from '../../../components/jotformIframe/view';\nimport { JotformLightbox } from '../../../components/jotformLightbox/view';\n\nexport function Code(props) {\n const item = props.item;\n //const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n console.log('item code', item, cmsOption);\n\n const code = cmsUtils.payload(item, 'Code');\n const codeType = cmsUtils.payload(item, 'CodeType');\n let controls = null;\n if (codeType === 'Json') {\n const codeJson = JSON.parse(code);\n if (codeJson.control === 'search-results') {\n controls = \n } else if (codeJson.control === 'app') {\n controls = \n } else if (codeJson.control === 'instagram') {\n controls = \n }\n }\n\n const cssClass = utils.classNames('cms_item', item.cssClass || item.anchorName || '');\n\n //let itemElt = (
);\n\n if (cmsOption.isCmsEdit)\n return (\n
\n
\n          Code Type: {codeType}\n          {code}
\n
\n )\n else if (codeType === 'Text')\n return (\n
\n )\n else if (codeType === 'TestWithJs') {\n return (\n \n )\n }\n else if (codeType === 'JotformIframe')\n return (\n \n )\n else if (codeType === 'JotformLightbox')\n return (\n \n )\n else\n return (\n
{controls}
\n )\n}\n","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { SiteLink } from '../../../components';\n\nexport function BlogPosts(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item);\n\n const posts = getPages(cmsUtils.payload(item, 'BlogPosts'));\n const numOfTileLines = parseInt(cmsUtils.payload(item, 'NumOfTileLines', '2'));\n //console.log(numOfPost, parseInt(numOfPost));\n //console.log(posts);\n const bp = utils.ui.getCurrentBreakpoint();\n const tilesPerLine = {xs:1, sm:1, md:2, lg:2, xl:3, xxl:3}\n const numOfPost = numOfTileLines * (tilesPerLine[bp] || 3);\n const step = numOfPost;\n console.log(\"BlogPost:\",bp, numOfTileLines, tilesPerLine, numOfPost)\n\n const [tilesToShow, setTilesToShow] = React.useState(numOfPost);\n\n const displayingPosts = posts.length > tilesToShow ? posts.slice(0, tilesToShow) : posts;\n const showMore = posts.length > displayingPosts.length;\n\n const pageTileElts = displayingPosts.map((page, index) =>\n \n );\n\n const cssClass = utils.classNames('cms_item', 'blogTiles tiles IAmFine', item.cssClass || item.anchorName || '');\n\n return (\n <>\n
\n {pageTileElts}\n
\n {showMore && (
\n { setTilesToShow(tilesToShow + step) }}>LOAD MORE
)}\n \n );\n}\n\nfunction getPages(pagesSerialized) {\n if (pagesSerialized) {\n return JSON.parse(pagesSerialized);\n }\n return [];\n}\n\nfunction Tile(props) {\n const page = props.page;\n const imageUrl = utils.site.resourcePath(page.imageUrl);\n const disableLink = props.disableLink;\n const postDate = utils.date.formatDDMMYYYY(page.postDate);\n const categoryName = page.categoryName1;\n\n return (\n
\n \n
\n
\n
\n
\n {categoryName}\n
\n
\n {page.pageTitle}\n
\n
\n
\n {page.tileDesc || page.description}\n
\n \n
\n
\n {postDate}\n
\n {/*
read more
*/}\n
\n
\n
\n \n \n )\n}","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\n\nexport function BlogPostTitle(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n\n\n //console.log('item', item);\n\n const title = cmsUtils.payload(item, 'PageTitle');\n const postDate = cmsUtils.payload(item, 'PostDate');\n console.log(\"Blog engine title:\", title, postDate);\n\n const cssClass = utils.classNames('blogView__titleContainer', 'cms_item', item.cssClass || item.anchorName || '');\n\n return (\n
\n\n

\n \n {title}\n \n

\n
\n {postDate}\n
\n
\n );\n}\n","import React from 'react';\n//import cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { Item } from '../../items/item';\n\nexport function VideoHolder(props) {\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item, subItems);\n\n const subItemsElts = subItems.map((subItem, index) =>\n \n );\n\n const cssClass = utils.classNames('cms_item', 'videoHolder', item.cssClass || item.anchorName || '');\n\n return (\n
\n {subItemsElts}\n
\n );\n}","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { YoutubeEmbedPopup } from '../../../components';\n\nexport function VideoItem(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n\n console.log('item', item);\n\n const youtubeCode = cmsUtils.payload(item, 'YoutubeCode');\n const posterFrameUrl = cmsUtils.payload(item, 'PosterFrameUrl');\n const captionTitleYoutube = cmsUtils.payload(item, 'CaptionTitleYoutube');\n const shortDesc = cmsUtils.payload(item, 'ShortDesc');\n\n const cssClass = utils.classNames('cms_item', 'videoItem', item.cssClass || item.anchorName || '');\n\n return (\n
\n
\n
\n \n
\n
\n

{captionTitleYoutube}

\n
\n
\n
\n
\n );\n}","import React from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport { Item } from '../../items/item';\nimport utils from '../../../utils';\n\nexport function MultiColumnPanel(props){\n const item = props.item;\n const mobileReverse = cmsUtils.payload(item, 'MobileReverse', 'no');\n //const subItems = item.items || [];\n const subItems = (mobileReverse === \"yes\" && utils.css.screenWidth() <= 550) ? item.items.reverse() || [] : item.items || [];\n const cmsOption = props.cmsOption || {};\n const columnWidths = cmsUtils.payload(item, 'ColumnWidths').split(\",\");\n const mobileColumnWidths = cmsUtils.payload(item, 'MobileColumnWidths').split(\",\");\n const countItem = {countD : 0, countM : 0, col : \"\"};\n\n const bgColor = cmsUtils.payload(item, 'BgColor');\n //const textColorTheme = cmsUtils.payload(item, 'TextColorTheme');\n const imageUrl = cmsUtils.payload(item, 'ImageUrl');\n const backgroundTile = cmsUtils.payload(item, 'BackgroundTile');\n const bgTheme = cmsUtils.payload(item, 'TextColorTheme') || 'white';\n const panelWidth = cmsUtils.payload(item, \"PanelWidth\");\n \n let bgUrl = null;\n if (imageUrl)\n bgUrl = utils.site.resourcePath(imageUrl);\n else if (backgroundTile)\n bgUrl = utils.site.resourcePath(`/dist/transparent-textures/textures/${backgroundTile}`);\n\n const cssClass =\n panelWidth === \"full\"\n ? utils.classNames(\n \"cms_item\",\n \"contentPanel\",\n \"multiColumnPanel\",\n \"multiColumnPanelFull\",\n \"contentPanel--\" + bgTheme,\n item.cssClass || item.anchorName || \"\"\n )\n : utils.classNames(\n \"cms_item\",\n \"contentPanel\",\n \"multiColumnPanel\",\n \"contentPanel--\" + bgTheme,\n item.cssClass || item.anchorName || \"\"\n );\n\n function setupClass(index){ \n countItem.col = \"\";\n if(columnWidths.length === countItem.countD){\n countItem.countD = 0;\n }\n\n if(mobileColumnWidths.length === countItem.countM){\n countItem.countM = 0;\n }\n \n countItem.col = \"col-sm\" + (columnWidths[countItem.countD] === \"13\" ? \"\" : \"-\" + columnWidths[countItem.countD]) + \" col-\" + mobileColumnWidths[countItem.countM];\n countItem.countD ++;\n countItem.countM ++;\n };\n\n const subItemsElts = subItems.map((subItem, index) => {\n setupClass();\n return
\n \n
\n } \n );\n return (\n
\n
\n
\n {subItemsElts}\n
\n
\n
\n );\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { FaChevronDown } from \"react-icons/fa\";\nimport React, { useLayoutEffect, useRef } from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { useRouter } from '../../../components';\nimport { handleElementLink } from '../../../components';\nimport env from '../../../env';\n\nexport function ExpandableHtml(props) {\n const cmsOption = props.cmsOption || {};\n const [open, setOpen] = React.useState(cmsOption.isCmsEdit);\n const ver = env.ver;\n const item = props.item;\n //const subItems = item.items || [];\n const { history } = useRouter();\n //console.log('item', item, cmsOption);\n //console.log(open)\n let content = cmsOption.isCmsEdit? \n cmsUtils.payload(item, 'Content'): \n cmsUtils.payload(item, 'Content').replace(\"__version__\", \" PWA \"+ ver +\"\");\n\n const buttonTitle = cmsUtils.payload(item, 'ButtonTitle');\n\n\n const cssClass = utils.classNames('cms_item', 'htmlPanel exHtml', cmsOption.isCmsEdit && 'html', item.cssClass || item.anchorName || '');\n\n //let itemElt = (
);\n\n function handleClick(e) { \n \n let target = \"\";\n if(e.target.closest('a')){\n target = e.target.closest('a').getAttribute('target');\n }\n const processed = (target === \"_blank\" ? handleElementLink(e.target, null) : handleElementLink(e.target));\n //const link = utils.url.getLinkFromElement(e.target);\n //console.log('clicked', e, e.target, processed);\n \n if (processed.handled) {\n e.preventDefault();\n e.stopPropagation();\n } else if (processed.linkInfo && processed.linkInfo.type === 'internal') {\n e.preventDefault();\n e.stopPropagation();\n history.push(processed.linkInfo.url)\n } else {\n // e.preventDefault();\n // e.stopPropagation();\n // setPdfViewPath(utils.site.resourcePath(link))\n }\n }\n\n const htmlBlock = useRef(null);\n // function iframeSizer() {\n // //console.log('iframesizer')\n // let iframesContainer = htmlBlock.current.querySelectorAll('iframe.youtube, .ytvideo iframe');\n // //console.log('iframesizer', iframesContainer)\n // if (iframesContainer && iframesContainer.length) {\n // iframesContainer.forEach(element => {\n // let height = (element.parentElement.offsetWidth * 9) / 16\n // //console.log(height, element.parentElement.offsetWidth)\n // element.style.height = height + 'px';\n // });\n // }\n // }\n\n useLayoutEffect(() => {\n const buttons = htmlBlock.current.querySelectorAll('.button');\n for (let i = 0; buttons && i < buttons.length; i++) {\n restructureButton(buttons[i])\n }\n\n // const youtubes = htmlBlock.current.querySelectorAll('iframe[src*=\"youtube\"]');\n // console.log(youtubes)\n\n // iframeSizer();\n // window.addEventListener('resize', iframeSizer)\n // return (): void => {\n // window.removeEventListener('resize', iframeSizer)\n // }\n\n }, [])\n\n\n const style = {\n icon: {\n marginLeft: '0.5rem',\n width: 'auto !important',\n fontSize: '80%',\n transition: 'all 0.5s'\n },\n iconOpen: {\n transform: 'translateY(-0.1rem) rotate(-180deg)'\n },\n iconClosed: {\n transform: 'translateY(-0.1rem) rotate(0)'\n },\n panelCollapsed: {\n maxHeight: 0,\n transition: 'all 0.6s',\n opacity: 0,\n overflow: 'hidden'\n },\n panelOpen: {\n opacity: 1,\n maxHeight: '2000px',\n transition: 'all 1s'\n }\n }\n\n const toggleExPanel = (e) => {\n e.preventDefault()\n e.stopPropagation()\n setOpen(!open)\n }\n\n\n if (cmsOption.isCmsEdit)\n return (\n
handleClick(e)}>\n
\n {e.preventDefault(); e.stopPropagation();}}>{buttonTitle} \n
To edit the button title, please double click or open item editor
\n
\n \n
\n
\n )\n\n return (\n
handleClick(e)}>\n \n \n
\n
\n )\n}\n\n\nfunction restructureButton(el) {\n if (!el.querySelector('span')) {\n const span = document.createElement('span');\n span.innerHTML = el.innerHTML;\n el.innerHTML = '';\n el.appendChild(span);\n }\n}","// //import { css, keyframes } from '@emotion/core'\n// //import { variables, mq } from 'cssInJs'\n\nimport { css } from '@emotion/core'\nimport { mq } from '../../cssInJs'\n\nexport default {\n photoGallery : css({\n maxWidth : '960px',\n margin: 'auto'\n }),\n thumbnails : css({\n display:'flex',\n flexWrap:'wrap',\n marginLeft:'-5px',\n marginRight:'-5px'\n }),\n thumbnail : css(mq({\n //flexBasis: ['50%','25%','33.33%'],\n flexBasis: ['50%','25%','16.66%'],\n //padding: ['5px']\n padding:'5px',\n cursor: 'pointer'\n })),\n bg : {\n paddingBottom: '100%',\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n }\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport style from './style';\nimport { useState, useEffect } from 'react';\n\nimport utils from '../../utils';\nimport cmsUtils from '../../cms/utils/cmsUtils';\nimport FsLightbox from 'fslightbox-react';\nimport { createPortal } from \"react-dom\";\n\nfunction Portal({children}){\n const [el] = useState(document.createElement('div'));\n useEffect(() => {\n let mount = document.getElementById(\"portal-root\");\n mount.appendChild(el);\n return () => mount.removeChild(el);\n }, [el]);\n return createPortal(children, el);\n}\n\nexport function PhotoGallery(props){\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n const cssClass = utils.classNames('cms_item', 'photoGallery', item.cssClass || item.anchorName || '');\n const _images = cmsUtils.payload(item, 'ImageUrl') ? cmsUtils.payload(item, 'ImageUrl').split(\"|\") : [];\n const _thumbImages = [];\n\n // _images.forEach(el => {\n // let a = el.split(\"/\");\n // console.log('e',e);\n // });\n\n //let a = _images[0].split(\"/\");\n \n if(_images.length > 0){\n _images.forEach(el => {\n let _texts = el.split('/');\n let _text = el.replace(_texts[_texts.length-1], \"@thumb/\" + _texts[_texts.length-1]);\n _thumbImages.push(_text);\n });\n //console.log('222', _images2);\n }\n\n //const _images = ['https://jaba.com.au/sites/jaba/media/images/multicolour-services-min.jpg'];\n const [toggler, setToggler] = useState(false);\n const [popupIndex, setPopupIndex] = useState(0);\n \n return(\n
\n {/* */}\n \n
\n PhotoGallery\n
\n \n
\n\n
\n {\n _thumbImages.map((item, index) =>\n
{\n e.preventDefault();\n e.stopPropagation();\n setToggler(!toggler);\n setPopupIndex(index);\n }}>\n
\n
\n )\n \n }\n
\n
\n ); \n}","import { css } from '@emotion/core'\n//import { mq } from 'cssInJs'\n\nexport default{\n testimonialPanel : css({\n marginTop: '20px',\n marginBottom: '20px',\n backgroundColor: 'transparent',\n '& .slick-prev:before, .slick-next:before' : {\n color : 'black'\n },\n '& .slick-next' : {\n right : '-2%'\n },\n '& .slick-prev' : {\n left : '-2%'\n }\n })\n}","import { css } from '@emotion/core'\nimport { mq } from '../../../cssInJs'\n\nexport default{\n testimonialItem : css(mq({\n maxWidth : '300px',\n backgroundColor: '#f8f8ff',\n opacity: '.9',\n textAlign: 'center',\n color: '#000',\n padding: '10px',\n //height: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n margin: 'auto',\n height: ['400px', '430px']\n })),\n\n\n testimonialItem_title : css(mq({\n marginBottom: '0px',\n fontSize: ['2rem', '1.72rem']\n })),\n\n testimonialItem_desc :css(mq({\n flex: '1 1 auto',\n fontSize: ['1.2rem', '1rem'] \n //flexGrow: '1',\n //flexShrink: '1'\n })),\n\n testimonialItem_bottom : css(mq({\n fontSize : ['1rem', '0.86rem']\n }))\n}","import utils from '../../../utils';\nimport cmsUtils from '../../../cms/utils/cmsUtils';\nimport { IoIosStar } from \"react-icons/io\";\n\n/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport style from './style';\n\nexport function TestimonialItem(props){\n\n const item = props.item;\n //const cmsOption = props.cmsOption || {};\n const cssClass = utils.classNames('cms_item', 'testimonialItem', item.cssClass || item.anchorName || '');\n \n const startRatingColor = (props.startRatingColor && props.startRatingColor !== \"\") ? props.startRatingColor : \"black\";\n \n const title = cmsUtils.payload(item, 'Title');\n const desc = cmsUtils.payload(item, 'Desc');\n const bottom = cmsUtils.payload(item, 'BottomText');\n const ratingValue = parseInt(cmsUtils.payload(item, 'RatingStar'));\n \n var rating = [];\n\n for(var i = 0; i < ratingValue; i++ ){\n rating.push(\n \n );\n }\n\n return(\n // data-cms-item-id={cmsOption.isCmsEdit && item.itemId} id={item.anchorName}\n
\n

\n { title }\n

\n
\n { rating }\n
\n {/* style={{ flexBasis: props.desH + \"px\" }} */}\n
\n { desc }\n
\n
\n { bottom }\n
\n
\n );\n}","//import { Item } from 'cms/items/item';\nimport Slider from \"react-slick\";\nimport utils from '../../../utils';\n//import cmsUtils from 'cms/utils/cmsUtils';\n\n/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport style from './style';\n//import { useState, useEffect } from 'react';\n\nimport { TestimonialItem } from '../testimonialItem/view';\n\nexport function TestimonialPanel(props){\n const item = props.item;\n //const defaultDesH = 220;\n const startRatingColor = props.startRatingColor;\n const subItems = item.items || [];\n //console.log(subItems.length);\n const cmsOption = props.cmsOption || {};\n const cssClass = utils.classNames('cms_item', 'testimonialPanel', item.cssClass || item.anchorName || '');\n \n //const [desH, setDesH] = useState(defaultDesH);\n\n //var maxDesTextLength = 0;\n const testimonialItems = subItems.map((subItem, index) => {\n // let subItemDes = cmsUtils.payload(subItem, \"Desc\");\n // if(maxDesTextLength < subItemDes.length){\n // maxDesTextLength = subItemDes.length\n // }\n //return \n return \n }\n );\n \n // useEffect(() => {\n // if(defaultDesH < maxDesTextLength){\n // setDesH(maxDesTextLength);\n // }\n // }, [maxDesTextLength]);\n\n var settings = {\n dots: false,\n infinite: true,\n speed: 1700,\n autoplaySpeed: 3000,\n ////fade: true,\n autoplay: true,\n slidesToShow: (subItems.length >= 3 ? 3 : subItems.length),\n //slidesToShow: 3,\n slidesToScroll: 1,\n responsive : [\n {breakpoint : 1024, settings : { slidesToShow: (subItems.length >= 2 ? 2 : subItems.length) }},\n {breakpoint : 800, settings : { slidesToShow: 1 }}\n ]\n };\n\n return(\n
\n \n { testimonialItems }\n \n
\n );\n}","import { css } from '@emotion/core'\n//import { mq } from '../../cssInJs'\nexport default{\n exTextItem : css({\n overflow:'hidden',\n maxHeight:'0',\n transition: 'all 0.8s',\n padding: '0px',\n '&.expand' : {\n maxHeight:'100%',\n padding: '1rem 0'\n }\n })\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\n//import React from 'react';\nimport cmsUtils from '../../cms/utils/cmsUtils';\nimport utils from '../../utils';\nimport style from './style';\nimport { Item } from '../../cms/items/item';\n\nexport function ExpandablePanel(props){\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n const bgColor = cmsUtils.payload(item, 'BgColor');\n const imageUrl = cmsUtils.payload(item, 'ImageUrl');\n const backgroundTile = cmsUtils.payload(item, 'BackgroundTile');\n \n let bgUrl = null;\n\n if (imageUrl){\n bgUrl = utils.site.resourcePath(imageUrl);\n }\n else if (backgroundTile){\n bgUrl = utils.site.resourcePath(`/dist/transparent-textures/textures/${backgroundTile}`);\n }\n\n const cssClass = utils.classNames('cms_item', 'contentPanel', 'expandablePanel', cmsOption.isCmsEdit && 'expandablePanel_item_cms', item.cssClass || item.anchorName || '');\n const subItemsElts = subItems.map((subItem, index) =>\n \n );\n //id={item.anchorName}\n return (\n
\n
\n
\n {subItemsElts}\n
\n
\n )\n}","import { css } from '@emotion/core'\n//import { mq } from 'cssInJs'\n\nexport default {\n sliderAwardPanel: css({\n maxWidth: '960px',\n marginInline: 'auto',\n marginTop: '20px',\n marginBottom: '20px',\n backgroundColor: 'transparent',\n '& .slick-prev:before, .slick-next:before': {\n color: 'black'\n },\n '& .slick-next': {\n right: '-2%'\n },\n '& .slick-prev': {\n left: '-2%'\n }\n }),\n sliderImageWrapper: {\n height: '100%'\n },\n sliderImageWrapper2: {\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n padding: '0 5px',\n flexDirection: 'column',\n margin: 'auto',\n maxWidth: '500px'\n },\n sliderImage: css({\n //width: 'auto !important',\n //height:'100% !important',\n //display: 'block !important',\n //margin: 'auto',\n //maxHeight: '180px'\n })\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport style from './style';\nimport Slider from \"react-slick\";\nimport utils from '../../../utils';\nimport cmsUtils from '../../../cms/utils/cmsUtils';\nimport { SiteLink } from '../../../components';\n\nexport function SliderAwardPanel(props) {\n const item = props.item;\n //const defaultDesH = 220;\n const subItems = item.items || [];\n //console.log(subItems.length);\n const cmsOption = props.cmsOption || {};\n const cssClass = utils.classNames('cms_item', 'sliderAwardPanel', item.cssClass || item.anchorName || '');\n\n const sliderAwardItems = subItems.map((subItem, index) => {\n const imageUrl = cmsUtils.payload(subItem, 'ImageUrl');\n const bottomText = cmsUtils.payload(subItem, 'BottomText');\n const linkUrl = cmsUtils.payload(subItem, 'LinkUrl');\n return (\n
\n {\n (linkUrl && linkUrl !== '') ? \n \n
\n {'sliderimage-'\n
{bottomText}
\n
\n
: \n \n
\n {'sliderimage-'\n
{bottomText}
\n
\n \n }\n \n \n
\n )\n }\n );\n\n var numOfSlides = (maxNum) => subItems.length >= maxNum ? maxNum : subItems.length\n\n var settings = {\n dots: false,\n infinite: true,\n speed: 1500,\n autoplaySpeed: 3000,\n ////fade: true,\n autoplay: true,\n slidesToShow: numOfSlides(6),\n //slidesToShow: 3,\n slidesToScroll: numOfSlides(1),\n responsive: [\n { breakpoint: 1024, settings: { slidesToShow: numOfSlides(5), slidesToScroll: numOfSlides(1) } },\n { breakpoint: 992, settings: { slidesToShow: numOfSlides(4), slidesToScroll: numOfSlides(1) } },\n { breakpoint: 768, settings: { slidesToShow: numOfSlides(3), slidesToScroll: numOfSlides(1) } },\n { breakpoint: 576, settings: { slidesToShow: numOfSlides(2), slidesToScroll: numOfSlides(1)} }\n ]\n };\n\n return (\n
\n \n {sliderAwardItems}\n \n
\n );\n}","import React, { useState } from \"react\";\nimport cmsUtils from \"../../utils/cmsUtils\";\nimport utils from \"../../../utils\";\n\nexport function AccordionPanel(props) {\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n const primaryColor = cmsUtils.payload(item, \"BgColor\");\n const imageUrl = cmsUtils.payload(item, \"ImageUrl\");\n const backgroundTile = cmsUtils.payload(item, \"BackgroundTile\");\n\n const [selected, setSelected] = useState(null);\n const toggle = (i) => {\n if (selected === i) {\n return setSelected(null);\n }\n setSelected(i);\n };\n\n let bgUrl = null;\n if (imageUrl) bgUrl = utils.site.resourcePath(imageUrl);\n else if (backgroundTile)\n bgUrl = utils.site.resourcePath(\n `/dist/transparent-textures/textures/${backgroundTile}`\n );\n const cssClass = utils.classNames(\n \"cms_item\",\n \"accordionPanel\",\n \"contentPanel--\",\n item.cssClass || item.anchorName || \"\"\n );\n const borderStyle = \"1px solid \" + primaryColor;\n\n // console.log(\"FAQFAQ:\", subItems);\n // console.log(\"propsprops:\", props);\n \n const subItemsElts = subItems.map((subItem, index) => (\n
\n
\n \n toggle(index)}\n >\n

\n {subItem.payloads[0].value}\n

\n \n \n \n \n \n \n \n \n
\n
\n
\"\n ),\n }}\n >
\n
\n
\n \n \n ));\n\n return (\n <>\n \n
\n
{subItemsElts}
\n
\n \n \n );\n}\n","import { css } from '@emotion/core';\n\nexport default {\n photoSlide: css({\n margin: 'auto',\n }),\n};\n","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport style from './style';\nimport utils from '../../../utils';\nimport ImageGallery from 'react-image-gallery';\nimport FsLightbox from 'fslightbox-react';\nimport { useState } from 'react';\n\nexport function PhotoSlide(props) {\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n const cssClass = utils.classNames(\n 'cms_item',\n 'photoSlide',\n item.cssClass || item.anchorName || ''\n );\n const images = [];\n subItems.map((subItem, index) => {\n subItem.payloads[0].value.split('|').map((value, index) => {\n images.push({\n original: value,\n thumbnail: value,\n });\n return null;\n });\n return null;\n });\n const [toggler, setToggler] = useState(false);\n const [imageUrl, setImageUrl] = useState('');\n const _handleClick = (event) => {\n setImageUrl(event.target.src);\n console.log(imageUrl);\n setToggler(!toggler);\n };\n\n return (\n \n \n \n \n );\n}\n","import React, { useState } from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { Item } from '../../items/item';\nimport { SiteLink } from '../../../components';\nimport './style.scss'\n\nexport function ClubsTilesItem(props) {\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n const teamName = cmsUtils.payload(item, \"TeamName\");\n const addressLine1 = cmsUtils.payload(item, \"AddressLine1\");\n const suburb = cmsUtils.payload(item, \"Suburb\");\n const state = cmsUtils.payload(item, \"State\");\n const postcode = cmsUtils.payload(item, \"Postcode\");\n const websiteAddress = cmsUtils.payload(item, \"WebsiteAddress\");\n const heroImg = cmsUtils.payload(item, \"ImageUrl\");\n const homeUniformImg = cmsUtils.payload(item, \"ImageUrl2\");\n const guestUniformImg = cmsUtils.payload(item, \"ImageUrl3\");\n const googleMapLink = cmsUtils.payload(item, \"LinkUrl\");\n\n const ImageSwitcher = ({ homeUniformImg, guestUniformImg }) => {\n const [currentImg, setCurrentImg] = useState(homeUniformImg);\n\n return (\n setCurrentImg(guestUniformImg)}\n onMouseLeave={() => setCurrentImg(homeUniformImg)}\n >\n \"Uniform\"\n \n );\n };\n\n // console.log(\"Club Tiles Item:\", item);\n // console.log(\"subItems:\", subItems);\n\n // State to track the current image\n const [currentImg, setCurrentImg] = useState(homeUniformImg);\n\n const cssClass = utils.classNames('cms_item', 'clubsTilesItem', item.cssClass || item.anchorName || '')\n\n return (\n setCurrentImg(guestUniformImg)}\n onMouseLeave={() => setCurrentImg(homeUniformImg)}\n id={item.anchorName}\n data-cms-item-id={cmsOption.isCmsEdit && item.itemId}\n >\n
\n \n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
{teamName}
\n
\n \n {`${addressLine1}, ${suburb} ${state} ${postcode}`}\n \n
\n \n
\n
\n \n\n );\n}","import React, { useState, useRef } from 'react';\nimport cmsUtils from '../../utils/cmsUtils';\nimport { Item } from '../../items/item';\nimport utils from '../../../utils';\nimport './style.scss';\n\nexport function ClubsTilesPanel(props) {\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n const cssClass = utils.classNames('cms_item', 'clubTilePanel', item.cssClass || item.anchorName || '');\n\n const subItemsElts = subItems.map((subItem, index) =>\n \n );\n\n const sectionRefs = useRef({});\n\n const sortedTeams = subItemsElts.slice().sort((a, b) => {\n const teamA = a.props.item.payloads[3].value.toLowerCase();\n const teamB = b.props.item.payloads[3].value.toLowerCase();\n return teamA.localeCompare(teamB);\n })\n\n const teamsByLetter = sortedTeams.reduce((acc, team) => {\n const firstLetter = team.props.item.payloads[3].value[0].toUpperCase();\n if (!acc[firstLetter]) {\n acc[firstLetter] = [];\n }\n acc[firstLetter].push(team);\n return acc;\n }, {});\n\n const letterGroups = [\"A\\u00A0\\u00A0\\u00A0 B\\u00A0\\u00A0\\u00A0 C\\u00A0\\u00A0\\u00A0 \", \"D\\u00A0\\u00A0\\u00A0 E\\u00A0\\u00A0\\u00A0 F\\u00A0\\u00A0\\u00A0 G\\u00A0\\u00A0\\u00A0 \", \"H\\u00A0\\u00A0\\u00A0 I\\u00A0\\u00A0\\u00A0 J\\u00A0\\u00A0\\u00A0 K\\u00A0\\u00A0\\u00A0 L\\u00A0\\u00A0\\u00A0 \", \"M\\u00A0\\u00A0\\u00A0 N\\u00A0\\u00A0\\u00A0 O\\u00A0\\u00A0\\u00A0 \", \"P\\u00A0\\u00A0\\u00A0 Q\\u00A0\\u00A0\\u00A0 R\\u00A0\\u00A0\\u00A0 \", \"S\\u00A0\\u00A0\\u00A0 \", \"T\\u00A0\\u00A0\\u00A0 U\\u00A0\\u00A0\\u00A0 V\\u00A0\\u00A0\\u00A0 W\\u00A0\\u00A0\\u00A0 X\\u00A0\\u00A0\\u00A0 Y\\u00A0\\u00A0\\u00A0 Z\"];\n\n const handleScrollTo = (group) => {\n // 找到当前 group 下最先出现的字母\n for (let letter of group) {\n console.log('scrolling to letter:', letter);\n if (sectionRefs.current[letter]) {\n sectionRefs.current[letter].scrollIntoView({ behavior: \"smooth\", block: \"center\" });\n return;\n } else {\n console.log(`No ref found for letter: ${letter}`);\n }\n }\n };\n\n // console.log(\"Club panel subitems:\", subItemsElts);\n\n // console.log(\"team name:\", sortedTeams[0].props.item.payloads[3].value);\n\n return (\n \n
\n {letterGroups.map((group) => (\n \n ))}\n
\n
\n {/* {sortedTeams} */}\n {sortedTeams.map((team) => {\n const letter = team.props.item.payloads[3].value[0].toUpperCase();\n return (\n
{\n if (!sectionRefs.current[letter] && el) {\n sectionRefs.current[letter] = el;\n }\n }}>\n {team}\n
\n );\n })}\n
\n \n );\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport cmsUtils from '../../utils/cmsUtils';\nimport React, { useEffect, useState, useRef } from 'react';\nimport axios from 'axios';\nimport Papa from 'papaparse';\nimport utils from '../../../utils';\nimport './style.scss';\n\nexport function GoogleDoc(props) {\n\n const item = props.item;\n const googleDocID = cmsUtils.payload(item, 'GoogleDocID') || '';\n\n const [jsonData, setJsonData] = useState([]);\n const [searchInput, setSearchInput] = useState('');\n const [sortColumn, setSortColumn] = useState(null);\n const [sortOrder, setSortOrder] = useState('asc');\n const inputRef = useRef(null);\n\n useEffect(() => {\n const fetchGoogleSheet = async () => {\n try {\n const response = await fetch(`${googleDocID}`);\n const text = await response.text();\n\n Papa.parse(text, {\n header: true, \n skipEmptyLines: true, \n complete: (result) => {\n setJsonData(result.data);\n },\n });\n } catch (error) {\n console.error(\"Fetch Google Sheet error:\", error);\n }\n };\n\n fetchGoogleSheet();\n }, []);\n\n // useEffect(() => {\n // if (document.activeElement === inputRef.current) {\n // inputRef.current.focus();\n // }\n // });\n\n // const filteredData = jsonData.filter(row =>\n // Object.values(row).some(value =>\n // value.toLowerCase().includes(searchInput.toLowerCase())\n // )\n // );\n const filteredData = jsonData.filter(row =>\n Object.values(row).some(\n (value) => typeof value === 'string' && value.toLowerCase().includes(searchInput.toLowerCase())\n )\n );\n\n const handleSort = (column) => {\n const newOrder = sortColumn === column && sortOrder === 'asc' ? 'desc' : 'asc';\n setSortColumn(column);\n setSortOrder(newOrder);\n\n const sortedData = [...filteredData].sort((a, b) => {\n const valA = a[column];\n const valB = b[column];\n\n if (!isNaN(parseFloat(valA)) && !isNaN(parseFloat(valB))) {\n return newOrder === 'asc' ? valA - valB : valB - valA;\n } else {\n return newOrder === 'asc' ? valA.localeCompare(valB) : valB.localeCompare(valA);\n }\n });\n\n setJsonData(sortedData);\n };\n\n const cssClass = utils.classNames('cms_item', 'google-doc', item.cssClass || item.anchorName || '');\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n }\n }, [searchInput]);\n\n const Table = () => {\n if (jsonData.length === 0) {\n return

Loading Data...

\n }\n\n const firstRow = jsonData[0];\n\n const keys = [];\n for (let key in firstRow) {\n keys.push(key);\n }\n\n return (\n
\n {/* search bar */}\n setSearchInput(e.target.value)}\n className='search-input'\n />\n\n \n \n \n {/* {keys.map((header) => (\n \n ))} */}\n {keys.map((header) => (\n \n ))}\n \n \n \n {filteredData.map((row, index) => (\n \n {keys.map((header) => (\n \n ))}\n \n ))}\n \n
{header} handleSort(header)} className='thead-element'>\n {header}\n \n {sortColumn === header ? (sortOrder === 'asc' ? ' ↑' : ' ↓') : ' ⇅'}\n \n
{row[header] || ''}
\n
\n\n );\n\n }\n\n return ;\n\n}","import React, { useState } from \"react\";\nimport cmsUtils from \"../../utils/cmsUtils\";\nimport { Item } from '../item';\nimport utils from \"../../../utils\";\nimport './style.scss';\n\nexport function AccordionParentPanel(props) {\n const item = props.item;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n const subItemsElts = subItems.map((subItem, index) =>\n \n );\n\n const cssClass = utils.classNames(\n \"cms_item\",\n \"accordionParentPanel\",\n \"contentPanel--\",\n item.cssClass || item.anchorName || \"\"\n );\n\n console.log(\"item name:\", subItemsElts);\n\n const firstAccordionTopic = subItemsElts.length > 0 ? subItemsElts[0].props.item.payloads[2].value : null;\n const [selectedAnchor, setSelectedAnchor] = useState(firstAccordionTopic);\n\n const handleClick = (accordionTopic) => {\n setSelectedAnchor(accordionTopic);\n };\n\n return (\n \n
\n
    \n {subItemsElts.map((subItem, index) => (\n subItem.props.item.anchorName ? (\n \n handleClick(subItem.props.item.payloads[2].value)}\n className={`accordion-item ${selectedAnchor === subItem.props.item.payloads[2].value ? \"selected\" : \"\"}`}\n >\n {subItem.props.item.payloads[2].value}\n \n \n ) : null\n ))}\n
\n
\n
\n {/* {subItemsElts} */}\n {subItemsElts.filter(subItem => subItem.props.item.payloads[2].value === selectedAnchor)}\n
\n \n );\n}","import utils from '../../../utils';\nimport React, { useState, useEffect } from 'react';\nimport YouTube from 'react-youtube';\nimport axios from 'axios';\nimport cmsUtils from \"../../utils/cmsUtils\";\nimport './style.scss';\n\nexport function YouTubeWithPlaylist(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n const videoCode = cmsUtils.payload(item, \"YoutubeCode\");\n\n const videosPerPage = 4;\n const [videoList, setVideoList] = useState([]);\n const [currentVideoId, setCurrentVideoId] = useState('');\n const [startIndex, setStartIndex] = useState(0);\n\n const playlistId = `${videoCode}`;\n const API_KEY = 'AIzaSyAtuNCYY5OdcjDEVWuQZFkqdEiwUecEuGM';\n const API_URL = `https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&playlistId=${playlistId}&key=${API_KEY}`;\n\n const cssClass = utils.classNames(\n \"cms_item\",\n \"youtubePanel\",\n \"youtube-with-playlist\",\n \"youtube-container\",\n item.cssClass || item.anchorName || \"\"\n );\n\n useEffect(() => {\n const fetchAllVideos = async () => {\n let allVideos = [];\n let nextPageToken = '';\n\n do {\n const response = await axios.get(API_URL + (nextPageToken ? `&pageToken=${nextPageToken}` : ''));\n const videos = response.data.items.map(item => ({\n id: item.snippet.resourceId.videoId,\n title: item.snippet.title,\n thumbnail: item.snippet.thumbnails.medium.url,\n }));\n\n allVideos = [...allVideos, ...videos];\n nextPageToken = response.data.nextPageToken || '';\n\n } while (nextPageToken);\n\n setVideoList(allVideos);\n setCurrentVideoId(allVideos[0]?.id || '');\n };\n\n fetchAllVideos().catch(error => console.error('Error fetching playlist:', error));\n }, []);\n\n const opts = {\n height: '100%',\n width: '100%',\n playerVars: {\n autoplay: 1,\n mute: 1,\n },\n };\n\n const handlePrev = () => {\n setStartIndex(prev => Math.max(prev - videosPerPage, 0));\n };\n\n const handleNext = () => {\n setStartIndex(prev => Math.min(prev + videosPerPage, videoList.length - videosPerPage));\n };\n\n const offset = `-${(startIndex / videosPerPage) * 100}%`;\n\n return (\n
\n {/* main play window */}\n \n
\n {/* thumbnails list */}\n
\n {videoList.slice(startIndex, startIndex + videosPerPage).map(video => (\n
setCurrentVideoId(video.id)}>\n {video.title}\n
\n ))}\n
\n
\n
\n \n \n
\n
\n )\n\n}","import React from 'react';\nimport utils from '../../utils';\nimport { items } from '../../site/_cmsItems/items-generated';\nimport cmsUtils from '../utils/cmsUtils'\nimport { BannerPanel } from './bannerPanel/view';\nimport { BannerItem } from './bannerItem/view';\nimport { Panel } from './panel/view';\nimport { Html } from './html/view';\n// import { TestimonialPanel } from './testimonialPanel/view';\n// import { TestimonialItem } from './testimonialItem/view';\nimport { ImagePanel } from './imagePanel/view';\nimport { PageTiles } from './pageTiles/view';\nimport { PageTilesBsyc } from '../../components/tiles/bsyc/view';\nimport { SingleBanner } from './singleBanner/view';\nimport { ContactForm } from './contactForm/view';\nimport { VideoPanel } from './VideoPanel/view';\nimport { Code } from './code/view';\nimport { BlogPosts } from './blogPosts/view';\nimport { BlogPostTitle } from './blogPostTitle/view';\nimport { VideoHolder } from './videoHolder/view';\nimport { VideoItem } from './videoItem/view';\nimport { MultiColumnPanel } from './multiColumnPanel/view';\nimport { ExpandableHtml } from './expandableHtml/view';\nimport { PhotoGallery } from '../../components/photoGallery/view';\nimport { TestimonialPanel } from '../../components/testimonial/index';\nimport { ExpandablePanel } from '../../components/expandablePanel/view';\nimport { SliderAwardPanel } from '../../components/SliderAward/index';\nimport { AccordionPanel } from \"./accordionPanel/view\";\nimport { PhotoSlide } from '../../components/PhotoSlide/index';\nimport { ClubsTilesItem } from './clubsTilesItem/view';\nimport { ClubsTilesPanel } from './clubsTilesPanel/view';\nimport { GoogleDoc } from './googleDoc/view';\nimport { AccordionParentPanel } from './accordionParentPanel/view';\nimport { YouTubeWithPlaylist } from './youTubeWithPlaylist/view';\n\n//import { PrintShare } from './printShare/view';\n\nexport function Item(props) {\n const item = props.item;\n const cmsOption = props.cmsOption || {};\n\n //console.log('item', item, cmsOption);\n\n let itemElt = null;\n\n const found = utils.array.find(items, (x) => x.match(item, cmsOption))\n //console.log(found)\n if (found) {\n return found.itemElt(item, cmsOption)\n }\n\n if (item.itemTypeCode === 'Panel') {\n itemElt = ();\n } else if (item.itemTypeCode === 'Html') {\n itemElt = ();\n } else if (item.itemTypeCode === 'BannerPanel') {\n itemElt = ();\n } else if (item.itemTypeCode === 'BannerItem') {\n itemElt = ();\n } else if (item.itemTypeCode === 'TestimonialPanel') {\n const setting = {\n startRatingColor: '#2b707d'\n };\n itemElt = ();\n } else if (item.itemTypeCode === 'ImagePanel') {\n itemElt = ();\n } else if (item.itemTypeCode === 'PageTiles') {\n let _tileType = cmsUtils.payload(item, 'TileType');\n const tileType = (_tileType && _tileType !== '') ? _tileType : '1';\n if (tileType === \"2\") {\n itemElt = ();\n }\n else {\n itemElt = ();\n }\n } else if (item.itemTypeCode === 'SingleBanner') {\n itemElt = ();\n } else if (item.itemTypeCode === 'ContactForm') {\n itemElt = ();\n } else if (item.itemTypeCode === 'VideoPanel') {\n itemElt = ();\n } else if (item.itemTypeCode === 'Code') {\n itemElt = ();\n } else if (item.itemTypeCode === 'Blog-Posts') {\n itemElt = ();\n } else if (item.itemTypeCode === 'Blog-PostTitle') {\n itemElt = ();\n } else if (item.itemTypeCode === 'MultiColumnPanel') {\n itemElt = ();\n } else if (item.itemTypeCode === 'ExpandableHtml') {\n itemElt = ();\n } else if (item.itemTypeCode === 'VideoHolder') {\n itemElt = ();\n } else if (item.itemTypeCode === 'VideoItem') {\n itemElt = ();\n } else if (item.itemTypeCode === 'PhotoGallery') {\n itemElt = ();\n } else if (item.itemTypeCode === 'ExpandablePanel') {\n itemElt = ();\n } else if (item.itemTypeCode === 'SliderAwardPanel') {\n itemElt = ();\n } else if (item.itemTypeCode === \"AccordionPanel\") {\n itemElt = ;\n } else if (item.itemTypeCode === 'PhotoSlide') {\n itemElt = ;\n } else if (item.itemTypeCode === 'ClubsTilesPanel') {\n itemElt = ;\n } else if (item.itemTypeCode === 'GoogleDoc') {\n itemElt = ;\n } else if (item.itemTypeCode === 'AccordionParentPanel') {\n itemElt = ;\n } else if (item.itemTypeCode === 'ClubsTilesItem') {\n itemElt = ;\n } \n else if (item.itemTypeCode === 'YouTubeWithPlaylist') {\n itemElt = ;\n } \n else {\n itemElt = (
{item.itemTypeCode}
);\n }\n\n // const subItemsElts = subItems.map((subItem, index) =>\n // \n // );\n return itemElt\n}\n","import React, { useState, useEffect } from 'react';\nimport { useRouter } from '../../../components';\nimport { useGet } from '../../../components';\nimport { Item } from '../../items/item';\nimport { NotFound } from '../../../components';\nimport env from '../../../env';\nimport { useStore } from '../../../store';\nimport { ErrorPopup, Loading } from '../../../components';\nimport { useInstagram } from '../../../components';\nimport { MetaTag } from '../../../components';\nimport cmsUtils from '../../utils/cmsUtils';\nimport utils from '../../../utils';\nimport { gtm } from '../../../lib/tracking';\n\nconst log = (...args) => {\n //console.log(args);\n}\nconst areEqual = (prevProps, nextProps) => {\n return (prevProps.pageData === nextProps.pageData)\n};\nconst PageMemo = React.memo(Page, areEqual)\n\nexport function ViewPage() {\n const { dispatch } = useStore();\n const [pageLoaded, setPageLoaded] = useState(false);\n const [data, setData] = useState(null);\n //const path = usePath();\n //log('view page', path);\n const { pathname, Redirect } = useRouter();\n useInstagram();\n\n const get = useGet();\n log('0. viewpage ready');\n\n useEffect(() => {\n log('*. start loading')\n setPageLoaded(false);\n get.send(env.apiBase + \"/api/cms/GetPublishedPage?path=\" + pathname);\n // eslint-disable-next-line\n }, [pathname]);\n\n useEffect(() => {\n if (data){\n dispatch({ type: 'SET_PAGE', payload: data.data })\n dispatch({ type: 'SET_MENU', payload: data.menu })\n }\n // eslint-disable-next-line\n }, [data]);\n\n if (get.loading()) {\n return \n } else if (get.hasErrors()) {\n return \n }\n\n //log(router.pathname);\n //log(get.loading());\n log('1. viewpage component', pageLoaded, get.response);\n\n\n const pageData = get.response.data;\n //const menuData = get.response.menu;\n const redirectTo = get.response.redirectTo;\n\n const cmsOption = {};\n log(pageLoaded, !pageLoaded && !!pageData)\n if (!pageLoaded && pageData) {\n //log(pageLoaded, pageData, menuData)\n log('2. dispatching page & menu')\n setPageLoaded(true);\n setData(get.response);\n document.title = pageData.pageTitle;\n gtm.pageView(pathname, pageData.pageTitle);\n return null;\n } else if (redirectTo) {\n if (redirectTo.indexOf('http') >= 0 && typeof window !== `undefined`) {\n return window.location.href = redirectTo;\n } else {\n return \n }\n } else if (!pageLoaded && !pageData) {\n setPageLoaded(true);\n setData(get.response);\n return ()\n }\n\n log('3. call rendering memo')\n if (pageData)\n return ;\n else\n return \n}\n\n\nfunction Page(props) {\n const pageData = props.pageData;\n const cmsOption = props.cmsOption;\n cmsOption.pageData = pageData;\n // document.title = pageData.pageTitle;\n log('4. page rendering', pageData, cmsOption)\n const sectionItems = pageData.sections.map((section, index) => {\n return (\n
\n )\n }\n );\n return (\n <>\n \n
\n {sectionItems}\n
\n \n );\n}\n\nfunction Section(props) {\n log('5. section rendering')\n const item = props.item;\n //const sectionName = item.sectionName;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n if (!subItems || subItems.length === 0)\n return (<>);\n\n const subItemsElts = subItems.map((subItem, index) =>\n \n );\n return (\n <>\n {subItemsElts}\n \n );\n}\n\nfunction getMetaTag(pageData) {\n //const country = utils.site.isNZ? 'New Zealand' : 'Australia'\n const country = \"Australia\";\n const siteName = env.siteName;\n const titleSuffix = env.titleSuffix;\n\n return {\n title: pageData.pageTitle + ' | ' + titleSuffix,\n description: cmsUtils.payload(pageData, 'Description'),\n keywords: cmsUtils.payload(pageData, 'Keyword'),\n heroImageUrl: utils.site.fullUrl(cmsUtils.payload(pageData, 'ImageUrl')),\n language: 'English',\n country: country,\n siteName: siteName,\n url: utils.site.fullUrl(pageData.pageUrl),\n //canonical: utils.site.resourcePath(pageData.pageUrl)\n }\n}","import React from 'react';\r\nimport { loadJs } from '../../lib/net-loader';\r\n\r\nexport function useInstagram() {\r\n const [embedStatus, setEmbedStatus] = React.useState(null);\r\n\r\n React.useEffect(() => {\r\n loadEmbedJs()\r\n })\r\n\r\n function loadEmbedJs() {\r\n if (typeof window !== `undefined`) {\r\n //console.log('instgrm effect', embedStatus, window.instgrm);\r\n if (window.instgrm) {\r\n window.instgrm.Embeds.process();\r\n }\r\n else if (!embedStatus && embedStatus !== 'loading') {\r\n setEmbedStatus('loading');\r\n loadJs(\"https://www.instagram.com/embed.js\").then(data => {\r\n //console.log('instgrm loaded', data);\r\n if (window.instgrm) {\r\n window.instgrm.Embeds.process();\r\n setEmbedStatus('loaded');\r\n }\r\n })\r\n }\r\n }\r\n }\r\n\r\n return { loadEmbedJs: loadEmbedJs }\r\n}","//import { CmsPageController } from './cms-page-controller'\n\nexport class CmsRadioSender {\n controller;//: CmsPageController;\n constructor(controller) {\n this.controller = controller;\n }\n\n sendMessageToParent(action: string, data: any) {\n var cloned = JSON.parse(JSON.stringify(data));\n if (typeof window !== `undefined`) {\n window.parent.postMessage({\n action: action,\n data: cloned\n }, \"*\");\n }\n }\n\n saveAllDirtyHtml(htmlChanges) {\n // skip another unneccesary round trip\n this.sendMessageToParent('return-all-dirty-html', {\n returnTo: '_saveAllDirtyHtml',\n htmlChanges: htmlChanges\n });\n }\n\n selectControllerItem(data) {\n this.sendMessageToParent(\"select-controller-item\", data);\n }\n\n returnAllDirtyHtml(returnTo, htmlChanges) {\n this.sendMessageToParent('return-all-dirty-html', {\n returnTo: returnTo,\n htmlChanges: htmlChanges\n });\n }\n\n returnHtml(id, html) {\n this.sendMessageToParent('return-html', {\n id: id,\n html: html\n });\n }\n\n markDirtyHtml(id) {\n this.sendMessageToParent(\"mark-dirty-html-item\", { id: id });\n }\n}\n","//declare var CKEDITOR: any;\n//import { CmsPageController } from './cms-page-controller'\n\nexport class CmsRadioReceiver {\n controller;//: CmsPageController;\n constructor(controller) {\n this.controller = controller;\n this.init();\n }\n\n init() {\n if (typeof window !== `undefined`) {\n var self = this;\n window.addEventListener(\"message\", function (e) {\n\n var action = e.data.action;\n var data = e.data.data;\n\n // console.log(e, \"cms-action-received: \" + action, data);\n\n if (action === 'select-item') {\n self.selectItem(data.itemId)\n } else if (action === 'media-selected-ckeditor') {\n self.mediaSelectedCKEditor(data)\n } else if (action === 'get-all-dirty-html') {\n var htmlChanges = self.controller.getAllDirtyHtml();\n self.controller.sender.returnAllDirtyHtml(data.returnTo, htmlChanges);\n } else if (action === 'get-html') {\n var html = self.controller.getHtml(data.id, data.itemName);\n self.controller.sender.returnHtml(data.id, html);\n } else if (action === 'page-reload') {\n window.location.reload();\n }\n }, false);\n }\n }\n\n mediaSelectedCKEditor(data) {\n const CKEDITOR = window['CKEDITOR'] || {};\n CKEDITOR.tools.callFunction(data.funcNum, data.selectedPath);\n }\n\n selectItem(itemId) {\n this.controller.selectItemFromController(itemId);\n }\n}\n","import { CmsRadioSender } from './cms-radio-sender'\n// //import * as $ from 'jquery';\n// declare var CKEDITOR: any;\n// import * as $ from 'jquery';\n\nexport class CmsHtmlEditor {\n ckeditorConfig;\n ckeditorStylesSet;\n sender;\n constructor(cmsEndpoint: string, sender: CmsRadioSender) {\n this.ckeditorConfig = {\n startupFocus: true,\n filebrowserBrowseUrl: cmsEndpoint + '/cms41helper/browse/selectpageormedia', //'/cms/browse',//'/cms/resource/selectfileckeditor',\n filebrowserImageBrowseUrl: cmsEndpoint + '/cms41helper/browse/selectmedia', //'/cms/browse?type=rc',//'/cms/resource/selectfileckeditor?type=Images',\n extraPlugins: 'sourcedialog,youtubejaba,lineutils,widget,embedjaba,image2',\n toolbar: [{\n name: 'basicstyles',\n groups: ['basicstyles', 'cleanup'],\n items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat']\n },\n {\n name: 'paragraph',\n groups: ['list', 'align'],\n items: ['NumberedList', 'BulletedList', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight',\n 'JustifyBlock'\n ]\n },\n {\n name: 'links',\n items: ['Link', 'Unlink', 'Anchor']\n },\n {\n name: 'insert',\n items: ['Image', 'Table', 'HorizontalRule', 'PageBreak', 'Iframe', 'Youtube', 'EmbedJaba']\n },\n '/',\n {\n name: 'document',\n groups: ['mode'],\n items: ['Sourcedialog']\n },\n {\n name: 'clipboard',\n groups: ['clipboard', 'undo'],\n items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo']\n },\n {\n name: 'styles',\n items: ['Styles', 'Format']\n },\n {\n name: 'colors',\n items: ['TextColor', 'BGColor']\n },\n {\n name: 'tools',\n items: ['Maximize', 'ShowBlocks']\n }\n ],\n extraAllowedContent: 'style;span;*[id,rel,data-*](*){*}'\n }\n\n this.ckeditorStylesSet = [\n /* Block Styles */\n\n // These styles are already available in the \"Format\" combo (\"format\" plugin),\n // so they are not needed here by default. You may enable them to avoid\n // placing the \"Format\" combo in the toolbar, maintaining the same features.\n /*\n { name: 'Paragraph',\t\telement: 'p' },\n { name: 'Heading 1',\t\telement: 'h1' },\n { name: 'Heading 2',\t\telement: 'h2' },\n { name: 'Heading 3',\t\telement: 'h3' },\n { name: 'Heading 4',\t\telement: 'h4' },\n { name: 'Heading 5',\t\telement: 'h5' },\n { name: 'Heading 6',\t\telement: 'h6' },\n { name: 'Preformatted Text',element: 'pre' },\n { name: 'Address',\t\t\telement: 'address' },\n */\n { name: 'Title', attributes: { 'class': 'title' } },\n {\n name: \"Moving up\",\n element: \"span\",\n attributes: { \"class\": \"aos_effect_up\" },\n },\n {\n name: \"Moving down\",\n element: \"span\",\n attributes: { \"class\": \"aos_effect_down\" },\n },\n {\n name: \"Moving left\",\n element: \"span\",\n attributes: { \"class\": \"aos_effect_left\" },\n },\n {\n name: \"Moving right\",\n element: \"span\",\n attributes: { \"class\": \"aos_effect_right\" },\n },\n // { name: 'Heading 3', element: 'h1', attributes: { 'class': 'h3' } },\n // { name: 'Super paragraph',\t\telement: 'p', attributes: { 'class': 'superparagraph' } },\n\n //{ name: 'Italic Title',\t\telement: 'h2', styles: { 'font-style': 'italic' } },\n //{ name: 'Subtitle',\t\t\telement: 'h3', styles: { 'color': '#aaa', 'font-style': 'italic' } },\n //{\n //\tname: 'Special Container',\n //\telement: 'div',\n //\tstyles: {\n //\t\tpadding: '5px 10px',\n //\t\tbackground: '#eee',\n //\t\tborder: '1px solid #ccc'\n //\t}\n //},\n\n /* Inline Styles */\n\n // These are core styles available as toolbar buttons. You may opt enabling\n // some of them in the Styles combo, removing them from the toolbar.\n // (This requires the \"stylescombo\" plugin)\n /*\n { name: 'Strong',\t\t\telement: 'strong', overrides: 'b' },\n { name: 'Emphasis',\t\t\telement: 'em'\t, overrides: 'i' },\n { name: 'Underline',\t\telement: 'u' },\n { name: 'Strikethrough',\telement: 'strike' },\n { name: 'Subscript',\t\telement: 'sub' },\n { name: 'Superscript',\t\telement: 'sup' },\n */\n\n //{ name: 'Marker',\t\t\telement: 'span', attributes: { 'class': 'marker' } },\n\n //{ name: 'Big',\t\t\t\telement: 'big' },\n //{ name: 'Small',\t\t\telement: 'small' },\n //{ name: 'Typewriter',\t\telement: 'tt' },\n\n //{ name: 'Computer Code',\telement: 'code' },\n //{ name: 'Keyboard Phrase',\telement: 'kbd' },\n //{ name: 'Sample Text',\t\telement: 'samp' },\n //{ name: 'Variable',\t\t\telement: 'var' },\n\n //{ name: 'Deleted Text',\t\telement: 'del' },\n //{ name: 'Inserted Text',\telement: 'ins' },\n\n //{ name: 'Cited Work',\t\telement: 'cite' },\n //{ name: 'Inline Quotation',\telement: 'q' },\n\n //{ name: 'Language: RTL',\telement: 'span', attributes: { 'dir': 'rtl' } },\n //{ name: 'Language: LTR',\telement: 'span', attributes: { 'dir': 'ltr' } },\n\n /* Object Styles */\n { name: 'Button', element: 'a', attributes: { 'class': 'button' } },\n { name: 'Secondary Button', element: 'a', attributes: { 'class': 'button secondary'}},\n { name: 'More link', element: 'a', attributes: { 'class': 'more' } }\n //{\n //\tname: 'Styled image (left)',\n //\telement: 'img',\n //\tattributes: { 'class': 'left' }\n //},\n\n //{\n //\tname: 'Styled image (right)',\n //\telement: 'img',\n //\tattributes: { 'class': 'right' }\n //},\n\n //{\n //\tname: 'Compact table',\n //\telement: 'table',\n //\tattributes: {\n //\t\tcellpadding: '5',\n //\t\tcellspacing: '0',\n //\t\tborder: '1',\n //\t\tbordercolor: '#ccc'\n //\t},\n //\tstyles: {\n //\t\t'border-collapse': 'collapse'\n //\t}\n //},\n\n //{ name: 'Borderless Table',\t\telement: 'table',\tstyles: { 'border-style': 'hidden', 'background-color': '#E6E6FA' } },\n //{ name: 'Square Bulleted List',\telement: 'ul',\t\tstyles: { 'list-style-type': 'square' } }\n ]\n\n this.sender = sender;\n }\n\n show($editor) {\n const CKEDITOR = window['CKEDITOR'] || {};\n //for ckeditor\n // console.log('ckeditor show');\n try {\n // We need to turn off the automatic editor creation first.\n CKEDITOR.disableAutoInline = true;\n } catch (e) { }\n\n var editor = CKEDITOR.inline('cmsCurrentEditor', this.ckeditorConfig);\n if (!CKEDITOR.stylesSet.get('default'))\n CKEDITOR.stylesSet.add('default', this.ckeditorStylesSet);\n\n var self = this;\n editor.on('change', function (evt) {\n // getData() returns CKEditor's HTML content.\n //$(\"#cmsCurrentEditor\").addClass(\"dirtyHtml\");\n //const itemId = $(\"#cmsCurrentEditor\").data('cms-item-id');\n const ed = document.querySelector('#cmsCurrentEditor');\n ed.classList.add('dirtyHtml');\n const itemId = ed.getAttribute('data-cms-item-id');\n\n //console.log(itemId);\n self.sender.markDirtyHtml(itemId);\n //console.log('Total bytes: ' + evt.editor.getData().length);\n });\n editor.on('paste', function (evt) {\n //console.log(evt.data.dataValue);\n //evt.data.dataValue = evt.data.dataValue.replace(/ /g, '');\n //evt.data.dataValue = evt.data.dataValue.replace(/

<\\/p>/g, '');\n //editor.insertHtml(evt.data.dataValue); return false;\n setTimeout(function () {\n CKEDITOR.instances.cmsCurrentEditor.setData(CKEDITOR.instances.cmsCurrentEditor.getData());\n }, 100);\n }, null, null, 9);\n }\n\n close($editor = null) {\n const CKEDITOR = window['CKEDITOR'] || {};\n //console.log('ckeditor close');\n if (typeof CKEDITOR.instances.cmsCurrentEditor != \"undefined\")\n CKEDITOR.instances.cmsCurrentEditor.destroy();\n\n //for (var instance in CKEDITOR.instances) {\n // CKEDITOR.instances[instance].destroy();\n //}\n\n }\n}\n","import { CmsRadioSender } from \"./cms-radio-sender\";\nimport { CmsRadioReceiver } from \"./cms-radio-receiver\";\nimport { CmsHtmlEditor } from \"./cms-html-editor\";\nimport env from \"../../env\";\n\n// declare var CKEDITOR: any;\n// import * as $ from 'jquery';\n\nexport class CmsPageController {\n settings; //: any;\n sender; //: CmsRadioSender;\n receiver; //: CmsRadioReceiver;\n htmlEditor; //: CmsHtmlEditor;\n\n constructor() {\n this.settings = { root: \"body\", viewOnly: false };\n this.sender = new CmsRadioSender(this);\n this.receiver = new CmsRadioReceiver(this);\n this.htmlEditor = new CmsHtmlEditor(env.cmsEndpoint, this.sender);\n }\n init(options) {\n const $ = window[\"jQuery\"];\n this.settings = Object.assign(\n {},\n /*default*/ { root: \"body\", viewOnly: false },\n options\n );\n this.initGlobalVars();\n\n var self = this;\n $(\"[onclick]\").prop(\"onclick\", null);\n $(\"[dblclick]\").prop(\"dblclick\", null);\n $(self.settings.root).off(\"click dblclick\", \"*\");\n $(self.settings.root).on(\"click dblclick\", \"*\", function (e) {\n //$(\".cms_html_editor_img_selected\").removeClass(\"cms_html_editor_img_selected\");\n // console.log($(e.target).hasClass(\"allowClick\"));\n // console.log(e.target);\n\n if (!$(e.target).hasClass(\"allowClick\")) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n if (\n $(this).attr(\"contenteditable\") === \"true\" ||\n $(\"#cms_html_editor_source_id\").is(\":visible\")\n ) {\n e.stopPropagation();\n return;\n }\n if (!self.settings.viewOnly)\n self.selectItem($(this), false, e.type === \"dblclick\");\n\n //Add noreferrer noopener when new window\n $(\"#cke_108_select\").change(function () {\n let _value = $(this).val();\n $(\"#cke_215_textInput\").val(\"\");\n if (_value === \"_blank\") {\n $(\"#cke_215_textInput\").val(\"noreferrer noopener\");\n }\n });\n });\n\n if (self.settings.viewOnly) return; // stop the editing logic for viewonly mode.\n\n // ctrl + s for html block\n $(self.settings.root).on(\"keydown\", \"#cmsCurrentEditor\", function (e) {\n if (e.ctrlKey && e.which === 83) {\n //var itemId = $(this).data(\"cms-item-id\");\n //if (!itemId)\n // itemId = $(this).closest(\"[data-cms-item-id]\").data(\"cms-item-id\");\n //window.parent.cms.site.saveHtml(itemId);\n //e.preventDefault();\n\n self.sender.saveAllDirtyHtml(self.getAllDirtyHtml());\n return false;\n }\n });\n }\n\n selectItemFromController(id) {\n const $ = window[\"jQuery\"];\n var item = $(\".cms_item[data-cms-item-id='\" + id + \"']\");\n this.scrollTo(item);\n this.selectItem(item, true);\n }\n\n selectItem($item, fromController, doubleclicked = false) {\n //console.log(\"select item - \" + fromController + \" - \" + doubleclicked);\n //console.log($item);\n var editor = $item.closest(\"[contenteditable]\");\n if (editor.length > 0) return;\n var cke_top = $item.closest(\".cke_top\");\n if (cke_top.length > 0) return;\n\n this.closeEditingItem();\n //console.log($item);\n if (typeof $item === \"undefined\") return;\n if ($item.length === 0) return;\n this.findItem($item, fromController, 0, doubleclicked);\n }\n\n closeEditingItem() {\n const $ = window[\"jQuery\"];\n //console.log(\"close editing item\");\n $(\"[contenteditable]\").removeAttr(\"contenteditable\");\n $(\"#cms_hovermenu\").remove();\n $(\".cms_editing_item\").removeClass(\"cms_editing_item\");\n }\n\n findItem($item, fromController, depth, doubleclicked) {\n const $ = window[\"jQuery\"];\n if (depth > 100) return false;\n // console.log($item, fromController, depth, doubleclicked)\n if (\n typeof $item.attr(\"data-cms-html\") !== \"undefined\" &&\n $item.attr(\"data-cms-html\") === \"true\"\n ) {\n $item.attr(\"contenteditable\", \"true\");\n this.showHtmlEditor($item);\n }\n if (typeof $item.attr(\"data-cms-item-id\") !== \"undefined\") {\n //$item.attr(\"contenteditable\", \"true\");\n $item.addClass(\"cms_editing_item\");\n if ($item.hasClass(\"multiColumnPanelv2\")) {\n //$(\".cms_item[data-cms-item-id='\" + itemid + \"']\")\n $item.find(\"div.new__multicolumn__panel__html\").each(function (index) {\n $(this).addClass(\"cms_editing_item\");\n });\n }\n\n if (!fromController) {\n //window.parent.cms.site.selectControllerItem($item.attr(\"data-cms-item-id\"),\n // typeof doubleclicked != \"undefined\" && doubleclicked == true\n //);\n this.sender.selectControllerItem({\n id: $item.attr(\"data-cms-item-id\"),\n openEdit:\n typeof doubleclicked !== \"undefined\" && doubleclicked === true,\n });\n }\n //show_hovermenu($item);\n } else {\n var editableParent = $item.parents(\n \".cms_item[data-cms-item-id], [data-cms-html]\"\n );\n if (editableParent.length > 0)\n this.findItem(\n editableParent.first(),\n fromController,\n depth + 1,\n doubleclicked\n );\n }\n }\n\n sameContent(a, b) {\n return a === b;\n }\n\n showHtmlEditor($item) {\n const $ = window[\"jQuery\"];\n var editor = $item;\n //console.log(editor);\n //var $menu = $(\"#cms_html_editor_ctrl\");\n ////$menu.css(\"top\", $item.offset().top - 40);\n ////$menu.css(\"left\", $item.offset().left);\n //$menu.show();\n //initHtmlEditor($item);\n\n if (editor.attr(\"id\") === \"cmsCurrentEditor\") return;\n\n $(\"#cmsCurrentEditor\").attr(\"id\", \"\");\n this.htmlEditor.close(editor);\n\n if (editor.hasClass(\"new__multicolumn__panel__html\")) {\n //$item.attr(\"data-cms-item-id\")\n var dataCmsItemId2 = editor.attr(\"data-cms-item-id2\");\n $(\"div.cms_item[data-cms-item-id2='\" + dataCmsItemId2 + \"']\").attr(\n \"data-cms-item-id\",\n \"\"\n );\n editor.attr(\"data-cms-item-id\", dataCmsItemId2);\n }\n\n editor.attr(\"id\", \"cmsCurrentEditor\");\n //editor.data(\"current-content\", editor.html());\n\n this.htmlEditor.show(editor);\n //setHandlers($item);\n }\n\n initGlobalVars() {\n const $ = window[\"jQuery\"];\n window[\"cmsPage\"] = $.extend({}, window[\"cmsPage\"] || {}, {\n htmleditor: {\n // cmsPage.htmleditor.getAnchors();\n getAnchors: function (opt) {\n //var options = $.extend({}, opt);\n //console.log(options);\n var anchors = [];\n\n $(\"a[name]\").each(function (inx, obj) {\n anchors.push({ id: $(obj).attr(\"id\"), name: $(obj).attr(\"name\") });\n });\n\n $(\"[data-cms-item-name],[data-cms-anchor]\").each(function (inx, obj) {\n if (\n typeof $(obj).attr(\"data-cms-anchor\") !== \"undefined\" &&\n $(obj).attr(\"data-cms-anchor\") !== \"\" &&\n $(obj).parents(\".owl-item\").length === 0\n ) {\n anchors.push({ id: null, name: $(obj).attr(\"data-cms-anchor\") });\n } else if (\n $(obj).attr(\"data-cms-item-name\") !== \"\" &&\n $(obj).parents(\".owl-item\").length === 0\n ) {\n anchors.push({\n id: null,\n name: $(obj).attr(\"data-cms-item-name\"),\n });\n }\n });\n\n return anchors;\n },\n },\n });\n }\n\n scrollTo(target) {\n const $ = window[\"jQuery\"];\n if (typeof target === \"undefined\") return;\n if ($(target).length === 0) return;\n var htmlbody = $(\"html,body\");\n var top = 0;\n if ($(target).height() > $(window).height()) top = $(target).offset().top;\n else {\n top =\n $(target).offset().top -\n Math.floor(($(window).height() - $(target).height()) / 2);\n }\n //console.log(top);\n //htmlbody.animate({ scrollTop: top }, 500, 'easeInOutQuint');\n htmlbody.animate({ scrollTop: top }, 500);\n }\n\n getCurrentHtml() {\n const CKEDITOR = window[\"CKEDITOR\"] || {};\n try {\n return CKEDITOR.instances.cmsCurrentEditor.getData();\n } catch (e) {\n return \"\";\n }\n }\n\n getAllDirtyHtml() {\n const $ = window[\"jQuery\"];\n var self = this;\n var htmlChanges = [];\n $(\".dirtyHtml\").each(function (inx, obj) {\n var $section = $(obj);\n var content = $section.is(\"#cmsCurrentEditor\") // if the html editor is active, it needs to get the html from the editor.\n ? self.getCurrentHtml()\n : $section.html();\n if ($section.is(\"[data-cms-section-id]\")) {\n // section level?\n let $item = $section.closest(\"[data-cms-item-id]\");\n htmlChanges.push({\n ItemId: $item.data(\"cms-item-id\"),\n SectionId: $section.data(\"cms-section-id\"),\n Content: content,\n });\n } else if ($section.is(\"[data-cms-item-id]\")) {\n // section level?\n let $item = $section;\n\n // console.log('$item.data(\"cms-item-id\")', $item.data(\"cms-item-id\"));\n\n //let cmsId = $item.data(\"cms-item-id\");\n if ($item.hasClass(\"new__multicolumn__panel__html\")) {\n if ($item.data(\"cms-item-id\") !== \"\") {\n htmlChanges.push({\n ItemId: $item.data(\"cms-item-id\"),\n SectionId: \"Content\",\n SectionId2: \"Content2\",\n Content: $(\n \".cms_item.item__01[data-cms-item-id2='\" +\n $item.data(\"cms-item-id2\") +\n \"']\"\n ).html(),\n Content2: $(\n \".cms_item.item__02[data-cms-item-id2='\" +\n $item.data(\"cms-item-id2\") +\n \"']\"\n ).html(),\n });\n }\n } else {\n htmlChanges.push({\n ItemId: $item.data(\"cms-item-id\"),\n SectionId: \"Content\",\n Content: content,\n });\n }\n }\n });\n\n // console.log(\"htmlChanges --- \", htmlChanges);\n\n return htmlChanges;\n }\n\n getHtml(itemid: any) {\n const $ = window[\"jQuery\"];\n this.htmlEditor.close();\n var self = this;\n\n var item = $(\".cms_item[data-cms-item-id='\" + itemid + \"']\");\n var formvals = { Content: this.cms_replace_item_html(item) };\n\n if (item.hasClass(\"new__multicolumn__panel__html\")) {\n formvals = {\n Content: $(\n \".cms_item.item__01[data-cms-item-id2='\" +\n item.data(\"cms-item-id2\") +\n \"']\"\n ).html(),\n Content2: $(\n \".cms_item.item__02[data-cms-item-id2='\" +\n item.data(\"cms-item-id2\") +\n \"']\"\n ).html(),\n };\n }\n\n //cms_msg_progressing(\"#save_message\", \"Saving...\");\n if ($(\"[data-cms-section-id]\", item).length > 0) {\n $(\"[data-cms-section-id]\", item).each(function (inx, section) {\n var closestItemId = $(section).closest(\".cms_item\").data(\"cms-item-id\");\n if (closestItemId === itemid) {\n var id = $(section).attr(\"data-cms-section-id\");\n formvals[id] = self.cms_replace_item_html($(section)); //.find(\">:first-child\")().html();\n }\n });\n }\n\n return formvals;\n }\n\n cms_replace_item_html(item) {\n return item.html();\n // var $tmp = $(\"

\").html(item.html());\n // if ($tmp.find('.cms-skeleton').length > 0)\n // return $tmp.find('.cms-skeleton').html();\n // else\n // return item.html();\n //tmp.find(\".cms_ctrl_in_editor\").each(function (inx, obj) {\n // var ctrlid = $(obj).attr(\"data-cms-ctrl-id\");\n // $(obj).replaceWith(\"__cms__ctrl:\" + ctrlid + \"__\");\n //});\n //return tmp.html();\n }\n}\n","import React, { useEffect } from 'react';\nimport { useRouter } from '../../../components';\nimport { useGet } from '../../../components';\nimport { Item } from '../../items/item';\nimport env from '../../../env';\nimport { loadJs } from '../../../lib/net-loader';\nimport { CmsPageController } from '../../services/cms-page-controller';\nimport { ErrorPopup, Loading } from '../../../components';\n\n// function useQuery() {\n// return new URLSearchParams(useLocation().search);\n// }\n\nexport function EditPage(props) {\n //const [page, setPage] = useState(null);\n\n //const pageId = props.pageId;\n const { query } = useRouter();\n const { cmsViewMode = 'edit', id, publishVer, editVer } = query;\n const pageId = id;\n\n //console.log(pageId, cmsViewMode, env.apiBase, env)\n\n const get = useGet();\n useEffect(() => {\n get.send(env.apiBase + '/api/cms/GetPage/' + pageId + '?cmsViewMode=' + cmsViewMode\n + (publishVer ? '&publishVer=' + publishVer : '')\n + (editVer ? '&editVer=' + editVer : '')\n );\n // eslint-disable-next-line\n }, [pageId]);\n\n if (get.loading()) {\n return \n } else if (get.hasErrors()) {\n return \n }\n\n //console.log(router.pathname);\n //console.log(res);\n\n const pageData = get.response.data;\n const cmsOption = { isCmsEdit: true, cmsViewMode: cmsViewMode };\n cmsOption.pageData = pageData;\n\n const cmsPageController = new CmsPageController();\n if (cmsViewMode !== 'viewonly') {\n const ver = 1;\n loadJs(\n env.resourceBase + '/dist/jquery-3.4.1/jquery.min.js?v=' + ver\n ).then(data => {\n return loadJs(\n env.resourceBase + '/dist/cms/ckeditor/ckeditor.js?v=' + ver\n )\n }).then(data => {\n // console.log('script loaded ', data);\n cmsPageController.init({});\n document.querySelector('body').classList.add('cmsedit');\n }).catch(error => console.log(error));\n } else {\n const ver = 1;\n loadJs(\n env.resourceBase + '/dist/jquery-3.4.1/jquery.min.js?v=' + ver\n ).then(data => {\n cmsOption.isCmsEdit = false;\n cmsPageController.init({ viewOnly: true });\n }).catch(error => console.log(error));\n }\n\n //setPage(res.response.data);\n const sectionItems = pageData.sections.map((section, index) =>\n
\n );\n return (\n
\n {sectionItems}\n
\n );\n}\n\n\nfunction Section(props) {\n const item = props.item;\n //const sectionName = item.sectionName;\n const subItems = item.items || [];\n const cmsOption = props.cmsOption || {};\n\n if (!subItems || subItems.length === 0)\n return (<>);\n\n const subItemsElts = subItems.map((subItem, index) =>\n \n );\n return (\n <>\n {subItemsElts}\n \n );\n}\n\n","import React, {useState, useEffect} from 'react';\nimport { SiteLink } from '../../components';\nimport { useStore } from '../../store';\n\nimport { FaChevronDown } from 'react-icons/fa';\n//import { SearchBar } from './searchBar';\n\nexport function NavBar(props) {\n const open = props.open;\n //const currentLocation = props.currentLocation;\n const { state } = useStore();\n\n const menu = state.menu || { items: [] };\n const currentLocation = state.history && state.history.length > 0? state.history[state.history.length - 1].path : '';\n const depth = 1;\n const menuItemElts = menu.items.map((item, index) =>\n \n );\n return (\n
\n {/* */}\n
\n \n
\n\n
);\n\n}\n\nfunction MenuItem(props) {\n const [subMenuOpened, setSubMenuOpened] = useState(false);\n const item = props.item;\n const subItems = item.items || [];\n const currentLocation = props.currentLocation;\n\n const subItemsElts = subItems.length > 0? subItems.map((subItem, index) =>\n \n ) : null;\n\n\n useEffect(() => {\n //console.log('navbar', currentLocation);\n setSubMenuOpened(false);\n }, [currentLocation])\n\n function closeMenu() {\n props.onCloseMenu();\n }\n\n function toggleSubmenu(e) {\n e.preventDefault();\n e.stopPropagation();\n setSubMenuOpened(!subMenuOpened);\n }\n\n return (\n
  • \n closeMenu()}>\n {item.title}\n {subItemsElts && toggleSubmenu(e)}>}\n \n {subItemsElts &&\n
      \n {subItemsElts}\n
    }\n
  • \n )\n}\n\nfunction SubMenuItem(props) {\n const item = props.item;\n function closeMenu() {\n props.onCloseMenu();\n }\n\n return (\n
  • \n closeMenu()}>\n {item.title}\n \n
  • \n )\n}","import { css } from '@emotion/core';\nimport { mq } from '../../cssInJs';\nexport default {\n button: css(mq({\n position: 'absolute',\n left: '1rem',\n top : '50%',\n transform : 'translateY(-50%)',\n lineHeight: '1.6rem',\n color: '#FFFFFF',\n fontSize: ['12px', null, '15px']\n })),\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core';\nimport { SiteLink } from '../../components';\nimport { FaAngleLeft } from 'react-icons/fa';\nimport { useHistoryStore } from '../../components';\nimport style from './backButtonStyle';\n\nexport function BackButton(props) {\n\n const history = useHistoryStore();\n\n function goBack(e) {\n history.pop();\n }\n\n if (history.last()) {\n return (\n \n )\n } else {\n return null;\n }\n}","import { css } from '@emotion/core';\nimport { mq } from '../../cssInJs';\n\nconst rs = [\n { w: 44, h: 44, barW: 28, barH: 3, space: 8 },\n { w: 56, h: 56, barW: 44, barH: 3, space: 10 }\n]\n\nconst line = css(mq({\n width: [rs[0].barW, null, rs[1].barW],\n height: [rs[0].barH, null, rs[1].barH],\n borderRadius: '4px',\n position: 'absolute',\n transitionProperty: 'transform',\n backgroundColor: '#002e5b',\n display: 'block',\n transitionDuration: '0.15s',\n transitionDelay: '0.15s',\n transitionTimingFunction: 'cubic-bezier(0.55, 0.055, 0.675, 0.19)',\n}))\n\nexport default {\n button: css(mq({\n cursor: 'pointer',\n zIndex: '1000',\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: 'all 0.3s ease-in-out',\n padding: '0',\n //top: [0, null, 12],\n top: 0,\n width: [rs[0].w, null, rs[1].w],\n height: [rs[0].h, null, rs[1].h],\n right: [0, null, 20],\n background: 'transparent', //variables.primaryColor,\n border: 'none',\n outline: 'none',\n font: 'inherit',\n color: 'inherit',\n textTransform: 'none',\n '&:focus': {\n outline: 'none',\n }\n })),\n\n buttonScrolled: css(mq({\n top: [\"-12px\", null, \"-12px\"]\n })),\n\n hamburger: css(mq({\n width: [rs[0].barW, null, rs[1].barW],\n height: [rs[0].barH + rs[0].space * 2, null, rs[1].barH + rs[1].space * 2],\n position: 'relative',\n display: 'block',\n })),\n\n line1: css(mq(line, {\n top: 0,\n transition: 'top 0.3s 0.1s cubic-bezier(0.33333, 0.66667, 0.66667, 1), opacity 0.1s 0.1s linear',\n })),\n line2: css(mq(line, {\n transition: 'top 0.12s 0.3s cubic-bezier(0.33333, 0.66667, 0.66667, 1), transform 0.15s cubic-bezier(0.55, 0.055, 0.675, 0.19)',\n top: [rs[0].space, null, rs[1].space],\n })),\n line3: css(mq(line, {\n top: [rs[0].space * 2, null, rs[1].space * 2],\n })),\n\n lineActive1: css({\n opacity: '0',\n top: 18,\n transition: 'top 0.3s cubic-bezier(0.33333, 0, 0.66667, 0.33333), opacity 0.2s linear',\n }),\n lineActive2: css({\n transform: 'rotate(-135deg)',\n transition: 'top 0.12s 0.18s cubic-bezier(0.33333, 0, 0.66667, 0.33333), transform 0.15s 0.42s cubic-bezier(0.215, 0.61, 0.355, 1)',\n }),\n lineActive3: css(mq({\n transform: [`translate3d(0, -${rs[0].space}px, 0) rotate(-45deg)`, null, `translate3d(0, -${rs[1].space}px, 0) rotate(-45deg)`],\n transitionDelay: '0.32s',\n transitionTimingFunction: 'cubic-bezier(0.215, 0.61, 0.355, 1)',\n }))\n}","/** @jsx jsx */\nimport { jsx } from '@emotion/core'\nimport style from './hamburgerStyle';\n\nexport function Hamburger({ opened, toggleMenu, scrolled }) {\n\n return \n}","import { css } from '@emotion/core'\nimport { mq, mqMax } from '../../cssInJs'\nimport { position } from 'polished'\nimport { transform } from 'lodash'\n\nexport default {\n top: css(mq({\n //height: [44, null, 80],\n // height: [44, null, 56],\n // background: 'black',\n position: 'fixed',\n width: '100%',\n zIndex: '999',\n // display: 'flex',\n // justifyContent: 'center',\n // alignItems: 'center',\n // transition: 'all 0.3s'\n })),\n // topScrolled: css(mq({\n // height: [44, null, 56],\n // })),\n logo: css(mq({\n })),\n logoImg: css(mq({\n display: 'block',\n height: [22, null, 36],\n })),\n logoScrolled: css(mq({\n\n })),\n day__night__button__bar: mq({\n position: \"absolute\",\n right: [\"100px\"],\n top: \"50%\",\n transform: \"translateY(-50%)\",\n display: [\"block\", null, null, \"none\"],\n }),\n\n search__button: mq({\n position: \"absolute\",\n right: [\"10px\", null, \"50px\"],\n top: \"50%\",\n transform: \"translateY(-50%)\",\n color: \"white\",\n fontSize: \"0.75rem\",\n fontWeight: 600,\n cursor: \"pointer\",\n zIndex: \"10\",\n svg: {\n marginRight: \"0.5rem\",\n },\n }),\n\n top__navi__con__wrap: mq({\n background: \"#002e5b\",\n // padding: \"5px 5px 2px\",\n position: \"relative\",\n height: [\"39px\", null, \"auto\"],\n }),\n\n top__navi__con: mq({\n display: \"flex\",\n justifyContent: \"center\",\n visibility: \"hidden\",\n \"@media (min-width: 1200px)\": {\n visibility: \"visible\",\n },\n //maxWidth: '1021px',\n //margin: 'auto'\n }),\n\n top__navi__item: mq({\n color: \"white\",\n fontSize: \"0.8rem\",\n position: \"relative\",\n svg: {\n paddingBottom: \"3px\",\n marginRight: \"10px\",\n },\n a: {\n color: \"inherit\",\n display: \"inline-block\",\n padding: \"0.4rem 0.5rem 11px\",\n fontWeight: 600,\n fontSize: \"0.65rem\",\n \"&:hover\": {\n textDecoration: \"none\",\n backgroundColor: \"yellow\",\n },\n },\n }),\n\n mast__head__svg__warpp: mq({\n position: \"relative\",\n // \"&:before\": mq({\n // content: \"''\",\n // width: \"50%\",\n // left: 0,\n // top: 0,\n // height: \"74px\",\n // position: \"absolute\",\n // backgroundColor: \"white\",\n // display: [\"none\", null, \"block\"],\n // zIndex: \"-1\",\n // transition: \"all 0.5s ease\",\n // transform: \"rotate(1deg)\",\n // \"@media (min-width: 2561px)\": {\n // //display: 'block',\n // transform: \"rotate(0deg)\",\n // },\n // }),\n \"&:after\": mq({\n content: \"''\",\n width: \"50%\",\n right: 0,\n top: 0,\n height: \"75%\",\n position: \"absolute\",\n backgroundColor: \"white\",\n display: [\"none\", null, \"block\"],\n zIndex: \"-1\",\n transition: \"all 0.5s ease\",\n transform: \"rotate(-1deg)\",\n \"@media (min-width: 2561px)\": {\n //display: 'block',\n transform: \"rotate(0deg)\",\n },\n }),\n\n \"&.dark\": {\n \"&:before, &:after\": {\n backgroundColor: \"black\",\n },\n },\n }),\n\n mast__head__svg__warpp__scroll: mq({\n \"&:before\": {\n height: \"54px\",\n \"@media (min-width: 2561px)\": {\n //display: 'block',\n transform: \"rotate(0deg)\",\n },\n },\n \"&:after\": {\n //height: '65px',\n \"@media (min-width: 2561px)\": {\n transform: \"rotate(0deg)\",\n },\n },\n }),\n\n mast__head__svg__con: mq({\n maxWidth: \"2560px\",\n margin: \"auto\",\n height: \"10000px\",\n maxHeight: [\"80px\", null, \"102px\"],\n backgroundRepeat: \"no-repeat\",\n backgroundSize: \"auto 100%\",\n backgroundPosition: \"center bottom\",\n position: \"relative\",\n transition: \"all 0.5s ease\",\n // backgroundColor: [\"white\", null, \"transparent\"],\n backgroundColor: \"white\",\n // clipPath: [\n // \"polygon(0 0, 0 60%, 60% 100%, 100% 65%, 100% 0%, 0 0)\",\n // null,\n // \"unset\",\n // ],\n\n // \"&.dark\": {\n // backgroundColor: \"#000\",\n // backgroundImage: `url('/assets/masthead-shape-black.svg')`,\n // // [mqMax.md]: {\n // // backgroundImage: \"unset\",\n // // },\n // },\n // \"&.light\": {\n // backgroundImage: `url('/assets/masthead-shape-white.svg')`,\n // // [mqMax.md]: {\n // // backgroundImage: \"unset\",\n // // },\n // },\n }),\n\n mast__head__svg__con__scroll: mq({\n maxHeight: [\"60px\", null, \"90px\"],\n }),\n\n top_sa_logo: mq({\n width: [\"65px\", null, \"85px\", \"85px\", \"85px\"],\n position: \"absolute\",\n top: \"50%\",\n left: [\"20px\", null, \"30px\", \"50px\", \"50px\"],\n transform: \"translateY(-50%)\",\n\n '@media (max-width:576px)':{\n width: '55px',\n },\n }),\n\n top__logo__img: mq({\n width: [\"170px\", null, \"216px\", \"216px\", \"216px\"], //'751px',\n margin: \"auto\",\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n transition: \"all 0.5s ease\",\n '@media (max-width:576px)':{\n width: '150px',\n },\n }),\n\n // top__logo__img__scroll: mq({\n // //width: '400px',\n // width: [\"200px\", null, \"500px\"],\n // }),\n\n home__toggle__contents__conv: mq({\n position: \"absolute\",\n right: \"0\",\n height: \"5px\",\n top: \"20%\",\n width: [\"20px\", null, \"20px\"],\n //backgroundColor : 'red'\n }),\n home__toggle__contents__conv__scoll: mq({\n top: \"30%\",\n }),\n\n home__toggle__contents__con: mq({\n position: \"absolute\",\n top: \"50%\",\n left: \"50%\",\n transform: \"translate(-50%, -50%)\",\n }),\n home__toggle__contents__item: mq({\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: \"1.5rem\",\n \".home__toggle-contents\": {\n [mqMax.md]: {\n display: \"none\",\n },\n },\n }),\n\n popup__container: {\n backgroundColor: \"rgba(0,0,0,0.8)\",\n position: \"fixed\",\n top: \"0px\",\n left: \"0px\",\n width: \"100%\",\n height: \"100%\",\n zIndex: \"9998\",\n },\n\n popup__container__item: {\n position: \"fixed\",\n top: \"20%\",\n left: \"50%\",\n zIndex: \"9999\",\n transform: \"translate(-50%, -50%)\",\n width: \"90%\",\n maxWidth: \"540px\",\n },\n top__autocomplete: {\n position: \"relative\",\n \"& > div\": {\n width: \"100%\",\n },\n \"input\": {\n \"&:focus\": {\n outline: \"none\",\n },\n border: \"1px solid #cecece\",\n padding: \"12px 15px\",\n fontSize: \"16px\",\n width: \"100%\",\n },\n \".top__autocomplete__dropdown\": {\n // position: \"absolute\",\n width: \"100%\",\n left: \"0px\",\n top: \"100%\",\n textAlign: \"left\",\n maxHeight: \"280px\",\n overflow: \"hidden\",\n overflowY: \"auto\",\n backgroundColor: \"#ffffff\",\n border: \"1px solid #cecece\",\n borderTop: \"none\",\n },\n \".top__autocomplete__dropdown__item\": {\n display: \"block\",\n cursor: \"pointer\",\n fontSize: \"16px\",\n padding: \"15px\",\n fontWeight: \"600\",\n },\n },\n\n}","import React from \"react\";\nimport { useRouter } from \"../../components\";\nimport { MdClose } from \"react-icons/md\";\n\nexport function SearchBar({ onCloseMenu, setSearchOpened }) {\n const [keyword, setKeyword] = React.useState(\"\");\n const { navigate } = useRouter();\n function search(e) {\n e.preventDefault();\n onCloseMenu();\n navigate(\"/search-results?q=\" + encodeURIComponent(keyword));\n }\n function onChange(e) {\n setKeyword(e.target.value);\n }\n return (\n
    \n
    search(e)}>\n \n \n
    setSearchOpened(false)}>\n \n
    \n
    \n );\n}","import React, { useState, useEffect } from \"react\";\nimport { SiteLink } from \"../../components\";\nimport { useStore } from \"../../store\";\nimport { FaPlus } from \"react-icons/fa\";\nimport { FaMinus } from \"react-icons/fa\";\nimport { BiSearchAlt } from \"react-icons/bi\";\nimport { SearchBar } from \"./searchBar2\";\n\nexport function NavBarHori(props) {\n const currentLocation = props.currentLocation;\n const { state } = useStore();\n const menu = state.menu || { items: [] };\n const [searchOpened, setSearchOpened] = useState(false);\n\n const depth = 1;\n const menuItemElts = menu.items.map((item, index) => (\n \n {/* {index > 0 &&
  • |
  • } */}\n \n
    \n ));\n\n if (searchOpened) {\n return (\n
    \n
      {menuItemElts}
    \n setSearchOpened(!searchOpened)}\n >\n \n SEARCH\n
    \n setSearchOpened(false)}\n setSearchOpened={setSearchOpened}\n />\n \n );\n } else {\n return (\n
    \n
      {menuItemElts}
    \n
    setSearchOpened(true)}>\n \n SEARCH\n
    \n
    \n );\n }\n}\n\nfunction MenuItem(props) {\n const [subMenuOpened, setSubMenuOpened] = useState(false);\n const item = props.item;\n const subItems = item.items || [];\n const currentLocation = props.currentLocation;\n\n const subItemsElts =\n subItems.length > 0\n ? subItems.map((subItem, index) => (\n \n ))\n : null;\n\n useEffect(() => {\n setSubMenuOpened(false);\n }, [currentLocation]);\n\n function closeMenu() {\n props.onCloseMenu();\n }\n\n if (item.url) {\n return (\n \n
    \n closeMenu()}>\n {item.title}\n \n
    \n {subItemsElts && (\n
      {subItemsElts}
    \n )}\n \n );\n } else {\n return (\n \n
    \n {item.title}\n
    \n {subItemsElts && (\n
      {subItemsElts}
    \n )}\n \n );\n }\n}\n\nfunction SubMenuItem(props) {\n const item = props.item;\n const level = props.level + 1;\n const childItem = item.items || [];\n const [subMenuOpened, setSubMenuOpened] = useState(false);\n const childElts = childItem.map((item, index) => {\n return (\n \n );\n });\n\n function closeMenu() {\n props.onCloseMenu();\n }\n\n function toggleSubmenu(e) {\n e.preventDefault();\n e.stopPropagation();\n setSubMenuOpened(!subMenuOpened);\n }\n\n return (\n 1 && \"sub__level\"}`}\n >\n closeMenu()}\n >\n {item.title}\n {childElts && childElts.length > 0 && (\n toggleSubmenu(e)}\n >\n {\" \"}\n {subMenuOpened ? : }{\" \"}\n \n )}\n \n {childElts && childElts.length > 0 && (\n 1 && \"sub__level\"\n } ${level + 1 > 6 && \"over__level\"} ${\n subMenuOpened ? \"navBar__subMenu--open\" : \"\"\n }`}\n >\n {childElts}\n \n )}\n \n );\n}\n","/** @jsx jsx */\nimport { jsx } from \"@emotion/core\";\nimport React, { useState, Fragment } from \"react\";\nimport { SiteLink } from \"../../components\";\nimport { useScrollPosition } from \"@n8tb1t/use-scroll-position\";\nimport { NavBar } from \"./navBar\";\n// import { DayNight } from \"./dayNight\";\nimport { BackButton } from \"../backButton/backButton\";\nimport { Hamburger } from \"../hamburger/hamburger\";\nimport style from \"./topHeaderStyle\";\nimport { useStore } from \"../../store\";\nimport { NavBarHori } from \"./navBarHori\";\nimport { SearchBar } from './searchBar';\n\nexport function TopHeader(props) {\n const [menuOpened, setMenuOpened] = useState(false);\n const [scrolled, setScrolled] = useState(false);\n const { state } = useStore();\n\n useScrollPosition(\n ({ prevPos, currPos }) => {\n if (currPos.y > 90) {\n setScrolled(true);\n } else {\n setScrolled(false);\n }\n },\n [],\n null,\n true\n );\n\n function toggleMenu(e) {\n setMenuOpened(!menuOpened);\n }\n function onCloseMenu() {\n setMenuOpened(false);\n }\n\n return (\n \n \n \n\n
    \n \n
    \n\n \n \n \n \n
    \n \n \n
    \n \n \n \n \n \n \n\n \n \n \n \n {/* */}\n \n \n \n \n \n \n {/*
    \n \n
    */}\n
    \n {/* */}\n
    \n \n \n
    \n );\n}\n","import React, { useLayoutEffect, useRef } from 'react';\nimport { useRouter } from '../../components';\nimport { SiteLink } from '../../components';\nimport BottomDrawer from '../../components/bottomDrawer'\n\nexport function BottomDock(props) {\n const links = [\n { url: '/media', title: 'MEDIA HUB', icon: 'Nav-Icon.png', iconHover: 'Nav-Icon.png' },\n { url: '/club-hub', title: 'CLUB HUB', icon: 'Nav-Icon.png', iconHover: 'Nav-Icon.png' },\n //{ url: '/latest-news', title: 'NEWS', icon: 'Nav-Icon.png', iconHover: 'Nav-Icon.png' },\n { url: '/umpiring', title: 'UMPIRE HUB', icon: 'Nav-Icon.png', iconHover: 'Nav-Icon.png' },\n { url: '/partners', title: 'PARTNERS', icon: 'Nav-Icon.png', iconHover: 'Nav-Icon.png' },\n { url: '/history', title: 'HISTORY', icon: 'Nav-Icon.png', iconHover: 'Nav-Icon.png' },\n ];\n\n //const path = usePath();\n const { pathname } = useRouter();\n\n const isCurrent = (link) => {\n return pathname && pathname.toLowerCase() === link.toLowerCase();\n }\n\n const linkElts = links.map((link, index) =>\n
  • \n \n
    \n {link.title}\n {link.title}\n
    \n
    {link.title}
    \n
    \n
  • \n );\n\n // const bottomMenu = useRef(null);\n // useLayoutEffect(() => {\n // //console.log('useLayoutEffect');\n // const slider = new BottomDrawer(bottomMenu.current);\n // setTimeout(() => slider.init(), 1000)\n // }, [])\n\n return (\n <>\n {/*