/* Build: 10/24/2024, 12:42:35 PM */
/*! 2024-10-24 12:10:32 */
var $j=jQuery.noConflict(),jPar={};deepMerge=function(){let t,e,o,n,r,i,a=arguments[0]||{},s=1;const l=arguments.length;let c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||isFunction(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!==(t=arguments[s]))for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){if(n=t[e],"__proto__"===e||a===n)continue;c&&n&&(jQuery.isPlainObject(n)||(r=Array.isArray(n)))?(o=a[e],i=r&&!Array.isArray(o)?[]:r||jQuery.isPlainObject(o)?o:{},r=!1,a[e]=deepMerge(c,i,n)):void 0!==n&&(a[e]=n)}return a},$j.extend(!0,jPar,{Tracking:{init:function(){try{this.setEventForUnhandledRejection()}catch(t){console.error("jPar.Tracking.init failed!")}},setEventForUnhandledRejection:function(){window.addEventListener("unhandledrejection",(t=>{if(void 0!==t){t.preventDefault();const e=void 0!==t.reason,o=e&&void 0!==t.reason.stack,n=e&&void 0!==t.reason.message;o&&""!==t.reason.stack?jPar.util.log.error(t.reason.stack,"unhandledrejection (event.reason.stack) Caught_2"):n&&jPar.util.log.error(t.reason.message,"unhandledrejection (event.reason.message) Caught_2")}}))},parmacontoTeaser:{init:function(){const t=this;document.addEventListener("scroll",(()=>{t.onScrollOrResizeViewed()}),{passive:!0,signal:jPar.util.getGlobalAbortSignal()}),window.addEventListener("resize",(()=>{t.onScrollOrResizeViewed()}),{passive:!0,signal:jPar.util.getGlobalAbortSignal()})},onScrollOrResizeViewed:function(){const t=this,e=$j(".urcCard [data-urclayout]:not(.is-viewed)");e.length>0&&e.each((function(){t.slotViewed($j(this))}))},slotLoaded:function(t){const e=this;t.height()>0&&e.triggerPegLoggerEvent(t,"loaded")},slotViewed:function(t){t.isOnScreen((function(e){return e.top>=.75*t.height()&&e.bottom>=$j(this).height()}))&&(t.addClass("is-viewed"),this.triggerPegLoggerEvent(t,"viewed"))},slotClicked:function(t){const e=this;t.on("click",(function(){e.triggerPegLoggerEvent($j(this),"click")}))},addParamsToParmacontoLink:function(t){const e=t.find("a").attr("href");if(null!=e){const o=-1===e.lastIndexOf("?")?"?":"&",n=e+o+("target_id="+t.data("urc-id"))+("&urcTitle="+t.data("urc-title"))+("&slotName="+t.parents(".urcCard").attr("id"))+("&displaySize="+jPar.wdk.screensize.getCurrentScreenSize());t.attr("href",n)}},triggerPegLoggerEvent:function(t,e){const o=t.data("urc-slot"),n=t.data("urc-id"),r=t.data("urc-title");jPar.util.log.bigData({category:"parmacontoTeaser",subcategory:o,targetId:n+":"+r,action:e})}},registration:{trackLayer:function(t){jPar.util.log.devConsole("Deprecated Tracking.registration.trackLayer() ",t)}}}});class FetchIt{constructor(){this.defaultBrowserTimeout=15e3}async get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{timeout:o=this.defaultBrowserTimeout}=e,n=new AbortController,r=window.setTimeout((()=>{n.abort(new TechnicalFetchCommandError("browserTimeout"))}),o);try{const o=await fetch(t,{method:"GET",headers:{"x-requested-with":"XMLHttpRequest"},signal:n.signal,...e});if(window.clearTimeout(r),!o.ok)throw 418===o.status?new TechnicalFetchCommandError("offline"):new TechnicalFetchCommandError(o.status);const i=await o.text();if(this.isJson(i))return this.getJson(i);if(i.includes("loginPage"))throw new TechnicalFetchCommandError("sessionExpired");return i}catch(t){if(n.signal?.aborted)throw n.signal.reason??new TechnicalFetchCommandError("browserTimeout");throw t instanceof FetchCommandError?t:new TechnicalFetchCommandError(t)}}async post(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{timeout:n=this.defaultBrowserTimeout}=o,r=new AbortController,i=window.setTimeout((()=>{r.abort(new TechnicalFetchCommandError("browserTimeout"))}),n);try{const{headers:n,...a}=o,s=await fetch(t,{method:"POST",headers:{"X-CSRF-TOKEN":jPar.wdk.security.csrf.getToken(),"x-requested-with":"XMLHttpRequest","Content-Type":e instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...n},body:e,signal:r.signal,...a});if(window.clearTimeout(i),!s.ok)switch(s.status){case 418:throw new TechnicalFetchCommandError("offline");case 403:throw new TechnicalFetchCommandError("sessionExpired");default:throw new TechnicalFetchCommandError(s.status)}const l=await s.text();if(this.isJson(l))return this.getJson(l);if(l.includes("loginPage"))throw new TechnicalFetchCommandError("sessionExpired");return l}catch(t){if(r.signal?.aborted)throw r.signal.reason??new TechnicalFetchCommandError("browserTimeout");throw t instanceof FetchCommandError?t:new TechnicalFetchCommandError(t)}}async put(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{timeout:n=this.defaultBrowserTimeout}=o,r=new AbortController,i=window.setTimeout((()=>{r.abort(new TechnicalFetchCommandError("browserTimeout"))}),n);try{const{headers:n,...a}=o,s=await fetch(t,{method:"PUT",headers:{"X-CSRF-TOKEN":jPar.wdk.security.csrf.getToken(),"x-requested-with":"XMLHttpRequest","Content-Type":e instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...n},body:e,signal:r.signal,...a});if(window.clearTimeout(i),!s.ok)switch(s.status){case 418:throw new TechnicalFetchCommandError("offline");case 403:throw new TechnicalFetchCommandError("sessionExpired");default:throw new TechnicalFetchCommandError(s.status)}const l=await s.text();if(this.isJson(l))return this.getJson(l);if(l.includes("loginPage"))throw new TechnicalFetchCommandError("sessionExpired");return l}catch(t){if(r.signal?.aborted)throw r.signal.reason??new TechnicalFetchCommandError("browserTimeout");throw t instanceof FetchCommandError?t:new TechnicalFetchCommandError(t)}}async delete(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{timeout:n=this.defaultBrowserTimeout}=o,r=new AbortController,i=window.setTimeout((()=>{r.abort(new TechnicalFetchCommandError("browserTimeout"))}),n);try{const{headers:n,...a}=o,s=await fetch(t,{method:"DELETE",headers:{"X-CSRF-TOKEN":jPar.wdk.security.csrf.getToken(),"x-requested-with":"XMLHttpRequest","Content-Type":e instanceof URLSearchParams?"application/x-www-form-urlencoded":"application/json",...n},body:e,signal:r.signal,...a});if(window.clearTimeout(i),!s.ok)switch(s.status){case 418:throw new TechnicalFetchCommandError("offline");case 403:throw new TechnicalFetchCommandError("sessionExpired");default:throw new TechnicalFetchCommandError(s.status)}const l=await s.text();if(this.isJson(l))return this.getJson(l);if(l.includes("loginPage"))throw new TechnicalFetchCommandError("sessionExpired");return l}catch(t){if(r.signal?.aborted)throw r.signal.reason??new TechnicalFetchCommandError("browserTimeout");throw t instanceof FetchCommandError?t:new TechnicalFetchCommandError(t)}}tryParseJson(t){return this.isJson(t)?this.getJson(t):t}isJson(t){t="string"!=typeof t?JSON.stringify(t):t;try{t=JSON.parse(t)}catch(t){return!1}return"object"==typeof t&&null!==t}getJson(t){if(t="string"!=typeof t?JSON.stringify(t):t,"object"==typeof(t=JSON.parse(t))&&null!==t)return t}}fetchIt=new FetchIt;class FetchCommandError extends Error{constructor(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"FetchCommandError";super(),this.name=o,this.type=t,this.message="object"==typeof e?e:e?.toString().replace("Error: ","")}}class PermissionFetchCommandError extends FetchCommandError{constructor(t){super("permission",t,"PermissionFetchCommandError")}}class TechnicalFetchCommandError extends FetchCommandError{constructor(t){super("technicalError",t,"TechnicalFetchCommandError")}}jPar.app=jPar.app||{},jPar.app.appState=jPar.app.appState||{},$j.extend(!0,jPar.app.appState,{set:function(t,e,o,n){if(browserDetails.features.hasStorageAccess()){const r=this._getStorageType(t),i=r.getItem(e);if(null!==i&&""!==i){const t=JSON.parse(i);t[o]=n,r.setItem(e,JSON.stringify(t))}else{const t={};t[o]=n,r.setItem(e,JSON.stringify(t))}}},get:function(t,e,o){if(browserDetails.features.hasStorageAccess()){const n=this._getStorageType(t).getItem(e);if(null===n||""===n||"{}"===n)return null;{const t=JSON.parse(n);return void 0===t[o]?null:t[o]}}},getNameSpace:function(t,e){if(browserDetails.features.hasStorageAccess()){const o=this._getStorageType(t).getItem(e);return null===o||""===o||"{}"===o?null:JSON.parse(o)}},addEntry:function(t,e,o,n){if(browserDetails.features.hasStorageAccess()){const r=this._getStorageType(t),i=r.getItem(e);if(null!==i&&""!==i){const t=JSON.parse(i),a=void 0!==t[o]?t[o]:"";if(n.indexOf(",")>-1)return void console.error('Adding Values with "," is not allowed');if(!1===a.includes(n)){let i;0===a.length?i=[n]:(a.push(n),i=a),t[o]=i,r.setItem(e,JSON.stringify(t))}}else{const t={};t[o]=[n],r.setItem(e,JSON.stringify(t))}}},remove:function(t,e,o,n){void 0!==n?this._removeEntry(t,e,o,n):void 0!==o&&void 0===n?this._removeCategory(t,e,o):void 0!==e&&this._removeNamespace(t,e,o)},_removeCategory:function(t,e,o){if(browserDetails.features.hasStorageAccess()){const n=this._getStorageType(t),r=n.getItem(e);if(null!==r&&""!==r){const t=JSON.parse(r);delete t[o],n.setItem(e,JSON.stringify(t))}}},_removeEntry:function(t,e,o,n){if(browserDetails.features.hasStorageAccess()){const r=this._getStorageType(t),i=r.getItem(e);if(null!==i&&""!==i){const t=JSON.parse(i),a=t[o];let s=a;"string"==typeof a&&(s=a.split(",")),s.indexOf(n)>-1&&(s.splice(s.indexOf(n),1),t[o]=s,r.setItem(e,JSON.stringify(t)))}}},_removeNamespace:function(t,e){if(browserDetails.features.hasStorageAccess()){this._getStorageType(t).removeItem(e)}},_getStorageType:function(t){return"sessionStorage"===t?sessionStorage:"localStorage"===t?localStorage:(console.error("Storage Type not Supported",t),null)}}),jPar.util=jPar.util||{},deepMerge(!0,jPar.util,{isTouch:function(){return window.matchMedia("(pointer: coarse)").matches},isMouse:function(){return window.matchMedia("(pointer: fine)").matches},prefersReducedMotion:function(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches},setCookie:function(t,e){const o=new Date;o.setTime(o.getTime()+85536e5);const n=`${t}=${e}; path=/; domain=${this.getTopLevelDomain()}; expires=${o.toGMTString()};`;document.cookie=n},getCookie:function(t){const e=document.cookie.split(" ");if(void 0!==e)for(let o=0;o<e.length;o++){const n=e[o].split("=");if(n[0]===t)return n.slice(1).join("=")}return null},loadScript:function(t,e){const o=$j("#domPageVars").data("jsPath"),n=document.createElement("script");let r="";document.location.href.indexOf(".dev")>-1&&!0===$j("#domPageVars").data("useCacheBreaker")&&(r="?ts"+Date.now()),t.indexOf("https:")>-1?n.setAttribute("src",t):n.setAttribute("src",o+t+".js"+r),document.getElementsByTagName("head")[0].appendChild(n),n.onloadDone||void 0===e||(n.onloadDone=!0,n.onload=function(){e()})},vibrate:function(){void 0!==window.navigator.vibrate&&window.navigator.vibrate(30)},getTopLevelDomain:function(){const t=location.hostname,e=t.match(/(.co.uk|.com.mx|.com.au)$/)?-3:-2;return t.split(".").slice(e).join(".")},getGetParamFromUrl:function(t){const e=decodeURIComponent(window.location.search.substring(1)).split("&");let o,n;for(n=0;n<e.length;n++)if(o=e[n].split("="),o[0]===t)return void 0===o[1]||o[1]},putCursorAtEnd:function(t){if($j("html.no-touchevents").length>0){const e=t.val();t.trigger("focus"),t.val(""),t.val(e)}},setFocusOnFirstFocusableElement:function(t){t.filter("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable], summary").filter(":visible:not([aria-hidden=true])").first().trigger("focus")},serializeForm:function(t){const e={},o=new FormData(t);for(const t of o.keys()){const n=o.getAll(t);e[t]=fetchIt.tryParseJson(1===n.length?n[0]:n)}return e},awaitTimeout:function(t){return new Promise((e=>setTimeout(e,t)))},waitForChildNodes:async function(){return new Promise(requestAnimationFrame)},getGlobalAbortSignal:function(){if(null!==document.querySelector("peg-app-shell")){const t=document.querySelector("peg-app-shell")?.getAppShellAbortController().signal;return void 0!==t?t:(jPar.util.log.error("getGlobalAbortSignal failed","AbortSignal was requested before AbortController was created"),null)}return(new AbortController).signal}}),window.addEventListener("beforeinstallprompt",(function(t){t.preventDefault(),jPar.app.installPromptEvent=t})),jPar.util=jPar.util||{},deepMerge(!0,jPar.util,{pwa:{newServiceworkerAvailable:!1,isOfflineSwEnabled:!1,swListenerInit:!1,init:function(){const t=null!==document.querySelector("#serviceWorkerKillSwitch");this.isOfflineSwEnabled=null!==document.querySelector("#offlineError"),this.createServiceWorker(),this.isOfflineSwEnabled?(document.addEventListener("peg:newUserLogin",(()=>{this.killDefaultCache()}),{signal:jPar.util.getGlobalAbortSignal()}),this.lieFi.init(),this.offline.init(),this.installOption.init(),this.checkStandalone()):t&&this.killDefaultCache()},createServiceWorker:function(){void 0!==navigator.serviceWorker&&(!1===this.swListenerInit&&(navigator.serviceWorker.addEventListener("message",this.handleSwEvents),this.swListenerInit=!0),navigator.serviceWorker.register("/service-worker").then((()=>{}),(()=>{})).catch((t=>{jPar.util.log.error("PWA Serviceworker:",t)})))},handleSwEvents:function(t){"logJsError"===t.data?.command&&jPar.util.log.error("PWA",t.data.stacktrace),"pageAnsweredFromCache"===t.data?.command&&(document.querySelector("html").setAttribute("data-origin","cacheStorageAjax"),jPar.util.pwa.lieFi.gotCachedPage()),"pageAnsweredFromNetwork"===t.data?.command&&jPar.util.pwa.lieFi.gotNetworkPage()},hasNewServiceWorker:function(){void 0!==navigator.serviceWorker&&this.isOfflineSwEnabled&&navigator.serviceWorker.getRegistrations().then((t=>{t.length>0&&null!==t[0].active&&t[0].update()}))},killServiceWorker:function(){void 0!==navigator.serviceWorker&&navigator.serviceWorker.getRegistrations().then((t=>{t.length>0&&(navigator.serviceWorker.addEventListener("message",(t=>{"killSwitchSwDeleted"===t.data&&document.location.reload()})),navigator.serviceWorker.controller.postMessage("killSwitch"))}),(()=>{}))},killDefaultCache:function(){try{caches.keys().then((function(t){t.forEach((function(t){t.indexOf("defaultCache-")>-1&&(console.log("killDefaultCache"),caches.delete(t).then((function(){})))}))})).catch((t=>{jPar.util.log.error(t,"killDefaultCaches: failed")}))}catch(t){}},killCaches:function(){caches.keys().then((function(t){t.forEach((function(t){caches.delete(t).then((function(){}))}))})).catch((t=>{jPar.util.log.error(t,"killCaches: failed")}))},lieFi:{init:function(){this.handleCachedPageTracking(),this.checkDomForCachedHtml(),document.querySelector("#lieFiNotification a").removeEventListener("click",this.handleReloadClick),document.querySelector("#lieFiNotification a").addEventListener("click",this.handleReloadClick)},isOnCachedPage:function(){return null!==document.querySelector('html[data-origin="cacheStorage"]')||null!==document.querySelector('html[data-origin="cacheStorageAjax"]')},checkDomForCachedHtml:function(){null!==document.querySelector("html[data-origin=cacheStorage]")&&jPar.util.pwa.lieFi.gotCachedPage()},handleCachedPageTracking:function(){if(void 0!==document.querySelector("#domPageVars").dataset.userId&&void 0!==jPar.app){const t=jPar.app.appState.get("localStorage","pwa","dayOfSwData"),e=jPar.app.appState.get("localStorage","pwa","slowPageFromCacheCount"),o=jPar.app.appState.get("localStorage","pwa","offlinePageFromCacheCount");null!==t&&!0===navigator.onLine&&parseInt(t)!==(new Date).getDate()&&(null!==e&&(jPar.util.log.ux(e,"pwa:slowPageFromCacheCount delivered last Session for this User"),jPar.app.appState.remove("localStorage","pwa","slowPageFromCacheCount")),null!==o&&(jPar.util.log.ux(o,"pwa:offlinePageFromCacheCount delivered last Session for this User"),jPar.app.appState.remove("localStorage","pwa","offlinePageFromCacheCount")),jPar.app.appState.remove("localStorage","pwa","dayOfSwData"))}},gotCachedPage:function(){const t=this;!0===navigator.onLine?(document.querySelector("#lieFiNotification")?.classList.remove("noDisplay"),document.querySelector("#offlineError")?.classList.add("noDisplay")):(document.querySelector("#lieFiNotification")?.classList.add("noDisplay"),document.querySelector("#offlineError")?.classList.remove("noDisplay")),this.setCachedPageCount(),document.removeEventListener("scroll",this.handlePageInteraction,{once:!0}),document.addEventListener("scroll",this.handlePageInteraction,{once:!0}),window.setTimeout((()=>{t.handlePageInteraction()}),15e3)},gotNetworkPage:function(){null!==document.querySelector("#lieFiNotification")&&(document.querySelector("#lieFiNotification").classList.add("noDisplay"),document.querySelector("#offlineError").classList.add("noDisplay"),document.querySelector("html").removeAttribute("data-origin"))},handlePageInteraction:function(){document.querySelector("#lieFiNotification")?.classList.add("noDisplay"),document.removeEventListener("scroll",this.handlePageInteraction,{once:!0})},handleReloadClick:function(t){t.preventDefault(),document.location.reload()},setCachedPageCount:function(){if(void 0!==jPar.app){if(void 0!==document.querySelector("#domPageVars").dataset.userId){const t=null!==document.querySelector("peg-app-shell")&&null!==document.querySelector('html[data-origin="cacheStorageAjax"]'),e=null!==document.querySelector("peg-app-shell")&&null!==document.querySelector('html[data-origin="cacheStorage"]');if(t||e){if(null===jPar.app.appState.get("localStorage","pwa","dayOfSwData")&&jPar.app.appState.set("localStorage","pwa","dayOfSwData",(new Date).getDate()),!1===navigator.onLine){let t=jPar.app.appState.get("localStorage","pwa","offlinePageFromCacheCount");null===t&&(t=0);const e=parseInt(t)+1;jPar.app.appState.set("localStorage","pwa","offlinePageFromCacheCount",e)}else{let t=jPar.app.appState.get("localStorage","pwa","slowPageFromCacheCount");null===t&&(t=0);const e=parseInt(t)+1;jPar.app.appState.set("localStorage","pwa","slowPageFromCacheCount",e)}}}}}},offline:{init:function(){const t=void 0!==document.querySelector("#domPageVars").dataset.userId,e=null===document.querySelector("peg-registration-featured-profile")&&null===document.querySelector("#partnerCompatibilityPage"),o=void 0!==navigator.serviceWorker&&null!==navigator.serviceWorker.controller;t&&o&&e&&navigator.serviceWorker.controller.postMessage("prepareDefaultCache"),this.checkOnlineState(),document.querySelector("#offlineError").addEventListener("animationend",(()=>{document.querySelector("#offlineError").classList.remove("attention")}))},forceClearAllCaches:function(){navigator.serviceWorker.controller?navigator.serviceWorker.controller.postMessage({command:"clearAllCaches",message:"true"}):console.log("No ServiceWorker")},checkOnlineState:function(){window.removeEventListener("offline",this.handleOfflineMode.bind(this)),window.addEventListener("offline",this.handleOfflineMode.bind(this)),window.removeEventListener("online",this.handleInlineMode),window.addEventListener("online",this.handleInlineMode)},handleOfflineMode:function(){const t=this;document.querySelector("html").classList.add("is-offline"),document.querySelector("#offlineError").classList.remove("noDisplay"),$j(".js-onlineOnly").on("click.onlineOnly",(function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),t.triggerOfflineAttention()}))},handleInlineMode:function(){$j("#offlineError").addClass("noDisplay"),$j("html").removeClass("is-offline"),$j(".js-onlineOnly").off("click.onlineOnly")},triggerOfflineAttention:function(){document.querySelector("#offlineError")?.classList.remove("noDisplay"),$j("#offlineError").removeClass("attention"),$j("#offlineError").css("color"),$j("#offlineError").addClass("attention")}},installOption:{installPromptEvent:void 0,installVia:"BrowserPrompt",init:function(){null!==document.querySelector('[rel="manifest"]')&&(this.tracking(),this.showInstallButton())},showInstallButton:function(){void 0!==jPar.app.installPromptEvent&&null!==document.querySelector("#burgerMenu .js-installPwa")&&(document.querySelector("#burgerMenu .js-installPwa").closest("li").classList.remove("noDisplay"),document.querySelectorAll("#burgerMenu .js-installPwa").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),this.installVia="BurgerMenu",this.handlePrompt()}))})))},handlePrompt:function(){jPar.app.installPromptEvent.prompt(),jPar.app.installPromptEvent.userChoice.then((t=>{"accepted"===t.outcome?document.querySelector(".js-installPwa")?.closest("li").classList.add("noDisplay"):jPar.util.log.ux("installVia: "+this.installVia,"pwa:appInstallRejected")}))},tracking:function(){if(window.location.search.indexOf("platform=pwa")>-1){jPar.util.log.ux("pwa:appOpenend","pwa:appOpenend");const t=jPar.app.util.getUrlWithRemovedParam(document.location.href,"platform");history.replaceState(null,null,t)}window.addEventListener("appinstalled",(()=>{jPar.util.log.ux("installVia: "+this.installVia,"pwa:appInstalled")}))}},checkStandalone:function(){const t=window.matchMedia("(display-mode: standalone)").matches,e=!0===window.navigator.standalone;(t||e)&&$j("html").addClass("is-inPWA")}}}),jPar.util=jPar.util||{},deepMerge(!0,jPar.util,{log:{error:function(t,e){try{console.trace("%c----CAUGHT ERROR: "+t+" -> "+e.toString()+" ----","color: red; font-size: 14px;");const o=new CustomEvent("pegLogger-logJsError",{detail:{message:t,stacktrace:e.toString(),origin:"Caught_JSError"}});document.dispatchEvent(o)}catch(t){console.error("call of jPar.util.log.error() failed")}},ux:function(t,e){console.log("%c----UX: "+t+" -> "+e.toString()+" ----","color: blue; font-size: 14px;");const o=new CustomEvent("pegLogger-logJsError",{detail:{message:t,stacktrace:e.toString(),origin:"UXLogging"}});document.dispatchEvent(o)},bigData:function(t){window.requestIdleCallback((()=>{const e=new CustomEvent("pegLogger-logWebAppEvents",{detail:t});document.dispatchEvent(e)}),{timeout:100})},devConsole:function(t){if($j("#domPageVars").length>0){(void 0!==$j("#domPageVars").data("isDevSystem")||document.location.href.indexOf(".dev")>-1)&&console.log(t)}}}}),jPar.util=jPar.util||{},deepMerge(!0,jPar.util,{network:{hasValidSessionAndCsrfToken:function(t){return void 0!==t&&t.hasOwnProperty("status")?403!==t.status:"string"!=typeof t||-1===t.indexOf("<html")&&-1===t.indexOf("<body")&&-1===t.indexOf("loginForm")},reloadIfResponseInvalid:function(t){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&!1!==this.hasValidSessionAndCsrfToken(t))return!0;null===document.querySelector("#errorModalboxSessionExpired.is-open")&&(jPar.wdk.modalbox.show({modalboxId:"#errorModalboxSessionExpired"}),window.setTimeout((function(){const t=document.URL,e=t.lastIndexOf("#"),o=t.substring(0,e);location.replace(o)}),500))},reloadForSessionExpired:function(){this.reloadIfResponseInvalid(null,!0)},defaultErrorHandling:function(t){if("technicalError"!==t.type)throw t;"browserTimeout"===t.message?jPar.wdk.toast.show("#timeoutNotification"):"sessionExpired"===t.message?jPar.util.network.reloadForSessionExpired():"offline"===t.message?jPar.util.pwa.offline.triggerOfflineAttention():jPar.wdk.modalbox.show({modalboxId:"errorModalbox500"})},setGlobalAjaxTimeout:function(){$j.ajaxSetup({timeout:"15000"})}}}),jPar.util=jPar.util||{},deepMerge(!0,jPar.util,{validate:{checkboxIsChecked:function(t){if(null!==t){if(t instanceof jQuery)return!0===t.prop("checked");if(!(t.length>1))return!!t.checked;t.forEach((t=>!!t.checked))}},selectBoxHasValue:function(t,e){return t instanceof jQuery?$j.trim(t.val())===e:t instanceof HTMLElement?t.value.trim()===e:void 0},toggleIsChecked:function(t){return t instanceof jQuery?t.filter(":checked").length>0:t instanceof HTMLElement?!0===t.checked:void 0},textfieldIsEmpty:function(t){let e="";if(null!==t){if(t instanceof jQuery)return""===$j.trim(t.val());if(!(t.length>1))return e=t.value.trim(),""===e;t.forEach((t=>(e=t.value.trim(),""===e)))}},hasMinimumWordsFilled:function(t,e){const o=new RegExp("([^ ]+ +){"+(e-1)+",}[^ ]+","g"),n=$j.trim(t.value);return o.test(n)},isNumber:function(t){const e=t.val().trim().replace(/ /g,"");return $j.isNumeric(e)},isEmailAddress:function(t){if(null!==t){const e=/^(([^<>()[\]\\.,;:\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,}))$/;if(t instanceof jQuery)return!0===e.test(t.val());if(t instanceof HTMLElement)return!0===e.test(t.value)}},isNotTabOrShiftKey:function(t){return 9!==t&&16!==t},isMouseclickEnterOrSpaceKey:function(t){return void 0===t||13===t||32===t}}}),jPar.util=jPar.util||{},deepMerge(!0,jPar.util,{timezone:{setTimezone:function(){const t=this,e=null===jPar.app.appState.get("sessionStorage","webapp","hasFreshTimezoneForSession"),o=null===jPar.util.getCookie("timezone");if(e||o)try{const e=t.getTimezoneForModernBrowsers();t.writeTimezoneToCookie(e)}catch(t){}},getTimezoneForModernBrowsers:function(){if("string"!=typeof Intl.DateTimeFormat().resolvedOptions().timeZone)throw new Error("Timezone could not be resolved by Intl.DateTimeFormat");return Intl.DateTimeFormat().resolvedOptions().timeZone},writeTimezoneToCookie:function(t){jPar.util.setCookie("timezone",t),jPar.app.appState.set("sessionStorage","webapp","hasFreshTimezoneForSession",!0)}}}),void 0===customElements.get("peg-footer")&&customElements.define("peg-footer",class extends HTMLElement{async connectedCallback(){await jPar.util.waitForChildNodes()}disconnectedCallback(){}}),jPar.wdk=jPar.wdk||{},$j.extend(!0,jPar.wdk,{security:{_charsToHTMLEntityMap:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},_htmlEntityToCharMap:{"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},escapeStringForHtml:function(t){const e=this;return String(t).replace(/[&<>"'`]/g,(function(t){return e._charsToHTMLEntityMap[t]}))},sanitizeEvilHtml:function(t){return t.indexOf("matchingWheelData")>-1?String(t).replace(/\bonerror=|\bonload=|\bonmouseover=|\bonmouseout=|\bonpagehide=|\bonpageshow=|\bonmessage=|\bonhashchange=|\bonbeforeunload=|\bonpopstate=|\bonresize=|\bonunload=|\bonkeydown=|\bonkeyup=|\bonkeypress=|\bonfocus=|\bonblur=|\bonchange=|\bonsubmit=|\bonreset=|\bonselect=|\bondblclick=|\bondrag=|\bondragend=|\bondragenter=|\bondragleave=|\bondragover=|\bondragstart=|\bondrop=|\bonwheel=|\boncopy=|\boncut=|\bonpaste=|\bonanimationend=|\bonanimationiteration=|\bonanimationstart=|\bontransitionend=|\bontouchcancel=|\bontouchend=|\bontouchmove=|\bontouchstart=|\bonclick=/gi,""):String(t).replace(/<script\b|\bonerror=|\bonload=|\bonmouseover=|\bonmouseout=|\bonpagehide=|\bonpageshow=|\bonmessage=|\bonhashchange=|\bonbeforeunload=|\bonpopstate=|\bonresize=|\bonunload=|\bonkeydown=|\bonkeyup=|\bonkeypress=|\bonfocus=|\bonblur=|\bonchange=|\bonsubmit=|\bonreset=|\bonselect=|\bondblclick=|\bondrag=|\bondragend=|\bondragenter=|\bondragleave=|\bondragover=|\bondragstart=|\bondrop=|\bonwheel=|\boncopy=|\boncut=|\bonpaste=|\bonanimationend=|\bonanimationiteration=|\bonanimationstart=|\bontransitionend=|\bontouchcancel=|\bontouchend=|\bontouchmove=|\bontouchstart=|\bonclick=/gi,"")},htmlEntitiesToChars:function(t){const e=this;return String(t).replace(/&[^;]+;/g,(function(t){return""!==e._htmlEntityToCharMap[t]?e._htmlEntityToCharMap[t]:t}))},csrf:{getToken:function(){let t="";return null!==document.querySelector('meta[name="_csrf"]')&&(t=document.querySelector('meta[name="_csrf"]').getAttribute("content")),t},updateToken:function(t){document.querySelector('meta[name="_csrf"]')?.setAttribute("content",t),this.setValidstate(!0)},hasValidToken:function(){return!1===document.querySelector("meta[name=_csrf]")?.hasAttribute("data-invalid")},setValidstate:function(t){!0===t?document.querySelector("meta[name=_csrf]")?.removeAttribute("data-invalid"):document.querySelector("meta[name=_csrf]").dataset.invalid=!0}}}}),jPar.wdk=jPar.wdk||{},$j.extend(!0,jPar.wdk,{brands:{forBrands:function(t){if($j("#domPageVars").length>0)return t.some((function(t){return $j("#domPageVars").data("brandId")===t}));window.setTimeout((function(){return t.some((function(t){return $j("#domPageVars").data("brandId")===t}))}),1e3)}}}),jPar.wdk=jPar.wdk||{},$j.extend(!0,jPar.wdk,{screensize:{getCurrentScreenSize:function(){const t=this.getInnerWidth();let e;return t>=0&&t<481?e="S":t>=481&&t<768?e="M":t>=768&&t<980?e="L":t>=980&&(e="XL"),e},isBreakpoint:function(t){return t.indexOf(jPar.wdk.screensize.getCurrentScreenSize())>-1},getInnerWidth:function(t){return null===document.querySelector("peg-app-shell")||t?window.innerWidth:document.querySelector("peg-app-shell").getCachedWindowWidth()},setScreenSizeCookie:function(){try{window.requestIdleCallback((()=>{const t=this.getCurrentScreenSize();setCookie("currentScreenSize",t),$j("#specialOfferScreensize").length>0&&$j("#specialOfferScreensize").val(t)}))}catch(t){jPar.util.log.error("failed to set screensize-cookie on page "+$j("body").attr("id")+" - "+t,"jPar.wdk.screensize.setScreenSizeCookie()")}}}}),jPar.wdk=jPar.wdk||{},$j.extend(!0,jPar.wdk,{modalbox:{conf:{},show:function(t){const e=this;jPar.wdk.modalbox.hide(!0),this.modalboxAbortController=new AbortController,this.setConfig(t),this.conf.isAjaxModalbox?e.loadAjax():e.loadInline(),document.dispatchEvent(new CustomEvent("wdkModalBox:shown"))},setConfig:function(t){this.conf={$currentModalbox:null,jqxhr:null,isAjaxModalbox:!1,url:null,ajaxSettings:null,closeOnBgClick:!1,closeOnEsc:!1,originalPageScrollPosition:null,previousActiveElement:null,onSuccess:null,onFail:null,onAlways:null,onBeforeClose:null};let e=$j(t.modalboxId);-1===t.modalboxId.indexOf("#")&&(e=$j("#"+t.modalboxId));const o=e;if(!(o.length>0))throw jPar.wdk.modalbox.show({modalboxId:"errorModalbox500"}),new Error("wdkmodalbox: Modalbox ID not found on Page "+t.modalboxId);if(this.conf.$currentModalbox=o,void 0!==o.data("url")){this.conf.isAjaxModalbox=!0,this.conf.url=o.data("url");void 0!==t.ajaxSettings&&(this.conf.ajaxSettings=t.ajaxSettings);void 0!==t.onFail&&(this.conf.onFail=t.onFail);void 0!==t.onAlways&&(this.conf.onAlways=t.onAlways)}void 0!==o.data("closeOnBgClick")&&(this.conf.closeOnBgClick=o.data("closeOnBgClick"));void 0!==o.data("closeOnEsc")&&(this.conf.closeOnEsc=o.data("closeOnEsc")),this.conf.originalPageScrollPosition=$j(document).scrollTop(),this.conf.previousActiveElement=document.activeElement;void 0!==t.onSuccess&&(this.conf.onSuccess=t.onSuccess);void 0!==t.onBeforeClose&&(this.conf.onBeforeClose=t.onBeforeClose)},loadAjax:function(){const t=this,e=this.conf.$currentModalbox;let o="";null!==t.conf.ajaxSettings&&(o=t.conf.ajaxSettings),this.conf.jqxhr=$j.ajax(t.conf.url,o).done((function(o){t.handleSessionExpired(o),e.html(o),t.setCloseEvents(),t.handleSpecialDataConfigs(),t.makeVisible(),null!==t.conf.onSuccess&&t.conf.onSuccess()})).fail((function(o,n,r){"function"==typeof t.conf.onFail&&t.conf.onFail(o,n,r),t.handleNetworkErrors(o,n,r,e)})).always((function(){"function"==typeof t.conf.onAlways&&t.conf.onAlways()}))},loadInline:function(){this.setCloseEvents(),this.makeVisible(),null!==this.conf.onSuccess&&this.conf.onSuccess()},handleSpecialDataConfigs:function(){this.conf.$currentModalbox.find("[data-set-small-content-class=true]").length>0&&this.conf.$currentModalbox.addClass("has-smallContent"),this.conf.$currentModalbox.find("[data-set-full-bg-image-class=true]").length>0&&this.conf.$currentModalbox.addClass("has-fullBgImage")},makeVisible:function(){let t;this.conf.$currentModalbox[0].classList.remove("noDisplay"),this.moveModalboxDomToBottom(),$j("html").addClass("has-modalboxOpen"),this.conf.$currentModalbox.hasClass("wdk-modalbox")?t=this.conf.$currentModalbox:this.conf.$currentModalbox.find(".wdk-modalbox").length>0&&(t=this.conf.$currentModalbox.find(".wdk-modalbox")),t.find("textarea").length>0&&t.addClass("has-textarea"),t.css("color"),t.addClass("is-open transition-in"),this.setA11yForOpenModal(),this.setInitialFocus(),this.hideCloseButtonInApps(),document.dispatchEvent(new CustomEvent("wdk:modalbox:isOpened",{detail:{$modalboxObj:t}}))},setA11yForOpenModal:function(){this.conf.$currentModalbox.attr("aria-hidden","false"),$j("#pageWrapper").attr("aria-hidden","true");Array.prototype.slice.call(document.body.children).forEach((t=>{null!==t.getAttribute("inert")&&t.setAttribute("data-inert-before",!0);const e=t!==this.conf.$currentModalbox[0],o="backstageOpenerRwd"!==t.getAttribute("id");e&&o?t.setAttribute("inert",!0):t.removeAttribute("inert")}))},setA11yForClosedModal:function(){this.conf.$currentModalbox.attr("aria-hidden","true"),$j("#pageWrapper").removeAttr("aria-hidden");Array.prototype.slice.call(document.body.children).forEach((t=>{null!==t.getAttribute("data-inert-before")?(t.setAttribute("inert",!0),t.removeAttribute("data-inert-before")):t.removeAttribute("inert")}))},setInitialFocus:function(){const t=this;let e=null;const o=0===this.conf.$currentModalbox.find(".js-focusField").length,n=0===this.conf.$currentModalbox.filter("[aria-labelledby]").length;o&&(this.conf.$currentModalbox.find("header h3").length>0&&""!==this.conf.$currentModalbox.find("header h3").text().trim()?e="header h3":this.conf.$currentModalbox.find("h3").length>0&&""!==this.conf.$currentModalbox.find("h3").text().trim()?e="h3":this.conf.$currentModalbox.find("header").length>0&&""!==this.conf.$currentModalbox.find("header").text().trim()?e="header":this.conf.$currentModalbox.find("article").length>0&&(e="article"),n&&null!==e?this.conf.$currentModalbox.one("transitionend",(function(){t.conf.$currentModalbox.find(e).attr("tabindex","0").trigger("focus")})):this.conf.$currentModalbox.one("transitionend",(function(){jPar.util.setFocusOnFirstFocusableElement(t.conf.$currentModalbox.find("article *"))})))},setPreviousFocus:function(){const t=this;this.conf.$currentModalbox.one("transitionend",(function(){t.conf.previousActiveElement.focus()}))},hide:function(t){const e=$j(".wdk-modalbox.is-open");if(e.length>0){const o=this;if(e.find(".layerInModalbox.is-open").length>0)jPar.wdk.modalbox.layerInModalbox.hide();else{if(null===this.conf.onBeforeClose||!0===this.conf.onBeforeClose()){const e=$j(".wdk-modalbox.is-open");e.one("transitionend",(function(){$j("html").removeClass("has-modalboxOpen"),o.moveModalboxDomToOriginalPosition(),$j(".wdk-modalbox.is-open").removeClass("is-open transition-out"),o.removeEventListener(),window.setTimeout((function(){window.scrollTo(0,o.conf.originalPageScrollPosition)}),1),document.dispatchEvent(new CustomEvent("wdk:modalbox:isHidden",{detail:{$modalboxObj:e}}))})),e.removeClass("transition-in").addClass("transition-out"),this.setA11yForClosedModal(),this.setPreviousFocus(),this.showCloseButtonInApps(),(t||jPar.wdk.screensize.isBreakpoint(["S","M"]))&&e.trigger("transitionend"),o.modalboxAbortController.abort()}}}},closeCurrentModalbox:function(){$j(".wdk-modalbox.is-open").length>0&&jPar.wdk.modalbox.hide(!0)},moveModalboxDomToBottom:function(){$j('<div class="modalboxPlaceholder"></div>').insertBefore(this.conf.$currentModalbox),this.conf.$currentModalbox.detach().appendTo("body")},moveModalboxDomToOriginalPosition:function(){this.conf.isAjaxModalbox?($j(".wdk-modalbox.is-open").empty(),$j(".wdk-modalbox.is-open").remove().insertAfter(".modalboxPlaceholder")):$j(".wdk-modalbox.is-open").insertAfter(".modalboxPlaceholder"),$j(".modalboxPlaceholder").remove()},removeEventListener:function(){$j(document).off(".modalboxEvent"),$j(document).off("touchmove"),$j("body").off("touchstart",".scrollable"),$j("body").off("touchmove",".scrollable")},setCloseEvents:function(){document.addEventListener("click",(t=>{const e="#"+this.conf.$currentModalbox.attr("id")+" .js-closeModalbox";Array.from(document.querySelectorAll(e)).includes(t.target)&&(t.preventDefault(),this.hide())}),{signal:this.modalboxAbortController.signal}),this.conf.$currentModalbox[0].querySelector(".js-reloadPage")?.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),document.location.reload()}),{signal:this.modalboxAbortController.signal}),!0===this.conf.closeOnBgClick&&document.addEventListener("mousedown",(t=>{t.target.matches(".wdk-modalbox .modalboxContent")||t.target.closest(".wdk-modalbox .modalboxContent")||this.hide()}),{signal:this.modalboxAbortController.signal}),!0===this.conf.closeOnEsc&&document.addEventListener("keyup",(t=>{"Escape"===t.key&&this.hide()}),{signal:this.modalboxAbortController.signal})},showCloseButtonInApps:function(){if(!1===this.conf.$currentModalbox.hasClass("has-smallContent")){void 0!==window.webkit?.messageHandlers?.showCloseButton&&window.webkit.messageHandlers.showCloseButton.postMessage(!0);void 0!==window.Android?.showCloseButton&&Android.showCloseButton()}},hideCloseButtonInApps:function(){if(!1===this.conf.$currentModalbox.hasClass("has-smallContent")){void 0!==window.webkit?.messageHandlers?.hideCloseButton&&window.webkit.messageHandlers.hideCloseButton.postMessage(!0);void 0!==window.Android?.hideCloseButton&&Android.hideCloseButton()}},handleNetworkErrors:function(t,e,o,n){this.conf.jqxhr.fail((function(){"timeout"===e?jPar.wdk.toast.show("#timeoutNotification"):(jPar.wdk.modalbox.show({modalboxId:"errorModalbox500"}),0!==t.status&&jPar.util.log.error(n.attr("id")+" on Page "+$j("body").attr("id")+" reported "+t.status+" - "+o,"Error opening wdkmodalbox"))}))},handleSessionExpired:function(t){if(!1===jPar.util.network.hasValidSessionAndCsrfToken(t))throw jPar.util.network.reloadIfResponseInvalid(t),new Error("wdkmodalbox: Session expired")},layerInModalbox:{previousActiveElementInModal:null,show:function(t){const e=this,o=document.querySelector(".wdk-modalbox.is-open "+t);null!==o&&(this.previousActiveElementInModal=document.activeElement,o.classList.add("is-open"),o.querySelector("header h3")?.focus(),$j(".wdk-modalbox.is-open .js-closeLayerInLayer").on("click",(function(t){t.preventDefault(),e.hide()})))},hide:function(){const t=document.querySelector(".wdk-modalbox.is-open .layerInModalbox.is-open");null!==t&&(t.classList.remove("is-open"),this.previousActiveElementInModal.focus(),$j(".wdk-modalbox.is-open .js-closeLayerInLayer").off("click"))}}}}),jPar.wdk=jPar.wdk||{},$j.extend(!0,jPar.wdk,{hintbox:{addClassNoDisplay:function(t){t.addClass("noDisplay"),t.removeAttr("role"),t.attr("aria-hidden","true"),t.attr("inert","true")},removeClassNoDisplay:function(t){t.removeClass("noDisplay"),t.attr("role","alert"),t.attr("aria-hidden","false"),t.removeAttr("inert")},addClassIsVisible:function(t){t.addClass("is-visible"),t.attr("role","alert"),t.attr("aria-hidden","false"),t.removeAttr("inert")},removeClassIsVisible:function(t){t.removeClass("is-visible"),t.removeAttr("role"),t.attr("aria-hidden","true"),t.attr("inert","true")}}}),void 0===customElements.get("wdk-hintbox-error")&&customElements.define("wdk-hintbox-error",class extends HTMLElement{static get observedAttributes(){return["show"]}async connectedCallback(){this.currentComponent=this,this.setAttribute("inert","true");const t=document.createElement("template"),e=`<style>\n\t\t\t\t\t:host {\n\t\t\t\t\t\t--maxHeight: 210px;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tflex-shrink: 0;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tcolor: var(--COLOR_supportLight_100);\n\t\t\t\t\t\tfont: var(--FONT_default_75);\n\t\t\t\t\t\tborder-radius: var(--borderRadius_75);\n\t\t\t\t\t\theight: auto;\n\t\t\t\t\t\ttext-align: left;\n\t\t\t\t\t\tmax-height: var(--maxHeight);\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t:host([skin="error"]) {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\tmax-height: 0;\n\t\t\t\t\t\tbackground-color: var(--COLOR_alertError_200);\n\t\t\t\t\t\tcolor: var(--COLOR_alertError_100);\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransition: max-height .3s linear, opacity .2s linear;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t:host([skin="error"]) a {\n\t\t\t\t\t\tcolor: var(--COLOR_alertError_100);\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t:host([skin="error"][show]) {\n\t\t\t\t\t\tmargin-top: 8px;\n\t\t\t\t\t\tmax-height: var(--maxHeight);\n\t\t\t\t\t\tpadding: 8px;\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t:host([skin="inFormElement"]) {\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\theight: 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t:host([skin="inFormElement"][show]) {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\tmax-height: 0;\n\t\t\t\t\t\theight: auto;\n\t\t\t\t\t\tpadding: 8px;\n\t\t\t\t\t\tcolor: var(--COLOR_alertError_100);\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransition: max-height .3s linear, opacity .2s linear;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t:host([skin="inFormElement"]) a {\n\t\t\t\t\t\tcolor: var(--COLOR_alertError_100);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t:host([skin="inFormElement"][show]) {\n\t\t\t\t\t\tmax-height: var(--maxHeight);\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t::slotted([slot="icon"].wdk-icon) {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tleft: 8px;\n\t\t\t\t\t\ttop: 50%;\n\t\t\t\t\t\tmargin-top: -16px;\n\t\t\t\t\t\tpadding-right: 8px;\n\t\t\t\t\t\twidth: 32px !important;\n\t\t\t\t\t\theight: 32px !important;\n\t\t\t\t\t\tfill: var(--COLOR_alertError_100) !important;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t:host slot {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tpadding-left: 39px;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t:host slot.is-empty {\n\t\t\t\t\t\tpadding-left: 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t:host .visuallyHidden {\n\t\t\t\t\t\tposition: absolute !important;\n\t\t\t\t\t\tleft: -10000px;\n\t\t\t\t\t\ttop: auto;\n\t\t\t\t\t\twidth: 1px;\n\t\t\t\t\t\theight: 1px;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tclip: rect(0 0 0 0);\n\t\t\t\t\t\tclip-path: inset(50%);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t:host button {\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\tbackground: transparent;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\talign-self: flex-start;\n    \t\t\t\t\tmargin: 0;\n    \t\t\t\t\tpadding: 0;\n    \t\t\t\t\twidth: 18px;\n    \t\t\t\t\theight: 18px;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t:host button:focus-visible {\n\t\t\t\t\t\toutline: 2px dashed currentColor;\n\t\t\t\t\t\toutline-offset: 10px;\n\t\t\t\t\t}\n\n\t\t\t\t\t:host button:after {\n\t\t\t\t\t\tcontent: "";\n    \t\t\t\t\tposition: absolute;\n    \t\t\t\t\ttop: 50%;\n    \t\t\t\t\tleft: 50%;\n    \t\t\t\t\ttransform: translate(-50%, -50%);\n    \t\t\t\t\theight: 48px;\n    \t\t\t\t\twidth: 48px;\n\t\t\t\t\t}\n\n\t\t\t\t\t:host button:hover {\n\t\t\t\t\t\topacity: .7;\n\t\t\t\t\t}\n\n\t\t\t\t\t:host button svg {\n\t\t\t\t\t\twidth: 16px;\n\t\t\t\t\t\theight: 16px;\n\t\t\t\t\t\tfill: var(--COLOR_supportDark_200);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t#a11yWrapper {\n\t\t\t\t\t\tflex-grow: 1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t.wdkA11yRepeat {\n\t\t\t\t\t\tposition:absolute;\n\t\t\t\t\t\tleft:-9999px;\n\t\t\t\t\t\twidth: 1px;\n\t\t\t\t\t\theight: 1px;\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t\t<slot name="icon"></slot>\n\t\t\t\t<div id="a11yWrapper" aria-live="polite" aria-atomic="true"></div>\n\t\t\t\t${this.#t()}\n\t\t\t`;t.innerHTML=jPar.wdk.security.sanitizeEvilHtml(e);const o=document.importNode(t.content,!0);this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(o)),this.fillA11yWrapper(),this.handleEmptyIcon(),this.shadowRoot.querySelector(".js-close")?.addEventListener("click",(()=>{this.hide()}))}attributeChangedCallback(t){"show"===t&&this.fillA11yWrapper()}#t(){return null!==this.getAttribute("closable")?'<button part="base" class="js-close" type="button" role="button" aria-disabled="false" aria-label="Close" tabindex="0">\n        \t\t\t<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24">\n\t\t\t\t\t\t<path id="icon_x-a" fill-rule="evenodd" clip-rule="evenodd" d="M19.7044 18.2864C19.8936 18.4741 20 18.7295 20 18.996C20 19.2624 19.8936 19.5179 19.7044 19.7055C19.5168 19.8947 19.2614 20.0011 18.9949 20.0011C18.7285 20.0011 18.4731 19.8947 18.2854 19.7055L12 13.4194L5.71456 19.7055C5.52692 19.8947 5.27151 20.0011 5.00507 20.0011C4.73863 20.0011 4.48321 19.8947 4.29558 19.7055C4.10641 19.5179 4 19.2624 4 18.996C4 18.7295 4.10641 18.4741 4.29558 18.2864L10.581 12.0003L4.29558 5.71418C3.90375 5.3223 3.90375 4.68693 4.29558 4.29505C4.68742 3.90317 5.32272 3.90317 5.71456 4.29505L12 10.5812L18.2854 4.29505C18.6773 3.90317 19.3126 3.90317 19.7044 4.29505C20.0963 4.68693 20.0963 5.3223 19.7044 5.71418L13.419 12.0003L19.7044 18.2864Z"/>\n\t\t\t\t\t</svg>\n      \t\t\t</button>\n\t\t\t\t':""}fillA11yWrapper(){const t=document.importNode(this.querySelector("template").content,!0);null!==this.shadowRoot&&(this.shadowRoot.querySelector("#a11yWrapper").innerHTML="",this.shadowRoot.querySelector("#a11yWrapper").appendChild(t),this.handleReloadLink(),this.triggerA11yRepeat(),this.handleShow())}handleEmptyIcon(){0===this.shadowRoot.querySelector("slot").assignedElements().length?this.shadowRoot.querySelector("slot").classList.add("is-empty"):this.shadowRoot.querySelector("slot").classList.remove("is-empty")}show(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setAttribute("show","true"),t&&window.setTimeout((()=>{this.scrollIntoView({behavior:"smooth",block:"end"})}),300)}handleShow(){this.hasAttribute("show")&&(this.removeAttribute("inert"),this.dispatchEvent(new CustomEvent("wdk-hintbox-error",{bubbles:!0,detail:{state:"shown",element:this}})))}hide(){this.removeAttribute("show"),this.setAttribute("inert","true"),this.dispatchEvent(new CustomEvent("wdk-hintbox-error",{bubbles:!0,detail:{state:"hidden",element:this}}))}isVisible(){return"true"===this.getAttribute("show")}triggerA11yRepeat(){window.setTimeout((()=>{this.shadowRoot.querySelector(".wdkA11yRepeat")?.remove();const t=document.createElement("div");t.classList.add("wdkA11yRepeat"),t.innerText="!",this.shadowRoot.querySelector("#a11yWrapper").appendChild(t)}),200)}handleReloadLink(){this.shadowRoot.querySelectorAll(".js-reloadPage").forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),document.location.reload()}))}))}}),jPar.wdk=jPar.wdk||{},$j.extend(!0,jPar.wdk,{forms:{props:{selector:""},init:function(t){this.textElement.init(t)},showError:function(t){if(t instanceof jQuery){t.addClass("is-visible"),t.attr("role","alert"),t.attr("aria-hidden","false"),t.removeAttr("inert");const e=t.parents(".wdk-form-text, .wdk-form-toggles, .wdk-form-dropdown, .wdk-form-customDropdown");e.length>0&&(e.addClass("has-error"),e.find("input,textarea").attr("aria-invalid","true"),e.find("input,textarea").attr("aria-describedby",t.attr("id")))}else if(null!==t&&void 0!==t.classList){t.classList.add("is-visible"),t.setAttribute("role","alert"),t.setAttribute("aria-hidden","false"),t.removeAttribute("inert");const e=t.closest(".wdk-form-text, .wdk-form-toggles, .wdk-form-dropdown, .wdk-form-customDropdown");null!==e&&(e.classList.add("has-error"),e.querySelector("input,textarea,select").setAttribute("aria-invalid","true"),e.querySelector("input,textarea,select").setAttribute("aria-describedby",t.getAttribute("id")))}},hideError:function(t){if(t instanceof jQuery){t.removeClass("is-visible"),t.removeAttr("role"),t.attr("aria-hidden","true"),t.attr("inert","true");const e=t.parents(".wdk-form-text, .wdk-form-toggles, .wdk-form-dropdown, .wdk-form-customDropdown");0===e.find(".error.is-visible").length&&(e.removeClass("has-error"),e.find("input,textarea").removeAttr("aria-invalid","false"),e.find("input,textarea").removeAttr("aria-describedby"))}else if(null!==t&&void 0!==t.classList){t.classList.remove("is-visible"),t.removeAttribute("role"),t.setAttribute("aria-hidden","true"),t.setAttribute("inert","true");const e=t.closest(".wdk-form-text, .wdk-form-toggles, .wdk-form-dropdown, .wdk-form-customDropdown");if(null!==e&&null===e.querySelector(".error.is-visible")){e.classList.remove("has-error");e.querySelectorAll("input,textarea,select").forEach((t=>{t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby")}))}}},hasVisibleErrors:function(t){if(t instanceof jQuery)return t.find('.wdk-styledHintBox[class*=" t-error"].is-visible').length>0;if(null!==t&&void 0!==t.classList){const e=null!==t.querySelector("wdk-hintbox-error[show]"),o=t.querySelectorAll('.wdk-styledHintBox[class*=" t-error"].is-visible').length>0;return e||o}},textElement:{defaultSelector:".wdk-form-text",selector:"",init:function(t){this.setSelectorProperty(t),this.initCharCounter()},setSelectorProperty:function(t){this.selector=void 0!==t?t+" "+this.defaultSelector:this.defaultSelector},initCharCounter:function(){const t=this,e=$j(this.selector).find("textarea, input");e.on("keyup blur change paste cut",(function(){const e=$j(this);window.setTimeout((function(){t.updateCounter(e)}),10)})),e.each((function(){t.updateCounter($j(this))}))},updateCounter:function(t){if(void 0!==t.attr("maxlength")){const e=t.attr("maxlength"),o=e/100*80,n=t.val().length,r=t.parents(this.selector),i=r.find(".limitReachedInfo");r.find(".charCounter span").text(n),n>=o?r.addClass("is-nearLimit"):r.removeClass("is-nearLimit"),n>=e?(r.addClass("is-limitReached"),i.length>0&&i.text(i.data("alertText"))):(r.removeClass("is-limitReached"),i.text(""))}}},customDropdown:{callback:null,isAnimating:!1,init:function(t,e){const o=this;this.callback=e,$j(t).length>0&&($j(t).find(".wdk-form-customDropdown a").off("click keydown").on("click keydown",(function(t){if(jPar.util.validate.isMouseclickEnterOrSpaceKey(t.keyCode)){if(!0===o.isAnimating)return;o.isAnimating=!0,t.preventDefault(),o.toggle(t),setTimeout((function(){o.isAnimating=!1}),280)}})),$j(t).find(".wdk-form-customDropdown li").off("click keydown").on("click keydown",(function(t){jPar.util.validate.isMouseclickEnterOrSpaceKey(t.keyCode)&&(t.preventDefault(),o.selectCurrentElement(t))})))},toggle:function(t){const e=$j(t.target).parents(".wdk-form-customDropdown"),o=e.find(".selection");e.hasClass("is-open")?e.removeClass("is-open"):e.addClass("is-open"),o.slideToggle("fast")},selectCurrentElement:function(t){const e=$j(t.target);e.parents(".wdk-form-customDropdown").find(".selection").find("li").removeClass("selectedListItem"),e.addClass("selectedListItem"),e.parents(".wdk-form-customDropdown").find("a").html(e.html()),this.toggle(t),"function"==typeof this.callback&&(e.parents(".wdk-form-customDropdown").find('input[name="selectedItem"]').val(e.data("value")),this.callback(t))}},autofillDropdown:{callback:null,initList:function(t,e){const o=this;this.callback=e,$j(t).length>0&&$j(t).find(".autofillDropdownDatalist li:not(.noResult)").off("click").on("click",(function(t){t.preventDefault(),o.selectCurrentElement(t)}))},initTextfield:function(t,e){const o=this;let n=1;this.callback=e,this.preventEnterToSubmitForm(t),$j(t).find(".js-autofillDropdownTextfield").on("click",(function(t){"function"==typeof o.callback&&e($j(t.target))})),$j(t).find(".js-autofillDropdownTextfield").on("keyup",(function(r){r.preventDefault();const i=38===r.keyCode,a=40===r.keyCode,s=13===r.keyCode,l=$j(t).find(".autofillDropdownDatalist .selection li.isKeyboardSelected");if(i||a){const e=$j(t).find(".autofillDropdownDatalist .selection li").length;if(e>0){n=l.index()+1;const o=a&&n<e;i&&n>1?n-=1:o&&(n+=1),l.removeClass("isKeyboardSelected"),$j(t).find(`.autofillDropdownDatalist .selection li:nth-child(${n})`).addClass("isKeyboardSelected"),$j(t).find(".js-autofillDropdownTextfield").attr("aria-activedescendant","autocompleteOption"+n),$j(t).find(".isKeyboardSelected").length&&$j(t).find(".isKeyboardSelected")[0].scrollIntoView(!0)}}else s&&1===l.length?l.trigger("click"):"function"==typeof o.callback&&e($j(r.target))}))},preventEnterToSubmitForm:function(t){$j(t).find(".js-autofillDropdownTextfield").on("keydown",(function(t){13===t.keyCode&&t.preventDefault()}))},open:function(t){const e=t.find(".selection");t.parents(".row").find(".js-autofillDropdownTextfield").attr("aria-expanded","true"),t.addClass("is-open"),e.slideDown("fast")},close:function(t){const e=t.find(".selection");t.parents(".row").find(".js-autofillDropdownTextfield").attr("aria-expanded","false"),t.removeClass("is-open"),e.slideUp("fast")},selectCurrentElement:function(t){const e=$j(t.target);this.close(e.parents(".wdk-form-autofillDropdown .autofillDropdownDatalist"));const o=e.text();e.parents(".wdk-form-autofillDropdown").find(".js-autofillDropdownTextfield").val(o),"function"==typeof this.callback&&this.callback(e)}}}}),jPar.wdk=jPar.wdk||{},$j.extend(!0,jPar.wdk,{loadingIndicator:{indicatorTimer:null,show:function(t){this.stopTimer(),null!==t&&(t.length>1?(t instanceof jQuery&&(t=t.toArray()),t.forEach((function(t){t.classList.add("disabled"),t.disabled=!0,this.indicatorTimer=window.setTimeout((function(){t.classList.add("is-loading")}),1500)}))):(t instanceof jQuery&&(t=t[0]),void 0!==t&&(t.classList.add("disabled"),t.disabled=!0,this.indicatorTimer=window.setTimeout((function(){t.classList.add("is-loading")}),1500))))},hide:function(t){this.stopTimer(),null!==t&&(t.length>1?(t instanceof jQuery&&(t=t.toArray()),t.forEach((function(t){t.classList.remove("disabled","is-loading"),t.disabled=!1}))):(t instanceof jQuery&&(t=t[0]),void 0!==t&&(t.classList.remove("disabled","is-loading"),t.disabled=!1)))},stopTimer:function(){window.clearTimeout(this.indicatorTimer)}}}),jPar.wdk=jPar.wdk||{},deepMerge(!0,jPar.wdk,{buttonWithLottie:{show:function(t){t.querySelector(".wdk-icon").classList.add("noDisplay"),t.querySelector("wdk-lottie-animation").classList.remove("noDisplay"),t.querySelector("wdk-lottie-animation").myAnimation?.play(),t.querySelector("wdk-lottie-animation").myAnimation?.addEventListener("complete",(()=>{t.querySelector(".wdk-icon").classList.remove("noDisplay"),window.setTimeout((()=>{t.querySelector("wdk-lottie-animation").classList.add("noDisplay"),t.querySelector("wdk-lottie-animation").myAnimation?.stop()}),200)}))},showIfPossible:function(t){t.classList.contains("t-lottieAnimation")&&this.show(t)}}}),jPar.wdk=jPar.wdk||{},$j.extend(!0,jPar.wdk,{toast:{conf:{defaultVisibleTime:4e3},show:function(t,e){const o=$j(t);o.addClass("is-visible"),o.attr("role","alert").attr("aria-live","assertive").attr("aria-atomic","true").removeAttr("aria-hidden"),window.setTimeout((function(){o.removeClass("is-visible"),o.removeAttr("role").removeAttr("aria-live").removeAttr("aria-atomic").attr("aria-hidden","true")}),e||this.conf.defaultVisibleTime)}}}),jPar.wdk=jPar.wdk||{},$j.extend(!0,jPar.wdk,{passwordRestrictionBox:{conf:{boxName:"",emailNoticeInputs:"",passwordInputId:""},init:function(){const t="input.checkPassword";this.conf.boxName="#wdk-passwordRestrictionBox",this.conf.emailNoticeInputs="#regFormEmail",this.conf.passwordInputId="#"+$j(t+"[type=password]:first").attr("id");const e=this;!1===$j(this.conf.boxName).data("showAlways")&&($j(t+"[type=password]").on("focus",(function(){e.showRestrictionBox()})),$j(t+"[type=password]").on("blur",(function(){e.hideRestrictionBox()}))),$j(t).on("keyup change",(function(){e.checkPasswordRestrictions()}))},showRestrictionBox:function(){this.checkPasswordRestrictions(),$j(this.conf.boxName).fadeIn(400)},hideRestrictionBox:function(){$j(this.conf.boxName).fadeOut(400)},checkPasswordRestrictions:function(){this.checkLength(),this.checkLettersAndNumbers(),$j("#partOfEmail").length&&this.checkPartOfEmail(),$j(this.conf.boxName+" ul li").length===$j(this.conf.boxName+" ul li.success").length?$j(this.conf.boxName).addClass("success"):$j(this.conf.boxName).removeClass("success")},checkLength:function(){$j(this.conf.passwordInputId).val().length>=8?this.setRestrictionToSuccess("#minCharacters"):this.setRestrictionToError("#minCharacters")},checkLettersAndNumbers:function(){const t=$j(this.conf.passwordInputId).val(),e=/.*[a-zA-Z]+.*/g.test(t),o=/.*[0-9]+.*/g.test(t),n=/.*[^a-zA-Z0-9\s]+.*/g.test(t);e&&o||e&&n?this.setRestrictionToSuccess("#lettersAndNumbers"):this.setRestrictionToError("#lettersAndNumbers")},checkPartOfEmail:function(){const t=$j(this.conf.emailNoticeInputs).val().split("@")[0],e=$j(this.conf.passwordInputId).val().length>0,o=$j(this.conf.passwordInputId).val().indexOf(t)<0;e&&(""===t||o)?this.setRestrictionToSuccess("#partOfEmail"):this.setRestrictionToError("#partOfEmail")},setRestrictionToSuccess:function(t){$j(t).removeClass("error"),$j(t).addClass("success")},setRestrictionToError:function(t){$j(t).removeClass("success"),$j(t).addClass("error")},isPasswordValid:function(){return $j(this.conf.boxName+" ul li").length===$j(this.conf.boxName+" ul li.success").length}}}),jPar.loginAndRegistration=jPar.loginAndRegistration||{},$j((function(){try{jPar.Tracking.init()}catch(t){jPar.util.log.error(t.stack,"jPar.loginAndRegistration: Init external libs failed")}"loginPage"===document.body.id&&jPar.loginAndRegistration.loginPage.init(),"verificationPage"===document.body.id&&jPar.loginAndRegistration.verificationPage.init(),"registrationPage"===document.body.id&&jPar.loginAndRegistration.registrationPage.init(),"passwordPage"===document.body.id&&jPar.loginAndRegistration.passwordPage.init(),document.querySelector("#genderSelectionPage")&&(document.body.classList.contains("isNewGenderScreenEnabled")?jPar.loginAndRegistration.genderSelectPage.init():jPar.loginAndRegistration.genderSelectPage_deprecated.init()),document.querySelector("#searchGenderSelectionPage")&&jPar.loginAndRegistration.searchGenderSelectPage.init();try{jPar.util.pwa.init(),jPar.wdk.screensize.setScreenSizeCookie(),jPar.util.timezone.setTimezone()}catch(t){jPar.util.log.error(t.stack,"jPar.loginAndRegistration: low prio failed")}})),jPar.loginAndRegistration.util=jPar.loginAndRegistration.util||{},$j.extend(!0,jPar.loginAndRegistration,{util:{showLoadingAnimation:function(){$j("#wrapperForLoadingAnimation").addClass("hidden"),$j("#loadingText").addClass("is-visible"),$j("#regFormSubmit").attr("disabled",!0)},hideLoadingAnimation:function(){$j(".directSocialSignOn").removeClass("directSocialSignOn"),$j("#wrapperForLoadingAnimation").removeClass("hidden"),$j("#loadingText").removeClass("is-visible"),$j("#regFormSubmit").attr("disabled",!1)}}}),jPar.loginAndRegistration=jPar.loginAndRegistration||{},$j.extend(!0,jPar.loginAndRegistration,{genderSelectPage_deprecated:{init:function(){jPar.wdk.forms.init(),this.genderSelectBox.init(),document.querySelector("#formGenderSelection").addEventListener("submit",(t=>{this.validate.validateForm(),jPar.wdk.forms.hasVisibleErrors(t.target)&&t.preventDefault()}))},genderSelectBox:{hasEsSex:!0,init:function(){this.hasEsSex=null!==document.querySelector("#essexRow"),document.querySelectorAll("#formGenderSelection #mysexRow input[type=radio]").forEach((t=>{t.addEventListener("click",(t=>{this.mySexClick(t)}))})),document.querySelectorAll("#formGenderSelection #essexRow input[type=checkbox]").forEach((t=>{t.addEventListener("click",(t=>{this.esSexClick(t)}))}))},mySexClick:function(t){this.preselectEsSex(t.target),this.handleHideError()},esSexClick:function(t){t.preventDefault(),t.stopPropagation(),window.setTimeout((function(){if(!1===t.target.checked)t.target.checked=!0;else{const e="essexM"===t.target.id?"essexW":"essexM";!0===document.querySelector("#formGenderSelection #essexRow #"+e).checked&&(t.target.checked=!1)}}),0),this.preselectMySex(t.target),this.syncEsSexForSubmit(),this.handleHideError()},preselectMySex:function(t){if(jPar.wdk.brands.forBrands(["ps","ep"])){if(0===document.querySelectorAll("#formGenderSelection #mysexRow [type=radio]:checked").length){"0"===t.value?document.querySelector("#formGenderSelection #mysexW").click():document.querySelector("#formGenderSelection #mysexM").click()}}},preselectEsSex:function(t){if(jPar.wdk.brands.forBrands(["ps","ep"])&&this.hasEsSex){if(0===document.querySelectorAll("#formGenderSelection #essexRow [type=checkbox]:checked").length){"0"===t.value?document.querySelector("#formGenderSelection #essexW").click():document.querySelector("#formGenderSelection #essexM").click()}}},syncEsSexForSubmit:function(){const t=null!==document.querySelector("#formGenderSelection #essexRow #essexW:checked"),e=null!==document.querySelector("#formGenderSelection #essexRow #essexM:checked");t&&e?document.querySelector("#formGenderSelection #hiddenEssex").value="3":t?document.querySelector("#formGenderSelection #hiddenEssex").value="1":e&&(document.querySelector("#formGenderSelection #hiddenEssex").value="0")},handleHideError:function(){const t=1===document.querySelectorAll('#formGenderSelection input[name="mysex"]:checked').length;let e;e=!this.hasEsSex||""!==document.querySelector('#formGenderSelection input[name="essex"]').value,t&&e&&jPar.wdk.forms.hideError(document.querySelector("#formGenderSelection  #regsexError"))}},validate:{validateForm:function(){this.validateSex()},validateSex:function(){jPar.wdk.forms.showError(document.querySelector("#regsexError"));const t=0===document.querySelectorAll('#formGenderSelection input[name="mysex"]:checked').length;let e;e=!!jPar.loginAndRegistration.genderSelectPage_deprecated.genderSelectBox.hasEsSex&&""===document.querySelector('#formGenderSelection input[name="essex"]').value,t||e?jPar.wdk.forms.showError(document.querySelector("#regsexError")):jPar.wdk.forms.hideError(document.querySelector("#regsexError"))}}}}),jPar.loginAndRegistration=jPar.loginAndRegistration||{},$j.extend(!0,jPar.loginAndRegistration,{genderSelectPage:{initialValueMainGender:null,init:function(){this.tracking.trackPageView(),this.renderInitialState(),document.querySelectorAll('#changeGenderForm input[name="gender"]').forEach((t=>{t.addEventListener("click",(t=>{const e=t.currentTarget.value;e!==this.initialValueMainGender&&(this.selectMainGender(),this.tracking.trackMainGenderChange(e,this.initialValueMainGender),this.initialValueMainGender=e)}))})),this.initialValueMainGender=document.querySelector("#changeGenderForm input:checked")?.value},renderInitialState:function(){document.querySelector('#changeGenderForm input[name="gender"]:checked')&&(document.querySelector("#nextButton").disabled=!1)},selectMainGender:function(){document.querySelector("#nextButton").disabled=!1},tracking:{trackPageView:function(){jPar.util.log.bigData({category:"registration",subcategory:"own_gender_select_screen",action:"screen_view"})},trackMainGenderChange:function(t,e){const o=t=>{switch(t){case"MALE":return"button_man";case"FEMALE":return"button_woman";case"DIVERSE":return"button_nonbinary"}};jPar.util.log.bigData({category:"registration",subcategory:"own_gender_select_screen",action:"click",targetId:"gender",cd1:o(e)||"",cd2:o(t)})}}}}),jPar.loginAndRegistration=jPar.loginAndRegistration||{},$j.extend(!0,jPar.loginAndRegistration,{loginPage:{init:function(){jPar.wdk.forms.init(),this.validate.init(),this.socialSignOn.init(),this.stayLoggedInInfo(),this.accessTokenSubmit();try{this.loginDelay()}catch(t){jPar.util.log.error(t.stack,"jPar.loginAndRegistration.loginPage.init: low prio failed")}$j("#verificationCodeFailedModal").length>0&&jPar.wdk.modalbox.show({modalboxId:"verificationCodeFailedModal"}),parent.postMessage({domLoaded:"loginPage"},window.location.origin)},emailPermissionRetries:0,validate:{init:function(){try{const t=this;$j("#loginFormSubmit").on("click",(function(e){t.submitForm(e)})),$j("#loginFormEmail").on("change",(function(e){jPar.util.validate.isNotTabOrShiftKey(e.keyCode)&&""!==$j(this).val()&&t.validateEmail()})),$j("#loginFormPasswort").on("keyup change",(function(e){jPar.util.validate.isNotTabOrShiftKey(e.keyCode)&&t.validatePassword()}))}catch(t){jPar.util.log.error(t.stack,"jPar.loginAndRegistration.loginPage.validate.init")}},validateEmail:function(){const t=$j("#emailRow"),e=t.find("#loginFormEmailError"),o=t.find("#loginFormEmail"),n=jPar.util.validate.textfieldIsEmpty(o);!1===jPar.util.validate.isEmailAddress(o)||n?jPar.wdk.forms.showError(e):jPar.wdk.forms.hideError(e)},validatePassword:function(){const t=$j("#passwordRow"),e=t.find("#loginFormPasswordError");jPar.util.validate.textfieldIsEmpty(t.find("#loginFormPasswort"))?jPar.wdk.forms.showError(e):jPar.wdk.forms.hideError(e)},validateCompleteForm:function(){jPar.wdk.forms.hideError($j("#loginError2")),this.validateEmail(),this.validatePassword()},hasValidationErrors:function(){return jPar.wdk.forms.hasVisibleErrors($j("#loginForm"))},submitForm:function(t){this.validateCompleteForm(),this.hasValidationErrors()?t.preventDefault():jPar.loginAndRegistration.util.showLoadingAnimation()}},loginDelay:function(){const t=$j("#loadingText").data("logindelay");void 0!==t&&window.setTimeout((function(){jPar.loginAndRegistration.util.hideLoadingAnimation()}),t)},stayLoggedInInfo:function(){$j(".js-showStayLoggedInModal").on("click",(function(t){t.preventDefault(),jPar.wdk.modalbox.show({modalboxId:"stayLoggedInModal"})}))},accessTokenSubmit:function(){null!==document.querySelector("body.accessTokenPage")&&document.getElementById("loginForm").submit()}}}),jPar.loginAndRegistration.loginPage=jPar.loginAndRegistration.loginPage||{},deepMerge(!0,jPar.loginAndRegistration.loginPage,{socialSignOn:{init:function(){const t=null!==document.querySelector("peg-apple-social-button"),e=null!==document.querySelector("peg-google-social-button");t&&this.apple.checkAutosubmit(),e&&this.google.init()},google:{init:function(){this.error.showGoogleBackendErrorModal(),this.error.showErrorNoEMailAdressModal(),this.checkAutosubmit()},checkAutosubmit:function(){const t=void 0!==jPar.util.getGetParamFromUrl("scope"),e=void 0===jPar.util.getGetParamFromUrl("error"),o=void 0!==jPar.util.getGetParamFromUrl("code");if(t&&e&&o){const t=document.querySelector("#loginForm");this.addHiddenInputfields(t),t.submit()}},addHiddenInputfields:function(t){const e=document.createElement("input");e.type="hidden",e.name="socialProvider",e.value="GOOGLE";const o=document.createElement("input");o.type="hidden",o.name="socialAccessToken",o.value=jPar.util.getGetParamFromUrl("code"),t.appendChild(e),t.appendChild(o)},error:{showGoogleBackendErrorModal:function(){null!==document.querySelector("#googleBackendErrorModal")&&jPar.wdk.modalbox.show({modalboxId:"googleBackendErrorModal"})},showErrorNoEMailAdressModal:function(){null!==document.querySelector("#googleNoEMailAdress")&&jPar.wdk.modalbox.show({modalboxId:"googleNoEMailAdress"})}}},apple:{checkAutosubmit:function(){const t="APPLE"===jPar.util.getGetParamFromUrl("socialProvider"),e=void 0===jPar.util.getGetParamFromUrl("error");this.error.showAppleBackendErrorModal(),t&&e&&(this.localFormPreparation(),jPar.loginAndRegistration.util.showLoadingAnimation(),document.querySelector("#loginForm").submit())},localFormPreparation:function(){const t=jPar.wdk.security.escapeStringForHtml(jPar.util.getGetParamFromUrl("id_token")),e=jPar.wdk.security.escapeStringForHtml(jPar.util.getGetParamFromUrl("code")),o=jPar.util.getGetParamFromUrl("user"),n=document.createElement("template"),r=`\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<input type="hidden" name="socialProvider" value="APPLE">\n\t\t\t\t\t\t<input type="hidden" name="id_token" value="${t}">\n\t\t\t\t\t\t<input type="hidden" name="code" value="${e}">\n\t\t\t\t\t\t<input type="hidden" name="user" value="${o}">\n\t\t\t\t\t</div>\n\t\t\t\t`;n.innerHTML=jPar.wdk.security.sanitizeEvilHtml(r);const i=n.content.firstElementChild;document.querySelector("#loginForm").appendChild(i)},error:{showAppleBackendErrorModal:function(){null!==document.querySelector("#appleBackendErrorModal")&&jPar.wdk.modalbox.show({modalboxId:"appleBackendErrorModal"})}}}}}),jPar.loginAndRegistration=jPar.loginAndRegistration||{},$j.extend(!0,jPar.loginAndRegistration,{countdown:{start(t,e,o,n){return o(this.getRemainingTime(t)),setInterval((()=>{const e=this.getRemainingTime(t);o(e),e.total<=0&&n()}),e)},stop(t){clearInterval(t)},getRemainingTime(t){const e=Date.parse(new Date(t))-(new Date).getTime(),o=Math.floor(e/1e3%60),n=Math.floor(e/1e3/60%60),r=Math.floor(e/36e5%24);return{total:e,days:Math.floor(e/864e5),hours:r,minutes:n,seconds:o}}}}),jPar.loginAndRegistration=jPar.loginAndRegistration||{},deepMerge(!0,jPar.loginAndRegistration,{passwordPage:{init:function(){jPar.wdk.forms.init(),this.trackingInit();try{jPar.wdk.passwordRestrictionBox.init(),document.querySelector("#passwordForm").addEventListener("submit",(t=>{this.validatePassword(),jPar.wdk.forms.hasVisibleErrors(document.querySelector("#passwordForm"))&&t.preventDefault()}))}catch(t){jPar.util.log.error(t.stack,"jPar.loginAndRegistration.passwordPage.init: low prio failed")}},validatePassword:function(){jPar.wdk.passwordRestrictionBox.checkPasswordRestrictions();const t=document.querySelector("#passwordEmptyError"),e=document.querySelector("#passwordNotValidError");jPar.util.validate.textfieldIsEmpty(document.querySelector("#passFormPassword"))?(jPar.wdk.forms.showError(t),jPar.wdk.forms.hideError(e)):!1===jPar.wdk.passwordRestrictionBox.isPasswordValid()?(jPar.wdk.forms.showError(e),jPar.wdk.forms.hideError(t)):(jPar.wdk.forms.hideError(e),jPar.wdk.forms.hideError(t))},trackingInit(){jPar.util.log.bigData({category:"registration",subcategory:"password_start_screen",action:"view"}),document.querySelector("#passwordForm").addEventListener("submit",(()=>{jPar.util.log.bigData({category:"registration",subcategory:"password_start_screen",action:"submit",targetId:"button_password"})}))}}}),jPar.loginAndRegistration=jPar.loginAndRegistration||{},$j.extend(!0,jPar.loginAndRegistration,{registrationPage:{conf:{emailNoticeInput:"#regFormEmail",emailNoticeBox:"#emailNoticeBox"},emailPermissionRetries:0,init:function(){this.validate.init(),this.genderSelectBox.init(),jPar.wdk.forms.init(),this.socialSignOn.init(),this.trackingInit();try{this.emailNoticeBox(),jPar.wdk.passwordRestrictionBox.init(),this.openDuplicateEmailModal()}catch(t){jPar.util.log.error(t.stack,"jPar.loginAndRegistration.registrationPage.init: low prio failed")}},openDuplicateEmailModal:function(){$j("#duplicateEmail").length>0&&jPar.wdk.modalbox.show({modalboxId:"duplicateEmail"})},genderSelectBox:{init:function(){const t=this;document.querySelectorAll("#formRegistration #mysexRow input[type=radio]").forEach((function(e){e.addEventListener("click",(function(e){t.mySexClick(e)}))})),document.querySelectorAll("#formRegistration #essexRow input[type=checkbox]").forEach((function(e){e.addEventListener("click",(function(e){t.esSexClick(e)}))}))},mySexClick:function(t){document.querySelectorAll("#formRegistration input[type=radio]").forEach((function(t){t.closest("label").classList.remove("selected")})),t.target.closest("label").classList.add("selected"),this.preselectEsSex(t.target),this.handleHideError()},esSexClick:function(t){t.preventDefault(),t.stopPropagation(),window.setTimeout((function(){if(!1===t.target.checked)t.target.checked=!0,t.target.closest("label").classList.add("selected");else{const e="essexM"===t.target.id?"essexW":"essexM";!0===document.querySelector("#essexRow #"+e).checked&&(t.target.checked=!1,t.target.closest("label").classList.remove("selected"))}}),0),this.preselectMySex(t.target),this.syncEsSexForSubmit(),this.handleHideError()},preselectMySex:function(t){if(jPar.wdk.brands.forBrands(["ps","ep"])){if(0===document.querySelectorAll("#formRegistration #mysexRow [type=radio]:checked").length){const e=t.value,o="1"===e&&null!==document.querySelector("#formRegistration.gay"),n="0"===e&&null!==document.querySelector("#formRegistration.hetero");o||n?document.querySelector("#formRegistration #mysexW").click():document.querySelector("#formRegistration #mysexM").click()}}},preselectEsSex:function(t){if(jPar.wdk.brands.forBrands(["ps","ep"])){if(0===document.querySelectorAll("#formRegistration #essexRow [type=checkbox]:checked").length){const e=t.value,o="1"===e&&null!==document.querySelector("#formRegistration.gay"),n="0"===e&&null!==document.querySelector("#formRegistration.hetero");o||n?document.querySelector("#formRegistration #essexW").click():document.querySelector("#formRegistration #essexM").click()}}},syncEsSexForSubmit:function(){const t=null!==document.querySelector("#formRegistration #essexRow #essexW:checked"),e=null!==document.querySelector("#formRegistration #essexRow #essexM:checked");t&&e?document.querySelector("#hiddenEssex").value="3":t?document.querySelector("#hiddenEssex").value="1":e&&(document.querySelector("#hiddenEssex").value="0")},handleHideError:function(){const t=1===document.querySelectorAll("#formRegistration #mysexRow [type=radio]:checked").length,e=document.querySelectorAll("#formRegistration #essexRow [type=checkbox]:checked").length>=1;t&&e&&jPar.wdk.forms.hideError($j("#regsexError"))}},emailNoticeBox:function(){const t=this;$j(t.conf.emailNoticeInput).on("focus",(function(){$j(t.conf.emailNoticeBox).fadeIn(400)})),$j(t.conf.emailNoticeInput).on("blur",(function(){$j(t.conf.emailNoticeBox).fadeOut(400)}))},trackingInit(){jPar.util.log.bigData({category:"registration",subcategory:"registration_start_screen",action:"view"}),document.querySelector("#formRegistration").addEventListener("submit",(function(){jPar.util.log.bigData({category:"registration",subcategory:"registration_start_screen",action:"click",targetId:"button_registration"})}))}}}),jPar.loginAndRegistration.registrationPage=jPar.loginAndRegistration.registrationPage||{},deepMerge(!0,jPar.loginAndRegistration.registrationPage,{socialSignOn:{init:function(){const t=null!==document.querySelector("peg-apple-social-button"),e=null!==document.querySelector("peg-google-social-button");t&&this.apple.init(),e&&this.google.init()},google:{init:function(){this.error.showGoogleBackendErrorModal(),this.error.showErrorNoEMailAdressModal(),this.checkAutosubmit()},checkAutosubmit:function(){const t=void 0!==jPar.util.getGetParamFromUrl("scope"),e=void 0===jPar.util.getGetParamFromUrl("error"),o=void 0!==jPar.util.getGetParamFromUrl("code");if(t&&e&&o){const t=document.querySelector("#formRegistration");t.dataset.clickFromSocialLogin="true",this.addHiddenInputfields(t),t.submit()}},addHiddenInputfields:function(t){const e=document.createElement("input");e.type="hidden",e.name="socialProvider",e.value="GOOGLE";const o=document.createElement("input");o.type="hidden",o.name="socialAccessToken",o.value=jPar.util.getGetParamFromUrl("code"),t.appendChild(e),t.appendChild(o);let n=jPar.util.getGetParamFromUrl("state");if(n&&(n=decodeURIComponent(n),null===document.querySelector("#mysexEssexRow"))){const e=decodeURIComponent(n),o=new URLSearchParams(e),r=o.get("search"),i=o.get("mysex"),a=o.get("searchGenders"),s=document.createElement("input");s.type="hidden",s.name="gender",s.value=r;const l=document.createElement("input");s.type="hidden",s.name="mysex",s.value=i;const c=document.createElement("input");c.type="hidden",c.name="searchGenders",c.value=a,t.appendChild(s),t.appendChild(l),t.appendChild(c)}},error:{showGoogleBackendErrorModal:function(){null!==document.querySelector("#googleBackendErrorModal")&&jPar.wdk.modalbox.show({modalboxId:"googleBackendErrorModal"})},showErrorNoEMailAdressModal:function(){null!==document.querySelector("#googleNoEMailAdress")&&jPar.wdk.modalbox.show({modalboxId:"googleNoEMailAdress"})}}},apple:{init:function(){this.setEventlistener(),this.error.showAppleBackendErrorModal(),this.error.showErrorNoRegModal(),this.checkAutosubmit()},setEventlistener:function(){let t=!1;document.querySelectorAll("#formRegistration input[type=radio], #formRegistration input[type=checkbox]").forEach((function(e){e.addEventListener("click",(function(){setTimeout((function(){t=!0;const e=document.querySelector("#mysexRow input:checked").value,o=document.querySelector("#essexRow #hiddenEssex").value;document.querySelector("peg-apple-social-button").setAttribute("orientation",e+o)}),50)}))})),document.querySelector("peg-apple-social-button").addEventListener("click",(()=>{!1===t&&(event.preventDefault(),jPar.loginAndRegistration.registrationPage.validate.validateSex({}))}))},checkAutosubmit:function(){const t="APPLE"===jPar.util.getGetParamFromUrl("socialProvider"),e=void 0===jPar.util.getGetParamFromUrl("error");if(t&&e){this.selectGenderInUi();const t=document.querySelector("#formRegistration");t.dataset.clickFromSocialLogin="true",this.localFormPreparation(),t.submit()}},selectGenderInUi:function(){const t=window.location.href,e=new URLSearchParams(t.split("?")[1]).get("state"),o=decodeURIComponent(e),n=new URLSearchParams(o).get("search");"10"===n?(document.querySelector("#mysexW").click(),document.querySelector("#essexM").click()):"01"===n?(document.querySelector("#mysexM").click(),document.querySelector("#essexW").click()):"11"===n?(document.querySelector("#mysexW").click(),document.querySelector("#essexW").click()):"00"===n&&(document.querySelector("#mysexM").click(),document.querySelector("#essexM").click())},localFormPreparation:function(){const t=jPar.wdk.security.escapeStringForHtml(jPar.util.getGetParamFromUrl("id_token")),e=jPar.wdk.security.escapeStringForHtml(jPar.util.getGetParamFromUrl("code")),o=jPar.util.getGetParamFromUrl("user"),n=document.createElement("template"),r=`\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<input type="hidden" name="socialProvider" value="APPLE">\n\t\t\t\t\t\t<input type="hidden" name="id_token" value="${t}">\n\t\t\t\t\t\t<input type="hidden" name="code" value="${e}">\n\t\t\t\t\t\t<input type="hidden" name="user" value="${o}">\n\t\t\t\t\t</div>\n\t\t\t\t`;n.innerHTML=jPar.wdk.security.sanitizeEvilHtml(r);const i=n.content.firstElementChild;document.querySelector("#formRegistration").appendChild(i)},error:{showAppleBackendErrorModal:function(){null!==document.querySelector("#appleBackendErrorModal")&&jPar.wdk.modalbox.show({modalboxId:"appleBackendErrorModal"})},showErrorNoRegModal:function(){null!==document.querySelector("#appleNoReg")&&jPar.wdk.modalbox.show({modalboxId:"appleNoReg"})}}}}}),jPar.loginAndRegistration.registrationPage=jPar.loginAndRegistration.registrationPage||{},$j.extend(!0,jPar.loginAndRegistration.registrationPage,{validate:{conf:{registrationFormName:"#formRegistration"},init:function(){try{const t=this;$j(this.conf.registrationFormName+" #regFormEmail").on("keyup change",(function(){$j("#regFormEmail").parents(".wdk-form-text").hasClass("has-error")&&t.validateEmail()})),$j(this.conf.registrationFormName+" input.checkPassword[type=password]").on("focus",(function(){jPar.wdk.forms.hideError($j("#regPasswordEmptyError")),jPar.wdk.forms.hideError($j("#regPasswordNotValidError"))})),$j(this.conf.registrationFormName).on("submit",(function(e){t.validateForm({clickFromSocialLogin:$j("#formRegistration").data("clickFromSocialLogin")}),$j("#formRegistration").data("clickFromSocialLogin",!1),jPar.wdk.forms.hasVisibleErrors($j(t.conf.registrationFormName))?e.preventDefault():jPar.loginAndRegistration.util.showLoadingAnimation()}))}catch(t){jPar.util.log.error(t.stack,"jPar.loginAndRegistration.registrationPage.validate.init")}},validateForm:function(t){t=t||{},this.validateSex(t),this.validateEmail(t),this.validatePassword(t)},validateSex:function(){null!==document.querySelector("#mysexEssexRow")&&($j('input[name="mysex"]:checked').length&&""!==!$j('input[name="essex"]').val()?jPar.wdk.forms.hideError($j("#regsexError")):jPar.wdk.forms.showError($j("#regsexError")))},validateEmail:function(t){t=t||{};const e=$j("#regFormEmail"),o=jPar.util.validate.textfieldIsEmpty(e)||!1===jPar.util.validate.isEmailAddress(e);!1===t.clickFromSocialLogin&&o?jPar.wdk.forms.showError($j("#regEmailError")):jPar.wdk.forms.hideError($j("#regEmailError"))},validatePassword:function(t){!0===(t=t||{}).clickFromSocialLogin?(jPar.wdk.forms.hideError($j("#regPasswordEmptyError")),jPar.wdk.forms.hideError($j("#regPasswordNotValidError"))):(jPar.wdk.passwordRestrictionBox.checkPasswordRestrictions(),jPar.util.validate.textfieldIsEmpty($j("#regFormPassword"))?(jPar.wdk.forms.showError($j("#regPasswordEmptyError")),jPar.wdk.forms.hideError($j("#regPasswordNotValidError"))):!1===jPar.wdk.passwordRestrictionBox.isPasswordValid()?(jPar.wdk.forms.hideError($j("#regPasswordEmptyError")),jPar.wdk.forms.showError($j("#regPasswordNotValidError"))):(jPar.wdk.forms.hideError($j("#regPasswordEmptyError")),jPar.wdk.forms.hideError($j("#regPasswordNotValidError"))))}}}),jPar.loginAndRegistration=jPar.loginAndRegistration||{},$j.extend(!0,jPar.loginAndRegistration,{searchGenderSelectPage:{init:function(){this.tracking.trackPageView();const t=document.querySelector("#changeSearchGenderForm");t.querySelector('input[name="selectedGenders"]:checked')&&(document.querySelector("#nextButton").disabled=!1,document.querySelector(".infoText").classList.remove("noDisplay")),t.querySelectorAll('input[name="selectedGenders"]').forEach((e=>{e.addEventListener("click",(e=>{const o=0===t.querySelectorAll('input[name="selectedGenders"]:checked').length;document.querySelector("#nextButton").disabled=o,document.querySelector(".infoText").classList.remove("noDisplay"),this.tracking.trackSearchGenderChange(e.currentTarget.value)}))})),t.addEventListener("submit",(e=>{e.preventDefault();const o=Array.from(t.querySelectorAll("input")).map((t=>t.checked?t.value:null)).filter((t=>null!==t)),n=new URLSearchParams({selectedGenders:o,_csrf:jPar.wdk.security.csrf.getToken()});fetch(t.action,{method:"POST",body:n,headers:{"X-CSRF-TOKEN":jPar.wdk.security.csrf.getToken(),"x-requested-with":"XMLHttpRequest","Content-Type":"application/x-www-form-urlencoded"}}).then((t=>{t.redirected&&(window.location.href=t.url)}))}))},tracking:{trackPageView:function(){jPar.util.log.bigData({category:"registration",subcategory:"search_gender_select_screen",action:"screen_view"})},trackSearchGenderChange:function(t){let e="";switch(t){case"MALE":e="button_man";break;case"FEMALE":e="button_woman";break;case"DIVERSE":e="button_nonbinary"}jPar.util.log.bigData({category:"registration",subcategory:"search_gender_select_screen",action:"click",targetId:e})}}}}),jPar.loginAndRegistration=jPar.loginAndRegistration||{},$j.extend(!0,jPar.loginAndRegistration,{verificationPage:{resendCountDownStarted:!1,resendCountdownInterval:0,init:function(){this.setFormEvents(),this.setHelpEvents(),this.countDown();try{this.loginDelay()}catch(t){jPar.util.log.error(t.stack,"jPar.loginAndRegistration.verificationPage.init: low prio failed")}},countDown:function(){if($j("#verificationTimeoutError").length>0){$j("#code").attr("readonly",!0),$j(".codeWrapper").hide();const t=(new Date).getTime()+parseInt($j("#verificationTimeoutError").data("countDown"));jPar.loginAndRegistration.countdown.start(t,1e3,(t=>{$j(".countDown").html(t.minutes+":"+t.seconds.toString().padStart(2,"0"))}),(()=>{$j(".countDown").html("0:00"),location.assign("/login?login_error=verification_code_failed")}))}},setFormEvents:function(){const t=this;$j("#verificationForm").on("keydown keyup","#code",(function(e){return t.hideCursor(e),t.submitCode(e),t.isWantedCharacter(e)})),$j("#verificationForm").on("change","#code",(function(e){t.submitCode(e)})),$j("#verificationForm").on("paste","#code",(function(e){t.removeNotWantedCharacters(e)}))},setHelpEvents:function(){const t=this;$j(".js-openModalDrawer").on("click",(function(){jPar.wdk.modalbox.show({modalboxId:"helpModal"})})),$j("#resendButton").on("click",(function(){t.resendCode()})),$j("#cancelButton, #openOscHelpPages").on("click",(function(){jPar.wdk.modalbox.hide()}))},isWantedCharacter:function(t){if(this.isNumber(t.key))return!0;const e=this.getKeyCode(t),o=8===e||46===e,n=e>=37&&e<=40,r=9===e;return t.ctrlKey&&86===e||o||n||r||e>=112&&e<=123},getKeyCode:function(t){return t.which?t.which:t.keyCode},isNumber:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},hideCursor:function(t){"keydown"===t.type&&(this.isCodeAlmostComplete()&&this.isNumber(t.key)?$j(t.target).addClass("cursorHidden"):$j(t.target).removeClass("cursorHidden"))},isCodeAlmostComplete:function(){const t=parseInt($j("#verificationForm #code").attr("maxLength")),e=$j("#verificationForm #code").val().length;return t>0&&e+1>=t},isCodeComplete:function(){const t=$j("#verificationForm #code").attr("maxLength"),e=""+$j("#verificationForm #code").val().length;return t>0&&e===t},removeNotWantedCharacters:function(t){const e=t.originalEvent.clipboardData.getData("text");if(""!==e)return $j("#code").val(e.replace(/\D+/g,"")),t.preventDefault(),!1},submitCode:function(t){"keyup"===t.type&&!$j("#verificationForm").hasClass("submitInProgress")&&this.isCodeComplete()&&($j("#verificationForm").addClass("submitInProgress"),$j("#code").attr("readonly",!0),$j("#verificationForm").trigger("submit"))},resendCode:function(){const t=this;$j.ajax({type:"POST",url:$j("#verificationForm").data("resendUrl"),data:{_csrf:jPar.wdk.security.csrf.getToken(),j_username:$j('#verificationForm input[name="j_username"]').val()},success:function(e){if(jPar.wdk.modalbox.hide(),e.success)jPar.wdk.modalbox.show({modalboxId:"resendSuccessModal"});else if(e.blockedDurationInMs){const o=e.blockedDurationInMs;$j(".resendBlockedCounter").data("countDown",o),jPar.wdk.modalbox.show({modalboxId:"resendBlockedModal"}),t.resendCountDown()}else jPar.wdk.modalbox.show({modalboxId:"errorModalbox500"})},error:function(){jPar.wdk.modalbox.show({modalboxId:"errorModalbox500"})}})},resendCountDown:function(){if(""!==$j(".resendBlockedCounter").data("countDown")&&!this.resendCountDownStarted){this.resendCountDownStarted=!0;const t=(new Date).getTime()+parseInt($j(".resendBlockedCounter").data("countDown"));this.resendCountdownInterval=jPar.loginAndRegistration.countdown.start(t,1e3,(t=>{$j(".resendBlockedCounter").html(t.minutes+":"+t.seconds.toString().padStart(2,"0"))}),(()=>{this.resendCountDownStarted=!1,$j(".resendBlockedCounter").html("0:00"),jPar.loginAndRegistration.countdown.stop(this.resendCountdownInterval)}))}},loginDelay:function(){const t=$j("#loadingText").data("logindelay");void 0!==t&&window.setTimeout((function(){jPar.loginAndRegistration.util.hideLoadingAnimation()}),t)}}});