{"version":3,"file":"279.js","mappings":"w4BAEsB,ICDH,WAIjB,SAAAA,EAAYC,I,4FAAUC,CAAA,KAAAF,GACpBG,KAAKF,SAAWA,EAChBE,KAAKC,YAAcH,EAASI,KAAK,eACjCF,KAAKG,WAAaC,SAASJ,KAAKC,YAAYI,OAAQ,GACtD,C,QAcC,O,EAZDR,G,EAAA,EAAAS,IAAA,iBAAAC,MAGA,WAAiB,IAAAC,EAAA,KACTC,EAAYC,aAAY,WAC5BF,EAAKL,aACLK,EAAKP,YAAYI,KAAKG,EAAKL,YACH,IAApBK,EAAKL,aACPQ,cAAcF,GACdG,OAAOC,SAASC,QAAQN,EAAKV,SAASiB,KAAK,QAE/C,GAAG,IACL,M,oEAAClB,CAAA,CAtBgB,GDCG,C,QAAkBmB,CAAE,oBAC5BC,gB","sources":["webpack:///../src/js/scripts/redirect-block.js","webpack:///../src/js/lib/RedirectBlock.js"],"sourcesContent":["import RedirectBlock from '../lib/RedirectBlock';\n\nconst redirectBlock = new RedirectBlock($('.redirect-block'));\nredirectBlock.startCountdown();\n","/** Handles timed redirect for application pages */\nclass RedirectBlock {\n /**\n * @param $element DOM element\n */\n constructor($element) {\n this.$element = $element;\n this.secondsText = $element.find('.js-seconds');\n this.secondsNum = parseInt(this.secondsText.text(), 10);\n }\n\n /**\n * Begins the countdown before redirect\n */\n startCountdown() {\n const countdown = setInterval(() => {\n this.secondsNum--;\n this.secondsText.text(this.secondsNum);\n if (this.secondsNum === 0) {\n clearInterval(countdown);\n window.location.replace(this.$element.data('url'));\n }\n }, 1000);\n }\n}\n\nexport default RedirectBlock;\n"],"names":["RedirectBlock","$element","_classCallCheck","this","secondsText","find","secondsNum","parseInt","text","key","value","_this","countdown","setInterval","clearInterval","window","location","replace","data","$","startCountdown"],"sourceRoot":""}