{"version":3,"file":"js/work-page-sticky-menu.min.js","mappings":"iHAQA,SAAS,iBAAiB,mBAAoB,IAAM,CACnB,SAAS,iBACtC,yFACF,EACuB,QAASA,GAAW,CACzC,GAAIA,EAAO,UAAY,SAAU,CAC/B,MAAMC,EAAS,SAAS,cACtB,8DACF,EACIA,GACFD,EAAO,iBAAiB,QAAUE,GAAM,CACtCA,EAAE,eAAe,EACjBD,EAAO,MAAM,CACf,CAAC,CAEL,CACF,CAAC,EAEyB,IAAI,IAAkB,CAC9C,8BAA+B,OAAO,iBAAmB,GACzD,0BAA2B,EAC7B,CAAC,EACiB,KAAK,CACzB,CAAC,C","sources":["webpack:///./src/js/sections/work-page/work-page-sticky-menu.ts"],"sourcesContent":["import StickyMenuManager from '@web-nfb/frontend-static/design-system/script/elements/StickyMenuManager'\n\ndeclare global {\n  interface Window {\n    DARK_WORK_PAGE: boolean\n  }\n}\n\ndocument.addEventListener('DOMContentLoaded', () => {\n  const workPageBuyRentButtons = document.querySelectorAll(\n    '[data-ui-el=\"work-page-header-buy-button\"], [data-ui-el=\"work-page-header-rent-button\"]'\n  ) as NodeListOf<HTMLElement>\n  workPageBuyRentButtons.forEach((button) => {\n    if (button.tagName === 'BUTTON') {\n      const buyTab = document.querySelector(\n        '[data-ui-el=\"sticky-menu-element\"][href=\"#purchase_options\"]'\n      ) as HTMLElement\n      if (buyTab) {\n        button.addEventListener('click', (e) => {\n          e.preventDefault()\n          buyTab.click()\n        })\n      }\n    }\n  })\n\n  const stickyMenuManager = new StickyMenuManager({\n    shouldScrollPastSectionAnchor: window.DARK_WORK_PAGE === false,\n    sectionIntersectionOffset: 60\n  })\n  stickyMenuManager.init()\n})\n"],"names":["button","buyTab","e"],"sourceRoot":""}