',e.acceptButton=e.datepickerContainer.getElementsByClassName("scrollroll-accept-button")[0],e.dayPicker=e.datepickerContainer.getElementsByClassName("scrollroll-day-picker")[0],e.monthPicker=e.datepickerContainer.getElementsByClassName("scrollroll-month-picker")[0],e.yearPicker=e.datepickerContainer.getElementsByClassName("scrollroll-year-picker")[0],Ce(e.dayPicker),Se(e.monthPicker),Be(e.yearPicker,e.allYears),e.dayElements=e.dayPicker.getElementsByClassName("scrollroll-element")},i=function(e){c("setInitialPositions"),e.previousYearScroll=a(e.yearPos,e.height),e.yearPicker.scrollTo(0,e.previousYearScroll),e.previousMonthScroll=a(e.monthPos,e.height),e.monthPicker.scrollTo(0,e.previousMonthScroll),e.previousDayScroll=a(e.dayPos,e.height),e.dayPicker.scrollTo(0,e.previousDayScroll)},se=function(e){var t,n;for(e.maxDays=oe[e.monthPos],e.allYears[e.yearPos]%4||28!==e.maxDays||e.maxDays++,n=t=28;t<=30;n=++t)e.maxDays<=n?e.dayElements[n].style.opacity="0.5":e.dayElements[n].style.removeProperty("opacity")},ue=function(t){var e,n,o;for(c("attachEventListeners"),t.element.addEventListener("click",function(e){return ge(e,t)}),t.element.addEventListener("focus",function(e){return he(e,t)}),t.acceptButton.addEventListener("click",function(e){return fe(e,t)}),t.dayPicker.addEventListener("mousedown",function(e){return ye(e,t,t.dayPicker)}),t.dayPicker.addEventListener("touchstart",function(e){return ve(e,t,t.dayPicker)},{passive:!0}),t.dayPicker.addEventListener("wheel",Le),t.monthPicker.addEventListener("mousedown",function(e){return ye(e,t,t.monthPicker)}),t.monthPicker.addEventListener("touchstart",function(e){return ve(e,t,t.monthPicker)},{passive:!0}),t.monthPicker.addEventListener("wheel",Le),t.yearPicker.addEventListener("mousedown",function(e){return ye(e,t,t.yearPicker)}),t.yearPicker.addEventListener("touchstart",function(e){return ve(e,t,t.yearPicker)},{passive:!0}),t.yearPicker.addEventListener("wheel",Le),document.addEventListener("mousemove",function(e){return be(e,t)}),document.addEventListener("touchmove",function(e){return we(e,t)},{passive:!0}),document.addEventListener("mouseup",function(e){return ke(e,t)}),document.addEventListener("touchend",function(e){return Ee(e,t)},{passive:!0}),n=0,o=(e=t.datepickerContainer.getElementsByClassName("scrollroll-element")).length;ne.maxDays-1&&(e.dayPos=e.maxDays-1),t=a(e.dayPos,e.height),e.dayPicker.scrollTo(0,t),Te(e)),e.previousDayScroll=t},me=function(e){var t=e.monthPicker.scrollTop,n=a(e.monthPos,e.height);null==e.dragObj&&e.previousMonthScroll===t&&t!==n&&(e.monthPos=Oe(t,e.height),11=e.allYears.length&&(e.yearPos=e.allYears.length-1),t=a(e.yearPos,e.height),e.yearPicker.scrollTo(0,t),Te(e)),e.previousYearScroll=t},ge=function(e,t){return c("inputElementClicked"),e.preventDefault(),!!t.frozen||(xe(t),!1)},he=function(e,t){return c("inputElementFocused"),e.preventDefault(),e.target.blur(),!1},fe=function(e,t){var n,o,r,i;c("acceptButtonClicked"),de(t),me(t),pe(t),se(t),t.dayPos>t.maxDays-1?(t.dayElements[t.dayPos].style.color="red",t.dayElements[t.dayPos].style.fontWeight="bold"):(n=`${i=t.allYears[t.yearPos]}-${r=ne[t.monthPos]}-`+(o=te[t.dayPos]),o=o+`.${r}.`+i,t.isInputElement?t.element.value=o:t.element.innerText=o,t.value=n,Fe(t))},ye=function(e,t,n){c("mouseDowned"),t.dragObj={picker:n},t.dragObj.lastY=e.screenY,t.dragObj.hasMoved=!1},ve=function(e,t,n){c("touchStarted"),e=e.changedTouches[0],t.dragObj={picker:n},t.dragObj.touchID=e.identifier,t.dragObj.lastY=e.screenY},be=function(e,t){var n;null!=t.dragObj&&(c("mouseMoved"),t.dragObj.hasMoved=!0,n=t.dragObj.lastY-e.screenY,t.dragObj.lastY=e.screenY,Ie(n,t.dragObj.picker))},we=function(e,t){var n,o,r,i,a;if(null!=t.dragObj)for(c("touchMoved"),o=0,r=(i=e.changedTouches).length;o",r=n=0,o=te.length;n${te[r]}`;e.innerHTML=t+=""},Se=function(e){var t,n,o,r;for(c("addMonthElements"),t="",r=n=0,o=ne.length;n${ne[r]}`;e.innerHTML=t+=""},Be=function(e,t){var n,o,r,i;for(c("addYearElements"),n="",i=o=0,r=t.length;o${t[i]}`;e.innerHTML=n+=""},Te=function(e){for(var t,n=t=28;t<=30;n=++t)e.dayElements[n].style.removeProperty("color"),e.dayElements[n].style.removeProperty("font-weight")},Fe=function(e){c("closeScrollRollDatepicker"),e.outerContainer.classList.remove("shown"),e.dragObj=null,e.nexHeartbeat=function(){},e.isOn=!1},xe=function(e){c("openScrollRollDatepicker"),e.outerContainer.classList.add("shown"),e.nexHeartbeat=e.heartbeat.bind(e),requestAnimationFrame(e.nexHeartbeat),e.isOn=!0},a=function(e,t){return t/2+e*t},Oe=function(e,t){return(e-e%t)/t},Re=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement&&e.isConnected:null!=e&&1===e.nodeType&&e.isConnected},He=function(e,t){Object.assign(e,re),Object.assign(e,t)},De=new TextEncoder("utf-8");function Me(e){return De.encode(e)}async function qe(){y||(vt()?((h=history.state).navAction=ht(),g.lastNavAction=h.navAction,b(g),history.replaceState(h,"")):(f.navAction=nt,g.lastNavAction=f.navAction,b(g),history.replaceState(f,"")),await ct(),h=history.state,wt(h),it(h))}new TextDecoder("utf-8"),(T=new Array(256).fill(0)).map(function(e,t){return t.toString(16).padStart(2,"0")}),T.map(function(e,t){return BigInt(t)}),T=Array.from("0123456789abcdef"),G=new Array(256),T.forEach(function(e){return G[e]=16*parseInt(e,16)}),Q=new Array(256),T.forEach(function(e){return Q[e]=parseInt(e,16)}),{log:d,olog:ze}=e("utilmodule"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=m=null,je=new RegExp("^[a-z0-9]*$"),Ne=new RegExp("^[a-km-np-z2-9]*$"),l=s=Ae=null;var je,l,s,Ae,Ne,u,d,ze,m,p,Ve,Ye,Ue=function(){d("initialize"),(Ae=new Worker("argon2worker.js")).addEventListener("message",Ke),Je()},Je=function(){var e,t,n,o;for(m=[],p=[],e=t=48;t<=57;e=++t)m[e]=!0,48!==e&&49!==e&&(p[e]=!0);for(e=n=65;n<=90;e=++n)m[e]=!0;for(e=o=97;o<=122;e=++o)m[e]=!0,108!==e&&111!==e&&(p[e]=!0)},$e=function(e){for(var t,n,o,r,i="",a=o=0,c=r=(e=(t=new Uint8Array(e)).length)-(e=e%3);o>18]+u[(258048&n)>>12]+u[(4032&n)>>6]+u[63&n];return 1==e?(n=t[r],i+=u[(252&n)>>2]+u[(3&n)<<4]+"=="):2==e&&(n=t[r]<<8|t[1+r],i+=u[(64512&n)>>10]+u[(1008&n)>>4]+u[(15&n)<<2]+"="),i},_e=async function(e,t){var n=window.crypto.subtle;return ze({username:e,pwd:t}),e=Me(e),t=Me(t),t=await n.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits","deriveKey"]),e=await n.deriveKey({name:"PBKDF2",salt:e,iterations:1e3,hash:"SHA-1"},t,{name:"HMAC",hash:"SHA-1",length:160},!0,["sign","verify"]),t=await n.exportKey("raw",e),$e(t)},Ke=function(e){var t,n;return d("argon2WorkerResponded"),d(e.data),null!=e.data&&({error:t,hashHex:n}=e.data),null!=s&&null!=n?s(n):null!=l&&null!=t?l(t):void d("argon2Worker response did not cause any effect!")},We=async function(e,t){return(e=e.length<4?e+e+e:e).length<8&&(e+=e),_e(e,t)},Qe=async function(e,t){var n,o;d("argon2HashPw"),o=new Promise(function(e,t){s=e,l=t}),Ae.postMessage({pin:e,birthdate:t});try{return await o}catch(e){n=e,d("Argon2 threw an Error!"),d(n)}finally{l=s=null}},Ge=function(e){return m[e]},Xe=function(e){return p[e]},Ze=function(e){return je.test(e)},et=function(e){return Ne.test(e)},tt=function(e){for(var t,n,o={},r=0,i=(n=(e="string"==typeof e?document.getElementById(e):e).elements).length;rh.depth))return t=yt(),g.lastNavAction=t,b(g),t=pt(t),history.go(-e),t},mt=function(e){return"back"===e.action&&e.timestamp===rt},pt=function(e){return rt=e.timestamp,new Promise(function(e){return ot=e})},gt=function(){ot(),rt=ot=null},ht=function(){return{action:"browserNav {refresh, back or forward}",timestamp:Date.now()}},ft=function(){return{action:"nav",timestamp:Date.now()}},yt=function(){return{action:"back",timestamp:Date.now()}},vt=function(){return bt(history.state)},bt=function(e){var t,n,o,r,i;if(null==e)return!1;if(r=Object.keys(e),i=Object.keys(f),r.length!==i.length)return!1;for(n=t=0,o=r.length;t{var n,o;if(!y){if("string"!=typeof e)throw new Error("In navhandler.toBase `newBase` must a string!");if(await ct(),n=h.base,o=h.modifier,n!==e)"none"===o?st(e,o,t):ut(e,"none",t);else if("none"===o)ut(e,"none",t);else try{y=!0,await dt(1),ut(e,"none",t)}finally{y=!1}v(h)}})(e,t);if(o{if(!y){try{y=!0,await dt(1)}finally{y=!1}v(h)}})()}({log:Ve,olog:Ye}=e("navtriggers"));var w,Lt,It,k,Ct,St,E,Bt,Tt,Ft,xt,P,L,I,C,Ot,Rt,Ht=r(426),Dt=({log:w,olog:It}=e("errorfeedbackmodule"),k=Lt=Ct=St=null,function(){w("initialize"),St=svnLoginError404.innerHTML,Ct=svnLoginError401.innerHTML,Lt=nosvnLoginError.innerHTML,k=pinRenewError.innerHTML}),Mt=function(){switch(Ht.get("loginView")){case"doctor":document.body.style.height=doctorloginview.clientHeight+"px";break;case"patient":document.body.style.height=patientloginview.clientHeight+"px";break;default:return}},qt=function(e){switch(compatibilitySvnLoginForm.classList.add("error"),e){case"404":svnErrorFeedbackText.innerHTML=St;break;case"401":case"input":svnErrorFeedbackText.innerHTML=Ct;break;default:svnErrorFeedbackText.innerHTML="Connection Error!"}w("Error: "+e)},jt=function(e){switch(patientCodeLoginForm.classList.add("error"),e){case"404":svnErrorFeedbackText.innerHTML=St;break;case"401":case"input":svnErrorFeedbackText.innerHTML=Ct;break;default:codeErrorFeedbackText.innerHTML="Connection Error!"}w("Error: "+e)},At=function(e){switch(compatibilityAuthcodeLoginForm.classList.add("error"),e){case"404":case"401":case"input":authcodeErrorFeedbackText.innerHTML=Lt;break;default:authcodeErrorFeedbackText.innerHTML="Connection Error!"}w("Error: "+e)},Nt=function(e){switch(compatibilityRenewPinForm.classList.add("error"),e){case"404":case"401":case"input":compatibilityPinRenewErrorFeedbackText.innerHTML=k;break;default:compatibilityPinRenewErrorFeedbackText.innerHTML="Connection Error!"}w("Error: "+e)},zt=function(e){switch(renewCodeForm.classList.add("error"),e){case"404":case"401":case"input":codeRenewErrorFeedbackText.innerHTML=k;break;default:codeRenewErrorFeedbackText.innerHTML="Connection Error!"}w("Error: "+e)},Vt=function(e){switch(requestCodeForm.classList.add("error"),e){case"404":case"401":case"input":requestCodeErrorFeedbackText.innerHTML=k;break;default:requestCodeErrorFeedbackText.innerHTML="Connection Error!"}w("Error: "+e)},Yt=function(e){doctorloginForm.classList.add("error"),w("Error: "+e)},S=function(){"undefined"!=typeof doctorloginForm&&null!==doctorloginForm&&doctorloginForm.classList.remove("error"),"undefined"!=typeof patientCodeLoginForm&&null!==patientCodeLoginForm&&patientCodeLoginForm.classList.remove("error"),"undefined"!=typeof renewCodeForm&&null!==renewCodeForm&&renewCodeForm.classList.remove("error"),"undefined"!=typeof requestCodeForm&&null!==requestCodeForm&&requestCodeForm.classList.remove("error"),"undefined"!=typeof codeErrorFeedbackText&&null!==codeErrorFeedbackText&&(codeErrorFeedbackText.innerHTML=""),"undefined"!=typeof codeRenewErrorFeedbackText&&null!==codeRenewErrorFeedbackText&&(codeRenewErrorFeedbackText.innerHTML=""),"undefined"!=typeof compatibilityAuthcodeLoginForm&&null!==compatibilityAuthcodeLoginForm&&compatibilityAuthcodeLoginForm.classList.remove("error"),"undefined"!=typeof compatibilitySvnLoginForm&&null!==compatibilitySvnLoginForm&&compatibilitySvnLoginForm.classList.remove("error"),"undefined"!=typeof compatibilityRenewPinForm&&null!==compatibilityRenewPinForm&&compatibilityRenewPinForm.classList.remove("error"),"undefined"!=typeof svnErrorFeedbackText&&null!==svnErrorFeedbackText&&(svnErrorFeedbackText.innerHTML=""),"undefined"!=typeof authcodeErrorFeedbackText&&null!==authcodeErrorFeedbackText&&(authcodeErrorFeedbackText.innerHTML=""),"undefined"!=typeof compatibilityPinRenewErrorFeedbackText&&null!==compatibilityPinRenewErrorFeedbackText&&(compatibilityPinRenewErrorFeedbackText.innerHTML=""),"undefined"!=typeof requestCodeErrorFeedbackText&&null!==requestCodeErrorFeedbackText&&(requestCodeErrorFeedbackText.innerHTML=""),Mt()},B=function(e,t){switch(e){case"doctor":Yt(t);break;case"svnPatient":qt(t);break;case"authcodePatient":At(t);break;case"codePatient":jt(t);break;case"codeRenewPatient":zt(t);break;case"codeRenewCompatibility":Nt(t);break;case"requestCode":Vt(t);break;default:w("unknown error usecase: "+e)}Mt()},T=window.location.origin,Ut="https://bilder-befunde.at/service/api/v1/auth/login",Jt="https://www.bilder-befunde.at/pwa-api/api/v1/login/",F=T+"/home",$t="https://www.bilder-befunde.at/pwa-api/api/v1/support/",_t="https://www.bilder-befunde.at/pwa-api/api/v1/request-code/",Kt="https://bilder-befunde.at/index.php?site=scripts/login_patient.php",Wt=({log:E,olog:Tt}=e("compatibitlityloginviewmodule"),L=I=0,Ft=/^\+?[0-9]+$/gm,P=Bt=null,T=document.getElementById("request-code-success"),xt=T.innerHTML,function(){E("initialize"),compatibilityloginHeading.addEventListener("click",n),svnSubmitButton.addEventListener("click",en),authcodeSubmitButton.addEventListener("click",Zt),requestCodeSubmitButton.addEventListener("click",tn),svnPartInput.addEventListener("keyup",Qt),birthdayPartInput.addEventListener("keyup",Gt),noPinQuestion.addEventListener("click",Xt),compatibilityloginview.getElementsByClassName("link-button")[0].addEventListener("click",nn),I=svnPartInput.value.length,L=birthdayPartInput.value.length;try{(Bt=new t({element:"authcode-birthday-input"})).initialize(),(P=new t({element:"request-birthday-input"})).initialize()}catch(e){E(e)}}),Qt=function(e){var t=svnPartInput.value;I=t.length,46!==e.keyCode&&8!==e.keyCode&&(4===I&&pn(),4{var t,n,e=(()=>{var e=[];for(n in o)null!=(t=o[n]).initialize&&e.push(t.initialize());return e})();await Promise.all(e),ko()})()}})()