',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],Se(e.dayPicker),Te(e.monthPicker),Ie(e.yearPicker,e.allYears),e.dayElements=e.dayPicker.getElementsByClassName("scrollroll-element")},i=function(e){s("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)},ce=function(e){var t,n;for(e.maxDays=re[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,r;for(s("attachEventListeners"),t.element.addEventListener("click",function(e){return he(e,t)}),t.element.addEventListener("focus",function(e){return fe(e,t)}),t.acceptButton.addEventListener("click",function(e){return ge(e,t)}),t.dayPicker.addEventListener("mousedown",function(e){return ve(e,t,t.dayPicker)}),t.dayPicker.addEventListener("touchstart",function(e){return ye(e,t,t.dayPicker)},{passive:!0}),t.dayPicker.addEventListener("wheel",Le),t.monthPicker.addEventListener("mousedown",function(e){return ve(e,t,t.monthPicker)}),t.monthPicker.addEventListener("touchstart",function(e){return ye(e,t,t.monthPicker)},{passive:!0}),t.monthPicker.addEventListener("wheel",Le),t.yearPicker.addEventListener("mousedown",function(e){return ve(e,t,t.yearPicker)}),t.yearPicker.addEventListener("touchstart",function(e){return ye(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,r=(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),Be(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),Be(e)),e.previousYearScroll=t},he=function(e,t){return s("inputElementClicked"),e.preventDefault(),!!t.frozen||(xe(t),!1)},fe=function(e,t){return s("inputElementFocused"),e.preventDefault(),e.target.blur(),!1},ge=function(e,t){var n,r,o,i;s("acceptButtonClicked"),de(t),me(t),pe(t),ce(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]}-${o=ne[t.monthPos]}-`+(r=te[t.dayPos]),r=r+`.${o}.`+i,t.isInputElement?t.element.value=r:t.element.innerText=r,t.value=n,Fe(t))},ve=function(e,t,n){s("mouseDowned"),t.dragObj={picker:n},t.dragObj.lastY=e.screenY,t.dragObj.hasMoved=!1},ye=function(e,t,n){s("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&&(s("mouseMoved"),t.dragObj.hasMoved=!0,n=t.dragObj.lastY-e.screenY,t.dragObj.lastY=e.screenY,Ce(n,t.dragObj.picker))},we=function(e,t){var n,r,o,i,a;if(null!=t.dragObj)for(s("touchMoved"),r=0,o=(i=e.changedTouches).length;r",o=n=0,r=te.length;n${te[o]}`;e.innerHTML=t+=""},Te=function(e){var t,n,r,o;for(s("addMonthElements"),t="",o=n=0,r=ne.length;n${ne[o]}`;e.innerHTML=t+=""},Ie=function(e,t){var n,r,o,i;for(s("addYearElements"),n="",i=r=0,o=t.length;r${t[i]}`;e.innerHTML=n+=""},Be=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){s("closeScrollRollDatepicker"),e.outerContainer.classList.remove("shown"),e.dragObj=null,e.nexHeartbeat=function(){},e.isOn=!1},xe=function(e){s("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,oe),Object.assign(e,t)},Me=new TextEncoder("utf-8");function De(e){return Me.encode(e)}async function qe(){v||(vt()?((f=history.state).navAction=ht(),h.lastNavAction=f.navAction,b(h),history.replaceState(f,"")):(g.navAction=tt,h.lastNavAction=g.navAction,b(h),history.replaceState(g,"")),await at(),f=history.state,bt(f),ot(f))}new TextDecoder("utf-8"),(F=new Array(256).fill(0)).map(function(e,t){return t.toString(16).padStart(2,"0")}),F.map(function(e,t){return BigInt(t)}),F=Array.from("0123456789abcdef"),G=new Array(256),F.forEach(function(e){return G[e]=16*parseInt(e,16)}),Q=new Array(256),F.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=c=Ae=null;var je,l,c,Ae,Ne,u,d,ze,m,p,n,Ve,Ye=function(){d("initialize"),(Ae=new Worker("argon2worker.js")).addEventListener("message",_e),Ue()},Ue=function(){var e,t,n,r;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=r=97;r<=122;e=++r)m[e]=!0,108!==e&&111!==e&&(p[e]=!0)},Je=function(e){for(var t,n,r,o,i="",a=r=0,s=o=(e=(t=new Uint8Array(e)).length)-(e=e%3);r>18]+u[(258048&n)>>12]+u[(4032&n)>>6]+u[63&n];return 1==e?(n=t[o],i+=u[(252&n)>>2]+u[(3&n)<<4]+"=="):2==e&&(n=t[o]<<8|t[1+o],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=De(e),t=De(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),Je(t)},_e=function(e){var t,n;return d("argon2WorkerResponded"),d(e.data),null!=e.data&&({error:t,hashHex:n}=e.data),null!=c&&null!=n?c(n):null!=l&&null!=t?l(t):void d("argon2Worker response did not cause any effect!")},Ke=async function(e,t){return(e=e.length<4?e+e+e:e).length<8&&(e+=e),$e(e,t)},We=async function(e,t){var n,r;d("argon2HashPw"),r=new Promise(function(e,t){c=e,l=t}),Ae.postMessage({pin:e,birthdate:t});try{return await r}catch(e){n=e,d("Argon2 threw an Error!"),d(n)}finally{l=c=null}},Qe=function(e){return m[e]},Ge=function(e){return p[e]},Xe=function(e){return je.test(e)},Ze=function(e){return Ne.test(e)},et=function(e){for(var t,n,r={},o=0,i=(n=(e="string"==typeof e?document.getElementById(e):e).elements).length;of.depth))return t=gt(),h.lastNavAction=t,b(h),t=mt(t),history.go(-e),t},dt=function(e){return"back"===e.action&&e.timestamp===rt},mt=function(e){return rt=e.timestamp,new Promise(function(e){return nt=e})},pt=function(){nt(),rt=nt=null},ht=function(){return{action:"browserNav {refresh, back or forward}",timestamp:Date.now()}},ft=function(){return{action:"nav",timestamp:Date.now()}},gt=function(){return{action:"back",timestamp:Date.now()}},vt=function(){return yt(history.state)},yt=function(e){var t,n,r,o,i;if(null==e)return!1;if(o=Object.keys(e),i=Object.keys(g),o.length!==i.length)return!1;for(n=t=0,r=o.length;t{var n,r;if(!v){if("string"!=typeof e)throw new Error("In navhandler.toBase `newBase` must a string!");if(await at(),n=f.base,r=f.modifier,n!==e)"none"===r?lt(e,r,t):ct(e,"none",t);else if("none"===r)ct(e,"none",t);else try{v=!0,await ut(1),ct(e,"none",t)}finally{v=!1}y(f)}})(e,t);if(r{if(!v){try{v=!0,await ut(1)}finally{v=!1}y(f)}})()}({log:n,olog:Ve}=e("navtriggers"));var k,Lt,Ct,E,St,Tt,P,It,Bt,Ft,xt,L,C,S,T,Ot,Rt,Ht=o(426),Mt=({log:k,olog:Ct}=e("errorfeedbackmodule"),E=Lt=St=Tt=null,function(){k("initialize"),Tt=svnLoginError404.innerHTML,St=svnLoginError401.innerHTML,Lt=nosvnLoginError.innerHTML,E=pinRenewError.innerHTML}),Dt=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=Tt;break;case"401":case"input":svnErrorFeedbackText.innerHTML=St;break;default:svnErrorFeedbackText.innerHTML="Connection Error!"}k("Error: "+e)},jt=function(e){switch(patientCodeLoginForm.classList.add("error"),e){case"404":svnErrorFeedbackText.innerHTML=Tt;break;case"401":case"input":svnErrorFeedbackText.innerHTML=St;break;default:codeErrorFeedbackText.innerHTML="Connection Error!"}k("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!"}k("Error: "+e)},Nt=function(e){switch(compatibilityRenewPinForm.classList.add("error"),e){case"404":case"401":case"input":compatibilityPinRenewErrorFeedbackText.innerHTML=E;break;default:compatibilityPinRenewErrorFeedbackText.innerHTML="Connection Error!"}k("Error: "+e)},zt=function(e){switch(renewCodeForm.classList.add("error"),e){case"404":case"401":case"input":codeRenewErrorFeedbackText.innerHTML=E;break;default:codeRenewErrorFeedbackText.innerHTML="Connection Error!"}k("Error: "+e)},Vt=function(e){switch(requestCodeForm.classList.add("error"),e){case"404":case"401":case"input":requestCodeErrorFeedbackText.innerHTML=E;break;default:requestCodeErrorFeedbackText.innerHTML="Connection Error!"}k("Error: "+e)},Yt=function(e){doctorloginForm.classList.add("error"),k("Error: "+e)},I=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=""),Dt()},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:k("unknown error usecase: "+e)}Dt()},F=window.location.origin,Ut="https://bilder-befunde.at/service/api/v1/auth/login",Jt="https://www.bilder-befunde.at/pwa-api/api/v1/login/",x=F+"/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:P,olog:Bt}=e("compatibitlityloginviewmodule"),C=S=0,Ft=/^\+?[0-9]+$/gm,L=It=null,F=document.getElementById("request-code-success"),xt=F.innerHTML,function(){P("initialize"),compatibilityloginHeading.addEventListener("click",w),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),S=svnPartInput.value.length,C=birthdayPartInput.value.length;try{(It=new t({element:"authcode-birthday-input"})).initialize(),(L=new t({element:"request-birthday-input"})).initialize()}catch(e){P(e)}}),Qt=function(e){var t=svnPartInput.value;S=t.length,46!==e.keyCode&&8!==e.keyCode&&(4===S&&pn(),4{var t,n,e=(()=>{var e=[];for(n in r)null!=(t=r[n]).initialize&&e.push(t.initialize());return e})();await Promise.all(e),kr()})()}})()