1(()=>{"use strict";var t={156(t){var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==s},s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?o(Array.isArray(t)?[]:{},t,e):t}function r(t,e,s){return t.concat(e).map(function(t){return i(t,s)})}function n(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function a(t,e){try{return e in t}catch(t){return!1}}function o(t,s,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=i;var c,u,f=Array.isArray(s);return f!==Array.isArray(t)?i(s,l):f?l.arrayMerge(t,s,l):(u={},(c=l).isMergeableObject(t)&&n(t).forEach(function(e){u[e]=i(t[e],c)}),n(s).forEach(function(e){(!a(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(a(t,e)&&c.isMergeableObject(s[e])?u[e]=(function(t,e){if(!e.customMerge)return o;var s=e.customMerge(t);return"function"==typeof s?s:o})(e,c)(t[e],s[e],c):u[e]=i(s[e],c))}),u)}o.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,s){return o(t,s,e)},{})},t.exports=o}},e={};function s(i){var r=e[i];if(void 0!==r)return r.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,s),n.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i=s(156),r=s.n(i);class n{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let s=n.toUpperCamelCase(t,e);return n.lcFirst(s)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>n.ucFirst(t.toLowerCase())).join(""):n.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}class a{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(t,{detail:e,cancelable:s});return this.el.dispatchEvent(i),i}subscribe(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,r=t.split("."),n=s.scope?e.bind(s.scope):e;if(s.once&&!0===s.once){let e=n;n=function(s){i.unsubscribe(t),e(s)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:s,cb:n}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,s)=>([...s.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(s.splitEventName[0],s.cb):t.push(s),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}}class o{constructor(t,e={},s=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${s}".`);return}this.el=t,this.$emitter=new a(this.el),this._pluginName=this._getPluginName(s),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=[this.constructor.options,this.options,t];return e.push(this._getConfigFromDataAttribute()),e.push(this._getOptionsFromDataAttribute()),r().all(e.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_getConfigFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=n.toDashCase(this._pluginName),s=this.el.getAttribute(`data-${e}-config`);return s?window.PluginConfigManager.get(this._pluginName,s):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=n.toDashCase(this._pluginName),s=this.el.getAttribute(`data-${e}-options`);if(s)try{return JSON.parse(s)}catch(t){console.error(`The data attribute "data-${e}-options" could not be parsed to json: ${t.message}`)}return t}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}}let l="js-offcanvas-singleton";class c{constructor(){this.$emitter=new a}open(t,e,s,i,r,n,a){this._removeExistingOffCanvas();let o=this._createOffCanvas(s,n,a,i);this.setContent(t,r),this._openOffcanvas(o,e)}setContent(t,e){let s=this.getOffCanvas();s[0]&&(s[0].innerHTML=t,this._registerEvents(e),this._setAriaAttrs())}setAdditionalClassName(t){this.getOffCanvas()[0].classList.add(t)}getOffCanvas(){return document.querySelectorAll(`.${l}`)}close(t){let e=this.getOffCanvas();e.forEach(t=>{bootstrap.Offcanvas.getInstance(t).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(t,e){window.focusHandler.saveFocusState("offcanvas"),c.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof e&&e()}_registerEvents(t){let e=this.getOffCanvas();e.forEach(s=>{let i=()=>{setTimeout(()=>{s.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:e})},t),s.removeEventListener("hide.bs.offcanvas",i)};s.addEventListener("hide.bs.offcanvas",i)}),window.addEventListener("popstate",this.close.bind(this,t),{once:!0}
1),document.querySelectorAll(".js-offcanvas-close").forEach(e=>{e.addEventListener("click",this.close.bind(this,t))})}_setAriaAttrs(){let t=this.getOffCanvas()[0],e="off-canvas-headline",s=t.querySelector(`[data-id="${e}"]`);s&&!t.hasAttribute("aria-labelledby")&&(s.setAttribute("id",e),t.setAttribute("aria-labelledby",e))}_removeExistingOffCanvas(){this.getOffCanvas().forEach(t=>{let e=bootstrap.Offcanvas.getInstance(t);e&&"function"==typeof e.dispose&&e.dispose(),t.remove()}),c.bsOffcanvas=null}_getPositionClass(t){return"left"===t?"offcanvas-start":"right"===t?"offcanvas-end":`offcanvas-${t}`}_createOffCanvas(t,e,s,i){let r=document.createElement("div");if(r.classList.add("offcanvas",l),r.classList.add(this._getPositionClass(t)),r.setAttribute("tabindex","-1"),!0===e&&r.classList.add("is-fullwidth"),s){let t=typeof s;if("string"===t)r.classList.add(s);else if(Array.isArray(s))s.forEach(t=>{r.classList.add(t)});else throw Error(`The type "${t}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(r),c.bsOffcanvas=new bootstrap.Offcanvas(r,{backdrop:!1!==i||"static"}),r}}let u=Object.freeze(new c);class f{static open(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",i=!(arguments.length>3)||void 0===arguments[3]||arguments[3],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,n=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";u.open(t,e,s,i,r,n,a)}static setContent(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;u.setContent(t,e,s)}static setAdditionalClassName(t){u.setAdditionalClassName(t)}static close(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;u.close(t)}static exists(){return u.exists()}static getOffCanvas(){return u.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}class d{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!d.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!1===d.hasAttribute(t,e))throw Error(`The required property "${e}" does not exist!`);if("function"!=typeof t.getAttribute){if(s)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=e.replace(/^data(|-)/,""),r=n.toLowerCamelCase(i,"-");if(!d.isNode(t)){if(s)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(s)throw Error("This node doesn't support the dataset attribute!");return}let a=t.dataset[r];if(void 0===a){if(s)throw Error(`The required data attribute "${e}" does not exist on ${t}!`);return a}return n.parsePrimitive(a)}static querySelector(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!d.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelector(e)||!1;if(s&&!1===i)throw Error(`The required element "${e}" does not exist in parent node!`);return i}static querySelectorAll(t,e){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(s&&!d.isNode(t))throw Error("The parent node is not a valid HTML Node!");let i=t.querySelectorAll(e);if(0===i.length&&(i=!1),s&&!1===i)throw Error(`At least one item of "${e}" must exist in parent node!`);return i}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=` 2 input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]), 3 select:not([tabindex^="-"]):not([disabled]), 4 textarea:not([tabindex^="-"]):not([disabled]), 5 button:not([tabindex^="-"]):not([disabled]), 6 a[href]:not([tabindex^="-"]):not([disabled]),
7 [tabindex]:not([tabindex^="-"]):not([disabled]) 8 `;return t.querySelectorAll(e)}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}class h extends o{static #t=this.options={variants:[],displayType:"offcanvas",stockText:"In stock: %stock% (%storeStock% in store)",outOfStockText:"Out of stock",negativeStockNonClearanceText:"Stock not available",stockInterval:null,purchaseOrderText:"Purchase order: %qty% (%date%)",displayStock:!0,displayPrice:!1};init(){this.selectButton=this.el.querySelector(".offcanvas-variant-trigger"),this.selectButtonContent=this.el.querySelector(".offcanvas-variant-trigger-content"),this.select=this.el.querySelector("select"),this.offcanvasContent=this.el.querySelector("[data-offcanvas-variant-content]"),this.radios=this.el.querySelectorAll('input[type="radio"]'),this.updateTriggerContent(),this.updateVariantInfo(),this.registerEvents()}registerEvents(){"offcanvas"===this.options.displayType?(this.selectButton.addEventListener("click",this.openOffCanvas.bind(this)),this.$emitter.subscribe("onClickOffCanvasVariantSelect",this.onOffCanvasOpen.bind(this))):this.onOffCanvasOpen()}updateTriggerContent(){this.selectButtonContent&&(this.selectButtonContent.innerHTML=this.select.options[this.select.selectedIndex].innerHTML)}openOffCanvas(t){t.preventDefault(),f.open(this.offcanvasContent.innerHTML,()=>{},"right",!0,void 0,void 0,"offcanvas-variant-select"),this.$emitter.publish("onClickOffCanvasVariantSelect")}onOffCanvasOpen(){this.variantOffCanvas=d.querySelector(document,".offcanvas-variant-select"),this.variantOffCanvas.querySelectorAll(".offcanvas-variant-select-btn").forEach(t=>t.addEventListener("click",this.onButtonClick.bind(this)))}onButtonClick(t){"offcanvas"!==this.options.displayType&&t.preventDefault();let e=t.target.closest("button"),s=e.getAttribute("data-parent"),i=e.getAttribute("data-value"),r=d.querySelector(document,`[name="${s}"]`);r.value=i,r.closest("[data-variant-switch]").dispatchEvent(new Event("change")),this.updateTriggerContent(),"offcanvas"===this.options.displayType?f.close():new bootstrap.Collapse(d.querySelector(this.el,"#offcanvas-variant-select-group",!1),{toggle:!1}).hide()}updateVariantInfo(){let t=d.querySelector(this.el,".offcanvas-variant-select-group",!1),e=this.select?Array.from(this.select.options).map(t=>t.value).filter(t=>t):Array.from(this.radios).map(t=>t.value).filter(t=>t),s=[...Array.from(document.querySelectorAll("[data-variant-switch] select")).filter(t=>t!==this.select).map(t=>t.value).filter(t=>t),...Array.from(document.querySelectorAll('[data-variant-switch] input[type="radio"]')).filter(t=>!Array.from(this.radios).includes(t)).filter(t=>t.checked).map(t=>t.value).filter(t=>t)];for(let i of Object.values(this.options.variants))if(s.every(t=>i.optionIds.includes(t))){let{available:s,optionIds:r,storeStock:n,stock:a,multicaseProductPurchase:o,price:l}=i;for(let i of r)e.includes(i)&&(this._handleStockText(t,s,a,n,i,o),this.options.displayPrice&&this._handlePriceText(t,l,i))}this.removeUnconfiguredOptions(t)}removeUnconfiguredOptions(t){t.querySelectorAll("button.offcanvas-variant-select-btn").forEach(t=>{t.classList.contains("option-configured")||(t.classList.remove("d-flex"),t.classList.add("d-none"))})}_handleStockText(t,e,s,i,r,n){let a=t.querySelector(`[data-value="${r}"] .offcanvas-variant-stock-text`),o=t.querySelector(`button[data-value="${r}"]`),l=t.querySelector(`[data-value="${r}"] .bg-success`);if(o&&o.classList.add("option-configured"),!this.options.displayStock){l&&l.classList.remove("bg-success");return}if(!e){l&&(l.classList.remove("bg-success"),l.classList.add("bg-danger")),a&&(a.textContent=this.options.outOfStockText);return}if(e&&s<=0){if(l&&(l.classList.remove("bg-success"),l.classList.add("bg-warning")),a&&n&&n.length>0){let t=new Date(n[0].expectedDeliveryDate).toLocaleDateString(document.documentElement.lang||"en-GB",{day:"2-digit",month:"2-digit",year:"numeric"});a.innerHTML=this.options.purchaseOrderText.replace("%qty%",n[0].availableQty).replace("%date%",t)}else a&&(a.textContent=this.options.negativeStockNonClearanceText);return}a&&(a.innerHTML=this.options.stockText.replace("%stock%",this.getInterval(s)).replace("%storeStock%",`<span class="offcanvas-variant-stock-text-qty'">(${this.getInterval(i)})</span>`))}_handlePriceText(t,e,s){let i=t.querySelector(`[data-value="${s}"] .offcanvas-variant-select-price`),r="";i&&e&&(e.unitPrice&&(r=`<span class="product-price">${this._formatPrice(e.unitPrice)}`),e.listPrice&&e.listPrice.price>e.unitPrice&&(r+=`<span class="list-price-price text-decoration-line-through">${this._formatPrice(e.listPrice.price)}</span>`),r+="</span>",i.innerHTML=r)}getInterval(t){if(this.options.stockInterval){let e=this.options.stockInterval.split(";"),s={};for(let t of e){let e=t.match(/(\d+)(?:\[([^\]]+)\])?/);if(e){let t=parseInt(e[1]),i=e[2]?e[2]:t+"+";s[t]=i}}let i=Object.keys(s).map(Number).sort((t,e)=>t-e),r=t;for(let e of i)t>=e&&(r=s[e]);return r}return t}_formatPrice(t){let e=document.documentElement.lang,s=document.querySelector('meta[property="product:price:currency"]').getAttribute("content"),i="nb-NO"===e||"da-DK"===e?",-":":-";return"nb-NO"===e||"da-DK"===e||"sv-SE"===e?(this.priceFormatter=new Intl.NumberFormat(e,{maximumFractionDigits:2}),this.priceFormatter.format(t)+i):(this.priceFormatter=new Intl.NumberFormat(e,{style:"currency",currency:s,maximumFractionDigits:2}),this.priceFormatter.format(t))}}window.PluginManager.register("FlowVariantSelect",h,"[data-flow-variant-select]")})();
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.