PageSourceSearch

https://www.halebop.se/_nuxt/ZeRQOk-u.js

js halebop.se collected 2026-10-01 14:46:47 UTC 3,849 bytes, 1 lines download raw bytes

1import{_ as c}from"./CXBGPcZY.js";import{_ as f}from"./BcYxNsm6.js";import{_ as g}from"./DhZ4t4SE.js";import{_ as x,y as E,i as n,w as o,l as y,b as i,g as r,I,j as k,L as A,c as m,t as p,h as u,p as B}from"./B-xg8IYK.js";import{_ as C}from"./Bu9ctemn.js";import{v as b,V as v}from"./Cqy64YF9.js";import{s as T}from"./RrNimeY6.js";import{s as D}from"./UToMY1oL.js";import{a as L}from"./B-0FV0s_.js";import{a as P}from"./CHMPh2yx.js";import"./C6qkOoaI.js";import"./CtHjxnQ2.js";import"./D9f_JeUv.js";const S={components:{DrawerLayout:C,BaseCard:c,BaseCta:f,Icon:g},props:{staticData:{type:Array,default:()=>[]}},mixins:[b,T,D,L],computed:{...E("base",["authMethod","userProfile"]),emailAddress(){return this.userProfile?.emailNew?.value||""},isBankId(){return this.authMethod==="BANK_ID"},hasEmailChanged(){return this.emailInput!==this.emailAddress}},data(){return{emailInput:"",emailFocused:!1,notAllowedText:"",isLoading:!1,isError:!1}},deactivated(){this.$store.dispatch("myAccount/RESET_EMAIL_STATE")},mounted(){this.emailInput=this.emailAddress,this.notAllowedText=this.staticItemByIdentifier("contact-details-not-allowed").text},validators:{emailInput:e=>v.value(e).required().custom(()=>{if(!e||e.trim()==="")return;if(!e.includes("@"))return"E-postadressen mÃ¥ste innehÃ¥lla @-tecken";if(e.includes("@")&&!e.includes("."))return"E-postadressen mÃ¥ste innehÃ¥lla en domän (t.ex. .com, .se)";if(e.split("@").length>2)return"E-postadressen fÃ¥r endast innehÃ¥lla ett @-tecken";if(e.includes(" "))return"E-postadressen fÃ¥r inte innehÃ¥lla mellanslag";if(!/^(([^<>()\\[\]\\.,;:\s@"]+(\.[^<>()\\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,24}))$/.test(e))return"Ange en giltig e-postadress (t.ex. [email protected])"})},methods:{async updateEmail(){if(!this.isUpdateDisabled())try{this.isLoading=!0;const e=await P(this.emailInput,window.location.href);e.redirectUrl&&(window.location.href=e.redirectUrl)}catch{this.isError=!0}finally{this.isLoading=!1}},isUpdateDisabled(){return!this.validation.isPassed("emailInput")}}},V={class:"input-text drawer-input"},F={key:0,class:"text--error"},M={key:1,class:"drawer-error"},U={class:"drawer-error-container"};function N(e,t,z,R,s,a){const _=c,h=f,d=y("DrawerLayout"),w=g;return s.isError?(i(),n(d,{key:1},{default:o(()=>[r("div",U,[B(w,{icon:"alert-circle-red",class:"drawer-error-container__icon"}),t[6]||(t[6]=r("h4",null,"Ett fel uppstod",-1)),t[7]||(t[7]=r("p",null,"Försök igenom om en stund, eller kontakta vÃ¥r support för hjälp.",-1))])]),_:1})):(i(),n(d,{key:0},{default:o(()=>[t[5]||(t[5]=r("h4",null,"Kontaktuppgifter",-1)),a.isBankId?(i(),n(_,{key:0,"body-full-padding":""},{header:o(()=>[...t[3]||(t[3]=[r("strong",null,"E-postadress",-1)])]),body:o(()=>[r("div",V,[t[4]||(t[4]=r("label",{for:"address",class:"input-text__label"},null,-1)),I(r("input",{id:"address",type:"text",class:k(["input-text__field",e.setValidationClasses("emailInput",s.emailFocused)]),"onUpdate:modelValue":t[0]||(t[0]=l=>s.emailInput=l),placeholder:"E-postadress",onFocus:t[1]||(t[1]=l=>s.emailFocused=!0),onBlur:t[2]||(t[2]=l=>s.emailFocused=!1)},null,34),[[A,s.emailInput]]),e.validation.hasError("emailInput")?(i(),m("div",F,p(e.validation.firstError("emailInput")),1)):u("",!0)])]),_:1})):(i(),m("div",M,p(s.notAllowedText),1)),a.isBankId?(i(),n(h,{key:2,buttonLabel:"Bekräfta ändringar",isDisabled:s.isLoading||a.isUpdateDisabled()||!a.hasEmailChanged,successText:e.getSingleProp("email-drawer","success-message"),loadingText:e.getSingleProp("email-drawer","loading-message"),errorText:e.getSingleProp("email-drawer","error-message"),onClick:a.updateEmail},null,8,["isDisabled","successText","loadingText","errorText","onClick"])):u("",!0)]),_:1}))}const ee=x(S,[["render",N],["__scopeId","data-v-880d630e"]]);export{ee as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.