Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-svg-pan-zoom

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-svg-pan-zoom - npm Package Compare versions

Comparing version 2.15.0 to 2.15.1

build-commonjs/utils/getDisplayName.js

23

build-commonjs/ui-miniature/miniature-mask.js

@@ -6,3 +6,2 @@ 'use strict';

});
exports.default = MiniatureMask;

@@ -17,4 +16,10 @@ var _react = require('react');

var _RandomUID = require('../utils/RandomUID');
var _RandomUID2 = _interopRequireDefault(_RandomUID);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var prefixID = 'react-svg-pan-zoom_miniature';
function MiniatureMask(_ref) {

@@ -27,4 +32,7 @@ var SVGWidth = _ref.SVGWidth,

y2 = _ref.y2,
zoomToFit = _ref.zoomToFit;
zoomToFit = _ref.zoomToFit,
_uid = _ref._uid;
var maskID = prefixID + '_mask_' + _uid;
return _react2.default.createElement(

@@ -38,3 +46,3 @@ 'g',

'mask',
{ id: 'react-svg-pan-zoom-miniature-mask' },
{ id: maskID },
_react2.default.createElement('rect', { x: '0', y: '0', width: SVGWidth, height: SVGHeight, fill: '#ffffff' }),

@@ -44,3 +52,4 @@ _react2.default.createElement('rect', { x: x1, y: y1, width: x2 - x1, height: y2 - y1 })

),
_react2.default.createElement('rect', { x: '0',
_react2.default.createElement('rect', {
x: '0',
y: '0',

@@ -52,3 +61,3 @@ width: SVGWidth,

fill: "#000",
mask: "url(#react-svg-pan-zoom-miniature-mask)",
mask: 'url(#' + maskID + ')',
opacity: 0.4

@@ -68,2 +77,4 @@ }

zoomToFit: _propTypes2.default.number.isRequired
};
};
exports.default = (0, _RandomUID2.default)(MiniatureMask);

@@ -6,3 +6,2 @@ 'use strict';

});
exports.default = BorderGradient;

@@ -19,8 +18,15 @@ var _react = require('react');

var _RandomUID = require('../utils/RandomUID');
var _RandomUID2 = _interopRequireDefault(_RandomUID);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var prefixID = 'react-svg-pan-zoom_border_gradient';
function BorderGradient(_ref) {
var direction = _ref.direction,
width = _ref.width,
height = _ref.height;
height = _ref.height,
_uid = _ref._uid;

@@ -48,2 +54,5 @@

var gradientID = prefixID + '_gradient_' + _uid;
var maskID = prefixID + '_mask_' + _uid;
return _react2.default.createElement(

@@ -57,3 +66,3 @@ 'g',

'linearGradient',
{ id: 'react-svg-pan-zoom-gradient1', x1: '0%', y1: '0%', x2: '100%', y2: '0%', spreadMethod: 'pad' },
{ id: gradientID, x1: '0%', y1: '0%', x2: '100%', y2: '0%', spreadMethod: 'pad' },
_react2.default.createElement('stop', { offset: '0%', stopColor: '#fff', stopOpacity: '0.8' }),

@@ -64,9 +73,9 @@ _react2.default.createElement('stop', { offset: '100%', stopColor: '#000', stopOpacity: '0.5' })

'mask',
{ id: 'react-svg-pan-zoom-mask1', x: '0', y: '0', width: '20', height: Math.max(width, height) },
{ id: maskID, x: '0', y: '0', width: '20', height: Math.max(width, height) },
_react2.default.createElement('rect', { x: '0', y: '0', width: '20', height: Math.max(width, height),
style: { stroke: "none", fill: "url(#react-svg-pan-zoom-gradient1)" } })
style: { stroke: "none", fill: 'url(#' + gradientID + ')' } })
)
),
_react2.default.createElement('rect', { x: '0', y: '0', width: '20', height: Math.max(width, height),
style: { stroke: "none", fill: "#000", mask: "url(#react-svg-pan-zoom-mask1)" }, transform: transform })
style: { stroke: "none", fill: "#000", mask: 'url(#' + maskID + ')' }, transform: transform })
);

@@ -79,2 +88,4 @@ }

height: _propTypes2.default.number.isRequired
};
};
exports.default = (0, _RandomUID2.default)(BorderGradient);
import React from 'react';
import PropTypes from 'prop-types';
import RandomUID from "../utils/RandomUID";
export default function MiniatureMask(_ref) {
var prefixID = 'react-svg-pan-zoom_miniature';
function MiniatureMask(_ref) {
var SVGWidth = _ref.SVGWidth,

@@ -11,4 +14,7 @@ SVGHeight = _ref.SVGHeight,

y2 = _ref.y2,
zoomToFit = _ref.zoomToFit;
zoomToFit = _ref.zoomToFit,
_uid = _ref._uid;
var maskID = prefixID + '_mask_' + _uid;
return React.createElement(

@@ -22,3 +28,3 @@ 'g',

'mask',
{ id: 'react-svg-pan-zoom-miniature-mask' },
{ id: maskID },
React.createElement('rect', { x: '0', y: '0', width: SVGWidth, height: SVGHeight, fill: '#ffffff' }),

@@ -28,3 +34,4 @@ React.createElement('rect', { x: x1, y: y1, width: x2 - x1, height: y2 - y1 })

),
React.createElement('rect', { x: '0',
React.createElement('rect', {
x: '0',
y: '0',

@@ -36,3 +43,3 @@ width: SVGWidth,

fill: "#000",
mask: "url(#react-svg-pan-zoom-miniature-mask)",
mask: 'url(#' + maskID + ')',
opacity: 0.4

@@ -52,2 +59,4 @@ }

zoomToFit: PropTypes.number.isRequired
};
};
export default RandomUID(MiniatureMask);
import React from 'react';
import PropTypes from 'prop-types';
import { POSITION_TOP, POSITION_RIGHT, POSITION_BOTTOM, POSITION_LEFT } from '../constants';
import RandomUID from "../utils/RandomUID";
export default function BorderGradient(_ref) {
var prefixID = 'react-svg-pan-zoom_border_gradient';
function BorderGradient(_ref) {
var direction = _ref.direction,
width = _ref.width,
height = _ref.height;
height = _ref.height,
_uid = _ref._uid;

@@ -31,2 +35,5 @@

var gradientID = prefixID + '_gradient_' + _uid;
var maskID = prefixID + '_mask_' + _uid;
return React.createElement(

@@ -40,3 +47,3 @@ 'g',

'linearGradient',
{ id: 'react-svg-pan-zoom-gradient1', x1: '0%', y1: '0%', x2: '100%', y2: '0%', spreadMethod: 'pad' },
{ id: gradientID, x1: '0%', y1: '0%', x2: '100%', y2: '0%', spreadMethod: 'pad' },
React.createElement('stop', { offset: '0%', stopColor: '#fff', stopOpacity: '0.8' }),

@@ -47,9 +54,9 @@ React.createElement('stop', { offset: '100%', stopColor: '#000', stopOpacity: '0.5' })

'mask',
{ id: 'react-svg-pan-zoom-mask1', x: '0', y: '0', width: '20', height: Math.max(width, height) },
{ id: maskID, x: '0', y: '0', width: '20', height: Math.max(width, height) },
React.createElement('rect', { x: '0', y: '0', width: '20', height: Math.max(width, height),
style: { stroke: "none", fill: "url(#react-svg-pan-zoom-gradient1)" } })
style: { stroke: "none", fill: 'url(#' + gradientID + ')' } })
)
),
React.createElement('rect', { x: '0', y: '0', width: '20', height: Math.max(width, height),
style: { stroke: "none", fill: "#000", mask: "url(#react-svg-pan-zoom-mask1)" }, transform: transform })
style: { stroke: "none", fill: "#000", mask: 'url(#' + maskID + ')' }, transform: transform })
);

@@ -62,2 +69,4 @@ }

