1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["variant-switch.plugin"],{9436:e=>{var t="%[a-f0-9]{2}",r=RegExp("("+t+")|([^%]+?)","gi"),n=RegExp("("+t+")+","gi");e.exports=function(e){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},s=n.exec(e);s;){try{t[s[0]]=decodeURIComponent(s[0])}catch(e){var i=function(e){try{return decodeURIComponent(e)}catch(s){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=(function e(t,r){try{return[decodeURIComponent(t.join(""))]}catch(e){}if(1===t.length)return t;r=r||1;var n=t.slice(0,r),s=t.slice(r);return Array.prototype.concat.call([],e(n),e(s))})(t,n).join("")).match(r)||[];return e}}(s[0]);i!==s[0]&&(t[s[0]]=i)}s=n.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var l=a[o];e=e.replace(RegExp(l,"g"),t[l])}return e}(e)}}},7728:e=>{e.exports=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),i=0;i<n.length;i++){var a=n[i],o=e[a];(s?-1!==t.indexOf(a):t(a,o,e))&&(r[a]=o)}return r}},9742:e=>{e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},2940:(e,t,r)=>{let n=r(9742),s=r(9436),i=r(1231),a=r(7728),o=e=>null==e,l=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function d(e,t){return t.decode?s(e):e}function p(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function h(e){let t=(e=p(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function f(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t){n[e]=r;return}void 0===n[e]&&(n[e]={}),n[e][t[1]]=r};case"bracket":return(e,r,n)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"colon-list-separator":return(e,r,n)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"comma":case"separator":return(t,r,n)=>{let s="string"==typeof r&&r.includes(e.arrayFormatSeparator),i="string"==typeof r&&!s&&d(r,e).includes(e.arrayFormatSeparator);r=i?d(r,e):r;let a=s||i?r.split(e.arrayFormatSeparator).map(t=>d(t,e)):null===r?r:d(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{let s=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!s){n[t]=r?d(r,e):r;return}let i=null===r?[]:r.split(e.arrayFormatSeparator).map(t=>d(t,e));if(void 0===n[t]){n[t]=i;return}n[t]=[].concat(n[t],i)};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[].concat(r[e],t)}}}(t),n=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return n;for(let s of e.split("&")){if(""===s)continue;let[e,a]=i(t.decode?s.replace(/\+/g," "):s,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:d(a,t),r(d(e,t),a,n)}for(let e of Object.keys(n)){let r=n[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=m(r[e],t);else n[e]=m(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{let r=n[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=h,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=r=>t.skipNull&&o(e[r])||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let s=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[",s,"]"].join("")]:[...r,[u(t,e),"[",u(s,e),"]=",u(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[]"].join("")]:[...r,[u(t,e),"[]=",u(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),":list="].join("")]:[...r,[u(t,e),":list=",u(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,s)=>void 0===s||e.skipNull&&null===s||e.skipEmptyString&&""===s?n:(s=null===s?"":s,0===n.length)?[[u(r,e),t,u(s,e)].join("")]:[[n,u(s,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,u(t,e)]:[...r,[u(t,e),"=",u(n,e)].join("")]}}(t),s={};for(let t of Object.keys(e))r(t)||(s[t]=e[t]);let i=Object.keys(s);return!1!==t.sort&&i.sort(t.sort),i.map(r=>{let s=e[r];return void 0===s?"":null===s?u(r,t):Array.isArray(s)?0===s.length&&"bracket-separator"===t.arrayFormat?u(r,t)+"[]":s.reduce(n(r),[]).join("&"):u(r,t)+"="+u(s,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>
1{t=Object.assign({decode:!0},t);let[r,n]=i(e,"#");return Object.assign({url:r.split("?")[0]||"",query:f(h(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:d(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[l]:!0},r);let n=p(e.url).split("?")[0]||"",s=t.extract(e.url),i=Object.assign(t.parse(s,{sort:!1}),e.query),a=t.stringify(i,r);a&&(a="?".concat(a));let o=function(e){let t="",r=e.indexOf("#");return -1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(o="#".concat(r[l]?u(e.fragmentIdentifier,r):e.fragmentIdentifier)),"".concat(n).concat(a).concat(o)},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[l]:!1},n);let{url:s,query:i,fragmentIdentifier:o}=t.parseUrl(e,n);return t.stringifyUrl({url:s,query:a(i,r),fragmentIdentifier:o},n)},t.exclude=(e,r,n)=>{let s=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,s,n)}},1231:e=>{e.exports=(e,t)=>{if(!("string"==typeof e&&"string"==typeof t))throw TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let r=e.indexOf(t);return -1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},3174:(e,t,r)=>{r.r(t),r.d(t,{default:()=>c});var n=r(9568),s=r(5878),i=r(4049),a=r(3266),o=r(3107),l=r(2940);class c extends n.Z{init(){this._httpClient=new o.Z,this._radioFields=i.Z.querySelectorAll(this.el,this.options.radioFieldSelector,!1),this._selectFields=i.Z.querySelectorAll(this.el,this.options.selectFieldSelector,!1),this._elementId=this.options.elementId,this._pageType=this.options.pageType,this._ensureFormElement(),this._preserveCurrentValues(),this._registerEvents(),this._resumeFocusState()}_ensureFormElement(){if("form"!==this.el.nodeName.toLowerCase())throw Error("This plugin can only be applied on a form element!")}_preserveCurrentValues(){this._radioFields&&a.Z.iterate(this._radioFields,e=>{c._isFieldSerializable(e)&&e.dataset&&(e.dataset.variantSwitchValue=e.value)})}_registerEvents(){this.el.addEventListener("change",e=>this._onChange(e))}_onChange(e){let t=this._getSwitchedOptionId(e.target),r=this._getFormValue();this._preserveCurrentValues(),this.$emitter.publish("onChange");let n={switched:t,options:JSON.stringify(r)};if(this._elementId&&"product_detail"!==this._pageType){let e=this.options.url+"?"+l.stringify({...n,elementId:this._elementId});document.$emitter.publish("updateBuyWidget",{url:e,elementId:this._elementId});return}this._saveFocusState(e.target),this._redirectToVariant(n)}_getSwitchedOptionId(e){return!!c._isFieldSerializable(e)&&e.name}_getFormValue(){let e={};return this._radioFields&&a.Z.iterate(this._radioFields,t=>{c._isFieldSerializable(t)&&t.checked&&(e[t.name]=t.value)}),this._selectFields&&a.Z.iterate(this._selectFields,t=>{if(c._isFieldSerializable(t)){let r=[...t.options].find(e=>e.selected);e[t.name]=r.value}}),e}static _isFieldSerializable(e){return!e.name||e.disabled||-1===["file","reset","submit","button"].indexOf(e.type)}_disableFields(){a.Z.iterate(this._radioFields,e=>{e.classList&&e.classList.add("disabled","disabled")})}_redirectToVariant(e){s.Z.create();let t=this.options.url+"?"+l.stringify(e);this._httpClient.get("".concat(t),e=>{let t=JSON.parse(e);window.location.replace(t.url)})}_saveFocusState(e){window.focusHandler.saveFocusStatePersistent(this.options.focusHandlerKey,'[data-variant-switch-value="'.concat(e.dataset.variantSwitchValue,'"]'))}_resumeFocusState(){window.focusHandler.resumeFocusStatePersistent(this.options.focusHandlerKey)}}c.options={url:"",elementId:"",pageType:"",radioFieldSelector:".product-detail-configurator-option-input",selectFieldSelector:".product-detail-configurator-select-input",focusHandlerKey:"variant-switch"}},3107:(e,t,r)=>{r.d(t,{Z:()=>n});class n{get(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",e,r);return this._sendRequest(n,null,t)}post(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let s=this._createPreparedRequest("POST",e,n);return this._sendRequest(s,t,r)}delete(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let s=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(s,t,r)}patch(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let s=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(s,t,r)}
1abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn("the request to ".concat(e.responseURL," was aborted"))}),e.addEventListener("error",()=>{console.warn("the request to ".concat(e.responseURL," failed with status ").concat(e.status))}),e.addEventListener("timeout",()=>{console.warn("the request to ".concat(e.responseURL," timed out"))})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,r){return this._registerOnLoaded(e,r),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,r){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}},5774:(e,t,r)=>{r.d(t,{ZP:()=>p,ar:()=>l});var n=r(5206),s=r(3266);let i="modal-backdrop",a="modal-backdrop-open",o="no-scroll",l=350,c={ON_CLICK:"backdrop/onclick"};class u{create(e){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let t=document.body.lastChild;document.documentElement.classList.add(o),setTimeout(function(){t.classList.add(a),"function"==typeof e&&e()},75),this._dispatchEvents()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=this._getBackdrops();s.Z.iterate(t,e=>e.classList.remove(a)),setTimeout(this._removeExistingBackdrops.bind(this),e),document.documentElement.classList.remove(o)}_dispatchEvents(){let e=n.Z.isTouchDevice()?"touchstart":"click";document.addEventListener(e,function(e){e.target.classList.contains(i)&&document.dispatchEvent(new CustomEvent(c.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(".".concat(i))}_removeExistingBackdrops(){if(!1===this._exists())return;let e=this._getBackdrops();s.Z.iterate(e,e=>e.remove())}_exists(){return document.querySelectorAll(".".concat(i)).length>0}_getTemplate(){return'<div class="'.concat(i,'"></div>')}constructor(){return u.instance||(u.instance=this),u.instance}}let d=Object.freeze(new u);class p{static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;d.create(e)}static remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;d.remove(e)}static SELECTOR_CLASS(){return i}}},2363:(e,t,r)=>{r.d(t,{L:()=>i,Z:()=>a});var n=r(3266);let s="loader",i={BEFORE:"before",AFTER:"after",INNER:"inner"};class a{create(){if(!this.exists()){if(this.position===i.INNER){this.parent.innerHTML=a.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),a.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(s));n.Z.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(s)).length>0}_getPosition(){return this.position===i.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(s,'" role="status">\n <span class="').concat("visually-hidden",'">Loading...</span>\n </div>')}static SELECTOR_CLASS(){return s}constructor(e,t=i.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}}},5878:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(2363),s=r(5774);class i extends n.Z{create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!this.exists()&&e&&(s.ZP.create(),document.querySelector(".".concat(s.ZP.SELECTOR_CLASS())).insertAdjacentHTML("beforeend",n.Z.getTemplate()))}remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];super.remove(),e&&s.ZP.remove()}constructor(){super(document.body)}}let a=Object.freeze(new i);class o{static create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];a.create(e)}static remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];a.remove(e)}}}}]);
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.