text: module.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([function(e,t){e.exports=require("react")},function(e,t){e.exports=require("prop-types")},function(e,t,n){e.exports={baseButton:"baseButton__2AV5J",controls:"controls__NTVNu",show:"show__2Pu4e",pinButton:"pinButton__pLhHH",rotate:"rotate__18SVA",rotateLeft:"rotateLeft__1y4kO",rotateRight:"rotateRight__1GeTD",download:"download__TnaVI",zoom:"zoom__1W2_u",close:"close__h79Tx",sideButton:"sideButton__25vo1",flipLeft:"flipLeft__fhip_",flipRight:"flipRight__2T92B",pages:"pages__2jlej",mobile:"mobile__3HB5p",dot:"dot__p50eg",blackDot:"blackDot__TTF7k",whiteDot:"whiteDot__3iAb5"}},function(e,t){e.exports=require("classnames")},function(e,t,n){e.exports={loadingContainer:"loadingContainer__33QBo",show:"show__1Bu8R",reload:"reload__3KDuO",loading:"loading__3UcNS",spin:"spin__2VDbe",fadeIn:"fadeIn__3TpcC",fadeOut:"fadeOut__9PHOR"}},function(e,t){e.exports=require("react-dom")},function(e,t,n){e.exports={imageLayer:"imageLayer__1NyU2",zooming:"zooming__3TFmo",invalidate:"invalidate__1wygJ"}},function(e,t){e.exports=require("lodash.memoize")},function(e,t,n){e.exports={wrapperLayer:"wrapperLayer__z_PKn"}},function(e,t,n){e.exports={backgroundLayer:"backgroundLayer__36t43"}},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),i=n(5),a=n.n(i),c=n(8),u=n.n(c),l=n(1),s=n.n(l);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.set,n=e.src,o=e.alt,r=e.txt,i=e.restProps;return Array.isArray(t)&&t.length>0?t:[p({src:n,alt:o,txt:r},i)]};function h(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v={src:s.a.string,alt:s.a.string,txt:s.a.string,set:s.a.oneOfType([s.a.arrayOf(s.a.shape({src:s.a.string,alt:s.a.string,text:s.a.string})),s.a.shape({src:s.a.string,alt:s.a.string,text:s.a.string})]),defaultPage:s.a.number,preset:s.a.oneOf(["","desktop","mobile"]),controller:s.a.oneOfType([s.a.bool,s.a.shape({pagination:s.a.bool,rotate:s.a.bool,zoom:s.a.bool,download:s.a.bool,close:s.a.bool,flip:s.a.bool})]),hotKey:s.a.oneOfType([s.a.bool,s.a.shape({close:s.a.bool,zoom:s.a.bool,flip:s.a.bool})]),animate:s.a.shape({browsing:s.a.bool,flip:s.a.oneOf(["fade","crossFade","swipe","zoom"])}),hideOnScroll:s.a.bool,coverVisible:s.a.bool,backdrop:s.a.string,zIndex:s.a.number,radius:s.a.number,edge:s.a.number,loop:s.a.bool,onBrowsing:s.a.func,onZooming:s.a.func,onSwitching:s.a.func,onRotating:s.a.func,browsing:s.a.bool},w={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(){}},O={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"}},P=!1,j=m({},w,{},{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"}}),_=m({},w,{},O),S=function(e){switch(e){case"desktop":return j;case"mobile":return _;case"auto":return P||(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'"),P=!0),j;default:return j}},E=function(e){var t=e.className,n=e.style,o=e.onClick,r=e.forwardedRef,i=e.coverRef,a=e.destroyer,c=e.src,u=e.alt,l=e.txt,s=e.set,f=e.defaultPage,p=e.preset,y=e.controller,d=e.hotKey,m=e.animate,g=e.hideOnScroll,v=e.coverVisible,w=e.backdrop,O=e.zIndex,P=e.radius,j=e.edge,_=e.loop,S=e.onBrowsing,E=e.onZooming,x=e.onSwitching,k=e.onRotating,C=e.browsing,I=h(e,["className","style","onClick","forwardedRef","coverRef","destroyer","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:n,onClick:o,forwardedRef:r,src:c,alt:u,txt:l},calleeProps:{coverRef:i,destroyer:a},stateProps:{controlledBrowsing:C},configProps:{defaultPage:f,set:b({set:s,src:c,alt:u,txt:l}),preset:p,controller:y,hotKey:d,animate:m,hideOnScroll:g,coverVisible:v,backdrop:w,zIndex:O,radius:P,edge:j,loop:_,onBrowsing:S,onZooming:E,onSwitching:x,onRotating:k},restProps:I}};function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function C(e,t){return!t||"object"!==x(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var R=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=C(this,I(t).call(this,e))).target=e.target||document.body,n.container=document.createElement("figure"),n.container.id=e.id,n.container.className=e.className,n.container.style.zIndex=e.zIndex,n.target.appendChild(n.container),n}var n,o,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(t,e),n=t,(o=[{key:"componentWillUnmount",value:function(){this.target.removeChild(this.container)}},{key:"render",value:function(){var e=this.props.children;return a.a.createPortal(e,this.container)}}])&&k(n.prototype,o),r&&k(n,r),t}(r.a.PureComponent);R.defaultProps={zIndex:w.zIndex},R.propTypes={id:s.a.string,className:s.a.string,zIndex:v.zIndex};var z=n(3),L=n.n(z),D=n(2),N=n.n(D);function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function V(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var F=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),V(this,A(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){return r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},r.a.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"}))}}])&&B(n.prototype,o),i&&B(n,i),t}(r.a.PureComponent);function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function K(e,t){return!t||"object"!==G(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var U=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),K(this,H(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){return r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},r.a.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"}))}}])&&Z(n.prototype,o),i&&Z(n,i),t}(r.a.PureComponent);function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function J(e,t){return!t||"object"!==Y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ee=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),J(this,Q(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){return r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),r.a.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"}))}}])&&X(n.prototype,o),i&&X(n,i),t}(r.a.PureComponent);function te(e){return(te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ne(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function oe(e,t){return!t||"object"!==te(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function re(e){return(re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ae=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),oe(this,re(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ie(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){return r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),r.a.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"}))}}])&&ne(n.prototype,o),i&&ne(n,i),t}(r.a.PureComponent);function ce(e){return(ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function le(e,t){return!t||"object"!==ce(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function fe(e,t){return(fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var pe=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),le(this,se(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fe(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){return r.a.createElement("svg",{xmlns:"http://www.w3.org/1999/xlink",width:"24",height:"24",viewBox:"0 0 200 200",preserveAspectRatio:"xMinYMin meet"},r.a.createElement("defs",null,r.a.createElement("linearGradient",{id:"spinner-1552570621916",x1:"0%",y1:"0%",x2:"65%",y2:"0%"},r.a.createElement("stop",{offset:"0%",className:"Spinner-blue-3_W"}),r.a.createElement("stop",{offset:"100%",stopOpacity:"0"}))),r.a.createElement("circle",{cx:"100",cy:"100",r:"90",fill:"transparent",stroke:"url(#spinner-1552570621916)",strokeWidth:"20"}))}}])&&ue(n.prototype,o),i&&ue(n,i),t}(r.a.PureComponent);function ye(e){return(ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function be(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function he(e,t){return!t||"object"!==ye(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function de(e){return(de=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function me(e,t){return(me=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ge=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),he(this,de(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&me(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){return r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),r.a.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"}))}}])&&be(n.prototype,o),i&&be(n,i),t}(r.a.PureComponent);function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function we(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Oe(e,t){return!t||"object"!==ve(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function je(e,t){return(je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _e=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Oe(this,Pe(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&je(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){return r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),r.a.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"}))}}])&&we(n.prototype,o),i&&we(n,i),t}(r.a.PureComponent);function Se(e){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ee(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function xe(e,t){return!t||"object"!==Se(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ce(e,t){return(Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ie=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),xe(this,ke(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ce(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){return r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),r.a.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"}))}}])&&Ee(n.prototype,o),i&&Ee(n,i),t}(r.a.PureComponent);function Te(e){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Re(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ze(e,t){return!t||"object"!==Te(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Le(e){return(Le=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function De(e,t){return(De=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ne=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),ze(this,Le(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&De(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){return r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},r.a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),r.a.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"}))}}])&&Re(n.prototype,o),i&&Re(n,i),t}(r.a.PureComponent),Me=Object(o.createContext)(),Be=n(7),Ve=n.n(Be);function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){Fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ge=function(){return document.body.scrollWidth},Ze=function(){return document.documentElement.clientWidth},Ke=function(){return window.innerHeight},He=function(){return document.documentElement.clientHeight},qe={html:{},body:{}},Ue=function(){document.documentElement.style.overflow=qe.html.overflow,document.body.style.overflow=qe.body.overflow,document.body.style.position=qe.body.position},Ye=function(e,t){var n;return n=setInterval((function(){e&&!e.complete||(clearInterval(n),t&&t())}),500)},Xe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.keys(t).reduce((function(e,n){return t[n]?e.concat("".concat(n,"=").concat(t[n])):e}),[]).join("&");return n?"".concat(e).concat(e.includes("?")?"&":"?").concat(n):e},Je=Ve()((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.ref,o=void 0===n?100:n;return e?e.includes("%")?o*Number(e.substring(0,e.length-1))/100:Number(e.substring(0,e.length-2)):e})),Qe=Ve()((function(e){var t=["Webkit","Moz","Ms","O"];return Object.keys(e).reduce((function(n,o){var r=t.reduce((function(t,n){return We({},t,Fe({},"".concat(n).concat((r=o).charAt(0).toUpperCase()+r.slice(1)),e[o]));var r}),{});return We({},n,{},r)}),e)})),$e=function(e){return(0^e)===e},et=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{loop:!0};return 0===t?0:0===n?e:e<0||e>t-1?void 0:o.loop?Math.abs(t+n+e)%t:e+n<0||e+n>t-1?void 0:e+n},tt={0:[0],1:[-1,0,1],2:[-2,-1,0,1,2],3:[-3,-2,-1,0,1,2,3]},nt=function(e){return tt[e]};function ot(e){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function it(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function at(e,t){return!t||"object"!==ot(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ct(e){return(ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ut(e,t){return(ut=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var lt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),at(this,ct(t).apply(this,arguments))}var n,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ut(e,t)}(t,e),n=t,(i=[{key:"render",value:function(){var e,t=this,n=this.context,i=n.set,a=(n.preset,n.presetIsMobile),c=(n.presetIsDesktop,n.controller),u=n.backdrop,l=n.loop,s=n.show,f=n.zoom,p=n.page,y=n.outBrowsing,b=n.toPage,h=n.toPrevPage,d=n.toNextPage,m=n.toggleZoom,g=n.toggleRotate;return r.a.createElement(o.Fragment,null,r.a.createElement("div",{id:"zmageControl",className:L()(N.a.controls,rt({},N.a.show,!f&&s)),style:{backgroundColor:u}},c.rotate&&r.a.createElement("div",{id:"zmageControlRotateLeft",className:L()(N.a.rotateLeft,rt({},N.a.show,!f&&s)),onClick:g("left")},r.a.createElement(_e,null)),c.rotate&&r.a.createElement("div",{id:"zmageControlRotateRight",className:L()(N.a.rotateRight,rt({},N.a.show,!f&&s)),onClick:g("right")},r.a.createElement(Ie,null)),c.download&&r.a.createElement("div",{id:"zmageControlDownload",className:L()(N.a.download,rt({},N.a.show,!f&&s)),onClick:function(){return e=t.context.set[t.context.page].src,(o=document.createElement("a")).href=e,o.download=n||e.split("/")[e.split("/").length-1],document.body.appendChild(o),o.click(),void document.body.removeChild(o);var e,n,o}},r.a.createElement(ae,null)),c.zoom&&r.a.createElement("div",{id:"zmageControlZoom",className:L()(N.a.zoom,rt({},N.a.show,!f&&s)),onClick:a?function(){return window.open(i[p].src)}:m},r.a.createElement(Ne,null)),c.close&&r.a.createElement("div",{id:"zmageControlClose",className:L()(N.a.close,rt({},N.a.show,!f&&s)),onClick:f?m:y},r.a.createElement(ee,null))),Array.isArray(i)&&i.length>1&&c.flip&&r.a.createElement(o.Fragment,null,(l||0!==p)&&r.a.createElement("div",{id:"zmageControlFlipLeft",className:L()(N.a.flipLeft,rt({},N.a.show,!f&&s)),style:{backgroundColor:u},onClick:h},r.a.createElement(F,null)),(l||p!==i.length-1)&&r.a.createElement("div",{id:"zmageControlFlipRight",className:L()(N.a.flipRight,rt({},N.a.show,!f&&s)),style:{backgroundColor:u},onClick:d},r.a.createElement(U,null))),Array.isArray(i)&&i.length>1&&c.pagination&&r.a.createElement("div",{id:"zmageControlPagination",className:L()(N.a.pages,(e={},rt(e,N.a.show,!f&&s),rt(e,N.a.mobile,a),e)),style:{backgroundColor:u}},i.map((function(e,t){return t===p?r.a.createElement("span",{key:t,id:"zmageControlPaginationActive",className:N.a.blackDot}):r.a.createElement("span",{key:t,className:N.a.whiteDot,onClick:function(){return b(t)}})}))))}}])&&it(n.prototype,i),a&&it(n,a),t}(r.a.PureComponent);lt.contextType=Me;var st=n(6),ft=n.n(st),pt=n(4),yt=n.n(pt);function bt(e){return(bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ht(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function dt(e,t){return!t||"object"!==bt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gt(e,t){return(gt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var vt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),dt(this,mt(t).apply(this,arguments))}var n,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gt(e,t)}(t,e),n=t,(i=[{key:"render",value:function(){var e,t,n,i=this.props,a=i.show,c=i.load,u=i.invalidate,l=i.onReload,s=i.backdrop;return r.a.createElement(o.Fragment,null,(c||u)&&r.a.createElement("div",{id:"zmageLoading",className:L()(yt.a.loadingContainer,(e={},t=yt.a.show,n=a,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e))},c&&r.a.createElement("div",{className:yt.a.loading},r.a.createElement(pe,null)),u&&r.a.createElement("button",{className:yt.a.reload,onClick:l,style:{background:s}},r.a.createElement(ge,null))))}}])&&ht(n.prototype,i),a&&ht(n,a),t}(r.a.PureComponent);vt.contextType=Me;var wt="cubic-bezier(0.60, 0.0, 0.10, 1.0)",Ot=350,Pt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return"transform ".concat(Ot*e,"ms ").concat(wt,", opacity ").concat(Ot*e,"ms ").concat(wt,", clip-path ").concat(Ot*e,"ms ").concat(wt)},jt=function(e,t,n,o){var r=e.show,i=t.zoom;return r?i?Et(e,t,n):St(e,t,n):_t(e,t,n,o)},_t=function(e,t,n,o){var r=t.coverRef,i=t.coverPos,a=t.rotate,c=t.pageIsCover;if(o&&o.phase===It.END)return{_type:"cover",_behavior:"merge",y:o.getCurrentOffset().y>0?Ke():-Ke()};if(r.current){var u=r.current.naturalWidth,l=r.current.getBoundingClientRect(),s=l.top,f=l.left,p=l.width,y=l.height,b=window.getComputedStyle(r.current),h=b.opacity,d=b.borderRadius;return c?{_type:"cover",x:-Ge()/2+f+p/2,y:-Ke()/2+s+y/2,opacity:Number(h)||1,scale:u?p/u:1,rotate:a-a%360,radius:Je(d,{ref:p})}:{_type:"cover",x:0,y:-Ke(),opacity:0,scale:u?p/u:1,rotate:a-a%360,radius:Je(d,{ref:p})}}return i?{_type:"cover",x:i.x?i.x-Ge()/2:0,y:i.y?i.y-Ke()/2:0,opacity:0,scale:0,rotate:0,radius:0}:{_type:"cover",x:0,y:0,opacity:0,scale:0,rotate:0,radius:0}},St=function(e,t,n){var o=t.radius,r=t.edge,i=t.rotate,a=n.current;return{_type:"browsing",x:0,y:0,opacity:1,scale:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=Ze(),r=He(),i=e+2*n,a=t+2*n,c=i>o?o/(e+2*n):1,u=a>r?r/(t+2*n):1;return Math.min(c,u)+.002}(a.naturalWidth,a.naturalHeight,r),rotate:i,radius:o}},Et=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=o.clientX,i=void 0===r?Ge()/2:r,a=o.clientY,c=void 0===a?Ke()/2:a,u=t.radius,l=t.edge,s=t.rotate,f=n.current,p=f.naturalWidth,y=f.naturalHeight,b=l||50,h=Ge(),d=Ke(),m=p-h+2*b,g=y-d+2*b,v=p>h?(p-h)/2+b-m*(i/h):0,w=y>d?(y-d)/2+b-g*(c/d):0;return{_type:"zooming",x:v,y:w,opacity:1,scale:1,rotate:s,radius:u}},xt=function(e){var t=0,n=0,o=1;switch(e){case"fade":o=0;break;case"crossFade":t=30,o=0;break;case"swipe":t=Ge()+10;break;case"zoom":n=.08,o=0}return{offset:t,overflow:n,opacity:o}},kt=120,Ct=80,It={BEGIN:"BEGIN",MOVING:"MOVING",END:"END"},Tt={SWIPING:"SWIPING",LIVING:"LIVING"},Rt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.origin;return{updateCounter:0,phase:It.BEGIN,behavior:void 0,begin:{time:(new Date).getTime(),origin:t||{x:0,y:0},offset:{x:0,y:0}},current:{origin:t||{x:0,y:0},offset:{x:0,y:0}},getCurrentOffset:function(){return{x:this.current.origin.x-this.begin.origin.x,y:this.current.origin.y-this.begin.origin.y}},getCurrentDistance:function(){var e=this.getCurrentOffset();return{x:Math.abs(e.x),y:Math.abs(e.y)}},update:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.origin;if(this.phase=It.MOVING,this.current.origin=t,!this.behavior){var n=this.getCurrentDistance();n.x>n.y?n.x>5&&(this.behavior=Tt.SWIPING):n.y>5&&(this.behavior=Tt.LIVING)}return this},end:function(){this.phase=It.END;var e=(new Date).getTime()-this.begin.time,t=this.getCurrentDistance();return(this.behavior===Tt.SWIPING&&t.x/e<.35&&t.x<kt||this.behavior===Tt.LIVING&&t.y/e<.35&&t.y<Ct)&&(this.behavior=void 0),this}}},zt=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.enableSwiping,r=n.enableLiving,i={x:0,y:0};if(e&&e.phase===It.MOVING){var a=e.getCurrentOffset();e.behavior===Tt.SWIPING&&o?(i.x=a.x,t="none"):e.behavior===Tt.LIVING&&r&&(i.y=a.y,t="none")}return e&&e.phase===It.END&&(t=Pt(2)),{touch:i,transition:t}};function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dt(){return(Dt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(n),!0).forEach((function(t){Ft(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Vt(e){return(Vt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function At(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wt(e,t){return(Wt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gt=function(e){function t(e,n){var o,i,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,a=Vt(t).call(this,e),o=!a||"object"!==Lt(a)&&"function"!=typeof a?At(i):a,Ft(At(o),"updateZoomEventListenerWithState",(function(){var e=o.context,t=e.show,n=e.zoom;t&&n&&!o.listeningMouseMove?(window.addEventListener("mousemove",o.handleMouseMove),o.listeningMouseMove=!0):(window.removeEventListener("mousemove",o.handleMouseMove),o.listeningMouseMove=!1)})),Ft(At(o),"updateCurrentImageStyle",(function(){var e=o.state.touchProfile,t=jt(o.props,o.context,o.imageRef,e);o.setCurrentStyle(t)})),Ft(At(o),"handleResize",(function(){o.updateCurrentImageStyle()})),Ft(At(o),"handleScroll",(function(){if(o.imageRef.current){var e=o.context.show;o.imageRef.current.style.top="calc(50% + ".concat(e?0:o.initialPageOffset-window.pageYOffset,"px)")}})),Ft(At(o),"handleClick",(function(){var e=o.context,t=e.zoom,n=e.toggleZoom;t&&n()})),Ft(At(o),"handleTouchStart",(function(e){var t=e.touches[0],n=t.clientX,r=t.clientY;o.setTouchProfile(new Rt({origin:{x:n,y:r}}))})),Ft(At(o),"handleTouchMove",(function(e){var t=o.state.touchProfile,n=e.touches[0],r=n.clientX,i=n.clientY;o.setTouchProfile(t.update({origin:{x:r,y:i}}))})),Ft(At(o),"handleTouchEnd",(function(e){var t=o.state.touchProfile;o.setTouchProfile(t.end())})),Ft(At(o),"handleMouseMove",(function(e){var t=Et(o.props,o.context,o.imageRef,e);o.setCurrentStyle(t)})),Ft(At(o),"handleImageLoadStart",(function(){o.setState({isFetching:!0,invalidate:!1},o.handleDetectImageLoadComplete)})),Ft(At(o),"handleDetectImageLoadComplete",(function(){clearInterval(o.imageLoadingTimer),o.imageLoadingTimer=Ye(o.imageRef.current,o.handleImageLoadEnd)})),Ft(At(o),"handleImageLoadEnd",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.invalidate;clearInterval(o.imageLoadingTimer),o.setState({isFetching:!1,invalidate:void 0===t?o.state.invalidate:t})})),Ft(At(o),"handleImageLoad",(function(){o.updateCurrentImageStyle()})),Ft(At(o),"handleImageError",(function(){o.handleImageLoadEnd({invalidate:!0})})),Ft(At(o),"handleImageAbort",(function(){o.handleImageLoadEnd({invalidate:!0})})),Ft(At(o),"handleImageReload",(function(){var e=o.context.page;o.handleSetTimestamp(e)})),Ft(At(o),"handleSetTimestamp",(function(e){var t=o.context.set,n=o.state.timestamp;o.setState({timestamp:Mt({},n,Ft({},t[e].src,(new Date).getTime()))})})),Ft(At(o),"handleGetTimestamp",(function(e){var t=o.context.set;return o.state.timestamp[t[e].src]})),Ft(At(o),"setCurrentStyle",(function(e){var t=o.context.animate,n=o.state.currentStyle;o.setState({currentStyle:"merge"===e._behavior?Mt({},n,{},e):e,animateConfig:xt(t.flip)})})),Ft(At(o),"setTouchProfile",(function(e){e&&o.setState({touchProfile:Mt({},e)},(function(){var e=o.context,t=e.outBrowsing,n=e.toPrevPage,r=e.toNextPage,i=o.state.touchProfile;i.phase===It.END&&(i.behavior===Tt.SWIPING?i.getCurrentOffset().x<0?r():n():i.behavior===Tt.LIVING&&t())}))})),Ft(At(o),"getStyle",(function(e,t,n){var r,i,a,c=o.context,u=c.set,l=c.zoom,s=c.page,f=o.state,p=f.invalidate,y=f.currentStyle,b=f.touchProfile,h=f.animateConfig,d=h.offset,m=h.overflow,g=h.opacity,v=zt(b,{enableSwiping:u.length>1,enableLiving:!0}),w=v.touch,O=v.transition;if(n){var P=1===t?y.x+w.x+d*e:y.x+d*e,j=y.y;r="translate3d(-50%, -50%, 0) translate3d(".concat(P,"px, ").concat(j,"px, 0px) scale3d(").concat(y.scale+m,", ").concat(y.scale+m,", 1) rotate3d(0, 0, 1, 0deg)"),i=10*t,a="none"}else{var _=y.x+w.x,S=y.y+w.y;r="translate3d(-50%, -50%, 0) translate3d(".concat(_,"px, ").concat(S,"px, 0px) scale3d(").concat(y.scale,", ").concat(y.scale,", 1) rotate3d(0, 0, 1, ").concat(y.rotate,"deg)"),g=y.opacity,i=10}return Mt({},Qe({transform:r}),{cursor:l?"zoom-out":"initial",zIndex:i,opacity:p?0:g,pointerEvents:a,transition:O},u[s].style)})),Ft(At(o),"buildImageSeries",(function(e){var t=o.context,n=t.loop,r=t.set,i=t.page;return r.length>1?nt(e).reduce((function(e,t){var a=et(i,r.length,t,{loop:n});return $e(a)&&e.push(o.buildImage({step:t,imageIndex:a})),e}),[]):o.buildImage({step:0,imageIndex:i})})),Ft(At(o),"buildImage",(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.step,i=t.imageIndex,a=o.context,c=a.set,u=a.show,l=a.zoom,s=a.page,f=a.pageWithStep,p=o.state.invalidate,y=Math.abs(n),b=y>0,h=f+n,d=o.getStyle(n,y,b),m=L()(ft.a.imageLayer,c[i].className,(Ft(e={},ft.a.zooming,l),Ft(e,ft.a.invalidate,p),e)),g={key:"".concat(h,"-").concat(c[i].src),style:d,className:m,src:Xe(c[i].src,{t:o.handleGetTimestamp(s)}),alt:c[i].alt},v={id:"zmageImage",ref:o.imageRef,onLoad:o.handleImageLoad,onError:o.handleImageError,onAbort:o.handleImageAbort,onClick:o.handleClick};if(b){var w=u&&!l;return w&&r.a.createElement("img",g)}return r.a.createElement("img",Dt({},g,v))})),o.imageRef=r.a.createRef(),o.initialPageOffset=window.pageYOffset,o.listeningMouseMove=!1,o.imageLoadingTimer=null,o.state={isFetching:!0,invalidate:!1,currentStyle:_t(e,n),animateConfig:xt(n.animate.flip),touchProfile:new Rt,timestamp:{}},o}var n,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wt(e,t)}(t,e),n=t,(i=[{key:"componentDidMount",value:function(){var e=this,t=this.context,n=t.presetIsMobile,o=t.presetIsDesktop;window.addEventListener("resize",this.handleResize),n&&window.requestAnimationFrame((function(){window.addEventListener("touchstart",e.handleTouchStart),window.addEventListener("touchmove",e.handleTouchMove),window.addEventListener("touchend",e.handleTouchEnd)})),o&&window.requestAnimationFrame((function(){window.addEventListener("scroll",e.handleScroll)}))}},{key:"componentDidUpdate",value:function(e){var t=e.show,n=e.zoom,o=e.rotate,r=e.page,i=this.props,a=i.show,c=i.zoom,u=i.rotate,l=i.page,s=this.context.presetIsMobile;t===a&&n===c&&o===u||(t?this.updateCurrentImageStyle():(this.updateCurrentImageStyle(),this.handleDetectImageLoadComplete(),s&&(qe.html.overflow=document.documentElement.style.overflow,qe.body.overflow=document.body.style.overflow,qe.body.position=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()}},{key:"componentWillUnmount",value:function(){var e=this.context,t=e.presetIsMobile,n=e.presetIsDesktop;t&&(window.removeEventListener("touchstart",this.handleTouchStart),window.removeEventListener("touchmove",this.handleTouchMove),window.removeEventListener("touchend",this.handleTouchEnd)),n&&window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize),window.removeEventListener("mousemove",this.handleMouseMove),clearInterval(this.imageLoadingTimer)}},{key:"render",value:function(){var e=this.context,t=(e.set,e.show),n=(e.zoom,e.page,e.pageIsCover),i=(e.pageWithStep,this.state),a=i.isFetching,c=i.invalidate;return r.a.createElement(o.Fragment,null,r.a.createElement(vt,{show:t&&(!n||c),load:a,invalidate:c,onReload:this.handleImageReload}),this.buildImageSeries(2))}}])&&Bt(n.prototype,i),a&&Bt(n,a),t}(r.a.PureComponent);Gt.contextType=Me;var Zt=n(9),Kt=n.n(Zt);function Ht(e){return(Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ut(e,t){return!t||"object"!==Ht(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yt(e){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Xt(e,t){return(Xt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Jt=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ut(this,Yt(t).apply(this,arguments))}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xt(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){var e=this.props,t=e.show,n=e.zoom,o=this.context,i=o.backdrop,a=o.outBrowsing,c=o.toggleZoom,u=o.presetIsDesktop;return r.a.createElement("div",{id:"zmageBackground",className:Kt.a.backgroundLayer,onClick:n?c:a,style:{opacity:t?1:0,background:i||"",transitionDelay:u?t?".15s":"0s":t?"0s":".35s"}})}}])&&qt(n.prototype,o),i&&qt(n,i),t}(r.a.Component);Jt.contextType=Me;var Qt=function(e,t,n){return 0===n||e&&e.current&&e.current.getAttribute("src")===t[n].src},$t=function(e,t,n){var o=function(e,t){return $e(e)&&e<t.length-1?e:t.length-1}(t,n);return{page:o,pageIsCover:Qt(e,n,o)}},en=function(e){e&&e.current&&(e.current.style.visibility="visible")},tn=function(e){setTimeout((function(){e&&e.current&&(e.current.style.visibility="hidden")}),100)};function nn(e){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function rn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){sn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function an(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function cn(e){return(cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function un(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ln(e,t){return(ln=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fn=function(e){function t(e){var n,o,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=this,r=cn(t).call(this,e),n=!r||"object"!==nn(r)&&"function"!=typeof r?un(o):r,sn(un(n),"getPropsWithEnv",(function(){var e=n.props,t=e.preset,o=e.controller,r=e.hotKey,i=e.animate,a=S(t);return rn({},n.props,{presetIsMobile:"mobile"===t,presetIsDesktop:"mobile"!==t,controller:rn({},a.controller,{},o),hotKey:rn({},a.hotKey,{},r),animate:rn({},a.animate,{},i)})})),sn(un(n),"init",(function(){var e=n.getPropsWithEnv(),t=e.isBrowsingControlled,o=e.coverRef,r=e.set,i=e.onBrowsing,a=e.hideOnScroll,c=e.coverVisible,u=e.presetIsDesktop,l=n.state,s=l.show,f=l.page,p=l.pageIsCover;s||(window.addEventListener("keydown",n.handleKeyDown),a&&window.addEventListener("scroll",n.handleScroll),window.requestAnimationFrame((function(){n.setState({show:!0,zoom:!1,rotate:0},(function(){u&&p&&!c&&tn(o,r,f),!t&&"function"==typeof i&&i(!0)}))})))})),sn(un(n),"unInit",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.force,o=n.getPropsWithEnv(),r=o.isBrowsingControlled,i=o.coverRef,a=o.set,c=o.onBrowsing,u=o.hideOnScroll,l=o.coverVisible,s=o.presetIsMobile,f=o.presetIsDesktop,p=n.state,y=p.show,b=p.page,h=p.pageIsCover;(y||t)&&(window.removeEventListener("keydown",n.handleKeyDown),u&&window.removeEventListener("scroll",n.handleScroll),!h&&!l&&en(i,a,b),n.setState({show:!1,zoom:!1,rotate:0},(function(){return setTimeout((function(){n.setState({mounted:!1},(function(){s&&Ue(),f&&h&&!l&&en(i,a,b),!r&&"function"==typeof c&&c(!1)}))}),f?Ot-10:2*Ot-10)})))})),sn(un(n),"handleKeyDown",(function(e){var t=n.getPropsWithEnv(),o=t.set,r=t.hotKey,i=t.loop,a=t.outBrowsing,c=n.state,u=c.zoom,l=c.page;switch(e.keyCode){case 27:e.preventDefault(),r.close&&(u?n.handleToggleZoom():a());break;case 32:e.preventDefault(),r.zoom&&n.handleToggleZoom();break;case 37:e.preventDefault(),(i||0!==l)&&!u&&r.flip&&n.handleToPrevPage();break;case 39:e.preventDefault(),(i||l!==o.length-1)&&!u&&r.flip&&n.handleToNextPage();break;default:return}})),sn(un(n),"handleScroll",(function(){var e=n.props.outBrowsing;n.state.show&&e()})),sn(un(n),"handleToPage",(function(e){var t=n.state.page;n.handleSwitchPages(e-t)()})),sn(un(n),"handleSwitchPages",(function(e){var t=n.props,o=t.coverRef,r=t.onSwitching,i=t.loop;return function(){var t=n.props.set;if(t.length>1){var a=n.state,c=a.page,u=a.pageWithStep,l=et(c,t.length,e,{loop:i});"number"==typeof l&&n.setState({page:l,pageIsCover:Qt(o,t,l),pageWithStep:u+e,zoom:!1,rotate:0},(function(){"function"==typeof r&&r(l)}))}}})),sn(un(n),"handleToPrevPage",n.handleSwitchPages(-1)),sn(un(n),"handleToNextPage",n.handleSwitchPages(1)),sn(un(n),"handleToggleZoom",(function(){var e=n.props.onZooming;n.setState({zoom:!n.state.zoom},(function(){"function"==typeof e&&e(n.state.zoom)}))})),sn(un(n),"handleToggleRotate",(function(e){var t=n.props.onRotating;switch(e){case"left":return function(){return n.setState({rotate:n.state.rotate-90},(function(){"function"==typeof t&&t(n.state.rotate)}))};case"right":return function(){return n.setState({rotate:n.state.rotate+90},(function(){"function"==typeof t&&t(n.state.rotate)}))};default:return function(){return n.setState({rotate:0},(function(){"function"==typeof t&&t(0)}))}}}));var i=$t(e.coverRef,e.defaultPage,e.set),a=i.page,c=i.pageIsCover;return n.state={mounted:!1,show:!1,zoom:!1,rotate:0,page:a,pageIsCover:c,pageWithStep:a},n}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ln(e,t)}(t,e),n=t,i=[{key:"getDerivedStateFromProps",value:function(e,t){return e.browsing?rn({mounted:!0},t.show?{}:$t(e.coverRef,e.defaultPage,e.set)):null}}],(o=[{key:"componentDidMount",value:function(){this.props.browsing&&this.init()}},{key:"componentDidUpdate",value:function(e){e.browsing!==this.props.browsing&&(this.props.browsing?this.init():this.unInit())}},{key:"componentWillUnmount",value:function(){this.unInit({force:!0})}},{key:"render",value:function(){var e=this.getPropsWithEnv(),t=e.coverRef,n=e.coverPos,o=e.outBrowsing,i=e.set,a=e.preset,c=e.presetIsMobile,l=e.presetIsDesktop,s=e.controller,f=e.hotKey,p=e.animate,y=e.hideOnScroll,b=e.coverVisible,h=e.backdrop,d=e.zIndex,m=e.radius,g=e.edge,v=e.loop,w=this.state,O=w.mounted,P={show:w.show,zoom:w.zoom,rotate:w.rotate,page:w.page,pageIsCover:w.pageIsCover,pageWithStep:w.pageWithStep},j=rn({coverRef:t,coverPos:n,outBrowsing:o,set:i,preset:a,presetIsMobile:c,presetIsDesktop:l,controller:s,hotKey:f,animate:p,hideOnScroll:y,coverVisible:b,backdrop:h,radius:m,edge:g,loop:v},P,{toPage:this.handleToPage,toPrevPage:this.handleToPrevPage,toNextPage:this.handleToNextPage,toggleZoom:this.handleToggleZoom,toggleRotate:this.handleToggleRotate});return r.a.createElement(Me.Provider,{value:j},O&&r.a.createElement(R,{id:"zmage",zIndex:d,className:u.a.wrapperLayer},r.a.createElement(Jt,P),r.a.createElement(lt,P),r.a.createElement(Gt,P)))}}])&&an(n.prototype,o),i&&an(n,i),t}(r.a.PureComponent);function pn(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function yn(e){return(yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bn(){return(bn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function hn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function dn(e){return(dn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function mn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gn(e,t){return(gn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}fn.contextType=Me,fn.defaultProps={isBrowsingControlled:!1,browsing:!1,coverRef:r.a.createRef(),outBrowsing:function(){},defaultPage:0,set:[]};var vn={x:0,y:0},wn={x:0,y:0};"undefined"!=typeof window&&window.document&&window.document.documentElement&&document.documentElement.addEventListener("click",(function(e){wn={x:e.clientX,y:e.clientY},setTimeout((function(){return wn={x:0,y:0}}),100)}));var On=function(e){function t(e){var n,o,r,i,a,c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=this,r=dn(t).call(this,e),n=!r||"object"!==yn(r)&&"function"!=typeof r?mn(o):r,i=mn(n),c=function(){var e=n.props.destroyer;n.setState({browsing:!1}),setTimeout(e,Ot)},(a="outBrowsing")in i?Object.defineProperty(i,a,{value:c,enumerable:!0,configurable:!0,writable:!0}):i[a]=c,n.state={browsing:!0},vn=wn,n}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gn(e,t)}(t,e),n=t,(o=[{key:"render",value:function(){var e=E(this.props),t=e.calleeProps,n=e.configProps,o=this.state.browsing,i=t.coverRef?{coverRef:t.coverRef}:{coverPos:o?wn:vn};return r.a.createElement(fn,bn({browsing:o},i,{outBrowsing:this.outBrowsing},n))}}])&&hn(n.prototype,o),i&&hn(n,i),t}(r.a.PureComponent);On.propTypes=v,On.defaultProps=w;var Pn={REF:r.a.createRef(),CONTAINER:null,PORTAL:null},jn=function(e){var t=e.coverRef,n=pn(e,["coverRef"]);return Pn.PORTAL=document.createElement("div"),Pn.PORTAL.id="zmagePortal",Pn.CONTAINER=document.body,Pn.CONTAINER.appendChild(Pn.PORTAL),a.a.render(r.a.createElement(On,bn({ref:Pn.REF,coverRef:t,destroyer:function(){return Pn.CONTAINER.removeChild(Pn.PORTAL)}},n)),Pn.PORTAL),Pn.REF.current.outBrowsing};function _n(e){return(_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function En(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function xn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function kn(e){return(kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Cn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function In(e,t){return(In=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rn=function(e){function t(e){var n,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=this,i=kn(t).call(this,e),n=!i||"object"!==_n(i)&&"function"!=typeof i?Cn(o):i,Tn(Cn(n),"attachBrowserToImage",(function(){var e=n.props,t=(e.children,En(e,["children"]));n.contentRef.current&&n.contentRef.current.querySelectorAll("img").forEach((function(e){!e.getAttribute("zmage")&&e.getAttribute("src")&&(e.style.cursor="zoom-in",e.setAttribute("zmage",Date.now()),e.addEventListener("click",(function(){return jn(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sn(Object(n),!0).forEach((function(t){Tn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{coverRef:{current:e},src:e.getAttribute("src")}))})))}))})),n.contentRef=r.a.createRef(),n}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&In(e,t)}(t,e),n=t,(o=[{key:"componentDidMount",value:function(){window.__ZMAGE_BROWSER__=jn,this.attachBrowserToImage()}},{key:"componentDidUpdate",value:function(e,t,n){this.attachBrowserToImage()}},{key:"render",value:function(){var e=this.props.children;return r.a.createElement("div",{ref:this.contentRef},e)}}])&&xn(n.prototype,o),i&&xn(n,i),t}(r.a.PureComponent);Rn.propTypes=v,Rn.defaultProps=w;var zn=Rn;function Ln(e){return(Ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dn(){return(Dn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function Nn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(n),!0).forEach((function(t){Fn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Bn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Vn(e){return(Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function An(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wn(e,t){return(Wn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gn=function(e){function t(e){var n,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),o=this,i=Vn(t).call(this,e),n=!i||"object"!==Ln(i)&&"function"!=typeof i?An(o):i,Fn(An(n),"inBrowsing",(function(){n.isBrowsingControlled?n.props.onBrowsing(!0):n.setState({browsing:!0})})),Fn(An(n),"outBrowsing",(function(){n.isBrowsingControlled?n.props.onBrowsing(!1):n.setState({browsing:!1})})),n.coverRef=r.a.createRef(),n.isBrowsingControlled=n.props.hasOwnProperty("browsing"),n.state={browsing:!1},n}var n,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wn(e,t)}(t,e),n=t,(i=[{key:"render",value:function(){var e=this,t=E(this.props),n=t.coverProps,i=t.stateProps,a=t.configProps,c=t.restProps,u=this.state.browsing;return r.a.createElement(o.Fragment,null,r.a.createElement("img",Dn({className:n.className,style:Mn({cursor:"zoom-in"},n.style),src:n.src,alt:n.alt,onClick:function(t){e.inBrowsing(),"function"==typeof n.onClick&&n.onClick(t)},ref:function(t){n.forwardedRef&&(n.forwardedRef.current=t),e.coverRef&&(e.coverRef.current=t)}},c)),r.a.createElement(fn,Dn({isBrowsingControlled:this.isBrowsingControlled,browsing:this.isBrowsingControlled?i.controlledBrowsing:u,coverRef:this.coverRef,outBrowsing:this.outBrowsing},a)))}}])&&Bn(n.prototype,i),a&&Bn(n,a),t}(r.a.PureComponent);Gn.propTypes=v,Gn.defaultProps=w;var Zn=r.a.forwardRef((function(e,t){return r.a.createElement(Gn,Dn({},e,{forwardedRef:t}))}));Zn.browsing=jn,Zn.Browsing=jn,Zn.wrapper=zn,Zn.Wrapper=zn;var Kn=Zn;n.d(t,"default",(function(){return Kn}))}]);