{"version":3,"file":"LoginFormPageFi-UvS2915n.js","sources":["../../src/pages/my-account/login/login-form-page-fi/LoginFormPageFi.vue"],"sourcesContent":["<template>\n  <reduced-layout-fi\n    class=\"login-form-page-fi\"\n    :brand=\"brand\"\n    :api-data=\"apiData\"\n    :logo-src=\"apiData?.Header_Logo?.Src\"\n    :logo-alt=\"apiData?.Header_Logo?.Alt\"\n    :interface-language=\"interfaceLanguage\"\n    @change-language=\"changeLanguage\"\n  >\n    <loading-indicator\n      v-if=\"!isMounted || apiDataLoading\"\n      variant=\"spinnerFullPageCover\"\n    />\n    <template v-else>\n      <div v-if=\"isLoginFailure || isLoginImpossible\">\n        <error-message\n          ref=\"errorMessage\"\n          :title=\"apiData?.Login_Failed_Title || 'Login failed'\"\n          scroll-to=\"siteLoginStandalone\"\n          data-test=\"login-error\"\n        >\n          {{ apiData?.Login_Failed_Error || '' }}\n        </error-message>\n      </div>\n      <div\n        v-if=\"!isLoginImpossible\"\n        id=\"siteLoginStandalone\"\n        class=\"login-form-page-fi__login\"\n      >\n        <login-form-field-fi\n          ref=\"loginForm\"\n          :password=\"form.password\"\n          :username=\"form.username\"\n        />\n        <div\n          class=\"login-form-page-fi__form\"\n          data-test=\"login-form\"\n        >\n          <headline-fi\n            class=\"login-form-page-fi__headline fi-text-size-df-30\"\n            headline-tag=\"h1\"\n          >\n            {{ apiData.Headline }}\n          </headline-fi>\n\n          <text-input-fi\n            id=\"email\"\n            ref=\"username\"\n            v-model.trim=\"form.username\"\n            class=\"login-form-page-fi__username\"\n            autocomplete=\"username\"\n            name=\"username\"\n            data-test=\"email-input\"\n            :rules=\"\n              userIdentifierRule(brand === 'fite', form.username, enableUserIdentifierValidation)\n            \"\n            :disabled=\"isLoginImpossible\"\n            :label=\"apiData.Email_Placeholder\"\n            @keyup=\"validateCharacters(form.username)\"\n            @blur=\"enableUserIdentifierValidation = true\"\n            @update:model-value=\"onChangeUsername\"\n            @validation-changed=\"\n              (value) => {\n                form.usernameValid = value;\n              }\n            \"\n            @keyup-enter=\"onEnterEmail\"\n          />\n          <text-input-fi\n            id=\"password\"\n            ref=\"password\"\n            v-model=\"form.password\"\n            class=\"login-form-page-fi__password\"\n            autocomplete=\"current-password\"\n            name=\"password\"\n            type=\"password\"\n            data-test=\"password-input\"\n            :rules=\"passwordChangedOrBlurred ? rules.required : []\"\n            :disabled=\"isLoginImpossible\"\n            :label=\"apiData.Password_Placeholder\"\n            @update:model-value=\"onChangePassword\"\n            @blur=\"passwordChangedOrBlurred = true\"\n            @validation-changed=\"\n              (value) => {\n                form.passwordValid = value;\n              }\n            \"\n            @keyup-enter=\"onEnterPassword\"\n          />\n\n          <div v-if=\"apiData.Password_Reset\">\n            <link-fi\n              :href=\"apiData.Password_Reset.Url\"\n              :target=\"apiData.Password_Reset.Target\"\n              data-test=\"req-new-cred\"\n              class=\"login-form-page-fi__password-reset fi-text-size-df-18\"\n            >\n              {{ apiData.Password_Reset.Text }}\n            </link-fi>\n          </div>\n\n          <button-fi\n            type=\"submit\"\n            class=\"button-fi__primary button-fi--stretched button-fi--large\"\n            data-test=\"login-button\"\n            :loading=\"isLoading\"\n            :disabled=\"submitDisabled\"\n            @click=\"submit\"\n          >\n            {{ apiData.Submit }}\n          </button-fi>\n\n          <div\n            v-if=\"apiData.Registration\"\n            class=\"login-form-page-fi__registration fi-text-size-df-18\"\n          >\n            {{ apiData.Registration_Headline }}\n            <button-fi\n              :target=\"apiData.Registration.Target\"\n              :href=\"apiData.Registration.Url\"\n              :loading=\"isLoading\"\n              :disabled=\"isLoginImpossible\"\n              class=\"button-fi__tertiary button-fi--stretched button-fi--large login-form-page-fi__registration-btn\"\n              data-test=\"registration-btn\"\n              natural-events\n            >\n              {{ apiData.Registration.Text }}\n            </button-fi>\n          </div>\n        </div>\n      </div>\n    </template>\n  </reduced-layout-fi>\n</template>\n\n<script>\nimport { ButtonFi, ErrorMessage, HeadlineFi, LinkFi, LoadingIndicator, TextInputFi } from 'atoms';\nimport axios from 'axios';\nimport LoginFormFieldFi from 'components/login-dialog-fi/LoginFormFieldFi.vue';\nimport loginMixin from 'components/my-account/site-login/loginMixin';\nimport ReducedLayoutFi from 'components/reduced-layout-fi/ReducedLayoutFi';\nimport { goToLoginFunction } from 'composables/login';\nimport validatorsMixin from 'mixins/validatorsMixin';\n\nimport Validators from '@/utils/validators';\n\nconst loginRedirectCookie = 'dialog-redirect';\n\nconst queryToObject = (queryString) => {\n  const searchParams = new URLSearchParams(queryString);\n  return Object.fromEntries(searchParams.entries());\n};\n\nexport default {\n  name: 'LoginFormPageFi',\n  components: {\n    ButtonFi,\n    ErrorMessage,\n    HeadlineFi,\n    LinkFi,\n    LoadingIndicator,\n    LoginFormFieldFi,\n    ReducedLayoutFi,\n    TextInputFi,\n  },\n  mixins: [loginMixin, validatorsMixin],\n  inject: ['fields'],\n  data() {\n    return {\n      form: {\n        password: '',\n        passwordValid: false,\n        usernameValid: false,\n        username: '',\n      },\n      usernameChangedOrBlurred: false,\n      passwordChangedOrBlurred: false,\n      isLoading: false,\n      isLoginImpossible: false,\n      enableUserIdentifierValidation: false,\n      isLoginFailure: false,\n\n      brand: '',\n      lang: '',\n\n      interfaceLanguage: null,\n      apiData: null,\n      apiDataLoading: true,\n      isSubmitting: false,\n      isMounted: false,\n    };\n  },\n  computed: {\n    formValid() {\n      return this.form.passwordValid && this.form.usernameValid;\n    },\n    rules() {\n      return Validators(\n        {\n          get: (key) =>\n            ({\n              'online-Shop.Global-Labels.Error-Message-Required': this.apiData?.Mandatory_Error,\n            })[key] || key,\n        },\n        {\n          emailFieldValidationMsgInvalidFormat: {\n            value: this.apiData?.Invalid_Email_Error,\n          },\n        },\n      );\n    },\n    submitDisabled() {\n      return (\n        this.isSubmitting ||\n        this.isLoginImpossible ||\n        ((this.passwordChangedOrBlurred || this.usernameChangedOrBlurred) &&\n          (!this.formValid || this.form.password === null))\n      );\n    },\n    referrerData() {\n      this.logDebug('checking referrer data', this.referrer);\n      const json = this.fields?.referrerData?.value;\n      if (json) {\n        try {\n          const data = JSON.parse(json);\n          const customData = data[this.referrer];\n          if (customData) {\n            this.logDebug('got referrer data', customData);\n            return customData;\n          }\n        } catch (error) {\n          console.error(error, json);\n        }\n      } else {\n        this.logDebug('no referrer data configured');\n      }\n      this.logDebug('no referrer data');\n      return {};\n    },\n    referrer() {\n      if (IS_SHOWROOM) {\n        return this.$fischer.query('referrer') || 'showroom';\n      }\n      const [, host] = /^https?:\\/\\/([^/]+)(?:\\/|$)/.exec(window.document.referrer) || [];\n      return host;\n    },\n  },\n  mounted() {\n    this.isMounted = true;\n  },\n  async created() {\n    try {\n      if (this.redirectFromOldService()) {\n        return;\n      }\n      const brand = this.$fischer.query('brand');\n      if (brand && !brand.startsWith('dialog:')) {\n        this.brand = brand;\n      }\n\n      if (IS_SSR) {\n        return;\n      }\n      if (!(await this.handleLoginRequest())) {\n        this.handleLoginFormPage();\n      }\n    } catch (error) {\n      console.error('Error in login form page created hook', error);\n    }\n  },\n  methods: {\n    redirectFromOldService() {\n      if (IS_SSR) {\n        return false;\n      }\n      let newLocation = String(window.location);\n      let oldServices = 'https://services.ugfischer.com/';\n      let newServices = import.meta.env.VITE_OPENID_SERVICES;\n      for (let level = 0; level < 3; level += 1) {\n        const oldServiceRegEx = new RegExp(oldServices.replace(/\\./g, '\\\\.'), 'g');\n        newLocation = newLocation.replace(oldServiceRegEx, newServices);\n\n        oldServices = encodeURIComponent(oldServices);\n        newServices = encodeURIComponent(newServices);\n      }\n      if (String(window.location) !== newLocation) {\n        console.debug('old services detected, redirecting to new services');\n        window.location = newLocation;\n        return true;\n      }\n      return false;\n    },\n    getCookieName() {\n      return 'site-login';\n    },\n    async handleLoginRequest() {\n      if (IS_SSR) {\n        return true;\n      }\n      if (this.fields?.ssoPoc?.value) {\n        this.loadApiData('de-DE', 'fite');\n        this.logDebug('not handlingg login request - sso poc');\n        return true;\n      }\n      this.logDebug('handling login request');\n\n      const hash = queryToObject(window.location.hash.substr(1));\n      const search = queryToObject(window.location.search.substr(1));\n      const hint = {};\n      if (search.login_hint) {\n        // NOTE: this is not the standard way to use it\n        ['api_key', 'lang', 'brand'].forEach((key) => {\n          const match = new RegExp(`(?:^|\\\\.)${key}-([^.]+)`).exec(search.login_hint);\n          if (match) {\n            const [, value] = match;\n            hint[key] = value;\n          }\n        });\n      }\n      const {\n        lang,\n        brand,\n        state,\n        nonce,\n        client_id: clientIdParam,\n        redirect_uri: redirectUri,\n        api_key: apiKey,\n        scope = 'openid',\n        response_type: responseType = 'id_token token',\n        ui_locales: uiLocales,\n        password,\n        username,\n      } = {\n        ...search,\n        ...hint,\n        ...hash,\n      };\n\n      const cookies = this.getCookies();\n\n      if (lang) {\n        cookies.lang = lang.replace('_', '-');\n      }\n      if (uiLocales) {\n        const [locale] = uiLocales.split(' ');\n        cookies.lang = locale.replace('_', '-');\n      }\n      if (brand) {\n        cookies.brand = brand;\n      }\n      if (apiKey) {\n        cookies.apiKey = apiKey;\n      }\n\n      let clientId = clientIdParam || cookies.clientId;\n      if (!clientId) {\n        const [langShort] = (cookies.lang || 'de').split(/[_-]/);\n        clientId = `fiwe-${langShort.toLowerCase()}`;\n      }\n      if (clientId === 'fite-de') {\n        clientId = 'fite-int';\n      }\n      cookies.clientId = clientId;\n      this.clientId = clientId;\n\n      const searchParams = new URLSearchParams(window.location.search);\n      const authorizeRedirectParam = new URLSearchParams(searchParams.get('authorize_redirect'));\n      const originalRedirect = authorizeRedirectParam.get('redirect_uri');\n      if (brand?.startsWith('dialog:') && originalRedirect) {\n        this.logDebug('redirecting back to custom login page');\n        searchParams.delete('state');\n        const brandPath = /^dialog:([^?#@]+)?/.exec(brand)?.[1];\n        const authRedirectUrl = new URL(originalRedirect);\n        const newLoginRedirect = `${authRedirectUrl.origin}${brandPath}?${searchParams}${window.location.hash}`;\n        this.$cookies.set(\n          loginRedirectCookie,\n          newLoginRedirect,\n          0,\n          '/',\n          undefined,\n          this.$fischer.isSecureConnection(),\n          'None',\n        );\n        window.location.href = newLoginRedirect;\n        return true;\n      } else {\n        this.logDebug('not a custom login page', brand);\n        if (brand) {\n          this.logDebug('removing login-redirect');\n          this.$cookies.remove(loginRedirectCookie);\n        }\n      }\n\n      if (!(await this.setCookies(cookies))) {\n        return true;\n      }\n\n      if (redirectUri && state) {\n        if (username && password) {\n          this.logDebug('attempting to submit login in a second');\n          this.form.username = username;\n          this.form.password = password;\n          this.apiData = {};\n          this.apiDataLoading = false;\n\n          setTimeout(() => {\n            this.logDebug('attempting to submit login in a second');\n            if (this.$refs.loginForm) {\n              this.submit();\n            } else {\n              console.error('no refs.loginForm');\n            }\n          }, 1000);\n\n          return true;\n        }\n\n        this.initializeAuthorization(redirectUri, state, nonce, scope, responseType);\n        return true;\n      }\n\n      this.logDebug('Did not get login request from hash');\n      return false;\n    },\n    async loadApiData(lang, apiKeyParam) {\n      try {\n        this.apiDataLoading = true;\n\n        const langEncoded = encodeURIComponent(lang);\n\n        const apiKey = (\n          apiKeyParam ||\n          this.fields.defaultApiKey?.value ||\n          (IS_SHOWROOM && (this.$fischer.query('api_key') || 'fiwe')) ||\n          ''\n        ).replace(/[^A-Z0-9a-z-]/g, '');\n\n        let url = '/sso/api/app';\n        if (IS_SHOWROOM) {\n          url = `/__mocks__/sitecoreApi${url}/mock_${langEncoded}_${apiKey}.json`;\n        } else {\n          url = `${url}?lang=${langEncoded}&apiKey=${apiKey}`;\n        }\n        this.logDebug('loading api data with apiKey', apiKey);\n        const { data } = await axios.get(url);\n        if (!data.Submit) {\n          if (lang !== 'en') {\n            console.info(`Could not load data for '${lang}' in '${apiKeyParam}', fallback to en`);\n            await this.loadApiData('en', apiKeyParam);\n          } else {\n            throw new Error('Could not load en api data');\n          }\n        } else {\n          this.apiData = data;\n          this.logDebug('got api data');\n        }\n\n        const languages = this.apiData?.Available_Languages || [];\n        if (languages.some((pageLang) => pageLang.Value === lang)) {\n          this.interfaceLanguage = lang;\n        }\n      } catch (error) {\n        this.criticalLoginFailure('Failed to load api', error);\n      } finally {\n        this.apiDataLoading = false;\n      }\n    },\n    initializeAuthorization(redirectUri, state, nonce, scope, responseType) {\n      return goToLoginFunction(\n        this.logDebugWrapper,\n        this.clientId,\n        this.authorizeRedirect,\n        redirectUri,\n        state,\n        nonce,\n        scope,\n        responseType,\n      );\n    },\n    handleLoginFormPage() {\n      this.logDebug('handling login form page');\n\n      const cookie = this.getCookies();\n\n      const {\n        brand = 'fiwe',\n        clientId,\n        apiKey,\n        lang,\n        username: cookieUsername,\n      } = {\n        ...cookie,\n        ...this.referrerData,\n      };\n      this.brand = brand;\n      this.lang = lang || this.getBrowserLang();\n\n      if (clientId) {\n        this.clientId = clientId;\n      } else {\n        this.clientId = `${this.brand}-${this.lang.replace(/[_-].*/, '').toLowerCase()}`;\n      }\n\n      this.logDebug(`determined brand=\"${brand}\" apiKey=\"${apiKey}\" clientId=\"${this.clientId}\"`);\n\n      const username = this.$fischer.query('username') || cookieUsername;\n      if (username) {\n        this.form.username = username;\n      }\n\n      if (\n        brand !== cookie.brand ||\n        this.clientId !== cookie.clientId ||\n        apiKey !== cookie.apiKey ||\n        username !== cookieUsername\n      ) {\n        this.logDebug('updating cookie');\n        this.setCookies({\n          ...cookie,\n          brand,\n          clientId: this.clientId,\n          apiKey,\n          username,\n          ...(lang ? { lang } : {}),\n        });\n      }\n\n      if (this.$fischer.query('authentication_error') === 'true') {\n        const loginRedirect = this.$cookies.get(loginRedirectCookie);\n        this.logDebug('authentication error', loginRedirect);\n        if (loginRedirect && loginRedirect !== 'null') {\n          this.logDebug('authentication_error, redirecting');\n          window.location.href = loginRedirect.replace('?', '?authentication_error=true&');\n          return true;\n        }\n        this.isLoginFailure = true;\n      }\n\n      // do not await, let spinner show\n      this.loadApiData(this.lang, apiKey);\n\n      this.logDebug('handled login form page successfully');\n      return true;\n    },\n    onChangeUsername(value) {\n      this.form.username = value;\n      this.usernameChangedOrBlurred = true;\n    },\n    onChangePassword(value) {\n      this.passwordChangedOrBlurred = true;\n      this.form.password = value;\n    },\n    changeLanguage({ value: lang }) {\n      if (typeof lang !== 'string') {\n        return;\n      }\n      this.interfaceLanguage = lang;\n\n      const { apiKey } = this.getCookies();\n      this.loadApiData(lang, apiKey);\n    },\n    getBrowserLang() {\n      const fallback = 'en';\n\n      const languages = this.apiData?.Available_Languages;\n      if (!languages) {\n        return fallback;\n      }\n      const browserLang = window.navigator.language;\n      if (!browserLang) {\n        return fallback;\n      }\n\n      const directMatch = languages.find((lang) => lang.Value === browserLang);\n      if (directMatch) {\n        return directMatch.Value;\n      }\n\n      const shortLang = browserLang.replace(/-.*/, '');\n      const shortMatch = languages.find((lang) => lang.Value.startsWith(shortLang));\n      if (shortMatch) {\n        return shortMatch.Value;\n      }\n\n      return fallback;\n    },\n    onEnterEmail() {\n      if (!this.form.username) {\n        return;\n      }\n      this.$refs.password.focus();\n    },\n    onEnterPassword() {\n      if (!this.form.username || !this.form.password || !this.formValid) {\n        this.logDebug(\n          'cancelling password-enter',\n          Boolean(this.form.username),\n          Boolean(this.form.password),\n          this.formValid,\n        );\n        return;\n      }\n      this.submit();\n    },\n    submit() {\n      if (this.isSubmitting) {\n        console.error('already submitting');\n        return;\n      }\n      this.isSubmitting = true;\n      const cookie = this.getCookies();\n      if (cookie.username !== this.form.username) {\n        this.setCookies({\n          ...cookie,\n          username: this.form.username,\n        });\n      }\n      // wait for input to be mirrored in the cloned form\n      this.$nextTick(() => {\n        this.$refs.loginForm.submit();\n      });\n    },\n  },\n};\n</script>\n\n<style scoped lang=\"scss\">\n@import './login-form-page-fi';\n</style>\n"],"names":["loginRedirectCookie","queryToObject","queryString","searchParams","_sfc_main","ButtonFi","ErrorMessage","HeadlineFi","LinkFi","LoadingIndicator","LoginFormFieldFi","ReducedLayoutFi","TextInputFi","loginMixin","validatorsMixin","Validators","key","_a","json","_b","customData","error","host","brand","newLocation","oldServices","newServices","level","oldServiceRegEx","hash","search","hint","match","value","lang","state","nonce","clientIdParam","redirectUri","apiKey","scope","responseType","uiLocales","password","username","cookies","locale","clientId","langShort","originalRedirect","brandPath","_c","newLoginRedirect","apiKeyParam","langEncoded","url","data","axios","pageLang","goToLoginFunction","cookie","cookieUsername","loginRedirect","fallback","languages","browserLang","directMatch","shortLang","shortMatch","_createBlock","_component_reduced_layout_fi","$data","_d","$options","_withCtx","_component_loading_indicator","_openBlock","_createElementBlock","_Fragment","_hoisted_1","_createVNode","_component_error_message","_createTextVNode","_toDisplayString","_createCommentVNode","_hoisted_2","_component_login_form_field_fi","_createElementVNode","_hoisted_3","_component_headline_fi","_component_text_input_fi","_cache","$event","_ctx","_hoisted_4","_component_link_fi","_component_button_fi","_hoisted_5"],"mappings":"qtBAmJA,MAAMA,EAAsB,kBAEtBC,EAAiBC,GAAgB,CAC/B,MAAAC,EAAe,IAAI,gBAAgBD,CAAW,EACpD,OAAO,OAAO,YAAYC,EAAa,QAAS,CAAA,CAClD,EAEKC,EAAU,CACb,KAAM,kBACN,WAAY,CACV,SAAAC,EACA,aAAAC,EACA,WAAAC,EACA,OAAAC,EACA,iBAAAC,EAAA,iBACAC,EACA,gBAAAC,EAAA,YACAC,CACF,EACA,OAAQ,CAACC,EAAYC,CAAe,EACpC,OAAQ,CAAC,QAAQ,EACjB,MAAO,CACE,MAAA,CACL,KAAM,CACJ,SAAU,GACV,cAAe,GACf,cAAe,GACf,SAAU,EACZ,EACA,yBAA0B,GAC1B,yBAA0B,GAC1B,UAAW,GACX,kBAAmB,GACnB,+BAAgC,GAChC,eAAgB,GAEhB,MAAO,GACP,KAAM,GAEN,kBAAmB,KACnB,QAAS,KACT,eAAgB,GAChB,aAAc,GACd,UAAW,EAAA,CAEf,EACA,SAAU,CACR,WAAY,CACV,OAAO,KAAK,KAAK,eAAiB,KAAK,KAAK,aAC9C,EACA,OAAQ,OACC,OAAAC,EACL,CACE,IAAMC,UACH,OACC,oDAAoDC,EAAA,KAAK,UAAL,YAAAA,EAAc,eAAA,EACjED,CAAG,GAAKA,EACf,EACA,CACE,qCAAsC,CACpC,OAAOC,EAAA,KAAK,UAAL,YAAAA,EAAc,mBAC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