1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["cstorm-arsmundi-product-breadcrumb-variant-switch.plugin"],{998:e=>{var t="%[a-f0-9]{2}",r=RegExp("("+t+")|([^%]+?)","gi"),i=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":"��"},n=i.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var s=function(e){try{return decodeURIComponent(e)}catch(n){for(var t=e.match(r)||[],i=1;i<t.length;i++)t=(e=(function e(t,r){try{return[decodeURIComponent(t.join(""))]}catch(e){}if(1===t.length)return t;r=r||1;var i=t.slice(0,r),n=t.slice(r);return Array.prototype.concat.call([],e(i),e(n))})(t,i).join("")).match(r)||[];return e}}(n[0]);s!==n[0]&&(t[n[0]]=s)}n=i.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),a=0;a<o.length;a++){var c=o[a];e=e.replace(RegExp(c,"g"),t[c])}return e}(e)}}},857: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!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function n(e,t,r){return e.concat(t).map(function(e){return i(e,r)})}function s(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,r,c){(c=c||{}).arrayMerge=c.arrayMerge||n,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=i;var l,u,d=Array.isArray(r);return d!==Array.isArray(e)?i(r,c):d?c.arrayMerge(e,r,c):(u={},(l=c).isMergeableObject(e)&&s(e).forEach(function(t){u[t]=i(e[t],l)}),s(r).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&l.isMergeableObject(r[t])?u[t]=(function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a})(t,l)(e[t],r[t],l):u[t]=i(r[t],l))}),u)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return a(e,r,t)},{})},e.exports=a},728:e=>{e.exports=function(e,t){for(var r={},i=Object.keys(e),n=Array.isArray(t),s=0;s<i.length;s++){var o=i[s],a=e[o];(n?-1!==t.indexOf(o):t(o,a,e))&&(r[o]=a)}return r}},742:e=>{e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},287:(e,t,r)=>{r.r(t),r.d(t,{default:()=>o});var i=r(488),n=r(878),s=r(940);class o extends i.Z{_redirectToVariant(e){n.Z.create();let t=this.options.url+(-1===this.options.url.indexOf("?")?"?":"&")+s.stringify(e);this._httpClient.get("".concat(t),e=>{let t=JSON.parse(e);window.location.replace(t.url)})}}},940:(e,t,r)=>{let i=r(742),n=r(998),s=r(231),o=r(728),a=e=>null==e,c=Symbol("encodeFragmentIdentifier");function l(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?i(e):encodeURIComponent(e):e}function d(e,t){return t.decode?n(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 g(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){l((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,i)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t){i[e]=r;return}void 0===i[e]&&(i[e]={}),i[e][t[1]]=r};case"bracket":return(e,r,i)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t){i[e]=r;return}if(void 0===i[e]){i[e]=[r];return}i[e]=[].concat(i[e],r)};
1case"colon-list-separator":return(e,r,i)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){i[e]=r;return}if(void 0===i[e]){i[e]=[r];return}i[e]=[].concat(i[e],r)};case"comma":case"separator":return(t,r,i)=>{let n="string"==typeof r&&r.includes(e.arrayFormatSeparator),s="string"==typeof r&&!n&&d(r,e).includes(e.arrayFormatSeparator);r=s?d(r,e):r;let o=n||s?r.split(e.arrayFormatSeparator).map(t=>d(t,e)):null===r?r:d(r,e);i[t]=o};case"bracket-separator":return(t,r,i)=>{let n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n){i[t]=r?d(r,e):r;return}let s=null===r?[]:r.split(e.arrayFormatSeparator).map(t=>d(t,e));if(void 0===i[t]){i[t]=s;return}i[t]=[].concat(i[t],s)};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[].concat(r[e],t)}}}(t),i=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return i;for(let n of e.split("&")){if(""===n)continue;let[e,o]=s(t.decode?n.replace(/\+/g," "):n,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:d(o,t),r(d(e,t),o,i)}for(let e of Object.keys(i)){let r=i[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=g(r[e],t);else i[e]=g(r,t)}return!1===t.sort?i:(!0===t.sort?Object.keys(i).sort():Object.keys(i).sort(t.sort)).reduce((e,t)=>{let r=i[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"";l((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=r=>t.skipNull&&a(e[r])||t.skipEmptyString&&""===e[r],i=function(e){switch(e.arrayFormat){case"index":return t=>(r,i)=>{let n=r.length;return void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,[u(t,e),"[",n,"]"].join("")]:[...r,[u(t,e),"[",u(n,e),"]=",u(i,e)].join("")]};case"bracket":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,[u(t,e),"[]"].join("")]:[...r,[u(t,e),"[]=",u(i,e)].join("")];case"colon-list-separator":return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,[u(t,e),":list="].join("")]:[...r,[u(t,e),":list=",u(i,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(i,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?i:(n=null===n?"":n,0===i.length)?[[u(r,e),t,u(n,e)].join("")]:[[i,u(n,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:null===i?[...r,u(t,e)]:[...r,[u(t,e),"=",u(i,e)].join("")]}}(t),n={};for(let t of Object.keys(e))r(t)||(n[t]=e[t]);let s=Object.keys(n);return!1!==t.sort&&s.sort(t.sort),s.map(r=>{let n=e[r];return void 0===n?"":null===n?u(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?u(r,t)+"[]":n.reduce(i(r),[]).join("&"):u(r,t)+"="+u(n,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>
1{t=Object.assign({decode:!0},t);let[r,i]=s(e,"#");return Object.assign({url:r.split("?")[0]||"",query:f(h(e),t)},t&&t.parseFragmentIdentifier&&i?{fragmentIdentifier:d(i,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[c]:!0},r);let i=p(e.url).split("?")[0]||"",n=t.extract(e.url),s=Object.assign(t.parse(n,{sort:!1}),e.query),o=t.stringify(s,r);o&&(o="?".concat(o));let a=function(e){let t="",r=e.indexOf("#");return -1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(a="#".concat(r[c]?u(e.fragmentIdentifier,r):e.fragmentIdentifier)),"".concat(i).concat(o).concat(a)},t.pick=(e,r,i)=>{i=Object.assign({parseFragmentIdentifier:!0,[c]:!1},i);let{url:n,query:s,fragmentIdentifier:a}=t.parseUrl(e,i);return t.stringifyUrl({url:n,query:o(s,r),fragmentIdentifier:a},i)},t.exclude=(e,r,i)=>{let n=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,n,i)}},231: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)]}},49:(e,t,r)=>{r.d(t,{Z:()=>n});var i=r(140);class n{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!n.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===n.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],s=t.replace(/^data(|-)/,""),o=i.Z.toLowerCamelCase(s,"-");if(!n.isNode(e)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let a=e.dataset[o];if(void 0===a){if(r)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return a}return i.Z.parsePrimitive(a)}static querySelector(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelector(t)||!1;if(r&&!1===i)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return i}static querySelectorAll(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!n.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelectorAll(t);if(0===i.length&&(i=!1),r&&!1===i)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return i}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return e.querySelectorAll('\n input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n select:not([tabindex^="-"]):not([disabled]),\n textarea:not([tabindex^="-"]):not([disabled]),\n button:not([tabindex^="-"]):not([disabled]),\n a[href]:not([tabindex^="-"]):not([disabled]),\n [tabindex]:not([tabindex^="-"]):not([disabled])\n ')}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}},830:(e,t,r)=>{r.d(t,{Z:()=>i});class i{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,n=e.split("."),s=r.scope?t.bind(r.scope):t;if(r.once&&!0===r.once){let t=s;s=function(r){i.unsubscribe(e),t(r)}}return this.el.addEventListener(n[0],s),this.listeners.push({splitEventName:n,opts:r,cb:s}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,r)=>([...r.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):e.push(r),e),[]),!0}
1reset(){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}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}},266:(e,t,r)=>{r.d(t,{Z:()=>i});class i{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var r of e.entries())t(r[1],r[0]);return}if(e instanceof NodeList)return e.forEach(t);if(e instanceof HTMLCollection)return Array.from(e).forEach(t);if(e instanceof Object)return Object.keys(e).forEach(r=>{t(e[r],r)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}},140:(e,t,r)=>{r.d(t,{Z:()=>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 r=i.toUpperCamelCase(e,t);return i.lcFirst(r)}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()}}}},568:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(857),n=r.n(i),s=r(49),o=r(140),a=r(830);class c{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=o.Z.toDashCase(this._pluginName),r=s.Z.getDataAttribute(this.el,"data-".concat(t,"-config"),!1),i=s.Z.getAttribute(this.el,"data-".concat(t,"-options"),!1),a=[this.constructor.options,this.options,e];r&&a.push(window.PluginConfigManager.get(this._pluginName,r));try{i&&a.push(JSON.parse(i))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(t,'-options" could not be parsed to json: ').concat(e.message))}return n().all(a.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>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}constructor(e,t={},r=!1){if(!s.Z.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new a.Z(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}},107:(e,t,r)=>{r.d(t,{Z:()=>i});class i{get(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",i=this._createPreparedRequest("GET",e,r);return this._sendRequest(i,null,t)}post(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let n=this._createPreparedRequest("POST",e,i);return this._sendRequest(n,t,r)}delete(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let n=this._createPreparedRequest("DELETE",e,i);return this._sendRequest(n,t,r)}patch(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let n=this._createPreparedRequest("PATCH",e,i);return this._sendRequest(n,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}}},306:(e,t,r)=>{r.d(t,{ar:()=>c,ZP:()=>p});
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()}}}var n=r(266);let s="modal-backdrop",o="modal-backdrop-open",a="no-scroll",c=350,l={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(a),setTimeout(function(){t.classList.add(o),"function"==typeof e&&e()},75),this._dispatchEvents()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=this._getBackdrops();n.Z.iterate(t,e=>e.classList.remove(o)),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(s)&&document.dispatchEvent(new CustomEvent(l.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(".".concat(s))}_removeExistingBackdrops(){if(!1===this._exists())return;let e=this._getBackdrops();n.Z.iterate(e,e=>e.remove())}_exists(){return document.querySelectorAll(".".concat(s)).length>0}_getTemplate(){return'<div class="'.concat(s,'"></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]:c;d.remove(e)}static SELECTOR_CLASS(){return s}}},363:(e,t,r)=>{r.d(t,{Z:()=>o});var i=r(266);let n="loader",s={BEFORE:"before",INNER:"inner"};class o{create(){if(!this.exists()){if(this.position===s.INNER){this.parent.innerHTML=o.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),o.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(n));i.Z.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(n)).length>0}_getPosition(){return this.position===s.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(n,'" role="status">\n <span class="').concat("visually-hidden",'">Loading...</span>\n </div>')}static SELECTOR_CLASS(){return n}constructor(e,t=s.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}}},878:(e,t,r)=>{r.d(t,{Z:()=>a});var i=r(363),n=r(306);class s extends i.Z{create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!this.exists()&&e&&(n.ZP.create(),document.querySelector(".".concat(n.ZP.SELECTOR_CLASS())).insertAdjacentHTML("beforeend",i.Z.getTemplate()))}remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];super.remove(),e&&n.ZP.remove()}constructor(){super(document.body)}}let o=Object.freeze(new s);class a{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)}}},488:(e,t,r)=>{r.d(t,{t:()=>f,Z:()=>m});var i=r(568),n=r(878),s=r(49),o=r(266),a=r(107),c=r(940);class l extends i.Z{init(){this._httpClient=new a.Z,this._radioFields=s.Z.querySelectorAll(this.el,this.options.radioFieldSelector,!1),this._selectFields=s.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&&o.Z.iterate(this._radioFields,e=>{l._isFieldSerializable(e)&&e.dataset&&(e.dataset.variantSwitchValue=e.value)})}_registerEvents(){this.el.addEventListener("change",e=>this._onChange(e))}
1_onChange(e){let t=this._getSwitchedOptionId(e.target),r=this._getFormValue();this._preserveCurrentValues(),this.$emitter.publish("onChange");let i={switched:t,options:JSON.stringify(r)};if(this._elementId&&"product_detail"!==this._pageType){let e=this.options.url+"?"+c.stringify({...i,elementId:this._elementId});document.$emitter.publish("updateBuyWidget",{url:e,elementId:this._elementId});return}this._saveFocusState(e.target),this._redirectToVariant(i)}_getSwitchedOptionId(e){return!!l._isFieldSerializable(e)&&e.name}_getFormValue(){let e={};return this._radioFields&&o.Z.iterate(this._radioFields,t=>{l._isFieldSerializable(t)&&t.checked&&(e[t.name]=t.value)}),this._selectFields&&o.Z.iterate(this._selectFields,t=>{if(l._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(){o.Z.iterate(this._radioFields,e=>{e.classList&&e.classList.add("disabled","disabled")})}_redirectToVariant(e){n.Z.create();let t=this.options.url+"?"+c.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)}}l.options={url:"",elementId:"",pageType:"",radioFieldSelector:".product-detail-configurator-option-input",selectFieldSelector:".product-detail-configurator-select-input",focusHandlerKey:"variant-switch"};var u=r(363);let d="element-loader-backdrop";class p extends u.Z{static create(e){e.classList.add("has-element-loader"),p.exists(e)||(p.appendLoader(e),setTimeout(()=>{let t=e.querySelector(".".concat(d));t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(".".concat(d));t&&t.remove()}static exists(e){return e.querySelectorAll(".".concat(d)).length>0}static getTemplate(){return'\n <div class="'.concat(d,'">\n <div class="loader" role="status">\n <span class="').concat("visually-hidden",'">Loading...</span>\n </div>\n </div>\n ')}static appendLoader(e){e.insertAdjacentHTML("beforeend",p.getTemplate())}}function h(e,t,r){return(h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(r||e):n.value}})(e,t,r||e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}let f={EVENT:{VARIANT_SWITCHED:"SwagCmsExtensionsVariantSwitchPluginVariantSwitched"}};class m extends l{_onChange(e){let t="[".concat("data-swag-cms-extensions-quickview-carousel-product-id",'="').concat(this.options.listingProductId,'"]');if(this._contains(this.el,t)){let r=document.querySelector("".concat(t," .product-detail-buy")).firstElementChild;p.create(r),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="'.concat(e.dataset.variantSwitchValue,'"]'))}_resumeFocusState(){window.focusHandler&&"function"==typeof window.focusHandler.resumeFocusStatePersistent&&window.focusHandler.resumeFocusStatePersistent(this.options.focusHandlerKey)}_emitVariantSwitchEvent(e,t){t.publish(f.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)}}m.options={parentId:"",listingProductId:"",focusHandlerKey:"variant-switch",...h(g(m),"options",m)}}}]);
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.