1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[17328],{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!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a(Array.isArray(t)?[]:{},t,e):t}function r(t,e,i){return t.concat(e).map(function(t){return s(t,i)})}function n(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function a(t,i,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=s;var c,d,h=Array.isArray(i);return h!==Array.isArray(t)?s(i,l):h?l.arrayMerge(t,i,l):(d={},(c=l).isMergeableObject(t)&&n(t).forEach(function(e){d[e]=s(t[e],c)}),n(i).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&c.isMergeableObject(i[e])?d[e]=(function(t,e){if(!e.customMerge)return a;var i=e.customMerge(t);return"function"==typeof i?i:a})(e,c)(t[e],i[e],c):d[e]=s(i[e],c))}),d)}a.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return a(t,i,e)},{})},t.exports=a},328:(t,e,i)=>{i.r(e),i.d(e,{default:()=>_});var s=!1;if("undefined"!=typeof window){var r={get passive(){s=!0;return}};window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}var n="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),o=[],a=!1,l=-1,c=void 0,d=void 0,h=function(t){return o.some(function(e){return!!(e.options.allowTouchMove&&e.options.allowTouchMove(t))})},u=function(t){var e=t||window.event;return!!h(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},p=function(t){if(void 0===d){var e=!!t&&!0===t.reserveScrollBarGap,i=window.innerWidth-document.documentElement.clientWidth;e&&i>0&&(d=document.body.style.paddingRight,document.body.style.paddingRight=i+"px")}void 0===c&&(c=document.body.style.overflow,document.body.style.overflow="hidden")},g=function(){void 0!==d&&(document.body.style.paddingRight=d,d=void 0),void 0!==c&&(document.body.style.overflow=c,c=void 0)},v=function(t,e){var i=t.targetTouches[0].clientY-l;return!h(t.target)&&(e&&0===e.scrollTop&&i>0?u(t):e&&e.scrollHeight-e.scrollTop<=e.clientHeight&&i<0?u(t):(t.stopPropagation(),!0))},m=function(t,e){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}!o.some(function(e){return e.targetElement===t})&&(o=[].concat(function(t){if(!Array.isArray(t))return Array.from(t);for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}(o),[{targetElement:t,options:e||{}}]),n?(t.ontouchstart=function(t){1===t.targetTouches.length&&(l=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&v(e,t)},a||(document.addEventListener("touchmove",u,s?{passive:!1}:void 0),a=!0)):p(e))},f=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}o=o.filter(function(e){return e.targetElement!==t}),n?(t.ontouchstart=null,t.ontouchmove=null,a&&0===o.length&&(document.removeEventListener("touchmove",u,s?{passive:!1}:void 0),a=!1)):o.length||g()};let w=class{constructor(t,e={}){this.settings=Object.assign({controlColor:"#FFFFFF",controlShadow:!0,addCircle:!1,addCircleBlur:!0,showLabels:!1,labelOptions:{before:"Before",after:"After",onHover:!1},smoothing:!0,smoothingAmount:100,hoverStart:!1,verticalMode:!1,startingPoint:50,fluidMode:!1},e),this.safariAgent=-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome"),this.el=t,this.images={},this.wrapper=null,this.control=null,this.arrowContainer=null,this.arrowAnimator=[],this.active=!1,this.slideWidth=50,this.lineWidth=2,this.arrowCoordinates={circle:[5,3],standard:[8,0]}}mount(){this.safariAgent&&(this.settings.smoothing=!1),this._shapeContainer(),this._getImages(),this._buildControl(),this._events()}_events(){this.el.addEventListener("mousedown",t=>{this._activate(!0),document.body.classList.add("icv__body"),m(this.el,{reserveScrollBarGap:!0}),this._slideCompare(t)}),this.el.addEventListener("mousemove",t=>this.active&&this._slideCompare(t)),this.el.addEventListener("mouseup",()=>this._activate(!1)),document.body.addEventListener("mouseup",()=>{document.body.classList.remove("icv__body"),f(this.el),this._activate(!1)}),this.control.addEventListener("touchstart",t=>{this._activate(!0),document.body.classList.add("icv__body"),m(this.el,{reserveScrollBarGap:!0})}),this.el.addEventListener("touchmove",t=>{this.active&&this._slideCompare(t)}),this.el.addEventListener("touchend",()=>{this._activate(!1),document.body.classList.remove("icv__body"),f(this.el)}),this.el.addEventListener("mouseenter",()=>{this.settings.hoverStart&&this._activate(!0);let t=this.settings.addCircle?this.arrowCoordinates.circle:this.arrowCoordinates.standard;this.arrowAnimator.forEach((e,i)=>{e.style.cssText=` 2 ${this.settings.verticalMode?`transform: translateY(${t[1]*(0===i?1:-1)}px);`:`transform: translateX(${t[1]*(0===i?1:-1)}px);`} 3 `})}),this.el.addEventListener("mouseleave",()=>{let t=this.settings.addCircle?this.arrowCoordinates.circle:this.arrowCoordinates.standard;this.arrowAnimator.forEach((e,i)=>{e.style.cssText=` 4 ${this.settings.verticalMode?`transform: translateY(${0===i?`${t[0]}px`:`-${t[0]}px`});`:`transform: translateX(${0===i?`${t[0]}px`:`-${t[0]}px`});`} 5 `})})}_slideCompare(t){let e=this.el.getBoundingClientRect(),i=void 0!==t.touches?t.touches[0].clientX-e.left:t.clientX-e.left,s=void 0!==t.touches?t.touches[0].clientY-e.top:t.clientY-e.top,r=this.settings.verticalMode?s/e.height*100:i/e.width*100;r>=0&&r<=100&&(this.settings.verticalMode?this.control.style.top=`calc(${r}% - ${this.slideWidth/2}px)`:this.control.style.left=`calc(${r}% - ${this.slideWidth/2}px)`,this.settings.fluidMode?this.settings.verticalMode?this.wrapper.style.clipPath=`inset(0 0 ${100-r}% 0)`:this.wrapper.style.clipPath=`inset(0 0 0 ${r}%)`:this.settings.verticalMode?this.wrapper.style.height=`calc(${r}%)`:this.wrapper.style.width=`calc(${100-r}%)`)}_activate(t){this.active=t}
5_shapeContainer(){let t=document.createElement("div"),e=document.createElement("span"),i=document.createElement("span");e.classList.add("icv__label","icv__label-before","keep"),i.classList.add("icv__label","icv__label-after","keep"),this.settings.labelOptions.onHover&&(e.classList.add("on-hover"),i.classList.add("on-hover")),this.settings.verticalMode&&(e.classList.add("vertical"),i.classList.add("vertical")),e.innerHTML=this.settings.labelOptions.before||"Before",i.innerHTML=this.settings.labelOptions.after||"After",this.settings.showLabels&&(this.el.appendChild(e),this.el.appendChild(i)),this.el.classList.add("icv",this.settings.verticalMode?"icv__icv--vertical":"icv__icv--horizontal",this.settings.fluidMode?"icv__is--fluid":"standard"),t.classList.add("icv__imposter"),this.el.appendChild(t)}_buildControl(){let t=document.createElement("div"),e=document.createElement("div"),i=document.createElement("div"),s=document.createElement("div");i.classList.add("icv__theme-wrapper");for(var r=0;r<=1;r++){let t=document.createElement("div"),e=`<svg 6 height="15" 7 width="15" 8 style=" 9 transform: 10 scale(${this.settings.addCircle?.7:1.5}) 11 rotateZ(${0===r?this.settings.verticalMode?"-90deg":"180deg":this.settings.verticalMode?"90deg":"0deg"}); height: 20px; width: 20px; 12 13 ${this.settings.controlShadow?` 14 -webkit-filter: drop-shadow( 0px 3px 5px rgba(0, 0, 0, .33)); 15 filter: drop-shadow( 0px ${0===r?"-3px":"3px"} 5px rgba(0, 0, 0, .33)); 16 `:""} 17 " 18 xmlns="http://www.w3.org/2000/svg" data-name="Layer 1" viewBox="0 0 15 15"> 19 <path ${this.settings.addCircle?'fill="transparent"':`fill="${this.settings.controlColor}"`} 20 stroke="${this.settings.controlColor}" 21 stroke-linecap="round" 22 stroke-width="${3*!!this.settings.addCircle}" 23 d="M4.5 1.9L10 7.65l-5.5 5.4" 24 /> 25 </svg>`;t.innerHTML+=e,this.arrowAnimator.push(t),i.appendChild(t)}let n=this.settings.addCircle?this.arrowCoordinates.circle:this.arrowCoordinates.standard;this.arrowAnimator.forEach((t,e)=>{t.classList.add("icv__arrow-wrapper"),t.style.cssText=` 26 ${this.settings.verticalMode?`transform: translateY(${0===e?`${n[0]}px`:`-${n[0]}px`});`:`transform: translateX(${0===e?`${n[0]}px`:`-${n[0]}px`});`} 27 `}),t.classList.add("icv__control"),t.style.cssText=` 28 ${this.settings.verticalMode?"height":"width "}: ${this.slideWidth}px; 29 ${this.settings.verticalMode?"top":"left "}: calc(${this.settings.startingPoint}% - ${this.slideWidth/2}px); 30 ${"ontouchstart"in document.documentElement?"":this.settings.smoothing?`transition: ${this.settings.smoothingAmount}ms ease-out;`:""} 31 `,e.classList.add("icv__control-line"),e.style.cssText=` 32 ${this.settings.verticalMode?"height":"width "}: ${this.lineWidth}px; 33 background: ${this.settings.controlColor}; 34 ${this.settings.controlShadow?"box-shadow: 0px 0px 15px rgba(0,0,0,0.33);":""} 35 `;let o=e.cloneNode(!0);s.classList.add("icv__circle"),s.style.cssText=` 36 37 ${this.settings.addCircleBlur&&"-webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px)"}; 38 39 border: ${this.lineWidth}px solid ${this.settings.controlColor}; 40 ${this.settings.controlShadow&&"box-shadow: 0px 0px 15px rgba(0,0,0,0.33)"}; 41 `,t.appendChild(e),this.settings.addCircle&&t.appendChild(s),t.appendChild(i),t.appendChild(o),this.arrowContainer=i,this.control=t,this.el.appendChild(t)}_getImages(){let t=this.el.querySelectorAll("img, .keep");this.el.innerHTML="",t.forEach(t=>{this.el.appendChild(t)});let e=[...t].filter(t=>"img"===t.nodeName.toLowerCase());this.settings.verticalMode&&e.reverse();for(let t=0;t<=1;t++){let i=e[t];if(i.classList.add("icv__img"),i.classList.add(0===t?"icv__img-a":"icv__img-b"),1===t){let t=document.createElement("div"),s=e[1].src;t.classList.add("icv__wrapper"),t.style.cssText=` 42 width: ${100-this.settings.startingPoint}%; 43 height: ${this.settings.startingPoint}%; 44 45 ${"ontouchstart"in document.documentElement?"":this.settings.smoothing?`transition: ${this.settings.smoothingAmou
45nt}ms ease-out;`:""} 46 ${this.settings.fluidMode&&`background-image: url(${s}); clip-path: inset(${this.settings.verticalMode?` 0 0 ${100-this.settings.startingPoint}% 0`:`0 0 0 ${this.settings.startingPoint}%`})`} 47 `,t.appendChild(i),this.wrapper=t,this.el.appendChild(this.wrapper)}}if(this.settings.fluidMode){let t=e[0].src,i=document.createElement("div");i.classList.add("icv__fluidwrapper"),i.style.cssText=` 48 49 background-image: url(${t}); 50 51 `,this.el.appendChild(i)}}};var b=i(220);class _ extends b.A{init(){let t=JSON.parse(this.el.dataset.rhwebImageCompareOptions);new w(this.el,t).mount()}}},308:(t,e,i)=>{i.d(e,{A:()=>s});class s{constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,r=t.split("."),n=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=n;n=function(i){s.unsubscribe(t),e(i)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:i,cb:n}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),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}}},707:(t,e,i)=>{i.d(e,{A:()=>s});class s{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 i=s.toUpperCamelCase(t,e);return s.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>s.ucFirst(t.toLowerCase())).join(""):s.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},220:(t,e,i)=>{i.d(e,{A:()=>a});var s=i(156),r=i.n(s),n=i(707),o=i(308);class a{constructor(t,e={},i=!1){if(!(t instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=t,this.$emitter=new o.A(this.el),this._pluginName=this._getPluginName(i),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.A.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):t}_getOptionsFromDataAttribute(){let t={};if("function"!=typeof this.el.getAttribute)return t;let e=n.A.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${e}-options`);if(i)try{return JSON.parse(i)}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}}}}]);
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.