PageSourceSearch

https://supermarket-museum.vercel.app/_next/static/chunks/280-ba446dfe674a0b640dc5.js

js supermarket-museum.vercel.app collected 2026-10-03 07:49:53 UTC 55,045 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[280],{4376:function(e,t,n){"use strict";n.d(t,{iP:function(){return s}});var r=n(7294);var o=e=>{const t=r.useRef(e);return r.useEffect((()=>{t.current=e})),t};const i=(e,t=100,n=!1)=>{const i=o(e),u=r.useRef(),a=[t,n,i];function c(){u.current&&clearTimeout(u.current),u.current=void 0}function l(){u.current=void 0}return r.useEffect((()=>c),a),r.useCallback((function(){const e=arguments,{current:r}=u;if(void 0===r&&n)return u.current=setTimeout(l,t),i.current.apply(null,e);r&&clearTimeout(r),u.current=setTimeout((()=>{u.current=void 0,i.current.apply(null,e)}),t)}),a)};var u=function(e,t,n,o){const i=r.useRef(n),u=r.useRef(o);r.useEffect((()=>{i.current=n,u.current=o})),r.useEffect((()=>{const n=e&&"current"in e?e.current:e;if(!n)return;let r=0;function o(...e){r||i.current.apply(this,e)}n.addEventListener(t,o);const a=u.current;return()=>{r=1,n.removeEventListener(t,o),a&&a()}}),[e,t])};const a={},c="undefined"===typeof window?null:window,l=()=>[document.documentElement.clientWidth,document.documentElement.clientHeight],s=(e=a)=>{const{wait:t,leading:n,initialWidth:o=0,initialHeight:s=0}=e,[f,h]=((e,t,n)=>{const o=r.useState(e);return[o[0],i(o[1],t,n)]})("undefined"===typeof document?[o,s]:l,t,n),p=()=>h(l);return u(c,"resize",p),u(c,"orientationchange",p),f}},150:function(e,t,n){"use strict";n.d(t,{N9:function(){return W},Ce:function(){return nn},LY:function(){return x}});var r=n(7294),o=n(5697),i=n.n(o);function u(e,t){return Array.isArray(t)?[e.a*t[0]+e.c*t[1]+e.e,e.b*t[0]+e.d*t[1]+e.f]:{x:e.a*t.x+e.c*t.y+e.e,y:e.b*t.x+e.d*t.y+e.f}}function a(e,t){return t.map((t=>u(e,t)))}function c(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)}}function l(e){const{a:t,b:n,c:r,d:o,e:i,f:u}=e,a=t*o-n*r;return{a:o/a,b:n/-a,c:r/-a,d:t/a,e:(o*i-r*u)/-a,f:(n*i-t*u)/a}}const{cos:s,sin:f,PI:h}=Math;function p(e){return"undefined"===typeof e}function d(e,t=0){return{a:1,c:0,e:e,b:0,d:1,f:t}}function y(...e){const t=(e,t)=>({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((e=Array.isArray(e[0])?e[0]:e).length){case 0:throw new Error("no matrices provided");case 1:return e[0];case 2:return t(e[0],e[1]);default:{const[n,r,...o]=e;return y(t(n,r),...o)}}}function b(e,t,n,r){p(t)&&(t=e);const o={a:e,c:0,e:0,b:0,d:t,f:0};return p(n)||p(r)?o:y([d(n,r),o,d(-n,-r)])}const{tan:v}=Math;function g(e){return`matrix(${e.a},${e.b},${e.c},${e.d},${e.e},${e.f})`}function m(e,t,n,r){this.message=e,this.expected=t,this.found=n,this.location=r,this.name="SyntaxError","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,m)}!function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(m,Error),m.buildMessage=function(e,t,n){var r={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?u(e[0])+"-"+u(e[1]):u(e)}));return"["+(e.inverted?"^":"")+t+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description},not:function(e){return"not "+a(e.expected)}};function o(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+o(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+o(e)}))}function u(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+o(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+o(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,n,r=e.map(a);if(r.sort(),r.length>0){for(t=1,n=1;t<r.length;t++)r[t-1]!==r[t]&&(r[n]=r[t],n++);r.length=n}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(e)+" but "+function(e){return e?'"'+i(e)+'"':"end of input"}(t)+" found."};
1var w="idle",O="panning",V="zooming",x="auto",P="none",S="pan",j="zoom-in",E="zoom-out",k="none",M="top",C="right",R="bottom",T="left",D="zoom",_="pan",G="center",F="left",Y="right",X="top",q="bottom",A="cover",W={};function L(e){return(L="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){B(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I=w;function Z(e,t,n,r,o,i){var u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null;return U({},z(z({},{a:1,c:0,e:0,b:0,d:1,f:0}),{},{version:3,mode:I,focus:!1,pinchPointDistance:null,prePinchMode:null,viewerWidth:e,viewerHeight:t,SVGMinX:n,SVGMinY:r,SVGWidth:o,SVGHeight:i,scaleFactorMin:u,scaleFactorMax:a,startX:null,startY:null,endX:null,endY:null,miniatureOpen:!0,lastAction:null}))}function U(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e=Object.assign({},e,t,{lastAction:n}),Object.freeze(e)}function N(e,t,n){return u(l(c(e)),{x:t,y:n})}function $(e){var t=c(e);return{scaleFactor:t.a,translationX:t.e,translationY:t.f}}function K(e,t){return U(e,{focus:t})}function J(e,t,n,r,o){return U(e,{SVGMinX:t,SVGMinY:n,SVGWidth:r,SVGHeight:o})}function Q(e){return U(e,{mode:I,startX:null,startY:null,endX:null,endY:null})}function ee(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)}}var te=function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.originalEvent=t,this.value=n,this.SVGViewer=r}var t,n,r;return t=e,(n=[{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"scaleFactor",get:function(){return this._cacheDecomposedValue=this._cacheDecomposedValue||$(this.value),this._cacheDecomposedValue.scaleFactor}},{key:"translationX",get:function(){return this._cacheDecomposedValue=this._cacheDecomposedValue||$(this.value),this._cacheDecomposedValue.translationX}},{key:"translationY",get:function(){return this._cacheDecomposedValue=this._cacheDecomposedValue||$(this.value),this._cacheDecomposedValue.translationY}}])&&ee(t.prototype,n),r&&ee(t,r),e}();function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ae(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,o=y(c(e),d(t,n));if(r){var i=a(o,[{x:e.SVGMinX+r,y:e.SVGMinY+r},{x:e.SVGMinX+e.SVGWidth-r,y:e.SVGMinY+e.SVGHeight-r}]),u=ie(i,2),l=u[0],s=l.x,f=l.y,h=u[1],p=h.x,b=h.y,v=0;e.viewerWidth-s<0?v=e.viewerWidth-s:p<0&&(v=-p);var g=0;e.viewerHeight-f<0?g=e.viewerHeight-f:b<0&&(g=-b),o=y(d(v,g),o)}return U(e,re({mode:w},o),_)}function ce(e,t,n){return U(e,{mode:O,startX:t,startY:n,endX:t,endY:n},_)}function le(e,t,n,r){if(e.mode!==O)throw new Error("update pan not allowed in this mode "+e.mode);var o=N(e,e.endX,e.endY),i=N(e,t,n);return U(ae(e,i.x-o.x,i.y-o.y,r),{mode:O,endX:t,endY:n},_)}function se(e){return U(e,{mode:w,startX:null,startY:null,endX:null,endY:null},_)}function fe(e,t,n){var r=0,o=0;return n<=20&&(o=2),e.viewerWidth-t<=20&&(r=-2),e.viewerHeight-n<=20&&(o=-2),t<=20&&(r=2),r/=e.d,o/=e.d,0===r&&0===o?e:ae(e,r,o)}function he(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}function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function be(e,t){var n=$(e).scaleFactor,r=e.scaleFactorMin&&n*t<e.scaleFactorMin,o=e.scaleFactorMax&&n*t>e.scaleFactorMax;return r&&t<1||o&&t>1}function ve(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)),U(t,{a:n,d:n})}function ge(e,t,n,r){if(be(e,r))return e;var o=y(c(e),d(t,n),b(r,r),d(-t,-n));return U(e,de(de({mode:w},o),{},{startX:null,startY:null,endX:null,endY:null}),D)}function me(e,t,n,r,o){var i=e.viewerWidth/r,u=e.viewerHeight/o,a=Math.min(i,u),c=y(b(a,a),d(-t,-n));return be(e,a/e.d)?U(e,{mode:w,startX:null,startY:null,endX:null,endY:null}):U(e,de(de({mode:w},ve(e,c)),{},{startX:null,startY:null,endX:null,endY:null}),D)}function we(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:F,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:X,r=e.viewerWidth,o=e.viewerHeight,i=e.SVGMinX,u=e.SVGMinY,a=e.SVGWidth,c=e.SVGHeight,l=r/a,s=o/c,f=Math.min(l,s),h=b(f,f),p=-i*l,v=-u*s;if(l<s){var g=o-l*c;switch(n){case X:v=-u*f;break;case G:v=Math.round(g/2)-u*f;break;case q:v=g-u*f;break;case A:h=b(s,s);var m=r-s*a;p=i+Math.round(m/2)}}else{var O=r-s*a;switch(t){case F:p=-i*f;break;case G:p=Math.round(O/2)-i*f;break;case Y:p=O-i*f;break;case A:h=b(l,l);var V=o-l*c;v=u+Math.round(V/2)}}var x=d(p,v),P=y(x,h);return be(e,f/e.d)?U(e,{mode:w,startX:null,startY:null,endX:null,endY:null}):U(e,de(de({mode:w},ve(e,P)),{},{startX:null,startY:null,endX:null,endY:null}),D)}function Oe(e,t,n){return U(e,{mode:V,startX:t,startY:n,endX:t,endY:n})}function Ve(e,t,n){if(e.mode!==V)throw new Error("update selection not allowed in this mode "+e.mode);return U(e,{endX:t,endY:n})}function xe(e,t,n,r){var o=e.startX,i=e.startY,u=N(e,o,i),a=N(e,t,n);if(Math.abs(o-t)>7&&Math.abs(i-n)>7){var c=he(u,a);return me(e,c.x,c.y,c.width,c.height)}var l=N(e,t,n);return ge(e,l.x,l.y,r)}function Pe(e,t,n,r,o){return r+(o-r)*(e-t)/(n-t)}function Se(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 je(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=i||Se(e,t),a=u.x,c=u.y,l=r;switch(n){case E:var s=N(r,a,c);l=ge(r,s.x,s.y,1/o.scaleFactor);break;case j:l=Oe(r,a,c);break;case x:case S:l=ce(r,a,c);break;default:return r}return e.preventDefault(),l}function Ee(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=i||Se(e,t),a=u.x,c=u.y,l=0===e.buttons,s=r;switch(n){case j:r.mode===V&&(s=l?xe(r,a,c,o.scaleFactor):Ve(r,a,c));break;case x:case S:r.mode===O&&(s=l?se(r):le(r,a,c,o.preventPanOutside?20:void 0));break;default:return r}return e.preventDefault(),s}function ke(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=i||Se(e,t),a=u.x,c=u.y,l=r;switch(n){case E:r.mode===V&&(l=xe(r,a,c,1/o.scaleFactor));break;case j:r.mode===V&&(l=xe(r,a,c,o.scaleFactor));break;case x:case S:r.mode===O&&(l=se(r));break;default:return r}return e.preventDefault(),l}
1function Me(e,t,n,r,o){var i=K(r,"mouseenter"===e.type);return e.preventDefault(),i}function Ce(e){return(Ce="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Te(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)}}function De(e,t){return(De=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fe(e);if(t){var o=Fe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ge(this,n)}}function Ge(e,t){return!t||"object"!==Ce(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ye=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&De(e,t)}(i,e);var t,n,r,o=_e(i);function i(){return Re(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"point",get:function(){if(!this._cachePoint){var e=this.originalEvent,t=this.SVGViewer,n=this.value,r=Se(e,t);this._cachePoint=N(n,r.x,r.y)}return this._cachePoint}},{key:"x",get:function(){return this.point.x}},{key:"y",get:function(){return this.point.y}}])&&Te(t.prototype,n),r&&Te(t,r),i}(te);function Xe(e){return(Xe="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){We(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function We(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function He(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)}}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Be(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var o=Ze(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ie(this,n)}}function Ie(e,t){return!t||"object"!==Xe(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ue=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ze(e,t)}(i,e);var t,n,r,o=Be(i);function i(){return Le(this,i),o.apply(this,arguments)}return t=i,r=[{key:"touchesToPoints",value:function(e,t,n){for(var r=[],o=0;o<e.length;o++){var i=e[o],u=t.getBoundingClientRect(),a=N(n,i.clientX-Math.round(u.left),i.clientY-Math.round(u.top));r.push(Ae(Ae({},a),{},{identifier:i.identifier}))}return r}}],(n=[{key:"points",get:function(){return this._cachePoints||(this._cachePoints=i.touchesToPoints(this.originalEvent.touches,this.SVGViewer,this.value)),this._cachePoints}},{key:"changedPoints",get:function(){return this._cacheChangedPoints||(this._cacheChangedPoints=i.touchesToPoints(this.originalEvent.changedTouches,this.SVGViewer,this.value)),this._cacheChangedPoints}}])&&He(t.prototype,n),r&&He(t,r),i}(te);
1function Ne(e){return e.split(/[ ,]/).filter(Boolean).map(Number)}function $e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(n),!0).forEach((function(t){Je(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qe(e,t,n,r,o){if(!([O,V].indexOf(r.mode)>=0))return r;var i=function(e,t,n){return n.detectPinchGesture&&et(t)&&e.touches.length<2}(e,r,o)?U(r,{pinchPointDistance:null}):r;return e.touches.length>0?i:nt(e,t,n,i,o,ke)}function et(e){return"number"===typeof e.pinchPointDistance}function tt(e,t){return t.detectPinchGesture&&e.touches.length>1}function nt(e,t,n,r,o,i){var u=0===e.touches.length?U(r,{mode:r.prePinchMode?w:r.mode,prePinchMode:null}):r,a=function(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)}}(e.touches.length>0?e.touches[0]:e.changedTouches[0],t);switch(n){case E:case j:case x:case S:return e.stopPropagation(),e.preventDefault(),i(e,t,n,u,o,a);default:return u}}function rt(e,t,n,r,o){var i=t.getBoundingClientRect(),u=i.left,a=i.top,l=e.touches[0].clientX-Math.round(u),s=e.touches[0].clientY-Math.round(a),f=e.touches[1].clientX-Math.round(u),h=e.touches[1].clientY-Math.round(a),p=Math.sqrt(Math.pow(f-l,2)+Math.pow(h-s,2)),v=et(r)?r.pinchPointDistance:p,g=N(r,(l+f)/2,(s+h)/2),m=p/v;if(be(r,m))return r;e.cancelable&&e.preventDefault();var w=y(c(r),d(g.x,g.y),b(m,m),d(-g.x,-g.y));return U(r,U(Ke(Ke({mode:V},ve(r,w)),{},{startX:null,startY:null,endX:null,endY:null,prePinchMode:r.prePinchMode?r.prePinchMode:r.mode,pinchPointDistance:p})))}function ot(e){return U(e,{miniatureOpen:!0})}function it(e){return U(e,{miniatureOpen:!1})}var ut=function(){return navigator.userAgent.toLowerCase()};function at(e){return function(e){return["zoom-in","zoom-out","grab","grabbing"].indexOf(e)>-1}(e)?ut().indexOf("firefox")>-1?"-moz-".concat(e):ut().indexOf("webkit")>-1?"-webkit-".concat(e):void 0:e}function ct(e){return(ct="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lt(){return(lt=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}).apply(this,arguments)}function st(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)}}function ft(e,t){return(ft=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ht(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dt(e);if(t){var o=dt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return pt(this,n)}}function pt(e,t){return!t||"object"!==ct(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dt(e){return(dt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yt=1;function bt(e){var t=function(t){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ft(e,t)}(a,t);var n,o,i,u=ht(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=u.call(this,e)).state={uid:"uid".concat(yt++)},t}return n=a,(o=[{key:"render",value:function(){return r.createElement(e,lt({_uid:this.state.uid},this.props))}}])&&st(n.prototype,o),i&&st(n,i),a}(r.Component);return t.displayName="RandomUID(".concat(function(e){return e.displayName||e.name||"Component"}(e),")"),t}var vt="react-svg-pan-zoom_border_gradient";
1function gt(e){var t,n=e.direction,o=e.width,i=e.height,u=e._uid;switch(n){case M:t="translate(".concat(o,", 0) rotate(90)");break;case C:t="translate(".concat(o,", ").concat(i,") rotate(180)");break;case R:t="translate(0, ".concat(i,") rotate(270)");break;case T:default:t=" "}var a="".concat(vt,"_gradient_").concat(u),c="".concat(vt,"_mask_").concat(u);return r.createElement("g",null,r.createElement("defs",null,r.createElement("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"0%",spreadMethod:"pad"},r.createElement("stop",{offset:"0%",stopColor:"#fff",stopOpacity:"0.8"}),r.createElement("stop",{offset:"100%",stopColor:"#000",stopOpacity:"0.5"})),r.createElement("mask",{id:c,x:"0",y:"0",width:"20",height:Math.max(o,i)},r.createElement("rect",{x:"0",y:"0",width:"20",height:Math.max(o,i),style:{stroke:"none",fill:"url(#".concat(a,")")}}))),r.createElement("rect",{x:"0",y:"0",width:"20",height:Math.max(o,i),style:{stroke:"none",fill:"#000",mask:"url(#".concat(c,")")},transform:t}))}gt.propTypes={direction:i().oneOf([M,C,R,T]).isRequired,width:i().number.isRequired,height:i().number.isRequired};var mt=bt(gt);function wt(e){var t=e.startX,n=e.startY,o=e.endX,i=e.endY;if(!t||!n||!o||!i)return null;var u=he({x:t,y:n},{x:o,y:i});return r.createElement("rect",{stroke:"#969FFF",strokeOpacity:.7,fill:"#F3F4FF",fillOpacity:.7,x:u.x,y:u.y,width:u.width,height:u.height,style:{pointerEvents:"none"}})}function Ot(){return r.createElement("svg",{width:24,height:24,stroke:"currentColor"},r.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"}))}function Vt(){return r.createElement("svg",{width:24,height:24,stroke:"currentColor"},r.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"}))}function xt(){return r.createElement("svg",{width:24,height:24,stroke:"currentColor"},r.createElement("g",null,r.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"}),r.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})))}function Pt(){return r.createElement("svg",{width:24,height:24,stroke:"currentColor"},r.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"}))}function St(){return r.createElement("svg",{width:24,height:24,stroke:"currentColor"},r.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"}))}function jt(e){return(jt="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Et(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)}}function kt(e,t){return(kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mt(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rt(e);
1if(t){var o=Rt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ct(this,n)}}function Ct(e,t){return!t||"object"!==jt(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Rt(e){return(Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}wt.propTypes={startX:i().number,startY:i().number,endX:i().number,endY:i().number};var Tt=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&kt(e,t)}(u,e);var t,n,o,i=Mt(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=i.call(this,e)).state={hover:!1},t}return t=u,(n=[{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:[M,R].indexOf(this.props.toolbarPosition)>=0?"2px 1px":"1px 2px",color:this.props.active||this.state.hover?this.props.activeColor:"#FFF",transition:"color 200ms ease",background:"none",padding:"0px",border:"0px",outline:"0px",cursor:"pointer"};return r.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,type:"button"},this.props.children)}}])&&Et(t.prototype,n),o&&Et(t,o),u}(r.Component);function Dt(e){var t=e.tool,n=e.value,o=e.onChangeValue,i=e.onChangeTool,u=e.activeToolColor,a=e.position,c=e.SVGAlignX,l=e.SVGAlignY,s=function(e,t){i(t),e.stopPropagation(),e.preventDefault()},f=[M,R].indexOf(a)>=0,h={position:"absolute",transform:[M,R].indexOf(a)>=0?"translate(-50%, 0px)":"none",top:[T,C,M].indexOf(a)>=0?"5px":"unset",left:[M,R].indexOf(a)>=0?"50%":T===a?"5px":"unset",right:[C].indexOf(a)>=0?"5px":"unset",bottom:[R].indexOf(a)>=0?"5px":"unset",backgroundColor:"rgba(19, 20, 22, 0.90)",borderRadius:"2px",display:"flex",flexDirection:f?"row":"column",padding:f?"1px 2px":"2px 1px"};return r.createElement("div",{style:h,role:"toolbar"},r.createElement(Tt,{toolbarPosition:a,active:t===P,activeColor:u,name:"unselect-tools",title:"Selection",onClick:function(e){return s(e,P)}},r.createElement(Ot,null)),r.createElement(Tt,{toolbarPosition:a,active:t===S,activeColor:u,name:"select-tool-pan",title:"Pan",onClick:function(e){return s(e,S)}},r.createElement(Vt,null)),r.createElement(Tt,{toolbarPosition:a,active:t===j,activeColor:u,name:"select-tool-zoom-in",title:"Zoom in",onClick:function(e){return s(e,j)}},r.createElement(xt,null)),r.createElement(Tt,{toolbarPosition:a,active:t===E,activeColor:u,name:"select-tool-zoom-out",title:"Zoom out",onClick:function(e){return s(e,E)}},r.createElement(Pt,null)),r.createElement(Tt,{toolbarPosition:a,active:!1,activeColor:u,name:"fit-to-viewer",title:"Fit to viewer",onClick:function(e){return function(e){o(we(n,c,l)),e.stopPropagation(),e.preventDefault()}(e)}},r.createElement(St,null)))}function _t(e){var t=e.open,n=0;switch(e.position){case T:n=t?"rotate(225, 12, 13)":"rotate(45, 12, 13)";break;case C:n=n=t?"rotate(135, 12, 13)":"rotate(-45, 12, 13)"}return r.createElement("svg",{width:24,height:24,stroke:"currentColor"},r.createElement("g",{transform:n},r.createElement("path",{fill:"#000000",d:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"})))}function Gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(e){var t,n=e.value,o=e.onChangeValue,i=e.position,u=(Gt(t={width:"24px",height:"24px",display:"block",position:"absolute",bottom:0}
1,i===T?"left":"right","0px"),Gt(t,"background","rgba(19, 20, 22, 0.901961)"),Gt(t,"border",0),Gt(t,"padding",0),Gt(t,"outline",0),Gt(t,"color","#fff"),t),a=n.miniatureOpen?it:ot;return r.createElement("button",{type:"button",style:u,onClick:function(){return o(a(n))}},r.createElement(_t,{open:n.miniatureOpen,position:i}))}Tt.propTypes={title:i().string.isRequired,name:i().string.isRequired,toolbarPosition:i().string.isRequired,activeColor:i().string.isRequired,onClick:i().func.isRequired,active:i().bool.isRequired},Dt.propTypes={tool:i().string.isRequired,onChangeTool:i().func.isRequired,value:i().object.isRequired,onChangeValue:i().func.isRequired,position:i().oneOf([M,C,R,T]),SVGAlignX:i().oneOf([G,F,Y]),SVGAlignY:i().oneOf([G,X,q]),activeToolColor:i().string},Dt.defaultProps={position:C,SVGAlignX:F,SVGAlignY:X,activeToolColor:"#1CA6FC"},_t.propTypes={open:i().bool.isRequired,position:i().oneOf([C,T]).isRequired},Ft.propTypes={value:i().object.isRequired,onChangeValue:i().func.isRequired,position:i().oneOf([C,T]).isRequired};function Yt(e){var t=e.SVGMinX,n=e.SVGMinY,o=e.SVGWidth,i=e.SVGHeight,u=e.x1,a=e.y1,c=e.x2,l=e.y2,s=(e.zoomToFit,e._uid),f="".concat("react-svg-pan-zoom_miniature","_mask_").concat(s);return r.createElement("g",null,r.createElement("defs",null,r.createElement("mask",{id:f},r.createElement("rect",{x:t,y:n,width:o,height:i,fill:"#ffffff"}),r.createElement("rect",{x:u,y:a,width:c-u,height:l-a}))),r.createElement("rect",{x:t,y:n,width:o,height:i,style:{stroke:"none",fill:"#000",mask:"url(#".concat(f,")"),opacity:.4}}))}Yt.propTypes={SVGWidth:i().number.isRequired,SVGHeight:i().number.isRequired,SVGMinX:i().number.isRequired,SVGMinY:i().number.isRequired,x1:i().number.isRequired,y1:i().number.isRequired,x2:i().number.isRequired,y2:i().number.isRequired,zoomToFit:i().number.isRequired};var Xt=bt(Yt);function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function At(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Wt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lt(e){var t,n,o,i=e.value,u=e.onChangeValue,c=e.children,s=e.position,f=e.background,h=e.SVGBackgroun
1d,p=e.width,d=e.height,y=i.SVGMinX,b=i.SVGMinY,v=i.SVGWidth,g=i.SVGHeight,m=i.viewerWidth,w=i.viewerHeight,O=g/v,V=O>=1?d/g:p/v,x=At(a(l(i),[{x:0,y:0},{x:m,y:w}]),2),P=x[0],S=P.x,j=P.y,E=x[1],k=E.x,M=E.y;i.miniatureOpen?(n=p,o=d):(n=24,o=24);var C=(qt(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:n+"px",height:o+"px",bottom:"6px"},s===T?"left":"right","6px"),qt(t,"background",f),t),R=O>=1?"translate(".concat((p-v*V)/2-y*V,", ").concat(-b*V,")"):"translate(".concat(-y*V,", ").concat((d-g*V)/2-b*V,")");return r.createElement("div",{role:"navigation",style:C},r.createElement("svg",{width:p,height:d,style:{pointerEvents:"none"}},r.createElement("g",{transform:R},r.createElement("g",{transform:"scale(".concat(V,", ").concat(V,")")},r.createElement("rect",{fill:h,x:y,y:b,width:v,height:g}),c,r.createElement(Xt,{SVGWidth:v,SVGHeight:g,SVGMinX:y,SVGMinY:b,x1:S,y1:j,x2:k,y2:M,zoomToFit:V})))),r.createElement(Ft,{value:i,onChangeValue:u,position:s}))}function Ht(e){return(Ht="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(){return(zt=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}).apply(this,arguments)}function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){Zt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ut(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(c){o=!0,i=c}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return Nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $t(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)}}function Kt(e,t){return(Kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jt(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tn(e);if(t){var o=tn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qt(this,n)}}function Qt(e,t){return!t||"object"!==Ht(t)&&"function"!==typeof t?en(e):t}function en(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}
1function tn(e){return(tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Lt.propTypes={value:i().object.isRequired,onChangeValue:i().func.isRequired,SVGBackground:i().string.isRequired,position:i().oneOf([C,T]),background:i().string.isRequired,width:i().number.isRequired,height:i().number.isRequired},Lt.defaultProps={position:T,background:"#616264",width:100,height:80};var nn=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kt(e,t)}(u,e);var t,n,o,i=Jt(u);function u(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u);var r,o=e.width,a=e.height,c=e.scaleFactorMin,l=e.scaleFactorMax,s=e.children,f=s.props.viewBox;if(f){var h=Ut(Ne(f),4);r=Z(o,a,h[0],h[1],h[2],h[3],c,l)}else{var p=s.props;r=Z(o,a,0,0,p.width,p.height,c,l)}return(n=i.call(this,e,t)).ViewerDOM=null,n.state={pointerX:null,pointerY:null,defaultValue:r},n.autoPanLoop=n.autoPanLoop.bind(en(n)),n.onWheel=n.onWheel.bind(en(n)),n}return t=u,(n=[{key:"componentDidUpdate",value:function(e){var t=this.getValue(),n=this.props,r=t,o=!1,i=n.children.props.viewBox;if(i){var u=Ut(Ne(i),4),a=u[0],c=u[1],l=u[2],s=u[3];t.SVGMinX===a&&t.SVGMinY===c&&t.SVGWidth===l&&t.SVGHeight===s||(r=J(r,a,c,l,s),o=!0)}else{var f=n.children.props,h=f.width,p=f.height;t.SVGWidth===h&&t.SVGHeight===p||(r=J(r,0,0,h,p),o=!0)}e.width===n.width&&e.height===n.height||(r=function(e,t,n){return U(e,{viewerWidth:t,viewerHeight:n})}(r,n.width,n.height),o=!0),e.scaleFactorMin===n.scaleFactorMin&&e.scaleFactorMax===n.scaleFactorMax||(r=function(e,t,n){return U(e,{scaleFactorMin:t,scaleFactorMax:n})}(r,n.scaleFactorMin,n.scaleFactorMax),o=!0),o&&this.setValue(r)}},{key:"componentDidMount",value:function(){this.autoPanIsRunning=!0,requestAnimationFrame(this.autoPanLoop),this.ViewerDOM.addEventListener("wheel",this.onWheel,!1)}},{key:"componentWillUnmount",value:function(){this.autoPanIsRunning=!1,this.ViewerDOM.removeEventListener("wheel",this.onWheel)}},{key:"getValue",value:function(){return null!==(e=this.props.value)&&"object"===L(e)&&e.hasOwnProperty("version")&&3===e.version?this.props.value:this.state.defaultValue;var e}},{key:"getTool",value:function(){return this.props.tool?this.props.tool:P}},{key:"setValue",value:function(e){var t=this.props,n=t.onChangeValue,r=t.onZoom,o=t.onPan;n&&n(e),e.lastAction&&(r&&e.lastAction===D&&r(e),o&&e.lastAction===_&&o(e))}},{key:"pan",value:function(e,t){var n=ae(this.getValue(),e,t);this.setValue(n)}},{key:"zoom",value:function(e,t,n){var r=ge(this.getValue(),e,t,n);this.setValue(r)}},{key:"fitSelection",value:function(e,t,n,r){var o=me(this.getValue(),e,t,n,r);this.setValue(o)}},{key:"fitToViewer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X,n=we(this.getValue(),e,t);this.setValue(n)}},{key:"zoomOnViewerCenter",value:function(e){var t=function(e,t){var n=N(e,e.viewerWidth/2,e.viewerHeight/2);return ge(e,n.x,n.y,t)}(this.getValue(),e);this.setValue(t)}},{key:"setPointOnViewerCenter",value:function(e,t,n){var r=function(e,t,n,r){var o=y(d(e.viewerWidth/2-t,e.viewerHeight/2-n),d(t,n),b(r,r),d(-t,-n));return U(e,z({mode:w},o))}(this.getValue(),e,t,n);this.setValue(r)}},{key:"reset",value:function(){var e=U(this.getValue(),z({mode:w},{a:1,c:0,e:0,b:0,d:1,f:0}));this.setValue(e)}},{key:"openMiniature",value:function(){var e=ot(this.getValue());this.setValue(e)}},{key:"closeMiniature",value:function(){var e=it(this.getValue());this.setValue(e)}},{key:"handleViewerEvent",value:function(e){var t=this.props,n=this.ViewerDOM;if([P,x].indexOf(this.getTool())>=0&&e.target!==n){var r={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}[e.type];r&&r(function(e,t,n){var r=e.type;switch(r){case"mousemove":case"mouseup":case"mousedown":case"click":case"dblclick":return new Ye(e,t,n);case"touchstart":case"touchmove":case"touchend":case"touchcancel":return new Ue(e,t,n);default:throw new Error("".concat(r," not supported"))}}(e,t.value,n))}}},{key:"autoPanLoop",value:function(){var e={x:this.state.pointerX,y:this.state.pointerY},t=function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,u=i.x,a=i.y;return[P,x].indexOf(n)>=0&&o.detectAutoPan&&r.focus?fe(r,u,a):r}(null,this.ViewerDOM,this.getTool(),this.getValue(),this.props,e);this.getValue()!==t&&this.setValue(t),this.autoPanIsRunning&&requestAnimationFrame(this.autoPanLoop)}},{key:"onWheel",value:function(e){var t=function(e,t,n,r,o){var i=(arguments.length>5&&void 0!==arguments[5]?arguments[5]:null)||Se(e,t),u=i.x,a=i.y;if(!o.detectWheel)return r;var c=Pe(Math.max(-1,Math.min(1,e.deltaY)),-1,1,o.scaleFactorOnWheel,1/o.scaleFactorOnWheel),l=N(r,u,a),s=ge(r,l.x,l.y,c);return e.preventDefault(),s}(e,this.ViewerDOM,this.getTool(),this.getValue(),this.props);this.getValue()!==t&&this.setValue(t)}},{key:"render",value:function(){var e,t=this,n=this.props,o=this.state,i=o.pointerX,u=o.pointerY,a=this.getTool(),c=this.getValue(),l=n.customToolbar,s=void 0===l?Dt:l,f=n.customMiniature,h=void 0===f?Lt:f,p=a===x&&c.mode===O&&c.startX!==c.endX&&c.startY!==c.endY;a===S&&(e=at(c.mode===O?"grabbing":"grab")),a===j&&(e=at("zoom-in")),a===E&&(e=at("zoom-out")),p&&(e=at("grabbing"));var d=[S,j,E].indexOf(a)>=0;d=d||p;var y,b={display:"block",cursor:e,touchAction:this.props.detectPinchGesture||-1!==[S,x].indexOf(this.getTool())?"none":void 0};return r.createElement("div",{style:It({position:"relative",width:c.viewerWidth,height:c.viewerHeight},n.style),className:this.props.className},r.createElement("svg",{ref:function(e){return t.ViewerDOM=e},width:c.viewerWidth,height:c.viewerHeight,style:b,onMouseDown:function(e){var n=je(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props);t.getValue()!==n&&t.setValue(n),t.handleViewerEvent(e)},onMouseMove:function(e){var n=t.ViewerDOM.getBoundingClientRect(),r=n.left,o=n.top,i=e.clientX-Math.round(r),u=e.clientY-Math.round(o),a=Ee(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props,{x:i,y:u});t.getValue()!==a&&t.setValue(a),t.setState({pointerX:i,pointerY:u}),t.handleViewerEvent(e)},onMouseUp:function(e){var n=ke(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props);t.getValue()!==n&&t.setValue(n),t.handleViewerEvent(e)},onClick:function(e){t.handleViewerEvent(e)},onDoubleClick:function(e){var n=function(e,t,n,r,o){var i=(arguments.length>5&&void 0!==arguments[5]?arguments[5]:null)||Se(e,t),u=i.x,a=i.y,c=r;if(n===x&&!o.disableDoubleClickZoomWithToolAuto){var l=o.modifierKeys,s=void 0===l?[]:l,f=N(r,u,a),h=function(t,n){return t||e.getModifierState(n)},p=s.reduce(h,!1)?1/o.scaleFactor:o.scaleFactor;c=ge(r,f.x,f.y,p)}return e.preventDefault(),c}(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props);t.getValue()!==n&&t.setValue(n),t.handleViewerEvent(e)}
1,onMouseEnter:function(e){if(!("ontouchstart"in window)&&!navigator.maxTouchPoints){var n=Me(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props);t.getValue()!==n&&t.setValue(n)}},onMouseLeave:function(e){var n=Me(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props);t.getValue()!==n&&t.setValue(n)},onTouchStart:function(e){var n=function(e,t,n,r,o){if(tt(e,o))return rt(e,t,0,r);if(1!==e.touches.length){if([O,V].indexOf(r.mode)>=0)return Q(r);if([w].indexOf(r.mode)>=0)return r}return nt(e,t,n,r,o,je)}(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props);t.getValue()!==n&&t.setValue(n),t.handleViewerEvent(e)},onTouchMove:function(e){var n=function(e,t,n,r,o){return tt(e,o)?rt(e,t,0,r):[O,V].indexOf(r.mode)>=0?nt(e,t,n,r,o,Ee):r}(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props);t.getValue()!==n&&t.setValue(n),t.handleViewerEvent(e)},onTouchEnd:function(e){var n=Qe(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props);t.getValue()!==n&&t.setValue(n),t.handleViewerEvent(e)},onTouchCancel:function(e){var n=function(e,t,n,r,o){return e.stopPropagation(),e.preventDefault(),Q(r)}(e,t.ViewerDOM,t.getTool(),t.getValue(),t.props);t.getValue()!==n&&t.setValue(n),t.handleViewerEvent(e)}},r.createElement("rect",{fill:n.background,x:0,y:0,width:c.viewerWidth,height:c.viewerHeight,style:{pointerEvents:"none"}}),r.createElement("g",{transform:(y=c,g(y)),style:d?{pointerEvents:"none"}:{}}
1,r.createElement("rect",{fill:this.props.SVGBackground,style:this.props.SVGStyle,x:c.SVGMinX||0,y:c.SVGMinY||0,width:c.SVGWidth,height:c.SVGHeight}),r.createElement("g",null,n.children.props.children)),[P,x].indexOf(a)>=0&&n.detectAutoPan&&c.focus?r.createElement("g",{style:{pointerEvents:"none"}},u<=20?r.createElement(mt,{direction:M,width:c.viewerWidth,height:c.viewerHeight}):null,c.viewerWidth-i<=20?r.createElement(mt,{direction:C,width:c.viewerWidth,height:c.viewerHeight}):null,c.viewerHeight-u<=20?r.createElement(mt,{direction:R,width:c.viewerWidth,height:c.viewerHeight}):null,c.focus&&i<=20?r.createElement(mt,{direction:T,width:c.viewerWidth,height:c.viewerHeight}):null):null,c.mode!==V?null:r.createElement(wt,{startX:c.startX,startY:c.startY,endX:c.endX,endY:c.endY})),n.toolbarProps.position===k?null:r.createElement(s,zt({},this.props.toolbarProps,{value:c,onChangeValue:function(e){return t.setValue(e)},tool:a,onChangeTool:function(e){return t.props.onChangeTool(e)}})),n.miniatureProps.position===k?null:r.createElement(h,zt({},this.props.miniatureProps,{value:c,onChangeValue:function(e){return t.setValue(e)}
1,SVGBackground:this.props.SVGBackground}),n.children.props.children))}}])&&$t(t.prototype,n),o&&$t(t,o),u}(r.Component);function rn(e){return(rn="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function on(){return(on=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}).apply(this,arguments)}function un(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function an(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)}}function cn(e,t){return(cn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ln(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=hn(e);if(t){var o=hn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return sn(this,n)}}function sn(e,t){return!t||"object"!==rn(t)&&"function"!==typeof t?fn(e):t}function fn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hn(e){return(hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}nn.propTypes={width:i().number.isRequired,height:i().number.isRequired,value:i().oneOfType([i().object,i().shape({version:i().oneOf([2]).isRequired,mode:i().oneOf([w,O,V]).isRequired,focus:i().bool.isRequired,a:i().number.isRequired,b:i().number.isRequired,c:i().number.isRequired,d:i().number.isRequired,e:i().number.isRequired,f:i().number.isRequired,viewerWidth:i().number.isRequired,viewerHeight:i().number.isRequired,SVGMinX:i().number.isRequired,SVGMinY:i().number.isRequired,SVGWidth:i().number.isRequired,SVGHeight:i().number.isRequired,startX:i().number,startY:i().number,endX:i().number,endY:i().number,miniatureOpen:i().bool.isRequired})]).isRequired,onChangeValue:i().func.isRequired,tool:i().oneOf([x,P,S,j,E]).isRequired,onChangeTool:i().func.isRequired,background:i().string,SVGBackgroun
1d:i().string,SVGStyle:i().object,style:i().object,className:i().string,detectWheel:i().bool,detectAutoPan:i().bool,detectPinchGesture:i().bool,onZoom:i().func,onPan:i().func,onClick:i().func,onDoubleClick:i().func,onMouseUp:i().func,onMouseMove:i().func,onMouseDown:i().func,preventPanOutside:i().bool,scaleFactor:i().number,scaleFactorOnWheel:i().number,scaleFactorMax:i().number,scaleFactorMin:i().number,modifierKeys:i().array,disableDoubleClickZoomWithToolAuto:i().bool,customMiniature:i().oneOfType([i().element,i().func]),miniatureProps:i().shape({position:i().oneOf([k,C,T]),background:i().string,width:i().number,height:i().number}),customToolbar:i().oneOfType([i().element,i().func]),toolbarProps:i().shape({position:i().oneOf([k,M,C,R,T]),SVGAlignX:i().oneOf([G,F,Y]),SVGAlignY:i().oneOf([G,X,q]),activeToolColor:i().string}),children:function(e,t,n){var o=e[t],i=["svg"];return 1!==r.Children.count(o)||-1===i.indexOf(o.type)?new Error("`"+n+"` should have a single child of the following types:  `"+i.join("`, `")+"`."):o.props.hasOwnProperty("width")&&o.props.hasOwnProperty("height")||o.props.hasOwnProperty("viewBox")?void 0:new Error("SVG should have props `width` and `height` or `viewB
1ox`")}},nn.defaultProps={style:{},background:"#616264",SVGBackground:"#fff",SVGStyle:{},detectWheel:!0,detectAutoPan:!0,detectPinchGesture:!0,modifierKeys:["Alt","Shift","Control"],preventPanOutside:!0,scaleFactor:1.1,scaleFactorOnWheel:1.06,disableZoomWithToolAuto:!1,onZoom:null,onPan:null,toolbarProps:{},miniatureProps:{}},(function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cn(e,t)}(u,e);var t,n,o,i=ln(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=i.call(this,e)).state={value:e.defaultValue||{},tool:e.defaultTool||P},t.Viewer=null,t.changeTool=t.changeTool.bind(fn(t)),t.changeValue=t.changeValue.bind(fn(t)),t}return t=u,(n=[{key:"changeTool",value:function(e){this.setState({tool:e})}},{key:"changeValue",value:function(e){this.setState({value:e})}},{key:"pan",value:function(e,t){this.Viewer.pan(e,t)}},{key:"zoom",value:function(e,t,n){this.Viewer.zoom(e,t,n)}},{key:"fitSelection",value:function(e,t,n,r){this.Viewer.fitSelection(e,t,n,r)}},{key:"fitToViewer",value:function(e,t){this.Viewer.fitToViewer(e,t)}},{key:"zoomOnViewerCenter",value:function(e){this.Viewer.zoomOnViewerCenter(e)}},{key:"setPointOnViewerCenter",value:function(e,t,n){this.Viewer.setPointOnViewerCenter(e,t,n)}},{key:"reset",value:function(){this.Viewer.reset()}},{key:"openMiniature",value:function(){this.Viewer.openMiniature()}},{key:"closeMiniature",value:function(){this.Viewer.closeMiniature()}},{key:"render",value:function(){var e=this,t=this.props,n=t.width,o=t.height,i=(t.onChangeTool,t.onChangeValue,un(t,["width","height","onChangeTool","onChangeValue"])),u=this.state,a=u.tool,c=u.value;return r.createElement(nn,on({width:n,height:o,tool:a,onChangeTool:this.changeTool,value:c,onChangeValue:this.changeValue,ref:function(t){return e.Viewer=t}},i))}}])&&an(t.prototype,n),o&&an(t,o),u}(r.Component)).propTypes={width:i().number.isRequired,height:i().number.isRequired,defaultValue:i().object,defaultTool:i().string}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.