{"version":3,"names":["gsap","registerPlugin","ScrollTrigger","addAnimations","sections","document","querySelectorAll","forEach","element","items","tl","timeline","from","y","opacity","stagger","create","trigger","start","animation","window","addEventListener","setNavHereStates","location","pathname","links","item","setAttribute","navItem","closest","navLink","querySelector","setLoginButtonHandler","Array","button","e","preventDefault","open"],"sources":["src/index.ts"],"sourcesContent":["export * from './components';\n\n// TODO: add global animations utility\nimport { gsap } from 'gsap';\nimport { ScrollTrigger } from 'gsap/ScrollTrigger';\ngsap.registerPlugin(ScrollTrigger);\n\nfunction addAnimations() {\n let sections = document.querySelectorAll('.animate__slideInUp--contents');\n\n sections.forEach(element => {\n let items = element.querySelectorAll(':scope > *');\n\n let tl = gsap.timeline().from(items, { y: 100, opacity: 0, stagger: 0.2 }, 0);\n\n ScrollTrigger.create({\n trigger: element,\n start: 'top 90%',\n // toggleActions: 'play none none reverse',\n animation: tl,\n });\n });\n}\nwindow.addEventListener('DOMContentLoaded', addAnimations);\n\n// Example animations by class toggle (not used)\n// @ts-ignore\nfunction addAnimationsByClass() {\n const targets = 'h1, h2, h3, h4, h5, p, li';\n const items = gsap.utils.toArray(document.querySelectorAll(targets));\n items.forEach((item: HTMLElement) => {\n item.classList.add('animated', 'preSlide');\n gsap.from(item, {\n scrollTrigger: {\n start: 'top bottom',\n end: 'bottom top',\n trigger: item,\n // markers: true,\n // toggleClass: 'slideIn',\n onEnter() {\n item.classList.add('slideIn');\n },\n },\n });\n });\n}\n\nfunction setNavHereStates(){\n if(window.location.pathname && window.location.pathname !== \"\" ){\n let links = document.querySelectorAll('.fls-nav a[href=\"'+ window.location.pathname +'\"]');\n links.forEach ( (item) => {\n item.setAttribute('aria-current', 'page');\n let navItem = item.closest('.nav-item');\n if(navItem) {\n let navLink = navItem.querySelector('.nav-link');\n if(navLink) {\n navLink.setAttribute('aria-current', 'true');\n }\n }\n });\n }\n}\nwindow.addEventListener('DOMContentLoaded', setNavHereStates);\n\nfunction setLoginButtonHandler(){\n Array.from(document.querySelectorAll('button.btn-provider-login, .footer--btn-login')).forEach(button => {\n button.addEventListener('click', e => {\n e.preventDefault();\n window.open('https://www.flshots.com/flshots/signin.csp');\n });\n });\n}\nwindow.addEventListener('DOMContentLoaded', setLoginButtonHandler);\n"],"mappings":"wEAKAA,EAAKC,eAAeC,GAEpB,SAASC,IACP,IAAIC,EAAWC,SAASC,iBAAiB,iCAEzCF,EAASG,SAAQC,IACf,IAAIC,EAAQD,EAAQF,iBAAiB,cAErC,IAAII,EAAKV,EAAKW,WAAWC,KAAKH,EAAO,CAAEI,EAAG,IAAKC,QAAS,EAAGC,QAAS,IAAO,GAE3Eb,EAAcc,OAAO,CACnBC,QAAST,EACTU,MAAO,UAEPC,UAAWT,GACX,GAEN,CACAU,OAAOC,iBAAiB,mBAAoBlB,GAwB5C,SAASmB,IACP,GAAGF,OAAOG,SAASC,UAAYJ,OAAOG,SAASC,WAAa,GAAI,CAC9D,IAAIC,EAAQpB,SAASC,iBAAiB,oBAAqBc,OAAOG,SAASC,SAAU,MACrFC,EAAMlB,SAAWmB,IACbA,EAAKC,aAAa,eAAgB,QAClC,IAAIC,EAAUF,EAAKG,QAAQ,aAC3B,GAAGD,EAAS,CACR,IAAIE,EAAUF,EAAQG,cAAc,aACnC,GAAGD,EAAS,CACTA,EAAQH,aAAa,eAAgB,O,MAKrD,CACAP,OAAOC,iBAAiB,mBAAoBC,GAE5C,SAASU,IACPC,MAAMrB,KAAKP,SAASC,iBAAiB,kDAAkDC,SAAQ2B,IAC7FA,EAAOb,iBAAiB,SAASc,IAC/BA,EAAEC,iBACFhB,OAAOiB,KAAK,6CAA6C,GACzD,GAEN,CACAjB,OAAOC,iBAAiB,mBAAoBW"}