PageSourceSearch

https://www.val.se/sitevision/system-resource/a2cfcc4982983d45700e…a09c1734df7dfd0c31b52f/envision/envision.js

js val.se collected 2026-10-02 03:27:34 UTC 77,068 bytes, 3 lines download raw bytes

1/*! For license information please see envision.js.LICENSE.txt */
2!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?exports.envision=t(require("jquery")):e.envision=t(e.jQuery)}(this,e=>(()=>{"use strict";var t,i,s={914(t){t.exports=e}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return s[e](i,i.exports,o),i.exports}o.m=s,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,i)=>(o.f[i](e,t),t),[])),o.u=e=>({131:"env-carousel",172:"env-carousel-autoheight",211:"env-carousel-autoplay",333:"popper",390:"tom-select",926:"env-carousel-fade"}[e]+"-"+{131:"958e758f482bf62bbe89",172:"c43e4d965a7f741411f5",211:"8a51d482d7a5bc72db35",333:"0326ff0d9236fe50773c",390:"50a23d828a6185e3d7d4",926:"7a28c48e3ba2687f88b0"}[e]+".js"),o.miniCssF=e=>{},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},i="envision:",o.l=(e,s,n,a)=>{if(t[e])t[e].push(s);else{var r,l;if(void 0!==n)for(var h=document.getElementsByTagName("script"),d=0;d<h.length;d++){var c=h[d];if(c.getAttribute("src")==e||c.getAttribute("data-webpack")==i+n){r=c;break}}r||(l=!0,(r=document.createElement("script")).charset="utf-8",o.nc&&r.setAttribute("nonce",o.nc),r.setAttribute("data-webpack",i+n),r.src=e),t[e]=[s];var u=(i,s)=>{r.onerror=r.onload=null,clearTimeout(g);var n=t[e];if(delete t[e],r.parentNode&&r.parentNode.removeChild(r),n&&n.forEach(e=>e(s)),i)return i(s)},g=setTimeout(u.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=u.bind(null,r.onerror),r.onload=u.bind(null,r.onload),l&&document.head.appendChild(r)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var s=i.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=i[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={792:0};o.f.j=(t,i)=>{var s=o.o(e,t)?e[t]:void 0;if(0!==s)if(s)i.push(s[2]);else{var n=new Promise((i,n)=>s=e[t]=[i,n]);i.push(s[2]=n);var a=o.p+o.u(t),r=new Error;o.l(a,i=>{if(o.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var n=i&&("load"===i.type?"missing":i.type),a=i&&i.target&&i.target.src;r.message="Loading chunk "+t+" failed.\n("+n+": "+a+")",r.name="ChunkLoadError",r.type=n,r.request=a,s[1](r)}},"chunk-"+t,t)}};var t=(t,i)=>{var s,n,[a,r,l]=i,h=0;if(a.some(t=>0!==e[t])){for(s in r)o.o(r,s)&&(o.m[s]=r[s]);if(l)l(o)}for(t&&t(i);h<a.length;h++)n=a[h],o.o(e,n)&&e[n]&&e[n][0](),e[n]=0},i=this.webpackChunkenvision=this.webpackChunkenvision||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var a={};o.r(a),o.d(a,{accordion:()=>pi,collapse:()=>Ei,dialog:()=>Kt,imageSlider:()=>oi,imageViewer:()=>Ae,imageViewer2:()=>gt,popover:()=>V,rangeSlider:()=>wt,select:()=>U,tabs:()=>ee,tooltip:()=>ae});var r=o(914),l=o.n(r);const h=function(e,t){const i=[];if(t=t||document,e&&"string"==typeof e){let s=t.querySelectorAll(e);if(s&&s.length>0)for(let e=0;e<s.length;e++)i.push(s[e])}else if(e&&"object"==typeof e)if(1===e.nodeType)i.push(e);else if(e.length>0)for(let t=0;t<e.length;t++)i.push(e[t]);return i},d=function(e,t){return h(e,t)[0]},c=function(e){const t=document.createElement("template");return t.innerHTML=e,t.content.firstElementChild},u=function(e,t){return"string"==typeof t&&(t=c(t)),t=t||document.createElement("div"),e.replaceWith(t),t.appendChild(e),t},g="data-env-prev-style",v=function(e,t){const i=e.getAttribute(`${g}-${t}-val`);i?e.style.setProperty(t,i,e.getAttribute(`${g}-${t}
2-prio`)):e.style.removeProperty(t),e.removeAttribute(`${g}-${t}-val`),e.removeAttribute(`${g}-${t}-prio`)},p=function(e,t,i,s){if(e.style.getPropertyValue(t)){const i=e.style.getPropertyValue(t);i&&(e.setAttribute(`${g}-${t}-val`,i),e.setAttribute(`${g}-${t}-prio`,e.style.getPropertyPriority(t)))}e.style.setProperty(t,i,s)},m=(e,t)=>{Object.keys(t).forEach(i=>{e.setAttribute(i,t[i])})},f=function(){p(document.body,"overflow-x",""),p(document.body,"overflow-y",""),p(document.body,"overflow","hidden","important")},b=function(){["overflow","overflow-x","overflow-y"].forEach(e=>{v(document.body,e)})},y=function(e){h(e).forEach(e=>{p(e,"display","none","important")})},_=function(e){h(e).forEach(e=>{const t=document.createElement(e.tagName);document.body.appendChild(t);const i=getComputedStyle(t).display;t.remove(),p(e,"display",i)})},E=function(e){h(e).forEach(e=>{v(e,"display")})},w=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},I=function(e){const t=["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","details:not([disabled])","summary:not([disabled])",'[tabindex]:not([tabindex="-1"]):not([disabled])',"[contenteditable]"].join(","),i=h(t,e),s=[];for(let e=0;e<i.length;e++)w(i[e])&&s.push(i[e]);return s},x=(e,t)=>{t=t||document;const i=I(t);let s=e;for(let t=0;t<i.length;t++){if(i[t]===e){s=t===i.length-1?i[0]:i[t+1];break}}return s},A=(()=>{let e=0;const t=()=>(e+=1,"env-"+e);return e=>{h(e).forEach(e=>{if(!e.id){let i=t();for(;document.getElementById(i);)i=t();e.id=i}})}})();let L;const $=async()=>{if(L)return L;const{createPopper:e}=await o.e(333).then(o.bind(o,169));return L=e,L},k=(()=>{const e={consoleWarning:(e,...t)=>{const i="https://envisionui.io/",s={jQuery:e=>{let t=e.replace(/^env/,"").replace(/Imageslider/,"imageSlider").replace(/Imageviewer/,"imageWiewer");return t=t.charAt(0).toLowerCase()+t.slice(1),`WARNING: $.fn.${e} is deprecated. Please update your code with new method envision.${t}. Refer to ${i}warnings/#jquery for documentation.`},component:(e,t,s)=>`WARNING: The component "${e}" is deprecated. ${s?`Please update your code with new component "${s}".`:""} Refer to ${i}warnings/#${t} for documentation.`};Object.prototype.hasOwnProperty.call(s,e)&&console.warn(s[e](...t))},getLanguageOptions(e,t,i){let s={};const n=()=>{let e=(i=i||document.documentElement).closest("[lang]").getAttribute("lang").substring(0,2);return Object.prototype.hasOwnProperty.call(t,e)||(e="en"),Object.prototype.hasOwnProperty.call(t,e)?t[e]:{}};return s="string"==typeof e&&Object.prototype.hasOwnProperty.call(t,e)?Object.assign({},t[e]):this.isPlainObject(e)?Object.assign({},n(),e):Object.assign({},n()),s},isPlainObject(e){if("object"==typeof e&&null!==e){const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return!1},extend(){const t={};let i=!1;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(i=arguments[0]);const s=function(s){for(const n in s)Object.prototype.hasOwnProperty.call(s,n)&&(i&&"[object Object]"===Object.prototype.toString.call(s[n])?t[n]=e.extend(!0,t[n],s[n]):t[n]=s[n])};for(let e=0;e<arguments.length;e++)s(arguments[e]);return t},normalizeOptions(e,t){if(e=this.isPlainObject(e)?e:{},!this.isPlainObject(t))return console.error("defaults is not an object"),e;for(let i in e)Object.prototype.hasOwnProperty.call(t,i)||delete e[i];return e}};return e})(),T=k,S="envPopover",C="env-popover",O="env-popover__arrow",P="env-popover__header",D="env-popover__header__title",N="env-popover__content",B="env-popover__menu",j="envPopoverMenuIndex",M={clickOutside:!1,constraints:[],container:"body",content:"",delay:0,escapeContent:!0,placement:"top",template:(e,t,i)=>`<div class="${C} ${e}" role="${i}">\n   <div class="${O}"></div>\n   <div class="${P}">\n   <h4 class="env-ui-text-sectionheading ${D}"></h4>\n   </div>\n   <div class="${t}"></div>\n   </div>`,title:"",trigger:"click",type:null};class H{constructor(e,t){this.el=e,this.config={...M,...this.el.dataset,...t},this.bindEvents(),"menu"===this.config.type&&(this.el.setAttribute("aria-haspopup","true"),this.el.setAttribute("aria-expanded","fal
2se"))}handleClick(){this.isShowing?this.hide():this.show()}handleInEvent(){this.config.delay>0?(this.hidetimeout&&clearTimeout(this.hidetimeout),this.showtimeout&&clearTimeout(this.showtimeout),this.isShowing||(this.showtimeout=setTimeout(()=>{this.show()},this.config.delay))):this.isShowing||this.show()}handleOutEvent(){this.config.delay>0?(this.bindPopoverEvents(),this.showtimeout&&clearTimeout(this.showtimeout),this.isShowing&&(this.hidetimeout=setTimeout(()=>{this.hide()},this.config.delay))):this.isShowing&&this.hide()}handleKeyEscape(e){const t=e.target,i=this.getPopoverElement();this.hide(),i.contains(t)&&setTimeout(()=>this.el.focus(),0)}handleKeyTabForwardToPopover(e){const t=this.getPopoverElement(),i=I(t);i.length>0&&(e.preventDefault(),i[0].focus())}handleTriggerFocusIn(e){if(!this.isShowing)return;const t=e.relatedTarget,i=this.getPopoverElement(),s=t&&!i.contains(t),n=(o=t,this.el.compareDocumentPosition(o)===Node.DOCUMENT_POSITION_FOLLOWING);var o;if(s&&n){const e=I(i);e[e.length-1]?.focus()}}handleTriggerKeyDown(e){"menu"===this.config.type&&("ArrowDown"===e.key||" "===e.key||"Enter"===e.key?(e.preventDefault(),this.show(),setTimeout(()=>{this.menuItems[0].focus()},0)):"ArrowUp"===e.key&&(e.preventDefault(),this.show(),setTimeout(()=>{this.menuItems[this.menuItems.length-1].focus()},0)))}handleKeyTabInPopover(e){const t=e.target,i=this.getPopoverElement(),s=I(i);if(0===s.length)return;const n=s[0],o=s[s.length-1];if(e.shiftKey&&t===n)e.preventDefault(),this.el.focus();else if(!e.shiftKey&&t===o){e.preventDefault();const t=x(this.el);t&&t.focus()}}handleMenuKeys(e){const t=e.target,i=this.getPopoverElement(),s=this.menuItems.length;if(i.contains(t)&&s>0){const i=parseInt(t.dataset[j],10);if(" "===e.key&&"BUTTON"!==t.tagName){e.preventDefault();const i=t.closest("[role=menuitem]");i&&i.click()}else if("Tab"===e.key){if(e.preventDefault(),e.shiftKey)e.preventDefault(),this.el.focus();else{x(this.el).focus()}this.hide()}else if("Home"===e.key)e.preventDefault(),this.menuItems[0].focus();else if("End"===e.key)e.preventDefault(),this.menuItems[this.menuItems.length-1].focus();else if("ArrowUp"===e.key){e.preventDefault();const t=i>0?i-1:this.menuItems.length-1;this.menuItems[t].focus()}else if("ArrowDown"===e.key){e.preventDefault();const t=i<this.menuItems.length-1?i+1:0;this.menuItems[t].focus()}}}handleKeysInPopover(e){const t=e.target,i=this.getPopoverElement();"Tab"===e.key&&i.contains(t)?this.handleKeyTabInPopover(e):"Tab"===e.key&&t===this.el&&this.isShowing&&!e.shiftKey&&this.handleKeyTabForwardToPopover(e)}handleKeyboardEvent(e){"Escape"===e.key?this.handleKeyEscape(e):"menu"===this.config.type?this.handleMenuKeys(e):this.handleKeysInPopover(e)}bindEvents(){const e=this.config.trigger.split(" ");this.handleClick=this.handleClick.bind(this),this.handleInEvent=this.handleInEvent.bind(this),this.handleOutEvent=this.handleOutEvent.bind(this),this.handlePopoverMouseEnter=this.handlePopoverMouseEnter.bind(this),this.handlePopoverMouseLeave=this.handlePopoverMouseLeave.bind(this),this.clickOutsideHandler=this.clickOutsideHandler.bind(this),this.handleKeyboardEvent=this.handleKeyboardEvent.bind(this),this.handleTriggerFocusIn=this.handleTriggerFocusIn.bind(this),this.handleTriggerKeyDown=this.handleTriggerKeyDown.bind(this),this.el.addEventListener("focusin",this.handleTriggerFocusIn),this.el.addEventListener("keydown",this.handleTriggerKeyDown),e.forEach(e=>{if("click"===e)this.el.addEventListener("click",this.handleClick);else{const t="hover"===e,i=t?"mouseenter":"focusin",s=t?"mouseleave":"focusout";this.el.addEventListener(i,this.handleInEvent),this.el.addEventListener(s,this.handleOutEvent)}})}removeEvents(){this.el.removeEventListener("focusin",this.handleTriggerFocusIn),this.el.removeEventListener("keydown",this.handleTriggerKeyDown);this.config.trigger.split(" ").forEach(e=>{if("click"===e)this.el.removeEventListener("click",this.handleClick);else{const t="hover"===e,i=t?"mouseenter":"focusin",s=t?"mouseleave":"focusout";this.el.removeEventListener(i,this.handleInEvent),this.el.removeEventListener(s,this.handleOutEvent)}})}handlePopoverMouseEnter(){this.hidetimeout&&clearTimeout(this.hidetimeout),this.showtimeout&&clearTimeout(this.showtimeout),this.isShowing||(this.showtimeout=setTimeout(()=>{this.show()},this.config.delay))}handlePopoverMouseLeave(){this.showtimeout&&clearTimeout(this.showtimeout),this.isShowing&&(this.hidetimeout=setTimeout(()=>{this.hide()},this.config.delay))}clickOutsideHandler(e){const t=e.target;!this.isShowing||this.el.contains(t)||t.closest(`.${C}`)||this.hide()}bindPopoverEvents(){const e=this.getPopoverElement();e.removeEventListener("mouseenter",this.handlePopoverMouseEnter),e.addEventListener("mouseenter",this.handlePopoverMouseEnter,{once:!0}),e.removeEventListener("mouseleave",this.handlePopoverMouseLeave),e.addEventListener("mouseleave",this.handlePopoverMouseLeave,{once:!0})}getPopoverTemplate(){const e="tooltip"===this.config.type?"env-popover--tooltip":"",t="menu"===this.config.type?B:N,i="menu"===this.config.type?"menu":"tooltip";return"function"==typeof this.config.template&&(this.config.template=this.config.template(e,t,i)),this.config.template}getPopoverElement(){if(!this.popoverElement){const e=document.createElement("div");e.innerHTML=this.getPopoverTemplate(),this.popoverElement=e.firstChild,A(this.popoverElement)}return this.popoverElement}setTitle(e){if(this.config.title)e.querySelector(`.${D}`).textContent=this.config.title,this.popoverElement.querySelector(`.${D}`).setAttribute("id",e.id+"-title");else{const e=this.popoverElement.querySelector(`.${P}`);e&&e.remove()}}setContent(e){this.config.content instanceof HTMLElement&&(this.config.content=this.config.content.innerHTML);const t="menu"===this.config.type?B:N;this.config.escapeContent?e.querySelector(`.${t}`).innerHTML=`<p class="env-text">${this.config.content}</p>`:e.querySelector(`.${t}`).innerHTML=this.config.content}updateConfig(e){return Object.assign(this.config,e),this}render(){const e=this.getPopoverElement();this.setTitle(e),this.setContent(e)}hide(){this.getPopoverElement().remove(),"menu"===this.config.type?(this.el.setAttribute("aria-expanded","fal
2se"),this.el.removeAttribute("aria-controls")):this.el.removeAttribute("aria-describedby"),this.config.clickOutside&&document.body.removeEventListener("click",this.clickOutsideHandler),document.removeEventListener("keydown",this.handleKeyboardEvent),this.isShowing=!1}show(){this.render();const e=this.getPopoverElement();document.body.appendChild(e),"menu"===this.config.type?(this.el.setAttribute("aria-expanded","true"),this.el.setAttribute("aria-controls",this.popoverElement.id),e.setAttribute("aria-labelledby",this.config.title?`${this.popoverElement.id}-title`:this.el.id),this.menuItems=h(".env-popover__item",e),this.menuItems.forEach((e,t)=>{e.dataset[j]=t,e.setAttribute("role","menuitem")})):this.el.setAttribute("aria-describedby",this.popoverElement.id),$().then(t=>{this._popper=t(this.el,e,{placement:this.config.placement,modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"arrow",options:{element:`.${O}`}}]}),this._popper.update(),this.config.clickOutside&&document.body.addEventListener("click",this.clickOutsideHandler),document.addEventListener("keydown",this.handleKeyboardEvent),this.isShowing=!0})}destroy(){this.hide(),this._popper&&this._popper.destroy(),this._popper=void 0,this.isShowing=!1,this.removeEvents()}static async _init(e,t){const i=h(e);if(i.length>0)return await $(),i.map(e=>{if(e[S]||(e[S]=new H(e,t)),"string"==typeof t){if(!e[S][t])throw new Error(`No method named "${t}"`);e[S][t].call(e[S])}return e[S]})}static _jQueryInterface(e){return T.consoleWarning("jQuery",S),this.each(()=>{h(this).forEach(t=>{H._init(t,e)})})}}if("undefined"!=typeof document){const e=l().fn[S];l().fn[S]=H._jQueryInterface,l().fn[S].Constructor=H,l().fn[S].noConflict=()=>(l().fn[S]=e,H._jQueryInterface)}const V=async(e,t)=>H._init(e,t),K="envSelect",F="http://www.w3.org/2000/svg",Q={sv:{add:"Lägg till",remove_button:"Ta bort val",clear_button:"Ta bort alla val",no_results:"Inga alternativ matchar"},en:{add:"Add",remove_button:"Remove",clear_button:"Clear all",no_results:"No results found"},no:{add:"Legg til",remove_button:"Fjern",clear_button:"Fjern alt",no_results:"Ingen resultater funnet"}},R={staticConfig:{wrapperClass:"env-select",inputClass:"env-select__input",dropdownClass:"env-select__dropdown",dropdownContentClass:"env-select__dropdown__content",itemClass:"env-select__item",optionClass:"env-select__dropdown__option",plugins:{caret_position:{},remove_button:{title:`${Q.sv.remove_button}`,className:"env-select__item__remove"},clear_button:{title:`${Q.sv.clear_button}`,className:"env-select__input__clear"}}},userConfig:{allowEmptyOption:!1,valueField:"value",labelField:"text",searchField:["text"],dropdownParent:null,maxItems:null,options:null,maxOptions:null,items:null,create:!1,clearButton:!0,placeholder:null,sortField:function(e,t){const i=this.items[e.id].text,s=this.items[t.id].text;return i&&s?i.localeCompare(s):0},createFilter:function(e){return!((e=e.toLowerCase())in this.options)},preload:!1,render:{option:function(e,t){return"<div>"+t(e[this.settings.labelField])+"</div>"},item:function(e,t){return"<div>"+t(e[this.settings.labelField])+"</div>"},option_create:function(e,t){return`<div class="create">${this.settings.i18n.add} <strong>${t(e.input)}</strong>&hellip;</div>`},no_results:function(){return`<div class="no-results">${this.settings.i18n.no_results}</div>`},loading:function(){return'<div class="env-select__spinner env-spinner-bounce"><div class="env-bounce1"></div><div class="env-bounce2"></div><div class="env-bounce3"></div></div>'}},load:null,onInitialize:null,onChange:null,onItemAdd:null,onItemRemove:null,onClear:null,onOptionAdd:null,onOptionRemove:null,onOptionClear:null,onDropdownOpen:null,onDropdownClose:null,onType:null,onFocus:null,onBlur:null,onLoad:null,i18n:"sv"}},q=function(e,t,i){this.el=e,this.settings=t,this.el.classList.remove("env-form-input");let s=new i(this.el,this.settings);if(s.control.classList.add("env-select__input"),s.input.classList.add("env-assistive-text"),1===this.settings.maxItems){const e=document.createElementNS(F,"svg"),t=document.createElementNS(F,"use");t.setAttributeNS("http://www.w3.org/1999/xlink","href","/sitevision/envision-icons.svg#icon-angle-down"),e.appendChild(t),e.classList.add("env-icon"),s.wrapper.appendChild(e)}return this.addOptions=s.addOption.bind(s),this.load=s.load.bind(s),this.getOption=s.getOption.bind(s),this.updateOption=s.updateOption.bind(s),this.removeOption=s.removeOption.bind(s),this.getItem=s.getItem.bind(s),this.addItem=s.addItem.bind(s),this.refreshOptions=s.refreshOptions.bind(s),this.getValue=s.getValue.bind(s),this.setValue=s.setValue.bind(s),this.open=s.open.bind(s),this.close=s.close.bind(s),this.clear=s.clear.bind(s),this.clearOptions=s.clearOptions.bind(s),this.clearFilter=s.clearFilter.bind(s),this.lock=function(){s.lock(),"SELECT"===s.input.tagName&&(s.input.disabled=!0),s.input.readOnly=!0,s.control_input.readOnly=!0},this.unlock=function(){s.unlock(),"SELECT"===s.input.tagName&&(s.input.disabled=!1),s.input.readOnly=!1,s.control_input.readOnly=!1},this.focus=s.focus.bind(s),this.blur=s.blur.bind(s),this.disable=s.disable.bind(s),this.enable=s.enable.bind(s),this.destroy=function(){s.destroy();for(let e in this)Object.prototype.hasOwnProperty.call(this,e)&&delete this[e];
2s=null},(this.el.classList.contains("env-select--locked")||null!==this.el.getAttribute("readonly"))&&(s.control_input.classList.remove("env-select--locked"),s.input.classList.remove("env-select--locked"),this.lock()),this},U=async(e,t)=>{const i=h(e);if(i.length>0){const{default:e}=await o.e(390).then(o.bind(o,621));return i.map(i=>(i[K]||(i[K]=new q(i,((e,t)=>{e=T.normalizeOptions(e,R.userConfig);let i=T.extend(!0,{},R.staticConfig,R.userConfig,e);1===i.maxItems?(delete i.plugins.clear_button,delete i.plugins.remove_button):delete i.allowEmptyOption,i.clearButton||delete i.plugins.clear_button,["items","placeholder","options"].forEach(e=>{i[e]||delete i[e]}),i.i18n=T.getLanguageOptions(i?.i18n,Q,t);for(let e in i.plugins)i.plugins[e].title&&i.i18n[e]&&(i.plugins[e].title=i.i18n[e]);return i})(t,i),e)),i[K]))}},z="aria-selected",W="aria-hidden",J="data-env-tabs-index",G="env-tabs__link--active",X="envTabs",Y={active:0};class Z{constructor(e,t){this.el=e,this.tabs=h(this.el.querySelectorAll('[role="tab"]')),this.panels={},this.activeTab=void 0,this.config=Object.assign({},Y,T.normalizeOptions(t,Y)),this._clickHandler=(e=>{e.preventDefault(),this._setActive(e.currentTarget,!0)}).bind(this),this._keydownHandler=(e=>{const t=this.el.querySelector(".env-tabs--column");if("Enter"===e.key||" "===e.key)e.preventDefault(),this._setActive(e.currentTarget,!0);else if(t&&("ArrowUp"===e.key||"ArrowDown"===e.key)||!t&&("ArrowLeft"===e.key||"ArrowRight"===e.key)){e.preventDefault();let t=this._getIndex(e.currentTarget)+("ArrowLeft"===e.key||"ArrowUp"===e.key?-1:1);t>this.tabs.length-1?t=0:t<0&&(t=this.tabs.length-1),this._setFocus(this.tabs[t])}}).bind(this),this._bindEvents()}
2initialize(){this.tabs.forEach((e,t)=>{A(e);let i=document.getElementById(e.getAttribute("aria-controls"));i||document.querySelector(e.getAttribute("href")),this.panels[e.getAttribute("id")]=i,("true"===e.getAttribute(z)||e.classList.contains(G))&&(this.config.active=t),e.classList.remove(G),e.setAttribute(z,!1),e.setAttribute(J,t),e.setAttribute("tabindex","-1"),i&&(i.setAttribute("tabindex","0"),i.setAttribute("role","tabpanel"),i.setAttribute(W,!0),i.classList.add("env-tabs__panel"),y(i))}),this.tabs[this.config.active].setAttribute("tabindex","0"),this._setActive(this.tabs[this.config.active],!1)}activate(e){e>=0&&e<this.tabs.length&&this._setActive(this.tabs[e],!0)}destroy(){this.tabs.forEach(e=>{e.removeEventListener("click",this._clickHandler,!1),e.removeEventListener("keydown",this._keydownHandler,!1),e.removeAttribute(J)});for(let e in this)delete this[e]}_bindEvents(){this.tabs.forEach(e=>{e.addEventListener("click",this._clickHandler,!1),e.addEventListener("keydown",this._keydownHandler,!1)})}_setFocus(e){this.tabs.forEac
2h(e=>{e.setAttribute("tabindex","-1")}),e.setAttribute("tabindex","0"),e.focus()}_setActive(e,t){this._resetActive(),e.classList.add(G),e.setAttribute(z,!0),t&&this._setFocus(e);const i=this._getPanelForTab(e);i&&(i.setAttribute(W,!1),E(i)),this.activeTab=e,this.activeTab.dispatchEvent(new CustomEvent("envision.tabs.activated",{bubbles:!0,cancelable:!0,detail:{tab:this.activeTab,panel:this._getPanelForTab(this.activeTab)}}))}_getIndex(e){return parseInt(e.getAttribute(J),10)}_getPanelForTab(e){return this.panels[e.getAttribute("id")]}_resetActive(){if(this.activeTab){this.activeTab.classList.remove(G),this.activeTab.setAttribute(z,!1);const e=this._getPanelForTab(this.activeTab);e&&(e.setAttribute(W,!0),y(e))}}static _init(e,t,i){const s=h(e);if(s.length>0){return s.map(e=>{if(e[X]||(e[X]=new Z(e,t),e[X].initialize()),"string"==typeof t){if(!e[X][t])throw new Error(`Invalid method name "${t}"`);e[X][t].call(e[X],i)}return e[X]})}}static _jQueryInterface(e,t){return T.consoleWarning("jQuery",X),this.each(()=>{h(this).forEach(i=>{Z._init(i,e,t)})})}}if("undefined"!=typeof document){const e=l().fn[X];l().fn[X]=Z._jQueryInterface,l().fn[X].Constructor=Z,l().fn[X].noConflict=()=>(l().fn[X]=e,Z._jQueryInterface)}const ee=async(e,t,i)=>Z._init(e,t,i),te="envTooltip",ie="env-tooltip",se=`${ie}--inline`,ne={placement:"top",delay:200,modifiers:[{name:"offset",options:{offset:[0,6]}},{name:"flip",enabled:!0}]};class oe{constructor(e,t){this.container=e,this.el=e.querySelector(':not([role="tooltip"])'),this.tooltip=e.querySelector('[role="tooltip"]'),this.el&&this.tooltip&&(this.config={...ne,...this.container.dataset,...t},this.container.classList.add(ie),"inline"===getComputedStyle(this.container).getPropertyValue("display")&&this.container.classList.add(se),A(this.tooltip),this.el.setAttribute("aria-describedby",this.tooltip.id),p(this.tooltip,"display","none"),this.tooltip.innerHTML=this.tooltip.textContent,this.handleShowEvent=this.handleShowEvent.bind(this),this.handleHideEvent=this.handleHideEvent.bind(this),this.handleHoverIntent=this.handleHoverIntent.bind(this),this.handleKeyboardEvent=this.handleKeyboardEvent.bind(this),this.bindEvents())}handleShowEvent(){this.hidetimeout&&clearTimeout(this.hidetimeout),this.showtimeout&&clearTimeout(this.showtimeout),this.isShowing||(this.showtimeout=setTimeout(()=>{this.show()},this.config.delay))}handleHideEvent(){this.showtimeout&&clearTimeout(this.showtimeout),this.isShowing&&(this.hidetimeout=setTimeout(()=>{this.hide()},this.config.delay))}handleKeyboardEvent(e){"Escape"===e.key&&this.hide()}handleHoverIntent(){this.tooltip.removeEventListener("mouseenter",this.handleShowEvent),this.tooltip.addEventListener("mouseenter",this.handleShowEvent),this.tooltip.removeEventListener("mouseleave",this.handleHideEvent),this.tooltip.addEventListener("mouseleave",this.handleHideEvent)}bindEvents(){this.el.addEventListener("mouseenter",this.handleShowEvent),this.el.addEventListener("focusin",this.handleShowEvent),this.el.addEventListener("mouseleave",this.handleHoverIntent),this.el.addEventListener("focusout",this.handleHoverIntent),this.el.addEventListener("mouseleave",this.handleHideEvent),this.el.addEventListener("focusout",this.handleHideEvent)}hide(){p(this.tooltip,"display","none"),this.isShowing=!1,document.removeEventListener("keyup",this.handleKeyboardEvent)}show(){p(this.tooltip,"display","block"),$().then(e=>{this._popper=e(this.container,this.tooltip,{placement:this.config.placement,modifiers:this.config.modifiers}),this._popper.update(),this.isShowing=!0}),document.addEventListener("keyup",this.handleKeyboardEvent)}destroy(){this.hide(),this._popper&&this._popper.destroy(),this._popper=void 0,this.isShowing=!1,this.el.removeEventListener("mouseenter",this.handleShowEvent),this.el.removeEventListener("focusin",this.handleShowEvent),this.el.removeEventListener("mouseleave",this.handleHideEvent),this.el.removeEventListener("focusout",this.handleHideEvent),this.el.removeEventListener("mouseleave",this.handleHoverIntent),this.el.removeEventListener("focusout",this.handleHoverIntent)}static async _init(e,t){const i=h(e=e||`.${ie}`);if(i.length>0)return await $(),i.map(e=>{if(e[te]||(e[te]=new oe(e,t)),"string"==typeof t){if(!e[te][t])throw new Error(`No method n
2amed "${t}"`);e[te][t].call(e[te])}return e[te]})}}"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",oe._init);const ae=async(e,t)=>oe._init(e,t),re="env-animation-in-progress",le="env-image-viewer__backdrop--in",he=".env.image-viewer",de="envImageviewer",ce={sv:{prev:"Föregående",next:"Nästa",moveto:"Gå till bild"},en:{prev:"Previous",next:"Next",moveto:"Move to image"}},ue=".env-is-active",ge="[data-move-to]",ve="[data-move]",pe="[data-image-viewer]",me=".env-image-viewer__images",fe=".env-image-viewer__indicators",be=".env-spinner",ye="env-is-active",_e="env-image-viewer--hidden",Ee="env-spinner--hide",we={CLICK_DATA_API:`click${he}.data-api`,TOUCHEND:`touchend${he}`,TOUCHMOVE:`touchmove${he}`,TOUCHSTART:`touchstart${he}`},Ie=0;class xe{constructor(e,t){this.$el=l()(e),this.$images=this.$el.find(me),this._isShown=!1,this.config=l().extend({},{i18n:T.getLanguageOptions(t?.i18n,ce,e)},this.$el.data());const i=t&&this.$images.length>t.index?t.index:Ie;this.config.index=i,this.$el.on(we.CLICK_DATA_API,this._click.bind(this))}next(){this.show(this._getNextItemIndex())}prev(){this.show(this._getPrevItemIndex())}show(e){e=e||0,this.config.index=Number(e);const t=l()(this.$images[e])[0].getAttribute("href");if(this._isShown){l()(be).removeClass(Ee),this.$btnContainer.addClass(_e);const e=this._loadImage(t);this.$imgContainer.html(e),this._setActiveIndicatorElement()}else{this.$modal=l()("<div/>",{class:"env-image-viewer__modal"}),this.$btnContainer=l()("<div/>",{class:"env-image-viewer__dialog"}),this.$imgContainer=l()("<div/>",{class:"env-image-viewer__modal-container"}),this.$modal.append(this.$btnContainer),this.$btnContainer.append(this.$imgContainer),this.$modal.appendTo(document.body),this.$images.length>1&&(this.$btnContainer.append(this._getButtons()),this.$btnContainer.append(this._getIndicators())),this.$btnContainer.addClass(_e);const e=this._loadImage(t);this.$imgContainer.html(e),this._isShown=!0,f(),this._bindContainerEvents(),this._bindEvents(),this._showBackdrop(),l()('<div class="env-spinner">\n                                <div class="env-rect1"></div>\n                                <div class="env-rect2"></div>\n                                <div class="env-rect3"></div>\n                                <div class="env-rect4"></div>\n                                <div class="env-rect5"></div>\n                             </div>').prependTo(this.$modal)}}hide(){this.$backdrop.one("transitionend",()=>{this.$backdrop.remove(),this.$modal.remove(),this.$btnContainer.remove(),this.$imgContainer.remove(),b()}).removeClass(le),this._isShown=!1}_click(e){e.preventDefault();const t=l()(e.target);t.is("img")?this.show(this.$images.index(t.parent())):t.is("a.env-image-viewer__images")&&this.show(this.$images.index(t))}_loadImage(e){const t=l()("<img>"),i=l()(".env-image-viewer__dialog");return t.addClass("env-image-viewer__img").attr({tabindex:"-1",src:e}).on("load",()=>{const e=t.height(),s=t.width(),n=window.innerHeight;s>800&&i.css({"max-width":"80%"}),n<e&&t.css({"max-height":.8*n}),l()(be).addClass(Ee),this.$btnContainer.removeClass(_e),this.$imgContainer.children().eq(0).trigger("focus")}),t}_bindContainerEvents(){this.$btnContainer.on(we.CLICK_DATA_API,ve,e=>{e.preventDefault(),"next"===l()(e.currentTarget).data("move")?this.next():this.prev()}),this.$btnContainer.on(we.CLICK_DATA_API,ge,e=>{const t=e.currentTarget.getAttribute("data-move-to");t&&this.show(t)})}_getButtons(){return`<button type="button" class="env-image-viewer--prev" data-move="prev">\n               <svg class="env-image-viewer__prev-icon env-icon env-icon-small">\n               <use href="/sitevision/envision-icons.svg#icon-arrow-left"></use>\n               </svg>\n               <span class="env-assistive-text">${this.config.i18n.prev}</span>\n            </button>\n            <button type="button" class="env-image-viewer--next" data-move="next">\n               <svg class="env-image-viewer__next-icon env-icon env-icon-small">\n               <use href="/sitevision/envision-icons.svg#icon-arrow-right"></use>\n               </svg>
2\n               <span class="env-assistive-text">${this.config.i18n.next}</span>\n            </button>`}_getIndicators(){return`<div class="env-image-viewer__indicators">\n                  ${this._getIndicatorItems()}\n               </div>`}_getIndicatorItems(){const e=this.config.index;let t="";return this.$images.each(i=>{const s=i===e;t+=`<button type="button" title="${this.config.i18n.moveto} ${i+1}" data-move-to="${i}" class="${s?"env-is-active":""}"></button>`}),t}_showBackdrop(){this.$backdrop=l()("<div/>",{class:"env-image-viewer__backdrop"}),this.$modal.on(we.CLICK_DATA_API,e=>{this.$backdrop.hasClass(re)||e.target===e.currentTarget&&this._isShown&&this.hide()}),this.$backdrop.appendTo(document.body),this.$backdrop.one("animationend",this._removeBackdropAnimation).addClass(`${le} ${re}`)}_removeBackdropAnimation(e){l()(e.currentTarget).removeClass(re)}_bindEvents(){const e=this.$modal.find("button"),t=e[0],i=e[e.length-1];this.$modal.on("keydown",e=>this._keydown(e,t,i))}_keydown(e,t,i){if(!/input|textarea/i.test(e.target.tagName))switch(e.key){case"ArrowLeft":e.preventDefault(),this.prev();break;case"ArrowRight":e.preventDefault(),this.next();break;case"Escape":e.preventDefault(),this.$backdrop.hasClass(re)||this.hide();break;case"Tab":"IMG"===e.target.tagName?(e.preventDefault(),t.focus()):e.shiftKey?e.target===t&&(e.preventDefault(),i.focus()):e.target===i&&(e.preventDefault(),t.focus());break;default:return}}_getNextItemIndex(){return this.config.index===this.$images.length-1?0:this.config.index+1}_getPrevItemIndex(){return 0===this.config.index?this.$images.length-1:this.config.index-1}_setActiveIndicatorElement(){if(this.$images.length>0){this.$btnContainer.find(ue).removeClass(ye);const e=this.$btnContainer.find(fe).children()[this.config.index];e&&l()(e).addClass(ye)}}static _init(e,t){T.consoleWarning("component","Image viewer","image-viewer","Image viewer 2");const i=h(e);if(i.length>0)return i.map(e=>(e[de]||(e[de]=new xe(e,t)),e[de]))}static _jQueryInterface(e){return this.each(()=>{h(this).forEach(t=>{xe._init(t,e)})})}}if("undefined"!=typeof document){window.addEventListener("load",()=>{const e=h(pe);e.length>0&&xe._init(e)});const e=l().fn[de];l().fn[de]=xe._jQueryInterface,l().fn[de].Constructor=xe,l().fn[de].noConflict=()=>(l().fn[de]=e,xe._jQueryInterface)}const Ae=async(e,t)=>xe._init(e,t);let Le,$e,ke,Te;const Se="env-image-viewer-2",Ce="env-animation-in-progress",Oe="env-image-viewer-2__viewer__item",Pe="env-image-viewer-2__viewer__items",De="env-image-viewer-2__lightbox",Ne="env-image-viewer-2__lightbox--in",Be="env-button--icon-before",je="env-button--icon-after",Me="STOP",He="PAUSE",Ve="PLAY",Ke="arrow-fill-right",Fe="pause",Qe="arrow-left",Re="arrow-right",qe="delete",Ue="zoom-in",ze="download",We="top",Je="overlay-top",Ge="overlay-bottom",Xe="images",Ye="html",Ze=e=>`<svg class="env-icon" data-icon="${e}">\n      <use href="/sitevision/envision-icons.svg#icon-${e}"></use>\n      </svg>`,et=e=>{(e=Object.assign({},{as:"button",text:"",icon:"",className:"",controls:"",dataset:null},e)).controls=e.controls?`aria-controls="${e.controls}"`:"";const t=c(`<${e.as} type="button"\n      ${e.controls} class="env-button env-button--icon ${e.className}">\n      ${e.text} ${Ze(e.icon)}</${e.as}>`);for(const i in e.dataset)t.dataset[i]=e.dataset[i];return t},tt={LIGHTBOX:`<dialog class="${De}">\n      <div class="${De}__panel"></div>\n      <div class="${De}__panel__header-gradient ${De}__showOnActive"></div>\n      <div class="${De}__panel__footer-gradient ${De}__showOnActive"></div>\n      <div class="${De}__image-container" aria-live="polite"></div>\n      </dialog>`,SPINNER:'<div class="env-spinner env-spinner--fade-in"><div class="env-rect1"></div>\n      <div class="env-rect2"></div><div class="env-rect3"></div>\n      <div class="env-rect4"></div><div class="env-rect5"></div></div>'},it={images:`<div class="${Se}__viewer" aria-live="off">\n<div class="${Pe}"></div>\n<div class="env-assistive-text ${Se}__assistive"></div>\n</div>`,html:`<div class="${Se}__viewer" aria-live="off">\n<div class="${Pe}"></div>\n</div>`},st=`<div class="${Oe}" role="group" aria-roledescription="slide"></div>`,nt=`<div class="${Se}__viewer__controls"></div>`,ot={sv:{roledescription:{slideshow:"karusell",slide:"bild"},prev:"Visa föregående",next:"Visa nästa",pause:"Stoppa",play:"Starta",slideshow:"automatisk bläddring",zoom:"Visa",largeImage:"stor bild",close:"Stäng",download:"Ladda ner bild",image:"Bild",of:"av"},en:{roledescription:{slideshow:"carousel",slide:"image"},prev:"Previous",next:"Next",pause:"Stop",play:"Start",slideshow:"automatic slide show",zoom:"Show",largeImage:"large image",close:"Close",download:"Download image",image:"Image",of:"of"},no:{roledescription:{slideshow:"karusell",slide:"bilde"},prev:"Forrige",next:"Neste",pause:"Stopp",play:"Start",slideshow:"automatisk lysbildeserie",zoom:"Vis",largeImage:"stort bilde",close:"Lukk",download:"Last ned bilde",image:"Bilde",of:"av"}},at={slides:!1,buttons:{download:!0,showText:!1},i18n:"sv"},rt={auto:!1,playing:!1,transition:"slide",draggable:!0,buttons:{placement:"overlay-top",type:null,ghost:!1,size:null},autoHeight:!1,type:"images"},lt=(e,t)=>{e=T.normalizeOptions(e,at);let i=!!e?.slides&&e?.slides;!1!==i&&(i=!0===i?{}:{...i},i=(e=>{const t=window.matchMedia("(prefers-reduced-motion: reduce)").matches;return e.auto=!t&&Number.isInteger(e.auto)&&e.auto>0?e.auto:0,e.playing=!t&&e.auto>0&&e.playing,"boolean"!=typeof e.overlay||e.buttons?.placement||(e.buttons={...e.buttons},Object.assign(e.buttons,{placement:e.overlay?Je:We})),delete e.overlay,!e.transition&&Number.isInteger(e.speed)&&(e.speed<75?e.transition="none":e.speed<300?e.transition="slide":e.speed>900?e.transition="slideSlow":e.transition="slide"),delete e.speed,t&&(e.transition="none"===e.transition?e.transition:"fade"),"none"===e.transition?e.duration=0:"slideSlow"===e.transition?e.duration=50:e.duration=20,e.loop=!0,e})(i));let s=T.extend(!0,{},at,e);var n;return i&&(s.slides=T.extend(!0,{},rt,i)),s.i18n=T.getLanguageOptions(s?.i18n,ot,t),s.i18n=((n=s.i18n).roledescription=(()=>{const e=n.roledescription;return e&&"object"==typeof e&&!Array.isArray(e)?e:{slideshow:e,slide:"slide"}})(),n),T.normalizeOptions(s.i18n,ot.sv),s};class ht{#e;#t;#i;#s;#n;#o;constructor(e,t){this.#e=e,this.#t=t,this.#s=[],h("[data-zoom]",this.#e).forEach(e
2=>{this.#s.push(this.#a(e))}),this.bindThis(),this.#t.slides||this.#e?.addEventListener("click",this.#r)}#a(e){const t=e.href||e.dataset.href;let i,s;e.href&&!e.href.startsWith("#")&&(e.dataset.href=t,e.href="#0");let n="",o="";return i=e.hasAttribute("alt")||e.dataset.alt?e:e.querySelector("[alt], [data-alt]"),i&&i.dataset.alt?n=i.dataset.alt:i&&i.hasAttribute("alt")&&(n=i.getAttribute("alt")),s=e.dataset.figcaption?e:e.querySelector("figcaption, [data-figcaption]"),s&&s.dataset.figcaption?o=i.dataset.figcaption:s&&"FIGCAPTION"===s.tagName&&(o=s.textContent.trim()),{src:t,alt:n,caption:o}}getImageCount(){return this.#s.length}bindThis(){this.#r=this.#r.bind(this),this.#l=this.#l.bind(this),this.#h=this.#h.bind(this),this.#d=this.#d.bind(this)}loadImage(){const e=d(`.${De}__image-container`,this.#i),t=d(`.${De}__panel`,this.#i);e.innerHTML=tt.SPINNER;const i=document.createElement("figure");i.classList.add(`${De}__figure`);const s=new Image,n=this.#s.find(e=>e.src===this.#n);if(n.caption){const e=document.createElement("figcaption");e.classList.add("env-image-viewer-2__lightbox__showOnActive"),e.classList.add("env-text-caption-01"),e.classList.add(`${De}__caption`),e.textContent=n.caption,i.appendChild(e)}s.onload=()=>{this.#t.buttons.download&&(this.#o.href=s.src),p(t,"background-image",`url('${s.src}')`),e.replaceChildren(i)},s.alt=n.alt,s.classList.add(`${De}__image`),i.prepend(s),s.src=n.src,this.setVisibleButtons()}createLightbox(){this.#i=c(tt.LIGHTBOX);const e=this.#t.buttons.showText;this.#s.length>1&&(this.#i.appendChild(et({text:this.#t.i18n.prev,icon:Qe,className:`${De}__prev ${De}__showOnActive`,dataset:{move:"prev"}})),this.#i.appendChild(et({text:this.#t.i18n.next,icon:Re,className:`${De}__next ${De}__showOnActive`,dataset:{move:"next"}}))),this.#i.appendChild(et({text:this.#t.i18n.close,icon:qe,className:`${De}__close  ${e&&Be} ${De}__showOnActive`,dataset:{close:""}})),this.#t.buttons.download&&(this.#o=et({text:this.#t.i18n.download,icon:ze,className:`${De}__download ${e&&Be} ${De}__showOnActive`,as:"a"}),this.#o.setAttribute("download",""),this.#o.removeAttribute("type"),this.#i.appendChild(this.#o))}fadeIn(){this.#i.addEventListener("transitionend",e=>{e.currentTarget?.classList.remove(Ce)},{once:!0}),this.#i.classList.add(Ne,Ce)}showLightbox(){this.#i||(this.createLightbox(),this.bindEvents()),document.body.appendChild(this.#i),this.loadImage(),f(),this.#i.showModal(),this.fadeIn(),this.#t.slides?.auto&&this.#e.dispatchEvent(new Event("pause"))}show(e){((e=e||0)<0||e>this.#s.length-1)&&(e=0),this.#n=this.#s[e].src,this.showLightbox()}#r=e=>{e.preventDefault(),e.target.closest("[data-zoom]")&&e.target.closest("[data-zoom]").dataset.href&&(this.#n=e.target.closest("[data-zoom]").dataset.href,this.showLightbox())};close(){this.#i.addEventListener("transitionend",()=>{this.#i.close(),this.#i.remove(),b()},{once:!0}),this.#i.classList.remove(Ne)}getCurrentIndex(){const e=this.#s.findIndex(e=>e.src===this.#n);return e>=0?e:0}goTo(e){this.#n=this.#s[e].src,this.loadImage()}#c(){let e=this.getCurrentIndex();e++,e>=this.#s.length?(e=this.#s.length-1,this.#n=this.#s[e].src):this.goTo(e)}#u=()=>{let e=this.getCurrentIndex();e--,e<0?this.#n=this.#s[0].src:this.goTo(e)};setVisibleButtons(){const e=this.getCurrentIndex(),t=this.#s.length;if(1===t||0===e&&t>1?y(d('[data-move="prev"]',this.#i)):E(d('[data-move="prev"]',this.#i)),1===t||e===t-1&&t>1?y(d('[data-move="next"]',this.#i)):E(d('[data-move="next"]',this.#i)),!w(document.activeElement)){I(this.#i)[0].focus()}}#l=e=>{if(e.target.isEqualNode(e.currentTarget))return void this.close();const t=e.target.closest("button");if(!t)return;let i=this.getCurrentIndex();t.dataset.move&&("prev"===t.dataset.move?i--:i++,i<0&&(i=0),i>=this.#s.length-1&&(i=this.#s.length-1),this.goTo(i)),"close"in t.dataset&&this.close()};#h=e=>{if(/input|textarea/i.test(e.target.tagName))return;const t=I(this.#i),i=t[0],s=t[t.length-1];switch(e.key){case"ArrowLeft":e.preventDefault(),this.#u();break;case"ArrowRight":e.preventDefault(),this.#c();break;case"Escape":e.preventDefault(),this.#i.classList.contains(Ce)||this.close();break;case"Tab":e.shiftKey?e.target===i&&(e.preventDefault(),s.focus()):e.target===s&&(e.preventDefault(),i.focus());break;default:return}};#d=e=>{this.#i.classList.toggle(`${De}--active`,"mouseleave"!==e.type)};bindEvents(){this.#i.addEventListener("click",this.#l),this.#i.addEventListener("keydown",this.#h),this.#i.addEventListener("mouseenter",this.#d),this.#i.addEventListener("mouseleave",this.#d),this.#i.addEventListener("keydown",this.#d)}}class dt{#e;#i;#t;#g;#v;#p;#m;#f;#b;constructor(e,t,i,[s,n,o,a]){if(this.#e=e,this.#t=t,this.#i=i,!s)return;this.setupSlider(),this.setupSliderControls();const r=[];this.#t.slides.auto&&n instanceof Function&&(this.#v=null,this.#g=this.#t.slides.auto?Ve:Me,r.push(n({delay:this.#t.slides.auto,defaultInteraction:!1}))),this.#t.slides.autoHeight&&o&&r.push(o()),"fade"===this.#t.slides.transition&&a&&r.push(a()),this.setSliderAriaLive(),this.#p=s(this.#f,this.#t.slides,r),this.#t.slides.auto&&this.#y(this.#t.slides.playing?Ve:Me),this.#_(this.#f,0),p(this.#f,"visibility","visible"),this.pause=()=>this.#y(He),this.play=()=>this.#y(Ve),this.prev=()=>this.#p?.goToPrev?.(),this.next=()=>this.#p?.goToNext?.(),this.goTo=(e,t)=>{Number.isInteger(t)&&(t=t<=0),this.#p?.goTo?.(e,t)},this.getPos=()=>this.#p?.selectedSnap?.()??0}setupSlider(){var e;this.#e.classList.add(Se),this.#t.slides.transition&&this.#e.classList.add(`${Se}--transition-${this.#t.slides.transition}`),"SECTION"!==this.#e.tagName&&this.#e.setAttribute("role","regi
2on"),this.#e.setAttribute("aria-roledescription",this.#t.i18n.roledescription.slideshow),((e=this.#t.slides.buttons.placement)===Je||e===Ge)&&(this.#e.classList.add(`${Se}--overlay`),this.#e.classList.add(`${Se}--${this.#t.slides.buttons.placement}`)),this.#t.slides.type===Xe?this.#f=c(it[Xe]):this.#f=c(it[Ye]),this.#m=d(`.${Pe}`,this.#f),A(this.#m);const t=this.#e.children.length;for(let e=this.#e.children.length-1;e>=0;e--){const i=u(this.#e.children[e],st);i.setAttribute("aria-label",`${this.#t.i18n.image} ${e+1} ${this.#t.i18n.of} ${t}`),i.setAttribute("aria-roledescription",this.#t.i18n.roledescription.slide),this.#m.prepend(i)}this.#e.replaceChildren(this.#f),t<=1&&this.#t?.slides?.auto&&(this.#t.slides.auto=!1,this.#t.slides.playing=!1)}getSliderButtonClassNames(){let e=`${Se}__viewer__controls__button`;return this.#t.slides.buttons?.placement?.startsWith("overlay")||(this.#t.slides.buttons?.type&&(e=`env-button--${this.#t.slides.buttons.type} ${e}`),this.#t.slides.buttons?.ghost&&(e=`env-button--ghost ${e}`)),this.#t.slides.buttons?.size&&(e=`env-button--${this.#t.slides.buttons.size} ${e}`),e}setupSliderControls(){const e=c(nt),t=this.getSliderButtonClassNames(),i=this.#t.buttons.showText,s=et({text:this.#t.i18n.prev,icon:Qe,className:`${t} ${i?Be:""}`,controls:this.#m.id}),n=et({text:this.#t.i18n.next,icon:Re,className:`${t} ${i?je:""}`,controls:this.#m.id});let o;this.#f.querySelectorAll(`.${Oe}`)?.length>1&&(e.appendChild(s),e.appendChild(n)),this.#t.slides.auto&&(this.#b=et({text:`${this.#t.i18n.play} <span class="env-assistive-text">${this.#t.i18n.slideshow}</span>`,icon:Ke,className:`${t} ${i?Be:""}`}),this.#f.querySelectorAll(`.${Oe}`)?.length>1&&e.prepend(this.#b)),this.#t.slides.type===Xe&&this.#i?.getImageCount()>0&&(o=et({text:`${this.#t.i18n.zoom} <span class="env-assistive-text">${this.#t.i18n.largeImage}</span>`,icon:Ue,className:`${t} ${i&&Be}`}),e.prepend(o)),"top"===this.#t.slides.buttons.placement?this.#e.prepend(e):this.#e.append(e),requestAnimationFrame(()=>{this.bindEvents(s,n,o)})}#y=e=>{const t=this.#p.plugins().autoplay;e===He&&this.#g!==Me?(this.#g=He,t?.pause()):e===Me?(this.#g=Me,t?.stop()):e===Ve&&this.#t.slides.auto&&(this.#g=Ve,t?.play()),this.setPlayButton(),this.setSliderAriaLive()};#c=()=>{this.#p.goToNext(),this.#y(He)};#u=()=>{this.#p.goToPrev(),this.#y(He)};#_(e,t){const i=e.querySelectorAll(`.${Oe}`)[t];I(e).forEach(e=>{const t=e.dataset.envImageViewer2Tabindex||e.getAttribute("tabindex")||"0";"-1"!==t&&e.setAttribute("tabindex","-1"),e.dataset.envImageViewer2Tabindex=t});if(I(i).forEach(e=>{const t=e.dataset.envImageViewer2Tabindex||"0";e.setAttribute("tabindex",t)}),this.#t.slides.type===Xe){const t=`${i.querySelector("img")?.alt} ${i.textContent.trim()}`;t&&(e.querySelector(`.${Se}__assistive`).textContent=t)}}setSliderAriaLive(){const e=this.#t.slides.auto&&this.#g===Ve?"off":"polite";this.#f.setAttribute("aria-live",e)}setPlayButton(){if(!this.#b)return;const e=this.#b.querySelector("[data-icon]")?.dataset.icon;this.#g===Ve&&e!==Fe?this.#b.innerHTML=`${this.#t.i18n.pause} <span class="env-assistive-text">${this.#t.i18n.slideshow}</span>${Ze(Fe)}`:e!==Ke&&(this.#b.innerHTML=`${this.#t.i18n.play} <span class="env-assistive-text">${this.#t.i18n.slideshow}</span>${Ze(Ke)}`)}#E=e=>{e.preventDefault(),e.stopPropagation(),this.#g!==Ve?this.#y(Ve):this.#y(Me)};#w=e=>{this.#t.slides.draggable?"pointerdown"===e&&this.#g===Ve&&this.#y(He):"click"===e?(this.#y(Me),this.#v=e):"mouseenter"===e&&this.#g===Ve?(this.#y(He),this.#v=e):"mouseleave"===e&&"mouseenter"===this.#v&&this.#g===He&&(this.#y(Ve),this.#v=e)};#I=()=>{this.#w("click")};#x=(e,t)=>{const i=t?.detail?.interaction;this.#w(i)};#A=e=>{this.#t.slides.auto&&this.#g===Ve&&this.#f.contains(e.target)&&this.#y(He)};#L=(e,t)=>{this.#_(this.#f,t?.detail?.slidesInView[0]||0)};#$=()=>{this.#i?.show(this.getPos())};bindEvents(e,t,i){this.#b?.addEventListener("click",this.#E),e.addEventListener("click",this.#u),t.addEventListener("click",this.#c),i?.addEventListener("click",this.#$),this.#t.slides.auto&&(this.#f.addEventListener("focus",this.#A,!0),this.#f.addEventListener("click",this.#I,!0),this.#p.on("slidesinview",this.#L),this.#p.on("autoplay:interaction",this.#x))}}const ct="envImageviewer2";class ut{constructor(e,t){if(this.el=e,this.config=t,h("[data-zoom]",this.el).length>0&&(this.lightbox=new ht(this.el,this.config)),this.config.slides){const e={autoPlay:this.config.slides.auto>0,autoHeight:!0===this.config.slides.autoHeight,fade:"fade"===this.config.slides.transition};this.ready=(async(e={})=>
2{if(!Le){const{default:e}=await o.e(131).then(o.bind(o,394));Le=e}if(e.autoPlay&&!$e){const{default:e}=await o.e(211).then(o.bind(o,452));$e=e}if(e.autoHeight&&!ke){const{default:e}=await o.e(172).then(o.bind(o,966));ke=e}if(e.fade&&!Te){const{default:e}=await o.e(926).then(o.bind(o,472));Te=e}return[Le,e.autoPlay?$e:null,e.autoHeight?ke:null,e.fade?Te:null]})(e).then(([e,t,i,s])=>(this.slider=new dt(this.el,this.config,this.lightbox,[e,t,i,s]),this))}else this.ready=Promise.resolve(this)}}const gt=async(e,t)=>{const i=h(e);if(i.length>0){const e=i.map(e=>(e[ct]||(e[ct]=new ut(e,lt(t,e))),e[ct]));return await Promise.all(e.map(e=>e.ready)),e.forEach(e=>{delete e.ready}),e}},vt="rangeHandleIndex",pt="envRangeSlider",mt="slide",ft="slidestop",bt="input",yt="change",_t={min:0,max:100,step:1,values:[0,0],visibleValues:!0};class Et{constructor(e,t){this.config=T.extend(!0,{},_t,t),this.el=e,this.handlesEl=h(".env-range-slider__handle",this.el),this.rangeEl=d(".env-range-slider__range",this.el),this.config.visibleValues&&(this.valueHoldersEl=h(".env-range-slider__values__value",this.el))}initialize(){this._setupHandles(),this._refreshRange(),this._bindEvents()}values(e){if(Array.isArray(e)){for(let t=0;t<e.length;t++)this.config.values[t]=this._trimAlignValue(e[t]);this._refreshRange()}}_setupHandles(){this.handlesEl.forEach((e,t)=>{e.dataset[vt]=t})}_refreshRange(){let e,t,i;this.handlesEl.forEach((s,n)=>{i=this._getValue(n),t=(i-this.config.min)/(this.config.max-this.config.min)*100,p(s,"left",`${t}%`),0===n?p(this.rangeEl,"left",`${t}%`):p(this.rangeEl,"width",t-e+"%"),this.config.visibleValues&&(this.valueHoldersEl[n].innerText=i),e=t})}_bindEvents(){this.handlesEl.forEach(e=>{e.removeEventListener("mousedown",this._initSlide),e.removeEventListener("touchstart",this._initSlide),e.removeEventListener("keydown",this._initKeySlide),e.removeEventListener("keyup",this._stopKeySlide),e.addEventListener("mousedown",this._initSlide.bind(this)),e.addEventListener("touchstart",this._initSlide.bind(this)),e.addEventListener("keydown",this._initKeySlide.bind(this)),e.addEventListener("keyup",this._stopKeySlide.bind(this))})}#k(e){const t=e.getBoundingClientRect(),i=document.documentElement;return{top:t.top+window.scrollY-i.clientTop,left:t.left+window.scrollX-i.clientLeft}}_initSlide(e){const t=this._getPosition(e),i=this._normValueFromMouse(t);let s,n,o,a,r=this.config.max-this.config.min+1;if("touchstart"===e.type?(document.addEventListener("touchmove",this._handleSlide.bind(this)),document.addEventListener("touchend",this._stopSlide.bind(this),{once:!0})):(document.addEventListener("mousemove",this._handleSlide.bind(this)),document.addEventListener("mouseup",this._stopSlide.bind(this),{once:!0})),this.handlesEl.forEach((e,t)=>{o=this._getValue(t),a=Math.abs(i-o),(r>a||r===a&&(t===this._lastChangedValue||o===this.config.min))&&(r=a,s=e,n=t)}),this._handleIndex=n,s){s.focus();const o=this.#k(s),a=s.getBoundingClientRect(),r=getComputedStyle(s);this._clickOffset={left:t.x-o.left-a.width/2,top:t.y-o.top-a.height/2-(parseInt(r.borderTopWidth,10)||0)-(parseInt(r.borderBottomWidth,10)||0)+(parseInt(r.marginTop,10)||0)},this._slide(e,n,i)}}_handleSlide(e){const t=this._normValueFromMouse(this._getPosition(e));return this._slide(e,this._handleIndex,t),!1}_slide(e,t,i){const s=this._getValue(t?0:1),n=this._getValue(t),o=this._getValues();i=0===t?Math.min(s,i):Math.max(s,i),o[t]=i,i!==n&&(this._trigger(bt,e,{values:o}),this._setValue(t,i))}_stopSlide(e){return document.removeEventListener("mousemove",this._handleSlide),document.removeEventListener("touchmove",this._handleSlide),this._trigger(yt,e,{values:this._getValues()}),this._handleIndex=null,this._clickOffset=null,!1}_initKeySlide(e){switch(e.key){case"ArrowUp":case"ArrowRight":case"ArrowDown":case"ArrowLeft":e.preventDefault(),this._keySliding||(this._keySliding=!0);break;default:return}const t=parseInt(e.target.dataset[vt],10),i=this._getValue(t);let s;switch(e.key){case"ArrowUp":case"ArrowRight":if(i===this.config.max)return;s=this._trimAlignValue(i+this.config.step);break;case"ArrowDown":case"ArrowLeft":if(i===this.config.min)return;s=this._trimAlignValue(i-this.config.step)}this._slide(e,t,s)}_stopKeySlide(e){this._keySliding&&(this._keySliding=!1,this._trigger(yt,e,{values:this._getValues()}))}_normValueFromMouse(e){const t=this.el.offsetWidth,i=this.config.max-this.config.min;let s=(e.x-this.#k(this.el).left-(this._clickOffset?this._clickOffset.left:0))/t;s>1&&(s=1),s<0&&(s=0);const n=this.config.min+s*i;return this._trimAlignValue(n)}_getPosition(e){const t={};if(e?.touches){const i=e.touches[0];t.x=i.pageX,t.y=i.pageY}else t.x=e.pageX,t.y=e.pageY;return t}_trimAlignValue(e){if(e<=this.config.min)return this.config.min;if(e>=this.config.max)return this.config.max;const t=this.config.step,i=(e-this.config.min)%t;let s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))}_getValues(){return this.config.values.slice()}_getValue(e){return this.config.values[e]}_setValue(e,t){this.config.values[e]=this._trimAlignValue(t),this._refreshRange()}_trigger(e,t,i){const s=new CustomEvent(e,{bubbles:!1,detail:i});let n;this.el.dispatchEvent(s);const o=l()._data(this.el,"events");e===bt?n=mt:e===yt&&(n=ft),o&&(o[mt]||o[ft])&&((t=l().Event(t)).type=n,t.target=this.el,l
2()(this.el).trigger(t,i)),this.config[n]&&this.config[n]instanceof Function&&this.config[n].call(this.el,t,i)}static _init(e,t,...i){const s=h(e);if(s.length>0)return s.map(e=>{if(e[pt]||(e[pt]=new Et(e,t),e[pt].initialize()),"string"==typeof t){if(!e[pt][t])throw new Error(`No method named "${t}"`);e[pt][t].call(e[pt],...i)}return e[pt]})}static _jQueryInterface(e,...t){return T.consoleWarning("jQuery",pt),this.each(()=>{h(this).forEach(i=>{Et._init(i,e,...t)})})}}if("undefined"!=typeof document){const e=l().fn[pt];l().fn[pt]=Et._jQueryInterface,l().fn[pt].Constructor=Et,l().fn[pt].noConflict=()=>(l().fn[pt]=e,Et._jQueryInterface)}const wt=async(e,t)=>Et._init(e,t),It={reflow:e=>e.offsetHeight,getToggleSpeed(e,t){let i,s=300;return i=e?getComputedStyle(e).getPropertyValue(t):getComputedStyle(document.documentElement).getPropertyValue(t),i&&parseFloat(i)>0&&(i.includes("ms")?s=parseInt(i,10):i.includes("s")&&(s=1e3*parseFloat(i))),s}},xt="env-dialog--fade",At="env-dialog--in";class Lt{#T;#S;#C;#O;constructor(e,t){this.options=t,this.#S||(this._bindThis(),this.el=e,this.el.classList.add(xt),this.el.classList.remove(At),"body"===this.options.placement&&(this.#O=document.createElement("span"),this.#O.dataset.envDialogPlaceholder=""),t.opener&&(this.#T=h(t.opener),this._bindOpenEvent()),this.#S=!0)}_bindThis(){this.show=this.show.bind(this),this.close=this.close.bind(this),this.#r=this.#r.bind(this)}_fadeIn(){this.el.classList.add(At)}_bindModalEvents(){this.el.addEventListener("close",this.close),this.el.addEventListener("click",this.#r,{capture:!1}),this.el.addEventListener("keydown",this.#h),this.#C=!0}_bindOpenEvent(){this.#T.map(e=>{e.addEventListener("click",this.show)},this)}#h=e=>{if(/input|textarea/i.test(e.target.tagName))return;const t=I(this.el),i=t[0],s=t[t.length-1];"Escape"===e.key&&"alertdialog"===this.el.getAttribute("role")?e.preventDefault():"Tab"===e.key&&(e.shiftKey?e.target===i&&(e.preventDefault(),s.focus()):e.target===s&&(e.preventDefault(),i.focus()))};#r=e=>{this.options.backdropClick&&e.target.isEqualNode(this.el)&&"alertdialog"!==this.el.getAttribute("role")&&this.close()};show(e){e&&e.preventDefault(),"body"===this.options.placement&&(this.el.after(this.#O),document.body.append(this.el)),f(),this.el.showModal(),this._fadeIn(),this.#C||this._bindModalEvents()}close(){this.el.classList.contains(At)&&(this.el.classList.remove(At),this.el.close(),"body"===this.options.placement&&(this.#O.after(this.el),this.#O.remove()),b())}}const $t={opener:null,backdropClick:!0,placement:null},kt="env-animation-in-progress",Tt="env-modal-dialog__backdrop--in",St="[data-modal-dialog-dismiss]",Ct="focusin.env-modal-dialog",Ot="envDialog",Pt="[data-modal-dialog]",Dt="[data-modal-alert]",Nt="show",Bt="hide.env-modal-dialog",jt="hidden.env-modal-dialog",Mt="show.env-modal-dialog",Ht="shown.env-modal-dialog";class Vt{constructor(e){this.$el=l()(e),this.el=this.$el.get(0),this.$body=l()(document.body),this.$placeholder=l()("<span />"),this._isShown=!1,this.placementBody=this.el.hasAttribute("data-modal-dialog-placement-body"),this.$el.after(this.$placeholder)}toggle(){return this._isShown?this.hide():this.show()}show(){if(this._isShown)return;It.reflow(this.el);const e=l().Event(Mt,{});f(),this.placementBody&&this.$body.append(this.$el),this.$el.trigger(e);const t=l().Event(Ht,{});this.$el.one("transitionend",()=>{this.$el.trigger(t)}).addClass(this._getModifierBase()+Nt).removeAttr("aria-hidden").css("opacity",1),this._showBackdrop(),this._isShown=!0,this.$el.trigger("focus"),this._bindEvents()}hide(){if(!this._isShown)return;const e=l().Event(Bt,{});this.$el.trigger(e),this.$el.one("transitionend",()=>{this.$el.removeClass(this._getModifierBase()+Nt);const e=l().Event(jt,{});this.$el.trigger(e)}).attr("aria-hidden","true").css("opacity",0).off("click",St),this.$backdrop.one("transitionend",()=>{this.$backdrop.remove(),b(),this.placementBody&&this.$placeholder.before(this.$el)}).removeClass(Tt),this._isShown=!1,this._unbindEvents()}_bindEvents(){this.$el.on("click",St,e=>this.hide(e)),l()(document).off(Ct).one(Ct,e=>{document===e.target||this.el===e.target||this.$el.has(e.target).length||this.$el.trigger("focus")});
2const e=this.$el.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]'),t=e[0],i=e[e.length-1];this.$el.on("keydown",e=>{"Tab"===e.key&&(e.shiftKey?e.target===t&&(e.preventDefault(),i.focus()):e.target===i&&(e.preventDefault(),t.focus())),"Escape"===e.key&&this.hide()})}_getModifierBase(){return this.$el.hasClass("env-modal-alert")?"env-modal-alert--":"env-modal-dialog--"}_unbindEvents(){this.$el.off("click keydown"),l()(document).off(Ct)}_showBackdrop(){this.$backdrop=l()("<div/>",{class:"env-modal-dialog__backdrop"}),this.$el.on("click",e=>{this.$backdrop.hasClass(kt)||e.target===e.currentTarget&&this._isShown&&this.hide()}),this.$backdrop.appendTo(document.body),this.$backdrop.one("animationend",this._removeBackdropAnimation).addClass(`${Tt} ${kt}`)}_removeBackdropAnimation(e){l()(e.currentTarget).removeClass(kt)}static _init(e,t){const i=h(e);if(i.length>0)return i.map(e=>{if("DIALOG"===e.tagName&&e.classList.contains("env-dialog"))return e[Ot]||(e[Ot]=new Lt(e,(e=>(e=T.normalizeOptions(e,$t),T.extend(!0,{},$t,e)))(t))),e[Ot];if(e[Ot]||(e[Ot]=new Vt(e)),"string"==typeof t){if(!e[Ot][t])throw new Error(`No method named "${t}"`);e[Ot][t].call(e[Ot])}return e[Ot]})}static _jQueryInterface(e){return T.consoleWarning("jQuery",Ot),this.each(()=>{h(this).forEach(t=>{Vt._init(t,e)})})}}if("undefined"!=typeof document){const e=l().fn[Ot];l().fn[Ot]=Vt._jQueryInterface,l().fn[Ot].Constructor=Vt,l().fn[Ot].noConflict=()=>(l().fn[Ot]=e,Vt._jQueryInterface),document.addEventListener("click",e=>{const t=e.target.closest(Dt+","+Pt);if(!t)return;e.preventDefault();const i=t.dataset.target;Vt._init(document.querySelector(i),"show")})}const Kt=async(e,t)=>Vt._init(e,t),Ft="envImageslider",Qt={sv:{prev:"Föregående",next:"Nästa"},en:{prev:"Previous",next:"Next"}},Rt={buttons:!0,imageSlider:!1,interval:5e3,keyboard:!0,pause:"hover",slide:!1,swipe:!0,wrap:!0},qt={ACTIVE:".env-image-slider__item--active",ACTIVE__CHILD:".env-image-slider__item--active > *",ACTIVE_DOT:".env-is-active",ACTIVE_ITEM:".env-image-slider__item--active.env-image-slider__item",DATA_SLIDE:"[data-move], [data-move-to]",SLIDER_DATA_ATTRIBUTE:"[data-image-slider]",INDICATORS:".env-image-slider__indicators",INDICATOR_ITEMS:".env-image-slider__indicators > *",INNER:".env-image-slider__inner",NEXT_PREV:".env-image-slider--next, .env-image-slider--prev",ITEM:".env-image-slider__item",THUMBNAILS:".env-image-slider__thumbnails",THUMBNAIL__ITEMS:".env-image-slider__thumbnails > *"},Ut="env-image-slider__item--active",zt="env-is-active",Wt="env-image-slider__item--left",Jt="env-image-slider__item--next",Gt="env-image-slider__item--prev",Xt="env-image-slider__item--right",Yt="env-image-slider--slide",Zt="left",ei="next",ti="prev",ii="right",si={KEYDOWN:"keydown",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",SLID:"slid",SLIDE:"slide",JQSLID:"slid.env.image-slider",JQSLIDE:"slide.env.image-slider",TOUCHEND:"touchend",TOUCHMOVE:"touchmove",TOUCHSTART:"touchstart"};class ni{#s;#P;#D;#N;#B;#j;#t;constructor(e,t){this.el=e,this.isPaused=!1,this.#s=h(qt.ITEM,this.el),this.#P=d(qt.INDICATORS,this.el),this.#D=d(qt.THUMBNAILS,this.el),this.#B=!1,this.#N=null,this.#j=null,void 0===this.el.dataset.imageSlider&&this.el.setAttribute("data-image-slider",""),this.settings(t),this.#s.length>1&&t.buttons&&this._addSlideButtons(),this.#s.forEach((e,t)=>{e.setAttribute("data-env-imageslider-index",t)}),this._bindEvents()}next(){this.#B||this._slide(ei)}prev(){this.#B||this._slide(ti)}nextWhenVisible(){document.hidden||this.next()}pause(e){e||(this.isPaused=!0),clearInterval(this.#N),this.#N=null}cycle(e){e||(this.isPaused=!1),this.#N&&(clearInterval(this.#N),this.#N=null),this.#t.interval&&!this.isPaused&&(this.#N=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this.#t.interval))}goTo(e){this.#j=d(qt.ACTIVE_ITEM,this.el);const t=this._getItemIndex(this.#j);if(e>this.#s.length-1||e<0)return;if(this.#B)return;if(t===e)return this.pause(),void this.cycle();const i=e>t?ei:ti;this._slide(i,this.#s[e])}startTouchSlide(e){this.touchstartx=e.touches[0].pageX}moveTouchSlide(e){this.touchmovex=e.touches[0].pageX,this.movex=-(this.touchstartx-this.touchmovex),this.moved=!1;const t=d(qt.ACTIVE__CHILD,this.el);p(t,"transform",`translate3d(${this.movex}px, 0, 0)`),this.movex>80?(this.prev(),this.moved=!0,setTimeout(()=>{p(t,"transform","translate3d(0, 0, 0)")},500)):this.movex<-80&&(this.next(),this.moved=!0,setTimeout(()=>{p(t,"transform","translate3d(0, 0, 0)")},500))}endTouchSlide(){this.moved||p(d(qt.ACTIVE__CHILD,this.el),"transform","translate3d(0, 0, 0)")}dispose(){this.el=this.el.cloneNode(!0),delete this.el[Ft],delete this.el.envImagesliderJQ,this.el=null,this.#s=null,this.#N=null,this.isPaused=null,this.#B=null,this.#j=null,this.#P=null,this.#D=null}settings(e){this.#t=T.extend({},Rt,this.el.dataset,T.isPlainObject(this.#t)?this.#t:{},e)}
2_addSlideButtons(){const e=this.el.id,t=d(qt.INNER,this.el),i=document.createElement("button");m(i,{type:"button",class:"env-image-slider--prev","data-move":"prev","data-target":`#${e}`}),i.innerHTML=`<svg class="env-image-slider__previous-icon env-icon env-icon-small">\n               <use href="/sitevision/envision-icons.svg#icon-arrow-left"></use></svg>\n               <span class="env-assistive-text">${this.#t.i18n.prev}</span>`;const s=document.createElement("button");m(s,{type:"button",class:"env-image-slider--next","data-move":"next","data-target":`#${e}`}),s.innerHTML=`<svg class="env-image-slider__previous-icon env-icon env-icon-small">\n               <use href="/sitevision/envision-icons.svg#icon-arrow-right"></use></svg>\n               <span class="env-assistive-text">${this.#t.i18n.next}</span>`,t.appendChild(i),t.appendChild(s)}_getItemByDirection(e,t){const i=e===ei,s=this._getItemIndex(t),n=this.#s.length-1;if((!i&&0===s||i&&s===n)&&!this.#t.wrap)return t;const o=(s+(i?1:-1))%this.#s.length;return-1===o?this.#s[n]:this.#s[o]}_bindEvents(){this.el.addEventListener("click",e=>this._click(e)),this.#t.keyboard&&this.el.addEventListener(si.KEYDOWN,e=>this._keydown(e)),"hover"===this.#t.pause&&"cycle"===this.#t.imageSlider&&(this.el.addEventListener(si.MOUSEENTER,e=>this.pause(e)),this.el.addEventListener(si.MOUSELEAVE,e=>this.cycle(e)),this.el.addEventListener(si.TOUCHEND,()=>{this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(e=>this.cycle(e),500,this.#t.interval)})),this.#t.swipe&&this._bindTouchSlider()}_bindTouchSlider(){const e=d(qt.INNER,this.el);e.addEventListener(si.TOUCHSTART,e=>{this.startTouchSlide(e)}),e.addEventListener(si.TOUCHMOVE,e=>{this.moveTouchSlide(e)}),e.addEventListener(si.TOUCHEND,e=>{this.endTouchSlide(e)})}_keydown(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.key){case"ArrowLeft":e.preventDefault(),this.prev();break;case"ArrowRight":e.preventDefault(),this.next();break;default:return}}_click(e){const t=e.target.closest(qt.DATA_SLIDE);if(!t)return;let i=t.dataset;if(!i.target||!document.querySelector(i.target))return;const s=document.querySelector(i.target);if(s&&void 0!==s.dataset.imageSlider){if(i.moveTo){const e=parseInt(i.moveTo,10);this.settings({interval:!1}),this.goTo(e)}else i.move!==ti&&i.move!==ei||this[i.move]();e.preventDefault()}}_getItemIndex(e){return parseInt(e.dataset.envImagesliderIndex,10)}_triggerSlideEvent(e,t){const i=this._getItemIndex(e),s=this._getItemIndex(d(qt.ACTIVE_ITEM,this.el));let n;return this.el.envImagesliderJQ?(n=l().Event(si.JQSLIDE,{targetElement:e,direction:t,from:s,to:i}),l()(this.el).trigger(n),n.defaultPrevented=n.isDefaultPrevented()):(n=new CustomEvent(si.SLIDE,{bubbles:!0,cancelable:!0,detail:{direction:t,from:s,to:i}}),e.dispatchEvent(n)),n}_setActiveIndicatorElement(e){if(this.#P){const t=d(qt.ACTIVE_DOT,this.#P),i=h(qt.INDICATOR_ITEMS,this.#P)[this._getItemIndex(e)];t&&t.classList.remove(zt),i&&i.classList.add(zt)}else if(this.#D){const t=d(qt.ACTIVE,this.#D),i=h(qt.ACTIVE,this.#D)[this._getItemIndex(e)];t&&t.classList.remove(Ut),i&&i.classList.add(Ut)}}_slide(e,t){const i=d(qt.ACTIVE_ITEM,this.el),s=this._getItemIndex(i),n=d(t||i&&this._getItemByDirection(e,i)),o=this._getItemIndex(n);let a,r,h;if(e===ei?(a=Wt,r=Jt,h=Zt):(a=Xt,r=Gt,h=ii),n&&n.classList.contains(Ut))return void(this.#B=!1);const c=this._triggerSlideEvent(n,h);if(c.defaultPrevented)return;if(!i||!n)return;let u;this.#B=!0,this._setActiveIndicatorElement(n),this.el.envImagesliderJQ?(u=l().Event(si.JQSLID,{relatedTarget:n,direction:h,from:s,to:o}),u.defaultPrevented=c.isDefaultPrevented()):u=new CustomEvent(si.SLID,{bubbles:!0,cancelable:!0,detail:{relatedTarget:n,direction:h,from:s,to:o}}),this.el.classList.contains(Yt)?(n.classList.add(r),It.reflow(n),i.classList.add(a),n.classList.add(a),i.addEventListener("transitionend",()=>{n.classList.remove(a,r),n.classList.add(Ut),i.classList.remove(Ut,r,a),this.#B=!1,this.el.envImagesliderJQ?l()(this.el).trigger(u):this.el.dispatchEvent(u)},{once:!0})):(i.classList.remove(Ut),n.classList.add(Ut),this.#B=!1,this.el.envImagesliderJQ?l()(this.el).trigger(c):this.el.dispatchEvent(c))}static _init(e,t,i){T.consoleWarning("component","Image slider","image-slider","Image viewer 2");const s=h(e);if(s.length>0)return s.map(e=>{let s;
2A(e),s="object"==typeof t?{...Rt,...e.dataset,...t,i18n:T.getLanguageOptions(t?.i18n,Qt,e)}:{...Rt,...e.dataset,i18n:T.getLanguageOptions({},Qt,e)},e[Ft]?e[Ft].settings(T.extend({},{...e.dataset,...t})):(e.envImagesliderJQ=i,e[Ft]=new ni(e,s));const n="string"==typeof t?t:s.move;if("number"==typeof t)e[Ft].goTo(t);else if("string"==typeof n){if(void 0===e[Ft][n])throw new Error(`No method named "${n}"`);e[Ft][n]()}return s.interval&&"cycle"===s.imageSlider&&(e[Ft].pause(),e[Ft].cycle()),e[Ft]})}static _jQueryInterface(e){return this.each(()=>{h(this).forEach(t=>{ni._init(t,e,!0)})})}}if("undefined"!=typeof document){window.addEventListener("load",()=>{const e=h(qt.SLIDER_DATA_ATTRIBUTE);e.length>0&&ni._init(e)});const e=l().fn[Ft];l().fn[Ft]=ni._jQueryInterface,l().fn[Ft].Constructor=ni,l().fn[Ft].noConflict=()=>(l().fn[Ft]=e,ni._jQueryInterface)}const oi=async(e,t)=>ni._init(e,t),ai=(e,t)=>{t=Object.assign({duration:300},t),e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t.duration+"ms";const i=getComputedStyle(e);if("border-box"===i.boxSizing)e.style.height=e.offsetHeight+"px";else{const t=parseFloat(i.paddingTop),s=parseFloat(i.paddingBottom),n=parseFloat(i.borderTopWidth),o=parseFloat(i.borderBottomWidth);e.style.height=e.offsetHeight-t-s-n-o+"px"}e.offsetHeight,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout(()=>{e.style.display="none",e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),t.complete&&t.complete instanceof Function&&t.complete.call()},t.duration)},ri=(e,t)=>{t=Object.assign({duration:300},t),e.style.removeProperty("display");let i=window.getComputedStyle(e).display;"none"===i&&(i="block"),e.style.display=i;let s=e.offsetHeight;e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.offsetHeight,e.style.boxSizing="border-box",e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t.duration+"ms",e.style.height=s+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),t.complete&&t.complete instanceof Function&&t.complete.call()},t.duration)},li="aria-controls",hi="aria-expanded",di="data-expanded",ci="envAccordion",ui="env-accordion--show",gi="[data-env-accordion]";class vi{#M;constructor(e,t){this.el=e,this.parentEl=d(this.el.dataset.parent),this.togglerEl=t||this.parentEl&&d(`${gi}[${li}="${this.el.id}"]`,this.parentEl),this.el.classList.contains(ui)?(this.el.classList.remove(ui),this.el.setAttribute(di,"true"),_(this.el),this.togglerEl&&this.togglerEl.setAttribute(hi,"true")):this.togglerEl&&this.togglerEl.setAttribute(hi,"false"),this.el.removeAttribute(hi),this.speed=It.getToggleSpeed(this.el,"--env-collapse-toggle-duration")}toggle(){"true"===this.el.getAttribute(di)?this.hide():this.show()}show(){this.#M||(this.parentEl&&h(`[${di}="true"], .${ui}`,this.parentEl).forEach(e=>{if(!e.isEqualNode(this.el)){const t=d(`${gi}[${li}="${e.id}"]`,this.parentEl);this._hide(e,t,this.speed,!0)}}),this.#M=!0,ri(this.el,{duration:this.speed,complete:()=>{this.togglerEl&&this.togglerEl.setAttribute(hi,"true"),this.el.setAttribute(di,"true"),this.#M=!1}}))}hide(){this.#M||this._hide(this.el,this.togglerEl,this.speed)}_hide(e,t,i,s){s||(this.#M=!0),ai(e,{duration:i,complete:()=>{t&&t.setAttribute(hi,"false"),e.setAttribute(di,"false"),e.classList.remove(ui),s||(this.#M=!1)}})}static _init(e,t){const i=h(e);if(i.length>0)return i.map(e=>{if(e[ci]||(t instanceof Element?e[ci]=new vi(e,t):e[ci]=new vi(e)),"string"==typeof t){if(!e[ci][t])throw new Error(`No method n
2amed "${t}"`);e[ci][t].call(e[ci])}else e[ci].toggle.call(e[ci]);return e[ci]})}static _jQueryInterface(e){return T.consoleWarning("jQuery",ci),this.each(()=>{h(this).forEach(t=>{vi._init(t,e)})})}}if("undefined"!=typeof document){const e=l().fn[ci];l().fn[ci]=vi._jQueryInterface,l().fn[ci].Constructor=vi,l().fn[ci].noConflict=()=>(l().fn[ci]=e,vi._jQueryInterface),document.addEventListener("click",e=>{const t=e.target.closest(gi);if(!t)return;e.preventDefault();const i=t.dataset.target||t.getAttribute("href");vi._init(document.querySelector(i),t)})}const pi=async(e,t)=>vi._init(e,t),mi="aria-expanded",fi="envCollapse",bi="env-collapse--expanded",yi="env-collapse--show";class _i{constructor(e){this.el=e,this.togglerEl=d(`[data-env-collapse][href="#${e.id}"], [data-env-collapse][data-target="#${e.id}"]`),this.el.classList.contains(yi)&&(_(this.el),this.togglerEl.classList.add(bi),this.togglerEl.setAttribute(mi,"true")),this.speed=It.getToggleSpeed(this.togglerEl,"--env-collapse-toggle-duration")}toggle(){this.el.classList.contains(yi)?this.hide():this.show()}show(){this.el.getAnimations().length>0||(this.togglerEl&&(this.togglerEl.classList.add(bi),this.togglerEl.setAttribute(mi,"true")),this.el.classList.add(yi),ri(this.el,{duration:this.speed}))}hide(){this.el.getAnimations().length>0||(this.togglerEl&&(this.togglerEl.classList.remove(bi),this.togglerEl.setAttribute(mi,"false")),ai(this.el,{duration:this.speed,complete:()=>{this.el.classList.remove(yi)}}))}static _init(e,t){const i=h(e);if(i.length>0)return i.map(e=>{if(e[fi]||(e[fi]=new _i(e)),"string"==typeof t){if(!e[fi][t])throw new Error(`No method named "${t}"`);e[fi][t].call(e[fi])}else e[fi].toggle.call(e[fi]);return e[fi]})}static _jQueryInterface(e){return T.consoleWarning("jQuery",fi),this.each(()=>{h(this).forEach(t=>{_i._init(t,e)})})}}if("undefined"!=typeof document){const e=l().fn[fi];l().fn[fi]=_i._jQueryInterface,l().fn[fi].Constructor=_i,l().fn[fi].noConflict=()=>(l().fn[fi]=e,_i._jQueryInterface),document.addEventListener("click",e=>{const t=e.target.closest("[data-env-collapse]");if(!t)return;e.preventDefault();const i=t.dataset.target||t.getAttribute("href");_i._init(document.querySelector(i))})}const Ei=async(e,t)=>_i._init(e,t),wi="[data-dropdown]",Ii="target",xi="envDropdownIndex",Ai="envDropdown";class Li{constructor(e,t,i){this.button=i,this.container=e,this.placeholder=document.createElement("span"),this.menu=t,this.menuitems=h(".env-dropdown__item",this.menu),A(this.button),A(this.menu),this.button.hasAttribute("aria-haspopup")||this.button.setAttribute("aria-haspopup","true"),this.button.setAttribute("aria-controls",this.menu.id),this.menu.insertAdjacentElement("beforebegin",this.placeholder),this.menu.setAttribute("aria-labelledby",this.button.id),this.menu.setAttribute("role","menu"),this.menuitems.forEach((e,t)=>{const i=e.closest("li");e.dataset[xi]=t,e.setAttribute("role","menuitem"),e!==i&&this.menu.contains(e.closest("li"))&&i.setAttribute("role","none")}),this.openInBody="body"===this.button.dataset.container||void 0!==this.button.dataset.dropdownPlacementBody,this.handleButtonClick=this.handleButtonClick.bind(this),this.handleButtonKeyDown=this.handleButtonKeyDown.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleOutsideClick=this.handleOutsideClick.bind(this),this.handleOutsideKeyUp=this.handleOutsideKeyUp.bind(this),this._bindEventsOnInit()}handleButtonClick(){"true"===this.button.getAttribute("aria-expanded")?this.hide():this.show()}handleButtonKeyDown(e){"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&" "!==e.key||(e.preventDefault(),this.show("ArrowUp"===e.key?this.menuitems.length-1:0))}show(e){e=e||0,this.button.setAttribute("aria-expanded","true"),this.openInBody&&document.body.appendChild(this.menu),_(this.menu),this._bindMenuEvents(),$().then(t=>{const i="end"===this.button.dataset.placement,s=i?"bottom-end":"bottom-start";this._popper=t(i?this.button:this.container,this.menu,{placement:s,modifiers:{name:"flip",enabled:!1}}),this._popper.update(),setTimeout(()=>{this.menuitems[e].focus()},1)})}
2hide(){this.button.setAttribute("aria-expanded","false"),this._unbindMenuEvents(),y(this.menu),this.openInBody&&this.placeholder.insertAdjacentElement("afterend",this.menu)}_bindEventsOnInit(){this.button.addEventListener("click",this.handleButtonClick),this.button.addEventListener("keydown",this.handleButtonKeyDown)}_bindMenuEvents(){this._unbindMenuEvents(),document.addEventListener("click",this.handleOutsideClick),document.addEventListener("keydown",this.handleMenuKeyDown),document.addEventListener("keyup",this.handleOutsideKeyUp)}_unbindMenuEvents(){document.removeEventListener("click",this.handleOutsideClick),document.removeEventListener("keydown",this.handleMenuKeyDown),document.removeEventListener("keyup",this.handleOutsideKeyUp)}handleOutsideClick(e){const t=e.target;this.button.contains(t)||this.menu.contains(t)||this.hide()}handleOutsideKeyUp(e){const t=e.target;this.button.contains(t)||this.menu.contains(t)||this.hide()}handleMenuKeyDown(e){const t=e.target,i=this.menuitems.length;if("Escape"===e.key)this.hide(),this.button.focus();else if(this.menu.contains(t)&&i>0){const i=parseInt(t.dataset[xi],10);if(" "===e.key&&"BUTTON"!==t.tagName){e.preventDefault();const i=t.closest("[role=menuitem]");i&&i.click()}else if("Tab"===e.key){if(e.shiftKey)e.preventDefault(),this.button.focus();else if(this.openInBody){e.preventDefault();x(this.button).focus()}this.hide()}else if("Home"===e.key)e.preventDefault(),this.menuitems[0].focus();else if("End"===e.key)e.preventDefault(),this.menuitems[this.menuitems.length-1].focus();else if("ArrowUp"===e.key){e.preventDefault();const t=i>0?i-1:this.menuitems.length-1;this.menuitems[t].focus()}else if("ArrowDown"===e.key){e.preventDefault();const t=i<this.menuitems.length-1?i+1:0;this.menuitems[t].focus()}}}}const $i=async(e,t)=>{const i="DOMContentLoaded"===e.type&&t?t:e.target.closest(wi);if(i&&!i[Ai]){let t=i.dataset[Ii]&&i.closest(i.dataset[Ii]);t||(t=i.parentNode),i[Ai]=!0;const s=t.querySelector(".env-dropdown__menu");s&&(await $(),i[Ai]=new Li(t,s,i),s.dataset.envDropdown="true",y(s),"click"===e.type&&i[Ai].handleButtonClick())}};document&&(document.addEventListener("focusin",$i),document.addEventListener("click",$i),document.addEventListener("DOMContentLoaded",e=>
2{document.body.querySelectorAll(wi).forEach(t=>{$i(e,t)})}));return a})());
3//# sourceMappingURL=envision.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.