{"version":3,"sources":["webpack:///./node_modules/core-js/modules/es.string.trim.js","webpack:///./node_modules/core-js/internals/whitespaces.js","webpack:///./node_modules/core-js/internals/string-trim.js","webpack:///./src/views/Login.vue?dba6","webpack:///./src/views/Login.vue","webpack:///./src/views/Login.vue?5134","webpack:///./src/views/Login.vue?9d73","webpack:///./node_modules/core-js/modules/web.url.to-json.js","webpack:///./node_modules/core-js/internals/string-trim-forced.js"],"names":["$","$trim","trim","forcedStringTrimMethod","target","proto","forced","this","module","exports","requireObjectCoercible","whitespaces","whitespace","ltrim","RegExp","rtrim","createMethod","TYPE","$this","string","String","replace","start","end","render","_vm","_h","$createElement","_c","_self","attrs","model","value","callback","$$v","show","expression","_v","staticClass","on","hideLogin","loading","_e","ref","emailRules","errors","userName","showPassword","passwordRules","$event","nativeOn","type","indexOf","_k","keyCode","key","enterEvent","password","forgotPassword","submit","staticRenderFns","window","location","href","rules","pwd","authenticate","UserName","Password","btoa","authResponse","sessionStorage","setItem","token","Date","expiration","toJSON","profileIdByUserName","proIdResponse","ProfileId","SearchId","components","component","VBtn","VCard","VCol","VContainer","VDialog","VIcon","VRow","VSpacer","VTextField","VToolbar","VToolbarTitle","enumerable","URL","prototype","toString","call","fails","non","METHOD_NAME","name"],"mappings":"yGACA,IAAIA,EAAI,EAAQ,QACZC,EAAQ,EAAQ,QAA4BC,KAC5CC,EAAyB,EAAQ,QAIrCH,EAAE,CAAEI,OAAQ,SAAUC,OAAO,EAAMC,OAAQH,EAAuB,SAAW,CAC3ED,KAAM,WACJ,OAAOD,EAAMM,U,mBCPjBC,EAAOC,QAAU,iD,uBCFjB,IAAIC,EAAyB,EAAQ,QACjCC,EAAc,EAAQ,QAEtBC,EAAa,IAAMD,EAAc,IACjCE,EAAQC,OAAO,IAAMF,EAAaA,EAAa,KAC/CG,EAAQD,OAAOF,EAAaA,EAAa,MAGzCI,EAAe,SAAUC,GAC3B,OAAO,SAAUC,GACf,IAAIC,EAASC,OAAOV,EAAuBQ,IAG3C,O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AMC,OAAA,KAAKC,UAAA,KAAQC,aAAA,KAAWC,WAAA,KAASC,cAAA,U,kCChCxG,IAAI7F,EAAI,EAAQ,QAIhBA,EAAE,CAAEI,OAAQ,MAAOC,OAAO,EAAMyF,YAAY,GAAQ,CAClDlB,OAAQ,WACN,OAAOmB,IAAIC,UAAUC,SAASC,KAAK3F,U,qBCPvC,IAAI4F,EAAQ,EAAQ,QAChBxF,EAAc,EAAQ,QAEtByF,EAAM,MAIV5F,EAAOC,QAAU,SAAU4F,GACzB,OAAOF,GAAM,WACX,QAASxF,EAAY0F,MAAkBD,EAAIC,MAAkBD,GAAOzF,EAAY0F,GAAaC,OAASD","file":"js/login.f2952026.js","sourcesContent":["'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.es/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","// a string of all valid unicode whitespaces\n// eslint-disable-next-line max-len\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{attrs:{\"persistent\":\"\",\"max-width\":\"500px\",\"min-width\":\"350\"},model:{value:(_vm.show),callback:function ($$v) {_vm.show=$$v},expression:\"show\"}},[_c('v-toolbar',{attrs:{\"dense\":\"\",\"color\":\"primary\"}},[_c('v-toolbar-title',[_vm._v(\"Login\")]),_c('v-spacer'),_c('v-btn',{staticClass:\"mr-1\",attrs:{\"icon\":\"\"},on:{\"click\":_vm.hideLogin}},[_c('v-icon',[_vm._v(\"mdi-close\")])],1)],1),_c('v-card',{staticClass:\"ma-0 pa-2\"},[_c('v-container',{staticClass:\"ma-0 pa-0\"},[(!_vm.loading)?_c('v-text-field',{ref:\"userId\",attrs:{\"prepend-icon\":\"mdi-account\",\"rules\":_vm.emailRules,\"error-messages\":_vm.errors,\"label\":\"Brugernavn (email)\",\"required\":\"\",\"autofocus\":\"\"},model:{value:(_vm.userName),callback:function ($$v) {_vm.userName=$$v},expression:\"userName\"}}):_vm._e()],1),_c('v-container',{staticClass:\"ma-0 pa-0\"},[(!_vm.loading)?_c('v-text-field',{attrs:{\"prepend-icon\":\"mdi-lock-question\",\"append-icon\":_vm.showPassword ? 'mdi-eye-off' : 'mdi-eye',\"rules\":_vm.passwordRules,\"type\":_vm.showPassword ? 'text' : 'password',\"error-messages\":_vm.errors,\"label\":\"Kodeord\",\"required\":\"\"},on:{\"click:append\":function($event){_vm.showPassword = !_vm.showPassword}},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.enterEvent($event)}},model:{value:(_vm.password),callback:function ($$v) {_vm.password=$$v},expression:\"password\"}}):_vm._e()],1),_c('v-row',{staticClass:\"ma-0 pa-0\"},[(_vm.loading)?_c('v-col',{staticClass:\"text-center\",attrs:{\"cols\":\"12\"}},[_vm._v(\" Logger ind... \")]):_vm._e(),(!_vm.loading)?_c('v-col',{staticClass:\"text-left\",attrs:{\"cols\":\"6\"}},[_c('v-btn',{nativeOn:{\"click\":function($event){return _vm.forgotPassword($event)}}},[_vm._v(\" Glemt kodeord \")])],1):_vm._e(),(!_vm.loading)?_c('v-col',{staticClass:\"text-right\",attrs:{\"cols\":\"6\"}},[_c('v-btn',{attrs:{\"loading\":_vm.loading},nativeOn:{\"click\":function($event){return _vm.submit($event)}}},[_vm._v(\" Login \")])],1):_vm._e()],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue } from 'vue-property-decorator';\nimport * as lib from '@/scripts/apiHelper.ts';\nimport * as rules from '@/scripts/rules.ts';\nimport { ApiProfile } from '@/scripts/apiProfile.ts';\n\n@Component({\n components: {}\n})\nexport default class Login extends Vue {\n private show = true;\n private errors = '';\n private loading = false;\n private showPassword = false;\n\n private userName = '';\n private password = '';\n\n public showLogin(): void {\n this.show = true;\n }\n\n private hideLogin(): void {\n this.userName = '';\n this.password = '';\n this.errors = '';\n this.show = false;\n window.location.href = '#/';\n }\n\n private enterEvent(): void {\n this.submit();\n }\n\n private forgotPassword(): void {\n this.userName = '';\n this.password = '';\n this.errors = '';\n this.show = false;\n // Redirect to front page\n window.location.href = '#/RecoverPassword';\n }\n\n get emailRules(): ((v: string) => boolean | string)[] {\n return rules.emailRules();\n }\n\n get passwordRules(): ((v: string) => boolean | string)[] {\n return rules.passwordRules();\n }\n\n // Auth and store token in local storage\n private async submit(): Promise {\n this.errors = '';\n this.loading = true;\n\n const pwd = this.password;\n this.password = ''; // clear password in form. Do not let it stay too long...\n try {\n // Authenticate via API\n const authResponse = await ApiProfile.authenticate({\n UserName: this.userName.trim(),\n Password: btoa(pwd)\n });\n // Save token and expiration to session storage\n window.sessionStorage.setItem('token', authResponse.token);\n window.sessionStorage.setItem('expiration', new Date(authResponse.expiration).toJSON());\n // Get profile id\n const proIdResponse = await ApiProfile.profileIdByUserName(this.userName);\n // Save profile id to session storage\n window.sessionStorage.setItem('profileid', btoa(proIdResponse.ProfileId));\n window.sessionStorage.setItem('searchid', btoa(proIdResponse.SearchId));\n\n // Redirect to Dashboard page\n // eslint-disable-next-line\n window.location.href = '#/Dashboard';\n } catch (error) {\n this.errors = lib.getErrorMessage(error);\n } finally {\n this.loading = false;\n }\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=6ddd1db2&\"\nimport script from \"./Login.vue?vue&type=script&lang=ts&\"\nexport * from \"./Login.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VToolbar } from 'vuetify/lib/components/VToolbar';\nimport { VToolbarTitle } from 'vuetify/lib/components/VToolbar';\ninstallComponents(component, {VBtn,VCard,VCol,VContainer,VDialog,VIcon,VRow,VSpacer,VTextField,VToolbar,VToolbarTitle})\n","'use strict';\nvar $ = require('../internals/export');\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\n$({ target: 'URL', proto: true, enumerable: true }, {\n toJSON: function toJSON() {\n return URL.prototype.toString.call(this);\n }\n});\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n"],"sourceRoot":""}