@digital-blueprint/formalize-app
Version:
[GitHub Repository](https://github.com/digital-blueprint/formalize-app) | [npmjs package](https://www.npmjs.com/package/@digital-blueprint/formalize-app) | [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/formalize-app/) | [Formalize Bundle](https:
1,871 lines • 162 kB
JavaScript
/*!
* License: LGPL-2.1-or-later
* Dependencies:
*
* @webcomponents/scoped-custom-element-registry: BSD-3-Clause
* @dbp-toolkit/app-shell: LGPL-2.1-or-later
* lit-html: BSD-3-Clause
* @dbp-toolkit/language-select: LGPL-2.1-or-later
* @dbp-toolkit/auth: LGPL-2.1-or-later
* @dbp-toolkit/theme-switcher: LGPL-2.1-or-later
* universal-router: MIT
* @dbp-toolkit/matomo: LGPL-2.1-or-later
*/
import{A as e,E as t,F as n,G as r,J as i,K as a,O as o,Q as s,X as c,c as l,d as u,et as d,f,g as p,k as m,l as h,m as g,p as _,s as v,u as ee,v as y,y as b}from"./shared/directive-helpers.C6Xz79AM.js";import{t as x}from"./shared/class-map.B2bFA_il.js";import{t as S}from"./shared/translated.Blxt0tjK.js";import{t as C}from"./shared/utils.BtSYiqoX.js";import{a as te,i as w,n as T,r as E}from"./shared/feature-flags.DdD1PCm9.js";import{t as ne}from"./shared/notification.0izelRLi.js";(function(){function e(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var t=typeof Object.defineProperties==`function`?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function n(e){e=[typeof globalThis==`object`&&globalThis,e,typeof window==`object`&&window,typeof self==`object`&&self,typeof global==`object`&&global];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error(`Cannot find global object`)}var r=n(this);function i(e,n){if(n)a:{var i=r;e=e.split(`.`);for(var a=0;a<e.length-1;a++){var o=e[a];if(!(o in i))break a;i=i[o]}e=e[e.length-1],a=i[e],n=n(a),n!=a&&n!=null&&t(i,e,{configurable:!0,writable:!0,value:n})}}i(`Symbol`,function(e){function n(e){if(this instanceof n)throw TypeError(`Symbol is not a constructor`);return new r(`jscomp_symbol_`+(e||``)+`_`+i++,e)}function r(e,n){this.l=e,t(this,`description`,{configurable:!0,writable:!0,value:n})}if(e)return e;r.prototype.toString=function(){return this.l};var i=0;return n}),i(`Symbol.iterator`,function(n){if(n)return n;n=Symbol(`Symbol.iterator`);for(var i=`Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array`.split(` `),o=0;o<i.length;o++){var s=r[i[o]];typeof s==`function`&&typeof s.prototype[n]!=`function`&&t(s.prototype,n,{configurable:!0,writable:!0,value:function(){return a(e(this))}})}return n});function a(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}function o(t){var n=typeof Symbol<`u`&&Symbol.iterator&&t[Symbol.iterator];return n?n.call(t):{next:e(t)}}function s(e){if(!(e instanceof Array)){e=o(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}var c=typeof Object.create==`function`?Object.create:function(e){function t(){}return t.prototype=e,new t},l=function(){function e(){function e(){}return new e,Reflect.construct(e,[],function(){}),new e instanceof e}if(typeof Reflect<`u`&&Reflect.construct){if(e())return Reflect.construct;var t=Reflect.construct;return function(e,n,r){return e=t(e,n),r&&Reflect.setPrototypeOf(e,r.prototype),e}}return function(e,t,n){return n===void 0&&(n=e),n=c(n.prototype||Object.prototype),Function.prototype.apply.call(e,n,t)||n}}(),u;if(typeof Object.setPrototypeOf==`function`)u=Object.setPrototypeOf;else{var d;a:{var f={a:!0},p={};try{p.__proto__=f,d=p.a;break a}catch{}d=!1}u=d?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw TypeError(e+` is not extensible`);return e}:null}var m=u,h=window;if(h.CustomElementRegistryPolyfill?.formAssociated===void 0){var g={};h.CustomElementRegistryPolyfill=(g.formAssociated=/* @__PURE__ */ new Set,g)}var _=window.HTMLElement,v=window.customElements.define,ee=window.customElements.get,y=window.customElements,b=/* @__PURE__ */ new WeakMap,x=/* @__PURE__ */ new WeakMap,S=/* @__PURE__ */ new WeakMap,C=/* @__PURE__ */ new WeakMap;function te(){var e;this.promise=new Promise(function(t){e=t}),this.resolve=e}function w(){this.h=/* @__PURE__ */ new Map,this.m=/* @__PURE__ */ new Map,this.j=/* @__PURE__ */ new Map,this.i=/* @__PURE__ */ new Map}w.prototype.define=function(e,t){if(e=e.toLowerCase(),this.h.get(e)!==void 0)throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "`+e+`" has already been used with this registry`);if(this.m.get(t)!==void 0)throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry`);var n=t.prototype.attributeChangedCallback,r=new Set(t.observedAttributes||[]);re(t,r,n);var i=ee.call(y,e),a=i?.s??(t.formAssociated||h.CustomElementRegistryPolyfill.formAssociated.has(e));if(a&&h.CustomElementRegistryPolyfill.formAssociated.add(e),a!=t.formAssociated)try{t.formAssociated=a}catch{}if(n={tagName:e,g:t,connectedCallback:t.prototype.connectedCallback,disconnectedCallback:t.prototype.disconnectedCallback,adoptedCallback:t.prototype.adoptedCallback,attributeChangedCallback:n,formAssociated:a,formAssociatedCallback:t.prototype.formAssociatedCallback,formDisabledCallback:t.prototype.formDisabledCallback,formResetCallback:t.prototype.formResetCallback,formStateRestoreCallback:t.prototype.formStateRestoreCallback,observedAttributes:r},this.h.set(e,n),this.m.set(t,n),i||(i=ne(e),v.call(y,e,i)),this===window.customElements&&(S.set(t,n),n.o=i),i=this.i.get(e))for(this.i.delete(e),i=o(i),r=i.next();!r.done;r=i.next())r=r.value,x.delete(r),j(r,n,!0);return i=this.j.get(e),i!==void 0&&(i.resolve(t),this.j.delete(e)),t},w.prototype.upgrade=function(e){var t=[...arguments];N.push(this),y.upgrade.apply(y,s(t)),N.pop()},w.prototype.get=function(e){return this.h.get(e)?.g},w.prototype.whenDefined=function(e){var t=this.h.get(e);return t===void 0?(t=this.j.get(e),t===void 0&&(t=new te,this.j.set(e,t)),t.promise):Promise.resolve(t.g)};function T(e,t,n,r){var i=e.i.get(n);i||e.i.set(n,i=/* @__PURE__ */ new Set),r?i.add(t):i.delete(t)}var E;window.HTMLElement=function(){var e=E;if(e)return E=void 0,e;var t=S.get(this.constructor);if(!t)throw TypeError(`Illegal constructor (custom element class must be registered with global customElements registry to be newable)`);return e=Reflect.construct(_,[],t.o),Object.setPrototypeOf(e,this.constructor.prototype),b.set(e,t),e},window.HTMLElement.prototype=_.prototype;function ne(e){function t(){var t=Reflect.construct(_,[],this.constructor);Object.setPrototypeOf(t,HTMLElement.prototype);a:{var n=t.getRootNode();if(!(n===document||n instanceof ShadowRoot)){if(n=N[N.length-1],n instanceof CustomElementRegistry){var r=n;break a}n=n.getRootNode(),n===document||n instanceof ShadowRoot||(n=(r=C.get(n))?.getRootNode()||document)}r=n.registry}return r||=window.customElements,(n=r.h.get(e))?j(t,n):x.set(t,r),t}return r.Object.defineProperty(t,`formAssociated`,{configurable:!0,enumerable:!0,get:function(){return h.CustomElementRegistryPolyfill.formAssociated.has(e)}}),t.prototype.connectedCallback=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];O(this),(r=b.get(this))?r.connectedCallback&&r.connectedCallback.apply(this,n):T(x.get(this),this,e,!0)},t.prototype.disconnectedCallback=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];(r=b.get(this))?r.disconnectedCallback&&r.disconnectedCallback.apply(this,n):T(x.get(this),this,e,!1)},t.prototype.adoptedCallback=function(e){var t=[...arguments],n,r;(n=b.get(this))==null||(r=n.adoptedCallback)==null||r.apply(this,t)},t.prototype.formAssociatedCallback=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(n=b.get(this),n!=null&&n.formAssociated){var r;n==null||(r=n.formAssociatedCallback)==null||r.apply(this,t)}},t.prototype.formDisabledCallback=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(n=b.get(this),n!=null&&n.formAssociated){var r;n==null||(r=n.formDisabledCallback)==null||r.apply(this,t)}},t.prototype.formResetCallback=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(n=b.get(this),n!=null&&n.formAssociated){var r;n==null||(r=n.formResetCallback)==null||r.apply(this,t)}},t.prototype.formStateRestoreCallback=function(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];if(n=b.get(this),n!=null&&n.formAssociated){var r;n==null||(r=n.formStateRestoreCallback)==null||r.apply(this,t)}},t}window.CustomElementRegistry=w;function re(e,t,n){if(t.size!==0&&n!==void 0){var r=e.prototype.setAttribute;r&&(e.prototype.setAttribute=function(e,i){if(O(this),e=e.toLowerCase(),t.has(e)){var a=this.getAttribute(e);r.call(this,e,i),n.call(this,e,a,i)}else r.call(this,e,i)});var i=e.prototype.removeAttribute;i&&(e.prototype.removeAttribute=function(e){if(O(this),e=e.toLowerCase(),t.has(e)){var r=this.getAttribute(e);i.call(this,e),n.call(this,e,r,null)}else i.call(this,e)});var a=e.prototype.toggleAttribute;a&&(e.prototype.toggleAttribute=function(e,r){if(O(this),e=e.toLowerCase(),t.has(e)){var i=this.getAttribute(e);a.call(this,e,r),r=this.getAttribute(e),i!==r&&n.call(this,e,i,r)}else a.call(this,e,r)})}}var D;document.readyState===`loading`&&(D=/* @__PURE__ */ new Set,document.addEventListener(`readystatechange`,function(){D.forEach(function(e){return k(e,b.get(e))})},{once:!0}));function O(e){var t;(t=D)!=null&&t.has(e)&&k(e,b.get(e))}function k(e,t){var n;(n=D)==null||n.delete(e),t.attributeChangedCallback&&t.observedAttributes.forEach(function(n){e.hasAttribute(n)&&t.attributeChangedCallback.call(e,n,null,e.getAttribute(n))})}function A(e){var t=Object.getPrototypeOf(e);if(t!==window.HTMLElement)return t===_?Object.setPrototypeOf(e,window.HTMLElement):A(t)}function j(e,t,n){n=n!==void 0&&n,Object.setPrototypeOf(e,t.g.prototype),b.set(e,t),E=e;try{new t.g}catch{A(t.g),new t.g}t.attributeChangedCallback&&(D===void 0||e.hasAttributes()?k(e,t):D.add(e)),n&&t.connectedCallback&&e.isConnected&&t.connectedCallback.call(e)}var M=Element.prototype.attachShadow;Element.prototype.attachShadow=function(e,t){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];var i=Object.assign({},e);return r=e.customElements,r=e.registry===void 0?r:e.registry,i=(delete i.customElements,delete i.registry,i),n=M.call.apply(M,[this,i].concat(s(n))),r!==void 0&&(n.customElements=n.registry=r),n};var N=[document];function P(e,t,n){var r=(n?Object.getPrototypeOf(n):e.prototype)[t];e.prototype[t]=function(e){var t=[...arguments];return N.push(this),t=r.apply(n||this,t),t!==void 0&&C.set(t,this),N.pop(),t}}P(ShadowRoot,`createElement`,document),P(ShadowRoot,`createElementNS`,document),P(ShadowRoot,`importNode`,document),P(Element,`insertAdjacentHTML`);function F(e){var t=Object.getOwnPropertyDescriptor(e.prototype,`innerHTML`);Object.defineProperty(e.prototype,"innerHTML",Object.assign({},t,{set:function(e){N.push(this),t.set.call(this,e),N.pop()}}))}if(F(Element),F(ShadowRoot),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){var I=/* @__PURE__ */ new WeakMap,L=HTMLElement.prototype.attachInternals,ie=[`setFormValue`,`setValidity`,`checkValidity`,`reportValidity`];HTMLElement.prototype.attachInternals=function(e){var t=[...arguments];return t=L.call.apply(L,[this].concat(s(t))),I.set(t,this),t},ie.forEach(function(e){var t=window.ElementInternals.prototype,n=t[e];t[e]=function(e){for(var t=[],r=0;r<arguments.length;++r)t[r]=arguments[r];if(r=I.get(this),!0===b.get(r).formAssociated)return n?.call.apply(n,[this].concat(s(t)));throw new DOMException(`Failed to execute `+n+` on 'ElementInternals': The target element is not a form-associated custom element.`)}});var R=function(e){var t=l(Array,[].concat(s(e)),this.constructor);return t.l=e,t},z=R,B=Array;if(z.prototype=c(B.prototype),z.prototype.constructor=z,m)m(z,B);else for(var V in B)if(V!=`prototype`){if(Object.defineProperties){var H=Object.getOwnPropertyDescriptor(B,V);H&&Object.defineProperty(z,V,H)}else z[V]=B[V]}z.u=B.prototype,r.Object.defineProperty(R.prototype,`value`,{configurable:!0,enumerable:!0,get:function(){return this.l.find(function(e){return!0===e.checked})?.value||``}});var U=function(e){var t=this,n=/* @__PURE__ */ new Map;e.forEach(function(e,r){var i=e.getAttribute(`name`),a=n.get(i)||[];t[+r]=e,a.push(e),n.set(i,a)}),this.length=e.length,n.forEach(function(e,n){e&&n!==`length`&&n!==`item`&&n!==`namedItem`&&(t[n]=e.length===1?e[0]:new R(e))})};U.prototype.item=function(e){return this[e]??null},U.prototype[Symbol.iterator]=function(){throw Error(`Method not implemented.`)},U.prototype.namedItem=function(e){return this[e]??null};var ae=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,`elements`);Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){var e=ae.get.call(this),t=[];e=o(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=b.get(n);r&&!0!==r.formAssociated||t.push(n)}return new U(t)}})}}).call(typeof globalThis==`object`?globalThis:window);var re={"activity-example":{"hello-world":`Hallo Welt`},buttons:{"scroll-to-bottom-button-label":`Zum Seitenende scrollen`,"scroll-to-top-button-label":`Zum Seitenanfang scrollen`},"choose-from-menu":`Bitte wählen Sie eine Aktivität aus dem Menu.`,contact:`Kontakt`,imprint:`Impressum`,login:`Anmelden`,logout:`Abmelden`,"main-page":{menu:`Menü`,"primary-navigation":`Haupt`},"page-not-found":`Die gewünschte Seite wurde nicht gefunden`,"page-updated-needs-reload":`Die Applikation wurde aktualisiert. Bitte laden Sie die Seite neu.`,"privacy-policy":`Datenschutz`,welcome:{headline:`Willkommen!`}},D={"activity-example":{"hello-world":`Hello World`},buttons:{"scroll-to-bottom-button-label":`Scroll to page bottom`,"scroll-to-top-button-label":`Scroll to page top`},"choose-from-menu":`Please choose an activity from the menu.`,contact:`Contact`,imprint:`Legal Notice`,login:`Login`,logout:`Logout`,"main-page":{menu:`Menu`,"primary-navigation":`Primary`},"page-not-found":`Requested Page Not Found`,"page-updated-needs-reload":`The application has been updated. Please reload the page.`,"privacy-policy":`Privacy Policy`,welcome:{headline:`Welcome!`}};function O(){return s({en:D,de:re},`de`,`en`)}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/var k=class extends u{constructor(e){if(super(e),this.it=r,e.type!==f.CHILD)throw Error(this.constructor.directiveName+`() can only be used in child bindings`)}render(e){if(e===r||e==null)return this._t=void 0,this.it=e;if(e===a)return e;if(typeof e!=`string`)throw Error(this.constructor.directiveName+`() called with a non-string value`);if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};k.directiveName=`unsafeHTML`,k.resultType=1;const A=ee(k);var j={de:`Deutsch`,"de-action":`Auf Deutsch anzeigen`,demo:`Hallo Welt`,en:`Englisch`,"en-action":`Auf Englisch anzeigen`},M={de:`German`,"de-action":`Switch to German`,demo:`Hello World`,en:`English`,"en-action":`Switch to English`};function N(){return s({en:M,de:j},`de`,`en`)}var P=class extends g{constructor(){super(),this._lang=`de`,this.languages=[`de`,`en`],this._i18n=N(),this._i18n.t(`de`),this._i18n.t(`de-action`),this._i18n.t(`en`),this._i18n.t(`en-action`)}_getNextLanguage(e){var t=this.languages.indexOf(e),n=this.languages[t+1];return n===void 0&&(n=this.languages[0]),n}_getPreviousLanguage(e){var t=this.languages.indexOf(e),n=this.languages[t-1];return n===void 0&&(n=this.languages[this.languages.length-1]),n}static get properties(){return{...super.properties,lang:{type:String},next:{type:String},languages:{type:Array}}}set lang(e){let t=this.lang,n=this.next;this._lang=e,this.requestUpdate(`lang`,t),this.requestUpdate(`next`,n),t!==e&&(this.sendSetPropertyEvent(`lang`,e),this._i18n.changeLanguage(this.next))}get lang(){return this._lang}set next(e){this.lang=this._getPreviousLanguage(e)}get next(){return this._getNextLanguage(this.lang)}static get styles(){return c`
${o()}
:host {
display: inline-block;
}
a:hover {
color: var(--dbp-hover-color, var(--dbp-content));
background-color: var(--dbp-hover-background-color);
transition: none;
}
a {
padding: 0.3em;
display: inline-block;
text-decoration: none;
transition:
background-color 0.15s,
color 0.15s;
color: var(--dbp-content);
}
input::-moz-focus-inner {
border: 0;
}
:focus-visible {
outline: none !important;
outline-width: 0 !important;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: 0px 0px 4px 2px var(--dbp-primary);
}
`}onClick(e){e.preventDefault(),this.lang=this.next}render(){var e=this._i18n.t(this.next+`-action`);return i`
<a href="#" title="${e}" @click=${this.onClick}>${this.next.toUpperCase()}</a>
`}},F={"logging-in":`Anmeldung läuft`,login:`Anmelden`,"login-failed":`Kommunikation mit dem Anmeldeserver fehlgeschlagen`,logout:`Abmelden`},I={"logging-in":`Logging in`,login:`Login`,"login-failed":`Communication with the login server failed`,logout:`Logout`};function L(){return s({en:I,de:F},`de`,`en`)}const ie=function(e,t){let n=new Promise((t,n)=>{let r=setTimeout(()=>{clearTimeout(r),n(/* @__PURE__ */ Error(`Timed out in `+e+`ms.`))},e)});return Promise.race([t,n])},R=function(e){try{return new URL(e).href}catch{return new URL(e,window.location.href).href}};var z=class extends EventTarget{constructor(e,t,n,r,i,a){super(),this._baseURL=e,this._realm=t,this._clientId=n,this._keycloak=null,this._initPromise=null,this._silentCheckSsoUri=r,this._checkLoginIframe=i,this._idpHint=a,this._checkId=null,this.MIN_VALIDITY=20,this.CHECK_INTERVAL=10,this.DEBUG=!1,this._onVisibilityChanged=this._onVisibilityChanged.bind(this),document.addEventListener(`visibilitychange`,this._onVisibilityChanged)}close(){document.removeEventListener(`visibilitychange`,this._onVisibilityChanged)}_getKeycloak(){if(!this._keycloak)throw Error(`Keycloak is not initialized`);return this._keycloak}_onVisibilityChanged(){document.visibilityState===`visible`&&this._checkTokeHasExpired()}_onChanged(){let e=new CustomEvent(`changed`,{detail:this._keycloak,bubbles:!0,composed:!0});this.dispatchEvent(e)}_onReady(e){e&&this._onChanged()}async _onTokenExpired(){console.log(`Token has expired`);let e,t=this._getKeycloak();try{e=await t.updateToken(-1)}catch(e){console.log(`Failed to refresh the token`,e);return}console.assert(e,`token should have been refreshed`)}async _checkTokeHasExpired(){let e;if(this._keycloak===null||!this._keycloak.authenticated)return;let t=this.MIN_VALIDITY+this.CHECK_INTERVAL;this.DEBUG&&console.log(`Updating token if not valid for at least ${t}s`);try{e=await this._keycloak.updateToken(t)}catch(e){console.log(`Failed to refresh the token`,e)}this.DEBUG&&e&&console.log(`token has been refreshed`)}_onAuthSuccess(){this._checkId!==null&&(clearInterval(this._checkId),this._checkId=null),this._checkId=setInterval(()=>void this._checkTokeHasExpired(),this.CHECK_INTERVAL*1e3),this._onChanged()}_onAuthLogout(){this._checkId!==null&&(clearInterval(this._checkId),this._checkId=null),this._onChanged()}async _init(){let e=(await import(`./shared/keycloak.CmPq4fj_.js`)).default;this._keycloak=new e({url:this._baseURL,realm:this._realm,clientId:this._clientId}),this._keycloak.onTokenExpired=()=>void this._onTokenExpired(),this._keycloak.onAuthRefreshSuccess=this._onChanged.bind(this),this._keycloak.onAuthRefreshError=this._onChanged.bind(this),this._keycloak.onAuthLogout=this._onAuthLogout.bind(this),this._keycloak.onAuthSuccess=this._onAuthSuccess.bind(this),this._keycloak.onAuthError=this._onChanged.bind(this),this._keycloak.onReady=this._onReady.bind(this);let t={};t.pkceMethod=`S256`,this.DEBUG&&(t.enableLogging=!0),t.checkLoginIframe=this._checkLoginIframe,this._silentCheckSsoUri?(t.onLoad=`check-sso`,t.silentCheckSsoRedirectUri=R(this._silentCheckSsoUri),await ie(5e3,this._keycloak.init(t)).catch(()=>{console.log(`Login timed out`),this._onChanged()})):await this._keycloak.init(t)}async _ensureInit(){return this._initPromise===null&&(this._initPromise=this._init()),this._initPromise}isLoggingIn(){let e=window.location.href;return e.search(`[&#]state=`)>=0&&e.search(`[&#]session_state=`)>=0}async login(e){await this._ensureInit();let t=this._getKeycloak();e||={};let n=e.lang||`en`,r=e.scope||``;t.authenticated||await t.login({locale:n,scope:r,idpHint:this._idpHint})}async tryLogin(){await this._ensureInit()}async localLogout(){this._getKeycloak().clearToken()}async logout(){await this._ensureInit(),await this._getKeycloak().logout()}};const B=Object.freeze({UNKNOWN:`unknown`,LOGGING_IN:`logging-in`,LOGGED_IN:`logged-in`,LOGGING_OUT:`logging-out`,LOGGED_OUT:`logged-out`});var V=class extends h(g,L){constructor(){super(),this.forceLogin=!1,this.token=``,this.subject=``,this.name=``,this.tryLogin=!1,this.entryPointUrl=``,this._user=null,this._userId=``,this._authenticated=!1,this._loginStatus=B.UNKNOWN,this.requestedLoginStatus=B.UNKNOWN,this._kcwrapper=null,this.keycloakUrl=null,this.realm=null,this.clientId=null,this.silentCheckSsoRedirectUri=null,this.noCheckLoginIframe=!1,this.scope=null,this.idpHint=``,this._onKCChangedListener=e=>{this._onKCChanged(e)},`playwright`in window&&this.setAttribute(`data-testid`,`dbp-auth-keycloak`)}update(e){e.forEach((e,t)=>{switch(t){case`requestedLoginStatus`:{console.log(`requested-login-status changed`,this.requestedLoginStatus);let e=this.requestedLoginStatus;switch(this.requestedLoginStatus=B.UNKNOWN,e){case B.LOGGED_IN:this._getKCWrapper().login({lang:this.lang,scope:this.scope||``});break;case B.LOGGED_OUT:this._loginStatus===B.LOGGED_IN&&this._setLoginStatus(B.LOGGING_OUT),this._logout()}break}}}),super.update(e)}async _logout(){await this._getKCWrapper().logout(),this._loginStatus===B.LOGGING_OUT&&this._setLoginStatus(B.LOGGED_IN)}async _fetchUser(e,t){let n=C(this.entryPointUrl,`/frontend/users/${encodeURIComponent(e)}`),r=await fetch(n,{headers:{Authorization:`Bearer `+t}});if(!r.ok)throw Error(r.statusText,{cause:r});return{roles:(await r.json()).roles??[]}}async _onKCChanged(e){let t=e.detail;if(this._authenticated=t.authenticated,t.authenticated){if(t.subject!==this.subject){this._loginStatus===B.LOGGED_IN&&(this._setLoginStatus(B.LOGGING_OUT),this._setLoggedOut());let e=t.idTokenParsed.preferred_username;this._userId=e;let n;try{n=await this._fetchUser(e,t.token)}catch(e){console.error(e),n={roles:[]}}e===this._userId&&(this._user=n)}let e=this.token!==t.token;this.token=t.token,this.name=t.idTokenParsed.name,this.subject=t.subject,this._user!==null&&this._setLoginStatus(B.LOGGED_IN,e)}else this._loginStatus===B.LOGGED_IN&&this._setLoginStatus(B.LOGGING_OUT),this._setLoggedOut()}_setLoggedOut(){this.name=``,this.token=``,this.subject=``,this._userId=``,this._user=null,this._setLoginStatus(B.LOGGED_OUT)}_getKCWrapper(){if(!this._kcwrapper)throw Error(`Keycloak wrapper is not initialized`);return this._kcwrapper}sendSetPropertyEvents(){let e={"login-status":this._loginStatus,subject:this.subject,token:this.token,"user-full-name":this.name,"user-id":this._userId,"person-id":this._userId,person:this._user,_roles:this._user?this._user.roles:[]};this.sendSetPropertyEvent(`auth`,e)}_setLoginStatus(e,t){(this._loginStatus!==e||t)&&(this._loginStatus=e,this.sendSetPropertyEvents())}static get properties(){return{...super.properties,lang:{type:String},forceLogin:{type:Boolean,attribute:`force-login`},tryLogin:{type:Boolean,attribute:`try-login`},entryPointUrl:{type:String,attribute:`entry-point-url`},name:{type:String,attribute:!1},token:{type:String,attribute:!1},subject:{type:String,attribute:!1},_userId:{type:String,attribute:!1},_user:{type:Object,attribute:!1},_loginStatus:{type:String,attribute:!1},keycloakUrl:{type:String,attribute:`url`},realm:{type:String},clientId:{type:String,attribute:`client-id`},silentCheckSsoRedirectUri:{type:String,attribute:`silent-check-sso-redirect-uri`},scope:{type:String},idpHint:{type:String,attribute:`idp-hint`},requestedLoginStatus:{type:String,attribute:`requested-login-status`},noCheckLoginIframe:{type:Boolean,attribute:`no-check-login-iframe`}}}connectedCallback(){if(super.connectedCallback(),!this.keycloakUrl)throw Error(`url not set`);if(!this.realm)throw Error(`realm not set`);if(!this.clientId)throw Error(`client-id not set`);this._kcwrapper=new z(this.keycloakUrl,this.realm,this.clientId,this.silentCheckSsoRedirectUri,!this.noCheckLoginIframe,this.idpHint),this._kcwrapper.addEventListener(`changed`,this._onKCChangedListener),(async()=>{let e=this._getKCWrapper();try{this.forceLogin||e.isLoggingIn()?(this._setLoginStatus(B.LOGGING_IN),await e.login({lang:this.lang,scope:this.scope||``})):this.tryLogin?(this._setLoginStatus(B.LOGGING_IN),await e.tryLogin(),this._authenticated||this._setLoginStatus(B.LOGGED_OUT)):this._setLoginStatus(B.LOGGED_OUT)}catch(e){throw this._setLoginStatus(B.LOGGED_OUT),v({summary:this._i18n.t(`login-failed`),type:`danger`,timeout:5}),e}})()}disconnectedCallback(){let e=this._getKCWrapper();e.close(),e.removeEventListener(`changed`,this._onKCChangedListener),super.disconnectedCallback()}},H=class extends l(h(m(g),O)){constructor(){super(),this.closeDropdown=this.closeDropdown.bind(this),this.onWindowResize=this.onWindowResize.bind(this)}static get scopedElements(){return{"dbp-icon":e}}onWindowResize(){this.updateDropdownWidth()}connectedCallback(){super.connectedCallback(),window.addEventListener(`resize`,this.onWindowResize),document.addEventListener(`click`,this.closeDropdown)}disconnectedCallback(){window.removeEventListener(`resize`,this.onWindowResize),document.removeEventListener(`click`,this.closeDropdown),super.disconnectedCallback()}updateDropdownWidth(){let e=this.renderRoot.querySelector(`div.dropdown-menu`);if(!e)return;let t=this.getBoundingClientRect(),n=window.innerWidth-t.left;e.setAttribute(`style`,`width: ${n-20}px`)}onLoginClicked(e){this.sendSetPropertyEvent(`requested-login-status`,B.LOGGED_IN),e.preventDefault()}onLogoutClicked(e){this.sendSetPropertyEvent(`requested-login-status`,B.LOGGED_OUT)}static get styles(){return c`
${o()}
:host {
display: inline-block;
}
a {
color: var(--dbp-content);
fill: var(--dbp-content);
cursor: pointer;
text-decoration: none;
display: block;
}
input::-moz-focus-inner {
border: 0;
}
:focus-visible {
outline: none !important;
outline-width: 0 !important;
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: 0px 0px 4px 2px var(--dbp-primary);
}
.dropdown.is-active .dropdown-menu,
.dropdown.is-hoverable:hover .dropdown-menu {
display: block;
}
.dropdown-menu {
display: none;
min-width: 5em;
max-width: 25em;
position: absolute;
z-index: 20;
border: var(--dbp-border);
border-radius: 0px;
overflow: hidden;
background-color: var(--dbp-background);
}
.dropdown-content {
padding-bottom: 0.5rem;
padding-top: 0.5rem;
}
.menu a {
/*padding: 0.3em;*/
font-weight: 400;
color: var(--dbp-content);
display: block;
text-decoration: none;
}
.menu a:hover {
color: var(--dbp-hover-color, var(--dbp-content));
background-color: var(--dbp-hover-background-color);
}
.menu a.selected {
color: var(--dbp-on-secondary-surface);
background-color: var(--dbp-secondary-surface);
}
.dropdown-item {
color: var(--dbp-muted);
display: block;
font-size: 0.875rem;
line-height: 1.5;
padding: 0.375rem 1rem;
margin-left: 0.5em;
margin-right: 0.5em;
padding-left: 0.5em;
padding-right: 0.5em;
position: relative;
}
.dropdown {
cursor: pointer;
}
a.dropdown-item {
width: initial !important;
}
.main-button {
min-width: 150px;
}
.menu-icon {
height: 1em;
width: 1em;
vertical-align: -0.1rem;
}
.login-box svg {
width: 1.1em;
height: 1.1em;
display: flex;
}
.login-button {
padding: 0.3em 0.4em;
transition:
background-color 0.15s,
color 0.15s;
}
.login-button:hover {
color: var(--dbp-hover-color, var(--dbp-content));
background-color: var(--dbp-hover-background-color);
cursor: pointer;
transition: none;
}
.login-box {
display: flex;
align-items: center;
}
.login-box:hover svg path {
fill: var(--dbp-hover-color);
}
.login-box .label {
padding-left: 0.2em;
}
.dropdown-trigger {
display: flex;
align-items: center;
}
.dropdown-trigger .name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
margin-right: 0.5em;
}
`}setChevron(e){let t=this.renderRoot.querySelector(`#menu-chevron-icon`);t!==null&&t.setAttribute(`name`,e)}onDropdownClick(e){e.stopPropagation(),e.currentTarget.classList.toggle(`is-active`),this.setChevron(e.currentTarget.classList.contains(`is-active`)?`chevron-up`:`chevron-down`),this.updateDropdownWidth()}closeDropdown(){this.renderRoot.querySelectorAll(`.dropdown`).forEach(function(e){e.classList.remove(`is-active`)}),this.setChevron(`chevron-down`)}renderLoggedIn(){let e=this._i18n;return i`
<div class="dropdown" @click="${this.onDropdownClick}">
<a href="#">
<div class="dropdown-trigger login-button">
<div class="name">${this.auth?.[`user-full-name`]??``}</div>
<dbp-icon
class="menu-icon"
name="chevron-down"
id="menu-chevron-icon"></dbp-icon>
</div>
</a>
<div class="dropdown-menu" id="dropdown-menu2" role="menu">
<div class="dropdown-content" @blur="${this.closeDropdown}">
<div class="menu">
<a href="#" @click="${this.onLogoutClicked}" class="dropdown-item">
${e.t(`logout`)}
</a>
</div>
</div>
</div>
</div>
`}renderLoggedOut(){let e=this._i18n;return i`
<a href="#" @click="${this.onLoginClicked}">
<div class="login-box login-button">
<div class="icon" aria-hidden="true">${A(`
<svg
viewBox="0 0 100 100"
y="0px"
x="0px"
id="icon"
role="img"
version="1.1">
<g
id="g6">
<path
style="stroke-width:1.33417916"
id="path2"
d="m 42.943908,38.894934 5.885859,6.967885 H 5.4215537 c -1.8393311,0 -3.4334181,1.741972 -3.4334181,4.064599 0,2.322628 1.4714649,4.064599 3.4334181,4.064599 H 48.829767 L 42.943908,60.9599 c -1.348843,1.596808 -1.348843,4.064599 0,5.661406 1.348843,1.596808 3.433418,1.596808 4.782261,0 L 61.705085,49.927418 47.726169,33.378693 c -1.348843,-1.596806 -3.433418,-1.596806 -4.782261,0 -1.348843,1.596807 -1.348843,4.064599 0,5.516241 z" />
<path
id="path4"
d="m 50,2.3007812 c -18.777325,0 -35.049449,10.9124408 -42.8261719,26.7246098 H 13.390625 C 20.672112,16.348362 34.336876,7.8007812 50,7.8007812 73.3,7.8007812 92.300781,26.7 92.300781,50 92.300781,73.3 73.3,92.300781 50,92.300781 c -15.673389,0 -29.345175,-8.60579 -36.623047,-21.326172 H 7.1640625 C 14.942553,86.8272 31.242598,97.800781 50.099609,97.800781 76.399609,97.800781 97.900391,76.4 97.900391,50 97.800391,23.7 76.3,2.3007812 50,2.3007812 Z" />
</g>
</svg>
`)}</div>
<div class="label">${e.t(`login`)}</div>
</div>
</a>
`}render(){return i`
<div class="authbox">
${this.isLoggedIn()?this.renderLoggedIn():this.renderLoggedOut()}
</div>
`}},U={"color-mode":`Farbmodus ändern`,"demo-title":`Theme Switcher Demo`,intro:`Mit dem Theme-Switcher können Sie zwischen unterschiedlichen Farb-Themes umschalten.`},ae={"color-mode":`Change color mode`,"demo-title":`Theme Switcher Demo`,intro:`With the theme-switcher you can switch between multiple themes.`};function oe(){return s({en:ae,de:U},`de`,`en`)}var se=class extends h(m(g),oe){constructor(){super(),this.themes=[],this.boundCloseAdditionalMenuHandler=this.hideModeMenu.bind(this),this.detectBrowserDarkMode=!1,this.darkModeClass=`dark-theme`,this.langDir=``,this.dropdownRight=!1,this.darkModeThemeOverride=null}static get properties(){return{...super.properties,themes:{type:Array,attribute:`themes`},darkModeThemeOverride:{type:String,attribute:`dark-mode-theme-override`},dropdownRight:{type:Boolean,attribute:`dropdown-right`},langDir:{type:String,attribute:`lang-dir`}}}static get scopedElements(){return{"dbp-icon":e}}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.darkModeThemeOverride===null?this.detectBrowserDarkMode=!0:this.darkModeThemeOverride===``?this.detectBrowserDarkMode=!1:(this.detectBrowserDarkMode=!0,this.darkModeClass=this.darkModeThemeOverride),this.loadTheme(`light-theme`),this.detectInitialMode()}),this.langDir&&d(this._i18n,this)}detectInitialMode(){let e=localStorage.getItem(`prefered-color-mode`);if(e){let t=this.themes.find(t=>t.class===e);t&&this.loadTheme(t.class);return}if(this.detectBrowserDarkMode&&window.matchMedia(`(prefers-color-scheme: dark)`).matches){let e=this.themes.find(e=>e.class===this.darkModeClass);e&&this.loadTheme(e.class)}}toggleModeMenu(){let e=this.renderRoot.querySelector(`.mode-button`);if(!e)return;e.classList.contains(`active`)?e.classList.remove(`active`):e.classList.add(`active`);let t=this.renderRoot.querySelector(`ul.extended-menu`);t!==null&&(t.classList.toggle(`hidden`),t.classList.contains(`hidden`)?document.removeEventListener(`click`,this.boundCloseAdditionalMenuHandler):(document.addEventListener(`click`,this.boundCloseAdditionalMenuHandler),this.initateOpenAdditionalMenu=!0))}hideModeMenu(){if(this.initateOpenAdditionalMenu){this.initateOpenAdditionalMenu=!1;return}let e=this.renderRoot.querySelector(`ul.extended-menu`);e&&!e.classList.contains(`hidden`)&&this.toggleModeMenu()}loadTheme(e){let t=this.renderRoot.querySelector(`.button-`+e),n=this.renderRoot.querySelectorAll(`.button-theme`),r=this.ownerDocument.body;t!==null&&n.length!==0&&r!==null&&(n.forEach(e=>e.classList.remove(`active`)),t.classList.add(`active`),r.classList.contains(e)||(this.themes.forEach(e=>{r.classList.remove(e.class)}),r.classList.add(e)))}saveTheme(e){let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=window.matchMedia(`(prefers-color-scheme: light)`);e===`light-theme`&&n.matches||e===this.darkModeClass&&t.matches?localStorage.removeItem(`prefered-color-mode`):localStorage.setItem(`prefered-color-mode`,e)}static get styles(){return c`
${o()}
${y()}
${p()}
mode-button, button.button {
border: none;
}
.active,
.extended-menu li a.active dbp-icon {
color: var(--dbp-accent);
}
.active {
font-weight: bolder;
}
a:hover:not(.active),
.extended-menu li a:hover:not(.active) {
color: var(--dbp-hover-color, var(--dbp-content));
background-color: var(--dbp-hover-background-color);
transition: none;
}
a {
padding: 0.3em;
display: inline-block;
text-decoration: none;
transition:
background-color 0.15s,
color 0.15s;
color: var(--dbp-content);
}
.extended-menu {
list-style: none;
border: var(--dbp-border);
position: absolute;
background-color: var(--dbp-background);
z-index: 1000;
border-radius: var(--dbp-border-radius);
}
.extended-menu li {
text-align: left;
min-width: 160px;
}
.extended-menu li a {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 12px 15px;
width: 100%;
box-sizing: border-box;
text-align: left;
color: var(--dbp-content);
background: none;
display: block;
}
.icon {
margin-right: 10px;
}
#theme-menu {
position: relative;
}
.ul-right {
right: 0px;
}
`}render(){let e=this._i18n;return i`
<div id="theme-menu" class="${x({hidden:this.themes.length<=1})}">
<a
href="#"
class="mode-button"
role="button"
aria-haspopup="true"
aria-label="${e.t(`color-mode`)}"
@click="${e=>{this.toggleModeMenu(),e.preventDefault()}}">
<dbp-icon name="contrast" aria-hidden="true" focusable="false"></dbp-icon>
</a>
<ul class="extended-menu hidden ${x({"ul-right":this.dropdownRight})}">
${this.themes.map(e=>i`
<li class="" id="${e.class}">
<a
href="#"
class="button-theme button-${e.class}"
@click="${t=>{this.loadTheme(e.class),this.saveTheme(e.class),t.preventDefault()}}"
title="${e.name}">
<dbp-icon class="icon" name="${e.icon}"></dbp-icon>
${e.name}
</a>
</li>
`)}
</ul>
</div>
`}},ce=class extends g{constructor(){super(),this._observer=null,this._dark=!1}static get properties(){return{...super.properties,_dark:{type:Boolean}}}static get styles(){return c`
.hidden {
display: none;
}
`}connectedCallback(){super.connectedCallback(),this._observer=new MutationObserver(()=>{this._dark=document.body.classList.contains(`dark-theme`)}),this._observer.observe(document.body,{attributes:!0,attributeFilter:[`class`]})}disconnectedCallback(){this._observer.disconnect(),this._observer=null,super.disconnectedCallback()}render(){return i`
<slot class="${x({hidden:this._dark})}" name="light"></slot>
<slot class="${x({hidden:!this._dark})}" name="dark"></slot>
`}};
/*! Path-to-RegExp | MIT License | https://github.com/pillarjs/path-to-regexp */const W=e=>e,G=/^[$_\p{ID_Start}]$/u,K=/^[$\u200c\u200d\p{ID_Continue}]$/u,q=`https://git.new/pathToRegexpError`,le={"{":`{`,"}":`}`,"(":`(`,")":`)`,"[":`[`,"]":`]`,"+":`+`,"?":`?`,"!":`!`};function ue(e){return e.replace(/[{}()\[\]+?!:*]/g,`\\$&`)}function J(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,`\\$&`)}function*de(e){let t=[...e],n=0;function r(){let e=``;if(G.test(t[++n]))for(e+=t[n];K.test(t[++n]);)e+=t[n];else if(t[n]===`"`){let r=n;for(;n<t.length;){if(t[++n]===`"`){n++,r=0;break}t[n]===`\\`?e+=t[++n]:e+=t[n]}if(r)throw TypeError(`Unterminated quote at ${r}: ${q}`)}if(!e)throw TypeError(`Missing parameter name at ${n}: ${q}`);return e}for(;n<t.length;){let e=t[n],i=le[e];if(i)yield{type:i,index:n++,value:e};else if(e===`\\`)yield{type:`ESCAPED`,index:n++,value:t[n++]};else if(e===`:`){let e=r();yield{type:`PARAM`,index:n,value:e}}else if(e===`*`){let e=r();yield{type:`WILDCARD`,index:n,value:e}}else yield{type:`CHAR`,index:n,value:t[n++]}}return{type:`END`,index:n,value:``}}var fe=class{constructor(e){this.tokens=e}peek(){if(!this._peek){let e=this.tokens.next();this._peek=e.value}return this._peek}tryConsume(e){let t=this.peek();if(t.type===e)return this._peek=void 0,t.value}consume(e){let t=this.tryConsume(e);if(t!==void 0)return t;let{type:n,index:r}=this.peek();throw TypeError(`Unexpected ${n} at ${r}, expected ${e}: ${q}`)}text(){let e=``,t;for(;t=this.tryConsume(`CHAR`)||this.tryConsume(`ESCAPED`);)e+=t;return e}},Y=class{constructor(e){this.tokens=e}};function X(e,t={}){let{encodePath:n=W}=t,r=new fe(de(e));function i(e){let t=[];for(;;){let a=r.text();a&&t.push({type:`text`,value:n(a)});let o=r.tryConsume(`PARAM`);if(o){t.push({type:`param`,name:o});continue}let s=r.tryConsume(`WILDCARD`);if(s){t.push({type:`wildcard`,name:s});continue}if(r.tryConsume(`{`)){t.push({type:`group`,tokens:i(`}`)});continue}return r.consume(e),t}}return new Y(i(`END`))}function pe(e,t={}){let{encode:n=encodeURIComponent,delimiter:r=`/`}=t,i=me((e instanceof Y?e:X(e,t)).tokens,r,n);return function(e={}){let[t,...n]=i(e);if(n.length)throw TypeError(`Missing parameters: ${n.join(`, `)}`);return t}}function me(e,t,n){let r=e.map(e=>he(e,t,n));return e=>{let t=[``];for(let n of r){let[r,...i]=n(e);t[0]+=r,t.push(...i)}return t}}function he(e,t,n){if(e.type===`text`)return()=>[e.value];if(e.type===`group`){let r=me(e.tokens,t,n);return e=>{let[t,...n]=r(e);return n.length?[``]:[t]}}let r=n||W;return e.type===`wildcard`&&n!==!1?n=>{let i=n[e.name];if(i==null)return[``,e.name];if(!Array.isArray(i)||i.length===0)throw TypeError(`Expected "${e.name}" to be a non-empty array`);return[i.map((t,n)=>{if(typeof t!=`string`)throw TypeError(`Expected "${e.name}/${n}" to be a string`);return r(t)}).join(t)]}:t=>{let n=t[e.name];if(n==null)return[``,e.name];if(typeof n!=`string`)throw TypeError(`Expected "${e.name}" to be a string`);return[r(n)]}}function ge(e,t={}){let{decode:n=decodeURIComponent,delimiter:r=`/`}=t,{regexp:i,keys:a}=_e(e,t),o=a.map(e=>n===!1?W:e.type===`param`?n:e=>e.split(r).map(n));return function(e){let t=i.exec(e);if(!t)return!1;let n=t[0],r=Object.create(null);for(let e=1;e<t.length;e++){if(t[e]===void 0)continue;let n=a[e-1],i=o[e-1];r[n.name]=i(t[e])}return{path:n,params:r}}}function _e(e,t={}){let{delimiter:n=`/`,end:r=!0,sensitive:i=!1,trailing:a=!0}=t,o=[],s=[],c=i?``:`i`,l=(Array.isArray(e)?e:[e]).map(e=>e instanceof Y?e:X(e,t));for(let{tokens:e}of l)for(let t of Z(e,0,[])){let e=ve(t,n,o);s.push(e)}let u=`^(?:${s.join(`|`)})`;return a&&(u+=`(?:${J(n)}$)?`),u+=r?`$`:`(?=${J(n)}|$)`,{regexp:new RegExp(u,c),keys:o}}function*Z(e,t,n){if(t===e.length)return yield n;let r=e[t];if(r.type===`group`){let i=n.slice();for(let n of Z(r.tokens,0,i))yield*Z(e,t+1,n)}else n.push(r);yield*Z(e,t+1,n)}function ve(e,t,n){let r=``,i=``,a=!0;for(let o=0;o<e.length;o++){let s=e[o];if(s.type===`text`){r+=J(s.value),i+=s.value,a||=s.value.includes(t);continue}if(s.type===`param`||s.type===`wildcard`){if(!a&&!i)throw TypeError(`Missing text after "${s.name}": ${q}`);s.type===`param`?r+=`(${ye(t,a?``:i)}+)`:r+=`([\\s\\S]+)`,n.push(s),i=``,a=!1;continue}}return r}function ye(e,t){return t.length<2?e.length<2?`[^${J(e+t)}]`:`(?:(?!${J(e)})[^${J(t)}])`:e.length<2?`(?:(?!${J(t)})[^${J(e)}])`:`(?:(?!${J(t)}|${J(e)})[\\s\\S])`}function be(e){return e.tokens.map(function e(t,n,r){if(t.type===`text`)return ue(t.value);if(t.type===`group`)return`{${t.tokens.map(e).join(``)}}`;let i=xe(t.name)&&Se(r[n+1])?t.name:JSON.stringify(t.name);if(t.type===`param`)return`:${i}`;if(t.type===`wildcard`)return`*${i}`;throw TypeError(`Unexpected token: ${t}`)}).join(``)}function xe(e){let[t,...n]=e;return G.test(t)?n.every(e=>K.test(e)):!1}function Se(e){return e?.type!==`text`||!K.test(e.value[0])}function Ce(e){try{return decodeURIComponent(e)}catch{return e}}function we(e,t,n,r,i){let a,o,s=0;return{next(c){if(e===c)return{done:!0,value:!1};if(!a){let o=e,s=!o.children;if(o.match||=ge(o.path||``,{end:s,...n}),a=o.match(r),a){let{path:n}=a;return a.path=!s&&n.charAt(n.length-1)===`/`?n.substr(1):n,a.params={...i,...a.params},{done:!1,value:{route:e,baseUrl:t,path:a.path,params:a.params}}}}if(a&&e.children)for(;s<e.children.length;){if(!o){let i=e.children[s];i.parent=e,o=we(i,t+a.path,n,r.substr(a.path.length),a.params)}let i=o.next(c);if(!i.done)return{done:!1,value:i.value};o=null,s++}return{done:!0,value:!1}}}}function Te(e,t){if(typeof e.route.action==`function`)return e.route.action(e,t)}function Ee(e,t){let n=t;for(;n;)if(n=n.parent,n===e)return!0;return!1}var De=class{constructor(e,t){if(!e||typeof e!=`object`)throw TypeError(`Invalid routes`);this.options={decode:Ce,...t},this.baseUrl=this.options.baseUrl||``,this.root=Array.isArray(e)?{path:``,children:e,parent:null}:e,this.root.parent=null}resolve(e){let t={router:this,...this.options.context,...typeof e==`string`?{pathname:e}:e},n=we(this.root,this.baseUrl,this.options,t.pathname.substr(this.baseUrl.length)),r=this.options.resolveRoute||Te,i,a,o=t;function s(e,c=!i.done&&i.value.route,l){let u=l===null&&!i.done&&i.value.route;if(i=a||n.next(u),a=null,!e&&(i.done||!Ee(c,i.value.route)))return a=i,Promise.resolve(null);if(i.done){let e=/* @__PURE__ */ Error(`Route not found`);return e.status=404,Promise.reject(e)}return o={...t,...i.value},Promise.resolve(r(o,i.value.params)).then(t=>t??s(e,c,t))}return t.next=s,Promise.resolve().then(()=>s(!0,this.root)).catch(e=>{if(this.options.errorHandler)return this.options.errorHandler(e,o);throw e})}};function Oe(e,t,n,r,i){if(t.name&&r&&e.has(r))throw Error(`Route "${r}" already exists`);if(t.name&&r&&e.set(r,t),n)for(let a=0;a<n.length;a++){let o=n[a],s=o.name;o.parent=t,Oe(e,o,o.children,r&&i?s?r+i+s:r:s,i)}}function ke(e,t){if(!e)throw ReferenceError(`Router is not defined`);let n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map,i={encode:encodeURIComponent,...t};return(t,a)=>{let o=n.get(t);if(!o&&(n.clear(),r.clear(),Oe(n,e.root,e.root.children,e.root.name,i.uniqueRouteNameSep),o=n.get(t),!o))throw Error(`Route "${t}" not found`);let s=r.get(o);if(!s){let e=``,t=o;for(;t;){let n=Array.isArray(t.path)?t.path[0]:t.path;n&&(e=(n instanceof Y?be(n):n)+e),t=t.parent}let n=X(e,i),a=pe(e,i),c=Object.create(null);for(let e=0;e<n.tokens.length;e++){let t=n.tokens[e];t&&t.type!==`text`&&(t.type===`group`?c[String(e)]=!0:c[t.name]=!0)}s={toPath:a,keys:c},r.set(o,s)}let c=e.baseUrl+s.toPath(a)||`/`;if(i.stringifyQueryParams&&a){let e={},t=Object.keys(a);for(let n=0;n<t.length;n++){let r=t[n];r&&!s.keys[r]&&a[r]!=null&&(e[r]=a[r])}let n=i.stringifyQueryParams(e);n&&(c+=n.charAt(0)===`?`?n:`?${n}`)}return c}}function Q(e,t){return JSON.stringify(e,Object.keys(e).sort())===JSON.stringify(t,Object.keys(t).sort())}var Ae=class{constructor(e,t,n){this.getState=t.getState,this.setState=t.setState,this.getDefaultState=t.getDefaultState,this.routeName=t.routeName,console.assert(!!this.getState),console.assert(!!this.setState),console.assert(!!this.getDefaultState),console.assert(!!this.routeName),this.router=new De(e,n),window.addEventListener(`popstate`,e=>{this.setStateFromCurrentLocation(),this._dispatchLocationChanged()})}async _getStateForPath(e){if(e.replace(/\/$/,``)===this.router.baseUrl.replace(/\/$/,``))return this.getDefaultState();let t=await this.router.resolve({pathname:e});if(t==null)throw Error(`No route found for ${e}`);return t}async setStateFromCurrentLocation(){let e;try{e=await this._getStateForPath(location.pathname)}catch{return}this.setState(e)}async update(){await new Promise(e=>setTimeout(e));let e;try{e=await this._getStateForPath(location.pathname)}catch{return}if(!Q(this.getState(),e)){let e=this.getPathname(),t=location.href;window.history.pushState({},``,e),this._dispatchLocationChanged(t)}}async updateFromUrl(e){let t=new URL(e,location.href),n=t.pathname,r;try{r=await this._getStateForPath(n)}catch{return}let i=this.getState(),a=n+t.search+t.hash,o=location.pathname+location.search+location.hash;if(!Q(i,r)||o!==a){let e=location.href;window.history.pushState({},``,a),Q(i,r)||this.setState(r),this._dispatchLocationChanged(e)}}getPathname(e){let t=this.getState();e===void 0&&(e={});let n={...t,...e};try{return ke(this.router)(this.routeName,n)}catch{return location.pathname}}_dispatchLocationChanged(e=``){window.dispatchEvent(new CustomEvent(`locationchanged`,{detail:{referrerUrl:e},bubbles:!0}))}},je=class extends g{constructor(){super(),this.env=``,this.gitInfo=``,this.buildUrl=``,this.buildTime=``}static get properties(){return{...super.properties,env:{type:String},buildUrl:{type:String,attribute:`build-url`},buildTime:{type:String,attribute:`build-time`},gitInfo:{type:String,attribute:`git-info`}}}static get styles(){return c`
${o()}
${y()}
${t()}
:host {
display: inline-block;
}
`}render(){let e=new Date(this.buildTime);return i`
<a href="${this.buildUrl}" style="float: right">
<div class="tags has-addons" title="Build Time: ${e.toString()}">
<span class="tag is-light">build</span>
<span class="tag is-dark">${this.gitInfo} (${this.env})</span>
</div>
</a>
`}},Me=class e extends h(m(_),O){constructor(){super(),this._onVisibilityChanged=this._onVisibilityChanged.bind(this)}static set app(e){this._app=e}static get styles(){return c`
${o()}
${y()}
p {
line-height: 1.8em;
}
.item {
padding-top: 0.5em;
}
.description {
padding-left: 2em;
font-style: italic;
margin-top: -1px;
line-height: initial;
}
h2 a:hover {
color: var(--dbp-hover-color, var(--dbp-content));
background-color: var(--dbp-hover-background-color);
}
h2 a {
cursor: pointer;
text-decoration: none;
}
h2 a {
white-space: nowrap;
}
h2 a > span {
white-space: normal;
padding-right: 5px;
}
h2 a::after {
content: '\\00a0\\00a0';
background-color: var(--dbp-content);
-webkit-mask-image: url('data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20version%3D%221.1%22%20id%3D%22Ebene_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%2014.8%2062.4%22%20style%3D%22enable-background%3Anew%200%200%2014.8%2062.4%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cg%20transform%3D%22translate%28-382.21%20-336.98%29%22%3E%0A%09%3Cg%3E%0A%09%09%3Cpath%20d%3D%22M383%2C380.5c-0.2%2C0-0.4-0.1-0.6-0.3c-0.3-0.3-0.3-0.8%2C0.1-1.1l12.5-10.9l-12.5-10.9c-0.3-0.3-0.4-0.8-0.1-1.1%0A%09%09%09c0.3-0.3%2C0.8-0.4%2C1.1-0.1l13.1%2C11.5c0.2%2C0.2%2C0.3%2C0.4%2C0.3%2C0.6s-0.1%2C0.5-0.3%2C0.6l-13.1%2C11.5C383.4%2C380.4%2C383.2%2C380.5%2C383%2C380.5z%22%2F%3E%0A%09%3C%2Fg%3E%0A%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A');
mask-image: url('data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22utf-8%22%3F%3E%0A%3Csvg%20version%3D%221.1%22%20id%3D%22Ebene_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%0A%09%20viewBox%3D%220%200%2014.8%2062.4%22%20style%3D%22enable-background%3Anew%200%200%2014.8%2062.4%3B%22%20xml%3Aspace%3D%22preserve%22%3E%0A%3Cg%20transform%3D%22translate%28-382.21%20-336.98%29%22%3E%0A%09%3Cg%3E%0A%09%09%3Cpath%20d%3D%22M383%2C380.5c-0.2%2C0-0.4-0.1-0.6-0.3c-0.3-0.3-0.3-0.8%2C0.1-1.1l12.5-10.9l-12.5-10.9c-0.3-0.3-0.4-0.8-0.1-1.1%0A%09%09%09c0.3-0.3%2C0.8-0.4%2C1.1-0.1l13.1%2C11.5c0.2%2C0.2%2C0.3%2C0.4%2C0.3%2C0.6s-0.1%2C0.5-0.3%2C0.6l-13.1%2C11.5C383.4%2C380.4%2C383.2%2C380.5%2C383%2C380.5z%22%2F%3E%0A%09%3C%2Fg%3E%0A%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A');
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-position: center center;
mask-position: center center;
margin: 0 2px 0 0px;
padding: 0;
-webkit-mask-size: 100%;
mask-size: 100%;
}
h2 a:hover::after {
background-color: var(--dbp-hover-color, var(--dbp-content));
}
`}_onVisibilityChanged(){this.requestUpdate()}connectedCallback(){super.connectedCallback(),e._app.addEventListener(`visibility-changed`,this._onVisibilityChanged)}disconnectedCallback(){e._app.removeEventListener(`visibility-changed`,this._onVisibilityChanged),super.disconnectedCallback()}render(){let t=this._i18n,n=e._app,r=[],a=(e,t)=>{e.preventDefault(),n.switchComponent(t.routing_name)};for(let e of n.visibleRoutes){let t=n.metadata[e.name];e.name!==`welcome`&&e.disabled!==!0&&r.push(i`
<div class="item">
<h2>
<a
href="#"
@click=${e=>{a(e,t)}}>
<span>${t.name[this.lang]}</span>
</a>
</h2>
<p class="description">${t.description[this.lang]}</p>
</div>
`)}return i`
<p>
${t.t(`welcome.headline`,{appname:n.topic.name[this.lang]})}
${n.topic.description[this.lang]}
</p>
<br />
${r}
`}};const Ne={element:`dbp-app-shell-welcome`,module_src:``,routing_name:`welcome`,name:{de:`Willkommen`,en:`Welcome`},short_name:{de:`Willkommen`,en:`Welcome`},description:{de:`Willkommen`,en:`Welcome`},visible:!0,required_roles:[],subscribe:`lang`};n(`dbp-app-shell-welcome`,Me);var Pe=class extends _{constructor(){super(),this.endpoint=``,this.siteId=``,this.isRunning=!1,this.lastEvent=[],this.gitInfo=``,this.auth={},this.analyticsEvent={},this.loginStatus=``}static get properties(){return{...super.properties,endpoint:{type:String},siteId:{type:String,attribute:`site-id`},gitInfo:{type:String,attribute:`git-info`},auth:{type:Object},analyticsEvent:{type:Object,attribute:`analytics-event`}}}update(e){e.forEach((e,t)=>{switch(t){case`auth`:{let e=this.auth[`login-status`];this.loginStatus!==e&&(this.setupMatomo(e===B.LOGGED_IN),this.loginStatus=e)}break;case`analyticsEvent`:{if(this.analyticsEvent.category===void 0&&this.analyticsEvent.message===void 0)break;console.log(`MatomoElement(`+this.isRunning+`) analyticsEvent: `+this.analyticsEvent.action+`, `+this.analyticsEvent.message);let e=[`trackEvent`,this.analyticsEvent.category,this.analyticsEvent.action,this.analyticsEvent.name,this.analyticsEvent.value];this.isRunning?this.pushEvent(e):this.lastEvent=e}}}),super.update(e)}render(){return``}setupMatomo(e){if(e&&!this.isRunning){if(this.siteId===``){console.log(`site id missing, skipping matomo...`);return}if(this.endpoint===``){console.log(`endpoint missing, skipping matomo...`);return}console.log(`add matomo...`),this.pushEvent([`setCustomVariable`,1,`GitCommit`,this.gitInfo,`visit`]),this.pushEvent([`enableHeartBeatTimer`]),this.pushEvent([`disableCookies`]),this.pushEvent([`trackPageView`]),this.pushEvent([`enableLinkTracking`]),((e,t)=>{this.pushEvent([`setTrackerUrl`,e+`matomo.php`]),this.pushEvent([`setSiteId`,t]);var n=document.createElement(`script`),r=document.getElementsByTagName(`script`)[0];n.type=`text/javascript`,n.async=!0,n.defer=!0,n.src=e+`matomo.js`,(r?.parentNode??document.head).insertBefore(n,r??null)})(this.endpoint,this.siteId),window.addEventListener(`locationchanged`,e=>{let t=e;this.pushEvent([`setReferrerUrl`,t.detail.referrerUrl]),this.pushEvent([`setCustomUrl`,location.href]),this.pushEvent([`trackPageView`]);let n=document.getElementById(`content`);this.pushEvent([`MediaAnalytics::scanForMedia`,n]),this.pushEvent([`FormAnalytics::scanForForms`,n]),this.pushEvent([`trackContentImpressionsWithinNode`,n])}),window.addEventListener(`error`,e=>{this.pushEvent([`trackEvent`,`Error`,e.error?e.error.message+`
`+e.error.stack:e.message])}),window.addEventListener(`unhandledrejection`,e=>{let t=e.reason;if(e.reason instanceof TypeError){let n=e.reason;t={message:n.message,name:n.name,fileName:n.fileName,lineNumber:n.lineNumber,columnNumber:n.columnNumber,stack:n.stack}}this.pushEvent([`trackEvent`,`UnhandledRejection`,t])}),window.addEventListener(`securitypolicyviolation`,e=>{let t=[`blockedURI`,`columnNumber`,`disposition`,`documentURI`,`effectiveDirective`,`lineNumber`,`originalPolicy`,`referrer`,`sample`,`sourceFile`,`statusCode`,`violatedDirective`],n={};for(let r of t)n[r]=e[r];this.pushEvent([`trackEvent`,`SecurityPolicyViolation`,JSON.stringify(n)])}),this.isRunning=!0,this.lastEvent.length>0&&(console.log(`MatomoElement* (`+this.isRunning+`): `+this.lastEvent[1]+`, `+this.lastEvent[2]),this.pushEvent(this.lastEvent),this.lastEvent=[]);return}!e&&this.isRunning&&(console.log(`remove matomo...`),this.isRunning=!1)}pushEvent(e){let t=window,n=t._paq??=[];e[0]===`trackEvent`&&((e[1]===null||e[1]===``||e[1]===void 0)&&(e[1]=`empty`),e[2]===null||e[2]===``||e[2]===void 0?e[2]=`empty`:typeof e[2]==`object`&&(e[2]=JSON.stringify(e[2]))),n.push(e)}},Fe=class extends g{constructor(){super(),this._isOpen=!1,this._handleOutsideClick=this._handleOutsideClick.bind(this)}static get properties(){return{...super.properties,_isOpen:{type:Boolean,state:!0}}}static get styles(){return c`
${o()}
${y()}
${p()}
:host {
display: inline-block;
font-size: 0.7em;
}
.dropdown {
position: relative;
}
.dropdown-content {
display: none;
position: absolute;
bottom: 100%;
left: 0;
margin-bottom: 5px;
}
.dropdown-content.active {
background-color: var(--dbp-background);
color: var(--dbp-content);
border: solid 1px var(--dbp-muted);
border-radius: var(--dbp-border-radius);
display: flex;
flex-direction: column;
}
.entry {
display: flex;
align-items: center;
white-space: nowrap;
gap: 4px;
padding: 2px 6px;
}
`}connectedCallback(){super.connectedCallback(),document.addEventListener(`click`,this._handleOutsideClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(`click`,this._handleOutsideClick)}_handleOutsideClick(e){e.composedPath().includes(this)||(this._isOpen=!1)}_toggleDropdown(){this.requestUpdate(),this._isOpen=!this._isOpen}_handleCheckboxChange(e){let t=e.target.dataset.key;te(t,e.target.checked),this.requestUpdate()}_isChecked(e){return E(e)}render(){let e=w();return i`
<div class="dropdown">
<button class="button" @click="${this._toggleDropdown}">Feature Flags</button>
<div class="dropdown-content ${this._isOpen?`active`:``}">
${e.length?``:i`
<div class="entry">No feature flags available</div>
`}
${e.map(e=>i`
<div>
<label class="entry">
<input
type="checkbox"
data-key="${e}"
.checked="${this._isChecked(e)}"
@change="${this._handleCheckboxChange}" />
${e}
</label>
</div>
`)}
</div>
</div>
`}};const $=`dbpScrollPosition`;var Ie=class{constructor(e=window){this._browserWindow=e,this._started=!1,this._debug=!1,this._animationFrame=void 0,this._commandedPosition=void 0,this._originalScrollRestoration=e.history.scrollRestoration,this._savePosition=this._savePosition.bind(this),this._handleScroll=this._handleScroll.bind(this),this._handleLocationChanged=this._handleLocationChanged.bind(this)}start(e=!0){this._started||(this._started=!0,`scrollRestoration`in this._browserWindow.history&&(this._browserWindow.history.scrollRestoration=`manual`),this._browserWindow.addEventListener(`scroll`,this._handleScroll,{passive:!0}),this._browserWindow.addEventListener(`pagehide`,this._savePosition),this._browserWindow.addEventListener(`locationchanged`,this._handleLocationChanged),this._log(`start`,{restoreImmediately:e,savedState:this._browserWindow.history.state?.[$]}),e&&this.restore())}stop(){this._started&&(this._cancelRestore(),this._savePosition(),this._browserWindow.removeEventListener(`scroll`,this._handleScroll),this._browserWindow.removeEventListener(`pagehide`,this._savePosition),this._browserWindow.removeEventListener(`locationchanged`,this._handleLocationChanged),`scrollRestoration`in this._browserWindow.history&&(this._browserWindow.history.scrollRestoration=this._originalScrollRestoration),this._started=!1,this._log(`stop`))}_log(...e){this._debug&&console.debug(`[ScrollRestoration]`,...e)}_now(){return this._browserWindow.performance.now()}_getScrollMetrics(){let e=this._browserWindow.document,t=e.scrollingElement??e.documentElement;return{maximumX:Math.max(0,t.scrollWidth-t.clientWidth),maximumY:Math.max(0,t.scrollHeight-t.clientHeight)}}_scrollTo(e,t){this._browserWindow.scrollTo(e,t),this._commandedPosition={x:this._browserWindow.scrollX,y:this._browserWindow.scrollY}}_handleScroll(){let e=this._commandedPosition;e!==void 0&&Math.abs(this._browserWindow.scrollX-e.x)<=8&&Math.abs(this._browserWindow.scrollY-e.y)<=8||(this._animationFrame!==void 0&&(this._log(`user scroll -> cancel restore`),this._cancelRestore()),this._savePosition())}_savePosition(){let e=this._browserWindow.history,t=e.state&&typeof e.state==`object`?e.state:{},n={x:this._browserWindow.scrollX,y:this._browserWindow.scrollY};e.replaceState({...t,[$]:n},``),this._log(`save`,n)}_handleLocationChanged(){this._browserWindow.history.state?.[$]===void 0?(this._log(`locationchanged -> new entry, seeding current position`),this._savePosition()):(this._log(`locationchanged -> restore`),this.restore())}scrollToTopUnlessRestoring(){if(this._browserWindow.history.state?.[$]!==void 0){this._log(`scrollToTopUnlessRestoring -> skipped, saved position present`);return}this._cancelRestore(),this._scrollTo(0,0)}_cancelRestore(){this._animationFrame!==void 0&&(this._browserWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0),this._commandedPosition=void 0}restore(){if(!this._started)return;let e=this._browserWindow.history.state?.[$];if(e===void 0){this._cancelRestore();return}this._cancelRestore(),this._log(`restore: start`,{target:e});let t=this._now(),n=-1,r=t,i=!0,a=()=>{if(this._animationFrame=void 0,i){i=!1,this._scheduleStep(a);return}let o=this._now(),{maximumX:s,maximumY:c}=this._getScrollMetrics(),l=Math.min(e.x,s),u=Math.min(e.y,c);this._scrollTo(l,u);let d=s+c;d!==n&&(n=d,r=o);let f=c>0,p=f&&Math.abs(this._browserWindow.scrollX-e.x)<=8&&Math.abs(this._browserWindow.scrollY-e.y)<=8,m=f&&o-r>=250,h=o-t>=5e3;if(this._log(`restore: frame`,{elapsed:Math.round(o-t),target:{x:l,y:u},actual:{x:this._browserWindow.scrollX,y:this._browserWindow.scrollY},maximumY:c,atGoal:p,sizeSettled:m}),p&&m||h){this._animationFrame=void 0,this._log(`restore: done`,{reason:h?`timeout`:`reached`,elapsed:Math.round(o-t),actual:{x:this._browserWindow.scrollX,y:this._browserWindow.scrollY}});return}this._scheduleStep(a)};this._scheduleStep(a)}_scheduleStep(e){this._animationFrame=this._browserWindow.requestAnimationFrame(e)}};const Le=async(e,t)=>{try{return await t}catch(t){throw console.log(t),v({body:e.t(`page-updated-needs-reload`),type:`info`,icon:`warning`}),t}};var Re=class extends h(m(_),O){constructor(){super(),this.activeView=``,this.src=``,this.entryPointUrl=``,this.subtitle=``,this.description=``,this.routes=[],this.visibleRoutes=[],this.metadata={},this.topic={},this.basePath=`/`,this._router=null,this.keycloakConfig=null,this.noWelcomePage=!1,this.menuHeight=-1,this.gitInfo=``,this.env=``,this.buildUrl=``,this.buildTime=``,this._loginStatus=`unknown`,this._roles=[],this._extra=void 0,this.matomoUrl=``,this.matomoSiteId=-1,this._attrObserver=new MutationObserver(this.onAttributeObserved),this._onShowActivityEvent=this._onShowActivityEvent.bind(this),this._boundHandleActivityEnabled=this._handleActivityEnabled.bind(this),this._activityEnabledOverrides=/* @__PURE__ */ new Map,this.scrollRestoration=new Ie,this.boundCloseMenuHandler=this.hideMenu.bind(this),this._menuHideTimeout=void 0,this.menuOpen=localStorage.getItem(`dbp-app-shell-menu-open`)!==`false`,this.auth=null,this.langDir=``,this.routingBaseUrl=null,this.isScrollTopButtonVisible=!1,this.isScrollBottomButtonVisible=!0,this._titleClickCount=0}static get scopedElements(){return{"dbp-language-select":P,"dbp-build-info":je,"dbp-feature-flag-dropdown":Fe,"dbp-auth-keycloak":V,"dbp-auth-menu-button":H,"dbp-theme-switcher":se,"dbp-themed":ce,"dbp-notification":ne,"dbp-icon":e,"dbp-matomo":Pe}}onAttributeObserved(e,t){for(let t of e)if(t.type===`attributes`){let e=t.attributeName,n=t.target.getAttribute(e);sessionStorage.setItem(`dbp-attr-`+e,n)}}async fetchMetadata(e){let t={},n=[],r=await(await fetch(e,{headers:{"Content-Type":`application/json`}})).json();this.topic=r;let i=async e=>{let t=await fetch(e,{headers:{"Content-Type":`application/json`}});if(!t.ok)throw Error(t.statusText,{cause:t});let n=await t.json();if(n.element===void 0)throw Error(`no element defined in metadata`);return n},a=[];for(let t of r.activities){let n=new URL(t.path,new URL(e,window.location.href).href).href;a.push([t.visible===void 0||t.visible,t.disabled!==void 0&&t.disabled,n,i(n)])}for(let[e,r,i,o]of a)try{let a=await o;a.visible=e,a.disabled=r,a.module_src=new URL(a.module_src,i).href,a.required_roles=a.required_roles||[],t[a.routing_name]=a,n.push(a.routing_name)}catch(e){console.log(e)}this.noWelcomePage||(n.unshift(`welcome`),t=Object.assign(t,{welcome:Ne}),Me.app=this),this.metadata=t,this.routes=n,this._updateVisibleRoutes(),!this.activeView&&this.visibleRoutes.length?this.switchComponent(this.visibleRoutes[0].name):this.switchComponent(this.activeView),await this.updateComplete,this.scrollRestoration.restore(),!this.isMenuFloating()&&this.menuOpen&&this.visibleRoutes.length>0&&this.toggleMenu()}firstUpdated(){super.firstUpdated(),this.src||this.scrollRestoration.restore(),this.updateComplete.then(()=>{this.initializeScrollToTopButton()})}get router(){if(this._router===null)throw Error(`Router has not been initialized`);return this._router}initRouter(){let e=[{path:``,action:e=>({lang:this.lang,component:``,extra:void 0})},{path:`/:lang`,children:[{path:``,action:(e,t)=>({lang:t.lang,component:``,extra:void 0})},{name:`mainRoute`,path:[`/:component{/*extra}`],action:(e,t)=>{let n=t.component.toLowerCase(),r=t.extra??void 0;return{lang:t.lang,component:n,extra:r}}}]}];this._router=new Ae(e,{routeName:`mainRoute`,getState:()=>({component:this.activeView,lang:this.lang,extra:this._extra}),setState:e=>{this.updateLangIfChanged(e.lang),this.switchComponent(e.component),this._extra=e.extra,this.sendRoutingUrl()},getDefaultState:()=>({lang:`de`,component:this.routes[0],extra:void 0})},{baseUrl:new URL(this.basePath,window.location.href).pathname.replace(/\/$/,``)}),this.router.setStateFromCurrentLocation()}sendRoutingUrl(){let e=new URL(this.basePath,window.location.href).href+encodeURIComponent(this.lang)+`/`+encodeURIComponent(this.activeView);this.sendSetPropertyEvent(`routing-base-url`,e,!0);let t=(this._extra??[]).join(`/`);t===``&&(t=`/`);let n=t+window.location.search+window.location.hash;console.log(`sendRoutingUrl routingUrl`,n),this.sendSetPropertyEvent(`routing-url`,n,!0)}static get properties(){return{...super.properties,src:{type:String},basePath:{type:String,attribute:`base-path`},activeView:{type:String,attribute:!1},entryPointUrl:{type:String,attribute:`entry-point-url`},keycloakConfig:{type:Object,attribute:`keycloak-config`},metadata:{type:Object,attribute:!1},visibleRoutes:{type:Array,attribute:!1},topic:{type:Object,attribute:!1},subtitle:{type:String,attribute:!1},description:{type:String,attribute:!1},_loginStatus:{type:Boolean,attribute:!1},_roles:{type:Array,attribute:!1},matomoUrl:{type:String,attribute:`matomo-url`},matomoSiteId:{type:Number,attribute:`matomo-site-id`},noWelcomePage:{type:Boolean,attribute:`no-welcome-page`},gitInfo:{type:String,attribute:`git-info`},buildUrl:{type:String,attribute:`build-url`},buildTime:{type:String,attribute:`build-time`},env:{type:String},auth:{type:Object},langDir:{type:String,attribute:`lang-dir`},routingUrl:{type:String,attribute:`routing-url`},routingBaseUrl:{type:String,attribute:`routing-base-url`},isScrollTopButtonVisible:{type:Boolean,attribute:!1},isScrollBottomButtonVisible:{type:Boolean,attribute:!1},_titleClickCount:{type:Number,attribute:!1}}}connectedCallback(){super.connectedCallback(),this.scrollRestoration.start(!1),this.initRouter(),this.src&&this.fetchMetadata(this.src),this._boundResizeHandler=()=>this.handleResize(),window.addEventListener(`resize`,this._boundResizeHandler),this.addEventListener(`dbp-app-shell-activity-enabled`,this._boundHandleActivityEnabled)}disconnectedCallback(){super.disconnectedCallback(),this.scrollRestoration.stop(),this._boundResizeHandler&&window.removeEventListener(`resize`,this._boundResizeHandler),this.removeEventListener(`dbp-app-shell-activity-enabled`,this._boundHandleActivityEnabled)}updateLangIfChanged(e){let t=this.lang;this._i18n.languages.includes(e)||(e=t),t!==e&&(this.lang=e,this.router.update(),this.sendSetPropertyEvent(`lang`,e,!0))}update(e){e.forEach((e,t)=>{switch(t){case`lang`:document.documentElement.setAttribute(`lang`,this.lang),this.router.update(),this.subtitle=this.activeMetaDataText(`short_name`),this.description=this.activeMetaDataText(`description`),this.dispatchEvent(new CustomEvent(`dbp-lang`,{bubbles:!0,composed:!0,detail:this.lang}));break;case`metadata`:this._updateVisibleRoutes();break;case`auth`:{if(this.auth===null)break;this._roles=this.auth._roles,this._updateVisibleRoutes();let e=this.auth[`login-status`];e!==this._loginStatus&&console.log(`Login status: `+e),e!==void 0&&(this._loginStatus=e),this._loginStatus===`logging-out`&&sessionStorage.clear()}break;case`routingUrl`:this.handleRoutingUrlChange()}}),super.update(e)}handleRoutingUrlChange(){if(!this.activeView||!this.lang||this.lang===``||this.routingUrl===void 0)return;console.log(`handleRoutingUrlChange this.routingUrl`,this.routingUrl);let e=this.routingUrl.startsWith(`/`)?this.routingUrl:`/${this.routingUrl}`,t=this.basePath+this.lang+`/`+this.activeView+e;console.log(`handleRoutingUrlChange fullUrl`,t),this.router.updateFromUrl(t)}isMenuFloating(){let e=this.renderRoot.querySelector(`ul.menu`);return e?window.getComputedStyle(e).position===`fixed`:!1}handleResize(){this.updateMenuIcon(),this.isMenuFloating()&&this.hideMenu()}updateMenuIcon(){let e=this.renderRoot.querySelector(`#mobileMenu`),t=this.renderRoot.querySelector(`#menu-burger-icon`);if(!e||!t)return;let n=!e.hidden&&!e.inert;t.name=n?this.isMenuFloating()?`chevron-up`:`chevron-left`:`menu`,this._updateBodyScrollLock(n)}_updateBodyScrollLock(e){let t=e&&this.isMenuFloating();document.body.style.overflowY=t?`hidden`:``}_setMenuVisibility(e,t){if(window.clearTimeout(this._menuHideTimeout),this._menuHideTimeout=void 0,t){e.hidden=!1,e.inert=!1;return}if(e.inert=!0,!this.isMenuFloating()||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches){e.hidden=!0,e.inert=!1;return}this._menuHideTimeout=window.setTimeout(()=>{e.inert&&(e.hidden=!0,e.inert=!1,this._menuHideTimeout=void 0)},280)}_handleTitleClick(){this._titleClickCount=Math.min(this._titleClickCount+1,7)}onMenuItemClick(e){if(e.preventDefault(),e.currentTarget.hasAttribute(`aria-disabled`)&&e.currentTarget.getAttribute(`aria-disabled`)===`true`)return;if(!e.currentTarget.className.includes(`selected`)){let e=new CustomEvent(`beforeunload`,{bubbles:!0,cancelable:!0});if(!window.dispatchEvent(e))return}let t=e.composedPath()[0].getAttribute(`href`);if(t===null)throw Error(`Menu item has no href`);this.router.updateFromUrl(t),this.hideMenu()}switchComponent(e){let t=e!==this.activeView;if(t&&this.activeView){this._activityEnabledOverrides.delete(this.activeView);let e=this.visibleRoutes.find(e=>e.name===this.activeView);e&&(e.disabled=this.metadata[this.activeView]?.disabled===!0)}this.activeView=e,t&&(this.router.update(),this.scrollRestoration.scrollToTopUnlessRestoring());let n=this.metadata[e];n!==void 0&&(this.updatePageTitle(),this.updatePageMetaDescription(),this.subtitle=this.activeMetaDataText(`short_name`),this.description=this.activeMetaDataText(`description`),n.module_src&&Le(this._i18n,import(n.module_src)).catch(e=>{throw console.error(`Error loading ${n.element}`),e}))}metaDataText(e,t){let n=this.metadata[e];return n!==void 0&&n[t]!==void 0?n[t][this.lang]:``}topicMetaDataText(e){return this.topic[e]===void 0?``:this.topic[e][this.lang]}activeMetaDataText(e){return this.metaDataText(this.activeView,e)}_isRealActivityActive(){return this.activeView&&this.activeView!==`welcome`&&this.metadata[this.activeView]}updatePageTitle(){let e;e=this._isRealActivityActive()?`${this.activeMetaDataText(`short_name`)} | ${this.topicMetaDataText(`short_name`)}`:`${this.topicMetaDataText(`short_name`)}`,document.title=e}updatePageMetaDescription(){let e;e=this._isRealActivityActive()?`${this.activeMetaDataText(`description`)}`:`${this.topicMetaDataText(`description`)}`;let t=document.querySelector(`meta[name="description"]`);t&&t.setAttribute(`content`,e)}toggleMenu(){let e=this.renderRoot.querySelector(`#mobileMenu`),t=this.renderRoot.querySelector(`ul.menu`),n=this.renderRoot.querySelector(`.hd1-left-menu`),r=this.renderRoot.querySelector(`#menu-burger-icon`),i=this.renderRoot.querySelector(`#main`);if(!e||!t)return;let a=!!(e.hidden||e.inert);if(this._setMenuVisibility(e,a),this._updateBodyScrollLock(a),i?.classList.toggle(`menu-open`,a),this.updateMenuIcon(),n?.setAttribute(`aria-expanded`,String(a)),this.menuOpen=a,localStorage.setItem(`dbp-app-shell-menu-open`,String(a)),this._boundCloseMenuHandler&&=(document.removeEventListener(`click`,this._boundCloseMenuHandler),null),this._boundEscHandler&&=(document.removeEventListener(`keydown`,this._boundEscHandler),null),a){let e=e=>{let i=e.composedPath?.()||[];i.includes(t)||i.includes(n)||i.includes(r)||this.hideMenu()};this._boundCloseMenuHandler=e,setTimeout(()=>{document.addEventListener(`click`,e)},0),this._boundEscHandler=e=>{e.key===`Escape`&&this.isMenuFloating()&&(n?.focus(),this.hideMenu())},document.addEventListener(`keydown`,this._boundEscHandler)}}hideMenu(){if(!this.isMenuFloating())return;let e=this.renderRoot.querySelector(`#mobileMenu`),t=this.renderRoot.querySelector(`ul.menu`);if(!e||!t||e.hidden||e.inert)return;let n=this.renderRoot.querySelector(`.hd1-left-menu`);e.matches(`:focus-within`)&&n?.focus(),this._setMenuVisibility(e,!1),this.renderRoot.querySelector(`#main`)?.classList.remove(`menu-open`),this.renderRoot.querySelector(`#menu-burger-icon`)?.setAttribute(`name`,`menu`),n?.setAttribute(`aria-expanded`,`false`),this._updateBodyScrollLock(!1),this.menuOpen=!1,localStorage.setItem(`dbp-app-shell-menu-open`,`false`),this._boundCloseMenuHandler&&=(document.removeEventListener(`click`,this._boundCloseMenuHandler),null),this._boundEscHandler&&=(document.removeEventListener(`keydown`,this._boundEscHandler),null)}initializeScrollToTopButton(){let e=this.renderRoot.querySelector(`#scroll-top`),t=this.renderRoot.querySelector(`#scroll-bottom`);if(!e||!t)return;let n=()=>{let e=document.documentElement.scrollHeight,t=window.scrollY,n=e-(window.scrollY+window.innerHeight);this.isScrollTopButtonVisible=!(t<600),this.isScrollBottomButtonVisible=!(window.scrollY<100||n<600)},r,i=()=>{clearTimeout(r),r=setTimeout(n,100)};window.addEventListener(`scroll`,i,{passive:!0}),i()}_scrollToTop(e){e.preventDefault(),this._(`#main-content`)?.focus({preventScroll:!0}),window.scrollTo({top:0,behavior:`smooth`})}_scrollToBottom(e){e.preventDefault(),this._(`#page-footer`)?.focus({preventScroll:!0}),window.scrollTo({top:document.documentElement.scrollHeight,behavior:`smooth`})}static get styles(){return c`
${o()}
${y()}
${b()}
h1.title {
margin-bottom: 0;
font-weight: 300;
font-size: 2rem;
}
.title {
color: var(--dbp-content);
line-height: 1.125;
}
#main {
display: grid;
grid-template-columns: minmax(0, 1fr);
grid-template-rows: min-content min-content 1fr min-content;
grid-template-areas: 'header' 'headline' 'main' 'footer';
max-width: 1400px;
margin: auto;
min-height: 100vh;
}
/* These are only focusable programmatically (tabindex="-1"), so we don't
want a focus ring around the whole content area or footer */
#main-content:focus,
#page-footer:focus {
outline: none;
}
#main-logo {
padding: 0 50px 0 0;
}
header {
grid-area: header;
display: grid;
grid-template-columns: 50% 0.5em auto;
grid-template-rows: 60px;
grid-template-areas: 'hd1-left hd1-middle hd1-right';
width: 100%;
margin: 0 auto;
}
.mobile-menu {
grid-area: sidebar;
margin: 15px 15px;
}
#headline {
grid-area: headline;
margin: 20px 0 20px 0;
text-align: center;
padding: 0 5px;
}
main {
grid-area: main;
margin: 15px 15px;
}
footer {
grid-area: footer;
margin: 15px;
text-align: right;
align-items: end;
}
header .hd1-left {
display: flex;
flex-direction: row;
justify-content: space-between;
-webkit-justify-content: space-between;
grid-area: hd1-left;
text-align: right;
padding-right: 20px;
padding-left: 15px;
align-items: center;
-webkit-align-items: center;
gap: 10px;
}
.hd1-left-menu {
display: flex;
gap: 10px;
justify-self: center;
align-self: center;
cursor: pointer;
padding: 10px 5px;
margin: -10px -5px;
color: var(--dbp-content);
align-items: baseline;
background: none;
border: none;
font: inherit;
}
.hd1-left-menu:focus-visible {
outline: 2px solid var(--dbp-accent);
outline-offset: 2px;
}
.hd1-left-switches {
display: flex;
min-width: 60px;
justify-content: space-between;
}
header .hd1-middle {
grid-area: hd1-middle;
background-color: var(--dbp-content);
background: linear-gradient(
180deg,
var(--dbp-content) 0%,
var(--dbp-content) 85%,
rgba(0, 0, 0, 0) 90%
);
width: 0.1em;
}
header .hd1-right {
grid-area: hd1-right;
display: flex;
justify-content: space-between;
-webkit-justify-content: space-between;
padding: 0 10px 0 10px;
min-width: 0;
gap: 15px;
align-items: center;
-webkit-align-items: center;
}
header .hd1-right-middle-placeholder .auth-button {
display: none;
}
header .hd1-right .auth-button {
min-width: 0;
max-width: 300px;
}
header .hd1-right .logo {
height: 100%;
overflow: hidden;
flex-grow: 1;
margin-top: 25px;
}
.default-logo {
display: flex;
justify-content: end;
height: 100%;
}
header a {
color: var(--dbp-content);
display: inline;
}
.mobile-menu ul.menu,
footer ul.menu {
list-style: none;
max-height: calc(100vh - 30px);
overflow-y: auto;
}
/* to make the focus indicator visible*/
.mobile-menu ul.menu {
padding: 3px;
}
footer {
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
}
footer > *,
footer slot > * {
margin: 0.5em 0 0 1em;
}
footer a {
border-bottom: var(--dbp-border);
padding: 0;
}
footer a:hover {
color: var(--dbp-hover-color, var(--dbp-content));
background-color: var(--dbp-hover-background-color);
border-color: var(--dbp-hover-color, var(--dbp-content));
}
/* We don't allow inline-svg */
/*
footer .int-link-external::after {
content: "\\00a0\\00a0\\00a0\\00a0";
background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3Ardf%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20height%3D%225.6842mm%22%20width%3D%225.6873mm%22%20version%3D%221.1%22%20xmlns%3Acc%3D%22http%3A%2F%2Fcreativecommons.org%2Fns%23%22%20xmlns%3Adc%3D%22http%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%22%20viewBox%3D%220%200%2020.151879%2020.141083%22%3E%3Cg%20transform%3D%22translate(-258.5%20-425.15)%22%3E%3Cpath%20style%3D%22stroke-linejoin%3Around%3Bstroke%3A%23000%3Bstroke-linecap%3Around%3Bstroke-width%3A1.2%3Bfill%3Anone%22%20d%3D%22m266.7%20429.59h-7.5029v15.002h15.002v-7.4634%22%2F%3E%3Cpath%20style%3D%22stroke-linejoin%3Around%3Bstroke%3A%23000%3Bstroke-linecap%3Around%3Bstroke-width%3A1.2%3Bfill%3Anone%22%20d%3D%22m262.94%20440.86%2015.002-15.002%22%2F%3E%3Cpath%20style%3D%22stroke-linejoin%3Around%3Bstroke%3A%23000%3Bstroke-linecap%3Around%3Bstroke-width%3A1.2%3Bfill%3Anone%22%20d%3D%22m270.44%20425.86h7.499v7.499%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');
background-size:contain;
background-repeat: no-repeat;
background-position:center center;
margin: 0 0.5% 0 1.5%;
font-size:94%;
}
*/
.menu a {
padding: 0.3em;
font-weight: 300;
color: var(--dbp-content);
display: block;
padding-right: 13px;
word-break: break-word;
}
.menu li {
padding: 3px 10px;
}
.menu a:hover {
color: var(--dbp-hover-color, var(--dbp-content));
background-color: var(--dbp-hover-background-color);
}
.menu a.selected {
border-left: 3px solid var(--dbp-accent);
font-weight: bolder;
padding-left: 0.5em;
padding-right: 0.3em;
}
.menu a.menu-disabled {
pointer-events: none;
opacity: 0.5;
border-left: 0 none;
padding-left: 0.3em;
}
a {
transition:
background-color 0.15s ease 0s,
color 0.15s ease 0s;
}
.description {
text-align: left;
margin-bottom: 1rem;
display: none;
}
#dbp-notification {
z-index: 99999;
}
#main.menu-open {
grid-template-columns: 240px minmax(0, 1fr);
grid-template-areas:
'header header'
'headline headline'
'sidebar main'
'footer footer';
}
/* scroll to top*/
.scroll-top-wrapper {
pointer-events: none;
display: flex;
flex-direction: column;
gap: 2px;
z-index: 1000;
position: fixed;
justify-content: center;
bottom: 8rem;
left: 50%;
transform: translateX(1800%);
align-items: center;
pointer-events: none;
}
.scroll-button {
padding: 0.5em;
opacity: 0;
/* Hidden buttons must not be reachable by mouse or keyboard */
visibility: hidden;
pointer-events: none;
color: var(--dbp-background);
font-size: 1.25em;
transition:
opacity 0.3s ease,
color 0.3s ease,
visibility 0.3s ease;
cursor: pointer;
background-color: var(--dbp-accent);
border: none;
}
.scroll-button.visible {
opacity: 1;
visibility: visible;
pointer-events: auto;
}
.hd1-left-switches-aside {
display: none;
}
@media (max-width: 1600px) {
.scroll-top-wrapper {
left: 95%;
transform: translateX(0%);
}
}
@media (max-width: 768px) {
.scroll-top-wrapper {
left: 0%;
right: 2rem;
}
header .hd1-right .logo {
margin-top: 15px;
}
}
@media (max-width: 1100px) {
.scroll-top-wrapper {
left: 90%;
transform: translateX(0%);
}
header .hd1-right {
padding-left: 0px;
}
header .hd1-left {
padding-right: 10px;
}
#main,
#main.menu-open {
grid-template-columns: minmax(0, 1fr);
grid-template-areas: 'header' 'headline' 'main' 'footer';
}
header {
z-index: 2000;
background-color: var(--dbp-background);
}
.mobile-menu {
margin: 0;
}
.mobile-menu ul.menu {
position: fixed;
width: 25vw;
min-width: 250px;
left: 0;
right: auto;
bottom: 0;
height: auto;
top: 3.5rem;
max-height: 100dvh;
margin: 0 0 0 0;
box-sizing: border-box;
overflow-y: auto;
padding-block: 0.5rem 1rem;
padding-inline: 0;
z-index: 1500;
background-color: var(--dbp-background);
color: var(--dbp-content);
transform: translateY(0);
box-shadow: 0px 0px 0.4em rgba(0, 0, 0, 0.2);
transition:
transform 0.28s ease,
box-shadow 0.28s ease;
}
.mobile-menu[inert] ul.menu {
transform: translateY(-110%);
box-shadow: none;
}
@starting-style {
.mobile-menu:not([hidden]) ul.menu {
transform: translateY(-110%);
box-shadow: none;
}
}
@media (prefers-reduced-motion: reduce) {
.mobile-menu ul.menu {
transition: none;
}
}
#main.menu-open {
overflow: hidden;
touch-action: none;
pointer-events: auto;
overflow-y: hidden;
}
.menu a:active {
opacity: 0.8;
}
}
@media (max-width: 490px) {
header {
z-index: 2500;
grid-template-columns: 1fr 1fr 1fr;
gap: 12px;
grid-template-rows: 50px;
}
.mobile-menu ul.menu {
width: 100vw;
z-index: 1000;
top: 3rem;
}
header .hd1-middle {
display: flex;
align-items: center;
justify-content: center;
background: none;
width: auto;
}
header .hd1-right {
padding-bottom: 5px;
}
header .hd1-right .logo {
height: 100%;
margin-top: 10px;
}
header .hd1-right .auth-button {
display: none;
}
header .hd1-right-middle-placeholder {
position: relative;
}
header .hd1-right-middle-placeholder .auth-button {
display: block;
}
.hd1-left-switches {
display: none;
}
.hd1-left-switches-aside {
display: block;
}
.menu-label {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
}
`}_createActivityElement(e){if(this._lastElm!==void 0){if(this._lastElm.tagName.toLowerCase()==e.element.toLowerCase())return this._lastElm;this._onActivityRemoved(this._lastElm),this._lastElm=void 0}this.track(`renderActivity`,e.element),customElements.whenDefined(e.element).then(()=>{let t=customElements.get(e.element);if(!t)throw Error(`Custom element "${e.element}" is not defined`);this.defineScopedElement(e.element,t)});let t=this.createScopedElement(e.element);return this._onActivityAdded(t),this._lastElm=t,t}_onShowActivityEvent(e){this.switchComponent(e.detail.name)}_onActivityAdded(e){for(let t of this.topic.attributes||[]){let n=sessionStorage.getItem(`dbp-attr-`+t);n!==null&&e.setAttribute(t,n)}this._attrObserver.observe(e,{attributes:!0,attributeFilter:this.topic.attributes}),e.addEventListener(`dbp-show-activity`,this._onShowActivityEvent)}_onActivityRemoved(e){this._attrObserver.disconnect(),e.removeEventListener(`dbp-show-activity`,this._onShowActivityEvent)}track(e,t){this.sendSetPropertyEvent(`analytics-event`,{category:e,action:t},!0)}_handleActivityEnabled(e){let t=e.detail?.name,n=e.detail?.enabled;if(t===void 0||n===void 0)return;this._activityEnabledOverrides.set(t,n);let r=this.visibleRoutes.find(e=>e.name===t);r&&(r.disabled=!n,this.requestUpdate())}_renderActivity(){let e=this.metadata[this.activeView];if(e===void 0)return i``;let t=this._createActivityElement(e);return e.subscribe!==void 0&&t.setAttribute(`subscribe`,e.subscribe),t}_updateVisibleRoutes(){let e=[];for(let t of this.routes){let n=this.metadata[t],r=n.required_roles,i=n.visible,a=n.disabled;for(let e of r)if(!this._roles.includes(e)){i=!1;break}i===!0&&e.push({name:t,disabled:a===!0})}this.visibleRoutes=e;for(let e of this.visibleRoutes)this._activityEnabledOverrides.has(e.name)&&(e.disabled=!this._activityEnabledOverrides.get(e.name));let t=new CustomEvent(`visibility-changed`,{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}render(){let e=this._i18n,t=e=>x({selected:this.activeView===e.name,"menu-disabled":e.disabled===!0}),n=this._loginStatus===`unknown`||this._loginStatus===`logging-in`,r=x({hidden:n}),a=x({hidden:!n});n||this.updateComplete.then(()=>{let e=this.renderRoot.querySelector(`slot:not([name])`);e&&e.remove()}),this.updatePageTitle(),this.updatePageMetaDescription();let o=[];for(let e of this.visibleRoutes){let n={component:e.name};this.activeView!==e.name&&(n.extra=void 0),o.push(i`
<li>
<a
@click="${e=>this.onMenuItemClick(e)}"
href="${this.router.getPathname(n)}"
data-nav
aria-disabled=${!!e.disabled}
class="${t(e)}"
title="${this.metaDataText(e.name,`description`)}">
${this.metaDataText(e.name,`short_name`)}
</a>
</li>
`)}let s=this.keycloakConfig;return i`
<slot class="${a}"></slot>
<dbp-auth-keycloak
subscribe="requested-login-status"
lang="${this.lang}"
entry-point-url="${this.entryPointUrl}"
url="${s.url}"
realm="${s.realm}"
client-id="${s.clientId}"
silent-check-sso-redirect-uri="${s.silentCheckSsoRedirectUri||``}"
scope="${s.scope||``}"
idp-hint="${s.idpHint||``}"
?no-check-login-iframe="${s.noCheckLoginIframe??!1}"
?force-login="${s.forceLogin}"
?try-login="${!s.forceLogin}"></dbp-auth-keycloak>
<dbp-matomo
subscribe="auth,analytics-event"
endpoint="${this.matomoUrl}"
site-id="${this.matomoSiteId}"
git-info="${this.gitInfo}"></dbp-matomo>
<div class="${r}" id="root">
<div id="main">
<dbp-notification id="dbp-notification" lang="${this.lang}"></dbp-notification>
<header>
<slot name="header">
<div class="hd1-left">
<button
class="hd1-left-menu"
style="${this.visibleRoutes.length===0?`visibility: hidden`:``}"
@click="${this.toggleMenu}"
type="button"
aria-controls="mobileMenu"
aria-expanded="false">
<dbp-icon
class="burger-menu-icon"
name="menu"
aria-hidden="true"
id="menu-burger-icon"></dbp-icon>
<span class="menu-label">
${this._i18n.t(`main-page.menu`)}
</span>
</button>
<div class="hd1-left-switches">
<dbp-theme-switcher
subscribe="themes,dark-mode-theme-override"
lang="${this.lang}"></dbp-theme-switcher>
<dbp-language-select
id="lang-select"
lang="${this.lang}"></dbp-language-select>
</div>
</div>
<div class="hd1-middle">
<div class="hd1-right-middle-placeholder">
<dbp-auth-menu-button
data-testid="dbp-auth-menu-button"
subscribe="auth"
class="auth-button"
lang="${this.lang}"></dbp-auth-menu-button>
</div>
</div>
<div class="hd1-right">
<dbp-auth-menu-button
data-testid="dbp-auth-menu-button"
subscribe="auth"
class="auth-button"
lang="${this.lang}"></dbp-auth-menu-button>
<div class="logo">
<slot name="logo">
<dbp-themed>
<div slot="light" class="default-logo">
<svg
id="Ebene_1"
data-name="Ebene 1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 400 400">
<defs>
<style>
.cls-1 {
fill: none;
}
.cls-2 {
clip-path: url(#clippath);
}
.cls-3 {
fill: url(#Unbenannter_Verlauf_24-2);
}
.cls-4 {
fill: #002a60;
}
.cls-5 {
fill: #fff;
}
.cls-6 {
clip-path: url(#clippath-1);
}
.cls-7 {
clip-path: url(#clippath-2);
}
.cls-8 {
opacity: 0.23;
}
.cls-9 {
opacity: 0.43;
}
.cls-10 {
fill: url(#Unbenannter_Verlauf_25);
}
.cls-11 {
fill: url(#Unbenannter_Verlauf_23);
}
.cls-12 {
fill: url(#Unbenannter_Verlauf_24);
}
.cls-13 {
fill: url(#Unbenannter_Verlauf_26);
}
.cls-14 {
fill: url(#Unbenannter_Verlauf_29);
}
.cls-15 {
fill: url(#Unbenannter_Verlauf_27);
}
.cls-16 {
fill: url(#Unbenannter_Verlauf_28);
}
.cls-17 {
fill: url(#Unbenannter_Verlauf_22);
}
.cls-18 {
fill: url(#Unbenannter_Verlauf_20);
}
.cls-19 {
fill: url(#Unbenannter_Verlauf_7);
}
.cls-20 {
fill: url(#Unbenannter_Verlauf_21);
opacity: 0.29;
}
.cls-20,
.cls-21,
.cls-22,
.cls-23 {
isolation: isolate;
}
.cls-21 {
fill: url(#Unbenannter_Verlauf_18);
opacity: 0.9;
}
.cls-22 {
fill: url(#Unbenannter_Verlauf_17);
opacity: 0.5;
}
.cls-23 {
fill: url(#Unbenannter_Verlauf_19);
opacity: 0.61;
}
</style>
<clipPath id="clippath">
<rect
class="cls-1"
x="71.91"
y="102.74"
width="197.49"
height="197.49"
transform="translate(-92.48 179.68) rotate(-45)" />
</clipPath>
<linearGradient
id="Unbenannter_Verlauf_24"
data-name="Unbenannter Verlauf 24"
x1="113.84"
y1="-794.55"
x2="113.84"
y2="-1126.95"
gradientTransform="translate(57.31 1166.62)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#c2244e" />
<stop
offset=".03"
stop-color="#b42855" />
<stop
offset=".15"
stop-color="#8a346a" />
<stop
offset=".25"
stop-color="#693d7a" />
<stop
offset=".36"
stop-color="#524486" />
<stop
offset=".45"
stop-color="#44488d" />
<stop
offset=".54"
stop-color="#3f498f" />
<stop
offset=".88"
stop-color="#2c8ae1" />
<stop offset="1" stop-color="#25a1ff" />
</linearGradient>
<linearGradient
id="Unbenannter_Verlauf_29"
data-name="Unbenannter Verlauf 29"
x1="-165.83"
y1="-964.7"
x2="113.75"
y2="-964.7"
gradientTransform="translate(57.31 1166.62)"
gradientUnits="userSpaceOnUse">
<stop
offset=".22"
stop-color="#0051b4" />
<stop
offset="1"
stop-color="#37529c"
stop-opacity="0" />
</linearGradient>
<radialGradient
id="Unbenannter_Verlauf_28"
data-name="Unbenannter Verlauf 28"
cx="9160.09"
cy="-564.48"
fx="9160.09"
fy="-564.48"
r="68.82"
gradientTransform="translate(6760.46 19576.59) rotate(-105.23) scale(2.23 2.04) skewX(.89)"
gradientUnits="userSpaceOnUse">
<stop
offset=".1"
stop-color="#002a60" />
<stop
offset=".32"
stop-color="#042d65"
stop-opacity=".76" />
<stop
offset=".57"
stop-color="#113672"
stop-opacity=".48" />
<stop
offset=".83"
stop-color="#254589"
stop-opacity=".19" />
<stop
offset="1"
stop-color="#37529c"
stop-opacity="0" />
</radialGradient>
<linearGradient
id="Unbenannter_Verlauf_27"
data-name="Unbenannter Verlauf 27"
x1="1979.02"
y1="-1764.25"
x2="1979.02"
y2="-1917.19"
gradientTransform="translate(-1952.58 2473.57) rotate(-9.17) scale(1.25 1)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#c2244e" />
<stop
offset=".54"
stop-color="#703f7c"
stop-opacity=".61" />
<stop
offset=".54"
stop-color="#6e407d"
stop-opacity=".6" />
<stop
offset=".88"
stop-color="#37529c"
stop-opacity="0" />
</linearGradient>
<linearGradient
id="Unbenannter_Verlauf_26"
data-name="Unbenannter Verlauf 26"
x1="1151.48"
y1="791.85"
x2="1138.92"
y2="932.97"
gradientTransform="translate(-1089.46 -1621.51) rotate(4.97) scale(1.22 2.01)"
gradientUnits="userSpaceOnUse">
<stop
offset=".05"
stop-color="#25a1ff" />
<stop
offset=".47"
stop-color="#108fff"
stop-opacity=".74" />
<stop
offset="1"
stop-color="#0037d3"
stop-opacity="0" />
</linearGradient>
<linearGradient
id="Unbenannter_Verlauf_25"
data-name="Unbenannter Verlauf 25"
x1="118.66"
y1="-796.84"
x2="118.66"
y2="-986.06"
gradientTransform="translate(57.31 1166.62)"
gradientUnits="userSpaceOnUse">
<stop
offset=".15"
stop-color="#c2244e" />
<stop
offset=".61"
stop-color="#703f7c"
stop-opacity=".61" />
<stop
offset=".88"
stop-color="#37529c"
stop-opacity="0" />
</linearGradient>
<clipPath id="clippath-1">
<rect
class="cls-1"
x="102.72"
y="102.72"
width="197.51"
height="197.51"
transform="translate(-83.46 201.48) rotate(-45)" />
</clipPath>
<linearGradient
id="Unbenannter_Verlauf_24-2"
data-name="Unbenannter Verlauf 24"
x1="144.67"
y1="1426.07"
x2="144.67"
y2="1758.51"
gradientTransform="translate(57.31 1798.16) scale(1 -1)"
xlink:href="#Unbenannter_Verlauf_24" />
<linearGradient
id="Unbenannter_Verlauf_23"
data-name="Unbenannter Verlauf 23"
x1="217.53"
y1="1716.77"
x2="137.96"
y2="1521.21"
gradientTransform="translate(57.31 1798.16) scale(1 -1)"
gradientUnits="userSpaceOnUse">
<stop
offset=".08"
stop-color="#25a1ff" />
<stop
offset=".23"
stop-color="#1b81d5" />
<stop
offset=".4"
stop-color="#1162ab" />
<stop
offset=".57"
stop-color="#0a4a8a" />
<stop
offset=".72"
stop-color="#043873" />
<stop
offset=".87"
stop-color="#012e65" />
<stop offset="1" stop-color="#002a60" />
</linearGradient>
<radialGradient
id="Unbenannter_Verlauf_22"
data-name="Unbenannter Verlauf 22"
cx="4353.28"
cy="-101.73"
fx="4353.28"
fy="-101.73"
r="182.49"
gradientTransform="translate(-8977.34 -70.94) scale(2.11 -1.56)"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#002a60"
stop-opacity="0" />
<stop
offset=".1"
stop-color="#082a5f"
stop-opacity=".1" />
<stop
offset=".27"
stop-color="#1e295d"
stop-opacity=".27" />
<stop
offset=".47"
stop-color="#43285a"
stop-opacity=".47" />
<stop
offset=".7"
stop-color="#752655"
stop-opacity=".7" />
<stop
offset=".95"
stop-color="#b5244f"
stop-opacity=".95" />
<stop offset="1" stop-color="#c2244e" />
</radialGradient>
<linearGradient
id="Unbenannter_Verlauf_21"
data-name="Unbenannter Verlauf 21"
x1="2393.8"
y1="-9473.74"
x2="2747.55"
y2="-9473.74"
gradientTransform="translate(9117.66 -3987.06) rotate(80.2) scale(1 -1)"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#002a60"
stop-opacity="0" />
<stop
offset=".1"
stop-color="#082a5f"
stop-opacity=".1" />
<stop
offset=".27"
stop-color="#1e295d"
stop-opacity=".27" />
<stop
offset=".47"
stop-color="#43285a"
stop-opacity=".47" />
<stop
offset=".7"
stop-color="#752655"
stop-opacity=".7" />
<stop
offset=".89"
stop-color="#b5244f"
stop-opacity=".95" />
<stop offset="1" stop-color="#c2244e" />
</linearGradient>
<linearGradient
id="Unbenannter_Verlauf_20"
data-name="Unbenannter Verlauf 20"
x1="1466.29"
y1="-43.44"
x2="1453.98"
y2="-141.33"
gradientTransform="translate(-1539.01 -194.46) rotate(4.97) scale(1.22 -2.01)"
gradientUnits="userSpaceOnUse">
<stop
offset=".18"
stop-color="#25a1ff" />
<stop
offset=".46"
stop-color="#1a7cd5"
stop-opacity=".74" />
<stop
offset="1"
stop-color="#37529c"
stop-opacity="0" />
</linearGradient>
<linearGradient
id="Unbenannter_Verlauf_19"
data-name="Unbenannter Verlauf 19"
x1="4295.4"
y1="1392.88"
x2="4304.34"
y2="1306.2"
gradientTransform="translate(1543.83 5899.22) rotate(-76.71) scale(1.22 -2.01)"
gradientUnits="userSpaceOnUse">
<stop
offset=".05"
stop-color="#25a1ff" />
<stop
offset=".28"
stop-color="#1a7cd5"
stop-opacity=".74" />
<stop
offset="1"
stop-color="#37529c"
stop-opacity="0" />
</linearGradient>
<clipPath id="clippath-2">
<rect
id="rect62862-7"
class="cls-1"
x="133.56"
y="102.74"
width="197.49"
height="197.49"
transform="translate(-74.43 223.27) rotate(-45)" />
</clipPath>
<linearGradient
id="Unbenannter_Verlauf_18"
data-name="Unbenannter Verlauf 18"
x1="-1269.43"
y1="584.37"
x2="-1071.94"
y2="584.37"
gradientTransform="translate(1402.98 785.85) scale(1 -1)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#073d84" />
<stop
offset=".84"
stop-color="#003c8b"
stop-opacity=".64" />
<stop
offset="1"
stop-color="#004eb5"
stop-opacity=".6" />
</linearGradient>
<radialGradient
id="Unbenannter_Verlauf_17"
data-name="Unbenannter Verlauf 17"
cx="322.24"
cy="482.42"
fx="322.24"
fy="482.42"
r="98.74"
gradientTransform="translate(275.77 2247.32) rotate(-4.61) scale(.69 -4.38)"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#2295ff"
stop-opacity=".65" />
<stop
offset="1"
stop-color="#2295ff"
stop-opacity="0" />
</radialGradient>
<radialGradient
id="Unbenannter_Verlauf_7"
data-name="Unbenannter Verlauf 7"
cx="774.18"
cy="435.49"
fx="774.18"
fy="435.49"
r="98.74"
gradientTransform="translate(-7732.23 487.42) rotate(16.19) scale(9.86 -6.01)"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
stop-color="#b34d4d"
stop-opacity="0" />
<stop offset="1" stop-color="red" />
</radialGradient>
</defs>
<rect
id="white_background_1"
data-name="white background 1"
class="cls-5"
x="71.91"
y="102.74"
width="197.49"
height="197.49"
transform="translate(-92.48 179.68) rotate(-45)" />
<rect
id="white_background_2"
data-name="white background 2"
class="cls-5"
x="102.72"
y="102.72"
width="197.51"
height="197.51"
transform="translate(-83.46 201.48) rotate(-45)" />
<rect
id="white_background_3"
data-name="white background 3"
class="cls-5"
x="133.56"
y="102.74"
width="197.49"
height="197.49"
transform="translate(-74.43 223.27) rotate(-45)" />
<g class="cls-8">
<g class="cls-2">
<rect
id="rect35896-3-4-6-6-2"
class="cls-4"
x="31.36"
y="16.45"
width="279.59"
height="355.63" />
<rect
id="rect35917-90-7-5-4-2"
class="cls-12"
x="31.36"
y="39.67"
width="279.59"
height="332.41" />
<rect
id="rect35924-9-9-9-42-2"
class="cls-14"
x="-108.52"
y="62.13"
width="279.59"
height="279.59" />
<polygon
id="polygon35937-3-9-0-7-2"
class="cls-16"
points="199.72 410.27 119.89 111.41 397.36 37.26 477.25 336.06 199.72 410.27" />
<polygon
id="polygon35948-65-4-8-5-2"
class="cls-15"
points="11.85 214.45 356.22 158.86 380.63 309.84 36.25 365.42 11.85 214.45" />
<polygon
id="polygon35957-1-3-2-4-2"
class="cls-13"
points="-1.06 12.44 339.71 51.32 321.26 329.76 -19.51 290.79 -1.06 12.44" />
<rect
id="rect35968-1-9-3-10-2"
class="cls-10"
x="-7.66"
y="180.56"
width="367.25"
height="189.22" />
</g>
</g>
<g class="cls-9">
<g class="cls-6">
<rect
id="rect35803-7-5-9-32-2"
class="cls-4"
x="62.17"
y="16.42"
width="279.62"
height="355.67" />
<rect
id="rect35824-0-2-8-75-2"
class="cls-3"
x="62.17"
y="39.65"
width="279.62"
height="332.44" />
<rect
id="rect35826-6-7-8-5-2"
class="cls-4"
x="-24.02"
y="16.66"
width="365.51"
height="365.51" />
<rect
id="rect35843-7-8-8-7-2"
class="cls-11"
x="8.99"
y="-10.46"
width="460.61"
height="358.44" />
<path
id="path35860-8-7-6-4-2"
class="cls-17"
d="M592.99,445.31H-189.74V-260.66H592.99V445.31Z" />
<polygon
id="polygon35877-4-4-8-9-2"
class="cls-20"
points="370.32 -46.84 430.51 301.7 69.12 364.13 8.93 15.54 370.32 -46.84" />
<polygon
id="polygon35886-19-00-4-03-3"
class="cls-18"
points="57.04 4.45 397.85 34.11 371.79 347.98 32.69 246.22 57.04 4.45" />
<polygon
id="polygon35886-19-00-4-03-4"
class="cls-23"
points="-43.83 280.89 19.72 11.82 233.28 54.62 169.67 323.62 -43.83 280.89" />
</g>
</g>
<g class="cls-7">
<rect
id="rect62862-8"
class="cls-21"
x="133.56"
y="102.74"
width="197.49"
height="197.49"
transform="translate(-74.43 223.27) rotate(-45)" />
<rect
id="rect62862"
class="cls-22"
x="133.56"
y="102.74"
width="197.49"
height="197.49"
transform="translate(-74.43 223.27) rotate(-45)" />
<rect
id="rect62862-7-2"
data-name="rect62862-7"
class="cls-19"
x="133.56"
y="102.74"
width="197.49"
height="197.49"
transform="translate(-74.43 223.27) rotate(-45)" />
</g>
</svg>
</div>
<div slot="dark" class="default-logo">
<svg
id="Ebene_2"
data-name="Ebene 2"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 402.96 402.96">
<defs>
<style>
.cls-1 {
fill: url(#Unbenannter_Verlauf_10);
opacity: 0.3;
}
.cls-2 {
fill: url(#Unbenannter_Verlauf_10-2);
opacity: 0.5;
}
.cls-3 {
fill: url(#Unbenannter_Verlauf_10-3);
opacity: 0.85;
}
</style>
<linearGradient
id="Unbenannter_Verlauf_10"
data-name="Unbenannter Verlauf 10"
x1="170.82"
y1="-1500.86"
x2="170.82"
y2="-1780.18"
gradientTransform="translate(-1109.99 1240.71) rotate(45)"
gradientUnits="userSpaceOnUse">
<stop
offset=".01"
stop-color="#bfbfbf" />
<stop offset=".7" stop-color="#fff" />
</linearGradient>
<linearGradient
id="Unbenannter_Verlauf_10-2"
data-name="Unbenannter Verlauf 10"
x1="201.48"
y1="-1500.86"
x2="201.48"
y2="-1780.18"
gradientTransform="translate(-1101.02 1219.03) rotate(45)"
xlink:href="#Unbenannter_Verlauf_10" />
<linearGradient
id="Unbenannter_Verlauf_10-3"
data-name="Unbenannter Verlauf 10"
x1="232.13"
y1="-1500.86"
x2="232.13"
y2="-1780.18"
gradientTransform="translate(-1092.04 1197.36) rotate(45)"
xlink:href="#Unbenannter_Verlauf_10" />
</defs>
<rect
class="cls-1"
x="72.06"
y="102.72"
width="197.51"
height="197.51"
transform="translate(-92.44 179.8) rotate(-45)" />
<rect
class="cls-2"
x="102.72"
y="102.72"
width="197.51"
height="197.51"
transform="translate(-83.46 201.48) rotate(-45)" />
<rect
class="cls-3"
x="133.38"
y="102.72"
width="197.51"
height="197.51"
transform="translate(-74.48 223.16) rotate(-45)" />
</svg>
</div>
</dbp-themed>
</slot>
</div>
</div>
</slot>
</header>
<div id="headline">
<p class="title">
<slot name="title">
${this._isRealActivityActive()?this.topicMetaDataText(`name`):i`
 
`}
</slot>
</p>
<h1 title="${this.description}" @click="${this._handleTitleClick}">
${this._isRealActivityActive()?this.subtitle:this.topicMetaDataText(`name`)}
</h1>
</div>
<nav
id="mobileMenu"
class="mobile-menu"
aria-label="${e.t(`main-page.primary-navigation`)}"
hidden>
<ul class="menu">
${o}
<li class="hd1-left-switches-aside">
<dbp-theme-switcher
subscribe="themes,dark-mode-theme-override"
lang="${this.lang}"></dbp-theme-switcher>
</li>
<li class="hd1-left-switches-aside">
<dbp-language-select
id="lang-select"
lang="${this.lang}"></dbp-language-select>
</li>
</ul>
</nav>
<main id="main-content" tabindex="-1">
<div
style="display: ${this.activeView&&!this.metadata[this.activeView]?`block`:`none`};">
<h2>${e.t(`page-not-found`)}</h2>
<p>${e.t(`choose-from-menu`)}</p>
</div>
<p class="description">${this.description}</p>
${this._renderActivity()}
<div class="scroll-top-wrapper">
<button
id="scroll-top"
class="scroll-button button is-secondary ${x({visible:this.isScrollTopButtonVisible})}"
title="${e.t(`buttons.scroll-to-top-button-label`)}"
tabindex="${this.isScrollTopButtonVisible?0:-1}"
@click="${this._scrollToTop}"
aria-label="${e.t(`buttons.scroll-to-top-button-label`)}">
<dbp-icon name="chevron-up" aria-hidden="true"></dbp-icon>
</button>
<button
id="scroll-bottom"
class="scroll-button button is-secondary ${x({visible:this.isScrollBottomButtonVisible})}"
title="${e.t(`buttons.scroll-to-bottom-button-label`)}"
tabindex="${this.isScrollBottomButtonVisible?0:-1}"
@click="${this._scrollToBottom}"
aria-label="${e.t(`buttons.scroll-to-bottom-button-label`)}">
<dbp-icon name="chevron-down" aria-hidden="true"></dbp-icon>
</button>
</div>
</main>
<footer id="page-footer" tabindex="-1">
<slot name="footer">
<slot name="footer-links">
<a rel="noopener" class="" href="#use-your-privacy-policy-link">
${e.t(`privacy-policy`)}
</a>
<a rel="noopener" class="" href="#use-your-imprint-link">
${e.t(`imprint`)}
</a>
<a rel="noopener" class="" href="#use-your-imprint-link">
${e.t(`contact`)}
</a>
</slot>
${this._titleClickCount>=7?i`
<dbp-build-info
git-info="${this.gitInfo}"
env="${this.env}"
build-url="${this.buildUrl}"
build-time="${this.buildTime}"></dbp-build-info>
<dbp-feature-flag-dropdown></dbp-feature-flag-dropdown>
`:this._titleClickCount>=3?i`
<span>${7-this._titleClickCount}</span>
`:``}
</slot>
</footer>
</div>
</div>
`}},ze=class extends Re{constructor(){super(),this._handleFeatureFlagChange=this._handleFeatureFlagChange.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener(`change`,this._handleFeatureFlagChange)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`change`,this._handleFeatureFlagChange)}_handleFeatureFlagChange(e){if(!e.composedPath().find(e=>e?.dataset?.key===`available-forms-overview`)?.dataset?.key)return;this._updateVisibleRoutes();let t=this._lastElm;t?.requestUpdate(),T()&&t?.loadAvailableForms?.()}_updateVisibleRoutes(){let e=/* @__PURE__ */ new Map;for(let t of this.routes){let n=this.metadata[t];n.feature_flag===`available-forms-overview`&&(e.set(n,n.disabled),n.disabled=!T())}try{super._updateVisibleRoutes()}finally{for(let[t,n]of e)t.disabled=n}}};n(`dbp-formalize`,ze),n(`dbp-translated`,S);export{ze as FormalizeAppShell};
//# sourceMappingURL=dbp-formalize.js.map