From 3495aa1d28d606d09954807fc36295503ddeaebc Mon Sep 17 00:00:00 2001 From: "Dima Snisarenko (CI)" Date: Fri, 10 Nov 2023 07:35:03 +0000 Subject: [PATCH] Automatically update gh-pages [skip ci] --- examples.html | 2 +- index.html | 2 +- js/index.1.1ea2b47e.js | 2 ++ js/index.1.1ea2b47e.js.map | 1 + js/index.1.f6911889.js | 2 -- js/index.1.f6911889.js.map | 1 - 6 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 js/index.1.1ea2b47e.js create mode 100644 js/index.1.1ea2b47e.js.map delete mode 100644 js/index.1.f6911889.js delete mode 100644 js/index.1.f6911889.js.map diff --git a/examples.html b/examples.html index 79b723e..8f0e99c 100644 --- a/examples.html +++ b/examples.html @@ -1,4 +1,4 @@ -Image Comparison Slider - React, Vue, Angular - Usage Examples

Usage Examples

Installation and usage instructions are available on GitHub.

All images in the examples are given width="100%" property to make them responsive.

Default settings

+Image Comparison Slider - React, Vue, Angular - Usage Examples

Usage Examples

Installation and usage instructions are available on GitHub.

All images in the examples are given width="100%" property to make them responsive.

Default settings

diff --git a/index.html b/index.html index 3e1bdd3..5fb50b7 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Image Comparison Slider - React, Vue, Angular
First image example
Compare two images. Before and after.
Now try to use or arrows on the keyboard.
Amazing, isn't it?
Your star will make a big difference for this project.
Second image example
This free open source slider component was created to demonstrate the difference between two images. For example, to show the difference before and after applying photo effects or filters, to compare photos of rooms before and after construction, or to show landscape changes over time. The component is well suited for news portals, artists, or design portfolios.
Because it is a web component, it is compatible with almost any JS framework, web application, or design system. In addition, this component offers a wide range of settings - the examples section provides many ideas and styling techniques. The setup and settings documentation is available on the component's GitHub page.

Features

  • Mobile-friendly
    Mobile-friendly
  • Accessible
    Accessible
  • Responsive
    Responsive
  • Compact
    Compact
  • Adjustable
    Adjustable
  • Supports modern JS frameworks
    Supports modern JS frameworks
What it looks like on default / See more examples
First image example Second image example
© 2019 – Made with love and care by sneas .
\ No newline at end of file +Image Comparison Slider - React, Vue, Angular
First image example
Compare two images. Before and after.
Now try to use or arrows on the keyboard.
Amazing, isn't it?
Your star will make a big difference for this project.
Second image example
This free open source slider component was created to demonstrate the difference between two images. For example, to show the difference before and after applying photo effects or filters, to compare photos of rooms before and after construction, or to show landscape changes over time. The component is well suited for news portals, artists, or design portfolios.
Because it is a web component, it is compatible with almost any JS framework, web application, or design system. In addition, this component offers a wide range of settings - the examples section provides many ideas and styling techniques. The setup and settings documentation is available on the component's GitHub page.

Features

  • Mobile-friendly
    Mobile-friendly
  • Accessible
    Accessible
  • Responsive
    Responsive
  • Compact
    Compact
  • Adjustable
    Adjustable
  • Supports modern JS frameworks
    Supports modern JS frameworks
