
/*

  SmartClient Ajax RIA system
  Version v9.1p_2021-05-18/LGPL Development Only (2021-05-18)

  Copyright 2000 and beyond Isomorphic Software, Inc. All rights reserved.
  "SmartClient" is a trademark of Isomorphic Software, Inc.

  LICENSE NOTICE
     INSTALLATION OR USE OF THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF
     ISOMORPHIC SOFTWARE LICENSE TERMS. If you have received this file
     without an accompanying Isomorphic Software license file, please
     contact licensing@isomorphic.com for details. Unauthorized copying and
     use of this software is a violation of international copyright law.

  DEVELOPMENT ONLY - DO NOT DEPLOY
     This software is provided for evaluation, training, and development
     purposes only. It may include supplementary components that are not
     licensed for deployment. The separate DEPLOY package for this release
     contains SmartClient components that are licensed for deployment.

  PROPRIETARY & PROTECTED MATERIAL
     This software contains proprietary materials that are protected by
     contract and intellectual property law. You are expressly prohibited
     from attempting to reverse engineer this software or modify this
     software for human readability.

  CONTACT ISOMORPHIC
     For more information regarding license rights and restrictions, or to
     report possible license violations, please contact Isomorphic Software
     by email (licensing@isomorphic.com) or web (www.isomorphic.com).

*/

