text: module.exports=function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}({0:function(e,t,i){i(1042),e.exports=i(1042)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},1042:function(e,t,i){var n,o,a;!function(r,define){o=[i(1043),i(1044)],n=r,a="function"==typeof n?n.apply(t,o):n,!(void 0!==a&&(e.exports=a))}(function(){return function(e,t){var i=window.kendo,n=i.ui.imageeditor,o=e.extend,a=e.proxy,r=i.Class,d=r.extend({init:function(e){this.options=o({},e,this.options),this.imageeditor=e.imageeditor}}),g=d.extend({init:function(e){d.fn.init.call(this,e)},exec:function(){var e=this,t=e.imageeditor,i=new n.panes[e.options.value](t);i.open()}}),c=d.extend({options:{zoomStep:.05,spacing:20},init:function(e){d.fn.init.call(this,e)},exec:function(){var t=this,i=t.options,n=i.value,o=t.imageeditor,a=o._image.height,r=o.getZoomLevel(),d=a;isNaN(n)?"string"==typeof n&&(n=t._processStringValue(n,r)):n=parseFloat(n),d=Math.round(a*n),d>0&&(e(o._canvas).css("height",d),o._zoomLevel=n),o.currentPaneTool&&o.currentPaneTool.refresh()},_processStringValue:function(e,t){var i=this,n=i.options,o=i.imageeditor,a=o._image.height,r=o.canvasWrapper.height()-n.spacing,d=n.zoomStep;switch(e){case"zoomIn":return t+d;case"zoomOut":return t-d;case"fitToScreen":return Math.round(r/a*100)/100;default:return 1}}}),s=d.extend({init:function(e){d.fn.init.call(this,e)},exec:function(){var e=this,t=e.options,i=e.imageeditor,n=i.getCanvasElement(),o=i.getCurrent2dContext(),a=o.getImageData(t.left,t.top,t.width,t.height);o.clearRect(0,0,n.width,n.height),n.width=t.width,n.height=t.height,o.putImageData(a,0,0),i.drawImage(n.toDataURL()).done(function(e){i.drawCanvas(e)}).fail(function(e){i.trigger("error",e)})}}),u=d.extend({init:function(e){d.fn.init.call(this,e)},exec:function(){var e=this,t=e.options,i=e.imageeditor,n=i.getCanvasElement(),o=i.getCurrent2dContext(),a=i.getCurrentImage();o.clearRect(0,0,n.width,n.height),n.width=t.width,n.height=t.height,o.drawImage(a,0,0,t.width,t.height),i.drawImage(n.toDataURL()).done(function(e){i.drawCanvas(e)}).fail(function(e){i.trigger("error",e)})}}),h=d.extend({exec:function(){var e=this,t=e.imageeditor,i=t.getCanvasElement(),n=t.getCurrent2dContext(),o=t.undoStack.pop();o&&(t.redoStack.push(t.getCurrentImage()),delete t._image,n.clearRect(0,0,i.width,i.height),i.width=o.width,i.height=o.height,n.drawImage(o,0,0,o.width,o.height),t.drawImage(i.toDataURL()).done(function(e){t.drawCanvas(e)}).fail(function(e){t.trigger("error",e)}))}}),m=d.extend({exec:function(){var e=this,t=e.imageeditor,i=t.getCanvasElement(),n=t.getCurrent2dContext(),o=t.redoStack.pop();o&&(t.undoStack.push(t.getCurrentImage()),delete t._image,n.clearRect(0,0,i.width,i.height),i.width=o.width,i.height=o.height,n.drawImage(o,0,0,o.width,o.height),t.drawImage(i.toDataURL()).done(function(e){t.drawCanvas(e)}).fail(function(e){t.trigger("error",e)}))}}),l=d.extend({exec:function(){var e=this,t=e.imageeditor,n=t.getCanvasElement();i.saveAs(o({},t.options.saveAs,{dataURI:n.toDataURL()}))}}),p=d.extend({exec:function(){var t,i=this,n=i.imageeditor,o=n._upload;o||(t=e("<input type='file' />"),t.kendoUpload({select:a(i.onSelect,i),error:a(i.onError,i),multiple:!1,validation:{allowedExtensions:[".jpg",".jpeg",".gif",".png",".bmp",".tiff",".webp"]}}),n._upload=o=t.getKendoUpload()),o.element.click()},onSelect:function(e){var t=this,i=t.imageeditor,n=e.files[0].rawFile,o=new FileReader;o.addEventListener("load",function(){i.drawImage(o.result).done(function(e){i.trigger("imageLoaded",{image:e})||(i.drawCanvas(e),i._initUndoRedoStack(),i._toggleTools())}).fail(function(e){i.trigger("error",e)})},!1),n&&o.readAsDataURL(n)},onError:function(e){var t=this,i=t.imageeditor;i.trigger("error",e)}});o(i.ui.imageeditor,{ImageEditorCommand:d,commands:{OpenPaneImageEditorCommand:g,ZoomImageEditorCommand:c,CropImageEditorCommand:s,ResizeImageEditorCommand:u,UndoImageEditorCommand:h,RedoImageEditorCommand:m,SaveImageEditorCommand:l,OpenImageEditorCommand:p}})}(window.kendo.jQuery),window.kendo},i(3))},1043:function(e,t){e.exports=require("./pane")},1044:function(e,t){e.exports=require("../kendo.upload")}});