PageSourceSearch

https://inflect.com/_next/static/chunks/7581-39fe26db12fc7733.js

js inflect.com collected 2026-10-03 19:47:59 UTC 29,752 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(null!=n)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:frontend-next":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="92c521a6-761e-474d-998f-4b90c01a3b00",e._sentryDebugIdIdentifier="sentry-dbid-92c521a6-761e-474d-998f-4b90c01a3b00")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7581],{65733:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Handle=void 0;var a=n(18465),o=a.__importDefault(n(93967)),r=a.__importStar(n(67294)),i=n(86516),s=n(12640),l=n(71352),u=n(29686),c=["max","min","stepSize","tickSize","value"],d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isMoving:!1},t.handleElement=null,t.refHandlers={handle:function(e){return t.handleElement=e}},t.beginHandleMovement=function(e){document.addEventListener("mousemove",t.handleHandleMovement),document.addEventListener("mouseup",t.endHandleMovement),t.setState({isMoving:!0}),t.changeValue(t.clientToValue(t.mouseEventClientOffset(e)))},t.beginHandleTouchMovement=function(e){document.addEventListener("touchmove",t.handleHandleTouchMovement),document.addEventListener("touchend",t.endHandleTouchMovement),document.addEventListener("touchcancel",t.endHandleTouchMovement),t.setState({isMoving:!0}),t.changeValue(t.clientToValue(t.touchEventClientOffset(e)))},t.getStyleProperties=function(){if(null==t.handleElement)return{};var e=t.props,n=e.min,a=e.tickSizeRatio,o=e.value,r=e.vertical,i=t.getHandleMidpointAndOffset(t.handleElement,!0).handleMidpoint,s="calc(".concat((0,u.formatPercentage)((o-(void 0===n?0:n))*a)," - ").concat(i,"px)");return r?{bottom:s}:{left:s}},t.endHandleMovement=function(e){t.handleMoveEndedAt(t.mouseEventClientOffset(e))},t.endHandleTouchMovement=function(e){t.handleMoveEndedAt(t.touchEventClientOffset(e))},t.handleMoveEndedAt=function(e){t.removeDocumentEventListeners(),t.setState({isMoving:!1});var n,a,o=t.changeValue(t.clientToValue(e));null===(a=(n=t.props).onRelease)||void 0===a||a.call(n,o)},t.handleHandleMovement=function(e){t.handleMovedTo(t.mouseEventClientOffset(e))},t.handleHandleTouchMovement=function(e){t.handleMovedTo(t.touchEventClientOffset(e))},t.handleMovedTo=function(e){t.state.isMoving&&!t.props.disabled&&t.changeValue(t.clientToValue(e))},t.handleKeyDown=function(e){var n=t.props,a=n.stepSize,o=n.value,r=e.which;r===i.Keys.ARROW_DOWN||r===i.Keys.ARROW_LEFT?(t.changeValue(o-a),e.preventDefault()):(r===i.Keys.ARROW_UP||r===i.Keys.ARROW_RIGHT)&&(t.changeValue(o+a),e.preventDefault())},t.handleKeyUp=function(e){var n,a;[i.Keys.ARROW_UP,i.Keys.ARROW_DOWN,i.Keys.ARROW_LEFT,i.Keys.ARROW_RIGHT].indexOf(e.which)>=0&&(null===(a=(n=t.props).onRelease)||void 0===a||a.call(n,t.props.value))},t}return a.__extends(t,e),t.prototype.componentDidMount=function(){this.forceUpdate()},t.prototype.render=function(){var e,t=this.props,n=t.className,s=t.disabled,l=t.label,u=t.min,c=t.max,d=t.value,h=t.vertical,p=t.htmlProps,f=this.state.isMoving;return r.createElement("span",a.__assign({role:"slider",tabIndex:0},p,{className:(0,o.default)(i.Classes.SLIDER_HANDLE,((e={})[i.Classes.ACTIVE]=f,e),n),onKeyDown:s?void 0:this.handleKeyDown,onKeyUp:s?void 0:this.handleKeyUp,onMouseDown:s?void 0:this.beginHandleMovement,onTouchStart:s?void 0:this.beginHandleTouchMovement,ref:this.refHandlers.handle,style:this.getStyleProperties(),"aria-valuemin":u,"aria-valuemax":c,"aria-valuenow":d,"aria-orientation":h?"vertical":"horizontal"}),null==l?null:r.createElement("span",{className:i.Classes.SLIDER_LABEL},l))},t.prototype.componentWillUnmount=function(){this.removeDocumentEventListeners()},t.prototype.clientToValue=function(e){var t=this.props,n=t.stepSize,a=t.tickSize,o=t.value,r=t.vertical;if(null==this.handleElement)return o;var i=(r?window.innerHeight-e:e)-this.getHandleElementCenterPixel(this.handleElement);return isNaN(i)?o:o+Math.round(i/(a*n))*n},t.prototype.mouseEventClientOffset=function(e){return this.props.vertical?e.clientY:e.clientX},t.prototype.touchEventClientOffset=function(e){var t=e.changedTouches[0];return this.props.vertical?t.clientY:t.clientX},t.prototype.validateProps=function(e){for(var t=0;t<c.length;t++){var n=c[t];if("number"!=typeof e[n])throw Error("[Blueprint] <Handle> requires number value for ".concat(n," prop"))}},t.prototype.changeValue=function(e,t){return void 0===t&&(t=this.props.onChange),isNaN(e=this.clamp(e))||this.props.value===e||null==t||t(e),e},t.prototype.clamp=function(e){return(0,l.clamp)(e,this.props.min,this.props.max)},t.prototype.getHandleElementCenterPixel=function(e){var t=this.getHandleMidpointAndOffset(e),n=t.handleMidpoint;return t.handleOffset+n},t.prototype.getHandleMidpointAndOffset=function(e,t){if(void 0===t&&(t=!1),null==e)return{handleMidpoint:0,handleOffset:0};var n=this.props.vertical,a=e.getBoundingClientRect(),o=n?t?"width":"height":t?"height":"width",r=n?window.innerHeight-(a.top+a[o]):a.left;return{handleMidpoint:a[o]/2,handleOffset:r}},t.prototype.removeDocumentEventListeners=function(){document.removeEventListener("mousemove",this.handleHandleMovement),document.removeEventListener("mouseup",this.endHandleMovement),document.removeEventListener("touchmove",this.handleHandleTouchMovement),document.removeEventListener("touchend",this.endHandleTouchMovement),document.removeEventListener("touchcancel",this.endHandleTouchMovement)}
1,t.displayName="".concat(s.DISPLAYNAME_PREFIX,".SliderHandle"),t}(i.AbstractPureComponent2);t.Handle=d},54351:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HandleInteractionKind=t.HandleType=void 0,t.HandleType={FULL:"full",START:"start",END:"end"},t.HandleInteractionKind={LOCK:"lock",PUSH:"push",NONE:"none"}},54582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiSlider=void 0;var a=n(18465),o=a.__importDefault(n(93967)),r=a.__importStar(n(67294)),i=n(86516),s=a.__importStar(n(43983)),l=n(12640),u=a.__importStar(n(71352)),c=n(65733),d=n(54351),h=n(29686),p=function(){return null};p.displayName="".concat(l.DISPLAYNAME_PREFIX,".MultiSliderHandle");var f=function(e){function t(){var t,n,a,o,r=null!==e&&e.apply(this,arguments)||this;return r.state={labelPrecision:(n=(t=r.props).labelPrecision,o=void 0===(a=t.stepSize)?f.defaultSliderProps.stepSize:a,null==n?u.countDecimalPlaces(o):n),tickSize:0,tickSizeRatio:0},r.handleElements=[],r.trackElement=null,r.addHandleRef=function(e){null!=e&&r.handleElements.push(e)},r.maybeHandleTrackClick=function(e){if(r.canHandleTrackEvent(e)){var t=r.nearestHandleForValue(r.handleElements,function(t){return t.mouseEventClientOffset(e)});t&&t.beginHandleMovement(e)}},r.maybeHandleTrackTouch=function(e){if(r.canHandleTrackEvent(e)){var t=r.nearestHandleForValue(r.handleElements,function(t){return t.touchEventClientOffset(e)});t&&t.beginHandleTouchMovement(e)}},r.canHandleTrackEvent=function(e){var t=e.target;return!r.props.disabled&&null==t.closest(".".concat(i.Classes.SLIDER_HANDLE))},r.getHandlerForIndex=function(e,t){return function(n){null==t||t(r.getNewHandleValues(n,e))}},r.handleChange=function(e){var t,n,a=v(r.props),o=a.map(function(e){return e.value});u.arraysEqual(e,o)||(null===(n=(t=r.props).onChange)||void 0===n||n.call(t,e),a.forEach(function(t,n){var a;o[n]!==e[n]&&(null===(a=t.onChange)||void 0===a||a.call(t,e[n]))}))},r.handleRelease=function(e){var t,n,a=v(r.props);null===(n=(t=r.props).onRelease)||void 0===n||n.call(t,e),a.forEach(function(t,n){var a;null===(a=t.onRelease)||void 0===a||a.call(t,e[n])})},r}return a.__extends(t,e),t.getDerivedStateFromProps=function(e){return{labelPrecision:t.getLabelPrecision(e)}},t.getLabelPrecision=function(e){var t=e.labelPrecision,n=e.stepSize;return null==t?u.countDecimalPlaces(n):t},t.prototype.getSnapshotBeforeUpdate=function(e){var t=v(e);return v(this.props).length!==t.length&&(this.handleElements=[]),null},t.prototype.render=function(){var e,t=this,n=(0,o.default)(i.Classes.SLIDER,((e={})[i.Classes.DISABLED]=this.props.disabled,e["".concat(i.Classes.SLIDER,"-unlabeled")]=!1===this.props.labelRenderer,e[i.Classes.VERTICAL]=this.props.vertical,e),this.props.className);return r.createElement("div",{className:n,onMouseDown:this.maybeHandleTrackClick,onTouchStart:this.maybeHandleTrackTouch},r.createElement("div",{className:i.Classes.SLIDER_TRACK,ref:function(e){return t.trackElement=e}},this.renderTracks()),r.createElement("div",{className:i.Classes.SLIDER_AXIS},this.renderLabels()),this.renderHandles())},t.prototype.componentDidMount=function(){this.updateTickSize()},t.prototype.componentDidUpdate=function(t,n){e.prototype.componentDidUpdate.call(this,t,n),this.updateTickSize()},t.prototype.validateProps=function(e){if(e.stepSize<=0)throw Error(s.SLIDER_ZERO_STEP);if(void 0!==e.labelStepSize&&void 0!==e.labelValues)throw Error(s.MULTISLIDER_WARN_LABEL_STEP_SIZE_LABEL_VALUES_MUTEX);if(void 0!==e.labelStepSize&&e.labelStepSize<=0)throw Error(s.SLIDER_ZERO_LABEL_STEP);if(void 0!==e.min&&!isFinite(e.min))throw Error(s.SLIDER_MIN);if(void 0!==e.max&&!isFinite(e.max))throw Error(s.SLIDER_MAX);var n=!1;if(r.Children.forEach(e.children,function(e){e&&!u.isElementOfType(e,t.Handle)&&(n=!0)}),n)throw Error(s.MULTISLIDER_INVALID_CHILD)},t.prototype.formatLabel=function(e,t){void 0===t&&(t=!1);var n=this.props.labelRenderer;return!1===n?void 0:u.isFunction(n)?n(e,{isHandleTooltip:t}):e.toFixed(this.state.labelPrecision)},t.prototype.renderLabels=function(){var e=this;if(!1===this.props.labelRenderer)return null;var t=this.getLabelValues(),n=this.props,a=n.max,o=n.min;return t.map(function(t,n){var s=(0,h.formatPercentage)((t-o)/(a-o)),l=e.props.vertical?{bottom:s}:{left:s};return r.createElement("div",{className:i.Classes.SLIDER_LABEL,key:n,style:l},e.formatLabel(t))})},t.prototype.renderTracks=function(){var e=m(this.props);e.push({value:this.props.max});for(var t={value:this.props.min},n=[],a=0;a<e.length;a++){var o=e[a];n.push(this.renderTrackFill(a,t,o)),t=o}return n},t.prototype.renderTrackFill=function(e,t,n){var s=[this.getOffsetRatio(t.value),this.getOffsetRatio(n.value)].sort(function(e,t){return e-t}),l=s[0],u=s[1],c=(0,h.formatPercentage)(l),d=(0,h.formatPercentage)(1-u),p=this.props.vertical?{bottom:c,top:d,left:0}:{left:c,right:d,top:0},f=a.__assign(a.__assign({},p),t.trackStyleAfter||n.trackStyleBefore||{}),v=(0,o.default)(i.Classes.SLIDER_PROGRESS,i.Classes.intentClass(this.getTrackIntent(t,n)));return r.createElement("div",{key:"track-".concat(e),className:v,style:f})},t.prototype.renderHandles=function(){var e=this,t=this.props,n=t.disabled,a=t.max,s=t.min,l=t.stepSize,u=t.vertical,h=v(this.props);return 0===h.length?null:h.map(function(t,p){var f,v=t.value,m=t.type,g=t.className,y=t.htmlProps;return r.createElement(c.Handle,{htmlProps:y,className:(0,o.default)(((f={})[i.Classes.START]=m===d.HandleType.START,f[i.Classes.END]=m===d.HandleType.END,f),g),disabled:n,key:"".concat(p,"-").concat(h.length),label:e.formatLabel(v,!0),max:a,min:s,onChange:e.getHandlerForIndex(p,e.handleChange),onRelease:e.getHandlerForIndex(p,e.handleRelease),ref:e.addHandleRef,stepSize:l,tickSize:e.state.t
1ickSize,tickSizeRatio:e.state.tickSizeRatio,value:v,vertical:u})})},t.prototype.nearestHandleForValue=function(e,t){return(0,h.argMin)(e,function(e){var n=t(e);return Math.abs(e.clientToValue(n)-e.props.value)})},t.prototype.getNewHandleValues=function(e,t){var n=v(this.props).map(function(e){return e.value}),a=n.slice();a[t]=e,a.sort(function(e,t){return e-t});var o=a.indexOf(e),r=this.findFirstLockedHandleIndex(t,o);if(-1===r)(0,h.fillValues)(a,t,o,e);else{var i=n[r];return(0,h.fillValues)(n,t,r,i),n}return a},t.prototype.findFirstLockedHandleIndex=function(e,t){for(var n=e<t?1:-1,a=v(this.props),o=e+n;o!==t+n;o+=n)if(a[o].interactionKind!==d.HandleInteractionKind.PUSH)return o;return -1},t.prototype.getLabelValues=function(){var e=this.props,t=e.labelStepSize,n=e.labelValues,a=e.min,o=e.max,r=[];if(void 0!==n)r=n.slice();else for(var i=a;i<o||u.approxEqual(i,o);i+=null!=t?t:1)r.push(i);return r},t.prototype.getOffsetRatio=function(e){return u.clamp((e-this.props.min)*this.state.tickSizeRatio,0,1)},t.prototype.getTrackIntent=function(e,t){return this.props.showTrackFill?void 0!==e.intentAfter?e.intentAfter:void 0!==t&&void 0!==t.intentBefore?t.intentBefore:this.props.defaultTrackIntent:i.Intent.NONE},t.prototype.updateTickSize=function(){if(null!=this.trackElement){var e=this.props.vertical?this.trackElement.clientHeight:this.trackElement.clientWidth,t=1/(this.props.max-this.props.min);this.setState({tickSize:e*t,tickSizeRatio:t})}},t.defaultSliderProps={disabled:!1,max:10,min:0,showTrackFill:!0,stepSize:1,vertical:!1},t.defaultProps=a.__assign(a.__assign({},t.defaultSliderProps),{defaultTrackIntent:i.Intent.NONE}),t.displayName="".concat(l.DISPLAYNAME_PREFIX,".MultiSlider"),t.Handle=p,t}(i.AbstractPureComponent2);function v(e){return m(e,function(e){return e.interactionKind!==d.HandleInteractionKind.NONE})}function m(e,t){var n=e.children;void 0===t&&(t=function(){return!0});var a=r.Children.map(n,function(e){return u.isElementOfType(e,f.Handle)&&t(e.props)?e.props:null}),o=null!=a?a:[];return(o=o.filter(function(e){return null!==e})).sort(function(e,t){return e.value-t.value}),o}t.MultiSlider=f},5292:function(e,t,n){"use strict";t.i=void 0;var a=n(18465),o=a.__importStar(n(67294)),r=n(86516),i=n(12640),s=n(54582),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.render=function(){var e=this.props,t=e.initialValue,n=e.intent,r=e.value,i=e.onChange,l=e.onRelease,u=e.handleHtmlProps,c=a.__rest(e,["initialValue","intent","value","onChange","onRelease","handleHtmlProps"]);return o.createElement(s.MultiSlider,a.__assign({},c),o.createElement(s.MultiSlider.Handle,{value:r,intentAfter:r<t?n:void 0,intentBefore:r>=t?n:void 0,onChange:i,onRelease:l,htmlProps:u}),o.createElement(s.MultiSlider.Handle,{value:t,interactionKind:"none"}))},t.defaultProps=a.__assign(a.__assign({},s.MultiSlider.defaultSliderProps),{initialValue:0,intent:r.Intent.PRIMARY,value:0}),t.displayName="".concat(i.DISPLAYNAME_PREFIX,".Slider"),t}(r.AbstractPureComponent2);t.i=l},29686:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argMin=t.fillValues=t.formatPercentage=void 0,t.formatPercentage=function(e){return"".concat((100*e).toFixed(2),"%")},t.fillValues=function(e,t,n,a){for(var o=t<n?1:-1,r=t;r!==n+o;r+=o)e[r]=a},t.argMin=function(e,t){if(0!==e.length){for(var n=e[0],a=t(n),o=1;o<e.length;o++){var r=e[o],i=t(r);i<a&&(n=r,a=i)}return n}}},27011:function(e,t,n){var a;a=function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(e),o=n(t);function r(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function l(e,t){var n,a=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}
1)),a.push.apply(a,n)),a}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],a=!0,o=!1,r=void 0;try{for(var i,s=e[Symbol.iterator]();!(a=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw r}}return n}}(e,t)||f(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function m(e,t){return new Promise(function(n,a){var o=new Image;o.onload=function(){return n(o)},o.onerror=a,!1==(null!==e&&!!e.match(/^\s*data:([a-z]+\/[a-z]+(;[a-z-]+=[a-z-]+)?)?(;base64)?,[a-z0-9!$&',()*+;=\-._~:@/?%\s]*\s*$/i))&&t&&(o.crossOrigin=t),o.src=e})}var g,y=!("undefined"==typeof window||"undefined"==typeof navigator||!("ontouchstart"in window||0<navigator.msMaxTouchPoints)),b="undefined"!=typeof File,E={touch:{react:{down:"onTouchStart",mouseDown:"onMouseDown",drag:"onTouchMove",move:"onTouchMove",mouseMove:"onMouseMove",up:"onTouchEnd",mouseUp:"onMouseUp"},native:{down:"touchstart",mouseDown:"mousedown",drag:"touchmove",move:"touchmove",mouseMove:"mousemove",up:"touchend",mouseUp:"mouseup"}},desktop:{react:{down:"onMouseDown",drag:"onDragOver",move:"onMouseMove",up:"onMouseUp"},native:{down:"mousedown",drag:"dragStart",move:"mousemove",up:"mouseup"}}},M=y?E.touch:E.desktop,w="undefined"!=typeof window&&window.devicePixelRatio?window.devicePixelRatio:1,S={x:.5,y:.5},I=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw 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&&d(e,t)}(l,o.default.Component);var e,t,n,a=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||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}}(),function(){var t,n=c(l);return t=e?Reflect.construct(n,arguments,c(this).constructor):n.apply(this,arguments),t&&("object"==typeof t||"function"==typeof t)?t:h(this)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,l),i(h(t=a.call(this,e)),"state",{drag:!1,my:null,mx:null,image:S}),i(h(t),"handleImageReady",function(e){var n=t.getInitialSize(e.width,e.height);n.resource=e,n.x=.5,n.y=.5,n.backgroundColor=t.props.backgroundColor,t.setState({drag:!1,image:n},t.props.onImageReady),t.props.onLoadSuccess(n)}),i(h(t),"clearImage",function(){t.canvas.getContext("2d").clearRect(0,0,t.canvas.width,t.canvas.height),t.setState({image:S})}),i(h(t),"handleMouseDown",function(e){(e=e||window.event).preventDefault(),t.setState({drag:!0,mx:null,my:null})}),i(h(t),"handleMouseUp",function(){t.state.drag&&(t.setState({drag:!1}),t.props.onMouseUp())}),i(h(t),"handleMouseMove",function(e){var n,a,o,r,i,s,l,c,d,h,p,f,v,m,g,y;e=e||window.event,!1!==t.state.drag&&(e.preventDefault(),o={mx:n=e.targetTouches?e.targetTouches[0].pageX:e.clientX,my:a=e.targetTouches?e.targetTouches[0].pageY:e.clientY},y=(y=t.props.rotate%360)<0?y+360:y,t.state.mx&&t.state.my&&(r=t.state.mx-n,i=t.state.my-a,s=t.state.image.width*t.props.scale,l=t.state.image.height*t.props.scale,d=(c=t.getCroppingRect
1()).x,h=c.y,d*=s,h*=l,f=Math.cos((p=function(e){return Math.PI/180*e})(y)),m=h+-r*(v=Math.sin(p(y)))+i*f,g={x:(d+r*f+i*v)/s+1/t.props.scale*t.getXScale()/2,y:m/l+1/t.props.scale*t.getYScale()/2},t.props.onPositionChange(g),o.image=u(u({},t.state.image),g)),t.setState(o),t.props.onMouseMove(e))}),i(h(t),"setCanvas",function(e){t.canvas=e}),t.canvas=null,t}return t=[{key:"componentDidMount",value:function(){this.props.disableHiDPIScaling&&(w=1);var e,t,n=this.canvas.getContext("2d");this.props.image&&this.loadImage(this.props.image),this.paint(n),document&&(e=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){e=!1}return e}()&&{passive:!1},t=M.native,document.addEventListener(t.move,this.handleMouseMove,e),document.addEventListener(t.up,this.handleMouseUp,e),y&&(document.addEventListener(t.mouseMove,this.handleMouseMove,e),document.addEventListener(t.mouseUp,this.handleMouseUp,e)))}},{key:"componentDidUpdate",value:function(e,t){this.props.image&&this.props.image!==e.image||this.props.width!==e.width||this.props.height!==e.height||this.props.backgroundColor!==e.backgroundColor?this.loadImage(this.props.image):this.props.image||t.image===S||this.clearImage();var n=this.canvas.getContext("2d");n.clearRect(0,0,this.canvas.width,this.canvas.height),this.paint(n),this.paintImage(n,this.state.image,this.props.border),e.image===this.props.image&&e.width===this.props.width&&e.height===this.props.height&&e.position===this.props.position&&e.scale===this.props.scale&&e.rotate===this.props.rotate&&t.my===this.state.my&&t.mx===this.state.mx&&t.image.x===this.state.image.x&&t.image.y===this.state.image.y&&t.backgroundColor===this.state.backgroundColor||this.props.onImageChange()}},{key:"componentWillUnmount",value:function(){var e;document&&(e=M.native,document.removeEventListener(e.move,this.handleMouseMove,!1),document.removeEventListener(e.up,this.handleMouseUp,!1),y&&(document.removeEventListener(e.mouseMove,this.handleMouseMove,!1),document.removeEventListener(e.mouseUp,this.handleMouseUp,!1)))}},{key:"isVertical",value:function(){return!this.props.disableCanvasRotation&&this.props.rotate%180!=0}},{key:"getBorders",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.props.border;return Array.isArray(t)?t:[t,t]}},{key:"getDimensions",value:function(){var e=this.props,t=e.width,n=e.height,a=e.rotate,o=e.border,r={},i=p(this.getBorders(o),2),s=i[0],l=i[1];return this.isVertical()?(r.width=n,r.height=t):(r.width=t,r.height=n),r.width+=2*s,r.height+=2*l,{canvas:r,rotate:a,width:t,height:n,border:o}}},{key:"getImage",value:function(){var e=this.getCroppingRect(),t=this.state.image;e.x*=t.resource.width,e.y*=t.resource.height,e.width*=t.resource.width,e.height*=t.resource.height;var n=document.createElement("canvas");this.isVertical()?(n.width=e.height,n.height=e.width):(n.width=e.width,n.height=e.height);var a=n.getContext("2d");return a.translate(n.width/2,n.height/2),a.rotate(this.props.rotate*Math.PI/180),a.translate(-n.width/2,-n.height/2),this.isVertical()&&a.translate((n.width-n.height)/2,(n.height-n.width)/2),t.backgroundColor&&(a.fillStyle=t.backgroundColor,a.fillRect(-e.x,-e.y,t.resource.width,t.resource.height)),a.drawImage(t.resource,-e.x,-e.y),n}},{key:"getImageScaledToCanvas",value:function(){var e=this.getDimensions(),t=e.width,n=e.height,a=document.createElement("canvas");return this.isVertical()?(a.width=n,a.height=t):(a.width=t,a.height=n),this.paintImage(a.getContext("2d"),this.state.image,0,1),a}},{key:"getXScale",value:function(){return Math.min(1,this.props.width/this.props.height/(this.state.image.width/this.state.image.height))}},{key:"getYScale",value:function(){return Math.min(1,this.props.height/this.props.width/(this.state.image.height/this.state.image.width))}},{key:"getCroppingRect",value:function(){var e=this.props.position||{x:this.state.image.x,y:this.state.image.y},t=1/this.props.scale*this.getXScale(),n=1/this.props.scale*this.getYScale(),a={x:e.x-t/2,y:e.y-n/2,width:t,height:n},o=0,r=1-a.width,i=0,s=1-a.height;return(this.props.disableBoundaryChecks||1<t||1<n)&&(o=-a.width,i=-a.height,s=r=1),u(u({},a),{},{x:Math.max(o,Math.min(a.x,r)),y:Math.max(i,Math.min(a.y,s))})}},{key:"loadImage",value:function(e){b&&e instanceof File?this.loadingImage=new Promise(function(t,n){var a=new FileReader;a.onload=function(e){try{var a=m(e.target.result);t(a)}catch(e){n(e)}},a.readAsDataURL(e)}).then(this.handleImageReady).catch(this.props.onLoadFailure):"string"==typeof e&&(this.loadingImage=m(e,this.props.crossOrigin).then(this.handleImageReady).catch(this.props.onLoadFailure))}},{key:"getInitialSize",value:function(e,t){var n,a,o=this.getDimensions();return t/e<o.height/o.width?a=(n=this.getDimensions().height)/t*e:n=(a=this.getDimensions().width)/e*t,{height:n,width:a}}},{key:"paintImage",value:function(e,t,n,a){var o,r=3<arguments.length&&void 0!==a?a:w;t.resource&&(o=this.calculatePosition(t,n),e.save(),e.translate(e.canvas.width/2,e.canvas.height/2),e.rotate(this.props.rotate*Math.PI/180),e.translate(-e.canvas.width/2,-e.canvas.height/2),this.isVertical()&&e.translate((e.canvas.width-e.canvas.height)/2,(e.canvas.height-e.canvas.width)/2),e.scale(r,r),e.globalCompositeOperation="destination-over",e.drawImage(t.resource,o.x,o.y,o.width,o.height),t.backgroundColor&&(e.fillStyle=t.backgroundColor,e.fillRect(o.x,o.y,o.width,o.height)),e.restore(
1))}},{key:"calculatePosition",value:function(e,t){e=e||this.state.image;var n=p(this.getBorders(t),2),a=n[0],o=n[1],r=this.getCroppingRect(),i=e.width*this.props.scale,s=e.height*this.props.scale,l=-r.x*i,u=-r.y*s;return this.isVertical()?(l+=o,u+=a):(l+=a,u+=o),{x:l,y:u,height:s,width:i}}},{key:"paint",value:function(e){e.save(),e.scale(w,w),e.translate(0,0),e.fillStyle="rgba("+this.props.color.slice(0,4).join(",")+")";var t,n,a,o,r,i=this.props.borderRadius,s=this.getDimensions(),l=p(this.getBorders(s.border),2),u=l[0],c=l[1],d=s.canvas.height,h=s.canvas.width,i=Math.max(i,0);i=Math.min(i,h/2-u,d/2-c),e.beginPath(),t=h-2*u,n=d-2*c,0===(a=i)?e.rect(u,c,t,n):(o=t-a,r=n-a,e.translate(u,c),e.arc(a,a,a,Math.PI,1.5*Math.PI),e.lineTo(o,0),e.arc(o,a,a,1.5*Math.PI,2*Math.PI),e.lineTo(t,r),e.arc(o,r,a,2*Math.PI,.5*Math.PI),e.lineTo(a,n),e.arc(a,r,a,.5*Math.PI,Math.PI),e.translate(-u,-c)),e.rect(h,0,-h,d),e.fill("evenodd"),e.restore()}},{key:"render",value:function(){var e=this.props,t=(e.scale,e.rotate,e.image,e.border,e.borderRadius,e.width,e.height,e.position,e.color,e.backgroundColor,e.style),n=(e.crossOrigin,e.onLoadFailure,e.onLoadSuccess,e.onImageReady,e.onImageChange,e.onMouseUp,e.onMouseMove,e.onPositionChange,e.disableBoundaryChecks,e.disableHiDPIScaling,e.disableCanvasRotation,function(e,t){if(null==e)return{};var n,a=function(e,t){if(null==e)return{};for(var n,a={},o=Object.keys(e),r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols)for(var o=Object.getOwnPropertySymbols(e),r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}(e,["scale","rotate","image","border","borderRadius","width","height","position","color","backgroundColor","style","crossOrigin","onLoadFailure","onLoadSuccess","onImageReady","onImageChange","onMouseUp","onMouseMove","onPositionChange","disableBoundaryChecks","disableHiDPIScaling","disableCanvasRotation"])),a=this.getDimensions(),r={width:a.canvas.width,height:a.canvas.height,cursor:this.state.drag?"grabbing":"grab",touchAction:"none"},i={width:a.canvas.width*w,height:a.canvas.height*w,style:u(u({},r),t)};return i[M.react.down]=this.handleMouseDown,y&&(i[M.react.mouseDown]=this.handleMouseDown),o.default.createElement("canvas",s({ref:this.setCanvas},i,n))}}],r(l.prototype,t),n&&r(l,n),l}();return i(I,"propTypes",{scale:a.default.number,rotate:a.default.number,image:a.default.oneOfType([a.default.string].concat(function(e){if(Array.isArray(e))return v(e)}(g=b?[a.default.instanceOf(File)]:[])||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(g)||f(g)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),border:a.default.oneOfType([a.default.number,a.default.arrayOf(a.default.number)]),borderRadius:a.default.number,width:a.default.number,height:a.default.number,position:a.default.shape({x:a.default.number,y:a.default.number}),color:a.default.arrayOf(a.default.number),backgroundColor:a.default.string,crossOrigin:a.default.oneOf(["","anonymous","use-credentials"]),onLoadFailure:a.default.func,onLoadSuccess:a.default.func,onImageReady:a.default.func,onImageChange:a.default.func,onMouseUp:a.default.func,onMouseMove:a.default.func,onPositionChange:a.default.func,disableBoundaryChecks:a.default.bool,disableHiDPIScaling:a.default.bool,disableCanvasRotation:a.default.bool}),i(I,"defaultProps",{scale:1,rotate:0,border:25,borderRadius:0,width:200,height:200,color:[0,0,0,.5],onLoadFailure:function(){},onLoadSuccess:function(){},onImageReady:function(){},onImageChange:function(){},onMouseUp:function(){},onMouseMove:function(){},onPositionChange:function(){},disableBoundaryChecks:!1,disableHiDPIScaling:!1,disableCanvasRotation:!0}),I},e.exports=a(n(45697),n(67294))}}]);

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.