(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["wizard-user_photo-UserPhotoWizardController","filebrowser-CameraBrowser","filebrowser-TImage","filebrowser-TImageAdvBrowser","filebrowser-TImageBrowser","filebrowser-TImageCutArea"],{8128:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.CameraBrowser = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.CameraBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\n\t\tvar enabled = true;\n\t\tvar video = null;\n\t\tvar canvas = null;\n\n\t\tvar local_stream = null;\n\n\t\tthis.stopCamera = function() {\n\n\t\t\tif ( local_stream ) {\n\t\t\t\tif ( local_stream.stop ) {\n\t\t\t\t\t// This is the legacy method to stop video.\n\t\t\t\t\tlocal_stream.stop();\n\t\t\t\t} else if ( local_stream.getTracks ) {\n\t\t\t\t\t// This is the modern approach for stopping the video. https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/stop\n\t\t\t\t\tlocal_stream.getTracks().forEach( track => track.stop() );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.showCamera = function() {\n\n\t\t\t// check for getUserMedia support\n\t\t\tnavigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\n\t\t\tif ( navigator.mediaDevices && navigator.mediaDevices.getUserMedia ) {\n\t\t\t\t// Most up to date as of May 2020 (Aside from using async and await) https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia\n\n\t\t\t\t// get webcam feed if available\n\t\t\t\tnavigator.mediaDevices.getUserMedia( { video: true } )\n\t\t\t\t\t.then(function(stream) {\n\t\t\t\t\t\tif ('srcObject' in video) {\n\t\t\t\t\t\t\tvideo.srcObject = stream;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Fallback for older browsers. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject#Supporting_fallback_to_the_src_property\n\t\t\t\t\t\t\tvideo.src = URL.createObjectURL( stream );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvideo.play();\n\t\t\t\t\t\tlocal_stream = stream;\n\t\t\t\t\t})\n\t\t\t\t\t.catch(function(err) {\n\t\t\t\t\t\terrorBack();\n\t\t\t\t\t});\n\t\t\t} else if ( navigator.getUserMedia ) {\n\t\t\t\t// Semi-deprecated, legacy, but still works. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia\n\n\t\t\t\t// get webcam feed if available\n\t\t\t\tnavigator.getUserMedia( { video: true }, function( stream ) {\n\t\t\t\t\tif ('srcObject' in video) {\n\t\t\t\t\t\tvideo.srcObject = stream;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Fallback for older browsers. https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject#Supporting_fallback_to_the_src_property\n\t\t\t\t\t\tvideo.src = URL.createObjectURL( stream );\n\t\t\t\t\t}\n\t\t\t\t\tvideo.play();\n\t\t\t\t\tlocal_stream = stream;\n\t\t\t\t}, errorBack );\n\t\t\t} else if ( navigator.webkitGetUserMedia ) { // WebKit-prefixed\n\t\t\t\tnavigator.webkitGetUserMedia( { video: true }, function( stream ) {\n\t\t\t\t\tvideo.src = window.webkitURL.createObjectURL( stream );\n\t\t\t\t\tvideo.play();\n\t\t\t\t\tlocal_stream = stream;\n\t\t\t\t}, errorBack );\n\t\t\t} else if ( navigator.mozGetUserMedia ) { // Firefox-prefixed\n\t\t\t\tnavigator.mozGetUserMedia( { video: true }, function( stream ) {\n\t\t\t\t\tvideo.src = window.URL.createObjectURL( stream );\n\t\t\t\t\tvideo.play();\n\t\t\t\t\tlocal_stream = stream;\n\t\t\t\t}, errorBack );\n\t\t\t} else {\n\t\t\t\terrorBack();\n\t\t\t}\n\n\t\t\tfunction errorBack() {\n\t\t\t\tTAlertManager.showAlert( $.i18n._( 'Unable to access Camera.

Please check your camera connections, permissions, and ensure you are using HTTPS. Alternatively, use the File upload method instead.' ) );\n\t\t\t}\n\t\t};\n\n\t\tthis.setEnable = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.children().eq( 1 );\n\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.attr( 'disabled', true );\n\t\t\t\tbtn.removeClass( 'disable-element' ).addClass( 'disable-element' );\n\t\t\t} else {\n\t\t\t\tbtn.removeAttr( 'disabled' );\n\t\t\t\tbtn.removeClass( 'disable-element' );\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn false;\n\t\t};\n\n\t\tthis.getFileName = function() {\n\t\t\treturn 'camera_stream.png';\n\t\t};\n\n\t\tthis.getImageSrc = function() {\n\t\t\treturn canvas[0].toDataURL();\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tvar image = $this.children().eq( 0 );\n\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tthis.onImageLoad = function( image ) {\n\n//\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n//\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n//\n//\t\t\tif ( image_height > default_height ) {\n//\t\t\t\t$( image ).css( 'height', default_height );\n//\n//\t\t\t}\n//\n//\t\t\tif ( image_width > default_width ) {\n//\t\t\t\t$( image ).css( 'width', default_width );\n//\n//\t\t\t\t$( image ).css( 'height', 'auto' );\n//\t\t\t}\n//\n//\t\t\t$this.trigger( 'setSize' );\n\n\t\t\t$( image ).show();\n\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\tvar $$this = this;\n\n\t\t\tvideo = $( this ).children().eq( 0 ).children().eq( 0 )[0];\n\t\t\tcanvas = $( this ).children().eq( 0 ).children().eq( 1 );\n\n\t\t\tvar take_picture = $( this ).children().eq( 1 ).children().eq( 0 );\n\t\t\tvar try_again = $( this ).children().eq( 1 ).children().eq( 1 );\n\n\t\t\t// Set initial states of the buttons.\n\t\t\ttake_picture.prop( 'disabled', false );\n\t\t\ttry_again.prop( 'disabled', true );\n\n\t\t\ttake_picture.bind( 'click', function() {\n\t\t\t\ttake_picture.prop( 'disabled', true );\n\t\t\t\ttry_again.prop( 'disabled', false );\n\t\t\t\t// Global.glowAnimation.start(); // not needed here as its triggered in UserPhotoWizardController.buildCurrentStepUI()\n\n\t\t\t\t// flash the photo area to indicate a picture has been taken.\n\t\t\t\tcanvas.parent().addClass( 'flash' );\n\n\t\t\t\tsetTimeout( function(){\n\t\t\t\t\tcanvas.parent().removeClass( 'flash' );\n\t\t\t\t}, 1000);\t// Timeout must be the same length as the CSS3 transition or longer (or you'll mess up the transition)\n\n\t\t\t\t// handle picture taking\n\t\t\t\tvar ctx = canvas[0].getContext( '2d' );\n\t\t\t\tctx.drawImage( video, 0, 0, 400, 300 );\n\t\t\t\tcanvas.css( 'z-index', 51 );\n\n\t\t\t\t$this.trigger( 'change', [$this] );\n\t\t\t} );\n\n\t\t\ttry_again.bind( 'click', function() {\n\t\t\t\ttake_picture.prop( 'disabled', false );\n\t\t\t\ttry_again.prop( 'disabled', true );\n\t\t\t\tGlobal.glowAnimation.stop();\n\n\t\t\t\tcanvas.css( 'z-index', -1 );\n\n\t\t\t\t$this.trigger( 'NoImageChange', [$this] );\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.CameraBrowser.defaults = {};\n\t$.fn.CameraBrowser.html_template = `\n\t
\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t\n\t\t
\n\t
\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODEyOC5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBTTtBQUNOO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSwyQ0FBMkMsY0FBYztBQUN6RDtBQUNBO0FBQ0E7QUFDQSxRQUFRO0FBQ1I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQU07QUFDTjtBQUNBO0FBQ0EsTUFBTTtBQUNOLEtBQUs7QUFDTDs7QUFFQTtBQUNBLDhCQUE4QixhQUFhO0FBQzNDO0FBQ0E7QUFDQSxPQUFPO0FBQ1A7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTCxLQUFLLDJDQUEyQztBQUNoRCxvQ0FBb0MsYUFBYTtBQUNqRDtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0wsS0FBSyx3Q0FBd0M7QUFDN0MsaUNBQWlDLGFBQWE7QUFDOUM7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMLEtBQUs7QUFDTDtBQUNBOztBQUVBO0F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cm93c2VyLmh0bWxfdGVtcGxhdGUgPSBgXG5cdDxkaXYgY2xhc3M9XCJmaWxlLWJyb3dzZXJcIj5cblx0XHQ8ZGl2IGNsYXNzPVwidmlkZW8tZGl2XCI+XG5cdFx0XHQ8dmlkZW8gY2xhc3M9XCJ2aWRlby1kaXNwbGF5XCIgd2lkdGg9XCI0MDBcIiBoZWlnaHQ9XCIzMDBcIj5cblx0XHRcdDwvdmlkZW8+XG5cdFx0XHQ8Y2FudmFzIGNsYXNzPVwidmlkZW8tY2FwdHVyZVwiIHdpZHRoPVwiNDAwXCIgaGVpZ2h0PVwiMzAwXCI+XG5cdFx0XHQ8L2NhbnZhcz5cblx0XHQ8L2Rpdj5cblx0XHQ8ZGl2IGNsYXNzPVwiYnV0dG9uc1wiPlxuXHRcdFx0PGJ1dHRvbiBpZD1cInRha2VfcGljdHVyZVwiIGNsYXNzPVwidC1idXR0b25cIj5UYWtlIFBpY3R1cmU8L2J1dHRvbj5cblx0XHRcdDxidXR0b24gaWQ9XCJ0cnlfYWdhaW5cIiBjbGFzcz1cInQtYnV0dG9uXCI+VHJ5IEFnYWluPC9idXR0b24+XG5cdFx0PC9kaXY+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8128\n")},1469:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImage = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImage.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn null;\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\tthis.attr( 'src', '' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar d = new Date();\n\t\t\tthis.attr( 'src', val + '&t=' + d.getTime() );\n\n\t\t};\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImage.defaults = {};\n\n\t$( document ).on( 'mouseover', '.file-browser img', function( e ) {\n\t\tvar $this_image_widget = $( e.target ).parents( '.file-browser' );\n\n\t\tif ( !$( '.file_browser_overlay' )[0] && $( e.target ).attr( 'enable-delete' ) == 1 ) {\n\t\t\tvar height = $( e.target ).height();\n\t\t\tvar top = ( height - 32 ) / 2;\n\t\t\tvar left = top;\n\n\t\t\tvar file_browser_overlay = $( '
' );\n\t\t\tfile_browser_overlay.css( 'position', 'absolute' );\n\t\t\tfile_browser_overlay.css( 'top', '0px' );\n\t\t\tfile_browser_overlay.css( 'left', '0' );\n\t\t\tfile_browser_overlay.css( 'cursor', 'pointer' );\n\t\t\tfile_browser_overlay.css( 'height', height + 'px' );\n\t\t\tfile_browser_overlay.css( 'width', '100%' );\n\t\t\tfile_browser_overlay.css( 'background', 'rgba(255,255,255,0.85)' );\n\n\t\t\t$( e.target ).parents( '.file-browser' ).append( file_browser_overlay );\n\n\t\t\t$( document ).on( 'click', '.file_browser_overlay', function( e ) {\n\t\t\t\tvar img_src = $( e.target ).parent().find( 'img' ).attr( 'src' );\n\t\t\t\tTAlertManager.showConfirmAlert( $.i18n._( 'This will permanently delete the image. Are you sure?' ), '', function( flag ) {\n\t\t\t\t\tif ( flag ) {\n\t\t\t\t\t\tvar e = { type: 'deleteClick', message: 'Delete image clicked.', time: new Date() };\n\t\t\t\t\t\t$this_image_widget.trigger( e );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t$( document ).on( 'mouseleave', '.file-browser', function() {\n\t\t\t\t$( document ).off( 'click', '.file_browser_overlay' );\n\t\t\t\tif ( $( '.file_browser_overlay' )[0] ) {\n\t\t\t\t\tvar file_browser_overlay = $( this ).find( '.file_browser_overlay' );\n\t\t\t\t\tfile_browser_overlay.off().remove();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQ2OS5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQSxnQ0FBZ0M7O0FBRWhDOztBQUVBLElBQUk7O0FBRUo7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSw0SUFBNEksV0FBVyxZQUFZLGtCQUFrQixvQkFBb0I7QUFDek07QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQkFBZ0I7QUFDaEI7QUFDQTtBQUNBLE1BQU07QUFDTixLQUFLOztBQUVMO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBLEdBQUc7O0FBRUgsRUFBRSxHQUFHLE1BQU0iLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9pbnRlcmZhY2UvaHRtbDUvZ2xvYmFsL3dpZGdldHMvZmlsZWJyb3dzZXIvVEltYWdlLmpzPzllOTIiXSwic291cmNlc0NvbnRlbnQiOlsiKCBmdW5jdG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lcicsIGZ1bmN0aW9uKCkge1xuXHRcdFx0XHQkKCBkb2N1bWVudCApLm9mZiggJ2NsaWNrJywgJy5maWxlX2Jyb3dzZXJfb3ZlcmxheScgKTtcblx0XHRcdFx0aWYgKCAkKCAnLmZpbGVfYnJvd3Nlcl9vdmVybGF5JyApWzBdICkge1xuXHRcdFx0XHRcdHZhciBmaWxlX2Jyb3dzZXJfb3ZlcmxheSA9ICQoIHRoaXMgKS5maW5kKCAnLmZpbGVfYnJvd3Nlcl9vdmVybGF5JyApO1xuXHRcdFx0XHRcdGZpbGVfYnJvd3Nlcl9vdmVybGF5Lm9mZigpLnJlbW92ZSgpO1xuXHRcdFx0XHR9XG5cdFx0XHR9ICk7XG5cdFx0fVxuXHR9ICk7XG5cbn0gKSggalF1ZXJ5ICk7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///1469\n")},8243:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageAdvBrowser = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageAdvBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar name = 'filedata';\n\n\t\tvar accept_filter = '';\n\n\t\tvar default_width = 177;\n\t\tvar default_height = 42;\n\n\t\tvar callBack = null;\n\n\t\tvar enabled = true;\n\n\t\tvar image;\n\n\t\tvar result_form_data;\n\n\t\tthis.setEnable = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.children().eq( 1 );\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.hide();\n\t\t\t} else {\n\t\t\t\tbtn.show();\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\treturn result_form_data;\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() + '&X-CSRF-Token=' + getCookie( 'CSRF-Token' ) );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tthis.onImageLoad = function( image ) {\n\n\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n\n\t\t\tif ( image_height > default_height ) {\n\t\t\t\t$( image ).css( 'height', default_height );\n\n\t\t\t}\n\n\t\t\tif ( image_width > default_width ) {\n\t\t\t\t$( image ).css( 'width', default_width );\n\t\t\t\t$( image ).css( 'height', 'auto' );\n\t\t\t}\n\n\t\t\t$this.trigger( 'setSize' );\n\n\t\t\tif ( image_height < 5 ) {\n\t\t\t\t$( image ).hide();\n\t\t\t} else {\n\t\t\t\t$( image ).show();\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setEnableDelete = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\tif ( !val ) {\n\t\t\t\timage.removeAttr( 'enable-delete' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\timage.attr( 'enable-delete', 1 );\n\t\t\t}\n\t\t};\n\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\tvar $$this = this;\n\n\t\t\t$( this ).find( '#upload_image' ).text( $.i18n._( 'Upload Image' ) );\n\n\t\t\tif ( o.callBack ) {\n\t\t\t\tcallBack = o.callBack;\n\t\t\t}\n\n\t\t\tif ( o.show_browser === false ) {\n\t\t\t\t$( this ).children().eq( 1 ).hide();\n\t\t\t}\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( accept_filter ) ) {\n\t\t\t\taccept_filter = o.accept_filter;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.deleteImageHandler ) ) {\n\t\t\t\t$this.find( '.file-browser' ).on( 'deleteClick', function() {\n\t\t\t\t\to.deleteImageHandler();\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tvar browser = $( this ).children().eq( 1 );\n\t\t\tbrowser.bind( 'click', function() {\n\t\t\t\tIndexViewController.openWizard( 'UserPhotoWizard', null, function( form_data ) {\n\n\t\t\t\t\tif ( callBack ) {\n\t\t\t\t\t\tcallBack( form_data );\n\t\t\t\t\t}\n\n\t\t\t\t\tresult_form_data = form_data;\n\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\timage = $( this ).children().eq( 0 );\n\t\t\timage.on( 'load', function() {\n\t\t\t\t$this.onImageLoad( this );\n\t\t\t} );\n\n\t\t\timage.hide();\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImageAdvBrowser.defaults = {};\n\t$.fn.TImageAdvBrowser.html_template = `\n\t
\n\t\t\n\t\t\n\t
\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODI0My5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7QUFDQ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G5cIiBzdHlsZT1cImRpc3BsYXk6IGJsb2NrXCI+PC9idXR0b24+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8243\n")},8326:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageBrowser = function( options ) {\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar id = 'file_browser';\n\t\tvar name = 'filedata';\n\t\tvar browser;\n\n\t\tvar accept_filter = '';\n\n\t\tvar default_width = 177;\n\t\tvar default_height = 42;\n\t\tvar enabled = true;\n\n\t\tthis.setEnabled = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.find( '.browser-form input' );\n\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.attr( 'disabled', true );\n\t\t\t\tbtn.removeClass( 'disable-element' ).addClass( 'disable-element' );\n\t\t\t} else {\n\t\t\t\tbtn.removeAttr( 'disabled' );\n\t\t\t\tbtn.removeClass( 'disable-element' );\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getFileName = function() {\n\n\t\t\treturn browser.val();\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.setEnableDelete = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\tif ( !val ) {\n\t\t\t\timage.removeAttr( 'enable-delete' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\timage.attr( 'enable-delete', 1 );\n\t\t\t}\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\tvar form_data;\n\t\t\tif ( browser && browser.val() ) {\n\n\t\t\t\tif ( typeof FormData == 'undefined' ) {\n\t\t\t\t\tform_data = $this.find( '.browser-form' );\n\t\t\t\t} else {\n\t\t\t\t\tform_data = new FormData( $( $this.find( '.browser-form' ) )[0] );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tform_data = null;\n\t\t\t}\n\n\t\t\treturn form_data;\n\t\t};\n\n\t\tthis.getImageSrc = function() {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\treturn image.attr( 'src' );\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tvar onImageLoad = function( image ) {\n\n\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n\n\t\t\tif ( image_height > default_height ) {\n\t\t\t\t$( image ).css( 'height', default_height );\n\n\t\t\t}\n\n\t\t\tif ( image_width > default_width ) {\n\t\t\t\t$( image ).css( 'width', default_width );\n\t\t\t\t$( image ).css( 'height', 'auto' );\n\t\t\t}\n\n\t\t\t$this.trigger( 'setSize' );\n\n\t\t\tif ( image_height < 5 ) {\n\t\t\t\t$( image ).hide();\n\t\t\t} else {\n\t\t\t\t$( image ).show();\n\t\t\t}\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tthis.each( function() {\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\t// var $this = this;\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( accept_filter ) ) {\n\t\t\t\taccept_filter = o.accept_filter;\n\t\t\t}\n\n\t\t\tbrowser = $( this ).find( '.browser' );\n\t\t\tvar image = $( this ).find( '.image' );\n\t\t\timage.hide();\n\t\t\timage.on( 'load', function() {\n\t\t\t\tonImageLoad( this );\n\n\t\t\t} );\n\n\t\t\tif ( accept_filter ) {\n\t\t\t\tbrowser.attr( 'accept', accept_filter );\n\t\t\t} else {\n\t\t\t\taccept_filter = 'image/*';\n\t\t\t\tbrowser.attr( 'accept', 'image/*' );\n\t\t\t}\n\n\t\t\tbrowser.attr( 'id', id );\n\t\t\tbrowser.attr( 'name', name );\n\n\t\t\tif ( Global.isSet( o.changeHandler ) ) {\n\n\t\t\t\t$this.bind( 'imageChange', o.changeHandler );\n\t\t\t}\n\t\t\tif ( Global.isSet( o.deleteImageHandler ) ) {\n\t\t\t\tthis.find( '.file-browser' ).on( 'deleteClick', function() {\n\t\t\t\t\to.deleteImageHandler();\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tbrowser.bind( 'change', function() {\n\t\t\t\timage.hide();\n\n\t\t\t\tif ( typeof FileReader != 'undefined' ) {\n\n\t\t\t\t\tvar files = !!this.files ? this.files : [];\n\n\t\t\t\t\t// If no files were selected, or no FileReader support, return\n\t\t\t\t\tif ( !files.length || !window.FileReader ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( accept_filter === 'image/*' ) {\n\t\t\t\t\t\t// Create a new instance of the FileReader\n\t\t\t\t\t\tvar reader = new FileReader();\n\n\t\t\t\t\t\t// Read the local file as a DataURL\n\t\t\t\t\t\treader.readAsDataURL( files[0] );\n\n\t\t\t\t\t\t// When loaded, set image data as background of div\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = this.result;\n\t\t\t\t\t\t\timage.attr( 'src', url );\n\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$this.trigger( 'imageChange', [$this] );\n\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImageBrowser.defaults = {};\n\t$.fn.TImageBrowser.html_template = `\n\t
\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t
\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODMyNi5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7QUFDQTtBQUNBLHlCQUF5Qjs7QUFFekI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsTUFBTTtBQUNOO0FBQ0E7O0FBRUEsS0FBSzs7QUFFTDtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBOztBQUV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XHRcdFx0XHRcdFx0aW1hZ2UuYXR0ciggJ3NyYycsIHVybCApO1xuXG5cdFx0XHRcdFx0XHR9O1xuXHRcdFx0XHRcdH1cblxuXHRcdFx0XHR9XG5cblx0XHRcdFx0JHRoaXMudHJpZ2dlciggJ2ltYWdlQ2hhbmdlJywgWyR0aGlzXSApO1xuXG5cdFx0XHR9ICk7XG5cblx0XHR9ICk7XG5cblx0XHRyZXR1cm4gdGhpcztcblxuXHR9O1xuXG5cdCQuZm4uVEltYWdlQnJvd3Nlci5kZWZhdWx0cyA9IHt9O1xuXHQkLmZuLlRJbWFnZUJyb3dzZXIuaHRtbF90ZW1wbGF0ZSA9IGBcblx0PGRpdiBjbGFzcz1cImZpbGUtYnJvd3NlclwiPlxuXHRcdDxpbWcgY2xhc3M9XCJpbWFnZVwiPlxuXHRcdDxmb3JtIGVuY3R5cGU9XCJtdWx0aXBhcnQvZm9ybS1kYXRhXCIgY2xhc3M9XCJicm93c2VyLWZvcm1cIj5cblx0XHRcdDxpbnB1dCBuYW1lPVwiZmlsZWRhdGFcIiBjbGFzcz1cImJyb3dzZXJcIiB0eXBlPVwiZmlsZVwiLz5cblx0XHQ8L2Zvcm0+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8326\n")},8453:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageCutArea = function( options ) {\n\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageCutArea.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar name = 'filedata';\n\n\t\tvar default_width = 400;\n\t\tvar default_height = 300;\n\n\t\tvar default_after_width = 200;\n\t\tvar default_after_height = 150;\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.getValue = function() {\n\n\t\t};\n\n\t\tvar setAfterImage = function( val ) {\n\t\t\tvar image = $this.children().eq( 1 ).children().eq( 1 );\n\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar d = new Date();\n\t\t\timage.attr( 'src', val );\n\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tvar image = $this.children().eq( 0 ).children().eq( 1 );\n\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar d = new Date();\n\t\t\timage.attr( 'src', val );\n\n\t\t\tsetAfterImage( val );\n\n\t\t\tsetTimeout( function() {\n\t\t\t\t$( image ).imgAreaSelect( {\n\t\t\t\t\thandles: true,\n\t\t\t\t\tx1: 0,\n\t\t\t\t\ty1: 0,\n\t\t\t\t\tx2: $( image ).width(),\n\t\t\t\t\ty2: $( image ).height(),\n\t\t\t\t\tonSelectEnd: function( img, selection ) {\n\n\t\t\t\t\t\tvar rate = image[0].naturalWidth / image.width();\n\t\t\t\t\t\tvar sx = selection.x1 * rate;\n\t\t\t\t\t\tvar sy = selection.y1 * rate;\n\t\t\t\t\t\tvar tx = selection.x2 * rate;\n\t\t\t\t\t\tvar ty = selection.y2 * rate - 1;\n\t\t\t\t\t\tvar width = selection.width * rate;\n\t\t\t\t\t\tvar height = selection.height * rate;\n\n\t\t\t\t\t\tvar canvas = $( '' );\n\t\t\t\t\t\tcanvas = canvas[0];\n\t\t\t\t\t\tcanvas.width = width;\n\t\t\t\t\t\tcanvas.height = height;\n\t\t\t\t\t\tvar ctx = canvas.getContext( '2d' );\n\n\t\t\t\t\t\tctx.drawImage( image[0], sx, sy, width - 1, height - 1, 0, 0, width, height );\n\t\t\t\t\t\tsetAfterImage( '' );\n\t\t\t\t\t\tsetAfterImage( canvas.toDataURL() );\n\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}, 100 );\n\n\t\t};\n\n\t\tthis.getAfterImageSrc = function() {\n\t\t\tvar image = $this.children().eq( 1 ).children().eq( 1 );\n\n\t\t\treturn image.attr( 'src' );\n\t\t};\n\n\t\tthis.clearSelect = function() {\n\t\t\tvar image = $this.children().eq( 0 ).children().eq( 1 );\n\n\t\t\t$( image ).imgAreaSelect( { remove: true } );\n\n\t\t};\n\n\t\tvar onImageLoad = function( image ) {\n\n//\t\t\tif ( $( image ).height() > default_height ) {\n//\t\t\t\t$( image ).css( 'height', default_height );\n//\n//\t\t\t}\n//\n//\t\t\tif ( $( image ).width() > default_width ) {\n//\t\t\t\t$( image ).css( 'width', default_width );\n//\n//\t\t\t\t$( image ).css( 'height', 'auto' );\n//\t\t\t}\n\n//\t\t\t$( image ).show();\n\n\t\t};\n\n\t\tvar onAfterImageLoad = function( image ) {\n\n//\t\t\tif ( $( image ).height() > default_after_height ) {\n//\t\t\t\t$( image ).css( 'height', default_after_height );\n//\n//\t\t\t}\n//\n//\t\t\tif ( $( image ).width() > default_after_width ) {\n//\t\t\t\t$( image ).css( 'width', default_after_width );\n//\n//\t\t\t\t$( image ).css( 'height', 'auto' );\n//\t\t\t}\n\n//\t\t\t$( image ).show();\n\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tfor ( var i = 0; i < this.length; i++ ) {\n\t\t\tvar $item = this[i];\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( $item ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tvar image = $( $item ).children().eq( 0 ).children().eq( 1 );\n\t\t\timage.on( 'load', function() {\n\t\t\t\tonImageLoad( this );\n\n\t\t\t} );\n\n\t\t\tvar after_image = $( $item ).children().eq( 1 ).children().eq( 1 );\n\t\t\tafter_image.on( 'load', function() {\n\t\t\t\tonAfterImageLoad( this );\n\n\t\t\t} );\n\n\t\t}\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.TImageCutArea.defaults = {};\n\t$.fn.TImageCutArea.html_template = `\n\t
\n\t\t
\n\t\t\tBefore:\n\t\t\t\n\t\t
\n\t\t
\n\t\t\tAfter:\n\t\t\t\n\t\t
\n\t
\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODQ1My5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7O0FBRUE7O0FBRUE7QUFDQTtBQUNBOztBQUVBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxNQUFNO0FBQ04sSUFBSTs7QUFFSjs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQSwrQkFBK0IsZUFBZTs7QUFFOUM7O0FBRUE7O0F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YgY2xhc3M9XCJ0LWltYWdlLWN1dFwiPlxuXHRcdDxkaXYgY2xhc3M9XCJiZWZvcmUtZGl2XCI+XG5cdFx0XHQ8c3Bhbj5CZWZvcmU6PC9zcGFuPlxuXHRcdFx0PGltZyBjbGFzcz1cImJlZm9yZS1pbWdcIj5cblx0XHQ8L2Rpdj5cblx0XHQ8ZGl2IGNsYXNzPVwiYWZ0ZXItZGl2XCI+XG5cdFx0XHQ8c3Bhbj5BZnRlcjo8L3NwYW4+XG5cdFx0XHQ8aW1nIGNsYXNzPVwiYWZ0ZXItaW1nXCI+XG5cdFx0PC9kaXY+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8453\n")},5184:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UserPhotoWizardController\": () => (/* binding */ UserPhotoWizardController)\n/* harmony export */ });\n/* harmony import */ var _global_widgets_filebrowser_TImageBrowser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8326);\n/* harmony import */ var _global_widgets_filebrowser_TImageBrowser__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImageBrowser__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _global_widgets_filebrowser_CameraBrowser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8128);\n/* harmony import */ var _global_widgets_filebrowser_CameraBrowser__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_CameraBrowser__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8243);\n/* harmony import */ var _global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImageAdvBrowser__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1469);\n/* harmony import */ var _global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImage__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _global_widgets_filebrowser_TImageCutArea__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8453);\n/* harmony import */ var _global_widgets_filebrowser_TImageCutArea__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImageCutArea__WEBPACK_IMPORTED_MODULE_4__);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\n\n\n\n\nclass UserPhotoWizardController extends BaseWizardController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '.wizard-bg',\n\n\t\t\t// _required_files: [\n\t\t\t// \t'TImageBrowser', //only in the upload wizard\n\t\t\t// \t'CameraBrowser', //only in the upload wizard\n\t\t\t// \t'TImageAdvBrowser',//only in the upload wizard\n\t\t\t// \t'TImage',//only in the upload wizard\n\t\t\t// \t'TImageCutArea'//only in the upload wizard\n\t\t\t// ]\n\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\n\t\tthis.title = $.i18n._( 'Image upload Wizard' );\n\t\tthis.steps = 3;\n\t\tthis.current_step = 1;\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tsuper.render();\n\n\t\tthis.initCurrentStep();\n\t}\n\n\t//Create each page UI\n\tbuildCurrentStepUI() {\n\n\t\tvar $this = this;\n\n\t\tthis.content_div.empty();\n\t\tswitch ( this.current_step ) {\n\t\t\tcase 1:\n\t\t\t\t$this.next_btn.removeClass( 'disable-image' );\n\t\t\t\tvar label = this.getLabel();\n\t\t\t\tlabel.text( $.i18n._( 'Please choose the image source' ) );\n\n\t\t\t\tvar combo_box = this.getComboBox( 'image_type' );\n\n\t\t\t\tcombo_box.setSourceData( [\n\t\t\t\t\t{ value: 'file', label: $.i18n._( 'File' ) },\n\t\t\t\t\t{ value: 'camera', label: $.i18n._( 'Camera' ) }\n\t\t\t\t] );\n\n\t\t\t\tthis.stepsWidgetDic[this.current_step] = {};\n\t\t\t\tthis.stepsWidgetDic[this.current_step][combo_box.getField()] = combo_box;\n\n\t\t\t\tthis.content_div.append( label );\n\t\t\t\tthis.content_div.append( combo_box );\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\n\t\t\t\tvar step_1_Data = this.stepsDataDic[1];\n\t\t\t\tlabel = this.getLabel();\n\t\t\t\tvar img;\n\t\t\t\tif ( step_1_Data.image_type === 'file' ) {\n\t\t\t\t\tlabel.text( $.i18n._( 'Choose image file to upload' ) );\n\t\t\t\t\timg = this.getFileBrowser( 'image_data', null, 500, 350 );\n\t\t\t\t} else {\n\t\t\t\t\tlabel.text( $.i18n._( 'Take picture from camera' ) );\n\t\t\t\t\timg = this.getCameraBrowser( 'image_data' );\n\n\t\t\t\t\timg.unbind( 'NoImageChange' ).bind( 'NoImageChange', function() {\n\t\t\t\t\t\t$this.next_btn.addClass( 'disable-image' );\n\t\t\t\t\t\t// Stop the button glow when 'Try Again' is clicked.\n\t\t\t\t\t\tGlobal.glowAnimation.stop( $this.next_btn );\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\timg.unbind( 'change' ).bind( 'change', function() {\n\t\t\t\t\t$this.next_btn.removeClass( 'disable-image' );\n\t\t\t\t\t// Start the button glow when 'Take Picture' or 'Try Again' is clicked.\n\t\t\t\t\tGlobal.glowAnimation.start( $this.next_btn, '#00ff00' );\n\t\t\t\t} );\n\n\t\t\t\tthis.stepsWidgetDic[this.current_step] = {};\n\t\t\t\tthis.stepsWidgetDic[this.current_step][img.getField()] = img;\n\n\t\t\t\tthis.content_div.append( label );\n\t\t\t\tthis.content_div.append( img );\n\t\t\t\t$this.next_btn.addClass( 'disable-image' );\n\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$this.next_btn.removeClass( 'disable-image' );\n\n\t\t\t\tlabel = this.getLabel();\n\t\t\t\tlabel.text( $.i18n._( 'Crop and resize image' ) );\n\n\t\t\t\timg = this.getImageCutArea( 'image_cut' );\n\t\t\t\tthis.stepsWidgetDic[this.current_step] = {};\n\t\t\t\tthis.stepsWidgetDic[this.current_step][img.getField()] = img;\n\n\t\t\t\tvar hide_form = $( '
' );\n\n\t\t\t\tthis.stepsWidgetDic[this.current_step]['hide_form'] = hide_form;\n\n\t\t\t\tthis.content_div.append( label );\n\t\t\t\tthis.content_div.append( img );\n\t\t\t\tthis.content_div.append( hide_form );\n\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tbuildCurrentStepData() {\n\t\tvar current_step_data = this.stepsDataDic[this.current_step];\n\t\tvar current_step_ui = this.stepsWidgetDic[this.current_step];\n\n\t\tswitch ( this.current_step ) {\n\t\t\tcase 1:\n\t\t\t\tif ( current_step_data ) {\n\t\t\t\t\tcurrent_step_ui.image_type.setValue( current_step_data.image_type );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tif ( this.stepsDataDic[1].image_type === 'camera' ) {\n\t\t\t\t\tcurrent_step_ui.image_data.showCamera();\n\t\t\t\t}\n\n\t\t\t\tGlobal.setWidgetEnabled( this.next_btn, false );\n\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tcurrent_step_ui.image_cut.setImage( this.stepsDataDic[2].img_src );\n\t\t}\n\t}\n\n\tonDoneClick() {\n\t\tvar $this = this;\n\t\tsuper.onDoneClick();\n\t\tthis.saveCurrentStep();\n\n\t\tvar current_step_ui = this.stepsWidgetDic[this.current_step];\n\t\tvar current_step_data = this.stepsDataDic[this.current_step];\n\n\t\tvar form_data = new FormData( current_step_ui.hide_form[0] );\n\n\t\tvar image_source_array = current_step_data.after_img_src && current_step_data.after_img_src.split( ',' );\n\n\t\tvar args = {};\n\n\t\t//Error: TypeError: current_step_data.after_img_src is undefined in interface/html5/framework/jquery.min.js?v=9.0.0-20151016-110437 line 2 > eval line 129\n\t\tif ( image_source_array && image_source_array.length > 0 ) {\n\t\t\tform_data.append( 'file_data', image_source_array[1] );\n\t\t\tform_data.append( 'base64_encoded', true );\n\t\t\tform_data.append( 'mime_type', image_source_array[0].split( ';' )[0].split( ':' )[1] );\n\t\t\tform_data.append( 'file_name', this.stepsDataDic[2].file_name );\n\n\t\t\tif ( this.call_back ) {\n\t\t\t\tthis.call_back( form_data );\n\t\t\t}\n\t\t}\n\n\t\t$this.onCloseClick();\n\t}\n\n\tonCloseClick() {\n\t\tvar current_step_ui = this.stepsWidgetDic[this.current_step];\n\t\tif ( this.current_step === 3 ) {\n\t\t\tcurrent_step_ui.image_cut.clearSelect();\n\t\t}\n\n\t\tif ( this.current_step === 2 && this.stepsDataDic[1].image_type === 'camera' ) {\n\t\t\tcurrent_step_ui.image_data.stopCamera();\n\t\t}\n\n\t\t$( this.el ).remove();\n\t\tLocalCacheData.current_open_wizard_controllers = LocalCacheData.current_open_wizard_controllers.filter( wizard => wizard.wizard_id !== this.wizard_id );\n\t}\n\n\tonNextClick() {\n\t\tif ( this.next_btn.hasClass( 'disable-image' ) ) {\n\t\t\treturn;\n\t\t}\n\t\tvar current_step_ui = this.stepsWidgetDic[this.current_step];\n\t\tif ( this.current_step === 3 ) {\n\t\t\tcurrent_step_ui.image_cut.clearSelect();\n\t\t}\n\t\tif ( this.current_step === 2 && this.stepsDataDic[1].image_type === 'camera' ) {\n\t\t\tcurrent_step_ui.image_data.stopCamera();\n\t\t\t// Stop the button glow when 'Next Button' is clicked.\n\t\t\tGlobal.glowAnimation.stop( this.next_btn );\n\t\t}\n\t\tthis.saveCurrentStep();\n\t\tthis.current_step = this.current_step + 1;\n\t\tthis.initCurrentStep();\n\t}\n\n\tonBackClick() {\n\t\tif ( this.back_btn.hasClass( 'disable-image' ) ) {\n\t\t\treturn;\n\t\t}\n\t\tvar current_step_ui = this.stepsWidgetDic[this.current_step];\n\t\tif ( this.current_step === 3 ) {\n\t\t\tcurrent_step_ui.image_cut.clearSelect();\n\t\t}\n\t\tif ( this.current_step === 2 && this.stepsDataDic[1].image_type === 'camera' ) {\n\t\t\tcurrent_step_ui.image_data.stopCamera();\n\t\t\t// Stop the button glow when 'Back Button' is clicked.\n\t\t\tGlobal.glowAnimation.stop( this.next_btn );\n\n\t\t}\n\t\tthis.saveCurrentStep();\n\t\tthis.current_step = this.current_step - 1;\n\t\tthis.initCurrentStep();\n\t}\n\n\tsaveCurrentStep() {\n\t\tthis.stepsDataDic[this.current_step] = {};\n\t\tvar current_step_data = this.stepsDataDic[this.current_step];\n\t\tvar current_step_ui = this.stepsWidgetDic[this.current_step];\n\t\tswitch ( this.current_step ) {\n\t\t\tcase 1:\n\t\t\t\tcurrent_step_data.image_type = current_step_ui.image_type.getValue();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tcurrent_step_data.img_src = current_step_ui.image_data.getImageSrc();\n\t\t\t\tcurrent_step_data.file_name = current_step_ui.image_data.getFileName();\n\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\n\t\t\t\tcurrent_step_data.after_img_src = current_step_ui.image_cut.getAfterImageSrc();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetDefaultDataToSteps() {\n\n\t\tif ( !this.default_data ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tthis.stepsDataDic[2] = {};\n\t\tthis.stepsDataDic[3] = {};\n\n\t\tif ( this.getDefaultData( 'user_id' ) ) {\n\t\t\tthis.stepsDataDic[3].user_id = this.getDefaultData( 'user_id' );\n\t\t}\n\n\t\tif ( this.getDefaultData( 'pay_period_id' ) )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