height: PropTypes.number.isRequired
};
};
export default RandomUID(BorderGradient);

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ReactSVGPanZoom=t(require("react"),require("prop-types")):e.ReactSVGPanZoom=t(e.React,e.PropTypes)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return i}),n.d(t,"i",function(){return a}),n.d(t,"j",function(){return u}),n.d(t,"k",function(){return c}),n.d(t,"l",function(){return s}),n.d(t,"m",function(){return l}),n.d(t,"f",function(){return f}),n.d(t,"h",function(){return h}),n.d(t,"g",function(){return d}),n.d(t,"d",function(){return p}),n.d(t,"e",function(){return b});var r="idle",o="panning",i="zooming",a="auto",u="none",c="pan",s="zoom-in",l="zoom-out",f="none",h="top",d="right",p="bottom",b="left"},function(e,t,n){"use strict";function r(e,t,n,r){return o({},v({},Object(b.identity)(),{version:2,mode:p.a,focus:!1,pinchPointDistance:null,prePinchMode:null,viewerWidth:e,viewerHeight:t,SVGWidth:n,SVGHeight:r,startX:null,startY:null,endX:null,endY:null,miniatureOpen:!0}))}function o(e,t){return e=Object.assign({},e,t),Object.freeze(e)}function i(e,t,n){var r=Object(b.fromObject)(e),o=Object(b.inverse)(r);return Object(b.applyToPoint)(o,{x:t,y:n})}function a(e){var t=Object(b.fromObject)(e);return{scaleFactor:t.a,translationX:t.e,translationY:t.f}}function u(e,t){return o(e,{focus:t})}function c(e,t,n){return o(e,{viewerWidth:t,viewerHeight:n})}function s(e,t,n){return o(e,{SVGWidth:t,SVGHeight:n})}function l(e,t,n){return o(e,{scaleFactorMin:t,scaleFactorMax:n})}function f(e,t,n,r){var i=e.viewerWidth,a=e.viewerHeight,u=Object(b.transform)(Object(b.translate)(i/2-t,a/2-n),Object(b.translate)(t,n),Object(b.scale)(r,r),Object(b.translate)(-t,-n));return o(e,v({mode:p.a},u))}function h(e){return o(e,v({mode:p.a},Object(b.identity)()))}function d(e){return o(e,{mode:p.a,startX:null,startY:null,endX:null,endY:null})}t.b=r,t.f=o,t.c=i,t.a=a,t.g=u,t.j=c,t.i=s,t.k=l,t.h=f,t.d=h,t.e=d;var p=n(1),b=n(4),v=(n.n(b),"function"==typeof Symbol&&Symbol.iterator,Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e})},function(e,n){e.exports=t},function(e,t,n){!function(t,n){e.exports=n()}("undefined"!=typeof self&&self,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){"use strict";function r(e){return void 0===e}t.a=r},function(e,t,n){"use strict";function r(e){return{a:1,c:0,e:e,b:0,d:1,f:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}}t.a=r},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e){return Array.isArray(e)?e:Array.from(e)}function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t=Array.isArray(t[0])?t[0]:t;var a=function(e,t){return{a:e.a*t.a+e.c*t.b,c:e.a*t.c+e.c*t.d,e:e.a*t.e+e.c*t.f+e.e,b:e.b*t.a+e.d*t.b,d:e.b*t.c+e.d*t.d,f:e.b*t.e+e.d*t.f+e.f}};switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return a(t[0],t[1]);default:var u=t,c=o(u),s=c[0],l=c[1],f=c.slice(2),h=a(s,l);return i.apply(void 0,[h].concat(r(f)))}}t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);n.d(t,"applyToPoint",function(){return r.a}),n.d(t,"applyToPoints",function(){return r.b});var o=n(5);n.d(t,"fromObject",function(){return o.a});var i=n(6);n.d(t,"fromString",function(){return i.a});var a=n(7);n.d(t,"identity",function(){return a.a});var u=n(8);n.d(t,"inverse",function(){return u.a});var c=n(9);n.d(t,"isAffineMatrix",function(){return c.a});var s=n(10);n.d(t,"rotate",function(){return s.a}),n.d(t,"rotateDEG",function(){return s.b});var l=n(11);n.d(t,"scale",function(){return l.a});var f=n(12);n.d(t,"shear",function(){return f.a});var h=n(13);n.d(t,"toCSS",function(){return h.a}),n.d(t,"toSVG",function(){return h.b}),n.d(t,"toString",function(){return h.c});var d=n(2);n.d(t,"transform",function(){return d.a});var p=n(1);n.d(t,"translate",function(){return p.a})},function(e,t,n){"use strict";function r(e,t){return{x:e.a*t.x+e.c*t.y+e.e,y:e.b*t.x+e.d*t.y+e.f}}function o(e,t){return t.map(function(t){return r(e,t)})}t.a=r,t.b=o},function(e,t,n){"use strict";function r(e){return{a:parseFloat(e.a),b:parseFloat(e.b),c:parseFloat(e.c),d:parseFloat(e.d),e:parseFloat(e.e),f:parseFloat(e.f)}}t.a=r},function(e,t,n){"use strict";function r(e){var t=e.match(o);if(null===t||t.length<7)throw new Error("'"+e+"' is not a matrix");return{a:parseFloat(t[1]),b:parseFloat(t[2]),c:parseFloat(t[3]),d:parseFloat(t[4]),e:parseFloat(t[5]),f:parseFloat(t[6])}}t.a=r;var o=/^matrix\(\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*\)$/i},function(e,t,n){"use strict";function r(){return{a:1,c:0,e:0,b:0,d:1,f:0}}t.a=r},function(e,t,n){"use strict";function r(e){var t=e.a,n=e.b,r=e.c,o=e.d,i=e.e,a=e.f,u=t*o-n*r;return{a:o/u,b:n/-u,c:r/-u,d:t/u,e:(o*i-r*a)/-u,f:(n*i-t*a)/u}}t.a=r},function(e,t,n){"use strict";function r(e){var t=function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)};return"object"===(void 0===e?"undefined":o(e))&&e.hasOwnProperty("a")&&t(e.a)&&e.hasOwnProperty("b")&&t(e.b)&&e.hasOwnProperty("c")&&t(e.c)&&e.hasOwnProperty("d")&&t(e.d)&&e.hasOwnProperty("e")&&t(e.e)&&e.hasOwnProperty("f")&&t(e.f)}t.a=r;var o="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}},function(e,t,n){"use strict";function r(e,t,n){var r=c(e),o=s(e),l={a:r,c:-o,e:0,b:o,d:r,f:0};return Object(i.a)(t)||Object(i.a)(n)?l:Object(u.a)([Object(a.a)(t,n),l,Object(a.a)(-t,-n)])}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return r(e*l/180,t,n)}t.a=r,t.b=o;var i=n(0),a=n(1),u=n(2),c=Math.cos,s=Math.sin,l=Math.PI},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return Object(o.a)(t)&&(t=e),{a:e,c:0,e:0,b:0,d:t,f:0}}t.a=r;var o=n(0)},function(e,t,n){"use strict";function r(e,t){return{a:1,c:e,e:0,b:t,d:1,f:0}}t.a=r},function(e,t,n){"use strict";function r(e){return i(e)}function o(e){return i(e)}function i(e){return"matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")"}t.a=r,t.b=o,t.c=i}])})},function(e,t,n){"use strict";function r(e,t){return e.scaleFactorMin&&e.d*t<=e.scaleFactorMin}function o(e,t){return e.scaleFactorMax&&e.d*t>=e.scaleFactorMax}function i(e,t){return r(e,t)&&t<1||o(e,t)&&t>1}function a(e,t){var n=t.a;return null!=e.scaleFactorMin&&(n=Math.max(n,e.scaleFactorMin)),null!=e.scaleFactorMax&&(n=Math.min(n,e.scaleFactorMax)),Object(v.f)(t,{a:n,d:n})}function u(e,t,n,r){if(i(e,r))return e;var o=Object(p.transform)(Object(p.fromObject)(e),Object(p.translate)(t,n),Object(p.scale)(r,r),Object(p.translate)(-t,-n));return Object(v.f)(e,m({mode:b.a},a(e,o),{startX:null,startY:null,endX:null,endY:null}))}function c(e,t,n,r,o){var u=e.viewerWidth,c=e.viewerHeight,s=u/r,l=c/o,f=Math.min(s,l),h=Object(p.transform)(Object(p.scale)(f,f),Object(p.translate)(-t,-n));return i(e,f/e.d)?Object(v.f)(e,{mode:b.a,startX:null,startY:null,endX:null,endY:null}):Object(v.f)(e,m({mode:b.a},a(e,h),{startX:null,startY:null,endX:null,endY:null}))}function s(e){return c(e,0,0,e.SVGWidth,e.SVGHeight)}function l(e,t){var n=e.viewerWidth,r=e.viewerHeight,o=Object(v.c)(e,n/2,r/2);return u(e,o.x,o.y,t)}function f(e,t,n){return Object(v.f)(e,{mode:b.c,startX:t,startY:n,endX:t,endY:n})}function h(e,t,n){if(e.mode!==b.c)throw new Error("update selection not allowed in this mode "+e.mode);return Object(v.f)(e,{endX:t,endY:n})}function d(e,t,n,r,o){var i=e.startX,a=e.startY,s=e.endX,l=e.endY,f=Object(v.c)(e,i,a),h=Object(v.c)(e,s,l);if(Math.abs(i-s)>7&&Math.abs(a-l)>7){var d=Object(g.a)(f,h);return c(e,d.x,d.y,d.width,d.height)}var p=Object(v.c)(e,t,n);return u(e,p.x,p.y,r,o)}t.c=i,t.d=a,t.h=u,t.a=c,t.b=s,t.i=l,t.e=f,t.g=h,t.f=d;var p=n(4),b=(n.n(p),n(1)),v=n(2),g=n(10),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){"use strict";function r(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,o=Object(l.transform)(Object(l.fromObject)(e),Object(l.translate)(t,n));if(r){var i=Object(l.applyToPoints)(o,[{x:r,y:r},{x:e.SVGWidth-r,y:e.SVGHeight-r}]),a=h(i,2),u=a[0],d=u.x,p=u.y,b=a[1],v=b.x,g=b.y,m=0;e.viewerWidth-d<0?m=e.viewerWidth-d:v<0&&(m=-v);var y=0;e.viewerHeight-p<0?y=e.viewerHeight-p:g<0&&(y=-g),o=Object(l.transform)(Object(l.translate)(m,y),o)}return Object(s.f)(e,f({mode:c.a},o))}function o(e,t,n){return Object(s.f)(e,{mode:c.b,startX:t,startY:n,endX:t,endY:n})}function i(e,t,n,o){if(e.mode!==c.b)throw new Error("update pan not allowed in this mode "+e.mode);var i=e.endX,a=e.endY,u=Object(s.c)(e,i,a),l=Object(s.c)(e,t,n),f=l.x-u.x,h=l.y-u.y,d=r(e,f,h,o);return Object(s.f)(d,{mode:c.b,endX:t,endY:n})}function a(e){return Object(s.f)(e,{mode:c.a,startX:null,startY:null,endX:null,endY:null})}function u(e,t,n){var o=0,i=0;return n<=20&&(i=2),e.viewerWidth-t<=20&&(o=-2),e.viewerHeight-n<=20&&(i=-2),t<=20&&(o=2),o/=e.d,i/=e.d,0===o&&0===i?e:r(e,o,i)}t.b=r,t.c=o,t.e=i,t.d=a,t.a=u;var c=n(1),s=n(2),l=n(4),f=(n.n(l),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),h=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){"use strict";function r(e){return Object(i.f)(e,{miniatureOpen:!0})}function o(e){return Object(i.f)(e,{miniatureOpen:!1})}t.b=r,t.a=o;var i=n(2)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(2),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n,o){r(this,e),this.originalEvent=t,this.value=n,this.SVGViewer=o}return i(e,[{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"scaleFactor",get:function(){return this._cacheDecomposedValue=this._cacheDecomposedValue||Object(o.a)(this.value),this._cacheDecomposedValue.scaleFactor}},{key:"translationX",get:function(){return this._cacheDecomposedValue=this._cacheDecomposedValue||Object(o.a)(this.value),this._cacheDecomposedValue.translationX}},{key:"translationY",get:function(){return this._cacheDecomposedValue=this._cacheDecomposedValue||Object(o.a)(this.value),this._cacheDecomposedValue.translationY}}]),e}();t.a=a},function(e,t,n){"use strict";function r(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),s=c.left,p=c.top;a=e.clientX-Math.round(s),u=e.clientY-Math.round(p)}var b=r;switch(n){case l.m:var v=Object(f.c)(r,a,u);b=Object(d.h)(r,v.x,v.y,1/o.scaleFactor,o);break;case l.l:b=Object(d.e)(r,a,u);break;case l.i:case l.k:b=Object(h.c)(r,a,u);break;default:return r}return e.preventDefault(),b}function o(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),s=c.left,f=c.top;a=e.clientX-Math.round(s),u=e.clientY-Math.round(f)}var p=0===e.buttons,b=r;switch(n){case l.l:r.mode===l.c&&(b=p?Object(d.f)(r,a,u,o.scaleFactor,o):Object(d.g)(r,a,u));break;case l.i:case l.k:r.mode===l.b&&(b=p?Object(h.d)(r):Object(h.e)(r,a,u,o.preventPanOutside?20:void 0));break;default:return r}return e.preventDefault(),b}function i(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),s=c.left,f=c.top;a=e.clientX-Math.round(s),u=e.clientY-Math.round(f)}var p=r;switch(n){case l.m:r.mode===l.c&&(p=Object(d.f)(r,a,u,1/o.scaleFactor,o));break;case l.l:r.mode===l.c&&(p=Object(d.f)(r,a,u,o.scaleFactor,o));break;case l.i:case l.k:r.mode===l.b&&(p=Object(h.d)(r,a,u));break;default:return r}return e.preventDefault(),p}function a(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),s=c.left,h=c.top;a=e.clientX-Math.round(s),u=e.clientY-Math.round(h)}var p=r;switch(n){case l.i:if(!o.disableDoubleClickZoomWithToolAuto){var b=Object(f.c)(r,a,u),v=function(t,n){return t||e.getModifierState(n)},g=o.modifierKeys.reduce(v,!1),m=g?1/o.scaleFactor:o.scaleFactor;p=Object(d.h)(r,b.x,b.y,m,o)}break;default:return r}return e.preventDefault(),p}function u(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),s=c.left,l=c.top;a=e.clientX-Math.round(s),u=e.clientY-Math.round(l)}if(!o.detectWheel)return r;var h=Math.max(-1,Math.min(1,e.deltaY)),b=Object(p.a)(h,-1,1,o.scaleFactorOnWheel,1/o.scaleFactorOnWheel),v=Object(f.c)(r,a,u),g=Object(d.h)(r,v.x,v.y,b,o);return e.preventDefault(),g}function c(e,t,n,r,o){var i=(arguments.length>5&&void 0!==arguments[5]&&arguments[5],Object(f.g)(r,"mouseenter"===e.type));return e.preventDefault(),i}function s(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=i.x,u=i.y;return[l.j,l.i].indexOf(n)>=0&&o.detectAutoPan&&r.focus?Object(h.a)(r,a,u):r}t.c=r,t.e=o,t.f=i,t.a=a,t.g=u,t.d=c,t.b=s;var l=n(1),f=n(2),h=n(6),d=n(5),p=n(18)},function(e,t,n){"use strict";function r(e,t){return e.x<=t.x&&e.y<=t.y?{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}:e.x>=t.x&&e.y<=t.y?{x:t.x,y:e.y,width:e.x-t.x,height:t.y-e.y}:e.x>=t.x&&e.y>=t.y?{x:t.x,y:t.y,width:e.x-t.x,height:e.y-t.y}:e.x<=t.x&&e.y>=t.y?{x:e.x,y:t.y,width:t.x-e.x,height:e.y-t.y}:void 0}t.a=r},function(e,t,n){"use strict";function r(e){var t=e.tool,n=e.value,r=e.onChangeValue,o=e.onChangeTool,a=e.position,u=function(e,t){o(t),e.stopPropagation(),e.preventDefault()},v=function(e){r(Object(s.b)(n)),e.stopPropagation(),e.preventDefault()},g=[c.h,c.d].indexOf(a)>=0,m={position:"absolute",transform:[c.h,c.d].indexOf(a)>=0?"translate(-50%, 0px)":"none",top:[c.e,c.g,c.h].indexOf(a)>=0?"5px":"unset",left:[c.h,c.d].indexOf(a)>=0?"50%":c.e===a?"5px":"unset",right:[c.g].indexOf(a)>=0?"5px":"unset",bottom:[c.d].indexOf(a)>=0?"5px":"unset",backgroundColor:"rgba(19, 20, 22, 0.90)",borderRadius:"2px",display:"flex",flexDirection:g?"row":"column",padding:g?"1px 2px":"2px 1px"};return i.a.createElement("div",{style:m,role:"toolbar"},i.a.createElement(b.a,{toolbarPosition:a,active:t===c.j,name:"unselect-tools",title:"Selection",onClick:function(e){return u(e,c.j)}},i.a.createElement(l.a,null)),i.a.createElement(b.a,{toolbarPosition:a,active:t===c.k,name:"select-tool-pan",title:"Pan",onClick:function(e){return u(e,c.k)}},i.a.createElement(f.a,null)),i.a.createElement(b.a,{toolbarPosition:a,active:t===c.l,name:"select-tool-zoom-in",title:"Zoom in",onClick:function(e){return u(e,c.l)}},i.a.createElement(h.a,null)),i.a.createElement(b.a,{toolbarPosition:a,active:t===c.m,name:"select-tool-zoom-out",title:"Zoom out",onClick:function(e){return u(e,c.m)}},i.a.createElement(d.a,null)),i.a.createElement(b.a,{toolbarPosition:a,active:!1,name:"fit-to-viewer",title:"Fit to viewer",onClick:function(e){return v(e)}},i.a.createElement(p.a,null)))}t.a=r;var o=n(0),i=n.n(o),a=n(3),u=n.n(a),c=n(1),s=n(5),l=n(23),f=n(24),h=n(25),d=n(26),p=n(27),b=n(28);r.propTypes={position:u.a.oneOf([c.h,c.g,c.d,c.e]).isRequired,tool:u.a.string.isRequired,value:u.a.object.isRequired,onChangeValue:u.a.func.isRequired,onChangeTool:u.a.func.isRequired}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t,n=e.value,o=e.onChangeValue,i=e.position,u=e.children,c=e.background,p=e.SVGBackground,b=e.width,v=e.height,g=n.SVGWidth,m=n.SVGHeight,y=n.viewerWidth,O=n.viewerHeight,w=m/g,j=w>=1?v/m:b/g,V=Object(l.applyToPoints)(Object(l.inverse)(n),[{x:0,y:0},{x:y,y:O}]),x=d(V,2),k=x[0],M=k.x,P=k.y,E=x[1],T=E.x,S=E.y,C=void 0,R=void 0;n.miniatureOpen?(C=b,R=v):(C=24,R=24);var _=(t={position:"absolute",overflow:"hidden",outline:"1px solid rgba(19, 20, 22, 0.90)",transition:"width 200ms ease, height 200ms ease, bottom 200ms ease",width:C+"px",height:R+"px",bottom:"6px"},r(t,i===s.e?"left":"right","6px"),r(t,"background",c),t),F=w>=1?"translate("+(b-g*j)/2+", 0)":"translate(0, "+(v-m*j)/2+")";return a.a.createElement("div",{role:"navigation",style:_},a.a.createElement("svg",{width:b,height:v,style:{pointerEvents:"none"}},a.a.createElement("g",{transform:F},a.a.createElement("g",{transform:"scale("+j+", "+j+")"},a.a.createElement("rect",{fill:p,x:0,y:0,width:n.SVGWidth,height:n.SVGHeight}),u,a.a.createElement(h.a,{SVGWidth:g,SVGHeight:m,x1:M,y1:P,x2:T,y2:S,zoomToFit:j})))),a.a.createElement(f.a,{value:n,onChangeValue:o,position:i}))}t.a=o;var i=n(0),a=n.n(i),u=n(3),c=n.n(u),s=n(1),l=n(4),f=(n.n(l),n(30)),h=n(32),d=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Math.min,Math.max;o.propTypes={position:c.a.oneOf([s.g,s.e]).isRequired,value:c.a.object.isRequired,onChangeValue:c.a.func.isRequired,background:c.a.string.isRequired,SVGBackground:c.a.string.isRequired,width:c.a.number.isRequired}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"Viewer",function(){return f});var r=n(14);n.d(t,"ReactSVGPanZoom",function(){return r.a});var o=n(11);n.d(t,"Toolbar",function(){return o.a});var i=n(12);n.d(t,"Miniature",function(){return i.a});var a=n(2);n.d(t,"setPointOnViewerCenter",function(){return a.h}),n.d(t,"reset",function(){return a.d});var u=n(6);n.d(t,"pan",function(){return u.b});var c=n(5);n.d(t,"zoom",function(){return c.h}),n.d(t,"fitSelection",function(){return c.a}),n.d(t,"fitToViewer",function(){return c.b}),n.d(t,"zoomOnViewerCenter",function(){return c.i});var s=n(7);n.d(t,"openMiniature",function(){return s.b}),n.d(t,"closeMiniature",function(){return s.a});var l=n(1);n.d(t,"MODE_IDLE",function(){return l.a}),n.d(t,"MODE_PANNING",function(){return l.b}),n.d(t,"MODE_ZOOMING",function(){return l.c}),n.d(t,"TOOL_AUTO",function(){return l.i}),n.d(t,"TOOL_NONE",function(){return l.j}),n.d(t,"TOOL_PAN",function(){return l.k}),n.d(t,"TOOL_ZOOM_IN",function(){return l.l}),n.d(t,"TOOL_ZOOM_OUT",function(){return l.m}),n.d(t,"POSITION_NONE",function(){return l.f}),n.d(t,"POSITION_TOP",function(){return l.h}),n.d(t,"POSITION_RIGHT",function(){return l.g}),n.d(t,"POSITION_BOTTOM",function(){return l.d}),n.d(t,"POSITION_LEFT",function(){return l.e});var f=function(){return console.error("HEY! You are trying to use an older version of ReactSVGPanZoom. Read here https://github.com/chrvadala/react-svg-pan-zoom/blob/master/docs/migrate-from-v1-to-v2.md"),null}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),u=n.n(a),c=n(3),s=n.n(c),l=n(4),f=(n.n(l),n(15)),h=n(6),d=n(2),p=n(9),b=n(19),v=n(5),g=n(7),m=n(20),y=n(21),O=n(22),w=n(11),j=n(29),V=n(12),x=n(1),k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),P=function(e){function t(e,n){r(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),a=i.props,u=a.tool,c=a.value,s=a.width,l=a.height,f=a.children,h=f.props,p=h.width,b=h.height;return i.state={value:c||Object(d.b)(s,l,p,b),tool:u||x.j},i.ViewerDOM=null,i.autoPanLoop=i.autoPanLoop.bind(i),i}return i(t,e),M(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.getValue(),n=!1,r=t;t.viewerWidth===e.width&&t.viewerHeight===e.height||(r=Object(d.j)(r,e.width,e.height),n=!0);var o=e.children.props,i=o.width,a=o.height;t.SVGWidth===i&&t.SVGHeight===a||(r=Object(d.i)(r,i,a),n=!0),t.scaleFactorMin===e.scaleFactorMin&&t.scaleFactorMax===e.scaleFactorMax||(r=Object(d.k)(r,e.scaleFactorMin,e.scaleFactorMax),n=!0),n&&this.setValue(r)}},{key:"getValue",value:function(){return this.props.value?this.props.value:this.state.value}},{key:"getTool",value:function(){return this.props.tool?this.props.tool:this.state.tool}},{key:"getSvgStyle",value:function(e){var t={display:"block"};return e&&(t.cursor=e),(this.props.detectPinchGesture||-1!==[x.k,x.i].indexOf(this.getTool()))&&(t.touchAction="none"),t}},{key:"setValue",value:function(e){this.setState({value:e}),this.props.onChangeValue&&this.props.onChangeValue(e)}},{key:"pan",value:function(e,t){var n=Object(h.b)(this.getValue(),e,t);this.setValue(n)}},{key:"zoom",value:function(e,t,n){var r=Object(v.h)(this.getValue(),e,t,n);this.setValue(r)}},{key:"fitSelection",value:function(e,t,n,r){var o=Object(v.a)(this.getValue(),e,t,n,r);this.setValue(o)}},{key:"fitToViewer",value:function(){var e=Object(v.b)(this.getValue());this.setValue(e)}},{key:"zoomOnViewerCenter",value:function(e){var t=Object(v.i)(this.getValue(),e);this.setValue(t)}},{key:"setPointOnViewerCenter",value:function(e,t,n){var r=Object(d.h)(this.getValue(),e,t,n);this.setValue(r)}},{key:"reset",value:function(){var e=Object(d.d)(this.getValue());this.setValue(e)}},{key:"changeTool",value:function(e){this.setState({tool:e}),this.props.onChangeTool&&this.props.onChangeTool(e)}},{key:"openMiniature",value:function(){var e=Object(g.b)(this.getValue());this.setValue(e)}},{key:"closeMiniature",value:function(){var e=Object(g.a)(this.getValue());this.setValue(e)}},{key:"handleViewerEvent",value:function(e){var t=this.props,n=this.state.value,r=this.ViewerDOM;if([x.j,x.i].indexOf(this.getTool())>=0&&e.target!==r){var o={click:t.onClick,dblclick:t.onDoubleClick,mousemove:t.onMouseMove,mouseup:t.onMouseUp,mousedown:t.onMouseDown,touchstart:t.onTouchStart,touchmove:t.onTouchMove,touchend:t.onTouchEnd,touchcancel:t.onTouchCancel},i=o[e.type];i&&i(Object(f.a)(e,n,r))}}},{key:"autoPanLoop",value:function(){var e={x:this.state.viewerX,y:this.state.viewerY},t=Object(p.b)(null,this.ViewerDOM,this.getTool(),this.getValue(),this.props,e);this.getValue()!==t&&this.setValue(t),this.autoPanIsRunning&&requestAnimationFrame(this.autoPanLoop)}},{key:"componentDidMount",value:function(){var e=this.props,t=this.state;e.onChangeValue&&e.onChangeValue(t.value),this.autoPanIsRunning=!0,requestAnimationFrame(this.autoPanLoop)}},{key:"componentWillUnmount",value:function(){this.autoPanIsRunning=!1}},{key:"render",value:function(){var e=this,t=this.props,n=this.state,r=n.viewerX,o=n.viewerY,i=this.getTool(),a=this.getValue(),c=t.customToolbar,s=t.customMiniature,f=i===x.i&&a.mode===x.b&&a.startX!==a.endX&&a.startY!==a.endY,h=void 0;i===x.k&&(h=Object(m.a)(a.mode===x.b?"grabbing":"grab")),i===x.l&&(h=Object(m.a)("zoom-in")),i===x.m&&(h=Object(m.a)("zoom-out")),f&&(h=Object(m.a)("grabbing"));var d=[x.k,x.l,x.m].indexOf(i)>=0;return d=d||f,u.a.createElement("div",{style:k({position:"relative",width:a.viewerWidth,height:a.viewerHeight},t.style),className:this.props.className},u.a.createElement("svg",{ref:function(t){return e.ViewerDOM=t},width:a.viewerWidth,height:a.viewerHeight,style:this.getSvgStyle(h),onMouseDown:function(t){var n=Object(p.c)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onMouseMove:function(t){var n=e.ViewerDOM.getBoundingClientRect(),r=n.left,o=n.top,i=t.clientX-Math.round(r),a=t.clientY-Math.round(o),u=Object(p.e)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props,{x:i,y:a});e.getValue()!==u&&e.setValue(u),e.setState({viewerX:i,viewerY:a}),e.handleViewerEvent(t)},onMouseUp:function(t){var n=Object(p.f)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onClick:function(t){e.handleViewerEvent(t)},onDoubleClick:function(t){var n=Object(p.a)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onWheel:function(t){var n=Object(p.g)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n)},onMouseEnter:function(t){if(!Object(j.a)()){var n=Object(p.d)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n)}},onMouseLeave:function(t){var n=Object(p.d)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n)},onTouchStart:function(t){var n=Object(b.d)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onTouchMove:function(t){var n=Object(b.c)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onTouchEnd:function(t){var n=Object(b.b)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onTouchCancel:function(t){var n=Object(b.a)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)}},u.a.createElement("rect",{fill:t.background,x:0,y:0,width:a.viewerWidth,height:a.viewerHeight,style:{pointerEvents:"none"}}),u.a.createElement("g",{transform:Object(l.toSVG)(a),style:d?{pointerEvents:"none"}:{}},u.a.createElement("rect",{fill:this.props.SVGBackground,style:this.props.SVGStyle,x:0,y:0,width:a.SVGWidth,height:a.SVGHeight}),u.a.createElement("g",null,t.children.props.children)),[x.j,x.i].indexOf(i)>=0&&t.detectAutoPan&&a.focus?u.a.createElement("g",{style:{pointerEvents:"none"}},o<=20?u.a.createElement(y.a,{direction:x.h,width:a.viewerWidth,height:a.viewerHeight}):null,a.viewerWidth-r<=20?u.a.createElement(y.a,{direction:x.g,width:a.viewerWidth,height:a.viewerHeight}):null,a.viewerHeight-o<=20?u.a.createElement(y.a,{direction:x.d,width:a.viewerWidth,height:a.viewerHeight}):null,a.focus&&r<=20?u.a.createElement(y.a,{direction:x.e,width:a.viewerWidth,height:a.viewerHeight}):null):null,a.mode!==x.c?null:u.a.createElement(O.a,{startX:a.startX,startY:a.startY,endX:a.endX,endY:a.endY})),t.toolbarPosition===x.f?null:u.a.createElement(c,{position:t.toolbarPosition,value:a,onChangeValue:function(t){return e.setValue(t)},tool:i,onChangeTool:function(t){return e.changeTool(t)}}),t.miniaturePosition===x.f?null:u.a.createElement(s,{position:t.miniaturePosition,value:a,onChangeValue:function(t){return e.setValue(t)},SVGBackground:this.props.SVGBackground,background:this.props.miniatureBackground,width:this.props.miniatureWidth,height:this.props.miniatureHeight},t.children.props.children))}}]),t}(u.a.Component);t.a=P,P.propTypes={width:s.a.number.isRequired,height:s.a.number.isRequired,background:s.a.string,SVGBackground:s.a.string,SVGStyle:s.a.object,value:s.a.shape({version:s.a.oneOf([2]).isRequired,mode:s.a.oneOf([x.a,x.b,x.c]).isRequired,focus:s.a.bool.isRequired,a:s.a.number.isRequired,b:s.a.number.isRequired,c:s.a.number.isRequired,d:s.a.number.isRequired,e:s.a.number.isRequired,f:s.a.number.isRequired,viewerWidth:s.a.number.isRequired,viewerHeight:s.a.number.isRequired,SVGWidth:s.a.number.isRequired,SVGHeight:s.a.number.isRequired,startX:s.a.number,startY:s.a.number,endX:s.a.number,endY:s.a.number,miniatureOpen:s.a.bool.isRequired}),style:s.a.object,className:s.a.string,detectWheel:s.a.bool,detectAutoPan:s.a.bool,detectPinchGesture:s.a.bool,toolbarPosition:s.a.oneOf([x.f,x.h,x.g,x.d,x.e]),onChangeValue:s.a.func,onChangeTool:s.a.func,onClick:s.a.func,onDoubleClick:s.a.func,onMouseUp:s.a.func,onMouseMove:s.a.func,onMouseDown:s.a.func,preventPanOutside:s.a.bool,scaleFactor:s.a.number,scaleFactorOnWheel:s.a.number,scaleFactorMax:s.a.number,scaleFactorMin:s.a.number,tool:s.a.oneOf([x.i,x.j,x.k,x.l,x.m]),modifierKeys:s.a.array,customToolbar:s.a.oneOfType([s.a.element,s.a.func]),miniaturePosition:s.a.oneOf([x.f,x.g,x.e]),miniatureBackground:s.a.string,miniatureWidth:s.a.number,miniatureHeight:s.a.number,customMiniature:s.a.oneOfType([s.a.element,s.a.func]),disableDoubleClickZoomWithToolAuto:s.a.bool,children:function(e,t,n){var r=e[t],o=["svg"];return 1!==u.a.Children.count(r)||-1===o.indexOf(r.type)?new Error("`"+n+"` should have a single child of the following types: `"+o.join("`, `")+"`."):r.props.hasOwnProperty("width")&&r.props.hasOwnProperty("height")?void 0:new Error("SVG should have props `width` and `height`")}},P.defaultProps={value:null,tool:null,style:{},background:"#616264",SVGBackground:"#fff",SVGStyle:{},detectWheel:!0,detectAutoPan:!0,detectPinchGesture:!0,toolbarPosition:x.g,modifierKeys:["Alt","Shift","Control"],customToolbar:w.a,preventPanOutside:!0,scaleFactor:1.1,scaleFactorOnWheel:1.06,miniaturePosition:x.e,miniatureWidth:100,miniatureHeight:80,miniatureBackground:"#616264",customMiniature:V.a,disableZoomWithToolAuto:!1}},function(e,t,n){"use strict";var r=n(16),o=n(17);t.a=function(e,t,n){var i=e.type;switch(i){case"mousemove":case"mouseup":case"mousedown":case"click":case"dblclick":return new r.a(e,t,n);case"touchstart":case"touchmove":case"touchend":case"touchcancel":return new o.a(e,t,n);default:throw new Error(i+" not supported")}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),u=n(8),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"point",get:function(){if(!this._cachePoint){var e=this.originalEvent,t=this.value,n=this.SVGViewer,r=n.getBoundingClientRect(),o=e.clientX-Math.round(r.left),i=e.clientY-Math.round(r.top);this._cachePoint=Object(a.c)(t,o,i)}return this._cachePoint}},{key:"x",get:function(){return this.point.x}},{key:"y",get:function(){return this.point.y}}]),t}(u.a);t.a=s},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),u=n(8),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),s(t,[{key:"points",get:function(){return this._cachePoints||(this._cachePoints=t.touchesToPoints(this.originalEvent.touches,this.SVGViewer,this.value)),this._cachePoints}},{key:"changedPoints",get:function(){return this._cacheChangedPoints||(this._cacheChangedPoints=t.touchesToPoints(this.originalEvent.changedTouches,this.SVGViewer,this.value)),this._cacheChangedPoints}}],[{key:"touchesToPoints",value:function(e,t,n){for(var r=[],o=0;o<e.length;o++){var i=e[o],u=t.getBoundingClientRect(),s=i.clientX-Math.round(u.left),l=i.clientY-Math.round(u.top),f=Object(a.c)(n,s,l);r.push(c({},f,{identifier:i.identifier}))}return r}}]),t}(u.a);t.a=l},function(e,t,n){"use strict";function r(e,t,n,r,o){return r+(o-r)*(e-t)/(n-t)}t.a=r},function(e,t,n){"use strict";function r(e){return"number"==typeof e.pinchPointDistance}function o(e,t,n,o,i){var a=t.getBoundingClientRect(),u=a.left,c=a.top,s=e.touches[0].clientX-Math.round(u),l=e.touches[0].clientY-Math.round(c),f=e.touches[1].clientX-Math.round(u),h=e.touches[1].clientY-Math.round(c),v=Math.sqrt(Math.pow(f-s,2)+Math.pow(h-l,2)),y=r(o)?o.pinchPointDistance:v,O=Object(b.c)(o,(s+f)/2,(l+h)/2),w=v/y;if(Object(g.c)(o,w))return o;e.cancelable&&e.preventDefault();var j=Object(d.transform)(Object(d.fromObject)(o),Object(d.translate)(O.x,O.y),Object(d.scale)(w,w),Object(d.translate)(-O.x,-O.y));return Object(b.f)(o,Object(b.f)(m({mode:p.c},Object(g.d)(o,j),{startX:null,startY:null,endX:null,endY:null,prePinchMode:o.prePinchMode?o.prePinchMode:o.mode,pinchPointDistance:v})))}function i(e,t){return t.detectPinchGesture&&e.touches.length>1}function a(e,t,n){return n.detectPinchGesture&&r(t)&&e.touches.length<2}function u(e,t){var n=t.getBoundingClientRect(),r=n.left,o=n.top;return{x:e.clientX-Math.round(r),y:e.clientY-Math.round(o)}}function c(e,t,n,r,o,i){var a=0===e.touches.length?Object(b.f)(r,{mode:r.prePinchMode?p.a:r.mode,prePinchMode:null}):r,c=e.touches.length>0?e.touches[0]:e.changedTouches[0],s=u(c,t);switch(n){case p.m:case p.l:case p.i:case p.k:return e.stopPropagation(),e.preventDefault(),i(e,t,n,a,o,s);default:return a}}function s(e,t,n,r,a){if(i(e,a))return o(e,t,n,r,a);if(1!==e.touches.length){if([p.b,p.c].indexOf(r.mode)>=0)return Object(b.e)(r);if([p.a].indexOf(r.mode)>=0)return r}return c(e,t,n,r,a,v.c)}function l(e,t,n,r,a){return i(e,a)?o(e,t,n,r,a):[p.b,p.c].indexOf(r.mode)>=0?c(e,t,n,r,a,v.e):r}function f(e,t,n,r,o){if(!([p.b,p.c].indexOf(r.mode)>=0))return r;var i=a(e,r,o)?Object(b.f)(r,{pinchPointDistance:null}):r;return e.touches.length>0?i:c(e,t,n,i,o,v.f)}function h(e,t,n,r,o){return e.stopPropagation(),e.preventDefault(),Object(b.e)(r)}t.d=s,t.c=l,t.b=f,t.a=h;var d=n(4),p=(n.n(d),n(1)),b=n(2),v=n(9),g=n(5),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){"use strict";var r=function(e){return["zoom-in","zoom-out","grab","grabbing"].indexOf(e)>-1},o=function(){return navigator.userAgent.toLowerCase()},i=function(){return o().indexOf("firefox")>-1},a=function(){return o().indexOf("webkit")>-1};t.a=function(e){return r(e)?i()?"-moz-"+e:a()?"-webkit-"+e:void 0:e}},function(e,t,n){"use strict";function r(e){var t=e.direction,n=e.width,r=e.height,o=void 0;switch(t){case c.h:o="translate("+n+", 0) rotate(90)";break;case c.g:o="translate("+n+", "+r+") rotate(180)";break;case c.d:o="translate(0, "+r+") rotate(270)";break;case c.e:o=" "}return i.a.createElement("g",null,i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:"react-svg-pan-zoom-gradient1",x1:"0%",y1:"0%",x2:"100%",y2:"0%",spreadMethod:"pad"},i.a.createElement("stop",{offset:"0%",stopColor:"#fff",stopOpacity:"0.8"}),i.a.createElement("stop",{offset:"100%",stopColor:"#000",stopOpacity:"0.5"})),i.a.createElement("mask",{id:"react-svg-pan-zoom-mask1",x:"0",y:"0",width:"20",height:Math.max(n,r)},i.a.createElement("rect",{x:"0",y:"0",width:"20",height:Math.max(n,r),style:{stroke:"none",fill:"url(#react-svg-pan-zoom-gradient1)"}}))),i.a.createElement("rect",{x:"0",y:"0",width:"20",height:Math.max(n,r),style:{stroke:"none",fill:"#000",mask:"url(#react-svg-pan-zoom-mask1)"},transform:o}))}t.a=r;var o=n(0),i=n.n(o),a=n(3),u=n.n(a),c=n(1);r.propTypes={direction:u.a.oneOf([c.h,c.g,c.d,c.e]).isRequired,width:u.a.number.isRequired,height:u.a.number.isRequired}},function(e,t,n){"use strict";function r(e){var t=e.startX,n=e.startY,r=e.endX,o=e.endY;if(!(t&&n&&r&&o))return null;var a=Object(c.a)({x:t,y:n},{x:r,y:o});return i.a.createElement("rect",{stroke:"#969FFF",strokeOpacity:.7,fill:"#F3F4FF",fillOpacity:.7,x:a.x,y:a.y,width:a.width,height:a.height,style:{pointerEvents:"none"}})}t.a=r;var o=n(0),i=n.n(o),a=n(3),u=n.n(a),c=n(10);r.propTypes={startX:u.a.number.isRequired,startY:u.a.number.isRequired,endX:u.a.number.isRequired,endY:u.a.number.isRequired}},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("path",{d:"M10.07,14.27C10.57,14.03 11.16,14.25 11.4,14.75L13.7,19.74L15.5,18.89L13.19,13.91C12.95,13.41 13.17,12.81 13.67,12.58L13.95,12.5L16.25,12.05L8,5.12V15.9L9.82,14.43L10.07,14.27M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z"}))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("path",{d:"M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z"}))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("g",null,i.a.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),i.a.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"}))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("path",{d:"M15 3l2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3zm6 12l-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6zm12-6l-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6z"}))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),u=n.n(a),c=n(3),s=n.n(c),l=n(1),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={hover:!1},n}return i(t,e),f(t,[{key:"change",value:function(e){switch(e.preventDefault(),e.stopPropagation(),e.type){case"mouseenter":case"touchstart":this.setState({hover:!0});break;case"mouseleave":case"touchend":case"touchcancel":this.setState({hover:!1})}}},{key:"render",value:function(){var e=this,t={display:"block",width:"24px",height:"24px",margin:[l.h,l.d].indexOf(this.props.toolbarPosition)>=0?"2px 1px":"1px 2px",color:this.props.active||this.state.hover?"#1CA6FC":"#FFF",transition:"color 200ms ease",background:"none",padding:"0px",border:"0px",outline:"0px",cursor:"pointer"};return u.a.createElement("button",{onMouseEnter:function(t){return e.change(t)},onMouseLeave:function(t){return e.change(t)},onTouchStart:function(t){e.change(t),e.props.onClick(t)},onTouchEnd:function(t){return e.change(t)},onTouchCancel:function(t){return e.change(t)},onClick:this.props.onClick,style:t,title:this.props.title,name:this.props.name,role:"button"},this.props.children)}}]),t}(u.a.Component);t.a=h,h.propTypes={title:s.a.string.isRequired,name:s.a.string.isRequired,toolbarPosition:s.a.string.isRequired,onClick:s.a.func.isRequired,active:s.a.bool.isRequired}},function(e,t,n){"use strict";function r(){return"ontouchstart"in window||navigator.maxTouchPoints}t.a=r},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t,n=e.value,o=e.onChangeValue,i=e.position,u=(t={width:"24px",height:"24px",display:"block",position:"absolute",bottom:0},r(t,i===f.e?"left":"right","0px"),r(t,"background","rgba(19, 20, 22, 0.901961)"),r(t,"border",0),r(t,"padding",0),r(t,"outline",0),r(t,"color","#fff"),t),c=n.miniatureOpen?s.a:s.b;return a.a.createElement("button",{role:"button",style:u,onClick:function(e){return o(c(n))}},a.a.createElement(l.a,{open:n.miniatureOpen,position:i}))}t.a=o;var i=n(0),a=n.n(i),u=n(3),c=n.n(u),s=n(7),l=n(31),f=n(1);o.propTypes={value:c.a.object.isRequired,onChangeValue:c.a.func.isRequired,position:c.a.oneOf([f.g,f.e]).isRequired}},function(e,t,n){"use strict";function r(e){var t=e.open,n=e.position,r=0;switch(n){case c.e:r=t?"rotate(225, 12, 13)":"rotate(45, 12, 13)";break;case c.g:r=r=t?"rotate(135, 12, 13)":"rotate(-45, 12, 13)"}return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("g",{transform:r},i.a.createElement("path",{fill:"#000000",d:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"})))}t.a=r;var o=n(0),i=n.n(o),a=n(3),u=n.n(a),c=n(1);r.propTypes={open:u.a.bool.isRequired,position:u.a.oneOf([c.g,c.e]).isRequired}},function(e,t,n){"use strict";function r(e){var t=e.SVGWidth,n=e.SVGHeight,r=e.x1,o=e.y1,a=e.x2,u=e.y2;e.zoomToFit;return i.a.createElement("g",null,i.a.createElement("defs",null,i.a.createElement("mask",{id:"react-svg-pan-zoom-miniature-mask"},i.a.createElement("rect",{x:"0",y:"0",width:t,height:n,fill:"#ffffff"}),i.a.createElement("rect",{x:r,y:o,width:a-r,height:u-o}))),i.a.createElement("rect",{x:"0",y:"0",width:t,height:n,style:{stroke:"none",fill:"#000",mask:"url(#react-svg-pan-zoom-miniature-mask)",opacity:.4}}))}t.a=r;var o=n(0),i=n.n(o),a=n(3),u=n.n(a);r.propTypes={SVGWidth:u.a.number.isRequired,SVGHeight:u.a.number.isRequired,x1:u.a.number.isRequired,y1:u.a.number.isRequired,x2:u.a.number.isRequired,y2:u.a.number.isRequired,zoomToFit:u.a.number.isRequired}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.ReactSVGPanZoom=t(require("react"),require("prop-types")):e.ReactSVGPanZoom=t(e.React,e.PropTypes)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=14)}([function(t,n){t.exports=e},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return i}),n.d(t,"i",function(){return a}),n.d(t,"j",function(){return u}),n.d(t,"k",function(){return c}),n.d(t,"l",function(){return l}),n.d(t,"m",function(){return s}),n.d(t,"f",function(){return f}),n.d(t,"h",function(){return h}),n.d(t,"g",function(){return d}),n.d(t,"d",function(){return p}),n.d(t,"e",function(){return b});var r="idle",o="panning",i="zooming",a="auto",u="none",c="pan",l="zoom-in",s="zoom-out",f="none",h="top",d="right",p="bottom",b="left"},function(e,t,n){"use strict";function r(e,t,n,r){return o({},v({},Object(b.identity)(),{version:2,mode:p.a,focus:!1,pinchPointDistance:null,prePinchMode:null,viewerWidth:e,viewerHeight:t,SVGWidth:n,SVGHeight:r,startX:null,startY:null,endX:null,endY:null,miniatureOpen:!0}))}function o(e,t){return e=Object.assign({},e,t),Object.freeze(e)}function i(e,t,n){var r=Object(b.fromObject)(e),o=Object(b.inverse)(r);return Object(b.applyToPoint)(o,{x:t,y:n})}function a(e){var t=Object(b.fromObject)(e);return{scaleFactor:t.a,translationX:t.e,translationY:t.f}}function u(e,t){return o(e,{focus:t})}function c(e,t,n){return o(e,{viewerWidth:t,viewerHeight:n})}function l(e,t,n){return o(e,{SVGWidth:t,SVGHeight:n})}function s(e,t,n){return o(e,{scaleFactorMin:t,scaleFactorMax:n})}function f(e,t,n,r){var i=e.viewerWidth,a=e.viewerHeight,u=Object(b.transform)(Object(b.translate)(i/2-t,a/2-n),Object(b.translate)(t,n),Object(b.scale)(r,r),Object(b.translate)(-t,-n));return o(e,v({mode:p.a},u))}function h(e){return o(e,v({mode:p.a},Object(b.identity)()))}function d(e){return o(e,{mode:p.a,startX:null,startY:null,endX:null,endY:null})}t.b=r,t.f=o,t.c=i,t.a=a,t.g=u,t.j=c,t.i=l,t.k=s,t.h=f,t.d=h,t.e=d;var p=n(1),b=n(4),v=(n.n(b),"function"==typeof Symbol&&Symbol.iterator,Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e})},function(e,n){e.exports=t},function(e,t,n){!function(t,n){e.exports=n()}("undefined"!=typeof self&&self,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t,n){"use strict";function r(e){return void 0===e}t.a=r},function(e,t,n){"use strict";function r(e){return{a:1,c:0,e:e,b:0,d:1,f:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0}}t.a=r},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e){return Array.isArray(e)?e:Array.from(e)}function i(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];t=Array.isArray(t[0])?t[0]:t;var a=function(e,t){return{a:e.a*t.a+e.c*t.b,c:e.a*t.c+e.c*t.d,e:e.a*t.e+e.c*t.f+e.e,b:e.b*t.a+e.d*t.b,d:e.b*t.c+e.d*t.d,f:e.b*t.e+e.d*t.f+e.f}};switch(t.length){case 0:throw new Error("no matrices provided");case 1:return t[0];case 2:return a(t[0],t[1]);default:var u=t,c=o(u),l=c[0],s=c[1],f=c.slice(2),h=a(l,s);return i.apply(void 0,[h].concat(r(f)))}}t.a=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4);n.d(t,"applyToPoint",function(){return r.a}),n.d(t,"applyToPoints",function(){return r.b});var o=n(5);n.d(t,"fromObject",function(){return o.a});var i=n(6);n.d(t,"fromString",function(){return i.a});var a=n(7);n.d(t,"identity",function(){return a.a});var u=n(8);n.d(t,"inverse",function(){return u.a});var c=n(9);n.d(t,"isAffineMatrix",function(){return c.a});var l=n(10);n.d(t,"rotate",function(){return l.a}),n.d(t,"rotateDEG",function(){return l.b});var s=n(11);n.d(t,"scale",function(){return s.a});var f=n(12);n.d(t,"shear",function(){return f.a});var h=n(13);n.d(t,"toCSS",function(){return h.a}),n.d(t,"toSVG",function(){return h.b}),n.d(t,"toString",function(){return h.c});var d=n(2);n.d(t,"transform",function(){return d.a});var p=n(1);n.d(t,"translate",function(){return p.a})},function(e,t,n){"use strict";function r(e,t){return{x:e.a*t.x+e.c*t.y+e.e,y:e.b*t.x+e.d*t.y+e.f}}function o(e,t){return t.map(function(t){return r(e,t)})}t.a=r,t.b=o},function(e,t,n){"use strict";function r(e){return{a:parseFloat(e.a),b:parseFloat(e.b),c:parseFloat(e.c),d:parseFloat(e.d),e:parseFloat(e.e),f:parseFloat(e.f)}}t.a=r},function(e,t,n){"use strict";function r(e){var t=e.match(o);if(null===t||t.length<7)throw new Error("'"+e+"' is not a matrix");return{a:parseFloat(t[1]),b:parseFloat(t[2]),c:parseFloat(t[3]),d:parseFloat(t[4]),e:parseFloat(t[5]),f:parseFloat(t[6])}}t.a=r;var o=/^matrix\(\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*,\s*(-?[0-9]*\.?[0-9]+)\s*\)$/i},function(e,t,n){"use strict";function r(){return{a:1,c:0,e:0,b:0,d:1,f:0}}t.a=r},function(e,t,n){"use strict";function r(e){var t=e.a,n=e.b,r=e.c,o=e.d,i=e.e,a=e.f,u=t*o-n*r;return{a:o/u,b:n/-u,c:r/-u,d:t/u,e:(o*i-r*a)/-u,f:(n*i-t*a)/u}}t.a=r},function(e,t,n){"use strict";function r(e){var t=function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)};return"object"===(void 0===e?"undefined":o(e))&&e.hasOwnProperty("a")&&t(e.a)&&e.hasOwnProperty("b")&&t(e.b)&&e.hasOwnProperty("c")&&t(e.c)&&e.hasOwnProperty("d")&&t(e.d)&&e.hasOwnProperty("e")&&t(e.e)&&e.hasOwnProperty("f")&&t(e.f)}t.a=r;var o="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}},function(e,t,n){"use strict";function r(e,t,n){var r=c(e),o=l(e),s={a:r,c:-o,e:0,b:o,d:r,f:0};return Object(i.a)(t)||Object(i.a)(n)?s:Object(u.a)([Object(a.a)(t,n),s,Object(a.a)(-t,-n)])}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return r(e*s/180,t,n)}t.a=r,t.b=o;var i=n(0),a=n(1),u=n(2),c=Math.cos,l=Math.sin,s=Math.PI},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return Object(o.a)(t)&&(t=e),{a:e,c:0,e:0,b:0,d:t,f:0}}t.a=r;var o=n(0)},function(e,t,n){"use strict";function r(e,t){return{a:1,c:e,e:0,b:t,d:1,f:0}}t.a=r},function(e,t,n){"use strict";function r(e){return i(e)}function o(e){return i(e)}function i(e){return"matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")"}t.a=r,t.b=o,t.c=i}])})},function(e,t,n){"use strict";function r(e,t){return e.scaleFactorMin&&e.d*t<=e.scaleFactorMin}function o(e,t){return e.scaleFactorMax&&e.d*t>=e.scaleFactorMax}function i(e,t){return r(e,t)&&t<1||o(e,t)&&t>1}function a(e,t){var n=t.a;return null!=e.scaleFactorMin&&(n=Math.max(n,e.scaleFactorMin)),null!=e.scaleFactorMax&&(n=Math.min(n,e.scaleFactorMax)),Object(v.f)(t,{a:n,d:n})}function u(e,t,n,r){if(i(e,r))return e;var o=Object(p.transform)(Object(p.fromObject)(e),Object(p.translate)(t,n),Object(p.scale)(r,r),Object(p.translate)(-t,-n));return Object(v.f)(e,m({mode:b.a},a(e,o),{startX:null,startY:null,endX:null,endY:null}))}function c(e,t,n,r,o){var u=e.viewerWidth,c=e.viewerHeight,l=u/r,s=c/o,f=Math.min(l,s),h=Object(p.transform)(Object(p.scale)(f,f),Object(p.translate)(-t,-n));return i(e,f/e.d)?Object(v.f)(e,{mode:b.a,startX:null,startY:null,endX:null,endY:null}):Object(v.f)(e,m({mode:b.a},a(e,h),{startX:null,startY:null,endX:null,endY:null}))}function l(e){return c(e,0,0,e.SVGWidth,e.SVGHeight)}function s(e,t){var n=e.viewerWidth,r=e.viewerHeight,o=Object(v.c)(e,n/2,r/2);return u(e,o.x,o.y,t)}function f(e,t,n){return Object(v.f)(e,{mode:b.c,startX:t,startY:n,endX:t,endY:n})}function h(e,t,n){if(e.mode!==b.c)throw new Error("update selection not allowed in this mode "+e.mode);return Object(v.f)(e,{endX:t,endY:n})}function d(e,t,n,r,o){var i=e.startX,a=e.startY,l=e.endX,s=e.endY,f=Object(v.c)(e,i,a),h=Object(v.c)(e,l,s);if(Math.abs(i-l)>7&&Math.abs(a-s)>7){var d=Object(g.a)(f,h);return c(e,d.x,d.y,d.width,d.height)}var p=Object(v.c)(e,t,n);return u(e,p.x,p.y,r,o)}t.c=i,t.d=a,t.h=u,t.a=c,t.b=l,t.i=s,t.e=f,t.g=h,t.f=d;var p=n(4),b=(n.n(p),n(1)),v=n(2),g=n(10),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){"use strict";function r(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,o=Object(s.transform)(Object(s.fromObject)(e),Object(s.translate)(t,n));if(r){var i=Object(s.applyToPoints)(o,[{x:r,y:r},{x:e.SVGWidth-r,y:e.SVGHeight-r}]),a=h(i,2),u=a[0],d=u.x,p=u.y,b=a[1],v=b.x,g=b.y,m=0;e.viewerWidth-d<0?m=e.viewerWidth-d:v<0&&(m=-v);var y=0;e.viewerHeight-p<0?y=e.viewerHeight-p:g<0&&(y=-g),o=Object(s.transform)(Object(s.translate)(m,y),o)}return Object(l.f)(e,f({mode:c.a},o))}function o(e,t,n){return Object(l.f)(e,{mode:c.b,startX:t,startY:n,endX:t,endY:n})}function i(e,t,n,o){if(e.mode!==c.b)throw new Error("update pan not allowed in this mode "+e.mode);var i=e.endX,a=e.endY,u=Object(l.c)(e,i,a),s=Object(l.c)(e,t,n),f=s.x-u.x,h=s.y-u.y,d=r(e,f,h,o);return Object(l.f)(d,{mode:c.b,endX:t,endY:n})}function a(e){return Object(l.f)(e,{mode:c.a,startX:null,startY:null,endX:null,endY:null})}function u(e,t,n){var o=0,i=0;return n<=20&&(i=2),e.viewerWidth-t<=20&&(o=-2),e.viewerHeight-n<=20&&(i=-2),t<=20&&(o=2),o/=e.d,i/=e.d,0===o&&0===i?e:r(e,o,i)}t.b=r,t.c=o,t.e=i,t.d=a,t.a=u;var c=n(1),l=n(2),s=n(4),f=(n.n(s),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),h=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){"use strict";function r(e){return Object(i.f)(e,{miniatureOpen:!0})}function o(e){return Object(i.f)(e,{miniatureOpen:!1})}t.b=r,t.a=o;var i=n(2)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(2),i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t,n,o){r(this,e),this.originalEvent=t,this.value=n,this.SVGViewer=o}return i(e,[{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"scaleFactor",get:function(){return this._cacheDecomposedValue=this._cacheDecomposedValue||Object(o.a)(this.value),this._cacheDecomposedValue.scaleFactor}},{key:"translationX",get:function(){return this._cacheDecomposedValue=this._cacheDecomposedValue||Object(o.a)(this.value),this._cacheDecomposedValue.translationX}},{key:"translationY",get:function(){return this._cacheDecomposedValue=this._cacheDecomposedValue||Object(o.a)(this.value),this._cacheDecomposedValue.translationY}}]),e}();t.a=a},function(e,t,n){"use strict";function r(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),l=c.left,p=c.top;a=e.clientX-Math.round(l),u=e.clientY-Math.round(p)}var b=r;switch(n){case s.m:var v=Object(f.c)(r,a,u);b=Object(d.h)(r,v.x,v.y,1/o.scaleFactor,o);break;case s.l:b=Object(d.e)(r,a,u);break;case s.i:case s.k:b=Object(h.c)(r,a,u);break;default:return r}return e.preventDefault(),b}function o(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),l=c.left,f=c.top;a=e.clientX-Math.round(l),u=e.clientY-Math.round(f)}var p=0===e.buttons,b=r;switch(n){case s.l:r.mode===s.c&&(b=p?Object(d.f)(r,a,u,o.scaleFactor,o):Object(d.g)(r,a,u));break;case s.i:case s.k:r.mode===s.b&&(b=p?Object(h.d)(r):Object(h.e)(r,a,u,o.preventPanOutside?20:void 0));break;default:return r}return e.preventDefault(),b}function i(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),l=c.left,f=c.top;a=e.clientX-Math.round(l),u=e.clientY-Math.round(f)}var p=r;switch(n){case s.m:r.mode===s.c&&(p=Object(d.f)(r,a,u,1/o.scaleFactor,o));break;case s.l:r.mode===s.c&&(p=Object(d.f)(r,a,u,o.scaleFactor,o));break;case s.i:case s.k:r.mode===s.b&&(p=Object(h.d)(r,a,u));break;default:return r}return e.preventDefault(),p}function a(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),l=c.left,h=c.top;a=e.clientX-Math.round(l),u=e.clientY-Math.round(h)}var p=r;switch(n){case s.i:if(!o.disableDoubleClickZoomWithToolAuto){var b=Object(f.c)(r,a,u),v=function(t,n){return t||e.getModifierState(n)},g=o.modifierKeys.reduce(v,!1),m=g?1/o.scaleFactor:o.scaleFactor;p=Object(d.h)(r,b.x,b.y,m,o)}break;default:return r}return e.preventDefault(),p}function u(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=void 0,u=void 0;if(i)a=i.x,u=i.y;else{var c=t.getBoundingClientRect(),l=c.left,s=c.top;a=e.clientX-Math.round(l),u=e.clientY-Math.round(s)}if(!o.detectWheel)return r;var h=Math.max(-1,Math.min(1,e.deltaY)),b=Object(p.a)(h,-1,1,o.scaleFactorOnWheel,1/o.scaleFactorOnWheel),v=Object(f.c)(r,a,u),g=Object(d.h)(r,v.x,v.y,b,o);return e.preventDefault(),g}function c(e,t,n,r,o){var i=(arguments.length>5&&void 0!==arguments[5]&&arguments[5],Object(f.g)(r,"mouseenter"===e.type));return e.preventDefault(),i}function l(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,a=i.x,u=i.y;return[s.j,s.i].indexOf(n)>=0&&o.detectAutoPan&&r.focus?Object(h.a)(r,a,u):r}t.c=r,t.e=o,t.f=i,t.a=a,t.g=u,t.d=c,t.b=l;var s=n(1),f=n(2),h=n(6),d=n(5),p=n(19)},function(e,t,n){"use strict";function r(e,t){return e.x<=t.x&&e.y<=t.y?{x:e.x,y:e.y,width:t.x-e.x,height:t.y-e.y}:e.x>=t.x&&e.y<=t.y?{x:t.x,y:e.y,width:e.x-t.x,height:t.y-e.y}:e.x>=t.x&&e.y>=t.y?{x:t.x,y:t.y,width:e.x-t.x,height:e.y-t.y}:e.x<=t.x&&e.y>=t.y?{x:e.x,y:t.y,width:t.x-e.x,height:e.y-t.y}:void 0}t.a=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){var t=function(t){function n(e){r(this,n);var t=o(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.state={uid:d()},t}return i(n,t),f(n,[{key:"render",value:function(){return c.a.createElement(e,s({_uid:this.state.uid},this.props))}}]),n}(c.a.Component);return t.displayName="RandomUID("+Object(l.a)(e)+")",t}t.a=a;var u=n(0),c=n.n(u),l=n(23),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=1,d=function(){return"uid"+h++}},function(e,t,n){"use strict";function r(e){var t=e.tool,n=e.value,r=e.onChangeValue,o=e.onChangeTool,a=e.position,u=function(e,t){o(t),e.stopPropagation(),e.preventDefault()},v=function(e){r(Object(l.b)(n)),e.stopPropagation(),e.preventDefault()},g=[c.h,c.d].indexOf(a)>=0,m={position:"absolute",transform:[c.h,c.d].indexOf(a)>=0?"translate(-50%, 0px)":"none",top:[c.e,c.g,c.h].indexOf(a)>=0?"5px":"unset",left:[c.h,c.d].indexOf(a)>=0?"50%":c.e===a?"5px":"unset",right:[c.g].indexOf(a)>=0?"5px":"unset",bottom:[c.d].indexOf(a)>=0?"5px":"unset",backgroundColor:"rgba(19, 20, 22, 0.90)",borderRadius:"2px",display:"flex",flexDirection:g?"row":"column",padding:g?"1px 2px":"2px 1px"};return i.a.createElement("div",{style:m,role:"toolbar"},i.a.createElement(b.a,{toolbarPosition:a,active:t===c.j,name:"unselect-tools",title:"Selection",onClick:function(e){return u(e,c.j)}},i.a.createElement(s.a,null)),i.a.createElement(b.a,{toolbarPosition:a,active:t===c.k,name:"select-tool-pan",title:"Pan",onClick:function(e){return u(e,c.k)}},i.a.createElement(f.a,null)),i.a.createElement(b.a,{toolbarPosition:a,active:t===c.l,name:"select-tool-zoom-in",title:"Zoom in",onClick:function(e){return u(e,c.l)}},i.a.createElement(h.a,null)),i.a.createElement(b.a,{toolbarPosition:a,active:t===c.m,name:"select-tool-zoom-out",title:"Zoom out",onClick:function(e){return u(e,c.m)}},i.a.createElement(d.a,null)),i.a.createElement(b.a,{toolbarPosition:a,active:!1,name:"fit-to-viewer",title:"Fit to viewer",onClick:function(e){return v(e)}},i.a.createElement(p.a,null)))}t.a=r;var o=n(0),i=n.n(o),a=n(3),u=n.n(a),c=n(1),l=n(5),s=n(25),f=n(26),h=n(27),d=n(28),p=n(29),b=n(30);r.propTypes={position:u.a.oneOf([c.h,c.g,c.d,c.e]).isRequired,tool:u.a.string.isRequired,value:u.a.object.isRequired,onChangeValue:u.a.func.isRequired,onChangeTool:u.a.func.isRequired}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t,n=e.value,o=e.onChangeValue,i=e.position,u=e.children,c=e.background,p=e.SVGBackground,b=e.width,v=e.height,g=n.SVGWidth,m=n.SVGHeight,y=n.viewerWidth,O=n.viewerHeight,w=m/g,j=w>=1?v/m:b/g,V=Object(s.applyToPoints)(Object(s.inverse)(n),[{x:0,y:0},{x:y,y:O}]),x=d(V,2),P=x[0],k=P.x,M=P.y,E=x[1],T=E.x,C=E.y,S=void 0,_=void 0;n.miniatureOpen?(S=b,_=v):(S=24,_=24);var R=(t={position:"absolute",overflow:"hidden",outline:"1px solid rgba(19, 20, 22, 0.90)",transition:"width 200ms ease, height 200ms ease, bottom 200ms ease",width:S+"px",height:_+"px",bottom:"6px"},r(t,i===l.e?"left":"right","6px"),r(t,"background",c),t),F=w>=1?"translate("+(b-g*j)/2+", 0)":"translate(0, "+(v-m*j)/2+")";return a.a.createElement("div",{role:"navigation",style:R},a.a.createElement("svg",{width:b,height:v,style:{pointerEvents:"none"}},a.a.createElement("g",{transform:F},a.a.createElement("g",{transform:"scale("+j+", "+j+")"},a.a.createElement("rect",{fill:p,x:0,y:0,width:n.SVGWidth,height:n.SVGHeight}),u,a.a.createElement(h.a,{SVGWidth:g,SVGHeight:m,x1:k,y1:M,x2:T,y2:C,zoomToFit:j})))),a.a.createElement(f.a,{value:n,onChangeValue:o,position:i}))}t.a=o;var i=n(0),a=n.n(i),u=n(3),c=n.n(u),l=n(1),s=n(4),f=(n.n(s),n(32)),h=n(34),d=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();Math.min,Math.max;o.propTypes={position:c.a.oneOf([l.g,l.e]).isRequired,value:c.a.object.isRequired,onChangeValue:c.a.func.isRequired,background:c.a.string.isRequired,SVGBackground:c.a.string.isRequired,width:c.a.number.isRequired}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"Viewer",function(){return f});var r=n(15);n.d(t,"ReactSVGPanZoom",function(){return r.a});var o=n(12);n.d(t,"Toolbar",function(){return o.a});var i=n(13);n.d(t,"Miniature",function(){return i.a});var a=n(2);n.d(t,"setPointOnViewerCenter",function(){return a.h}),n.d(t,"reset",function(){return a.d});var u=n(6);n.d(t,"pan",function(){return u.b});var c=n(5);n.d(t,"zoom",function(){return c.h}),n.d(t,"fitSelection",function(){return c.a}),n.d(t,"fitToViewer",function(){return c.b}),n.d(t,"zoomOnViewerCenter",function(){return c.i});var l=n(7);n.d(t,"openMiniature",function(){return l.b}),n.d(t,"closeMiniature",function(){return l.a});var s=n(1);n.d(t,"MODE_IDLE",function(){return s.a}),n.d(t,"MODE_PANNING",function(){return s.b}),n.d(t,"MODE_ZOOMING",function(){return s.c}),n.d(t,"TOOL_AUTO",function(){return s.i}),n.d(t,"TOOL_NONE",function(){return s.j}),n.d(t,"TOOL_PAN",function(){return s.k}),n.d(t,"TOOL_ZOOM_IN",function(){return s.l}),n.d(t,"TOOL_ZOOM_OUT",function(){return s.m}),n.d(t,"POSITION_NONE",function(){return s.f}),n.d(t,"POSITION_TOP",function(){return s.h}),n.d(t,"POSITION_RIGHT",function(){return s.g}),n.d(t,"POSITION_BOTTOM",function(){return s.d}),n.d(t,"POSITION_LEFT",function(){return s.e});var f=function(){return console.error("HEY! You are trying to use an older version of ReactSVGPanZoom. Read here https://github.com/chrvadala/react-svg-pan-zoom/blob/master/docs/migrate-from-v1-to-v2.md"),null}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),u=n.n(a),c=n(3),l=n.n(c),s=n(4),f=(n.n(s),n(16)),h=n(6),d=n(2),p=n(9),b=n(20),v=n(5),g=n(7),m=n(21),y=n(22),O=n(24),w=n(12),j=n(31),V=n(13),x=n(1),P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),M=function(e){function t(e,n){r(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),a=i.props,u=a.tool,c=a.value,l=a.width,s=a.height,f=a.children,h=f.props,p=h.width,b=h.height;return i.state={value:c||Object(d.b)(l,s,p,b),tool:u||x.j},i.ViewerDOM=null,i.autoPanLoop=i.autoPanLoop.bind(i),i}return i(t,e),k(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.getValue(),n=!1,r=t;t.viewerWidth===e.width&&t.viewerHeight===e.height||(r=Object(d.j)(r,e.width,e.height),n=!0);var o=e.children.props,i=o.width,a=o.height;t.SVGWidth===i&&t.SVGHeight===a||(r=Object(d.i)(r,i,a),n=!0),t.scaleFactorMin===e.scaleFactorMin&&t.scaleFactorMax===e.scaleFactorMax||(r=Object(d.k)(r,e.scaleFactorMin,e.scaleFactorMax),n=!0),n&&this.setValue(r)}},{key:"getValue",value:function(){return this.props.value?this.props.value:this.state.value}},{key:"getTool",value:function(){return this.props.tool?this.props.tool:this.state.tool}},{key:"getSvgStyle",value:function(e){var t={display:"block"};return e&&(t.cursor=e),(this.props.detectPinchGesture||-1!==[x.k,x.i].indexOf(this.getTool()))&&(t.touchAction="none"),t}},{key:"setValue",value:function(e){this.setState({value:e}),this.props.onChangeValue&&this.props.onChangeValue(e)}},{key:"pan",value:function(e,t){var n=Object(h.b)(this.getValue(),e,t);this.setValue(n)}},{key:"zoom",value:function(e,t,n){var r=Object(v.h)(this.getValue(),e,t,n);this.setValue(r)}},{key:"fitSelection",value:function(e,t,n,r){var o=Object(v.a)(this.getValue(),e,t,n,r);this.setValue(o)}},{key:"fitToViewer",value:function(){var e=Object(v.b)(this.getValue());this.setValue(e)}},{key:"zoomOnViewerCenter",value:function(e){var t=Object(v.i)(this.getValue(),e);this.setValue(t)}},{key:"setPointOnViewerCenter",value:function(e,t,n){var r=Object(d.h)(this.getValue(),e,t,n);this.setValue(r)}},{key:"reset",value:function(){var e=Object(d.d)(this.getValue());this.setValue(e)}},{key:"changeTool",value:function(e){this.setState({tool:e}),this.props.onChangeTool&&this.props.onChangeTool(e)}},{key:"openMiniature",value:function(){var e=Object(g.b)(this.getValue());this.setValue(e)}},{key:"closeMiniature",value:function(){var e=Object(g.a)(this.getValue());this.setValue(e)}},{key:"handleViewerEvent",value:function(e){var t=this.props,n=this.state.value,r=this.ViewerDOM;if([x.j,x.i].indexOf(this.getTool())>=0&&e.target!==r){var o={click:t.onClick,dblclick:t.onDoubleClick,mousemove:t.onMouseMove,mouseup:t.onMouseUp,mousedown:t.onMouseDown,touchstart:t.onTouchStart,touchmove:t.onTouchMove,touchend:t.onTouchEnd,touchcancel:t.onTouchCancel},i=o[e.type];i&&i(Object(f.a)(e,n,r))}}},{key:"autoPanLoop",value:function(){var e={x:this.state.viewerX,y:this.state.viewerY},t=Object(p.b)(null,this.ViewerDOM,this.getTool(),this.getValue(),this.props,e);this.getValue()!==t&&this.setValue(t),this.autoPanIsRunning&&requestAnimationFrame(this.autoPanLoop)}},{key:"componentDidMount",value:function(){var e=this.props,t=this.state;e.onChangeValue&&e.onChangeValue(t.value),this.autoPanIsRunning=!0,requestAnimationFrame(this.autoPanLoop)}},{key:"componentWillUnmount",value:function(){this.autoPanIsRunning=!1}},{key:"render",value:function(){var e=this,t=this.props,n=this.state,r=n.viewerX,o=n.viewerY,i=this.getTool(),a=this.getValue(),c=t.customToolbar,l=t.customMiniature,f=i===x.i&&a.mode===x.b&&a.startX!==a.endX&&a.startY!==a.endY,h=void 0;i===x.k&&(h=Object(m.a)(a.mode===x.b?"grabbing":"grab")),i===x.l&&(h=Object(m.a)("zoom-in")),i===x.m&&(h=Object(m.a)("zoom-out")),f&&(h=Object(m.a)("grabbing"));var d=[x.k,x.l,x.m].indexOf(i)>=0;return d=d||f,u.a.createElement("div",{style:P({position:"relative",width:a.viewerWidth,height:a.viewerHeight},t.style),className:this.props.className},u.a.createElement("svg",{ref:function(t){return e.ViewerDOM=t},width:a.viewerWidth,height:a.viewerHeight,style:this.getSvgStyle(h),onMouseDown:function(t){var n=Object(p.c)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onMouseMove:function(t){var n=e.ViewerDOM.getBoundingClientRect(),r=n.left,o=n.top,i=t.clientX-Math.round(r),a=t.clientY-Math.round(o),u=Object(p.e)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props,{x:i,y:a});e.getValue()!==u&&e.setValue(u),e.setState({viewerX:i,viewerY:a}),e.handleViewerEvent(t)},onMouseUp:function(t){var n=Object(p.f)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onClick:function(t){e.handleViewerEvent(t)},onDoubleClick:function(t){var n=Object(p.a)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onWheel:function(t){var n=Object(p.g)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n)},onMouseEnter:function(t){if(!Object(j.a)()){var n=Object(p.d)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n)}},onMouseLeave:function(t){var n=Object(p.d)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n)},onTouchStart:function(t){var n=Object(b.d)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onTouchMove:function(t){var n=Object(b.c)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onTouchEnd:function(t){var n=Object(b.b)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)},onTouchCancel:function(t){var n=Object(b.a)(t,e.ViewerDOM,e.getTool(),e.getValue(),e.props);e.getValue()!==n&&e.setValue(n),e.handleViewerEvent(t)}},u.a.createElement("rect",{fill:t.background,x:0,y:0,width:a.viewerWidth,height:a.viewerHeight,style:{pointerEvents:"none"}}),u.a.createElement("g",{transform:Object(s.toSVG)(a),style:d?{pointerEvents:"none"}:{}},u.a.createElement("rect",{fill:this.props.SVGBackground,style:this.props.SVGStyle,x:0,y:0,width:a.SVGWidth,height:a.SVGHeight}),u.a.createElement("g",null,t.children.props.children)),[x.j,x.i].indexOf(i)>=0&&t.detectAutoPan&&a.focus?u.a.createElement("g",{style:{pointerEvents:"none"}},o<=20?u.a.createElement(y.a,{direction:x.h,width:a.viewerWidth,height:a.viewerHeight}):null,a.viewerWidth-r<=20?u.a.createElement(y.a,{direction:x.g,width:a.viewerWidth,height:a.viewerHeight}):null,a.viewerHeight-o<=20?u.a.createElement(y.a,{direction:x.d,width:a.viewerWidth,height:a.viewerHeight}):null,a.focus&&r<=20?u.a.createElement(y.a,{direction:x.e,width:a.viewerWidth,height:a.viewerHeight}):null):null,a.mode!==x.c?null:u.a.createElement(O.a,{startX:a.startX,startY:a.startY,endX:a.endX,endY:a.endY})),t.toolbarPosition===x.f?null:u.a.createElement(c,{position:t.toolbarPosition,value:a,onChangeValue:function(t){return e.setValue(t)},tool:i,onChangeTool:function(t){return e.changeTool(t)}}),t.miniaturePosition===x.f?null:u.a.createElement(l,{position:t.miniaturePosition,value:a,onChangeValue:function(t){return e.setValue(t)},SVGBackground:this.props.SVGBackground,background:this.props.miniatureBackground,width:this.props.miniatureWidth,height:this.props.miniatureHeight},t.children.props.children))}}]),t}(u.a.Component);t.a=M,M.propTypes={width:l.a.number.isRequired,height:l.a.number.isRequired,background:l.a.string,SVGBackground:l.a.string,SVGStyle:l.a.object,value:l.a.shape({version:l.a.oneOf([2]).isRequired,mode:l.a.oneOf([x.a,x.b,x.c]).isRequired,focus:l.a.bool.isRequired,a:l.a.number.isRequired,b:l.a.number.isRequired,c:l.a.number.isRequired,d:l.a.number.isRequired,e:l.a.number.isRequired,f:l.a.number.isRequired,viewerWidth:l.a.number.isRequired,viewerHeight:l.a.number.isRequired,SVGWidth:l.a.number.isRequired,SVGHeight:l.a.number.isRequired,startX:l.a.number,startY:l.a.number,endX:l.a.number,endY:l.a.number,miniatureOpen:l.a.bool.isRequired}),style:l.a.object,className:l.a.string,detectWheel:l.a.bool,detectAutoPan:l.a.bool,detectPinchGesture:l.a.bool,toolbarPosition:l.a.oneOf([x.f,x.h,x.g,x.d,x.e]),onChangeValue:l.a.func,onChangeTool:l.a.func,onClick:l.a.func,onDoubleClick:l.a.func,onMouseUp:l.a.func,onMouseMove:l.a.func,onMouseDown:l.a.func,preventPanOutside:l.a.bool,scaleFactor:l.a.number,scaleFactorOnWheel:l.a.number,scaleFactorMax:l.a.number,scaleFactorMin:l.a.number,tool:l.a.oneOf([x.i,x.j,x.k,x.l,x.m]),modifierKeys:l.a.array,customToolbar:l.a.oneOfType([l.a.element,l.a.func]),miniaturePosition:l.a.oneOf([x.f,x.g,x.e]),miniatureBackground:l.a.string,miniatureWidth:l.a.number,miniatureHeight:l.a.number,customMiniature:l.a.oneOfType([l.a.element,l.a.func]),disableDoubleClickZoomWithToolAuto:l.a.bool,children:function(e,t,n){var r=e[t],o=["svg"];return 1!==u.a.Children.count(r)||-1===o.indexOf(r.type)?new Error("`"+n+"` should have a single child of the following types: `"+o.join("`, `")+"`."):r.props.hasOwnProperty("width")&&r.props.hasOwnProperty("height")?void 0:new Error("SVG should have props `width` and `height`")}},M.defaultProps={value:null,tool:null,style:{},background:"#616264",SVGBackground:"#fff",SVGStyle:{},detectWheel:!0,detectAutoPan:!0,detectPinchGesture:!0,toolbarPosition:x.g,modifierKeys:["Alt","Shift","Control"],customToolbar:w.a,preventPanOutside:!0,scaleFactor:1.1,scaleFactorOnWheel:1.06,miniaturePosition:x.e,miniatureWidth:100,miniatureHeight:80,miniatureBackground:"#616264",customMiniature:V.a,disableZoomWithToolAuto:!1}},function(e,t,n){"use strict";var r=n(17),o=n(18);t.a=function(e,t,n){var i=e.type;switch(i){case"mousemove":case"mouseup":case"mousedown":case"click":case"dblclick":return new r.a(e,t,n);case"touchstart":case"touchmove":case"touchend":case"touchcancel":return new o.a(e,t,n);default:throw new Error(i+" not supported")}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),u=n(8),c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"point",get:function(){if(!this._cachePoint){var e=this.originalEvent,t=this.value,n=this.SVGViewer,r=n.getBoundingClientRect(),o=e.clientX-Math.round(r.left),i=e.clientY-Math.round(r.top);this._cachePoint=Object(a.c)(t,o,i)}return this._cachePoint}},{key:"x",get:function(){return this.point.x}},{key:"y",get:function(){return this.point.y}}]),t}(u.a);t.a=l},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(2),u=n(8),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=function(e){function t(){return r(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),l(t,[{key:"points",get:function(){return this._cachePoints||(this._cachePoints=t.touchesToPoints(this.originalEvent.touches,this.SVGViewer,this.value)),this._cachePoints}},{key:"changedPoints",get:function(){return this._cacheChangedPoints||(this._cacheChangedPoints=t.touchesToPoints(this.originalEvent.changedTouches,this.SVGViewer,this.value)),this._cacheChangedPoints}}],[{key:"touchesToPoints",value:function(e,t,n){for(var r=[],o=0;o<e.length;o++){var i=e[o],u=t.getBoundingClientRect(),l=i.clientX-Math.round(u.left),s=i.clientY-Math.round(u.top),f=Object(a.c)(n,l,s);r.push(c({},f,{identifier:i.identifier}))}return r}}]),t}(u.a);t.a=s},function(e,t,n){"use strict";function r(e,t,n,r,o){return r+(o-r)*(e-t)/(n-t)}t.a=r},function(e,t,n){"use strict";function r(e){return"number"==typeof e.pinchPointDistance}function o(e,t,n,o,i){var a=t.getBoundingClientRect(),u=a.left,c=a.top,l=e.touches[0].clientX-Math.round(u),s=e.touches[0].clientY-Math.round(c),f=e.touches[1].clientX-Math.round(u),h=e.touches[1].clientY-Math.round(c),v=Math.sqrt(Math.pow(f-l,2)+Math.pow(h-s,2)),y=r(o)?o.pinchPointDistance:v,O=Object(b.c)(o,(l+f)/2,(s+h)/2),w=v/y;if(Object(g.c)(o,w))return o;e.cancelable&&e.preventDefault();var j=Object(d.transform)(Object(d.fromObject)(o),Object(d.translate)(O.x,O.y),Object(d.scale)(w,w),Object(d.translate)(-O.x,-O.y));return Object(b.f)(o,Object(b.f)(m({mode:p.c},Object(g.d)(o,j),{startX:null,startY:null,endX:null,endY:null,prePinchMode:o.prePinchMode?o.prePinchMode:o.mode,pinchPointDistance:v})))}function i(e,t){return t.detectPinchGesture&&e.touches.length>1}function a(e,t,n){return n.detectPinchGesture&&r(t)&&e.touches.length<2}function u(e,t){var n=t.getBoundingClientRect(),r=n.left,o=n.top;return{x:e.clientX-Math.round(r),y:e.clientY-Math.round(o)}}function c(e,t,n,r,o,i){var a=0===e.touches.length?Object(b.f)(r,{mode:r.prePinchMode?p.a:r.mode,prePinchMode:null}):r,c=e.touches.length>0?e.touches[0]:e.changedTouches[0],l=u(c,t);switch(n){case p.m:case p.l:case p.i:case p.k:return e.stopPropagation(),e.preventDefault(),i(e,t,n,a,o,l);default:return a}}function l(e,t,n,r,a){if(i(e,a))return o(e,t,n,r,a);if(1!==e.touches.length){if([p.b,p.c].indexOf(r.mode)>=0)return Object(b.e)(r);if([p.a].indexOf(r.mode)>=0)return r}return c(e,t,n,r,a,v.c)}function s(e,t,n,r,a){return i(e,a)?o(e,t,n,r,a):[p.b,p.c].indexOf(r.mode)>=0?c(e,t,n,r,a,v.e):r}function f(e,t,n,r,o){if(!([p.b,p.c].indexOf(r.mode)>=0))return r;var i=a(e,r,o)?Object(b.f)(r,{pinchPointDistance:null}):r;return e.touches.length>0?i:c(e,t,n,i,o,v.f)}function h(e,t,n,r,o){return e.stopPropagation(),e.preventDefault(),Object(b.e)(r)}t.d=l,t.c=s,t.b=f,t.a=h;var d=n(4),p=(n.n(d),n(1)),b=n(2),v=n(9),g=n(5),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}},function(e,t,n){"use strict";var r=function(e){return["zoom-in","zoom-out","grab","grabbing"].indexOf(e)>-1},o=function(){return navigator.userAgent.toLowerCase()},i=function(){return o().indexOf("firefox")>-1},a=function(){return o().indexOf("webkit")>-1};t.a=function(e){return r(e)?i()?"-moz-"+e:a()?"-webkit-"+e:void 0:e}},function(e,t,n){"use strict";function r(e){var t=e.direction,n=e.width,r=e.height,o=e._uid,a=void 0;switch(t){case c.h:a="translate("+n+", 0) rotate(90)";break;case c.g:a="translate("+n+", "+r+") rotate(180)";break;case c.d:a="translate(0, "+r+") rotate(270)";break;case c.e:a=" "}var u=s+"_gradient_"+o,l=s+"_mask_"+o;return i.a.createElement("g",null,i.a.createElement("defs",null,i.a.createElement("linearGradient",{id:u,x1:"0%",y1:"0%",x2:"100%",y2:"0%",spreadMethod:"pad"},i.a.createElement("stop",{offset:"0%",stopColor:"#fff",stopOpacity:"0.8"}),i.a.createElement("stop",{offset:"100%",stopColor:"#000",stopOpacity:"0.5"})),i.a.createElement("mask",{id:l,x:"0",y:"0",width:"20",height:Math.max(n,r)},i.a.createElement("rect",{x:"0",y:"0",width:"20",height:Math.max(n,r),style:{stroke:"none",fill:"url(#"+u+")"}}))),i.a.createElement("rect",{x:"0",y:"0",width:"20",height:Math.max(n,r),style:{stroke:"none",fill:"#000",mask:"url(#"+l+")"},transform:a}))}var o=n(0),i=n.n(o),a=n(3),u=n.n(a),c=n(1),l=n(11),s="react-svg-pan-zoom_border_gradient";r.propTypes={direction:u.a.oneOf([c.h,c.g,c.d,c.e]).isRequired,width:u.a.number.isRequired,height:u.a.number.isRequired},t.a=Object(l.a)(r)},function(e,t,n){"use strict";function r(e){return e.displayName||e.name||"Component"}t.a=r},function(e,t,n){"use strict";function r(e){var t=e.startX,n=e.startY,r=e.endX,o=e.endY;if(!(t&&n&&r&&o))return null;var a=Object(c.a)({x:t,y:n},{x:r,y:o});return i.a.createElement("rect",{stroke:"#969FFF",strokeOpacity:.7,fill:"#F3F4FF",fillOpacity:.7,x:a.x,y:a.y,width:a.width,height:a.height,style:{pointerEvents:"none"}})}t.a=r;var o=n(0),i=n.n(o),a=n(3),u=n.n(a),c=n(10);r.propTypes={startX:u.a.number.isRequired,startY:u.a.number.isRequired,endX:u.a.number.isRequired,endY:u.a.number.isRequired}},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("path",{d:"M10.07,14.27C10.57,14.03 11.16,14.25 11.4,14.75L13.7,19.74L15.5,18.89L13.19,13.91C12.95,13.41 13.17,12.81 13.67,12.58L13.95,12.5L16.25,12.05L8,5.12V15.9L9.82,14.43L10.07,14.27M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z"}))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("path",{d:"M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z"}))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("g",null,i.a.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),i.a.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"}))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(){return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("path",{d:"M15 3l2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3zm6 12l-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6zm12-6l-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6z"}))}t.a=r;var o=n(0),i=n.n(o)},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),u=n.n(a),c=n(3),l=n.n(c),s=n(1),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={hover:!1},n}return i(t,e),f(t,[{key:"change",value:function(e){switch(e.preventDefault(),e.stopPropagation(),e.type){case"mouseenter":case"touchstart":this.setState({hover:!0});break;case"mouseleave":case"touchend":case"touchcancel":this.setState({hover:!1})}}},{key:"render",value:function(){var e=this,t={display:"block",width:"24px",height:"24px",margin:[s.h,s.d].indexOf(this.props.toolbarPosition)>=0?"2px 1px":"1px 2px",color:this.props.active||this.state.hover?"#1CA6FC":"#FFF",transition:"color 200ms ease",background:"none",padding:"0px",border:"0px",outline:"0px",cursor:"pointer"};return u.a.createElement("button",{onMouseEnter:function(t){return e.change(t)},onMouseLeave:function(t){return e.change(t)},onTouchStart:function(t){e.change(t),e.props.onClick(t)},onTouchEnd:function(t){return e.change(t)},onTouchCancel:function(t){return e.change(t)},onClick:this.props.onClick,style:t,title:this.props.title,name:this.props.name,role:"button"},this.props.children)}}]),t}(u.a.Component);t.a=h,h.propTypes={title:l.a.string.isRequired,name:l.a.string.isRequired,toolbarPosition:l.a.string.isRequired,onClick:l.a.func.isRequired,active:l.a.bool.isRequired}},function(e,t,n){"use strict";function r(){return"ontouchstart"in window||navigator.maxTouchPoints}t.a=r},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t,n=e.value,o=e.onChangeValue,i=e.position,u=(t={width:"24px",height:"24px",display:"block",position:"absolute",bottom:0},r(t,i===f.e?"left":"right","0px"),r(t,"background","rgba(19, 20, 22, 0.901961)"),r(t,"border",0),r(t,"padding",0),r(t,"outline",0),r(t,"color","#fff"),t),c=n.miniatureOpen?l.a:l.b;return a.a.createElement("button",{role:"button",style:u,onClick:function(e){return o(c(n))}},a.a.createElement(s.a,{open:n.miniatureOpen,position:i}))}t.a=o;var i=n(0),a=n.n(i),u=n(3),c=n.n(u),l=n(7),s=n(33),f=n(1);o.propTypes={value:c.a.object.isRequired,onChangeValue:c.a.func.isRequired,position:c.a.oneOf([f.g,f.e]).isRequired}},function(e,t,n){"use strict";function r(e){var t=e.open,n=e.position,r=0;switch(n){case c.e:r=t?"rotate(225, 12, 13)":"rotate(45, 12, 13)";break;case c.g:r=r=t?"rotate(135, 12, 13)":"rotate(-45, 12, 13)"}return i.a.createElement("svg",{width:24,height:24,stroke:"currentColor"},i.a.createElement("g",{transform:r},i.a.createElement("path",{fill:"#000000",d:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"})))}t.a=r;var o=n(0),i=n.n(o),a=n(3),u=n.n(a),c=n(1);r.propTypes={open:u.a.bool.isRequired,position:u.a.oneOf([c.g,c.e]).isRequired}},function(e,t,n){"use strict";function r(e){var t=e.SVGWidth,n=e.SVGHeight,r=e.x1,o=e.y1,a=e.x2,u=e.y2,c=(e.zoomToFit,e._uid),s=l+"_mask_"+c;return i.a.createElement("g",null,i.a.createElement("defs",null,i.a.createElement("mask",{id:s},i.a.createElement("rect",{x:"0",y:"0",width:t,height:n,fill:"#ffffff"}),i.a.createElement("rect",{x:r,y:o,width:a-r,height:u-o}))),i.a.createElement("rect",{x:"0",y:"0",width:t,height:n,style:{stroke:"none",fill:"#000",mask:"url(#"+s+")",opacity:.4}}))}var o=n(0),i=n.n(o),a=n(3),u=n.n(a),c=n(11),l="react-svg-pan-zoom_miniature";r.propTypes={SVGWidth:u.a.number.isRequired,SVGHeight:u.a.number.isRequired,x1:u.a.number.isRequired,y1:u.a.number.isRequired,x2:u.a.number.isRequired,y2:u.a.number.isRequired,zoomToFit:u.a.number.isRequired},t.a=Object(c.a)(r)}])});
{
"author": "chrvadala",
"name": "react-svg-pan-zoom",
"version": "2.15.0",
"version": "2.15.1",
"description": "A React component that adds pan and zoom features to SVG",

@@ -6,0 +6,0 @@ "main": "./build-commonjs/index.js",

@@ -47,3 +47,3 @@ # react-svg-pan-zoom

- [**Controlled state**](./examples/2-controlled-state/) - This advanced project show a scenario in which the parent component has a full control of the svg viewer. *The state is owned by the parent* and injected on the viewer throught `props`. Any state change request is performed by two callbacks `onChangeValue(value)` and `onChangeTool(tool)`. This demo apply the same pattern of an `<input>` tag ([React Controlled Components](https://facebook.github.io/react/docs/forms.html#controlled-components)).
- [**Redux**](./examples/3-redux/) - This advanced project show a scenario in which a redux store handle the state. Each component can dispatch a Redux action and edit the current view of the viewer.
- [**Redux**](./examples/3-redux/) - This advanced project show a scenario in which a Redux store handle the state. Each component can dispatch a Redux action and edit the current view of the viewer.
- [**JSFiddle**](https://jsfiddle.net/chrvadala/f67qyfsd/) - This is a JSFiddle demo that uses UMD bundle.

@@ -65,4 +65,5 @@

- **v2.12** - Exports miniature to allow customization
- **v2.13** - Fix resizes issues (#58), Upgrades deps
- **v2.13** - Fixes resize issues (#58), Upgrades deps
- **v2.14** - Introduces prop `scaleFactorOnWheel`, Upgrades deps
- **v2.15** - Improves autopan feature (#71), adds `scaleFactorMax`, `scaleFactorMin` props (#71), Upgrades deps

@@ -69,0 +70,0 @@ ## Some projects using react-svg-pan-zoom

import React from 'react';
import PropTypes from 'prop-types';
import RandomUID from "../utils/RandomUID";
export default function MiniatureMask({SVGWidth, SVGHeight, x1, y1, x2, y2, zoomToFit}) {
const prefixID = 'react-svg-pan-zoom_miniature'
function MiniatureMask({SVGWidth, SVGHeight, x1, y1, x2, y2, zoomToFit, _uid}) {
let maskID = `${prefixID}_mask_${_uid}`
return (
<g>
<defs>
<mask id="react-svg-pan-zoom-miniature-mask">
<mask id={maskID}>
<rect x="0" y="0" width={SVGWidth} height={SVGHeight} fill="#ffffff"/>

@@ -14,14 +19,14 @@ <rect x={x1} y={y1} width={x2 - x1} height={y2 - y1}/>

<rect x="0"
y="0"
width={SVGWidth}
height={SVGHeight}
style={{
stroke: "none",
fill: "#000",
mask: "url(#react-svg-pan-zoom-miniature-mask)",
opacity: 0.4
}}
<rect
x="0"
y="0"
width={SVGWidth}
height={SVGHeight}
style={{
stroke: "none",
fill: "#000",
mask: `url(#${maskID})`,
opacity: 0.4
}}
/>
</g>)

@@ -39,1 +44,3 @@ }

}
export default RandomUID(MiniatureMask)
import React from 'react';
import PropTypes from 'prop-types';
import {POSITION_TOP, POSITION_RIGHT, POSITION_BOTTOM, POSITION_LEFT} from '../constants';
import RandomUID from "../utils/RandomUID";
export default function BorderGradient({direction, width, height}) {
const prefixID = 'react-svg-pan-zoom_border_gradient'
function BorderGradient({direction, width, height, _uid}) {
let transform;

@@ -27,6 +30,9 @@

let gradientID = `${prefixID}_gradient_${_uid}`
let maskID = `${prefixID}_mask_${_uid}`
return (
<g>
<defs>
<linearGradient id="react-svg-pan-zoom-gradient1" x1="0%" y1="0%" x2="100%" y2="0%" spreadMethod="pad">
<linearGradient id={gradientID} x1="0%" y1="0%" x2="100%" y2="0%" spreadMethod="pad">
<stop offset="0%" stopColor="#fff" stopOpacity="0.8"/>

@@ -36,5 +42,5 @@ <stop offset="100%" stopColor="#000" stopOpacity="0.5"/>

<mask id="react-svg-pan-zoom-mask1" x="0" y="0" width="20" height={Math.max(width, height)}>
<mask id={maskID} x="0" y="0" width="20" height={Math.max(width, height)}>
<rect x="0" y="0" width="20" height={Math.max(width, height)}
style={{stroke: "none", fill: "url(#react-svg-pan-zoom-gradient1)"}}/>
style={{stroke: "none", fill: `url(#${gradientID})`}}/>
</mask>

@@ -44,3 +50,3 @@ </defs>

<rect x="0" y="0" width="20" height={Math.max(width, height)}
style={{stroke: "none", fill: "#000", mask: "url(#react-svg-pan-zoom-mask1)"}} transform={transform}/>
style={{stroke: "none", fill: "#000", mask: `url(#${maskID})`}} transform={transform}/>
</g>

@@ -55,1 +61,3 @@ );

};
export default RandomUID(BorderGradient)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc