(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["developer_tools-debugPanelController"],{8038:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var $ = __webpack_require__(9755);\n$( document ).on( 'click', '.tt_debug_close_btn', function( e ) {\n\te.preventDefault();\n\tDebug.closePanel();\n} );\n\n$( document ).on( 'change', '#tt_debug_enable_checkbox', function( e ) {\n\te.preventDefault();\n\tDebug.setEnable( $( this ).is( ':checked' ) );\n} );\n\n$( document ).on( 'click', '#trigger_js_exception_button', function( e ) {\n\te.preventDefault();\n\tvar exception_type = $( '#tt_debug_exception_type_select' ).val();\n\n\tswitch ( exception_type ) {\n\t\tcase 'js_error':\n\t\t\tnon_existant_variable.non_existant_function();\n\t\t\tbreak;\n\t\tcase 'js_load_script_parser_error':\n\t\t\tvar script_path = Global.getViewPathByViewId( 'DeveloperTools' ) + 'triggerParserError.js';\n\t\t\t//remove from cache to ensure that we're sending a totally new request\n\t\t\tdelete LocalCacheData.loadedScriptNames[script_path];\n\t\t\t//change the js version number to trigger forced reload\n\t\t\tAPIGlobal.pre_login_data.application_build += '_FORCE';\n\t\t\treturn Global.loadScript( script_path, function( result ) {\n\t\t\t\tDebug.Arr( result, 'no error happened.' );\n\t\t\t} );\n\t\tcase 'js_load_script_404_error':\n\t\t\tGlobal.loadScript( 'nonexistantscript.js', function( result ) {\n\t\t\t\tDebug.Arr( result, 'no error happened.' );\n\t\t\t} );\n\t\t\tbreak;\n\t}\n} );\n\n$( document ).on( 'click', '#trigger_js_timeout_button', function( e ) {\n\te.preventDefault();\n\tGlobal.idle_time = 100;\n\tGlobal.doPingIfNecessary();\n} );\n\n$( document ).on( 'change', '#tt_debug_exception_verbosity', function( e ) {\n\te.preventDefault();\n\tDebug.setVerbosity( $( this ).val() );\n} );\n\n$( document ).on( 'change', '#tt_overlay_disable_checkbox', function( e ) {\n\te.preventDefault();\n\tGlobal.UNIT_TEST_MODE = $( this ).is( ':checked' );\n\tGlobal.event_bus.emit( 'tt_left_container', 'rebuild_menu' );\n} );\n\n$( document ).on( 'click', '#qunit_test_button', function( e ) {\n\te.preventDefault();\n\t$( '#tt_debug_console' ).css( 'width', '80%' );\n\t$( '#tt_debug_console' ).css( 'margin', '0 auto' );\n\trunUnitTests();\n} );\n\n/**\n * Put all unit tests in this function\n */\n\n$( document ).on( 'change', '#tt_output_variable_select', function( e ) {\n\te.preventDefault();\n\toutput_system_data( $( this ).val() );\n} );\n\n$( document ).on( 'click', '#trigger_output_variable_select', function( e ) {\n\te.preventDefault();\n\toutput_system_data( $( '#tt_output_variable_select' ).val() );\n} );\n\n$( document ).on( 'click', '#trigger_arbitrary_script', function( e ) {\n\te.preventDefault();\n\tvar script = $( '#arbitrary_script' ).val();\n\tscript = script.replace( /(\\r\\n|\\n|\\r)/gm, '' ); //strip all line-ends\n\tconsole.log( eval( script ) );\n} );\n\n// #VUETEST\n$( document ).on( 'click', '#load_vue_test_button', function( e ) {\n\te.preventDefault();\n\twindow.VueRouter.push('test');\n} );\n\n\n\n$( document ).on( 'click', '#awesomebox_test', function( e ) {\n\te.preventDefault();\n\tDebug.showAwesomeBoxTest();\n} );\n\n$( document ).on( 'click', '#grid_test', function( e ) {\n\te.preventDefault();\n\tDebug.showGridTest();\n} );\n\n$( document ).on( 'click', '#WidgetTest_test', function( e ) {\n\te.preventDefault();\n\tDebug.showWidgetTest();\n} );\n\nfunction breakOn( obj, propertyName, mode, func ) {\n\t// this is directly from https://github.com/paulmillr/es6-shim\n\tfunction getPropertyDescriptor( obj, name ) {\n\t\tvar property = Object.getOwnPropertyDescriptor( obj, name );\n\t\tvar proto = Object.getPrototypeOf( obj );\n\t\twhile ( property === undefined && proto !== null ) {\n\t\t\tproperty = Object.getOwnPropertyDescriptor( proto, name );\n\t\t\tproto = Object.getPrototypeOf( proto );\n\t\t}\n\t\treturn property;\n\t}\n\n\tfunction verifyNotWritable() {\n\t\tif ( mode !== 'read' )\n\t\t\tthrow \"This property is not writable, so only possible mode is 'read'.\";\n\t}\n\n\tvar enabled = true;\n\tvar originalProperty = getPropertyDescriptor( obj, propertyName );\n\tvar newProperty = { enumerable: originalProperty.enumerable };\n\n\t// write\n\tif ( originalProperty.set ) {// accessor property\n\t\tnewProperty.set = function( val ) {\n\t\t\tif ( enabled && ( !func || func && func( val ) ) )\n\t\t\t\tdebugger;\n\n\t\t\toriginalProperty.set.call( this, val );\n\t\t};\n\t} else if ( originalProperty.writable ) {// value property\n\t\tnewProperty.set = function( val ) {\n\t\t\tif ( enabled && ( !func || func && func( val ) ) )\n\t\t\t\tdebugger;\n\n\t\t\toriginalProperty.value = val;\n\t\t};\n\t} else {\n\t\tverifyNotWritable();\n\t}\n\n\t// read\n\tnewProperty.get = function( val ) {\n\t\tif ( enabled && mode === 'read' && ( !func || func && func( val ) ) )\n\t\t\tdebugger;\n\n\t\treturn originalProperty.get ? originalProperty.get.call( this, val ) : originalProperty.value;\n\t};\n\n\tObject.defineProperty( obj, propertyName, newProperty );\n\n\treturn {\n\t\tdisable: function() {\n\t\t\tenabled = false;\n\t\t},\n\n\t\tenable: function() {\n\t\t\tenabled = true;\n\t\t}\n\t};\n};\n\nfunction runUnitTests() {\n\tif ( $( '#qunit_script' ).length == 0 ) {\n\t\t$( '