if(window.isc&&window.isc.module_Core&&!window.isc.module_DeveloperConsole){isc.module_DeveloperConsole=1;isc._moduleStart=isc._DeveloperConsole_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log&&isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={message:'DeveloperConsole load/parse time: '+(isc._moduleStart-isc._moduleEnd)+'ms',category:'loadTime'};if(isc.Log&&isc.Log.logDebug)isc.Log.logDebug(isc._pTM.message,'loadTime');else if(isc._preLog)isc._preLog[isc._preLog.length]=isc._pTM;else isc._preLog=[isc._pTM]}isc.definingFramework=true;if(window.opener!=null&&!(new RegExp("^(\\d{1,3}\\.){3}\\d{1,3}$").test(document.domain)))
{while(document.domain.indexOf(".")!=-1){try{if(window.opener.isc===undefined){try{document.domain=document.domain.replace(/.*?\./,'')}catch(ee){break}}else{break}}catch(e){try{document.domain=document.domain.replace(/.*?\./,'')}catch(ee){break}}}}
isc.FileLoader.modulesDir="system/development/";isc.A=isc.Toolbar.getPrototype();isc.A.buttonConstructor="IButton";isc.A=isc.Canvas;isc.A._redrawQueueDelay=200;isc.Page.leaveScrollbarGap=false;if(isc.Browser.isSafari){isc.Page.setEvent("load","isc.Page.handleEvent(null, 'resize')")}
function validOpener(){var _1;var _2=window.targetWindow,_3=false,_4=false;if(!_2){_2=window.targetWindow=window.launchWindow||window.opener}
try{if(_2!=null&&!_2.closed&&_2.isc!=null)
{if(_2.isc.Log.logViewer!=null||_2.isc.Log._logWindow!=null){if(!_2.isc.$483&&window.mainTabset){_2.isc.$483=true;mainTabset.targetWindowChanged()}
return true}
if(!_2.isc.Page||!_2.isc.Page.isLoaded())return false;_2.isc.Log.show(false,window);initializePage();_3=true;if(Array.$484){Array.prototype.toString=Array.$484;delete Array.$484}}}catch(e){_4=true}
if((_4||!_3)&&window.resultsForm!=null){if(!window.preserveMessages){resultsForm.setValue("results","--------------------------------------------------\r\nThe browser window that opened this log window has navigated to a new page or been closed - reopen the log window by calling 'isc.showLog()' from an Isomorphic SmartClient page.\r\n--------------------------------------------------")}
if(window.logPriorityDialog&&logPriorityDialog.isVisible())logPriorityDialog.hide();if(isc.Browser.isMoz&&!Array.$484){Array.$484=Array.prototype.toString;Array.prototype.toString=function(){return"[suppressed]"}}
return false}}
window.onfocus=function(){validOpener()}
isc.Page.setEvent("mouseDown","validOpener(); return null;");function openerUnloading(){window.$485=isc.timeStamp();isc.Timer.setTimeout("checkForOpener()",100)}
function checkForOpener(){if(validOpener()){return}
var _1=(isc.timeStamp()-window.$485<5000)?100:500;isc.Timer.setTimeout("checkForOpener()",_1)}
function getLogCookieValue(_1){if(window.dontSaveState)return"";var _2=isc.LogViewer.getLogCookie();if(_2!=null&&_2[_1]!=null)return _2[_1];return""}
var expires=new Date();expires.setFullYear(expires.getFullYear()+20);expires=expires.toGMTString();isc.Page.setEvent("resize","saveState()");function saveState(){if(!validOpener()||!window.resultsLayout)return;if(window.dontSaveState)return true;if(!validOpener())return true;var _1=isc.LogViewer.getLogCookie();var _2=targetWindow.isc.LogViewer.getGlobalLogCookie();if(_1==null)_1={};if(_2==null)_2={};isc.addProperties(_2,targetWindow.isc.Page.getWindowRect(window));if(targetWindow.isc.Browser.isIE){_2.top-=23;_2.left-=4}
_2.priorityDefaults=targetWindow.isc.Log.getLogPriorities();_2.defaultPriority=targetWindow.isc.Log.defaultPriority;if(window.rpcConfig){_2.trackRPC=rpcConfig.getValue("trackRPC")}
var _3=isc.Comm.serialize(_2);targetWindow.isc.Cookie.set('GLog',_3,"/",null,expires);_1.evalExpression=evalForm.getValue("evalExpression");var _4=evalXMLForm.getValue("xmlData");if(_4&&_4.length<256)_1.evalXMLData=_4;var _5=evalJavaForm.getValue("javaCode");if(_5&&_5.length<256)_1.javaCode=_5;var _6=evalServerScriptForm.getValue("serverScriptCode");if(_6&&_6.length<256)_1.serverScriptCode=_6;_1.serverScriptEngine=evalServerScriptForm.getValue("engine");if(window.watchForm){_1.watchObject=watchForm.getValue("watchObject");_1.watchMethod=watchForm.getValue("watchMethod");_1.keepOpen=watchForm.getValue("keepOpen");_1.showHidden=watchFlags.getValue("showHidden");_1.showUndrawn=watchFlags.getValue("showUndrawn");_1.showGenerated=watchFlags.getValue("showGenerated")}
if(window.supportForm){_1.username=supportForm.getValue("username");_1.password=supportForm.getValue("password")}
var _7=isc.Comm.serialize(_1);if(_7.length>1200){_1.evalExpression=_1.evalExpression.substring(0,500);_7=isc.Comm.serialize(_1)}
isc.Cookie.set('Log',_7,null,null,expires);return[_1,_2]}
function setResultsValue(_1,_2,_3){var _4=resultsForm.getItem("results");var _5=isc.RichTextItem&&isc.isA.RichTextItem(_4);if(_5)_4=_4.canvas.editArea;var _6=_4.getScrollTop();_3=_3||(_6>=_4.getScrollHeight()-_4.getInnerHeight());if(_2){if(_5){_4.appendContents(_1)}else{var _7=resultsForm.getValue("results");resultsForm.setValue("results",_7?_7+_1:_1)}}else{resultsForm.setValue("results",_1)}
if(_3){if(!_5&&isc.Browser.isIE)
isc.Page.setEvent("idle","resultsForm.getItem('results').scrollToBottom();",isc.Page.FIRE_ONCE);else
_4.scrollToBottom()}else if(isc.Browser.isMoz&&!_5)_4.scrollTo(null,_6)}
function addToLog(_1,_2){if(!validOpener())return;_1=(targetWindow.isc.Log.showTimestamp?targetWindow.isc.Log.getLogTimestamp()+":":"")+_1+"\r";markForAddToLog(_1,_2)}
function markForAddToLog(_1,_2){if(isc.LogViewer.$670==null)isc.LogViewer.$670=[];isc.LogViewer.$670.add(_1);if(_2)isc.LogViewer.$487=true;if(isc.LogViewer.$488==null){isc.Timer.setTimeout("delayedAddToLog()",100)}}
function delayedAddToLog(){isc.LogViewer.$488=null;var _1=isc.LogViewer.$670.join(isc.emptyString);isc.LogViewer.$670=[];var _2=isc.LogViewer.$487;delete isc.LogViewer.$487;if(_1==null)return;setResultsValue(_1,true,_2)}
function clearResults(){resultsForm.clearValues();if(isc.LogViewer.$488)isc.Timer.clear(isc.LogViewer.$488);isc.LogViewer.$488=null;isc.LogViewer.$486=null}
function doEval(_1){if(!validOpener())return;var _2=evalForm.getValue('evalExpression');var _3=targetWindow.isc.Canvas._canvasList[0];if(window.canvasList){var _4=canvasList.getSelectedRecord();if(_4)_3=targetWindow[_4.id]}
var _5={literalText:literalText.getValue(),watched:_3,element:window.commDisplay?commDisplay.getSelectedElement():null,time:executeTimeMethod,trace:executeTraceMethod,traceCall:function(_6,_7){executeTraceMethod(_6,_7,true)},timeExpression:function(_2,_6,_7){targetWindow.isc.Log.timeExpression(_2,_6,_7)},log:function(_6,_7){return targetWindow.isc.Log.logWarn.call(targetWindow.isc.Log,_6,_7)},echo:function(_6){return targetWindow.isc.Log.echo(_6)},echoAll:function(_6){return targetWindow.isc.Log.echoAll(_6)},echoFull:function(_6){return targetWindow.isc.Log.echoFull(_6)}}
if(_1||isc.Browser.isSafari){targetWindow.isc.Log.logViewer.$489=_2;targetWindow.isc.Log.logViewer.$49a=_5;targetWindow.isc.Timer.setTimeout("var viewer = isc.Log.logViewer;viewer.evaluate(viewer.$489,viewer.$49a);viewer.$489 = viewer.$49a = null;",_1?3000:100)}else targetWindow.isc.Log.logViewer.evaluate(_2,_5)}
function doEvalServerScript(){if(!validOpener())return;if(!isc.RPCManager.xmlHttpRequestAvailable()){addToLog("Eval Java requires XMLHttpRequest support, but no support detected."+(isc.Browser.isIE?" Check to make sure safe-for-scripting ActiveX scripts are enabled.":isc.emptyString));return}
var _1=evalServerScriptForm.getValue("engine");imports=evalServerScriptForm.getValue("imports");imports=imports.split("\n");var _2=evalServerScriptForm.getValue("serverScriptCode");var _3=evalServerScriptForm.getValue("captureOutput");isc.DMI.callBuiltin({methodName:"devConsoleEvalServerScript",callback:"doEvalServerScriptCallback(rpcResponse, data)",arguments:{engineName:_1,imports:imports,captureOutput:_3,script:_2},requestParams:{willHandleError:true}})}
function doEvalServerScriptCallback(_1,_2){if(_1.status!=RPCResponse.STATUS_SUCCESS){addToLog("evalServerScript FAILED: "+(isc.isA.String(_2)?_2:isc.echoFull(_2)));return}
var _3=_2.evalResult;addToLog("Return value of Server Script eval:\n"+(isc.isA.String(_3)&&!evalServerScriptForm.getValue("escapeStringResult")?_3:isc.echoFull(_3)));if(_2.stdout&&_2.stdout.trim()!=""){addToLog("\nStdout:\n"+_2.stdout)}
if(_2.stderr&&_2.stderr.trim()!=""){addToLog("\nStderr:\n"+_2.stderr)}}
function doEvalJava(){if(!validOpener())return;if(!isc.RPCManager.xmlHttpRequestAvailable()){addToLog("Eval Java requires XMLHttpRequest support, but no support detected."+(isc.Browser.isIE?" Check to make sure safe-for-scripting ActiveX scripts are enabled.":isc.emptyString));return}
var _1=evalJavaForm.getValue("javaCode");if(!_1.match(/<%(.|\n|\r)*%>/))_1="<%\n"+_1+"\n%>";isc.DMI.callBuiltin({methodName:"evalJava",callback:"doEvalJavaCallback(rpcResponse, data)",arguments:_1,requestParams:{willHandleError:true}})}
function doEvalJavaCallback(_1,_2){if(isc.isA.String(_2)){_2=_2.replace(/^(\s|\n|\r)*/,isc.emptyString);_2=_2.replace(/(\s|\n|\r)*$/,isc.emptyString)}
if(_1.status!=RPCResponse.STATUS_SUCCESS){addToLog("evalJava FAILED: "+isc.echoFull(_2));return}
addToLog("Result of Java eval (leading and trailing whitespace removed): \n"+isc.echoFull(_2))}
function doEvalXML(){if(!validOpener())return;var _1=evalXMLForm.getValue("xmlData");isc.xml.toJSCode(_1,"doEvalXMLCallback(data)")}
function doEvalXMLCallback(_1){if(!validOpener())return;targetWindow.isc.eval(_1)}
function executeTimeMethod(_1,_2){if(!validOpener())return;if(_1!=""&&_2!=""){targetWindow.isc.Log.timeMethod(_1,_2);saveState()}}
function executeTraceMethod(_1,_2,_3){if(!validOpener())return;if(_1!=""&&_2!=""){targetWindow.isc.Log.traceMethod(_1,_2,(_3?true:false));saveState()}}
function execute(_1){saveState();isc.eval(_1);return false}
var DEFAULT_CATEGORIES=[{name:"layout",description:"Logs from Layout and Stack about members and layout policy."},{name:"sizing",description:"Reporting drawn sizes"},{name:"scrolling",description:"Detecting the need for scrolling and custom scrollbars"},{name:"animation",description:"Animation logs"},{name:"RPCManager",description:"RPC and DataSource requests and responses"},{name:"RPCManagerResponse",description:"Enable logging of full length RPC responses (can be slow)"},{name:"xmlComm",description:"Inbound and outbound XML messages"},{name:"xmlSelect",description:"XPath expressions and their results"},{name:"xmlBinding",description:"DataSource and WebService XML request/response handling"},{name:"xmlToJS",description:"XML to JavaScript translation in databinding"},{name:"ResultSet",description:"Load on demand and cache update management for ListGrids"},{name:"ResultTree",description:"Load on demand for TreeGrids"},{name:"FileLoader",description:"Background download and caching of files"},{name:"fetchTrace",description:"Shows a stack trace for all fetches initiated through a ResultSet"},{name:"dragDrop",description:"Drag and drop related logs"},{name:"EventHandler",description:"Mouse and keyboard events, bubbling, cancellation"},{name:"visualState",description:"Visual state transitions for buttons, bars, and other stateful widgets"},{name:"RpcTabTiming",description:"Show detailed timing data for RPC/DSRequests in the RPC tab"},{name:"gridEdit",description:"Inline editing in grids"},{name:"Page",description:"Page-wide events"},{name:"loadTime",description:"ISC load / parse time"},{name:"redraws",description:"Logging of redraw()s and reasons for them"},{name:"redrawTrace",description:"Logs a stack trace for every redraw when both 'redraws' and 'redrawTrace' are set to debug priority"},{name:"clears",description:"Logs all clear()s"},{name:"destroys",description:"Logs all destroy()s"},{name:"draws",description:"All component draws"},{name:"resize",description:"Resizes of drawn components"},{name:"testReplay",description:"Details of why Selenium commands are failing during playback"},{name:"DynamicForm"},{name:"ListGrid"},{name:"TreeGrid"},{name:"CubeGrid"},{name:"deprecated",description:"Notify when deprecated attributes are used"}]
function getDefaultCategories(){return DEFAULT_CATEGORIES.getProperty("name")}
function getLogCategories(_1){var _2=getDefaultCategories();if(!validOpener())return _2;var _3=targetWindow.isc.Log.getLogPriorities(_1);for(var _4 in _3){if(_2.contains(_4))continue;_2[_2.length]=_4}
return _2}
function getLogCategoryData(_1){if(!validOpener())return null;var _2=(_1?targetWindow.isc.Log.getLogPriorities(_1,true):null),_3=getLogCategories(_1),_4=targetWindow.isc.Log;var _5=[],_6;for(var i=0;i<_3.length;i++){var _8=_3[i];if(_1){if(_8==isc.Log._allCategories)continue;else if(_8==isc.Log.$fs){_6=_1.getDefaultLogPriority();continue}}
var _9=_4.getPriority(_8,_1);_5.add({category:_8,priority:_9||_4.defaultPriority,custom:_2&&_2[_8]!=null})}
_5.add({category:"[default]",priority:(_6||_4.defaultPriority),custom:(_6?true:false)});return _5}
function getCategoryDescription(_1){for(var i=0;i<DEFAULT_CATEGORIES.length;i++){if(DEFAULT_CATEGORIES[i].name==_1)return DEFAULT_CATEGORIES[i].description}
return null}
function updateLogPriority(_1,_2,_3,_4){if(!validOpener())return;if(_2==null||_1==null)return;_2=parseInt(_2);var _5,_6={"1":"Fatal","2":"Error","3":"Warn","4":"Info","5":"Debug"},_7=_6[_2];if(isc.isA.Number(_2)){if(_1=="$fs"){targetWindow.isc.Log.setDefaultPriority(_2,_3);if(!_4)_5="Default Priority set to:"+_7}else if(_1=="_allCategories"){targetWindow.isc.Log.setPriority(null,_2,_3);if(!_4)_5="Now logging all messages at priority '"+_7+"' and above on this component."}else{targetWindow.isc.Log.setPriority(_1,_2,_3);if(!_4)_5="Logging messages at priority '"+_7+"' and above for category '"+_1+"'."}
saveState();if(!_4)addToLog((_3?"Log Priorities updated for component: "+_3:"Global Log Priorities updated: ")+_5)}}
function getCanvasList(){if(!validOpener())return;var _1=window.targetWindow.isc,_2=_1.Canvas._canvasList,_3=getLogCookieValue('showGenerated'),_4=getLogCookieValue('showUndrawn'),_5=getLogCookieValue('showHidden'),_6=[],_7={};var _8=[,"w x ",,"h"];var _9=[,", "];for(var i=0;i<_2.length;i++){var _11=_2[i];if(_1.Page._eT==_11)continue;else if(_1.Log._hiliteCanvas==_11)continue;else if(!_5&&!_11.isVisible())continue;else if(!_4&&!_11.isDrawn())continue;else if(_11._generated&&!_3)continue;var _12={id:_11.getID(),theClass:_11.Class,drawn:_11.isDrawn(),visible:_11.isVisible(),zIndex:_11.getZIndex(),pageLeft:_11.getPageLeft(),pageTop:_11.getPageTop(),overflow:_11.overflow,hasChildren:_7[_11.getID()]};_8[0]=_11.getWidth();_8[2]=_11.getHeight();_12.size=_8.join(isc.emptyString);_8[0]=_11.getVisibleWidth();_8[2]=_11.getVisibleHeight();_12.drawnSize=_8.join(isc.emptyString);try{_9[0]=_12.pageLeft;_9[2]=_12.pageTop;_12.position=_9.join(isc.emptyString);_12.positionSortField=_12.pageLeft*100000+_12.pageTop}catch(e){_12.position="Error: "+e}
var _13=_11;while(_13&&(_13.masterElement||_13.parentElement)){_13=(_13.masterElement||_13.parentElement);if(_3||!_13._generated)break}
if(_13!=_11){var _14=_7[_13.getID()];if(_14)_14.hasChildren=true;else _7[_13.getID()]=true;_12.treeParentId=_13.ID}
_7[_11.ID]=_12;_6.add(_12)}
var _15=Tree.create({data:_6,modelType:"parent",idField:"id",parentIdField:"treeParentId",isFolderProperty:"hasChildren"});_15.openAll();return _15}
function initPrioritiesMenu(){Menu.create({ID:"prioritiesSubmenu",hasLogPriority:function(_14){var _1=prioritiesMenu.component,_2=(this.category=="$fs"?targetWindow.isc.Log.getDefaultPriority(_1):targetWindow.isc.Log.getPriority(this.category,_1));if(_2==null)_2=targetWindow.isc.Log.getDefaultPriority();return(_2==_14)},data:[{title:"Debug",priority:5,checkIf:"menu.hasLogPriority(5)"},{title:"Info",priority:4,checkIf:"menu.hasLogPriority(4)"},{title:"Warn",priority:3,checkIf:"menu.hasLogPriority(3)"},{title:"Error",priority:2,checkIf:"menu.hasLogPriority(2)"},{title:"Fatal",priority:1,checkIf:"menu.hasLogPriority(1)"}],itemClick:function(_14){var _3=this.category,_2=_14.priority,_1=prioritiesMenu.component;updateLogPriority(_3,_2,_1)}});var _4=getLogCategories(),_5=[],_6=[],_7=isc.Page.getHeight(),_8=Menu.getPrototype(),_9=_7-(_8.showShadow?_8.shadowDepth:0)
-(_8.showEdges?2*_8.edgeSize:0);cellHeight=_8.cellHeight,numberOfCategories=Math.floor(_9/cellHeight)-5;var _10=Math.min(_4.length,numberOfCategories);for(var i=0;i<_10;i++){var _3=_4[i];_6.add({title:_3,category:_3,submenu:prioritiesSubmenu,enableIf:"menu.allCategoriesOverride() == null"})}
_6.add({isSeparator:true});_6.add({title:"[default]",category:"$fs",submenu:prioritiesSubmenu,enableIf:"menu.allCategoriesOverride() == null"})
_6.add({title:"More...",click:"menu.setCustomLogPriorities()"});_5=_6.duplicate();_5.addListAt([{title:"All Categories",checkIf:"menu.allCategoriesOverride() != null",submenu:Menu.create({getOverride:function(){return prioritiesMenu.allCategoriesOverride()},data:[{title:"Log By Category",enableIf:"menu.getOverride() != null",checkIf:"menu.getOverride() == null"},{isSeparator:true},{title:"Debug",priority:5,checkIf:"menu.getOverride() == 5"},{title:"Info",priority:4,checkIf:"menu.getOverride() == 4"},{title:"Warn",priority:3,checkIf:"menu.getOverride() == 3"},{title:"Error",priority:2,checkIf:"menu.getOverride == 2"},{title:"Fatal",priority:1,checkIf:"menu.getOverride() == 1"}],itemClick:function(_14){var _1=prioritiesMenu.component;if(_14.priority)updateLogPriority("_allCategories",_14.priority,_1);else _1.clearLogPriority("_allCategories")}})},{isSeparator:true}],0);Menu.create({ID:"prioritiesMenu",showSubmenu:function(_14){if(_14.category)prioritiesSubmenu.category=_14.category;this.Super("showSubmenu",arguments)},setPriorityComponent:function(_1){this.component=_1;var _6=_1?this.componentMenuItems:this.generalMenuItems;for(var i=0;i<_6.length;i++){var _12=_6[i],_3=_12.category;if(_3){var _2=targetWindow.isc.Log.getPriority(_3,_1),_13=(_2>isc.Log.WARN?"color:blue;":null);if(_13!=_12.cssText){_12.cssText=_13}}}
this.setData(_6);if(this.isDrawn())this.redraw()},allCategoriesOverride:function(){var _1=this.component;if(!_1)return;return targetWindow.isc.Log.getLogPriorities(_1)._allCategories},componentMenuItems:_5,generalMenuItems:_6,setCustomLogPriorities:function(){if(!window.logPriorityDialog)initPriorityDialog();logPriorityDialog.setTarget(this.component)}})}
function initPriorityDialog(){isc.Dialog.create({ID:"logPriorityDialog",autoDraw:false,autoCenter:true,width:400,height:"80%",canDragReposition:true,canDragResize:true,isModal:true,showToolbar:true,toolbarButtons:[isc.Dialog.OK,isc.Dialog.CANCEL],items:[DynamicForm.create({ID:"allCategoriesForm",autoDraw:false,numCols:2,colWidths:[400,100],items:[{type:"checkbox",name:"setAll",getTitle:function(){return"<b>All messages</b> on <b>"+logPriorityDialog.target.getID()+"</b>"},defaultDynamicValue:function(){var _1=window.logPriorityDialog?logPriorityDialog.target:null;if(_1)
return(targetWindow.isc.Log.getLogPriorities(_1)._allCategories!=null)},endRow:false,colSpan:1,showTitle:false,change:function(_14,_15,_16){var _2=this.form.getItem("priority");if(_16){_2.setValue(isc.Log.WARN);_2.setDisabled(false);specificCategoriesLayout.disable()}else{_2.clearValue();_2.setDisabled(true);specificCategoriesLayout.enable()}}},{type:"select",showTitle:false,name:"priority",valueMap:{"1":"Fatal","2":"Error","3":"Warn","4":"Info","5":"Debug"},defaultDynamicValue:function(){var _1=window.logPriorityDialog?logPriorityDialog.target:null;if(_1)
return targetWindow.isc.Log.getLogPriorities(_1)._allCategories}}]}),VLayout.create({ID:"specificCategoriesLayout",width:"90%",height:"100%",autoDraw:false,layoutAlign:isc.Canvas.CENTER,border:"1px solid black",membersMargin:10,layoutMargin:10,members:[ListGrid.create({ID:"widgetCategoryGrid",sortFieldNum:0,sortDirection:Array.ASCENDING,selectionType:"single",autoDraw:false,layoutAlign:isc.Canvas.CENTER,canEdit:true,modalEditing:true,width:"90%",height:"100%",canHover:true,showHovers:true,cellHoverHTML:function(_3,_14,_15){return getCategoryDescription(_3.category)},fields:[{name:"category",title:"Category",canEdit:true},{name:"priority",title:"Priority",width:70,canEdit:true,valueMap:{"1":"Fatal","2":"Error","3":"Warn","4":"Info","5":"Debug"}}],canEditCell:function(_14,_15){var _3=this.getRecord(_14),_4=this.getField(_15);if(_4.name=="category"&&_3.category=="[default]")return false;return this.Super("canEditCell",arguments)},cellChanged:function(_3){_3.custom=true},rowClick:function(_3){var _5=this.getSelectedRecord();removeButton.setDisabled(!_5.custom)},getCellCSSText:function(_3,_14,_15){if(_3.custom)return"color:red;"
var _6=parseInt(_3.priority);var _7=(_6!=isc.Log.defaultPriority)
return _7?"font-weight:bold;":null}}),HLayout.create({autoDraw:false,membersMargin:10,height:10,width:"100%",overflow:"visible",members:[Button.create({autoDraw:false,title:"Add...",click:function(){var _8=widgetCategoryGrid.data;_8.addAt({custom:true,category:"New Category",priority:isc.Log.WARN},0)
widgetCategoryGrid.startEditing(0,widgetCategoryGrid.getFieldNum("category"))}}),Button.create({ID:"removeButton",disabled:true,autoDraw:false,title:"Remove",click:function(){var _3=widgetCategoryGrid.getSelectedRecord(),_9=_3.category;if(_9=="[default]"){_3.custom=false;_3.priority=targetWindow.isc.Log.getDefaultPriority();widgetCategoryGrid.data.dataChanged()}else if(getLogCategories().contains(_9)){_3.custom=false;_3.priority=(targetWindow.isc.Log.getPriority(_9)||targetWindow.isc.Log.getDefaultPriority());widgetCategoryGrid.data.dataChanged()}else{widgetCategoryGrid.data.remove(_3)}}})]})]})],setTarget:function(_1){if(_1)this.setTitle("Logging priorities for target: "+_1.getID());else this.setTitle("Page Level Logging Priorities");this.target=_1;var _8=getLogCategoryData(_1)
widgetCategoryGrid.setData(_8);if(_1){var _10=targetWindow.isc.Log.getLogPriorities(_1)._allCategories;allCategoriesForm.getItem("priority").setDisabled(_10==null);allCategoriesForm.show();specificCategoriesLayout.setDisabled(_10!=null)}else{allCategoriesForm.hide();specificCategoriesLayout.setDisabled(false)}
this.show()},okClick:function(){if(this.target&&allCategoriesForm.getValue("setAll")){var _11=parseInt(allCategoriesForm.getValue("priority"));updateLogPriority("_allCategories",_11,this.target)}else{if(!validOpener())return;if(this.target)this.target.clearLogPriority();var _8=widgetCategoryGrid.data,_12={};for(var i=0;i<_8.length;i++){if(_8[i].custom){var _6=parseInt(_8[i].priority),_9=_8[i].category;_12[_9]=_6;if(_9=="[default]"){targetWindow.isc.Log.setDefaultPriority(_6,this.target)}else{targetWindow.isc.Log.setPriority(_9,_6,this.target)}}}
if(!isc.isAn.emptyObject(_12)){addToLog((this.target?"Log Priorities updated for component: "+this.target:"Global Log Priorities updated: ")+"Modified categories: "+isc.Log.echoFull(_12))}}
this.hide()}})}
function initResultsTab(){initPrioritiesMenu();isc.MenuButton.create({ID:"preferencesButton",autoDraw:false,menu:prioritiesMenu,title:"Logging Preferences",width:155,showMenu:function(){prioritiesMenu.setPriorityComponent();this.Super("showMenu",arguments)}})
var _1=false,_2=false;isc.Button.create({ID:"simpleViewButton",title:"Simple View",width:80,click:function(){setSimpleView(!window.simpleView)}});isc.DynamicForm.create({ID:"resultsForm",autoDraw:false,browserSpellCheck:false,overflow:"hidden",autoFocus:false,items:[{name:"results",showTitle:false,height:"*",width:"*",colSpan:"*",canEdit:!isc.Browser.isTouch,formItemType:_1?"RichTextItem":"textArea",canvasProperties:_1?{toolbarHeight:0,editAreaProperties:{}}:null}]});isc.DynamicForm.create({ID:"staticForm",resizeable:false,border:"1px solid black",autoDraw:false,autoFocus:false,numCols:8,canSelectText:true,grabValues:function(){if(!validOpener())return;var _3=targetWindow.isc,_4=_3.Canvas,_5=_4._stats,_6=_3.EH.lastTarget,_7=_3.EH.getFocusCanvas();this.setValues({draws:_5.draws,clears:_5.clears,redraws:_5.redraws,destroys:_5.destroys,count:_4._canvasList.length-_4._iscInternalCount,currentCanvas:_6!=null?_6.getID():"",currentFocusCanvas:_7!=null?_7.getID():""});this.markForRedraw()},items:[{name:"currentCanvas",title:"<b>Mouse Event Target</b>",wrapTitle:false,type:"staticText",colSpan:3,clipValue:true},{name:"currentFocusCanvas",title:"<b>Focus Target</b>",wrapTitle:false,type:"staticText",colSpan:3,clipValue:true},{name:"lastMouseDown",title:"<B>Last MouseDown Target</B>",wrapTitle:false,type:"staticText",colSpan:5,startRow:true,endRow:false,clipValue:true,hint:"<nobr>[click to add to eval]</nobr>",click:function(_34,_35){var _8=_35.getValue();if(_8==null)return;evalForm.setValue("evalExpression",_8+"\r"+(evalForm.getValue("evalExpression")||""))}},{name:"showInWatchTab",title:"<B>Show in Watch Tab</B>",wrapTitle:false,type:"button",colSpan:2,showTitle:false,startRow:false,endRow:true,alignment:"right",click:function(){var _3=targetWindow.isc,_6=_3.EH.mouseDownEvent.target;mainTabset.selectTab("watchTab");saveState();refreshWatchList();var _9=canvasList.data.getDescendants();var _10=false;for(var i=0;i<_9.length;i++){var _12=_9[i];if(_12.id==_6.ID){canvasList.deselectAllRecords();canvasList.data.openFolders(canvasList.data.getParents(_12));canvasList.selectRecord(_12);var _13=canvasList.getRecordIndex(_12);canvasList.refreshRow(_13);canvasList.scrollRecordIntoView(_13);_10=true;break}}
if(!_10){var _14=watchFlags.getField("showGenerated").getValue();watchFlags.getField("showGenerated").setValue(true);saveState();refreshWatchList();_9=canvasList.data.getDescendants();for(var i=0;i<_9.length;i++){var _12=_9[i];if(_12.id==_6.ID){canvasList.deselectAllRecords();canvasList.data.openFolders(canvasList.data.getParents(_12));canvasList.selectRecord(_12);var _13=canvasList.getRecordIndex(_12);canvasList.refreshRow(_13);canvasList.scrollRecordIntoView(_13);showingGeneratedComponentsLabel.show();Timer.setTimeout('showingGeneratedComponentsLabel.animateFade(0, function(){showingGeneratedComponentsLabel.hide();showingGeneratedComponentsLabel.setOpacity(100)});',2000);_10=true;break}}
if(!_10){watchFlags.getField("showGenerated").setValue(_14);saveState();refreshWatchList()}}}},{name:"enableAutoTest",type:"LinkItem",linkTitle:"Enable AutoTest subsystem...",title:"",target:"javascript",prompt:"Click to show AutoTest locators on every mousedown",showIf:"targetWindow && targetWindow.isc && targetWindow.isc.AutoTest != null && !targetWindow.isc.Log.showLocatorOnMouseDown",click:function(_34,_35){targetWindow.isc.Log.showLocatorOnMouseDown=true;this.form.redraw()}},{name:"autoTestLocator",title:"<B>AutoTest Locator</B>",wrapTitle:false,wrap:false,prompt:"Click an element in the main page to see the SmartClient AutoTest locator string. Double click here to copy to Eval area.",type:"staticText",colSpan:"*",startRow:true,endRow:true,selectOnFocus:true,showIf:"targetWindow && targetWindow.isc && targetWindow.isc.AutoTest != null && targetWindow.isc.Log.showLocatorOnMouseDown",hint:"<nobr>[double-click to add to eval]</nobr>",doubleClick:function(_34,_35){var _8=_35.getValue();if(_8==null)return;evalForm.setValue("evalExpression","scLocator='"+_8+"'\r\r"+(evalForm.getValue("evalExpression")||""))}},{name:"count",title:"Canvas Count",wrapTitle:false,type:"staticText"},{name:"draws",title:"draw()s",wrapTitle:false,type:"staticText",startRow:true},{name:"clears",title:"clear()s",wrapTitle:false,type:"staticText"},{name:"redraws",title:"redraw()s",wrapTitle:false,type:"staticText"},{name:"destroys",title:"destroy()s",wrapTitle:false,type:"staticText"}]});isc.DynamicForm.create({ID:"evalForm",height:"25%",autoDraw:false,overflow:"hidden",autoFocus:false,browserSpellCheck:false,items:[{formItemType:_2?"RichTextItem":"textArea",canvasProperties:_2?{toolbarHeight:0,editAreaProperties:{syntaxHiliter:isc.JSSyntaxHiliter.create(),countLines:true,handleKeyPress:function(){var _15=isc.EH.getKey();if(_15=='Tab'){evalButton.focus();return false}
if(_15=='Enter'&&isc.EH.ctrlKeyDown()){evalButton.click();return false}
if(_15=='Arrow_Up'&&isc.EH.ctrlKeyDown()){clearButton.click();return false}
return this.Super("handleKeyPress",arguments)}}}:null,name:"evalExpression",showTitle:false,colSpan:"*",width:"*",height:"*",defaultDynamicValue:"getLogCookieValue('evalExpression');",keyPress:function(_34,_35,_15){if(_15=='Enter'&&isc.EH.ctrlKeyDown()){if(isc.Browser.isSafari)_34.setValue(_34.getElementValue());evalButton.click();if(isc.Browser.isSafari)return false}
if(_15=='Arrow_Up'&&isc.EH.ctrlKeyDown()){clearButton.click();if(isc.isSafari)return false}}}]});isc.IButton.create({autoDraw:false,ID:"evalButton",title:"Eval JS",click:"saveState();doEval();",prompt:"Evaluate JS Expression [ctrl+Enter]",keyPress:_2?function(){if(isc.EH.getKey()=="Tab"&&isc.EH.shiftKeyDown()){evalForm.focusInItem("evalExpression");return false}}:null});isc.IButton.create({autoDraw:false,ID:"clearButton",title:"Clear",prompt:"Clear Log Messages [ctrl+Arrow_Up]",click:function(){if(validOpener())targetWindow.isc.Log.clear()}});isc.IButton.create({autoDraw:false,ID:"rulerButton",width:50,title:"Ruler",click:function(){if(!validOpener())return;if(targetWindow.isc_dev_ruler){targetWindow.isc_dev_ruler.destroy();return}
targetWindow.isc.Canvas.create({ID:"isc_dev_ruler",left:targetWindow.isc.Page.getScrollLeft()+5,top:targetWindow.isc.Page.getScrollTop()+5,overflow:"hidden",canDragResize:true,dragAppearance:"target",canDragReposition:true,backgroundImage:"[SKIN]/grid.gif",backgroundColor:"powderBlue",opacity:75,moved:function(){this.markForRedraw()},getInnerHTML:function(){var _16=this.getWidth()+"w x "+this.getHeight()+"h<br>at: "+this.getPageLeft()+","+this.getPageTop();return"<span title='"+_16+"'>"+_16+"</span>"},autoDraw:true});targetWindow.isc_dev_ruler.bringToFront()}});isc.DynamicForm.create({ID:"literalInput",height:"25%",autoDraw:false,overflow:"hidden",canFocus:false,browserSpellCheck:false,items:[{name:"literalText",ID:"literalText",type:"textArea",width:"*",height:"*",showTitle:false,colSpan:"*"}]});isc.HLayout.create({ID:"literalInputButtonBar",resizeable:false,autoDraw:false,height:20,membersMargin:10,members:[isc.IAutoFitButton.create({autoDraw:false,title:"asSource",click:function(){var _17=literalText.getValue(),_18=_17.split(/[\n\r]+/);literalText.setValue(_18.map("asSource").join(" +\n").replace(/" \+\n/g,'\\r" +\n'))}}),isc.IAutoFitButton.create({autoDraw:false,title:"asSource Single",click:function(){var _17=literalText.getValue(),_18=_17.split(/[\n\r]+/);literalText.setValue(_18.map("asSource",true).join(" +\n").replace(/' \+\n/g,"\\r' +\n"))}}),isc.IAutoFitButton.create({autoDraw:false,title:"asHTML",click:function(){literalText.setValue(literalText.getValue().asHTML())}}),isc.IAutoFitButton.create({autoDraw:false,title:"HTML Escape",click:function(){var _19=literalText.getValue();literalText.setValue("<pre>\r"+_19.replace(/</g,"&lt;").replace(/>/g,"&gt;")+"\r</pre>")}}),isc.IAutoFitButton.create({autoDraw:false,title:"As Canvas.contents",click:function(){targetWindow.isc.Canvas.create({ID:"literalHTMLCanvas",autoDraw:true,contents:literalText.getValue(),backgroundColor:"gray"})
targetWindow.literalHTMLCanvas.bringToFront()}})]});isc.HStack.create({autoDraw:false,ID:"evalButtonBar",membersMargin:10,height:25,members:[evalButton,clearButton,rulerButton]});Canvas.create({ID:"versionCanvas",autoDraw:false,canSelectText:true,cursor:"text",height:20,getContents:function(){var _20="SmartClient&nbsp;Version:&nbsp;<b>${targetWindow.isc.version}</b>&nbsp;";if(["Eval","PNC","IDev"].contains(targetWindow.isc.licenseType)){if(targetWindow.isc.licenseType=="Eval"){_20+="(expires&nbsp;${targetWindow.isc.expirationDate})"}else{_20+="(built&nbsp;${targetWindow.isc.buildDate})"}
_20+=" Licensed&nbsp;to:&nbsp;${targetWindow.isc.licenseCompany}&nbsp;(#${targetWindow.isc.licenseSerialNumber})"}else{_20+="(built&nbsp;${targetWindow.isc.buildDate})"}
return _20.evalDynamicString(this)}});window.defaultImports=["java.lang.*","java.util.*","java.io.*","java.math.*","","com.isomorphic.base.*","com.isomorphic.util.*","com.isomorphic.js.*","com.isomorphic.servlet.*","com.isomorphic.datasource.*","com.isomorphic.io.*","com.isomorphic.rpc.*","com.isomorphic.xml.*","com.isomorphic.tools.*","com.isomorphic.log.*","com.isomorphic.sql.*"],isc.DynamicForm.create({ID:"evalServerScriptForm",height:"25%",autoDraw:false,overflow:"hidden",autoFocus:false,numCols:6,colWidths:[100,120,20,100,20,"*"],browserSpellCheck:false,items:[{name:"engine",title:"Language",type:"comboBox",defaultDynamicValue:"getLogCookieValue('serverScriptEngine')||'groovy'",changed:function(_34,_35,_36){var _21=this.form.getValue("engine");this.form.getItem("imports").setEnabled(["js","groovy","java"].contains(_21))}},{name:"captureOutput",startRow:false,title:"Capture stdout+stderr",type:"checkbox",defaultValue:true},{name:"escapeStringResult",startRow:false,title:"Escape string result",type:"checkbox",defaultValue:false},{formItemType:"textArea",name:"imports",title:"Imports",width:200,startRow:true,titleOrientation:"top",height:"*",defaultValue:defaultImports.join("\n")},{formItemType:"textArea",name:"serverScriptCode",showTitle:false,colSpan:"*",width:"*",height:"*",defaultDynamicValue:"getLogCookieValue('serverScriptCode');",keyPress:function(_34,_35,_15){if(_15=='Enter'&&isc.EH.ctrlKeyDown()){if(isc.Browser.isSafari)_34.setValue(_34.getElementValue());evalServerScriptButton.click();if(isc.Browser.isSafari)return false}}}]});window.getAvailableScriptEnginesCallback=function(_34,_35){if(_34.status!=isc.RPCResponse.STATUS_SUCCESS){evalServerScriptForm.setDisabled(true)}else{evalServerScriptForm.setValueMap("engine",_35);evalServerScriptForm.setValue("engine")}}
isc.DMI.callBuiltin({methodName:"getAvailableScriptEngines",callback:"getAvailableScriptEnginesCallback(rpcResponse, data)",requestParams:{willHandleError:true}});isc.HStack.create({autoDraw:false,ID:"evalServerScriptButtonBar",membersMargin:10,resizeable:false,height:25,members:[isc.IButton.create({autoDraw:false,width:120,ID:"evalServerScriptButton",title:"Eval Server Script",click:"saveState();doEvalServerScript()"})]});isc.DynamicForm.create({ID:"evalJavaForm",height:"25%",autoDraw:false,overflow:"hidden",autoFocus:false,browserSpellCheck:false,items:[{formItemType:_2?"RichTextItem":"textArea",canvasProperties:_2?{toolbarHeight:0,editAreaProperties:{syntaxHiliter:isc.JSSyntaxHiliter.create(),countLines:true,handleKeyPress:function(){var _15=isc.EH.getKey();if(_15=='Tab'){evalJavaButton.focus();return false}
if(_15=='Enter'&&isc.EH.ctrlKeyDown()){evalJavaButton.click();return false}
return this.Super("handleKeyPress",arguments)}}}:null,name:"javaCode",showTitle:false,colSpan:"*",width:"*",height:"*",defaultDynamicValue:"getLogCookieValue('javaCode');",keyPress:function(_34,_35,_15){if(_15=='Enter'&&isc.EH.ctrlKeyDown()){if(isc.Browser.isSafari)_34.setValue(_34.getElementValue());evalJavaButton.click();if(isc.Browser.isSafari)return false}}}]});isc.HStack.create({autoDraw:false,ID:"evalJavaButtonBar",membersMargin:10,resizeable:false,height:25,members:[isc.IButton.create({autoDraw:false,ID:"evalJavaButton",title:"Eval Java",click:"saveState();doEvalJava()"})]});window.showJavaEvalHelp=function(){var _22="Evaluated code runs in a JSP.  Your code is automatically wrapped in jsp tags (&lt;% %&gt;) if you don't provide them.  If you do provide them, then your code becomes the body of the temporary JSP verbatim.<br><br>Use out.write() to send debugging output to the Developer Console, or log.warn() to send output to the server log.  An RPCManager is available as the variable \"rpc\".<br><br>JSP is temporarily saved as [webroot]/tools/devConsoleEval.jsp.  To target with an RPCRequest, just do 'isc.rpc.sendRequest({ url: \"/tools/devConsoleEval.jsp\" })'<br><br>Isomorphic taglib is available when eval'ing JSP.  You can use this feature to debug RPC responses as well as a quick way to execute some Java code.";isc.Hover.show(_22)};window.showServerScriptEvalHelp=function(){var _22="Evaluated code runs in a scripting engine of your choice (JSR223) on the server.";isc.Hover.show(_22)};isc.DynamicForm.create({ID:"evalXMLForm",height:"25%",autoDraw:false,overflow:"hidden",autoFocus:false,browserSpellCheck:false,items:[{formItemType:_2?"RichTextItem":"textArea",canvasProperties:_2?{toolbarHeight:0,editAreaProperties:{syntaxHiliter:isc.XMLSyntaxHiliter.create(),countLines:true,handleKeyPress:function(){var _15=isc.EH.getKey();if(_15=='Tab'){evalXMLButton.focus();return false}
if(_15=='Enter'&&isc.EH.ctrlKeyDown()){evalXMLButton.click();return false}
return this.Super("handleKeyPress",arguments)}}}:null,name:"xmlData",showTitle:false,colSpan:"*",width:"*",height:"*",defaultDynamicValue:"getLogCookieValue('evalXMLData');",keyPress:function(_34,_35,_15){if(_15=='Enter'&&isc.EH.ctrlKeyDown()){if(isc.Browser.isSafari)_34.setValue(_34.getElementValue());evalXMLButton.click();if(isc.Browser.isSafari)return false}}}]});isc.HStack.create({autoDraw:false,ID:"evalXMLButtonBar",membersMargin:10,resizeable:false,height:25,members:[isc.IButton.create({autoDraw:false,ID:"evalXMLButton",title:"Eval XML",click:"saveState();doEvalXML()"}),isc.IButton.create({autoDraw:false,title:"Show JS",click:function(){saveState();isc.xml.toJSCode(evalXMLForm.getValue("xmlData"),"targetWindow.isc.Log.logInfo('xmlToJS:\\n\\n'+data)")}})]});window.updateCommWatcher=function(){if(window.commDisplay&&commDisplay.isVisible())commDisplay.setHistoryPosition()}
isc.defineClass("CommWatcher","VLayout").addMethods({overflow:"hidden",autoChildren:["historyPicker","viewGrid","selectForm"],historyPickerDefaults:{_constructor:isc.DynamicForm,height:20,colWidths:[100,"*",95],numCols:3,items:[{type:"select",name:"historySelect",title:"Comm History",width:"*",change:"this.form.parentElement.setHistoryPosition(value)"},{type:"checkbox",name:"showLast",showTitle:false,title:"Show Last",defaultValue:true}]},viewGridDefaults:{_constructor:isc.DOMGrid,headerHeight:0},selectFormDefaults:{_constructor:isc.DynamicForm,numCols:5,colWidths:[60,"*",60,60,"*"],items:[{name:"xpath",title:"XPath",defaultValue:"default:",width:"*"},{startRow:false,endRow:false,type:"button",width:"*",title:"Eval",click:"form.creator.evalXPath()"},{name:"result",title:"Result",width:"*"}]},setHistoryPosition:function(_34){if(!targetWindow.isc.xml)return;var _23=targetWindow.isc.xml.xmlResponses;if(_34==null){if(this.historyPicker.getValue("showLast")){_34=_23.length-1}else{_34=this.historyPosition||0}}
if(_34>=_23.length)_34=Math.max(0,_23.length-1);this.historyPosition=_34;this.historyPicker.setValue("historySelect",this.historyPosition);if(_23&&_23.length>0){var _24=_23[_34].text;var _25=isc.xml.parseXML(_24);if(_25)this.viewGrid.setRootElement(_25.documentElement)}
this.updateValueMap()},updateValueMap:function(){var _23=targetWindow.isc.xml.xmlResponses;if(!_23||_23.length<1)return;var _26={};for(var i=0;i<_23.length;i++){var _27=_23[i].text;_27=isc.xml.trimXMLStart(_27);_27=_27.trim();_27=_27.substring(0,200);_27=_27.replaceAll(/[\r\n]*/,"");_27=_27.asHTML();_26[i]=_27}
this.historyPicker.setValueMap("historySelect",_26)},show:function(){this.Super("show",arguments);this.setHistoryPosition()},evalXPath:function(){var _28=this.selectForm.getValue("xpath"),_29=this.viewGrid.getSelectedRecord();if(!_29){alert("Select a record");return}
var _27=targetWindow.isc.xml.xmlResponses[this.historyPosition];var _30=this.viewGrid.data,_31=this.viewGrid.getSelectedRecord(),_32=_30.getElement(_31),_33;try{_33=isc.xml.selectScalar(_32,_28,_27.xmlNamespaces)}catch(e){isc.warn("Error executing expression: "+this.echo(e))}
addToLog("Eval XPath result: "+this.echoAll(_33));this.selectForm.setValue("result",this.echoAll(_33))},getSelectedElement:function(){var _31=this.viewGrid.getSelectedRecord();if(!_31)return null;return this.viewGrid.data.getElement(_31)}})
isc.CommWatcher.create({ID:"commDisplay",autoDraw:false});isc.SectionStack.create({ID:"resultsLayout",autoDraw:false,visibilityMode:"multiple",sections:[{ID:"logMessagesSection",title:"Log Messages",autoShow:true,items:[isc.HLayout.create({height:25,autoDraw:false,members:[preferencesButton,simpleViewButton]}),resultsForm,staticForm]},{name:"evalServerScriptSection",disabled:!isc.hasOptionalModule("SCServer"),prompt:isc.hasOptionalModule("SCServer")?null:"Requires SmartClient Server",title:"Evaluate Server Script <SPAN STYLE='color:darkgray;'>(Use JSR223 Scripting on Server)&nbsp;"+isc.Canvas.imgHTML(isc.Page.getSkinDir()+"images/actions/help.png",16,16,null," onmouseout='isc.Hover.clear()' onmouseover='isc.Hover.setAction(window, showServerScriptEvalHelp, null, 300)'")+"</SPAN>",items:[evalServerScriptForm,evalServerScriptButtonBar]},{ID:"evalXMLSection",title:"Evaluate XML",disabled:!isc.hasOptionalModule("SCServer"),prompt:isc.hasOptionalModule("SCServer")?null:"Requires SmartClient Server",items:[evalXMLForm,evalXMLButtonBar]},{ID:"literalInputSection",title:"Literal Text <SPAN STYLE='color:darkgray'>(contents available as 'literalText' in JS evals)</SPAN>",items:[literalInput,literalInputButtonBar]},{ID:"evalJSSection",title:"Evaluate JS Expression <SPAN STYLE='color:darkgray'>(watch list selection available as 'watched' in evals)</SPAN>",autoShow:true,items:[evalForm,evalButtonBar]},{ID:"versionInfoStack",resizeable:false,showHeader:false,items:[versionCanvas]}]});mainTabset.updateTab("results",resultsLayout)}
function getWidget(_1){if(!validOpener())return;var _2=_1.getSelectedRecord();if(_2==null)return null;return targetWindow[_2.id]}
function refreshWatchList(){if(window.canvasList)canvasList.setData(getCanvasList());var _1=getLogCookieValue('showUndrawn'),_2=getLogCookieValue('showHidden');if(_1)canvasList.showField("drawn");else canvasList.hideField("drawn");if(_2)canvasList.showField("visible");else canvasList.hideField("visible")}
function inspectDOM(_1){if(!window.inspectorWindow){isc.DOMInspector.create({ID:"inspector",scope:targetWindow,autoDraw:false});isc.Window.create({ID:"inspectorWindow",autoDraw:false,title:"DOM Inspector",height:"100%",width:"100%",items:[inspector]})}
var _2=_1;if(_1==null||!targetWindow.isc.isA.Canvas(_1)||!_1.isDrawn()){_2=targetWindow.isc.Canvas.getDocumentBody(true)}else if(targetWindow.isc.isA.Canvas(_1)){_2=_1.getClipHandle()}
inspector.setRootElement(_2);inspectorWindow.show()}
function initWatchPane(){if(window.watchForm){if(window.$49b)refreshWatchList();window.$49b=false;return}
isc.DynamicForm.create({autoDraw:false,autoFocus:false,ID:"watchForm",numCols:6,browserSpellCheck:false,items:[{formItemType:"header",align:"center",name:"header",defaultValue:"Observe / Time methods on objects"},{formItemType:"text",name:"watchObject",title:"Object",defaultDynamicValue:"getLogCookieValue('watchObject')",keyPress:"if (keyName == 'Enter') executeTraceMethod(item.getValue(), form.getValue('watchMethod'))"},{formItemType:"text",name:"watchMethod",title:"Method",defaultDynamicValue:"getLogCookieValue('watchMethod')",keyPress:"if (keyName == 'Enter') executeTraceMethod(form.getValue('watchObject'), item.getValue())"},{formItemType:"toolbar",startRow:false,buttons:[{name:"traceButton",title:"Trace Method",click:"executeTraceMethod(form.getValue('watchObject'), form.getValue('watchMethod'))"},{name:"timeButton",title:"Time Method",click:"executeTimeMethod(form.getValue('watchObject'), form.getValue('watchMethod'))"}]}]});isc.DynamicForm.create({ID:"watchFlags",autoDraw:false,autoFocus:false,width:200,numCols:4,items:[{formItemType:"blurb",defaultValue:"Show:",showTitle:false,startRow:true,endRow:false,colSpan:1},{formItemType:"checkbox",name:"showHidden",title:"hidden",change:function(){Timer.setTimeout('saveState();refreshWatchList();',10)},changeOnBlur:true,defaultDynamicValue:"getLogCookieValue('showHidden')",startRow:false,endRow:false,colSpan:1,showTitle:false},{formItemType:"checkbox",name:"showUndrawn",title:"undrawn",change:function(){Timer.setTimeout('saveState();refreshWatchList();',10)},changeOnBlur:true,defaultDynamicValue:"getLogCookieValue('showUndrawn')",startRow:false,endRow:false,colSpan:1,showTitle:false},{formItemType:"checkbox",name:"showGenerated",title:"generated",change:function(){Timer.setTimeout('saveState();refreshWatchList();',10)},changeOnBlur:true,defaultDynamicValue:"getLogCookieValue('showGenerated')",startRow:false,endRow:false,colSpan:1,showTitle:false}]});isc.HLayout.create({autoDraw:false,ID:"watchFlagsLayout",height:20,members:[watchFlags,isc.Label.create({ID:"showingGeneratedComponentsLabel",wrap:false,visibility:"hidden",height:24,contents:"<SPAN STYLE='border:1px solid #333333;color:#0000ff'><< now showing generated components</SPAN>"})]});isc.DynamicForm.create({ID:"watchFind",autoDraw:false,autoFocus:false,browserSpellCheck:false,width:400,numCols:3,colWidths:[104,"*"],fields:[{name:"search",titleAlign:"left",title:"Find component",titleHoverHTML:function(){return"Type a partial component ID here to find it in the list below."},changed:"form.findComponent()",keyPress:function(_19,_20,_21){if(_21=="Enter")_20.findComponent()}},{name:"nextMatch",type:"button",title:"Next match",startRow:false,disabled:true,click:"form.findComponent()",enableIf:"return false",width:80}],findComponent:function(){var _1=this.getValue("search");if(_1==null||_1==""){this.getField("nextMatch").disable();return}
_1=_1.toLowerCase();this.getField("nextMatch").setDisabled(false);var _2=this.$49c==_1&&this.$49d;this.$49c=_1;var _3=canvasList.data.getDescendants();var _4=canvasList.getSelectedRecord();var _5=_4?_3.indexOf(_4):0;if(_2)_5++;if(this.$49d){this.$49d.id=this.$49d.$75l;canvasList.refreshRow(canvasList.getRecordIndex(this.$49d));this.$49d=null}
var _6=this.findNext(_3,_5,_1);if(!_6)_6=this.findNext(_3,0,_1);if(_6){this.$49d=_6;var _7=_6.id;var _8;if(_7.match(/<.*>/)){searchRe=new RegExp("(^|>)([^<]*?)("+_1+")","ig");_8=_7.replace(searchRe,"$1$2<span class='background-color:lightgreen;'>$3</span>")}else{searchRe=new RegExp("("+_1+")","ig");_8=_7.replace(searchRe,"<span style='background-color:lightgreen;'>$1</span>")}
_6.$75l=_6.id;_6.id=_8;canvasList.deselectAllRecords();canvasList.data.openFolders(canvasList.data.getParents(_6));canvasList.selectRecord(_6);var _9=canvasList.getRecordIndex(_6);canvasList.refreshRow(_9);canvasList.scrollRecordIntoView(_9)}},findNext:function(_3,_5,_1){for(var i=_5;i<_3.length;i++){var _11=_3[i];if(_11.id.toLowerCase().contains(_1)){return _11}}}});var _12=[{title:"Component Log Settings",submenu:prioritiesMenu},{title:"Inspect DOM",enableIf:"isc.isA.Canvas(getWidget(target)) && getWidget(target).isDrawn()",click:"inspectDOM(getWidget(target))"},{dynamicTitle:"(getWidget(target).isVisible() && getWidget(target).isDrawn()) ? 'Hide' : 'Show'",click:function(_19){var _13=getWidget(_19);(_13.isVisible()&&_13.isDrawn())?_13.hide():_13.show();refreshWatchList()}},{title:"Bring To Front",click:"getWidget(target).bringToFront()"},{title:"Destroy",click:"getWidget(target).destroy();refreshWatchList()"}];if(!targetWindow.isc.Browser.isSGWT){_12.addAt({dynamicTitle:"menu.getDocMenuTitle(target)",enableIf:"isc.isA.String(menu.getClassRef(target))",click:"menu.handleShowDoc(target)"},0)};isc.TreeGrid.create({ID:"canvasList",autoDraw:false,selectionType:"single",animateFolders:false,initialSort:[{property:"positionSortField",direction:"ascending"}],bodyProperties:{canSelectText:true},fields:[{name:"id",title:"ID"},{name:"theClass",title:"Class",width:100},{name:"drawn",title:"Drawn",width:45,showIf:"getLogCookieValue('showUndrawn')",valueMap:{"true":"Yes","false":"No"}},{name:"visible",title:"Visible",width:45,showIf:"getLogCookieValue('showHidden')",valueMap:{"true":"Yes","false":"No"}},{name:"positionSortField",title:"Position",type:"number",align:"left",displayField:"position",width:70},{name:"size",title:"Specified Size",showIf:"false",width:110},{name:"drawnSize",title:"Drawn Size",width:110},{name:"zIndex",title:"Z-Index",width:70,showIf:"false"},{name:"overflow",title:"Overflow",width:65,showIf:"false"}],data:getCanvasList(),showContextMenu:function(){if(getWidget(this)==null){this.logWarn("no selection, not showing context menu");return}
return this.Super("showContextMenu",arguments)},contextMenu:isc.Menu.create({autoDraw:false,getTargetClassName:function(_19){return _19.getSelectedRecord().theClass},getClassRef:function(_19){var _14=this.getTargetClassName(_19);if(_14&&isc.jsdoc){if(isc.jsdoc.getDocItem("class:"+_14))return"class:"+_14;return null}
return-1},getDocMenuTitle:function(_19){var _14=this.getTargetClassName(_19);var _15=this.getClassRef(_19);if(isc.isA.String(_15))return"Show doc for class "+_14;else if(_15==-1)return"To see docs link, click on 'Reference Docs' tab";return"No doc available for class "+_14},handleShowDoc:function(_19){var _15=this.getClassRef(_19);mainTabset.selectTab("refDocs");isc.Timer.setTimeout("isc.DocViewer.instance.showTopic('"+_15+"')",0)},showSubmenu:function(_19){if(_19.submenu==prioritiesMenu){prioritiesMenu.setPriorityComponent(getWidget(this.target))}
return this.Super("showSubmenu",arguments)},data:_12}),selectionChanged:function(_18){if(!this.anySelected())return;if(!validOpener())return;var _16=_18.$75l||_18.id,_17=targetWindow[_16];watchForm.setValue("watchObject",_16);targetWindow.isc.Timer.setTimeout("isc.Log.hiliteCanvas('"+_16+"');",0)}});isc.IButton.create({ID:"refreshButton",autoDraw:false,title:"Refresh",click:"refreshWatchList()"});isc.IButton.create({ID:"inspectButton",autoDraw:false,title:"Inspect",click:function(){var _18=canvasList.getSelectedRecord(),_17=(_18?targetWindow[_18.id]:null);inspectDOM(_17)}});isc.VLayout.create({ID:"watchPaneLayout",autoDraw:false,members:[watchForm,watchFlagsLayout,watchFind,canvasList,isc.HLayout.create({autoDraw:false,height:20,members:[refreshButton,inspectButton]})]});mainTabset.updateTab("watchTab",watchPaneLayout)}
function initDocsPane(){if(window.docViewer)return;isc.showPrompt("Loading Documentation modules");if(!isc.module_Analytics&&isc.hasOptionalModule("Analytics")){isc.FileLoader.loadModules("Analytics","docModulesLoaded()")}
if(!isc.module_RealtimeMessaging&&isc.hasOptionalModule("RealtimeMessaging")){isc.FileLoader.loadModules("RealtimeMessaging","docModulesLoaded()")}
if(!isc.module_RichTextEditor&&isc.hasOptionalModule("RichTextEditor")){isc.FileLoader.loadModules("RichTextEditor","docModulesLoaded()")}
if(!isc.SyntaxHiliter){isc.FileLoader.loadModules("SyntaxHiliter","docModulesLoaded()")}
if(!isc.module_PluginBridges&&isc.hasOptionalModule("PluginBridges")){isc.FileLoader.loadModules("PluginBridges","docModulesLoaded()")}
isc.FileLoader.loadModules(["ExampleViewer","DocViewer"],"docModulesLoaded()");isc.FileLoader.loadFiles(["../reference/docViewerStyles.css","../reference/skin/shell_styles.css","../reference/sourceColorizer.css","../reference/docTree.js","../reference/exampleTree.js"],"docModulesLoaded()");if(isc.Browser.isSafari&&!isc.Browser.isMobileWebkit){isc.FileLoader.loadFile("../reference/referenceDocs.js","safariDocsLoaded()")}else{isc.xml.loadXML("../reference/referenceDocs.xml","docsLoaded(xmlDoc, rpcResponse)",{willHandleError:true})}}
function docModulesLoaded(){if(isc.DocViewer&&window.docTree&&window.exampleTree){window.$49e=true;if(window.docItems)initDocViewer()}}
function safariDocsLoaded(){if(window.$49e)initDocViewer()}
function docsLoaded(_1,_2){if(_2.status==0)window.docItems=_1;if(window.$49e)initDocViewer()}
function initDocViewer(){isc.jsdoc.init(window.docItems);var _1=isc.VLayout.create({autoDraw:false,members:[isc.LayoutSpacer.create({height:5,autoDraw:false}),isc.DocViewer.create({ID:"docViewer",autoDraw:false,docRoot:"../../../docs/"})]});mainTabset.updateTab("refDocs",_1);isc.clearPrompt()}
function initXMLToolsPane(){if(window.xmlView)return;isc.TransformBuilder.create({ID:"xmlView",autoDraw:false});mainTabset.updateTab("xmlTools",xmlView)}
function initRPCPane(){if(!targetWindow.isc.RPCManager){isc.say("RPCManager not available in observed window - can't track RPCs");return}
if(window.rpcConfig)return;isc.defineClass("RPCTracker").addClassProperties({data:isc.Tree.create({openProperty:"isOpen",nameProperty:"transactionNum"}),dataChanged:function(){var _1=targetWindow.isc.RPCManager.getTransactions().getLastChanged();if(!_1)return;this.updateStatus(_1)},clearAll:function(){var _2=this.data.getChildren(this.data.root);if(_2)this.data.removeList(_2);if(window.requestViewer)requestViewer.setData(null);if(window.responseViewer)responseViewer.setData(null);if(window.rpcTimingDetail){rpcTimingDetail.setData(rpcTimingDetail.getDefaultData())}},observeTransactions:function(_44){var _3=targetWindow.isc.RPCManager;var _4=_3.getTransactions();this.clearAll();if(_44){targetWindow.isc.Log.logViewer.observe(_4,"dataChanged","observer.updateRPC()");for(var i=0;i<_4.length;i++){this.updateStatus(_4[i])}}else{targetWindow.isc.Log.logViewer.ignore(_4,"dataChanged");targetWindow.isc.RPCManager.removeClearedRPC()}},bindToTargetWindow:function(){this.observeTransactions(this.shouldObserveTransactions())},shouldObserveTransactions:function(){var _6=targetWindow.isc.LogViewer.getGlobalLogCookie();return _6?_6.trackRPC:false},updateStatus:function(_1){var _7=this.data.find("/"+_1.transactionNum);if(_7)this.data.remove(_7,true);var _8=[];for(var i=0;i<_1.operations.length;i++){var _9=_1.operations[i];var _10=_1.responses[i];_8[i]=this.rpcToRecord(_1,_9,_10);if(_1.operations.length>1)_8[i]._queueIndex=i}
if(_8.length==0)return;var _11;if(_8.length==1){_11=_8[0]}else if(_8.length>1){_11={transactionNum:_1.transactionNum,url:_1.URL,type:"Queue",isFolder:true,children:_8,isOpen:true}}
this.data.add(_11,this.data.root)},rpcToRecord:function(_1,_9,_10){var _12=_9._dsRequest||_9.$374;var _13="RPCRequest";if(_12!=null)_13="DSRequest";else if(_9.data&&_9.data.is_ISC_RPC_DMI)_13="RPC DMI";else if(_9.wsOperation)_13="WSRequest";var _14;if(_9.operationType){_14=_9.operationType;if(_9.operationId){_14+="&lt;"+_9.operationId+"&gt;"}
if(_9.wsOperation)_14+="["+_9.wsOperation+"]"}else if(_9.wsOperation){_14=_9.wsOperation}else{if(_9.data&&_9.data.methodName)_14=_9.data.methodName;else _14="RPC"}
var _15;if(_9.dataSource)_15=_9.dataSource;else{if(_9.data&&_9.data.appID)_15=_9.data.appID+"/"+_9.data.className}
var _16=_9.componentId||"",_17=_9.componentContext;if(_17){_16+=" &lt;"+_17+"&gt;"}
var _18=_1.mergedActionURL?_1.mergedActionURL:_9.actionURL;if(_1.isProxied)_18=_1.proxiedURL;if(_1.allClientOnly)_18="[client only]";var _19={url:_18,transactionNum:_1.transactionNum,type:_13,ds:_15,operationType:_14,componentId:_16,transport:_9.transport,httpMethod:_9.httpMethod,timeSent:new Date(_1.sendTime),proxied:_9.isProxied,timeout:_1.timeout,rpcRequest:_9,transaction:_1,clientOnlyData:_10?_10.clientOnlyData:null,xhrData:_1.xhrData,xhrHeaders:_1.xhrHeaders};if(_10){isc.addProperties(_19,{status:_10.status,httpCode:_10.httpResponseCode,responseReceived:new Date(_1.receiveTime),rpcResponse:_10})}else if(_1.cancelled){isc.addProperties(_19,{status:"CANCELLED"})}
return _19}});isc.RPCTracker.bindToTargetWindow();isc.Page.observe(mainTabset,"targetWindowChanged","isc.RPCTracker.bindToTargetWindow()");isc.DMI.callBuiltin({methodName:"areServerTimingsTracked",arguments:[],requestParams:{willHandleError:true},callback:function(_10,_44){if(_10.status==-1){addToLog("Developer Console - error encountered when checking if server timings are switched on - assuming the 'areServerTimesTracked' and 'trackServerTimings' built-in RPCs are disallowed, and hiding the UI for dynamic switching of server timing data");timingForm.hideItem("serverSideTiming")}else{timingForm.setValue("serverSideTiming",_44)}}});isc.DynamicForm.create({ID:"rpcConfig",autoDraw:false,autoFocus:false,width:100,numCols:5,colWidths:[1,1,1,1],fields:[{name:"trackRPC",title:"Track RPCs",type:"boolean",colSpan:1,startRow:false,endRow:false,showTitle:false,defaultValue:isc.RPCTracker.shouldObserveTransactions(),changed:function(_44,_45,_29){targetWindow.isc.RPCManager.setTrackRPC(_29);isc.RPCTracker.observeTransactions(_29);saveState()}},{name:"autoScroll",title:"Auto-Scroll",type:"boolean",colSpan:1,startRow:false,endRow:false,showTitle:false,defaultValue:true},{type:"spacer",width:24},{name:"clearRPCs",type:"Button",title:"Clear",startRow:false,endRow:false,click:function(_44,_45,_29){isc.RPCTracker.clearAll()}}]});isc.DataSource.create({ID:"RPCDS",clientOnly:true,fields:[{name:"transactionNum",title:"#"},{name:"proxied",type:"boolean"},{name:"url",title:"URL",align:"right",showHover:true},{name:"type",title:"Type"},{name:"ds",width:130,title:"DS or appID/className"},{name:"operationType",title:"Operation"},{name:"transport",title:"Transport",valueMap:["xmlHttpRequest","hiddenFrame","scriptInclude"]},{name:"componentId",title:"Component"},{name:"httpMethod",title:"HTTP Method",formatCellValue:function(_29,_19){if(_19.type=="Queue")return null;return _29?_29:"POST"}},{name:"status",title:"Status",valueMap:{"0":"SUCCESS","-1":"FAILURE","-4":"VALIDATION_ERROR","-5":"LOGIN_INCORRECT","-6":"MAX_LOGIN_ATTEMPTS_EXCEEDED","-7":"LOGIN_REQUIRED","-90":"TRANSPORT_ERROR","-100":"SERVER_TIMEOUT"}},{name:"httpCode",title:"HTTP Status"},{name:"timeSent",title:"Time Sent",formatCellValue:function(_29,_19){return _29?isc.Log.getLogTimestamp(_29):null}},{name:"responseReceived",title:"Response Received",formatCellValue:function(_29,_19){return _29?isc.Log.getLogTimestamp(_29):null}},{name:"elapsedTime",title:"Elapsed Time",formatCellValue:function(_29,_19){return _19.responseReceived?(_19.responseReceived-_19.timeSent)+"ms":null}},{name:"timeout",title:"Timeout",formatCellValue:function(_29,_19){if(_29==null)return null;if(_29==0)return"no timeout";return _29+"ms"}}]});isc.TreeGrid.create({ID:"rpcHistory",autoDraw:false,showResizeBar:true,selectionStyle:"single",skinImgDir:"../../system/reference/skin/images/",nodeIcon:"[SKIN]server_client_exchange.png",folderIcon:"[SKIN]server_network.png",showDropIcons:false,showOpenIcons:false,data:isc.RPCTracker.data,dataSource:"RPCDS",useAllDataSourceFields:true,canHover:true,cellHoverHTML:function(_19,_44,_45){rpcDetail.setData(_19);return rpcDetail.getInnerHTML()},fields:[{name:"transactionNum",width:75},{name:"proxied",width:50},{name:"url",showHover:true,width:"*"},{name:"type",width:90},{name:"operationType",width:120},{name:"componentId",width:100},{name:"transport",width:100,showIf:"false"},{name:"httpMethod",width:100,title:"HTTP Method",showIf:"false"},{name:"status",title:"Status",showHover:true,width:80},{name:"httpCode",width:100,align:"right",showIf:"false"},{name:"timeSent",align:"right",width:90},{name:"responseReceived",align:"right",showIf:"false"},{name:"elapsedTime",align:"right",width:75},{name:"timeout",width:100,align:"right",showIf:"false"}],recordClick:function(_44,_19,_45,_46){requestViewer.setData(_19);responseViewer.setData(_19);if(isc.Log.logIsInfoEnabled("RpcTabTiming")){rpcTimingDetail.setData(rpcTimingDetail.getProcessedData(_19))}},dataChanged:function(){this.Super("dataChanged",arguments);if(rpcConfig.getValue("autoScroll"))this.delayCall("scrollToBottom",[],0)},scrollToBottom:function(){this.body.scrollToBottom()}});isc.DetailViewer.create({ID:"rpcDetail",autoDraw:false,dataSource:"RPCDS"});isc.TreeGrid.create({ID:"rpcTimingDetail",autoDraw:false,showRoot:true,width:"100%",height:"100%",fields:[{name:"name",title:" ",width:"60%"},{name:"elapsed",title:"Elapsed"},{name:"start",title:"Started"},{name:"end",title:"Ended"}],setData:function(){var _20=this.getViewState();this.Super("setData",arguments);this.setViewState(_20)},getProcessedData:function(_44){if(!_44){return isc.Tree.create({modelType:"children",root:{name:"No data to display"}})}
var _21={timeout:_44.timeout,name:"Complete client-server roundtrip",start:_44.timeSent,children:[],end:_44.responseReceived}
if(_44.rpcRequest&&_44.rpcRequest.clientTiming){_21.children.add(isc.addProperties({},_44.rpcRequest.clientTiming));_21.start=_44.rpcRequest.clientTiming.start}
var _22={timeout:_44.timeout,name:"Server roundtrip",start:_44.rpcRequest.clientTiming.end,children:[],end:_44.responseReceived}
_21.children.add(_22);if(_44.rpcResponse&&_44.rpcResponse.timing){_22.children.add(isc.addProperties({},_44.rpcResponse.timing));if(_44.rpcResponse.timing.start&&_44.rpcResponse.timing.end){if(_22.start&&_22.end){var _23=_22.end-_22.start,_24=_44.rpcResponse.timing.end-_44.rpcResponse.timing.start,_25=_23-_24;if(_25%2)_25+=1;_25/=2;_22.children.addAt({name:"Network time (inferred)",start:_22.start,end:_22.start+_25},0);_22.children.add({name:"Network time (inferred)",start:_22.start+_25+_24,end:_22.start+_25+_24+_25})}}}
if(_44.rpcResponse&&_44.rpcResponse.clientTiming){_21.children.add(isc.addProperties({},_44.rpcResponse.clientTiming));_21.end=_44.rpcResponse.clientTiming.end}
return isc.Tree.create({modelType:"children",root:_21})},formatCellValue:function(_29,_19,_44,_45){if(_19==null)return _29;if(this.getField(_45).name=="elapsed"){if(_19.start&&_19.end){return(_19.end-_19.start)+"ms"}else{return null}}
if(this.getField(_45).name=="start"||this.getField(_45).name=="end"){if(isc.isA.Date(_29)){return isc.Time.format(_29,"toTimestamp")}
if(isc.isA.Number(_29)){return isc.Time.format(new Date(_29),"toTimestamp")}}
return _29}});isc.DynamicForm.create({ID:"rawRequestViewer",autoDraw:false,browserSpellCheck:false,overflow:"hidden",autoFocus:false,fields:[{name:"raw",showTitle:false,height:"*",width:"*",colSpan:"*",formItemType:"textArea"}]});isc.DynamicForm.create({ID:"decodedRequestViewer",autoDraw:false,browserSpellCheck:false,overflow:"hidden",autoFocus:false,fields:[{name:"decoded",showTitle:false,height:"*",width:"*",colSpan:"*",formItemType:"textArea"}]});isc.DynamicForm.create({ID:"dsRequestViewer",autoDraw:false,browserSpellCheck:false,overflow:"hidden",autoFocus:false,fields:[{name:"dsRequest",showTitle:false,height:"*",width:"*",colSpan:"*",formItemType:"textArea"}]});isc.TabSet.create({ID:"requestViewer",showResizeBar:true,autoDraw:false,paneMargin:0,destroyPanes:false,tabs:[{title:"RPCRequest",ID:"decodedRequestTab",pane:decodedRequestViewer},{title:"Raw Request",ID:"rawRequestTab",pane:rawRequestViewer}],tabBarControls:[isc.IButton.create({autoDraw:false,title:"Cancel Request",click:function(){if(!rpcHistory.anySelected()){isc.say("Please select an RPC to cancel");return}
var _26=rpcHistory.getSelectedRecords();for(var i=0;i<_26.length;i++){var _3=_26[i];if(_3.transaction){targetWindow.isc.RPCManager.cancelQueue(_3.transaction)}}}})],getShallowData:function(_44){if(isc.DS.isSimpleTypeValue(_44))return _44;var _27={};for(var _28 in _44){var _29=_44[_28];if(_29==null)continue;if(isc.DS.isSimpleTypeValue(_29)){_27[_28]=_29}else{_27[_28]={output:isc.echoLeaf(_29),$eu:function(){return this.output}}}}
return _27},setData:function(_19){if(_19==null){rawRequestViewer.setValue("raw",null);decodedRequestViewer.setValue("decoded",null);dsRequestViewer.setValue("dsRequest",null);return}
var _9=_19.rpcRequest;var _30=_9._dsRequest||_9.$374;if(_9.transport=="xmlHttpRequest"){rawRequestViewer.setValue("raw",_19.xhrData);var _31=["actionURL","showPrompt","prompt","transport","useSimpleHttp","promptStyle","timeout","params","httpMethod","contentType","httpHeaders","ignoreTimeout","sendNoQueue","paramsOnly","bypassCache","isProxied"];if(_19.type=="RPCRequest"){_31.addList(["callback","willHandleError","evalResult","evalVars","serverOutputAsString","containsCredentials","clientContext","internalClientContext"])}
_31.add("data");var _32=isc.applyMask(_19.rpcRequest,_31);decodedRequestViewer.setValue("decoded",isc.JSON.encode(_32,{prettyPrint:true,serializeInstances:"short"}))}
if(_30){var _31=["dataSource","operationType","operationId","componentId","data","startRow","endRow","sortBy","textMatchStyle","resultSet","resultTree","parentNode","callback","willHandleError","showPrompt","prompt","oldValues","requestId","clientContext","internalClientContext"];var _33=(_30.operation&&_30.operation.source=="auto");var _34={};for(var i=0;i<_31.length;i++){var _28=_31[i];if(_28=="operationId"&&_33)continue;var _29=_30[_28];if(_29==null)continue;if(_28=="parentNode"){_34[_28]=this.getShallowData(_29)}else if(_28=="clientContext"||_28=="internalClientContext"){var _27=_34[_28]={};for(var _35 in _29){_27[_35]=this.getShallowData(_29[_35])}}else{_34[_28]=_29}}
var _36=["originalData","operation","unconvertedDSRequest"];var _37=isc.getKeys(_30);for(var i=0;i<_37.length;i++){var _28=_37[i];if(_31.contains(_28))continue;if(_36.contains(_28))continue;var _29=_30[_28];if(_29==null)continue;if(!isc.DS.isSimpleTypeValue(_29)&&!isc.isAn.Instance(_29))continue;_34[_28]=_29}
if(this.getTab("dsRequestTab")==null){this.addTab({title:"DSRequest",ID:"dsRequestTab",pane:dsRequestViewer},2)}
if(this.getSelectedTab().ID!="timingTab"){this.selectTab(2)}
var _38=isc.JSON.encode(_34,{prettyPrint:true,strictQuoting:false,serializeInstances:"short",skipInternalProperties:true});dsRequestViewer.setValue("dsRequest",_38)}else if(this.getTab("dsRequestTab")!=null){var _39=this.getSelectedTab().ID=="dsRequestTab"
this.updateTab("dsRequestTab",null);this.removeTab("dsRequestTab");if(_39)this.delayCall("selectTab",[0])}}});isc.DynamicForm.create({ID:"rawResponseViewer",autoDraw:false,browserSpellCheck:false,overflow:"hidden",autoFocus:false,fields:[{name:"raw",showTitle:false,height:"*",width:"*",colSpan:"*",formItemType:"textArea"}],setValue:function(_44,_29){this.lastInboundValue=_29;if(!this.suppressAutoPrettyPrint&&responseViewer.autoPrettyPrintForm.getValue("autoPrettyPrint")){_29=responseViewer.prettyPrintJSON(_29);this.Super("setValue",[_44,_29],arguments)}else{this.Super("setValue",arguments)}},revertToLastValue:function(){if(!this.lastInboundValue)return;this.suppressAutoPrettyPrint=true;this.setValue("raw",this.lastInboundValue);this.suppressAutoPrettyPrint=false}});isc.TabSet.create({ID:"responseViewer",autoDraw:false,paneMargin:0,autoPrettyPrintFormDefaults:{_constructor:"DynamicForm",fields:[{name:"autoPrettyPrint",title:"Auto-format",type:"checkbox",defaultValue:true,changed:"form.creator.autoFormatChanged(value)"}]},autoFormatChanged:function(_29){if(_29){this.doPrettyPrint()}else{rawResponseViewer.revertToLastValue()}},doPrettyPrint:function(){var _29=rawResponseViewer.getValue("raw");rawResponseViewer.setValue("raw",this.prettyPrintJSON(_29))},prettyPrintJSON:function(_29){try{var _40=eval(_29);return isc.Comm.serialize(_40)}catch(e){return _29}},initWidget:function(){this.autoPrettyPrintForm=this.createAutoChild("autoPrettyPrintForm");this.tabBarControls=[this.autoPrettyPrintForm];this.tabs=[{title:"Raw Response",ID:"rawResponseTab",pane:rawResponseViewer}];this.Super("initWidget",arguments)},setData:function(_19){if(_19==null){rawResponseViewer.setValue("raw","");return}
var _9=_19.rpcRequest;var _10=_19.rpcResponse;if(!_10){rawResponseViewer.setValue("raw","[Transaction in Progress]");return}
if(_9.transport=="hiddenFrame"||_9.transport=="scriptInclude"){rawResponseViewer.setValue("raw",isc.echoFull(_19.transaction.results))}else if(_9.clientOnly){var _41=isc.JSON.encode(_10.clientOnlyData,{prettyPrint:true,strictQuoting:false,serializeInstances:"short",skipInternalProperties:true});rawResponseViewer.setValue("raw",_41)}else if(_9.transport=="xmlHttpRequest"){if(_19._queueIndex!=null){var _31=["operationId","transactionNum","httpResponseCode","transport","status","clientOnly","httpHeaders","isStructured","results","isDSResponse","invalidateCache","data","startRow","endRow","totalRows"];var _42=isc.applyMask(_10,_31);rawResponseViewer.setValue("raw",isc.echoFull(_42))}else{var _43=_10.xmlHttpRequest.responseText;_43=isc.RPCManager.$455(_43);rawResponseViewer.setValue("raw",_43)}}}});isc.DynamicForm.create({ID:"timingForm",autoDraw:false,autoFocus:false,width:100,numCols:2,colWidths:[1,1],fields:[{name:"serverSideTiming",title:"Track server-side timings",type:"boolean",colSpan:1,startRow:false,endRow:false,showTitle:false,defaultValue:isc.RPCTracker.shouldObserveTransactions(),itemHoverHTML:function(){return"Toggle server-side timing metrics.  Only applies to the SmartClient/Smart GWT Server.  The system might not be configured to allow this option."},changed:function(_44,_45,_29){isc.DMI.callBuiltin({methodName:"trackServerTimings",arguments:[_29],callback:function(_10,_46){}})}}]});isc.VLayout.create({ID:"rpcViewer",autoDraw:false,members:[rpcConfig,rpcHistory,isc.HLayout.create({members:[requestViewer,responseViewer]})]});if(isc.Log.logIsInfoEnabled("RpcTabTiming")){requestViewer.addTab({title:"Timing",ID:"timingTab",pane:rpcTimingDetail});requestViewer.tabBarControls.addAt(timingForm,0)}
mainTabset.updateTab("rpc",rpcViewer)}
function initWSDLPane(){if(window.schemaViewer)return;isc.SchemaViewer.create({ID:"schemaViewer",showTestUI:true,autoDraw:false});mainTabset.updateTab("wsdl",schemaViewer)}
function initSupportPane(){if(window.supportForm)return;isc.DynamicForm.create({ID:"supportForm",autoDraw:false,canSubmit:true,target:"_blank",action:"/tracking/supportTracking.jsp?addNew=true",numCols:4,items:[{name:"username",defaultValue:getLogCookieValue("username"),browserSpellCheck:false},{name:"password",defaultValue:getLogCookieValue("password"),type:"password"},{name:"summary",type:"textArea",width:"*",colSpan:"*"},{name:"sendLog",type:"checkbox",title:"Include Log contents",defaultValue:true,hint:"NOTE: Editable after login"},{name:"log",type:"hidden"},{name:"iscVersion",type:"hidden",defaultValue:targetWindow.isc.version},{type:"button",title:"Create Issue",click:"this.form.submitIssue()"}],submitIssue:function(){saveState();this.action="/tracking/supportTracking.jsp?addNew=true&username="+this.getValue("username")+"&password="+this.getValue("password");this.redraw();if(this.getValue("sendLog")){this.setValue("log","Contents of Log:<br>===================================<br>"+resultsForm.getValue("results").replace(/[\r\n]+/g,"<BR>"))}
this.submitForm()}});mainTabset.updateTab("support",supportForm)}
function initServerLogViewerPane(){if(window.serverLogViewer){serverLogViewer.refreshLogList();return}
isc.showPrompt("Loading ServerLogViewer Modules...");isc.FileLoader.loadModules("ServerLogViewer","serverLogViewerModulesLoaded()")}
function serverLogViewerModulesLoaded(){isc.clearPrompt();window.serverLogViewer=isc.ServerLogViewer.create({autoDraw:false,width:"100%",height:"100%",standaloneURL:"/tools/serverLogViewer.jsp",tabBarProperties:{baseLineCapSize:0},paneContainerProperties:{showEdges:false}});mainTabset.updateTab("serverLogs",serverLogViewer)}
var theTabs=[{ID:"results",title:"Results"},{ID:"watchTab",title:"Watch"},{ID:"rpc",title:"RPC"},{ID:"serverLogs",title:"Server Logs",prompt:"Requires SmartClient Server",showPrompt:!isc.hasOptionalModule("SCServer"),disabled:window.location.protocol=="file:"||!isc.hasOptionalModule("SCServer")},{ID:"xmlTools",title:"XML",prompt:"Requires SmartClient Server",showPrompt:!isc.hasOptionalModule("SCServer"),disabled:window.location.protocol=="file:"||!isc.hasOptionalModule("SCServer")},{ID:"wsdl",title:"WSDL"},{ID:"refDocs",width:100,title:"Reference Docs"}];isc.TabSet.create({ID:"mainTabset",height:"100%",width:"100%",paneMargin:0,paneContainerOverflow:"visible",paneContainerProperties:{customEdges:["T"]},tabBarProperties:{baseLineCapSize:0},tabs:theTabs,tabSelected:function(_1,_2,_3){if(_3=="watchTab"){initWatchPane()}else if(_3=="rpc"){initRPCPane()}else if(_3=="refDocs"){initDocsPane()}else if(_3=="xmlTools"){initXMLToolsPane()}else if(_3=="wsdl"){initWSDLPane()}else if(_3=="support"){initSupportPane()}else if(_3=="performance"){initPerformancePane()}else if(_3=="serverLogs"){initServerLogViewerPane()}},targetWindowChanged:function(){}});isc.Canvas.create({ID:"markerCanvas",contents:"<A NAME=marker>&nbsp;</A>",height:1,top:mainTabset.getBottom()})
isc.Page.setEvent('load','doOnload()');function doOnload(){initResultsTab();initializePage()}
function initializePage(){targetWindow.isc.Log.logViewer._logWindowLoaded=true;setSimpleView(window.showingInline);setupMessageArea();if(mainTabset.getSelectedTab().ID=="watchTab"){refreshWatchList()}else{window.$49b=true}
if(window.perfPane)window.perfPane.destroy();updateCommWatcher();staticForm.grabValues();if(targetWindow.isc.Browser.isSGWT){mainTabset.disableTab("refDocs")}}
function setSimpleView(_1){if(!!window.simpleView==!!_1)return;window.simpleView=_1;if(_1){simpleViewButton.select();staticForm.hide();resultsLayout.hideSection("evalServerScriptSection");resultsLayout.hideSection("evalXMLSection");resultsLayout.hideSection("literalInputSection")}else{simpleViewButton.deselect();staticForm.show();resultsLayout.showSection("evalServerScriptSection");resultsLayout.showSection("evalXMLSection");resultsLayout.showSection("literalInputSection")}}
function reconnectInspector(){var _1=window.inspector;if(_1&&_1.isVisible()){addToLog("reconnecting inspector to: "+window.$49f);inspectDOM(window.$49f)}}
isc.Page.setEvent('unload','unloadPage()');function unloadPage(){var _1=window.inspector;if(_1){window.$49f=(_1.isVisible()?_1.getRootElement().id:null);_1.setRootElement(null)}
if(!validOpener())return;targetWindow.isc.Log.logViewer._logWindowLoaded=false}
function setupMessageArea(_1){if(!_1)updateTargetObservation();var _2=targetWindow.isc.Log.getMessages().join('\r')+'\r';if(window.preserveMessages){var _3=resultsForm.getItem("results").getValue()||"";setResultsValue(_3+'\r'+_2)}else setResultsValue(_2)}
function updateTargetObservation(){if(!validOpener())return;var _1=targetWindow.isc.Log.logViewer;if(!_1.isObserving(targetWindow.isc.Log,"addToMasterLog")){_1.observe(targetWindow.isc.Log,"addToMasterLog","observer.addToLog(message)");_1.observe(targetWindow.isc.EventHandler,"getEventTargetCanvas","observer.displayEventTarget()");_1.observe(targetWindow.isc.EventHandler,"_focusInCanvas","observer.displayFocusTarget()");_1.observe(targetWindow.isc.EventHandler,"doHandleMouseDown","observer.displayMouseDownTarget()")}}
isc._nonDebugModules=(isc._nonDebugModules!=null?isc._nonDebugModules:[]);isc._nonDebugModules.push('DeveloperConsole');isc.checkForDebugAndNonDebugModules();isc._moduleEnd=isc._DeveloperConsole_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('DeveloperConsole module init time: '+(isc._moduleEnd-isc._moduleStart)+'ms','loadTime');delete isc.definingFramework;}else{if(window.isc&&isc.Log&&isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'DeveloperConsole'.");}

/*

  SmartClient Ajax RIA system
  Version v9.1p_2021-05-18/LGPL Development Only (2021-05-18)

  Copyright 2000 and beyond Isomorphic Software, Inc. All rights reserved.
  "SmartClient" is a trademark of Isomorphic Software, Inc.

  LICENSE NOTICE
     INSTALLATION OR USE OF THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF
     ISOMORPHIC SOFTWARE LICENSE TERMS. If you have received this file
     without an accompanying Isomorphic Software license file, please
     contact licensing@isomorphic.com for details. Unauthorized copying and
     use of this software is a violation of international copyright law.

  DEVELOPMENT ONLY - DO NOT DEPLOY
     This software is provided for evaluation, training, and development
     purposes only. It may include supplementary components that are not
     licensed for deployment. The separate DEPLOY package for this release
     contains SmartClient components that are licensed for deployment.

  PROPRIETARY & PROTECTED MATERIAL
     This software contains proprietary materials that are protected by
     contract and intellectual property law. You are expressly prohibited
     from attempting to reverse engineer this software or modify this
     software for human readability.

  CONTACT ISOMORPHIC
     For more information regarding license rights and restrictions, or to
     report possible license violations, please contact Isomorphic Software
     by email (licensing@isomorphic.com) or web (www.isomorphic.com).

*/

