{ "version": 3, "sources": ["../../../Vettvangur.Frontend/src/scripts/utility/vertical-resize-check.ts"], "sourcesContent": ["/**\n * @type Function\n * @description Checking if the page was resized vertically. Preventing events firing on mobile devices when the address bar is shown/hidden.\n */\n\nexport let isVerticalResize = false\n\nconst verticalResizeCheck = {\n init(): void {\n let lastWindowHeight = window.innerHeight\n let lastWindowWidth = window.innerWidth\n\n window.addEventListener('resize', () => {\n const currentHeight = window.innerHeight\n const currentWidth = window.innerWidth\n isVerticalResize = currentHeight !== lastWindowHeight && currentWidth === lastWindowWidth\n\n lastWindowHeight = currentHeight\n lastWindowWidth = currentWidth\n })\n },\n}\n\nexport default verticalResizeCheck\n"], "mappings": "gCAKO,IAAIA,EAAmB,GAExBC,EAAsB,CAC1B,MAAa,CACX,IAAIC,EAAmB,OAAO,YAC1BC,EAAkB,OAAO,WAE7B,OAAO,iBAAiB,SAAU,IAAM,CACtC,IAAMC,EAAgB,OAAO,YACvBC,EAAe,OAAO,WAC5BL,EAAmBI,IAAkBF,GAAoBG,IAAiBF,EAE1ED,EAAmBE,EACnBD,EAAkBE,CACpB,CAAC,CACH,CACF,EAEOC,EAAQL", "names": ["isVerticalResize", "verticalResizeCheck", "lastWindowHeight", "lastWindowWidth", "currentHeight", "currentWidth", "vertical_resize_check_default"] }