1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[40166],{156:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==s},s="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function r(e,t,s){return e.concat(t).map(function(e){return i(e,s)})}function n(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function o(e,s,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=i;var c,u,d=Array.isArray(s);return d!==Array.isArray(e)?i(s,l):d?l.arrayMerge(e,s,l):(u={},(c=l).isMergeableObject(e)&&n(e).forEach(function(t){u[t]=i(e[t],c)}),n(s).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&c.isMergeableObject(s[t])?u[t]=(function(e,t){if(!t.customMerge)return o;var s=t.customMerge(e);return"function"==typeof s?s:o})(t,c)(e[t],s[t],c):u[t]=i(s[t],c))}),u)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,s){return o(e,s,t)},{})},e.exports=o},308:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:s});return this.el.dispatchEvent(i),i}subscribe(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,r=e.split("."),n=s.scope?t.bind(s.scope):t;if(s.once&&!0===s.once){let t=n;n=function(s){i.unsubscribe(e),t(s)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:s,cb:n}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,s)=>([...s.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(s.splitEventName[0],s.cb):e.push(s),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}},707:(e,t,s)=>{s.d(t,{A:()=>i});class i{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let s=i.toUpperCamelCase(e,t);return i.lcFirst(s)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>i.ucFirst(e.toLowerCase())).join(""):i.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}},220:(e,t,s)=>{s.d(t,{A:()=>o});var i=s(156),r=s.n(i),n=s(707),a=s(308);class o{constructor(e,t={},s=!1){if(!(e instanceof Node))throw Error("There is no valid element given.");this.el=e,this.$emitter=new a.A(this.el),this._pluginName=this._getPluginName(s),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){throw Error(`The "init" method for the plugin "${this._pluginName}" is not defined.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),r().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.A.toDashCase(this._pluginName),s=this.el.getAttribute(`data-${t}-config`);return s?window.PluginConfigManager.get(this._pluginName,s):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.A.toDashCase(this._pluginName),s=this.el.getAttribute(`data-${t}-options`);if(s)try{return JSON.parse(s)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}},68:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",i=this._createPreparedRequest("GET",e,s);return this._sendRequest(i,null,t)}
1post(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let r=this._createPreparedRequest("POST",e,i);return this._sendRequest(r,t,s)}delete(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let r=this._createPreparedRequest("DELETE",e,i);return this._sendRequest(r,t,s)}patch(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let r=this._createPreparedRequest("PATCH",e,i);return this._sendRequest(r,t,s)}abort(){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 ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,s){return this._registerOnLoaded(e,s),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,s){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),s&&this._request.setRequestHeader("Content-type",s),this._request}}},592:(e,t,s)=>{s.d(t,{Kq:()=>o,Ay:()=>d});
1class i{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return i.isIPhoneDevice()||i.isIPadDevice()}static isNativeWindowsBrowser(){return i.isIEBrowser()||i.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":i.isTouchDevice(),"is-ios":i.isIOSDevice(),"is-native-windows":i.isNativeWindowsBrowser(),"is-iphone":i.isIPhoneDevice(),"is-ipad":i.isIPadDevice(),"is-ie":i.isIEBrowser(),"is-edge":i.isEdgeBrowser()}}}let r="modal-backdrop",n="modal-backdrop-open",a="no-scroll",o=350,l={ON_CLICK:"backdrop/onclick"};class c{constructor(){return c.instance||(c.instance=this),c.instance}create(e){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let t=document.body.lastChild;document.documentElement.classList.add(a),setTimeout(function(){t.classList.add(n),"function"==typeof e&&e()},75),this._dispatchEvents()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;this._getBackdrops().forEach(e=>e.classList.remove(n)),setTimeout(this._removeExistingBackdrops.bind(this),e),document.documentElement.classList.remove(a)}_dispatchEvents(){let e=i.isTouchDevice()?"touchstart":"click";document.addEventListener(e,function(e){e.target.classList.contains(r)&&document.dispatchEvent(new CustomEvent(l.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(`.${r}`)}_removeExistingBackdrops(){!1!==this._exists()&&this._getBackdrops().forEach(e=>e.remove())}_exists(){return document.querySelectorAll(`.${r}`).length>0}_getTemplate(){return`<div class="${r}"></div>`}}let u=Object.freeze(new c);class d{static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.create(e)}static remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;u.remove(e)}static SELECTOR_CLASS(){return r}}},683:(e,t,s)=>{s.d(t,{A:()=>n});let i="loader",r={BEFORE:"before",INNER:"inner"};class n{constructor(e,t=r.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===r.INNER){this.parent.innerHTML=n.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),n.getTemplate())}}remove(){this.parent.querySelectorAll(`.${i}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${i}`).length>0}_getPosition(){return this.position===r.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${i}" role="status"> 2 <span class="visually-hidden">Loading...</span> 3 </div>`}static SELECTOR_CLASS(){return i}}},166:(e,t,s)=>{s.r(t),s.d(t,{SWAG_CMS_EXTENSIONS_VARIANT_SWITCH_EXTENSION:()=>p,default:()=>g});var i=s(220),r=s(683),n=s(592);class a extends r.A{constructor(){super(document.body)}create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!this.exists()&&e&&(n.Ay.create(),document.querySelector(`.${n.Ay.SELECTOR_CLASS()}`).insertAdjacentHTML("beforeend",r.A.getTemplate()))}remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];super.remove(),e&&n.Ay.remove()}}let o=Object.freeze(new a);class l{static create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];o.create(e)}static remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];o.remove(e)}}var c=s(68);class u extends i.A{static #e=this.options={url:"",elementId:"",pageType:"",radioFieldSelector:".product-detail-configurator-option-input",selectFieldSelector:".product-detail-configurator-select-input",focusHandlerKey:"variant-switch"};init(){this._httpClient=new c.A,this._radioFields=this.el.querySelectorAll(this.options.radioFieldSelector),this._selectFields=this.el.querySelectorAll(this.options.selectFieldSelector),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&&this._radioFields.forEach(e
3=>{u._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),s=this._getFormValue();this._preserveCurrentValues(),this.$emitter.publish("onChange");let i={switched:t,options:JSON.stringify(s)};if(this._elementId&&"product_detail"!==this._pageType){let e=`${this.options.url}?${new URLSearchParams({...i,elementId:this._elementId}).toString()}`;document.$emitter.publish("updateBuyWidget",{url:e,elementId:this._elementId});return}this._saveFocusState(e.target),this._redirectToVariant(i)}_getSwitchedOptionId(e){return!!u._isFieldSerializable(e)&&e.name}_getFormValue(){let e={};return this._radioFields&&this._radioFields.forEach(t=>{u._isFieldSerializable(t)&&t.checked&&(e[t.name]=t.value)}),this._selectFields&&this._selectFields.forEach(t=>{if(u._isFieldSerializable(t)){let s=[...t.options].find(e=>e.selected);e[t.name]=s.value}}),e}static _isFieldSerializable(e){return!e.name||e.disabled||-1===["file","reset","submit","button"].indexOf(e.type)}_disableFields(){this._radioFields.forEach(e=>{e.classList&&e.classList.add("disabled","disabled")})}_redirectToVariant(e){l.create(),fetch(`${this.options.url}?${new URLSearchParams(e).toString()}`,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.json()).then(e=>window.location.replace(e.url))}_saveFocusState(e){window.focusHandler.saveFocusStatePersistent(this.options.focusHandlerKey,`[id="${e.id}"]`)}_resumeFocusState(){window.focusHandler.resumeFocusStatePersistent(this.options.focusHandlerKey)}}let d="element-loader-backdrop";class h extends r.A{static create(e){e.classList.add("has-element-loader"),h.exists(e)||(h.appendLoader(e),setTimeout(()=>{let t=e.querySelector(`.${d}`);t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(`.${d}`);t&&t.remove()}static exists(e){return e.querySelectorAll(`.${d}`).length>0}static getTemplate(){return` 4 <div class="${d}"> 5 <div class="loader" role="status"> 6 <span class="visually-hidden">Loading...</span> 7 </div> 8 </div> 9 `}static appendLoader(e){e.insertAdjacentHTML("beforeend",h.getTemplate())}}let p={EVENT:{VARIANT_SWITCHED:"SwagCmsExtensionsVariantSwitchPluginVariantSwitched"}};class g extends u{static #e=this.options={parentId:"",listingProductId:"",focusHandlerKey:"variant-switch",...super.options};_onChange(e){let t=`[data-swag-cms-extensions-quickview-carousel-product-id="${this.options.listingProductId}"]`;if(this._contains(this.el,t)){let s=document.querySelector(`${t} .product-detail-buy`).firstElementChild;h.create(s),this._emitVariantSwitchEvent(e,this.$emitter)}else super._onChange(e)}_saveFocusState(e){window.focusHandler&&"function"==typeof window.focusHandler.saveFocusStatePersistent&&window.focusHandler.saveFocusStatePersistent(this.options.focusHandlerKey,`[data-variant-switch-value="${e.dataset.variantSwitchValue}"]`)}_resumeFocusState(){window.focusHandler&&"function"==typeof window.focusHandler.resumeFocusStatePersistent&&window.focusHandler.resumeFocusStatePersistent(this.options.focusHandlerKey)}_emitVariantSwitchEvent(e,t){t.publish(p.EVENT.VARIANT_SWITCHED,{parentId:this.options.parentId,listingProductId:this.options.listingProductId,switched:this._getSwitchedOptionId(e.target),options:JSON.stringify(this._getFormValue())})}_contains(e,t){return[...document.querySelectorAll(t)].map(t=>t.contains(e)).reduce((e,t)=>!!e||t,!1)}}}}]);
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.