{"version":3,"sources":["webpack:///./LeLab.Web/src/js/grid-guide.entry.js"],"names":["OPEN_KEY","node","isVisible","sessionStorage","getItem","show","setItem","document","body","append","console","info","outer","createElement","className","style","color","inner","appendChild","innerBorder","grid","i","col","addEventListener","e","ctrlKey","shiftKey","altKey","keyCode","removeChild"],"mappings":"6EAAA,MAAMA,EAAW,uBAEjB,IAAIC,EAAO,KAEX,SAASC,IACL,MAA4C,SAArCC,eAAeC,QAAQJ,KAAwB,EAG1D,SAASK,IAGL,GAFAF,eAAeG,QAAQN,GAAU,GAE7BC,EAEA,YADAM,SAASC,KAAKC,OAAOR,GAIzBS,QAAQC,KAAK,2DAEb,IAAIC,EAAQL,SAASM,cAAc,OACnCD,EAAME,UAAY,yFAClBF,EAAMG,MAAMC,MAAQ,UAEpB,IAAIC,EAAQV,SAASM,cAAc,OACnCI,EAAMH,UAAY,gEAClBF,EAAMM,YAAYD,GAElB,IAAIE,EAAcZ,SAASM,cAAc,OACzCM,EAAYL,UAAY,kFACxBG,EAAMC,YAAYC,GAElB,IAAIC,EAAOb,SAASM,cAAc,OAClCO,EAAKN,UAAY,+DACjBG,EAAMC,YAAYE,GAElB,IAAK,IAAIC,EAAI,EAAGA,EAAI,GAAIA,IAAK,CACzB,IAAIC,EAAMf,SAASM,cAAc,OACjCS,EAAIR,UAAY,yCAChBM,EAAKF,YAAYI,GAGrBrB,EAAOW,EACPL,SAASC,KAAKU,YAAYjB,GAU1BC,KACAG,IAcJE,SAASgB,iBAAiB,SAXd,SAAUC,GAEdA,EAAEC,SAAWD,EAAEE,UAAYF,EAAEG,QAAuB,IAAbH,EAAEI,UACrC1B,KAbRC,eAAeG,QAAQN,GAAU,GAC7BC,GACAM,SAASC,KAAKqB,YAAY5B,IActBI,QAK8B,K","file":"grid-guide.js","sourcesContent":["const OPEN_KEY = \"__grid-guide-visible\"\r\n\r\nlet node = null\r\n\r\nfunction isVisible() {\r\n return sessionStorage.getItem(OPEN_KEY) === \"true\" || false\r\n}\r\n\r\nfunction show() {\r\n sessionStorage.setItem(OPEN_KEY, true);\r\n\r\n if (node) {\r\n document.body.append(node)\r\n return\r\n }\r\n\r\n console.info(\"Hide grid guide with 'SHIFT + CTRL + ALT + G' shortcut.\")\r\n\r\n let outer = document.createElement('div')\r\n outer.className = \"fixed h-screen left-0 opacity-25 overflow-hidden pointer-events-none top-0 w-full z-50\"\r\n outer.style.color = \"#fe00d1\"\r\n \r\n let inner = document.createElement('div')\r\n inner.className = \"h-screen max-w-screen-xxl mx-auto px-xxs-16-to-xl-64 relative\"\r\n outer.appendChild(inner)\r\n\r\n let innerBorder = document.createElement('div')\r\n innerBorder.className = \"absolute border border-b-0 border-solid border-t-0 h-screen left-0 top-0 w-full\"\r\n inner.appendChild(innerBorder)\r\n\r\n let grid = document.createElement('div')\r\n grid.className = \"flex h-screen items-stretch -mx-xxs-8-to-xl-16 relative z-10\"\r\n inner.appendChild(grid)\r\n\r\n for (var i = 0; i < 12; i++) {\r\n let col = document.createElement('div')\r\n col.className = \"flex-auto bg-current mx-xxs-8-to-xl-16\"\r\n grid.appendChild(col)\r\n }\r\n\r\n node = outer\r\n document.body.appendChild(node)\r\n}\r\n\r\nfunction hide() {\r\n sessionStorage.setItem(OPEN_KEY, false);\r\n if (node) {\r\n document.body.removeChild(node)\r\n }\r\n};\r\n\r\nif (isVisible()) {\r\n show()\r\n}\r\n\r\nvar keyup = function (e) {\r\n // SHIFT + CTRL + ALT + G\r\n if (e.ctrlKey && e.shiftKey && e.altKey && e.keyCode == 71) {\r\n if (isVisible()) {\r\n hide()\r\n } else {\r\n show()\r\n }\r\n }\r\n};\r\n\r\ndocument.addEventListener('keyup', keyup, false);\r\n"],"sourceRoot":""}