{"version":3,"file":"nav_controller-CQG93gQD.js","names":[],"sources":["../../../app/javascript/entrypoints/site_controllers/nav_controller.js"],"sourcesContent":["import { Controller } from \"@hotwired/stimulus\"\n\n// Burger menu on tablet and phone.\nexport default class extends Controller {\n static targets = [\"button\", \"panel\", \"header\"]\n\n toggle() {\n const open = this.panelTarget.hidden\n // The panel starts right under the header, wherever the promo bar left it.\n if (open) this.panelTarget.style.top = `${Math.max(0, this.headerTarget.getBoundingClientRect().bottom)}px`\n this.panelTarget.hidden = !open\n this.buttonTarget.setAttribute(\"aria-expanded\", String(open))\n document.body.style.overflow = open ? \"hidden\" : \"\"\n }\n\n close() {\n if (this.panelTarget.hidden) return\n this.panelTarget.hidden = true\n this.buttonTarget.setAttribute(\"aria-expanded\", \"false\")\n document.body.style.overflow = \"\"\n }\n}\n"],"mappings":"4GAGA,EAAA,cAA6B,CAAW,CACtC,OAAO,QAAU,CAAC,SAAU,QAAS,SAAS,CAE9C,QAAS,CACP,IAAM,EAAO,KAAK,YAAY,OAE1B,IAAM,KAAK,YAAY,MAAM,IAAM,GAAG,KAAK,IAAI,EAAG,KAAK,aAAa,uBAAuB,CAAC,OAAO,CAAC,KACxG,KAAK,YAAY,OAAS,CAAC,EAC3B,KAAK,aAAa,aAAa,gBAAiB,OAAO,EAAK,CAAC,CAC7D,SAAS,KAAK,MAAM,SAAW,EAAO,SAAW,GAGnD,OAAQ,CACF,KAAK,YAAY,SACrB,KAAK,YAAY,OAAS,GAC1B,KAAK,aAAa,aAAa,gBAAiB,QAAQ,CACxD,SAAS,KAAK,MAAM,SAAW"}