@aarhus-university/au-designsystem-delphinus 1.5.6 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aarhus-university/au-designsystem-delphinus",
3
- "version": "1.5.6",
3
+ "version": "1.5.8",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "start": "concurrently \"npm run nodemon\" \"npm run sass\" \"npm run build\"",
@@ -1,4 +1,4 @@
1
- (()=>{var Q=e=>{document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)},q=Q;var L=e=>{navigator.clipboard.writeText(e).then(()=>console.log(`${e} written to clipboard`))},O=(e,n)=>{let i=!1;return e.composedPath().forEach(a=>{a.classList&&a.classList.contains(n)&&(i=!0)}),i},R=()=>{let e=document.querySelector("body");if(e){let n=window.getComputedStyle(e).getPropertyValue("--color-background"),i=document.querySelector('meta[name="theme-color"]');if(i)i.content=n;else{let s=document.createElement("meta");s.name="theme-color",s.content=n,document.getElementsByTagName("head")[0].appendChild(s)}}},W=()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10),X=e=>e*16,_=e=>{let n=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),i=X(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10));return n<i};var Y=e=>e.offsetWidth!==e.scrollWidth;var w=e=>{e.classList.contains("horizontal-scroll--no-overflow")&&e.classList.remove("horizontal-scroll--no-overflow");let n=e.querySelector(".horizontal-scroll--check-overflow .tabbed-content__section:not([hidden]) .horizontal-scroll__scrollable-content");n===null&&!n&&(n=e.querySelector(".horizontal-scroll--check-overflow .horizontal-scroll__scrollable-content")),n&&(Y(n)?n?.setAttribute("tabindex","0"):(e.classList.add("horizontal-scroll--no-overflow"),n?.removeAttribute("tabindex")))};var z=e=>{let n=e.parentElement;return n?n.classList.contains("nav")?n:z(n):e},P=(e,n=null)=>{let i="nav--toggled";e.forEach(s=>{let a=s.querySelector(".nav__toggle");s!==n&&(s.classList.contains(i)&&(a.focus(),a.setAttribute("aria-expanded","false")),s.classList.remove(i))})},B=e=>{let n=a=>{let l=z(a),r=l.querySelector(".nav__items"),h=r?.querySelector(".nav__item:last-of-type");r?.classList.add("nav__items--fadeout");let b=r?.querySelector(".nav__item--is-overflown");b&&b.focus();let m=()=>{l.classList.toggle("nav--toggled"),r?.classList.remove("nav__items--fadeout"),h?.removeEventListener("transitionend",m)};return h?.addEventListener("transitionend",m),l},i=[];return document.querySelectorAll(".nav__toggle").forEach(a=>{let l=()=>{let r=n(a),h=a.getAttribute("aria-expanded");a.setAttribute("aria-expanded",h==="false"?"true":"false"),P(e,r)};i.push({element:a,clickEvent:l}),a.addEventListener("click",l)}),i},M=(e,n)=>{let i="nav--toggled",s="nav__items";n.classList.remove(i);let a=n.querySelector(`.${s}`);if(a){let r=a.querySelectorAll(".nav__item"),h="nav__item--is-overflown",b="nav--has-overflow",m="nav__item--active",o=!1;for(let t=r.length-1;t>=0;t-=1){let d=r[t];d.offsetTop>0?(d.classList.add(h),n.classList.add(b),o=!0):d.classList.contains(m)||d.classList.remove(h)}if(!o){n.classList.remove(b);let t=n.querySelector(`.${m}`);t&&t.classList.remove(h)}}let l=r=>{!r.target.classList.contains("nav__toggle")&&!O(r,s)&&P(e)};return document.querySelector("body")?.addEventListener("click",l),{element:document.querySelector("body"),clickEvent:l}};var D=(e,n,i,s,a)=>{if(s&&i){L(s.innerText),n.classList.add("copy-to-clipboard--confirm"),n===i&&n.classList.add("copy-to-clipboard--done");let l=document.createElement("span");l.classList.add("copy-to-clipboard__this__confirm-message"),l.innerText=e,s.appendChild(l),i.removeEventListener("click",a),setTimeout(()=>{n.classList.remove("copy-to-clipboard--confirm"),l.remove(),i.addEventListener("click",a)},1200)}},U=(e,n="Kopieret!")=>{let i=e.querySelector(".copy-to-clipboard__this");if(e.type==="button"){let s=()=>{D(n,e,e,i,s)};e.addEventListener("click",s)}else{let s=e.querySelector(".copy-to-clipboard__execute"),a=()=>{D(n,e,s,i,a)};s?.addEventListener("click",a)}};var J=()=>{let e=document.querySelectorAll(".copy-to-clipboard"),n=document.querySelectorAll(".copy-to-clipboard__color");e.forEach(i=>{i.addEventListener("click",()=>{let s=i.parentElement?.querySelector(".copy-to-clipboard__color");if(s){let a=getComputedStyle(s).getPropertyValue("background-color"),l=Z(a);console.log(l),L(l.replace(/"/g,""))}})})};function Z(e){var n=e.match(/\d+/g),i="#"+n.map(function(s){var a=parseInt(s).toString(16);return a.length===1?"0"+a:a}).join("");return i}var V=J;var ee=e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1,te=e=>{let i=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/W(),s=ee(e);return s>-1?i<s:!0},ne=e=>{let i=e.querySelector(".nav__items")?.querySelectorAll("a"),s=[];e.querySelectorAll("section").forEach(l=>{l.parentNode===e&&s.push(l)}),i?.forEach(l=>{l.removeAttribute("aria-selected"),l.classList.remove("nav__item--active")}),s.forEach(l=>{l.hidden=!1,l.removeAttribute("role")})};var S=(e,n,i,s,a,l=!0,r=h=>console.log(h))=>{l&&s.focus(),s.removeAttribute("tabindex"),s.setAttribute("aria-selected","true"),s.classList.contains("switch__segment")?s.classList.add("switch__segment--active"):s.classList.add("nav__item--active"),i&&(i.removeAttribute("aria-selected"),i.setAttribute("tabindex","-1"),i.classList.contains("switch__segment")?i.classList.remove("switch__segment--active"):i.classList.remove("nav__item--active"));let h=Array.prototype.indexOf.call(e,s);if(Array.from(document.querySelectorAll(`[data-for="${n[h].id}"]`)).forEach(m=>{m.classList.add("tabbed-content-peripheral--active"),m.hidden=!1}),n[h].hidden=!1,i){let m=Array.prototype.indexOf.call(e,i);Array.from(document.querySelectorAll(`[data-for="${n[m].id}"]`)).forEach(t=>{t.classList.remove("tabbed-content-peripheral--active"),t.hidden=!0}),n[m].hidden=!0}s.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:h}})),r(h)},oe=(e,n,i=0,s=!0,a=l=>console.log(l))=>{let l=n.querySelector(".switch,.nav__items"),r=l.querySelectorAll("a"),h=[];n.querySelectorAll("section").forEach(o=>{o.parentNode===n&&h.push(o)});let m=n.querySelector("button.tabbed-content__expand-all");if(m){let o=()=>{l.hidden=!0,h.forEach(t=>{t.hidden=!1})};m.removeEventListener("click",o),m.addEventListener("click",o)}l.setAttribute("role","tablist"),r.forEach((o,t)=>{o.setAttribute("role","tab"),o.setAttribute("id",`tab${e}_${t+1}`),o.setAttribute("tabindex","-1"),o.parentElement?.setAttribute("role","presentation");let d=f=>{f.preventDefault();let u=l.querySelector("[aria-selected]");f.currentTarget!==u&&S(r,h,u,f.currentTarget,n.classList,!0,v=>{a(v)})};o.removeEventListener("click",d),o.addEventListener("click",d);let c=f=>{let u=Array.prototype.indexOf.call(r,f.currentTarget),v=null;f.key==="ArrowLeft"&&(v=u-1),f.key==="ArrowRight"&&(v=u+1),f.key==="ArrowDown"&&(v="down"),v!==null&&(f.preventDefault(),v==="down"?h[t].focus():r[v]&&S(r,h,f.currentTarget,r[v],n.classList,!0,E=>{a(E)}))};o.removeEventListener("keydown",c),o.addEventListener("keydown",c)}),h.forEach((o,t)=>{o.setAttribute("tabindex","-1"),o.setAttribute("aria-labelledby",r[t].id),o.hidden=!0,o.setAttribute("role","tabpanel")}),i>-1&&S(r,h,null,r[i],n.classList,s)},x=e=>{e.forEach((n,i)=>{let{rendered:s,domElement:a}=n;if(te(a.classList)){if(!s){let l=a.getAttribute("data-focus-onload"),r=a.getAttribute("data-initial-tab"),h=r?parseInt(r,10):0;oe(i,a,h,l!=="false"),n.rendered=!0}}else s&&(ne(a),n.rendered=!1)})};var F=(e,n,i,s)=>{let a=[],l=(o,t,d)=>{d&&t.focus();let c=()=>{e.setAttribute("hidden","hidden"),o.removeAttribute("hidden"),o.setAttribute("aria-expanded","false"),o.focus()};return t.addEventListener("click",c),c},r=e?.parentElement?.querySelector(".content-toggle__toggle"),h=e.querySelectorAll(".content-toggle__close"),b=()=>{_("--bp-medium")&&e.classList.contains("content-toggle__content--always-show-on-medium")||_("--bp-wide")&&e.classList.contains("content-toggle__content--always-show-on-wide")||_("--bp-max-width")&&e.classList.contains("content-toggle__content--always-show-on-max-width")?(r.removeAttribute("hidden"),e.setAttribute("hidden","hidden")):e.classList.contains("content-toggle__content--always-show-on-medium")||e.classList.contains("content-toggle__content--always-show-on-wide")||e.classList.contains("content-toggle__content--always-show-on-max-width")};if(window.addEventListener("resize",()=>{b()}),(()=>{document.addEventListener("click",o=>{let t=o.target,d=!t.classList.contains("content-toggle__content"),c=!t.classList.contains("content-toggle__toggle"),f=!t.classList.contains("profile-header__info__contact__toggle__button");d&&c&&f&&(!_("--bp-medium")&&e.classList.contains("content-toggle__content--is-popover--on-medium")||!_("--bp-wide")&&e.classList.contains("content-toggle__content--is-popover--on-wide")||!_("--bp-max-width")&&e.classList.contains("content-toggle__content--is-popover--on-max-width")||e.classList.contains("content-toggle__content--is-popover"))&&(r.removeAttribute("hidden"),e.setAttribute("hidden","hidden"),r.setAttribute("aria-expanded","false"),r.focus())})})(),b(),r){let o=()=>{let t=r.getAttribute("aria-expanded");typeof i=="function"&&t==="false"&&i(e,r),r.setAttribute("aria-expanded",t==="false"?"true":"false"),t==="true"?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),typeof n=="function"&&n(e,r),r.hasAttribute("aria-haspopup")&&(r.setAttribute("hidden","hidden"),h.forEach(d=>{l(r,d,!0)})),typeof s=="function"&&s(e,r)};r.addEventListener("click",o),a.push({element:r,clickEvent:o}),h.forEach(t=>{let d=l(r,t,!1);a.push({element:t,clickEvent:d})})}return a};var $=e=>{e&&e.forEach(n=>{let i=n?.parentElement?.parentElement?.parentElement?.parentElement;if(i){let s=i.querySelectorAll(".horizontal-scroll__scrollable-content"),a=i.querySelectorAll(".switch__segment");s.forEach(l=>{l&&(n.addEventListener("click",()=>{let r=.8*l.clientWidth;l.scrollLeft+=r}),l.addEventListener("scroll",()=>{l.scrollLeft+l.clientWidth>=l.scrollWidth*.98?I(n):l.scrollLeft+l.clientWidth<l.scrollWidth&&N(n)}),a&&a.forEach(r=>{r.addEventListener("click",()=>{N(n),l.scrollLeft=0})}))})}})},j=e=>{e&&e.forEach(n=>{let i=n?.parentElement?.parentElement?.parentElement?.parentElement;if(i){let s=i.querySelectorAll(".horizontal-scroll__scrollable-content"),a=i.querySelectorAll(".switch__segment");s.forEach(l=>{l&&(n.addEventListener("click",()=>{let r=.8*l.clientWidth;l.scrollLeft-=r}),l.addEventListener("scroll",()=>{l.scrollLeft<=0?I(n):l.scrollLeft>0&&N(n)})),a&&a.forEach(r=>{r.addEventListener("click",()=>{I(n)})})})}})};function N(e){e.classList.remove("visually-disabled"),e.setAttribute("aria-disabled","false")}function I(e){e.classList.add("visually-disabled"),e.setAttribute("aria-disabled","true")}function H(e){e&&e.addEventListener("input",function(n){let i=e?.parentNode;i&&i.dataset&&(i.dataset.value=this.value)})}function K(e){let n=!0;e.addEventListener("click",function(i){n?(e.classList.add("dropdown-icon--active"),e.classList.remove("dropdown-icon--inactive"),n=!1):(e.classList.add("dropdown-icon--inactive"),e.classList.remove("dropdown-icon--active"),n=!0);let s=a=>{e.contains(a.target)||(e.classList.add("dropdown-icon--inactive"),e.classList.remove("dropdown-icon--active"),document.removeEventListener("click",s),n=!0)};document.addEventListener("click",s)})}var k=function(){function e(n,i){for(var s=0;s<i.length;s++){var a=i[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}return function(n,i,s){return i&&e(n.prototype,i),s&&e(n,s),n}}();function C(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(function(){if(typeof window>"u")return;var e=Array.prototype.slice,n=Element.prototype.matches||Element.prototype.msMatchesSelector,i=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),s=function(){function m(o,t){C(this,m),this._inertManager=t,this._rootElement=o,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return k(m,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(this._savedAriaHidden!==null?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach(function(t){this._unmanageNode(t.node)},this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(t){var d=this;r(t,function(v){return d._visitNode(v)});var c=document.activeElement;if(!document.body.contains(t)){for(var f=t,u=void 0;f;){if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){u=f;break}f=f.parentNode}u&&(c=u.activeElement)}t.contains(c)&&(c.blur(),c===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(t){if(t.nodeType===Node.ELEMENT_NODE){var d=t;d!==this._rootElement&&d.hasAttribute("inert")&&this._adoptInertRoot(d),(n.call(d,i)||d.hasAttribute("tabindex"))&&this._manageNode(d)}}},{key:"_manageNode",value:function(t){var d=this._inertManager.register(t,this);this._managedNodes.add(d)}},{key:"_unmanageNode",value:function(t){var d=this._inertManager.deregister(t,this);d&&this._managedNodes.delete(d)}},{key:"_unmanageSubtree",value:function(t){var d=this;r(t,function(c){return d._unmanageNode(c)})}},{key:"_adoptInertRoot",value:function(t){var d=this._inertManager.getInertRoot(t);d||(this._inertManager.setInert(t,!0),d=this._inertManager.getInertRoot(t)),d.managedNodes.forEach(function(c){this._manageNode(c.node)},this)}},{key:"_onMutation",value:function(t,d){t.forEach(function(c){var f=c.target;if(c.type==="childList")e.call(c.addedNodes).forEach(function(v){this._makeSubtreeUnfocusable(v)},this),e.call(c.removedNodes).forEach(function(v){this._unmanageSubtree(v)},this);else if(c.type==="attributes"){if(c.attributeName==="tabindex")this._manageNode(f);else if(f!==this._rootElement&&c.attributeName==="inert"&&f.hasAttribute("inert")){this._adoptInertRoot(f);var u=this._inertManager.getInertRoot(f);this._managedNodes.forEach(function(v){f.contains(v.node)&&u._manageNode(v.node)})}}},this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function(t){this._savedAriaHidden=t},get:function(){return this._savedAriaHidden}}]),m}(),a=function(){function m(o,t){C(this,m),this._node=o,this._overrodeFocusMethod=!1,this._inertRoots=new Set([t]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return k(m,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var t=this._node;this._savedTabIndex!==null?t.setAttribute("tabindex",this._savedTabIndex):t.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete t.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var t=this.node;if(n.call(t,i)){if(t.tabIndex===-1&&this.hasSavedTabIndex)return;t.hasAttribute("tabindex")&&(this._savedTabIndex=t.tabIndex),t.setAttribute("tabindex","-1"),t.nodeType===Node.ELEMENT_NODE&&(t.focus=function(){},this._overrodeFocusMethod=!0)}else t.hasAttribute("tabindex")&&(this._savedTabIndex=t.tabIndex,t.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(t){this._throwIfDestroyed(),this._inertRoots.add(t)}},{key:"removeInertRoot",value:function(t){this._throwIfDestroyed(),this._inertRoots.delete(t),this._inertRoots.size===0&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return this._savedTabIndex!==null}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(t){this._throwIfDestroyed(),this._savedTabIndex=t},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),m}(),l=function(){function m(o){if(C(this,m),!o)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=o,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),h(o.head||o.body||o.documentElement),o.readyState==="loading"?o.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return k(m,[{key:"setInert",value:function(t,d){if(d){if(this._inertRoots.has(t))return;var c=new s(t,this);if(t.setAttribute("inert",""),this._inertRoots.set(t,c),!this._document.body.contains(t))for(var f=t.parentNode;f;)f.nodeType===11&&h(f),f=f.parentNode}else{if(!this._inertRoots.has(t))return;var u=this._inertRoots.get(t);u.destructor(),this._inertRoots.delete(t),t.removeAttribute("inert")}}},{key:"getInertRoot",value:function(t){return this._inertRoots.get(t)}},{key:"register",value:function(t,d){var c=this._managedNodes.get(t);return c!==void 0?c.addInertRoot(d):c=new a(t,d),this._managedNodes.set(t,c),c}},{key:"deregister",value:function(t,d){var c=this._managedNodes.get(t);return c?(c.removeInertRoot(d),c.destroyed&&this._managedNodes.delete(t),c):null}},{key:"_onDocumentLoaded",value:function(){var t=e.call(this._document.querySelectorAll("[inert]"));t.forEach(function(d){this.setInert(d,!0)},this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(t,d){var c=this;t.forEach(function(f){switch(f.type){case"childList":e.call(f.addedNodes).forEach(function(E){if(E.nodeType===Node.ELEMENT_NODE){var p=e.call(E.querySelectorAll("[inert]"));n.call(E,"[inert]")&&p.unshift(E),p.forEach(function(g){this.setInert(g,!0)},c)}},c);break;case"attributes":if(f.attributeName!=="inert")return;var u=f.target,v=u.hasAttribute("inert");c.setInert(u,v);break}},this)}}]),m}();function r(m,o,t){if(m.nodeType==Node.ELEMENT_NODE){var d=m;o&&o(d);var c=d.shadowRoot;if(c){r(c,o,c);return}if(d.localName=="content"){for(var f=d,u=f.getDistributedNodes?f.getDistributedNodes():[],v=0;v<u.length;v++)r(u[v],o,t);return}if(d.localName=="slot"){for(var E=d,p=E.assignedNodes?E.assignedNodes({flatten:!0}):[],g=0;g<p.length;g++)r(p[g],o,t);return}}for(var y=m.firstChild;y!=null;)r(y,o,t),y=y.nextSibling}function h(m){if(!m.querySelector("style#inert-style, link#inert-style")){var o=document.createElement("style");o.setAttribute("id","inert-style"),o.textContent=`
1
+ (()=>{var Q=e=>{document.readyState!=="loading"?e():document.addEventListener("DOMContentLoaded",e)},q=Q;var L=e=>{navigator.clipboard.writeText(e).then(()=>console.log(`${e} written to clipboard`))},O=(e,t)=>{let o=!1;return e.composedPath().forEach(r=>{r.classList&&r.classList.contains(t)&&(o=!0)}),o},R=()=>{let e=document.querySelector("body");if(e){let t=window.getComputedStyle(e).getPropertyValue("--color-background"),o=document.querySelector('meta[name="theme-color"]');if(o)o.content=t;else{let s=document.createElement("meta");s.name="theme-color",s.content=t,document.getElementsByTagName("head")[0].appendChild(s)}}},W=()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10),X=e=>e*16,_=e=>{let t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),o=X(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10));return t<o};var Y=e=>e.offsetWidth!==e.scrollWidth;var w=e=>{e.classList.contains("horizontal-scroll--no-overflow")&&e.classList.remove("horizontal-scroll--no-overflow");let t=e.querySelector(".horizontal-scroll--check-overflow .tabbed-content__section:not([hidden]) .horizontal-scroll__scrollable-content");t===null&&!t&&(t=e.querySelector(".horizontal-scroll--check-overflow .horizontal-scroll__scrollable-content")),t&&(Y(t)?t?.setAttribute("tabindex","0"):(e.classList.add("horizontal-scroll--no-overflow"),t?.removeAttribute("tabindex")))};var z=e=>{let t=e.parentElement;return t?t.classList.contains("nav")?t:z(t):e},P=(e,t=null)=>{let o="nav--toggled";e.forEach(s=>{let r=s.querySelector(".nav__toggle");s!==t&&(s.classList.contains(o)&&(r.focus(),r.setAttribute("aria-expanded","false")),s.classList.remove(o))})},B=e=>{let t=r=>{let l=z(r),a=l.querySelector(".nav__items"),h=a?.querySelector(".nav__item:last-of-type");a?.classList.add("nav__items--fadeout");let b=a?.querySelector(".nav__item--is-overflown");b&&b.focus();let m=()=>{l.classList.toggle("nav--toggled"),a?.classList.remove("nav__items--fadeout"),h?.removeEventListener("transitionend",m)};return h?.addEventListener("transitionend",m),l},o=[];return document.querySelectorAll(".nav__toggle").forEach(r=>{let l=()=>{let a=t(r),h=r.getAttribute("aria-expanded");r.setAttribute("aria-expanded",h==="false"?"true":"false"),P(e,a)};o.push({element:r,clickEvent:l}),r.addEventListener("click",l)}),o},M=(e,t)=>{let o="nav--toggled",s="nav__items";t.classList.remove(o);let r=t.querySelector(`.${s}`);if(r){let a=r.querySelectorAll(".nav__item"),h="nav__item--is-overflown",b="nav--has-overflow",m="nav__item--active",i=!1;for(let n=a.length-1;n>=0;n-=1){let c=a[n];c.offsetTop>0?(c.classList.add(h),t.classList.add(b),i=!0):c.classList.contains(m)||c.classList.remove(h)}if(!i){t.classList.remove(b);let n=t.querySelector(`.${m}`);n&&n.classList.remove(h)}}let l=a=>{!a.target.classList.contains("nav__toggle")&&!O(a,s)&&P(e)};return document.querySelector("body")?.addEventListener("click",l),{element:document.querySelector("body"),clickEvent:l}};var D=(e,t,o,s,r)=>{if(s&&o){L(s.innerText),t.classList.add("copy-to-clipboard--confirm"),t===o&&t.classList.add("copy-to-clipboard--done");let l=document.createElement("span");l.classList.add("copy-to-clipboard__this__confirm-message"),l.innerText=e,s.appendChild(l),o.removeEventListener("click",r),setTimeout(()=>{t.classList.remove("copy-to-clipboard--confirm"),l.remove(),o.addEventListener("click",r)},1200)}},U=(e,t="Kopieret!")=>{let o=e.querySelector(".copy-to-clipboard__this");if(e.type==="button"){let s=()=>{D(t,e,e,o,s)};e.addEventListener("click",s)}else{let s=e.querySelector(".copy-to-clipboard__execute"),r=()=>{D(t,e,s,o,r)};s?.addEventListener("click",r)}};var J=()=>{let e=document.querySelectorAll(".copy-to-clipboard"),t=document.querySelectorAll(".copy-to-clipboard__color");e.forEach(o=>{o.addEventListener("click",()=>{let s=o.parentElement?.querySelector(".copy-to-clipboard__color");if(s){let r=getComputedStyle(s).getPropertyValue("background-color"),l=Z(r);console.log(l),L(l.replace(/"/g,""))}})})};function Z(e){var t=e.match(/\d+/g),o="#"+t.map(function(s){var r=parseInt(s).toString(16);return r.length===1?"0"+r:r}).join("");return o}var V=J;var ee=e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1,te=e=>{let o=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/W(),s=ee(e);return s>-1?o<s:!0},ne=e=>{let o=e.querySelector(".nav__items")?.querySelectorAll("a"),s=[];e.querySelectorAll("section").forEach(l=>{l.parentNode===e&&s.push(l)}),o?.forEach(l=>{l.removeAttribute("aria-selected"),l.classList.remove("nav__item--active")}),s.forEach(l=>{l.hidden=!1,l.removeAttribute("role")})};var S=(e,t,o,s,r,l=!0,a=h=>console.log(h))=>{l&&s.focus(),s.removeAttribute("tabindex"),s.setAttribute("aria-selected","true"),s.classList.contains("switch__segment")?s.classList.add("switch__segment--active"):s.classList.add("nav__item--active"),o&&(o.removeAttribute("aria-selected"),o.setAttribute("tabindex","-1"),o.classList.contains("switch__segment")?o.classList.remove("switch__segment--active"):o.classList.remove("nav__item--active"));let h=Array.prototype.indexOf.call(e,s);if(Array.from(document.querySelectorAll(`[data-for="${t[h].id}"]`)).forEach(m=>{m.classList.add("tabbed-content-peripheral--active"),m.hidden=!1}),t[h].hidden=!1,o){let m=Array.prototype.indexOf.call(e,o);Array.from(document.querySelectorAll(`[data-for="${t[m].id}"]`)).forEach(n=>{n.classList.remove("tabbed-content-peripheral--active"),n.hidden=!0}),t[m].hidden=!0}s.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:h}})),a(h)},oe=(e,t,o=0,s=!0,r=l=>console.log(l))=>{let l=t.querySelector(".switch,.nav__items"),a=l.querySelectorAll("a"),h=[];t.querySelectorAll("section").forEach(i=>{i.parentNode===t&&h.push(i)});let m=t.querySelector("button.tabbed-content__expand-all");if(m){let i=()=>{l.hidden=!0,h.forEach(n=>{n.hidden=!1})};m.removeEventListener("click",i),m.addEventListener("click",i)}l.setAttribute("role","tablist"),a.forEach((i,n)=>{i.setAttribute("role","tab"),i.setAttribute("id",`tab${e}_${n+1}`),i.setAttribute("tabindex","-1"),i.parentElement?.setAttribute("role","presentation");let c=f=>{f.preventDefault();let u=l.querySelector("[aria-selected]");f.currentTarget!==u&&S(a,h,u,f.currentTarget,t.classList,!0,v=>{r(v)})};i.removeEventListener("click",c),i.addEventListener("click",c);let d=f=>{let u=Array.prototype.indexOf.call(a,f.currentTarget),v=null;f.key==="ArrowLeft"&&(v=u-1),f.key==="ArrowRight"&&(v=u+1),f.key==="ArrowDown"&&(v="down"),v!==null&&(f.preventDefault(),v==="down"?h[n].focus():a[v]&&S(a,h,f.currentTarget,a[v],t.classList,!0,p=>{r(p)}))};i.removeEventListener("keydown",d),i.addEventListener("keydown",d)}),h.forEach((i,n)=>{i.setAttribute("tabindex","-1"),i.setAttribute("aria-labelledby",a[n].id),i.hidden=!0,i.setAttribute("role","tabpanel")}),o>-1&&S(a,h,null,a[o],t.classList,s)},x=e=>{e.forEach((t,o)=>{let{rendered:s,domElement:r}=t;if(te(r.classList)){if(!s){let l=r.getAttribute("data-focus-onload"),a=r.getAttribute("data-initial-tab"),h=a?parseInt(a,10):0;oe(o,r,h,l!=="false"),t.rendered=!0}}else s&&(ne(r),t.rendered=!1)})};var F=(e,t,o,s)=>{let r=[],l=(i,n,c)=>{c&&n.focus();let d=()=>{e.setAttribute("hidden","hidden"),i.removeAttribute("hidden"),i.setAttribute("aria-expanded","false"),i.focus()};return n.addEventListener("click",d),d},a=e?.parentElement?.querySelector(".content-toggle__toggle"),h=e.querySelectorAll(".content-toggle__close"),b=()=>{_("--bp-medium")&&e.classList.contains("content-toggle__content--always-show-on-medium")||_("--bp-wide")&&e.classList.contains("content-toggle__content--always-show-on-wide")||_("--bp-max-width")&&e.classList.contains("content-toggle__content--always-show-on-max-width")?(a.removeAttribute("hidden"),e.setAttribute("hidden","hidden")):e.classList.contains("content-toggle__content--always-show-on-medium")||e.classList.contains("content-toggle__content--always-show-on-wide")||e.classList.contains("content-toggle__content--always-show-on-max-width")};if(window.addEventListener("resize",()=>{b()}),(()=>{document.addEventListener("click",i=>{let n=i.target,c=!n.classList.contains("content-toggle__content"),d=!n.classList.contains("content-toggle__toggle"),f=!n.classList.contains("profile-header__info__contact__toggle__button");c&&d&&f&&(!_("--bp-medium")&&e.classList.contains("content-toggle__content--is-popover--on-medium")||!_("--bp-wide")&&e.classList.contains("content-toggle__content--is-popover--on-wide")||!_("--bp-max-width")&&e.classList.contains("content-toggle__content--is-popover--on-max-width")||e.classList.contains("content-toggle__content--is-popover"))&&(a.removeAttribute("hidden"),e.setAttribute("hidden","hidden"),a.setAttribute("aria-expanded","false"),a.focus())})})(),b(),a){let i=()=>{let n=a.getAttribute("aria-expanded");typeof o=="function"&&n==="false"&&o(e,a),a.setAttribute("aria-expanded",n==="false"?"true":"false"),n==="true"?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),typeof t=="function"&&t(e,a),a.hasAttribute("aria-haspopup")&&(a.setAttribute("hidden","hidden"),h.forEach(c=>{l(a,c,!0)})),typeof s=="function"&&s(e,a)};a.addEventListener("click",i),r.push({element:a,clickEvent:i}),h.forEach(n=>{let c=l(a,n,!1);r.push({element:n,clickEvent:c})})}return r};var $=e=>{e&&e.forEach(t=>{let o=t?.parentElement?.parentElement?.parentElement?.parentElement;if(o){let s=o.querySelectorAll(".horizontal-scroll__scrollable-content"),r=o.querySelectorAll(".switch__segment");s.forEach(l=>{l&&(t.addEventListener("click",()=>{let a=.8*l.clientWidth;l.scrollLeft+=a}),l.addEventListener("scroll",()=>{l.scrollLeft+l.clientWidth>=l.scrollWidth*.98?I(t):l.scrollLeft+l.clientWidth<l.scrollWidth&&N(t)}),r&&r.forEach(a=>{a.addEventListener("click",()=>{N(t),l.scrollLeft=0})}))})}})},j=e=>{e&&e.forEach(t=>{let o=t?.parentElement?.parentElement?.parentElement?.parentElement;if(o){let s=o.querySelectorAll(".horizontal-scroll__scrollable-content"),r=o.querySelectorAll(".switch__segment");s.forEach(l=>{l&&(t.addEventListener("click",()=>{let a=.8*l.clientWidth;l.scrollLeft-=a}),l.addEventListener("scroll",()=>{l.scrollLeft<=0?I(t):l.scrollLeft>0&&N(t)})),r&&r.forEach(a=>{a.addEventListener("click",()=>{I(t)})})})}})};function N(e){e.classList.remove("visually-disabled"),e.setAttribute("aria-disabled","false")}function I(e){e.classList.add("visually-disabled"),e.setAttribute("aria-disabled","true")}function H(e){e&&e.addEventListener("input",function(t){let o=e?.parentNode;o&&o.dataset&&(o.dataset.value=this.value)})}function K(e){let t=!0;e.addEventListener("click",function(o){t?(e.classList.add("dropdown-icon--active"),e.classList.remove("dropdown-icon--inactive"),t=!1):(e.classList.add("dropdown-icon--inactive"),e.classList.remove("dropdown-icon--active"),t=!0);let s=r=>{e.contains(r.target)||(e.classList.add("dropdown-icon--inactive"),e.classList.remove("dropdown-icon--active"),document.removeEventListener("click",s),t=!0)};document.addEventListener("click",s)})}var k=function(){function e(t,o){for(var s=0;s<o.length;s++){var r=o[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,o,s){return o&&e(t.prototype,o),s&&e(t,s),t}}();function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(function(){if(typeof window>"u")return;var e=Array.prototype.slice,t=Element.prototype.matches||Element.prototype.msMatchesSelector,o=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details","summary","iframe","object","embed","[contenteditable]"].join(","),s=function(){function m(i,n){C(this,m),this._inertManager=n,this._rootElement=i,this._managedNodes=new Set,this._rootElement.hasAttribute("aria-hidden")?this._savedAriaHidden=this._rootElement.getAttribute("aria-hidden"):this._savedAriaHidden=null,this._rootElement.setAttribute("aria-hidden","true"),this._makeSubtreeUnfocusable(this._rootElement),this._observer=new MutationObserver(this._onMutation.bind(this)),this._observer.observe(this._rootElement,{attributes:!0,childList:!0,subtree:!0})}return k(m,[{key:"destructor",value:function(){this._observer.disconnect(),this._rootElement&&(this._savedAriaHidden!==null?this._rootElement.setAttribute("aria-hidden",this._savedAriaHidden):this._rootElement.removeAttribute("aria-hidden")),this._managedNodes.forEach(function(n){this._unmanageNode(n.node)},this),this._observer=null,this._rootElement=null,this._managedNodes=null,this._inertManager=null}},{key:"_makeSubtreeUnfocusable",value:function(n){var c=this;a(n,function(v){return c._visitNode(v)});var d=document.activeElement;if(!document.body.contains(n)){for(var f=n,u=void 0;f;){if(f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){u=f;break}f=f.parentNode}u&&(d=u.activeElement)}n.contains(d)&&(d.blur(),d===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(n){if(n.nodeType===Node.ELEMENT_NODE){var c=n;c!==this._rootElement&&c.hasAttribute("inert")&&this._adoptInertRoot(c),(t.call(c,o)||c.hasAttribute("tabindex"))&&this._manageNode(c)}}},{key:"_manageNode",value:function(n){var c=this._inertManager.register(n,this);this._managedNodes.add(c)}},{key:"_unmanageNode",value:function(n){var c=this._inertManager.deregister(n,this);c&&this._managedNodes.delete(c)}},{key:"_unmanageSubtree",value:function(n){var c=this;a(n,function(d){return c._unmanageNode(d)})}},{key:"_adoptInertRoot",value:function(n){var c=this._inertManager.getInertRoot(n);c||(this._inertManager.setInert(n,!0),c=this._inertManager.getInertRoot(n)),c.managedNodes.forEach(function(d){this._manageNode(d.node)},this)}},{key:"_onMutation",value:function(n,c){n.forEach(function(d){var f=d.target;if(d.type==="childList")e.call(d.addedNodes).forEach(function(v){this._makeSubtreeUnfocusable(v)},this),e.call(d.removedNodes).forEach(function(v){this._unmanageSubtree(v)},this);else if(d.type==="attributes"){if(d.attributeName==="tabindex")this._manageNode(f);else if(f!==this._rootElement&&d.attributeName==="inert"&&f.hasAttribute("inert")){this._adoptInertRoot(f);var u=this._inertManager.getInertRoot(f);this._managedNodes.forEach(function(v){f.contains(v.node)&&u._manageNode(v.node)})}}},this)}},{key:"managedNodes",get:function(){return new Set(this._managedNodes)}},{key:"hasSavedAriaHidden",get:function(){return this._savedAriaHidden!==null}},{key:"savedAriaHidden",set:function(n){this._savedAriaHidden=n},get:function(){return this._savedAriaHidden}}]),m}(),r=function(){function m(i,n){C(this,m),this._node=i,this._overrodeFocusMethod=!1,this._inertRoots=new Set([n]),this._savedTabIndex=null,this._destroyed=!1,this.ensureUntabbable()}return k(m,[{key:"destructor",value:function(){if(this._throwIfDestroyed(),this._node&&this._node.nodeType===Node.ELEMENT_NODE){var n=this._node;this._savedTabIndex!==null?n.setAttribute("tabindex",this._savedTabIndex):n.removeAttribute("tabindex"),this._overrodeFocusMethod&&delete n.focus}this._node=null,this._inertRoots=null,this._destroyed=!0}},{key:"_throwIfDestroyed",value:function(){if(this.destroyed)throw new Error("Trying to access destroyed InertNode")}},{key:"ensureUntabbable",value:function(){if(this.node.nodeType===Node.ELEMENT_NODE){var n=this.node;if(t.call(n,o)){if(n.tabIndex===-1&&this.hasSavedTabIndex)return;n.hasAttribute("tabindex")&&(this._savedTabIndex=n.tabIndex),n.setAttribute("tabindex","-1"),n.nodeType===Node.ELEMENT_NODE&&(n.focus=function(){},this._overrodeFocusMethod=!0)}else n.hasAttribute("tabindex")&&(this._savedTabIndex=n.tabIndex,n.removeAttribute("tabindex"))}}},{key:"addInertRoot",value:function(n){this._throwIfDestroyed(),this._inertRoots.add(n)}},{key:"removeInertRoot",value:function(n){this._throwIfDestroyed(),this._inertRoots.delete(n),this._inertRoots.size===0&&this.destructor()}},{key:"destroyed",get:function(){return this._destroyed}},{key:"hasSavedTabIndex",get:function(){return this._savedTabIndex!==null}},{key:"node",get:function(){return this._throwIfDestroyed(),this._node}},{key:"savedTabIndex",set:function(n){this._throwIfDestroyed(),this._savedTabIndex=n},get:function(){return this._throwIfDestroyed(),this._savedTabIndex}}]),m}(),l=function(){function m(i){if(C(this,m),!i)throw new Error("Missing required argument; InertManager needs to wrap a document.");this._document=i,this._managedNodes=new Map,this._inertRoots=new Map,this._observer=new MutationObserver(this._watchForInert.bind(this)),h(i.head||i.body||i.documentElement),i.readyState==="loading"?i.addEventListener("DOMContentLoaded",this._onDocumentLoaded.bind(this)):this._onDocumentLoaded()}return k(m,[{key:"setInert",value:function(n,c){if(c){if(this._inertRoots.has(n))return;var d=new s(n,this);if(n.setAttribute("inert",""),this._inertRoots.set(n,d),!this._document.body.contains(n))for(var f=n.parentNode;f;)f.nodeType===11&&h(f),f=f.parentNode}else{if(!this._inertRoots.has(n))return;var u=this._inertRoots.get(n);u.destructor(),this._inertRoots.delete(n),n.removeAttribute("inert")}}},{key:"getInertRoot",value:function(n){return this._inertRoots.get(n)}},{key:"register",value:function(n,c){var d=this._managedNodes.get(n);return d!==void 0?d.addInertRoot(c):d=new r(n,c),this._managedNodes.set(n,d),d}},{key:"deregister",value:function(n,c){var d=this._managedNodes.get(n);return d?(d.removeInertRoot(c),d.destroyed&&this._managedNodes.delete(n),d):null}},{key:"_onDocumentLoaded",value:function(){var n=e.call(this._document.querySelectorAll("[inert]"));n.forEach(function(c){this.setInert(c,!0)},this),this._observer.observe(this._document.body||this._document.documentElement,{attributes:!0,subtree:!0,childList:!0})}},{key:"_watchForInert",value:function(n,c){var d=this;n.forEach(function(f){switch(f.type){case"childList":e.call(f.addedNodes).forEach(function(p){if(p.nodeType===Node.ELEMENT_NODE){var E=e.call(p.querySelectorAll("[inert]"));t.call(p,"[inert]")&&E.unshift(p),E.forEach(function(g){this.setInert(g,!0)},d)}},d);break;case"attributes":if(f.attributeName!=="inert")return;var u=f.target,v=u.hasAttribute("inert");d.setInert(u,v);break}},this)}}]),m}();function a(m,i,n){if(m.nodeType==Node.ELEMENT_NODE){var c=m;i&&i(c);var d=c.shadowRoot;if(d){a(d,i,d);return}if(c.localName=="content"){for(var f=c,u=f.getDistributedNodes?f.getDistributedNodes():[],v=0;v<u.length;v++)a(u[v],i,n);return}if(c.localName=="slot"){for(var p=c,E=p.assignedNodes?p.assignedNodes({flatten:!0}):[],g=0;g<E.length;g++)a(E[g],i,n);return}}for(var y=m.firstChild;y!=null;)a(y,i,n),y=y.nextSibling}function h(m){if(!m.querySelector("style#inert-style, link#inert-style")){var i=document.createElement("style");i.setAttribute("id","inert-style"),i.textContent=`
2
2
  [inert] {
3
3
  pointer-events: none;
4
4
  cursor: default;
@@ -10,5 +10,5 @@
10
10
  -ms-user-select: none;
11
11
  user-select: none;
12
12
  }
13
- `,m.appendChild(o)}}if(!HTMLElement.prototype.hasOwnProperty("inert")){var b=new l(document);Object.defineProperty(HTMLElement.prototype,"inert",{enumerable:!0,get:function(){return this.hasAttribute("inert")},set:function(o){b.setInert(this,o)}})}})();var A=(e,n,i=()=>{})=>{let s=document.getElementById(e);if(s){s.classList.remove("modal-view--visible"),s.inert=!0;let a=document.querySelector(".page");a&&(a.classList.remove("page--blur"),a.inert=!1),document.querySelector("body")?.classList.remove("body--no-scroll"),n.focus(),n.setAttribute("aria-expanded","false"),i()}},G=(e,n,i=()=>{},s=!0)=>{let a=document.getElementById(e),l=[];if(a){a.classList.add("modal-view--visible"),a.inert=!1;let r=document.querySelector(".page");r&&(r.classList.add("page--blur"),r.inert=!0),document.querySelector("body")?.classList.add("body--no-scroll"),n.setAttribute("aria-expanded","true"),a.focus();let h=m=>{m.target===a&&A(e,n,i)},b=m=>{m.key==="Escape"&&A(e,n,i)};s&&(a.addEventListener("click",h),window.addEventListener("keyup",b),l.push({element:a,clickEvent:h}),l.push({element:window,keyUpEvent:b}))}return l};var T=0;q(()=>{let e=document.querySelectorAll(".tabbed-content"),n=[];e.forEach(u=>n.push({domElement:u,rendered:!1})),x(n),R();let i=document.querySelectorAll(".nav:not(.nav--vertical)");i.forEach(u=>M(i,u)),B(i);let s=document.getElementById("autoexpand");H(s),window.onload=function(){H(s)},document.querySelectorAll(".form__field select, .form__field__combo-box__field").forEach(u=>{K(u)}),document.querySelectorAll(".copy-to-clipboard").forEach(u=>U(u,document.querySelector("html")?.getAttribute("lang")==="en"?"Hexcode copied!":"Hexkode kopieret!")),V(),document.querySelectorAll(".content-toggle__content:not(.toolbar .content-toggle__content)").forEach(u=>{F(u)});let h=document.querySelectorAll(".button.button--small.button--icon.button--icon--hide-label.icon-next"),b=document.querySelectorAll(".button.button--small.button--icon.button--icon--hide-label.icon-previous");$(h),j(b),document.querySelectorAll(".horizontal-scroll").forEach(u=>{w(u),window.addEventListener("resize",()=>{w(u)})}),document.querySelectorAll(".switch__segment").forEach(u=>{u.addEventListener("click",()=>{document.querySelectorAll(".horizontal-scroll").forEach(E=>{w(E)})})}),window.addEventListener("load",()=>{T=window.innerWidth}),window.addEventListener("resize",()=>{T>0&&window.innerWidth!==T&&(T=window.innerWidth,i.forEach(u=>M(i,u)),x(n))}),document.querySelectorAll("[data-modal]").forEach(u=>{let v=u.getAttribute("data-modal");document.getElementById(v)?.querySelector(".modal-view__close")?.addEventListener("click",()=>{A(v,u)}),u.addEventListener("click",()=>{G(v,u)})}),document.querySelectorAll(".nav__search").forEach(u=>{u.addEventListener("submit",v=>{v.preventDefault();let E=u.querySelector('input[type="search"]');if(E){let p=E.value,g=`./soegning#?cludoquery=${encodeURIComponent(p)}&cludoDomainName=https://omnibus.au.dk/&cludopage=1&cludorefurl=https%3A%2F%2Fomnibus.au.dk%2F&cludorefpt=Omnibus%20-%20Universitetsavisen%20p\xE5%20Aarhus%20Universitet&cludoinputtype=standard`;console.log(p),window.location.href=g}})});let c=document.querySelector(".omnibus-header__logo-titel"),f=document.querySelector("html")?.getAttribute("lang");c&&(f==="da"?c.setAttribute("src","/fileadmin/logos/Omnibus-logo.png"):c.setAttribute("src","/fileadmin/logos/Omnibus-logo-en.png"))});})();
13
+ `,m.appendChild(i)}}if(!HTMLElement.prototype.hasOwnProperty("inert")){var b=new l(document);Object.defineProperty(HTMLElement.prototype,"inert",{enumerable:!0,get:function(){return this.hasAttribute("inert")},set:function(i){b.setInert(this,i)}})}})();var A=(e,t,o=()=>{})=>{let s=document.getElementById(e);if(s){s.classList.remove("modal-view--visible"),s.inert=!0;let r=document.querySelector(".page");r&&(r.classList.remove("page--blur"),r.inert=!1),document.querySelector("body")?.classList.remove("body--no-scroll"),t.focus(),t.setAttribute("aria-expanded","false"),o()}},G=(e,t,o=()=>{},s=!0)=>{let r=document.getElementById(e),l=[];if(r){r.classList.add("modal-view--visible"),r.inert=!1;let a=document.querySelector(".page");a&&(a.classList.add("page--blur"),a.inert=!0),document.querySelector("body")?.classList.add("body--no-scroll"),t.setAttribute("aria-expanded","true"),r.focus();let h=m=>{m.target===r&&A(e,t,o)},b=m=>{m.key==="Escape"&&A(e,t,o)};s&&(r.addEventListener("click",h),window.addEventListener("keyup",b),l.push({element:r,clickEvent:h}),l.push({element:window,keyUpEvent:b}))}return l};var T=0;q(()=>{let e=document.querySelectorAll(".tabbed-content"),t=[];e.forEach(u=>t.push({domElement:u,rendered:!1})),x(t),R();let o=document.querySelectorAll(".nav:not(.nav--vertical)");o.forEach(u=>M(o,u)),B(o);let s=document.getElementById("autoexpand");H(s),window.onload=function(){H(s)},document.querySelectorAll(".form__field select, .form__field__combo-box__field").forEach(u=>{K(u)}),document.querySelectorAll(".copy-to-clipboard").forEach(u=>U(u,document.querySelector("html")?.getAttribute("lang")==="en"?"Hexcode copied!":"Hexkode kopieret!")),V(),document.querySelectorAll(".content-toggle__content:not(.toolbar .content-toggle__content)").forEach(u=>{F(u)});let h=document.querySelectorAll(".button.button--small.button--icon.button--icon--hide-label.icon-next"),b=document.querySelectorAll(".button.button--small.button--icon.button--icon--hide-label.icon-previous");$(h),j(b),document.querySelectorAll(".horizontal-scroll").forEach(u=>{w(u),window.addEventListener("resize",()=>{w(u)})}),document.querySelectorAll(".switch__segment").forEach(u=>{u.addEventListener("click",()=>{document.querySelectorAll(".horizontal-scroll").forEach(p=>{w(p)})})}),window.addEventListener("load",()=>{T=window.innerWidth}),window.addEventListener("resize",()=>{T>0&&window.innerWidth!==T&&(T=window.innerWidth,o.forEach(u=>M(o,u)),x(t))}),document.querySelectorAll("[data-modal]").forEach(u=>{let v=u.getAttribute("data-modal");document.getElementById(v)?.querySelector(".modal-view__close")?.addEventListener("click",()=>{A(v,u)}),u.addEventListener("click",()=>{G(v,u)})}),document.querySelectorAll(".nav__search").forEach(u=>{u.addEventListener("submit",v=>{v.preventDefault();let p=u.querySelector('input[type="search"]');if(p){let E=p.value,g=`./soegning#?cludoquery=${encodeURIComponent(E)}&cludoDomainName=https://omnibus.au.dk/&cludopage=1&cludorefurl=https%3A%2F%2Fomnibus.au.dk%2F&cludorefpt=Omnibus%20-%20Universitetsavisen%20p\xE5%20Aarhus%20Universitet&cludoinputtype=standard`;console.log(E),window.location.href=g}})});let d=document.querySelector(".omnibus-header__logo-titel"),f=document.querySelector("html")?.getAttribute("lang");d&&(f==="da"?d.setAttribute("src","/fileadmin/logos/Omnibus-logo.png"):d.setAttribute("src","/fileadmin/logos/Omnibus-logo-en.png"))});document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".news-story__normal").forEach(t=>{let o=t.querySelector(".news-story__image-container"),s=o?.querySelector("img.news-story__image");s instanceof HTMLImageElement&&ie(o,s)})});function ie(e,t){let o=e.offsetWidth,s=4/3,r=o/s;t.style.width=o+"px",t.style.height=r+"px";let l=`${t.src} 1x, ${t.src.replace(".jpg","@2x.jpg")} 2x`;t.setAttribute("srcset",l)}})();
14
14
  //# sourceMappingURL=app.js.map