@aarhus-university/au-designsystem-delphinus 1.5.0 → 1.5.2
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/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/public/assets/omnibus/Omnibus-logo-en.png +0 -0
- package/public/assets/omnibus/Omnibus-logo.png +0 -0
- package/public/assets/omnibus/X.png +0 -0
- package/public/projects/omnibus/js/app.js +2 -2
- package/public/projects/omnibus/js/app.js.map +3 -3
- package/public/projects/omnibus/style.css +1 -1
- package/public/projects/typo3/style.css +1 -1
- package/source/js/omnibus/app.ts +11 -0
- package/source/projects/omnibus/style/_cludo-overwrite.scss +7 -2
- package/source/projects/omnibus/style/_omnibus.scss +0 -13
- package/source/projects/typo3/style/_news-event.scss +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 1.5.2 (May 21, 2024)
|
|
2
|
+
### Delphinus Projects Updates
|
|
3
|
+
* Bug fixes
|
|
4
|
+
|
|
5
|
+
## 1.5.1 (May 21, 2024)
|
|
6
|
+
### Delphinus Projects Updates
|
|
7
|
+
* Bug fixes
|
|
8
|
+
|
|
9
|
+
## 1.5.0 (May 2, 2024)
|
|
10
|
+
### Core Delphinus Updates
|
|
11
|
+
* Added [Hero Image component](https://delphinus.au.dk/components/hero-image)
|
|
12
|
+
|
|
1
13
|
## 1.4.9 (April 25, 2024)
|
|
2
14
|
### Core Delphinus Updates
|
|
3
15
|
* Bug fixes for forms dropdown icon
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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,p=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 d=z(a),r=d.querySelector(".nav__items"),f=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=()=>{d.classList.toggle("nav--toggled"),r?.classList.remove("nav__items--fadeout"),f?.removeEventListener("transitionend",m)};return f?.addEventListener("transitionend",m),d},i=[];return document.querySelectorAll(".nav__toggle").forEach(a=>{let d=()=>{let r=n(a),f=a.getAttribute("aria-expanded");a.setAttribute("aria-expanded",f==="false"?"true":"false"),P(e,r)};i.push({element:a,clickEvent:d}),a.addEventListener("click",d)}),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"),f="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 c=r[t];c.offsetTop>0?(c.classList.add(f),n.classList.add(b),o=!0):c.classList.contains(m)||c.classList.remove(f)}if(!o){n.classList.remove(b);let t=n.querySelector(`.${m}`);t&&t.classList.remove(f)}}let d=r=>{!r.target.classList.contains("nav__toggle")&&!O(r,s)&&P(e)};return document.querySelector("body")?.addEventListener("click",d),{element:document.querySelector("body"),clickEvent:d}};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 d=document.createElement("span");d.classList.add("copy-to-clipboard__this__confirm-message"),d.innerText=e,s.appendChild(d),i.removeEventListener("click",a),setTimeout(()=>{n.classList.remove("copy-to-clipboard--confirm"),d.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"),d=Z(a);console.log(d),L(d.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(d=>{d.parentNode===e&&s.push(d)}),i?.forEach(d=>{d.removeAttribute("aria-selected"),d.classList.remove("nav__item--active")}),s.forEach(d=>{d.hidden=!1,d.removeAttribute("role")})};var S=(e,n,i,s,a,d=!0,r=f=>console.log(f))=>{d&&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 f=Array.prototype.indexOf.call(e,s);if(Array.from(document.querySelectorAll(`[data-for="${n[f].id}"]`)).forEach(m=>{m.classList.add("tabbed-content-peripheral--active"),m.hidden=!1}),n[f].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:f}})),r(f)},oe=(e,n,i=0,s=!0,a=d=>console.log(d))=>{let d=n.querySelector(".switch,.nav__items"),r=d.querySelectorAll("a"),f=[];n.querySelectorAll("section").forEach(o=>{o.parentNode===n&&f.push(o)});let m=n.querySelector("button.tabbed-content__expand-all");if(m){let o=()=>{d.hidden=!0,f.forEach(t=>{t.hidden=!1})};m.removeEventListener("click",o),m.addEventListener("click",o)}d.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 c=u=>{u.preventDefault();let v=d.querySelector("[aria-selected]");u.currentTarget!==v&&S(r,f,v,u.currentTarget,n.classList,!0,h=>{a(h)})};o.removeEventListener("click",c),o.addEventListener("click",c);let l=u=>{let v=Array.prototype.indexOf.call(r,u.currentTarget),h=null;u.key==="ArrowLeft"&&(h=v-1),u.key==="ArrowRight"&&(h=v+1),u.key==="ArrowDown"&&(h="down"),h!==null&&(u.preventDefault(),h==="down"?f[t].focus():r[h]&&S(r,f,u.currentTarget,r[h],n.classList,!0,E=>{a(E)}))};o.removeEventListener("keydown",l),o.addEventListener("keydown",l)}),f.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,f,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 d=a.getAttribute("data-focus-onload"),r=a.getAttribute("data-initial-tab"),f=r?parseInt(r,10):0;oe(i,a,f,d!=="false"),n.rendered=!0}}else s&&(ne(a),n.rendered=!1)})};var F=(e,n,i,s)=>{let a=[],d=(o,t,c)=>{c&&t.focus();let l=()=>{e.setAttribute("hidden","hidden"),o.removeAttribute("hidden"),o.setAttribute("aria-expanded","false"),o.focus()};return t.addEventListener("click",l),l},r=e?.parentElement?.querySelector(".content-toggle__toggle"),f=e.querySelectorAll(".content-toggle__close"),b=()=>{p("--bp-medium")&&e.classList.contains("content-toggle__content--always-show-on-medium")||p("--bp-wide")&&e.classList.contains("content-toggle__content--always-show-on-wide")||p("--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,c=!t.classList.contains("content-toggle__content"),l=!t.classList.contains("content-toggle__toggle"),u=!t.classList.contains("profile-header__info__contact__toggle__button");c&&l&&u&&(!p("--bp-medium")&&e.classList.contains("content-toggle__content--is-popover--on-medium")||!p("--bp-wide")&&e.classList.contains("content-toggle__content--is-popover--on-wide")||!p("--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"),f.forEach(c=>{d(r,c,!0)})),typeof s=="function"&&s(e,r)};r.addEventListener("click",o),a.push({element:r,clickEvent:o}),f.forEach(t=>{let c=d(r,t,!1);a.push({element:t,clickEvent:c})})}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(d=>{d&&(n.addEventListener("click",()=>{let r=.8*d.clientWidth;d.scrollLeft+=r}),d.addEventListener("scroll",()=>{d.scrollLeft+d.clientWidth>=d.scrollWidth*.98?I(n):d.scrollLeft+d.clientWidth<d.scrollWidth&&N(n)}),a&&a.forEach(r=>{r.addEventListener("click",()=>{N(n),d.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(d=>{d&&(n.addEventListener("click",()=>{let r=.8*d.clientWidth;d.scrollLeft-=r}),d.addEventListener("scroll",()=>{d.scrollLeft<=0?I(n):d.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 c=this;r(t,function(h){return c._visitNode(h)});var l=document.activeElement;if(!document.body.contains(t)){for(var u=t,v=void 0;u;){if(u.nodeType===Node.DOCUMENT_FRAGMENT_NODE){v=u;break}u=u.parentNode}v&&(l=v.activeElement)}t.contains(l)&&(l.blur(),l===document.activeElement&&document.body.focus())}},{key:"_visitNode",value:function(t){if(t.nodeType===Node.ELEMENT_NODE){var c=t;c!==this._rootElement&&c.hasAttribute("inert")&&this._adoptInertRoot(c),(n.call(c,i)||c.hasAttribute("tabindex"))&&this._manageNode(c)}}},{key:"_manageNode",value:function(t){var c=this._inertManager.register(t,this);this._managedNodes.add(c)}},{key:"_unmanageNode",value:function(t){var c=this._inertManager.deregister(t,this);c&&this._managedNodes.delete(c)}},{key:"_unmanageSubtree",value:function(t){var c=this;r(t,function(l){return c._unmanageNode(l)})}},{key:"_adoptInertRoot",value:function(t){var c=this._inertManager.getInertRoot(t);c||(this._inertManager.setInert(t,!0),c=this._inertManager.getInertRoot(t)),c.managedNodes.forEach(function(l){this._manageNode(l.node)},this)}},{key:"_onMutation",value:function(t,c){t.forEach(function(l){var u=l.target;if(l.type==="childList")e.call(l.addedNodes).forEach(function(h){this._makeSubtreeUnfocusable(h)},this),e.call(l.removedNodes).forEach(function(h){this._unmanageSubtree(h)},this);else if(l.type==="attributes"){if(l.attributeName==="tabindex")this._manageNode(u);else if(u!==this._rootElement&&l.attributeName==="inert"&&u.hasAttribute("inert")){this._adoptInertRoot(u);var v=this._inertManager.getInertRoot(u);this._managedNodes.forEach(function(h){u.contains(h.node)&&v._manageNode(h.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}(),d=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)),f(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,c){if(c){if(this._inertRoots.has(t))return;var l=new s(t,this);if(t.setAttribute("inert",""),this._inertRoots.set(t,l),!this._document.body.contains(t))for(var u=t.parentNode;u;)u.nodeType===11&&f(u),u=u.parentNode}else{if(!this._inertRoots.has(t))return;var v=this._inertRoots.get(t);v.destructor(),this._inertRoots.delete(t),t.removeAttribute("inert")}}},{key:"getInertRoot",value:function(t){return this._inertRoots.get(t)}},{key:"register",value:function(t,c){var l=this._managedNodes.get(t);return l!==void 0?l.addInertRoot(c):l=new a(t,c),this._managedNodes.set(t,l),l}},{key:"deregister",value:function(t,c){var l=this._managedNodes.get(t);return l?(l.removeInertRoot(c),l.destroyed&&this._managedNodes.delete(t),l):null}},{key:"_onDocumentLoaded",value:function(){var t=e.call(this._document.querySelectorAll("[inert]"));t.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(t,c){var l=this;t.forEach(function(u){switch(u.type){case"childList":e.call(u.addedNodes).forEach(function(E){if(E.nodeType===Node.ELEMENT_NODE){var g=e.call(E.querySelectorAll("[inert]"));n.call(E,"[inert]")&&g.unshift(E),g.forEach(function(_){this.setInert(_,!0)},l)}},l);break;case"attributes":if(u.attributeName!=="inert")return;var v=u.target,h=v.hasAttribute("inert");l.setInert(v,h);break}},this)}}]),m}();function r(m,o,t){if(m.nodeType==Node.ELEMENT_NODE){var c=m;o&&o(c);var l=c.shadowRoot;if(l){r(l,o,l);return}if(c.localName=="content"){for(var u=c,v=u.getDistributedNodes?u.getDistributedNodes():[],h=0;h<v.length;h++)r(v[h],o,t);return}if(c.localName=="slot"){for(var E=c,g=E.assignedNodes?E.assignedNodes({flatten:!0}):[],_=0;_<g.length;_++)r(g[_],o,t);return}}for(var y=m.firstChild;y!=null;)r(y,o,t),y=y.nextSibling}function f(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,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=`
|
|
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
|
|
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"))});})();
|
|
14
14
|
//# sourceMappingURL=app.js.map
|