What it looks like on default / See more examples
First image example Second image example
© 2019 – Made with love and care by sneas .
\ No newline at end of file diff --git a/js/index.1.1ea2b47e.js b/js/index.1.1ea2b47e.js new file mode 100644 index 0000000..f2de99b --- /dev/null +++ b/js/index.1.1ea2b47e.js @@ -0,0 +1,2 @@ +(()=>{var t={9251:()=>{(()=>{"use strict";var t={792:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(609),o=i.n(s)()((function(t){return t[1]}));o.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',""]);const n=o},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,s){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(s)for(var n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=i(792);const e="rendered",s=(t,e)=>{const i=t.getBoundingClientRect();let s,o;return"mousedown"===e.type?(s=e.clientX,o=e.clientY):(s=e.touches[0].clientX,o=e.touches[0].clientY),s>=i.x&&s<=i.x+i.width&&o>=i.y&&o<=i.y+i.height};let o;const n={ArrowLeft:-1,ArrowRight:1},r=["horizontal","vertical"],a=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),d=t=>({x:t.pageX,y:t.pageY});class h extends HTMLElement{constructor(){super(),this.exposure=this.hasAttribute("value")?parseFloat(this.getAttribute("value")):50,this.slideOnHover=!1,this.slideDirection="horizontal",this.keyboard="enabled",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=t=>{if(this.isMouseDown||this.slideOnHover){const e=d(t);this.slideToPage(e)}},this.bodyUserSelectStyle="",this.onMouseDown=t=>{if(this.slideOnHover)return;if(this.handle&&!s(this.handleElement,t))return;t.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const e=d(t);this.slideToPage(e),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,window.document.body.style.userSelect="none"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=t=>{this.dragByHandle&&!s(this.handleElement,t)||(this.touchStartPoint=a(t),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=t=>{if(null===this.touchStartPoint)return;const e=a(t);if(this.isTouchComparing)return this.slideToPage(e),t.preventDefault(),!1;if(!this.hasTouchMoved){const i=Math.abs(e.y-this.touchStartPoint.y),s=Math.abs(e.x-this.touchStartPoint.x);if("horizontal"===this.slideDirection&&is)return this.isTouchComparing=!0,this.focus(),this.slideToPage(e),t.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove("focused")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add("focused")},this.onKeyDown=t=>{if("disabled"===this.keyboard)return;const e=n[t.key];this.animationDirection!==e&&void 0!==e&&(this.animationDirection=e,this.startSlideAnimation())},this.onKeyUp=t=>{if("disabled"===this.keyboard)return;const e=n[t.key];void 0!==e&&this.animationDirection===e&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:"open"}),i=document.createElement("style");i.innerHTML=t.Z,this.getAttribute("nonce")&&i.setAttribute("nonce",this.getAttribute("nonce")),e.appendChild(i),e.appendChild(o.content.cloneNode(!0)),this.firstElement=e.getElementById("first"),this.handleElement=e.getElementById("handle")}set handle(t){this.dragByHandle="false"!==t.toString().toLowerCase()}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(t){const e=parseFloat(t);e!==this.exposure&&(this.exposure=e,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover="false"!==t.toString().toLowerCase(),this.removeEventListener("mousemove",this.onMouseMove),this.slideOnHover&&this.addEventListener("mousemove",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...r),r.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return["hover","direction"]}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),this.addEventListener("dragstart",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute("keyboard")&&"disabled"===this.getAttribute("keyboard")?"disabled":"enabled",this.addEventListener("keydown",this.onKeyDown),this.addEventListener("keyup",this.onKeyUp),this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.addEventListener("touchend",this.onTouchEnd),this.addEventListener("mousedown",this.onMouseDown),this.handle=this.hasAttribute("handle")?this.getAttribute("handle"):this.dragByHandle,this.hover=this.hasAttribute("hover")?this.getAttribute("hover"):this.slideOnHover,this.direction=this.hasAttribute("direction")?this.getAttribute("direction"):this.slideDirection,this.resetDimensions(),this.classList.contains(e)||this.classList.add(e)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,e,i){"hover"===t&&(this.hover=i),"direction"===t&&(this.direction=i),"keyboard"===t&&(this.keyboard="disabled"===i?"disabled":"enabled")}setExposure(t=0){var e;this.exposure=(e=this.exposure+t)<0?0:e>100?100:e,this.firstElement.style.setProperty("--exposure",100-this.exposure+"%")}slide(t=0){this.setExposure(t);const e=new Event("slide");this.dispatchEvent(e)}slideToPage(t){"horizontal"===this.slideDirection&&this.slideToPageX(t.x),"vertical"===this.slideDirection&&this.slideToPageY(t.y)}slideToPageX(t){const e=t-this.getBoundingClientRect().left-window.scrollX;this.exposure=e/this.imageWidth*100,this.slide(0)}slideToPageY(t){const e=t-this.getBoundingClientRect().top-window.scrollY;this.exposure=e/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty("--transition-time","100ms"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,e=this.animationDirection;this.firstElement.style.setProperty("--transition-time","var(--keyboard-transition-time)");const i=s=>{if(0===this.animationDirection||e!==this.animationDirection)return;null===t&&(t=s);const o=(s-t)/16.666666666666668*this.animationDirection;this.slide(o),setTimeout((()=>window.requestAnimationFrame(i)),0),t=s};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)")}}"undefined"!=typeof window&&(window.document&&(o=document.createElement("template"),o.innerHTML='
'),window.customElements.define("img-comparison-slider",h))})()})()}},e={};function i(s){var o=e[s];if(void 0!==o)return o.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";i(9251)})()})(); +//# sourceMappingURL=index.1.1ea2b47e.js.map \ No newline at end of file diff --git a/js/index.1.1ea2b47e.js.map b/js/index.1.1ea2b47e.js.map new file mode 100644 index 0000000..3ab7055 --- /dev/null +++ b/js/index.1.1ea2b47e.js.map @@ -0,0 +1 @@ +{"version":3,"file":"js/index.1.1ea2b47e.js","mappings":"uBAAA,MAAM,aAAa,IAAIA,EAAE,CAAC,IAAI,CAACA,EAAEC,EAAEC,KAAKA,EAAEC,EAAEF,EAAE,CAACG,EAAE,IAAIC,IAAI,IAAIC,EAAEJ,EAAE,KAAKK,EAAEL,EAAEG,EAAEC,EAAJJ,IAAS,SAAUF,GAAG,OAAOA,EAAE,EAAG,IAAGO,EAAEC,KAAK,CAACR,EAAES,GAAG,spFAAspF,KAAK,MAAMJ,EAAEE,GAAG,IAAIP,IAAIA,EAAEU,QAAQ,SAASV,GAAG,IAAIC,EAAE,GAAG,OAAOA,EAAEU,SAAS,WAAW,OAAOC,KAAKC,KAAI,SAAUZ,GAAG,IAAIC,EAAEF,EAAEC,GAAG,OAAOA,EAAE,GAAG,UAAUa,OAAOb,EAAE,GAAG,MAAMa,OAAOZ,EAAE,KAAKA,CAAE,IAAGa,KAAK,GAAG,EAAEd,EAAEC,EAAE,SAASF,EAAEE,EAAEI,GAAG,iBAAiBN,IAAIA,EAAE,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ACxB,IAAM,EAEP,OADAJ,EAAoBvI,EAAE6I,EAAQ,CAAE9H,EAAG8H,IAC5BA,CAAM,ECLdN,EAAoBvI,EAAI,CAACO,EAASuI,KACjC,IAAI,IAAIxD,KAAOwD,EACXP,EAAoBnI,EAAE0I,EAAYxD,KAASiD,EAAoBnI,EAAEG,EAAS+E,IAC5EnE,OAAOC,eAAeb,EAAS+E,EAAK,CAAEjE,YAAY,EAAMC,IAAKwH,EAAWxD,IAE1E,ECNDiD,EAAoBnI,EAAI,CAAC2I,EAAKC,IAAU7H,OAAOI,UAAUC,eAAeC,KAAKsH,EAAKC,G","sources":["webpack://@img-comparison-slider/www/../img-comparison-slider/dist/index.js","webpack://@img-comparison-slider/www/webpack/bootstrap","webpack://@img-comparison-slider/www/webpack/runtime/compat get default export","webpack://@img-comparison-slider/www/webpack/runtime/define property getters","webpack://@img-comparison-slider/www/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["(()=>{\"use strict\";var t={792:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(609),o=i.n(s)()((function(t){return t[1]}));o.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:\" \";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',\"\"]);const n=o},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?\"@media \".concat(e[2],\" {\").concat(i,\"}\"):i})).join(\"\")},e.i=function(t,i,s){\"string\"==typeof t&&(t=[[null,t,\"\"]]);var o={};if(s)for(var n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=i(792);const e=\"rendered\",s=(t,e)=>{const i=t.getBoundingClientRect();let s,o;return\"mousedown\"===e.type?(s=e.clientX,o=e.clientY):(s=e.touches[0].clientX,o=e.touches[0].clientY),s>=i.x&&s<=i.x+i.width&&o>=i.y&&o<=i.y+i.height};let o;const n={ArrowLeft:-1,ArrowRight:1},r=[\"horizontal\",\"vertical\"],a=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),h=t=>({x:t.pageX,y:t.pageY});class d extends HTMLElement{constructor(){super(),this.exposure=this.hasAttribute(\"value\")?parseFloat(this.getAttribute(\"value\")):50,this.slideOnHover=!1,this.slideDirection=\"horizontal\",this.keyboard=\"enabled\",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=t=>{if(this.isMouseDown||this.slideOnHover){const e=h(t);this.slideToPage(e)}},this.bodyUserSelectStyle=\"\",this.onMouseDown=t=>{if(this.slideOnHover)return;if(this.handle&&!s(this.handleElement,t))return;t.preventDefault(),window.addEventListener(\"mousemove\",this.onMouseMove),window.addEventListener(\"mouseup\",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const e=h(t);this.slideToPage(e),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,window.document.body.style.userSelect=\"none\"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.removeEventListener(\"mousemove\",this.onMouseMove),window.removeEventListener(\"mouseup\",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=t=>{this.dragByHandle&&!s(this.handleElement,t)||(this.touchStartPoint=a(t),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=t=>{if(null===this.touchStartPoint)return;const e=a(t);if(this.isTouchComparing)return this.slideToPage(e),t.preventDefault(),!1;if(!this.hasTouchMoved){const i=Math.abs(e.y-this.touchStartPoint.y),s=Math.abs(e.x-this.touchStartPoint.x);if(\"horizontal\"===this.slideDirection&&is)return this.isTouchComparing=!0,this.focus(),this.slideToPage(e),t.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove(\"focused\")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add(\"focused\")},this.onKeyDown=t=>{if(\"disabled\"===this.keyboard)return;const e=n[t.key];this.animationDirection!==e&&void 0!==e&&(this.animationDirection=e,this.startSlideAnimation())},this.onKeyUp=t=>{if(\"disabled\"===this.keyboard)return;const e=n[t.key];void 0!==e&&this.animationDirection===e&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:\"open\"}),i=document.createElement(\"style\");i.innerHTML=t.Z,this.getAttribute(\"nonce\")&&i.setAttribute(\"nonce\",this.getAttribute(\"nonce\")),e.appendChild(i),e.appendChild(o.content.cloneNode(!0)),this.firstElement=e.getElementById(\"first\"),this.handleElement=e.getElementById(\"handle\")}set handle(t){this.dragByHandle=\"false\"!==t.toString().toLowerCase()}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(t){const e=parseFloat(t);e!==this.exposure&&(this.exposure=e,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover=\"false\"!==t.toString().toLowerCase(),this.removeEventListener(\"mousemove\",this.onMouseMove),this.slideOnHover&&this.addEventListener(\"mousemove\",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...r),r.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return[\"hover\",\"direction\"]}connectedCallback(){this.hasAttribute(\"tabindex\")||(this.tabIndex=0),this.addEventListener(\"dragstart\",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute(\"keyboard\")&&\"disabled\"===this.getAttribute(\"keyboard\")?\"disabled\":\"enabled\",this.addEventListener(\"keydown\",this.onKeyDown),this.addEventListener(\"keyup\",this.onKeyUp),this.addEventListener(\"focus\",this.onFocus),this.addEventListener(\"blur\",this.onBlur),this.addEventListener(\"touchstart\",this.onTouchStart,{passive:!0}),this.addEventListener(\"touchmove\",this.onTouchMove,{passive:!1}),this.addEventListener(\"touchend\",this.onTouchEnd),this.addEventListener(\"mousedown\",this.onMouseDown),this.handle=this.hasAttribute(\"handle\")?this.getAttribute(\"handle\"):this.dragByHandle,this.hover=this.hasAttribute(\"hover\")?this.getAttribute(\"hover\"):this.slideOnHover,this.direction=this.hasAttribute(\"direction\")?this.getAttribute(\"direction\"):this.slideDirection,this.resetDimensions(),this.classList.contains(e)||this.classList.add(e)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,e,i){\"hover\"===t&&(this.hover=i),\"direction\"===t&&(this.direction=i),\"keyboard\"===t&&(this.keyboard=\"disabled\"===i?\"disabled\":\"enabled\")}setExposure(t=0){var e;this.exposure=(100,(e=this.exposure+t)<0?0:e>100?100:e),this.firstElement.style.setProperty(\"--exposure\",100-this.exposure+\"%\")}slide(t=0){this.setExposure(t);const e=new Event(\"slide\");this.dispatchEvent(e)}slideToPage(t){\"horizontal\"===this.slideDirection&&this.slideToPageX(t.x),\"vertical\"===this.slideDirection&&this.slideToPageY(t.y)}slideToPageX(t){const e=t-this.getBoundingClientRect().left-window.scrollX;this.exposure=e/this.imageWidth*100,this.slide(0)}slideToPageY(t){const e=t-this.getBoundingClientRect().top-window.scrollY;this.exposure=e/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty(\"--transition-time\",\"100ms\"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty(\"--transition-time\",\"var(--default-transition-time)\"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,e=this.animationDirection;this.firstElement.style.setProperty(\"--transition-time\",\"var(--keyboard-transition-time)\");const i=s=>{if(0===this.animationDirection||e!==this.animationDirection)return;null===t&&(t=s);const o=(s-t)/16.666666666666668*this.animationDirection;this.slide(o),setTimeout((()=>window.requestAnimationFrame(i)),0),t=s};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty(\"--transition-time\",\"var(--default-transition-time)\")}}\"undefined\"!=typeof window&&(window.document&&(o=document.createElement(\"template\"),o.innerHTML='
'),window.customElements.define(\"img-comparison-slider\",d))})()})();\n//# sourceMappingURL=index.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))"],"names":["t","e","i","d","Z","n","s","o","push","id","exports","toString","this","map","concat","join","length","r","a","h","__esModule","default","Object","defineProperty","enumerable","get","prototype","hasOwnProperty","call","getBoundingClientRect","type","clientX","clientY","touches","x","width","y","height","ArrowLeft","ArrowRight","pageX","pageY","HTMLElement","constructor","super","exposure","hasAttribute","parseFloat","getAttribute","slideOnHover","slideDirection","keyboard","isMouseDown","animationDirection","isFocused","dragByHandle","onMouseMove","slideToPage","bodyUserSelectStyle","onMouseDown","handle","handleElement","preventDefault","window","addEventListener","onWindowMouseUp","enableTransition","focus","document","body","style","userSelect","removeEventListener","touchStartPoint","isTouchComparing","hasTouchMoved","onTouchStart","onTouchMove","Math","abs","onTouchEnd","onBlur","stopSlideAnimation","firstElement","classList","remove","onFocus","add","onKeyDown","key","startSlideAnimation","onKeyUp","resetDimensions","imageWidth","offsetWidth","imageHeight","offsetHeight","attachShadow","mode","createElement","innerHTML","setAttribute","appendChild","content","cloneNode","getElementById","toLowerCase","value","setExposure","hover","direction","slide","includes","observedAttributes","connectedCallback","tabIndex","ResizeObserver","observe","passive","contains","disconnectedCallback","transitionTimer","clearTimeout","attributeChangedCallback","setProperty","Event","dispatchEvent","slideToPageX","slideToPageY","left","scrollX","top","scrollY","setTimeout","requestAnimationFrame","customElements","define","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","module","__webpack_modules__","getter","definition","obj","prop"],"sourceRoot":""} \ No newline at end of file diff --git a/js/index.1.f6911889.js b/js/index.1.f6911889.js deleted file mode 100644 index 445aa4b..0000000 --- a/js/index.1.f6911889.js +++ /dev/null @@ -1,2 +0,0 @@ -(()=>{var t={9251:()=>{(()=>{"use strict";var t={792:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(609),o=i.n(s)()((function(t){return t[1]}));o.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',""]);const n=o},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,s){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(s)for(var n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=i(792);const e="rendered",s=(t,e)=>{const i=t.getBoundingClientRect();let s,o;return"mousedown"===e.type?(s=e.clientX,o=e.clientY):(s=e.touches[0].clientX,o=e.touches[0].clientY),s>=i.x&&s<=i.x+i.width&&o>=i.y&&o<=i.y+i.height},o=document.createElement("template");o.innerHTML='
';const n={ArrowLeft:-1,ArrowRight:1},r=["horizontal","vertical"],a=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),d=t=>({x:t.pageX,y:t.pageY});class h extends HTMLElement{constructor(){super(),this.exposure=this.hasAttribute("value")?parseFloat(this.getAttribute("value")):50,this.slideOnHover=!1,this.slideDirection="horizontal",this.keyboard="enabled",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=t=>{if(this.isMouseDown||this.slideOnHover){const e=d(t);this.slideToPage(e)}},this.bodyUserSelectStyle="",this.onMouseDown=t=>{if(this.slideOnHover)return;if(this.handle&&!s(this.handleElement,t))return;t.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const e=d(t);this.slideToPage(e),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,window.document.body.style.userSelect="none"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=t=>{this.dragByHandle&&!s(this.handleElement,t)||(this.touchStartPoint=a(t),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=t=>{if(null===this.touchStartPoint)return;const e=a(t);if(this.isTouchComparing)return this.slideToPage(e),t.preventDefault(),!1;if(!this.hasTouchMoved){const i=Math.abs(e.y-this.touchStartPoint.y),s=Math.abs(e.x-this.touchStartPoint.x);if("horizontal"===this.slideDirection&&is)return this.isTouchComparing=!0,this.focus(),this.slideToPage(e),t.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove("focused")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add("focused")},this.onKeyDown=t=>{if("disabled"===this.keyboard)return;const e=n[t.key];this.animationDirection!==e&&void 0!==e&&(this.animationDirection=e,this.startSlideAnimation())},this.onKeyUp=t=>{if("disabled"===this.keyboard)return;const e=n[t.key];void 0!==e&&this.animationDirection===e&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:"open"}),i=document.createElement("style");i.innerHTML=t.Z,this.getAttribute("nonce")&&i.setAttribute("nonce",this.getAttribute("nonce")),e.appendChild(i),e.appendChild(o.content.cloneNode(!0)),this.firstElement=e.getElementById("first"),this.handleElement=e.getElementById("handle")}set handle(t){this.dragByHandle="false"!==t.toString().toLowerCase()}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(t){const e=parseFloat(t);e!==this.exposure&&(this.exposure=e,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover="false"!==t.toString().toLowerCase(),this.removeEventListener("mousemove",this.onMouseMove),this.slideOnHover&&this.addEventListener("mousemove",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...r),r.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return["hover","direction"]}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),this.addEventListener("dragstart",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute("keyboard")&&"disabled"===this.getAttribute("keyboard")?"disabled":"enabled",this.addEventListener("keydown",this.onKeyDown),this.addEventListener("keyup",this.onKeyUp),this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.addEventListener("touchend",this.onTouchEnd),this.addEventListener("mousedown",this.onMouseDown),this.handle=this.hasAttribute("handle")?this.getAttribute("handle"):this.dragByHandle,this.hover=this.hasAttribute("hover")?this.getAttribute("hover"):this.slideOnHover,this.direction=this.hasAttribute("direction")?this.getAttribute("direction"):this.slideDirection,this.resetDimensions(),this.classList.contains(e)||this.classList.add(e)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,e,i){"hover"===t&&(this.hover=i),"direction"===t&&(this.direction=i),"keyboard"===t&&(this.keyboard="disabled"===i?"disabled":"enabled")}setExposure(t=0){var e;this.exposure=(e=this.exposure+t)<0?0:e>100?100:e,this.firstElement.style.setProperty("--exposure",100-this.exposure+"%")}slide(t=0){this.setExposure(t);const e=new Event("slide");this.dispatchEvent(e)}slideToPage(t){"horizontal"===this.slideDirection&&this.slideToPageX(t.x),"vertical"===this.slideDirection&&this.slideToPageY(t.y)}slideToPageX(t){const e=t-this.getBoundingClientRect().left-window.scrollX;this.exposure=e/this.imageWidth*100,this.slide(0)}slideToPageY(t){const e=t-this.getBoundingClientRect().top-window.scrollY;this.exposure=e/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty("--transition-time","100ms"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,e=this.animationDirection;this.firstElement.style.setProperty("--transition-time","var(--keyboard-transition-time)");const i=s=>{if(0===this.animationDirection||e!==this.animationDirection)return;null===t&&(t=s);const o=(s-t)/16.666666666666668*this.animationDirection;this.slide(o),setTimeout((()=>window.requestAnimationFrame(i)),0),t=s};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)")}}"undefined"!=typeof window&&window.customElements.define("img-comparison-slider",h)})()})()}},e={};function i(s){var o=e[s];if(void 0!==o)return o.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";i(9251)})()})(); -//# sourceMappingURL=index.1.f6911889.js.map \ No newline at end of file diff --git a/js/index.1.f6911889.js.map b/js/index.1.f6911889.js.map deleted file mode 100644 index 2f7faf9..0000000 --- a/js/index.1.f6911889.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"js/index.1.f6911889.js","mappings":"uBAAA,MAAM,aAAa,IAAIA,EAAE,CAAC,IAAI,CAACA,EAAEC,EAAEC,KAAKA,EAAEC,EAAEF,EAAE,CAACG,EAAE,IAAIC,IAAI,IAAIC,EAAEJ,EAAE,KAAKK,EAAEL,EAAEG,EAAEC,EAAJJ,IAAS,SAAUF,GAAG,OAAOA,EAAE,EAAG,IAAGO,EAAEC,KAAK,CAACR,EAAES,GAAG,spFAAspF,KAAK,MAAMJ,EAAEE,GAAG,IAAIP,IAAIA,EAAEU,QAAQ,SAASV,GAAG,IAAIC,EAAE,GAAG,OAAOA,EAAEU,SAAS,W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IAAIoI,EAASL,EAAyBE,GAAY,CAGjDjI,QAAS,CAAC,GAOX,OAHAqI,EAAoBJ,GAAUG,EAAQA,EAAOpI,QAASgI,GAG/CI,EAAOpI,OACf,CCrBAgI,EAAoBrI,EAAKyI,IACxB,IAAIE,EAASF,GAAUA,EAAO1H,WAC7B,IAAO0H,EAAiB,QACxB,IAAM,EAEP,OADAJ,EAAoBvI,EAAE6I,EAAQ,CAAE9H,EAAG8H,IAC5BA,CAAM,ECLdN,EAAoBvI,EAAI,CAACO,EAASuI,KACjC,IAAI,IAAItD,KAAOsD,EACXP,EAAoBnI,EAAE0I,EAAYtD,KAAS+C,EAAoBnI,EAAEG,EAASiF,IAC5ErE,OAAOC,eAAeb,EAASiF,EAAK,CAAEnE,YAAY,EAAMC,IAAKwH,EAAWtD,IAE1E,ECND+C,EAAoBnI,EAAI,CAAC2I,EAAKC,IAAU7H,OAAOI,UAAUC,eAAeC,KAAKsH,EAAKC,G","sources":["webpack://@img-comparison-slider/www/../img-comparison-slider/dist/index.js","webpack://@img-comparison-slider/www/webpack/bootstrap","webpack://@img-comparison-slider/www/webpack/runtime/compat get default export","webpack://@img-comparison-slider/www/webpack/runtime/define property getters","webpack://@img-comparison-slider/www/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["(()=>{\"use strict\";var t={792:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(609),o=i.n(s)()((function(t){return t[1]}));o.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:\" \";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',\"\"]);const n=o},609:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?\"@media \".concat(e[2],\" {\").concat(i,\"}\"):i})).join(\"\")},e.i=function(t,i,s){\"string\"==typeof t&&(t=[[null,t,\"\"]]);var o={};if(s)for(var n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t=i(792);const e=\"rendered\",s=(t,e)=>{const i=t.getBoundingClientRect();let s,o;return\"mousedown\"===e.type?(s=e.clientX,o=e.clientY):(s=e.touches[0].clientX,o=e.touches[0].clientY),s>=i.x&&s<=i.x+i.width&&o>=i.y&&o<=i.y+i.height},o=document.createElement(\"template\");o.innerHTML='
';const n={ArrowLeft:-1,ArrowRight:1},r=[\"horizontal\",\"vertical\"],a=t=>({x:t.touches[0].pageX,y:t.touches[0].pageY}),h=t=>({x:t.pageX,y:t.pageY});class d extends HTMLElement{constructor(){super(),this.exposure=this.hasAttribute(\"value\")?parseFloat(this.getAttribute(\"value\")):50,this.slideOnHover=!1,this.slideDirection=\"horizontal\",this.keyboard=\"enabled\",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=t=>{if(this.isMouseDown||this.slideOnHover){const e=h(t);this.slideToPage(e)}},this.bodyUserSelectStyle=\"\",this.onMouseDown=t=>{if(this.slideOnHover)return;if(this.handle&&!s(this.handleElement,t))return;t.preventDefault(),window.addEventListener(\"mousemove\",this.onMouseMove),window.addEventListener(\"mouseup\",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const e=h(t);this.slideToPage(e),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,window.document.body.style.userSelect=\"none\"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.removeEventListener(\"mousemove\",this.onMouseMove),window.removeEventListener(\"mouseup\",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=t=>{this.dragByHandle&&!s(this.handleElement,t)||(this.touchStartPoint=a(t),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=t=>{if(null===this.touchStartPoint)return;const e=a(t);if(this.isTouchComparing)return this.slideToPage(e),t.preventDefault(),!1;if(!this.hasTouchMoved){const i=Math.abs(e.y-this.touchStartPoint.y),s=Math.abs(e.x-this.touchStartPoint.x);if(\"horizontal\"===this.slideDirection&&is)return this.isTouchComparing=!0,this.focus(),this.slideToPage(e),t.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove(\"focused\")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add(\"focused\")},this.onKeyDown=t=>{if(\"disabled\"===this.keyboard)return;const e=n[t.key];this.animationDirection!==e&&void 0!==e&&(this.animationDirection=e,this.startSlideAnimation())},this.onKeyUp=t=>{if(\"disabled\"===this.keyboard)return;const e=n[t.key];void 0!==e&&this.animationDirection===e&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:\"open\"}),i=document.createElement(\"style\");i.innerHTML=t.Z,this.getAttribute(\"nonce\")&&i.setAttribute(\"nonce\",this.getAttribute(\"nonce\")),e.appendChild(i),e.appendChild(o.content.cloneNode(!0)),this.firstElement=e.getElementById(\"first\"),this.handleElement=e.getElementById(\"handle\")}set handle(t){this.dragByHandle=\"false\"!==t.toString().toLowerCase()}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(t){const e=parseFloat(t);e!==this.exposure&&(this.exposure=e,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(t){this.slideOnHover=\"false\"!==t.toString().toLowerCase(),this.removeEventListener(\"mousemove\",this.onMouseMove),this.slideOnHover&&this.addEventListener(\"mousemove\",this.onMouseMove)}get direction(){return this.slideDirection}set direction(t){this.slideDirection=t.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...r),r.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return[\"hover\",\"direction\"]}connectedCallback(){this.hasAttribute(\"tabindex\")||(this.tabIndex=0),this.addEventListener(\"dragstart\",(t=>(t.preventDefault(),!1))),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute(\"keyboard\")&&\"disabled\"===this.getAttribute(\"keyboard\")?\"disabled\":\"enabled\",this.addEventListener(\"keydown\",this.onKeyDown),this.addEventListener(\"keyup\",this.onKeyUp),this.addEventListener(\"focus\",this.onFocus),this.addEventListener(\"blur\",this.onBlur),this.addEventListener(\"touchstart\",this.onTouchStart,{passive:!0}),this.addEventListener(\"touchmove\",this.onTouchMove,{passive:!1}),this.addEventListener(\"touchend\",this.onTouchEnd),this.addEventListener(\"mousedown\",this.onMouseDown),this.handle=this.hasAttribute(\"handle\")?this.getAttribute(\"handle\"):this.dragByHandle,this.hover=this.hasAttribute(\"hover\")?this.getAttribute(\"hover\"):this.slideOnHover,this.direction=this.hasAttribute(\"direction\")?this.getAttribute(\"direction\"):this.slideDirection,this.resetDimensions(),this.classList.contains(e)||this.classList.add(e)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(t,e,i){\"hover\"===t&&(this.hover=i),\"direction\"===t&&(this.direction=i),\"keyboard\"===t&&(this.keyboard=\"disabled\"===i?\"disabled\":\"enabled\")}setExposure(t=0){var e;this.exposure=(100,(e=this.exposure+t)<0?0:e>100?100:e),this.firstElement.style.setProperty(\"--exposure\",100-this.exposure+\"%\")}slide(t=0){this.setExposure(t);const e=new Event(\"slide\");this.dispatchEvent(e)}slideToPage(t){\"horizontal\"===this.slideDirection&&this.slideToPageX(t.x),\"vertical\"===this.slideDirection&&this.slideToPageY(t.y)}slideToPageX(t){const e=t-this.getBoundingClientRect().left-window.scrollX;this.exposure=e/this.imageWidth*100,this.slide(0)}slideToPageY(t){const e=t-this.getBoundingClientRect().top-window.scrollY;this.exposure=e/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty(\"--transition-time\",\"100ms\"),this.transitionTimer=window.setTimeout((()=>{this.firstElement.style.setProperty(\"--transition-time\",\"var(--default-transition-time)\"),this.transitionTimer=null}),100)}startSlideAnimation(){let t=null,e=this.animationDirection;this.firstElement.style.setProperty(\"--transition-time\",\"var(--keyboard-transition-time)\");const i=s=>{if(0===this.animationDirection||e!==this.animationDirection)return;null===t&&(t=s);const o=(s-t)/16.666666666666668*this.animationDirection;this.slide(o),setTimeout((()=>window.requestAnimationFrame(i)),0),t=s};window.requestAnimationFrame(i)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty(\"--transition-time\",\"var(--default-transition-time)\")}}\"undefined\"!=typeof window&&window.customElements.define(\"img-comparison-slider\",d)})()})();\n//# sourceMappingURL=index.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))"],"names":["t","e","i","d","Z","n","s","o","push","id","exports","toString","this","map","concat","join","length","r","a","h","__esModule","default","Object","defineProperty","enumerable","get","prototype","hasOwnProperty","call","getBoundingClientRect","type","clientX","clientY","touches","x","width","y","height","document","createElement","innerHTML","ArrowLeft","ArrowRight","pageX","pageY","HTMLElement","constructor","super","exposure","hasAttribute","parseFloat","getAttribute","slideOnHover","slideDirection","keyboard","isMouseDown","animationDirection","isFocused","dragByHandle","onMouseMove","slideToPage","bodyUserSelectStyle","onMouseDown","handle","handleElement","preventDefault","window","addEventListener","onWindowMouseUp","enableTransition","focus","body","style","userSelect","removeEventListener","touchStartPoint","isTouchComparing","hasTouchMoved","onTouchStart","onTouchMove","Math","abs","onTouchEnd","onBlur","stopSlideAnimation","firstElement","classList","remove","onFocus","add","onKeyDown","key","startSlideAnimation","onKeyUp","resetDimensions","imageWidth","offsetWidth","imageHeight","offsetHeight","attachShadow","mode","setAttribute","appendChild","content","cloneNode","getElementById","toLowerCase","value","setExposure","hover","direction","slide","includes","observedAttributes","connectedCallback","tabIndex","ResizeObserver","observe","passive","contains","disconnectedCallback","transitionTimer","clearTimeout","attributeChangedCallback","setProperty","Event","dispatchEvent","slideToPageX","slideToPageY","left","scrollX","top","scrollY","setTimeout","requestAnimationFrame","customElements","define","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","module","__webpack_modules__","getter","definition","obj","prop"],"sourceRoot":""} \ No newline at end of file