forgeplus-react/node_modules/react-zmage/lib/zmage.js

2 lines
37 KiB
JavaScript

/*! For license information please see zmage.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("react-zmage",["React","ReactDOM"],t):"object"==typeof exports?exports["react-zmage"]=t(require("react"),require("react-dom")):e["react-zmage"]=t(e.React,e.ReactDOM)}(self,(function(e,t){return(()=>{var o={184:(e,t)=>{var o;!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var a=r.apply(null,o);a&&e.push(a)}}else if("object"===i)if(o.toString===Object.prototype.toString)for(var c in o)n.call(o,c)&&o[c]&&e.push(c);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},798:t=>{"use strict";t.exports=e},413:e=>{"use strict";e.exports=t}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return o[e](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";r.r(i),r.d(i,{default:()=>Re});var e=r(798),t=r.n(e),o=r(413),n=r.n(o);function a(t){var o=t.id,r=t.target,i=t.zIndex,a=t.className,c=t.children,s=(0,e.useState)(r||document.body)[0],l=(0,e.useState)((function(){var e=document.createElement("figure");return o&&(e.id=o),a&&(e.className=a),i&&(e.style.zIndex=String(i)),null==s||s.appendChild(e),e}))[0];return(0,e.useEffect)((function(){return function(){null==s||s.removeChild(l)}}),[]),n().createPortal(c,l)}var c=r(184),s=r.n(c);var l=function(e){var o=e.color;return t().createElement("svg",{fill:o,width:"24",height:"24",viewBox:"0 0 24 24"},t().createElement("path",{d:"M14.71 15.88L10.83 12l3.88-3.88c.39-.39.39-1.02 0-1.41-.39-.39-1.02-.39-1.41 0L8.71 11.3c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42z"}))},u=function(e){var o=e.color;return t().createElement("svg",{fill:o,width:"24",height:"24",viewBox:"0 0 24 24"},t().createElement("path",{d:"M9.29 15.88L13.17 12 9.29 8.12c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0l4.59 4.59c.39.39.39 1.02 0 1.41L10.7 17.3c-.39.39-1.02.39-1.41 0-.38-.39-.39-1.03 0-1.42z"}))},p=function(e){var o=e.color;return t().createElement("svg",{fill:o,width:"24",height:"24",viewBox:"0 0 24 24"},t().createElement("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}))},d=function(e){var o=e.color;return t().createElement("svg",{fill:o,width:"24",height:"24",viewBox:"0 0 24 24"},t().createElement("path",{d:"M19 13v5c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1v-5c0-.55-.45-1-1-1s-1 .45-1 1v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1zm-6-.33l1.88-1.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-3.59 3.59c-.39.39-1.02.39-1.41 0L7.7 12.2c-.39-.39-.39-1.02 0-1.41.39-.39 1.02-.39 1.41 0L11 12.67V4c0-.55.45-1 1-1s1 .45 1 1v8.67z"}))},f=function(e){var o=e.color;return t().createElement("svg",{fill:o,width:"24",height:"24",viewBox:"0 0 200 200"},t().createElement("defs",null,t().createElement("linearGradient",{id:"spinner-1552570621916",x1:"0%",y1:"0%",x2:"65%",y2:"0%"},t().createElement("stop",{offset:"0%",className:"Spinner-blue-3_W"}),t().createElement("stop",{offset:"100%",stopOpacity:"0"}))),t().createElement("circle",{cx:"100",cy:"100",r:"90",fill:"transparent",stroke:"url(#spinner-1552570621916)",strokeWidth:"20"}))},h=function(e){var o=e.color;return t().createElement("svg",{fill:o,width:"24",height:"24",viewBox:"0 0 24 24"},t().createElement("path",{d:"M12 6v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V4c-4.42 0-8 3.58-8 8 0 1.04.2 2.04.57 2.95.27.67 1.13.85 1.64.34.27-.27.38-.68.23-1.04C6.15 13.56 6 12.79 6 12c0-3.31 2.69-6 6-6zm5.79 2.71c-.27.27-.38.69-.23 1.04.28.7.44 1.46.44 2.25 0 3.31-2.69 6-6 6v-1.79c0-.45-.54-.67-.85-.35l-2.79 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.31.31.85.09.85-.35V20c4.42 0 8-3.58 8-8 0-1.04-.2-2.04-.57-2.95-.27-.67-1.13-.85-1.64-.34z"}))},g=function(e){var o=e.color;return t().createElement("svg",{fill:o,width:"24",height:"24",viewBox:"0 0 24 24"},t().createElement("path",{d:"M6.56 7.98C6.1 7.52 5.31 7.6 5 8.17c-.28.51-.5 1.03-.67 1.58-.19.63.31 1.25.96 1.25h.01c.43 0 .82-.28.94-.7.12-.4.28-.79.48-1.17.22-.37.15-.84-.16-1.15zM5.31 13h-.02c-.65 0-1.15.62-.96 1.25.16.54.38 1.07.66 1.58.31.57 1.11.66 1.57.2.3-.31.38-.77.17-1.15-.2-.37-.36-.76-.48-1.16-.12-.44-.51-.72-.94-.72zm2.85 6.02c.51.28 1.04.5 1.59.66.62.18 1.24-.32 1.24-.96v-.03c0-.43-.28-.82-.7-.94-.4-.12-.78-.28-1.15-.48-.38-.21-.86-.14-1.16.17l-.03.03c-.45.45-.36 1.24.21 1.55zM13 4.07v-.66c0-.89-1.08-1.34-1.71-.71L9.17 4.83c-.4.4-.4 1.04 0 1.43l2.13 2.08c.63.62 1.7.17 1.7-.72V6.09c2.84.48 5 2.94 5 5.91 0 2.73-1.82 5.02-4.32 5.75-.41.12-.68.51-.68.94v.02c0 .65.61 1.14 1.23.96C17.57 18.71 20 15.64 20 12c0-4.08-3.05-7.44-7-7.93z"}))},v=function(e){var o=e.color;return t().createElement("svg",{fill:o,width:"24",height:"24",viewBox:"0 0 24 24"},t().createElement("path",{d:"M14.83 4.83L12.7 2.7c-.62-.62-1.7-.18-1.7.71v.66C7.06 4.56 4 7.92 4 12c0 3.64 2.43 6.71 5.77 7.68.62.18 1.23-.32 1.23-.96v-.03c0-.43-.27-.82-.68-.94C7.82 17.03 6 14.73 6 12c0-2.97 2.16-5.43 5-5.91v1.53c0 .89 1.07 1.33 1.7.71l2.13-2.08c.4-.38.4-1.02 0-1.42zm4.84 4.93c-.16-.55-.38-1.08-.66-1.59-.31-.57-1.1-.66-1.56-.2l-.01.01c-.31.31-.38.78-.17 1.16.2.37.36.76.48 1.16.12.42.51.7.94.7h.02c.65 0 1.15-.62.96-1.24zM13 18.68v.02c0 .65.62 1.14 1.24.96.55-.16 1.08-.38 1.59-.66.57-.31.66-1.1.2-1.56l-.02-.02c-.31-.31-.78-.38-1.16-.17-.37.21-.76.37-1.16.49-.41.12-.69.51-.69.94zm4.44-2.65c.46.46 1.25.37 1.56-.2.28-.51.5-1.04.67-1.59.18-.62-.31-1.24-.96-1.24h-.02c-.44 0-.82.28-.94.7-.12.4-.28.79-.48 1.17-.21.38-.13.86.17 1.16z"}))},m=function(e){var o=e.color;return t().createElement("svg",{fill:o,width:"24",height:"24",viewBox:"0 0 24 24"},t().createElement("path",{d:"M6 14c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3c.55 0 1-.45 1-1s-.45-1-1-1H7v-2c0-.55-.45-1-1-1zm0-4c.55 0 1-.45 1-1V7h2c.55 0 1-.45 1-1s-.45-1-1-1H6c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm11 7h-2c-.55 0-1 .45-1 1s.45 1 1 1h3c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1s-1 .45-1 1v2zM14 6c0 .55.45 1 1 1h2v2c0 .55.45 1 1 1s1-.45 1-1V6c0-.55-.45-1-1-1h-3c-.55 0-1 .45-1 1z"}))},y=(0,e.createContext)({}),w=function(){return(w=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},b=void 0,E=function(){return document.body.scrollWidth},O=function(){return window.innerHeight},_={documentOverflow:"",bodyOverflow:"",bodyPosition:""},I=function(){document.documentElement.style.overflow=_.documentOverflow,document.body.style.overflow=_.bodyOverflow,document.body.style.position=_.bodyPosition},P=function(e,t){var o=setInterval((function(){e&&!e.complete||(clearInterval(o),t())}),500);return o},x=function(e,t){void 0===t&&(t={});var o=Object.keys(t).reduce((function(e,o){return void 0===o&&(o=""),t[o]?e.concat(o+"="+t[o]):e}),[]).join("&");return o?e+(e.includes("?")?"&":"?")+o:e},C=function(e,t){return void 0===t&&(t={ref:100}),e?e.includes("%")?t.ref*Number(e.substring(0,e.length-1))/100:Number(e.substring(0,e.length-2)):Number(e)},S=function(e){var t=["Webkit","Moz","Ms","O"];return Object.keys(e).reduce((function(o,n){var r=t.reduce((function(t,o){var r,i;return w(w({},t),((r={})[""+o+(i=n,i.charAt(0).toUpperCase()+i.slice(1))]=e[n],r))}),{});return w(w({},o),r)}),e)},L=function(e){return"number"==typeof e&&(0^e)===e},R=function(e,t,o,n){return void 0===n&&(n={loop:!0}),0===t?0:0===o?e:e<0||e>t-1?void 0:n.loop?Math.abs(t+o+e)%t:e+o<0||e+o>t-1?void 0:e+o},z={0:[0],1:[-1,0,1],2:[-2,-1,0,1,2],3:[-3,-2,-1,0,1,2,3]},T=function(e){return z[e]},N=function(e,t){var o;return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=b;clearTimeout(o),o=setTimeout((function(){e.apply(i,n)}),t)}},k=function(){function e(t){var o=this,n=(void 0===t?{position:e.CENTER_POSITION}:t).position;if(this.currentPosition=e.CENTER_POSITION,this.debounceInterval=200,this.debounceResetPosition=N((function(){o.currentPosition=e.CENTER_POSITION}),this.debounceInterval),this.update=function(e){o.currentPosition={x:e.clientX,y:e.clientY},o.debounceResetPosition()},window.__ZMAGE_GLOBAL_CLICK_MONITOR__)return window.__ZMAGE_GLOBAL_CLICK_MONITOR__;try{this.currentPosition=n,window&&(window.addEventListener("click",this.update),window.__ZMAGE_GLOBAL_CLICK_MONITOR__=this)}catch(t){return{currentPosition:e.CENTER_POSITION,destructor:function(){}}}}return e.prototype.destructor=function(){try{window.removeEventListener("click",this.update),window.__ZMAGE_GLOBAL_CLICK_MONITOR__=void 0}catch(e){}},e.CENTER_POSITION={x:0,y:0},e}();function M(e,o,n,r,i,a,c,s){return"boolean"==typeof e||"string"==typeof e?!!e&&t().createElement("div",{id:n,className:r,onClick:i},s||t().createElement(o,{color:"string"==typeof e?e:""})):t().isValidElement(e)?t().cloneElement(e,{show:a,zoom:c,onClick:i}):null}function B(){var o,n,r,i,a,c,f,h,w,b=(0,e.useContext)(y),E=b.set,O=b.presetIsMobile,_=b.controller,I=b.backdrop,P=b.loop,x=b.show,C=b.zoom,S=b.page,L=b.outBrowsing,R=b.toPage,z=b.toPrevPage,T=b.toNextPage,N=b.toggleZoom,k=b.toggleRotate,B=_||{};return t().createElement(e.Fragment,null,t().createElement("div",{id:"zmageControl",className:s()("controls__3BU3E",(o={},o.show__1tLY6=!C&&x,o)),style:{backgroundColor:I}},M(B.rotateLeft||B.rotate,g,"zmageControlRotateLeft",s()("rotateLeft__1KOxL",((n={}).show__1tLY6=!C&&x,n)),k("left"),x,C),M(B.rotateRight||B.rotate,v,"zmageControlRotateRight",s()("rotateRight__3kYbB",((r={}).show__1tLY6=!C&&x,r)),k("right"),x,C),M(B.download,d,"zmageControlDownload",s()("download__1o8td",((i={}).show__1tLY6=!C&&x,i)),(function(){return e=E[S].src,(t=document.createElement("a")).href=e,t.download=e.split("/")[e.split("/").length-1],document.body.appendChild(t),t.click(),void document.body.removeChild(t);var e,t}),x,C),M(B.zoom,m,"zmageControlZoom",s()("zoom__15F8y",((a={}).show__1tLY6=!C&&x,a)),O?function(){return window.open(E[S].src)}:N,x,C),M(B.close,p,"zmageControlClose",s()("close__wP1v9",((c={}).show__1tLY6=!C&&x,c)),C?N:L,x,C)),Array.isArray(E)&&E.length>1&&t().createElement(e.Fragment,null,(P||0!==S)&&M(B.flipLeft||B.flip,l,"zmageControlFlipLeft",s()("flipLeft__3VB5y",((f={}).show__1tLY6=!C&&x,f)),z,x,C),(P||S!==E.length-1)&&M(B.flipRight||B.flip,u,"zmageControlFlipRight",s()("flipRight__1EqiX",((h={}).show__1tLY6=!C&&x,h)),T,x,C)),Array.isArray(E)&&E.length>1&&(t().isValidElement(B.pagination)?t().cloneElement(B.pagination,{show:x,zoom:C,onClick:R}):!!B.pagination&&t().createElement("div",{id:"zmageControlPagination",className:s()("pages__IwQb3",(w={},w.show__1tLY6=!C&&x,w["mobile__1L-Sn"]=O,w)),style:{backgroundColor:I}},E.map((function(e,o){return o===S?t().createElement("span",{key:o,id:"zmageControlPaginationActive",className:"blackDot__2Zvud"}):t().createElement("span",{key:o,className:"whiteDot__31yN0",onClick:function(){return R(o)}})})))))}const j="imageLayer__207N-";function D(o){var n,r=o.show,i=o.load,a=o.invalidate,c=o.onReload,l=o.backdrop;return t().createElement(e.Fragment,null,(i||a)&&t().createElement("div",{id:"zmageLoading",className:s()("loadingContainer__13wfa",(n={},n.show__29ULf=r,n))},i&&t().createElement("div",{className:"loading__2jKYg"},t().createElement(f,null)),a&&t().createElement("button",{className:"reload__2xUtP",onClick:c,style:{background:l}},t().createElement(h,null))))}var A,G,W="cubic-bezier(0.60, 0.0, 0.10, 1.0)",V=350,F=function(e,t,o){var n=e.show,r=e.zoom;return n?r?Y(e,t):K(e,t):Z(e,t,o)},Z=function(e,t,o){var n=e.coverRef,r=e.coverPos,i=e.rotate,a=e.pageIsCover;if(o&&o.phase===A.END)return{_type:"cover",_behavior:"merge",y:o.getCurrentOffset().y>0?O():-O()};if(n.current){var c=n.current.naturalWidth,s=n.current.getBoundingClientRect(),l=s.top,u=s.left,p=s.width,d=s.height,f=window.getComputedStyle(n.current),h=f.opacity,g=f.borderRadius;return a?{_type:"cover",x:-E()/2+u+p/2,y:-O()/2+l+d/2,opacity:Number(h)||1,scale:c?p/c:1,rotate:i-i%360,radius:C(g,{ref:p})}:{_type:"cover",x:0,y:-O(),opacity:0,scale:c?p/c:1,rotate:i-i%360,radius:C(g,{ref:p})}}return r?{_type:"cover",x:r.x?r.x-E()/2:0,y:r.y?r.y-O()/2:0,opacity:0,scale:0,rotate:0,radius:0}:{_type:"cover",x:0,y:0,opacity:0,scale:0,rotate:0,radius:0}},K=function(e,t){var o=e.radius,n=e.edge,r=e.rotate,i=t.current||{},a=i.naturalWidth,c=void 0===a?0:a,s=i.naturalHeight;return{_type:"browsing",x:0,y:0,opacity:1,scale:function(e,t,o){void 0===o&&(o=0);var n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,i=e+2*o>n?n/(e+2*o):1,a=t+2*o>r?r/(t+2*o):1;return Math.min(i,a)+.002}(c,void 0===s?0:s,n),rotate:r,radius:o}},Y=function(e,t,o){var n=void 0===o?{}:o,r=n.clientX,i=void 0===r?E()/2:r,a=n.clientY,c=void 0===a?O()/2:a,s=e.radius,l=e.edge,u=e.rotate,p=t.current||{},d=p.naturalWidth,f=void 0===d?0:d,h=p.naturalHeight,g=void 0===h?0:h,v=l||50,m=E(),y=O();return{_type:"zooming",x:f>m?(f-m)/2+v-i/m*(f-m+2*v):0,y:g>y?(g-y)/2+v-c/y*(g-y+2*v):0,opacity:1,scale:1,rotate:u,radius:s}},U=function(e){var t=0,o=0,n=1;switch(e){case"fade":n=0;break;case"crossFade":t=30,n=0;break;case"swipe":t=E()+10;break;case"zoom":o=.08,n=0}return{offset:t,overflow:o,opacity:n}};!function(e){e.BEGIN="BEGIN",e.MOVING="MOVING",e.END="END"}(A||(A={})),function(e){e.IDLE="IDLE",e.SWIPING="SWIPING",e.LIVING="LIVING"}(G||(G={}));var q,H=function(e){var t=this;this.getCurrentOffset=function(){return{x:t.current.origin.x-t.begin.origin.x,y:t.current.origin.y-t.begin.origin.y}},this.getCurrentDistance=function(){var e=t.getCurrentOffset();return{x:Math.abs(e.x),y:Math.abs(e.y)}},this.getTouchConfig=function(e){var o,n,r=void 0===e?{enableSwiping:!1,enableLiving:!1}:e,i=r.enableSwiping,a=r.enableLiving,c={x:0,y:0};if(t.phase===A.MOVING){var s=t.getCurrentOffset();t.behavior===G.SWIPING&&i?(c.x=s.x,o="none"):t.behavior===G.LIVING&&a&&(c.y=s.y,o="none")}return t.phase===A.END&&(void 0===(n=2)&&(n=1),o="transform "+V*n+"ms "+W+", opacity "+V*n+"ms "+W+", clip-path "+V*n+"ms "+W),{touch:c,transition:o}},this.update=function(e){if(t.phase=A.MOVING,t.current.origin=e.origin||{x:0,y:0},t.behavior!==G.IDLE){var o=t.getCurrentDistance();o.x>o.y?o.x>5&&(t.behavior=G.SWIPING):o.y>5&&(t.behavior=G.LIVING)}return t},this.end=function(){t.phase=A.END;var e=(new Date).getTime()-t.begin.time,o=t.getCurrentDistance();return(t.behavior===G.SWIPING&&o.x/e<.35&&o.x<120||t.behavior===G.LIVING&&o.y/e<.35&&o.y<80)&&(t.behavior=G.IDLE),t},this.updateCounter=0,this.phase=A.BEGIN,this.behavior=G.IDLE,this.begin={time:(new Date).getTime(),origin:(null==e?void 0:e.origin)||{x:0,y:0},offset:{x:0,y:0}},this.current={origin:(null==e?void 0:e.origin)||{x:0,y:0},offset:{x:0,y:0}}},X=(q=function(e,t){return(q=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}q(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),Q=function(){return(Q=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},J=function(o){function n(){var e,n=o.apply(this,arguments)||this;return n.imageRef=t().createRef(),n.initialPageOffset=window.pageYOffset,n.state={isFetching:!0,invalidate:!1,currentStyle:Z(n.context),animateConfig:U(null===(e=n.context.animate)||void 0===e?void 0:e.flip),touchProfile:new H,timestamp:{}},n.updateZoomEventListenerWithState=function(){var e=n.context,t=e.show,o=e.zoom;t&&o&&!n.listeningMouseMove?(window.addEventListener("mousemove",n.handleMouseMove),n.listeningMouseMove=!0):(window.removeEventListener("mousemove",n.handleMouseMove),n.listeningMouseMove=!1)},n.updateCurrentImageStyle=function(){var e=n.state.touchProfile,t=F(n.context,n.imageRef,e);n.setCurrentStyle(t)},n.debounceUpdateCurrentImageStyle=N(n.updateCurrentImageStyle,50),n.handleResize=function(){n.debounceUpdateCurrentImageStyle()},n.handleScroll=function(){if(n.imageRef.current){var e=n.context.show;n.imageRef.current.style.top="calc(50% + "+(e?0:n.initialPageOffset-window.pageYOffset)+"px)"}},n.handleClick=function(){var e=n.context,t=e.zoom,o=e.toggleZoom;t&&o()},n.handleTouchStart=function(e){var t=e.touches[0],o=t.clientX,r=t.clientY;n.setTouchProfile(new H({origin:{x:o,y:r}}))},n.handleTouchMove=function(e){var t=n.state.touchProfile,o=e.touches[0],r=o.clientX,i=o.clientY;n.setTouchProfile(t.update({origin:{x:r,y:i}}))},n.handleTouchEnd=function(){var e=n.state.touchProfile;n.setTouchProfile(e.end())},n.handleMouseMove=function(e){var t=Y(n.context,n.imageRef,e);n.setCurrentStyle(t)},n.handleImageLoadStart=function(){n.setState({isFetching:!0,invalidate:!1},n.handleDetectImageLoadComplete)},n.handleDetectImageLoadComplete=function(){clearInterval(n.imageLoadingTimer),n.imageLoadingTimer=P(n.imageRef.current,n.handleImageLoadEnd)},n.handleImageLoadEnd=function(e){var t=(void 0===e?{invalidate:!1}:e).invalidate;clearInterval(n.imageLoadingTimer),n.setState({isFetching:!1,invalidate:void 0===t?n.state.invalidate:t})},n.handleImageLoad=function(){n.debounceUpdateCurrentImageStyle()},n.handleImageError=function(){n.handleImageLoadEnd({invalidate:!0})},n.handleImageAbort=function(){n.handleImageLoadEnd({invalidate:!0})},n.handleImageReload=function(){var e=n.context.page;n.handleSetTimestamp(e)},n.handleSetTimestamp=function(e){var t,o=n.context.set,r=n.state.timestamp;n.setState({timestamp:Q(Q({},r),(t={},t[o[e].src]=(new Date).getTime(),t))})},n.handleGetTimestamp=function(e){var t=n.context.set;return n.state.timestamp[t[e].src]},n.setCurrentStyle=function(e){var t=n.context.animate,o=n.state.currentStyle;n.setState({currentStyle:"merge"===e._behavior?Q(Q({},o),e):e,animateConfig:U((t||{}).flip)})},n.setTouchProfile=function(e){e&&n.setState({touchProfile:e},(function(){var e=n.context,t=e.outBrowsing,o=e.toPrevPage,r=e.toNextPage,i=n.state.touchProfile;i.phase===A.END&&(i.behavior===G.SWIPING?i.getCurrentOffset().x<0?r():o():i.behavior===G.LIVING&&t())}))},n.getStyle=function(e,t,o){var r,i,a,c=n.context,s=c.set,l=c.zoom,u=c.page,p=n.state,d=p.invalidate,f=p.currentStyle,h=p.touchProfile,g=p.animateConfig,v=g.offset,m=g.overflow,y=g.opacity,w=h.getTouchConfig({enableSwiping:s.length>1,enableLiving:!0}),b=w.touch,E=w.transition;return o?(r="translate3d(-50%, -50%, 0) translate3d("+(1===t?(f.x||0)+b.x+v*e:(f.x||0)+v*e)+"px, "+f.y+"px, 0px) scale3d("+((f.scale||0)+m)+", "+((f.scale||0)+m)+", 1) rotate3d(0, 0, 1, 0deg)",i=10*t,a="none"):(r="translate3d(-50%, -50%, 0) translate3d("+((f.x||0)+b.x)+"px, "+(f.y+b.y)+"px, 0px) scale3d("+f.scale+", "+f.scale+", 1) rotate3d(0, 0, 1, "+f.rotate+"deg)",i=10,y=f.opacity||1),Q(Q(Q({},S({transform:r})),{cursor:l?"zoom-out":"initial",zIndex:i,opacity:d?0:y,transition:E,pointerEvents:a}),s[u].style)},n.buildImageSeries=function(e){var t=n.context,o=t.loop,r=void 0!==o&&o,i=t.set,a=t.page;return i.length>1?T(e).reduce((function(e,t){var o=R(a,i.length,t,{loop:r});if(L(o)){var c=n.buildImage({step:t,imageIndex:o});c&&e.push(c)}return e}),[]):n.buildImage({step:0,imageIndex:a})},n.buildImage=function(e){var o,r=void 0===e?{}:e,i=r.step,a=void 0===i?0:i,c=r.imageIndex,l=void 0===c?0:c,u=n.context,p=u.set,d=u.show,f=u.zoom,h=u.page,g=u.pageWithStep,v=n.state.invalidate,m=Math.abs(a),y=m>0,w=g+a,b=n.getStyle(a,m,y),E=s()(j,p[l].className,((o={}).zooming__2StSE=f,o.invalidate__lVCQH=v,o)),O={key:w+"-"+p[l].src,style:b,className:E,src:x(p[l].src,{t:n.handleGetTimestamp(h)}),alt:p[l].alt},_={id:"zmageImage",ref:n.imageRef,onLoad:n.handleImageLoad,onError:n.handleImageError,onAbort:n.handleImageAbort,onClick:n.handleClick};return y?d&&!f&&t().createElement("img",Q({},O)):t().createElement("img",Q({},O,_))},n}return X(n,o),n.prototype.componentDidMount=function(){var e=this,t=this.context,o=t.presetIsMobile,n=t.presetIsDesktop;window.addEventListener("resize",this.handleResize),o&&window.requestAnimationFrame((function(){window.addEventListener("touchstart",e.handleTouchStart),window.addEventListener("touchmove",e.handleTouchMove),window.addEventListener("touchend",e.handleTouchEnd)})),n&&window.requestAnimationFrame((function(){window.addEventListener("scroll",e.handleScroll)}))},n.prototype.componentDidUpdate=function(e){var t=e.show,o=e.zoom,n=e.rotate,r=e.page,i=this.props,a=i.show,c=i.zoom,s=i.rotate,l=i.page,u=this.context.presetIsMobile;t===a&&o===c&&n===s||(t?this.debounceUpdateCurrentImageStyle():(this.debounceUpdateCurrentImageStyle(),this.handleDetectImageLoadComplete(),u&&(_.documentOverflow=document.documentElement.style.overflow,_.bodyOverflow=document.body.style.overflow,_.bodyPosition=document.body.style.position,document.documentElement.style.overflow="hidden",document.body.style.overflow="hidden",document.body.style.position="relative")),this.updateZoomEventListenerWithState()),r!==l&&this.handleImageLoadStart()},n.prototype.componentWillUnmount=function(){var e=this.context,t=e.presetIsMobile,o=e.presetIsDesktop;t&&(window.removeEventListener("touchstart",this.handleTouchStart),window.removeEventListener("touchmove",this.handleTouchMove),window.removeEventListener("touchend",this.handleTouchEnd)),o&&window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize),window.removeEventListener("mousemove",this.handleMouseMove),clearInterval(this.imageLoadingTimer)},n.prototype.render=function(){var o=this.context,n=o.show,r=o.pageIsCover,i=this.state,a=i.isFetching,c=i.invalidate;return t().createElement(e.Fragment,null,t().createElement(D,{show:n&&(!r||c),load:a,invalidate:c,onReload:this.handleImageReload}),this.buildImageSeries(2))},n}(t().Component);const $=J;J.contextType=y;function ee(o){var n=o.show,r=o.zoom,i=(0,e.useContext)(y),a=i.backdrop,c=i.outBrowsing,s=i.toggleZoom,l=i.presetIsDesktop;return t().createElement("div",{id:"zmageBackground",className:"backgroundLayer__L59ju",onClick:r?s:c,style:{opacity:n?1:0,background:a||"",transitionDelay:l?n?".15s":"0s":n?"0s":".35s"}})}var te=function(){return(te=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},oe={src:"",alt:"",txt:"",set:[],defaultPage:0,preset:"",controller:{},hotKey:{},animate:{},hideOnScroll:!0,coverVisible:!1,backdrop:"#FFFFFF",zIndex:1e3,radius:0,edge:0,loop:!0,onBrowsing:function(){},onZooming:function(){},onSwitching:function(){},onRotating:function(){}},ne=!1,re=te(te({},oe),{controller:{pagination:!0,rotate:!0,zoom:!0,download:!1,close:!0,flip:!0},hotKey:{close:!0,zoom:!0,flip:!0},animate:{browsing:!0,flip:"fade"}}),ie=te(te({},oe),{controller:{pagination:!0,rotate:!1,zoom:!1,download:!1,close:!0,flip:!1},hotKey:{close:!1,zoom:!1,flip:!1},animate:{browsing:!0,flip:"swipe"}}),ae=function(e){switch(e){case"desktop":return re;case"mobile":return ie;case"auto":return ne||(console.warn("Zmage: The value 'auto' for the props 'preset' has been deprecated, replace with one of 'Desktop' or 'Mobile', the value 'auto' will be fallback to 'desktop'"),ne=!0),re;default:return re}},ce=function(e){var t=e.className,o=e.style,n=e.onClick,r=e.forwardedRef,i=e.coverRef,a=e.destructor,c=e.src,s=e.alt,l=e.txt,u=e.set,p=e.defaultPage,d=e.preset,f=e.controller,h=e.hotKey,g=e.animate,v=e.hideOnScroll,m=e.coverVisible,y=e.backdrop,w=e.zIndex,b=e.radius,E=e.edge,O=e.loop,_=e.onBrowsing,I=e.onZooming,P=e.onSwitching,x=e.onRotating,C=e.browsing,S=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o}(e,["className","style","onClick","forwardedRef","coverRef","destructor","src","alt","txt","set","defaultPage","preset","controller","hotKey","animate","hideOnScroll","coverVisible","backdrop","zIndex","radius","edge","loop","onBrowsing","onZooming","onSwitching","onRotating","browsing"]);return{coverProps:{className:t,style:o,onClick:n,forwardedRef:r,src:c,alt:s,txt:l},calleeProps:{coverRef:i,destructor:a},controlledProps:{browsing:C},configProps:{defaultPage:p,set:Array.isArray(u)&&u.length>0?u:[te({src:c,alt:s,txt:l},S)],preset:d,controller:f,hotKey:h,animate:g,hideOnScroll:v,coverVisible:m,backdrop:y,zIndex:w,radius:b,edge:E,loop:O,onBrowsing:_,onZooming:I,onSwitching:P,onRotating:x},restProps:S}},se=function(e,t,o){var n;return 0===o||(null===(n=null==e?void 0:e.current)||void 0===n?void 0:n.getAttribute("src"))===t[o].src},le=function(e,t,o){var n=function(e,t){return L(e)&&e<t.length-1?e:t.length-1}(t,o);return{page:n,pageIsCover:se(e,o,n)}},ue=function(e){(null==e?void 0:e.current)&&(e.current.style.visibility="visible")},pe=function(e){setTimeout((function(){(null==e?void 0:e.current)&&(e.current.style.visibility="hidden")}),100)},de=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),fe=function(){return(fe=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},he=function(e){function o(){var t,o,n,r,i,a,c=null!==e&&e.apply(this,arguments)||this;return c.state=(o=(t=c.props).coverRef,n=t.defaultPage,r=t.set,{mounted:!1,show:!1,zoom:!1,rotate:0,page:a=(i=le(o,n,r)).page,pageIsCover:i.pageIsCover,pageWithStep:a}),c.getPropsWithEnv=function(){var e=c.props,t=e.preset,o=e.controller,n=e.hotKey,r=e.animate,i=ae(t);return fe(fe({},c.props),{presetIsMobile:"mobile"===t,presetIsDesktop:"mobile"!==t,controller:fe(fe({},i.controller),"object"==typeof o?o:{}),hotKey:fe(fe({},i.hotKey),"object"==typeof n?n:{}),animate:fe(fe({},i.animate),"object"==typeof r?r:{})})},c.init=function(){var e=c.getPropsWithEnv(),t=e.isBrowsingControlled,o=e.coverRef,n=e.onBrowsing,r=e.hideOnScroll,i=e.coverVisible,a=e.presetIsDesktop,s=c.state,l=s.show,u=s.pageIsCover;l||(window.addEventListener("keydown",c.handleKeyDown),r&&window.addEventListener("scroll",c.handleScroll),window.requestAnimationFrame((function(){c.setState({show:!0,zoom:!1,rotate:0},(function(){a&&u&&!i&&pe(o),!t&&"function"==typeof n&&n(!0)}))})))},c.unInit=function(e){var t=(void 0===e?{force:!1}:e).force,o=c.getPropsWithEnv(),n=o.isBrowsingControlled,r=o.coverRef,i=o.onBrowsing,a=o.hideOnScroll,s=o.coverVisible,l=o.presetIsMobile,u=o.presetIsDesktop,p=c.state,d=p.show,f=p.pageIsCover;(d||t)&&(window.removeEventListener("keydown",c.handleKeyDown),a&&window.removeEventListener("scroll",c.handleScroll),!f&&!s&&ue(r),c.setState({show:!1,zoom:!1,rotate:0},(function(){return setTimeout((function(){c.setState({mounted:!1},(function(){l&&I(),u&&f&&!s&&ue(r),!n&&"function"==typeof i&&i(!1)}))}),u?340:690)})))},c.handleKeyDown=function(e){var t=c.getPropsWithEnv(),o=t.set,n=t.hotKey,r=t.loop,i=t.outBrowsing,a=c.state,s=a.zoom,l=a.page;switch(e.keyCode){case 27:e.preventDefault(),n.close&&(s?c.handleToggleZoom():i());break;case 32:e.preventDefault(),n.zoom&&c.handleToggleZoom();break;case 37:e.preventDefault(),(r||0!==l)&&!s&&n.flip&&c.handleToPrevPage();break;case 39:e.preventDefault(),(r||l!==o.length-1)&&!s&&n.flip&&c.handleToNextPage();break;default:return}},c.handleScroll=function(){var e=c.props.outBrowsing;c.state.show&&e()},c.handleToPage=function(e){var t=c.state.page;c.handleSwitchPages(e-t)()},c.handleSwitchPages=function(e){var t=c.props,o=t.coverRef,n=t.onSwitching,r=t.loop,i=void 0!==r&&r;return function(){var t=c.props.set;if(t.length>1){var r=c.state,a=r.page,s=r.pageWithStep,l=R(a,t.length,e,{loop:i});"number"==typeof l&&c.setState({page:l,pageIsCover:se(o,t,l),pageWithStep:s+e,zoom:!1,rotate:0},(function(){"function"==typeof n&&n(l)}))}}},c.handleToPrevPage=c.handleSwitchPages(-1),c.handleToNextPage=c.handleSwitchPages(1),c.handleToggleZoom=function(){var e=c.props.onZooming;c.setState({zoom:!c.state.zoom},(function(){"function"==typeof e&&e(c.state.zoom)}))},c.handleToggleRotate=function(e){var t=c.props.onRotating;switch(e){case"left":return function(){return c.setState({rotate:c.state.rotate-90},(function(){"function"==typeof t&&t(c.state.rotate)}))};case"right":return function(){return c.setState({rotate:c.state.rotate+90},(function(){"function"==typeof t&&t(c.state.rotate)}))};default:return function(){return c.setState({rotate:0},(function(){"function"==typeof t&&t(0)}))}}},c}return de(o,e),o.prototype.componentDidMount=function(){this.props.browsing&&this.init()},o.getDerivedStateFromProps=function(e,t){return e.browsing?fe({mounted:!0},t.show?{}:le(e.coverRef,e.defaultPage,e.set)):null},o.prototype.componentDidUpdate=function(e){e.browsing!==this.props.browsing&&(this.props.browsing?this.init():this.unInit())},o.prototype.componentWillUnmount=function(){this.unInit({force:!0})},o.prototype.render=function(){var e=this.getPropsWithEnv(),o=e.coverRef,n=e.coverPos,r=e.outBrowsing,i=e.set,c=e.preset,s=e.presetIsMobile,l=e.presetIsDesktop,u=e.controller,p=e.hotKey,d=e.animate,f=e.hideOnScroll,h=e.coverVisible,g=e.backdrop,v=e.zIndex,m=e.radius,w=e.edge,b=e.loop,E=this.state.mounted,O=fe({},this.state),_=fe(fe({coverRef:o,coverPos:n,outBrowsing:r,set:i,preset:c,presetIsMobile:s,presetIsDesktop:l,controller:u,hotKey:p,animate:d,hideOnScroll:f,coverVisible:h,backdrop:g,radius:m,edge:w,loop:b},O),{toPage:this.handleToPage,toPrevPage:this.handleToPrevPage,toNextPage:this.handleToNextPage,toggleZoom:this.handleToggleZoom,toggleRotate:this.handleToggleRotate});return t().createElement(y.Provider,{value:_},E&&t().createElement(a,{id:"zmage",zIndex:v,className:"wrapperLayer__25Osd"},t().createElement(ee,fe({},O)),t().createElement(B,null),t().createElement($,fe({},O))))},o.defaultProps={isBrowsingControlled:!1,browsing:!1,coverRef:t().createRef(),outBrowsing:function(){},defaultPage:0,set:[]},o}(t().Component);const ge=he;he.contextType=y;var ve=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),me=function(){return(me=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},ye=new k,we=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.showPosition=ye.currentPosition,t.state={browsing:!1},t.inBrowsing=function(){requestAnimationFrame((function(){t.setState({browsing:!0})}))},t.outBrowsing=function(){var e=t.props.destructor;t.setState({browsing:!1},(function(){e&&setTimeout(e,V)}))},t}return ve(o,e),o.prototype.componentDidMount=function(){this.inBrowsing()},o.prototype.render=function(){var e=ce(this.props),o=e.calleeProps,n=e.configProps,r=this.state.browsing;return r&&(this.showPosition=ye.currentPosition),t().createElement(ge,me({browsing:r,coverRef:o.coverRef,coverPos:this.showPosition,outBrowsing:this.outBrowsing},n))},o.defaultProps=oe,o}(t().Component),be={REF:t().createRef(),CONTAINER:void 0,PORTAL:void 0};const Ee=function(e){var o,r=e.coverRef,i=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o}(e,["coverRef"]);return be.PORTAL=document.createElement("div"),be.PORTAL.id="zmagePortal",be.CONTAINER=document.body,be.CONTAINER.appendChild(be.PORTAL),n().render(t().createElement(we,me({ref:be.REF,coverRef:r,destructor:function(){return be.CONTAINER.removeChild(be.PORTAL)}},i)),be.PORTAL),null===(o=be.REF.current)||void 0===o?void 0:o.outBrowsing};var Oe=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),_e=function(){return(_e=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},Ie=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}return o};const Pe=function(e){function o(){var o=null!==e&&e.apply(this,arguments)||this;return o.wrapperRef=t().createRef(),o.tryAttachBrowserToImage=function(){var e=o.props,t=(e.children,Ie(e,["children"]));o.wrapperRef.current&&o.wrapperRef.current.querySelectorAll("img").forEach((function(e){!e.getAttribute("zmage")&&e.getAttribute("src")&&(e.setAttribute("zmage",String(Date.now())),e.style.cursor="zoom-in",e.addEventListener("click",(function(){return Ee(_e({coverRef:{current:e}},t))})))}))},o}return Oe(o,e),o.prototype.componentDidMount=function(){this.tryAttachBrowserToImage()},o.prototype.componentDidUpdate=function(){this.tryAttachBrowserToImage()},o.prototype.render=function(){var e=this.props.children;return t().createElement("div",{ref:this.wrapperRef},e)},o.defaultProps=oe,o}(t().Component);var xe=function(){var e=function(t,o){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),Ce=function(){return(Ce=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},Se=function(o){function n(){var e=null!==o&&o.apply(this,arguments)||this;return e.coverRef={current:null},e.isBrowsingControlled="browsing"in e.props,e.state={browsing:!1},e.inBrowsing=function(){var t,o;e.isBrowsingControlled?null===(o=(t=e.props).onBrowsing)||void 0===o||o.call(t,!0):e.setState({browsing:!0})},e.outBrowsing=function(){var t,o;e.isBrowsingControlled?null===(o=(t=e.props).onBrowsing)||void 0===o||o.call(t,!1):e.setState({browsing:!1})},e}return xe(n,o),n.prototype.render=function(){var o=this,n=ce(this.props),r=n.coverProps,i=n.controlledProps,a=n.configProps,c=n.restProps,s=this.state.browsing;return t().createElement(e.Fragment,null,t().createElement("img",Ce({className:r.className,style:Ce({cursor:"zoom-in"},r.style),src:r.src,alt:r.alt,onClick:function(e){o.inBrowsing(),"function"==typeof r.onClick&&r.onClick(e)},ref:function(e){"function"==typeof r.forwardedRef?r.forwardedRef(e):r.forwardedRef&&"object"==typeof r.forwardedRef&&(r.forwardedRef.current=e),o.coverRef&&(o.coverRef.current=e)}},c)),t().createElement(ge,Ce({isBrowsingControlled:this.isBrowsingControlled,browsing:this.isBrowsingControlled?i.browsing:s,coverRef:this.coverRef,outBrowsing:this.outBrowsing},a)))},n.defaultProps=oe,n.browsing=Ee,n.Browsing=Ee,n.wrapper=Pe,n.Wrapper=Pe,n}(t().Component),Le=t().forwardRef((function(e,o){return t().createElement(Se,Ce({},e,{forwardedRef:o}))}));Le.browsing=Ee,Le.Browsing=Ee,Le.wrapper=Pe,Le.Wrapper=Pe;const Re=Le})(),i})()}));