(function(){ // register module paths to enabler and builder ibmConfig = ibmCfg.enablerConfig; dojo.registerModulePath("com.ibm.mm", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.enabler"] + "/js/com/ibm/mm"); dojo.registerModulePath("com.ibm.mashups", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.enabler"] + "/js/com/ibm/mashups"); dojo.registerModulePath("com.ibm.mm.builder", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.builder"] + "/js/com/ibm/mm/builder"); dojo.registerModulePath("com.ibm.mashups.builder", ibmCfg.enablerConfig["com.ibm.mashups.contextroot.builder"] + "/js/com/ibm/mashups/builder"); })();/** Licensed Materials - Property of IBM, 5724-U69, (C) Copyright IBM Corp. 2008, 2010 - All Rights reserved. **/ dojo.provide("com.ibm.mm.enabler.extreg");if(typeof (ExtensionRegistry)=="undefined"){this.ExtensionRegistry=function(_1){var _2=window;var _3={root:document.body,enabled:false,_queue:[],debug:function(_4){if(this.enabled){}},log:function(_5){if(this.enabled){}},_flushQueueIfNecessary:function(){var _6=(this._queue.length>0);while(this._queue.length>0){this.root.appendChild(this._queue.shift());}if(_6){this.log("----------------- END STMTS EXECUTED BEFORE ONLOAD ---------------");}}};var _7=function(_8){var _9=_8.split(".");var _a=null;var _b=window;var _c=null;for(var i=0;(i<_9.length&&_b);i++){_a=_b;_c=_9[i];_b=_a[_9[i]];}return [{object:_a,method:_c}];};if(!_1){_1=_7;}function forInLoop(_d,_e){for(var _f in _d){if(Object.prototype.hasOwnProperty.call(_d,_f)){_e(_f,_d[_f]);}}};function isArray(obj){return (obj&&obj.length&&typeof (obj.length)=="number");};function applyToObjectOrArray(obj,_10){if(isArray(obj)){for(var i=0;i<obj.length;i++){_10(obj[i]);}}else{_10(obj);}};function MethodDescriptor(obj,_11){this.method=_11;this.object=(obj.prototype&&obj.prototype[this.method])?obj.prototype:obj;this.originalValue=this.object[this.method];this.id=(this.object&&this.object.declaredClass)?this.object.declaredClass:this.originalValue.toString();};MethodDescriptor.prototype.getMethod=function(){return this.object[this.method];};MethodDescriptor.prototype.setMethod=function(_12){this.object[this.method]=_12;};MethodDescriptor.prototype.revert=function(){this.setMethod(this.originalValue);};MethodDescriptor.prototype.toString=function(){return "{ object: "+this.object+", method: "+this.method+", originalValue: "+(this.originalValue?this.originalValue.toString():this.originalValue)+", currentValue: "+this.getMethod().toString()+" }";};function ExtensionPointController(_13,_14){this.name=_13;this.fnDescriptor=_14;this.extensions={before:[],after:[]};};ExtensionPointController.prototype.addAroundAdvice=function(_15){var fn=this.fnDescriptor.getMethod();this.fnDescriptor.setMethod(function(){if(_3.enabled){_3.log("around advice entry ==> [ "+arguments+" ]");_3.log("handler to execute: "+_15.toString());_3.debug(_15);_3.log("next function in the chain (executor parameter): "+fn.toString());_3.debug(fn);}var me=this;var _16=_15.call(this,function(_17){return fn.apply(me,_17);},arguments);if(_3.enabled){_3.log("around advice exit ==> "+_16);}return _16;});};ExtensionPointController.prototype.execute=function(_18,_19){if(_3.enabled){_3.log("ExtensionPointController.execute entry ==> [ "+_18+", "+_19+" ] ");_3.debug(_18);_3.debug(_19);}function argumentsToArray(_1a){var arr=[];for(var i=0;i<_1a.length;i++){arr.push(_1a[i]);}return arr;};var _1b=null;if(_3.enabled){_3.log("Executing extensions for \""+this.name+"\"...");}var _1c=this.extensions;var _1d=this.fnDescriptor;function doExecution(_1e){if(_3.enabled){_3.log("doExecution entry ==> "+_1e);_3.debug(_1e);}if(_1e){_1e=argumentsToArray(_1e);}var _1f=null;var _20=_1d.getMethod();_1d.revert();var _21=_1c.before;if(_3.enabled){_3.log("Executing "+_21.length+" before advice extensions.");}for(var i=0;i<_21.length;i++){if(_3.enabled){_3.log("beforeAdvice["+i+"] = "+_21[i].toString());_3.debug(_21[i]);}_1e=_21[i].call(this,_1e);}if(_3.enabled){_3.log("Executing the original function: "+_1d.getMethod().toString());}_1f=_1d.getMethod().apply(this,_1e);var _22=_1c.after;if(_3.enabled){_3.log("Executing "+_22.length+" after advice extensions.");}if(_1e){for(var j=0;j<_22.length;j++){if(_3.enabled){_3.log("afterAdvice["+j+"] = "+_22[j].toString());_3.debug(_22[j]);_3.log("Return value: "+_1f);_3.debug(_1f);}_1f=_22[j].call(this,_1f,_1e);}}_1d.setMethod(_20);if(_3.enabled){_3.log("doExecution exit ==> "+_1f);}return _1f;};_1b=doExecution.apply(_18,[_19]);if(_3.enabled){_3.log("ExtensionPointController.execute exit ==> "+_1b);}return _1b;};if(!ExtensionRegistry.prototype.extensionPointControllers){ExtensionRegistry.prototype.extensionPointControllers={};}function getExtensionPointController(_23,_24){if(_3.enabled){_3.log("ExtensionRegistry.getExtensionPointController entry ==> [ "+_23+", "+_24+" ]");}var _25=ExtensionRegistry.prototype.extensionPointControllers[_23];if(!_25){_25={};ExtensionRegistry.prototype.extensionPointControllers[_23]=_25;}var _26=_25[_24.id];if(!_26){_26=new ExtensionPointController(_23,_24);ExtensionRegistry.prototype.extensionPointControllers[_23][_24.id]=_26;_24.setMethod(function(){if(_3.enabled){_3.log(_23+" entry ==> "+arguments);}var _27=_26.execute(this,arguments);if(_3.enabled){_3.log(_23+" exit ==> "+_27);}return _27;});}if(_3.enabled){_3.log("ExtensionRegistry.getExtensionPointController exit ==> "+_26);}return _26;};function processExtensionDefinition(_28,_29){if(_3.enabled){_3.log("processExtensionDefinition entry ==> [ "+_28+", "+_29+" ]");_3.log("Extension: "+_28+"; extension: { type: \""+_29.type+"\", handler: "+_29.handler+" }");}var _2a=_1(_28);_2a=_2a||null;if(_2a===null){_2a=_7(_28);}if(_3.enabled){_3.log("impls="+_2a);}for(var i=0;i<_2a.length;i++){var _2b=_2a[i];var md=new MethodDescriptor(_2b.object,_2b.method);if(md.originalValue){var _2c=getExtensionPointController(_28,md);if(_3.enabled){_3.log("Extension Point (after mapping function): "+md);}switch(_29.type){case "before":if(_3.enabled){_3.log("wrapping in a before extension");}_2c.extensions.before.push(_29.handler);break;case "after":if(_3.enabled){_3.log("wrapping in an after extension");}_2c.extensions.after.push(_29.handler);break;case "around":if(_3.enabled){_3.log("wrapping in an around extension");}_2c.addAroundAdvice(_29.handler);break;default:if(_3.enabled){_3.log("Unrecognized extension type: "+_29.type);}}}else{if(console&&console.log){console.log("WARNING! \""+_28+"\" does not exist! The provided extension will be ignored!");}}}if(_3.enabled){_3.log("processExtensionDefinition exit");}};function removeExtensionDefinition(_2d){if(_3.enabled){_3.log("removeExtensionDefinition entry ==> [ "+_2d+" ]");}var _2e=ExtensionRegistry.prototype.extensionPointControllers[_2d];forInLoop(_2e,function(_2f,_30){_30.fnDescriptor.revert();});delete ExtensionRegistry.prototype.extensionPointControllers[_2d];if(_3.enabled){_3.log("removeExtensionDefinition exit");}};this.process=function(_31){if(_3.enabled){_3.log("ExtensionRegistry.process entry ==>"+_31);}applyToObjectOrArray(_31,function(_32){forInLoop(_32,function(_33,_34){applyToObjectOrArray(_34,function(obj){processExtensionDefinition(_33,obj);});});});if(_3.enabled){_3.log("ExtensionRegistry.process exit");}};this.disconnect=function(_35){if(_3.enabled){_3.log("ExtensionRegistry.disconnect entry ==>"+_35);}removeExtensionDefinition(_35);if(_3.enabled){_3.log("ExtensionRegistry.disconnect exit");}};this.enableTracking=function(_36){var _37=new ImplementationTracker(true);var _38={"dojo.declare":{type:"before",handler:function(_39){_37.add(_39[0],_39[1]);return _39;}}};this.process(_38);var _3a=function(_3b){return _37.getImpls(_3b);};dojo.addOnLoad(function(){if(_36&&_36.extensions&&_36.extensions.length>0){var _3c={};function forInLoop(obj,_3d){for(var _3e in obj){if(obj.hasOwnProperty(_3e)){_3d(_3e,obj[_3e]);}}};for(var i=0;i<_36.extensions.length;i++){forInLoop(_36.extensions[i],function(_3f,_40){_3c[_3f]=_40;});}var _41=new ExtensionRegistry(_3a);_41.process(_36.extensions);}});};this.disableTracking=function(){this.disconnect("dojo.declare");};};}if(typeof ImplementationTracker=="undefined"){this.ImplementationTracker=function(_42){var _43={enabled:false,log:function(msg){if(this.enabled){}},debug:function(obj){if(this.enabled){}}};function forInLoop(obj,_44){for(var _45 in obj){if(Object.prototype.hasOwnProperty.call(obj,_45)){_44(_45,obj[_45]);}}};function getMethodImpl(_46){var _47=_46.split(".");var _48=null;var _49=window;var _4a=null;for(var i=0,l=_47.length;(i<l&&_49);i++){_48=_49;_4a=_47[i];_49=_48[_47[i]];}return {object:_48,method:_4a};};var _4b={};function ObjectInfo(_4c){this.className=_4c;this.parents=[];this.implementors=[];};ImplementationTracker.prototype.dumpObjects=function(){if(_43.enabled){forInLoop(_4b,function(_4d,_4e){var _4f="\""+_4d+"\" : [ ";for(var i=0,l=_4e.implementors.length;i<l;i++){_4f+=_4e.implementors[i].className;if(i!=(l-1)){_4f+=", ";}}_4f+=" ];";_43.log(_4f);});}};function processAncestors(_50,_51){if(_50){var len=_50.length,_52;for(var i=0;i<len;i++){_52=_4b[_50[i]];if(_52){_52.implementors.push(_51);}processAncestors(_50[i].parents,_51);}}};ImplementationTracker.prototype.add=function(_53,_54){if(_43.enabled){_43.log("ImplementationTracker.add entry ==> "+[_53,_54]);}if(!_4b[_53]){if(_54&&typeof _54=="function"){_54=[_54];}var _55=new ObjectInfo(_53);_4b[_53]=_55;for(var i=0,l=_54?_54.length:0;i<l;i++){if(_54[i].prototype){var _56=_54[i].prototype.declaredClass;_55.parents.push(_56);var _57=_4b[_56];if(_43.enabled){_43.log("Processing parent classname: "+_56);_43.log("parent exists in object store? "+_57);}if(_57){_57.implementors.push(_55);if(_42){processAncestors(_57.parents,_55);}}else{_57=new ObjectInfo(_56);_57.implementors.push(_55);}}}}if(_43.enabled){_43.log("ImplementationTracker.add exit");}};ImplementationTracker.prototype.getImpls=function(_58){if(_43.enabled){_43.log("ImplementationTracker.getImpls entry ==> "+_58);}var _59=_58.substring(0,_58.lastIndexOf("."));var _5a=_58.substring(_58.lastIndexOf(".")+1);if(_43.enabled){_43.log("className = "+_59+"; methodName = "+_5a);}var _5b=getMethodImpl(_58);_5b=_5b||null;if(!_4b[_59]||_5b===null){if(_43.enabled){_43.log("ImplementationTracker.getImpls exit ==> null ");}return null;}var _5c=_4b[_59].implementors;if(_43.enabled){_43.log("impls = "+_5c);}var _5d=[];for(var i=0,l=_5c.length;i<l;i++){if(_43.enabled){_43.log("impls[i]="+_5c[i].className);}_5b=getMethodImpl(_5c[i].className+"."+_5a);_5b=_5b||null;if(_5b!==null){_5d.push(_5b);}}if(_43.enabled){_43.log("ImplementationTracker.getImpls exit ==> "+_5d);}return _5d;};};}(function() { var implTracker = new ImplementationTracker(true); var DojoExtensions = { "dojo.declare": { type: "before", handler: function ( fnArgs ) { implTracker.add( fnArgs[0], fnArgs[1] ); return fnArgs; } } }; var registry = new ExtensionRegistry(); registry.process( DojoExtensions ); ibmConfig.mappingFunction = function ( name ) { return implTracker.getImpls( name ); }; })();dojo.provide("com.ibm.mm.enabler.nls.enabler_en");dojo.provide("com.ibm.mm.enabler.nls.modelMessages");com.ibm.mm.enabler.nls.modelMessages._built=true;dojo.provide("com.ibm.mm.enabler.nls.modelMessages.en");com.ibm.mm.enabler.nls.modelMessages.en={"E_COMNODE_NOTFOUND_1":"BMWMF0011E: The following node cannot be found: ${0}.","E_WIDGETDEF_MUST_BE_IDENTIFIABLE_0":"BMWMF0018E: The widget definition cannot be identified.","E_INVALID_PARAM_TYPE_0":"BMWMF0021E: The parameter ${num} is invalid. The value must be of type ${type}.","E_LAYOUTNODE_NEXT_CAN_NOT_BE_ITSELF_0":"BMWMF0027E: The inserted node can not be inserted next to itself.","E_LAYOUTNODE_NOTFOUND_1":"BMWMF0015E: The following layout node cannot be found: ${0}.","E_INVALID_DOCUMENT_0":"BMWMF0022E: The document cannot be null.","E_XHR_REQUEST_FAILED_2":"BMWMF0025E: The server failed to respond to the HTTP request. The request returned with status '${0}' and response data '${1}'.","E_PARAM_ISNULL_0":"BMWMF0014E: The parameter value cannot be null.","E_PARAM_IS_SMALLER_ZERO_0":"BMWMF0016E: Parameter values must be greater than or equal to zero.","E_PARAM_ISNULL_OR_UNDEFINED_3":"BMWMF0024E: The parameter '${0}' in function '${1}.${2}' cannot be null or undefined.","E_INVALID_CONTEXT_MISSING_TYPE_0":"BMWMF0019E: The context must contain a type.","E_INVALID_CONTEXT_SPECIFIED_0":"BMWMF0017E: The widget context is undefined.","E_CATNODE_NOTFOUND_1":"BMWMF0010E: The following catalog entry cannot be found: ${0}.","E_NODE_NOTFOUND_1":"BMWMF0004E: The system cannot find the following node: ${0}.","E_NODE_ISNULL_0":"BMWMF0001E: An error occurred because the node is null.","E_INVALID_XPATH_EXPR_0":"BMWMF0023E: The XPath expression cannot be empty.","E_ELEMENT_NOT_FOUND_2":"BMWMF0013E: Element ${0} cannot be found in ${1}.","E_INVALID_PARAM_COUNT_0":"BMWMF0020E: The number of parameters is not valid.","E_UNSUPPORTED_OP_0":"BMWMF0003E: This operation is not supported.","E_OBJECT_DISPOSED_0":"BMWMF0026E: The object has been disposed.","E_CCATNODE_NOTFOUND_1":"BMWMF0012E: The following catalog category cannot be found: ${0}.","E_WIDGET_NOTFOUND_1":"BMWMF0002E: The following widget could not be loaded: ${0}."};dojo.provide("com.ibm.mm.data.nls.dataTypeStrings");com.ibm.mm.data.nls.dataTypeStrings._built=true;dojo.provide("com.ibm.mm.data.nls.dataTypeStrings.en");com.ibm.mm.data.nls.dataTypeStrings.en={"countrycode":"Country Code","languagecode":"Language Code","date":"Date","boolean":"Boolean","json":"JSON","table":"Table","rss":"RSS","email":"E-mail","image":"Image","any":"Any Data","text":"Text","html":"HTML","modeldata":"Model Data","time":"Time","phone":"Phone","url":"URL","currency":"Currency","address":"Address","postalcode":"Postal Code","xml":"XML","timestamp":"Timestamp","person":"Person","number":"Number","atom":"Atom"};dojo.provide("com.ibm.mm.enabler.nls.iwStr");com.ibm.mm.enabler.nls.iwStr._built=true;dojo.provide("com.ibm.mm.enabler.nls.iwStr.en");com.ibm.mm.enabler.nls.iwStr.en={"I_NO_PREVIEW_SUPPORT_0":"BMWIS0001I: This item does not support preview.","ALL_AUTH":"All Authenticated Users","LOAD":"Loading.....","I_ONEUI_INFORMATION_0":"Information","I_ONEUI_INFORMATION_1":"Information:","WIDGET_NOT_INSTALLED":"Widget Not Available","ERROR":"Error","WARNING":"Warning","ANON":"Anonymous","INFO":"Info","WIDGET_NOT_INSTALLED_SUB":"This widget is not enabled or is not available for use."};dojo.provide("com.ibm.mm.enabler.nls.iwMessages");com.ibm.mm.enabler.nls.iwMessages._built=true;dojo.provide("com.ibm.mm.enabler.nls.iwMessages.en");com.ibm.mm.enabler.nls.iwMessages.en={"E_WIDGET_DISPLAY_FAIL_2":"BMWIW0006E: The widget ${0} cannot display correctly. Error details: ${1}.","W_STANDALONECLASS_MISSING_1":"BMWIW0013W: The widget ${0} is missing the iw-Standalone class.","E_IWIDGETDEF_NOTAVAILABLE_1":"BMWIW0001E: The ${0} widget is unavailable. Check your network connection, or contact your administrator to confirm that the widget is still available on the requested server.","W_API_DEPRECATED_1":"BMWIW0008W: The method used is no longer supported. Use ${0} instead.","E_NODISPLAY_UNSECUREWIDGET_1":"BMWIW0010E: The nontrusted widget ${0} could not be displayed.","E_RESOURCE_LOAD_FAIL_2":"BMWIW0011E: The resource ${0} : ${1} could not be loaded.","E_SUBDOMAIN_NOTAVAILABLE_2":"BMWIW0003E: The nontrusted widget ${0} could not be loaded because the number of subdomains has exceeded its limit of ${1}. Mark another widget on the page as trusted to make another subdomain available.","E_SUBDOMAIN_NOTAVAILABLE1_2":"BMWIW0009E: The nontrusted widget ${0} could not be loaded because the number of subdomains has exceeded its limit of ${1}.","E_WIDGET_EVENT_FAIL_3":"BMWIW0007E: The system is unable to handle event ${0} for widget ${1} . Error details: ${2}.","E_WIDGETS_UNLOAD_FAIL_1":"BMWIW0004E: The widgets did not load correctly because the browser window is not completely refreshed. Error details: ${0}.","W_DEPRECATE_2":"BMWIW0012W: The function: ${0} has been deprecated. Use ${1} instead.","E_WIDGET_UNLOAD_FAIL_2":"BMWIW0005E: The widget ${0} did not load correctly. Error details: ${1}.","E_IWIDGETDEF_CONTENTNOTAVAILABLE_1":"BMWIW0002E: The system is unable to find the content for the following mode: ${0}.","E_WIDGET_INCORRECTCONFIG_1":"BMWIW0014E: The widget ${0} is not configured correctly."};/** Licensed Materials - Property of IBM, 5724-U69, (C) Copyright IBM Corp. 2008, 2010 - All Rights reserved. **/ dojo.provide("com.ibm.mm.enabler.portal");dojo.i18n._preloadLocalizations("com.ibm.mm.enabler.nls.enabler",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hr","hu","it","it-it","ja","ja-jp","kk","ko","ko-kr","nb","nl","nl-be","nl-nl","no","pl","pt","pt-br","pt-pt","ro","ro-ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-cn","zh-tw"]);(function(){var _1="3.0.0.20121130-1853".split(".");var _2="enabler";var _3="3.0.0.1-CF3";if(_2){_2="_"+_2;}if(_1.length==4){dojo.setObject("com.ibm.mashups.enabler.version",{major:_1[0],minor:_1[1],patch:_1[2],"projectName":_3,"flag":_2,revision:_1[3],toString:function(){return this.major+"."+this.minor+"."+this.patch+(this.flag||"")+" ("+this.revision+")"+(this.projectName?"["+this.projectName+"]":"");}});}})();if(!dojo._hasResource["com.ibm.mashups.enabler.Deferred_API"]){dojo._hasResource["com.ibm.mashups.enabler.Deferred_API"]=true;dojo.provide("com.ibm.mashups.enabler.Deferred_API");dojo.provide("com.ibm.mashups.enabler.Deferred");dojo.declare("com.ibm.mashups.enabler.Deferred",null,{setFinishedCallback:function(_4,_5,_6){},start:function(_7){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.LogLevel"]){dojo._hasResource["com.ibm.mashups.enabler.logging.LogLevel"]=true;dojo.provide("com.ibm.mashups.enabler.logging.LogLevel");dojo.declare("com.ibm.mashups.enabler.logging.LogLevel",null,{TRACE:500,INFO:800,WARNING:900,SEVERE:1000});com.ibm.mashups.enabler.logging.LogLevel=new com.ibm.mashups.enabler.logging.LogLevel();}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.LogHandler"]){dojo._hasResource["com.ibm.mashups.enabler.logging.LogHandler"]=true;dojo.provide("com.ibm.mashups.enabler.logging.LogHandler");dojo.require("com.ibm.mashups.enabler.logging.LogLevel");dojo.declare("com.ibm.mashups.enabler.logging.LogHandler",null,{constructor:function(){},getHandlerID:function(){return null;},getLogLevel:function(){return null;},log:function(_8,_9,_a,_b){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.Logger_API"]){dojo._hasResource["com.ibm.mashups.enabler.logging.Logger_API"]=true;dojo.provide("com.ibm.mashups.enabler.logging.Logger_API");dojo.provide("com.ibm.mashups.enabler.logging.Logger");dojo.require("com.ibm.mashups.enabler.logging.LogLevel");dojo.declare("com.ibm.mashups.enabler.logging.Logger",null,{constructor:function(){},getLogger:function(_c){return null;},addHandler:function(_d){},removeHandler:function(_e){},entering:function(_f,_10){},exiting:function(_11,_12){},info:function(_13,_14,_15){},warning:function(_16,_17,_18){},severe:function(_19,_1a,_1b){},trace:function(_1c,_1d,_1e){},log:function(_1f,_20,_21,_22){},isLoggable:function(_23){return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.logging.ConsoleHandler"]){dojo._hasResource["com.ibm.mm.enabler.logging.ConsoleHandler"]=true;dojo.provide("com.ibm.mm.enabler.logging.ConsoleHandler");dojo.declare("com.ibm.mm.enabler.logging.ConsoleHandler",[com.ibm.mashups.enabler.logging.LogHandler],{constructor:function(){this.handlerID="com.ibm.mm.enabler.logging.ConsoleHandler";this.logLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},getHandlerID:function(){return this.handlerID;},getLogLevel:function(){return this.logLevel;},log:function(_24,_25,_26,_27){if(_25==com.ibm.mashups.enabler.logging.LogLevel.SEVERE){console.error(_24+" "+_26+": "+_27);}else{if(_25==com.ibm.mashups.enabler.logging.LogLevel.WARNING){console.warn(_24+" "+_26+": "+_27);}else{if(_25==com.ibm.mashups.enabler.logging.LogLevel.INFO){console.info(_24+" "+_26+": "+_27);}else{if(_25==com.ibm.mashups.enabler.logging.LogLevel.TRACE){console.debug(_24+" "+_26+": "+_27);}}}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.logging.LoggerImpl"]){dojo._hasResource["com.ibm.mm.enabler.logging.LoggerImpl"]=true;dojo.provide("com.ibm.mm.enabler.logging.LoggerImpl");dojo.declare("com.ibm.mm.enabler.logging.LoggerImpl",[com.ibm.mashups.enabler.logging.Logger],{BASE_TOPIC:"com.ibm.mm.enabler.logging.",constructor:function(_28,_29){this.loggers={};this.handlers={};this.name=_28?_28:null;this.parentLogger=_29?_29:null;if(!this.parentLogger){if(ibmConfig&&ibmConfig.traceConfig){this._setTraceConfig(ibmConfig.traceConfig);}else{this._setTraceConfig();}}},getLogger:function(_2a){if(this.parentLogger){return this.parentLogger.getLogger(_2a);}if(!this.loggers[_2a]){this.loggers[_2a]=new com.ibm.mm.enabler.logging.LoggerImpl(_2a,this);}return this.loggers[_2a];},addHandler:function(_2b){if(this.parentLogger){return this.parentLogger.addHandler(_2b);}this.handlers[_2b.handlerID]={};var _2c=this.handlers[_2b.handlerID];_2c.handler=_2b;var _2d=_2b.getLogLevel();var _2e="log";_2c.severeHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.SEVERE,_2b,_2e);if(_2d<=com.ibm.mashups.enabler.logging.LogLevel.WARNING){_2c.warningHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.WARNING,_2b,_2e);}if(_2d<=com.ibm.mashups.enabler.logging.LogLevel.INFO){_2c.infoHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.INFO,_2b,_2e);}if(_2d<=com.ibm.mashups.enabler.logging.LogLevel.TRACE){_2c.traceHandle=dojo.subscribe(this.BASE_TOPIC+com.ibm.mashups.enabler.logging.LogLevel.TRACE,_2b,_2e);}},removeHandler:function(_2f){var _30;var _31;if(dojo.isString(_2f)){if(!_2f in this.handlers){return;}_30=this.handlers[_2f];_31=_2f;}else{if(dojo.isObject(_2f)){_30=this.handlers[_2f.getHandlerID()];_31=_2f.getHandlerID();}else{return;}}if(_30){if(_30.severeHandle){dojo.unsubscribe(_30.severeHandle);}if(_30.warningHandle){dojo.unsubscribe(_30.warningHandle);}if(_30.infoHandle){dojo.unsubscribe(_30.infoHandle);}if(_30.traceHandle){dojo.unsubscribe(_30.traceHandle);}if(_30.handler){delete _30.handler;}}delete this.handlers[_31];},entering:function(_32,_33){var _34=com.ibm.mashups.enabler.logging.LogLevel.TRACE;if(this.isLoggable(_34)){var msg=this._getMessageString(_33);this._log(this.name,_34,_32,"ENTRY"+(msg?" "+msg:""));}},exiting:function(_35,_36){var _37=com.ibm.mashups.enabler.logging.LogLevel.TRACE;if(this.isLoggable(_37)){var msg=this._getMessageString(_36);this._log(this.name,_37,_35,"RETURN"+(msg?" "+msg:""));}},info:function(_38,_39,_3a){var _3b=com.ibm.mashups.enabler.logging.LogLevel.INFO;this.log(_3b,_38,_39,_3a);},warning:function(_3c,_3d,_3e){var _3f=com.ibm.mashups.enabler.logging.LogLevel.WARNING;this.log(_3f,_3c,_3d,_3e);},severe:function(_40,_41,_42){var _43=com.ibm.mashups.enabler.logging.LogLevel.SEVERE;this.log(_43,_40,_41,_42);},trace:function(_44,_45,_46){var _47=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.log(_47,_44,_45,_46);},log:function(_48,_49,_4a,_4b){if(!this.parentLogger){this._log("com.ibm.mashups.enabler.logging.Logger",com.ibm.mashups.enabler.logging.LogLevel.WARNING,"{log|info|warning|severe|trace|entering|exiting}","You must not use the RootLogger (com.ibm.mashups.enabler.logging.Logger). Create your own logger for each class.");}if(this.isLoggable(_48)){this._log(this.name,_48,_49,_4a,_4b);}},isLoggable:function(_4c){if(_4c!=com.ibm.mashups.enabler.logging.LogLevel.TRACE){return true;}if(!(ibmConfig&&ibmConfig.isDebug)){return false;}var _4d=this._getRegExp();if(_4d&&_4d.exec(this.name)){return true;}return false;},_log:function(_4e,_4f,_50,_51,_52){if((_52&&!dojo.isArray(_52))||_52===false){_52=[_52];}var _53=_52?dojo.string.substitute(_51.toString(),_52):_51;dojo.publish(this.BASE_TOPIC+_4f,[_4e,_4f,_50,_53]);},_getMessageString:function(_54){var _55=0;var msg="";if(_54||_54===false){msg+="[ ";if(dojo.isArray(_54)){for(var i=0;i<_54.length;++i){var arg=_54[i];if(msg.length>2){msg+=", ";}if(typeof arg=="undefined"){msg+="undefined";}if(arg&&arg.toString){msg+=arg.toString();}else{if(arg===null){msg+="null";}else{msg+="n/a";}}}}else{if(_54&&_54.toString){msg+=_54.toString();}else{if(_54===null){msg+="null";}else{msg+="n/a";}}}msg+=" ]";}return msg;},_setTraceConfig:function(_56){if(dojo.isString(_56)&&_56.length>0&&_56=="*"){this._log("RootLogger",com.ibm.mashups.enabler.logging.LogLevel.TRACE,"_setTraceConfig","Invalid traceConfig specified: *");}else{if((dojo.isArray(_56)||dojo.isString(_56))&&_56.length>0){this._log("RootLogger",com.ibm.mashups.enabler.logging.LogLevel.TRACE,"_setTraceConfig","Changing traceConfig: "+_56);var _57=dojo.isArray(_56)?_56.join("|"):_56;if(_57.length>0){this.regExp=new RegExp(_57);return;}}}this.regExp=null;},_disableTraceConfig:function(){this.regExp=null;},_getRegExp:function(){if(this.parentLogger){return this.parentLogger._getRegExp();}return this.regExp;}});com.ibm.mashups.enabler.logging.Logger=new com.ibm.mm.enabler.logging.LoggerImpl();com.ibm.mashups.enabler.logging.Logger.addHandler(new com.ibm.mm.enabler.logging.ConsoleHandler());}if(!dojo._hasResource["com.ibm.mashups.enabler.logging.Logger"]){dojo._hasResource["com.ibm.mashups.enabler.logging.Logger"]=true;dojo.provide("com.ibm.mashups.enabler.logging.Logger");}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredImpl"]){dojo._hasResource["com.ibm.mm.enabler.DeferredImpl"]=true;dojo.provide("com.ibm.mm.enabler.DeferredImpl");dojo.declare("com.ibm.mm.enabler.DeferredImpl",[com.ibm.mashups.enabler.Deferred],{_chainedDeferred:null,_sync:false,_previous:null,constructor:function(_58,_59,_5a){this.context=_58;this.startfn=_59;this.params=_5a;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},addErrorCallback:function(_5b,_5c){dojo.deprecated("com.ibm.mashups.enabler.Deferred.addErrorCallback()","use com.ibm.mashups.enabler.Deferred.setFinishedCallback() instead");this.errorCallback=_5b;this.errorCallbackParameters=_5c;},addFinishedCallback:function(_5d,_5e){dojo.deprecated("com.ibm.mashups.enabler.Deferred.addFinishedCallback()","use com.ibm.mashups.enabler.Deferred.setFinishedCallback() instead");this.finishedCallback=_5d;this.finishedCallbackParameters=_5e;},setFinishedCallback:function(_5f,_60,_61){if(_61===true){this._isVerboseFinish=true;}this.finishedCallback2=_5f;this.finishedCallbackParameters2=_60;return this;},start:function(_62,_63){this._sync=(_62||typeof (_62)=="undefined");var ret=null;if(dojo.isFunction(this.startfn)){ret=dojo.hitch(this.context||null,this.startfn)(this,this._sync,this.params,_63||null);}return ret;},getFinishedCallback:function(){return this.finishedCallback2;},getFinishedCallbackParameters:function(){return this.finishedCallbackParameters2;},setChainedDeferred:function(_64){this._chainedDeferred=_64;},getChainedDeferred:function(){return this._chainedDeferred;},getPrevious:function(){return this._previous;},_setPreviousDeferred:function(_65,_66,_67){this._previous={deferred:_65,result:_66,status:_67};},removeChainedDeferred:function(){this._chainedDeferred=null;},finish:function(_68,_69,_6a){try{if(dojo.isFunction(this.getFinishedCallback())){if(this._isVerboseFinish){var _6b={resource:_68,parameter:this.getFinishedCallbackParameters()};_6b.statusCode=_69;if(this._verboseOperationResults){_6b.operations=this._verboseOperationResults||[];}else{_6b.request=_6a||{statusCode:_69};}dojo.partial(this.getFinishedCallback())(_6b);}else{dojo.partial(this.getFinishedCallback())(_68,_69,this.getFinishedCallbackParameters());}}else{if(dojo.isFunction(this.finishedCallback)&&(""+_69).indexOf("2")===0){dojo.partial(this.finishedCallback)(_68,this.finishedCallbackParameters);}else{if(dojo.isFunction(this.errorCallback)&&_69>=400){dojo.partial(this.errorCallback)(_68,this.errorCallbackParameters);}}}}catch(e){this.LOGGER.warning("finish","Callback failed to execute; skipping. Reason: "+e.message);}if(this._chainedDeferred){this._chainedDeferred._setPreviousDeferred(this,_68,_69);this._chainedDeferred.start(this._sync);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Deferred"]){dojo._hasResource["com.ibm.mashups.enabler.Deferred"]=true;dojo.provide("com.ibm.mashups.enabler.Deferred");}if(!dojo._hasResource["com.ibm.mashups.enabler.context.LocalizedContext_API"]){dojo._hasResource["com.ibm.mashups.enabler.context.LocalizedContext_API"]=true;dojo.provide("com.ibm.mashups.enabler.context.LocalizedContext_API");dojo.provide("com.ibm.mashups.enabler.context.LocalizedContext");dojo.declare("com.ibm.mashups.enabler.context.LocalizedContext",null,{getPreferredLocale:function(){},getDefaultLocale:function(){},getLocale:function(_6c){},getDisplayLocale:function(_6d){},getTitle:function(_6e){},getDescription:function(_6f){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.xml.XPath_API"]){dojo._hasResource["com.ibm.mashups.enabler.xml.XPath_API"]=true;dojo.provide("com.ibm.mashups.enabler.xml.XPath_API");dojo.provide("com.ibm.mashups.enabler.xml.XPath");dojo.declare("com.ibm.mashups.enabler.xml.XPath",null,{evaluateXPath:function(_70,doc,_71){},evaluateEntry:function(_72,doc,_73){},evaluateBoolean:function(_74,doc,_75){},evaluateString:function(_76,doc,_77){},evaluateNumber:function(_78,doc,_79){}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Dom"]){dojo._hasResource["com.ibm.mm.enabler.utils.Dom"]=true;dojo.provide("com.ibm.mm.enabler.utils.Dom");com.ibm.mm.enabler.utils.Dom={getAttributeWithNS:function(_7a,_7b,_7c,_7d){if(!_7a){return null;}if(!_7b){return null;}if(!_7c){return null;}if(!_7d){return null;}var _7e=null;if(dojo.isIE){_7e=_7a.getAttribute(_7b);if(_7e===null||_7e==""){var _7f=_7a.attributes;for(var i=_7f.length;i>0;i--){if(_7f[i-1].baseName==_7c&&_7f[i-1].namespaceURI==_7d){_7e=_7f[i-1].value;break;}}}}else{_7e=_7a.getAttributeNS(_7d,_7c);}return _7e;},setAttributeWithNS:function(dom,_80,_81,_82,_83,_84){if(!dojo.isObject(_80)){throw new Error("element must be a DOMNode");}if(dojo.isIE){var _85=dom.createNode(2,_81,_83);if(_84===null||_84===undefined){_84="";}_85.nodeValue=_84;_80.setAttributeNode(_85);}else{_80.setAttributeNS(_83,_81,_84);}},textContent:function(_86,_87){if(!_86){return "";}if(arguments.length>1){var doc=_86.ownerDocument;var _88=doc.createTextNode(_87||"");com.ibm.mm.enabler.utils.Dom.replaceChildren(_86,_88);return;}else{var tc=dojox.xml.parser.textContent(_86);if(tc){return tc;}return dojo.map(_86.childNodes||[],function(_89){return (_89.nodeType>0&&_89.nodeType<4)?_89.nodeValue:"";}).join("");}},createElement:function(dom,_8a,ns){var _8b;if(dojo.isIE){if(ns){_8b=dom.createNode(1,_8a,ns);}else{_8b=dom.createElement(_8a);}}else{_8b=dom.createElementNS(ns,_8a);}return _8b;},destroyNode:function(_8c){var _8d=dojo.byId("IELeakGarbageBin");if(!_8d){_8d=dojo.create("div",{id:"IELeakGarbageBin",style:{display:"none"}},dojo.body());}dojo.place(_8c,_8d);dojo.attr(_8d,"innerHTML","");if(_8c.nodeType!=3){if(dojo.isIE){dojo.attr(_8c,"outerHTML","");}}},createDocument:function(_8e,_8f){if(dojo.isIE>=9&&typeof ActiveXObject!="undefined"){var _90=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.3.0"];for(var i=0;i<_90.length;i++){try{oXml=new ActiveXObject(_90[i]);if(oXml){break;}}catch(e){if(i==_90.length){console.warn("Error creating Msxml.DOMDocument; reason: ",e);}}}oXml.async=false;if(_8e){oXml.loadXML(_8e);if(oXml.parseError.errorCode!=0){var _91=oXml.parseError;console.warn("Error parsing XML data. Reason: '"+_91.reason+"'; data: '"+_8e+"'.");}}return oXml;}else{return dojox.xml.parser.parse(_8e,_8f);}},replaceChildren:function(_92,_93){return dojox.xml.parser.replaceChildren(_92,_93);},innerXML:function(_94){return _94?dojox.xml.parser.innerXML(_94):null;},removeChildren:function(_95){return dojox.xml.parser.removeChildren(_95);},copyChildren:function(_96,_97,_98){var _99=_96.cloneNode(true);return this.moveChildren(_99,_97,_98);},moveChildren:function(_9a,_9b,_9c){var _9d=0;if(_9c){while(_9a.hasChildNodes()&&_9a.firstChild.nodeType==3){_9a.removeChild(_9a.firstChild);}while(_9a.hasChildNodes()&&_9a.lastChild.nodeType==3){_9a.removeChild(_9a.lastChild);}}while(_9a.hasChildNodes()){_9b.appendChild(_9a.firstChild);_9d++;}return _9d;},getLocalName:function(_9e){if(!_9e){return null;}switch(_9e.nodeType){case 3:return "#text";case 1:return _9e.localName||com.ibm.mm.enabler.utils.Dom.removeNodeNS(_9e.nodeName);}return null;},getNodeNSPrefix:function(_9f){var tN=""+_9f;var _a0=tN.indexOf(":");return (_a0!=-1)?tN.substring(0,_a0):null;},removeNodeNS:function(_a1){var tN=""+_a1;var _a2=tN.indexOf(":");return (_a2!=-1)?tN.substring(1+_a2):_a1;},lookupNamespaceURI:function(_a3,_a4){if(!dojo.isIE){return _a3.lookupNamespaceURI(_a4);}var _a5=_a3;while(_a5&&_a5.nodeType!=9){var _a6=_a5.getAttribute("xmlns:"+_a4);if(_a6){return _a6;}_a5=_a5.parentNode;}return null;}};}if(!dojo._hasResource["com.ibm.mm.enabler.xml.xpath._Generic"]){dojo._hasResource["com.ibm.mm.enabler.xml.xpath._Generic"]=true;dojo.provide("com.ibm.mm.enabler.xml.xpath._Generic");dojo.declare("com.ibm.mm.enabler.xml.xpath._Generic",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.xml.xpath._Generic");},_evaluateXPath:function(_a7,doc,_a8){if(dojo.isSafari){return this._safariEvaluateXPath(_a7,doc,_a8);}else{if(dojo.isIE){return this._ieEvaluateXPath(_a7,doc,_a8);}else{return this._geckoEvaluateXPath(_a7,doc,_a8);}}},_transformNode:function(_a9,_aa){if(typeof XPathResult!="undefined"&&_a9 instanceof XPathResult){return this._xpathResultValue(_a9,_aa);}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _a9;}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE){return parseFloat(com.ibm.mm.enabler.utils.Dom.textContent(_a9));}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE){return com.ibm.mm.enabler.utils.Dom.textContent(_a9);}else{if(_aa==com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE){return !!_a9;}}}}}return null;},_xpathResultValue:function(_ab,_ac){if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _ab;}else{if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE){return _ab.numberValue;}else{if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE){return _ab.stringValue;}else{if(_ac==com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE){return _ab.booleanValue;}}}}return null;},_evaluateXPathSingle:function(_ad,doc,_ae,_af){_af=_af||com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE;var _b0;if(dojo.isSafari){_b0=this._safariEvaluateXPathRaw(_ad,doc,_ae,_af);if(XPathResult&&_b0 instanceof XPathResult){if(_af==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _b0.iterateNext();}return this._transformNode(_b0,_af);}else{if(_b0){return this._transformNode(_b0[0],_af);}}}else{if(dojo.isIE){_b0=this._ieEvaluateXPathRawSingle(_ad,doc,_ae);if(_b0||_b0===null){return this._transformNode(_b0,_af);}}else{_b0=this._geckoEvaluateXPathRaw(_ad,doc,_ae,_af);if(_b0&&_af==com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE){return _b0.iterateNext();}else{return this._transformNode(_b0,_af);}}}return _b0||null;},_geckoEvaluateXPath:function(_b1,doc,_b2){var _b3=this._geckoEvaluateXPathRaw(_b1,doc,_b2,com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE);var _b4=[];if(_b3){var _b5;while((_b5=_b3.iterateNext())){_b4.push(_b5);}}return _b4;},_geckoEvaluateXPathRaw:function(_b6,doc,_b7,_b8){var _b9=doc;if(doc.nodeType!=9){_b9=doc.ownerDocument;}return _b9.evaluate(_b6,doc,function(_ba){return _b7[_ba]?_b7[_ba].toString():null;},_b8,null);},_ieEvaluateXPath:function(_bb,doc,_bc){var _bd=this._ieEvaluateXPathRaw(_bb,doc,_bc);return _bd||[];},_setIeNamespaces:function(doc,_be){if(_be){var ns=[];var _bf;for(var _c0 in _be){_bf=_be[_c0];if(_c0!="xml"){ns.push("xmlns:",_c0,"='",_bf,"' ");}}var _c1=doc.ownerDocument||doc;_c1.setProperty("SelectionNamespaces",ns.join(""));_c1.setProperty("SelectionLanguage","XPath");}},_ieEvaluateXPathRaw:function(_c2,doc,_c3){this._setIeNamespaces(doc,_c3);return doc.selectNodes(_c2);},_ieEvaluateXPathRawSingle:function(_c4,doc,_c5){this._setIeNamespaces(doc,_c5);return doc.selectSingleNode(_c4);},_safariEvaluateXPath:function(_c6,doc,_c7){var _c8=this._safariEvaluateXPathRaw(_c6,doc,_c7,com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE);if(XPathResult&&_c8 instanceof XPathResult){var _c9=[];var _ca;while((_ca=_c8.iterateNext())){_c9.push(_ca);}return _c9;}return _c8||[];},_safariEvaluateXPathRaw:function(_cb,doc,_cc,_cd){if(typeof XPathResult!="undefined"){return document.evaluate(_cb,doc,function(_ce){return _cc[_ce]?_cc[_ce].toString():null;},_cd,null);}else{if(doc.selectNodes){return doc.selectNodes(_cb);}}}});com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE=0;com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE=1;com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE=2;com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE=3;}if(!dojo._hasResource["com.ibm.mm.enabler.xml.XPathImpl"]){dojo._hasResource["com.ibm.mm.enabler.xml.XPathImpl"]=true;dojo.provide("com.ibm.mm.enabler.xml.XPathImpl");dojo.declare("com.ibm.mm.enabler.xml.XPathImpl",[com.ibm.mashups.enabler.xml.XPath,com.ibm.mm.enabler.xml.xpath._Generic],{modelMessages:null,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.xml.XPath");this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");},ANY_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.ANY_TYPE,NUMBER_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.NUMBER_TYPE,STRING_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.STRING_TYPE,BOOLEAN_TYPE:com.ibm.mm.enabler.xml.xpath._Generic.BOOLEAN_TYPE,evaluateXPath:function(_cf,doc,_d0){var _d1="evaluateXPath(xpathExpr, doc, namespaces)";var _d2=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_d2){this.LOGGER.entering(_d1,[_cf,doc,_d0]);}if(!dojo.isString(_cf)||_cf.length===0){throw new Error(this.modelMessages.E_INVALID_XPATH_EXPR_0);}if(!doc){throw new Error(this.modelMessages.E_INVALID_DOCUMENT_0);}var ret=this._evaluateXPath(_cf,doc,_d0);if(_d2){this.LOGGER.exiting(_d1,ret);}return ret;},evaluateSingle:function(_d3,doc,_d4,_d5){if(!dojo.isString(_d3)||_d3.length===0){throw new Error(this.modelMessages.E_INVALID_XPATH_EXPR_0);}if(!doc){throw new Error(this.modelMessages.E_INVALID_DOCUMENT_0);}return this._evaluateXPathSingle(_d3,doc,_d4,_d5);},evaluateEntry:function(_d6,doc,_d7){return this.evaluateSingle(_d6,doc,_d7,com.ibm.mashups.enabler.xml.XPath.ANY_TYPE);},evaluateBoolean:function(_d8,doc,_d9){return this.evaluateSingle(_d8,doc,_d9,com.ibm.mashups.enabler.xml.XPath.BOOLEAN_TYPE);},evaluateString:function(_da,doc,_db){return this.evaluateSingle(_da,doc,_db,com.ibm.mashups.enabler.xml.XPath.STRING_TYPE);},evaluateNumber:function(_dc,doc,_dd){return this.evaluateSingle(_dc,doc,_dd,com.ibm.mashups.enabler.xml.XPath.NUMBER_TYPE);},createXPath:function(_de,_df,_e0){var _e1=_de.split("/");var _e2=_e1[0];var _e3=_e2.split(":");var _e4,_e5;if(_e3.length>1){_e5=_e3[0];_e4=_e3[1];}else{_e4=_e3[0];}var _e6=com.ibm.mashups.enabler.xml.XPath.evaluateXPath((_e5?_e5+":":"")+_e4,_df,_e0);var _e7;if(_e6&&_e6.length>0){_e7=_e6[0];}else{_e7=com.ibm.mm.enabler.utils.Dom.createElement(_df.ownerDocument,(_e5?_e5+":":"")+_e4,_e5?_e0[_e5]:null);_df.appendChild(_e7);}if(_e1.length>1){_e7=com.ibm.mashups.enabler.xml.XPath.createXPath(_de.substr(_de.indexOf("/")+1),_e7,_e0);}return _e7;}});com.ibm.mashups.enabler.xml.XPath=new com.ibm.mm.enabler.xml.XPathImpl();com.ibm.mm.enabler.xml.xpath.evaluateXPath=function(_e8,doc,_e9){var _ea=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.xml.xpath");var _eb="evaluateXPath";_ea.warning(_eb,"This method must not be used directly. Use com.ibm.mashups.enabler.xml.XPath.evaluateXPath instead.");dojo.deprecated("com.ibm.mm.enabler.xml.xpath.evaluateXPath","The method com.ibm.mm.enabler.xml.xpath.evaluateXPath is deprecated, please use com.ibm.mashups.enabler.xml.XPath.evaluateXPath instead");return com.ibm.mm.enabler.xml.xpath._Generic.evaluateXPath.apply(null,arguments);};}if(!dojo._hasResource["com.ibm.mashups.enabler.xml.XPath"]){dojo._hasResource["com.ibm.mashups.enabler.xml.XPath"]=true;dojo.provide("com.ibm.mashups.enabler.xml.XPath");}if(!dojo._hasResource["com.ibm.mm.enabler.utils.LocaleHelper"]){dojo._hasResource["com.ibm.mm.enabler.utils.LocaleHelper"]=true;dojo.provide("com.ibm.mm.enabler.utils.LocaleHelper");com.ibm.mm.enabler.utils.LocaleHelper={LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.LocaleHelper"),getLocale:function(_ec,_ed,_ee){com.ibm.mm.enabler.utils.LocaleHelper.LOGGER.warning("com.ibm.mm.enabler.utils.LocaleHelper.getLocale","Deprecated. Use com.ibm.mashups.enabler.context.Factory.getLocalizedContext().getLocale() instead.");if(typeof _ec=="undefined"||_ec===null){return null;}var _ef=_ec.getLocales();if(typeof _ef=="undefined"||_ef===null||!dojo.isArray(_ef)){return null;}if(_ef.length===0){return null;}var _f0=null;if(_ef.length===1){_f0=_ef[0];}var arr={};for(var i in _ef){if(Object.prototype.hasOwnProperty.call(_ef,i)){var _f1=_ef[i];arr[_f1]=_f1;}}var _f2;if(_f0===null){if(typeof _ed!="undefined"&&_ed!==null){_f0=this.findMatchLocale(arr,_ed);if(_f0===null){_f2=_ed.split(/-|_/);if(_f2.length==2){var _f3=_f2[0];if(typeof arr[_f3]!="undefined"&&arr[_f3]!==null){_f0=_f3;}}}}}if(_f0===null){var _f4=(dojo.isIE?navigator.userLanguage:navigator.language).toLowerCase();if(typeof ibmConfig!="undefined"&&ibmConfig&&typeof (ibmConfig.locale)!="undefined"&&ibmConfig.locale){_f4=ibmConfig.locale;}if(_f4!==null){_f0=this.findMatchLocale(arr,_f4);if(_f0===null){_f2=_f4.split(/-|_/);if(_f2.length==2){var _f5=_f2[0];if(typeof arr[_f5]!="undefined"&&arr[_f5]!==null){_f0=_f5;}}}}}if(_f0===null){if(_ee){_f0=_ee;}}if(_f0===null){if(arr.en){_f0="en";}}if(_f0===null){_f0=_ef[0];}return _f0;},findMatchLocale:function(arr,_f6){com.ibm.mm.enabler.utils.LocaleHelper.LOGGER.warning("com.ibm.mm.enabler.utils.LocaleHelper.findMatchLocale","Deprecated. Use com.ibm.mm.enabler.utils.LocaleHelper.matchLocale() instead.");var _f7=null;if(arr[_f6]){_f7=_f6;}var _f8=this.toServerLocale(_f6);if(_f7===null&&arr[_f8]){_f7=_f8;}var _f9=_f8.toLowerCase();if(_f7===null&&arr[_f9]){_f7=_f9;}return _f7;},matchLocale:function(_fa,_fb){return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(com.ibm.mm.enabler.utils.LocaleHelper._getLocaleObj(_fa),com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_fb));},_matchLocale:function(_fc,_fd,_fe){var _ff=_fc;var _100=null;var _101=dojo.some(_fd,function(item){if(item==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_fc.toString())){_100=item;return true;}});if(_101&&_100){return _100;}if(_fc.variant){_fc.variant=null;return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(_fc,_fd);}if(_fc.country){_fc.country=null;return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(_fc,_fd);}if(!_fe){_fc=_ff;switch(_fc.language){case "he":_fc.language="iw";break;case "iw":_fc.language="he";break;}return com.ibm.mm.enabler.utils.LocaleHelper._matchLocale(_fc,_fd,true);}return null;},toServerLocale:function(_102){com.ibm.mm.enabler.utils.LocaleHelper.LOGGER.warning("com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale","Deprecated. Use com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale() instead.");if(!_102){return null;}if(_102.indexOf("-")<0){return _102;}_102=_102.replace(/-/,"_");var _103=_102.split("_");var lang=_103[0];var _104=_103[1].toUpperCase();var _105=lang+"_"+_104;return _105;},_getLocaleObj:function(_106){if(dojo.isArray(_106)){return dojo.map(_106,function(item){return com.ibm.mm.enabler.utils.LocaleHelper._getLocaleObj(item);});}else{if(dojo.isString(_106)&&dojo.string.trim(_106).length>0){var _107={language:null,country:null,variant:null,toString:function(){return (this.language?this.language+(this.country?"_"+this.country+(this.variant?"_"+this.variant:""):""):"");},isValid:function(){return !!this.language;}};var _108=dojo.string.trim(_106).replace(/-/g,"_").split("_");switch(_108.length){case 3:_107.variant=_108[2];case 2:_107.country=_108[1].toUpperCase();case 1:_107.language=_108[0].toLowerCase();break;}return _107;}else{return null;}}},normalizeLocale:function(_109){if(dojo.isArray(_109)){return dojo.map(_109,function(item){return com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(item);});}else{if(_109&&dojo.isString(_109)){return _109.replace(/_/g,"-").toLowerCase();}else{return null;}}}};}if(!dojo._hasResource["com.ibm.mm.enabler.model.NameSpaceFactory"]){dojo._hasResource["com.ibm.mm.enabler.model.NameSpaceFactory"]=true;dojo.provide("com.ibm.mm.enabler.model.NameSpaceFactory");dojo.declare("com.ibm.mm.enabler.model.NameSpaceFactoryImpl",null,{constructor:function(){this.NS_APP="app";this.NS_ATOM="atom";this.NS_THR="thr";this.NS_UM="um";this.NS_XHTML="xhtml";this.NS_XML="xml";this.NS_XSI="xsi";this.NS_OPENSEARCH="opensearch";this.NS_CM="cm";this.NS_CA="ca";this.NS_AC="ac";this.NS_EVENT_DATATYPES="event-datatypes";this.NS_XMLNS="xmlns";this.NS_XSD="xsd";this.NS_JS="js";this.NS_ENV="env";this.namespaces={};this.namespaces[this.NS_APP]="http://www.w3.org/2007/app";this.namespaces[this.NS_ATOM]="http://www.w3.org/2005/Atom";this.namespaces[this.NS_THR]="http://purl.org/syndication/thread/1.0";this.namespaces[this.NS_UM]="http://www.ibm.com/xmlns/prod/websphere/um.xsd";this.namespaces[this.NS_XHTML]="http://www.w3.org/1999/xhtml";this.namespaces[this.NS_XML]="http://www.w3.org/XML/1998/namespace";this.namespaces[this.NS_XSI]="http://www.w3.org/2001/XMLSchema-instance";this.namespaces[this.NS_XMLNS]="http://www.w3.org/2000/xmlns/";this.namespaces[this.NS_OPENSEARCH]="http://a9.com/-/spec/opensearch/1.1/";this.namespaces[this.NS_CM]="http://www.ibm.com/xmlns/prod/composite-applications/v1.0";this.namespaces[this.NS_CA]="http://www.ibm.com/xmlns/prod/composite-applications/v1.0";this.namespaces[this.NS_AC]="http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0";this.namespaces[this.NS_EVENT_DATATYPES]="http://www.ibm.com/xmlns/prod/lotus/mashups/event-datatypes";this.namespaces[this.NS_XSD]="http://www.w3.org/2001/XMLSchema";this.namespaces[this.NS_JS]="text/javascript";this.namespaces[this.NS_ENV]="http://www.w3.org/2003/05/soap-envelope";},getNameSpaces:function(_10a){var _10b={};var len=_10a.length;for(var i=0;i<len;i++){var name=_10a[i];_10b[name]=this.namespaces[name];}return _10b;},getNameSpaceUri:function(_10c){return this.namespaces[_10c];}});com.ibm.mm.enabler.model.NameSpaceFactory=new com.ibm.mm.enabler.model.NameSpaceFactoryImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.context.LocalizedContextImpl"]){dojo._hasResource["com.ibm.mm.enabler.context.LocalizedContextImpl"]=true;dojo.provide("com.ibm.mm.enabler.context.LocalizedContextImpl");dojo.declare("com.ibm.mm.enabler.context.LocalizedContextImpl",[com.ibm.mashups.enabler.context.LocalizedContext],{constructor:function(_10d,_10e){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.context.LocalizedContextImpl");this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML]);this.basicFallback=!(_10d||_10e);this.preferredLocale=_10d||null;if(this.preferredLocale===null){if(typeof ibmConfig!="undefined"&&ibmConfig!==null&&typeof (ibmConfig.locale)!="undefined"&&ibmConfig.locale!==null){this.preferredLocale=ibmConfig.locale;}else{this.preferredLocale=(dojo.isIE?navigator.userLanguage:navigator.language).toLowerCase();}}this.defaultLocale=_10e||"en";this._DEFAULT_TITLE="atom:title";this._DEFAULT_DESCRIPTION="atom:summary";this._DEFAULT_LOCALE=this._DEFAULT_TITLE+"/@xml:lang";},getPreferredLocale:function(){return this.preferredLocale;},getDefaultLocale:function(){return this.defaultLocale;},getLocale:function(_10f){if(typeof _10f=="undefined"||_10f===null){return null;}if(this.basicFallback&&dojo.isFunction(_10f.getDefaultLocale)){return _10f.getDefaultLocale();}var _110=_10f.getLocales();switch(_110.length){case 0:return null;case 1:return com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_110[0]);default:var _111=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(this.preferredLocale,_110);if(_111){return _111;}var _112=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(this.defaultLocale,_110);if(_112){return _112;}return com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_110[0]);}},getTitle:function(_113){if(typeof _113=="undefined"||_113===null){return null;}var _114;if(this.basicFallback&&dojo.isFunction(_113.getDefaultTitle)){_114=_113.getDefaultTitle();}if(!_114){var _115=this.getLocale(_113);if(_115){_114=_113.getTitle(_115);}}if(typeof _114=="undefined"){_114=null;}return _114;},getDescription:function(_116){if(typeof _116=="undefined"||_116===null){return null;}var _117;if(this.basicFallback&&dojo.isFunction(_116.getDefaultDescription)){_117=_116.getDefaultDescription();}if(!_117){var _118=this.getLocale(_116);if(_118){_117=_116.getDescription(_118);}}if(typeof _117=="undefined"){_117=null;}return _117;},getDisplayLocale:function(_119){var _11a=dojo.isArray(_119)?_119:[_119];if(ibmConfig&&ibmConfig.displayLocale){var _11b=ibmConfig.displayLocale.split(",");com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_11b);for(var i=0;i<_11b.length;i++){var _11c=_11b[i];if(_11c){var _11d=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_11c,_11a);if(_11d){return _11c;}}}}return _11a[0];}});}if(!dojo._hasResource["com.ibm.mashups.enabler.context.LocalizedContext"]){dojo._hasResource["com.ibm.mashups.enabler.context.LocalizedContext"]=true;dojo.provide("com.ibm.mashups.enabler.context.LocalizedContext");}if(!dojo._hasResource["com.ibm.mashups.enabler.context.PageContext_API"]){dojo._hasResource["com.ibm.mashups.enabler.context.PageContext_API"]=true;dojo.provide("com.ibm.mashups.enabler.context.PageContext_API");dojo.provide("com.ibm.mashups.enabler.context.PageContext");dojo.declare("com.ibm.mashups.enabler.context.PageContext",null,{setBrowserTitle:function(_11e){}});}if(!dojo._hasResource["com.ibm.mm.enabler.context.PageContextImpl"]){dojo._hasResource["com.ibm.mm.enabler.context.PageContextImpl"]=true;dojo.provide("com.ibm.mm.enabler.context.PageContextImpl");dojo.declare("com.ibm.mm.enabler.context.PageContextImpl",[com.ibm.mashups.enabler.context.PageContext],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.context.PageContextImpl");this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},setBrowserTitle:function(_11f){var _120="setBrowserTitle(title)";var _121=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_121){this.LOGGER.entering(_120,[_11f]);}dojo.doc.title=_11f.replace(/&amp;/g,"&").replace(/&quot;/g,"\"").replace(/&gt;/g,">").replace(/&lt;/g,"<");if(_121){this.LOGGER.exiting(_120,[dojo.doc.title]);}}});com.ibm.mm.enabler.context.PageContext=new com.ibm.mm.enabler.context.PageContextImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.context.PageContext"]){dojo._hasResource["com.ibm.mashups.enabler.context.PageContext"]=true;dojo.provide("com.ibm.mashups.enabler.context.PageContext");}if(!dojo._hasResource["com.ibm.mashups.enabler.context.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.context.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.context.Factory_API");dojo.provide("com.ibm.mashups.enabler.context.Factory");dojo.declare("com.ibm.mashups.enabler.context.Factory",null,{getLocalizedContext:function(){},getLocalizedContext:function(_122,_123){},getPageContext:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.context.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.context.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.context.FactoryImpl");dojo.declare("com.ibm.mm.enabler.context.FactoryImpl",[com.ibm.mashups.enabler.context.Factory],{constructor:function(){},getLocalizedContext:function(_124,_125){return new com.ibm.mm.enabler.context.LocalizedContextImpl(_124,_125);},getPageContext:function(){return new com.ibm.mm.enabler.context.PageContextImpl();}});com.ibm.mashups.enabler.context.Factory=new com.ibm.mm.enabler.context.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.context.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.context.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.context.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigConstants"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigConstants"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigConstants");dojo.declare("com.ibm.mashups.enabler.services.ConfigConstants",null,{PROXY_URL:"com.ibm.mashups.proxy.url",HUB_URL:"com.ibm.mashups.hub.url",LOGIN_URL:"com.ibm.mashups.url.login",LOGOUT_URL:"com.ibm.mashups.url.logout",CONTEXT_ROOT:"com.ibm.mashups.contextroot",CONTEXT_ROOT_ENABLER:"com.ibm.mashups.contextroot.enabler",CONTEXT_ROOT_BUILDER:"com.ibm.mashups.contextroot.builder",CONTENTHANDLER_PUBLIC:"com.ibm.mashups.contenthandler.public",CONTENTHANDLER_PRIVATE:"com.ibm.mashups.contenthandler.private",EMBEDDING_PUBLIC:"com.ibm.mashups.embedding.public",EMBEDDING_PRIVATE:"com.ibm.mashups.embedding.private",THEMES_FEEDS_EXPIRATION:"themes.feed.expiration",AVAILABLE_LOCALES:"availableLocales",DEFAULT_LOCALE:"default.locale",DISPLAY_LOCALE:"displayLocale",TUNNEL_MODE:"tunnel.mode",CLIENT_IS_DEBUG:"isDebug",CLIENT_IS_BIDI:"isBidi",WIDGETDEFID_SANDBOX_DISABLED:"com.ibm.mashups.sandbox.force.disable",TRACE_CONFIG:"traceConfig",CLIENT_POPUP_CONSOLE:"popupConsole",CLIENT_ALLOW_PUBLISH_LOGGING:"allowPublishLogging",CLIENT_ALLOW_PUBLISH_TRACING:"allowPublishTracing",CLIENT_ADDITIONAL_SERVICES:"additionalServices",CLIENT_DEFAULT_THEME_ID:"com.ibm.mashups.theme.defaultThemeId",CLIENT_PAGE_SOURCE_READ_ONLY:"pageSourceReadOnly",CLIENT_AUTO_ACCEPT_SHARED_GROUPNAME:"autoAcceptSharedGroupName",AUTO_WIRING_DEFAULT_ENABLED:"autoWiringDefaultEnabled",CLIENT_USER_ID_KEY:"userIdKey",CLIENT_GROUP_CN_KEY:"groupCNKey",SERVICE_DOCUMENT_URL:"serviceDocumentUrl",MULTIPART_ENABLED:"com.ibm.mashups.multipart.enabled",MULTIPART_CORRELATE_HOSTS:"com.ibm.mashups.multipart.correlatehosts",MULTIPART_CACHE_QUERIES:"com.ibm.mashups.multipart.cachequeries",ENDPOINTS:"endpointIDs",ENDPOINT_CONFIG_PROVIDER:"Endpoints",ANONYMOUS_USER:"anonymousUser",NAVIGATION_HIDDEN:"com.ibm.mashups.navigation.hidden",SPACE_HIDDEN:"com.ibm.mashups.space.hidden",USER:"user",SUBDOMAINS:"subdomains",SERVERDOMAIN:"serverdomain",SANDBOXENABLED:"sandboxenabled",SUBDOMAINREUSE:"subdomainreuse",NAVSTATE_PERSISTENCE_URL:"navstate.persistence.url",NAVSTATE_PERSISTENCE_PSTORE:"navstate.persistence.pstore",NAVSTATE_PERSISTENCE_URL_LIMIT:"navstate.persistence.url.limit",NAVSTATE_PERSISTENCE_URL_SPLIMIT:"navstate.persistence.url.splimit",NAVSTATE_HUFFMANNENCODE_ENABLED:"navstate.huffmannencode.enabled",LOADING_HTML:"loadingHTML",PAGE_LOAD_OPTIMIZATION:"pageLoadOptimization",PAGE_LOAD_OPTIMIZATION_THEME:"pageLoadOptimizationTheme",PAGE_LOAD_OPTIMIZATION_APP_WIDGETS:"pageLoadOptimizationAppWidgets",ANONYMOUS_ALLOW_CREATE:"com.ibm.mashups.anonymous.allow.create",DEFAULT_USER_DISPLAY_PROP:"com.ibm.mashups.default.user.display.prop",PRODUCT_NAME:"com.ibm.mashups.productname",DEFAULT_GROUP_DISPLAY_PROP:"com.ibm.mashups.default.group.display.prop",WELCOME_SPACE_ID:"com.ibm.mashups.welcome.space.name",BUILDER_TITLE_FILTER_REGEXP:"com.ibm.mashups.builder.filter.title.regexp",ANON_VIRTUAL_USER_ID:"com.ibm.mashups.anonUserId",ALL_AUTH_VIRTUAL_GROUP_ID:"com.ibm.mashups.allAuthGroupId",SERVER_TYPE:"com.ibm.mashups.server",SERVER_TYPE_MASHUPS:"Lotus_Mashups",SERVER_TYPE_PORTAL:"WebSphere_Portal",SERVER_TYPE_BSPACE:"Business_Space",ANON_MODE_ENABLED:"com.ibm.mashups.anonymous.mode",AUTO_WILDCARD_DISABLED:"com.ibm.mashups.autoWildcardSearchDisabled",CONTEXT_MENU_NAME:"com.ibm.mashups.contextmenu.name",WIDGET_BUILDER_ENABLED:"com.ibm.mashups.widgetBuilder.enabled",CREATE_SPACE_TEMPLATE_MODE:"createSpaceOnTemplateMode",FAVORITE_SPACES_MAXIMUM_NUMBER:"favorite.spaces.maximum.number",RECENT_SPACES_MAXIMUM_NUMBER:"recent.spaces.maximum.number",REGISTER_LOADEDRESOURCES:"register.loadedresources",PERSISTENCE_MODE:"com.ibm.mashups.enabler.icontext.persistence.mode",PERSISTENCE_MODE_EVENTS:"com.ibm.mashups.enabler.icontext.persistence.mode.events",PERSISTENCE_MODE_EVENTS_MODIFIABLE:"com.ibm.mashups.enabler.icontext.persistence.mode.events.modifiable",PERSISTENCE_MODE_WIRES:"com.ibm.mashups.enabler.icontext.persistence.mode.wires",PERSISTENCE_MODE_WIRES_MODIFIABLE:"com.ibm.mashups.enabler.icontext.persistence.mode.wires.modifiable",PERSISTENCE_MODE_ATTRIBUTES:"com.ibm.mashups.enabler.icontext.persistence.mode.attributes",PERSISTENCE_MODE_ATTRIBUTES_MODIFIABLE:"com.ibm.mashups.enabler.icontext.persistence.mode.attributes.modifiable",PERSISTENCE_MODE_ATTRIBUTES_JSON_INJECTXML:"com.ibm.mashups.enabler.icontext.attributes.json.injectxml",ICONTEXT_AUTO_COMMIT:"com.ibm.mashups.enabler.icontext.autocommit",ID_PREFIX:"com.ibm.mashups.iWidget.idPrefix",API_ENFORCEMENT_MODE:"com.ibm.mashups.enabler.enforcement",API_ENFORCEMENT_MODE_WARN:"warning",API_ENFORCEMENT_MODE_ERROR:"error",NON_PREVIEWABLE_WIDGET_LOCATION:"com.ibm.mashups.enabler.layout.widget.NonPreviewableContentWidget.location",LIMIT_PAGE_DESCRIPTION:"com.ibm.mashups.persistence.page.description.limit",WIDGET_PERSONALIZE_ENABLED:"com.ibm.mashups.widget.attributes.personalize.enabled",SPACEMANAGER_PAGE_QUERYCOUNT:"com.ibm.mashups.spacemanager.page.queryCount",SPACEMANAGER_PAGE_QUERYKEYWORD:"com.ibm.mashups.spacemanager.page.queryKeyword",SPACEMANAGER_SPACE_QUERYCOUNT:"com.ibm.mashups.spacemanager.spacetemplate.queryCount",SPACEMANAGER_SPACE_QUERYKEYWORD:"com.ibm.mashups.spacemanager.spacetemplate.queryKeyword",LOCALAPPS_REGEX:"com.ibm.mashups.multipart.localapps.regex",SERVER_OBJECT_ID_FORMAT:"com.ibm.mashups.server.oid.format",LOGOUT_VERIFICATION_REGEXP:"com.ibm.mashups.logout.verification.regexp",MULTIPART_SPLIT_PUBLIC:"com.ibm.mashups.multipart.splitPublic",MULTIPART_SPLIT_TRANSACTIONS:"com.ibm.mashups.multipart.splitTransactions",QUEUE_RENDERING:"com.ibm.mashups.queueRendering",MULTIPART_USE_SINK:"com.ibm.mashups.multipart.useSinkForModRequests",NAVIGATION_CREATION_NOOP:"com.ibm.mashups.navigation.creation.noop"});com.ibm.mashups.enabler.services.ConfigConstants=new com.ibm.mashups.enabler.services.ConfigConstants();}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigObject_API");dojo.provide("com.ibm.mashups.enabler.services.ConfigObject");dojo.declare("com.ibm.mashups.enabler.services.ConfigObject",null,{getValue:function(name){return null;},getValueDeferred:function(name){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectDefaultImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectDefaultImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigObjectDefaultImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigObjectDefaultImpl",[com.ibm.mashups.enabler.services.ConfigObject],{constructor:function(_126,_127){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.provider=_126;this.configService=_127;this.ns={};this.ns.app="http://www.w3.org/2007/app";this.ns.atom="http://www.w3.org/2005/Atom";},getPreferenceValue:function(name){if(this.provider=="all"){return this.configService.getValue(name);}else{return this._getValue(this.provider,name);}return null;},getValue:function(name){if(this.provider=="all"){return this.configService.getValue(name,internal);}else{return this._getValue(this.provider,name);}return null;},_getValue:function(_128,name){return null;},getValueDeferred:function(name){if(this.provider=="all"){return new com.ibm.mm.enabler.DeferredImpl(this,function(_129,sync,name){var _12a=_129.getFinishedCallback();var _12b=this.configService.getValue(name,internal);if(_12b&&_12a){_12a(_12b,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_129.getFinishedCallbackParameters());}return _12b;});}else{return this._getValueDeferred(this.provider,name);}},_getValueDeferred:function(_12c,name){return null;}});if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"Base")>=0)){dojo["require"]("com.ibm.mm.enabler.services.ConfigObjectExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigObject"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigObject");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigService_API");dojo.provide("com.ibm.mashups.enabler.services.ConfigService");dojo.declare("com.ibm.mashups.enabler.services.ConfigService",null,{SERVICE_NAME:"configService",getValue:function(name){return null;},getConfigObject:function(name){return null;},getConfigProviderNames:function(){return null;}});com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME="configService";}if(!dojo._hasResource["com.ibm.mashups.services.ServiceManager_API"]){dojo._hasResource["com.ibm.mashups.services.ServiceManager_API"]=true;dojo.provide("com.ibm.mashups.services.ServiceManager_API");dojo.provide("com.ibm.mashups.services.ServiceManager");dojo.declare("com.ibm.mashups.services.ServiceManager",null,{constructor:function(){},getService:function(_12d){}});}if(!dojo._hasResource["com.ibm.mashups.services.ServiceManager"]){dojo._hasResource["com.ibm.mashups.services.ServiceManager"]=true;dojo.provide("com.ibm.mashups.services.ServiceManager");}if(!dojo._hasResource["com.ibm.mm.services.ServiceManagerImpl"]){dojo._hasResource["com.ibm.mm.services.ServiceManagerImpl"]=true;dojo.provide("com.ibm.mm.services.ServiceManagerImpl");dojo.declare("com.ibm.mm.services.ServiceManagerImpl",com.ibm.mashups.services.ServiceManager,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this._serviceEntries={};ibmConfig=ibmConfig||{};ibmConfig.additionalServices=ibmConfig.additionalServices||null;if(ibmConfig.additionalServices){var _12e=dojo.fromJson(ibmConfig.additionalServices);for(var i in _12e){if(Object.prototype.hasOwnProperty.call(_12e,i)){var _12f=_12e[i];this._serviceEntries[_12f.name]=_12f;}}}},getService:function(_130){var _131=this._serviceEntries[_130];_131=_131||null;if(_131!==null){var _132=_131.serviceHandler;_132=_132||null;if(_132===null){_132=this._createService(_131);_132=_132||null;if(_132===null){this._loadScript(_131);}else{this._serviceEntries[_130].serviceHandler=_132;}}}return this._serviceEntries[_130].serviceHandler;},setService:function(_133,_134){_134=_134||null;if(_134===null){return null;}var _135=this._serviceEntries[_133];_135=_135||null;if(_135!==null){delete this._serviceEntries[_133];}if(!this._serviceEntries[_133]){this._serviceEntries[_133]={};}if(dojo.isString(_134)){this._serviceEntries[_133].baseClass=_134;}else{this._serviceEntries[_133].serviceHandler=_134;}},_loadScript:function(_136){var me=this;dojo.xhrGet({url:_136.path,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},handleAs:"text",sync:true,load:function(_137){dojo.eval(_137);var _138=me._createService(_136);if(typeof _138!="undefined"&&_138!==null){var _139=_136.name;_136.serviceHandler=_138;}},error:function(data,_13a){this.LOGGER.severe("_loadScript","error loading service:"+_136.name,data);}});},_createService:function(_13b){var _13c=null;try{_13c=new (dojo.getObject(_13b.baseClass))();}catch(err){}return _13c;}});com.ibm.mashups.services.ServiceManager=new com.ibm.mm.services.ServiceManagerImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.services.AbstractConfigServiceImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.AbstractConfigServiceImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.AbstractConfigServiceImpl");dojo.declare("com.ibm.mm.enabler.services.AbstractConfigServiceImpl",com.ibm.mashups.enabler.services.ConfigService,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},getPreferenceValue:function(name){return this.getValue(name);},getValue:function(name,_13d){if(typeof _13d=="undefined"){this.LOGGER.warning("com.ibm.mm.enabler.services.ConfigService.getValue","This method must not be used directly. Use com.ibm.mashups.enabler.services.ConfigService.getValue instead. name: ${0}",[name]);}var _13e=ibmConfig[name];return _13e;},getConfigObject:function(_13f){return null;},getConfigProviderNames:function(){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceDefaultImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceDefaultImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigServiceDefaultImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigServiceDefaultImpl",[com.ibm.mm.enabler.services.AbstractConfigServiceImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.services.ConfigServiceDefaultImpl");},_getConfigObject:function(_140){if(!ibmConfig["CO_"+_140]){var co=new com.ibm.mm.enabler.services.ConfigObjectDefaultImpl(_140,this);ibmConfig["CO_"+_140]=co;}return ibmConfig["CO_"+_140];},_getConfigProviderNames:function(){var ret=[];ret.push("all");return ret;},getValue:function(name){var _141="getValue(name)";var _142=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_142){this.LOGGER.entering(_141,name);}var ret=this.inherited(arguments,[name,true]);if(_142){this.LOGGER.exiting(_141,ret);}return ret;},getConfigObject:function(name){var _143="getConfigObject(name)";var _144=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_144){this.LOGGER.entering(_143,name);}var ret=this._getConfigObject(name);if(_144){this.LOGGER.exiting(_143,ret);}return ret;},getConfigProviderNames:function(){var _145="getConfigProviderNames()";var _146=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_146){this.LOGGER.entering(_145,name);}var ret=this._getConfigProviderNames();if(_146){this.LOGGER.exiting(_145,ret);}return ret;}});com.ibm.mashups.services.ServiceManager.setService("configService","com.ibm.mm.enabler.services.ConfigServiceDefaultImpl");if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"Base")>=0)){dojo["require"]("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService"]){dojo._hasResource["com.ibm.mashups.enabler.services.ConfigService"]=true;dojo.provide("com.ibm.mashups.enabler.services.ConfigService");}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper_API"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper_API"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EndpointHelper_API");dojo.provide("com.ibm.mashups.enabler.utils.EndpointHelper");dojo.declare("com.ibm.mashups.enabler.utils.EndpointHelper",null,{resolve:function(url){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.EndpointUtils"]){dojo._hasResource["com.ibm.mm.enabler.EndpointUtils"]=true;dojo.provide("com.ibm.mm.enabler.EndpointUtils");dojo.declare("com.ibm.mm.enabler.EndpointUtilsDefaultImpl",null,{constructor:function(){},checkForEndpoints:function(url){return null;}});com.ibm.mm.enabler.EndpointUtils=new com.ibm.mm.enabler.EndpointUtilsDefaultImpl();if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.enabler.EndpointUtilsExtendedImpl");}}if(!dojo._hasResource["com.ibm.mm.enabler.utils.EndpointHelperImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.EndpointHelperImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.EndpointHelperImpl");dojo.declare("com.ibm.mm.enabler.utils.EndpointHelperImpl",null,{resolve:function(url){if(!url){return url;}var url2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(url);if(url2){return url2;}return url;}});com.ibm.mashups.enabler.utils.EndpointHelper=new com.ibm.mm.enabler.utils.EndpointHelperImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EndpointHelper"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EndpointHelper");}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper_API"]){dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper_API"]=true;dojo.provide("com.ibm.mashups.enabler.utils.URLHelper_API");dojo.provide("com.ibm.mashups.enabler.utils.URLHelper");dojo.declare("com.ibm.mashups.enabler.utils.URLHelper",null,{rewriteURL:function(_147){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Misc"]){dojo._hasResource["com.ibm.mm.enabler.utils.Misc"]=true;dojo.provide("com.ibm.mm.enabler.utils.Misc");com.ibm.mm.enabler.utils.Misc={LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.Misc"),forIn:function(obj,func,_148){if(!obj||typeof obj!="object"){return;}_148=_148||null;var item;for(var idx in obj){if(Object.prototype.hasOwnProperty.call(obj,idx)){item=obj[idx];dojo.hitch(_148,func)(item,idx,obj);}}},encodePath:function(path,_149){if(path.length===0){return path;}var _14a=path.split("/");for(var i=0;i<_14a.length;++i){_14a[i]=_149?com.ibm.mm.enabler.utils.Misc._pathPartUnescape(_14a[i]):com.ibm.mm.enabler.utils.Misc._pathPartEscape(com.ibm.mm.enabler.utils.Misc._pathPartUnescape(_14a[i]));}return _14a.join("/");},_pathPartUnescape:function(_14b){_14b=decodeURIComponent(_14b);return _14b;},_pathPartEscape:function(_14c){_14c=encodeURIComponent(_14c);_14c=_14c.replace(/%3a/g,":");_14c=_14c.replace(/%3A/g,":");return _14c;},inStringArray:function(str,_14d){var rc=false;for(var i in _14d){if(Object.prototype.hasOwnProperty.call(_14d,i)){var _14e=_14d[i];if(_14e==str){rc=true;break;}}}return rc;},isEmpty:function(_14f){if(_14f===null||typeof _14f=="undefined"){return true;}else{if(dojo.isString(_14f)){return _14f.length===0;}else{for(var i in _14f){if(Object.prototype.hasOwnProperty.call(_14f,i)){return false;}}return true;}}},encodeModelID4Uri:function(uri){var pos=uri.indexOf(":");if(pos!=-1){var _150=uri.slice(0,pos+1);var end=uri.slice(pos+1);uri=_150+encodeURIComponent(end);}return encodeURIComponent(uri);},preloadImage:function(path,_151,_152){var _153=(_151&&_152)?new Image(_151,_152):new Image();_153.src=path;return _153;},isInstanceOf:function(obj1,obj2){if(obj1&&obj2){if(typeof obj1.isInstanceOf=="function"){if(obj1.isInstanceOf(obj2)){return true;}}return (obj1 instanceof obj2);}return false;},isPocUrl:function(_154){var _155={http:"http",https:"https",file:"file",endpoint:"endpoint"};var rc=false;if(_154.indexOf(":")>0){if(_154.indexOf("/")===0){return false;}if(_154.indexOf("?")===0){return false;}var _156=_154.substring(0,_154.indexOf(":"));if(!_155[_156]){rc=true;}}return rc;},_transferURLParameter:function(_157,_158){var _159=_158.getParameters();var _15a=_157.getParameters();var c=com.ibm.mm.enabler.model.url.ModelUrlConstants;for(var s in _15a){if(_159[s]){if(s==c.PARAMETER_MDNAME||s==c.PARAMETER_ASPECT){var sv=_15a[s];var _15b=dojo.filter(dojo.isArray(sv)?sv:[sv],function(v){if(dojo.isArray(_159[s])){return dojo.indexOf(_159[s],v)==-1;}else{return _159[s]!=v;}},this);dojo.forEach(_15b,function(v){_158.addParameter(s,v);},this);}}else{_158.setParameter(s,_15a[s]);}}return _158;}};}if(!dojo._hasResource["com.ibm.mm.enabler.utils.HttpUrl"]){dojo._hasResource["com.ibm.mm.enabler.utils.HttpUrl"]=true;dojo.provide("com.ibm.mm.enabler.utils.HttpUrl");dojo.declare("com.ibm.mm.enabler.utils.HttpUrl",null,{constructor:function(_15c,_15d){if(_15d!==false){var _15e=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(_15c);if(_15e){_15c=_15e;}}this.pocurl=this._resolvePocUrl(_15c);if(!this.pocurl){this.scheme=this._extractScheme(_15c);this.server=this._extractServer(_15c);this.port=this._extractPort(_15c);this.path=this._extractPath(_15c);this.parameters=this._extractQuery(_15c);this.anchor=this._extractAnchor(_15c);}},_resolvePocUrl:function(_15f){var rv=null;if(com.ibm.mm.enabler.utils.Misc.isPocUrl(_15f)){var _160=this._getPrefix();_15f=escape(unescape(_15f));rv=_160.concat(_15f);}return rv;},_getPrefix:function(){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _161=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _162=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANONYMOUS_USER);var _163;if(_162){_163=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);}else{_163=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);}var rv=_161.concat(_163).concat("?uri=");return rv;},addParameter:function(name,_164){if(dojo.isString(this.parameters[name])){this.parameters[name]=[this.parameters[name],_164];}else{if(dojo.isArray(this.parameters[name])){this.parameters[name].push(_164);}else{this.parameters[name]=_164;}}},setParameter:function(name,_165){if(!this.parameters){this.parameters={};}this.parameters[name]=_165;},getParameter:function(name){if(!this.parameters){return false;}return this.parameters[name];},getParameters:function(){return this.parameters;},isProxyNeeded:function(){var loc=document.location;if(loc.protocol!=this.scheme){return true;}if(!this._equalsServer(loc.hostname)){return true;}if(loc.port==this.port){return false;}var _166;if(this.scheme=="http:"){_166="80";if((loc.port==""&&this.port==_166)||(loc.port==_166&&this.port=="")){return false;}}if(this.scheme=="https:"){_166="443";if((loc.port==""&&this.port==_166)||(loc.port==_166&&this.port=="")){return false;}}return true;},toServerRelativeString:function(_167){if(this.pocurl){return this.pocurl;}var str="";if(this.path!=""){str+="/"+com.ibm.mm.enabler.utils.Misc.encodePath(this.path,_167);}if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this.parameters)){str+="?"+(_167?this._parametersToQuery(this.parameters):dojo.objectToQuery(this.parameters));}if(this.anchor!=""){str+="#"+this.anchor;}return str;},toProxifiedString:function(){if(this.pocurl){return this.pocurl;}if(typeof ibmConfig=="undefined"){return this.toString();}var _168=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);if(!_168){return this.toString();}_168+="/";if(window.location.protocol==this.scheme&&this._equalsServer(window.location.hostname)){if(window.location.port==this.port){return this.toString();}else{if(this.scheme=="http:"&&window.location.port==""&&this.port=="80"){return this.toString();}else{if(this.scheme=="https:"&&window.location.port==""&&this.port=="443"){return this.toString();}else{if(this.scheme=="http:"&&window.location.port=="80"&&this.port==""){return this.toString();}else{if(this.scheme=="https:"&&window.location.port=="443"&&this.port==""){return this.toString();}}}}}}if(this.scheme=="https:"){_168+="https/"+this.server+((this.port!="443"&&this.port!="")?":"+this.port:"");}else{_168+="http/"+this.server+((this.port!="80"&&this.port!="")?":"+this.port:"");}_168+="/";if(this.path!=""){_168+=com.ibm.mm.enabler.utils.Misc.encodePath(this.path);}if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this.parameters)){_168+="?"+dojo.objectToQuery(this.parameters);}if(this.anchor!=""){_168+="#"+this.anchor;}return _168;},getPath:function(){return "/"+this.path;},toString:function(_169){if(this.pocurl){return this.pocurl;}var str="";if(this.server!=""){str+=this.scheme+"//"+this.server;if(this.port!=""){if(this.scheme=="http:"&&this.port=="80"){str+="";}else{if(this.scheme=="https:"&&this.port=="443"){str+="";}else{str+=":"+this.port;}}}}str+="/";if(this.path!=""){str+=com.ibm.mm.enabler.utils.Misc.encodePath(this.path,_169);}if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this.parameters)){str+="?"+(_169?this._parametersToQuery(this.parameters):dojo.objectToQuery(this.parameters));}if(this.anchor!=""){str+="#"+this.anchor;}return str;},_parametersToQuery:function(_16a){var str="";var fn=function(_16b){str+=k+"="+_16b+"&";};for(var k in _16a){if(dojo.isArray(_16a[k])){dojo.forEach(_16a[k],fn);}else{fn(_16a[k]);}}if(str.lastIndexOf("&")===str.length-1){str=str.substr(0,str.length-1);}return str;},_isAbsolute:function(){return this._absoluteURL;},_extractScheme:function(_16c){var _16d=_16c.indexOf("/")===0;if(_16d){return window.location.protocol;}var _16e=_16c.indexOf("://");if(_16e==-1){this._absoluteURL=false;return window.location.protocol;}this._absoluteURL=true;return _16c.substring(0,_16e+1);},_extractServer:function(_16f){var _170=_16f.indexOf(this.scheme);var _171="";if(_170===0){var _172;var _173=_16f.indexOf("/",_170+this.scheme.length+2);if(_173!=-1){_172=_16f.substring(_170+this.scheme.length+2,_173);}else{_172=_16f.substring(_170+this.scheme.length+2);}_171=_172.split(":")[0];}else{var _174=window.location.hostname;_171=this._isIPv6(_174)?"["+_174+"]":_174;}return _171;},_extractPort:function(_175){var _176=_175.indexOf("/")===0;if(_176){return window.location.port;}var _177=_175.indexOf(this.scheme);if(_177>0){return window.location.port;}var _178=_175.indexOf(this.server);if(_178>=0){var _179;var _17a=_175.indexOf("/",_178);if(_17a!=-1){_179=_175.substring(_178,_17a);}else{_179=_175.substring(_178);}var _17b=_179.split(":");if(_17b.length>1){return _17b[1];}}return "";},_extractPath:function(_17c){var _17d=_17c.indexOf(this.scheme);var _17e=0;if(_17d===0){_17e=this.scheme.length+2;}var _17f="";var _180=_17c.indexOf("/",_17e);var _181=_17c.indexOf("?");var _182=_17c.lastIndexOf("#");if(_181>=0){_17f=_17c.substring(_180+1,_181);}else{if(_182>=0&&_180!=-1){_17f=_17c.substring(_180+1,_182);}else{if(_180!=-1){_17f=_17c.substring(_180+1);}}}return _17f;},_extractQuery:function(_183){var _184={};var _185=_183.split("?");if(_185.length>1){_184=dojo.queryToObject(_185[1].split("#")[0]);}return _184;},_extractAnchor:function(_186){var _187="";var _188=_186.split("#");if(_188.length>1){_187=_188[_188.length-1];}return _187;},_isIPv6:function(_189){return _189.indexOf(":")!=-1;},_equalsServer:function(_18a){return this.server.toLowerCase()==(this._isIPv6(_18a)?"["+_18a+"]":_18a).toLowerCase();}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.URLHelper"]){dojo._hasResource["com.ibm.mm.enabler.utils.URLHelper"]=true;dojo.provide("com.ibm.mm.enabler.utils.URLHelper");dojo.declare("com.ibm.mm.enabler.utils.URLHelperImpl",com.ibm.mashups.enabler.utils.URLHelper,{rewriteURL:function(_18b){var _18c=new com.ibm.mm.enabler.utils.HttpUrl(_18b);return _18c.toProxifiedString();}});com.ibm.mashups.enabler.utils.URLHelper=new com.ibm.mm.enabler.utils.URLHelperImpl();com.ibm.mm.enabler.utils.URLHelper=com.ibm.mashups.enabler.utils.URLHelper;}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper"]){dojo._hasResource["com.ibm.mashups.enabler.utils.URLHelper"]=true;dojo.provide("com.ibm.mashups.enabler.utils.URLHelper");}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectExtendedImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigObjectExtendedImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigObjectExtendedImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigObjectExtendedImpl",[com.ibm.mm.enabler.services.ConfigObjectDefaultImpl],{constructor:function(_18d,_18e){this.valuesArray=null;this.provider=_18d;this.configService=_18e;},_getValue:function(_18f,name){if(!this.valuesArray){this._loadConfigData(_18f);}return this.valuesArray[name];},_getValueDeferred:function(_190,name){return new com.ibm.mm.enabler.DeferredImpl(this,function(_191,sync,name){var _192=_191.getFinishedCallback();if(!this.valuesArray){dojo["require"]("com.ibm.mashups.enabler.xml.XPath");dojo["require"]("com.ibm.mashups.enabler.model.url.ModelUrlFactory");dojo["require"]("com.ibm.mm.enabler.services.ModelRestServiceRequest");var _193="ConfigProvider."+_190;var _194=ibmConfig[_193];if((typeof _194!="undefined")||(_194!==null)){_190=_194;}var _195=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.CONFIG_URL,this);_195.setSchemeSpecificPart("/"+_190+"/*");var _196=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_195,null,null,false,sync);var me=this;_196.read(function(type,data,xhr,args){if(!me.valuesArray){me.valuesArray={};}var _197=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("//atom:entry/atom:content/preferences/root/node/map/*",data,me.ns);if(_197&&_197.length>0){for(var i=0,l=_197.length;i<l;i++){var key=_197[i].getAttribute("key");var _198=_197[i].getAttribute("value");me.valuesArray[key]=_198;}}if(me.valuesArray[name]&&_192){_192(me.valuesArray[name],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_191.getFinishedCallbackParameters());}});}else{if(this.valuesArray[name]&&_192){_192(this.valuesArray[name],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_191.getFinishedCallbackParameters());}}return this.valuesArray&&this.valuesArray[name];},name);},_loadConfigData:function(_199){dojo["require"]("com.ibm.mashups.enabler.xml.XPath");dojo["require"]("com.ibm.mashups.enabler.model.url.ModelUrlFactory");dojo["require"]("com.ibm.mm.enabler.services.ModelRestServiceRequest");var _19a="ConfigProvider."+_199;var _19b=ibmConfig[_19a];if((typeof _19b!="undefined")||(_19b!==null)){_199=_19b;}var ret={};var _19c=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.CONFIG_URL,this);_19c.setSchemeSpecificPart("/"+_199+"/*");var _19d=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_19c,null,null,false,true);var me=this;_19d.read(function(type,data,xhr,args){var _19e=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("//atom:entry/atom:content/preferences/root/node/map/*",data,me.ns);if(_19e&&_19e.length>0){for(var i=0;i<_19e.length;i++){var name=_19e[i].getAttribute("key");var _19f=_19e[i].getAttribute("value");ret[name]=_19f;}}});this.valuesArray=ret;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.Strategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.Strategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.Strategy");dojo.declare("com.ibm.mashups.enabler.strategy.Strategy",null,{});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Model_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.Model_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.Model_API");dojo.provide("com.ibm.mashups.enabler.model.Model");dojo.declare("com.ibm.mashups.enabler.model.Model",null,{setStrategy:function(_1a0){},getStrategies:function(){},getStrategy:function(_1a1){},addStrategy:function(_1a2){},removeStrategy:function(_1a3){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Model"]){dojo._hasResource["com.ibm.mashups.enabler.model.Model"]=true;dojo.provide("com.ibm.mashups.enabler.model.Model");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.NoCacheStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.NoCacheStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.NoCacheStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.NoCacheStrategy",com.ibm.mashups.enabler.strategy.Strategy,{_apply:function(_1a4){_1a4.setHeader("Pragma","no-cache");_1a4.setHeader("Cache-Control","no-cache");_1a4.setHeader("If-Modified-Since","Thu, 1 Jan 1970 00:00:00 GMT");}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.ModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.ModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.ModelImpl");dojo.declare("com.ibm.mm.enabler.model.ModelImpl",com.ibm.mashups.enabler.model.Model,{strategy:null,constructor:function(){this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");},setStrategy:function(_1a5){if(_1a5===null||typeof _1a5=="undefined"){this.strategy=null;}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1a5,Array)){if(_1a5.length>0){this.strategy=[];dojo.forEach(_1a5,function(item,idx,arr){this.strategy.push(item);this._preprocessStrategy(item);},this);}}else{this.strategy=[_1a5];this._preprocessStrategy(_1a5);}}},getStrategies:function(){return this.strategy||[];},addStrategy:function(_1a6){if(_1a6===null||typeof _1a6=="undefined"){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}if(null===this.strategy){this.strategy=[];}this._preprocessStrategy(_1a6);for(var i=0,l=this.strategy.length;i<l;i++){if(this.strategy[i].declaredClass){if(_1a6 instanceof (dojo.getObject(this.strategy[i].declaredClass))){this.strategy[i]=_1a6;return i;}}}return (this.strategy.push(_1a6)-1);},removeStrategy:function(s){if(s===null||typeof s=="undefined"){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}if(!this.strategy){return;}else{if(dojo.isString(s)){s=this._getIndexOfStrategyByType(s);}}if(!isNaN(s)&&(s<this.strategy.length)&&(s>=0)){this.strategy.splice(s,1+s);}},getStrategy:function(s){if(!this.strategy){return null;}else{if(dojo.isString(s)){return this._findStrategyByType(s);}else{if(!isNaN(s)&&(s<this.strategy.length)&&(s>=0)){return this.strategy[s];}else{return null;}}}},_findStrategyByType:function(type){var i=this._getIndexOfStrategyByType(type);return i>=0?this.strategy[i]:null;},_getIndexOfStrategyByType:function(type){if(this.strategy){for(var i=0,l=this.strategy.length;i<l;i++){if(this.strategy[i].declaredClass){if(type==this.strategy[i].declaredClass){return i;}}}}return -1;},_preprocessStrategy:function(s){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(s,com.ibm.mashups.enabler.strategy.NoCacheStrategy)){if(dojo.isFunction(this.invalidate)){this.invalidate();}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.ModelRestServiceRequest"]){dojo._hasResource["com.ibm.mm.enabler.services.ModelRestServiceRequest"]=true;dojo.provide("com.ibm.mm.enabler.services.ModelRestServiceRequest");dojo.declare("com.ibm.mm.enabler.services.ModelRestServiceRequest",null,{REQUEST_METHOD_POST:"POST",REQUEST_METHOD_PUT:"PUT",REQUEST_METHOD_DELETE:"DELETE",POST_ACTION_HEADER:"X-Method-Override",MODIFICATION_COOKIE:"modified.id",constructor:function(_1a7,_1a8,_1a9,_1aa,sync){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);if(com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.getXRequestDigest()){_1a7.setParameter("digest",com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.getXRequestDigest());}this._feedURI=_1a7.toProxifiedString();this._textOnly=_1aa;if(_1aa){this._handleAs="text";}else{this._handleAs="xml";}this._sync=sync;this._formNode=_1a8;this._formFilter=_1a9;this._config=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this._headers={};this.logoutVerificationForRaw=false;if(!this._sync){this._sync=false;}},setHandleAs:function(_1ab){if(_1ab=="atom"){this._handleAs="xml";}else{this._handleAs=_1ab;}},setHeader:function(name,_1ac){this._headers[name]=_1ac;},enableLogoutVerificationForRawRetrieval:function(){this.logoutVerificationForRaw=true;},create:function(feed,_1ad,_1ae){this._updateCookie();var me=this;var args={url:this._feedURI,headers:{"Content-Type":"application/atom+xml; charset=utf-8","X-IBM-XHR":"true"},ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1af,_1b0){var xhr=_1b0.xhr;var data=_1af;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1b1=xhr.getResponseHeader("Content-Type");if(typeof _1b1!="undefined"&&_1b1!==null&&_1b1.indexOf("text/html")>=0){me._doLogin();return;}if(dojo.isIE){data=com.ibm.mm.enabler.utils.Dom.createDocument(xhr.responseText);}_1ad(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,data,xhr,_1ae);},error:function(_1b2,_1b3){var xhr=_1b3.xhr;var _1b4=xhr.status;if(_1b4==401){me._doLogin();return;}_1ad(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,null,xhr,_1ae);},sync:this._sync,postData:feed.toString(),handleAs:this._handleAs};dojo.rawXhrPost(args);},read:function(_1b5,_1b6){if(this._textOnly){this._retrieveRawFeed(_1b5,_1b6);}else{this._retrieve(_1b5,_1b6);}},update:function(feed,_1b7,_1b8){this._updateCookie();var me=this;var args={url:this._feedURI,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1b9,_1ba){var xhr=_1ba.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1bb=xhr.getResponseHeader("Content-Type");if(typeof _1bb!="undefined"&&_1bb!==null&&_1bb.indexOf("text/html")>=0){me._doLogin();return;}dojo.partial(_1b7)(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,_1b9,xhr,_1b8);},error:function(_1bc,_1bd){var xhr=_1bd.xhr;var _1be=xhr.status;if(_1be==401){me._doLogin();return;}dojo.partial(_1b7)(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,null,xhr,_1b8);},sync:this._sync,handleAs:this._handleAs};var _1bf={"Content-Type":"application/atom+xml; charset=utf-8","X-IBM-XHR":"true"};var _1c0=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();var _1c1=_1c0.isTransaction();if(com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.TUNNEL_MODE)===true&&(!_1c1||this._sync)){_1bf[this.POST_ACTION_HEADER]=this.REQUEST_METHOD_PUT;args.headers=_1bf;args.postData=feed;dojo.rawXhrPost(args);}else{args.putData=feed;args.headers=_1bf;dojo.rawXhrPut(args);}},remove:function(_1c2,_1c3){this._updateCookie();var me=this;var args={url:this._feedURI,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1c4,_1c5){var type=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD;var data=_1c4;var xhr=_1c5.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1c6=xhr.getResponseHeader("Content-Type");if(typeof _1c6!="undefined"&&_1c6!==null&&_1c6.indexOf("text/html")>=0){me._doLogin();return;}if(dojo.isIE){data=com.ibm.mm.enabler.utils.Dom.createDocument(xhr.responseText);}_1c2(type,data,xhr,_1c3);},error:function(_1c7,_1c8){var xhr=_1c8.xhr;var _1c9=xhr.status;if(_1c9==401){me._doLogin();return;}_1c2(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,null,xhr,_1c3);},sync:this._sync,handleAs:this._handleAs};var _1ca={"Content-Type":"application/atom+xml","X-IBM-XHR":"true"};if(com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.TUNNEL_MODE)===true){_1ca[this.POST_ACTION_HEADER]=this.REQUEST_METHOD_DELETE;args.headers=_1ca;dojo.rawXhrPost(args);}else{args.headers=_1ca;dojo.xhrDelete(args);}},_retrieveRawFeed:function(_1cb,_1cc){var _1cd=this._headers;_1cd["X-IBM-XHR"]=true;var me=this;dojo.xhrGet({url:this._feedURI,headers:_1cd,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(data,_1ce){var xhr=_1ce.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}if((me.logoutVerificationForRaw)&&(xhr.responseText)){var _1cf=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.LOGOUT_VERIFICATION_REGEXP);if(_1cf){var _1d0=new RegExp(_1cf);if(_1d0&&(xhr.responseText.match(_1d0))){me._doLogin();return;}}}_1cb(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,data,_1ce.xhr,_1cc);},error:function(data,_1d1){var xhr=_1d1.xhr;var _1d2=xhr.status;if(_1d2==401){me._doLogin();return;}_1cb(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,data,_1d1.xhr,_1cc);},sync:this._sync,handleAs:this._handleAs});},_retrieve:function(_1d3,_1d4,_1d5,_1d6){var _1d7={};var mt="xml";if(dojo.isIE){mt="text";}var _1d8=this._headers;_1d8["X-IBM-XHR"]=true;var me=this;var args={url:this._feedURI,content:_1d7,headers:_1d8,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(_1d9,_1da){var data=_1d9;var xhr=_1da.xhr;var xrd=xhr.getResponseHeader("X-Request-Digest");if(xrd!==null){com.ibm.mm.enabler.services.ModelRestServiceRequestStatic.setXRequestDigest(xrd);}var _1db=xhr.getResponseHeader("Content-Type");if(typeof _1db!="undefined"&&_1db!==null&&_1db.indexOf("text/html")>=0){me._doLogin();return;}if(dojo.isIE){var doc=com.ibm.mm.enabler.utils.Dom.createDocument(data);_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,doc,xhr,_1d4);}else{_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD,data,xhr,_1d4);}},error:function(_1dc,_1dd){var data=_1dc;var xhr=_1dd.xhr;var _1de=xhr.status;if(_1de==401){me._doLogin();return;}if(dojo.isIE){var doc=null;try{if(data){doc=com.ibm.mm.enabler.utils.Dom.createDocument(data);}}catch(e){}_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,doc,xhr,_1d4);}else{_1d3(com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR,data,xhr,_1d4);}},sync:this._sync,handleAs:mt};var _1df="Get";if(this._formNode){args.form=this._formNode;_1df="Post";}if(this._formFilter){args.formFilter=this._formFilter;}dojo["xhr"+_1df](args);},_updateCookie:function(){var dt=new Date();var _1e0={};_1e0.path=this._config.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);dojo.cookie(this.MODIFICATION_COOKIE,dt.getTime(),_1e0);},_doLogin:function(){dojo["require"]("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");dojo["require"]("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");var pid=null;var url=document.location.href;var cb=function(url){if(url){top.location.href=url;}};var _1e1=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator().getUrl(_1e1,cb,{nohash:"true"});},toString:function(){return this._feedURI;}});com.ibm.mm.enabler.services.ModelRestServiceRequestStatic={xRequestDigest:null,getXRequestDigest:function(){if((null===this.xRequestDigest)&&(ibmConfig["com.ibm.resolver.digest"])){this.xRequestDigest=ibmConfig["com.ibm.resolver.digest"];}return this.xRequestDigest;},setXRequestDigest:function(_1e2){this.xRequestDigest=_1e2;},invalidateXRequestDigest:function(){var dt=new Date();var _1e3=dt.getTime();this.setXRequestDigest(_1e3);var _1e4={};var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);_1e4.path=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);dojo.cookie("modified.id",_1e3,_1e4);}};com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD="load";com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR="error";}if(!dojo._hasResource["com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl"]){dojo._hasResource["com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl"]=true;dojo.provide("com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl");dojo.declare("com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl",null,{LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_METHOD="dojo.xhrGet()";this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.originalDojoXHR=dojo.xhr;dojo.xhr=dojo.hitch(this,function(_1e5,args,_1e6){if(this.bIsLoggable){this.LOGGER.entering(this.LOG_METHOD,[args]);}var url=args.url;var url2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(url);url2=url2||null;if(url2!==null){args.url=url2;}var ret=this.originalDojoXHR(_1e5,args,_1e6);if(this.bIsLoggable){this.LOGGER.exiting(this.LOG_METHOD);}return ret;});}});com.ibm.mm.enabler.endpoints.XHREndpointExtension=new com.ibm.mm.enabler.endpoints.XHREndpointExtensionImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceExtendedImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.ConfigServiceExtendedImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");dojo.declare("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl",[com.ibm.mm.enabler.services.ConfigServiceDefaultImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");},_getConfigObject:function(_1e7){if(!ibmConfig["CO_"+_1e7]){var co=new com.ibm.mm.enabler.services.ConfigObjectExtendedImpl(_1e7,this);ibmConfig["CO_"+_1e7]=co;}return ibmConfig["CO_"+_1e7];},_getConfigProviderNames:function(){dojo["require"]("com.ibm.mashups.enabler.model.url.ModelUrlFactory");var ret=[];ret.push("all");var _1e8=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.CONFIG_URL,this);_1e8.setSchemeSpecificPart("/*");_1e8.setParameter("rep","compact");var _1e9=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1e8,null,null,false,true);var me=this;_1e9.read(function(type,data,xhr,args){var _1ea=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("//atom:entry/atom:id",data,me.ns);if(_1ea&&_1ea.length>0){for(var i=0,l=_1ea.length;i<l;i++){var _1eb=com.ibm.mm.enabler.utils.Dom.textContent(_1ea[i]);var _1ec=_1eb.indexOf("/",9);_1eb=_1eb.substring(8,_1ec).trim();for(var _1ed in ibmConfig){if(ibmConfig[_1ed]===_1eb){_1eb=_1ed.substring(15);}}ret.push(_1eb);}}});return ret;}});com.ibm.mashups.services.ServiceManager.setService("configService","com.ibm.mm.enabler.services.ConfigServiceExtendedImpl");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.ServiceDocumentModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.ServiceDocumentModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.ServiceDocumentModel_API");dojo.provide("com.ibm.mashups.enabler.model.ServiceDocumentModel");dojo.declare("com.ibm.mashups.enabler.model.ServiceDocumentModel",null,{SERVICE_NAVIGATION:"navigation",SERVICE_SPACE_NAVIGATION:"space-navigation",SERVICE_SHARED_NAVIGATION:"shared-navigation",SERVICE_CONTENT:"content",SERVICE_CATALOG:"catalog",SERVICE_RESOURCE:"resource",SERVICE_WIDGET:"widget",SERVICE_THEME:"theme",SERVICE_USER:"user",SERVICE_MODEL:"model",SERVICE_MULTIPART:"multipart",SERVICE_HUFFMAN:"huffman",SERVICE_SITEMAP:"sitemap",SERVICE_SITEMAP_COMMITHANDLER:"commit-handler",SERVICE_COMPOSITE:"composite-applications",SERVICE_SPACE:"application",SERVICE_SPACE_FAVORITE:"application-favorite",SERVICE_TEMPLATE:"template",SERVICE_CONFIG:"config",SERVICE_FILESTORE:"filestore",SERVICE_WEBDAV:"webdav",invalidate:function(){},getModelCollections:function(){},getMashupsCollections:function(){},getCollectionData:function(_1ee){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.ServiceDocumentModel"]){dojo._hasResource["com.ibm.mm.enabler.model.ServiceDocumentModel"]=true;dojo.provide("com.ibm.mm.enabler.model.ServiceDocumentModel");dojo.declare("com.ibm.mm.enabler.model.ServiceDocumentModelImpl",com.ibm.mashups.enabler.model.ServiceDocumentModel,{SERVICE_NAVIGATION:"navigation",SERVICE_SPACE_NAVIGATION:"space-navigation",SERVICE_SHARED_NAVIGATION:"shared-navigation",SERVICE_CONTENT:"content",SERVICE_CATALOG:"catalog",SERVICE_RESOURCE:"resource",SERVICE_WIDGET:"widget",SERVICE_THEME:"theme",SERVICE_USER:"user",SERVICE_MODEL:"model",SERVICE_MULTIPART:"multipart",SERVICE_HUFFMAN:"huffman",SERVICE_SITEMAP:"sitemap",SERVICE_SITEMAP_COMMITHANDLER:"commit-handler",SERVICE_COMPOSITE:"composite-applications",SERVICE_SPACE:"application",SERVICE_SPACE_FAVORITE:"application-favorite",SERVICE_TEMPLATE:"template",SERVICE_CONFIG:"config",SERVICE_FILESTORE:"filestore",SERVICE_WEBDAV:"webdav",constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.prefix="service";this.ns={"atom":"http://www.w3.org/2005/Atom","app":"http://www.w3.org/2007/app","service":"http://www.ibm.com/xmlns/prod/sw/model/service/1.0"};this.xmlData=null;this.xmlDataAsString=null;this.max_version=null;this.cache=[];},getInstance:function(){var _1ef=com.ibm.mm.enabler.model.ServiceDocumentModelImpl._instance;return _1ef?_1ef:(com.ibm.mm.enabler.model.ServiceDocumentModelImpl._instance=new com.ibm.mm.enabler.model.ServiceDocumentModelImpl());},invalidate:function(){this.xmlData=null;this.max_version=null;},_loadAhead:function(){dojo["require"]("com.ibm.mashups.enabler.model.url.ModelUrlFactory");var _1f0="_loadAhead";var _1f1=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1f1){this.LOGGER.entering(_1f0,arguments);}if(ibmConfig.servicedocument){if(this.xmlDataAsString!=ibmConfig.servicedocument){this.xmlData=null;}}if(this.xmlData){if(_1f1){this.LOGGER.exiting(_1f0);}return;}if(ibmConfig.servicedocument){this.xmlData=com.ibm.mm.enabler.utils.Dom.createDocument(ibmConfig.servicedocument);this.xmlDataAsString=ibmConfig.servicedocument;}else{var _1f2;if(ibmConfig.serviceDocumentUrl){_1f2=new com.ibm.mm.enabler.utils.HttpUrl(ibmConfig.serviceDocumentUrl);}else{_1f2=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL("service",null);_1f2.setNodes([{value:"collection",isID:false}]);}var _1f3=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1f2,null,null,false,true);_1f3.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){this.xmlData=data;}else{if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){}}}));}this._fillCache();if(_1f1){this.LOGGER.exiting(_1f0);}},_fillCache:function(){this.max_version=null;if(ibmConfig.servicedocument_version_max){this.max_version=parseInt(ibmConfig.servicedocument_version_max.replace(/\./g,""),10);}var _1f4=[];var i,l,_1f5;var expr="//app:collection";var _1f6=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.ns);for(i=0,l=_1f6.length;i<l;++i){_1f5=this._processCollection(i,_1f6[i]);if(_1f5){this.cache[this.cache.length]=_1f5;}}expr="//service:collection";_1f6=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.ns);for(i=0,l=_1f6.length;i<l;++i){_1f5=this._processCollection(i,_1f6[i]);if(_1f5){this.cache[this.cache.length]=_1f5;}}},getModelCollections:function(){this._loadAhead();var ret=[];var _1f7=0;var expr="//atom:category[@term='enabler-ns-base']";var _1f8=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.ns);for(var i=0,l=_1f8.length;i<l;++i){var _1f9=_1f8[i].parentNode;var _1fa="//atom:category[not (@term='enabler-ns-base' or @term='enabler-ns-model' or @term='enabler-ns-ext' or @term='enabler-ns-creationcontext' or @term='mashups')]";var _1fb=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_1fa,_1f9,this.ns);if(_1fb&&_1fb.length>0){var _1fc=[];for(var ii=0,ll=_1fb.length;ii<ll;++ii){if(_1fb[ii].parentNode==_1f9){_1fc.push(_1fb[ii].getAttribute("term"));}}_1fc.sort();var dup=this._isDuplicate(ret,_1fc);if(!dup){ret[_1f7]=_1fc;_1f7++;}}}return ret;},_isDuplicate:function(_1fd,_1fe){var dup=false;for(var ii=0;ii<_1fd.length;ii++){if(_1fd[ii].length==_1fe.length){var _1ff=true;for(var c=0;c<_1fe.length;c++){if(_1fd[ii][c]!=_1fe[c]){_1ff=false;break;}}if(_1ff){dup=true;break;}}}return dup;},getMashupsCollections:function(){this._loadAhead();var ret=[];var _200=0;var expr="//atom:category[@term='mashups']";var _201=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.ns);for(var i=0,l=_201.length;i<l;++i){var _202=_201[i].parentNode;var _203="//atom:category[not (@term='enabler-ns-base' or @term='enabler-ns-model' or @term='enabler-ns-ext' or @term='enabler-ns-creationcontext' or @term='mashups')]";var _204=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_203,_202,this.ns);if(_204&&_204.length>0){var _205=[];for(var ii=0,ll=_204.length;ii<ll;++ii){if(_204[ii].parentNode==_202){_205.push(_204[ii].getAttribute("term"));}}_205.sort();var dup=this._isDuplicate(ret,_205);if(!dup){ret[_200]=_205;_200++;}}}return ret;},getCollectionData:function(_206){this._loadAhead();var ret={};this.xmlData=this.xmlData||null;if(!this.xmlData){return ret;}var ids=[];if(dojo.isArray(_206)){ids=_206;}else{ids=[_206];}ret=this._getCachedValue(ids);return ret;},_getCachedValue:function(ids){var _207=[];var i,cl,lo,m,l,scl;for(i=0,cl=this.cache.length;i<cl;i++){var _208=this.cache[i].id;var _209=0;for(j=0,lo=_208.length;j<lo;j++){if(_208[j]=="mashups"){_209+=500;}for(m=0,l=ids.length;m<l;m++){if(_208[j]==ids[m]){_209+=1000;}}}var _20a=parseInt(this.cache[i].version.replace(/\./g,""),10);_209+=_20a;if(this.max_version&&(_20a>this.max_version)){_209=-1000;}_207[i]=_209;}var _20b=-1;var _20c=1000;for(i=0,scl=_207.length;i<scl;i++){if(_207[i]>_20c){_20b=i;_20c=_207[i];}}if(_20b==-1){return null;}return this.cache[_20b];},_processCollection:function(i,node){var ret={};var _20d="app:categories//atom:category[@term]";var _20e=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_20d,node,this.ns);var _20f=[];if(_20e){for(var jj=0,ll=_20e.length;jj<ll;jj++){var term=_20e[jj].getAttribute("term");if(term.indexOf("enabler-ns-")===0){continue;}_20f.push(term);}}ret.id=_20f;ret.url=node.getAttribute("href");ret.version=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"service:version","version",this.ns.service);if(!ret.version){ret.version="1.0";}ret.template=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"service:template","template",this.ns.service);ret.idprefix="id";var ns={};_20d="app:categories/atom:category[@term='enabler-ns-base']";_20e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_20d,node,this.ns);if(_20e){ns.base=_20e.getAttribute("scheme");if(ns.base.indexOf("/mashups/")==-1){ret.idprefix="oid";}}_20d="app:categories/atom:category[@term='enabler-ns-model']";_20e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_20d,node,this.ns);if(_20e){ns.model=_20e.getAttribute("scheme");}_20d="app:categories/atom:category[@term='enabler-ns-ext']";_20e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_20d,node,this.ns);if(_20e){ns.ext=_20e.getAttribute("scheme");}_20d="app:categories/atom:category[@term='enabler-ns-creationcontext']";_20e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_20d,node,this.ns);if(_20e){ns["creation-context"]=_20e.getAttribute("scheme");}ret.namespaces=ns;_20d="app:accept";_20e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_20d,node,this.ns);if(_20e){ret.accept=_20e.firstChild.nodeValue;}return ret;}});com.ibm.mm.enabler.model.ServiceDocumentModel=com.ibm.mm.enabler.model.ServiceDocumentModelImpl.prototype.getInstance();com.ibm.mashups.enabler.model.ServiceDocumentModel=com.ibm.mm.enabler.model.ServiceDocumentModel;}if(!dojo._hasResource["com.ibm.mashups.enabler.model.ServiceDocumentModel"]){dojo._hasResource["com.ibm.mashups.enabler.model.ServiceDocumentModel"]=true;dojo.provide("com.ibm.mashups.enabler.model.ServiceDocumentModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.Commitable"]){dojo._hasResource["com.ibm.mashups.enabler.Commitable"]=true;dojo.provide("com.ibm.mashups.enabler.Commitable");dojo.declare("com.ibm.mashups.enabler.Commitable",null,{isDirty:function(){return false;},commit:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.DefaultLocalized"]){dojo._hasResource["com.ibm.mashups.enabler.DefaultLocalized"]=true;dojo.provide("com.ibm.mashups.enabler.DefaultLocalized");dojo.declare("com.ibm.mashups.enabler.DefaultLocalized",null,{getDefaultLocale:function(){},getDefaultTitle:function(){},getDefaultDescription:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Iterator"]){dojo._hasResource["com.ibm.mashups.enabler.Iterator"]=true;dojo.provide("com.ibm.mashups.enabler.Iterator");dojo.declare("com.ibm.mashups.enabler.Iterator",null,{hasNext:function(){},next:function(){},size:function(){},setCursorPosition:function(_210){},getCursorPosition:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.DeferredIterator_API"]){dojo._hasResource["com.ibm.mashups.enabler.DeferredIterator_API"]=true;dojo.provide("com.ibm.mashups.enabler.DeferredIterator_API");dojo.provide("com.ibm.mashups.enabler.DeferredIterator");dojo.declare("com.ibm.mashups.enabler.DeferredIterator",[com.ibm.mashups.enabler.Deferred,com.ibm.mashups.enabler.Iterator],{setForEachCallback:function(_211,_212){}});}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredIteratorImpl"]){dojo._hasResource["com.ibm.mm.enabler.DeferredIteratorImpl"]=true;dojo.provide("com.ibm.mm.enabler.DeferredIteratorImpl");dojo.declare("com.ibm.mm.enabler.DeferredIteratorImpl",[com.ibm.mashups.enabler.DeferredIterator,com.ibm.mm.enabler.DeferredImpl],{setForEachCallback:function(_213,_214){this.foreachCallback=_213;this.foreachCallbackParameters=_214;return this;},setForeachCallback:function(_215,_216){return this.setForEachCallback(_215,_216);},getForeachCallback:function(){return this.foreachCallback;},getForeachCallbackParameters:function(){return this.foreachCallbackParameters;},nextFinish:function(_217){if(dojo.isFunction(this.getForeachCallback())){dojo.partial(this.getForeachCallback())(_217,this.getForeachCallbackParameters());}},start:function(sync){while(this.hasNext(this,sync)){this.next(this,sync);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.DeferredIterator"]){dojo._hasResource["com.ibm.mashups.enabler.DeferredIterator"]=true;dojo.provide("com.ibm.mashups.enabler.DeferredIterator");}if(!dojo._hasResource["com.ibm.mashups.enabler.DeferredOperation_API"]){dojo._hasResource["com.ibm.mashups.enabler.DeferredOperation_API"]=true;dojo.provide("com.ibm.mashups.enabler.DeferredOperation_API");dojo.provide("com.ibm.mashups.enabler.DeferredOperation");dojo.declare("com.ibm.mashups.enabler.DeferredOperation",[com.ibm.mashups.enabler.Deferred],{OPERATION_GET:"GET",OPERATION_CREATE:"CREATE",OPERATION_MODIFY:"MODIFY",OPERATION_DELETE:"DELETE",setFinishedCallback:function(_218,_219,_21a){},setOperationCallback:function(_21b,_21c,_21d){}});com.ibm.mashups.enabler.DeferredOperation.OPERATION_GET="GET";com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE="CREATE";com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY="MODIFY";com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE="DELETE";}if(!dojo._hasResource["com.ibm.mm.enabler.model.HttpStatusCodes"]){dojo._hasResource["com.ibm.mm.enabler.model.HttpStatusCodes"]=true;dojo.provide("com.ibm.mm.enabler.model.HttpStatusCodes");dojo.provide("com.ibm.mm.enabler.model.HttpStatusCodesImpl");dojo.declare("com.ibm.mm.enabler.model.HttpStatusCodesImpl",null,{HTTP_CONTINUE:"100",HTTP_SWITCHING_PROTOCOLS:"101",HTTP_OK:"200",HTTP_CREATED:"201",HTTP_BAD_REQUEST:"400",HTTP_NOT_FOUND:"404",HTTP_REQUEST_TIMEOUT:"408",HTTP_INTERNAL_SERVER_ERROR:"500",HTTP_SERVICE_UNAVAILABLE:"503"});com.ibm.mm.enabler.model.HttpStatusCodes=new com.ibm.mm.enabler.model.HttpStatusCodesImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.DeferredOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.DeferredOperationImpl");dojo.declare("com.ibm.mm.enabler.DeferredOperationImpl",[com.ibm.mashups.enabler.DeferredOperation,com.ibm.mm.enabler.DeferredImpl],{operationCallback:null,operationCallbackParameters:null,setOperationCallback:function(_21e,_21f,_220){if(_220===true){this._isVerboseOperation=true;}this.operationCallback=_21e;this.operationCallbackParameters=_21f;return this;},getOperationCallback:function(){return this.operationCallback;},getOperationCallbackParameters:function(){return this.operationCallbackParameters;},finishOperation:function(_221,_222,_223,data){if(dojo.isOpera&&_223===0){_223=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}var _224={resource:_221,parameter:this.getOperationCallbackParameters(),request:data||{statusCode:_223},mode:_222};if(this._isVerboseFinish){if(!this._verboseOperationResults){this._verboseOperationResults=[];}this._verboseOperationResults.push(_224);}if(dojo.isFunction(this.getOperationCallback())){if(this._isVerboseOperation){dojo.partial(this.getOperationCallback())(_224);}else{dojo.partial(this.getOperationCallback())(_221,_222,_223,this.getOperationCallbackParameters());}}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.DeferredOperation"]){dojo._hasResource["com.ibm.mashups.enabler.DeferredOperation"]=true;dojo.provide("com.ibm.mashups.enabler.DeferredOperation");}if(!dojo._hasResource["com.ibm.mashups.enabler.DirtyFlagProvider_API"]){dojo._hasResource["com.ibm.mashups.enabler.DirtyFlagProvider_API"]=true;dojo.provide("com.ibm.mashups.enabler.DirtyFlagProvider_API");dojo.provide("com.ibm.mashups.enabler.DirtyFlagProvider");dojo.declare("com.ibm.mashups.enabler.DirtyFlagProvider",null,{isDirty:function(){},setDirty:function(){},setClean:function(){},addDirtyCallback:function(ctx,_225,_226,_227){},removeDirtyCallback:function(fn){}});}if(!dojo._hasResource["com.ibm.mm.enabler.DirtyFlagProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.DirtyFlagProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.DirtyFlagProviderImpl");dojo.declare("com.ibm.mm.enabler.DirtyFlagProviderImpl",com.ibm.mashups.enabler.DirtyFlagProvider,{_dirty:false,setDirty:function(){this._setDirty();},_setDirty:function(){var _228=this._dirty===false;this._dirty=true;if(this._dirtyCallbacks){dojo.forEach(this._dirtyCallbacks,function(cb){if((_228||cb.alwaysFire)&&dojo.isFunction(cb.fn)){dojo.hitch(cb.ctx||null,cb.fn)(cb.args);}},this);}},setClean:function(){this._setClean();},_setClean:function(){this._dirty=false;},isDirty:function(){return this._dirty;},_isDirty:function(){return this._dirty;},addDirtyCallback:function(ctx,fn,args,_229){this._addDirtyCallback(ctx,fn,args,_229);},_addDirtyCallback:function(ctx,fn,args,_22a){if(!this._dirtyCallbacks){this._dirtyCallbacks=[];}this._dirtyCallbacks.push({ctx:ctx,fn:fn,args:args,alwaysFire:!!_22a});},removeDirtyCallback:function(fn){this._removeDirtyCallback(fn);},_removeDirtyCallback:function(fn){if(this._dirtyCallbacks){for(var i=this._dirtyCallbacks.length;i>0;i--){if(fn===this._dirtyCallbacks[i-1].fn){this._dirtyCallbacks.splice(i-1,1);break;}}}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.DirtyFlagProvider"]){dojo._hasResource["com.ibm.mashups.enabler.DirtyFlagProvider"]=true;dojo.provide("com.ibm.mashups.enabler.DirtyFlagProvider");}if(!dojo._hasResource["com.ibm.mashups.enabler.Discardable_API"]){dojo._hasResource["com.ibm.mashups.enabler.Discardable_API"]=true;dojo.provide("com.ibm.mashups.enabler.Discardable_API");dojo.provide("com.ibm.mashups.enabler.Discardable");dojo.declare("com.ibm.mashups.enabler.Discardable",null,{discard:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Discardable"]){dojo._hasResource["com.ibm.mashups.enabler.Discardable"]=true;dojo.provide("com.ibm.mashups.enabler.Discardable");}if(!dojo._hasResource["com.ibm.mashups.enabler.Identifiable"]){dojo._hasResource["com.ibm.mashups.enabler.Identifiable"]=true;dojo.provide("com.ibm.mashups.enabler.Identifiable");dojo.declare("com.ibm.mashups.enabler.Identifiable",null,{getID:function(){},getUniqueName:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Invalidatable_API"]){dojo._hasResource["com.ibm.mashups.enabler.Invalidatable_API"]=true;dojo.provide("com.ibm.mashups.enabler.Invalidatable_API");dojo.provide("com.ibm.mashups.enabler.Invalidatable");dojo.declare("com.ibm.mashups.enabler.Invalidatable",null,{invalidate:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Invalidatable"]){dojo._hasResource["com.ibm.mashups.enabler.Invalidatable"]=true;dojo.provide("com.ibm.mashups.enabler.Invalidatable");}if(!dojo._hasResource["com.ibm.mashups.enabler.Locator"]){dojo._hasResource["com.ibm.mashups.enabler.Locator"]=true;dojo.provide("com.ibm.mashups.enabler.Locator");dojo.declare("com.ibm.mashups.enabler.Locator",null,{find:function(id){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ListModel"]){dojo._hasResource["com.ibm.mashups.enabler.ListModel"]=true;dojo.provide("com.ibm.mashups.enabler.ListModel");dojo.declare("com.ibm.mashups.enabler.ListModel",[com.ibm.mashups.enabler.model.Model,com.ibm.mashups.enabler.Locator],{iterator:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ListModelController"]){dojo._hasResource["com.ibm.mashups.enabler.ListModelController"]=true;dojo.provide("com.ibm.mashups.enabler.ListModelController");dojo.declare("com.ibm.mashups.enabler.ListModelController",com.ibm.mashups.enabler.ListModel,{create:function(_22b){},confirmCreate:function(_22c){},insert:function(node,_22d){},confirmInsert:function(node,_22e){},remove:function(node){},confirmRemove:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Localized_API"]){dojo._hasResource["com.ibm.mashups.enabler.Localized_API"]=true;dojo.provide("com.ibm.mashups.enabler.Localized_API");dojo.provide("com.ibm.mashups.enabler.Localized");dojo.declare("com.ibm.mashups.enabler.Localized",null,{getLocales:function(){},getTitle:function(_22f){},getTitles:function(){},getDescription:function(_230){},getDescriptions:function(_231){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ModifiableLocalized"]){dojo._hasResource["com.ibm.mashups.enabler.ModifiableLocalized"]=true;dojo.provide("com.ibm.mashups.enabler.ModifiableLocalized");dojo.declare("com.ibm.mashups.enabler.ModifiableLocalized",com.ibm.mashups.enabler.Localized,{setTitle:function(_232,_233){},confirmSetTitle:function(_234,_235){},removeTitle:function(_236){},confirmRemoveTitle:function(_237){},removeTitles:function(){},confirmRemoveTitles:function(){},setDescription:function(desc,_238){},confirmSetDescription:function(desc,_239){},removeDescription:function(_23a){},confirmRemoveDescription:function(_23b){},removeDescriptions:function(){},confirmRemoveDescriptions:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Localized"]){dojo._hasResource["com.ibm.mashups.enabler.Localized"]=true;dojo.provide("com.ibm.mashups.enabler.Localized");}if(!dojo._hasResource["com.ibm.mashups.enabler.Representation_API"]){dojo._hasResource["com.ibm.mashups.enabler.Representation_API"]=true;dojo.provide("com.ibm.mashups.enabler.Representation_API");dojo.provide("com.ibm.mashups.enabler.Representation");dojo.declare("com.ibm.mashups.enabler.Representation",com.ibm.mashups.enabler.Identifiable,{getID:function(){},getURL:function(){},getMimeType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.RepresentationImpl"]){dojo._hasResource["com.ibm.mm.enabler.RepresentationImpl"]=true;dojo.provide("com.ibm.mm.enabler.RepresentationImpl");dojo.declare("com.ibm.mm.enabler.RepresentationImpl",com.ibm.mashups.enabler.Representation,{constructor:function(url,type){this.url=url;this.type=type;},getID:function(){return this.type;},getURL:function(){return this.url;},getMimeType:function(){return this.type;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Representation"]){dojo._hasResource["com.ibm.mashups.enabler.Representation"]=true;dojo.provide("com.ibm.mashups.enabler.Representation");}if(!dojo._hasResource["com.ibm.mashups.enabler.RepresentationProvider_API"]){dojo._hasResource["com.ibm.mashups.enabler.RepresentationProvider_API"]=true;dojo.provide("com.ibm.mashups.enabler.RepresentationProvider_API");dojo.provide("com.ibm.mashups.enabler.RepresentationProvider");dojo.declare("com.ibm.mashups.enabler.RepresentationProvider",null,{getAlternateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.RepresentationModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.RepresentationModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.RepresentationModelImpl");dojo.declare("com.ibm.mm.enabler.RepresentationModelImpl",[com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.DeferredIteratorImpl],{constructor:function(_23c){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.loadedNodes={};this.entries=[];this.cursor=0;this.size=null;this.start=null;this.num=null;this.strategy=null;if(_23c&&_23c.length>0){this.size=_23c.length;for(var i=0;i<_23c.length;i++){var link=_23c[i];var url=link.getAttribute("href");var _23d=link.getAttribute("type");var uri=_23d;var node=new com.ibm.mm.enabler.RepresentationImpl(url,_23d);this.entries[i]=uri;this.loadedNodes[uri]=node;}}},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,uri);},_find:function(_23e,sync,uri){return this._load(uri,_23e,sync);},start:function(sync){while(this._hasNext(this,sync)){if(this._next(this,sync)){continue;}else{break;}}},hasNext:function(){return this._hasNext(null,true);},_hasNext:function(_23f,sync){if(this.start===null||this.cursor<this.start||(this.cursor>=(this.start+this.num)&&(this.size>this.cursor))){this._loadAhead(_23f,sync);}return (this.size>this.cursor);},next:function(){return this._next(null,true);},_next:function(_240,sync){return this._hasNext(_240,sync)?this.loadedNodes[this.entries[this.cursor++]]:null;},size:function(){return this.size;},setCursorPosition:function(_241){this.cursor=_241;},getCursorPosition:function(){return this.cursor;},setStrategy:function(_242){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_242,Array)){this.strategy=_242[0];}else{this.strategy=_242;}},_load:function(uri,_243,sync){var _244="_load";var _245=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_245){this.LOGGER.entering(_244,arguments);}if(uri in this.loadedNodes){if(_243){_243.finish(this.loadedNodes[uri],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}if(_245){this.LOGGER.exiting(_244,this.loadedNodes[uri]);}return this.loadedNodes[uri];},_loadAhead:function(_246,sync){}});}if(!dojo._hasResource["com.ibm.mm.enabler.RepresentationProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.RepresentationProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.RepresentationProviderImpl");dojo.declare("com.ibm.mm.enabler.RepresentationProviderImpl",com.ibm.mashups.enabler.RepresentationProvider,{constructor:function(){this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.r_ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML]));this.XPATH="atom:link";},getAlternateModel:function(){var _247=[];var md=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.XPATH,this.xmlData,this.r_ns);if(md&&md.length>0){for(var i=0,l=md.length;i<l;i++){var link=md[i];var rel=link.getAttribute("rel");var _248=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(link,"ext:rel","rel",this.r_ns.ext);if(_248==""){_248=null;}if(((!rel)||(rel=="alternate"))&&(!_248)){_247[_247.length]=link;}}}var _249=new com.ibm.mm.enabler.RepresentationModelImpl(_247);return _249;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.RepresentationProvider"]){dojo._hasResource["com.ibm.mashups.enabler.RepresentationProvider"]=true;dojo.provide("com.ibm.mashups.enabler.RepresentationProvider");}if(!dojo._hasResource["com.ibm.mashups.enabler.ResourceLocator"]){dojo._hasResource["com.ibm.mashups.enabler.ResourceLocator"]=true;dojo.provide("com.ibm.mashups.enabler.ResourceLocator");dojo.declare("com.ibm.mashups.enabler.ResourceLocator",com.ibm.mashups.enabler.Locator,{findResourceUrl:function(node,name){},findResourceURL:function(node,name){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.SubmittableForm_API"]){dojo._hasResource["com.ibm.mashups.enabler.SubmittableForm_API"]=true;dojo.provide("com.ibm.mashups.enabler.SubmittableForm_API");dojo.provide("com.ibm.mashups.enabler.SubmittableForm");dojo.declare("com.ibm.mashups.enabler.SubmittableForm",com.ibm.mashups.enabler.Identifiable,{getURL:function(){},getMethod:function(){},submit:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.SubmittableFormImpl"]){dojo._hasResource["com.ibm.mm.enabler.SubmittableFormImpl"]=true;dojo.provide("com.ibm.mm.enabler.SubmittableFormImpl");dojo.declare("com.ibm.mm.enabler.SubmittableFormImpl",com.ibm.mashups.enabler.SubmittableForm,{constructor:function(url,_24a,_24b){this.url=url;this.method=_24a;this.formId=_24b;},getURL:function(){return this.url;},getMethod:function(){return this.method;},submit:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._submit);},_submit:function(_24c){dojo.io.iframe.send({url:this.url,method:this.method,handleAs:"text",form:document.getElementsByName(this.formId)[0],load:function(data,_24d){if(_24c){_24c.finish(data,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_CREATED);}},error:function(data,_24e){if(_24c){_24c.finish(data,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}});}});}if(!dojo._hasResource["com.ibm.mashups.enabler.SubmittableForm"]){dojo._hasResource["com.ibm.mashups.enabler.SubmittableForm"]=true;dojo.provide("com.ibm.mashups.enabler.SubmittableForm");}if(!dojo._hasResource["com.ibm.mashups.enabler.SubmittableFormProvider_API"]){dojo._hasResource["com.ibm.mashups.enabler.SubmittableFormProvider_API"]=true;dojo.provide("com.ibm.mashups.enabler.SubmittableFormProvider_API");dojo.provide("com.ibm.mashups.enabler.SubmittableFormProvider");dojo.declare("com.ibm.mashups.enabler.SubmittableFormProvider",null,{getSubmittableForm:function(id){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.url.ModelUrl_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.url.ModelUrl_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.url.ModelUrl_API");dojo.provide("com.ibm.mashups.enabler.model.url.ModelUrl");dojo.declare("com.ibm.mashups.enabler.model.url.ModelUrl",null,{constructor:function(){},setNodes:function(_24f){},setSchemeSpecificPart:function(_250){},getSchemeSpecificPart:function(){return null;},addParameter:function(name,_251){},setParameter:function(name,_252){},getParameter:function(name){return null;},getParameters:function(){return null;},getAbsoluteURL:function(){return null;},getProxifiedAbsoluteURL:function(){return null;},getModelURI:function(){return null;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.url.ModelUrl"]){dojo._hasResource["com.ibm.mashups.enabler.model.url.ModelUrl"]=true;dojo.provide("com.ibm.mashups.enabler.model.url.ModelUrl");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.url.ModelUrlFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.url.ModelUrlFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.url.ModelUrlFactory_API");dojo.provide("com.ibm.mashups.enabler.model.url.ModelUrlFactory");dojo.declare("com.ibm.mashups.enabler.model.url.ModelUrlFactory",null,{NAVIGATION_URL:"nav",LAYOUT_URL:"layout",SHARED_NAVIGATION_URL:"sharednav",FRAGMENT_URL:"fragment",FRAGMENT_MEDIA_URL:"fragment-media",USER_URL:"user",THEME_URL:"theme",THEME_MEDIA_URL:"theme-media",CATALOG_URL:"cat",CONFIG_URL:"config",SPACE_URL:"space",SPACE_FAVORITE_URL:"space-favorite",AC_URL:"ac",AI_URL:"ai",TEMPLATE_URL:"template",WIDGET_URL:"widget",EVENT_URL:"event",SUBMODEL_MEMBER:"member",SUBMODEL_ROLE:"role",SUBMODEL_ACCESS:"access",SUBMODEL_RESOURCE:"resource",RESOURCE_URL:"resource-service",constructor:function(){},createModelUrl:function(_253,_254){return new com.ibm.mashups.enabler.model.url.ModelUrl(_253,_254);},createModelURL:function(_255,_256){return new com.ibm.mashups.enabler.model.url.ModelUrl(_255,_256);},getModelUrl:function(url,_257){return new com.ibm.mashups.enabler.model.url.ModelUrl(url,_257);},getModelURL:function(url,_258){return new com.ibm.mashups.enabler.model.url.ModelUrl(url,_258);}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.url.BaseModelUrl"]){dojo._hasResource["com.ibm.mm.enabler.model.url.BaseModelUrl"]=true;dojo.provide("com.ibm.mm.enabler.model.url.BaseModelUrl");dojo.declare("com.ibm.mm.enabler.model.url.BaseModelUrl",[com.ibm.mashups.enabler.model.url.ModelUrl],{modelSchema:null,schemeSpecific:null,isMediaUrl:false,httpUrl:null,VALUE:"value",IS_ID:"isID",SUBMODEL:"submodel",constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.nodes=[];this.prefix=null;this.subModelSchemeMap={};this.subModelSchemeMap[com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_RESOURCE]="resource";this.subModelSchemeMap[com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE]="role";this.subModelSchemeMap[com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_MEMBER]="member";this.subModelSchemeMap[com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ACCESS]="access";},_loadPrefix:function(){if(!this.prefix){this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);this.prefix=this.serviceJson.idprefix;}},setPrimaryNode:function(_259,isID,_25a){if(typeof internal=="undefined"){var _25b="setPrimaryNode";this.LOGGER.warning(_25b,"This method must not be used anymore. Use setNodes instead.");}var _25c={};_25c.value=_259;_25c.isID=(isID===false)?isID:true;_25c.subModel=_25a;this.nodes[0]=_25c;this._updateURI();},setSecondaryNode:function(_25d,isID,_25e){if(typeof internal=="undefined"){var _25f="setSecondaryNode";this.LOGGER.warning(_25f,"This method must not be used anymore. Use setNodes instead.");}var _260={};_260.value=_25d;_260.isID=(isID===false)?isID:true;_260.subModel=_25e;this.nodes[1]=_260;this._updateURI();},setNodes:function(_261){this.nodes=_261;for(var i=0;i<_261.length;i++){_261[i].isID=(_261[i].isID===false)?_261[i].isID:true;}this._updateURI();},setSchemeSpecificPart:function(_262){this.nodes=[];this.schemeSpecific=_262;this._updateURI();},getSchemeSpecificPart:function(){if(this.schemeSpecific){return this.schemeSpecific;}var _263="";if(this.isMediaUrl){_263="/";}if(!this.nodes){return _263;}var i,node;if(this.isMediaUrl){for(i=0;i<this.nodes.length;i++){node=this.nodes[i];if(node.isID&&!this.prefix){this._loadPrefix();}if(i>0){if(i<this.nodes.length-1){_263+="@";}else{_263+="/";}}_263+=node.value;}}else{for(i=0;i<this.nodes.length;i++){node=this.nodes[i];if(node.isID&&!this.prefix){this._loadPrefix();}if(_263!=""){_263+="@";}if(node.subModel){_263+=this.subModelSchemeMap[node.subModel]+":";}if(node.isID){_263+=this.prefix+":";}_263+=node.value;}}return _263;},_updateURI:function(){var uri=this.modelSchema+":"+this.getSchemeSpecificPart();this.httpUrl.setParameter("uri",uri);},addParameter:function(name,_264){this.httpUrl.addParameter(name,_264);},setParameter:function(name,_265){this.httpUrl.setParameter(name,_265);},getParameter:function(name){return this.httpUrl.getParameter(name);},getParameters:function(){return this.httpUrl.getParameters();},getAbsoluteURL:function(){return this.httpUrl.toString();},getProxifiedAbsoluteURL:function(){return this.httpUrl.toProxifiedString();},getModelURI:function(){return this.httpUrl.getParameter("uri");},toProxifiedString:function(){return this.httpUrl.toProxifiedString();}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.url.SchemeBasedModelUrlImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.url.SchemeBasedModelUrlImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.url.SchemeBasedModelUrlImpl");dojo.declare("com.ibm.mm.enabler.model.url.SchemeBasedModelUrlImpl",[com.ibm.mm.enabler.model.url.BaseModelUrl],{constructor:function(_266,_267){this.modelSchema=_266;this.model=_267;var _268=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var url="";url+=_268.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _269=_268.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANONYMOUS_USER);var _26a;if(_269){_26a=_268.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);}else{_26a=_268.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);}url+=_26a;this.httpUrl=new com.ibm.mm.enabler.utils.HttpUrl(url);this.httpUrl.setParameter("uri",this.modelSchema);}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.url.SchemeBasedModelMediaUrlImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.url.SchemeBasedModelMediaUrlImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.url.SchemeBasedModelMediaUrlImpl");dojo.declare("com.ibm.mm.enabler.model.url.SchemeBasedModelMediaUrlImpl",[com.ibm.mm.enabler.model.url.SchemeBasedModelUrlImpl],{constructor:function(_26b,_26c){this.isMediaUrl=true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.url.ThemeResourceUrlImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.url.ThemeResourceUrlImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.url.ThemeResourceUrlImpl");dojo.declare("com.ibm.mm.enabler.model.url.ThemeResourceUrlImpl",[com.ibm.mm.enabler.model.url.BaseModelUrl],{constructor:function(_26d,_26e){this.modelSchema=_26d;this.model=_26e;this.httpUrl=new com.ibm.mm.enabler.utils.HttpUrl("/");this.httpUrl.setParameter("uri",this.modelSchema);},_updateURI:function(){var _26f,url;if(this.nodes.length==2){var _270=this.nodes[0].value;_26f=this.nodes[1].value;var _271=this.model.find(_270).start();url=_271._getBaseUrl();this.httpUrl=new com.ibm.mm.enabler.utils.HttpUrl(url+_26f);}else{if(this.nodes.length==3){var _272=this.nodes[0].value;_26f=this.nodes[2].value;var _273=this.model.find(_272).start();url=_273._getBaseUrl();this.httpUrl=new com.ibm.mm.enabler.utils.HttpUrl(url+_26f);}else{this.httpUrl=new com.ibm.mm.enabler.utils.HttpUrl("/");}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl");dojo.declare("com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl",[com.ibm.mm.enabler.model.url.BaseModelUrl],{constructor:function(url,_274){if(!com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.CONTEXT_ROOT){com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.CONTEXT_ROOT=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.PRIVATE_HANDLER=com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.CONTEXT_ROOT+com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.PUBLIC_HANDLER=com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.CONTEXT_ROOT+com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);}if(url.indexOf("?")===0){var _275=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANONYMOUS_USER);var _276;if(_275){_276=com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.PUBLIC_HANDLER;}else{_276=com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.PRIVATE_HANDLER;}var _277="";_277+=_276;url=_277+url;}this.httpUrl=new com.ibm.mm.enabler.utils.HttpUrl(url);}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.url.ModelUrlFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.url.ModelUrlFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.url.ModelUrlFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.url.ModelUrlFactoryImpl",[com.ibm.mashups.enabler.model.url.ModelUrlFactory],{WEBDAV_URL:"webdav",constructor:function(){this.schemeMap={};this.schemeMap[this.NAVIGATION_URL]="nm";this.schemeMap[this.SHARED_NAVIGATION_URL]="snm";this.schemeMap[this.FRAGMENT_URL]="fragment";this.schemeMap[this.FRAGMENT_MEDIA_URL]="fragment-media";this.schemeMap[this.USER_URL]="um";this.schemeMap[this.THEME_URL]="theme";this.schemeMap[this.THEME_MEDIA_URL]="theme-media";this.schemeMap[this.CATALOG_URL]="catalog";this.schemeMap[this.CONFIG_URL]="config";this.schemeMap[this.SPACE_URL]="space";this.schemeMap[this.SPACE_FAVORITE_URL]="space-favorite";this.schemeMap[this.AC_URL]="ac";this.schemeMap[this.AI_URL]="ai";this.schemeMap[this.TEMPLATE_URL]="template";this.schemeMap[this.LAYOUT_URL]="lm";this.schemeMap.service="service";this.schemeMap[this.WEBDAV_URL]="dav:mmdav";this.schemeMap[this.WIDGET_URL]="wm";this.schemeMap[this.EVENT_URL]="ce";this.schemeMap[this.RESOURCE_URL]="resource-service";},createModelUrl:function(_278,_279){return this.createModelURL(_278,_279);},createModelURL:function(_27a,_27b){var _27c="createModelURL(urlType, model)";var _27d=com.ibm.mashups.enabler.model.url.ModelUrlFactory.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);if(_27d){com.ibm.mashups.enabler.model.url.ModelUrlFactory.LOGGER.entering(_27c,[_27a,_27b]);}var _27e=com.ibm.mashups.enabler.model.url.ModelUrlFactory.schemeMap[_27a];if(_27d){com.ibm.mashups.enabler.model.url.ModelUrlFactory.LOGGER.trace(_27c,"modelSchema found for specified urlType: ${0}",_27a);}if(!_27e){return null;}var _27f;if(_27a==this.THEME_MEDIA_URL){_27f=new com.ibm.mm.enabler.model.url.ThemeResourceUrlImpl(_27e,_27b);}else{if(_27a==this.FRAGMENT_MEDIA_URL){_27f=new com.ibm.mm.enabler.model.url.SchemeBasedModelMediaUrlImpl(_27e,_27b);}else{_27f=new com.ibm.mm.enabler.model.url.SchemeBasedModelUrlImpl(_27e,_27b);}}if(_27d){com.ibm.mashups.enabler.model.url.ModelUrlFactory.LOGGER.exiting(_27c,_27f);}return _27f;},getModelUrl:function(url,_280){return this.getModelURL(url,_280);},getModelURL:function(url,_281){return new com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl(url,_281);}});com.ibm.mm.enabler.model.UrlFactory=new com.ibm.mm.enabler.model.url.ModelUrlFactoryImpl();com.ibm.mashups.enabler.model.url.ModelUrlFactory=com.ibm.mm.enabler.model.UrlFactory;com.ibm.mashups.enabler.model.url.ModelUrlFactory.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mashups.enabler.model.url.ModelUrlFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.url.ModelUrlFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.url.ModelUrlFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.url.ModelUrlFactory");}if(!dojo._hasResource["com.ibm.mm.enabler.SubmittableFormProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.SubmittableFormProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.SubmittableFormProviderImpl");dojo.declare("com.ibm.mm.enabler.SubmittableFormProviderImpl",com.ibm.mashups.enabler.SubmittableFormProvider,{constructor:function(){},getSubmittableForm:function(id){var _282=null;var url;if(id=="spaceForm"){url=new com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.SPACE_URL,null);url.setNodes([{value:"collection",isID:false}]);url.setParameter("mode","import");url.setParameter("mime-type","text/html");url=url.toProxifiedString();_282=new com.ibm.mm.enabler.SubmittableFormImpl(url,"post",id);}else{if(id=="pageForm"){var _283=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_RESOURCE);url=new com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_283.url,this);url.setParameter("mode","import");url.setParameter("mime-type","text/html");if(arguments[1]){url.setParameter("spaceId",arguments[1]);}url=url.toProxifiedString();_282=new com.ibm.mm.enabler.SubmittableFormImpl(url,"post",id);}else{if(id=="spacePageForm"){url=new com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.SPACE_URL,null);url.setNodes([{value:"collection",isID:false}]);url.setParameter("mode","import");url.setParameter("mime-type","text/html");if(arguments[1]){url.setParameter("spaceId",arguments[1]);}var _284=null;if(arguments[2]){_284=arguments[2];}url=url.toProxifiedString();_282=new com.ibm.mm.enabler.SubmittableFormImpl(url,"post",_284);}}}return _282;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.SubmittableFormProvider"]){dojo._hasResource["com.ibm.mashups.enabler.SubmittableFormProvider"]=true;dojo.provide("com.ibm.mashups.enabler.SubmittableFormProvider");}if(!dojo._hasResource["com.ibm.mashups.enabler.TimeStamped_API"]){dojo._hasResource["com.ibm.mashups.enabler.TimeStamped_API"]=true;dojo.provide("com.ibm.mashups.enabler.TimeStamped_API");dojo.provide("com.ibm.mashups.enabler.TimeStamped");dojo.declare("com.ibm.mashups.enabler.TimeStamped",null,{getCreated:function(){},getLastModified:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.TimeStamped"]){dojo._hasResource["com.ibm.mashups.enabler.TimeStamped"]=true;dojo.provide("com.ibm.mashups.enabler.TimeStamped");}if(!dojo._hasResource["com.ibm.mashups.enabler.Transformable_API"]){dojo._hasResource["com.ibm.mashups.enabler.Transformable_API"]=true;dojo.provide("com.ibm.mashups.enabler.Transformable_API");dojo.provide("com.ibm.mashups.enabler.Transformable");dojo.declare("com.ibm.mashups.enabler.Transformable",null,{getXml:function(){},setXml:function(xml){}});}if(!dojo._hasResource["com.ibm.mm.enabler.TransformableImpl"]){dojo._hasResource["com.ibm.mm.enabler.TransformableImpl"]=true;dojo.provide("com.ibm.mm.enabler.TransformableImpl");dojo.declare("com.ibm.mm.enabler.TransformableImpl",[com.ibm.mashups.enabler.Transformable,com.ibm.mm.enabler.DirtyFlagProviderImpl],{constructor:function(){},getXml:function(){return this.xmlData;},setXml:function(xml,_285){this.xmlData=xml;if(this._resetCachedRawID){this._resetCachedRawID();}if(!_285){this._setDirty();}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Transformable"]){dojo._hasResource["com.ibm.mashups.enabler.Transformable"]=true;dojo.provide("com.ibm.mashups.enabler.Transformable");}if(!dojo._hasResource["com.ibm.mashups.enabler.TreeModel"]){dojo._hasResource["com.ibm.mashups.enabler.TreeModel"]=true;dojo.provide("com.ibm.mashups.enabler.TreeModel");dojo.declare("com.ibm.mashups.enabler.TreeModel",[com.ibm.mashups.enabler.model.Model,com.ibm.mashups.enabler.Locator],{getRoot:function(){},hasChildren:function(node){},getChildren:function(node){},getParent:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.TreeModelController"]){dojo._hasResource["com.ibm.mashups.enabler.TreeModelController"]=true;dojo.provide("com.ibm.mashups.enabler.TreeModelController");dojo.declare("com.ibm.mashups.enabler.TreeModelController",com.ibm.mashups.enabler.TreeModel,{create:function(_286){},confirmCreate:function(_287){},insert:function(node,_288,_289){},confirmInsert:function(node,_28a,_28b){},remove:function(node){},confirmRemove:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.io.DynamicResolver_API"]){dojo._hasResource["com.ibm.mashups.enabler.io.DynamicResolver_API"]=true;dojo.provide("com.ibm.mashups.enabler.io.DynamicResolver_API");dojo.provide("com.ibm.mashups.enabler.io.DynamicResolver");dojo.declare("com.ibm.mashups.enabler.io.DynamicResolver",null,{SERVICE_NAME:"dynamicResolver",register:function(id,_28c,_28d,_28e){},unregister:function(id){}});com.ibm.mashups.enabler.io.DynamicResolver.SERVICE_NAME="dynamicResolver";}if(!dojo._hasResource["com.ibm.mm.enabler.io.XHRWrapper"]){dojo._hasResource["com.ibm.mm.enabler.io.XHRWrapper"]=true;dojo.provide("com.ibm.mm.enabler.io.XHRWrapper");dojo.declare("com.ibm.mm.enabler.io.XHRWrapper",null,{constructor:function(_28f,_290,_291,_292,_293){this.ioArgs=_28f;this.xhr=_28f.xhr;this.readyState=_28f.xhr.readyState;this.responseText=_290;this.responseXML=_28f.xhr.responseXML;this.status=_291;this.statusText=_28f.xhr.statusText;this.contentType=_292;this.partHeaders=_293;},getAllResponseHeaders:function(){return this.xhr.getAllResponseHeaders();},getInterface:function(){return this.xhr.getInterface();},getResponseHeader:function(_294){var _295=_294+"";if(this.partHeaders[_295]){return this.partHeaders[_295];}else{if(_295.toLowerCase()=="content-type"){return (this.contentType);}}return this.xhr.getResponseHeader(_294);}});}if(!dojo._hasResource["com.ibm.mm.enabler.io.DynamicResolver"]){dojo._hasResource["com.ibm.mm.enabler.io.DynamicResolver"]=true;dojo.provide("com.ibm.mm.enabler.io.DynamicResolver");dojo.declare("com.ibm.mm.enabler.io.DynamicResolver",com.ibm.mashups.enabler.io.DynamicResolver,{constructor:function(){this._plugins=[];var me=this,_296=dojo.xhr;dojo.xhr=function(){var fn=me.getResolver.apply(me,arguments)||_296;return fn.apply(this,arguments);};},_buildDfdFn:function(_297,obj,_298){var func=obj[_297];return func?function(val){return func.call(obj,val,_298);}:null;},resolve:function(_299,_29a,_29b,args,_29c){var data=null,_29d=false,dfd=new dojo.Deferred(),_29e={args:args,url:com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(args.url)||args.url,handleAs:args.handleAs||"text",xhr:{readyState:4,responseXML:null,statusText:""}};dfd.addCallback(this._buildDfdFn("load",args,_29e)).addErrback(this._buildDfdFn("error",args,_29e)).addBoth(this._buildDfdFn("handle",args,_29e));_29e.xhr=new com.ibm.mm.enabler.io.XHRWrapper(_29e,"",200,"text",{});try{data=_299(_29e.url,_29a);_29e.xhr.status=200;if(data){_29e.xhr.responseText=data;if(args.handleAs==="xml"&&typeof data==="string"){_29e.xhr.responseXML=com.ibm.mm.enabler.utils.Dom.createDocument(data);}}}catch(err){_29e.xhr.status=500;data=err;_29e.xhr.responseText=err.toString();_29d=true;}dfd[_29d?"errback":"callback"](data);return dfd;},_embedValidation:function(fn,_29f){var me=this;return function(_2a0,args,_2a1){return me.resolve(fn,_29f,_2a0,args,_2a1);};},getResolver:function(_2a2,args,_2a3){if(_2a2&&_2a2.toLowerCase()=="get"){for(var i=0;i<this._plugins.length;i++){var plg=this._plugins[i];var ret=plg[1](args.url);if(ret){return this._embedValidation(plg[2],ret);}}}return null;},register:function(id,_2a4,_2a5,_2a6){this._plugins[_2a6?"unshift":"push"]([id,_2a4,_2a5]);},unregister:function(id){for(var i=0;i<this._plugins.length;i++){if(id===this._plugins[i][0]){this._plugins.splice(i,1);return;}}}});com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.enabler.io.DynamicResolver.SERVICE_NAME,"com.ibm.mm.enabler.io.DynamicResolver");}if(!dojo._hasResource["com.ibm.mashups.enabler.io.DynamicResolver"]){dojo._hasResource["com.ibm.mashups.enabler.io.DynamicResolver"]=true;dojo.provide("com.ibm.mashups.enabler.io.DynamicResolver");}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipart_API"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipart_API"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipart_API");dojo.provide("com.ibm.mashups.enabler.io.XHRMultipart");dojo.declare("com.ibm.mashups.enabler.io.XHRMultipart",null,{constructor:function(){},startTransaction:function(){},endTransactionDeferred:function(){},endTransaction:function(_2a7,_2a8){},suspendTransaction:function(){},resumeTransaction:function(){},isTransaction:function(){return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ServiceDocConsumer"]){dojo._hasResource["com.ibm.mm.enabler.ServiceDocConsumer"]=true;dojo.provide("com.ibm.mm.enabler.ServiceDocConsumer");dojo.declare("com.ibm.mm.enabler.ServiceDocConsumer",null,{_noop:function(){},_initServiceDoc:function(){this._initServiceDoc=this._noop;}});}if(!dojo._hasResource["com.ibm.mm.enabler.encode.huffman.ZEncoder"]){dojo._hasResource["com.ibm.mm.enabler.encode.huffman.ZEncoder"]=true;dojo.provide("com.ibm.mm.enabler.encode.huffman.ZEncoder");dojo.declare("com.ibm.mm.enabler.encode.huffman.ZEncoder",null,{HEX_CHARS:["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"],UNSAFE_CHARS:"$&+,/:;=?@ <>#%{}|\\^~[]`\"Z",constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},isUnsafeChar:function(_2a9){if(this.UNSAFE_CHARS.indexOf(_2a9)>-1||_2a9.charCodeAt(0)<=32||_2a9.charCodeAt(0)>=123){return true;}return false;},zEncode:function(_2aa){var _2ab="";for(var i=0;i<_2aa.length;++i){var _2ac=_2aa.charAt(i);if(!this.isUnsafeChar(_2ac)){_2ab+=_2ac;continue;}_2ab+=this.zEncodeChar(_2ac);}return _2ab;},zEncodeChar:function(_2ad){var _2ae="Z";return _2ae+this.byteToHex(_2ad.charCodeAt(0));},byteToHex:function(_2af){var _2b0=Math.floor(_2af/16);var _2b1=_2af%16;return this.HEX_CHARS[_2b0]+this.HEX_CHARS[_2b1];},zDecode:function(_2b2){var _2b3="";var _2b4="Z";if(_2b2.indexOf(_2b4)!=-1){for(var i=0,l=_2b2.length;i<l;i++){var _2b5=_2b2.charAt(i);if(_2b5==_2b4){var hex="0x"+_2b2.substr(i+1,2);i=i+2;try{var _2b6=parseInt(hex,16);_2b3=_2b3.concat(String.fromCharCode(_2b6));}catch(e){continue;}}else{_2b3=_2b3.concat(_2b2.substr(i,1));}}}else{_2b3=_2b2;}return _2b3;}});com.ibm.mm.enabler.encode.huffman.ZEncoder=new com.ibm.mm.enabler.encode.huffman.ZEncoder();}if(!dojo._hasResource["com.ibm.mm.enabler.encode.huffman.HuffmanURL"]){dojo._hasResource["com.ibm.mm.enabler.encode.huffman.HuffmanURL"]=true;dojo.provide("com.ibm.mm.enabler.encode.huffman.HuffmanURL");dojo.declare("com.ibm.mm.enabler.encode.huffman.HuffmanURL",null,{URL_ALPHABET:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_!",LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},_encodeTokens:function(_2b7,_2b8,_2b9){var len=_2b9.length;for(var i=0;i<len;++i){this._addBits(_2b7,_2b8[_2b9[i]].prefix);}return this._encodeStream(_2b7);},_encodeStream:function(_2ba){var len=_2ba.dwords.length*4;if(_2ba.bits>0){_2ba.dwords.push(_2ba.dword);len+=((_2ba.bits+7)>>3);_2ba.bits=0;}return this._encodeBase64(_2ba.dwords,0,len);},_initStream:function(_2bb){_2bb.dword=0;_2bb.mask=1;_2bb.bits=0;_2bb.dwords=[];return _2bb;},_addBits:function(_2bc,data){var mask=_2bc.mask,_2bd=_2bc.dword,bits=_2bc.bits;var len=data.length,off=0;while(len>0){var copy=Math.min(len,32-bits);for(var i=0;i<copy;++i){if(data[off+i]==1){_2bd|=mask;}mask<<=1;}bits+=copy;len-=copy;off+=copy;if(bits==32){_2bc.dwords.push(_2bd);bits=0;mask=1;_2bd=0;}}_2bc.mask=mask;_2bc.bits=bits;_2bc.dword=_2bd;},_addBit:function(_2be,bit){if(bit==1){_2be.dword|=_2be.mask;}_2be.mask<<=1;_2be.bits++;if(_2be.bits==32){_2be.dwords.push(_2be.dword);_2be.dword=0;_2be.mask=1;_2be.bits=0;}},_encodeBase64:function(data,off,len){var ab=this.URL_ALPHABET;var _2bf=off>>2;var _2c0=off&3;var _2c1=data[_2bf++],_2c2;var c1,c2,c3,c4;var _2c3="";for(var i=len;i>0;i-=3){switch(_2c0){case 0:c1=((_2c1>>2)&63);c2=((_2c1<<4)&48)|((_2c1>>12)&15);c3=((_2c1>>6)&60)|((_2c1>>22)&3);c4=((_2c1>>16)&63);_2c0=3;break;case 1:c1=((_2c1>>10)&63);c2=((_2c1>>4)&48)|((_2c1>>20)&15);c3=((_2c1>>14)&60)|((_2c1>>30)&3);c4=((_2c1>>24)&63);_2c0=0;_2c1=data[_2bf++];break;case 2:_2c2=data[_2bf++];c1=((_2c1>>18)&63);c2=((_2c1>>12)&48)|((_2c1>>28)&15);c3=((_2c1>>22)&60)|((_2c2>>6)&3);c4=(_2c2&63);_2c1=_2c2;_2c0=1;break;case 3:_2c2=data[_2bf++];c1=((_2c1>>26)&63);c2=((_2c1>>20)&48)|((_2c2>>4)&15);c3=((_2c2<<2)&60)|((_2c2>>14)&3);c4=((_2c2>>8)&63);_2c1=_2c2;_2c0=2;break;}switch(i){case 1:c3=64;c4=64;break;case 2:c4=64;break;}_2c3+=ab.charAt(c1);_2c3+=ab.charAt(c2);_2c3+=ab.charAt(c3);_2c3+=ab.charAt(c4);}return _2c3;},_decodeBase64:function(_2c4){var ab=this.URL_ALPHABET;var len=_2c4.length/4;var i=0;var _2c5=[];for(var j=0;j<len;j++){var _2c6=0;indexC1=ab.indexOf(_2c4.charAt(i++));indexC2=ab.indexOf(_2c4.charAt(i++));indexC3=ab.indexOf(_2c4.charAt(i++));if(indexC3==64){_2c6++;}indexC4=ab.indexOf(_2c4.charAt(i++));if(indexC4==64){_2c6++;}c1=(indexC1<<2)|(indexC2>>4);c2=((indexC2&15)<<4)|(indexC3>>2);c3=((indexC3&3)<<6)|indexC4;_2c5.push(c1);switch(_2c6){case 0:_2c5.push(c2);_2c5.push(c3);break;case 1:_2c5.push(c2);break;case 2:break;}}return _2c5;},_frequencyCompare:function(n1,n2){return n1.frequency-n2.frequency;},_initTree:function(_2c7,node,_2c8){if(node.left&&node.right){this._addBit(_2c7,1);this._initTree(_2c7,node.left,_2c8.concat(0));this._initTree(_2c7,node.right,_2c8.concat(1));}else{this._addBit(_2c7,0);node.prefix=_2c8;_2c7.tokens.push(node.name);}return _2c7;},_dumpTokens:function(tree,_2c9){var _2ca=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_2ca){for(var i=0;i<tree.tokens.length;++i){this.LOGGER.trace("_dumpTokens()","["+_2c9[tree.tokens[i]].frequency+", \""+tree.tokens[i]+"\"]");}}},_buildTree:function(_2cb){var _2cc={};var len=_2cb.length;var node,i;for(i=len-1;i>=0;--i){var _2cd=_2cb[i];node=_2cc[_2cd];if(node){node.frequency++;}else{node={frequency:1,name:_2cd};_2cc[_2cd]=node;}}var _2ce=[];for(node in _2cc){if(Object.prototype.hasOwnProperty.call(_2cc,node)){_2ce.push(_2cc[node]);}}_2ce.sort(this._frequencyCompare);while(_2ce.length>1){var left=_2ce.shift(),_2cf=_2ce.shift();_2ce.push({frequency:left.frequency+_2cf.frequency,left:left,right:_2cf});_2ce.sort(this._frequencyCompare);}var root=_2ce[0];var tree=this._initTree(this._initStream({tokens:[]}),_2ce.shift(),[]);this._dumpTokens(tree,_2cc);var url=this._encodeStream(tree);len=tree.tokens.length;for(i=0;i<len;++i){url+="/"+com.ibm.mm.enabler.encode.huffman.ZEncoder.zEncode(tree.tokens[i]);}url+="/"+this._encodeTokens(this._initStream({}),_2cc,_2cb);return url;},_buildTreeFromRegex:function(data,_2d0){var _2d1=new RegExp(_2d0,"g");var pos=[];var _2d2;while((_2d2=_2d1.exec(data))){pos.push(_2d2.index);}if(pos[0]){pos.unshift(0);}if(pos[pos.length-1]!=data.length){pos.push(data.length);}var _2d3=[];for(_2d2=1;_2d2<pos.length;++_2d2){_2d3.push(data.substring(pos[_2d2-1],pos[_2d2]));}return this._buildTree(_2d3);},createRawSchemeSpecificPartFromTokens:function(_2d4){return this._buildTree(_2d4);},createRawSchemeSpecificPartFromRegex:function(data,_2d5){return this._buildTreeFromRegex(data,_2d5);},getDataFromHuffmanTree:function(tree){return this._restoreData(tree);},_restoreData:function(tree){if(!tree){return null;}var i0=tree.indexOf("/");var i1=tree.lastIndexOf("/");if((i0>=0)&&(i1>=0)){var _2d6=this._decodeBase64(tree.substring(0,i0));var _2d7=tree.substring(i0+1,i1).split("/");var _2d8=this._decodeBase64(tree.substring(i1+1));encodedTokens=this._decodeTokens(_2d7);var root=this._readStructure(this._convertBitToChar(_2d6),encodedTokens);var _2d9=this._convertBitToChar(_2d8);var _2da="";while(_2d9.length>0){_2da=this._buildData(_2da,_2d9,root);}return _2da;}return null;},_buildData:function(_2db,_2dc,root){var _2dd=false;var node=null;while(!_2dd){var bit=_2dc.shift();if(typeof bit=="undefined"){node=null;break;}node=this._getNode(bit,root);if(node&&node.token&&node.token){_2dd=true;}else{if(!node){_2dd=true;}}root=node;}if(_2dd&&node){_2db=_2db.concat(node.token);}return _2db;},_getNode:function(bit,_2de){var node=null;node=(bit==1)?_2de.right:_2de.left;if(!node){return null;}return node;},_convertBitToChar:function(_2df){var arr=[];var mask=1;var bit=0;for(var i=0;i<_2df.length;i++){var _2e0=_2df[i];for(var j=0;j<8;j++){bit=_2e0&mask;arr.push(bit);_2e0=(_2e0>>1);}}return arr;},_readStructure:function(_2e1,_2e2){var bit=_2e1.shift();var node={};if(bit==1){node.left=this._readStructure(_2e1,_2e2);node.right=this._readStructure(_2e1,_2e2);}else{var _2e3=_2e2.shift();node.token=_2e3;}return node;},_decodeTokens:function(_2e4){var arr=[];for(var i in _2e4){if(Object.prototype.hasOwnProperty.call(_2e4,i)){arr.push(com.ibm.mm.enabler.encode.huffman.ZEncoder.zDecode(_2e4[i]));}}return arr;}});com.ibm.mm.enabler.encode.huffman.HuffmanURL=new com.ibm.mm.enabler.encode.huffman.HuffmanURL();}if(!dojo._hasResource["com.ibm.mm.enabler.ArrayMap"]){dojo._hasResource["com.ibm.mm.enabler.ArrayMap"]=true;dojo.provide("com.ibm.mm.enabler.ArrayMap");dojo.declare("com.ibm.mm.enabler.ArrayMap",null,{constructor:function(){this.entries=[];this.keys={};},values:function(){return this.entries;},put:function(key,_2e5){var _2e6=this.keys[key];if(typeof _2e6!="undefined"&&_2e6!==null){this.entries[_2e6]=_2e5;}else{_2e6=this.entries.length;this.entries.push(_2e5);this.keys[key]=_2e6;}},getKey:function(_2e7){if(_2e7<this.entries.length){for(var key in this.keys){if(Object.prototype.hasOwnProperty.call(this.keys,key)){var temp=this.keys[key];if(temp!==null&&temp==_2e7){return temp;}}}}else{return null;}},getValue:function(_2e8){return (_2e8<this.entries.length)?this.entries[_2e8]:null;},get:function(key){var _2e9=this.keys[key];if(typeof _2e9!="undefined"&&_2e9!==null){var _2ea=this.entries[_2e9];return _2ea;}return null;},remove:function(key){var _2eb=this.keys[key];if(typeof _2eb!="undefined"&&_2eb!==null){this.entries.splice(_2eb,1);this.keys[key]=null;}return _2eb;},size:function(){return this.entries.length;},keySet:function(){var arr=[];com.ibm.mm.enabler.utils.Misc.forIn(this.keys,function(_2ec,key){arr.push(key);});return arr;}});}if(!dojo._hasResource["com.ibm.mm.enabler.io.XHRMultipartImpl"]){dojo._hasResource["com.ibm.mm.enabler.io.XHRMultipartImpl"]=true;dojo.provide("com.ibm.mm.enabler.io.XHRMultipartImpl");dojo.declare("com.ibm.mm.enabler.io.XHRMultipartImpl",[com.ibm.mashups.enabler.io.XHRMultipart,com.ibm.mm.enabler.ServiceDocConsumer],{LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,DYN_RES:com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.io.DynamicResolver.SERVICE_NAME),SCOPE_PUBLIC:"public",SCOPE_PRIVATE:"private",CONTENT_TYPE_SOAP:"application/soap+xml",statics:{semaphore:0,digest:null,suspendedXhr:null},constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);var _2ed="constructor()";var _2ee=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_2ee){this.LOGGER.entering(_2ed);}this.method="POST";this.partsArray={};this.partsArray[this.SCOPE_PUBLIC]=null;this.partsArray[this.SCOPE_PRIVATE]=null;var _2ef=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.correlateHosts=_2ef.getValue(com.ibm.mashups.enabler.services.ConfigConstants.MULTIPART_CORRELATE_HOSTS);this.correlatedHosts=null;this.cacheQueries=false;var _2f0=_2ef.getValue(com.ibm.mashups.enabler.services.ConfigConstants.MULTIPART_CACHE_QUERIES);if(typeof (_2f0)!=="undefined"&&_2f0!==null&&_2f0===true){this.cacheQueries=true;}this.splitPublic=false;var _2f1=_2ef.getValue(com.ibm.mashups.enabler.services.ConfigConstants.MULTIPART_SPLIT_PUBLIC);if(typeof (_2f1)!=="undefined"&&_2f1!==null&&_2f1===true){this.splitPublic=true;}this.splitTransactions=false;var _2f2=_2ef.getValue(com.ibm.mashups.enabler.services.ConfigConstants.MULTIPART_SPLIT_TRANSACTIONS);if(typeof (_2f2)!=="undefined"&&_2f2!==null&&_2f2===true){this.splitTransactions=true;}this.useSinkForModRequests=false;var _2f3=_2ef.getValue(com.ibm.mashups.enabler.services.ConfigConstants.MULTIPART_USE_SINK);if(typeof (_2f3)!=="undefined"&&_2f3!==null&&_2f3===true){this.useSinkForModRequests=true;}this.privateUrl=_2ef.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT)+_2ef.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);this.publicUrl=_2ef.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT)+_2ef.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);this.doSiteMap=true;this.urlMaxLength=2000;this.boundary="{EB2F8DA2-5B2C-F66A-CDD0-A2D42143F5AC}";this.newL="\r\n";this.sep="--";this.startB=this.newL+this.sep+this.boundary+this.newL;this.endB=this.sep+this.boundary+this.sep+this.newL;this.headerRegx=new RegExp(this.newL+"s*([^\r]*)s*","mg");this.headerPartsRegx=/\s*([^:]*):\s*(.+)/;this.boundaryRegx=/boundary\s*=\s*\"?([^\"]*)\"?/;this.multipartParts=false;this.replaceDigest=false;this.digest=null;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=nsf.getNameSpaces([nsf.NS_ENV,nsf.NS_XML]);if(_2ee){this.LOGGER.trace(_2ed,"Multipart is enabled - ${0}",this.doMultipart);this.LOGGER.exiting(_2ed);}},_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);this.doMultipart=com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled();if(this.doMultipart){this.serviceMPJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData([com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MODEL,com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MULTIPART]);this.serviceSMJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData([com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MODEL,com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_HUFFMAN]);this.serviceCHJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData([com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MODEL,com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_SITEMAP_COMMITHANDLER]);}},_partHandler:function(_2f4,_2f5,_2f6,_2f7){var work=dojo.hitch(_2f4,function(){try{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_2f5,Error)){if(this.error){this.error(_2f5,_2f6,_2f7);}}else{if(_2f6.xhr.status>=400){if(this.error){this.error(new Error(_2f6.xhr.status+": "+_2f7.URI),_2f6,_2f7);}}else{if(this.load){this.load(_2f5,_2f6,_2f7);}}}if(this.handle){this.handle(_2f5,_2f6,_2f7);}}catch(err){try{if(this.error){this.error(_2f5,_2f6,_2f7);}}catch(err2){}}});work();},_handleMultiPartResponse:function(_2f8,_2f9,_2fa,_2fb,_2fc){var _2fd=_2fc.xhr.getResponseHeader("Content-Type");var _2fe=_2fd.match(_2fa.boundaryRegx);if(!_2fe){throw new Error("No boundary specified in Content-Type response header");}var _2ff=_2fe[1];var _300=_2ff.indexOf(";");if(_300!=-1){_2ff=_2ff.substring(0,_300);}var _301=new RegExp(_2fa.newL+_2fa.sep+_2ff,"mg");var _302=_2fb.split(_301);var _303=null;if(_2f9){_303=new com.ibm.mm.enabler.io.XHRMultipartImpl();_303.startTransaction();}var i=1;for(var _304 in _2f8){if(Object.prototype.hasOwnProperty.call(_2f8,_304)){var _305=_2f8[_304];for(var x=0,l=_305.length;x<l;x++){var _306=_305[x];var part=_302[i++];var _307={};var _308=null;var _309=null;var _2fd=null;var _30a=null;_2fa.headerRegx.lastIndex=0;while((_308=_2fa.headerRegx.exec(part))!==null&&(_308[1].length>0)){if(-1==_308[1].indexOf(":")){continue;}if(-1==_308[1].indexOf("digest=")){var _30b=_308[1].match(_2fa.headerPartsRegx);_307[_30b[1]]=_30b[2];if(_30b[1]=="X-Status-Code"){_309=_30b[2];}else{if(_30b[1]=="Content-Type"){_2fd=_30b[2];}else{if(_30b[1]=="Content-Language"){_30a=_30b[2];}}}}}part=dojo.string.trim(part.substr(_2fa.headerRegx.lastIndex+_2fa.newL.length));var _30c="";var _30d="";var _30e=parseInt(_309,10);if(_30e<400){_30d=part;if(_306.handleAs=="xml"){_30c=com.ibm.mm.enabler.utils.Dom.createDocument(part);}else{_30c=dojo.contentHandlers[_306.handleAs]({responseText:part});}}else{if(_2fd&&_2fd.indexOf(this.CONTENT_TYPE_SOAP)===0){var _30f=com.ibm.mm.enabler.utils.Dom.createDocument(part);var _310="env:Fault/env:Reason/env:Text/@xml:lang";var _311=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_310,_30f,this.ns);if(!_30a){_30a=_2fc.xhr.getResponseHeader("Content-Language");}var _312=null;if(_30a&&_311){var _313=dojo.map(_311,function(node){return node.textContent;});_312=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_30a,_313);}var expr="env:Fault/env:Reason/env:Text";if(_312){expr+="[@xml:lang='"+_312+"']";}var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_30f,this.ns);if(node){_30d=com.ibm.mm.enabler.utils.Dom.textContent(node);_30c=_30d;}}}var _314=new com.ibm.mm.enabler.io.XHRWrapper(_2fc,_30d,_30e,_2fd,_307);var xhr=_2fc.xhr;_2fc.xhr=_314;_2fa._partHandler(_306,_30c,_2fc,_307);_2fc.xhr=xhr;}}}if(_2f9){var _315=false;if(_2fc&&_2fc["com.ibm.mm.Multipart.forceOnNextResponse"]){_315=_2fc["com.ibm.mm.Multipart.forceOnNextResponse"];}_303.endTransactionDeferred(_315).start();}},_multiPartXhr:function(_316,args,_317,_318){var body="";var _319=null;for(var _31a in _317){if(Object.prototype.hasOwnProperty.call(_317,_31a)){for(var _31b in _317[_31a]){if(Object.prototype.hasOwnProperty.call(_317[_31a],_31b)){var part=_317[_31a][_31b];part.handleAs=part.handleAs?part.handleAs.toLowerCase():"text";_319="";for(var x in part.headers){if(Object.prototype.hasOwnProperty.call(part.headers,x)){_319+=x+": "+part.headers[x]+this.newL;}}body+=this.startB+_319+this.newL;if(part.data&&part.data.length>1){body+=part.data+this.newL;}else{if(part.postData&&part.postData.length>1){body+=part.postData+this.newL;}else{if(part.putData&&part.putData.length>1){body+=part.putData+this.newL;}}}}}}}body+=this.endB;if(_316.toUpperCase()!="PUT"){_316="POST";}var me=this;var _31c;var _31d=dojo.mixin({},args,{load:function(_31e,_31f){me._handleMultiPartResponse(_317,_318,me,_31e,_31f);_31c=_31f.xhr.status;},error:function(_320,_321){for(var part in _317){for(var x=0,l=part.length;x<l;x++){var _322=part[x];me._partHandler(_322,_320,_321,null);}}_31c=_321.xhr.status;if(_31c==401){me._doLogin();}},headers:{"Content-type":"multipart/mixed; boundary=\""+me.boundary+"\""},handleAs:"text",form:null,content:null,postData:null,putData:null});_31d[_316.toLowerCase()+"Data"]=body;dojo.xhr(_316,_31d,true);return _31c;},_doLogin:function(){dojo["require"]("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");dojo["require"]("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");var pid=null;var url=document.location.href;var cb=function(url){if(url){top.location.href=url;}};var _323=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator().getUrl(_323,cb,{nohash:"true"});},suspendTransaction:function(){if(0===this.statics.semaphore){return;}if(this.statics.suspendedXhr){return;}this.statics.suspendedXhr=dojo.xhr;dojo.xhr=this.statics.oldXhr;},resumeTransaction:function(){if(0===this.statics.semaphore){return;}if(!this.statics.suspendedXhr){return;}dojo.xhr=this.statics.suspendedXhr;this.statics.suspendedXhr=null;},startTransaction:function(_324){var _325="startTransaction()";var _326=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_326){this.LOGGER.entering(_325);}this._initServiceDoc();if(!this.doMultipart){if(_326){this.LOGGER.exiting(_325);}return;}this._acquire();if(1<this.statics.semaphore){if(_326){this.LOGGER.exiting(_325);}return;}if(_324){if(this.statics.context&&this.statics.context!=_324){_326&&this.LOGGER.trace(_325,"ignoring transaction context '${0}'",_324);}else{this.statics.context=_324;}_326&&this.LOGGER.trace(_325,"transaction context: '${0}'",this.statics.context);}else{if(this.statics.context){delete this.statics.context;_326&&this.LOGGER.trace(_325,"removing transaction context '${0}'",this.statics.context);}}if(this.correlateHosts){this.correlatedHosts=new com.ibm.mm.enabler.ArrayMap();}else{this.partsArray[this.SCOPE_PUBLIC]={};this.partsArray[this.SCOPE_PRIVATE]={};}this.statics.oldXhr=dojo.xhr;dojo.xhr=dojo.hitch(this,function(_327,args,_328){var _329="mp - dojo.hitch()";var _32a=this.LOGGER.isLoggable(this.LOG_LEVEL);var dfd;if(_32a){this.LOGGER.entering(_329,[_327,args,_328]);}if(args.sync){dfd=this.statics.oldXhr(_327,args,_328);if(_32a){this.LOGGER.exiting(_329);}return dfd;}var res=this.DYN_RES.getResolver.apply(this.DYN_RES,arguments);if(res){dfd=res.apply(this,arguments);if(_32a){this.LOGGER.exiting(_329);}return dfd;}var _32b=this.statics.context;var _32c=args.ibmMultipart&&args.ibmMultipart.context;if(_32b&&(!_32c||_32c!=_32b)){_32a&&this.LOGGER.trace(_329,"excluding dojo.xhr from multipart request due to non-matching xhr context '${0}'",_32c);dfd=this.statics.oldXhr(_327,args,_328);_32a&&this.LOGGER.exiting(_329);return dfd;}var _32d=new com.ibm.mm.enabler.utils.HttpUrl(args.url);var _32e=_32d.getParameter("uri");if(this.doSiteMap&&_327!="GET"){this.doSiteMap=false;}else{if(this.doSiteMap&&(!this.cacheQueries)&&(_327=="GET")&&(_32e)&&(null!==_32e)){this.doSiteMap=false;}}var path=_32d.getPath();var _32f;if(path.indexOf(this.privateUrl)==0){_32f=this.SCOPE_PRIVATE;}else{_32f=this.SCOPE_PUBLIC;}args.method=_327;if(this.correlateHosts){var _330=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);var _331=_32d.server;if(null!==_330){_330+="/";if(args.url.indexOf(_330)===0){var _332=args.url.indexOf("/",_330.length);_331=args.url.substring(0,_332);}}var _333=this.correlatedHosts.get(_331);var _334=this.correlatedHosts.get(_331);if(!_334){_334={};_334[this.SCOPE_PUBLIC]={};_334[this.SCOPE_PRIVATE]={};this.correlatedHosts.put(_331,_334);}this._addToPartsArray(_334[_32f],args);}else{this._addToPartsArray(this.partsArray[_32f],args);}if(_32a){this.LOGGER.exiting(_329);}});if(_326){this.LOGGER.exiting(_325);}},isTransaction:function(){return (0<this.statics.semaphore);},_encodeUrl:function(url,_335){if(_335){return escape(url).replace(/\+/g,"%2B").replace(/%20/g,"+").replace(/\*/g,"%2A").replace(/\//g,"%2F").replace(/@/g,"%40").replace(/%21/g,"!");}return escape(url).replace(/\+/g,"%2B").replace(/%20/g,"+").replace(/\*/g,"%2A").replace(/\//g,"%2F").replace(/@/g,"%40");},_createHuffmanUrl:function(_336){var _337="_createHuffmanUrl(parts)";var _338=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_338){this.LOGGER.entering(_337,[_336]);}var cxml=this._createSiteMap(_336);if(_338){this.LOGGER.trace(_337,"sitemap: ${0}",cxml);}cxml=com.ibm.mm.enabler.encode.huffman.HuffmanURL.createRawSchemeSpecificPartFromRegex(cxml,"[/ ]");if(_338){this.LOGGER.trace(_337,"huffman encoded: ${0}",cxml);}var url;this._initServiceDoc();if(this.serviceSMJson.template.indexOf("{uri_code}")!=-1){cxml=this._encodeUrl(cxml,true);if(_338){this.LOGGER.trace(_337,"code is a parameter, encoding: ${0}",cxml);}url=this.serviceSMJson.template.replace(/\{uri_code\}/,cxml);}else{url=this.serviceSMJson.template.replace(/\{code\}/,cxml);}url=this._updateDigest(url);if(_338){this.LOGGER.exiting(_337,url);}return url;},_loadResources:function(_339){var _33a="_loadResources(parts)";var _33b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_33b){this.LOGGER.entering(_33a,[_339]);}var _33c;if(this.doSiteMap){var url=this._createHuffmanUrl(_339);if(_33b){this.LOGGER.trace(_33a,"url: ${0}",url);}if(url.length>this.urlMaxLength){if(!this.splitTransactions){if(_33b){this.LOGGER.trace(_33a,"url is too long, falling back to POST");}_33c=this._doMultipartPOSTRequest(this.method,_339,this.multipartParts);}else{if(_33b){this.LOGGER.trace(_33a,"url is too long, split transactions is enabled");}_33c=this._doMultipartGETSplitRequest(_339,url);}}else{_33c=this._doMultipartGETRequest(url,_339);}}else{_33c=this._doMultipartPOSTRequest(this.method,_339,this.multipartParts);}return _33c;},_doMultipartGETSplitRequest:function(_33d,_33e){var urls=[];for(var url in _33d){urls.push(url);}if(urls.length==0){return 200;}var _33f;if(!_33e){_33f=this._createHuffmanUrl(_33d);}else{_33f=_33e;}if(_33f.length<=this.urlMaxLength||urls.length==1){return this._doMultipartGETRequest(_33f,_33d);}var half=Math.round(urls.length/2);var left={};for(var i=0;i<half;++i){left[urls[i]]=_33d[urls[i]];}var _340=this._doMultipartGETSplitRequest(left);var _341={};for(var i=half,l=urls.length;i<l;++i){_341[urls[i]]=_33d[urls[i]];}var _342=this._doMultipartGETSplitRequest(_341);return _340>_342?_340:_342;},_doMultipartGETRequest:function(url,_343){var me=this;xhrArgs={url:url,load:function(_344,_345){me._handleMultiPartResponse(_343,me.multipartParts,me,_344,_345);status=_345.xhr.status;},error:function(_346,_347){for(var part in _343){for(var x=0,l=part.length;x<l;x++){var _348=part[x];me._partHandler(_348,_346,_347,null);}}status=_347.xhr.status;},handleAs:"text",sync:true};dojo.xhrGet(xhrArgs);},_loadPartsArray:function(_349){var _34a=0;if(this.splitPublic){if(0!==this._assocArraySize(_349[this.SCOPE_PUBLIC])){_34a=this._loadResources(_349[this.SCOPE_PUBLIC]);}if(0!==this._assocArraySize(_349[this.SCOPE_PRIVATE])){var _34b=this._loadResources(_349[this.SCOPE_PRIVATE]);if(_34b>_34a){_34a=_34b;}}}else{var _34c={};var pub=_349[this.SCOPE_PUBLIC];for(var part in pub){if(Object.prototype.hasOwnProperty.call(pub,part)){for(var i=0,l=pub[part].length;i<l;i++){this._addToPartsArray(_34c,pub[part][i]);}}}var priv=_349[this.SCOPE_PRIVATE];for(var part in priv){if(Object.prototype.hasOwnProperty.call(priv,part)){for(var i=0,l=priv[part].length;i<l;i++){this._addToPartsArray(_34c,priv[part][i]);}}}if(0!==this._assocArraySize(_34c)){_34a=this._loadResources(_34c);}}return _34a;},endTransaction:function(_34d,_34e,_34f){var _350="endTransaction(callback, parameters)";var _351=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_351){this.LOGGER.entering(_350,[_34d,_34e,_34f]);}if(!this.doMultipart){if(_351){this.LOGGER.exiting(_350);}return;}this._release();if(0<this.statics.semaphore){if(_351){this.LOGGER.exiting(_350);}return;}if(_351){this.LOGGER.trace(_350,"Putting back the XHR");}dojo.xhr=this.statics.oldXhr;delete this.statics.context;var _352=false;if(_34d!==undefined){_352=_34d;}var url;var _353;var me=this;var _354=0;var _355;if(this.correlateHosts){var _356=this.correlatedHosts.values();for(var i in _356){if(Object.prototype.hasOwnProperty.call(_356,i)){var _357=_356[i];_355=this._loadPartsArray(_357);if(_355>_354){_354=_355;}}}}else{var _357=this.partsArray;_354=this._loadPartsArray(_357);}if(_354!==0&&_34e){_34e(_34f);}if(_351){this.LOGGER.exiting(_350);}},endTransactionDeferred:function(_358){if(typeof _358!=="undefined"&&true===_358){this.multipartParts=true;}return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._endTransaction);},_endTransaction:function(_359,sync){var _35a="_endTransaction(deferred, sync)";var _35b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_35b){this.LOGGER.entering(_35a,[_359,sync]);}if(!this.doMultipart){if(_35b){this.LOGGER.exiting(_35a);}return;}this._release();if(0<this.statics.semaphore){if(_35b){this.LOGGER.exiting(_35a);}return;}if(_35b){this.LOGGER.trace(_35a,"Putting back the XHR");}dojo.xhr=this.statics.oldXhr;var url;var _35c;var me=this;var _35d;if(this.correlateHosts){var _35e=this.correlatedHosts.values();for(var i in _35e){if(Object.prototype.hasOwnProperty.call(_35e,i)){var _35f=_35e[i];tmpStatus=this._loadPartsArray(_35f);if(tmpStatus>_35d){_35d=tmpStatus;}}}}else{var _35f=this.partsArray;_35d=this._loadPartsArray(_35f);}if(_35d!==0&&_359){var _360=_359.getOperationCallback();if(_360){_360(id,com.ibm.mashups.enabler.DeferredOperation.OPERATION_GET,xhr.status,myDeferred.getOperationCallbackParameters());}}if(_35b){this.LOGGER.exiting(_35a);}},_doMultipartPOSTRequest:function(_361,_362,_363){var _364=this._processMultipartBody(_362);this._initServiceDoc();var _365;if(_364){_365={url:this.serviceCHJson.url,sync:true};}else{_365={url:this.serviceMPJson.url,sync:true};}var _366=this._multiPartXhr(_361,_365,_362,_363);return _366;},_assocArraySize:function(_367){var size=0;for(var x in _367){if(Object.prototype.hasOwnProperty.call(_367,x)){size++;}}return size;},_addToPartsArray:function(_368,args){var _369=_368[args.url];if(!_369){_368[args.url]=[];_368[args.url][0]=args;}else{_369[_369.length]=args;}},_acquire:function(){this.statics.semaphore++;},_release:function(_36a,_36b){this.statics.semaphore--;},_createPocURI:function(args){var _36c="_createPocURI(args)";var _36d=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_36d){this.LOGGER.entering(_36c,args);}var url=args.url;var _36e=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);var _36f=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.LOCALAPPS_REGEX);_36e+="/http/";if(url.indexOf(_36e)===0){var _370="http://";var _371=url.indexOf("/",_36e.length+1);if(_371>-1){_370+=unescape(url.substring(_36e.length,_371));_370+=url.substring(_371);}else{_370="http://"+url.substring(_36e.length);}url=_370;}var _372=new com.ibm.mm.enabler.utils.HttpUrl(url);var _373=this._extractDigest(_372,url);if(_373){if(null===this.digest&&false===this.replaceDigest){this.replaceDigest=true;}else{if(_373!==this.digest){this.replaceDigest=false;}}this.digest=_373;}else{this.digest="";this.replaceDigest=false;}if(args.content){for(var name in args.content){if(Object.prototype.hasOwnProperty.call(args.content,name)){var _374=args.content[name];_372.addParameter(name,_374);}}}var uri="";var _375=_372.isProxyNeeded();var _376=null;if(_36f){_376=new RegExp(_36f);}if((_375)||(_376&&(url.match(_376)))){uri=_372.toString();}else{var _377=(args.method)?args.method.toLowerCase():null;if(_377&&!this.useSinkForModRequests&&(_377=="post"||_377=="put"||_377=="delete")){uri=_372.getParameter("uri");}else{uri="res:"+_372.toServerRelativeString();}}if(_36d){this.LOGGER.trace(_36c,"proxy? ${0}: ${1}",[_375,uri]);}if(_36d){this.LOGGER.exiting(_36c,uri);}return uri;},_processMultipartBody:function(_378){var _379="_processMultipartBody(parts)";var _37a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_37a){this.LOGGER.entering(_379,_378);}var _37b=false;for(var w in _378){if(Object.prototype.hasOwnProperty.call(_378,w)){for(var x in _378[w]){if(Object.prototype.hasOwnProperty.call(_378[w],x)){var args=_378[w][x];var uri=this._createPocURI(args);var _37c=uri;args.headers=dojo.mixin({},args.headers,{"X-Method-Override":args.method,"Content-ID":_37c});if("GET"!==args.method){_37b=true;}}}}}if(_37a){this.LOGGER.exiting(_379,_37b);}return _37b;},_createSiteMap:function(_37d){var _37e="_createSiteMap(parts)";var _37f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_37f){this.LOGGER.entering(_37e,_37d);}var cxml="<mashup:sitemap xmlns:mashup=\"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.2/mashup-sitemap\">";for(var w in _37d){if(Object.prototype.hasOwnProperty.call(_37d,w)){var args=_37d[w][0];args.handleAs=args.handleAs?args.handleAs.toLowerCase():"text";var uri=this._createPocURI(args).replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&amp;");cxml+="<mashup:entry uri=\""+uri+"\" mode=\"download\"/>";}}cxml+="</mashup:sitemap>";if(_37f){this.LOGGER.exiting(_37e,cxml);}return cxml;},_extractDigest:function(_380,url){var _381="_extractDigest(httpUrl, url)";var _382=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_382){this.LOGGER.entering(_381,[_380,url]);}var _383;var _384=_380.getParameter("digest");if(!_384){var _385=url.indexOf("digest!");if(0<_385){_385+=7;var end=url.indexOf("/",_385);_383=url.substring(_385,end);}if(_382){this.LOGGER.trace(_381,"digest portal style - ${0}",_383);}}else{_383=_384;}if(_382){this.LOGGER.exiting(_381,_383);}return _383;},_updateDigest:function(url){var _386="_updateDigest(url)";var _387=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_387){this.LOGGER.entering(_386,url);}if(!this.replaceDigest){if(_387){this.LOGGER.trace(_386,"this.replaceDigest is false, returning");this.LOGGER.exiting(_386,url);}return url;}var _388;var end;var _389=url.indexOf("digest!");if(0<_389){_389+=7;end=url.indexOf("/",_389);_388=url.substring(_389,end);}else{if(!_388){_389=url.indexOf("digest=");if(0<_389){_389+=7;end=url.indexOf("&",_389);if(-1===end){_388=url.substring(_389);}else{_388=url.substring(_389,end);}}}}if(_387){this.LOGGER.trace(_386,"extracted digest - ${0}",_388);}var _38a=url;if(_388){_38a=url.replace(_388,this.digest);}if(_387){this.LOGGER.exiting(_386,_38a);}return _38a;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipart"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipart"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipart");}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipartFactory_API");dojo.provide("com.ibm.mashups.enabler.io.XHRMultipartFactory");dojo.declare("com.ibm.mashups.enabler.io.XHRMultipartFactory",null,{create:function(){},isMultipartEnabled:function(){},isMultipartApplicationWidgets:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.io.XHRMultipartFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.io.XHRMultipartFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.io.XHRMultipartFactoryImpl");dojo.declare("com.ibm.mm.enabler.io.XHRMultipartFactoryImpl",[com.ibm.mashups.enabler.io.XHRMultipartFactory,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(){this._init=false;this.serviceMPJson=null;this.doMultipart=false;var _38b=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _38c=_38b.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PAGE_LOAD_OPTIMIZATION_APP_WIDGETS);this.multipartAppWidgets=false;if(typeof (_38c)=="undefined"||_38c===null||_38c===true){this.multipartAppWidgets=true;}this.CONTEXT_ENABLER="enabler";},_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);if(dojo.exists("com.ibm.mm.enabler.model.ServiceDocumentModel")){this.serviceMPJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData([com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MODEL,com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_MULTIPART]);}if(this.serviceMPJson&&this.serviceMPJson.url){this.doMultipart=true;}},create:function(){return new com.ibm.mm.enabler.io.XHRMultipartImpl();},isMultipartEnabled:function(){if(!this._init){this._init=true;var _38d=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _38e=_38d.getValue(com.ibm.mashups.enabler.services.ConfigConstants.MULTIPART_ENABLED);if(dojo.isIE!=6&&_38e){this._initServiceDoc();}}return this.doMultipart;},isMultipartApplicationWidgets:function(){return this.multipartAppWidgets;}});com.ibm.mashups.enabler.io.XHRMultipartFactory=new com.ibm.mm.enabler.io.XHRMultipartFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory"]){dojo._hasResource["com.ibm.mashups.enabler.io.XHRMultipartFactory"]=true;dojo.provide("com.ibm.mashups.enabler.io.XHRMultipartFactory");dojo.require("com.ibm.mm.enabler.io.XHRMultipartFactoryImpl");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.Accessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.Accessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.Accessor");dojo.declare("com.ibm.mashups.enabler.model.state.Accessor",null,{});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.PageAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.PageAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{getPageID:function(){},setPageID:function(_38f){},confirmSetPageID:function(_390){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.PageAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.PageAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.PageAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.PageAccessorImpl",[com.ibm.mashups.enabler.model.state.PageAccessor],{constructor:function(_391,_392){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);if(this.bIsLoggable){this.LOGGER.entering("constructor");this.LOGGER.trace("constructor","spaceId:"+_392);}this.navStateModel=_391;if(_392){this.spaceid=_392;}},getPageID:function(){var _393=this.navStateModel._state;var rc=null;if(!_393){return null;}if(!this.spaceid){if(_393.pid){if(this.bIsLoggable){this.LOGGER.trace("getPageID","No required pace is defined, return Pageid"+_393.pid.value);}return _393.pid.value;}if(this.bIsLoggable){this.LOGGER.trace("getPageID","No required space is defined, no pid is defined in state return null");}return null;}else{if(_393.pageselection&&_393.pageselection[this.spaceid]){if(this.bIsLoggable){this.LOGGER.trace("getPageID","return pid:"+_393.pageselection[this.spaceid]+" for space:"+this.spaceid);}return _393.pageselection[this.spaceid].value;}if(this.bIsLoggable){this.LOGGER.trace("getPageID","No page is found for required space "+this.spaceid+" return null");}return null;}if(this.bIsLoggable){this.LOGGER.trace("getPageID","return null");}return null;},setPageID:function(_394){if(this.bIsLoggable){this.LOGGER.trace("setPageID","pageId:"+_394);}var _395=this.navStateModel._state;if(!_395){this.navStateModel._state={};_395=this.navStateModel._state;}if(!_394){_395.pid=null;if(this.spaceid){if(_395.pageselection&&_395.pageselection[this.spaceid]){_395.pageselection[this.spaceid]=null;}}this.navStateModel.setDirty(true,"pid");return;}var lm=new Date().getTime();_395.pid=_395.pid?_395.pid:{};_395.pid.value=_394;_395.pid.params=_395.pid.params?_395.pid.params:{};_395.pid.params.lm=lm;if(this.spaceid){if(!_395.pageselection){_395.pageselection={};}if(!_395.pageselection[this.spaceid]){_395.pageselection[this.spaceid]={};}_395.pageselection[this.spaceid].value=_394;_395.pageselection[this.spaceid].params=_395.pageselection[this.spaceid].params?_395.pageselection[this.spaceid].params:{};_395.pageselection[this.spaceid].params.lm=lm;}this.navStateModel.setDirty(true,"pid");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.SpaceAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.SpaceAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.SpaceAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{getSpaceID:function(){},setSpaceID:function(_396){},confirmSetSpaceID:function(_397){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.SpaceAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.SpaceAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.SpaceAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.SpaceAccessorImpl",[com.ibm.mashups.enabler.model.state.SpaceAccessor],{constructor:function(_398){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);if(this.bIsLoggable){this.LOGGER.entering("constructor");}this.navStateModel=_398;},getSpaceID:function(){var _399=this.navStateModel._state;if(!_399){return null;}if(_399.sid&&_399.sid.value){if(this.bIsLoggable){this.LOGGER.trace("getSpaceID","sid:"+_399.sid.value);}return _399.sid.value;}if(this.bIsLoggable){this.LOGGER.trace("getSpaceID","sid:null");}return null;},_setSpaceIDInternal:function(_39a){var _39b=this.navStateModel._state;if(!_39b){this.navStateModel._state={};_39b=this.navStateModel._state;}var lm=new Date().getTime();if(typeof _39a=="undefined"){_39b.sid={};}else{_39b.sid=_39b.sid?_39b.sid:{};_39b.sid.value=_39a;_39b.sid.params=_39b.sid.params?_39b.sid.params:{};_39b.sid.params.lm=lm;}if(_39b.pid){_39b.pid=null;}},setSpaceID:function(_39c){if(this.bIsLoggable){this.LOGGER.trace("setSpaceID","sid:"+_39c);}this._setSpaceIDInternal(_39c);this.navStateModel.setDirty(true,"sid");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.SpaceAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.SpaceAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.WidgetAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.WidgetAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.WidgetAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{constructor:function(_39d,id){},getWidgetID:function(){},getWidgetStateValues:function(key){},getWidgetState:function(key){},setWidgetState:function(key,_39e){},confirmSetWidgetState:function(key,_39f){return true;},setWidgetState:function(key,_3a0){},confirmSetWidgetState:function(key,_3a1){return true;},removeWidgetState:function(key){},confirmRemoveWidgetState:function(key){return true;},getWidgetStateNames:function(){},getWidgetMode:function(){},setWidgetMode:function(mode){},confirmSetWidgetMode:function(mode){return true;},getWindowState:function(){},setWindowState:function(_3a2){},confirmSetWindowState:function(_3a3){return true;},getSize:function(){},setSize:function(_3a4,_3a5){},confirmSetSize:function(_3a6,_3a7){return true;},MIN:"minimize",MAX:"maximize",NORMAL:"normal"});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.WidgetAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.WidgetAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.WidgetAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.WidgetAccessorImpl",[com.ibm.mashups.enabler.model.state.WidgetAccessor],{constructor:function(_3a8,id){this.navStateModel=_3a8;this.wid=id;this.uniqueWid=this._getUniqueWid();this.widgetNavStateNode=_3a8._find(this.WIDGET_PREFIX+this.navStateModel.DELIMITER+this.uniqueWid);if(this.wid!=this.uniqueWid&&!this.widgetNavStateNode){this.widgetNavStateNodeFallback=_3a8._find(this.WIDGET_PREFIX+this.navStateModel.DELIMITER+this.wid);}},WIDGET_PREFIX:"wparams",WIDTH:"w",HEIGHT:"h",WINDOWSTATE:"st",SYSTEMSTATE:"rp",CUSTOMSTATE:"cp",VALUE:"value",PARAMS:"params",MODE:"md",RP:{w:"w",h:"h",st:"st",md:"md"},VIEW:"view",getWidgetID:function(){return this.wid;},_getUniqueWid:function(){return this.navStateModel._getUniqueWid(this.wid);},getWidgetStateSet:function(){var _3a9=null;if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3aa=this.widgetNavStateNode;if(!_3aa){_3aa=this.widgetNavStateNodeFallback;}var data=_3aa.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){_3a9=data[this.VALUE][this.CUSTOMSTATE];}}if(_3a9&&!dojo.isString(_3a9)){_3a9=dojo.toJson(_3a9);}return _3a9;},_createWidgetNavStateNode:function(){var _3ab=this.navStateModel.create({key:this.uniqueWid});var _3ac=this.navStateModel._find(this.WIDGET_PREFIX);if(!_3ac){var temp=this.navStateModel.create({key:this.WIDGET_PREFIX});this.navStateModel.insert(temp,this.navStateModel._getRoot());_3ac=this.navStateModel._find(this.WIDGET_PREFIX);}this.navStateModel.insert(_3ab,_3ac);_3ab=this.navStateModel._find(this.WIDGET_PREFIX+this.navStateModel.DELIMITER+this.uniqueWid);return _3ab;},setWidgetStateSet:function(_3ad){var _3ae=null;if(dojo.isString(_3ad)){try{_3ad=dojo.fromJson(_3ad);}catch(e){}}if(!this.widgetNavStateNode){this.widgetNavStateNode=this._createWidgetNavStateNode();}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){_3ae=dojo.clone(data[this.VALUE][this.CUSTOMSTATE]);}}data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};var obj=_3ad;if(_3ae&&!dojo.isString(_3ae)&&!dojo.isString(_3ad)){obj=dojo.mixin(_3ae,_3ad);}data[this.VALUE][this.CUSTOMSTATE]=obj;this.navStateModel.setDirty(true);return this;},_getWidgetSystemState:function(key){var _3af=null;if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3b0=this.widgetNavStateNode;if(!_3b0){_3b0=this.widgetNavStateNodeFallback;}var data=_3b0.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.SYSTEMSTATE]){data=data[this.VALUE][this.SYSTEMSTATE];if(data&&data[key]){_3af=data[key];}}}return _3af;},_setWidgetSystemState:function(key,_3b1){if(!this.widgetNavStateNode){this.widgetNavStateNode=this._createWidgetNavStateNode();}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();var _3b2=null;data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};data[this.VALUE][this.SYSTEMSTATE]=data[this.VALUE][this.SYSTEMSTATE]?data[this.VALUE][this.SYSTEMSTATE]:{};_3b2=data[this.VALUE][this.SYSTEMSTATE];_3b2[key]=_3b1;this.navStateModel.setDirty(true);return this;},getWidgetState:function(key){var rc=this._getWidgetStateValue(key)||null;if(!rc){return null;}if(!dojo.isString(rc)){rc=dojo.toJson(rc);}return rc;},_getWidgetStateValue:function(key){if(!key){return null;}if(key&&key=="cp"){return this.getWidgetStateSet();}if(this.RP[key]){return this._getWidgetSystemState(key);}var _3b3=null;if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3b4=this.widgetNavStateNode;if(!_3b4){_3b4=this.widgetNavStateNodeFallback;}var data=_3b4.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){data=data[this.VALUE][this.CUSTOMSTATE];if(dojo.isString(data)){return null;}if(data&&data[key]){_3b3=data[key];}}}return _3b3;},getWidgetStateValues:function(key){var rc=this._getWidgetStateValue(key)||null;if(!rc){return null;}if(dojo.isString(rc)){var arr=[];arr.push(rc);return arr;}return rc;},getWidgetStateNames:function(){var _3b5=[];if(!this.widgetNavStateNode&&!this.widgetNavStateNodeFallback){return null;}var _3b6=this.widgetNavStateNode;if(!_3b6){_3b6=this.widgetNavStateNodeFallback;}var data=_3b6.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.CUSTOMSTATE]){data=data[this.VALUE][this.CUSTOMSTATE];if(dojo.isString(data)){return null;}if(data){for(var i in data){if(Object.prototype.hasOwnProperty.call(data,i)){if(data[i]){_3b5.push(i);}}}}}}if(_3b5.length===0){return null;}return _3b5;},setWidgetState:function(key,_3b7){if(!key||!_3b7){return null;}if(key&&key=="cp"){return this.setWidgetStateSet(_3b7);}var _3b8=false;if(dojo.isArray(_3b7)&&_3b7.length>=1){if(dojo.isString(_3b7[0])){_3b8=true;}}if(!_3b8){if(dojo.isString(_3b7)){_3b8=true;}}if(!_3b8){return null;}if(this.RP[key]){return this._setWidgetSystemState(key,_3b7);}if(key&&key=="cp"){return this.setWidgetStateSet(_3b7);}if(!this.widgetNavStateNode){this.widgetNavStateNode=this._createWidgetNavStateNode();}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();var _3b9=null;data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};data[this.VALUE][this.CUSTOMSTATE]=data[this.VALUE][this.CUSTOMSTATE]?data[this.VALUE][this.CUSTOMSTATE]:{};_3b9=data[this.VALUE][this.CUSTOMSTATE];_3b9[key]=_3b7;this.navStateModel.setDirty(true);return this;},removeWidgetState:function(key){if(!key){return false;}if(this.RP[key]){return this._removeWidgetSystemState(key);}if(!this.widgetNavStateNode){return false;}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(key&&key=="cp"){if(data&&data[this.VALUE]&&data[this.VALUE][this.CUSTOMSTATE]){data[this.VALUE][this.CUSTOMSTATE]=null;this.navStateModel.setDirty(true);return true;}return false;}if(data&&data[this.VALUE]&&data[this.VALUE][this.CUSTOMSTATE]){var _3ba=data[this.VALUE][this.CUSTOMSTATE];if(_3ba&&_3ba[key]){_3ba[key]=null;this.navStateModel.setDirty(true);return true;}}return false;},_removeWidgetSystemState:function(key){if(!key){return false;}if(!this.widgetNavStateNode){return false;}var data=this.widgetNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(data&&data[this.VALUE]&&data[this.VALUE][this.SYSTEMSTATE]){var _3bb=data[this.VALUE][this.SYSTEMSTATE];if(_3bb&&_3bb[key]){_3bb[key]=null;this.navStateModel.setDirty(true);return true;}}return false;},getWindowState:function(){rc=this._getWidgetSystemState(this.WINDOWSTATE);return rc;},setWindowState:function(_3bc){if(_3bc&&(_3bc==this.MIN||_3bc==this.MAX||_3bc==this.NORMAL)){this._setWidgetSystemState(this.WINDOWSTATE,_3bc);}},getWidgetMode:function(){var rc=this._getWidgetSystemState(this.MODE);return rc;},setWidgetMode:function(_3bd){if(_3bd){this._setWidgetSystemState(this.MODE,_3bd);return this;}return null;},getSize:function(){var size={};var _3be=this._getWidgetSystemState(this.HEIGHT);var _3bf=this._getWidgetSystemState(this.WIDTH);if(_3be){size[this.HEIGHT]=_3be;}if(_3bf){size[this.WIDTH]=_3bf;}if(!size[this.HEIGHT]&&!size[this.WIDTH]){return null;}return size;},setSize:function(_3c0,_3c1){if(_3c0){this._setWidgetSystemState(this.WIDTH,_3c0);}if(_3c1){this._setWidgetSystemState(this.HEIGHT,_3c1);}return this;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.WidgetAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.WidgetAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageModeAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.PageModeAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.PageModeAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{VIEW:"view",EDIT:"edit",getPageMode:function(){},setPageMode:function(_3c2){},confirmSetPageMode:function(_3c3){return true;}});com.ibm.mashups.enabler.model.state.PageModeAccessor.VIEW="view";com.ibm.mashups.enabler.model.state.PageModeAccessor.EDIT="edit";}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.PageModeAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.PageModeAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.PageModeAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.PageModeAccessorImpl",[com.ibm.mashups.enabler.model.state.PageModeAccessor],{constructor:function(_3c4){this.navStateModel=_3c4;},getPageMode:function(){var _3c5=this.navStateModel._getPageMode();if(!_3c5){return null;}return _3c5;},setPageMode:function(mode){if(mode){this.navStateModel._setPageMode(mode);}return;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.PageModeAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.PageModeAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{getId:function(){},getScope:function(){},getAllNames:function(){},setItemValue:function(_3c6,_3c7){},confirmSetItemValue:function(_3c8,_3c9){return true;},removeItem:function(_3ca){},confirmRemoveItem:function(_3cb){return true;},getItemValue:function(_3cc){},registerListener:function(_3cd){},removeListener:function(_3ce){},confirmRemoveListener:function(_3cf){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl",[com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor],{DELETE_TOKEN:"DELETE_TOKEN",TYPE_NEW:"newItem",TYPE_UPDATE:"changedValue",TYPE_REMOVE:"removedItem",constructor:function(_3d0,name,_3d1){if(!_3d1){this.scope=com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl.GLOBAL_SCOPE;}else{this.scope=_3d1;}this.name=name;this.navStateModel=_3d0;this.navStateNode=_3d0._find("sparams"+this.navStateModel.DELIMITER+name+this.navStateModel.DELIMITER+this.scope);},_createNavStateNode:function(){var temp;var _3d2=this.navStateModel._find("sparams");if(!_3d2){temp=this.navStateModel.create({key:"sparams"});this.navStateModel.insert(temp,this.navStateModel._getRoot());_3d2=this.navStateModel._find("sparams");}var _3d3=this.navStateModel._find(this.name);if(!_3d3){temp=this.navStateModel.create({key:this.name});this.navStateModel.insert(temp,_3d2);_3d3=this.navStateModel._find("sparams"+this.navStateModel.DELIMITER+this.name);}var _3d4=this.navStateModel.create({key:this.scope});this.navStateModel.insert(_3d4,_3d3);_3d4=this.navStateModel._find("sparams"+this.navStateModel.DELIMITER+this.name+this.navStateModel.DELIMITER+this.scope);return _3d4;},getId:function(){return this.name;},getScope:function(){return this.scope;},getAllNames:function(){if(!this.navStateNode){return null;}var arr=[];var data=this.navStateNode.getRef();if(data&&data[this.navStateModel.VALUE]){for(var i in data[this.navStateModel.VALUE]){if(data[this.navStateModel.VALUE].hasOwnProperty(i)){var _3d5=data[this.navStateModel.VALUE][i][this.navStateModel.VALUE];if(_3d5&&_3d5!=this.DELETE_TOKEN){arr.push(i);}}}}return arr;},setItemValue:function(_3d6,_3d7){if(!this.navStateNode){this.navStateNode=this._createNavStateNode();}var data=this.navStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();data.value=data.value?data.value:{};var _3d8={};if(!data.value[_3d6]){data.value[_3d6]={};data.value[_3d6].value=_3d7;data.value[_3d6].params=data.value[_3d6].params?data.value[_3d6].params:{};data.value[_3d6].params._isDirty=true;_3d8.alias=_3d6;_3d8.type=this.TYPE_NEW;_3d8.newVal=_3d7;data.value[_3d6].params._change=_3d8;}else{if(data.value[_3d6]){var _3d9=dojo.clone(data.value[_3d6].value);data.value[_3d6].value=_3d7;data.value[_3d6].params=data.value[_3d6].params?data.value[_3d6].params:{};var _3da=data.value[_3d6].params._isDirty;if(_3da){_3d8=data.value[_3d6].params._change;if(_3d8.type==this.TYPE_NEW){_3d8.newVal=_3d7;}else{if(_3d8.type==this.TYPE_UPDATE){_3d8.newVal=_3d7;}else{if(_3d8.type==this.TYPE_REMOVE){if(_3d8.oldVal){_3d8.type=this.TYPE_UPDATE;}else{_3d8.type=this.TYPE_NEW;}_3d8.newVal=_3d7;}}}}else{_3d8.type=this.TYPE_UPDATE;_3d8.oldVal=_3d9;_3d8.newVal=_3d7;_3d8.alias=_3d6;data.value[_3d6].params._change=_3d8;}data.value[_3d6].params._isDirty=true;}}this.navStateModel.setDirty(true);return true;},removeItem:function(_3db){if(!this.navStateNode){return false;}var data=this.navStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();if(data&&data[this.navStateModel.VALUE]){if(data[this.navStateModel.VALUE][_3db]){var _3dc=data[this.navStateModel.VALUE][_3db];var _3dd=dojo.clone(_3dc.value);_3dc.value=this.DELETE_TOKEN;_3dc.params=_3dc.params?_3dc.params:{};var _3de=_3dc.params._isDirty;var _3df={};if(_3de){_3df=_3dc.params._change;if(_3df.type==this.TYPE_NEW){delete data[this.navStateModel.VALUE][_3db];}else{if(_3df.type==this.TYPE_UPDATE){_3df.type=this.TYPE_REMOVE;_3df.newVal=null;delete _3df.oldVal;}}}else{_3df.type=this.TYPE_REMOVE;_3df.alias=_3db;_3df.oldVal=_3dd;_3dc.params._change=_3df;_3dc.params._isDirty=true;}this.navStateModel.setDirty(true);}else{return false;}}return true;},getItemValue:function(_3e0){if(!this.navStateNode){return null;}var data=this.navStateNode.getRef();if(data&&data[this.navStateModel.VALUE]){if(data[this.navStateModel.VALUE][_3e0]){var _3e1=data[this.navStateModel.VALUE][_3e0];var _3e2=_3e1[this.navStateModel.VALUE];if(_3e2&&_3e2!=this.DELETE_TOKEN){return _3e2;}}}return null;},registerListener:function(_3e3){if(!this.navStateNode){this.navStateNode=this._createNavStateNode();}var data=this.navStateNode.getRef();var _3e4=data[this.navStateModel.PARAMS];if(!_3e4){data[this.navStateModel.PARAMS]={};_3e4=data[this.navStateModel.PARAMS];}if(!_3e4._listeners){_3e4._listeners={};}var _3e5=this.navStateModel._generateListenerId();_3e4._listeners[_3e5]=_3e3;return _3e5;},removeListener:function(_3e6){if(!this.navStateNode){return null;}var data=this.navStateNode.getRef();var _3e7=data[this.navStateModel.PARAMS];if(_3e7&&_3e7._listeners){var _3e8=_3e7._listeners;if(_3e8[_3e6]){_3e8[_3e6]=null;delete _3e8[_3e6];return true;}}return false;},_setItems:function(_3e9){for(var i in _3e9){if(_3e9[i]&&_3e9[i]==this.DELETE_TOKEN){this.removeItem(i);}else{if(_3e9[i]){this.setItemValue(i,_3e9[i]);}}}}});com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl.GLOBAL_SCOPE="global";}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.ShareableParameterSetAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{constructor:function(_3ea,_3eb,_3ec){},getID:function(){},getSize:function(){},setSize:function(_3ed){},confirmSetSize:function(_3ee){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl",[com.ibm.mashups.enabler.model.state.LayoutContainerAccessor],{constructor:function(_3ef,_3f0,_3f1){this.navStateModel=_3ef;this.cid=_3f0;this.pid=_3f1;var _3f2=this.navStateModel.DELIMITER;var path=this.LAYOUT_PREFIX;path+=_3f2+this.pid;this.layoutNavStateNode=_3ef._find(path);if(this.layoutNavStateNode){path+=_3f2+this.VALUE+_3f2+this.cid;this.layoutContainerNavStateNode=_3ef._find(path);}else{this.layoutContainerNavStateNode=null;}},LAYOUT_PREFIX:"lcparams",WIDTH:"w",SYSTEMSTATE:"rp",VALUE:"value",PARAMS:"params",MODE:"md",RP:{w:"w"},getID:function(){return this.cid;},_getLayoutContainerSystemState:function(key){var _3f3=null;if(!this.layoutContainerNavStateNode){return null;}var data=this.layoutContainerNavStateNode.getRef();if(data&&data[this.VALUE]){if(data[this.VALUE][this.SYSTEMSTATE]){data=data[this.VALUE][this.SYSTEMSTATE];if(data&&data[key]){_3f3=data[key];}}}return _3f3;},_setLayoutContainerSystemState:function(key,_3f4){var data;if(!this.layoutContainerNavStateNode){this.layoutContainerNavStateNode=this._createLayoutContainerNavStateNode();}data=this.layoutNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();data=this.layoutContainerNavStateNode.getRef();var _3f5=null;data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};data[this.VALUE][this.SYSTEMSTATE]=data[this.VALUE][this.SYSTEMSTATE]?data[this.VALUE][this.SYSTEMSTATE]:{};_3f5=data[this.VALUE][this.SYSTEMSTATE];_3f5[key]=_3f4;this.navStateModel.setDirty(true);return this;},_createLayoutNavStateNode:function(){var _3f6=this.navStateModel.create({key:this.pid});var _3f7=this.navStateModel._find(this.LAYOUT_PREFIX);if(!_3f7){var temp=this.navStateModel.create({key:this.LAYOUT_PREFIX});this.navStateModel.insert(temp,this.navStateModel._getRoot());_3f7=this.navStateModel._find(this.LAYOUT_PREFIX);}this.navStateModel.insert(_3f6,_3f7);_3f6=this.navStateModel._find(this.LAYOUT_PREFIX+this.navStateModel.DELIMITER+this.pid);return _3f6;},_createLayoutContainerNavStateNode:function(){if(!this.layoutNavStateNode){this.layoutNavStateNode=this._createLayoutNavStateNode();}var data=this.layoutNavStateNode.getRef();data[this.VALUE]=data[this.VALUE]?data[this.VALUE]:{};var _3f8=this.navStateModel.DELIMITER;var path=this.LAYOUT_PREFIX+_3f8+this.pid+_3f8+this.VALUE;var _3f9=this.navStateModel.create({key:this.cid});var _3fa=this.navStateModel._find(path);this.navStateModel.insert(_3f9,_3fa);_3f9=this.navStateModel._find(path+_3f8+this.cid);return _3f9;},getSize:function(){var size={};var _3fb=this._getLayoutContainerSystemState(this.WIDTH);if(_3fb){size[this.WIDTH]=_3fb;return size;}else{return null;}return size;},setSize:function(_3fc){if(_3fc){this._setLayoutContainerSystemState(this.WIDTH,_3fc);}return this;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutContainerAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutContainerAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutAccessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.LayoutAccessor");dojo.declare("com.ibm.mashups.enabler.model.state.LayoutAccessor",[com.ibm.mashups.enabler.model.state.Accessor],{constructor:function(_3fd,_3fe){},getTemplateURL:function(){},setTemplateURL:function(url){},getContainerAccessor:function(_3ff){},removeAll:function(_400){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutAccessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.LayoutAccessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.LayoutAccessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.LayoutAccessorImpl",[com.ibm.mashups.enabler.model.state.LayoutAccessor],{constructor:function(_401,_402){this.navStateModel=_401;this.pid=_402;this.path=this.LAYOUT_PREFIX+this.navStateModel.DELIMITER+this.pid;this.layoutNavStateNode=null;},LAYOUT_PREFIX:"lcparams",WIDGET_PREFIX:"wparams",VALUE:"value",TEMPLATE_URL:"templateURL",SYSTEMSTATE:"rp",WIDTH:"w",HEIGHT:"h",_getLayoutState:function(key){var _403=null;if(!this.layoutNavStateNode){this.layoutNavStateNode=this.navStateModel._find(this.path);if(!this.layoutNavStateNode){return null;}}var data=this.layoutNavStateNode.getRef();if(data&&data[key]){_403=data[key];}return _403;},_setLayoutState:function(key,_404){var data;if(!this.layoutNavStateNode){this.layoutNavStateNode=this.navStateModel._find(this.path);if(!this.layoutNavStateNode){this.layoutNavStateNode=this._createLayoutNavStateNode();}}data=this.layoutNavStateNode.getRef();data.params=data.params?data.params:{};data.params.lm=new Date().getTime();data[key]=_404;this.navStateModel.setDirty(true);return this;},_createLayoutNavStateNode:function(){var _405=this.navStateModel.create({key:this.pid});var _406=this.navStateModel._find(this.LAYOUT_PREFIX);if(!_406){var temp=this.navStateModel.create({key:this.LAYOUT_PREFIX});this.navStateModel.insert(temp,this.navStateModel._getRoot());_406=this.navStateModel._find(this.LAYOUT_PREFIX);}this.navStateModel.insert(_405,_406);_405=this.navStateModel._find(this.path);return _405;},getTemplateURL:function(){return this._getLayoutState(this.TEMPLATE_URL);},setTemplateURL:function(url){return this._setLayoutState(this.TEMPLATE_URL,url);},removeAll:function(_407){var _408=this.navStateModel.DELIMITER;if(_407&&this.navStateModel._find(this.WIDGET_PREFIX)){var i;var _409;for(i=0;i<_407.length;i++){_409=this.navStateModel._find(this.WIDGET_PREFIX+_408+_407[i]+_408+this.VALUE+_408+this.SYSTEMSTATE);if(_409){_409=_409.getRef();delete _409[this.WIDTH];delete _409[this.HEIGHT];this.navStateModel.setDirty(true);}}}if(this.layoutNavStateNode){this.navStateModel.remove(this.layoutNavStateNode);this.navStateModel.setDirty(true);delete this.layoutNavStateNode;}return this;},getContainerAccessor:function(_40a){return new com.ibm.mm.enabler.model.state.LayoutContainerAccessorImpl(this.navStateModel,_40a,this.pid);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.LayoutAccessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.LayoutAccessor");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.AccessorFactory_API");dojo.provide("com.ibm.mashups.enabler.model.state.AccessorFactory");dojo.declare("com.ibm.mashups.enabler.model.state.AccessorFactory",null,{getPageAccessor:function(_40b,_40c){},getSpaceAccessor:function(_40d){},getWidgetAccessor:function(_40e,_40f){},getPageModeAccessor:function(_410){},getShareableParameterSetAccessor:function(_411,id,_412){},getLayoutAccessor:function(_413,_414){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.AccessorFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.AccessorFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.AccessorFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.AccessorFactoryImpl",[com.ibm.mashups.enabler.model.state.AccessorFactory],{constructor:function(){},getPageAccessor:function(_415,_416){return new com.ibm.mm.enabler.model.state.PageAccessorImpl(_415,_416);},getPageModeAccessor:function(_417){return new com.ibm.mm.enabler.model.state.PageModeAccessorImpl(_417);},getSpaceAccessor:function(_418){return new com.ibm.mm.enabler.model.state.SpaceAccessorImpl(_418);},getWidgetAccessor:function(_419,_41a){return new com.ibm.mm.enabler.model.state.WidgetAccessorImpl(_419,_41a);},getShareableParameterSetAccessor:function(_41b,name,_41c){return new com.ibm.mm.enabler.model.state.ShareableParameterSetAccessorImpl(_41b,name,_41c);},getLayoutAccessor:function(_41d,_41e){return new com.ibm.mm.enabler.model.state.LayoutAccessorImpl(_41d,_41e);}});com.ibm.mashups.enabler.model.state.AccessorFactory=new com.ibm.mm.enabler.model.state.AccessorFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.AccessorFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.AccessorFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModel_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModel");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateModel",null,{ONNAVSTATEUPDATED:"com.ibm.mashups.enabler.model.state.onNavStateUpdated",startTransaction:function(){return;},commitTransaction:function(){return;},discardTransaction:function(){return;},isTransaction:function(){return false;},commit:function(_41f){return new com.ibm.mashups.enabler.Deferred();},discard:function(){return;},dispose:function(){return;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.IdentificationService_API");dojo.provide("com.ibm.mashups.enabler.services.IdentificationService");dojo.declare("com.ibm.mashups.enabler.services.IdentificationService",null,{createClientID:function(){},attachClientID:function(_420){},releaseClientID:function(id){},isClientID:function(id){},isServerID:function(id){},isAlienID:function(id){},attachServerID:function(_421,_422){},resolveID:function(id){},resolveIdentifiable:function(id){}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Utils"]){dojo._hasResource["com.ibm.mm.enabler.utils.Utils"]=true;dojo.provide("com.ibm.mm.enabler.utils.Utils");dojo.declare("com.ibm.mm.enabler.utils.UtilsImpl",null,{constructor:function(){this.serviceJson=null;},_lazyInit:function(){if(this.serviceJson){return;}this.xmlDom=com.ibm.mm.enabler.utils.Dom.createDocument();this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM]));},createNode:function(name,ns){this._lazyInit();return com.ibm.mm.enabler.utils.Dom.createElement(this.xmlDom,name,ns);},createLinkNode:function(href,rel,ns){var _423=this.createNode("atom:link",ns);_423.setAttribute("href",href);_423.setAttribute("rel",rel);return _423;},createExtLinkNode:function(href,rel,_424){this._lazyInit();var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;var _425=this.createNode("atom:link",this.ns[nsf.NS_ATOM]);_425.setAttribute("href",href);if(rel){_425.setAttribute("rel",rel);}com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_425,"ext:rel","rel",this.ns.ext,_424);return _425;},getIdFromExtUri:function(_426,node){this._lazyInit();var id=null;var uri=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"ext:uri","uri",this.ns.ext);if(uri){var aPos=uri.indexOf("@");if(aPos!=-1){uri=uri.slice(0,aPos);}id=uri;var _427=id.lastIndexOf(":");if(_427!=-1){id=id.slice(_427+1);}_427=id.toUpperCase().lastIndexOf("%3A");if(_427!=-1){id=id.slice(_427+3);}_427=id.lastIndexOf("/");if(_427!=-1){id=id.slice(_427+1);}}return id;},getHrefFromIdentifiable:function(_428){return (_428&&(typeof _428._getParameters=="function"))?_428._getParameters().href:null;},getIdFromIdentifiable:function(_429){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_429,com.ibm.mashups.enabler.Identifiable)){return _429.getID();}else{if(dojo.isString(_429)){return dojo.string.trim(_429);}else{return _429;}}},setAttributeWithNS:function(_42a,_42b,_42c,_42d){this._lazyInit();com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_42a,_42b,null,_42c,_42d);},createFeed:function(id,_42e,_42f,_430){var ns="";for(var _431 in _430){if(Object.prototype.hasOwnProperty.call(_430,_431)){ns+="xmlns:"+_431+"=\""+_430[_431]+"\" ";}}var time=new Date();var feed="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+"<atom:feed "+ns+" >\n"+"<atom:title>"+_42e+"</atom:title>\n"+"<atom:id>"+id+"</atom:id>\n"+"<atom:updated>"+time.toGMTString()+"</atom:updated>\n"+_42f+"</atom:feed>";return feed;},transferElements:function(_432,_433,_434,ns){dojo.forEach(_434,function(ctx){var _435=ctx.parentXpath+"/"+ctx.element;if(ctx.replace===true){var _436=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_435,_433,ns);if(_436){_436.parentNode.removeChild(_436);}}var _437=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_435,_432,ns);if(_437){var _438=_437.cloneNode(true);var _439=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(ctx.parentXpath,_433,ns);if(_439){_439.appendChild(_438);}}},this);}});com.ibm.mm.enabler.utils.Utils=new com.ibm.mm.enabler.utils.UtilsImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.IdentifiableHelper"]){dojo._hasResource["com.ibm.mm.enabler.IdentifiableHelper"]=true;dojo.provide("com.ibm.mm.enabler.IdentifiableHelper");com.ibm.mm.enabler.IdentifiableHelper.ID_MATCHER=/^(.*?)(%3a)?([ \.\w_\-]*)(@.*?)?$/i;com.ibm.mm.enabler.IdentifiableHelper.getID=function(id){var _43a=id.match(com.ibm.mm.enabler.IdentifiableHelper.ID_MATCHER);return _43a?_43a[3]:"";};com.ibm.mm.enabler.IdentifiableHelper.replaceID=function(_43b,_43c,_43d){var id=com.ibm.mm.enabler.IdentifiableHelper.getID(_43d);var _43e=_43b.match(com.ibm.mm.enabler.IdentifiableHelper.ID_MATCHER);return _43c+":"+id+(_43e?(_43e[4]||""):"");};}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Atom"]){dojo._hasResource["com.ibm.mm.enabler.utils.Atom"]=true;dojo.provide("com.ibm.mm.enabler.utils.Atom");com.ibm.mm.enabler.utils.Atom={_FEED:"atom:feed",_ENTRY:"atom:entry",_LINK:"atom:link",_ID:"atom:id",_NEXT_LINK:"atom:link[@rel='next']",_EDIT_LINK:"atom:link[@rel='edit']",_REPLIES_LINK:"atom:link[@rel='replies']",_REPLIES_LINK_HREF:"atom:link[@rel='replies']/@href",_IN_REPLY_TO_LINK:"thr:in-reply-to",_IN_REPLY_TO_LINK_HREF:"thr:in-reply-to/@href",LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.Atom"),createEntry:function(_43f,_440,_441){var _442={};var _443="createEntry";var _444=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_444){this.LOGGER.entering(_443,[_43f,_440,_441]);}var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;var ns=nsf.getNameSpaces([nsf.NS_ATOM]);var _445=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",ns.atom);var _446=com.ibm.mm.enabler.utils.Utils.createNode("atom:id",ns.atom);_445.appendChild(_446);var _447=com.ibm.mm.enabler.utils.Utils.createNode("atom:title",ns.atom);if(_43f){com.ibm.mm.enabler.utils.Dom.textContent(_447,_43f);}_445.appendChild(_447);var _448=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_448,time.toGMTString());_445.appendChild(_448);var _449=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",ns.atom);_449.setAttribute("type","application/xml");_445.appendChild(_449);if(_440&&_441){var elem=com.ibm.mm.enabler.utils.Utils.createNode(_440,_441);_449.appendChild(elem);_442.modelElement=elem;}_442.entryElement=_445;_442.idElement=_446;if(_444){this.LOGGER.exiting(_443,_442);}return _442;}};}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl",[com.ibm.mashups.enabler.Identifiable,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(){this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this._resetCachedRawID();this._addDirtyCallback(this,this._resetCachedRawID,null,true);},_cachedRawIdToken:{},_resetCachedRawID:function(){this._cachedRawID=this._cachedRawIdToken;},_cachedRawID:null,_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);var _44a=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.id_ns=dojo.delegate(_44a.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH,nsf.NS_XHTML,nsf.NS_APP]));this.id_prefix=_44a.idprefix;},getID:function(){var id=this._getRawID();return id?com.ibm.mm.enabler.IdentifiableHelper.getID(id):id;},_getRawID:function(){this._initServiceDoc();if(this._cachedRawID===this._cachedRawIdToken){var _44b=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateString(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(node){_44b=dojo.string.trim(node);}this._cachedRawID=_44b;}return this._cachedRawID;},equals:function(_44c){return com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this)==com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(_44c);},setID:function(id){this._initServiceDoc();var _44d=this._getRawID();var _44e=this.id_prefix;if(_44d){var _44f=_44d.indexOf(this.id_prefix);if(_44f>0){_44e=_44d.substring(0,_44f+this.id_prefix.length);}}var _450=com.ibm.mm.enabler.IdentifiableHelper.replaceID(_44d||"",_44e,id);if(_450!=_44d){this._setRawID(_450);}},_setRawID:function(id){this._initServiceDoc();id=id||"";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(node){var _451=this._getRawID();if(id!=_451){com.ibm.mm.enabler.utils.Dom.textContent(node,id);this._setDirty();this._cachedRawID=dojo.string.trim(id);}}else{throw new Error(dojo.string.substitute(this.modelMessages.E_ELEMENT_NOT_FOUND_2,[com.ibm.mm.enabler.utils.Atom._ID,this.toString()]));}},getUniqueName:function(){this._initServiceDoc();var name=null;var res=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(res){name=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(res,"ext:uniquename","uniquename",this.id_ns.ext);}return name||"";}});}if(!dojo._hasResource["com.ibm.mm.enabler.IdentifierImpl"]){dojo._hasResource["com.ibm.mm.enabler.IdentifierImpl"]=true;dojo.provide("com.ibm.mm.enabler.IdentifierImpl");dojo.declare("com.ibm.mm.enabler.IdentifierImpl",com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,{_id:null,_params:null,constructor:function(id,_452){if(dojo.isString(id)){this._id=id;}else{this.xmlData=id;}this._params=_452;},setID:function(id){if(this._id){this._id=id;}else{this.inherited(arguments);}},getID:function(){return this._id?com.ibm.mm.enabler.IdentifiableHelper.getID(this._id):this.inherited(arguments);},_getParameters:function(){return this._params;},_getRawID:function(){return this._id?this._id:this.inherited(arguments);},_setRawID:function(id){if(!this._id){var _453=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._ID,this.xmlData,this.id_ns);if(_453){com.ibm.mm.enabler.utils.Dom.textContent(_453,id);}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.services.IdentificationServiceImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.IdentificationServiceImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.IdentificationServiceImpl");dojo.declare("com.ibm.mm.enabler.services.IdentificationServiceImpl",[com.ibm.mashups.enabler.services.IdentificationService],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.services.IdentificationServiceImpl");this.clientIds={};this.clientServerMap={};var _454=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.SERVER_OBJECT_ID_FORMAT);if(!_454){_454="M[A-F0-9]+$";}this.serverOidRegExp=new RegExp(_454);},createClientID:function(){while(true){var id=dojox.uuid.generateRandomUuid().replace(/-/g,"_");if(!(id in this.clientIds)){this.clientIds[id]=null;return id;}}return null;},attachClientID:function(_455){this.clientIds[_455]=null;},releaseClientID:function(id){var _456=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);if(this.isClientID(_456)){delete this.clientIds[_456];delete this.clientServerMap[_456];}},isClientID:function(id){return (id in this.clientIds);},isServerID:function(id){return this.serverOidRegExp.test(id);},isAlienID:function(id){return !this.isServerID(id)&&!this.isClientID(id);},attachServerID:function(cid,sid){var _457=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(cid);var _458=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(sid);this.clientServerMap[_457]=_458;},resolveID:function(id){var _459=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);return (_459 in this.clientServerMap)?this.clientServerMap[_459]:_459;},resolveIdentifiable:function(id){return new com.ibm.mm.enabler.IdentifierImpl(this.resolveID(id));}});com.ibm.mashups.enabler.services.IdentificationService=new com.ibm.mm.enabler.services.IdentificationServiceImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService"]){dojo._hasResource["com.ibm.mashups.enabler.services.IdentificationService"]=true;dojo.provide("com.ibm.mashups.enabler.services.IdentificationService");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateProcessor_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateProcessor");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateProcessor",null,{encodeWidgetIdentifier:function(wid,_45a){},decodeWidgetIdentifier:function(wid,_45b){},decode:function(url,_45c){},encode:function(_45d,_45e,_45f,_460,_461){},generateUrl:function(_462,_463,_464){},generateURL:function(_465,_466,_467){},preprocess:function(_468,_469){},dispose:function(_46a){},postprocess:function(_46b,_46c,_46d,_46e){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.CookieManager"]){dojo._hasResource["com.ibm.mm.enabler.model.state.CookieManager"]=true;dojo.provide("com.ibm.mm.enabler.model.state.CookieManager");dojo.declare("com.ibm.mm.enabler.model.state.CookieManager",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this._dirty=false;this.cookiePath=window.location.pathname;},COOKIE_PREFIX:"digest.ignore.state.",disposeState:function(){if(ibmConfig["com.ibm.mashups.embedding.isActive"]===true){return;}var id=this._getCookieID();if(id&&dojo.cookie(id)){if(dojo.isIE){dojo.cookie(id,null,{expires:-1});}else{dojo.cookie(id,null,{expires:-1,path:this.cookiePath});}}if(this._state){delete this._state;}this._dirty=false;},_getCookieID:function(){if(!this._cookieID){var _46f=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var uid=_46f.getValue(com.ibm.mashups.enabler.services.ConfigConstants.USER);if(!uid||(uid&&uid=="null")){return null;}this._cookieID=this.COOKIE_PREFIX+uid;}return this._cookieID;},_init:function(){if(!this._getCookieID()){this._state={};return;}if(dojo.cookie.isSupported()){if(dojo.cookie(this._getCookieID())&&dojo.fromJson(dojo.cookie(this._getCookieID()))){this._state=dojo.fromJson(dojo.cookie(this._getCookieID()));}}if(!this._state){this._state={};}},getState:function(id){if(!this._state){this._init();}if(!id){return this._state;}if(this._state[id]){return this._state[id];}return null;},setState:function(id,_470){if(!this._state){this._state={};}this._state[id]=_470;this._dirty=true;},removeState:function(id){if(this._state[id]){delete this._state[id];this._dirty=true;}},commit:function(){if(ibmConfig["com.ibm.mashups.embedding.isActive"]===true){return;}if(this._dirty){if(!this._getCookieID()){this._dirty=false;return;}if(dojo.cookie.isSupported()){if(dojo.isIE){dojo.cookie(this._getCookieID(),dojo.toJson(this._state),{expires:3652});}else{dojo.cookie(this._getCookieID(),dojo.toJson(this._state),{expires:3652,path:this.cookiePath});}}this._dirty=false;}}});com.ibm.mashups.enabler.model.state.CookieManager=new com.ibm.mm.enabler.model.state.CookieManager();}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.Factory_API"]){dojo._hasResource["com.ibm.mashups.iwidget.model.Factory_API"]=true;dojo.provide("com.ibm.mashups.iwidget.model.Factory_API");dojo.provide("com.ibm.mashups.iwidget.model.Factory");dojo.declare("com.ibm.mashups.iwidget.model.Factory",null,{constructor:function(){},getGlobalWidgetModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.Constants"]){dojo._hasResource["com.ibm.mm.iwidget.Constants"]=true;dojo.provide("com.ibm.mm.iwidget.Constants");dojo.declare("com.ibm.mm.iwidget.Constants",null,{constructor:function(){},WIDGETEVENT_PREFIX:"widgetevents.",WILDCARD_PREFIX:"*.",mode:{VIEW:"view",EDIT:"edit",PERSONALIZE:"personalize",CONFIG:"config",HELP:"help"},mode_view:"view",mode_edit:"edit",mode_help:"help",event:{TITLE:"title",DESCRIPTION:"description"},ATTRIBUTES:"attributes",IDESCRIPTOR:"idescriptor",USERPROFILE:"userprofile",windowstate:{NORMAL:"normal",MINIMIZE:"minimize",MAXIMIZE:"maximize"},status:{SUCCESS:200,TIMEOUT:408,NOTFOUND:404,INTERROR:500,OTHER:303},changeType:{CHANGEDVALUE:"changedValue",NEWITEM:"newItem",REMOVEDITEM:"removedItem"},iDescriptorItems:{title:"title",name:"name",description:"description",defaultHeight:"defaultHeight",defaultWidth:"defaultWidth",displayLocale:"displayLocale",mode:"mode",author:"author",email:"email",website:"website",version:"version",icon:"icon",windowState:"windowState",messageLocale:"messageLocale",availableMessageLocales:"availableMessageLocales",thumbnail:"thumbnail"},IW_PREFIX:"iw-",IW_DEFINITION_TYPE:"iwidget",OSGADGET_DEFINITION_TYPE:"os-gadget",CSSCLASS_INSTANCE:{iwWidget:"iWidget",iwOSGadget:"OSGadget",iwSandbox:"Sandbox",iwDefinition:"Definition",iwEventDescription:"EventDescription",iwPayloadType:"PayloadType",iwHandled:"Handled",iwPublished:"Published",iwDescription:"Description",iwTitle:"Title",iwEvent:"Event",iwDescRef:"DescRef",iwGlobalid:"Globalid",iwHandler:"Handler",iwNewWire:"NewWire",iwRemoveWire:"RemoveWire",iwReadOnly:"ReadOnly",iwItemSet:"ItemSet",iwItem:"Item",iwValue:"Value",iwContent:"Content",iwReceivedEvent:"ReceivedEvent",iwSourceEvent:"SourceEvent",iwTargetEvent:"TargetEvent",iwMappedName:"MappedName",iwStandalone:"Standalone"},CSSCLASS_PREFIXED_INSTANCE:{},CSSCLASS_PERSONALIZED:"mm-Personalized",RESOURCE:{src:"src",id:"id",globalid:"globalid",mimeType:"mimeType",callback:"callback",version:"version",blockInit:"blockInit",skipLoad:"skipLoad"},EVENTS:{onLoad:"onLoad",onUnLoad:"onUnload",onModeChanged:"onModeChanged",onItemSetChanged:"onItemSetChanged",unloadWidget:"/enabler/unloadWidget",unSubscribeWire:"/enabler/unSubscribeWire",modeChanged:"modeChanged",onSizeChanged:"onSizeChanged",onNavStateChanged:"onNavStateChanged",onAttributeSaved:"com.ibm.mashups.iwidget.onAttributeSaved",onWindowStateChanged:"onWindowStateChanged",onIncompleteEventDescription:"onIncompleteEventDescription"},eventservice:{type:{MAIN:"MAIN",IFRAME:"IFRAME"}}});com.ibm.mm.iwidget.Constants=new com.ibm.mm.iwidget.Constants();(function(){for(var key in com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE){if(Object.prototype.hasOwnProperty.call(com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE,key)){com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE[key]=com.ibm.mm.iwidget.Constants.IW_PREFIX+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE[key];}}})();iwConstants=com.ibm.mm.iwidget.Constants;}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.WireProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.WireProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.WireProvider");dojo.declare("com.ibm.mashups.iwidget.widget.WireProvider",null,{constructor:function(id){},getWires:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription_API"]){dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription_API"]=true;dojo.provide("com.ibm.mashups.iwidget.IEventDescription_API");dojo.provide("com.ibm.mashups.iwidget.IEventDescription");dojo.declare("com.ibm.mashups.iwidget.IEventDescription",null,{constructor:function(){},alias:"",name:"",type:"",handlingFn:"",getDescription:function(_471){return null;},lang:"",isHandled:false,isPublished:false,getAttribute:function(_472,_473){return null;},setAttribute:function(_474,_475,_476){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.IEventDescriptionImpl"]){dojo._hasResource["com.ibm.mm.iwidget.IEventDescriptionImpl"]=true;dojo.provide("com.ibm.mm.iwidget.IEventDescriptionImpl");dojo.declare("com.ibm.mm.iwidget.IEventDescriptionImpl",com.ibm.mashups.iwidget.IEventDescription,{constructor:function(name,_477,type,_478,_479,_47a,_47b){if(dojo.isString(name)){var obj={};obj.name=name;_477=_477||null;if(_477){obj.handlingFn=_477;obj.isHandled=true;obj.isPublished=false;}else{obj.isPublished=true;}type=type||null;if(type){obj.type=type;}_47a=_47a||null;if(_47a){obj.lang=_47a;}else{obj.lang="en";}obj.attributes={};obj.localizedAttributes={};_479=_479||null;if(_479){obj.attributes.aliases=_479;}_47b=_47b||null;if(_47b){obj.localizedAttributes=_47b;}if(_478){if(!obj.localizedAttributes[obj.lang]){obj.localizedAttributes[obj.lang]={};}obj.localizedAttributes[obj.lang].description=_478;}this._internalJsonObj=obj;}else{this._internalJsonObj=name;}this.initPredefinedFields(this._internalJsonObj);},initPredefinedFields:function(obj){this.name=obj.name;this.type=obj.type;this.lang=obj.lang;this.handlingFn=obj.handlingFn;this.isHandled=obj.isHandled;this.isPublished=obj.isPublished;},getDescription:function(_47c){return this._getLocalizedAttribute("description",_47c);},getTitle:function(_47d){return this._getLocalizedAttribute("title",_47d);},_getLocalizedAttribute:function(_47e,_47f){var _480=null,_481=null;var lc=com.ibm.mashups.enabler.context.Factory.getLocalizedContext(_47f,this.lang);var _482=lc.getLocale(this);if(this.localemapping&&this.localemapping[_482]){_482=this.localemapping[_482];}if(this._internalJsonObj.localizedAttributes){_481=this._internalJsonObj.localizedAttributes[_482];if(_481){_480=_481[_47e];}}if(!_480){_480=this[_47e];}if(typeof _480=="undefined"){_480=null;}return _480;},setOnRemoveWire:function(_483){if(typeof _483=="undefined"||_483===null){_483="onRemoveWire";}if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}this._internalJsonObj.attributes.onRemoveWire=_483;return this;},getOnRemoveWire:function(){if(typeof this._internalJsonObj.attributes!="undefined"&&this._internalJsonObj.attributes.onRemoveWire){return this._internalJsonObj.attributes.onRemoveWire;}return null;},setOnNewWire:function(_484){if(typeof _484=="undefined"||_484===null){_484="onNewWire";}if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}this._internalJsonObj.attributes.onNewWire=_484;return this;},getOnNewWire:function(){if(typeof this._internalJsonObj.attributes!="undefined"&&this._internalJsonObj.attributes.onNewWire){return this._internalJsonObj.attributes.onNewWire;}return null;},getLocales:function(){var _485=[];var _486={};if(this._internalJsonObj.localizedAttributes){for(var i in this._internalJsonObj.localizedAttributes){if(Object.prototype.hasOwnProperty.call(this._internalJsonObj.localizedAttributes,i)){_485.push(i);var _487=com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(i);if(_487!=i){_486[_487]=i;}}}}this.localemapping=_486;return _485;},toString:function(){var temp=this.toJson();return dojo.toJson(temp);},_getInternalJsonObj:function(){return this._internalJsonObj;},toJson:function(){var _488={};for(var i in this._internalJsonObj){if(Object.prototype.hasOwnProperty.call(this._internalJsonObj,i)){if(i=="handlingFn"){if(dojo.isFunction(this._internalJsonObj[i])){_488[i]="HANDLEFN";continue;}}_488[i]=dojo.clone(this._internalJsonObj[i]);}}return _488;},clone:function(){var temp=dojo.toJson(this._internalJsonObj);if(temp){return new com.ibm.mm.iwidget.IEventDescriptionImpl(dojo.fromJson(temp));}else{return null;}},getAttribute:function(_489,_48a){if(!_489){return null;}if(!_48a){if(this._internalJsonObj.attributes&&typeof this._internalJsonObj.attributes[_489]!="undefined"){return this._internalJsonObj.attributes[_489];}if(this._internalJsonObj.localizedAttributes&&this._internalJsonObj.localizedAttributes[this.lang]){var _48b=this._internalJsonObj.localizedAttributes[this.lang][_489];if(_48b){return _48b;}}return null;}else{return this._getLocalizedAttribute(_489,_48a);}},setAttribute:function(_48c,_48d,_48e){if(!_48c){return null;}if(typeof _48d=="undefined"){return null;}if(!_48e){if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}this._internalJsonObj.attributes[_48c]=_48d;if(_48d===null){delete this._internalJsonObj.attributes[_48c];}return this;}if(!this._internalJsonObj.localizedAttributes[_48e]){this._internalJsonObj.localizedAttributes[_48e]={};}this._internalJsonObj.localizedAttributes[_48e][_48c]=_48d;if(_48d===null){delete this._internalJsonObj.localizedAttributes[_48e][_48c];}return this;},copyRuntimeProperties:function(_48f){if((!this.handlingFn)&&(_48f.handlingFn)){this.handlingFn=_48f.handlingFn;}if((!this._internalJsonObj.handlingFn)&&(_48f._internalJsonObj.handlingFn)){this._internalJsonObj.handlingFn=_48f._internalJsonObj.handlingFn;}if(typeof this._internalJsonObj.attributes=="undefined"){this._internalJsonObj.attributes={};}for(var name in _48f._internalJsonObj.attributes){if(!this._internalJsonObj.attributes[name]){this._internalJsonObj.attributes[name]=_48f._internalJsonObj.attributes[name];}}}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription"]){dojo._hasResource["com.ibm.mashups.iwidget.IEventDescription"]=true;dojo.provide("com.ibm.mashups.iwidget.IEventDescription");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.EventProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.EventProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.EventProvider");dojo.declare("com.ibm.mashups.iwidget.widget.EventProvider",null,{constructor:function(){},getWidgetPublishedEvents:function(){},getWidgetHandledEvents:function(){},getPublicEvent:function(name){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.Properties_API");dojo.provide("com.ibm.mashups.iwidget.widget.Properties");dojo.declare("com.ibm.mashups.iwidget.widget.Properties",null,{constructor:function(){},getItemValue:function(_490,_491){},getAllNames:function(){return null;},getItemLocales:function(_492){},isReadOnly:function(_493){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.PropertiesImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.PropertiesImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.PropertiesImpl");dojo.declare("com.ibm.mm.iwidget.widget.PropertiesImpl",com.ibm.mashups.iwidget.widget.Properties,{DELETE_TOKEN:"com.ibm.mm.iwidget.widget.DELETE_TOKEN",TYPE_NEW:"newItem",TYPE_UPDATE:"updatedValue",TYPE_REMOVE:"removedItem",constructor:function(_494,_495){this._defaultProperties=_495;this._items={};if(_494){this._items=_494;}this._localizedItems={};this.DEFAULT_LOCALE=ibmConfig[com.ibm.mashups.enabler.services.ConfigConstants.DEFAULT_LOCALE];if(!this.DEFAULT_LOCALE){this.DEFAULT_LOCALE="en";}},_getItemDefaultLocale:function(_496){var _497=null;if(this._items[_496]){if(this._items[_496].defaultLocale){_497=this._items[_496].defaultLocale;}}if(!_497){_497=null;}return _497;},getLocalizedItemValue:function(_498,_499){if(!_498||!_499){return;}if(!(_498 in this._items)&&!this._defaultProperties){return null;}var item=this._items[_498];var _49a=null;if(!item.values){return null;}var _49b=[];for(var i in item.values){if(Object.prototype.hasOwnProperty.call(item.values,i)){_49b.push(i);}}var _49c;_49c=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_499,_49b);for(var j in item.values){if(_49c==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(j)){_49a=item.values[j];break;}}if(_49a==this.DELETE_TOKEN){return null;}return _49a;},getItemValue:function(_49d,_49e){if(!(_49d in this._items)&&!this._defaultProperties){return null;}if(!(_49d in this._items)){return this._defaultProperties.getItemValue(_49d,_49e);}var item=this._items[_49d];var _49f=null;if((typeof _49e=="undefined"||_49e===null)&&typeof item.value!="undefined"&&item.value!==null){if(item.value==this.DELETE_TOKEN){return null;}return item.value;}if(!item.values){return null;}var _4a0=[];for(var i in item.values){if(Object.prototype.hasOwnProperty.call(item.values,i)){_4a0.push(i);}}var _4a1;if(_49e){_4a1=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_49e,_4a0);for(var j in item.values){if(_4a1==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(j)){_49f=item.values[j];break;}}}if(item.defaultLocale&&_49f===null){_4a1=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(item.defaultLocale,_4a0);for(var k in item.values){if(_4a1==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(k)){_49f=item.values[k];break;}}}if(this.DEFAULT_LOCALE&&_49f===null){_4a1=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(this.DEFAULT_LOCALE,_4a0);for(var l in item.values){if(_4a1==com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(l)){_49f=item.values[l];break;}}}if(_49f===null){for(var lang in item.values){if(Object.prototype.hasOwnProperty.call(item.values,lang)){_49f=item.values[lang];break;}}}if(_49f==this.DELETE_TOKEN){return null;}return _49f;},getItemLocales:function(_4a2){var _4a3=[];if(_4a2 in this._items&&this._items[_4a2].values){for(var _4a4 in this._items[_4a2].values){if(Object.prototype.hasOwnProperty.call(this._items[_4a2].values,_4a4)){_4a3.push(_4a4);}}}if(_4a3.length===0){return null;}return _4a3;},getAllNames:function(){var _4a5=[];if(this._defaultProperties){_4a5=this._defaultProperties.getAllNames();}var _4a6={};for(var i=0;i<_4a5.length;i++){_4a6[_4a5[i]]=null;}for(var _4a7 in this._items){if(this._items[_4a7]&&this._items[_4a7]._change&&this._items[_4a7]._change.changeType==this.TYPE_REMOVE){if(_4a7 in _4a6){delete _4a6[_4a7];}}else{_4a6[_4a7]=null;}}var _4a8=[];for(var _4a9 in _4a6){if(Object.prototype.hasOwnProperty.call(_4a6,_4a9)){_4a8.push(_4a9);}}return _4a8;},isReadOnly:function(_4aa){var item=this._items[_4aa];return (this._defaultProperties&&this_defaultProperties.isReadOnly(_4aa))||(item&&item.readOnly);}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.Properties"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.Properties");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.PropertiesProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.PropertiesProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.PropertiesProvider");dojo.declare("com.ibm.mashups.iwidget.widget.PropertiesProvider",null,{constructor:function(){},getIDescriptorItems:function(){},getAttributes:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetDefinition_API");dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetDefinition");dojo.declare("com.ibm.mashups.iwidget.widget.IWidgetDefinition",[com.ibm.mashups.iwidget.widget.EventProvider,com.ibm.mashups.iwidget.widget.PropertiesProvider],{constructor:function(){},getSupportedModes:function(){},toSpecObject:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl",com.ibm.mashups.iwidget.widget.IWidgetDefinition,{namespaces:{"iw":"http://www.ibm.com/xmlns/prod/iWidget"},reservedAttributes:{iScope:"iScope",supportedModes:"supportedModes",id:"id",allowInstanceContent:"allowInstanceContent",lang:"language","xml_lang":"_xml_lang","xmlns_iw":"_xmlns_iw",supportedWindowStates:"supportedWindowStates","xml_base":"_xml_base",sandbox:"sandbox"},constructor:function(_4ab,_4ac,_4ad){this.widgetDef=_4ab;if(_4ac){this.xmlStr=_4ac;}if(_4ad){this.specObject=_4ad;this._specObjectToWidgetDef();}},getXmlBase:function(){if(this.widgetDef.xmlBase){return this.widgetDef.xmlBase;}return null;},getAllowInstanceContent:function(){return this.widgetDef.allowInstanceContent;},getResources:function(){if(!this.resources){this.resources=[];}return this.resources;},getIScope:function(){return this.widgetDef.iScope;},getWidgetEvents:function(){return this.widgetDef.widgetEvents;},getMarkupByMode:function(mode){if(this.widgetDef.markup){if(!mode){mode="view";}var temp=this.widgetDef.markup[mode];return temp;}else{return null;}},setMarkupByMode:function(mode,elem){if(this.widgetDef.markup){if(!mode){mode="view";}this.widgetDef.markup[mode]=elem;return this;}return null;},_getManagedItemSetListener:function(_4ae){if(!_4ae){return null;}if(_4ae!=iwConstants.ATTRIBUTES&&_4ae!=iwConstants.IDESCRIPTOR){return null;}if(this.widgetDef.itemSetsArr){var _4af=this.widgetDef.itemSetsArr[_4ae];if(_4af&&_4af.onItemSetChanged){return _4af.onItemSetChanged;}}return null;},_getManagedItemSetItems:function(_4b0,_4b1){var _4b2={};if(this.widgetDef.itemSetsArr){var _4b3=this.widgetDef.itemSetsArr[_4b0];if(_4b3){for(var _4b4 in _4b3.items){if(Object.prototype.hasOwnProperty.call(_4b3.items,_4b4)){_4b2[_4b4]=_4b3.items[_4b4];}}}}_4b1=_4b1||null;if(_4b1){for(var _4b5 in _4b1){if(Object.prototype.hasOwnProperty.call(_4b1,_4b5)){var _4b6=_4b1[_4b5];if(typeof _4b6!="undefined"&&_4b6!==null){var _4b7={};_4b7.readOnly=false;_4b7.value=_4b6;_4b7.id=_4b5;_4b2[_4b5]=_4b7;}}}}return new com.ibm.mm.iwidget.widget.PropertiesImpl(_4b2);},getAttributes:function(){if(!this.attributeProperties){this.attributeProperties=this._getManagedItemSetItems(iwConstants.ATTRIBUTES,this.widgetDef.simpleAttributes);}return this.attributeProperties;},getIDescriptorItems:function(){if(!this.idescriptorProperties){this.idescriptorProperties=this._getManagedItemSetItems(iwConstants.IDESCRIPTOR,this.widgetDef.iDescriptor);}return this.idescriptorProperties;},getAllItemSetNames:function(){var _4b8=[];if(!this.widgetDef.itemSetsArr){return _4b8;}for(var _4b9 in this.widgetDef.itemSetsArr){if(Object.prototype.hasOwnProperty.call(this.widgetDef.itemSetsArr,_4b9)){var _4ba=this.widgetDef.itemSetsArr[_4b9];if(typeof (_4ba)!="undefined"&&_4b9!=iwConstants.ATTRIBUTES&&_4b9!=iwConstants.IDESCRIPTOR){_4b8.push(_4ba.id);}}}return _4b8;},getItemSet:function(name){if(name=="attributes"){return this.getAttributes();}var _4bb=this.widgetDef.itemSetsArr[name]||null;if(!_4bb){return null;}return _4bb;},getWidgetId:function(){return this.widgetDef.id;},getWidgetName:function(){return this.widgetDef.id;},getPayloadDefs:function(){return null;},getPayloadDef:function(name){return null;},getPayloadDefNames:function(){var arr=[];return arr;},getSupportedModes:function(){var temp=this.widgetDef.supportedModes;if(!temp){return null;}var arr=temp.split(" ");return arr;},getSupportedWindowStates:function(){var temp=this.widgetDef.supportedWindowStates;if(!temp){return null;}var arr=temp.split(" ");return arr;},getDefaultLanguage:function(){return this.widgetDef.lang;},getMarkup:function(){return this.widgetDef.markup;},_specObjectToWidgetDef:function(){this.widgetDef={};if(null===this.specObject){return;}var temp=this.specObject._id;if(!temp){temp=this.specObject._name;}this.widgetDef.id=null;this.widgetDef.name=null;if(temp){this.widgetDef.id=temp;this.widgetDef.name=temp;}this.widgetDef.allowInstanceContent=false;temp=this.specObject._allowInstanceContent;if(temp&&temp=="true"){this.widgetDef.allowInstanceContent=true;}temp=this.specObject._iScope;this.widgetDef.iScope=null;if(temp){this.widgetDef.iScope=temp;}temp=this.specObject._supportedModes;if(!temp){temp="view";}this.widgetDef.supportedModes=temp;temp=this.specObject._supportedWindowStates;if(!temp){temp="normal";}this.widgetDef.supportedWindowStates=temp;temp=this.specObject._lang;if(!temp){temp=this.specObject._xml_lang;}if(!temp){temp="en";}this.widgetDef.lang=temp;temp=this.specObject._xml_base;if(temp){this.widgetDef.xmlBase=temp;}var _4bc=iwConstants.iDescriptorItems;var _4bd={};for(var i in _4bc){if(Object.prototype.hasOwnProperty.call(_4bc,i)){var name=_4bc[i];var _4be=this.specObject["_"+name];if(typeof _4be=="undefined"){_4be=null;}_4bd[name]=_4be;}}this.widgetDef.iDescriptor=_4bd;var _4bf={};var _4c0={};for(var j in this.specObject){if(Object.prototype.hasOwnProperty.call(this.specObject,j)){if(0!==j.indexOf("_")){continue;}var attr=j;attr=attr.substr(1);if(attr.indexOf("on")!==0&&!iwConstants.iDescriptorItems[attr]&&!this.reservedAttributes[attr]){_4bf[attr]=this.specObject[j];}else{if(attr.indexOf("on")===0){_4c0[attr]=this.specObject[j];}}}}this.widgetDef.simpleAttributes=_4bf;this.widgetDef.widgetEvents=_4c0;this.widgetDef.markup=this._extractMarkupFromSpecObject();var _4c1=this._extractItemSetsFromSpecObject(this.widgetDef);if(null!==_4c1){this.widgetDef.itemSetsArr=_4c1;}this.widgetDef.publicEvents=this._extractEventsFromSpecObject();this.widgetDef.resources=this._extractResourcesFromSpecObject();this.widgetDef.eventDescriptions=this._extractEventDescFromSpecObject();},_extractMarkupFromSpecObject:function(){var _4c2=this.specObject.contents;var _4c3={};for(var mode in _4c2){if(Object.prototype.hasOwnProperty.call(_4c2,mode)){if(_4c2[mode]){_4c3[mode]={};if(_4c2[mode]._uri){_4c3[mode].uri=_4c2[mode]._uri;}if(_4c2[mode].value){_4c3[mode].content=_4c2[mode].value;}}}}return _4c3;},_extractItemSetsFromSpecObject:function(_4c4){var _4c5=this.specObject.itemSets;if(_4c5){var _4c6={};var _4c7={};for(var i in _4c5){if(Object.prototype.hasOwnProperty.call(_4c5,i)){var _4c8=_4c5[i];var id=i;var _4c9=_4c8._onItemSetChanged;var temp=_4c8._private;var _4ca=true;if(temp&&temp=="false"){_4ca=false;}var _4cb=_4c8._alias?_4c8._alias:null;var _4cc=_4c8._description;var _4cd={id:id,onItemSetChanged:_4c9,isPrivate:_4ca};if(_4cb){_4cd.alias=_4cb;}_4cd.items={};var _4ce=_4c8.items;for(var j in _4ce){if(Object.prototype.hasOwnProperty.call(_4ce,j)){var item=_4ce[j];var _4cf=false;var _4d0=item._readOnly;if(_4d0&&_4d0=="true"){_4cf=true;}var id2=item._id;var _4d1=item._alias?item._alias:null;var _4d2=item._value;var lang=item._lang;if(!lang){lang=item._xml_lang;}var _4d3={};_4d3.id=id2;if(_4d1){_4d3.alias=_4d1;}_4d3.readOnly=_4cf;if(lang){_4d3.defaultLocale=lang;}if(typeof _4d2!="undefined"&&_4d2!==null&&!lang){_4d3.value=_4d2;}if(typeof _4d2!="undefined"&&_4d2!==null&&lang){_4d3.values={};_4d3.values[lang]=_4d2;}var _4d4=item.alts;for(var v in _4d4){if(Object.prototype.hasOwnProperty.call(_4d4,v)){var _4d5=_4d4[v];var _4d6=v;var _4d7=_4d5._value;if(!_4d3.values){_4d3.values={};}_4d3.values[_4d6]=_4d7;if(lang&&_4d6==lang&&_4d3.value){delete _4d3.value;}}}_4cd.items[id2]=_4d3;}}if(_4ca===true){_4c6[id]=_4cd;}else{_4c7[id]=_4cd;}}}_4c4.shareableItemSetsArr=_4c7;return _4c6;}return null;},_extractEventsFromSpecObject:function(){var _4d8=this.specObject.events;var _4d9={};if(_4d8&&_4d8.length!==0){for(var j in _4d8){if(Object.prototype.hasOwnProperty.call(_4d8,j)){var _4da=_4d8[j];var _4db={};for(var i in _4da){if(Object.prototype.hasOwnProperty.call(_4da,i)){var name=i;if(0===i.indexOf("_")){name=name.substr(1);}var _4dc=_4da[i];if(name=="eventDescName"){name="description";}if(name=="handled"){name="isHandled";}if(name=="published"){name="isPublished";}if(_4dc){_4db[name]=_4dc;}}}_4d9[_4db.id]=_4db;}}}return _4d9;},_extractResourcesFromSpecObject:function(){var _4dd=[];var _4de=this.specObject.resources;var j=0;if(_4de&&_4de.length!==0){for(var i in _4de){if(Object.prototype.hasOwnProperty.call(_4de,i)){var node=_4de[i];var _4df={};var id=node._id;if(!id){id=node._globalid;}_4df[iwConstants.RESOURCE.id]=id?id:null;var src=node._src;if(!src){src=node._uri;}_4df[iwConstants.RESOURCE.src]=src;_4df[iwConstants.RESOURCE.version]=node._version?node._version:null;_4df[iwConstants.RESOURCE.callback]=node._callback?node._callback:null;_4df[iwConstants.RESOURCE.mimeType]=node._mimeType?node._mimeType:null;_4df[iwConstants.RESOURCE.blockInit]=node._blockInit?node._blockInit:null;_4df[iwConstants.RESOURCE.globalid]=node._globalid?node._globalid:null;_4df[iwConstants.RESOURCE.skipLoad]=node._skipLoad?node._skipLoad:null;_4dd[j]=_4df;j++;}}}return _4dd;},_extractPayloadDefsFromSpecObject:function(){var _4e0={};var _4e1=this.specObject.payloadDefs;for(var i in _4e1){if(Object.prototype.hasOwnProperty.call(_4e1,i)){var _4e2=payloadDef[i];}}},_extractEventDescFromSpecObject:function(){var _4e3={};var _4e4=this.specObject.eventDescriptions;if(_4e4&&_4e4.length!==0){for(var i in _4e4){if(Object.prototype.hasOwnProperty.call(_4e4,i)){var node=_4e4[i];var _4e5={};var id=i;_4e5.id=id;_4e5.payloadType=node._payloadType;_4e5.description=node._description;_4e5.title=node._title;_4e5.descriptionURI=node._descriptionURI?node._descriptionURI:null;var lang=node._lang;if(!lang){lang=node._xml_lang;}if(lang){_4e5.lang=lang;}var _4e6=node.alts;for(var j in _4e6){if(Object.prototype.hasOwnProperty.call(_4e6,j)){var _4e7=_4e6[j];var temp={};temp.description=_4e7._description;temp.title=_4e7._title;temp.descriptionURI=_4e7._descriptionURI?aNode_descriptionURI:null;if(!_4e5.descriptions){_4e5.descriptions={};}_4e5.descriptions[j]=temp;}}_4e3[id]=_4e5;}}}return _4e3;},toSpecObject:function(){if(this.specObject){return this.specObject;}var _4e8={};return _4e8;}});com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl=com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetDefinition"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetDefinition");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableProperties_API");dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableProperties");dojo.declare("com.ibm.mashups.iwidget.widget.ModifiableProperties",[com.ibm.mashups.iwidget.widget.Properties],{constructor:function(){},setItemValue:function(_4e9,_4ea,_4eb,_4ec){},removeItem:function(_4ed){},removeItemValue:function(_4ee,_4ef){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl");dojo.declare("com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl",[com.ibm.mashups.iwidget.widget.ModifiableProperties,com.ibm.mm.iwidget.widget.PropertiesImpl],{constructor:function(_4f0,_4f1){this._dirty=false;},_buildChange:function(item,_4f2,_4f3,_4f4,_4f5){var _4f6=item._dirty;if(!_4f6){item._dirty=true;}var _4f7=item._change?item._change:{};_4f7.id=_4f2;if(_4f5){if(_4f6&&_4f7.changeType&&_4f7.changeType==this.TYPE_NEW){item._dirty=false;delete item._change;return;}else{if(_4f6){_4f7.changeType=this.TYPE_REMOVE;return;}}item._change.changeType=this.TYPE_REMOVE;item._change.oldVal=_4f3;return;}if(_4f6&&_4f7.changeType){if(_4f7.changeType==this.TYPE_NEW){_4f7.newVal=_4f4;}else{_4f7.changeType=this.TYPE_UPDATE;_4f7.newVal=_4f4;}}else{if(_4f3){_4f7.oldVal=_4f3;}if(_4f4){_4f7.newVal=_4f4;}if(_4f3){_4f7.changeType=this.TYPE_UPDATE;}else{_4f7.changeType=this.TYPE_NEW;}}item._change=_4f7;return;},setItemValue:function(_4f8,_4f9,_4fa,_4fb){if(!_4f8||!_4f9){return null;}if(_4f8 in this._items){if(this._defaultProperties&&this._defaultProperties.isReadOnly(_4f8)){return null;}}var _4fc={};var _4fd={};var _4fe;if(!_4fb||(_4fb&&_4fb=="")){if(_4f8 in this._items){_4fc={};_4fd={};if(this._items[_4f8].values){_4fc=dojo.clone(this._items[_4f8].values);if(this._items[_4f8].value){_4fc[""]=this._items[_4f8].value;}_4fd=dojo.clone(this._items[_4f8].values);_4fd[""]=_4f9;}else{if(this._items[_4f8].value){_4fc[""]=this._items[_4f8].value;}_4fd[""]=_4f9;}this._items[_4f8].value=_4f9;this._buildChange(this._items[_4f8],_4f8,_4fc,_4fd);}else{var _4ff={};_4ff.id=_4f8;_4ff.value=_4f9;_4fe=!!_4fa;_4ff.readOnly=_4fe;this._items[_4f8]=_4ff;_4fd={};_4fd[""]=_4f9;this._items[_4f8]=this._items[_4f8]?this._items[_4f8]:{};this._buildChange(this._items[_4f8],_4f8,null,_4fd);}if(this._items[_4f8]._dirty){this._dirty=true;}return this;}var _500=_4fb.replace(/-/g,"_");if(_4f8 in this._items){_4fc={};_4fd={};if(this._items[_4f8].values){_4fc=dojo.clone(this._items[_4f8].values);}this._items[_4f8].values[_500]=_4f9;_4fd=dojo.clone(this._items[_4f8].values);if(this._items[_4f8].value){_4fc[""]=this._items[_4f8].value;_4fd[""]=this._items[_4f8].value;}this._items[_4f8].readOnly=_4fa;this._buildChange(this._items[_4f8],_4f8,_4fc,_4f9);if(this._items[_4f8]._dirty){this._dirty=true;}return this;}var item={};item.values={};item.values[_500]=_4f9;item.id=_4f8;_4fe=!!_4fa;item.readOnly=_4fe;this._items[_4f8]=item;_4fd=dojo.clone(item.values);this._buildChange(this._items[_4f8],_4f8,null,_4fd);if(this._items[_4f8]._dirty){this._dirty=true;}return this;},removeItem:function(_501){if(this._defaultProperties&&this._defaultProperties.isReadOnly(_501)){throw "The specified item ["+_501+"] is readOnly!";}var _502={};var _503=false;if(_501 in this._items){if(this._items[_501]._dirty){this._items[_501].value=this.DELETE_TOKEN;this._items[_501].values=this.DELETE_TOKEN;_502=this._items[_501]._change?this._items[_501]._change:{};if(_502.changeType==this.TYPE_NEW){delete this._items[_501];return this;}else{_502.changeType=this.TYPE_REMOVE;}}else{var _504={};if(this._items[_501].values){_504=dojo.clone(this._items[_501].values);}if(this._items[_501].value){_504[""]=this._items[_501].value;}this._items[_501].value=this.DELETE_TOKEN;this._items[_501].values=this.DELETE_TOKEN;_502={};_502.changeType=this.TYPE_REMOVE;_502.itemName=_501;_502.oldVal=_504;this._items[_501]._change=_502;this._items[_501]._dirty=true;}_503=true;}if(_503){this._dirty=true;return this;}else{return null;}},removeItemValue:function(_505,_506){if(!_506){_506="";}if(this._defaultProperties&&this._defaultProperties.isReadOnly(_505)){throw "The specified item ["+_505+"] is readOnly!";}var _507=_506.replace(/-/g,"_");var _508=false;var _509={};if(_505 in this._items){if(this._items[_505]._dirty){_509=this._items[_505]._change?this._items[_505]._change:{};if(_509.changeType==this.TYPE_REMOVE){return null;}else{if(_509.changeType==this.TYPE_NEW){if(_507==""&&this._items[_505].value&&this._items[_505].value!=this.DELETE_TOKEN){delete this._items[_505].value;if(this._items[_505]._change.newVal[""]){delete this._items[_505]._change.newVal[""];}_508=true;}if(_507!=""){if(this._items[_505].values[_507]){delete this._items[_505].values[_507];if(this._items[_505]._change.newVal[_507]){delete this._items[_505]._change.newVal[_507];}_508=true;}}if(this._isEmpty(this._items[_505]._change.newVal)){delete this._items[_505]._dirty;delete this._items[_505]._change;}}else{if(_507==""&&this._items[_505].value&&this._items[_505].value!=this.DELETE_TOKEN){delete this._items[_505].value;if(this._items[_505]._change.newVal[""]){delete this._items[_505]._change.newVal[""];}_508=true;}if(this._items[_505].values[_507]){delete this._items[_505].values[_507];if(this._items[_505]._change.newVal[_507]){delete this._items[_505]._change.newVal[_507];}_508=true;}}}}else{var _50a={};var _50b={};if(_507==""&&this._items[_505].value){_509={};_509.id=_505;_50a={};_50b={};if(this._items[_505].values){_509.changeType=this.TYPE_UPDATE;_50a=dojo.clone(this._items[_505].values);_50a[""]=this._items[_505][""];_509.oldVal=_50a;_509.newVal=dojo.clone(this._items[_505].values);delete this._items[_505].value;}else{_509.changeType=this.TYPE_REMOVE;_50a[""]=this._items[_505][""];_509.oldVal=_50a;delete this._items[_505].value;}this._items[_505]._change=_509;this._items[_505]._dirty=true;_508=true;}if(_507 in this._items[_505].values){_509={};_509.id=_505;_50a={};_50b={};if(this._items[_505].value){_509.changeType=this.TYPE_UPDATE;_50a=dojo.clone(this._items[_505].values);_50a[""]=this._items[_505][""];_509.oldVal=_50a;_509.newVal=dojo.clone(this._items[_505].values);_509.newVal[""]=this._items[_505].value;delete _509.newVal[_507];delete this._items[_505].value;}else{_50a=dojo.clone(this._items[_505].values);delete this._items[_505].values[_507];if(this._isEmpty(this._items[_505].values)){_509.changeType=this.TYPE_REMOVE;}else{_509.changeType=this.TYPE_UPDATE;_509.newVal=dojo.clone(this._items[_505].values);}_509.oldVal=_50a;}this._items[_505]._change=_509;this._items[_505]._dirty=true;_508=true;}}}if(_508){this._dirty=true;return this;}else{return null;}},_isDirty:function(){return this._dirty;},_setDirty:function(_50c){this._dirty=_50c;},_isItemDirty:function(_50d){if(!_50d){return false;}var _50e=false;if(this._items[_50d]){_50e=this._items[_50d]._dirty;}return _50e;},_setItemDirty:function(_50f,_510){if(!_50f){return;}if(this._items[_50f]){this._items[_50f]._dirty=_510;if(typeof _510!="undefined"&&!_510){delete this._items[_50f]._dirty;delete this._items[_50f]._change;}if(this._items[_50f].values&&this._items[_50f].values==this.DELETE_TOKEN){delete this._items[_50f].values;}if(this._items[_50f].value&&this._items[_50f].value==this.DELETE_TOKEN){delete this._items[_50f].value;}if(!this._items[_50f].value&&!this._items[_50f].values){delete this._items[_50f];}}},_getInternalItemValue:function(_511){if(this._items[_511]){return this._items[_511];}return null;},_isEmpty:function(obj){return com.ibm.mm.enabler.utils.Misc.isEmpty(obj);},_getRequiredValue:function(obj,_512){if(!obj){return null;}if(dojo.isString(obj)){return obj;}if(_512){if(obj[_512]){return obj[_512];}else{return null;}}var _513=null;var j=0;for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){if(i==""){_513=obj[i];}j++;}}if(_513&&j==1){return _513;}return obj;},_updateProperties:function(_514){var _515=dojo.mixin(this._items,_514);this._items=_515;this._dirty=true;},toJson:function(){return this._items;}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableProperties"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableProperties");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider");dojo.declare("com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider",null,{constructor:function(){},getIDescriptorItems:function(){},getAttributes:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableWireProvider"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.ModifiableWireProvider"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.ModifiableWireProvider");dojo.declare("com.ibm.mashups.iwidget.widget.ModifiableWireProvider",com.ibm.mashups.iwidget.widget.WireProvider,{constructor:function(id){},addWire:function(_516,_517,_518){},removeWire:function(_519,_51a,_51b){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetInstance_API");dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetInstance");dojo.declare("com.ibm.mashups.iwidget.widget.IWidgetInstance",[com.ibm.mashups.iwidget.widget.ModifiablePropertiesProvider,com.ibm.mashups.iwidget.widget.ModifiableWireProvider],{constructor:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.Utils"]){dojo._hasResource["com.ibm.mm.iwidget.Utils"]=true;dojo.provide("com.ibm.mm.iwidget.Utils");dojo.declare("com.ibm.mm.iwidget.UtilsDefaultImpl",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.iwidget.Utils");this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},widgetClassRE:new RegExp("(mm:|mm_|iw-)iWidget"),findElementByAttribute:function(att,_51c,root,_51d,_51e){var _51f=root;if(!root.childNodes){return false;}if(att=="class"){dojo.query("."+_51c,root).forEach(function(ele){_51d.push(ele);});return _51d.length!==0;}else{if(att=="query"){dojo.query(_51c,root).forEach(function(ele){_51d.push(ele);});return _51d.length!==0;}}if(root.getElementsByTagName){var _520=root.getElementsByTagName("*");for(var i=0,l=_520.length;i<l;i++){var _521=_520[i];if(_521&&_521.getAttribute){var _522=_521.getAttribute(att);if(_522==_51c){_51d.push(_521);if(!_51e){return true;}}}}}if(att=="id"){dojo.query("#"+_51c,root).forEach(function(ele){_51d.push(ele);});return _51d.length!==0;}return false;},getClass:function(node){var _523=node.getAttribute("class");_523=_523?_523:node.getAttribute("className");return _523;},checkParentElement:function(_524,_525){if(_524){var _526=_524.parentNode;if(_526){if(_526.className){if(_526.className.match(_525)){return _526.id;}}return this.checkParentElement(_526,_525);}}return null;},getWidgetParent:function(node,_527){if(dojo.isString(node)){node=dojo.byId(node);}if(!_527){_527=this.widgetClassRE;}return this.checkParentElement(node,_527);},getParents:function(_528,arr){var _529=_528.getParent();if(_529){arr.push(_529);this.getParents(_529,arr);}return;},getModelID:function(id){var ret=id;var _52a=ibmConfig[com.ibm.mashups.enabler.services.ConfigConstants.ID_PREFIX];if(_52a&&dojo.isString(ret)){var indx=ret.indexOf(_52a);if(indx===0){ret=ret.substring(_52a.length);}}return ret;},getMarkupID:function(id){var ret=id;var _52b=ibmConfig[com.ibm.mashups.enabler.services.ConfigConstants.ID_PREFIX];if(_52b&&dojo.isString(ret)){ret=_52b+ret;}return ret;},stripHashPrefix:function(str){if(dojo.isString(str)){var pos=str.indexOf("#");if(pos!==-1){return str.substr(1+pos);}}return str;},_getWidgetTitle:function(_52c){return null;}});if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.UtilsExtended");}else{com.ibm.mm.iwidget.Utils=new com.ibm.mm.iwidget.UtilsDefaultImpl();}}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl",com.ibm.mashups.iwidget.widget.IWidgetInstance,{constructor:function(_52d,_52e,id){this.wrapper=_52d;this.rootElement=_52e;this.id=id;this.ns=_52e.className.substr(0,3);var _52f=[];var _530=this.ns+"Definition";com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+_530,this.rootElement,_52f,false);if(_52f&&_52f.length>0){var node=_52f[0];var url=node.getAttribute("href");if(typeof (url)!="undefined"&&url!==null){this.widgetXMLUrl=url;}}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},_destroy:function(){if(this.rootElement){this.rootElement=null;}},getDefaultViewContent:function(){if(this.defaultViewContent){return this.defaultViewContent;}var _531=this.ns+"Content";var node=null;var _532=dojo.query("> ."+_531+"."+iwConstants.mode_view,this.rootElement);if(_532){node=_532[0];}if(!node){_532=dojo.query("> ."+_531,this.rootElement);if(_532){node=_532[0];}}if(node){this.defaultViewContent=node.innerHTML;return this.defaultViewContent;}else{return null;}},getWidgetEvents:function(){if(this.widgetEvents){return this.widgetEvents;}var _533={};var _534=this.rootElement.attributes;for(var i=0;i<_534.length;i++){var _535=_534[i];if(_535.name!==null&&_535.name.indexOf("on")===0){var _536=this.rootElement.getAttribute(_535.name);if(typeof _536!="undefined"&&_536!==null){_533[_535.name]=_536;if(this.bIsLoggable){this.LOGGER.trace("iWidgetInstance.getWidgetEvents","eventName:"+_535.name+" handler:"+_533[_535.name]);}}}}this.widgetEvents=_533;return this.widgetEvents;},_addWire:function(wire){},_removeWire:function(id){},addWire:function(_537,_538,_539){},removeWire:function(_53a,_53b,_53c){},_getPublicEvents:function(){return null;},getWires:function(){return [];},getWireModel:function(){return null;},getAttributes:function(){if(!this.attributeProperties){var _53d=this.getItemSets()[iwConstants.ATTRIBUTES];var _53e={};if(_53d){for(var _53f in _53d){if(Object.prototype.hasOwnProperty.call(_53d,_53f)){_53e[_53f]=_53d[_53f];}}}this.attributeProperties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_53e);}return this.attributeProperties;},getIDescriptorItems:function(){if(!this.idescriptorProperties){var _540=this.getItemSets()[iwConstants.IDESCRIPTOR];var _541={};if(_540){for(var _542 in _540){if(Object.prototype.hasOwnProperty.call(_540,_542)){_541[_542]=_540[_542];}}}this.idescriptorProperties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_541);}return this.idescriptorProperties;},_getItemSets:function(){if(this.itemSets){return this.itemSets;}this.loadItemSets();return this.itemSets;},getItemSets:function(){return this._getItemSets();},getItemSet:function(_543){if(!_543){return null;}var _544=this._getItemSets();if(_544&&_544[_543]){return _544[_543];}},loadItemSets:function(){this.itemSets=this._loadItemSetsOptimized(this.rootElement,this.ns);},_loadItemSetsOptimized:function(_545,ns){var _546={};if(_545.childNodes.length){dojo.query("> ."+ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwItemSet+" > ."+ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwItem,_545).forEach(function(item){var _547=dojo.attr(item.parentNode,"title");if(_547){if(!_546[_547]){_546[_547]={};}var _548=this._loadItemOptimized(item,ns);_546[_547][_548.id]=_548;}},this);}return _546;},_loadItemOptimized:function(elem,ns){var css=com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE;var item={id:com.ibm.mm.iwidget.Utils.stripHashPrefix(dojo.attr(elem,"href")),readOnly:dojo.hasClass(elem,ns+css.iwReadOnly)};var lang=dojo.attr(elem,"lang");if(lang){item.defaultLocale=lang;}var _549;var _54a=dojo.query("> ."+ns+css.iwValue,elem);if(_54a.length){item.values={};_54a.forEach(function(_54b){var _54c=dojo.attr(_54b,"lang")||lang;item.values[_54c]=com.ibm.mm.enabler.utils.Dom.textContent(_54b);});}else{_549=com.ibm.mm.enabler.utils.Dom.textContent(elem);if(dojo.isString(_549)){item.value=dojo.string.trim(_549);}}return item;},_invalidateItemSets:function(name){if(!name){this.itemSets={};}else{this.itemSets[name]={};}},_getInstanceMarkup:function(){var node=dojo.clone(this.rootElement);dojo.query("> ."+this.ns+"Content",node).forEach(function(_54d){com.ibm.mm.enabler.utils.Dom.destroyNode(_54d);});dojo.query("> ."+this.ns+"loading",node).forEach(function(_54e){com.ibm.mm.enabler.utils.Dom.destroyNode(_54e);});var _54f=document.createElement("div");_54f.appendChild(node);var html=_54f.innerHTML;return html;}});com.ibm.mm.iwidget.widget.IWidgetInstanceImpl=com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetInstance"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetInstance");}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetWrapper_API");dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetWrapper");dojo.declare("com.ibm.mashups.iwidget.widget.IWidgetWrapper",[com.ibm.mashups.iwidget.widget.WireProvider,com.ibm.mashups.iwidget.widget.EventProvider],{constructor:function(){},getIWidgetDefinition:function(){},setIWidgetDefinition:function(_550){},getIWidgetInstance:function(){},getMarkup:function(){},isLoaded:function(){},isStandalone:function(){},doRender:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.Filter"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.Filter"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.Filter");function com_ibm_enabler_aggregation_javascript_globalEvalNonIE(_551){eval.call(self,_551);};dojo.declare("com.ibm.mm.enabler.aggregation.javascript.Filter",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},doFilter:function(_552){},evalGlobal:function(_553){if(window.execScript){window.execScript(this._stripHTMLComments(_553),"JavaScript");}else{com_ibm_enabler_aggregation_javascript_globalEvalNonIE(_553);}},_stripHTMLComments:function(str){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.enabler.aggregation.javascript.Filter._stripHTMLComments",[str]);}var _554=str;_554=_554.replace(/<!--[^(-->)]+-->/g,"");if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.enabler.aggregation.javascript.Filter._stripHTMLComments",[_554]);}return _554;},prepareDocumentWrite:function(_555){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.enabler.aggregation.javascript.Filter.prepareDocumentWrite");}var me=this;document.write=function(){me._documentWrite(_555,document.write.arguments);};document.writeln=function(str){me._documentWrite(_555,document.writeln.arguments);};if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.enabler.aggregation.javascript.Filter.prepareDocumentWrite");}},_documentWrite:function(_556,args){for(var i=0,l=args.length;i<l;i++){_556.content+=args[i];}},applyDocumentWrite:function(_557,_558){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.enabler.aggregation.javascript.Filter.applyDocumentWrite",[_557,_558.content]);}var cont=_558.content||null;if(cont!==null&&cont.length>0){var i=0;if(dojo.isIE){cont="<br>"+cont;i++;}var div=dojo.create("div",{innerHTML:cont});var _559=dojo.isIE||dojo.isWebKit||dojo.isOpera;var _55a=div.childNodes||null;if(_55a!==null&&_55a.length>0){var pred=_557;var l;var _55b=[];while(i<(l=_55a.length)){var node=_55a[l-1];dojo.place(node,pred,"before");if(_559&&node.tagName&&node.tagName.toLowerCase()=="script"){_55b.unshift(node);}pred=node;}if(_559){dojo.forEach(_55b,function(scr){com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.handle(scr);});}}dojo.destroy(div);}if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.enabler.aggregation.javascript.Filter.applyDocumentWrite");}}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter",com.ibm.mm.enabler.aggregation.javascript.Filter,{doFilter:function(_55c){var url=this._getScriptUrl(_55c);var _55d=false;if(url){var _55e=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);_55e=_55e||null;if(_55e!==null){_55e+="/";url=this._rewriteURL(url,_55e);}var _55f={content:""};this.prepareDocumentWrite(_55f);this._loadExternalScript(url);this.applyDocumentWrite(_55c,_55f);_55d=true;}return _55d;},_getScriptUrl:function(_560){var url=null;if(_560.getAttribute){url=_560.getAttribute("src");}else{var _561=_560.toLowerCase().indexOf("<script");var end=_560.toLowerCase().indexOf(">");var _562=_560.substring(_561,end);var _563=_562.toLowerCase().indexOf("src");if(_563!=-1){var _564=_562.indexOf("'",_563);var _565=_562.indexOf("\"",_563);var _566="\"";var _567=_565;if(_565==-1||(_564!=-1&&_564<_565)){_566="'";_567=_564;}var _568=_562.indexOf(_566,_567+1);url=_562.substring(_567+1,_568);}}return url;},loadExternalScript:function(url){var _569=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PROXY_URL);_569=_569||null;if(_569!==null){_569+="/";url=this._rewriteURL(url,_569);}this._loadExternalScript(url);},_loadExternalScript:function(url){var me=this;dojo.xhrGet({url:url,load:function(data,_56a){if(this.bIsLoggable){this.LOGGER.trace("com.ibm.mm.enabler.aggregation.javascript.Filter._loadExternalScript","Retrieved JS file: ${0}",[data]);}me.evalGlobal(data);},sync:true,handleAs:"text"});},_rewriteURL:function(_56b,_56c){var _56d=_56c;var host=window.location.host;var _56e=window.location.protocol;if(_56b.indexOf("://")<0||_56b.indexOf(_56e)===0&&_56b.indexOf(host)==_56e.length+2){return _56b;}if(_56b.indexOf("https")===0){_56d+="https/";}else{_56d+="http/";}_56d+=_56b.substr(_56b.indexOf("://")+3);return _56d;}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.FilterChain"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.FilterChain"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.FilterChain");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.FilterChain",null,{constructor:function(){this._filters=[];},addFilter:function(_56f){if(!this._filters){this._filters=[];}this._filters.push(_56f);},applyFilters:function(_570){var _571=false;for(var i=0,l=this._filters.length;i<l&&!_571;i++){_571=this._filters[i].doFilter(_570);}return _571;}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter",com.ibm.mm.enabler.aggregation.javascript.Filter,{doFilter:function(_572){var _573=false,_574="";if(!dojo.isString(_572)){_574=_572.innerHTML;}else{var _575=_572;var _576=_575.indexOf(">");var _577=_575.lastIndexOf("<");_574=_575.substring(_576+1,_577);}if(this.bIsLoggable){this.LOGGER.trace("com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter.doFilter","Stripped HTML tags out: "+_574);}if(_574){var _578={content:""};this.prepareDocumentWrite(_578);this.evalGlobal(_574);_573=true;this.applyDocumentWrite(_572,_578);}return _573;}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler");dojo.declare("com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler",null,{constructor:function(){this.filterChain=new com.ibm.mm.enabler.aggregation.javascript.FilterChain();this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},handle:function(_579){if(this.bIsLoggable){this.LOGGER.entering("WidgetJavascriptHandler.handle",[_579]);}var val=this.filterChain.applyFilters(_579);if(this.bIsLoggable){this.LOGGER.exiting("WidgetJavascriptHandler.handle");}}});}if(!dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript"]){dojo._hasResource["com.ibm.mm.enabler.aggregation.javascript"]=true;dojo.provide("com.ibm.mm.enabler.aggregation.javascript");com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER=new com.ibm.mm.enabler.aggregation.javascript.WidgetJavascriptHandler();com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.filterChain.addFilter(new com.ibm.mm.enabler.aggregation.javascript.ExternalScriptFilter());com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER.filterChain.addFilter(new com.ibm.mm.enabler.aggregation.javascript.InlineScriptFilter());}if(!dojo._hasResource["com.ibm.mashups.iwidget.Constants"]){dojo._hasResource["com.ibm.mashups.iwidget.Constants"]=true;dojo.provide("com.ibm.mashups.iwidget.Constants");dojo.declare("com.ibm.mashups.iwidget.Constants",null,{WIDGET_LOADED:"com.ibm.mashups.iwidget.widgetloaded",RESIZE_WIDGET:"com.ibm.mashups.iwidget.resizewidget",UNLOAD_WIDGETS:"com.ibm.mashups.iwidget.unloadwidgets",WIDGETS_UNLOADED:"com.ibm.mashups.iwidget.widgetsunloaded",WIDGET_MODECHANGED:"com.ibm.mashups.iwidget.widgetmodechanged",CHANGE_WIDGETMODE:"com.ibm.mashups.iwidget.changewidgetmode",WIDGET_WINDOWSTATECHANGED:"com.ibm.mashups.iwidget.widgetwindowstatechanged",CHANGE_WIDGETWINDOWSTATE:"com.ibm.mashups.iwidget.changewidgetwindowstate",NAVSTATE_UPDATED:"com.ibm.mashups.enabler.model.state.onNavStateUpdated"});com.ibm.mashups.iwidget.Constants=new com.ibm.mashups.iwidget.Constants();}if(!dojo._hasResource["com.ibm.mashups.iwidget.iEvents_API"]){dojo._hasResource["com.ibm.mashups.iwidget.iEvents_API"]=true;dojo.provide("com.ibm.mashups.iwidget.iEvents_API");dojo.provide("com.ibm.mashups.iwidget.iEvents");dojo.declare("com.ibm.mashups.iwidget.iEvents",null,{constructor:function(){},fireEvent:function(_57a,_57b,_57c){},setEvent:function(_57d){},setEvents:function(_57e){},removeEvent:function(_57f){},removeEvents:function(_580){},getEvents:function(_581){},createEventDescription:function(_582){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEvent_API"]){dojo._hasResource["com.ibm.mashups.iwidget.IEvent_API"]=true;dojo.provide("com.ibm.mashups.iwidget.IEvent_API");dojo.provide("com.ibm.mashups.iwidget.IEvent");dojo.declare("com.ibm.mashups.iwidget.IEvent",null,{constructor:function(){},name:"",type:"",payload:null,source:""});}if(!dojo._hasResource["com.ibm.mashups.iwidget.IEvent"]){dojo._hasResource["com.ibm.mashups.iwidget.IEvent"]=true;dojo.provide("com.ibm.mashups.iwidget.IEvent");}if(!dojo._hasResource["com.ibm.mm.iwidget.IEventImpl"]){dojo._hasResource["com.ibm.mm.iwidget.IEventImpl"]=true;dojo.provide("com.ibm.mm.iwidget.IEventImpl");dojo.declare("com.ibm.mm.iwidget.IEventImpl",com.ibm.mashups.iwidget.IEvent,{constructor:function(name,type,_583,_584){this.name=name;if(typeof type!="undefined"){this.type=type;}else{this.type=null;}if(typeof _583!="undefined"){this.payload=_583;}else{this.payload=null;}if(typeof _584!="undefined"){this.source=_584;}else{this.source=null;}this.source=_584;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIEventsImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIEventsImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextIEventsImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextIEventsImpl",com.ibm.mashups.iwidget.iEvents,{constructor:function(_585){this.widget=_585;this.id=_585.id;this.svc=com.ibm.mashups.services.ServiceManager.getService("eventService");this.timer=null;this.timerEventQ=[];this.allTargetWidgetsLoaded=false;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createEventDescription:function(_586){return new com.ibm.mm.iwidget.IEventDescriptionImpl(_586);},getEvents:function(_587){var _588=this.widget._getPublicEvents();var _589=_588.getEvents(_587);if(!_589){return null;}var arr=[];for(var i in _589){if(Object.prototype.hasOwnProperty.call(_589,i)){arr.push(_589[i].clone());}}return arr;},setEvent:function(_58a){var _58b=this.widget._getPublicEvents();var rc=_58b.eventExists(_58a.name);var _58c=false;if(rc){_58c=_58b.isUpdateEventRequired(_58a);}else{_58c=true;}if(_58c){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);}}_58b=this.widget._getPublicEvents();rc=_58b.eventExists(_58a.name);if(rc){if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"updateEvent","params":[_58a.toJson()]},this.id);}rc=_58b.updateEvent(_58a);}else{if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"createEvent","params":[_58a.toJson()]},this.id);}rc=_58b.createEvent(_58a);}return rc;},removeEvent:function(_58d){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);}if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"removeEvent","params":[_58d]},this.id);}var _58e=this.widget._getPublicEvents();var rc=_58e.removeEvent(_58d);return rc;},publishEvent:function(_58f,_590,_591){return this.fireEvent(_58f,_591,_590);},fireEvent:function(_592,_593,_594){var _595="fireEvent(eventName, payloadType, payload)";if(this.bIsLoggable){this.LOGGER.entering(_595,[_592,_593,_594]);}if(this.allTargetWidgetsLoaded){this._fireEventFinish(_592,_593,_594);}else{this.timerEventQ.push({"eventName":_592,"payloadType":_593,"payload":_594});if(!this.timer){var _596=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _597=dojo.query("."+this.widget.ns+"ReceivedEvent");var _598=[];for(var i=0;i<_597.length;i++){var _599=dojo.query("."+this.widget.ns+"SourceEvent",_597[i])[0];if(_599){var href=_599.getAttribute("href");if(href.indexOf(this.widget.id)!=-1){var _59a=_596.find(_597[i].parentNode.id);if(_59a){_598.push(_59a);}}}}this.timer_tries=0;this.timer=setInterval(dojo.hitch(this,"_fireEventContinue",_598),5);}}if(this.bIsLoggable){this.LOGGER.exiting(_595);}},_fireEventContinue:function(_59b){var _59c="_fireEventContinue(target_widgets)";if(this.bIsLoggable){this.LOGGER.entering(_59c,[_59b]);}for(var i=0;i<_59b.length;i++){if(!_59b[i].isLoaded()&&(this.timer_tries<20)){this.timer_tries++;if(this.bIsLoggable){this.LOGGER.trace(_59c,"Not all target widgets are loaded, retry "+this.timer_tries);}if(this.bIsLoggable){this.LOGGER.exiting(_59c);}return;}}clearInterval(this.timer);this.timer_tries=0;while(this.timerEventQ.length>0){var _59d=this.timerEventQ.shift();this._fireEventFinish(_59d.eventName,_59d.payloadType,_59d.payload);}this.allTargetWidgetsLoaded=true;this.timer=null;if(this.bIsLoggable){this.LOGGER.exiting(_59c);}},_fireEventFinish:function(_59e,_59f,_5a0){var _5a1="_fireEventFinish(eventName, payloadType, payload)";if(this.bIsLoggable){this.LOGGER.entering(_5a1,[_59e,_59f,_5a0]);}var _5a2=this.widget._getPublicEvents();var _5a3=false;var temp;if(_5a2){temp=_5a2.find(_59e);if(temp){_59f=temp.type;}if(temp&&temp.handlingFn){_5a3=true;}}var _5a4=new com.ibm.mm.iwidget.IEventImpl(_59e,_59f,_5a0,null);if(!_5a3){this.widget.handleEvent(_5a4);}if(_5a2){temp=_5a2.find(_59e);if(temp&&temp.isPublished){this.svc.publishWire(this.id,_59e,_5a0,_59f);}}if(this.bIsLoggable){this.LOGGER.exiting(_5a1);}},setEvents:function(_5a5){var _5a6=this.widget._getPublicEvents();if(this.widget._inIframe()){var arr=[];for(var i=0;i<_5a5.length;i++){arr.push(_5a5[i].toJson());}this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"setEvents","params":[arr]},this.id);}rc=_5a6.setEvents(_5a5);return rc;},removeEvents:function(_5a7){if(this.widget._inIframe()){this.svc._publishEvent(this.svc.WIDGETEVENT_PREFIX+"_stub_"+this.id,{"scope":"eventmodel","methodname":"removeEvents","params":[_5a7]},this.id);}var _5a8=this.widget._getPublicEvents();var rc=_5a8.removeEvents(_5a7);return rc;}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.iEvents"]){dojo._hasResource["com.ibm.mashups.iwidget.iEvents"]=true;dojo.provide("com.ibm.mashups.iwidget.iEvents");}if(!dojo._hasResource["com.ibm.mashups.iwidget.io_API"]){dojo._hasResource["com.ibm.mashups.iwidget.io_API"]=true;dojo.provide("com.ibm.mashups.iwidget.io_API");dojo.provide("com.ibm.mashups.iwidget.io");dojo.declare("com.ibm.mashups.iwidget.io",null,{constructor:function(){},XMLHttpRequest:function(){},rewriteURI:function(uri,_5a9){return null;},xhrReq:function(args){return;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIOImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextIOImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextIOImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextIOImpl",com.ibm.mashups.iwidget.io,{constructor:function(_5aa){this.id=_5aa.id;this.widget=_5aa;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},XMLHttpRequest:function(){return dojo._xhrObj();},rewriteURI:function(uri,_5ab){if(this.bIsLoggable){this.LOGGER.entering("com.ibm.mm.iwidget.io.rewriteURI",[uri,_5ab]);}var _5ac=this.widget._rewriteURI(uri,_5ab);if(this.bIsLoggable){this.LOGGER.exiting("com.ibm.mm.iwidget.io.rewriteURI",[_5ac]);}return _5ac;},getWebAppRootPath:function(){if(this.rootPath){return this.rootPath;}var _5ad=this.widget.getIWidgetInstance().widgetXMLUrl;_5ad=this.widget._getRawBaseUri(_5ad);_5ad=this.widget._getResolvedPocUri(_5ad);var _5ae=null;if(_5ad&&_5ad.indexOf("/")===0){var temp=_5ad.substring(1);if(temp.indexOf("/")>0){_5ae="/"+temp.substring(0,temp.indexOf("/"));}else{_5ae=_5ad;}}if(_5ae){this.rootPath=_5ae;return _5ae;}if(_5ad&&_5ad.indexOf("://")>0){var _5af=_5ad.split("/");if(_5af.length>=4){_5ae=_5af[0]+"//"+_5af[2]+"/"+_5af[3];}}if(_5ae){this.rootPath=_5ae;return _5ae;}return null;},request:function(_5b0,uri,_5b1,_5b2,_5b3){var xhr=dojo._xhrObj();var _5b4=this.rewriteURI(uri);var _5b5=false;if(_5b1){xhr.onreadystatechange=_5b1;_5b5=true;}var _5b6=_5b0||null;if(!_5b0){_5b6=this.httpmethods.GET;}if(_5b0){if(!this.httpmethods[_5b0]){_5b6=this.httpmethods.GET;}}xhr.open(_5b6,_5b4,_5b5);var _5b7=null;var _5b8="application/x-www-form-urlencoded";if(_5b3){for(var i=0;i<_5b3.length;i++){var _5b9=_5b3[i];var _5ba=_5b9[_5ba];var _5bb=_5b9[_5bb];if(_5ba=="Content-Type"){_5b7=_5bb;}else{xhr.setRequestHeader(_5ba,_5bb);}}}xhr.setRequestHeader("Content-Type",(_5b7||_5b8));if(_5b6==this.httpmethods.PUT||_5b6==this.httpmethods.POST){if(_5b2){xhr.send(_5b2);}}else{xhr.send(null);}return xhr;},xhrReq:function(args){if(!args){return;}var _5bc=com.ibm.mashups.enabler.io.XHRMultipartFactory;if(!args.requestVerb||!args.url||!args.handleAs){return;}var _5bd=args.requestVerb;if(_5bd&&!this.requestVerbs[_5bd]){_5bd=this.requestVerbs.get;}if(_5bd&&_5bd==this.requestVerbs.get){var obj=args;delete obj.requestVerb;obj.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrGet(obj);return;}if(_5bd&&_5bd==this.requestVerbs.put){var obj1=args;delete obj1.requestVerb;if(obj1.msgData){obj1.putData=obj1.msgData;delete obj1.msgData;}obj1.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrPut(obj1);return;}if(_5bd&&_5bd==this.requestVerbs["delete"]){var obj2=args;delete obj2.requestVerb;obj2.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrDelete(obj2);return;}if(_5bd&&_5bd==this.requestVerbs.post){var obj3=args;delete obj3.requestVerb;if(obj3.msgData){obj3.postData=obj3.msgData;delete obj3.msgData;}obj3.ibmMultipart={context:_5bc.CONTEXT_ENABLER};dojo.xhrPost(obj3);return;}},httpmethods:{GET:"GET",PUT:"PUT",POST:"POST",DELETE:"DELETE"},requestVerbs:{get:"get",put:"put",post:"post","delete":"delete"}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.io"]){dojo._hasResource["com.ibm.mashups.iwidget.io"]=true;dojo.provide("com.ibm.mashups.iwidget.io");}if(!dojo._hasResource["com.ibm.mashups.iwidget.iContext_API"]){dojo._hasResource["com.ibm.mashups.iwidget.iContext_API"]=true;dojo.provide("com.ibm.mashups.iwidget.iContext_API");dojo.provide("com.ibm.mashups.iwidget.iContext");dojo.declare("com.ibm.mashups.iwidget.iContext",null,{constructor:function(){},constants:{mode:{VIEW:"view",EDIT:"edit",PERSONALIZE:"personalize",CONFIG:"config",HELP:"help"},event:{TITLE:"title",DESCRIPTION:"description"},ATTRIBUTES:"attributes",IDESCRIPTOR:"idescriptor",USERPROFILE:"userprofile",keys:{SHIFT:1,ALT:2,CTRL:4,META:8,CAPSLOCK:16},windowstate:{NORMAL:"normal",MINIMIZE:"minimize",MAXIMIZE:"maximize"},status:{SUCCESS:200,TIMEOUT:408,NOTFOUND:404,INTERROR:500,OTHER:303},changeType:{CHANGEDVALUE:"changedValue",NEWITEM:"newItem",REMOVEDITEM:"removedItem"}},getWidgetId:function(){return null;},getRootElement:function(){return null;},getElementById:function(id,root){return null;},getiWidgetAttributes:function(){return {};},getItemSet:function(name,_5be){return null;},getShareableItemSet:function(name){return null;},requires:function(_5bf,_5c0,uri,cb,_5c1){},iScope:function(){return null;},processMarkup:function(_5c2){return null;},processiWidgets:function(root){},getElementByClass:function(_5c3,root){return null;},getUserProfile:function(){return null;},getiDescriptor:function(){return null;},io:{},iEvents:{}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextDefaultImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextDefaultImpl",com.ibm.mashups.iwidget.iContext,{constructor:function(_5c4){this.widgetwrapper=_5c4;this.widgetId=_5c4.id;this.scope={};this.rootElement=dojo.byId(this.widgetId);this.ns=this.rootElement.className.substr(0,3);this._initEvents();this._initIO();this._initMMExtension();},_destroy:function(){if(this.rootElement){this.rootElement=null;}},getWidgetId:function(){if(this.widgetId){return this.widgetId;}return null;},_initEvents:function(){this.iEvents=null;},_initMMExtension:function(){this._mm=null;},getRootElement:function(){return dojo.byId(this.widgetId);},getElementById:function(id,root){if(!root){root=this._getContentRoot();}var _5c5=[];var rc=com.ibm.mm.iwidget.Utils.findElementByAttribute("id",id,root,_5c5,false);if(rc){return _5c5[0];}else{return null;}},getiWidgetAttributes:function(){var _5c6=this.widgetwrapper.getAttributes();return _5c6;},getItemSet:function(name,_5c7){if(typeof name=="undefined"||name===null){return null;}if(name==iwConstants.ATTRIBUTES){return this.getiWidgetAttributes();}if(name==iwConstants.USERPROFILE){return this.getUserProfile();}if(name==iwConstants.IDESCRIPTOR){return this.getiDescriptor();}var _5c8=this.widgetwrapper.getWidgetItemSet(name);return _5c8;},iScope:function(){return this.scope;},processMarkup:function(_5c9){var _5ca=_5c9.replace(/_IWID_/g,"_"+this.widgetId+"_");var _5cb=_5ca.replace(/iContext(?=\.|\s|\(|\))/g,"_"+this.widgetId+"_iContext");return _5cb;},getElementByClass:function(_5cc,root){if(!root){root=this._getContentRoot();}var _5cd=dojo.query("."+_5cc,root);if(typeof _5cd!="undefined"&&_5cd!==null){if(_5cd.length===0){return null;}else{var _5ce=[];for(var i=0;i<_5cd.length;i++){_5ce.push(_5cd[i]);}return _5ce;}}return null;},getWidgetXMLPath:function(){var url=this.widgetwrapper.getIWidgetInstance().widgetXMLUrl;var _5cf=url.indexOf("?");if(0<_5cf){url=url.substring(0,_5cf);}var url2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(url);if(url2){url=url2;}return url;},_getWidgetBaseUri:function(){var _5d0=this.widgetwrapper.getIWidgetInstance().widgetXMLUrl;var _5d1=_5d0.indexOf("?");if(0<_5d1){_5d0=_5d0.substring(0,_5d1);}return _5d0.substring(0,_5d0.lastIndexOf("/")+1);},_getContentRoot:function(){var _5d2=this.getRootElement();var _5d3=this.widgetwrapper.currentMode;if(!_5d3){_5d3="view";}var _5d4=this.widgetwrapper.windowManager[_5d3];if(_5d4){var temp=_5d4.root;if(temp){_5d2=temp;}}return _5d2;},getiDescriptor:function(){var _5d5=this.widgetwrapper.getIDescriptorItems();return _5d5;},_initIO:function(){this.io=new com.ibm.mm.iwidget.icontext.IContextIOImpl(this.widgetwrapper);},getUserProfile:function(){return null;},requires:function(_5d6,_5d7,uri,cb,_5d8){return;},processiWidgets:function(root){return;}});com.ibm.mm.iwidget.icontext.IContextImpl=com.ibm.mm.iwidget.icontext.IContextDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.icontext.IContextExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.iContext"]){dojo._hasResource["com.ibm.mashups.iwidget.iContext"]=true;dojo.provide("com.ibm.mashups.iwidget.iContext");}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel");dojo.declare("com.ibm.mashups.iwidget.itemset.ManagedItemSetCallbackModel",null,{constructor:function(){},postSaveCallbackFn:function(_5d9,_5da){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet_API"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet_API"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSet_API");dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSet");dojo.declare("com.ibm.mashups.iwidget.itemset.ManagedItemSet",null,{constructor:function(){},save:function(_5db){},commit:function(_5dc){},setItemValue:function(_5dd,_5de,_5df){return this;},setItemValue:function(_5e0,_5e1){return this;},getItemValue:function(_5e2){return null;},getAllNames:function(){return null;},removeItem:function(_5e3){return null;},clone:function(){return null;},isReadOnly:function(_5e4){return null;},getItemSetDescription:function(){return null;},addListener:function(_5e5){return null;},removeListener:function(_5e6){return true;}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.EventService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.EventService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.EventService");dojo.declare("com.ibm.mashups.iwidget.services.EventService",null,{SERVICE_NAME:"eventService",constructor:function(){},fireEvent:function(_5e7,_5e8,_5e9,_5ea,_5eb){},broadcastEvent:function(_5ec,_5ed,_5ee,_5ef){},broadcastEvent:function(_5f0,_5f1,_5f2,_5f3,_5f4){},broadcastEvent:function(_5f5,_5f6,_5f7,_5f8,_5f9,_5fa){},broadcastEvents:function(_5fb,_5fc){},broadcastEvents:function(_5fd,_5fe,_5ff){},broadcastEvents:function(_600,_601,_602,_603){},publishEvent:function(_604,_605,_606,_607){},subscribeEvent:function(_608,_609,_60a,_60b,_60c){},unsubscribeEvent:function(_60d,_60e){}});com.ibm.mashups.iwidget.services.EventService.SERVICE_NAME="eventService";}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_60f,_610,_611){this.widget=_60f;this.defiDescriptorItems=_610;this.instanceiDescriptorItems=_611;this.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this._updatedItems={};this._hasDynamicTitle=false;this._hasDynamicIcon=false;},readOnlyItems:{defaultHeight:"defaultHeight",defaultWidth:"defaultWidth",displayLocale:"displayLocale",messageLocale:"messageLocale",author:"author",email:"email",website:"website",version:"version",icon:"icon"},writableItems:{title:"title",name:"name",description:"description",availableMessageLocales:"availableMessageLocales",mode:"mode",windowState:"windowState"},localizedItems:{title:"title",name:"name",description:"description"},getItemValue:function(name){if(typeof name=="undefined"||name===null){return null;}var _612=null;if(name==iwConstants.iDescriptorItems.mode){var _613=this.widget;if(_613){_612=_613.currentMode;}}else{if(name==iwConstants.iDescriptorItems.displayLocale){var _614=ibmConfig.locale;var _615=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var temp=_615.getValue(com.ibm.mashups.enabler.services.ConfigConstants.DISPLAY_LOCALE);if(temp){_614=temp;}_612=_614;}else{if(name==iwConstants.iDescriptorItems.messageLocale){_612=this._getMessageLocale();}else{if(name==iwConstants.iDescriptorItems.windowState){_612=this._getWindowState();}else{_612=this._getItemValue(name);}}}}return _612;},_getWindowState:function(){return "normal";},_getItemValue:function(_616){var _617=null;var _618=null;var _619=null;if(this.localizedItems[_616]){_619=this._getMessageLocale();}if(_616==iwConstants.iDescriptorItems.title){_618=this._getDynamicTitle();}if(_618===null&&this.instanceiDescriptorItems){_618=this.instanceiDescriptorItems.getItemValue(_616,_619);}if(_618===null&&this.defiDescriptorItems){_617=this.defiDescriptorItems.getItemValue(_616,_619);if(typeof _617=="undefined"){_617=null;}}if(_618!==null){return _618;}return _617;},_getDynamicTitle:function(){return null;},_setDynamicTitleOrIcon:function(name,_61a){},setItemValue:function(name,_61b){if(typeof name=="undefined"||name===null){return null;}if(typeof _61b=="undefined"||_61b===null){return null;}if(this.readOnlyItems[name]){return null;}if(name==iwConstants.iDescriptorItems.mode){var _61c=this._getWidgetDef().getSupportedModes();if(this._contains(_61c,_61b)){this._updatedItems[name]=_61b;}else{return null;}}if(name==iwConstants.iDescriptorItems.windowState){var _61d=this._getWidgetDef().getSupportedWindowStates();if(this._contains(_61d,_61b)){this._updatedItems[name]=_61b;}else{return null;}}if(this.widget.id&&(name==iwConstants.iDescriptorItems.title||name==iwConstants.iDescriptorItems.icon)){this._setDynamicTitleOrIcon(name,_61b);}var _61e=null;if(this.localizedItems[name]){_61e=this._getMessageLocale();}if(name==this.writableItems.title||name==this.writableItems.name||name==this.writableItems.description){this.instanceiDescriptorItems.setItemValue(name,_61b,false,_61e);}if(name==iwConstants.iDescriptorItems.availableMessageLocales){this.instanceiDescriptorItems.setItemValue(name,_61b,false);}return this;},isReadOnly:function(name){if(typeof name=="undefined"||name===null){return false;}if(this.readOnlyItems[name]){return true;}else{return false;}},removeItem:function(name){return null;},getAllNames:function(){var arr={};if(this.defiDescriptorItems){var _61f=this.defiDescriptorItems.getAllNames();for(var i in _61f){if(Object.prototype.hasOwnProperty.call(_61f,i)){arr[_61f[i]]=true;}}}if(this.instanceiDescriptorItems){var _620=this.instanceiDescriptorItems.getAllNames();for(var j in _620){if(Object.prototype.hasOwnProperty.call(_620,j)){arr[_620[j]]=true;}}}this._hasDynamicTitle&&(arr[iwConstants.iDescriptorItems.title]=true);this._hasDynamicIcon&&(arr[iwConstants.iDescriptorItems.icon]=true);var _621=[];for(var name in arr){if(Object.prototype.hasOwnProperty.call(arr,name)){_621.push(name);}}return _621;},save:function(cb){return this.commit(cb);},commit:function(_622){if(this.serverless){this._saveMicroformat();}if(this._updatedItems[iwConstants.iDescriptorItems.mode]){var _623=this._updatedItems[iwConstants.iDescriptorItems.mode];this.widget._handleOnModeChange(_623);}if(this._updatedItems[iwConstants.iDescriptorItems.windowState]){var _624=this._updatedItems[iwConstants.iDescriptorItems.windowState];var _625=this._getWindowState();var _626=com.ibm.mashups.services.ServiceManager.getService("eventService");_626.publishEvent(com.ibm.mashups.iwidget.Constants.CHANGE_WIDGETWINDOWSTATE,{id:this.widget.id,newWindowState:_624,oldWindowState:_625});}if(_622){_622(iwConstants.IDESCRIPTOR,true);}},_saveMicroformat:function(){this.widget.commit();var _627={};_627.wid=this.widget.id;this.widget.eventSvr._publishEvent(iwConstants.EVENTS.onAttributeSaved,_627,this.widget.hubId);},addListener:function(fn){var _628=this.widget;var _629=_628._registerListener(iwConstants.IDESCRIPTOR,fn);return _629;},removeListener:function(_62a){var _62b=this.widget;return _62b._removeListener(iwConstants.IDESCRIPTOR,_62a);},_getWidgetDef:function(){return this.widget.widgetDef;},_contains:function(arr,_62c){var rc=false;for(var i=0;i<arr.length;i++){if(_62c==arr[i]){rc=true;break;}}return rc;},_getMessageLocale:function(){if(this.messageLocale){return this.messageLocale;}var _62d=null;var _62e=this._getItemValue(iwConstants.iDescriptorItems.messageLocale);if(_62e){var _62f=_62e.split(" ");var _630=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var temp=_630.getValue(com.ibm.mashups.enabler.services.ConfigConstants.DISPLAY_LOCALE);if(temp){_62d=this._getLocale(_62f,temp,ibmConfig.locale);}}if(!_62d){_62d=ibmConfig.locale;}this.messageLocale=_62d;return this.messageLocale;},_getLocale:function(_631,_632,_633){switch(_631.length){case 0:return null;case 1:return com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_631[0]);default:var _634=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_632,_631);if(_634){return _634;}var _635=com.ibm.mm.enabler.utils.LocaleHelper.matchLocale(_633,_631);if(_635){return _635;}return com.ibm.mm.enabler.utils.LocaleHelper.normalizeLocale(_631[0]);}}});com.ibm.mm.iwidget.manageditemset.IDescriptorImpl=com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ManagedItemSet"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ManagedItemSet");}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.PersistentAttributes"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.PersistentAttributes"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.PersistentAttributes");dojo.declare("com.ibm.mm.iwidget.manageditemset.InternalPersistentAttributesToPreferenceModelAdapter",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_636,_637,_638){if(_637){this.serverless=true;}else{this.serverless=false;}this.modes=iwConstants.mode;this.widget=_636;this.widgetInstance=this.widget.getIWidgetInstance();this.instanceAttributes=this.widgetInstance.getAttributes();this.defAttributes=this.widget.widgetDef.getAttributes();this.parent=_638;this.mode=this._getMode(null);},setItemValue:function(_639,_63a,_63b){if(!_639){return null;}if(!_63a){return null;}if(this.isReadOnly(_639)){return null;}if(this.serverless){if(this.mode==this.modes.EDIT){this.instanceAttributes.setItemValue(_639,_63a);if(this.parent){return this.parent;}}}return null;},getItemValue:function(_63c,_63d){if(!_63c){return null;}var _63e;if(this.serverless){if(typeof _63d==="undefined"){_63d=true;}if(this.mode==this.modes.CONFIG){_63e=this.defAttributes.getItemValue(_63c);if(typeof _63e==="undefined"){_63e=null;}return _63e;}if(this.mode==this.modes.EDIT&&!_63d){_63e=this.instanceAttributes.getItemValue(_63c);if(typeof _63e==="undefined"){_63e=null;}return _63e;}if(_63d){_63e=this.instanceAttributes.getItemValue(_63c);if(!_63e){_63e=this.defAttributes.getItemValue(_63c);}if(typeof _63e==="undefined"){_63e=null;}return _63e;}}return null;},getAllNames:function(_63f){if(this.serverless){if(typeof _63f==="undefined"){_63f=true;}var _640;if(this.mode==this.modes.CONFIG){_640=this.defAttributes.getAllNames();if(_640&&_640.length&&_640.length===0){return null;}return _640;}if(this.mode==this.modes.EDIT&&!_63f){_640=this.instanceAttributes.getAllNames();if(_640&&_640.length&&_640.length===0){return null;}return _640;}var name;if(_63f){_640=this.instanceAttributes.getAllNames();var obj={};if(_640&&_640.length&&_640.length>0){for(var i in _640){if(Object.prototype.hasOwnProperty.call(_640,i)){name=_640[i];obj[name]=name;}}}_640=this.defAttributes.getAllNames();if(_640&&_640.length&&_640.length>0){for(var j in _640){if(Object.prototype.hasOwnProperty.call(_640,j)){name=_640[j];obj[name]=name;}}}return this._getNamesArray(obj);}}return null;},removeItem:function(_641){if(!_641){return null;}if(this.isReadOnly(_641)){return null;}if(this.serverless){if(this.mode==this.modes.EDIT){this.instanceAttributes.removeItem(_641);if(this.parent){return this.parent;}}}return null;},isReadOnly:function(_642,_643){if(!_642){return false;}if(this.serverless){if(typeof _643==="undefined"){_643=true;}if(this.mode==this.modes.CONFIG){return this.defAttributes.isReadOnly(_642);}if(this.mode==this.modes.EDIT&&_643){var _644=this.defAttributes.isReadOnly(_642);if(!_644){_644=this.instanceAttributes.isReadOnly(_642);}return _644;}if(this.mode==this.modes.EDIT){return this.instanceAttributes.isReadOnly(_642);}}return false;},commit:function(_645){if(this.serverless){this._saveMicroformat();}else{return null;}if(_645){_645(iwConstants.ATTRIBUTES,true);}return (this);},_getNamesArray:function(_646){var i=0;var _647=[];var name;for(name in _646){if(Object.prototype.hasOwnProperty.call(_646,name)){_647.push(name);i++;}}if(i===0){return null;}return _647;},_saveMicroformat:function(){this.widget.commit();var _648={};_648.wid=this.widget.id;this.widget.eventSvr._publishEvent(iwConstants.EVENTS.onAttributeSaved,_648,this.widget.hubId);},_getMode:function(_649){var mode=this.modes.EDIT;if(_649){mode=_649;}else{mode=this.widget.currentMode;}if(mode==this.modes.VIEW){mode=this.modes.EDIT;}return mode;},addListener:function(fn){var _64a=this.widget._registerListener(iwConstants.ATTRIBUTES,fn);return _64a;},removeListener:function(_64b){return this.widget._removeListener(iwConstants.ATTRIBUTES,_64b);}});dojo.declare("com.ibm.mm.iwidget.manageditemset.PersistentAttributes",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_64c,_64d){this._internalPersistentAttributesToPreferenceModelAdapter=new com.ibm.mm.iwidget.manageditemset.InternalPersistentAttributesToPreferenceModelAdapter(_64c,_64d,this);},setItemValue:function(_64e,_64f){return this._internal().setItemValue(_64e,_64f,true);},getItemValue:function(_650){return this._internal().getItemValue(_650,true);},getAllNames:function(){return this._internal().getAllNames(true);},removeItem:function(_651){return this._internal().removeItem(_651);},isReadOnly:function(_652){return this._internal().isReadOnly(_652,true);},save:function(_653){return this.commit(_653);},commit:function(_654){return this._internal().commit(_654);},_internal:function(){return this._internalPersistentAttributesToPreferenceModelAdapter;},addListener:function(fn){return this._internal().addListener(fn);},removeListener:function(_655){return this._internal().removeListener(_655);}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ItemSet"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ItemSet"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ItemSet");dojo.declare("com.ibm.mashups.iwidget.itemset.ItemSet",null,{constructor:function(){},setLocalizedItemValue:function(_656,_657,_658){return this;},setItemValue:function(_659,_65a,_65b){return this;},setItemValue:function(_65c,_65d){return this;},getLocalizedItemValue:function(_65e,_65f){return null;},getItemValue:function(_660){return null;},getAllNames:function(){return null;},removeItem:function(_661){return null;},removeItemValue:function(_662){return null;},removeLocalizedItemValue:function(_663,_664){return null;},getLocalesWithValues:function(_665){return null;},clone:function(){return null;},isReadOnly:function(_666){return false;},getItemSetDescription:function(){return null;},addListener:function(_667){return null;},removeListener:function(_668){return true;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.itemset.ItemsetDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.itemset.ItemsetDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.itemset.ItemsetDefaultImpl");dojo.declare("com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl",com.ibm.mashups.iwidget.itemset.ItemSet,{constructor:function(_669,_66a,name){this.widget=_669;this.name=name;var _66b=this.widget.getIWidgetInstance();var _66c=null;if(_66b){_66c=_66b.getItemSet(name);}var _66d={};if(_66a){if(_66a){for(var _66e in _66a.items){if(Object.prototype.hasOwnProperty.call(_66a.items,_66e)){_66d[_66e]=dojo.clone(_66a.items[_66e]);}}}this.properties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_66d);}if(!this.properties){this.properties=new com.ibm.mm.iwidget.widget.ModifiablePropertiesImpl(_66d);}if(_66c){for(var _66f in _66c){if(Object.prototype.hasOwnProperty.call(_66c,_66f)){var _670=_66c[_66f];if(_670.values){for(var j in _670.values){if(Object.prototype.hasOwnProperty.call(_670.values,j)){this.properties.setItemValue(_66f,_670.values[j],false,j);}}}if(_670.value){this.properties.setItemValue(_66f,_670.value);}}}}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},_getResourceBundle:function(){if(!this.iwMessages){this.iwMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");}return this.iwMessages;},_logDeprecated:function(_671,fn1,fn2){this._getResourceBundle();var _672=dojo.string.substitute(this.iwMessages.W_DEPRECATE_2,[fn1,fn2]);this.LOGGER.warning(_671,_672);},getLocalesWithValues:function(_673){return this.properties.getItemLocales(_673);},setLocalizedItemValue:function(_674,_675,_676){if(!_674||!_676){return null;}if(!(typeof _675!="undefined"&&_675!==null)){return null;}rc=this.properties.setItemValue(_674,_675,false,_676);if(rc){return this;}return null;},setItemValue:function(_677,_678,_679){if(!_677){return null;}if(!(typeof _678!="undefined"&&_678!==null)){return null;}if(!_679){rc=this.properties.setItemValue(_677,_678,false);}else{if(_679&&!dojo.isString(_679)){this._logDeprecated("setItemValue","ItemSet.setItemValue(itemName,value,readOnly)","ItemSet.setItemValue(item,value)");rc=this.properties.setItemValue(_677,_678,false);}else{this._logDeprecated("setItemValue","ItemSet.setItemValue(itemName,value,locale)","ItemSet.setLocalizedItemValue(item,value,locale)");return this.setLocalizedItemValue(_677,_678,_679);}}if(rc){return this;}return null;},getLocalizedItemValue:function(_67a,_67b){if(!_67a||!_67b){return null;}return this.properties.getLocalizedItemValue(_67a,_67b);},getItemValue:function(_67c,_67d){if(!_67c){return null;}if(_67d){this._logDeprecated("getItemValue","ItemSet.getItemValue(itemName,locale)","ItemSet.getLocalizedItemValue(item,locale)");return this.getLocalizedItemValue(_67c,_67d);}return this.properties.getItemValue(_67c);},getAllNames:function(){rc=this.properties.getAllNames();if(rc&&rc.length===0){return null;}return rc;},removeItem:function(_67e,_67f){if(!_67e){return null;}if(_67f){this._logDeprecated("removeItem","ItemSet.removeItem(itemName,locale)","ItemSet.removeLocalizedItemValue(itemName,locale)");return this.removeLocalizedItemValue(_67e,_67f);}rc=this.properties.removeItem(_67e);if(rc){return this;}return null;},removeLocalizedItemValue:function(_680,_681){if(!_680||!_681){return null;}rc=this.properties.removeItemValue(_680,_681);if(rc){return this;}return null;},removeItemValue:function(_682){if(!_682){return null;}rc=this.properties.removeItemValue(_682);if(rc){return this;}return null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl"]){dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl"]=true;dojo.provide("com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl");dojo.declare("com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl",com.ibm.mm.enabler.DeferredImpl,{constructor:function(_683){this.wrapper=_683;},start:function(sync){if(sync){return;}var _684=this.wrapper.getIWidgetInstance();var _685=dojo.clone(this.wrapper.rootElement);this._unchangeCompleteCallback(_685);},setIncludeParent:function(_686){this.includeParent=_686;},getIncludeParent:function(){return this.includeParent;},_unchangeCompleteCallback:function(node){if(dojo.isFunction(this.getFinishedCallback())){this.finish(node,200);}}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.ContainerService_API");dojo.provide("com.ibm.mashups.iwidget.services.ContainerService");dojo.declare("com.ibm.mashups.iwidget.services.ContainerService",null,{SERVICE_NAME:"iWidgetContainerService",PROVIDER_EVENTS:"events",PROVIDER_WIRES:"wires",PROVIDER_ATTRIBUTES:"attributes",registerOnChangeListener:function(_687,_688){},getPersistenceMode:function(_689,_68a){},switchToModifiablePersistenceMode:function(){}});com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME="iWidgetContainerService";com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS="events";com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES="wires";com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES="attributes";}if(!dojo._hasResource["com.ibm.mm.iwidget.services.ContainerServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.ContainerServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.ContainerServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.ContainerServiceImpl",com.ibm.mashups.iwidget.services.ContainerService,{constructor:function(){this._modes=null;this._modModes=null;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.TOPIC_BASE="/"+("com.ibm.mm.iwidget.services.ContainerServiceImpl".replace(/\./ig,"/"))+"/";this.TOPIC_CHANGE=this.TOPIC_BASE+"change";this.TOPIC_CHANGE_EVENTS=this.TOPIC_CHANGE+"/events";this.TOPIC_CHANGE_WIRES=this.TOPIC_CHANGE+"/wires";this.TOPIC_CHANGE_ATTRIBUTES=this.TOPIC_CHANGE+"/attributes";this._topics={};this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=this.TOPIC_CHANGE_EVENTS;this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=this.TOPIC_CHANGE_WIRES;this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=this.TOPIC_CHANGE_ATTRIBUTES;},_invalidate:function(){this._modes=null;this._modModes=null;},_init:function(){if(this._modes){return;}var _68b="_init";if(this.bIsLoggable){this.LOGGER.entering(_68b,arguments);}var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _68c=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE);var _68d=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_EVENTS);var _68e=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_WIRES);var _68f=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_ATTRIBUTES);this._modes={};this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=(_68d)?_68d:_68c;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=(_68e)?_68e:_68c;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=(_68f)?_68f:_68c;_68d=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_EVENTS_MODIFIABLE);_68e=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_WIRES_MODIFIABLE);_68f=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_ATTRIBUTES_MODIFIABLE);this._modModes={};this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=(_68d)?_68d:_68c;this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=(_68e)?_68e:_68c;this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=(_68f)?_68f:_68c;if(this.bIsLoggable){this.LOGGER.trace(_68b,"Selected Modes for the iWidget Providers:");this.LOGGER.trace(_68b,com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS+": "+this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]);this.LOGGER.trace(_68b,com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES+": "+this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]);this.LOGGER.trace(_68b,com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES+": "+this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]);this.LOGGER.exiting(_68b);}},registerOnChangeListener:function(_690,_691){this._init();var _692=dojo.subscribe(this._topics[_690],_691.context,_691.callback);if(dojo.isFunction(_691.unregister)){dojo.hitch(_691.context,_691.unregister)(_692);}},getPersistenceMode:function(_693,_694){this._init();return this._modes[_693];},switchToModifiablePersistenceMode:function(_695){var _696="switchToModifiablePersistenceMode";if(this.bIsLoggable){this.LOGGER.entering(_696,arguments);}this._init();var _697=this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS];var _698=this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS];var _699=this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES];var _69a=this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES];var _69b=this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES];var _69c=this._modModes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES];this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS]=_698;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES]=_69a;this._modes[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES]=_69c;if(_697!=_698){if(this.bIsLoggable){this.LOGGER.trace(_696,"old mode != new mode, switching...");}dojo.publish(this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS],[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS,_697,_698]);dojo.publish(this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES],[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES,_699,_69a]);dojo.publish(this._topics[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES],[com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES,_69b,_69c]);}if(this.bIsLoggable){this.LOGGER.exiting(_696);}}});com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME,new com.ibm.mm.iwidget.services.ContainerServiceImpl());}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.ContainerService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.ContainerService");}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate");dojo.declare("com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_69d,_69e){this.persistentAttributesFactoryService=_69d;this.wrapper=_69e;this.callbackHandle={context:this,callback:"_attributesProviderModeChange",unregister:function(_69f){this.wrapper.unregisterArray.push(_69f);}};this.widgetAttributes=[];this.widgetAttributesReplay=[];this._skipRecord=false;this._getAttributes();},_attributesProviderModeChange:function(_6a0,_6a1,_6a2){this.widgetAttributes=[];this._getAttributes();var _6a3=this._getModeSelector();var _6a4=this.widgetAttributesReplay[_6a3];if(_6a4){this._skipRecord=true;for(var i=0;i<_6a4.length;i++){var _6a5=_6a4[i];if(_6a5[0]=="set"){this.setItemValue(_6a5[1],_6a5[2]);}else{if(_6a5[0]=="remove"){this.removeItem(_6a5[1]);}}}this._skipRecord=false;}this.widgetAttributesReplay=[];this.widgetAttributesReplay[_6a3]=[];},_getModeSelector:function(){var _6a6=this.wrapper._getCurrentMode();var _6a7=iwConstants.mode.PERSONALIZE;if(_6a6==iwConstants.mode.CONFIG||_6a6==iwConstants.mode.EDIT){_6a7=_6a6;}return _6a7;},_getAttributes:function(){var _6a8=this._getModeSelector();this.widgetAttributes[_6a8]=this.widgetAttributes[_6a8]||null;if(this.widgetAttributes[_6a8]===null){this.widgetAttributes[_6a8]=this.persistentAttributesFactoryService.createPersistentAttributes(this.wrapper,this.callbackHandle);this.callbackHandle=null;}return this.widgetAttributes[_6a8];},_record:function(_6a9){if(!this._skipRecord){var _6aa=this._getModeSelector();this.widgetAttributesReplay[_6aa]=this.widgetAttributesReplay[_6aa]||null;if(this.widgetAttributesReplay[_6aa]===null){this.widgetAttributesReplay[_6aa]=[];}this.widgetAttributesReplay[_6aa].push(_6a9);}},_clearReplay:function(){var _6ab=this._getModeSelector();this.widgetAttributesReplay[_6ab]=[];},setItemValue:function(_6ac,_6ad){this._record(["set",_6ac,_6ad]);return this._getAttributes().setItemValue(_6ac,_6ad);},getItemValue:function(_6ae){return this._getAttributes().getItemValue(_6ae,true);},getAllNames:function(){return this._getAttributes().getAllNames(true);},removeItem:function(_6af){this._record(["remove",_6af]);return this._getAttributes().removeItem(_6af);},isReadOnly:function(_6b0){return this._getAttributes().isReadOnly(_6b0,true);},save:function(_6b1){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);}this._clearReplay();return this._getAttributes().save(_6b1);},commit:function(_6b2){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);if(cs){cs.switchToModifiablePersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);}this._clearReplay();return this._getAttributes().commit(_6b2);},addListener:function(fn){return this._getAttributes().addListener(fn);},removeListener:function(_6b3){return this._getAttributes().removeListener(_6b3);}});}if(!dojo._hasResource["com.ibm.mm.iwidget.DeferredLoadImpl"]){dojo._hasResource["com.ibm.mm.iwidget.DeferredLoadImpl"]=true;dojo.provide("com.ibm.mm.iwidget.DeferredLoadImpl");dojo.declare("com.ibm.mm.iwidget.DeferredLoadImpl",com.ibm.mm.enabler.DeferredImpl,{constructor:function(uri,id,_6b4){this.uri=uri;if(typeof id=="undefined"){id=null;}this.id=id;if(typeof _6b4=="undefined"){_6b4=null;}this.widgetDef=_6b4;},start:function(sync){if(this.widgetDef){this._handleCallback(this.widgetDef,200);return this.widgetDef;}var mode=(typeof (sync)=="undefined")?true:sync;var _6b5=com.ibm.mashups.services.ServiceManager.getService("widgetLoadService");_6b5.getWidgetXML(this.uri,mode,dojo.hitch(this,"_handleLoad"),this.id);if(sync){return this.widgetDef;}return null;},_handleLoad:function(data,_6b6,xhr){if(xhr){_6b6=xhr.status;}if(_6b6!=200){data=null;}this.widgetDef=data;this._handleCallback(data,status);},_handleCallback:function(_6b7,_6b8){this.finish(_6b7,_6b8);}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl",com.ibm.mashups.iwidget.widget.IWidgetWrapper,{constructor:function(_6b9,id){this._internalIbmModes=iwConstants._INTERNALIBMMODES;this.rootElement=_6b9;this.id=id||dojo.attr(_6b9,"id");this.hubId=this.id;this.simpleWidgetEvents={};this.loaded=false;this.standalone=null;this.widgetAttributes=null;this.widgetItemSets=null;this.ns=_6b9.className.substr(0,3);this.windowManager={};this.iwMessages=null;this.eventSvr=com.ibm.mashups.services.ServiceManager.getService("eventService");this._jsHandler=com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER;this.eventHandlers=[];this.unregisterArray=[];this.publishedEvents={};this.handledEvents={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getID:function(){return this.id;},getIWidgetInstance:function(){if(this.widgetInstance){return this.widgetInstance;}this.widgetInstance=new com.ibm.mm.iwidget.widget.IWidgetInstanceImpl(this,this.rootElement,this.id);return this.widgetInstance;},setIWidgetDefinition:function(_6ba){this.widgetDef=_6ba;},getIWidgetDefinition:function(){if(this.loaded){return new com.ibm.mm.iwidget.DeferredLoadImpl(this.getIWidgetInstance().widgetXMLUrl,this.id,this.widgetDef);}else{return new com.ibm.mm.iwidget.DeferredLoadImpl(this.getIWidgetInstance().widgetXMLUrl,this.id);}},getMarkup:function(){return new com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl(this);},doRender:function(){try{this.prepare();this.execute();}catch(e){this.LOGGER.severe("IWidgetWrapper.doRender","widget: ${0} OnloadingException: ${1}",[this.hubId,e]);}},prepare:function(){var _6bb="_"+this.id+"_"+"iContext";if(!this.isModal()){dojo.global[_6bb]=new com.ibm.mm.iwidget.icontext.IContextImpl(this,this.ns);}else{var _6bc=this._mainframeId;var _6bd=parent[_6bc][_6bb];dojo.global[_6bb]=_6bd;}var _6be=this.eventSvr._subscribeEvent(this.eventSvr.WIDGETEVENT_PREFIX+this.hubId,this,"handleEvent",null,this.hubId);if(!this._inIframe()){this.eventHandlers.push(_6be);}},execute:function(){this._initialize(dojo.hitch(this,function(){this._doRender();}));},_initialize:function(_6bf){var lang=this.widgetDef.getDefaultLanguage();if(typeof lang!="undefined"&&lang!==null){this.defaultLanguage=lang;}else{this.defaultLanguage="en";}var _6c0=this._getInitDefaultMode();if(_6c0===null){_6c0=iwConstants.mode_view;}this.currentMode=_6c0;if(this._handleSaveMode){this._handleSaveMode();}this._initManagedItemSet();if(_6bf){_6bf();}},_getResourceBundle:function(){return null;},_logUpdateMarkupError:function(mode){},_getMarkupByMode:function(mode){var _6c1=this.widgetDef;var elem=_6c1.getMarkupByMode(mode);if(elem&&elem.uri){var uri=this._rewriteURI(elem.uri);dojo.xhrGet({url:uri,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},handleAs:"text",sync:true,load:function(_6c2){if(_6c2){var _6c3={};_6c3.content=_6c2;_6c1.setMarkupByMode(mode,_6c3);}},error:function(data,_6c4){this.LOGGER.severe("_getMarkupByMode","error loading content for mode:"+mode,data);delete elem.uri;}});}var _6c5=null;if(_6c1.getMarkupByMode(mode)){_6c5=_6c1.getMarkupByMode(mode).content;}return _6c5;},_updateTitle:function(){},_updateMarkup:function(mode,_6c6){var _6c7=this._getMarkupByMode(mode);if(mode==iwConstants.mode_view){if(this.widgetDef.getAllowInstanceContent()){var temp=this.getIWidgetInstance().getDefaultViewContent();if(temp&&temp!==null){_6c7=temp;}}}if(typeof _6c7=="undefined"||_6c7===null){this._logUpdateMarkupError(mode);return true;}var _6c8=this._prepareMarkup(_6c7);_6c8=_6c8.replace(/^\s+|\s+$/,"");if(_6c8.indexOf("<script")===0){_6c8="&nbsp;"+_6c8;}var _6c9=document.createElement("DIV");_6c9.innerHTML=_6c8;var _6ca=_6c9.getElementsByTagName("script");if(_6ca!==null){for(var i=0,l=_6ca.length;i<l;i++){var _6cb=_6ca[i];var id=_6cb.getAttribute("id");if(id===null||id==""){_6cb.setAttribute("id","_scr#"+i);}}}_6c6.innerHTML=_6c9.innerHTML;com.ibm.mm.enabler.utils.Dom.destroyNode(_6c9);return true;},_prepareMarkup:function(_6cc){var _6cd=_6cc.replace(/_IWID_/g,"_"+this.id+"_");var _6ce=_6cd.replace(/iContext(?=\.|\s|\(|\))/g,"_"+this.id+"_iContext");return _6ce;},destroy:function(_6cf){if(this.loaded&&!this.isModal()){this._handleEventInternal(iwConstants.EVENTS.onUnLoad);}if(!this._inIframe()){var _6d0=this.getIWidgetInstance().getWireModel();if(_6d0){var _6d1=_6d0.getWires();if(_6d1){var j=_6d1.length;for(var k=j-1;k>=0;k--){var _6d2=_6d1[k].getSourceWidgetID();_6d0.removeWire(_6d2);this.commit();}}}var _6d3=null;if(_6d0){_6d3=_6d0.getTargets();}if(_6d3&&true!==_6cf){var _6d4=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();for(var i in _6d3){if(Object.prototype.hasOwnProperty.call(_6d3,i)){var _6d5=_6d4.find(i);if(_6d5){var _6d6=_6d5.getIWidgetInstance().getWireModel();_6d6.removeWire(this.id);_6d5.commit();}}}}for(var x in this.eventHandlers){if(Object.prototype.hasOwnProperty.call(this.eventHandlers,x)){this.eventSvr._unsubscribeEvent(this.eventHandlers[x],this.hubId);}}this.eventSvr._getHubAdapter(this.hubId).removeInlineHubClient(this.hubId);if(dojo.global["_"+this.id+"_"+"iContext"]){dojo.global["_"+this.id+"_"+"iContext"]._destroy();dojo.global["_"+this.id+"_"+"iContext"]=null;}}else{if(!this.isModal()){this.eventSvr.disconnectHubClient();if(dojo.global["_"+this.id+"_"+"iContext"]){dojo.global["_"+this.id+"_"+"iContext"]=null;}}}if(this.rootElement){this.rootElement=null;}if(this.windowManager){this.windowManager=null;}this.widgetInstance._destroy();},_doRender:function(){if(!this._inIframe()){this._updateTitle();}var _6d7=document.createElement("div");_6d7.className=this.ns+"Content";this.rootElement.appendChild(_6d7);var _6d8=this.rootElement.lastChild;dojo.addClass(_6d8,this.currentMode);_6d8.style.visibility="hidden";if(this._inIframe()){dojo.style(_6d8,"height","100%");}var _6d9=this.widgetDef.getIDescriptorItems();var _6da=_6d9.getItemValue(iwConstants.iDescriptorItems.mode);if(this.isModal()&&this.currentMode!=_6da){var _6db=document.createElement("div");_6db.className=this.ns+"Content";this.rootElement.appendChild(_6db);contentDiv1=this.rootElement.lastChild;dojo.addClass(contentDiv1,_6da);contentDiv1.style.visibility="hidden";contentDiv1.style.display="none";this._updateMarkup(_6da,contentDiv1);}this._updateMarkup(this.currentMode,_6d8);this._loadWidgetSharedResource(dojo.partial(this._finishRender,_6d8,this));},_finishRender:function(_6dc,_6dd){try{var _6de=_6dd.eventSvr._subscribeEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+"."+_6dd.id,_6dd,"handleSizeChanged",null,_6dd.id);_6dd.eventHandlers.push(_6de);_6dd._createiScope();_6dd._evalScripts(_6dc);_6dd.windowManager[_6dd.currentMode]={id:_6dd.currentMode,root:_6dc,active:true,external:false};dojo.query("> ."+_6dd.ns+"loading",_6dd.rootElement).forEach(function(elem){com.ibm.mm.enabler.utils.Dom.destroyNode(elem);});_6dd.onLoad();if(typeof _6dd._eventqueue!="undefined"&&_6dd._eventqueue!==null){for(var _6df in _6dd._eventqueue){if(Object.prototype.hasOwnProperty.call(_6dd._eventqueue,_6df)){_6dd.handleEvent(_6dd._eventqueue[_6df]);}}}}catch(e){if(_6dd._logInlineMessage){_6dd._logInlineMessage(_6dd,e);}if(_6dd.bIsLoggable){_6dd.LOGGER.trace("iWidget._finishRender","failed to render widget:"+_6dd.id+" Error:"+e.message);}return;}dojo.query("."+_6dd.currentMode,_6dd.rootElement).style({"visibility":""});},_evalScripts:function(_6e0){dojo.query("script",_6e0).forEach(function(_6e1){this._jsHandler.handle(_6e1);},this);},onLoad:function(){if(!this.isModal()){this._handleEventInternal(iwConstants.EVENTS.onLoad);}this.updateState();var _6e2=new com.ibm.mm.iwidget.IEventImpl("on"+this.currentMode,null,{oldMode:null});this._handleEventInternal("on"+this.currentMode,_6e2);this.loaded=true;try{dojo.publish(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+this.id,[this.id]);}catch(e){throw e;}this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+this.hubId,this.hubId);},updateState:function(){return;},_getSimpleEventHandler:function(_6e3){if(this.simpleWidgetEvents&&typeof this.simpleWidgetEvents[_6e3]!="undefined"){return this.simpleWidgetEvents[_6e3];}var _6e4=this.widgetDef.getWidgetEvents()[_6e3];if(!_6e4){_6e4=_6e3;}var _6e5=this._getHandlerScope(_6e4);var _6e6=null;if(_6e5){_6e6=dojo.hitch(_6e5,_6e4);this.simpleWidgetEvents[_6e3]=_6e6;}else{if(_6e4.indexOf("on")===0){var _6e7="on"+_6e4.substr(2,1).toUpperCase()+_6e4.substr(3);if(_6e7!=_6e4){_6e5=this._getHandlerScope(_6e7);if(_6e5){_6e6=dojo.hitch(_6e5,_6e7);this.simpleWidgetEvents[_6e3]=_6e6;}}}}return _6e6;},_getHandlerScope:function(_6e8){var fn=dojo.global["_"+this.id+"_"+_6e8];if(typeof (fn)=="undefined"){var _6e9=dojo.global["_"+this.id+"_iContext"].iScope();if(_6e9&&_6e9[_6e8]){fn=_6e9;}}if(typeof fn=="undefined"||fn===null){fn=dojo.global[_6e8];}if(typeof fn=="undefined"||fn===null){return null;}else{return fn;}},handleEvent:function(_6ea){var _6eb=_6ea.declaredClass;if(_6eb=="com.ibm.mm.iwidget.IEventImpl"){var _6ec=_6ea.name;return this._handleEvent(_6ec,_6ea);}},_handleEvent:function(_6ed,_6ee){var _6ef="_handleEvent(eventName, iEvent)";if(this.bIsLoggable){this.LOGGER.entering(_6ef,[_6ed,dojo.toJson(_6ee)]);}_6ee=this._deserializePayload(_6ee);if(typeof _6ed=="undefined"||_6ed===null){return false;}if(!this.loaded){if(!this._eventqueue){this._eventqueue={};}this._eventqueue[_6ed]=_6ee;return;}try{if(_6ed==iwConstants.EVENTS.onModeChanged){if(this._inIframe()){var _6f0={};_6f0.methodname="_handleOnModeChange";_6f0.hubclient=this.hubId;_6f0.params=[_6ee.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_6f0,this.hubId);return;}return this._handleModeChange(_6ee);}return this._handleEventInternal(_6ed,_6ee);}catch(e){this.LOGGER.severe("IWidgetWrapper.handleEvent","widget: ${0}, eventName: ${1}, HandleEventException: ${2}",[this.hubId,_6ed,e]);throw e;}},_deserializePayload:function(_6f1){if(typeof _6f1.payload=="string"&&_6f1.payload.indexOf("className")!=-1&&_6f1.payload.indexOf("json")!=-1){try{var _6f2=dojo.fromJson(_6f1.payload);if(_6f2.className&&typeof _6f2.className=="string"&&_6f2.className.length>0&&_6f2.json&&typeof _6f2.json=="string"){var _6f3=_6f2.json;if(_6f2.className=="com.ibm.mm.data.table"&&_6f3.indexOf("data")!=-1){_6f3=dojo.fromJson(_6f3);}_6f1.payload=new (dojo.getObject(_6f2.className))(_6f3);}}catch(e){this.LOGGER.severe("IWidgetWrapper._deserializePayload","widget: ${0}, eventName: ${1}, PayloadDeserializeException: ${2}",[this.hubId,_6f1.payload,e]);throw e;}}return _6f1;},_handleOnModeChange:function(_6f4){var _6f5=new com.ibm.mm.iwidget.IEventImpl("onModeChanged",null,{newMode:_6f4},null);this._handleModeChange(_6f5);},_handleModeChange:function(_6f6){var _6f7=false;var _6f8=this.currentMode;var _6f9=_6f6.payload;if(typeof _6f9=="undefined"||_6f9===null){return false;}if(dojo.isString(_6f9)){_6f9=dojo.fromJson(_6f9);}if(typeof _6f9=="undefined"||_6f9===null){return false;}var _6fa=_6f9.newMode||null;var _6fb=_6f9.rootElementId||null;if(_6fa!==null&&_6fa==this.currentMode){return false;}if(_6fa===null){return false;}var _6fc=_6fb!==null;var _6fd=_6fb;var _6fe=this._getDefaultMode();if(!_6fe){_6fe="view";}var _6ff=this.windowManager[_6fa]||null;if(this._inIframe()&&_6ff!==null&&_6fe==_6fa){this.currentMode=_6fa;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[_6fa].active=true;if(_6fd!==null){this.windowManager[_6fa].root=_6fd;}dojo.style(this.windowManager[_6fa].root,"display","");var _700=this.windowManager[_6f8];_700.active=false;if(_700.root){dojo.style(_700.root,"display","none");}this._handleOnModeEvent(_6fa,_6f8);return;}var _701=false;if(typeof _6ff!="undefined"&&_6ff!==null){var _702=_6ff.root;if(!_6ff.external&&_702!==null&&_6fb===null){_6fd=_702;_701=true;_6f7=true;dojo.style(_702,"display","");}}if(!_701){if(_6fd===null){var _703=document.createElement("div");_703.className=this.ns+"Content";this.rootElement.appendChild(_703);_6fd=this.rootElement.lastChild;dojo.addClass(_6fd,_6fa);}_6f7=this._updateMarkup(_6fa,_6fd);}if(_6f7){var _704=this.windowManager[this.currentMode];var _705=_704.root;if(_704.external){dojo.style(_705,"display","none");this.windowManager[this.currentMode]=null;}else{if(_6fb!==null){_704.active=false;}else{_704.active=false;dojo.style(_705,"display","none");}}_6f8=this.currentMode;this.currentMode=_6fa;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[_6fa]={id:_6fa,root:_6fd,active:true,external:_6fc};if(!_701){this._evalScripts(_6fd);}this._handleOnModeEvent(_6fa,_6f8);}if(_6f7&&!this._inIframe()){dojo.publish(iwConstants.EVENTS.modeChanged,[this.id,_6f8,_6fa]);_6f9={};_6f9.id=this.id;_6f9.oldMode=_6f8;_6f9.newMode=_6fa;this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_MODECHANGED,_6f9,this.hubId);}if(this._inIframe()){var _706={};_706.methodname="_handleOnModeUpdated";_706.hubclient=this.hubId;_706.params=[_6f6.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_706,this.hubId);}return _6f7;},_handleOnModeUpdated:function(mode){var _707=mode.newMode||mode;if(_707==this.currentMode){return;}this.currentMode=_707;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[_707]={id:this.id,active:true,external:true};},_handleOnModeEvent:function(mode,_708){if(this._inIframe()){dojo.setContext(com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().global,com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().doc);if(dojo.isIE){if(document._mmcreateElement){document.createElement=document._mmcreateElement;}if(document._mmgetElementsByTagName){document.getElementsByTagName=document._mmgetElementsByTagName;}}}var _709=false;var _70a="on"+mode;if(!_708){_708=null;}var _70b=new com.ibm.mm.iwidget.IEventImpl(_70a,null,{oldMode:_708});_709=this._handleEventInternal(_70a,_70b);return _709;},_handleEventInternal:function(_70c,_70d){if(typeof _70c=="undefined"||_70c===null){return false;}var _70e=false;var _70f=null;if(_70c.indexOf("on")===0){var _710=this._getSimpleEventHandler(_70c);if(_710!==null){_70f=_710;}}if(_70f===null){_70f=this.getPublicEventHandler(_70c);}if(dojo.isFunction(_70f)){try{if(_70d){if(this._transform){_70d=this._transform(_70c,_70d);}dojo.partial(_70f)(_70d);}else{dojo.partial(_70f)();}}catch(e){this.LOGGER.severe("IWidgetWrapper._handleEventInternal","widget: ${0}, eventName: ${1}, HandleEventException: ${2}",[this.hubId,_70c,e]);throw e;}_70e=true;}return _70e;},getPublicEventHandler:function(_711){return null;},_getParent:function(){if(!this.parent){this.parent=com.ibm.mm.iwidget.Utils.getWidgetParent(this.rootElement);}this.parent=this.parent||null;return this.parent;},_setParent:function(_712){this.parent=_712;},getAttributes:function(){if(!this.widgetAttributes){var _713=com.ibm.mashups.services.ServiceManager.getService("persistentAttributesFactoryService");this.widgetAttributes=new com.ibm.mm.iwidget.manageditemset.AttributesModeDelegate(_713,this);}return this.widgetAttributes;},getWidgetItemSets:function(){if(this.widgetItemSets){return this.widgetItemSets;}this.widgetItemSets={};if(this.widgetDef){var _714=this.widgetDef.getAllItemSetNames();for(var i=0,l=_714.length;i<l;i++){var id=_714[i];var _715=this.widgetDef.getItemSet(id);var _716=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(this,_715,id);this.widgetItemSets[id]=_716;}}return this.widgetItemSets;},getWidgetItemSet:function(name){var _717=this.getWidgetItemSets();var _718=null;if(_717){_718=_717[name];if(!_718){_718=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(this,null,name);this.widgetItemSets[name]=_718;}}return _718;},_loadWidgetSharedResource:function(cb2){if(cb2){cb2();}},_createiScope:function(){if(!this.isModal()){var _719=this.widgetDef.getIScope();var _71a=null;if(typeof _719!="undefined"&&_719!==null){try{_71a=new (dojo.getObject(_719))();}catch(err){if(this.bIsLoggable){this.LOGGER.trace("iWidget._createiScope","iScope"+_719,"Error",err);}}}this.iScope=_71a||{};dojo.global["_"+this.id+"_iContext"].scope=this.iScope;this._executeCallbackQueue();}else{this.iScope=dojo.global["_"+this.id+"_iContext"].scope;}this.iScope.iContext=dojo.global["_"+this.id+"_iContext"];},getIDescriptorItems:function(){if(this.iDescriptor){return this.iDescriptor;}this.iDescriptor=new com.ibm.mm.iwidget.manageditemset.IDescriptorImpl(this,this.widgetDef.getIDescriptorItems(),this.getIWidgetInstance().getIDescriptorItems());return this.iDescriptor;},_getInitDefaultMode:function(){if(this._getModeFromNavStateModel){var _71b=this._getModeFromNavStateModel();if(typeof _71b!="undefined"&&_71b!==null){return _71b;}}return this._getDefaultMode();},_getDefaultMode:function(){var _71c=this.getIWidgetInstance().getIDescriptorItems();if(typeof _71c!="undefined"&&_71c!==null){var _71d=_71c.getItemValue(iwConstants.iDescriptorItems.mode);if(_71d){return _71d;}}var _71e=this.widgetDef.getIDescriptorItems();var _71f=null;if(typeof _71e!="undefined"&&_71e!==null){_71f=_71e.getItemValue(iwConstants.iDescriptorItems.mode);}return _71f||null;},_getMarkup:function(_720){var that=this;var cb=function(node,_721){that.eventSvr._publishEvent(that.eventSvr.WIDGETEVENT_PREFIX+that.id+".onMarkupReturned",node);};var _722=this.getMarkup();_722.setIncludeParent(_720);_722.setFinishedCallback(cb);_722.start();},_inIframe:function(){return false;},commit:function(_723){var _724=this.getIWidgetInstance();var _725=null;if(this._inIframe()&&!_723){var _726={};_725=_724.getAttributes();if(_725&&_725._isDirty()){_726.attributes=dojo.clone(_725.toJson());}var _727=_724.getWireModel();if(_727&&_727.isDirty()){_726.wiremodel=_727.toJson();}var _728={};_728.methodname="_handleDataSync";_728.hubclient=this.hubId;_728.params=[_726];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_728,this.hubId);return;}_725=_724.getAttributes();if(_725&&_725._isDirty()){this._notifyWidget(this,"attributes",_725);this._writePropertiesToDOM(this,"attributes",_725);_725._setDirty(false);}var _729=_724.getIDescriptorItems();if(_729&&_729._isDirty()){this._notifyWidget(this,"idescriptor",_729);this._writePropertiesToDOM(this,"idescriptor",_729);_729._setDirty(false);}var _72a=_724.getWireModel();if(_72a&&_72a.isDirty()){_72a.commit();}},_writePropertiesToDOM:function(_72b,_72c,_72d){var ns=_72b.ns;var root=_72b.rootElement;var _72e=dojo.query("span."+ns+"ItemSet[title=\""+_72c+"\"]",root);for(var i=0,l=_72e.length;i<l;i++){var _72f=_72e[i];if(root==_72f.parentNode){root.removeChild(_72f);}}var _730=document.createElement("span");_730.className=ns+"ItemSet";_730.title=_72c;_730.style.display="none";_730.style.visibility="hidden";root.appendChild(_730);var _731=_72d.getAllNames();if(!_731){return;}for(var k=0,l2=_731.length;k<l2;k++){var _732=_731[k];var _733=document.createElement("a");_733.className=ns+"Item";_733.style.visibility="hidden";_733.style.display="none";_733.href="#"+_732;if(_72d.isReadOnly(_732)){dojo.addClass(_733,ns+"ReadOnly");}var _734=_72d.getItemLocales(_732);if(!_734||(_734!==null&&_734.length==1&&_734[0]=="")){var _735=_72d.getItemValue(_732);if(_735){_733.appendChild(document.createTextNode(_735));}_730.appendChild(_733);}else{if(_734!==null){var _736=_72d._getItemDefaultLocale(_732);if(!_736){_736=_72d.DEFAULT_LOCALE;}_733.setAttribute("lang",_736);for(var j=0;j<_734.length;j++){var _737=document.createElement("span");_737.setAttribute("class",ns+"Value");_737.setAttribute("lang",_734[j]);var _738=_72d.getItemValue(_732,_734[j]);_737.appendChild(document.createTextNode(_738));_733.appendChild(_737);}_730.appendChild(_733);}}}},_notifyWidget:function(_739,_73a,_73b){var _73c=_73b.getAllNames();if(!_73c){return;}var _73d={};_73d.itemSetName=_73a;_73d.changes=[];for(var i=0,l=_73c.length;i<l;i++){var _73e=_73c[i];if(_73b._isItemDirty&&_73b._isItemDirty(_73e)){var _73f=_73b._getInternalItemValue(_73e);if(_73f&&_73f._change){var _740=dojo.clone(_73f._change);if(_740.newVal){_740.newVal=_73b._getRequiredValue(_740.newVal);}if(_740.oldVal){_740.oldVal=_73b._getRequiredValue(_740.oldVal);}_73d.changes.push(_740);}_73b._setItemDirty(_73e,false);}}var _741=this._getListeners(_73a);for(var x in _741){if(Object.prototype.hasOwnProperty.call(_741,x)){_741[x](_73d);}}},isModal:function(){return false;},isLoaded:function(){return this.loaded;},isStandalone:function(){if(this.standalone===null){this.standalone=dojo.hasClass(this.rootElement,com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}return this.standalone;},handleSizeChanged:function(_742){if(_742.newWidth){this.width=_742.newWidth;}if(_742.newHeight){this.height=_742.newHeight;}var _743=new com.ibm.mm.iwidget.IEventImpl(iwConstants.EVENTS.onSizeChanged,null,_742,null);this._handleEvent(iwConstants.EVENTS.onSizeChanged,_743);},_isEmpty:function(obj){return com.ibm.mm.enabler.utils.Misc.isEmpty(obj);},_getListeners:function(_744){if(!this.listenerManager){return null;}if(!this.listenerManager[_744]){return null;}return this.listenerManager[_744];},_registerListener:function(_745,fn){if(!this.listenerManager){this.listenerManager={};}this.listenerManager[_745]=this.listenerManager[_745]?this.listenerManager[_745]:{};var _746=this._generateListenerId();var me=this;var _747=function(_748){var _749=_748.changes?_748.changes:null;if(_749.length>0){var _74a=new com.ibm.mm.iwidget.IEventImpl("onItemSetChanged",null,_748);if(dojo.isString(fn)){var _74b=me._getHandlerScope(fn);if(_74b){fn=dojo.hitch(_74b,fn);}}if(dojo.isFunction(fn)){dojo.partial(fn)(_74a);}}};this.listenerManager[_745][_746]=_747;return _746;},_removeListener:function(_74c,id){if(!_74c||typeof id=="undefined"||id===null){return false;}if(!this.listenerManager){return false;}if(!this.listenerManager[_74c]){return false;}if(this.listenerManager[_74c][id]){delete this.listenerManager[_74c][id];return true;}return false;},_generateListenerId:function(){if(typeof this._listenerCt=="undefined"){this._listenerCt=0;}else{this._listenerCt++;}return this._listenerCt;},_initManagedItemSet:function(){var _74d=null;if(typeof (this.widgetDef)!="undefined"){_74d=this.widgetDef._getManagedItemSetListener(iwConstants.ATTRIBUTES);if(_74d!==null){this._registerListener(iwConstants.ATTRIBUTES,_74d);}_74d=this.widgetDef._getManagedItemSetListener(iwConstants.IDESCRIPTOR);if(_74d!==null){this._registerListener(iwConstants.IDESCRIPTOR,_74d);}}},_getRawUri:function(){var _74e=this.getIWidgetInstance().widgetXMLUrl;if(this.widgetDef.getXmlBase()){_74e=this.widgetDef.getXmlBase();}return _74e;},_initBaseUri:function(_74f){if(!_74f){return;}this.rawBaseUri=this._getRawBaseUri(_74f);this.widgetBaseUri=this._getResolvedPocUri(this.rawBaseUri);this.widgetBaseUriXhr=this._getXhrUri(this.widgetBaseUri);if(this.rawBaseUri.indexOf(":/")!=-1){var _750=this._getServerRoot(this.rawBaseUri);if(_750){this.serverRoot=this._getResolvedPocUri(_750);this.serverRootXhr=this._getXhrUri(this.serverRoot);}}},_rewriteURI:function(uri,_751){if(!this.widgetBaseUri){var _752=this._getRawUri();this._initBaseUri(_752);}return this._rewriteURIWithContext(uri,_751,this.widgetBaseUri,this.widgetBaseUriXhr,this.serverRoot,this.serverRootXhr);},_rewriteURIWithContext:function(uri,_753,_754,_755,_756,_757){if(typeof _753=="undefined"){_753=true;}var uri2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(uri);if(uri2){uri=uri2;}var _758=uri;var _759,_75a;if(_753){if(uri.indexOf(":/")!=-1){_758=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(uri);}else{if(_757!==null&&uri.indexOf(_757)===0){_758=uri;}else{_759=uri.split("?");_75a=com.ibm.mm.enabler.utils.Misc.encodePath(_759[0]);_758=_75a;if(uri.indexOf("/")===0){if(_757){_758=_757+_75a.substring(1);}}else{if(_755){_758=_755+_75a;}}if(_759.length==2){_758+="?"+_759[1];}}}}else{if(uri.indexOf(":/")===-1){_759=uri.split("?");_75a=com.ibm.mm.enabler.utils.Misc.encodePath(_759[0]);if(uri.indexOf("/")===0){if(_756){_758=_756+_75a.substring(1);}}else{if(_754){_758=_754+_75a;}}if(_759.length===2){_758+="?"+_759[1];}}}return _758;},_getRawBaseUri:function(_75b){if(!_75b){return null;}var _75c=_75b.indexOf("?");if(0<_75c){_75b=_75b.substring(0,_75c);}var uri2=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(_75b);if(uri2){_75b=uri2;}var rc=_75b.substring(0,_75b.lastIndexOf("/")+1);return rc;},_getResolvedPocUri:function(_75d){if(!_75d){return null;}var rc=_75d;if(com.ibm.mm.enabler.utils.Misc.isPocUrl(_75d)===true){rc=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_75d);}return rc;},_getXhrUri:function(_75e){if(!_75e){return null;}var rc=_75e;if(_75e.indexOf("/")!==0){rc=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_75e);}return rc;},_getServerRoot:function(_75f){if(!_75f){return null;}if(_75f.indexOf(":/")==-1){return null;}var _760=null;var _761=_75f.indexOf(":/");_760=_75f.substring(0,_761+2);if(_75f.indexOf(":///")!==-1){_760=_75f.substring(0,_761+4);}else{if(_75f.indexOf("://")!==-1){var _762=_75f.indexOf("/",_761+4);_760=_75f.substring(0,_762+1);}}return _760;},_executeCallbackQueue:function(){return;},_getCurrentMode:function(){return this.currentMode;}});com.ibm.mm.iwidget.widget.IWidgetWrapperImpl=com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl");}}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.IWidgetWrapper"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.IWidgetWrapper");}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.WidgetModel"]){dojo._hasResource["com.ibm.mashups.iwidget.model.WidgetModel"]=true;dojo.provide("com.ibm.mashups.iwidget.model.WidgetModel");dojo.declare("com.ibm.mashups.iwidget.model.WidgetModel",null,{constructor:function(id){},find:function(id){},hasChildren:function(_763){},getChildren:function(_764,_765){},getParent:function(_766){},getWidgetDefinitionByUrl:function(url){},getWidgetDefinitionByURL:function(url){},commit:function(){},createIWidgetDefinition:function(json){},createWidget:function(span){}});}if(!dojo._hasResource["com.ibm.mm.enabler.hub.ManagedHubImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.ManagedHubImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.ManagedHubImpl");dojo.declare("com.ibm.mm.enabler.hub.ManagedHubImpl",null,{constructor:function(){},publishMgr:function(_767,data,_768,_769){var _76a=_768?_768.getClientID():"manager";var _76b=_769?_769.getClientID():"manager";var that=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(that.bIsLoggable){that.LOGGER.trace("publishMgr","(MANAGER): PUB: "+_76a+" -> "+_76b+" || topic: '"+_767+"' data: '"+data+"'");}return true;},subscribeMgr:function(_76c,_76d){var _76e=_76d?_76d.getClientID():"manager";var that=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(that.bIsLoggable){that.LOGGER.trace("subscribeMgr","(MANAGER): SUB: id: '"+_76e+"' topic: '"+_76c+"'");}return true;},securityMgr:function(_76f,_770){var that=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(that.bIsLoggable){that.LOGGER.trace("securityMgr","source:"+_76f+" alertType:"+_770);}},getInstance:function(){var hub=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;if(!hub){com.ibm.mm.enabler.hub.ManagedHubImpl._instance=new OpenAjax.hub.ManagedHub({onPublish:this.publishMgr,onSubscribe:this.subscribeMgr,onSecurityAlert:this.securityMgr});com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.hub.ManagedHubImpl");com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;com.ibm.mm.enabler.hub.ManagedHubImpl._instance.bIsLoggable=com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOGGER.isLoggable(com.ibm.mm.enabler.hub.ManagedHubImpl._instance.LOG_LEVEL);hub=com.ibm.mm.enabler.hub.ManagedHubImpl._instance;}return hub;}});com.ibm.mm.enabler.hub.ManagedHubImpl=new com.ibm.mm.enabler.hub.ManagedHubImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.hub.SubDomainPoolImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.SubDomainPoolImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.SubDomainPoolImpl");dojo.declare("com.ibm.mm.enabler.hub.SubDomainPoolImpl",null,{constructor:function(arr){if(arr){this._pool=arr;this._internalPool=dojo.clone(this._pool);}else{this._counter=0;this._reusedSubDomain=[];}this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.reuseSubDomain=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINREUSE);},getSize:function(){if(this._internalPool){return this._internalPool.length;}return -1;},get:function(){if(this._pool){return this._getFromPool();}var cnt=this._counter;if(this.reuseSubDomain){if(this._reusedSubDomain.length>0){cnt=this._reusedSubDomain.shift();return cnt;}else{this._counter++;}}else{this._counter++;}return "w"+cnt;},add:function(_771){if(!this.reuseSubDomain){return;}if(this._pool){return this._addToPool(_771);}else{this._reusedSubDomain.push(_771);}return;},_getFromPool:function(){if(this._pool.length===0){return null;}return this._pool.shift();},_addToPool:function(_772){this._pool.push(_772);}});}if(!dojo._hasResource["com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl");dojo.declare("com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl",null,{LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_METHOD="dojo.xhr()";this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.originalDojoXHR=dojo.xhr;dojo.xhr=dojo.hitch(this,function(_773,args,_774){if(this.bIsLoggable){this.LOGGER.entering(this.LOG_METHOD,[_773,args,_774]);}if(!args.headers){args.headers={};}args.headers["com.ibm.lotus.openajax.virtualhost"]=document.location.hostname;args.headers["com.ibm.lotus.openajax.virtualport"]=document.location.port;if(this.bIsLoggable){this.LOGGER.trace(this.LOG_METHOD,"Adding headers: com.ibm.lotus.openajax.virtualhost="+document.location.hostname+" - com.ibm.lotus.openajax.virtualport="+document.location.port);}var ret=this.originalDojoXHR(_773,args,_774);if(this.bIsLoggable){this.LOGGER.exiting(this.LOG_METHOD);}return ret;});}});com.ibm.mm.enabler.hub.XHRHeaderExtension=new com.ibm.mm.enabler.hub.XHRHeaderExtensionImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.hub.MainHubAdapterImpl"]){dojo._hasResource["com.ibm.mm.enabler.hub.MainHubAdapterImpl"]=true;dojo.provide("com.ibm.mm.enabler.hub.MainHubAdapterImpl");dojo.declare("com.ibm.mm.enabler.hub.MainHubAdapterImpl",null,{constructor:function(_775){this._managedhub=_775;this._inlineHubClients={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},PREFIX_INLINE:"_inline_",PREFIX_IFRAME:"_iframe_",createInlineHubContainer:function(id){var _776=this.PREFIX_INLINE+id;var me=this;function onClientConnect(_777){if(me.bIsLoggable){me.LOGGER.trace("onClientConnect","++ "+_777.getClientID()+" connected");}};function onClientDisconnect(_778){if(me.bIsLoggable){me.LOGGER.trace("onClientDisconnect","-- "+_778.getClientID()+" disconnected");}};function onClientSecurityAlert(_779,_77a){if(me.bIsLoggable){me.LOGGER.trace("onClientSecurityAlert","!! security alert - id: '"+_779.getClientID()+"' msg: '"+_77a);}};function onClientError(_77b,_77c){if(me.bIsLoggable){me.LOGGER.trace("onClientError","!! error - id: '"+_77b.getClientID()+"' msg: '"+_77c);}};var _77d={Container:{onConnect:onClientConnect,onDisconnect:onClientDisconnect,onSecurityAlert:onClientSecurityAlert,onError:onClientError}};var _77e=new OpenAjax.hub.InlineContainer(this._managedhub,_776,_77d);return _77e;},createIframeHubContainer:function(id,_77f,uri,_780,_781,_782,_783){var _784=this.PREFIX_IFRAME+id;var _785=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _786=_785.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_ENABLER);var _787=_786+"/js/openajaxhub/rpc_relay.html";var _788=window.location.protocol;var host=window.location.hostname;var port=window.location.port;var _789=_788+"//"+host+":"+port+_787;if(port==""){_789=_788+"//"+host+_787;}var me=this;function onClientConnect(_78a){if(me.bIsLoggable){me.LOGGER.trace("onClientConnect","++ "+_78a.getClientID()+" connected");}};function onClientDisconnect(_78b){if(me.bIsLoggable){me.LOGGER.trace("onClientDisconnect","-- "+_78b.getClientID()+" disconnected");}};function onClientSecurityAlert(_78c,_78d){if(me.bIsLoggable){me.LOGGER.trace("onClientSecurityAlert","!! security alert - id: '"+_78c.getClientID()+"' msg: '"+_78d);}};try{var w,h;this.removeIframeHubContainer(id);if(_780&&_780=="true"){w="600px";h="400px";}else{w="100%";h="100%";}if(_781){w=_781;}if(_782){h=_782;}if(_783){onClientSecurityAlert=_783;}var _78e=new OpenAjax.hub.IframeContainer(this._managedhub,_784,{Container:{onConnect:onClientConnect,onDisconnect:onClientDisconnect,onSecurityAlert:onClientSecurityAlert},IframeContainer:{uri:uri,tunnelURI:_789,parent:_77f,iframeAttrs:{title:"iframe",style:{width:w,height:h,border:"0px",overflow:"auto"}},timeout:1200000}});}catch(e){if(me.bIsLoggable){me.LOGGER.trace("createIframeHubContainer","Creating iframe container exception:"+e.message);}}},createInlineHubClient:function(id){var _78f=this.PREFIX_INLINE+id;var me=this;var _790=this._managedhub.getContainer(_78f);function onHubClientSecurityAlert(_791,_792){};var _793=new OpenAjax.hub.InlineHubClient({HubClient:{onSecurityAlert:onHubClientSecurityAlert},InlineHubClient:{container:_790}});function onHubClientConnect(_794,_795,_796){if(!_795){if(me.bIsLoggable){me.LOGGER.trace("createIframeHubContainer","!! client connection error = id: '"+_794.getClientID()+"' msg: '"+_796);}}};_793.connect(onHubClientConnect);this._inlineHubClients[_78f]=_793;return _793;},_getInlineHubClient:function(id){if(!id){return null;}var _797=this.PREFIX_INLINE+id;var _798=this._inlineHubClients[_797];if(typeof _798=="undefined"){_798=null;}return _798;},getInlineHubClient:function(id){if(!id){return this._managedhub;}var _799=this._getInlineHubClient(id);return _799?_799:this._managedhub;},isInlineClient:function(id){var rc=false;var _79a=this._getInlineHubClient(id);if(_79a){rc=true;}return rc;},removeInlineHubClient:function(id){var _79b=this._getInlineHubClient(id);var _79c=this.PREFIX_INLINE+id;if(_79b){var me=this;var _79d=function(_79e,_79f,_7a0){if(!_79f){if(me.bIsLoggable){me.LOGGER.trace("onHubClientDisconnect","-- "+_79e.getClientID()+" msg:"+_7a0);}}};_79b.disconnect(_79d);delete this._inlineHubClients[_79c];var _7a1=this._managedhub.getContainer(_79c);if(_7a1){this._managedhub.removeContainer(_7a1);}return;}},getContainer:function(id,_7a2){_7a2=_7a2||false;if(_7a2===true){id=this.PREFIX_IFRAME+id;}return this._managedhub.getContainer(id);},removeIframeHubContainer:function(id){var _7a3=this.PREFIX_IFRAME+id;var _7a4=this._managedhub.getContainer(_7a3);if(_7a4){this._managedhub.removeContainer(_7a4);}},returnSubDomain:function(_7a5){this.getSubDomainPool().add(_7a5);},getSubDomainSize:function(){return this.getSubDomainPool().getSize();},getSubDomain:function(){return this.getSubDomainPool().get();},getSubDomainPool:function(){if(!this.subDomainPool){var _7a6=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _7a7=_7a6.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINS);if(_7a7){if(dojo.isArray(_7a7)&&_7a7.length!==0){this.subDomainPool=new com.ibm.mm.enabler.hub.SubDomainPoolImpl(_7a7);}}if(!this.subDomainPool){this.subDomainPool=new com.ibm.mm.enabler.hub.SubDomainPoolImpl();}}return this.subDomainPool;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.EventService"]){dojo._hasResource["com.ibm.mm.iwidget.services.EventService"]=true;dojo.provide("com.ibm.mm.iwidget.services.EventService");dojo.declare("com.ibm.mm.iwidget.services.EventServiceDefaultImpl",com.ibm.mashups.iwidget.services.EventService,{constructor:function(){this.subMgr={};this.managedhub=com.ibm.mm.enabler.hub.ManagedHubImpl.getInstance();this.hubAdapter=new com.ibm.mm.enabler.hub.MainHubAdapterImpl(this.managedhub);this._subscribeEventService();if(this.registerServices){this.registerServices();}if(this.registerExtServices){this.registerExtServices();}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getType:function(){return com.ibm.mm.iwidget.Constants.eventservice.type.MAIN;},registerServices:function(){var _7a8=com.ibm.mashups.iwidget.Constants.CHANGE_WIDGETMODE;var me=this;var _7a9=function(_7aa){var _7ab=_7aa.id;var _7ac=_7aa.newMode;var _7ad=_7aa.parentNode;me.fireEvent(_7ab,"onModeChanged",{newMode:_7ac,rootElementId:_7ad});};this.subscribeEvent(_7a8,null,_7a9,null,null);},setId:function(id){this.id=id;},getId:function(){return "main";},_subscribeEventService:function(){var that=this;function eventCallback(_7ae,_7af,_7b0){var _7b1=_7af.methodname;if(_7b1){var fn=that[_7af.methodname];if(fn){that[_7b1].apply(that,_7af.params);}}};this.managedhub.subscribe("eventservice."+this.getId(),eventCallback,that,that._subscribeCallback);},_subscribeCallback:function(_7b2,_7b3,_7b4){if(!_7b3){console.log("subscribe failed "+_7b2);}},_getHubAdapter:function(){return this.hubAdapter;},_getManagedHub:function(){return this.managedhub;},WIDGETEVENT_PREFIX:iwConstants.WIDGETEVENT_PREFIX,WILDCARD_PREFIX:iwConstants.WILDCARD_PREFIX,subscribeWire:function(_7b5,_7b6,_7b7,_7b8){return false;},publishWire:function(_7b9,_7ba,_7bb,_7bc){return false;},unSubscribeWire:function(_7bd,_7be,_7bf,_7c0){return false;},addWire:function(_7c1,_7c2,_7c3,_7c4){return false;},removeWire:function(_7c5,_7c6,_7c7,_7c8){return false;},fireEvent:function(_7c9,_7ca,_7cb,_7cc,_7cd){var _7ce=new com.ibm.mm.iwidget.IEventImpl(_7ca,_7cc,_7cb,_7cd);var _7cf=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _7d0=_7cf.find(_7c9);var cb=function(_7d1,_7d2,_7d3,_7d4){var _7d5=_7d1.hubAdapter.isInlineClient(_7d2.id);if(_7d5){_7d1._publishEvent(_7d1.WIDGETEVENT_PREFIX+_7d2.id,_7d3,_7d3.source);}else{var _7d6={};if(_7d3.name==iwConstants.EVENTS.onModeChanged){_7d6.methodname="_handleOnModeChange";_7d6.params=[_7cb];_7d2.handleEvent(_7d6);return;}_7d6.methodname="fireEvent";_7d6.hubclient=_7d1.getId();_7d6.params=[_7d2.id,_7d3.name,_7d3.payload,_7d3.type];_7d1._publishEvent("eventservice."+_7d2.id,_7d6);}if(_7d4){var _7d7=_7d1.subMgr[_7d4];if(_7d7){_7d1.unsubscribeEvent(_7d7);}delete _7d1.subMgr[_7d4];}};if(_7d0&&_7d0.isLoaded()){cb(this,_7d0,_7ce);}else{var that=this;var _7d8=dojox.uuid.generateRandomUuid();var _7d9=this.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_7c9,null,function(){var _7da=_7cf.find(_7c9);cb(that,_7da,_7ce,_7d8);});this.subMgr[_7d8]=_7d9;}},publishEvent:function(_7db,_7dc,_7dd,_7de){if(this.bIsLoggable){this.LOGGER.entering("eventService.publishEvent",[_7db,_7dc,_7dd,_7de]);}if(typeof _7db=="undefined"||_7db===null){return;}var temp;if(_7db.indexOf(this.WILDCARD_PREFIX)===0){temp=this.WILDCARD_PREFIX;return this.broadcastEvent(_7db.substring(temp.length),_7dc,_7dd,_7de);}else{if(_7db.indexOf(this.WIDGETEVENT_PREFIX)===0){temp=_7db.substring(this.WIDGETEVENT_PREFIX.length);var _7df=temp.substring(0,temp.indexOf("."));var _7e0=temp.substring(temp.indexOf(".")+1);return this.fireEvent(_7df,_7e0,_7dc,_7dd,_7de);}}this._publishEvent(_7db,_7dc,_7de);},_publishEvent:function(_7e1,_7e2,_7e3){var _7e4=this.hubAdapter.getInlineHubClient(_7e3);if(typeof _7e2=="undefined"||_7e2===null){_7e4.publish(_7e1);}else{_7e4.publish(_7e1,_7e2);}},broadcastEvent:function(_7e5,_7e6,_7e7,_7e8,_7e9,_7ea){var _7eb={};_7eb.targetEvent=_7e5;_7eb.payload=_7e6;_7eb.payloadType=_7e7;this.broadcastEvents([_7eb],_7e8,_7e9,_7ea);return;},broadcastEvents:function(_7ec,_7ed,_7ee,_7ef){if((_7ec===null)||!dojo.isArray(_7ec)){return;}var _7f0=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _7f1=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_7f0);var _7f2=_7f1.getSpaceID();var _7f3=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_7f0,_7f2);var _7f4=_7f3.getPageID();var _7f5=((_7ee)&&(typeof _7ee=="string")&&(_7ee!=_7f4));if(_7f5){this._switchPageForBroadcastEvents(_7ec,_7ed,_7ee,_7ef,_7f0,_7f1,_7f2);}else{var _7f6;var _7f7;var _7f8=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _7f9=_7f8.getAllWidgets();var that=this;var _7fa=function(_7fb,_7fc,_7fd){var _7fe=_7fb.getWidgetHandledEvents();if(_7fe===null){var _7ff=_7fb.getIWidgetDefinition().start();if(_7ff){_7fe=_7ff.getWidgetHandledEvents();}}if(_7fe){for(var i=0;i<_7fc.length;i++){for(var j=0;j<_7fe.length;j++){if(_7fc[i].targetEvent==_7fe[j].name){that.fireEvent(_7fb.getID(),_7fc[i].targetEvent,_7fc[i].payload,_7fc[i].payloadType,_7ed);break;}}}}if(_7fd){var _800=that.subMgr[_7fd];if(_800){that.unsubscribeEvent(_800);}delete that.subMgr[_7fd];}};var _801=false;for(var i in _7f9){if(Object.prototype.hasOwnProperty.call(_7f9,i)){var _802=_7f9[i];if(_802.isLoaded()){_7fa(_802,_7ec);}else{if(!_802.lazyLoad){_801=true;_7f6=dojox.uuid.generateRandomUuid();_7f7=this.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_802.getID(),null,dojo.partial(_7fa,_802,_7ec,_7f6));this.subMgr[_7f6]=_7f7;}}}}if((_7ec.length>0)&&(_7ec[0].targetEvent==="com.ibm.mashups.builder.skinLoaded")){_7f6=dojox.uuid.generateRandomUuid();_7f7=this.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_7ec[0].payload.widgetId,null,function(){that._handleBroadcastEventsCache();var _803=that.subMgr[_7f6];if(_803){that.unsubscribeEvent(_803);}});this.subMgr[_7f6]=_7f7;}for(var j=0;j<_7ec.length;j++){this._publishEvent(_7ec[j].targetEvent,_7ec[j].payload,_7ed);}}return;},_switchPageForBroadcastEvents:function(_804,_805,_806,_807,_808,_809,_80a){},_handleBroadcastEventsCache:function(){},_subscribeEvent:function(_80b,_80c,_80d,_80e,_80f){var _810=this._getHubAdapter().getInlineHubClient(_80f);var _811=_810.subscribe(_80b,function(_812,data,_813){var ec=_80d;if(_80c&&_80d){ec=dojo.hitch(_80c,_80d);}if(ec){ec(data);}},null,function(_814,_815,_816){if(_80c&&_80e){_80e=dojo.hitch(_80c,_80e);}if(_80e){_80e.apply(this,[_814,_815,_816]);}if(!_815){console.log("subscription for "+_814+" failed");return;}});return _811;},subscribeEvent:function(_817,_818,_819,_81a,_81b){return this._subscribeEvent(_817,_818,_819,_81a,_81b);},_unsubscribeEvent:function(_81c,_81d){var _81e=this._getHubAdapter().getInlineHubClient(_81d);try{if(_81e){_81e.unsubscribe(_81c);}}catch(e){console.log("unsubscribe failure:"+e);}},unsubscribeEvent:function(_81f,_820){if(!_81f){return;}this._unsubscribeEvent(_81f,_820);},_generateWireId:function(_821,_822,_823,_824){return _821+"_"+_822+"_"+_823+"_"+_824;}});if(!ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.iwidget.services.EventServiceDefaultImpl");}if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.services.EventServiceExtended");dojo["require"]("com.ibm.mm.iwidget.services.IFrameEventServiceImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModel"]){dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModel"]=true;dojo.provide("com.ibm.mm.iwidget.model.WidgetModel");dojo.declare("com.ibm.mm.iwidget.model.WidgetModelDefaultImpl",com.ibm.mashups.iwidget.model.WidgetModel,{constructor:function(){this.widgetArr={};this.parentMap={};this.eventService=com.ibm.mashups.services.ServiceManager.getService("eventService");this.eventService.subscribeEvent(com.ibm.mashups.iwidget.Constants.UNLOAD_WIDGETS,this,"_unloadWidgets");if(!ibmConfig||(ibmConfig&&typeof ibmConfig.loadingHTML!="string")){if(ibmConfig["loadingHTML.imageURL"]){this.processAnim=com.ibm.mm.enabler.utils.Misc.preloadImage(ibmConfig["loadingHTML.imageURL"],20,20);}else{var url=dojo.moduleUrl("com.ibm.mm.iwidget","image/");url=url+"progress-anim.gif";this.processAnim=com.ibm.mm.enabler.utils.Misc.preloadImage(url,20,20);}}dojo.addOnWindowUnload(this,"_onWindowUnload");this.global=dojo.global;this.doc=dojo.doc;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},_onWindowUnload:function(){try{var arr=[];for(var i in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,i)){this._unloadWidget(i);}}}catch(e){console.log("_onWindowUnload "+e.message);}},createWidget:function(_825){var id=_825.getAttribute("id");if(typeof (id)=="undefined"){return null;}var _826=this.widgetArr[id];if(typeof _826!="undefined"&&_826!==null){var _827=_826.rootElement;if(_827==_825){return _826;}else{this._unloadWidget(id);}}var _828=new com.ibm.mm.iwidget.widget.IWidgetWrapperImpl(_825,id);this.widgetArr[id]=_828;this.parentMap[id]="DEFER_TOKEN";return _828;},createIWidgetDefinition:function(json){return new com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl(null,null,json);},find:function(id){var _829=this.widgetArr[id];if(typeof _829!="undefined"){if(_829.lazyLoad&&!_829.loaded){this.renderWidget(_829);delete _829.lazyLoad;}return _829;}return null;},getWidgetById:function(id){return this.find(id);},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit);},_commit:function(_82a,sync){for(var _82b in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,_82b)){var _82c=this.widgetArr[_82b];var _82d=_82c.getIWidgetInstance();if(!_82d){continue;}_82c.commit();}}},_unloadWidgets:function(arr){var _82e;if(typeof arr!="undefined"||arr!==null){var _82f;if(arr.refreshId){_82f=arr.refreshId;arr=arr.unloadArray;}if(dojo.isArray(arr)){for(var i in arr){if(Object.prototype.hasOwnProperty.call(arr,i)){_82e=arr[i];this._unloadWidget(_82e,_82e==_82f?true:false);}}dojo.publish(com.ibm.mashups.iwidget.Constants.WIDGETS_UNLOADED,[arr]);this.eventService.publishEvent(com.ibm.mashups.iwidget.Constants.WIDGETS_UNLOADED,arr);}else{if(dojo.isString(arr)){this._unloadWidget(arr);}}}},_unloadWidget:function(_830,_831){if(typeof this.widgetArr[_830]!="undefined"&&this.widgetArr[_830]!==null){var _832=this.widgetArr[_830];try{_832.destroy(_831);}catch(e){}delete this.widgetArr[_830];if(this.parentMap[_830]){delete this.parentMap[_830];}}},getParent:function(_833){var _834=this.parentMap[_833.getID()];if(_834&&_834=="DEFER_TOKEN"){_834=_833._getParent();this.parentMap[_833.getID()]=_834;}if(_834){parent=this.find(_834);}return parent||null;},hasChildren:function(_835){return (this.getChildren(_835,false).length===0)?false:true;},getChildren:function(_836,_837){this._checkParentMap();var _838=[];var _839=(typeof _837=="undefined")?true:_837;this._getChildren(_836,_839,_838);return _838;},_checkParentMap:function(){for(var id in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,id)){var _83a=this.parentMap[id];if(_83a&&_83a=="DEFER_TOKEN"){var _83b=this.widgetArr[id];_83a=_83b._getParent();this.parentMap[id]=_83a;}}}},_getChildren:function(_83c,_83d,_83e){for(var id in this.parentMap){if(this.parentMap[id]==_83c.getID()){var _83f=this.find(id);if(_83f){_83e.push(_83f);if(_83d){this._getChildren(_83f,_83d,_83e);}}}}},getWidgetDefinitionByUrl:function(url){return this.getWidgetDefinitionByURL(url);},getWidgetDefinitionByURL:function(url){return new com.ibm.mm.iwidget.DeferredLoadImpl(url);},getAllWidgets:function(){return this.widgetArr;},renderWidget:function(_840){if(typeof _840=="undefined"){return;}if(_840.loaded){return;}_840.doRender();}});com.ibm.mm.iwidget.model.WidgetModelImpl=com.ibm.mm.iwidget.model.WidgetModelDefaultImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"iWidget")>=0)){dojo["require"]("com.ibm.mm.iwidget.model.WidgetModelExtended");}}if(!dojo._hasResource["com.ibm.mm.iwidget.model.FactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.model.FactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.model.FactoryImpl");dojo.declare("com.ibm.mm.iwidget.model.FactoryImpl",com.ibm.mashups.iwidget.model.Factory,{constructor:function(){},getGlobalWidgetModel:function(){if(!this._globalWidgetModel){this._globalWidgetModel=new com.ibm.mm.iwidget.model.WidgetModelImpl();}return this._globalWidgetModel;}});com.ibm.mashups.iwidget.model.Factory=new com.ibm.mm.iwidget.model.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.Factory"]){dojo._hasResource["com.ibm.mashups.iwidget.model.Factory"]=true;dojo.provide("com.ibm.mashups.iwidget.model.Factory");}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl",com.ibm.mashups.enabler.model.state.NavigationStateProcessor,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);if(this.bIsLoggable){this.LOGGER.entering("constructor");}this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _841=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_URL);if(_841){this.persistenceURL=this._getAssociativeArray(_841);}var _842=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_PSTORE);if(_842){this.persistencePSTORE=this._getAssociativeArray(_842);}var _843=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_URL_LIMIT);var _844=10;if(_843){_844=parseInt(_843,10);}this.urlpersistenceLIMIT=_844;var _845=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_PERSISTENCE_URL_SPLIMIT);_844=2;if(_845){_844=parseInt(_845,10);}this.urlpersistenceSPLIMIT=_844;this.isHuffmannEnabled=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVSTATE_HUFFMANNENCODE_ENABLED);},PID:"pid",SHAREDPARAMETERSETS:"sps",SID:"sid",HUFFMANN_PREFIX:"mashup:huffman/",encodeWidgetIdentifier:function(wid,nsm){return wid;},decodeWidgetIdentifier:function(wid,nsm){return wid;},dispose:function(_846){var _847=com.ibm.mashups.enabler.model.state.CookieManager;var temp=_847.disposeState();if(_846){_846();}},_getAssociativeArray:function(_848){var obj={};if(dojo.isString(_848)){obj[_848]=_848;return obj;}for(var i in _848){if(Object.prototype.hasOwnProperty.call(_848,i)){var _849=_848[i];obj[_849]=_849;}}return obj;},decode:function(url,_84a){if(this.bIsLoggable){this.LOGGER.entering("decode");this.LOGGER.trace("decode","url is "+url);}if(url.indexOf(this.HUFFMANN_PREFIX)!=-1){var arr=url.split(this.HUFFMANN_PREFIX);var _84b=com.ibm.mm.enabler.encode.huffman.HuffmanURL.getDataFromHuffmanTree(arr[1])||null;if(_84b){url=arr[0]+_84b;}}var hash=this._getHash(url)||null;if(hash){if(url.indexOf("#")!=-1){if(url.lastIndexOf("&")==(url.length-1)){url=url.concat(hash);}else{url=url.concat("#");url=url.concat(hash);}}else{url=url.concat("#");url=url.concat(hash);}}var _84c={};var _84d=new com.ibm.mm.enabler.utils.HttpUrl(url);var _84e=_84d.anchor;_84e=decodeURIComponent(_84e);if(this.bIsLoggable){this.LOGGER.trace("decode","fragment is "+_84e);}if(_84e&&_84e!=""){var _84f=dojo.queryToObject(_84e);var _850=new Date().getTime();if(_84f.pid){_84c.pid={};_84c.pid.value=decodeURIComponent(_84f.pid);_84c.pid.params={};_84c.pid.params.lm=_850;}if(_84f.sid){_84c.sid={};_84c.sid.value=decodeURIComponent(_84f.sid);_84c.sid.params={};_84c.sid.params.lm=_850;}if(_84f.sps){_84c.sparams={};rawValue=dojo.fromJson(decodeURIComponent(_84f.sps));_84c.sparams=rawValue;}_84c.wparams={};for(var i in _84f){if(i.indexOf("w")===0&&i.indexOf("cp")==-1&&i.indexOf("rp")==-1){var _851={};var _852=i.substr(1)*1+_850;var wID=_84f[i];var _853=i+"cp";var _854=i+"rp";if(_84f[_853]){_851.value=_851.value?_851.value:{};try{_851.value.cp=dojo.fromJson(decodeURIComponent(_84f[_853]));}catch(e){_851.value.cp=decodeURIComponent(_84f[_853]);}_851.params=_851.params?_851.params:{};_851.params.lm=_852;}if(_84f[_854]){_851.value=_851.value?_851.value:{};try{_851.value.rp=dojo.fromJson(decodeURIComponent(_84f[_854]));}catch(e2){_851.value.rp=decodeURIComponent(_84f[_854]);}_851.params=_851.params?_851.params:{};_851.params.lm=_852;}_84c.wparams[wID]=_851;}else{if(i.indexOf("w")!==0&&i!="pid"&&i!="sid"&&i!="sps"&&i!="pageselection"){var _855=_84f[i];_84c.params=_84c.params?_84c.params:{};_84c.params[i]=decodeURIComponent(_855);}}}}if(_84a){_84a(_84c);}if(!_84a){return _84c;}},_getFragmentFromData:function(obj,_856,_857){var _858;if(dojo.isString(obj)){_858=obj;}else{_858=dojo.clone(obj);if(_856||_857){_858=this._filterData(obj,_856,_857);}}var _859=_858;if(!dojo.isString(_859)){if(this._isEmpty(_859)){_859=null;}else{try{_859=dojo.toJson(_859);}catch(e){_859=null;}}}return _859;},encode:function(_85a,_85b,_85c,_85d,nsm){var _85e="";var _85f={};var wm;if(_85d&&_85d.cp){_85f=_85d.cp;if(_85f.widgetsOnCurrentPage=="true"){wm=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();}}var data;var pid;var sid;if(_85a.pid&&_85a.pid.value){pid=_85a.pid.value;}if(!pid&&_85a.sid&&_85a.sid.value){sid=_85a.sid.value;if(_85a.pageselection&&_85a.pageselection[sid]){pid=_85a.pageselection[sid].value;}}if(pid&&this._contains("pid",this.persistenceURL)){_85e=_85e+"pid"+"="+encodeURIComponent(pid)+"&";}if(!sid&&_85a.sid&&_85a.sid.value){sid=_85a.sid.value;}if(sid&&this._contains("sid",this.persistenceURL)){_85e=_85e+"sid"+"="+encodeURIComponent(sid)+"&";}for(var i in _85a){if(Object.prototype.hasOwnProperty.call(_85a,i)){if(i=="sparams"){if(_85a[i]){var _860=dojo.clone(_85a[i])||null;this._removeHiddenParameters(_860);this._removeEmptyObj(_860);if(_860&&this._contains("sparams",this.persistenceURL)){_85e=_85e+"sps"+"="+encodeURIComponent(dojo.toJson(_860))+"&";}}}if(i=="pageselection"&&_85a[i]){data=dojo.clone(_85a[i])||null;if(data&&this._contains("pageselection",this.persistenceURL)){_85e=_85e+"pageselection"+"="+encodeURIComponent(dojo.toJson(data))+"&";}}if(i=="wparams"&&_85a[i]&&!(_85f.noWidgets=="true")){var _861=this._sortData(dojo.clone(_85a[i]));if(_861.length>this.urlpersistenceLIMIT){_861=_861.slice(_861.length-this.urlpersistenceLIMIT);}var _862=0;var _863;var _864;var _865=_85f.allWidgets=="true"||this._contains("cp",this.persistenceURL);var _866=_85f.widgetsOnCurrentPage=="true";for(var j in _861){if(Object.prototype.hasOwnProperty.call(_861,j)){var _867=_861[j]||null;if(_866&&wm){if(_867&&_867.wid){var wid=dojo.isFunction(this.decodeWidgetIdentifier)?this.decodeWidgetIdentifier(_867.wid,nsm):_867.wid;if(wm.find(wid)===null){continue;}}}if(_867&&_867.value){_863=null;_864=null;if(_867.value.cp&&(_865||_866)){_863=this._getFragmentFromData(_867.value.cp)||null;}if(_867.value.rp){_864=this._getFragmentFromData(_867.value.rp,this.persistenceURL)||null;}if(_863||_864){_85e=_85e+"w"+_862+"="+_867.wid+"&";if(_863){_85e=_85e+"w"+_862+"cp="+encodeURIComponent(_863)+"&";}if(_864){_85e=_85e+"w"+_862+"rp="+encodeURIComponent(_864)+"&";}_862++;if(_862>=this.urlpersistenceLIMIT){break;}}}}}}if(i=="params"&&_85a[i]){var _868=_85a[i];for(var k in _868){if(Object.prototype.hasOwnProperty.call(_868,k)){_85e=_85e+k+"="+encodeURIComponent(_868[k])+"&";}}}}}if(this.isHuffmannEnabled){if(_85e.indexOf("&")!=-1){data=_85e.substr(_85e.indexOf("&")+1);if(data.length>0){data=com.ibm.mm.enabler.encode.huffman.HuffmanURL.createRawSchemeSpecificPartFromRegex(data,"[%&c=]");_85e=_85e.substring(0,_85e.indexOf("&")+1);_85e=_85e.concat(this.HUFFMANN_PREFIX);_85e=_85e.concat(data);}}}if(_85b){_85b(_85e,_85d);}if(!_85b){return _85e;}},_removeHiddenParameters:function(obj){for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){if(i.indexOf("_")===0){obj[i]=null;delete obj[i];}else{if(!dojo.isString(obj[i])){this._removeHiddenParameters(obj[i]);}}}}},_removeEmptyObj:function(obj){if(com.ibm.mm.enabler.utils.Misc.isEmpty(obj)){return;}for(var _869 in obj){if(Object.prototype.hasOwnProperty.call(obj,_869)){if(!dojo.isObject(obj[_869])){continue;}var _86a=obj[_869];this._removeEmptyObj(_86a);if(com.ibm.mm.enabler.utils.Misc.isEmpty(_86a)){obj[_869]=null;delete obj[_869];}}}},_removeQueryState:function(wru){if(wru.indexOf("?")==-1){return wru;}var _86b=wru.substring(wru.indexOf("?")+1);if(_86b&&_86b.indexOf("#")!=-1){_86b=_86b.substring(0,_86b.indexOf("#"));}var _86c=wru.substr(0,wru.indexOf("?"));var st=null;var _86d="";if(_86b&&(_86b.indexOf("nst=")===0||_86b.indexOf("&nst=")>=0)){var temp=_86b.substr(_86b.indexOf("nst=")+3);var _86e="";if(temp.indexOf("&")>0){st=temp.substring(0,temp.indexOf("&"));_86e=temp.substring(temp.indexOf("&"));}else{st=temp;}if(_86b.indexOf("&nst=")!=-1){_86d=_86b.substring(0,_86b.indexOf("&nst="));}if(_86d.length===0&&_86e.length!==0){_86d=_86d.concat(_86e.substring(1));}else{_86d=_86d.concat(_86e);}}else{return wru;}var hash=wru.substr(wru.indexOf("#")+1);var _86f=_86c;if(_86d.length>0){_86f=_86f.concat("?").concat(_86d);}if(hash.length>0){_86f=_86f.concat("#").concat(hash);}return _86f;},generateUrl:function(_870,_871,_872,nsm){return this.generateURL(_870,_871,_872);},generateURL:function(_873,_874,_875,nsm){var _876;if(_875&&_875.cp){_876={cp:_875.cp};}var _877=_876?this.encode(_873,null,null,_876,nsm):this.encode(_873,null,null,null,nsm);var href=window.location.href;href=this._removeQueryState(href);var _878=href;if(href.indexOf("#")!=-1){_878=href.substr(0,href.indexOf("#"));}var url=_878.concat("#");url=url.concat(_877);if(_875&&_875.nohash&&_875.nohash=="true"){_877=encodeURIComponent(_877);if(_878.indexOf("?")==-1){url=_878.concat("?");url=url.concat("nst=");url=url.concat(_877);}else{if(_878.lastIndexOf("&")==(_878.length-1)){url=_878.concat("nst=");url=url.concat(_877);}else{url=_878.concat("&");url=url.concat("nst=");url=url.concat(_877);}}}if(_874){_874(url);}return url;},_getHash:function(wru){if(wru.indexOf("?")==-1){return null;}if(wru.indexOf("#")!=-1){var _879=wru.substr(wru.indexOf("#")+1);if(wru.indexOf("pid")!=-1||wru.indexOf("sid")!=-1){return null;}}var _87a=wru.substring(wru.indexOf("?")+1);if(_87a&&_87a.indexOf("#")!=-1){_87a=_87a.substring(0,_87a.indexOf("#"));}var st=null;if(_87a&&(_87a.indexOf("nst=")===0||_87a.indexOf("&nst=")>=0)){var temp=_87a.substr(_87a.indexOf("nst=")+4);var _87b="";if(temp.indexOf("&")>0){st=temp.substring(0,temp.indexOf("&"));}else{st=temp;}st=decodeURIComponent(st);}else{return null;}return st;},_sortData:function(_87c){var arr=[];for(var i in _87c){if(Object.prototype.hasOwnProperty.call(_87c,i)){_87c[i].wid=i;var _87d=_87c[i];if(_87d.params&&_87d.params.lm){arr.push(_87d);}}}var _87e=function(a,b){return (a.params.lm-b.params.lm);};arr.sort(_87e);return arr;},_getLength:function(obj){var _87f=0;for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){_87f++;}}return _87f;},_isEmpty:function(obj){return com.ibm.mm.enabler.utils.Misc.isEmpty(obj);},_contains:function(_880,obj){if(!obj){return false;}if(obj[_880]){return true;}return false;},_filterData:function(data,_881,_882){if(!_881&&!_882){return data;}if(!_882){for(var i in data){if(Object.prototype.hasOwnProperty.call(data,i)){if(!this._contains(i,_881)){delete data[i];}}}return data;}for(var j in data){if(Object.prototype.hasOwnProperty.call(data,j)){if(!this._contains(j,_881)&&this._contains(j,_882)){delete data[j];}}}return data;},preprocess:function(_883,_884){if(this.bIsLoggable){this.LOGGER.entering("preprocess");if(_883){this.LOGGER.trace("preprocess","state is "+dojo.toJson(_883));}}var _885=com.ibm.mashups.enabler.model.state.CookieManager;var temp=_885.getState();if(!_883.pid&&temp.pid&&!_883.sid){_883.pid=temp.pid;}if(!_883.sid&&temp.sid){_883.sid=temp.sid;}if(!_883.pageselection&&temp.pageselection){_883.pageselection=temp.pageselection;}_883.lcparams=temp.lcparams||{};if(!_883.wparams){_883.wparams={};}var _886=_883.wparams;var _887=temp.wparams;for(var i in _887){if(Object.prototype.hasOwnProperty.call(_887,i)){var _888=i;var _889=_887[i];var _88a=_886[_888];if(_88a){_889=dojo.mixin(_889,dojo.clone(_88a));_886[_888]=_889;}else{_886[_888]=_889;}}}if(_884){_884(_883);}if(!_884){return _883;}},postprocess:function(_88b,_88c,_88d,_88e){var _88f=com.ibm.mashups.enabler.model.state.CookieManager;for(var i in _88b){if(Object.prototype.hasOwnProperty.call(_88b,i)){if(i=="pid"||i=="sid"||i=="pageselection"||i=="sparams"){if(this._contains(i,this.persistencePSTORE)){_88f.setState(i,_88b[i]);}}if(i=="lcparams"&&_88b[i]&&this.persistencePSTORE&&(this.persistencePSTORE.w||this.persistencePSTORE.h)){var _890={};var _891=_88b[i];for(var page in _891){if(Object.prototype.hasOwnProperty.call(_891,page)){var _892={};var _893=_891[page];_892.templateURL=_893.templateURL;_892.params=_893.params;_890[page]=_892;}}_88f.setState("lcparams",_890);}if(i=="wparams"&&_88b[i]){var _894={};var _895=_88b[i];for(var j in _895){if(Object.prototype.hasOwnProperty.call(_895,j)){var _896=_895[j]||null;var wID=j;var _897={};if(_896&&_896.value){if(_896.value.rp){var _898=this._filterData(dojo.clone(_896.value.rp),this.persistencePSTORE);if(!this._isEmpty(_898)){_897.value=_897.value?_897.value:{};_897.value.rp=_898;}}if(_896.value.cp&&this._contains("cp",this.persistencePSTORE)){var _899=this._filterData(dojo.clone(_896.value.cp),this.persistencePSTORE);if(!this._isEmpty(_899)){_897.value=_897.value?_897.value:{};_897.value.cp=_899;}}if(!this._isEmpty(_897)){if(_896.params){_897.params=_896.params;}_894[wID]=_897;}}}}_88f.setState("wparams",_894);}}}_88f.commit();if(_88c){_88c(_88b,_88e);}if(!_88c){return _88b;}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateProcessor"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateProcessor");}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl",null,{constructor:function(){},getProcessor:function(){if(!this._nsp){this._nsp=new com.ibm.mm.enabler.model.state.NavigationStateProcessorImpl();}return this._nsp;}});com.ibm.mashups.enabler.model.state.NavigationStateProcessorFactory=new com.ibm.mm.enabler.model.state.NavigationStateProcessorFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateNode_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateNode");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateNode",com.ibm.mashups.enabler.Identifiable,{get:function(){},set:function(_89a){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateNode"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateNode");}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateNodeImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateNodeImpl",[com.ibm.mashups.enabler.model.state.NavigationStateNode],{constructor:function(_89b,key,_89c,id,ref){this.model=_89b;this.key=key;this.value=_89c;if(id){this.id=id;}if(ref){this.ref=ref;}},setID:function(id){this.id=id;},setRef:function(ref){this.ref=ref;},getID:function(){return this.id;},getRef:function(){return this.ref;},getKey:function(){return this.key;},getValue:function(){return this.value;},get:function(){return dojo.clone(this._ref);},set:function(_89d){this.ref=_89d;this.model.setDirty(true);}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateModelImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateModelImpl",[com.ibm.mashups.enabler.model.state.NavigationStateModel],{DELIMITER:"#",ROOT:"ROOT",DELETE_TOKEN:"DELETE_TOKEN",VALUE:"value",PARAMS:"params",constructor:function(_89e){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.processor=com.ibm.mashups.enabler.model.state.NavigationStateProcessorFactory.getProcessor();if(_89e){this._state=_89e;this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._loaded=true;}else{dojo.back.setInitialState({back:this._loadCurrentPage,forward:this._loadCurrentPage});this._loaded=false;var _89f=this._getBaseUrl();this.processor.decode(_89f,dojo.hitch(this,"_preprocess"));}this._sync=true;},_getBaseUrl:function(){var _8a0=dojo.query("base");var _8a1=null;if(_8a0&&_8a0.length>0){var hash=dojo.hash();_8a1=_8a0[0].href+(hash!==""?"#"+hash:"");}else{_8a1=window.location.href;}return _8a1;},_getUniqueWid:function(wid){return dojo.isFunction(this.processor.encodeWidgetIdentifier)?this.processor.encodeWidgetIdentifier(wid,this):wid;},_refreshPage:function(){var cb=function(url){if(url){top.location.href=url;}};var _8a2=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator().getUrl(_8a2,cb,{nohash:"true"});},_getFullUrl:function(cb,_8a3){return this.processor.generateURL(this._state,cb,_8a3,this);},clone:function(){var _8a4=dojo.clone(this._state);return new com.ibm.mm.enabler.model.state.NavigationStateModelImpl(_8a4);},_preprocess:function(_8a5){if(this.bIsLoggable){this.LOGGER.entering("_preprocess");if(_8a5){this.LOGGER.trace("_preprocess","state:"+dojo.toJson(_8a5));}}this.processor.preprocess(_8a5,dojo.hitch(this,"_initializeState"));},_initialize:function(){var _8a6=this._getBaseUrl();this.processor.decode(_8a6,dojo.hitch(this,"_preprocess"));},_initializeState:function(_8a7){if(this.bIsLoggable){this.LOGGER.entering("_initializeState");if(_8a7){this.LOGGER.trace("_initializeState","state:"+dojo.toJson(_8a7));}}this._state=_8a7;this._stateInternal=dojo.clone(_8a7);this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._isDirty=false;this._isTransactionDirty=false;this._isTransaction=false;this._loaded=true;},_postprocess:function(_8a8,_8a9){if(this._isDirty&&(!this._pagemode||(this._pagemode&&this._pagemode!="unload"&&this._pagemode!="edit"))){this.processor.encode(_8a8,dojo.hitch(this,"_finishCommit"),this._stateInternal,_8a9,this);}else{if(this._deferred){this._deferred.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);delete this._deferred;}}},_loadCurrentPage:function(){var nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();nsm._initialize();var _8aa=com.ibm.mashups.services.ServiceManager.getService("eventService");_8aa.publishEvent(nsm.ONNAVSTATEUPDATED);},_finishCommit:function(_8ab,_8ac,_8ad){try{var _8ae=window.location.hash.substring(1);if(_8ac&&_8ac.addToHistory){if(_8ab&&_8ae!=_8ab){dojo.back.addToHistory({back:this._loadCurrentPage,forward:this._loadCurrentPage,changeUrl:_8ab});}}}catch(e){this.LOGGER.warning("_finishCommit","failed to update window.location.href error:"+e.message+" length of fragment:"+_8ab.length);}if(this._isDirty){var _8af=com.ibm.mashups.services.ServiceManager.getService("eventService");_8af.publishEvent(this.ONNAVSTATEUPDATED);}this._isDirty=false;this._removeDirty(this._state);this._stateInternal=dojo.clone(this._state);if(_8ac&&_8ac.allowRedirect&&_8ad&&_8ad.doRedirect&&!this._sync){this._refreshPage();}else{if(this._deferred){this._deferred.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);delete this._deferred;}}},_removeDirty:function(obj){for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){if(i.params&&i.params._isDirty){i.params._isDirty=false;if(i.value&&i.value==this.DELETE_TOKEN){obj[i]=null;delete obj[i];}}if(obj[i]&&!dojo.isString(obj[i])){this._removeDirty(obj[i]);}}}},setDirty:function(_8b0){this._isDirty=_8b0;},isDirty:function(){return this._isDirty;},_find:function(id){id=id||null;if(!id){return null;}if(id==this.ROOT){return this._rootNode;}else{var _8b1=this._findReference(id)||null;if(_8b1){var _8b2=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this);_8b2.setID(id);_8b2.setRef(_8b1);return _8b2;}}return null;},create:function(_8b3){var key=_8b3.key?_8b3.key:null;var _8b4=_8b3.value?_8b3.value:null;var _8b5=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,key,_8b4);return _8b5;},insert:function(_8b6,_8b7){var _8b8=_8b7.getRef();var key=_8b6.getKey();var _8b9=_8b6.getValue()||null;if(!_8b9){_8b9={};}var _8ba=_8b7.getID();_8b8[key]=_8b9;return;},_getIndex:function(_8bb){var _8bc=0;for(var i in _8bb){if(Object.prototype.hasOwnProperty.call(_8bb,i)){_8bc++;}}return _8bc;},remove:function(_8bd){var id=_8bd.getID();var arr=id.split("#");if(arr.length==1){if(this._state[id]){delete this._state[id];}}if(arr.length>1){var key=id.substring(id.lastIndexOf("#")+1);var _8be=id.substring(0,id.lastIndexOf("#"));var _8bf=this._find(_8be);if(_8bf){var ref=_8bf.getRef();if(ref[key]){delete ref[key];}}}return;},_getRoot:function(){return this._rootNode;},_findReference:function(id){if(id==this.ROOT){return this._state;}var _8c0=false;var arr=id.split("#");var node=this._state;if(!node){return null;}for(var i in arr){if(Object.prototype.hasOwnProperty.call(arr,i)){var j=arr[i];_8c0=false;if(this._findMatch(node,j)){node=node[j];_8c0=true;}else{break;}}}if(!_8c0){return null;}return node;},_findMatch:function(node,key){if(node[key]){return true;}return false;},commit:function(_8c1){return new com.ibm.mm.enabler.DeferredImpl(this,this._commit,_8c1);},_commit:function(_8c2,sync,_8c3){this._deferred=_8c2;this._sync=sync;if(_8c3&&_8c3.allowRedirect&&this._sync){this.LOGGER.warning("_commit","additionalParams.allowRedirect set to true will be ignored since sync is true. The page will not be refreshed");}this._processShareableParameters();if(this._isDirty&&(!this._pagemode||(this._pagemode&&this._pagemode!="edit"))){this._isTransactionDirty=true;this.processor.postprocess(this._state,dojo.hitch(this,this._postprocess),this._stateInternal,_8c3);}else{_8c2.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}},_processShareableParameters:function(){var _8c4=this._state.sparams;if(!_8c4){return;}var _8c5=null;for(var i in _8c4){if(Object.prototype.hasOwnProperty.call(_8c4,i)){var _8c6={};_8c6.itemSetName=i;var _8c7=[];for(var _8c8 in _8c4[i]){if(Object.prototype.hasOwnProperty.call(_8c4[i],_8c8)){var _8c9=_8c4[i][_8c8].value;for(var j in _8c9){if(Object.prototype.hasOwnProperty.call(_8c9,j)){var _8ca=_8c9[j].params;if(_8ca&&_8ca._isDirty){_8c7.push(_8ca._change);if(_8c9[j].value==this.DELETE_TOKEN){_8c9[j]=null;delete _8c9[j];}else{_8c9[j].params=null;delete _8c9[j].params;}}}}if(_8c7.length>0){_8c6.changes=_8c7;if(_8c4[i][_8c8].params&&_8c4[i][_8c8].params._listeners){var _8cb=_8c4[i][_8c8].params._listeners;for(var t in _8cb){if(Object.prototype.hasOwnProperty.call(_8cb,t)){_8cb[t](_8c6);}}}}}}}}},discard:function(){this._state=dojo.clone(this._stateInternal);this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._isDirty=false;},_getPageMode:function(){if(!this._pagemode){return null;}return this._pagemode;},_setPageMode:function(_8cc){if(_8cc){this._pagemode=_8cc;}},dispose:function(){this._state={};this._stateInternal={};this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._isDirty=false;this._loaded=true;this.processor.dispose();},startTransaction:function(){if(this.isTransaction()){return;}this.discard();this._isTransaction=true;this._isTransactionDirty=false;this._transactionRollbackState=dojo.clone(this._state);var _8cd=null;if(this._state){_8cd=this._state.wparams;}if(_8cd){var _8ce=com.ibm.mashups.enabler.services.IdentificationService;var id;for(id in _8cd){if(!_8ce.isServerID(id)){delete _8cd[id];}}}},commitTransaction:function(){if(this.isTransaction()){this._isTransaction=false;if(this._isTransactionDirty){this.discard();this._stateInternal=this._transactionRollbackState;this._transactionRollbackState=null;this._isDirty=true;this.processor.postprocess(this._state,dojo.hitch(this,this._postprocess),this._stateInternal);this._isTransactionDirty=false;}}return;},discardTransaction:function(){if(this.isTransaction()){if(this._isTransactionDirty){this.discard();if(!(typeof this._transactionRollbackState=="undefined")){var trs=this._transactionRollbackState;var s=this._state;if(s){if(s.pid){trs.pid=dojo.clone(s.pid);}if(s.sid){trs.sid=dojo.clone(s.sid);}if(s.pageselection){trs.pageselection=dojo.clone(s.pageselection);}}this._state=this._transactionRollbackState;this._rootNode=new com.ibm.mm.enabler.model.state.NavigationStateNodeImpl(this,this.ROOT,this._state,this.ROOT,this._state);this._transactionRollbackState=null;this._isDirty=true;this.processor.postprocess(this._state,dojo.hitch(this,this._postprocess),this._stateInternal);}this._isTransactionDirty=false;}this._isTransaction=false;}return;},isTransaction:function(){if(typeof this._isTransaction=="undefined"){this._isTransaction=false;}return this._isTransaction;},_generateListenerId:function(){if(!this._listenerCounter){this._listenerCounter=1;}else{this._listenerCounter++;}return this._listenerCounter;}});dojo.back.init();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModel"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory_API");dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");dojo.declare("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory",null,{getNavigationStateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl",[com.ibm.mashups.enabler.model.state.NavigationStateModelFactory],{constructor:function(){},getNavigationStateModel:function(_8cf){if(!this.navigationstatemodel){this.navigationstatemodel=new com.ibm.mm.enabler.model.state.NavigationStateModelImpl(_8cf);}return this.navigationstatemodel;}});com.ibm.mashups.enabler.model.state.NavigationStateModelFactory=new com.ibm.mm.enabler.model.state.NavigationStateModelFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.NavigationStateModelFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.NavigationStateModelFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGenerator_API");dojo.provide("com.ibm.mashups.enabler.model.state.UrlGenerator");dojo.declare("com.ibm.mashups.enabler.model.state.UrlGenerator",null,{getUrl:function(_8d0,_8d1,_8d2){},getURL:function(_8d3,_8d4,_8d5){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.UrlGeneratorImpl");dojo.declare("com.ibm.mm.enabler.model.state.UrlGeneratorImpl",com.ibm.mashups.enabler.model.state.UrlGenerator,{constructor:function(){},getUrl:function(_8d6,_8d7,_8d8){return this.getURL(_8d6,_8d7,_8d8);},getURL:function(_8d9,_8da,_8db){if(!_8d9){return null;}var _8dc=_8d9.clone();return _8dc._getFullUrl(_8da,_8db);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGenerator"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGenerator");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory_API");dojo.provide("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");dojo.declare("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory",null,{getUrlGenerator:function(){},getURLGenerator:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl");dojo.declare("com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl",com.ibm.mashups.enabler.model.state.UrlGeneratorFactory,{constructor:function(){this._urlGenerator=new com.ibm.mm.enabler.model.state.UrlGeneratorImpl();},getUrlGenerator:function(){return this.getURLGenerator();},getURLGenerator:function(){return this._urlGenerator;}});com.ibm.mashups.enabler.model.state.UrlGeneratorFactory=new com.ibm.mm.enabler.model.state.UrlGeneratorFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory"]){dojo._hasResource["com.ibm.mashups.enabler.model.state.UrlGeneratorFactory"]=true;dojo.provide("com.ibm.mashups.enabler.model.state.UrlGeneratorFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8dd){this.names=_8dd;},getHiddenMetaDataToLoad:function(){return this.names;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8de){this.interval=_8de;},getInterval:function(){return this.interval;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy",com.ibm.mashups.enabler.strategy.Strategy,{isDeleteContentByID:function(node,_8df){return node.getID()!=_8df;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8e0){this._URLUpdateParameterValue=_8e0;},getURLUpdateParameterValue:function(){return this._URLUpdateParameterValue;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy",com.ibm.mashups.enabler.strategy.Strategy,{});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_8e1,_8e2){this.parentLevel=_8e1;this.childrenLevel=_8e2;},getChildrenLevel:function(){return this.childrenLevel;},getParentLevel:function(){return this.parentLevel;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer_API"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer_API"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EventTransformer_API");dojo.provide("com.ibm.mashups.enabler.utils.EventTransformer");dojo.declare("com.ibm.mashups.enabler.utils.EventTransformer",null,{isTransformable:function(_8e3,_8e4,_8e5){}});}if(!dojo._hasResource["com.ibm.mm.data.datatypes"]){dojo._hasResource["com.ibm.mm.data.datatypes"]=true;dojo.provide("com.ibm.mm.data.datatypes");dojo.declare("com.ibm.mm.data.datatypes",null,{_alltypes:{"text":1,"url":1,"html":1,"image":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"table":1,"atom":1,"xml":1,"json":1,"modeldata":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},_simpleTypes:{"text":1,"url":1,"html":1,"image":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},_complexTypes:{"table":1,"atom":1,"xml":1,"json":1,"modeldata":1},specialTypes:{"mashupdata":1},_mappings:{text:{"url":1,"html":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},"url":{"xsd:anyuri":1,"text":1,"xsd:string":1,"js:string":1},"html":{"text":1,"xsd:string":1,"js:string":1},"image":{},"number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"countrycode":{"text":1,"xsd:string":1,"js:string":1},"languagecode":{"text":1,"xsd:string":1,"js:string":1},"currency":{"text":1,"xsd:string":1,"js:string":1},"boolean":{"xsd:boolean":1,"js:boolean":1,"text":1,"xsd:string":1,"js:string":1},"date":{"timestamp":1,"xsd:date":1,"js:date":1,"text":1,"xsd:string":1,"js:string":1},"time":{"timestamp":1,"xsd:time":1,"text":1,"xsd:string":1,"js:string":1},"timestamp":{"date":1,"time":1,"xsd:datetime":1,"text":1,"xsd:string":1,"js:string":1},"email":{"text":1,"xsd:string":1,"js:string":1},"postalcode":{"text":1,"xsd:string":1,"js:string":1},"phone":{"text":1,"xsd:string":1,"js:string":1},"address":{"text":1,"xsd:string":1,"js:string":1},"person":{"text":1,"xsd:string":1,"js:string":1},"json":{},"xsd:string":{"text":1,"url":1,"html":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:string":1,"js:number":1,"js:date":1,"js:boolean":1},"xsd:boolean":{"boolean":1,"js:boolean":1,"text":1,"xsd:string":1,"js:string":1},"xsd:decimal":{"number":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"xsd:float":{"number":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"xsd:double":{"number":1,"js:number":1,"text":1,"xsd:string":1,"js:string":1},"xsd:duration":{"text":1,"xsd:string":1,"js:string":1},"xsd:gmonthday":{"text":1,"xsd:string":1,"js:string":1},"xsd:gday":{"text":1,"xsd:string":1,"js:string":1},"xsd:gmonth":{"text":1,"xsd:string":1,"js:string":1},"xsd:hexbinary":{"text":1,"xsd:string":1,"js:string":1},"xsd:base64binary":{"text":1,"xsd:string":1,"js:string":1},"xsd:qname":{"text":1,"xsd:string":1,"js:string":1},"xsd:notation":{"text":1,"xsd:string":1,"js:string":1},"xsd:anyuri":{"url":1,"text":1,"xsd:string":1,"js:string":1},"xsd:time":{"time":1,"text":1,"xsd:string":1,"js:string":1},"xsd:date":{"date":1,"js:date":1,"text":1,"xsd:string":1,"js:string":1},"xsd:datetime":{"timestamp":1,"text":1,"xsd:string":1,"js:string":1},"xsd:gyear":{"date":1,"text":1,"xsd:string":1,"js:string":1},"xsd:gyearmonth":{"date":1,"text":1,"xsd:string":1,"js:string":1},"js:string":{"text":1,"url":1,"html":1,"number":1,"countrycode":1,"languagecode":1,"currency":1,"boolean":1,"date":1,"time":1,"timestamp":1,"email":1,"postalcode":1,"phone":1,"address":1,"person":1,"xsd:string":1,"xsd:boolean":1,"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"xsd:duration":1,"xsd:datetime":1,"xsd:time":1,"xsd:date":1,"xsd:gyearmonth":1,"xsd:gyear":1,"xsd:gmonthday":1,"xsd:gday":1,"xsd:gmonth":1,"xsd:hexbinary":1,"xsd:base64binary":1,"xsd:anyuri":1,"xsd:qname":1,"xsd:notation":1,"js:number":1,"js:date":1,"js:boolean":1},"js:date":{"date":1,"xsd:date":1,"text":1,"xsd:string":1,"js:string":1},"js:number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"number":1,"text":1,"xsd:string":1,"js:string":1},"js:boolean":{"xsd:boolean":1,"boolean":1,"text":1,"xsd:string":1,"js:string":1}},_semanticMappings:{text:{"xsd:string":1,"js:string":1},"url":{"xsd:anyuri":1},"html":{},"image":{},"number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"js:number":1},"countrycode":{},"languagecode":{},"currency":{},"boolean":{"xsd:boolean":1,"js:boolean":1},"date":{"xsd:date":1,"js:date":1},"time":{"xsd:time":1},"timestamp":{"xsd:datetime":1},"email":{},"postalcode":{},"phone":{},"address":{},"person":{},"json":{},"xsd:string":{"text":1,"js:string":1},"xsd:boolean":{"boolean":1,"js:boolean":1},"xsd:decimal":{"number":1,"js:number":1},"xsd:float":{"number":1,"js:number":1},"xsd:double":{"number":1,"js:number":1},"xsd:duration":{},"xsd:gmonthday":{},"xsd:gday":{},"xsd:gmonth":{},"xsd:hexbinary":{},"xsd:base64binary":{},"xsd:qname":{},"xsd:notation":{},"xsd:anyuri":{"url":1},"xsd:time":{"time":1},"xsd:date":{"date":1,"js:date":1},"xsd:datetime":{"timestamp":1},"xsd:gyear":{"date":1},"xsd:gyearmonth":{"date":1},"js:string":{"text":1,"xsd:string":1},"js:date":{"date":1,"xsd:date":1},"js:number":{"xsd:decimal":1,"xsd:float":1,"xsd:double":1,"number":1},"js:boolean":{"xsd:boolean":1,"boolean":1}},_SIMPLE_DATA_TYPE:1,_COMBINED_DATA_TYPE:2,_COMPLEX_DATA_TYPE:3,resourceBundle:null,constructor:function(_8e6){this.resourceBundle=dojo.i18n.getLocalization("com.ibm.mm.data","dataTypeStrings");this.xsdNS=com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri(com.ibm.mm.enabler.model.NameSpaceFactory.NS_XSD);this.nsNS=com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri(com.ibm.mm.enabler.model.NameSpaceFactory.NS_EVENT_DATATYPES);this.jsNS=com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri(com.ibm.mm.enabler.model.NameSpaceFactory.NS_JS);this.xsdPrefix="xsd:";this.nsPrefix="";this.jsPrefix="js:";},addDataType:function(_8e7,_8e8){if(!_8e7){return;}this._alltypes.typename=1;if(!_8e8||_8e8==this._SIMPLE_DATA_TYPE){this._simpleTypes.typename=1;}else{this._complexTypes.typename=1;}},removeDataType:function(_8e9){delete this._alltypes[_8e9];},addDataMapping:function(_8ea,_8eb){if(this._mappings.typename1===null){this._mappings.typename1={};}this._mappings[_8ea][_8eb]=1;},removeDataMapping:function(_8ec,_8ed){if(this._mappings[_8ec]!==null){if(this._mappings[_8ec][_8ed]!==null){delete this._mappings[_8ec][_8ed];}}},getAllTypes:function(){return dojo.clone(this._alltypes);},doesTypeMatch:function(_8ee,_8ef){var _8f0=false;if(!_8ee||!_8ef){return _8f0;}_8ee=_8ee.toLowerCase();_8ef=_8ef.toLowerCase();if(_8ee==_8ef||_8ee=="any"||_8ef=="any"){_8f0=true;}else{var _8f1=this.checkDataType(_8ee);switch(_8f1){case this._SIMPLE_DATA_TYPE:var _8f2=this.checkDataType(_8ef);switch(_8f2){case this._SIMPLE_DATA_TYPE:if(this._mappings[_8ee][_8ef]==1){_8f0=true;}break;case this._COMBINED_DATA_TYPE:var _8f3=this.getMainType(_8ef);if(_8ee==_8f3||this._mappings[_8ee][_8f3]==1){_8f0=true;}break;default:break;}break;case this._COMBINED_DATA_TYPE:break;case this._COMPLEX_DATA_TYPE:break;default:break;}}return _8f0;},doesTypeFlexMatch:function(_8f4,_8f5,_8f6){var _8f7=false;if(_8f4===null||_8f5===null){return _8f7;}if((_8f6===null)||(typeof _8f6=="undefined")){_8f6=true;}_8f4=this.getNormalizedPayload(_8f4);_8f5=this.getNormalizedPayload(_8f5);_8f4=_8f4.toLowerCase();_8f5=_8f5.toLowerCase();if(_8f4==_8f5||_8f4=="any"||_8f5=="any"){_8f7=true;}else{var _8f8=this.checkDataType(_8f4);var _8f9,_8fa;switch(_8f8){case this._SIMPLE_DATA_TYPE:_8f9=this.checkDataType(_8f5);switch(_8f9){case this._SIMPLE_DATA_TYPE:if(_8f6){if(this._mappings[_8f4][_8f5]==1){_8f7=true;}}else{if(this._semanticMappings[_8f4][_8f5]==1){_8f7=true;}}break;case this._COMBINED_DATA_TYPE:_8fa=this.getMainType(_8f5);if(_8f6){if(_8f4==_8fa||this._mappings[_8f4][_8fa]==1){_8f7=true;}}else{if(_8f4==_8fa||this._semanticMappings[_8f4][_8fa]==1){_8f7=true;}}break;default:break;}break;case this._COMBINED_DATA_TYPE:_8f9=this.checkDataType(_8f5);var _8fb=this.getMainType(_8f4);switch(_8f9){case this._SIMPLE_DATA_TYPE:if(_8f6){if(_8fb==_8f5||this._mappings[_8fb][_8f5]==1){_8f7=true;}}else{if(_8fb==_8f5||this._semanticMappings[_8fb][_8f5]==1){_8f7=true;}}break;case this._COMBINED_DATA_TYPE:_8fa=this.getMainType(_8f5);if(_8fb==_8fa||this._mappings[_8fb][_8fa]==1){_8f7=true;}break;default:break;}break;default:break;}}return _8f7;},getMainType:function(_8fc){var _8fd=_8fc.indexOf(".");if(_8fd<0){return _8fc;}else{return _8fc.substring(0,_8fd);}},checkDataType:function(_8fe){_8fe=_8fe.toLowerCase();var _8ff=_8fe.split(".");if(_8ff.length==1){if(this._simpleTypes[_8fe]==1){return this._SIMPLE_DATA_TYPE;}else{return this._COMPLEX_DATA_TYPE;}}else{if(_8ff.length==2||_8ff.length==3){var _900=_8ff[0];var _901=_8ff[_8ff.length-1];if(_900=="url"||_901=="languagecode"||_901=="countrycode"){return this._COMBINED_DATA_TYPE;}else{return this._COMPLEX_DATA_TYPE;}}else{return this._COMPLEX_DATA_TYPE;}}},getTypeLabel:function(_902,_903){_902=_902.toLowerCase();var _904=_902;var _905=this.checkDataType(_902);if(_905==this._COMBINED_DATA_TYPE){var _906=_902.indexOf(".");var main=_902.substring(0,_906);var _907=this.getSimpleTypeLabel(main,_903);var sub=_902.substring(_906+1,_902.length);var _908=this.getSimpleTypeLabel(sub,_903);_904=_907+" ("+_908+")";}else{_904=this.getSimpleTypeLabel(_902,_903);}return _904;},getNormalizedPayload:function(_909){var _90a=_909;var _90b=_909;var _90c=_909.indexOf("{");var _90d=_909.indexOf("}");var _90e="";if(_90d>_90c){_90a=_909.substring(_90c+1,_90d);_90b=_909.substring(_90d+1,_909.length);if(_90a===this.xsdNS){_90e=this.xsdPrefix;}else{if(_90a===this.jsNS){_90e=this.jsPrefix;}else{if(_90a===this.nsNS){_90e=this.nsPrefix;}}}_90b=_90e+_90b;}return _90b;},getSimpleTypeLabel:function(_90f,_910){var _911;if(this.resourceBundle[_90f]){_911=this.resourceBundle[_90f];}else{_911=_90f.charAt(0).toUpperCase()+_90f.substring(1);}return _911;}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.EventTransformerImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.EventTransformerImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.EventTransformerImpl");dojo.declare("com.ibm.mm.enabler.utils.EventTransformerImpl",[com.ibm.mashups.enabler.utils.EventTransformer],{constructor:function(){this.dataTypes=new com.ibm.mm.data.datatypes();},_transform:function(_912,_913,_914){var _915=null;if(_912.type==_913.type||_912.type=="any"||_913.type=="any"){_915=new com.ibm.mm.iwidget.IEventImpl(_912.name,_912.type,_912.payload,_912.source);}else{var _916=this.isTransformable(_912,_913,_914);if(_916){var _917=null;switch(_913.type.toLowerCase()){case "time":if(_912.type.toLowerCase()=="xsd:time"){_917=this._xsdTimeToMmTime(_912.payload);}break;case "date":switch(_912.type.toLowerCase()){case "xsd:date":_917=this._xsdDateToMmDate(_912.payload);break;case "js:date":_917=this._jsDateToMmDate(_912.payload);break;}break;case "timestamp":if(_912.type.toLowerCase()=="xsd:datetime"){_917=this._xsdDateTimeToMmTimestamp(_912.payload);}break;case "xsd:time":if(_912.type.toLowerCase()=="time"){_917=this._mmTimeToXsdTime(_912.payload);}break;case "xsd:date":switch(_912.type.toLowerCase()){case "date":_917=this._mmDateToXsdDate(_912.payload);break;case "js:date":_917=this._jsDateToXsdDate(_912.payload);break;}break;case "xsd:datetime":if(_912.type.toLowerCase()=="timestamp"){_917=this._mmTimestampToXsdDatetime(_912.payload);}break;case "js:date":switch(_912.type.toLowerCase()){case "xsd:date":_917=this._xsdDateToJsDate(_912.payload);break;case "date":_917=this._mmDateToJsDate(_912.payload);break;}break;}if(_917!==null){_915=new com.ibm.mm.iwidget.IEventImpl(_912.name,_913.type,_917,_912.source);}else{_915=new com.ibm.mm.iwidget.IEventImpl(_912.name,_913.type,_912.payload,_912.source);}}}return _915;},isTransformable:function(_918,_919,_91a){return this.dataTypes.doesTypeFlexMatch(_918.type,_919.type,_91a);},_mmTimestampToXsdDatetime:function(_91b){var _91c="T";var _91d="-";var _91e=":";var _91f=/^([\d]{4})-([\d]{2})-([\d]{2})\s([\d]{2}):([\d]{2}):([\d]{2})$/;var _920=/^([\d]{4})-([\d]{2})-([\d]{2})\s([\d]{2}):([\d]{2}):([\d]{2})\.([\d]{4})$/;var _921=/^([\d]{4})([\d]{2})([\d]{2})\s([\d]{2})([\d]{2})([\d]{2})$/;var _922=false;_922=_920.test(_91b);if(_922){var _923=_91b.split(new RegExp("[.]{1}"))[0];return _923.replace(/\s/,_91c);}else{_922=_91f.test(_91b);if(_922){return _91b.replace(/\s/,_91c);}else{_922=_921.test(_91b);if(_922){var _924=_921.exec(_91b);var yyyy=_924[1];var _925=_924[2];var dd=_924[3];var hh=_924[4];var _926=_924[5];var ss=_924[6];return yyyy+_91d+_925+_91d+dd+_91c+hh+_91e+_926+_91e+ss;}else{return null;}}}},_mmDateToXsdDate:function(date){var _927="-";var _928="01";var _929="01";var _92a=/^([\d]{4})-([\d]{2})-([\d]{2})$/;var _92b=/^([\d]{4})([\d]{2})([\d]{2})$/;var _92c=/^([\d]{4})([\d]{2})$/;var _92d=/^([\d]{4})$/;var _92e=false;_92e=_92a.test(date);if(_92e){return date;}else{_92e=_92b.test(date);var yyyy,mm,_92f;if(_92e){_92f=_92b.exec(date);yyyy=_92f[1];mm=_92f[2];var dd=_92f[3];return yyyy+_927+mm+_927+dd;}else{_92e=_92c.test(date);if(_92e){_92f=_92c.exec(date);yyyy=_92f[1];mm=_92f[2];return yyyy+_927+mm+_927+_929;}else{_92e=_92d.test(date);if(_92e){_92f=_92d.exec(date);yyyy=_92f[1];return yyyy+_927+_928+_927+_929;}else{return null;}}}}},_mmTimeToXsdTime:function(time){var _930=":";var _931="00";var _932="00";var _933=/^\d{2}\:\d{2}\:\d{2}\.\d{4}$/;var _934=/^\d{2}\:\d{2}\:\d{2}$/;var _935=/^\d{2}\:\d{2}$/;var _936=/^\d{2}$/;var _937=false;_937=_933.test(time);if(_937){return time.split(new RegExp("[.]{1}"))[0];}else{_937=_934.test(time);if(_937){return time;}else{_937=_935.test(time);if(_937){return time+_930+_932;}else{_937=_936.test(time);if(_937){return time+_930+_931+_930+_932;}else{return null;}}}}},_xsdDateTimeToMmTimestamp:function(_938){var _939=" ";var _93a=/^\d{4}\-\d{2}\-\d{2}\T\d{2}\:\d{2}\:\d{2}/;var _93b=false;_93b=_93a.test(_938);if(_93b){var _93c=_938.match(_93a)[0];return _93c.replace(/T/,_939);}else{return null;}},_xsdDateToMmDate:function(date){var _93d=/^\d{4}\-\d{2}\-\d{2}/;var _93e=false;_93e=_93d.test(date);if(_93e){return date.match(_93d)[0];}else{return null;}},_xsdTimeToMmTime:function(time){var _93f=/^\d{2}\:\d{2}\:\d{2}/;var _940=false;_940=_93f.test(time);if(_940){return time.match(_93f)[0];}else{return null;}},_jsDateToMmDate:function(date){if(date){var year=date.getFullYear();var _941=date.getMonth();var day=date.getDate();_941=this._format(_941.toString());day=this._format(day.toString());return year+"-"+_941+"-"+day;}else{return null;}},_jsDateToXsdDate:function(date){var _942=null;if(date){var year=date.getFullYear();var _943=date.getMonth();var day=date.getDate();var _944=date.getTimezoneOffset();_943=this._format(_943.toString());day=this._format(day.toString());_942=year+"-"+_943+"-"+day;if(_944!==0){var _945;var _946;var _947;if(_944<0){_946=Math.ceil(_944/60);_947=(_944*-1)%60;if(_947===0){_945="-"+this._format((_946*-1).toString())+":00";}else{_945="-"+this._format((_946*-1).toString())+this._format(_947);}_942=_942+_945;}else{_946=Math.floor(_944/60);_947=_944%60;if(_947===0){_945="+"+this._format((_946).toString())+":00";}else{_945="+"+this._format((_946).toString())+this._format(_947);}_942=_942+_945;}}}return _942;},_xsdDateToJsDate:function(date){var _948=/^([\d]{4})-(\d\d)-(\d\d)/;var _949=false;_949=_948.test(date);if(_949){var _94a=new Date(NaN);var _94b;var _94c=_948.exec(date);if(_94c){_94b=_94c[2];_94a.setFullYear(_94c[1],_94b-1,_94c[3]);if(_94b!=_94a.getMonth()+1){_94a.setTime(NaN);}}return _94a;}else{return null;}},_mmDateToJsDate:function(date){return this._xsdDateToJsDate(this._mmDateToXsdDate(date));},_format:function(_94d){if(_94d.length==1){_94d="0"+_94d;}return _94d;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer"]){dojo._hasResource["com.ibm.mashups.enabler.utils.EventTransformer"]=true;dojo.provide("com.ibm.mashups.enabler.utils.EventTransformer");}if(!dojo._hasResource["com.ibm.mm.enabler.logging.Trace"]){dojo._hasResource["com.ibm.mm.enabler.logging.Trace"]=true;if(typeof (__trace)=="undefined"){__trace={enter:function(_94e,_94f,args){if((args)&&(args.length==0)){args=null;}com.ibm.mashups.enabler.logging.Logger.getLogger(_94e).entering(_94f,args);},msg:function(_950,_951,msg,args){com.ibm.mashups.enabler.logging.Logger.getLogger(_950).trace(_951,msg,args);},evalFunction:function(js){return "function() {"+js+"}";},evalResult:function(_952,_953,msg){com.ibm.mashups.enabler.logging.Logger.getLogger(_952).trace(_953,msg);},exit:function(_954,_955,_956){com.ibm.mashups.enabler.logging.Logger.getLogger(_954).exiting(_955,_956);},assertFunction:function(_957){return "function() {\t if (!("+_957+")) {\t throw new Error('Assert failed');\t }\t }";}};}}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Constants_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Constants_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Constants_API");dojo.provide("com.ibm.mashups.enabler.widget.Constants");dojo.declare("com.ibm.mashups.enabler.widget.Constants",null,{FILTER_HANDLED_EVENTS:"HandledEvents",FILTER_PUBLISHED_EVENTS:"PublishedEvents"});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.Constants"]){dojo._hasResource["com.ibm.mm.enabler.widget.Constants"]=true;dojo.provide("com.ibm.mm.enabler.widget.Constants");dojo.declare("com.ibm.mm.enabler.widget.Constants",com.ibm.mashups.enabler.widget.Constants,{constructor:function(){},PERSISTENCE_MODE_MODEL:"Model",PERSISTENCE_MODE_MODEL_PREFERENCES:"ModelPreferences",PERSISTENCE_MODE_DOM:"DOM"});com.ibm.mashups.enabler.widget.Constants=new com.ibm.mm.enabler.widget.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Constants");}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory");dojo.declare("com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory",null,{createPersistentAttributes:function(_958,_959){},getSupportedPersistenceMode:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService_API");dojo.provide("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService");dojo.declare("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService",null,{SERVICE_NAME:"persistentAttributesFactoryService",createPersistentAttributes:function(_95a,_95b){},setFactory:function(_95c,_95d){},removeFactory:function(_95e){}});com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.SERVICE_NAME=com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl",com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory,{constructor:function(){this.modes=["DOM"];},createPersistentAttributes:function(_95f,_960){return new com.ibm.mm.iwidget.manageditemset.PersistentAttributes(_95f,true);},getSupportedPersistenceMode:function(){return this.modes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl",com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService,{constructor:function(){this._factories={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createPersistentAttributes:function(_961,_962){if(_962){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES,_962);}var _963;var wID=_961.id;var _963=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);var _964=_961.rootElement;if(dojo.hasClass(_964,com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.STANDALONE_CLASS)||!_963){_963=com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE;}if(typeof _963!=="undefined"&&_963==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _965=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _966=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _967=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_966);var _968=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_966,_969);var _969=_967.getSpaceID();var _96a=_968.getPageID();var _96b=com.ibm.mm.iwidget.Utils.getModelID(wID);var wnd=_965.findWidgetWindow(_96b,_96a).start();if(!wnd){if(!com.ibm.mashups.enabler.services.IdentificationService.isClientID(_96b)){if(dojo.isFunction(_961._getResourceBundle)){_961._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",_961.iwMessages.W_STANDALONECLASS_MISSING_1,[wID]);}else{this.LOGGER.warning("createPersistentAttributes","widget "+wID+" is missing class "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}}_963=com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE;}}if(!(_963 in this._factories)){return null;}return this._factories[_963].createPersistentAttributes(_961,_963);},setFactory:function(_96c,_96d){this._factories[_96c]=_96d;},removeFactory:function(_96e){if(_96e in this._factories){delete this._factories[_96e];}}});com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE=com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM;com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.STANDALONE_CLASS=com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone;com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.SERVICE_NAME,new com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl());com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService.SERVICE_NAME).setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM,new com.ibm.mm.iwidget.manageditemset.DOMPersistentAttributesFactoryImpl());}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.PersistentAttributesFactoryService");}if(!dojo._hasResource["com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl",null,{createItem:function(_96f,_970,_971,ns){if(!ns){ns="iw-";}var item=document.createElement("a");dojo.addClass(item,ns+iwConstants.CSSCLASS_INSTANCE.iwItem);dojo.style(item,"visibility","hidden");dojo.style(item,"display","none");item.setAttribute("href","#"+_96f);if(_971){item.setAttribute("lang",_971);}if(_970&&!_971){item.innerHTML=_970;}return item;},createItemSet:function(_972,ns){if(!ns){ns="iw-";}var _973=document.createElement("span");dojo.addClass(_973,ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet);_973.setAttribute("title",_972);dojo.style(_973,"visibility","hidden");dojo.style(_973,"display","none");return _973;},createWidgetDefRef:function(_974,ns){if(!ns){ns="iw-";}var aTag=document.createElement("a");dojo.addClass(aTag,ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition);aTag.setAttribute("href",_974);dojo.style(aTag,"visibility","hidden");dojo.style(aTag,"display","none");return aTag;},getItemSet:function(_975,name,ns){if(!ns){ns="iw-";}var rc=null;var _976=dojo.byId(_975);var _977=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet,_976);for(var i=0;i<_977.length;i++){var _978=_977[i];var _979=_978.getAttribute("title");if(name==_979){rc=_978;break;}}return rc;},getItem:function(_97a,name,ns){if(!ns){ns="iw-";}var rc=null;var _97b=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_97a);for(var i=0;i<_97b.length;i++){var _97c=_97b[i];var _97d=this.getKeyFromHref(_97c);if(_97d&&_97d==name){rc=_97c;break;}}return rc;},getItems:function(_97e,ns){if(!ns){ns="iw-";}var _97f=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_97e);if(typeof _97f=="undefined"||_97f===null||_97f.length===0){_97f=null;}return _97f;},getWidgetDefRef:function(_980,ns){if(!ns){ns="iw-";}var rc=null;var _981=dojo.byId(_980);var def=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition,_981)[0];var ref=def.getAttribute("href");if(ref){rc=ref;}return rc;},getKeyFromHref:function(node){var _982=node.getAttribute("href");if(!_982){return null;}var pos=_982.indexOf("#");if(pos<0){return null;}return _982.substring(pos+1);}});com.ibm.mashups.services.ServiceManager.setService("iwidgetFragmentService",new com.ibm.mm.iwidget.services.IWidgetFragmentServiceImpl());}if(!dojo._hasResource["com.ibm.mm.enabler.EndpointUtilsExtendedImpl"]){dojo._hasResource["com.ibm.mm.enabler.EndpointUtilsExtendedImpl"]=true;dojo.provide("com.ibm.mm.enabler.EndpointUtilsExtendedImpl");dojo.declare("com.ibm.mm.enabler.EndpointUtilsExtendedImpl",com.ibm.mm.enabler.EndpointUtilsDefaultImpl,{constructor:function(){},checkForEndpoints:function(url){if(!url){return null;}var _983=url.toString();if(_983){var _984=_983.indexOf("endpoint://",0);if(_984===0){var _985=_983.indexOf("/",11);if(_985>0){var _986=_983.substring(11,_985);var _987=_983.substring(_985+1);var _988=this._resolveEndpoint(_986);if(_988){if(_988.charAt(_988.length-1)=="/"){_983=_988+_987;}else{_983=_988+"/"+_987;}return _983;}else{return null;}}}else{if(_984>0){var _989=_983.substring(0,_984);var _98a=_983.substring(_984);var _98b=this.checkForEndpoints(_98a);if(_98b){return _98b.substring(0);}}}}return url;},_resolveEndpoint:function(_98c){if(!this.co){this._init();}var _98d=decodeURIComponent(_98c);var url=this.co.getValue(_98d+".url");if(!url){if(_98d=="{contenthandler}"){url=this.urlContentHandler;}else{if(_98d=="{webdavroot}"){url=this.urlWebDavRoot;}else{return null;}}}if((url)&&(url.charAt(0)!="/")&&(url.substr(0,4)!="http")){url="/"+url;}return url;},_init:function(){this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.co=this.cs.getConfigObject(com.ibm.mashups.enabler.services.ConfigConstants.ENDPOINT_CONFIG_PROVIDER);this.urlContentHandler="";this.urlContentHandler+=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _98e=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANONYMOUS_USER);var _98f;if(_98e){_98f=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);}else{_98f=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);}this.urlContentHandler+=_98f;if(com.ibm.mm.enabler.remote&&com.ibm.mm.enabler.remote.WebDavUrlFactory){this.urlWebDavRoot=com.ibm.mm.enabler.remote.WebDavUrlFactory.createUrl()+"/";}else{this.urlWebDavRoot=null;}}});com.ibm.mm.enabler.EndpointUtils=new com.ibm.mm.enabler.EndpointUtilsExtendedImpl();}if(!dojo._hasResource["com.ibm.mm.iwidget.payloadDef"]){dojo._hasResource["com.ibm.mm.iwidget.payloadDef"]=true;dojo.provide("com.ibm.mm.iwidget.payloadDef");dojo.declare("com.ibm.mm.iwidget.payloadDef",null,{constructor:function(name,type,_990,_991,_992){this.name=name;this.attributes=_992||null;if(!this.attributes){this.attributes={};}if(typeof type!="undefined"&&type!==null){this.attributes.type=type;}if(typeof _990!="undefined"&&_990!==null){this.attributes.defaultValue=_990;}if(typeof _991!="undefined"&&_991!==null){this.attributes.description=_991;}this.attributeNames=[];this.attributeNames.push("type");this.attributeNames.push("defaultValue");this.attributeNames.push("description");var _993;for(_993 in _992){if(Object.prototype.hasOwnProperty.call(_992,_993)){this.attributeNames.push(_993);}}this.children=new com.ibm.mm.enabler.ArrayMap();},setAttribute:function(name,_994){this.attributes[name]=_994;if(typeof (this.attributeNames[name])!="undefined"){this.attributeNames.push(name);}},getAttribute:function(name){var _995=this.attributes[name];if(typeof _995=="undefined"){_995=null;}return _995;},getAttributeNames:function(){return this.attributeNames;},getChildren:function(){return this.children.values();},getChild:function(name){return this.children.get(name);},setChild:function(name,_996){this.children.put(name,_996);},getChildrenNames:function(){this.children.keySet();},getName:function(){return this.name;},getType:function(){return this.attributes.type;},getDefaultValue:function(){return this.attributes.defaultValue;},getDescription:function(){return this.attributes.description;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.UtilsExtended"]){dojo._hasResource["com.ibm.mm.iwidget.UtilsExtended"]=true;dojo.provide("com.ibm.mm.iwidget.UtilsExtended");dojo.declare("com.ibm.mm.iwidget.UtilsExtendedImpl",com.ibm.mm.iwidget.UtilsDefaultImpl,{getPayloadDef:function(_997){var name=_997.getAttribute("name");var _998=new com.ibm.mm.iwidget.payloadDef(name);var _999=_997.attributes;for(var i=0;i<_999.length;i++){var _99a=_999[i];if(_99a.name!="name"){_998.setAttribute(_99a.name,_99a.value);}}var _99b=_997.childNodes;for(var j=0;j<_99b.length;j++){var _99c=_99b[j];if(_99c.nodeType==1){var _99d=this.getPayloadDef(_99c);_998.setChild(_99d.name,_99d);}}return _998;}});if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.UtilsModelImpl");}else{com.ibm.mm.iwidget.Utils=new com.ibm.mm.iwidget.UtilsExtendedImpl();}}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl",null,{constructor:function(_99e){this.widget=_99e;this.widgetId=_99e.id;},getSupportedModes:function(){var _99f=this.widgetwrapper.widgetDef.getSupportedModes();return _99f;},getPayloadDef:function(name){var _9a0=this.widget.widgetDef.payloadDefs;var _9a1=_9a0[name];if(typeof _9a1=="undefined"){return null;}return _9a1;},getPayloadDefNames:function(){var _9a2=this.widget.widgetDef.payloadDefs;var arr=[];for(var a in _9a2){if(Object.prototype.hasOwnProperty.call(_9a2,a)){arr.push(a);}}return arr;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.UserProfileImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.UserProfileImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.UserProfileImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.UserProfileImpl",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_9a3,user){this.widgetId=_9a3;this.user=user;},getItemValue:function(name){if(!name){return null;}var _9a4=this.user.getAttribute(name);if(typeof _9a4=="undefined"){_9a4=null;}return _9a4;},setItemValue:function(name,_9a5){if(!name||!_9a5){return null;}if(this.isReadOnly(name)){return null;}this.user.setAttribute(name,_9a5);return this;},isReadOnly:function(name){if(typeof name=="undefined"||name===null){return false;}var _9a6=this.user.getReadOnlyAttributeNames();var rc=this._contains(_9a6,name);return rc;},_contains:function(_9a7,_9a8){if(!_9a8){return false;}if(!_9a7){return false;}if(_9a7&&!dojo.isArray(_9a7)){return false;}for(var i=0;i<_9a7.length;i++){if(_9a7[i]&&_9a7[i]==_9a8){return true;}}return false;},removeItem:function(name){if(!name){return null;}if(this.isReadOnly(name)){return null;}this.user.removeAttribute(name);return this;},getAllNames:function(){var _9a9=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _9aa=_9a9.getValue("com.ibm.mashups.hideLookaside");if(dojo.isString(_9aa)&&_9aa.toLowerCase()=="true"){return this.user.getReadOnlyAttributeNames();}return this.user.getAttributeNames();},save:function(cb){return this.commit(cb);},commit:function(cb){var _9ab=null;if(com.ibm.mashups.enabler.user.Factory.getUserModel){_9ab=com.ibm.mashups.enabler.user.Factory.getUserModel();}if(_9ab){var _9ac=_9ab.commit();var fn=function(_9ad,_9ae,_9af){if(cb){var rc=false;var _9b0=iwConstants.USERPROFILE;if(_9ae&&_9ae==iwConstants.status.SUCCESS){rc=true;}cb(_9b0,rc);}};_9ac.setFinishedCallback(fn);_9ac.start();}},addListener:function(fn){var _9b1=this._getWidget();if(!_9b1){return null;}var _9b2=_9b1._registerListener(iwConstants.USERPROFILE,fn);return _9b2;},removeListener:function(_9b3){var _9b4=this._getWidget();if(!_9b4){return null;}return _9b4._removeListener(iwConstants.USERPROFILE,_9b3);},_getWidget:function(){var _9b5=com.ibm.mashups.iwidget.model.Factory.getGlobalModel();return _9b5.find(this.widget)||null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.ResourceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.ResourceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.ResourceImpl");dojo.declare("com.ibm.mm.iwidget.widget.ResourceImpl",null,{constructor:function(obj){if(obj){for(var i in obj){if(Object.prototype.hasOwnProperty.call(obj,i)){this[i]=obj[i];}}}},IMAGE:{"bmp":"bmp","cod":"cod","gif":"gif","ief":"ief","jpe":"jpe","jpeg":"jpeg","jpg":"jpg","jfif":"jfif","svg":"svg","tif":"tif","tiff":"tiff","ras":"ras","cmx":"cmx","ico":"ico","pnm":"pnm","pbm":"pbm","pgm":"pgm","ppm":"ppm","rgb":"rgb","xbm":"xbm","xpm":"xpm","xwd":"xwd"},isCSS:function(){var rc=false;var _9b6=this._getExtension();if(_9b6&&_9b6=="css"){rc=true;}if(!rc&&this.getMimeType()){if(this.getMimeType()=="text/stylesheet"||this.getMimeType()=="text/css"){rc=true;}}return rc;},isImage:function(){var rc=false;var _9b7=this._getExtension();if(_9b7&&_9b7 in this.IMAGE){rc=true;}if(!rc&&this.getMimeType()){if(this.getMimeType().indexOf("image/")===0){rc=true;}}return rc;},isJS:function(){var rc=false;var _9b8=this._getExtension();if(_9b8&&_9b8=="js"){rc=true;}if(!rc&&this.getMimeType()){var _9b9=this.getMimeType();if(_9b9=="text/javascript"||_9b9=="application/x-javascript"||_9b9=="application/javascript"){rc=true;}}return rc;},getGlobalId:function(){var id=this[iwConstants.RESOURCE.globalid];if(!id){id=this[iwConstants.RESOURCE.id];}if(!id){id=null;}return id;},getSrc:function(){return this[iwConstants.RESOURCE.src];},getMimeType:function(){var _9ba=this[iwConstants.RESOURCE.mimeType];if(!_9ba){_9ba=null;}return _9ba;},_getExtension:function(){var uri=this.getSrc();if(!uri){return null;}var _9bb=uri.substring(uri.lastIndexOf(".")+1,uri.length);if(!_9bb){return null;}return _9bb;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.icontext.IContextExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.icontext.IContextExtendedImpl");dojo.declare("com.ibm.mm.iwidget.icontext.IContextExtendedImpl",com.ibm.mm.iwidget.icontext.IContextDefaultImpl,{_initEvents:function(){this.iEvents=new com.ibm.mm.iwidget.icontext.IContextIEventsImpl(this.widgetwrapper);},_initIO:function(){this.io=new com.ibm.mm.iwidget.icontext.IContextIOImpl(this.widgetwrapper);},_initMMExtension:function(){this._mm=new com.ibm.mm.iwidget.icontext.IContextMMExtensionImpl(this.widgetwrapper);},getUserProfile:function(){var _9bc=null;if(com.ibm.mashups.enabler.user.Factory.getUserModel){_9bc=com.ibm.mashups.enabler.user.Factory.getUserModel();}var user=null;if(_9bc){user=_9bc.findCurrentUser().start();}var _9bd=null;if(user){_9bd=new com.ibm.mm.iwidget.manageditemset.UserProfileImpl(this.widgetId,user);}return _9bd;},requires:function(_9be,_9bf,uri,cb,_9c0){_9c0=_9c0||null;if(!_9c0){_9c0="text/plain";}uri=uri||null;if(uri){var obj={};obj[iwConstants.RESOURCE.mimeType]=_9c0;obj[iwConstants.RESOURCE.id]=_9be;obj[iwConstants.RESOURCE.version]=_9bf;obj[iwConstants.RESOURCE.src]=uri;obj[iwConstants.RESOURCE.callback]=cb;var _9c1=new com.ibm.mm.iwidget.widget.ResourceImpl(obj);com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").loadResource(_9c1,this.widgetId);}},processiWidgets:function(root){dojo.publish("/com/ibm/mashups/livetext/livetextchanged",[root,true]);},getShareableItemSet:function(name){name=name||null;if(!name){return null;}var _9c2=this.widgetwrapper._getShareableItemSet(name);return _9c2;}});com.ibm.mm.iwidget.icontext.IContextImpl=com.ibm.mm.iwidget.icontext.IContextExtendedImpl;}if(!dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl");dojo.declare("com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl",com.ibm.mm.iwidget.manageditemset.IDescriptorDefaultImpl,{_getWindowState:function(){if(this.widget){var _9c3=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(this.navStateModel,this.widget.id);value=_9c3.getWindowState();}else{value="normal";}return value;}});com.ibm.mm.iwidget.manageditemset.IDescriptorImpl=com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.manageditemset.IDescriptorModelImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.services.ResourceLoadServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.ResourceLoadServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.ResourceLoadServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.ResourceLoadServiceImpl",null,{constructor:function(){this.modules={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.LOADING_TOKEN=0;this.LOADING_ERROR_TOKEN=1;this.LOADED_TOKEN=2;this.waitingqueue={};this.evalqueue={};this.callbackQueue={};var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);if(cs){var _9c4=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.REGISTER_LOADEDRESOURCES);if(_9c4){if(dojo.isString(_9c4)){try{_9c4=dojo.fromJson(_9c4);}catch(e){}}if(dojo.isArray(_9c4)){this.registeredLoadedResources=_9c4;}}}},executeCallbackQueue:function(_9c5){if(this.callbackQueue[_9c5]){var _9c6=this.callbackQueue[_9c5];var _9c7=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_9c5);if(_9c7){for(var i=0;i<_9c6.length;i++){if(_9c6[i]){var _9c8=_9c7._getHandlerScope(_9c6[i].cb);if(_9c8){var cb=dojo.hitch(_9c8,_9c6[i].cb);cb(_9c6[i].id,_9c6[i].src,_9c6[i].status);_9c6[i]=null;}}}}}},loadResource:function(_9c9,_9ca,cb2){var _9cb="loadResource";var _9cc=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_9cc){this.LOGGER.entering(_9cb,arguments);}var _9cd=_9c9.getGlobalId();var uri=_9c9.getSrc();var path=null;if(_9c9.isJS()){path=this._rewriteUrl(uri,_9ca,true);}else{path=this._rewriteUrl(uri,_9ca,false);}if(!_9cd){_9cd=path;}if(!_9cd){return;}this.evalqueue[_9ca]=this.evalqueue[_9ca]?this.evalqueue[_9ca]:[];this.evalqueue[_9ca].push({_id:_9cd,resourceElem:_9c9,cb2:cb2,widgetId:_9ca,isReady:false});var _9ce=_9c9[iwConstants.RESOURCE.skipLoad];if(_9ce){var rc=false;try{rc=dojo.eval(_9ce);}catch(e){rc=false;}if(rc){this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}}var _9cf=this.registeredLoadedResources;if(dojo.isArray(_9cf)){for(var j=0;j<_9cf.length;j++){if(_9cf[j].globalid&&_9cf[j].globalid==_9cd){if(_9cf[j].version){var _9d0=_9c9[iwConstants.RESOURCE.version];if(!_9d0||(_9d0&&_9d0==_9cf[j].version)){this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}}else{this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}}}}var _9d1=this.modules[_9cd];var me=this;if(_9d1&&_9d1!==null){var type=_9d1.type;switch(type){case 0:this.waitingqueue[_9d1._id]=(this.waitingqueue[_9d1._id])?this.waitingqueue[_9d1._id]:[];this.waitingqueue[_9d1._id].push({resourceElem:_9c9,widgetId:_9ca,cb2:cb2});return;case 1:this._handleLoadedResource(_9cd,_9ca,null,_9d1.status,_9d1.data);return;case 2:this._handleLoadedResource(_9cd,_9ca,null,_9d1.status);return;}}_9d1={};_9d1.type=this.LOADING_TOKEN;_9d1._id=_9cd;_9d1._path=path;this.modules[_9cd]=_9d1;if(_9cd!=path){this.modules[path]=this.modules[_9cd];}var _9d2=null;if(_9c9.isCSS()){_9d2=this._loadCSS(path);this.modules[_9cd].type=this.LOADED_TOKEN;this.modules[_9cd].status=iwConstants.status.OTHER;this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}if(_9c9.isImage()){_9d2=this._loadImage(path);this.modules[_9cd].type=this.LOADED_TOKEN;this.modules[_9cd].status=iwConstants.status.OTHER;this._handleLoadedResource(_9cd,_9ca,null,iwConstants.status.OTHER);return;}var _9d3=path;if(dojo.isIE==6&&path.indexOf("/")===0){var _9d4=window.location.protocol;var host=window.location.hostname;var port=window.location.port;_9d3=_9d4+"//"+host+":"+port+path;}var _9d5=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _9d6=_9d5.create();var _9d7=!_9d6.isTransaction();if(ibmConfig.dojotest){_9d7=true;}var args={url:_9d3,ibmMultipart:{context:_9d5.CONTEXT_ENABLER},sync:_9d7,load:function(data,_9d8){var _9d9=null;if(_9d8.xhr.status==200||_9d8.xhr.status===0){var _9da=_9d8.xhr.responseText;_9d9=_9da.replace(/_IWID_/g,"_"+_9ca+"_");}me.modules[_9cd].type=me.LOADED_TOKEN;me.modules[_9cd].status=iwConstants.status.SUCCESS;me._handleLoadedResource(_9cd,_9ca,_9d9,iwConstants.status.SUCCESS);var _9db=me.waitingqueue[_9cd];if(_9db){for(var j=0;j<_9db.length;j++){var req=_9db[j];me._handleLoadedResource(_9cd,req.widgetId,null,iwConstants.status.SUCCESS);}}me.waitingqueue[_9cd]=null;},error:function(data,_9dc){me.modules[_9cd].type=me.LOADING_ERROR_TOKEN;me.modules[_9cd].data=data;me.modules[_9cd].status=_9dc.xhr.status;me._handleLoadedResource(_9cd,_9ca,null,_9dc.xhr.status,data);var _9dd=me.waitingqueue[_9cd];if(_9dd){for(var h=0;h<_9dd.length;h++){var req=_9dd[h];me._handleLoadedResource(_9cd,req.widgetId,null,_9dc.xhr.status,data);}}me.waitingqueue[_9cd]=null;}};dojo.xhrGet(args);},_rewriteUrl:function(uri,id,_9de){var _9df=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);return _9df._rewriteURI(uri,_9de);},_getExtension:function(uri){return uri.substring(uri.lastIndexOf(".")+1,uri.length);},_loadCSS:function(path){var link=document.createElement("link");link.setAttribute("rel","stylesheet");link.setAttribute("type","text/css");link.setAttribute("href",path);document.getElementsByTagName("head")[0].appendChild(link);},_loadImage:function(path){com.ibm.mm.enabler.utils.Misc.preloadImage(url);},_evalCallback:function(cb,_9e0,_9e1,_9e2){if(cb){if(dojo.isString(cb)){var _9e3=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_9e0);if(_9e3){var _9e4=_9e3._getHandlerScope(cb);if(_9e4){cb=dojo.hitch(_9e4,cb);}}}var id=_9e1.getGlobalId();var src=_9e1.getSrc();if(!_9e2){_9e2=iwConstants.status.SUCCESS;}if(dojo.isFunction(cb)){dojo.partial(cb)(id,src,_9e2);}else{this.callbackQueue[_9e0]=this.callbackQueue[_9e0]?this.callbackQueue[_9e0]:[];var _9e5={cb:cb,id:id,src:src,status:_9e2};this.callbackQueue[_9e0].push(_9e5);}}},_evalFn:function(_9e6){if(window.execScript){window.execScript(_9e6,"JavaScript");}else{dojo.eval(_9e6);}},_loadedFC:function(_9e7,_9e8,cb2,data,_9e9){var cb=_9e7[iwConstants.RESOURCE.callback];if(cb){this._evalCallback(cb,_9e8,_9e7,_9e9);}if(cb2){var _9ea=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();_9ea.suspendTransaction();if(data&&_9e9){cb2(data,_9e9);}else{cb2();}_9ea.resumeTransaction();}},_handleLoadedResource:function(_9eb,_9ec,_9ed,_9ee,_9ef){var _9f0;var _9f1=this.evalqueue[_9ec];if(_9f1){if(_9f1[0]&&_9f1[0]._id&&_9f1[0]._id==_9eb){if(_9ed){this._evalFn(_9ed);}_9f0=_9f1.shift();this._loadedFC(_9f0.resourceElem,_9ec,_9f0.cb2,_9ef,_9ee);var arr=_9f1;var _9f2=true;while(_9f2&&_9f1.length>0){if(_9f1[0].isReady){var _9f3=_9f1[0].contents;if(_9f3){this._evalFn(_9f3);}this._loadedFC(_9f1[0].resourceElem,_9ec,_9f1[0].cb2,_9f1[0].statusData,_9f1[0].status);_9f1.shift();}else{_9f2=false;}}}else{if(_9f1[0]&&_9f1[0]._id&&_9f1[0]._id!=_9eb){for(var i=0;i<_9f1.length;i++){_9f0=_9f1[i];if(_9f0._id&&_9f0._id==_9eb){_9f1[i].contents=_9ed;_9f1[i].isReady=true;_9f1[i].status=_9ee;_9f1[i].statusData=_9ef;}}}}}}});com.ibm.mashups.services.ServiceManager.setService("resourceLoadService",new com.ibm.mm.iwidget.services.ResourceLoadServiceImpl());}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.WidgetParser");dojo.declare("com.ibm.mm.iwidget.parser.WidgetParser",null,{parseWidgetDefinition:function(){return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.xslt"]){dojo._hasResource["com.ibm.mm.enabler.xslt"]=true;dojo.provide("com.ibm.mm.enabler.xslt");com.ibm.mm.enabler.xslt.ie={};com.ibm.mm.enabler.xslt.gecko={};com.ibm.mm.enabler.xslt.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);com.ibm.mm.enabler.xslt.getXmlHttpRequest=function(){var oXml=null;if(typeof ActiveXObject!="undefined"){oXml=new ActiveXObject("Microsoft.XMLHTTP");}else{oXml=new XMLHttpRequest();}return oXml;};com.ibm.mm.enabler.xslt.loadXml=function(sUrl){if(typeof ActiveXObject!="undefined"){return com.ibm.mm.enabler.xslt.ie.loadXml(sUrl);}else{return com.ibm.mm.enabler.xslt.gecko.loadXml(sUrl);}};com.ibm.mm.enabler.xslt.loadXmlString=function(sXml){if(typeof ActiveXObject!="undefined"){return com.ibm.mm.enabler.xslt.ie.loadXmlString(sXml);}else{var _9f4=new DOMParser();return com.ibm.mm.enabler.xslt.gecko.loadXmlString(sXml);}};com.ibm.mm.enabler.xslt.loadXsl=function(sUrl){if(typeof ActiveXObject!="undefined"){return com.ibm.mm.enabler.xslt.ie.loadXsl(sUrl);}else{return com.ibm.mm.enabler.xslt.gecko.loadXsl(sUrl);}};com.ibm.mm.enabler.xslt.transform=function(xml,xsl,_9f5,_9f6,_9f7){var _9f8=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _9f9="transform";var _9fa=com.ibm.mm.enabler.xslt.LOGGER.isLoggable(_9f8);if(_9fa){com.ibm.mm.enabler.xslt.LOGGER.entering(_9f9,arguments);}if(typeof ActiveXObject!="undefined"){return com.ibm.mm.enabler.xslt.ie.transform(xml,xsl,_9f5,_9f6,_9f7);}else{return com.ibm.mm.enabler.xslt.gecko.transform(xml,xsl,_9f5,_9f6,_9f7);}};com.ibm.mm.enabler.xslt.transformAndUpdate=function(_9fb,xml,xsl,_9fc,_9fd){var _9fe=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _9ff="transformAndUpdate";var _a00=com.ibm.mm.enabler.xslt.LOGGER.isLoggable(_9fe);if(_a00){com.ibm.mm.enabler.xslt.LOGGER.entering(_9ff,arguments);}var _a01;if(typeof ActiveXObject!="undefined"){_a01=com.ibm.mm.enabler.xslt.ie.transform(xml,xsl,_9fc,_9fd,true);if(_a00){com.ibm.mm.enabler.xslt.LOGGER.trace(_9ff,"XSLT result: "+_a01);}_9fb.innerHTML+=_a01;}else{_a01=com.ibm.mm.enabler.xslt.gecko.transform(xml,xsl,_9fc,_9fd,false);if(_a00){com.ibm.mm.enabler.xslt.LOGGER.trace(_9ff,"XSLT result: "+(new XMLSerializer()).serializeToString(_a01));}var _a02=_a01.documentElement;if(_a01.documentElement.tagName=="transformiix:result"){_a02=_a01.documentElement.childNodes;com.ibm.mm.enabler.utils.Dom.copyChildren(_a01.documentElement,_9fb,true);}else{if(_a00){com.ibm.mm.enabler.xslt.LOGGER.trace(_9ff,"Appending: "+(new XMLSerializer()).serializeToString(_a02));}_9fb.appendChild(_a02);}}if(_a00){com.ibm.mm.enabler.xslt.LOGGER.exiting(_9ff);}};com.ibm.mm.enabler.xslt.ie.loadXml=function(sUrl){var _a03=new ActiveXObject("MSXML2.DOMDocument");_a03.async=0;_a03.resolveExternals=0;if(!_a03.load(sUrl)){throw new Error("Error loading xml file "+sUrl);}return _a03;};com.ibm.mm.enabler.xslt.ie.loadXmlString=function(sXml){var _a04=new ActiveXObject("MSXML2.DOMDocument");_a04.async=0;_a04.resolveExternals=0;if(!_a04.loadXML(sXml)){throw new Error("Error loading xml string "+sXml);}return _a04;};com.ibm.mm.enabler.xslt.ie.loadXsl=function(sUrl){var _a05=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");_a05.async=0;_a05.resolveExternals=0;if(!_a05.load(sUrl)){throw new Error("Error loading xsl file "+sUrl);}return _a05;};com.ibm.mm.enabler.xslt.ie.transform=function(_a06,xsl,_a07,_a08,_a09){var oXml=_a06;var oXsl=xsl;try{if(!oXsl.documentElement){oXsl=this.loadXsl(xsl);}}catch(e){var sMsg=e.message;throw new Error(""+sMsg,""+sMsg);}var _a0a=new ActiveXObject("Msxml2.XSLTemplate");_a0a.stylesheet=oXsl;var _a0b=_a0a.createProcessor();_a0b.input=oXml;if(_a08){com.ibm.mm.enabler.utils.Misc.forIn(_a08,function(_a0c,key,obj){this.addParameter(key,_a0c);},_a0b);}if(_a07){_a0b.addParameter("mode",_a07);}if(_a09){if(!_a0b.transform()){throw new Error("Error transforming xml doc "+oXml);}return _a0b.output;}else{var _a0d=new ActiveXObject("MSXML2.DOMDocument");_a0d.async=0;_a0d.validateOnParse=1;oXml.transformNodeToObject(oXsl,_a0d);return _a0d;}};com.ibm.mm.enabler.xslt.gecko.loadXml=function(sUrl){};com.ibm.mm.enabler.xslt.gecko.loadXmlString=function(sXml){var _a0e=new DOMParser();var _a0f;try{_a0f=_a0e.parseFromString(sXml,"text/xml");}catch(exc){throw new Error("Error loading xml string "+sXml);}return _a0f;};com.ibm.mm.enabler.xslt.gecko.loadXsl=function(sUrl){var _a10=document.implementation.createDocument("","",null);_a10.async=0;_a10.load(sUrl);return _a10;};com.ibm.mm.enabler.xslt.gecko.transform=function(_a11,xsl,_a12,_a13,_a14){try{var _a15=xsl;if(!_a15.documentElement){_a15=this.loadXsl(xsl);}var proc=new XSLTProcessor();proc.importStylesheet(_a15);if(_a13){com.ibm.mm.enabler.utils.Misc.forIn(_a13,function(_a16,key,obj){this.setParameter(null,key,_a16);},proc);}if(_a12){proc.setParameter(null,"mode",_a12);}var _a17=proc.transformToDocument(_a11);if(!_a14){return _a17;}resultStr=_a17.documentElement.childNodes[0].textContent;}catch(exc){throw new Error("Error transforming xml doc "+exc);}return resultStr;};com.ibm.mm.enabler.xslt.setLayerContentByXml=function(_a18,xml,xsl,_a19,_a1a){var _a1b=com.ibm.mm.enabler.xslt.transform(xml,xsl,null,_a19,_a1a);if(_a18.innerHTML){_a18.innerHTML=_a1b;}else{var obj=document.getElementById(_a18);obj.innerHTML=_a1b;}};}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl",com.ibm.mashups.iwidget.widget.IWidgetDefinition,{constructor:function(name,_a1c,_a1d,_a1e,_a1f,uri,_a20,_a21,_a22,_a23,_a24,_a25){var arg1=name;if(dojo.isString(arg1)){this.name=name;this.markup=_a1c;this.iScope=_a1d;this.itemSetsArr=_a1e;this.uri=uri;this.widgetEvents=_a1f;this.publishedEvents=_a21;this.handledEvents=_a22;this.supportedModes=_a20;this.resources=_a23;this.payloadDefs=_a24;this.iDescriptor=_a25;}else{this.name=arg1.name;this.markup=arg1.markup;this.metaData=arg1.metaData;this.events=arg1.events;this.itemSets=arg1.itemSets;this.resources=arg1.resources;this.payloadDefs=arg1.payloadDefs;this.iScope=this.metaData.iScope;this.supportedModes=this.metaData.supportedModes;this.uri=this.metaData.contentURI;var _a26;this.widgetEvents={};for(_a26 in this.metaData){if(_a26.indexOf("on")===0){this.widgetEvents[_a26]=this.metaData[_a26];}}var _a27=arg1.events.publishedEvents;this.publishedEvents={};this.handledEvents={};var _a28;var _a29;for(_a28 in _a27){if(Object.prototype.hasOwnProperty.call(_a27,_a28)){_a26=_a27[_a28];_a29=new com.ibm.mm.iwidget.IEventDescriptionImpl(_a26.eventName,_a26.payloadType,_a26.description,_a26.onEvent);if(!this.publishedEvents[_a28]){this.publishedEvents[_a28]=[];}this.publishedEvents[_a28].push(_a29);}}var _a2a=arg1.events.handledEvents;for(_a28 in _a2a){if(Object.prototype.hasOwnProperty.call(_a2a,_a28)){_a26=_a2a[_a28];_a29=new com.ibm.mm.iwidget.IEventDescriptionImpl(_a26.eventName,_a26.payloadType,_a26.description,_a26.onEvent);if(!this.handledEvents[_a28]){this.handledEvents[_a28]=[];}this.handledEvents[_a28].push(_a29);}}var _a2b;this.itemSetsArr={};for(_a2b in arg1.itemSets){if(Object.prototype.hasOwnProperty.call(arg1.itemSets,_a2b)){var _a2c=arg1.itemSets[_a2b];var _a2d;if(_a2b=="attributes"){_a2d=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(_a2c.name,_a2c.onItemSetChanged);}else{_a2d=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(_a2c.name,_a2c.onItemSetChanged);}_a2d.itemLists.items=_a2c.itemLists;this.itemSetsArr[_a2b]=_a2d;}}}},_getPublishedEvents:function(){return this.publishedEvents;},_getHandledEvents:function(){return this.handledEvents;},getPublishedEvents:function(){var arr=[];for(var i in this.publishedEvents){if(Object.prototype.hasOwnProperty.call(this.publishedEvents,i)){arr.push(this.publishedEvents[i]);}}return arr;},getHandledEvents:function(){var arr=[];for(var i in this.handledEvents){if(Object.prototype.hasOwnProperty.call(this.handledEvents,i)){arr.push(this.handledEvents[i]);}}return arr;},getAttributes:function(){var _a2e=this.itemSetsArr.attributes;if(!_a2e){_a2e={name:"attributes",items:{}};}if(typeof (this.uri)!="undefined"&&_a2e){_a2e.items.contentURI={id:"contentURI",value:this.uri,readOnly:false};}if(typeof (this.supportedModes)!="undefined"&&_a2e){_a2e.items.supportedModes={id:"supportedModes",value:this.uri,readOnly:false};}return _a2e;},getAllItemSetNames:function(){var _a2f=[];if(!this.itemSetsArr){return _a2f;}var i=0;for(var _a30 in this.itemSetsArr){if(Object.prototype.hasOwnProperty.call(this.itemSetsArr,_a30)){var _a31=this.itemSetsArr[_a30];if(typeof (_a31)!="undefined"){_a2f[i]=_a31.name;}i++;}}return _a2f;},getItemSet:function(name){if(name=="attributes"){return this.getAttributes();}var _a32=this.itemSetsArr[name];if(typeof (_a32)!="undefined"){return _a32;}return null;},getPublishedEventsNames:function(){if(!this.publishedEvents){return null;}var _a33=[];var _a34;for(_a34 in this.publishedEvents){if(Object.prototype.hasOwnProperty.call(this.publishedEvents,_a34)){_a33.push(_a34);}}return _a33;},getHandledEventsNames:function(){if(!this.handledEvents){return null;}var _a35=[];var _a36;for(_a36 in this.handledEvents){if(Object.prototype.hasOwnProperty.call(this.handledEvents,_a36)){_a35.push(_a36);}}return _a35;},getPublishedEvent:function(_a37){if(!this.publishedEvents){return null;}return this.publishedEvents[_a37];},getHandledEvent:function(_a38){if(!this.handledEvents){return null;}return this.handledEvents[_a38];},getWidgetName:function(){return this.name;},getPayloadDefs:function(){return this.payloadDefs;},getPayloadDef:function(name){var _a39=this.payloadDefs[name];if(typeof _a39=="undefined"){return null;}return _a39;},getPayloadDefNames:function(){var arr=[];var a;for(a in this.payloadDefs){if(Object.prototype.hasOwnProperty.call(this.payloadDefs,a)){arr.push(a);}}return arr;},getSupportedModes:function(){var temp=this.supportedModes;if(!temp){return null;}var arr=temp.split(" ");return arr;},getIDescriptorItems:function(){return null;},getMarkupByMode:function(mode){return this.markup;},getWidgetEvents:function(){return this.widgetEvents;},getIScope:function(){return this.iScope;},getResources:function(){return this.resources;},getDefaultLanguage:function(){return "en";},getMarkup:function(){return this.markup;},getAllowInstanceContent:function(){return false;},_getShareableItemSets:function(){return null;},_getManagedItemSetListener:function(_a3a){return null;},getXmlBase:function(){return null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.LegacyXMLParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.LegacyXMLParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.LegacyXMLParser");dojo.declare("com.ibm.mm.iwidget.parser.LegacyXMLParser",com.ibm.mm.iwidget.parser.WidgetParser,{constructor:function(_a3b){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.xmlStr=_a3b;},namespaces:{"iw":"http://www.ibm.com/iWidget"},parseWidgetDefinition:function(){var _a3c=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var _a3d=this.readMarkup(_a3c);var _a3e=this.readItemSets(_a3c);var uri=this.readContentURI(_a3c);var _a3f=this.readWidgetEvents(_a3c);var name=this.readName(_a3c);var _a40=this.readiScope(_a3c);var _a41=this.readSupportedModes(_a3c);var _a42=this.readPublicEvents(_a3c,"iw:handledEvents");var _a43=this.readPublicEvents(_a3c,"iw:publishedEvents");var _a44=this.readResources(_a3c);var _a45=this.readPayloadDefs(_a3c);var _a46=this.readIDescriptor(_a3c);return new com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl(name,_a3d,_a40,_a3e,_a3f,uri,_a41,_a43,_a42,_a44,_a45,_a46);},readMarkup:function(_a47){var _a48="readMarkup";var _a49=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a49){this.LOGGER.entering(_a48,arguments);}var _a4a="/iw:iwidget/iw:content";var _a4b=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_a4a,_a47,this.namespaces);var _a4c="";if(_a4b){var _a4d=_a4b.childNodes;for(var j=0,l=_a4d.length;j<l;j++){var _a4e=_a4d[j];if(_a4e.nodeType==4){_a4c=_a4c.concat(_a4e.nodeValue);}else{if(_a4e.nodeType==3){_a4c=_a4c.concat(_a4e.nodeValue);}}}}if(_a49){this.LOGGER.exiting(_a48,_a4c);}return _a4c;},readSupportedModes:function(_a4f){var root=_a4f.documentElement;var _a50=root.getAttribute("supportedModes");if(typeof _a50=="undefined"||_a50===null){return null;}return _a50;},readItemSets:function(_a51){var _a52="readItemSets";var _a53=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a53){this.LOGGER.entering(_a52,arguments);}var _a54={};var _a55="/iw:iwidget/iw:itemSet";var _a56=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_a55,_a51,this.namespaces);for(var i=0,l=_a56.length;i<l;i++){var _a57=_a56[i];var id=_a57.getAttribute("name");var _a58=_a57.getAttribute("onItemSetChanged");var _a59={id:id,onItemSetChanged:_a58};_a59.items={};var _a5a=_a57.childNodes;for(var j=0,l2=_a5a.length;j<l2;j++){var _a5b=_a5a[j];if(_a5b.nodeType==1){var _a5c=_a5b.getAttribute("readOnly");var _a5d={id:_a5b.getAttribute("name"),value:_a5b.getAttribute("value"),readOnly:_a5c};_a59.items[_a5d.id]=_a5d;}}_a54[id]=_a59;}if(_a53){this.LOGGER.exiting(_a52);}return _a54;},readPayloadDefs:function(_a5e){var _a5f="readPayloadDefs";var _a60=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a60){this.LOGGER.entering(_a5f,arguments);}var _a61={};var _a62="/iw:iwidget/iw:payloadDef";var _a63=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_a62,_a5e,this.namespaces);for(var i=0,l=_a63.length;i<l;i++){var _a64=_a63[i];var _a65=com.ibm.mm.iwidget.Utils.getPayloadDef(_a64);_a61[_a65.name]=_a65;}if(_a60){this.LOGGER.exiting(_a5f,_a61);}return _a61;},readName:function(_a66){var root=_a66.documentElement;var name=root.getAttribute("name");if(typeof name=="undefined"||name===null){return null;}return name;},readContentURI:function(_a67){var root=_a67.documentElement;var uri=root.getAttribute("contentURI");if(typeof uri=="undefined"||uri===null){return null;}return uri;},readiScope:function(_a68){var root=_a68.documentElement;var _a69=root.getAttribute("iScope");if(typeof _a69=="undefined"||_a69===null){return null;}return _a69;},readWidgetEvents:function(_a6a){var root=_a6a.documentElement;var _a6b={};var _a6c=root.attributes;for(var i=0;i<_a6c.length;i++){var _a6d=_a6c[i];if(_a6d.name.indexOf("on")===0){var _a6e=_a6d.value;if(typeof _a6e!="undefined"&&_a6e!==null){_a6b[_a6d.name]=_a6e;}}}return _a6b;},readPublicEvents:function(_a6f,_a70){var _a71="/iw:iwidget/"+_a70;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_a71,_a6f,this.namespaces);var _a72={};if(node){dojo.forEach(node.childNodes,function(_a73){if(_a73.nodeType==1){var _a74=new com.ibm.mm.iwidget.IEventDescriptionImpl(_a73.getAttribute("eventName"),_a73.getAttribute("onEvent"),_a73.getAttribute("payloadType"),_a73.getAttribute("description"));_a72[_a73.getAttribute("eventName")]=_a74;}},this);}if(!_a72){return null;}return _a72;},readResources:function(_a75){var _a76="/iw:iwidget/iw:resource";var _a77=[];var _a78=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_a76,_a75,this.namespaces);if(_a78&&_a78.length>0){dojo.forEach(_a78,function(node){var _a79={};_a79.name=node.getAttribute("resourceName");_a79.src=node.getAttribute("uri");_a79.version=node.getAttribute("version");_a79.callback=node.getAttribute("callback");_a79.mimetype=node.getAttribute("mimetype");_a77[i]=_a79;},this);}return _a77;},readIDescriptor:function(_a7a){return null;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.StandardXMLParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.StandardXMLParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.StandardXMLParser");dojo.declare("com.ibm.mm.iwidget.parser.StandardXMLParser",com.ibm.mm.iwidget.parser.WidgetParser,{constructor:function(_a7b){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.xmlStr=_a7b;},namespaces:{"iw":"http://www.ibm.com/xmlns/prod/iWidget"},reservedAttributes:{iScope:"iScope",supportedModes:"supportedModes",id:"id",allowInstanceContent:"allowInstanceContent",lang:"lang","xmlns:iw":"xmlns:iw",supportedWindowStates:"supportedWindowStates","xml:lang":"xml:lang","xml:base":"xml:base"},parseWidgetDefinition:function(){var _a7c=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var _a7d=this.readRootElement(_a7c);_a7d.markup=this.readMarkup(_a7c);_a7d.itemSetsArr=this.readItemSets(_a7c,_a7d);_a7d.publicEvents=this.readPublicEvents(_a7c);_a7d.resources=this.readResources(_a7c);var _a7e=this.readPayloadDefs(_a7c);if(_a7e){_a7d.payloadDefs=_a7e;}_a7d.eventDescriptions=this.readEventDescriptions(_a7c);_a7d.xmlStr=this.xmlStr;return new com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl(_a7d,this.xmlStr);},readRootElement:function(_a7f){var _a80={};var root=_a7f.documentElement;var _a81=root.getAttribute("supportedModes");if(!_a81){_a81="view";}_a80.supportedModes=_a81;var _a82;var name=root.getAttribute("id");if(!name){name=null;}_a80.id=name;_a80.name=name;var temp=root.getAttribute("allowInstanceContent");var _a83=false;if(temp&&temp=="true"){_a83=true;}_a80.allowInstanceContent=_a83;var lang=root.getAttribute("lang");if(!lang){lang=root.getAttribute("xml:lang");}if(!lang){lang="en";}_a80.lang=lang;var _a84={};var _a85=root.attributes;var i;for(i=0;i<_a85.length;i++){var _a86=_a85[i];if(_a86.name.indexOf("on")===0){var _a87=_a86.value;if(_a87){_a84[_a86.name]=_a87;}}}_a80.widgetEvents=_a84;var _a88=root.getAttribute("iScope");if(!_a88){_a88=null;}_a80.iScope=_a88;var _a89=iwConstants.iDescriptorItems;var _a8a={};for(var j in _a89){if(Object.prototype.hasOwnProperty.call(_a89,j)){name=_a89[j];_a82=root.getAttribute(name);_a8a[name]=_a82;}}_a80.iDescriptor=_a8a;var _a8b={};_a85=root.attributes;for(i=0;i<_a85.length;i++){var att=_a85[i];if(att.name.indexOf("on")!==0&&!iwConstants.iDescriptorItems[att.name]&&!this.reservedAttributes[att.name]){_a82=att.value;if(typeof _a82!="undefined"&&_a82!==null){_a8b[att.name]=_a82;}}}_a80.simpleAttributes=_a8b;var _a8c=root.getAttribute("supportedWindowStates");if(!_a8c){_a8c="normal";}_a80.supportedWindowStates=_a8c;var _a8d=root.getAttribute("xml:base");if(_a8d){_a80.xmlBase=_a8d;}return _a80;},readMarkup:function(_a8e){var _a8f="readMarkup";var _a90=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a90){this.LOGGER.entering(_a8f,arguments);}var _a91="/iw:iwidget/iw:content";var _a92=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_a91,_a8e,this.namespaces);var _a93={};var _a94="";var mode=null;if(_a92&&_a92.length>0){for(var i=0,l=_a92.length;i<l;i++){var _a95=_a92[i];var _a96=_a95.childNodes;for(var j=0,l2=_a96.length;j<l2;j++){var _a97=_a96[j];if(_a97.nodeType==4){_a94=_a94.concat(_a97.nodeValue);}else{if(_a97.nodeType==3){_a94=_a94.concat(_a97.nodeValue);}}}mode=_a95.getAttribute("mode");if(!mode){mode="view";break;}uri=_a95.getAttribute("uri");_a93[mode]={};if(uri){_a93[mode].uri=uri;}_a93[mode].content=_a94;_a94="";}}if(_a90){this.LOGGER.exiting(_a8f,_a93);}return _a93;},readItemSets:function(_a98,_a99){var _a9a="readItemSets";var _a9b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a9b){this.LOGGER.entering(_a9a,arguments);}var _a9c={};var _a9d={};var _a9e="/iw:iwidget/iw:itemSet";var _a9f=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_a9e,_a98,this.namespaces);for(var i=0,l=_a9f.length;i<l;i++){var _aa0=_a9f[i];var _aa1=_aa0.getAttribute("id");var _aa2=_aa0.getAttribute("alias")?_aa0.getAttribute("alias"):null;if(!_aa2){_aa2=_aa0.getAttribute("globalid")?_aa0.getAttribute("globalid"):null;if(_aa2){this.LOGGER.warning(_a9a,"globalid is deprecated please use alias instead");}}var _aa3=_aa0.getAttribute("onItemSetChanged");var temp=_aa0.getAttribute("private");var _aa4=true;if(temp&&temp=="false"){_aa4=false;}var _aa5=_aa0.getAttribute("description");var _aa6={id:_aa1,onItemSetChanged:_aa3,isPrivate:_aa4};if(_aa2){_aa6.alias=_aa2;}_aa6.items={};var _aa7=_aa0.childNodes;for(var j=0,jL=_aa7.length;j<jL;j++){var _aa8=_aa7[j];if(_aa8.nodeType==1){var _aa9=false;var _aaa=_aa8.getAttribute("readOnly");if(_aaa&&_aaa=="true"){_aa9=true;}var id=_aa8.getAttribute("id");var _aab=_aa8.getAttribute("alias")?_aa8.getAttribute("alias"):null;if(!_aab){_aab=_aa8.getAttribute("globalid")?_aa8.getAttribute("globalid"):null;if(_aab){this.LOGGER.warning(_a9a,"globalid is deprecated please use alias instead");}}var _aac=_aa8.getAttribute("value");var lang=_aa8.getAttribute("lang");if(!lang){lang=_aa8.getAttribute("xml:lang");}var _aad={};_aad.id=id;if(_aab){_aad.alias=_aab;}_aad.readOnly=_aa9;if(!lang&&(typeof _aac!="undefined"&&_aac!==null)){_aad.value=_aac;}if(lang){_aad.defaultLocale=lang;}if(lang&&(typeof _aac!="undefined"&&_aac!==null)){_aad.values={};_aad.values[lang]=_aac;}var _aae=_aa8.childNodes;if(_aae.length>0||(lang&&_aac)){for(var v=0,vL=_aae.length;v<vL;v++){var _aaf=_aae[v];if(_aaf.nodeType==1){var _ab0=_aaf.getAttribute("lang");if(!_ab0){_ab0=_aaf.getAttribute("xml:lang");}if(!_ab0){_ab0="en";}var _ab1=_aaf.getAttribute("value");_aad.values=_aad.values?_aad.values:{};_aad.values[_ab0]=_ab1;}}}_aa6.items[id]=_aad;}}if(_aa4){_a9d[_aa1]=_aa6;}else{_a9c[_aa1]=_aa6;}}_a99.shareableItemSetsArr=_a9c;if(_a9b){this.LOGGER.exiting(_a9a,_a9d);}return _a9d;},readPayloadDefs:function(_ab2){var _ab3="readPayloadDefs";var _ab4=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_ab4){this.LOGGER.entering(_ab3,arguments);}var _ab5={};var _ab6="/iw:iwidget/iw:payloadDef";var _ab7=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_ab6,_ab2,this.namespaces);for(var i=0,l=_ab7.length;i<l;i++){var _ab8=_ab7[i];var _ab9=com.ibm.mm.iwidget.Utils.getPayloadDef(_ab8);_ab5[_ab9.name]=_ab9;}if(com.ibm.mm.enabler.utils.Misc.isEmpty(_ab5)===true){_ab5=null;}if(_ab4){this.LOGGER.exiting(_ab3,_ab5);}return _ab5;},readPublicEvents:function(_aba,_abb){var _abc={};var _abd="/iw:iwidget/iw:event";var _abe=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_abd,_aba,this.namespaces);if(_abe&&_abe.length!==0){for(var j=0,l=_abe.length;j<l;j++){var _abf=_abe[j];if(_abf.nodeType==1){var _ac0={};var _ac1=_abf.attributes;for(var i=0;i<_ac1.length;i++){var att=_ac1[i];var name=att.name;var _ac2=att.value;if(name=="eventDescName"){name="description";}if(name=="handled"){name="isHandled";}if(name=="published"){name="isPublished";}if(_ac2){_ac0[name]=_ac2;}}_abc[_ac0.id]=_ac0;}}}return _abc;},readResources:function(_ac3){var _ac4="/iw:iwidget/iw:resource";var _ac5=[];var _ac6=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_ac4,_ac3,this.namespaces);if(_ac6&&_ac6.length!==0){for(var i=0,l=_ac6.length;i<l;i++){var node=_ac6[i];var _ac7={};var id=node.getAttribute("id");if(!id){id=node.getAttribute("globalid");}_ac7[iwConstants.RESOURCE.id]=id;_ac7[iwConstants.RESOURCE.globalid]=node.getAttribute("globalid")?node.getAttribute("globalid"):null;var src=node.getAttribute("src");if(!src){src=node.getAttribute("uri");}_ac7[iwConstants.RESOURCE.src]=src;_ac7[iwConstants.RESOURCE.version]=node.getAttribute("version");_ac7[iwConstants.RESOURCE.blockInit]=node.getAttribute("blockInit");_ac7[iwConstants.RESOURCE.callback]=node.getAttribute("callback");_ac7[iwConstants.RESOURCE.mimeType]=node.getAttribute("mimeType");_ac7[iwConstants.RESOURCE.skipLoad]=node.getAttribute("skipLoad");if(!_ac7[iwConstants.RESOURCE.skipLoad]){var _ac8=node.childNodes;var _ac9=null;for(var j=0;j<_ac8.length;j++){_ac9=_ac8[j];if(_ac9.nodeType==1){break;}}if(_ac9){_ac8=_ac9.childNodes;for(var h=0;h<_ac8.length;h++){if(_ac8[h].nodeType==4){_ac7[iwConstants.RESOURCE.skipLoad]=_ac8[h].nodeValue;}}}}_ac5[i]=_ac7;}}return _ac5;},readEventDescriptions:function(_aca){var _acb="iw:iwidget/iw:eventDescription";var _acc={};var _acd=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_acb,_aca,this.namespaces);if(_acd&&_acd.length!==0){for(var i=0,l=_acd.length;i<l;i++){var node=_acd[i];var _ace={};var id=node.getAttribute("id");_ace.id=id;_ace.payloadType=node.getAttribute("payloadType");_ace.description=node.getAttribute("description");_ace.title=node.getAttribute("title");_ace.descriptionURI=node.getAttribute("descriptionURI");var lang=node.getAttribute("lang");if(!lang){lang=node.getAttribute("xml:lang");}_ace.lang=lang;_ace.aliases=node.getAttribute("aliases");_ace.descriptions={};var _acf=node.childNodes;for(var j=0,jL=_acf.length;j<jL;j++){var _ad0=_acf[j];if(_ad0.nodeType==1){var temp={};var _ad1=_ad0.getAttribute("lang");if(!_ad1){_ad1=_ad0.getAttribute("xml:lang");}temp.description=_ad0.getAttribute("description");temp.title=_ad0.getAttribute("title");temp.descriptionURI=_ad0.getAttribute("descriptionURI");_ace.descriptions[_ad1]=temp;}}_acc[id]=_ace;}}return _acc;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.OpenSocialXMLParser"]){dojo._hasResource["com.ibm.mm.iwidget.parser.OpenSocialXMLParser"]=true;dojo.provide("com.ibm.mm.iwidget.parser.OpenSocialXMLParser");dojo.declare("com.ibm.mm.iwidget.parser.OpenSocialXMLParser",com.ibm.mm.iwidget.parser.WidgetParser,{constructor:function(_ad2){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.xmlStr=_ad2;},namespaces:{},reservedAttributes:{iScope:"iScope",supportedModes:"supportedModes",id:"id",allowInstanceContent:"allowInstanceContent",lang:"lang","xmlns:iw":"xmlns:iw",supportedWindowStates:"supportedWindowStates","xml:lang":"xml:lang","xml:base":"xml:base"},parseWidgetDefinition:function(){var _ad3=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var _ad4=this.readRootElement(_ad3);this.readAllChildNodes(_ad3,_ad4);_ad4.publicEvents=this.readPublicEvents(_ad3);_ad4.resources=this.readResources(_ad3);var _ad5=this.readPayloadDefs(_ad3);if(_ad5){_ad4.payloadDefs=_ad5;}_ad4.eventDescriptions=this.readEventDescriptions(_ad3);_ad4.xmlStr=this.xmlStr;return new com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl(_ad4,this.xmlStr);},readRootElement:function(_ad6){var _ad7={};var root=_ad6.documentElement;var _ad8="view";_ad7.supportedModes=_ad8;var _ad9;var name=null;_ad7.id=name;_ad7.name=name;var temp=null;var _ada=false;_ad7.allowInstanceContent=_ada;var lang="en";_ad7.lang=lang;_ad7.getType=dojo.hitch(_ad7,function(){return com.ibm.mm.iwidget.Constants.OSGADGET_DEFINITION_TYPE;});var _adb={};_ad7.widgetEvents=_adb;var _adc=null;_ad7.iScope=_adc;var _add={};_ad7.iDescriptor=_add;var _ade={};_ad7.simpleAttributes=_ade;var _adf="normal";_ad7.supportedWindowStates=_adf;return _ad7;},readAllChildNodes:function(_ae0,_ae1){var _ae2="readAllChildNodes";var _ae3=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_ae3){this.LOGGER.entering(_ae2,arguments);}var root=_ae0.documentElement;if(root.children){var _ae4=root.children;for(var j=0;j<_ae4.length;j++){if(_ae4[j].nodeName){if(_ae4[j].nodeName==="ModulePrefs"){this.readModulePrefs(_ae4[j],_ae1);}else{if(_ae4[j].nodeName==="UserPref"){}else{if(_ae4[j].nodeName==="Content"){_ae1.markup=this.readContent(_ae4[j]);}}}}}}if(_ae3){this.LOGGER.exiting(_ae2,contents);}},readContent:function(_ae5){var _ae6="readContent";var _ae7=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_ae7){this.LOGGER.entering(_ae6,arguments);}var _ae8={};var _ae9=_ae5.childNodes;var _aea="";var mode="view";for(var j=0;j<_ae9.length;j++){var _aeb=_ae9[j];if(_aeb.nodeType==4){_aea=_aea.concat(_aeb.nodeValue);}else{if(_aeb.nodeType==3){_aea=_aea.concat(_aeb.nodeValue);}}}_ae8[mode]={};_ae8[mode].content=_aea;if(_ae7){this.LOGGER.exiting(_ae6,_ae8);}return _ae8;},readMarkup:function(_aec){var _aed="readMarkup";var _aee=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_aee){this.LOGGER.entering(_aed,arguments);}var _aef={};if(_aee){this.LOGGER.exiting(_aed,_aef);}return _aef;},readItemSets:function(_af0,_af1){var _af2="readItemSets";var _af3=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_af3){this.LOGGER.entering(_af2,arguments);}var _af4={};if(_af3){this.LOGGER.exiting(_af2,contents);}return _af4;},readModulePrefs:function(_af5,_af6){var _af7="readModulePrefs";var _af8=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_af8){this.LOGGER.entering(_af7,arguments);}var _af9={};_af9.mode="view";_af9.name="";_af6.iDescriptor=_af9;var _afa={};var _afb={};var _afc="idescriptor";if(_af5.attributes&&_af5.attributes!==null){var _afd=_af5.attributes;for(var j=0;j<_afd.length;j++){if(_afd[j]){var _afe=true;if(_afd[j].name&&_afd[j].name==="title"){var _aff=_afd[j].name;var _b00=false;var _b01={id:_afc,onItemSetChanged:null,isPrivate:_afe};_b01.items={};var _b02=false;var id=_afd[j].name;var _b03=null;var _b04=_afd[j].value;var lang="en";var _b05={};_b05.id=id;if(_b03){_b05.alias=_b03;}_b05.readOnly=_b02;if(_aff.indexOf("__MSG_")>=0){_b00=true;_b05.defaultLocale=lang;}else{_b05.value=_b04;}_b01.items[id]=_b05;if(_afe){_afa[_afc]=_b01;}else{_afb[_afc]=_b01;}}}}}_af6.shareableItemSetsArr=_afb;_af6.itemSetsArr=_afa;if(_af8){this.LOGGER.exiting(_af7,_afa);}},readPayloadDefs:function(_b06){var _b07="readPayloadDefs";var _b08=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b08){this.LOGGER.entering(_b07,arguments);}var _b09={};return _b09;},readPublicEvents:function(_b0a,_b0b){var _b0c="readPublicEvents";var _b0d=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b0d){this.LOGGER.entering(_b0c,arguments);}var _b0e={};if(_b0d){this.LOGGER.exiting(_b0c,itemSetsArr);}return _b0e;},readResources:function(_b0f){var _b10="readResources";var _b11=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b11){this.LOGGER.entering(_b10,arguments);}var _b12=[];if(_b11){this.LOGGER.exiting(_b10,itemSetsArr);}return _b12;},readEventDescriptions:function(_b13){var _b14="readEventDescriptions";var _b15=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b15){this.LOGGER.entering(_b14,arguments);}var _b16={};if(_b15){this.LOGGER.exiting(_b14,itemSetsArr);}return _b16;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParserFactory"]){dojo._hasResource["com.ibm.mm.iwidget.parser.WidgetParserFactory"]=true;dojo.provide("com.ibm.mm.iwidget.parser.WidgetParserFactory");dojo.declare("com.ibm.mm.iwidget.parser.WidgetParserFactory",null,{getWidgetParser:function(_b17){var _b18=_b17.replace(/^\s+/,"").replace(/\s+$/,"");var _b19=this._isXML(_b18);var _b1a=this._isLegacy(_b18);var _b1b=this._isOpenSocialGadget(_b18);if(_b19&&_b1a&&!_b1b){return new com.ibm.mm.iwidget.parser.LegacyXMLParser(_b18);}else{if(_b19&&!_b1a&&!_b1b){return new com.ibm.mm.iwidget.parser.StandardXMLParser(_b18);}else{if(_b19&&_b1b){return new com.ibm.mm.iwidget.parser.OpenSocialXMLParser(_b18);}}}return null;},_isOpenSocialGadget:function(_b1c){var _b1d=true;var _b1e=_b1c.indexOf("<Module>");if(_b1e===-1){_b1d=false;}return _b1d;},_isXML:function(_b1f){var _b20=true;var _b21=_b1f.indexOf("=\"http://www.w3.org/1999/xhtml\"");if(_b21!=-1){_b20=false;}return _b20;},_isLegacy:function(_b22){var _b23=true;var _b24=_b22.indexOf("=\"http://www.ibm.com/xmlns/prod/iWidget\"");if(_b24!=-1){_b23=false;}return _b23;}});com.ibm.mm.iwidget.parser.WidgetParserFactory=new com.ibm.mm.iwidget.parser.WidgetParserFactory();}if(!dojo._hasResource["com.ibm.mm.iwidget.services.WidgetLoadServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.WidgetLoadServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.WidgetLoadServiceImpl");dojo.provide("com.ibm.mm.iwidget.services.WidgetLoadServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.WidgetLoadServiceImpl",null,{constructor:function(){this.widgetDef={};this.LOADING_TOKEN="LOADING_TOKEN";this.LOADING_ERROR_TOKEN="LOADING_ERROR_TOKEN";this.waitingqueue={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getWidgetXML:function(_b25,sync,_b26,_b27){if(ibmConfig.dojotest){sync=true;}var _b28=this.widgetDef[_b25];if(_b28&&_b28==this.LOADING_TOKEN){if(!this.waitingqueue[_b25]){this.waitingqueue[_b25]=[];}var _b29={id:_b27,cb:_b26};this.waitingqueue[_b25].push(_b29);return;}else{if(_b28&&_b28.error&&_b28.error==this.LOADING_ERROR_TOKEN){return this.handleCallback(_b26,_b28.data,_b28.status);}else{if(_b28){return this.handleCallback(_b26,_b28,"200");}}}this.widgetDef[_b25]=this.LOADING_TOKEN;var me=this;var _b2a=_b25;if((_b2a.indexOf("http")===0)||(_b2a.indexOf("https")===0)||(_b2a.indexOf("endpoint")===0)){_b2a=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_b2a);}var args={url:_b2a,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(data,_b2b){var xhr=_b2b.xhr;_b2b["com.ibm.mm.Multipart.forceOnNextResponse"]=true;var _b2c=com.ibm.mm.iwidget.parser.WidgetParserFactory.getWidgetParser(xhr.responseText);var _b2d=_b2c.parseWidgetDefinition();me.widgetDef[_b25]=_b2d;me.handleCallback(_b26,_b2d,xhr.status,xhr);var _b2e=me.waitingqueue[_b25];if(_b2e){for(var i in _b2e){if(Object.prototype.hasOwnProperty.call(_b2e,i)){me.handleCallback(_b2e[i].cb,_b2d,xhr.status,xhr);}}me.waitingqueue[_b25]=null;}},error:function(data,_b2f){var xhr=_b2f.xhr;if(xhr.status==404){me.LOGGER.warning("getWidgetXML","Error loading widget xml. "+data.message);}me.widgetDef[_b25]={error:me.LOADING_ERROR_TOKEN,data:data,status:xhr.status};me.handleCallback(_b26,data,xhr.status,xhr);var _b30=me.waitingqueue[_b25];if(_b30){for(var i in _b30){if(Object.prototype.hasOwnProperty.call(_b30,i)){me.handleCallback(_b30[i].cb,data,xhr.status,xhr);}}me.waitingqueue[_b25]=null;}},handleAs:"text",sync:sync};dojo.xhrGet(args);return;},handleCallback:function(_b31,data,_b32,xhr){if(_b31){_b31(data,_b32,xhr);}}});com.ibm.mashups.services.ServiceManager.setService("widgetLoadService",new com.ibm.mm.iwidget.services.WidgetLoadServiceImpl());}if(!dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLoggerStatus"]){dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLoggerStatus"]=true;dojo.provide("com.ibm.mm.enabler.logging.LegacyLoggerStatus");dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType",null,{constructor:function(id,_b33,_b34,_b35,_b36){this._id=id;this._styleClass=_b33;this._iconPath=_b34;this._iconAlt=_b35;this._color=_b36;}});dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusMessage",null,{constructor:function(type,_b37,_b38){this._type=type;this._message=_b37;this._details=_b38;},render:function(_b39){var _b3a=com.ibm.mm.enabler.logging.LegacyLoggerStatus.statusTypesMap.getStatusType(this._type);var msg=[];msg[msg.length]="<div class=\"lotusMessage";if(this._type==="warn"){msg[msg.length]=" lotusWarning";}if(this._type==="info"){msg[msg.length]=" lotusInfo";}msg[msg.length]="\" style=\"margin:15px;\">";msg[msg.length]="<div class=\"";if(this._type==="error"){msg[msg.length]="lotusMessageIcon";}if(this._type==="warn"){msg[msg.length]="lotusWarningIcon";}if(this._type==="info"){msg[msg.length]="lotusInfoIcon";}msg[msg.length]="\" title=\""+_b3a._iconAlt+"\">";msg[msg.length]="</div>";var _b3b=this._message;if(this._type==="error"){var _b3c=_b3b.split(":");var _b3d=_b3c.shift()+":";_b3b=_b3c.join(":");msg[msg.length]="<div class=\"lotusMessageCode\">";msg[msg.length]=_b3d;msg[msg.length]="</div>";}msg[msg.length]="<div class=\"lotusMessageText\">";msg[msg.length]=_b3b;msg[msg.length]="</div>";if(this._details&&this._details.length>0){msg[msg.length]="<div class=\"lotusMessageSubText\">";msg[msg.length]=this._details;msg[msg.length]="</div>";}msg[msg.length]="</div>";_b39.innerHTML=msg.join("");}});dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusTypesMap",null,{constructor:function(){this._baseURL=dojo.moduleUrl("com.ibm.mm.enabler","image/");this.constants={"ERROR":"error","WARN":"warn","INFO":"info"};this.internalStatusTypeMap=null;},getStatusType:function(type){if(this.internalStatusTypeMap===null){var _b3e=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");this.internalStatusTypeMap={};this.internalStatusTypeMap.error=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(0,"error",this._baseURL+"error.gif",_b3e.ERROR,"#FF0000");this.internalStatusTypeMap.warn=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(1,"warning",this._baseURL+"warning.gif",_b3e.WARNING,"FFFF00");this.internalStatusTypeMap.info=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(2,"info",this._baseURL+"info.gif",_b3e.INFO,"#0077FF");}return this.internalStatusTypeMap[type];}});com.ibm.mm.enabler.logging.LegacyLoggerStatus.statusTypesMap=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusTypesMap();}if(!dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLogger"]){dojo._hasResource["com.ibm.mm.enabler.logging.LegacyLogger"]=true;dojo.provide("com.ibm.mm.enabler.logging.LegacyLogger");com.ibm.mm.enabler.logging.LegacyLogger.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.logging.LegacyLogger");com.ibm.mm.enabler.logging.LegacyLogger.Constants={MMLogging:"/mm/logging",MMStatusMsg:"/mm/statusMsg",MMTracing:"/mm/tracing",LOG:"log",INFO:"info",WARN:"warn",ERROR:"error"};com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments=function(args){if(args.length==1){return null;}var _b3f=[];for(var i=1;i<args.length;i++){_b3f[i-1]=args[i];}return _b3f;};com.ibm.mm.enabler.logging.LegacyLogger.log=function(_b40){var _b41=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b41);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.trace(_b40,msg);};com.ibm.mm.enabler.logging.LegacyLogger.entry=function(_b42){var _b43=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.entering(_b42,_b43);};com.ibm.mm.enabler.logging.LegacyLogger.exit=function(_b44){var _b45=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.exiting(_b44,_b45);};com.ibm.mm.enabler.logging.LegacyLogger.escapeXmlForHTMLDisplay=function(_b46){_b46=_b46.replace(/</g,"&lt;");_b46=_b46.replace(/>/g,"&gt;");return _b46;};com.ibm.mm.enabler.logging.LegacyLogger.info=function(_b47){var _b48=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b48);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.info(_b47,msg);};com.ibm.mm.enabler.logging.LegacyLogger.warn=function(_b49){var _b4a=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b4a);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.warning(_b49,msg);};com.ibm.mm.enabler.logging.LegacyLogger.error=function(_b4b){var _b4c=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b4c);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.severe(_b4b,msg);};com.ibm.mm.enabler.logging.LegacyLogger._log=function(type,args){if(com.ibm.mm.enabler.logging.LegacyLogger.isLogging){if(args.length>=2&&dojo.isString(args[1])){var arr=[];arr.push(args[0]+args[1]);for(var i=2;i<args.length;i++){arr.push(args[i]);}console[type].apply(window.console,arr);}else{console[type].apply(window.console,args);}}};com.ibm.mm.enabler.logging.LegacyLogger._publishTracing=function(type,args){if(typeof ibmConfig!="undefined"&&ibmConfig!==null&&ibmConfig.allowPublishTracing===true){var a={};a.type=type;a.args=args;var temp=[];temp[0]=a;dojo.publish(com.ibm.mm.enabler.logging.LegacyLogger.Constants.MMTracing,temp);}};com.ibm.mm.enabler.logging.LegacyLogger._publishLogging=function(type,args){if(typeof ibmConfig!="undefined"&&ibmConfig!==null&&ibmConfig.allowPublishLogging===true){var a={};a.type=type;a.args=args;var temp=[];temp[0]=a;dojo.publish(com.ibm.mm.enabler.logging.LegacyLogger.Constants.MMLogging,temp);}};if(typeof ibmConfig!="undefined"&&ibmConfig!==null&&ibmConfig.isDebug===true){com.ibm.mm.enabler.logging.LegacyLogger.isLogging=true;}else{com.ibm.mm.enabler.logging.LegacyLogger.isLogging=false;}com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage=function(_b4d,type,_b4e,_b4f,_b50){var _b51=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusMessage(type,_b4e,_b4f);if(_b4d){_b51.render(_b4d);}com.ibm.mm.enabler.logging.LegacyLogger._publishStatusMsg(type,_b4e,_b4f,_b50);};com.ibm.mm.enabler.logging.LegacyLogger._publishStatusMsg=function(type,_b52,_b53,args,_b54){if(typeof ibmConfig!="undefined"&&ibmConfig!==null&&ibmConfig.allowPublishStatusMsg===true){var a={};a.type=type;a.args=args;a.message=_b52;a.details=_b53;a.component=_b54;var temp=[];temp[0]=a;dojo.publish(com.ibm.mm.enabler.logging.LegacyLogger.Constants.MMStatusMsg,temp);}};}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.Wire_API"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.Wire_API"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.Wire_API");dojo.provide("com.ibm.mashups.iwidget.widget.Wire");dojo.declare("com.ibm.mashups.iwidget.widget.Wire",null,{constructor:function(){},getSourceWidgetID:function(){},getSourceEventName:function(){},getTargetWidgetID:function(){},getTargetEventName:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.Wire"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.Wire"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.Wire");}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.WireImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.WireImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.WireImpl");dojo.declare("com.ibm.mm.iwidget.widget.WireImpl",com.ibm.mashups.iwidget.widget.Wire,{constructor:function(_b55,obj){if(obj){this.SourceWidget=obj.SourceWidget;this.SourceEvent=obj.SourceEvent;this.TargetEvent=obj.TargetEvent;}this.TargetWidget=_b55;this._isDirty=false;this._type=null;},TYPE_NEW:"NEW",TYPE_DELETE:"DELETE",getID:function(){return this.SourceWidget+"_"+this.SourceEvent+"_"+this.TargetWidget+"_"+this.TargetEvent;},getSourceWidgetID:function(){return this.SourceWidget;},getSourceEventName:function(){return this.SourceEvent;},getTargetWidgetID:function(){return this.TargetWidget;},getTargetEventName:function(){return this.TargetEvent;},setDirty:function(_b56){this._isDirty=_b56;},isDirty:function(){return this._isDirty;},setType:function(type){this._type=type;},getType:function(){return this._type;},setSubHandler:function(_b57){this._subHandle=_b57;},getSubHandler:function(){return this._subHandle;},toString:function(){return this.getID();}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperStubImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperStubImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetWrapperStubImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetWrapperStubImpl",null,{PREFIX_STUB:"_stub_",getID:function(){return this.id;},getIWidgetInstance:function(){if(this.widgetInstance){return this.widgetInstance;}this.widgetInstance=new com.ibm.mm.iwidget.widget.IWidgetInstanceImpl(this,this.rootElement,this.id);return this.widgetInstance;},setIWidgetDefinition:function(_b58){this.widgetDef=_b58;},getIWidgetDefinition:function(){if(this.loaded){return new com.ibm.mm.iwidget.DeferredLoadImpl(this.getIWidgetInstance().widgetXMLUrl,this.id,this.widgetDef);}else{return new com.ibm.mm.iwidget.DeferredLoadImpl(this.getIWidgetInstance().widgetXMLUrl,this.id);}},getMarkup:function(){return new com.ibm.mm.iwidget.DeferredLiveTextUnprocessStubImpl(this);},_getInstanceMarkupFromDOM:function(){return this.getIWidgetInstance()._getInstanceMarkup();},_deepFind:function(_b59,_b5a,_b5b,id){var ret=null;var _b5c=_b5a.getChildren(_b5b);while(_b5c.hasNext()){var _b5d=_b5c.next();if(_b5a.hasChildren(_b5d)){ret=this._deepFind(_b59,_b5a,_b5d,id);if(ret!=null){break;}}else{if(_b5d.getLayoutNodeType()==com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL){var _b5e=_b59.getWidgetWindow(_b5d).start();if(_b5e&&_b5e.getID()==id){return _b5d;}}}}return ret;},_getInstanceMarkup:function(_b5f){var _b60=com.ibm.mashups.enabler.services.IdentificationService.isAlienID(this.id);if(_b60){_b5f(this._getInstanceMarkupFromDOM());return;}var _b61=com.ibm.mashups.enabler.services.IdentificationService.isClientID(this.id);var _b62=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _b63=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _b64=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_b63);var _b65=_b64.getSpaceID();var _b66=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_b63,_b65);var _b67=_b66.getPageID();var _b68=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _b69=_b68.find(_b67).start();var _b6a=_b68.getLayoutModel(_b69);var _b6b=null;if(_b61){_b6b=this._deepFind(_b62,_b6a,_b6a.getRoot().start(),this.id);}else{_b6b=_b6a.find(this.id).start();}if(_b6b){var dfr=_b6b.getWidgetBody();dfr.setFinishedCallback(_b5f);dfr.start(false);}},doRender:function(){try{this._updateTitle();this.getWires();this.subHandler={};this.eventSvr=com.ibm.mashups.services.ServiceManager.getService("eventService");var _b6c=this.eventSvr.subscribeEvent(this.eventSvr.WIDGETEVENT_PREFIX+this.PREFIX_STUB+this.id,this,"handleEvent");this.subHandler[this.PREFIX_STUB+this.id]=[];this.subHandler[this.PREFIX_STUB+this.id].push(_b6c);this._getInstanceMarkup(dojo.hitch(this,"doRenderContinue"));}catch(e){var _b6d=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);_b6d.severe("doRender","widget:"+this.id+" Creating iframe Exception:"+e);}},doRenderContinue:function(_b6e){if(_b6e===null||_b6e===undefined){return;}var _b6f=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _b70=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_b6f,this.id);var _b71=_b70.getWidgetMode();if(!_b71){_b71=this._getDefaultMode();}if(!_b71){_b71=iwConstants.mode_view;}this.currentMode=_b71;if(this._handleSaveMode){this._handleSaveMode();}var _b72=document.createElement("div");_b72.className=this.ns+"Content";this.rootElement.appendChild(_b72);var _b73=this.rootElement.lastChild;dojo.addClass(_b73,this.currentMode);_b73.visibility="hidden";this.windowManager[this.currentMode]={id:this.id,root:_b73,active:true,main:true};var _b74=null;if(_b70){_b74=_b70.getWidgetState("cp");}this._createIframe(_b6e,_b73,this.id,"false",this,_b74);},destroy:function(){this.eventSvr._getHubAdapter(this.id).returnSubDomain(this._getSubDomain());var _b75=this.getIWidgetInstance().getWireModel();if(_b75){var _b76=_b75.getWires();while(_b76.length>0){var _b77=_b76[0].getSourceWidgetID();_b75.removeWire(_b77);this.commit();_b76=_b75.getWires();}}var _b78=null;if(_b75){_b78=_b75.getTargets();}if(_b78){var _b79=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();for(var i in _b78){if(Object.prototype.hasOwnProperty.call(_b78,i)){var _b7a=_b79.find(i);if(_b7a){var _b7b=_b7a.getIWidgetInstance().getWireModel();_b7b.removeWire(this.id);_b7a.commit();}}}}for(var i2 in this.subHandler){if(Object.prototype.hasOwnProperty.call(this.subHandler,i2)){for(var j in this.subHandler[i2]){if(Object.prototype.hasOwnProperty.call(this.subHandler[i2],j)){this.eventSvr.unsubscribeEvent(this.subHandler[i2][j]);}}}}this.eventSvr._getHubAdapter(this.id).removeIframeHubContainer(this.id);if(this.windowManager){this.windowManager=null;}},update2:function(span){return;},_getParent:function(){if(!this.parent){this.parent=com.ibm.mm.iwidget.Utils.getWidgetParent(this.rootElement);}this.parent=this.parent||null;return this.parent;},_setParent:function(_b7c){this.parent=_b7c;},_getPublishedEvents:function(){var _b7d=this.getWidgetPublishedEvents();var arr={};if(dojo.isArray(_b7d)){for(var i=0,l=_b7d.length;i<l;i++){arr[_b7d[i].name]=_b7d[i];}}return arr;},_getHandledEvents:function(){var _b7e=this.getWidgetHandledEvents();var arr={};if(dojo.isArray(_b7e)){for(var i=0,l=_b7e.length;i<l;i++){arr[_b7e[i].name]=_b7e[i];}}return arr;},getWidgetPublishedEvents:function(){var _b7f=this._getPublicEvents();if(_b7f){var _b80={};_b80.isPublished="true";return _b7f.getEvents(_b80);}return null;},getWidgetHandledEvents:function(){var _b81=this._getPublicEvents();if(_b81){var _b82={};_b82.isHandled="true";return _b81.getEvents(_b82);}return null;},getWires:function(){return this.getIWidgetInstance().getWires();},handleEvent:function(_b83){var _b84=_b83.scope;if(_b84){if(_b84=="instance"){_b84=this.getIWidgetInstance();}else{if(_b84=="eventmodel"){_b84=this._getPublicEvents();}}}else{_b84=this;}var _b85=_b83.methodname;if(_b85&&_b84[_b85]&&dojo.isFunction(_b84[_b85])){_b84[_b85].apply(_b84,_b83.params);}},_handleOnModeChange:function(_b86){var _b87=false;var _b88=this.currentMode;if(!_b86){return false;}if(dojo.isString(_b86)){_b86=dojo.fromJson(_b86);}if(!_b86){return false;}var _b89=_b86.newMode||null;var _b8a=_b86.rootElementId||null;if(_b89!==null&&_b89==this.currentMode){return false;}if(_b89===null){return false;}var _b8b={};var _b8c=this.windowManager[this.currentMode];if(_b8c&&_b8c.main&&_b8a===null){_b8b.methodname="_handleOnModeChange";_b8b.params=[_b89];this.eventSvr._publishEvent("widgetevents."+this.id,_b8b);var _b8d={};_b8d.id=this.id;_b8d.oldMode=_b88;_b8d.newMode=_b89;this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_MODECHANGED,_b8d,this.hubId);return;}if(_b8c&&_b8c.main&&_b8a!==null){this._getInstanceMarkup(dojo.hitch(this,function(_b8e){_b8e=this._getInstanceMarkupForMode(_b8e,_b89);this._createIframe(_b8e,_b8a,this.id+"_"+_b89,"true",this);_b88=this.currentMode;this.currentMode=_b89;if(this._handleSaveMode){this._handleSaveMode();}this.windowManager[this.currentMode]={id:this.id+"_"+_b89,root:_b8a,active:true,main:false};_b8b.methodname="_handleOnModeUpdated";_b8b.params=[_b89];this.eventSvr._publishEvent("widgetevents."+this.id,_b8b);dojo.publish(iwConstants.EVENTS.modeChanged,[this.id,_b88,_b89]);_b86={};_b86.id=this.id;_b86.oldMode=_b88;_b86.newMode=_b89;this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_MODECHANGED,_b86,this.hubId);}));return;}var _b8f=this.windowManager[_b89];if(_b8f&&_b8f.main){_b8b={};_b8b.methodname="_handleOnModeChange";_b8b.params=[_b89];try{this.eventSvr._publishEvent("widgetevents."+this.id,_b8b);}catch(e1){console.log("catching exception!!!"+e1);}this.eventSvr._getHubAdapter(this.id).removeIframeHubContainer(this.id+"_"+this.currentMode);try{var x=this.id+"_"+this.currentMode;for(var j in this.subHandler[x]){if(Object.prototype.hasOwnProperty.call(this.subHandler[x],j)){this.eventSvr.unsubscribeEvent(this.subHandler[x][j]);}}}catch(e2){console.log("IWidgetWrapperStub:_handleOnModeChange unsubscribe exception:"+e2);}delete this.windowManager[this.currentMode];_b88=this.currentMode;this.currentMode=_b89;if(this._handleSaveMode){this._handleSaveMode();}dojo.publish(iwConstants.EVENTS.modeChanged,[this.id,_b88,_b89]);_b86={};_b86.id=this.id;_b86.oldMode=_b88;_b86.newMode=_b89;this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_MODECHANGED,_b86,this.hubId);}return;},commit:function(_b90){var _b91=this.getIWidgetInstance();var _b92=_b91.getAttributes();var _b93=_b91.getIDescriptorItems();var _b94=_b91.getWireModel();var _b95={};if(_b92&&_b92._isDirty()){_b95.attributes=_b92;}if(_b93&&_b93._isDirty()){_b95.idescriptors=_b93;}if(_b94&&_b94.isDirty()){_b95.wiremodel=_b94.toJson();}if(!_b90){this.eventSvr._publishEvent(this.eventSvr.WIDGETEVENT_PREFIX+this.id,{"methodname":"_handleDataSync","params":[_b95]},this.id);}if(_b92&&_b92._isDirty()){this._writePropertiesToDOM(this,"attributes",_b92);_b92._setDirty(false);}if(_b93&&_b93._isDirty()){this._writePropertiesToDOM(this,"idescriptor",_b93);_b93._setDirty(false);}if(_b94&&_b94.isDirty()){_b94.commit();}},getPublicEvent:function(name){var _b96=this._getPublicEvents();return _b96.find(name);},_getInstanceMarkupForMode:function(_b97,mode){var _b98=document.createElement("div");_b98.innerHTML=_b97;var root=_b98.firstChild;root.id=this.id;var _b99=dojo.query("span."+this.ns+"ItemSet[title=\""+iwConstants.IDESCRIPTOR+"\"]",root);var _b9a=null;if(_b99.length===0){_b9a=document.createElement("span");_b9a.className=this.ns+"ItemSet";_b9a.title=iwConstants.IDESCRIPTOR;_b9a.style.display="none";_b9a.style.visibility="hidden";root.appendChild(_b9a);}else{_b9a=_b99[0];}var _b9b=dojo.query("."+this.ns+"Item[href=\"#"+"mode"+"\"]",_b9a);for(var i=0,l=_b9b.length;i<l;i++){var item=_b9b[i];if(_b9a==item.parentNode){_b9a.removeChild(item);}}var _b9c=document.createElement("a");_b9c.className=this.ns+"Item";_b9c.style.visibility="hidden";_b9c.style.display="none";_b9c.href="#"+"mode";_b9c.appendChild(document.createTextNode(mode));_b9a.appendChild(_b9c);return _b98.innerHTML;},_createIframe:function(_b9d,root,id,_b9e,_b9f,_ba0){var that=_b9f;var _ba1=_b9f.getCSSUrl();_b9f.subHandler[id]=[];function eventCallback(_ba2){function eventCallbackContinue(_ba3){var _ba4=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var obj={"html":_ba3,"xml":that.widgetDef.widgetDef,"isModal":_b9e,"hubId":id,"cssUrl":_ba1,"navState":_ba4._state};if(_ba0){obj.stateData=_ba0;}if(!(_b9e&&_b9e=="false")){var _ba5=id.slice(0,id.lastIndexOf("_"));var _ba6=that.eventSvr._getHubAdapter().getContainer(_ba5,true);_ba5=_ba6.getIframe().id;obj.mainframeId=_ba5;}that.eventSvr._publishEvent(that.eventSvr.WIDGETEVENT_PREFIX+id+"."+"onWidgetLoading",obj);var _ba7=that.eventSvr.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+id,null,function(_ba8){if(_b9e=="false"){that.loaded=true;dojo.query("> ."+that.ns+"loading",that.rootElement).forEach(function(elem){com.ibm.mm.enabler.utils.Dom.destroyNode(elem);});dojo.query("."+that.currentMode,that.rootElement).style({"visibility":""});}});that.subHandler[id].push(_ba7);var _ba9=that.eventSvr.subscribeEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+"."+that.id,that,"handleSizeChanged");that.subHandler[id].push(_ba9);};if(_b9f.isLoaded()&&_b9e&&_b9e=="false"){_b9f.loaded=false;_b9f._getInstanceMarkup(eventCallbackContinue);}else{eventCallbackContinue(_b9d);}};var _baa=_b9f.eventSvr.subscribeEvent(_b9f.eventSvr.WIDGETEVENT_PREFIX+id+"."+"onFrameLoaded",null,eventCallback);_b9f.subHandler[id].push(_baa);var _bab=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var url=window.location.protocol;var host=window.location.hostname;var _bac=_bab.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SERVERDOMAIN);if(_bac&&_bac!="null"){host=_bac;}var port=window.location.port;var path=window.location.pathname;var _bad=_bab.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _bae=null;if(path.indexOf(_bad)>0){_bae=path.slice(0,path.indexOf(_bad));}if(_b9f._getSubDomain()){var _baf=_b9f._getSubDomain()+"."+host;if(_bab.getValue("sandbox.disable.subdomains")){_baf=host;}if(port!=""){url+="//"+_baf+":"+port;}else{url+="//"+_baf;}if(_bae){url+=_bae;}url+=_bab.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_ENABLER);url+="/widgetsandbox";_b9f.eventSvr._getHubAdapter().createIframeHubContainer(id,root,url,_b9e,null,null,dojo.hitch(this,"_onSecurityAlert"));}else{var _bb0=_b9f.eventSvr._getHubAdapter().getSubDomainSize();var _bb1=unescape(_b9f.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_bb1){_bb1=_b9f.getID();}var _bb2=_bab.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINREUSE);var fmt=_b9f.iwMessages.E_SUBDOMAIN_NOTAVAILABLE1_2;if(_bb2){fmt=_b9f.iwMessages.E_SUBDOMAIN_NOTAVAILABLE_2;}var _bb3=dojo.string.substitute(fmt,[_bb1,_bb0]);var _bb4=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+_b9f.ns+"loading",_b9f.rootElement,_bb4,false);if(_bb4.length>0){aNode=_bb4[0];aNode.innerHTML="";com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(aNode,"error",_bb3);}}},_onSecurityAlert:function(_bb5,_bb6){if(_bb6&&_bb6=="OpenAjax.hub.SecurityAlert.FramePhish"){var me=this;setTimeout(function(){me._handleIframeMove(_bb5);},0);}else{this.LOGGER.trace("_onSecurityAlert","securityAlert:"+_bb6);}},_handleIframeMove:function(_bb7){this.eventSvr._getHubAdapter(this.id).returnSubDomain(this._getSubDomain());var _bb8=this.windowManager[this.currentMode];var id=_bb8.id;var root=_bb8.root||null;if(root===null){var _bb9=this._getDefaultMode()||iwConstants.mode_view;var _bba=this.windowManager[_bb9]||null;if(_bba!==null){root=_bba.root||null;}}try{for(var j in this.subHandler[id]){if(Object.prototype.hasOwnProperty.call(this.subHandler[id],j)){this.eventSvr.unsubscribeEvent(this.subHandler[id][j]);}}}catch(e){this.LOGGER.trace("_handleIframeMove","FramePHishing"+" error:"+e.message);}this.eventSvr._getHubAdapter(id).removeIframeHubContainer(id);this._getInstanceMarkup(dojo.hitch(this,function(_bbb){this._createIframe(_bbb,root,id,"false",this);}));},_getSubDomain:function(){if(!this.subDomain){this.subDomain=this.eventSvr._getHubAdapter().getSubDomain();}return this.subDomain;},_handleDataSync:function(_bbc){if(_bbc&&_bbc.attributes){var _bbd=_bbc.attributes;this._syncModifiableProperties(_bbd,this.getIWidgetInstance().getAttributes());this._syncAttributes(_bbd,this.getAttributes());}if(_bbc&&_bbc.wiremodel){var _bbe=_bbc.wiremodel;this._syncWireModel(_bbe,this.getIWidgetInstance().getWireModel());}this.commit(true);},_syncWireModel:function(_bbf,_bc0){var _bc1=_bbf._wires;for(var i in _bc1){if(Object.prototype.hasOwnProperty.call(_bc1,i)){var _bc2=_bc1[i];if(_bc2._isDirty&&_bc2._type&&_bc2._type=="NEW"){_bc0.addWire(_bc2.SourceWidget,_bc2.SourceEvent,_bc2.TargetEvent);}else{if(_bc2._isDirty&&_bc2._type&&_bc2._type=="DELETE"){_bc0.removeWire(_bc2.SourceWidget,_bc2.SourceEvent,_bc2.TargetEvent);}}}}var _bc3=_bbf._targets;_bc0._targets=_bc3;},_syncModifiableProperties:function(_bc4,_bc5){_bc5._updateProperties(_bc4);},_syncAttributes:function(_bc6,_bc7){var _bc8="newItem";var _bc9="updatedValue";var _bca="removedItem";for(var att in _bc6){if(Object.prototype.hasOwnProperty.call(_bc6,att)){var item=_bc6[att];if(item._dirty){if(item._change.changeType==_bca){_bc7.removeItem(item.id);}else{_bc7.setItemValue(item.id,item.value,item.readOnly);}}}}_bc7.commit();},handleSizeChanged:function(_bcb){var _bcc=this.windowManager[this.currentMode];var id=this.id;if(!_bcc.main){id=this.id+"_"+this.currentMode;}var root=_bcc.root;var _bcd=root.childNodes[0];if(_bcb.newWidth){var _bce=parseInt(_bcb.newWidth,10);_bce=_bce-5;dojo.style(_bcd,"width",_bce+"px");}if(_bcb.newHeight){var _bcf=parseInt(_bcb.newHeight,10);_bcf=_bcf-5;dojo.style(_bcd,"height",_bcf+"px");}this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+id,_bcb);},getCSSUrl:function(){var that=this;if(this.themeCSS){return this.themeCSS;}dojo.forEach(document.getElementsByTagName("link"),function(_bd0){if(_bd0.href&&_bd0.href.indexOf("theme.css")!=-1){var _bd1=_bd0.href.length-9;if(_bd0.href.indexOf("theme.css")==_bd1){that.themeCSS=_bd0.href;}}else{if(_bd0.href&&_bd0.href.indexOf("theme_rtl.css")!=-1){var _bd2=_bd0.href.length-13;if(_bd0.href.indexOf("theme_rtl.css")==_bd2){that.themeCSS=_bd0.href;}}}});return this.themeCSS;},_handleOnNavStateChanged:function(_bd3){var _bd4=_bd3.payload;if(_bd4){var _bd5=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _bd6=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_bd5,this.id);_bd6.setWidgetState("cp",_bd4);var _bd7=_bd5.commit();_bd7.start();}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.RenderController"]){dojo._hasResource["com.ibm.mm.iwidget.RenderController"]=true;dojo.provide("com.ibm.mm.iwidget.RenderController");dojo.declare("com.ibm.mm.iwidget.RenderController",null,{constructor:function(_bd8){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.widgetwrapper=_bd8;this.widgetXMLUrl=this.widgetwrapper.getIWidgetInstance().widgetXMLUrl;this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");this.iwMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");},render:function(){this._loadWidgetDefinition();},_resourceBaseURL:dojo.moduleUrl("com.ibm.mm.iwidget","image/"),_setLoading:function(){var _bd9=document.createElement("div");_bd9.className=this.widgetwrapper.ns+"loading";if(ibmConfig&&ibmConfig.loadingHTML){_bd9.innerHTML=ibmConfig.loadingHTML;}else{if(ibmConfig&&ibmConfig["loadingHTML.imageURL"]){_bd9.innerHTML="<img alt='"+this.iwStr.LOAD+"' src='"+ibmConfig["loadingHTML.imageURL"]+"' />&nbsp;"+this.iwStr.LOAD;}else{_bd9.innerHTML="<img alt='"+this.iwStr.LOAD+"' src='"+this._resourceBaseURL+"progress-anim.gif' />&nbsp;"+this.iwStr.LOAD;}}this.widgetwrapper.rootElement.appendChild(_bd9);},_loadWidgetDefinition:function(){var _bda="_loadWidgetDefinition";var _bdb=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_bdb){this.LOGGER.entering(_bda,arguments);}var _bdc=this.widgetwrapper.rootElement;if(this.widgetwrapper.loaded){return false;}this._setLoading();if(this.widgetXMLUrl!==null){var _bdd=com.ibm.mashups.services.ServiceManager.getService("widgetLoadService");_bdd.getWidgetXML(this.widgetXMLUrl,false,dojo.hitch(this,"handleWidgetInfoRetrieved"),this.widgetwrapper.id);}else{return false;}if(_bdb){this.LOGGER.exiting(_bda,true);}return true;},handleWidgetInfoRetrieved:function(data,_bde,xhr){var _bdf="handleWidgetInfoRetrieved";var _be0=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_be0){this.LOGGER.entering(_bdf,arguments);}var _be1;if(_bde=="200"||_bde=="0"){this.widgetwrapper.setIWidgetDefinition(data);this.widgetDef=data;}else{if(!this._isWidgetInstalled()){this._handleInlineWidgetNotInstalledMessage(this.iwStr.WIDGET_NOT_INSTALLED,this.iwStr.WIDGET_NOT_INSTALLED_SUB,data.message);}else{_be1=unescape(this.widgetwrapper.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_be1){_be1=this.widgetXMLUrl;}this._handleInlineMessage("error",dojo.string.substitute(this.iwMessages.E_IWIDGETDEF_NOTAVAILABLE_1,[_be1]),data.message);}return;}var _be2=this.isSandboxed();if(dojo.isIE<7&&_be2){_be1=unescape(this.widgetwrapper.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_be1){_be1=this.widgetXMLUrl;}this._handleInlineMessage("error",dojo.string.substitute(this.iwMessages.E_NODISPLAY_UNSECUREWIDGET_1,[_be1]));return;}this._doRender(_be2);if(_be0){this.LOGGER.exiting(_bdf);}},_isWidgetInstalled:function(){try{var _be3=com.ibm.mashups.enabler.catalog.Factory.getCatalogCategoryModel();_be3.setStrategy(new com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy(25));var _be4=null;var _be5=null;var _be6=_be3.getRoot().start();var _be7=_be3.getChildren(_be6);while(_be7.hasNext()){var _be8=_be7.next();_be4=_be3.getCatalogEntryModel(_be8);var _be9=_be4.iterator();_be9.setCursorPosition(0);while(_be9.hasNext()){var _bea=_be9.next();var _beb=decodeURIComponent(this.widgetXMLUrl);if(_beb.indexOf(_bea.getDefinitionURL(false))>=0){return true;}}}}catch(e){return true;}return false;},isSandboxed:function(){var _bec=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _bed=_bec.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SANDBOXENABLED);if(!_bed){return false;}var _bee=document.location+"";_bed=false;var _bef=this.widgetDef.getAttributes()||null;if(_bef){var _bf0=_bef.getItemValue("sandbox");if(typeof _bf0!="undefined"&&_bf0!==null){if(_bf0=="true"){_bed=true;}}}if(!_bed){if(this.widgetwrapper.rootElement.getAttribute("sandbox")!==null&&this.widgetwrapper.rootElement.getAttribute("sandbox")=="true"){_bed=true;}}if(!_bed){if(this.widgetwrapper.rootElement.className.indexOf(iwConstants.CSSCLASS_INSTANCE.iwSandbox)>0){_bed=true;}}if(_bed){if(this._isSandboxDisabledWidget(this.widgetXMLUrl)){_bed=false;}}return _bed;},_isSandboxDisabledWidget:function(_bf1){var _bf2=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var temp=_bf2.getValue(com.ibm.mashups.enabler.services.ConfigConstants.WIDGETDEFID_SANDBOX_DISABLED);var _bf3=temp;if(dojo.isString(_bf3)){_bf3=[temp];}if(_bf3.length===0){return false;}for(var i=0;i<_bf3.length;i++){if(dojo.string.trim(_bf1)===dojo.string.trim(_bf3[i])){return true;}else{if(dojo.string.trim(_bf1).indexOf(dojo.string.trim(_bf3[i]))!=-1&&dojo.string.trim(_bf3[i]).indexOf("/")!==0){return true;}else{if(dojo.string.trim(_bf1).indexOf(dojo.string.trim(_bf3[i]))!=-1&&dojo.string.trim(_bf3[i]).indexOf("/")===0&&dojo.string.trim(_bf1).indexOf(":")!=-1){var buf=_bf1.split("//");var _bf4=buf[0];var buf2=buf[1].split("/");var host=buf2[0];if(_bf4==window.location.protocol&&window.location.host==host){return true;}else{if(_bf4==window.location.protocol&&_bf4=="http:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="80"){return true;}}else{if(_bf4==window.location.protocol&&_bf4=="https:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="443"){return true;}}}}}}}}return false;},_handleInlineMessage:function(type,_bf5,_bf6){var _bf7=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.widgetwrapper.ns+"loading",this.widgetwrapper.rootElement,_bf7,false);var _bf8=_bf7[0];_bf8.innerHTML="";com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(_bf8,type,_bf5,_bf6);},_handleInlineWidgetNotInstalledMessage:function(_bf9,_bfa,_bfb){var _bfc=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.widgetwrapper.ns+"loading",this.widgetwrapper.rootElement,_bfc,false);var _bfd=_bfc[0];var msg=[];msg[msg.length]="<div style=\"margin:15px\">";msg[msg.length]="<div class=\"widgetNotInstalledImage\">";msg[msg.length]="</div>";msg[msg.length]="<div class=\"widgetNotInstalledText\">";msg[msg.length]=_bf9;msg[msg.length]="</div>";if(_bfa&&_bfa.length>0){msg[msg.length]="<div class=\"widgetNotInstalledSubText\">";msg[msg.length]=_bfa;msg[msg.length]="</div>";}msg[msg.length]="</div>";_bfd.innerHTML=msg.join("");com.ibm.mm.enabler.logging.LegacyLogger._publishStatusMsg("info",_bf9,_bfb);},_doRender:function(_bfe){var _bff=com.ibm.mashups.services.ServiceManager.getService("eventService");if(_bfe){dojo.mixin(this.widgetwrapper,new com.ibm.mm.iwidget.widget.IWidgetWrapperStubImpl());}else{_bff._getHubAdapter().createInlineHubContainer(this.widgetwrapper.id);_bff._getHubAdapter().createInlineHubClient(this.widgetwrapper.id);}this.widgetwrapper.doRender();}});}if(!dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModelExtended"]){dojo._hasResource["com.ibm.mm.iwidget.model.WidgetModelExtended"]=true;dojo.provide("com.ibm.mm.iwidget.model.WidgetModelExtended");dojo.declare("com.ibm.mm.iwidget.model.WidgetModelExtendedImpl",com.ibm.mm.iwidget.model.WidgetModelDefaultImpl,{_onWindowUnload:function(){var _c00=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();if(_c00){var _c01=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageModeAccessor(_c00);_c01.setPageMode("unload");}try{var arr=[];for(var i in this.widgetArr){if(Object.prototype.hasOwnProperty.call(this.widgetArr,i)){this._unloadWidget(i);}}}catch(e){console.log("_onWindowUnload "+e.message);}},renderWidget:function(_c02){if(typeof _c02=="undefined"){return;}if(_c02.loaded||_c02.loading){return;}_c02.loading=true;var _c03=new com.ibm.mm.iwidget.RenderController(_c02);_c03.render();},getWidgetById:function(id){return this.find(id);}});com.ibm.mm.iwidget.model.WidgetModelImpl=com.ibm.mm.iwidget.model.WidgetModelExtendedImpl;}if(!dojo._hasResource["com.ibm.mm.iwidget.services.EventServiceExtended"]){dojo._hasResource["com.ibm.mm.iwidget.services.EventServiceExtended"]=true;dojo.provide("com.ibm.mm.iwidget.services.EventServiceExtended");dojo.declare("com.ibm.mm.iwidget.services.EventServiceExtendedImpl",com.ibm.mm.iwidget.services.EventServiceDefaultImpl,{registerExtServices:function(){var _c04=com.ibm.mashups.iwidget.Constants.WIDGET_WINDOWSTATECHANGED;var me=this;var _c05=function(_c06){var _c07=_c06.id;var _c08=_c06.newWindowState;var _c09=_c06.oldWindowState;me.fireEvent(_c07,"onWindowStateChanged",{newWindowState:_c08,oldWindowState:_c09});};this.subscribeEvent(_c04,null,_c05,null,null);},subscribeWire:function(_c0a,_c0b,_c0c,_c0d){if(this.bIsLoggable){this.LOGGER.entering("eventService.subscribeWire",[_c0a,_c0b,_c0c,_c0d]);}if(typeof _c0a=="undefined"||_c0a===null){return false;}if(typeof _c0b=="undefined"||_c0b===null){return false;}if(typeof _c0c=="undefined"||_c0c===null){return false;}if(typeof _c0d=="undefined"||_c0d===null){return false;}var rc=true;var that=this;function eventCallback(_c0e,_c0f,_c10){that.fireEvent(_c0c,_c0d,_c0f.payload,_c0f.payloadType,_c0a);};function callback(item,_c11,_c12){if(!_c11){console.log("eventService.subscribeWire subscribe failed "+"source:"+_c0a+" sourceEvent:"+_c0b+" targetWidget:"+_c0c+" targetEvent:"+_c0d);}};var _c13;var _c14=this.hubAdapter._getInlineHubClient(_c0c);if(_c14){var _c15=this._generateWireId(_c0a,_c0b,_c0c,_c0d);if(this.subMgr[_c15]){return true;}var _c16=_c14.subscribe(this.WIDGETEVENT_PREFIX+_c0a+"."+_c0b,eventCallback,null,callback);this.subMgr[_c15]=_c16;_c13={};_c13.targetWidget=_c0c;_c13.sourceEvent=_c0b;_c13.sourceWidget=_c0a;_c13.targetEvent=_c0d;this.fireEvent(_c0a,"onNewWire",_c13);}var _c17=this.hubAdapter.isInlineClient(_c0c);if(!_c17){var _c18="eventservice."+_c0c;_c13={};_c13.methodname="subscribeWire";_c13.sourceWidget=_c0a;_c13.sourceEvent=_c0b;_c13.targetWidget=_c0c;_c13.targetEvent=_c0d;_c13.hubclient="main";this._publishEvent(_c18,_c13);rc=true;}return rc;},publishWire:function(_c19,_c1a,_c1b,_c1c){_c1b=this._serializePayload(_c1b);if(this.bIsLoggable){this.LOGGER.entering("eventService.publishWire",[_c19,_c1a,_c1b,_c1c]);}if(typeof _c19=="undefined"||_c19===null){return false;}if(typeof _c1a=="undefined"||_c1a===null){return false;}var _c1d=this.hubAdapter._getInlineHubClient(_c19);if(_c1d){_c1d.publish(this.WIDGETEVENT_PREFIX+_c19+"."+_c1a,{"payload":_c1b,"payloadType":_c1c});}return true;},_serializePayload:function(_c1e){if(typeof _c1e=="object"&&_c1e.toJson){_c1e=_c1e.toJson();}return _c1e;},unSubscribeWire:function(_c1f,_c20,_c21,_c22){if(typeof _c1f=="undefined"||_c1f===null){return false;}if(typeof _c20=="undefined"||_c20===null){return false;}if(typeof _c21=="undefined"||_c21===null){return false;}if(typeof _c22=="undefined"||_c22===null){return false;}var _c23;var _c24=this.hubAdapter._getInlineHubClient(_c21);if(_c24){var _c25=this._generateWireId(_c1f,_c20,_c21,_c22);var _c26=this.subMgr[_c25];if(_c26){this.unsubscribeEvent(_c26,_c21);delete this.subMgr[_c25];}_c23={};_c23.targetWidget=_c21;_c23.targetEvent=_c22;_c23.sourceWidget=_c1f;_c23.sourceEvent=_c20;this.fireEvent(_c21,"onRemoveWire",_c23);this.fireEvent(_c1f,"onRemoveWire",_c23);this.publishEvent(iwConstants.EVENTS.unSubscribeWire,{wires:[_c23]});}var _c27=this.hubAdapter.isInlineClient(_c21);if(!_c27){var _c28="eventservice."+_c21;_c23={};_c23.methodname="unSubscribeWire";_c23.sourceWidget=_c1f;_c23.sourceEvent=_c20;_c23.targetWidget=_c21;_c23.targetEvent=_c22;_c23.hubclient="main";this._publishEvent(_c28,_c23);rc=true;}return true;},addWire:function(_c29,_c2a,_c2b,_c2c){if(this.bIsLoggable){this.LOGGER.entering("eventService.addWire",[_c29,_c2a,_c2b,_c2c]);}if(typeof _c29=="undefined"||_c29===null){return false;}if(typeof _c2a=="undefined"||_c2a===null){return false;}if(typeof _c2b=="undefined"||_c2b===null){return false;}if(typeof _c2c=="undefined"||_c2c===null){return false;}var rc=false;var _c2d=this.hubAdapter.isInlineClient(_c2b);if(!_c2d){var _c2e="eventservice."+_c2b;var _c2f={};_c2f.methodname="addWire";_c2f.params=arguments;_c2f.hubclient="main";this._publishEvent(event,_c2f);rc=true;}else{rc=this.subscribeWire(_c29,_c2a,_c2b,_c2c);if(rc){var _c30=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(_c2b);if(typeof _c30!="undefined"&&_c30!==null){var _c31={};_c31.SourceWidget=_c29;_c31.SourceEvent=_c2a;_c31.TargetEvent=_c2c;var _c32=_c30.getIWidgetInstance();var _c33=new com.ibm.mm.iwidget.widget.WireImpl(_c2b,_c31);_c32._addWire(_c33);}}}return rc;},removeWire:function(_c34,_c35,_c36,_c37){if(this.bIsLoggable){this.LOGGER.entering("eventService.removeWire",[_c34,_c35,_c36,_c37]);}if(typeof _c34=="undefined"||_c34===null){return false;}if(typeof _c35=="undefined"||_c35===null){return false;}if(typeof _c36=="undefined"||_c36===null){return false;}if(typeof _c37=="undefined"||_c37===null){return false;}var rc=false;var _c38=this.hubAdapter.isInlineClient(_c36);if(!_c38){var _c39="eventservice."+_c36;var _c3a={};_c3a.methodname="removeWire";_c3a.params=arguments;_c3a.hubclient="main";this._publishEvent(event,_c3a);rc=true;}else{rc=this.unSubscribeWire(_c34,_c35,_c36,_c37);if(rc){var _c3b=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(_c36);if(typeof _c3b!="undefined"&&_c3b!==null){var _c3c={};_c3c.SourceWidget=_c34;_c3c.SourceEvent=_c35;_c3c.TargetEvent=_c37;var _c3d=_c3b.getIWidgetInstance();var _c3e=new com.ibm.mm.iwidget.widget.WireImpl(_c36,_c3c);_c3d._removeWire(_c3e.getID());}}}return rc;}});if(!ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.iwidget.services.EventServiceExtendedImpl");}if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.services.EventServiceModel");}}if(!dojo._hasResource["com.ibm.mm.iwidget.services.IFrameEventServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.IFrameEventServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.IFrameEventServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.IFrameEventServiceImpl",com.ibm.mashups.iwidget.services.EventService,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.subMgr={};this.eventQueue=[];this._hubClient=null;this.getHubClient();this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},getType:function(){return com.ibm.mm.iwidget.Constants.eventservice.type.IFRAME;},PREFIX_IFRAME:"_iframe_",getHubClient:function(){if(this._hubClient){return this._hubClient;}var that=this;function onHubClientSecurityAlert(_c3f,_c40){if(that.bIsLoggable){that.LOGGER.trace("onHubClientSecurityAlert","security alert from "+_c3f.getClientID());}};var _c41=new OpenAjax.hub.IframeHubClient({HubClient:{onSecurityAlert:onHubClientSecurityAlert}});function onHubClientConnect2(_c42,_c43,_c44){if(!_c43){if(that.bIsLoggable){that.LOGGER.trace("onHubClientConnect2","!! client connection error = id: '"+_c42.getClientID()+"' msg: '"+_c44);}}var id=_c42.getClientID();id=id.slice(8);that.setId(id);that._hubClient=_c42;that._subscribeEventService();for(var i in that.eventQueue){if(Object.prototype.hasOwnProperty.call(that.eventQueue,i)){var args=that.eventQueue[i];args[0]="widgetevents."+id+args[0];that._subscribeEvent.apply(that,args);}}};function onHubClientDisconnect(_c45,_c46,_c47){if(!_c46){if(that.bIsLoggable){that.LOGGER.trace("onHubClientDisconnect2","!! client disconnection error = id: '"+_c45.getClientID()+"' msg: '"+_c47);}}_c45.connect(onHubClientConnect2);};_c41.connect(onHubClientConnect2);return null;},disconnectHubClient:function(){if(!this._hubClient){return;}this._hubClient.disconnect();this._hubClient=null;},setId:function(id){this.id=id;},getId:function(){return this.id;},_subscribeEventService:function(){var that=this;function eventCallback(_c48,_c49,_c4a){var _c4b=_c49.methodname;if((_c4b=="subscribeWire")||(_c4b=="unSubscribeWire")){var fn=that[_c49.methodname];if(fn){fn.apply(that,[_c49.sourceWidget,_c49.sourceEvent,_c49.targetWidget,_c49.targetEvent]);}}else{if(_c4b){var fn=that[_c49.methodname];if(fn){fn.apply(that,_c49.params);}}}};this._hubClient.subscribe("eventservice."+this.getId(),eventCallback,this,this._subscribeCallback);},_subscribeCallback:function(_c4c,_c4d,_c4e){if(!_c4d){}},WIDGETEVENT_PREFIX:iwConstants.WIDGETEVENT_PREFIX,WILDCARD_PREFIX:iwConstants.WILDCARD_PREFIX,subscribeWire:function(_c4f,_c50,_c51,_c52){var _c53="subscribeWire";var _c54=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_c54){this.LOGGER.entering(_c53,arguments);}if(typeof _c4f=="undefined"||_c4f===null){return false;}if(typeof _c50=="undefined"||_c50===null){return false;}if(typeof _c51=="undefined"||_c51===null){return false;}if(typeof _c52=="undefined"||_c52===null){return false;}var rc=true;var that=this;function eventCallback(_c55,_c56,_c57){that.fireEvent(_c51,_c52,_c56.payload,_c56.payloadType,_c4f);};function callback(item,_c58,_c59){if(!_c58){if(that.bIsLoggable){that.LOGGER.trace("subscribeWire","eventService.subscribeWire subscribe failed "+"source:"+_c4f+" sourceEvent:"+_c50+" targetWidget:"+_c51+" targetEvent:"+_c52);}}};var _c5a=this._hubClient.subscribe(this.WIDGETEVENT_PREFIX+_c4f+"."+_c50,eventCallback,null,callback);var _c5b=this._generateWireId(_c4f,_c50,_c51,_c52);this.subMgr[_c5b]=_c5a;var _c5c={};_c5c.targetWidget=_c51;_c5c.sourceEvent=_c50;_c5c.sourceWidget=_c4f;_c5c.targetEvent=_c52;this.fireEvent(_c4f,"onNewWire",_c5c);return rc;},publishWire:function(_c5d,_c5e,_c5f,_c60){_c5f=this._serializePayload(_c5f);if(typeof _c5d=="undefined"||_c5d===null){return false;}if(typeof _c5e=="undefined"||_c5e===null){return false;}this._hubClient.publish(this.WIDGETEVENT_PREFIX+_c5d+"."+_c5e,{"payload":_c5f,"payloadType":_c60});return true;},_serializePayload:function(_c61){if(typeof _c61=="object"&&_c61.toJson){_c61=_c61.toJson();}return _c61;},unSubscribeWire:function(_c62,_c63,_c64,_c65){if(typeof _c62=="undefined"||_c62===null){return false;}if(typeof _c63=="undefined"||_c63===null){return false;}if(typeof _c64=="undefined"||_c64===null){return false;}if(typeof _c65=="undefined"||_c65===null){return false;}var _c66=this._generateWireId(_c62,_c63,_c64,_c65);var _c67=this.subMgr[_c66];if(_c67){this._unsubscribeEvent(_c67,_c65);delete this.subMgr[_c66];}var _c68={};_c68.targetWidget=_c64;_c68.targetEvent=_c65;_c68.sourceWidget=_c62;_c68.sourceEvent=_c63;this.fireEvent(_c64,"onRemoveWire",_c68);this.fireEvent(_c62,"onRemoveWire",_c68);this._publishEvent(iwConstants.EVENTS.unSubscribeWire,{wires:[_c68]});},fireEvent:function(_c69,_c6a,_c6b,_c6c,_c6d){var _c6e=new com.ibm.mm.iwidget.IEventImpl(_c6a,_c6c,_c6b,_c6d);var _c6f=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _c70=_c6f.find(_c69);if(typeof _c70!="undefined"&&_c70!==null){if(_c70.isLoaded()){_c70.handleEvent(_c6e);}else{var _c71=dojox.uuid.generateRandomUuid();var cb=function(_c72,_c73,_c74){_c73.handleEvent(_c74);var _c75=_c72.subMgr[_c71];if(_c75){_c72._unsubscribeEvent(_c75);}};var _c76=this._subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_c70.id,null,dojo.partial(cb,this,_c70,_c6e));this.subMgr[_c71]=_c76;}}else{var _c77={};_c77.methodname="fireEvent";_c77.hubclient=this.getId();_c77.params=[_c69,_c6a,_c6b,_c6c];this._publishEvent("eventservice.main",_c77);}},publishEvent:function(_c78,_c79,_c7a,_c7b){return;},_publishEvent:function(_c7c,_c7d,_c7e){if(typeof _c7d=="undefined"||_c7d===null){this._hubClient.publish(_c7c,"");}else{this._hubClient.publish(_c7c,_c7d);}},broadcastEvent:function(_c7f,_c80,_c81,_c82,_c83,_c84){return;},broadcastEvents:function(_c85,_c86,_c87,_c88){return;},_handleBroadcastEventsCache:function(){var _c89={};_c89.methodname="_handleBroadcastEventsCache";_c89.hubclient=this.getId();_c89.params=[];this._publishEvent("eventservice.main",_c89);},subscribeEvent:function(_c8a,_c8b,_c8c,_c8d,_c8e){return;},_subscribeEvent:function(_c8f,_c90,_c91,_c92,_c93){if(!this._hubClient){this.eventQueue.push(arguments);return;}var _c94=this._hubClient.subscribe(_c8f,function(_c95,data,_c96){if(_c90&&_c91){_c91=dojo.hitch(_c90,_c91);}if(_c91){_c91.apply(this,[data]);}},null,function(_c97,_c98,_c99){if(_c90&&_c92){_c92=dojo.hitch(_c90,_c92);}if(_c92){_c92.apply(this,[_c97,_c98,_c99]);}if(!_c98){return;}});return _c94;},_unsubscribeEvent:function(_c9a,_c9b){if(!_c9a){return;}this._hubClient.unsubscribe(_c9a);},unsubscribeEvent:function(_c9c,_c9d){return;},_generateWireId:function(_c9e,_c9f,_ca0,_ca1){return _c9e+"_"+_c9f+"_"+_ca0+"_"+_ca1;}});if(ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.iwidget.services.IFrameEventServiceImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl",com.ibm.mm.iwidget.widget.IWidgetDefinitionDefaultImpl,{getResources:function(){if(!this.resources){this.resources=dojo.map(this.widgetDef.resources,function(_ca2){return new com.ibm.mm.iwidget.widget.ResourceImpl(_ca2);});}return this.resources;},getPublishedEventsNames:function(){var _ca3=[];if(this.widgetDef.publicEvents){com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(temp,_ca4){if(!temp.isPublished||(temp.isPublished&&temp.isPublished=="true")){_ca3.push(_ca4);}});}return _ca3;},getHandledEventsNames:function(){var _ca5=[];if(this.widgetDef.publicEvents){com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(temp,_ca6){if(temp.onEvent){_ca5.push(_ca6);}});}return _ca5;},getPublishedEvent:function(_ca7){if(!this.widgetDef.publicEvents){return null;}var _ca8=this.getPublicEvent(_ca7)||null;if(_ca8){if(!_ca8.isPublished||(_ca8.isPublished&&_ca8.isPublished=="false")){_ca8=null;}}return _ca8;},getHandledEvent:function(_ca9){if(!this.widgetDef.publicEvents){return null;}var _caa=this.getPublicEvent(_ca9)||null;if(_caa){if(!_caa.onEvent){_caa=null;}}return _caa;},getPublicEvent:function(_cab){if(!this.widgetDef.publicEvents){return null;}if(this.eventsCache&&this.eventsCache[_cab]){return new com.ibm.mm.iwidget.IEventDescriptionImpl(this.eventsCache[_cab]);}var data=this.widgetDef.publicEvents[_cab];var _cac=null;var obj={};if(data){obj.name=data.id;if(data.onEvent){obj.handlingFn=data.onEvent;obj.isHandled=true;}else{obj.isHandled=false;}obj.isPublished=!!data.isPublished;obj.attributes={};obj.localizedAttributes={};var _cad=null;com.ibm.mm.enabler.utils.Misc.forIn(data,function(d,i){if(i=="description"){_cad=d;}else{if(i!="id"&&i!="onEvent"){obj.attributes[i]=d;}}});var _cae=null;if(_cad){_cae=this._getEventDescription(_cad)||null;if(_cae){var _caf=_cae.lang;if(!_caf){_caf=this.getDefaultLanguage();if(!_caf){_caf="en";}}obj.lang=_caf;if(_cae.payloadType){obj.type=_cae.payloadType;}if(_cae.aliases){obj.attributes.aliases=_cae.aliases;}var _cb0=_cae.descriptions;if(_cb0){obj.localizedAttributes=_cae.descriptions;}if(typeof (obj.localizedAttributes[_caf])=="undefined"){obj.localizedAttributes[_caf]={};}if(_cae.title){obj.localizedAttributes[_caf].title=_cae.title;}if(_cae.description){obj.localizedAttributes[_caf].description=_cae.description;}if(_cae.descriptionURI){obj.localizedAttributes[_caf].descriptionURI=_cae.descriptionURI;}}}if(!this.eventsCache){this.eventsCache={};}this.eventsCache[_cab]=obj;_cac=new com.ibm.mm.iwidget.IEventDescriptionImpl(obj);}return _cac;},_getEventDescription:function(id){var _cb1=null;if(this.widgetDef.eventDescriptions){_cb1=this.widgetDef.eventDescriptions[id];}return _cb1;},_getPublicEvents:function(){var _cb2={};com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(k,_cb3){var _cb4=this.getPublicEvent(_cb3)||null;if(_cb4){_cb2[_cb3]=_cb4;}},this);return _cb2;},getWidgetPublishedEvents:function(){return this.getPublishedEvents();},getWidgetHandledEvents:function(){return this.getHandledEvents();},getPublishedEvents:function(){var _cb5=[];dojo.forEach(this.getPublishedEventsNames(),function(_cb6){var _cb7=this.getPublicEvent(_cb6)||null;if(_cb7){_cb5.push(_cb7);}},this);return _cb5;},getHandledEvents:function(){var _cb8=[];dojo.forEach(this.getHandledEventsNames(),function(_cb9){var _cba=this.getPublicEvent(_cb9)||null;if(_cba){_cb8.push(_cba);}},this);return _cb8;},getPayloadDefs:function(){return this.widgetDef.payloadDefs;},getPayloadDef:function(name){var _cbb=this.widgetDef.payloadDefs[name];return (typeof _cbb=="undefined")?null:_cbb;},getPayloadDefNames:function(){var arr=[];com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.payloadDefs,function(a){arr.push(a);});return arr;},_getShareableItemSets:function(){var _cbc=this.widgetDef.shareableItemSetsArr;if(_cbc){for(var i in _cbc){if(Object.prototype.hasOwnProperty.call(_cbc,i)){return _cbc;}}}return null;},toSpecObject:function(){if(this.specObject){return this.specObject;}var _cbd={};if(!this.xmlStr){return _cbd;}var _cbe=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var expr="/iw:iwidget";var _cbf=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_cbe,this.namespaces);if(_cbf){this._addAttributesToJson(_cbf,_cbd);var _cc0=[];_cc0.push({elementName:"eventDescription",keyNames:["id"]});_cc0.push({elementName:"alt",keyNames:["lang","xml:lang"]});this._addElements(_cbf,_cc0,_cbd);_cc0=[];_cc0.push({elementName:"event",keyNames:["id"]});this._addElements(_cbf,_cc0,_cbd);_cc0=[];_cc0.push({elementName:"itemSet",keyNames:["id"]});_cc0.push({elementName:"item",keyNames:["id"]});_cc0.push({elementName:"alt",keyNames:["lang","xml:lang"]});this._addElements(_cbf,_cc0,_cbd);_cc0=[];_cc0.push({elementName:"resource",keyNames:["uri","src"],elemsAsAtt:["skipLoad"]});this._addElements(_cbf,_cc0,_cbd);_cc0=[];_cc0.push({elementName:"content",keyNames:["mode"]});this._addElements(_cbf,_cc0,_cbd,true);}this.specObject=_cbd;return _cbd;},_addAttributesToJson:function(node,_cc1){dojo.forEach(node.attributes,function(att){_cc1["_"+att.nodeName.replace(":","_")]=att.nodeValue;});},_addElements:function(node,_cc2,_cc3,_cc4){if(!dojo.isArray(_cc2)||_cc2.length===0){return;}var _cc5=_cc2[0].elementName;var _cc6=_cc2[0].keyNames;var _cc7=_cc2[0].elemsAsAtt;var _cc8=null;var _cc9=null;if(_cc2.length>1){_cc8=_cc2[1].elementName;_cc9=_cc2[1].keyNames;}var _cca=_cc3[_cc5+"s"]={};var _ccb=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("iw:"+_cc5,node,this.namespaces);if(_ccb){dojo.forEach(_ccb,function(node){var _ccc;for(var j=0,kL=_cc6.length;j<kL;j++){_ccc=node.getAttribute(_cc6[j]);if(_ccc){break;}}if(_ccc){var _ccd=_cca[_ccc]={};this._addAttributesToJson(node,_ccd);if(_cc7){dojo.forEach(_cc7,function(_cce){var _ccf="_"+_cce;if(!(_ccf in _ccd)||!_ccd[_ccf]){var _cd0=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("iw:"+_cce,node,this.namespaces);if(_cd0){dojo.forEach(_cd0.childNodes,function(_cd1){if(_cd1.nodeType==4&&_cd1.nodeValue){_ccd[_ccf]=_cd1.nodeValue;}});}}},this);}if(_cc8){var _cd2=_cc2.slice(1);this._addElements(node,_cd2,_ccd);}if(_cc4){_ccd.value=dojo.map(node.childNodes||[],function(_cd3){return (_cd3.nodeType===4||_cd3.nodeType===3)?_cd3.nodeValue:"";}).join("");}}},this);}}});com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl=com.ibm.mm.iwidget.widget.IWidgetDefinitionExtendedImpl;}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.WireProviderFactoryService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.WireProviderFactoryService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.WireProviderFactoryService_API");dojo.provide("com.ibm.mashups.iwidget.services.WireProviderFactoryService");dojo.declare("com.ibm.mashups.iwidget.services.WireProviderFactoryService",null,{SERVICE_NAME:"WireProviderFactoryService",createWireProvider:function(_cd4,_cd5){},setFactory:function(_cd6,_cd7){},removeFactory:function(_cd8){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.WireProviderFactoryService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.WireProviderFactoryService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.WireProviderFactoryService");com.ibm.mashups.iwidget.services.WireProviderFactoryService.SERVICE_NAME=com.ibm.mashups.iwidget.services.WireProviderFactoryService.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mashups.iwidget.widget.WireProviderFactory"]){dojo._hasResource["com.ibm.mashups.iwidget.widget.WireProviderFactory"]=true;dojo.provide("com.ibm.mashups.iwidget.widget.WireProviderFactory");dojo.declare("com.ibm.mashups.iwidget.widget.WireProviderFactory",null,{createWireProvider:function(_cd9,_cda){},getSupportedPersistenceMode:function(){}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.ModifiableWireModelImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.ModifiableWireModelImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.ModifiableWireModelImpl");dojo.declare("com.ibm.mm.iwidget.widget.ModifiableWireModelImpl",null,{constructor:function(_cdb){this._dirty=false;this._instance=_cdb;this.svc=com.ibm.mashups.services.ServiceManager.getService("eventService");},toJson:function(){var _cdc={};_cdc._dirty=this._dirty;if(this._wires){_cdc._wires=dojo.clone(this._wires);}if(this._targets){_cdc._targets=dojo.clone(this._targets);}return _cdc;},isDirty:function(){return this._dirty;},setDirty:function(_cdd){this._dirty=_cdd;},registerTargets:function(tw,te,se){if(!this._targets){this._targets={};}if(!this._targets[tw]){this._targets[tw]=[];}var wire={tw:tw,te:te,sw:this._instance.id,se:se};this._targets[tw].push(wire);this._dirty=true;},getTargets:function(){if(!this._targets){return null;}return this._targets;},removeTargets:function(tw,te,se){if(this._targets){if(this._targets[tw]){if(!te&&!se){delete (this._targets[tw]);this._dirty=true;}}}},_addWire:function(wire,_cde){var _cdf=this._findWire(wire.getID())||null;if(_cdf===null){if(!this._wires){this._wires=[];}if(!(_cde&&_cde===true)){wire.setDirty(true);wire.setType(wire.TYPE_NEW);this._dirty=true;}this._wires.push(wire);this.svc.subscribeWire(wire.SourceWidget,wire.SourceEvent,this._instance.id,wire.TargetEvent);}},_removeWire:function(id){var wire=this._findWire(id)||null;if(wire!==null){for(var i in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,i)){if(this._wires[i].getID()==id){this._wires[i].setDirty(true);this._wires[i].setType(this._wires[i].TYPE_DELETE);this.svc.unSubscribeWire(wire.SourceWidget,wire.SourceEvent,this._instance.id,wire.TargetEvent);this._dirty=true;break;}}}}},addWire:function(_ce0,_ce1,_ce2){var _ce3={};_ce3.SourceWidget=_ce0;_ce3.SourceEvent=_ce1;_ce3.TargetEvent=_ce2;var wire=new com.ibm.mm.iwidget.widget.WireImpl(this._instance.id,_ce3);this._addWire(wire);},removeWire:function(_ce4,_ce5,_ce6){var _ce7={};_ce4=_ce4||null;_ce5=_ce5||null;_ce6=_ce6||null;if(_ce4!==null&&_ce5!==null&&_ce6!==null){_ce7.SourceWidget=_ce4;_ce7.SourceEvent=_ce5;_ce7.TargetEvent=_ce6;var _ce8=new com.ibm.mm.iwidget.widget.WireImpl(this._instance.id,_ce7);this._removeWire(_ce8.getID());}else{if(_ce4!==null){for(var w in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,w)){if(this._wires[w].getSourceWidgetID()==_ce4){this._wires[w].setDirty(true);this._wires[w].setType(this._wires[w].TYPE_DELETE);var wire=this._wires[w];this.svc.unSubscribeWire(_ce4,wire.SourceEvent,wire.TargetWidget,wire.TargetEvent);this._dirty=true;}}}}}},_findWire:function(id){this._wires=this._wires||null;var wire=null;if(this._wires!==null){for(var w in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,w)){if(this._wires[w].getID()==id){wire=this._wires[w];if(wire.isDirty()&&wire.getType()!==null&&wire.getType()==wire.TYPE_DELETE){this._removeFromDOM(wire);delete this._wires[w];wire=null;}else{break;}}}}}return wire||null;},getWires:function(){if(!this._wires){this._loadWires();}var arr=[];for(var i in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,i)){var _ce9=this._wires[i];if(!(_ce9.isDirty()===true&&(_ce9.getType()!==null&&_ce9.getType()==_ce9.TYPE_DELETE))){arr.push(_ce9);}}}return arr;},_loadWires:function(){this._wires=[];var ns=this._instance.ns;var _cea="ReceivedEvent";var _ceb=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+ns+_cea,this._instance.rootElement,_ceb,true);var _cec=["SourceWidget","SourceEvent","TargetEvent"];var _ced=["SourceEvent","TargetEvent"];for(var i=0;i<_ceb.length;i++){var _cee=_ceb[i];var _cef={};var _cf0=true;for(var j=0;j<2;j++){var _cf1=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+ns+_ced[j],_cee,_cf1,false);if(_cf1.length===0){_cf0=false;}else{if(j===0){var temp=_cf1[0].getAttribute("href")||null;if(temp!==null){var _cf2=temp.indexOf("#");if(_cf2!=-1){temp=temp.substring(_cf2+1);}_cef[_cec[0]]=temp;_cef[_cec[1]]=_cf1[0].innerHTML;}}else{_cef[_cec[2]]=_cf1[0].innerHTML;}}}if(_cf0){this._addWire(new com.ibm.mm.iwidget.widget.WireImpl(this._instance.id,_cef),true);}}},commit:function(){if(this.isDirty()===true){for(var i in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,i)){var _cf3=this._wires[i];if(_cf3.isDirty()&&_cf3.getType()!==null&&_cf3.getType()==_cf3.TYPE_NEW){this._addToDOM(_cf3);_cf3.setDirty(false);_cf3.setType(null);}else{if(_cf3.isDirty()&&_cf3.getType()!==null&&_cf3.getType()==_cf3.TYPE_DELETE){this._removeFromDOM(_cf3);this._wires.splice(i,1);}}}}this.setDirty(false);}},_addToDOM:function(_cf4){var _cf5=_cf4.getSourceWidgetID();var _cf6=_cf4.getSourceEventName();var _cf7=_cf4.getTargetEventName();var _cf8=document.createElement("span");_cf8.className=this._instance.ns+"ReceivedEvent";var _cf9=document.createElement("a");_cf9.className=this._instance.ns+"SourceEvent";_cf9.setAttribute("href","#"+_cf5);_cf9.innerHTML=_cf6;var _cfa=document.createElement("span");_cfa.className=this._instance.ns+"TargetEvent";_cfa.innerHTML=_cf7;_cf8.appendChild(_cf9);_cf8.appendChild(_cfa);this._instance.rootElement.appendChild(_cf8);},_removeFromDOM:function(_cfb){var _cfc=_cfb.getSourceWidgetID();var _cfd=_cfb.getSourceEventName();var _cfe=_cfb.getTargetEventName();var _cff=this._instance.rootElement;var _d00=dojo.query("."+this._instance.ns+"ReceivedEvent",_cff);var _d01=com.ibm.mashups.services.ServiceManager.getService("iwidgetFragmentService");for(var i=0;i<_d00.length;i++){var _d02=_d00[i];var _d03=dojo.query("."+this._instance.ns+"SourceEvent",_d02)[0];var _d04=_d03.innerHTML;var _d05=dojo.query("."+this._instance.ns+"TargetEvent",_d02)[0];if(_d01.getKeyFromHref(_d03)==_cfc&&_d04==_cfd&&_d05.innerHTML==_cfe){dojo.destroy(_d02);break;}}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl");dojo.declare("com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl",com.ibm.mashups.iwidget.widget.WireProviderFactory,{constructor:function(){this.modes=["DOM"];},createWireProvider:function(_d06,_d07){return new com.ibm.mm.iwidget.widget.ModifiableWireModelImpl(_d06);},getSupportedPersistenceMode:function(){return this.modes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl",com.ibm.mashups.iwidget.services.WireProviderFactoryService,{constructor:function(){this._factories={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createWireProvider:function(_d08,_d09){if(_d09){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES,_d09);}var _d0a;var wID=_d08.id;_d0a=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES);var _d0b=_d08.rootElement;if(dojo.hasClass(_d0b,com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.STANDALONE_CLASS)||!_d0a){_d0a=com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE;}if(typeof _d0a!=="undefined"&&_d0a==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _d0c=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _d0d=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _d0e=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_d0d);var _d0f=_d0e.getSpaceID();var _d10=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_d0d,_d0f);var _d11=_d10.getPageID();var _d12=com.ibm.mm.iwidget.Utils.getModelID(wID);var wnd=_d0c.findWidgetWindow(_d12,_d11).start();if(!wnd){_d0a=com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE;if(this.widgetWrapper&&dojo.isFunction(this.widgetWrapper._getResourceBundle)){this.widgetWrapper._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",widgetWrapper.iwMessages.W_STANDALONECLASS_MISSING_1,[wID]);}else{this.LOGGER.warning("createPersistentAttributes","widget "+wID+" is missing class "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}}}if(!(_d0a in this._factories)){return null;}return this._factories[_d0a].createWireProvider(_d08,_d0a);},setFactory:function(_d13,_d14){this._factories[_d13]=_d14;},removeFactory:function(_d15){if(_d15 in this._factories){delete this._factories[_d15];}}});com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE=com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM;com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.STANDALONE_CLASS=com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone;com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.WireProviderFactoryService.SERVICE_NAME,new com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl());com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.WireProviderFactoryService.SERVICE_NAME).setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM,new com.ibm.mm.iwidget.widget.DOMWireProviderFactoryImpl());}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl",com.ibm.mm.iwidget.widget.IWidgetInstanceDefaultImpl,{_addWire:function(wire){return this.getWireModel()._addWire(wire);},_removeWire:function(id){return this.getWireModel()._removeWire(id);},addWire:function(_d16,_d17,_d18){return this.getWireModel().addWire(_d16,_d17,_d18);},removeWire:function(_d19,_d1a,_d1b){return this.getWireModel().removeWire(_d19,_d1a,_d1b);},getWires:function(){return this.getWireModel().getWires();},getWireModel:function(){if(!this.wiremodel){this.wiremodel=com.ibm.mashups.services.ServiceManager.getService("WireProviderFactoryService").createWireProvider(this,{context:this,callback:"_wireProviderModeChange",unregister:function(_d1c){this.wrapper.unregisterArray.push(_d1c);}});}return this.wiremodel;},_wireProviderModeChange:function(_d1d,_d1e,_d1f){var _d20=null;if(this.wiremodel){_d20=this.wiremodel.getTargets();}this.wiremodel=com.ibm.mashups.services.ServiceManager.getService("WireProviderFactoryService").createWireProvider(this);if(_d20){for(var id in _d20){var _d21=_d20[id];for(var i=0,l=_d21.length;i<l;i++){this.wiremodel.registerTargets(_d21[i].tw,_d21[i].te,_d21[i].se);}}}this.getWires();},_getPublicEvents:function(){if(!this.events){this.events={};var _d22=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwEvent,this.rootElement,_d22,true);var _d23=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwEventDescription,this.rootElement,_d23,true);if(_d22.length>0){for(var i=0;i<_d22.length;i++){var elem=_d22[i];var _d24=this._getEventDescription(elem,_d23);var id=elem.getAttribute("title");this.events[id]=_d24;}}}return this.events;},_getEventDescription:function(elem,_d25){var id=elem.getAttribute("title");var _d26=dojo.query("> ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwDescRef,elem);var _d27=null;if(_d26){_d27=_d26[0];}var _d28=null;if(_d27){_d28=_d27.getAttribute("href");if(_d28.indexOf("#")===0){_d28=_d28.slice(1);_d28=unescape(_d28);}}var _d29=null;for(var j=0;j<_d25.length;j++){var temp=_d25[j];if(temp.getAttribute("title")==_d28){_d29=temp;break;}}var obj={};obj.name=id;var _d2a=_d27.innerHTML;_d2a=_d2a.replace(/^\s*/,"").replace(/\s*$/,"");if(_d2a){obj.alias=_d2a;}var _d2b=elem.className;if(_d2b.indexOf(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwPublished)>0){obj.isPublished=true;}if(_d2b.indexOf(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwHandled)>0){obj.isHandled=true;}var list=[];list.push(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwHandler);list.push(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwNewWire);list.push(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwRemoveWire);for(var s=0;s<list.length;s++){var _d2c=dojo.query("> ."+list[s],elem);if(_d2c){var _d2d=_d2c[0];if(_d2d){switch(s){case 0:obj.handlingFn=_d2d.innerHTML;break;case 1:obj.attributes=obj.attributes?obj.attributes:{};obj.attributes.onNewWire=_d2d.innerHTML;break;case 2:obj.attributes=obj.attributes?obj.attributes:{};obj.attributes.onRemoveWire=_d2d.innerHTML;break;default:break;}}}}if(_d29){var _d2e=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwPayloadType;var list=dojo.query("> ."+_d2e,_d29);if(list&&list[0]){obj.type=list[0].innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");}obj.localizedAttributes={};var _d2f=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwTitle;var _d30=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwValue;var _d31=dojo.query("> ."+_d2f,_d29);if(_d31&&_d31[0]){dojo.query("> ."+_d30,_d31[0]).forEach(function(elem){var lang=elem.getAttribute("lang");var _d32=elem.innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");if(!obj.localizedAttributes[lang]){obj.localizedAttributes[lang]={};}obj.localizedAttributes[lang].title=_d32;});}var _d33=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwDescription;var _d30=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwValue;var _d34=dojo.query("> ."+_d33,_d29);if(_d34&&_d34[0]){dojo.query("> ."+_d30,_d34[0]).forEach(function(elem){var lang=elem.getAttribute("lang");var _d35=elem.innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");if(!obj.localizedAttributes[lang]){obj.localizedAttributes[lang]={};}obj.localizedAttributes[lang].description=_d35;});}}return new com.ibm.mm.iwidget.IEventDescriptionImpl(obj);}});com.ibm.mm.iwidget.widget.IWidgetInstanceImpl=com.ibm.mm.iwidget.widget.IWidgetInstanceExtendedImpl;}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService_API"]){dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService_API"]=true;dojo.provide("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService_API");dojo.provide("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService");dojo.declare("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService",null,{SERVICE_NAME:"WidgetEventModelFactoryService",createEventModel:function(_d36,_d37){},setFactory:function(_d38,_d39){},removeFactory:function(_d3a){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService"]){dojo._hasResource["com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService"]=true;dojo.provide("com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService");com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.SERVICE_NAME=com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.EventModelFactory"]){dojo._hasResource["com.ibm.mashups.iwidget.model.EventModelFactory"]=true;dojo.provide("com.ibm.mashups.iwidget.model.EventModelFactory");dojo.declare("com.ibm.mashups.iwidget.model.EventModelFactory",null,{createEventModel:function(_d3b,_d3c){},getSupportedPersistenceMode:function(){}});}if(!dojo._hasResource["com.ibm.mashups.iwidget.model.EventModel"]){dojo._hasResource["com.ibm.mashups.iwidget.model.EventModel"]=true;dojo.provide("com.ibm.mashups.iwidget.model.EventModel");dojo.declare("com.ibm.mashups.iwidget.model.EventModel",null,{constructor:function(_d3d){this.wrapper=_d3d;},find:function(id){return null;},eventExists:function(id){return false;},createEvent:function(_d3e){return null;},removeEvent:function(_d3f){},isUpdateEventRequired:function(_d40){},updateEvent:function(_d41){},getEvents:function(_d42){}});}if(!dojo._hasResource["com.ibm.mm.enabler.utils.EventModelHelperImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.EventModelHelperImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.EventModelHelperImpl");dojo.declare("com.ibm.mm.enabler.utils.EventModelHelperImpl",null,{_PredefinedFields:{alias:"alias",name:"name",type:"type",lang:"lang",isPublished:"isPublished",isHandled:"isHandled",handlingFn:"handlingFn"},checkMatch:function(_d43,_d44){var rc=true;var _d45=[];var _d46;for(var i in _d44){if(Object.prototype.hasOwnProperty.call(_d44,i)){if(!_d44[i]){continue;}if(typeof (this._PredefinedFields[i])!="undefined"){if(i==this._PredefinedFields.isPublished&&(_d44[i]===true||_d44[i]=="true")){_d46=_d43.isPublished;if(!(_d46&&(_d46===true||_d46=="true"))){rc=false;break;}}else{if(i==this._PredefinedFields.isPublished&&(_d44[i]=="false"||_d44[i]===false)){_d46=_d43.isPublished;if(!(_d46&&(_d46===false||_d46=="false"))){rc=false;break;}}else{if(i==this._PredefinedFields.isPublished&&(_d44[i]=="false"||_d44[i]===false)){if(!this._checkBoolean(dojo.toJson(_d43),i,"false")){rc=false;break;}}else{if(i==this._PredefinedFields.isHandled&&(_d44[i]===true||_d44[i]=="true")){if(!_d43[this._PredefinedFields.handlingFn]){rc=false;break;}}else{if(i==this._PredefinedFields.isHandled&&(_d44[i]=="false"||_d44[i]===false)){if(_d43[this._PredefinedFields.handlingFn]){rc=false;break;}}else{if(!(_d43[i]&&_d43[i]==_d44[i])){rc=false;break;}}}}}}}else{if(!(_d43.attributes&&_d43.attributes[i]&&_d43.attributes[i]==_d44[i])){rc=false;break;}}}}return rc;},_checkBoolean:function(str,name,_d47){var rc=false;var temp="\""+name+"\""+":"+_d47;if(str.indexOf(temp)!=-1){return true;}temp="\""+name+"\""+":\""+_d47+"\"";if(str.indexOf(temp)!=-1){return true;}return false;}});dojo.declare("com.ibm.mashups.enabler.utils.EventModelHelper",null,{});com.ibm.mashups.enabler.utils.EventModelHelper=new com.ibm.mm.enabler.utils.EventModelHelperImpl();}if(!dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelImpl"]){dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelImpl"]=true;dojo.provide("com.ibm.mm.iwidget.model.DOMEventModelImpl");dojo.declare("com.ibm.mm.iwidget.model.DOMEventModelImpl",com.ibm.mashups.iwidget.model.EventModel,{constructor:function(_d48){this.wrapper=_d48;this.eventDescriptionPool={};var _d49=_d48.widgetDef._getPublicEvents();var _d4a=_d48.getIWidgetInstance()._getPublicEvents();var _d4b=_d49?_d49:null;if(_d4a){for(var j in _d4a){if(Object.prototype.hasOwnProperty.call(_d4a,j)){_d4b[j]=_d4a[j];}}}if(_d4b){var _d4c={};for(var i in _d4b){if(Object.prototype.hasOwnProperty.call(_d4b,i)){_d4c[i]=_d4b[i];}}this.eventDescriptionPool=_d4c;}},find:function(id){var _d4d=this.eventDescriptionPool[id];if(_d4d){return _d4d;}if(this.wrapper.handledEvents){if(this.wrapper.handledEvents[id]){return this.wrapper.handledEvents[id][0];}}if(this.wrapper.publishedEvents){if(this.wrapper.publishedEvents[id]){return this.wrapper.publishedEvents[id][0];}}return null;},eventExists:function(_d4e){var temp=this.eventDescriptionPool[_d4e];if(temp){return true;}else{return false;}},_getEventDescObj:function(_d4f){var obj=_d4f;var _d50=_d4f.declaredClass;if(typeof _d50=="undefined"||_d50===null){obj=new com.ibm.mm.iwidget.IEventDescriptionImpl(_d4f);}return obj;},createEvent:function(_d51){var _d52=this._getEventDescObj(_d51);var _d53=this.eventExists(_d52.name);if(_d53){return false;}else{this.eventDescriptionPool[_d52.name]=_d52;return true;}},removeEvent:function(_d54){var _d55=this.eventExists(_d54);if(_d55){delete this.eventDescriptionPool[_d54];return true;}else{return true;}},removeEvents:function(_d56){for(var i=0;i<_d56.length;i++){this.removeEvent(_d56[i]);}return true;},isUpdateEventRequired:function(_d57){var _d58=this._getEventDescObj(_d57);var _d59=this.eventExists(_d58.name);if(_d59){var _d5a=this.eventDescriptionPool[_d58.name];var _d5b=_d5a.type||"";_d5b=(_d5b.indexOf("}")==-1)?_d5b:_d5b.substring(_d5b.indexOf("}")+1);var _d5c=_d58.type||"";_d5c=(_d5c.indexOf("}")==-1)?_d5c:_d5c.substring(_d5c.indexOf("}")+1);if((_d5a.alias!=_d58.alias)||(_d5a.name!=_d58.name)||(_d5b!=_d5c)||(_d5a.isHandled!=_d58.isHandled)||(_d5a.isPublished!=_d58.isPublished)){return true;}return false;}else{return true;}},updateEvent:function(_d5d){var _d5e=this._getEventDescObj(_d5d);var _d5f=this.eventExists(_d5e.name);if(_d5f){this.eventDescriptionPool[_d5e.name]=_d5e;}else{return false;}return true;},setEvents:function(_d60){var rc=true;for(var i=0;i<_d60.length;i++){var _d61=_d60[i];var _d62=this.createEvent(_d61);_d62=_d62||false;if(_d62===false){_d62=this.updateEvent(_d61);}_d62=_d62||false;if(rc===true){rc=_d62;}}return rc;},getEvents:function(_d63){if(typeof _d63=="undefined"||_d63===null){return this._getEventsInArray(this.eventDescriptionPool);}var _d64=[];if(_d63.isHandled&&_d63.isHandled=="true"){if(this.wrapper.handledEvents){this._addEvents(_d64,this.wrapper.handledEvents);}}if(_d63.isPublished&&_d63.isPublished=="true"){if(this.wrapper.publishedEvents){this._addEvents(_d64,this.wrapper.publishedEvents);}}if(dojo.isString(_d63)){try{_d63=dojo.fromJson(_d63);}catch(e){return null;}}for(var j in this.eventDescriptionPool){if(Object.prototype.hasOwnProperty.call(this.eventDescriptionPool,j)){var _d65=this.eventDescriptionPool[j];var rc=com.ibm.mashups.enabler.utils.EventModelHelper.checkMatch(_d65._getInternalJsonObj(),_d63);if(rc){_d64.push(_d65);}}}if(_d64.length===0){return null;}else{return _d64;}},_getEventsInArray:function(arr){var _d66=[];for(var j in arr){if(Object.prototype.hasOwnProperty.call(arr,j)){_d66.push(arr[j]);}}if(_d66.length===0){return null;}else{return _d66;}},_addEvents:function(arr,_d67){for(var i in _d67){if(Object.prototype.hasOwnProperty.call(_d67,i)){var _d68=_d67[i];for(var j in _d68){if(Object.prototype.hasOwnProperty.call(_d68,j)){arr.push(_d68[j]);}}}}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl");dojo.declare("com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl",com.ibm.mashups.iwidget.model.EventModelFactory,{constructor:function(){this.modes=["DOM"];},createEventModel:function(_d69,_d6a){return new com.ibm.mm.iwidget.model.DOMEventModelImpl(_d69);},getSupportedPersistenceMode:function(){return this.modes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl",com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService,{constructor:function(){this._factories={};this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},createEventModel:function(_d6b,_d6c){if(_d6c){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS,_d6c);}return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var wID=_d6b.id;var _d6d=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);var _d6e=_d6b.rootElement;if(dojo.hasClass(_d6e,com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.STANDALONE_CLASS)||!_d6d){_d6d=com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE;}var _d6f;if(typeof _d6d!=="undefined"&&_d6d==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _d70=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _d71=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _d72=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_d71);var _d73=_d72.getSpaceID();var _d74=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_d71,_d73);var _d75=_d74.getPageID();var _d76=com.ibm.mm.iwidget.Utils.getModelID(wID);var _d77=_d70.findWidgetWindow(_d76,_d75);_d77.setFinishedCallback(dojo.hitch(this,function(wnd,_d78){if(!wnd){_d6d=com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE;if(dojo.isFunction(_d6b._getResourceBundle)){_d6b._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",_d6b.iwMessages.W_STANDALONECLASS_MISSING_1,[wID]);}else{this.LOGGER.warning("createPersistentAttributes","widget "+wID+" is missing class "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone);}}if(!(_d6d in this._factories)){_d6f=null;}else{_d6f=this._factories[_d6d].createEventModel(_d6b,_d6d);}dfr.finish(_d6f,_d78);}));_d77.start(sync);}else{if(!_d6f){if(!(_d6d in this._factories)){_d6f=null;}else{_d6f=this._factories[_d6d].createEventModel(_d6b,_d6d);}}dfr.finish(_d6f,200);}return _d6f;});},setFactory:function(_d79,_d7a){this._factories[_d79]=_d7a;},removeFactory:function(_d7b){if(_d7b in this._factories){delete this._factories[_d7b];}}});com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE=com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM;com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.STANDALONE_CLASS=com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwStandalone;com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.SERVICE_NAME,new com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl());com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.WidgetEventModelFactoryService.SERVICE_NAME).setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_DOM,new com.ibm.mm.iwidget.model.DOMEventModelFactoryImpl());}if(!dojo._hasResource["com.ibm.mashups.iwidget.itemset.ShareableItemSet"]){dojo._hasResource["com.ibm.mashups.iwidget.itemset.ShareableItemSet"]=true;dojo.provide("com.ibm.mashups.iwidget.itemset.ShareableItemSet");dojo.declare("com.ibm.mashups.iwidget.itemset.ShareableItemSet",null,{constructor:function(){},setItemValue:function(_d7c,_d7d){return this;},getItemValue:function(_d7e){return null;},getAllNames:function(){return null;},removeItem:function(_d7f){return null;},commit:function(){return null;},addListener:function(_d80){return null;},removeListener:function(_d81){return true;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetImpl"]){dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetImpl"]=true;dojo.provide("com.ibm.mm.iwidget.itemset.ShareableItemSetImpl");dojo.declare("com.ibm.mm.iwidget.itemset.ShareableItemSetImpl",com.ibm.mashups.iwidget.itemset.ShareableItemSet,{constructor:function(_d82,_d83,name){this.DELETE_TOKEN="DELETE_TOKEN";this.parent=_d82;if(name){this.id=name;}if(_d83){this.id=_d83.id;this.alias=_d83.alias?_d83.alias:null;this.defData=_d83;}this.mapping={};this.items={};if(_d83){var _d84=_d83.items;for(var i in _d84){if(Object.prototype.hasOwnProperty.call(_d84,i)){var id=i;var _d85=_d84[i].alias?_d84[i].alias:null;this.items[i]={id:id};if(_d85){this.mapping[_d85]=id;this.items[i].alias=_d85;}}}}this.navigationStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var psid=this.alias;if(!psid){psid=this.id;}this.shareableAccessor=com.ibm.mashups.enabler.model.state.AccessorFactory.getShareableParameterSetAccessor(this.navigationStateModel,psid,"global");this._isDirty=false;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);},addListener:function(fn){var id=this.alias;if(!id){id=this.id;}var me=this;var _d86=function(_d87){if(me._isSender){return;}var _d88=_d87.changes?_d87.changes:null;if(_d88){for(var i=0;i<_d88.length;i++){var _d89=_d88[i].alias;if(me.mapping){if(me.mapping[_d89]){var _d8a=me.mapping[_d89];_d88[i].id=_d8a;}}}}if(_d88.length>0){var _d8b=new com.ibm.mm.iwidget.IEventImpl("onItemSetChanged",null,_d87);if(dojo.isString(fn)){var _d8c=me.parent._getHandlerScope(fn);if(_d8c){fn=dojo.hitch(_d8c,fn);}}fn(_d8b);}};var _d8d=this.shareableAccessor.registerListener(_d86);return _d8d;},removeListener:function(_d8e){return this.shareableAccessor.removeListener(_d8e);},setItemValue:function(_d8f,_d90){if(!_d8f){return null;}if(!_d90){return null;}if(typeof (this._isDirty)!="undefined"&&!this._isDirty){this._isDirty=true;this._changedItems={};}var _d91=this._resolveMapping(_d8f);if(!_d91){_d91=_d8f;}this._changedItems=this._changedItems?this._changedItems:{};this._changedItems[_d91]=_d90;return this;},getItemValue:function(_d92){var id=this._resolveMapping(_d92);if(!id){id=_d92;}if(this._isDirty&&this._changedItems){if(this._changedItems[id]&&this._changedItems[id]!=this.DELETE_TOKEN){return this._changedItems[id];}else{if(this._changedItems[id]&&this._changedItems[id]==this.DELETE_TOKEN){return null;}}}var _d93=this.alias;if(!_d93){_d93=this.id;}var _d94=this.shareableAccessor.getItemValue(id);if(!_d94){_d94=null;}return _d94;},getAllNames:function(){var _d95=this.alias;if(!_d95){_d95=this.id;}var _d96=this.shareableAccessor.getAllNames();if(this._isDirty){var obj={};for(var i=0;i<_d96.length;i++){var _d97=_d96[i];obj[_d97]=_d97;}if(this._changedItems){for(var j in this._changedItems){if(this._changedItems[j]&&this._changedItems[j]==this.DELETE_TOKEN&&obj[j]){obj[j]=null;}else{if(this._changedItems[j]&&!obj[j]){obj[j]=j;}}}}var arr=[];for(var k in obj){if(Object.prototype.hasOwnProperty.call(obj,k)){arr.push(k);}}_d96=arr;}for(var s=0;s<_d96.length;s++){var id=_d96[s];if(this.mapping[id]){_d96[s]=this.mapping[id];}}if(_d96.length===0){return null;}return _d96;},removeItem:function(_d98){if(typeof (this._isDirty)!="undefined"&&!this._isDirty){this._isDirty=true;this._changedItems={};}var _d99=this.getAllNames();if(_d99===null){return null;}var _d9a=false;for(var i=0;i<_d99.length;i++){if(_d99[i]==_d98){_d9a=true;}}if(!_d9a){return null;}var id=this._resolveMapping(_d98);if(!id){id=_d98;}this._changedItems=this._changedItems?this._changedItems:{};this._changedItems[id]=this.DELETE_TOKEN;return this;},getItemSetDescription:function(){return null;},commit:function(){if(this._isDirty){this._isSender=true;var _d9b=this.alias;if(!_d9b){_d9b=this.id;}this.shareableAccessor._setItems(this._changedItems);var _d9c=this.navigationStateModel.commit();_d9c.start();this._isSender=false;}this._changedItems=null;this._isDirty=false;},_resolveMapping:function(name){if(!name){return null;}if(!this.items){return null;}if(this.items[name]&&this.items[name].alias){return this.items[name].alias;}return null;}});com.ibm.mm.iwidget.itemset.ShareableItemSetFactory=com.ibm.mm.iwidget.itemset.ShareableItemSetImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl");}}if(!dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl"]){dojo._hasResource["com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl"]=true;dojo.provide("com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl");dojo.declare("com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl",com.ibm.mm.enabler.DeferredImpl,{constructor:function(_d9d){this.wrapper=_d9d;},start:function(sync){if(sync){return;}var _d9e=this.wrapper.getIWidgetInstance();if(dojo.isFunction(this.wrapper.iScope._onGetMarkup)){this.wrapper.iScope._onGetMarkup();}var _d9f=dojo.clone(this.wrapper.rootElement);dojo.publish("/com/ibm/mashups/livetext/livetextunchange",[_d9f,true,null,null,dojo.hitch(this,this._unchangeCompleteCallback),this.includeParent]);},setIncludeParent:function(_da0){this.includeParent=_da0;},getIncludeParent:function(){return this.includeParent;},_unchangeCompleteCallback:function(node){if(dojo.isFunction(this.getFinishedCallback())){this.finish(node,200);}}});}if(!dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl"]){dojo._hasResource["com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl"]=true;dojo.provide("com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl");dojo.declare("com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl",com.ibm.mm.iwidget.widget.IWidgetWrapperDefaultImpl,{getMarkup:function(){return new com.ibm.mm.iwidget.DeferredLiveTextUnprocessImpl(this);},destroy:function(){if(this.widgetDef){var _da1=this.widgetDef._getShareableItemSets();if(_da1){var _da2=null;for(var i in _da1){if(Object.prototype.hasOwnProperty.call(_da1,i)){if(this.shareableItemSets.listeners[i]){for(var j=0,l=this.shareableItemSets.listeners[i].length;j<l;++j){var _da3=this.shareableItemSets.listeners[i][j];_da2=this.shareableItemSets.itemsets[i];_da2.removeListener(_da3);}}}}}}this.inherited(arguments);for(var m=0,_da4=this.unregisterArray.length;m<_da4;m++){dojo.unsubscribe(this.unregisterArray[m]);}},_getResourceBundle:function(){if(!this.iwMessages){this.iwMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwMessages");}return this.iwMessages;},_logInlineMessage:function(_da5,e){_da5._getResourceBundle();dojo.query("> ."+_da5.ns+"loading",_da5.rootElement).forEach(function(elem){elem.innerHTML="";var _da6=_da5.id;if(_da5.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale)){_da6=unescape(_da5.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(_da5.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_da6,e.message]));}else{if(typeof (e)!=="undefined"&&null!==e){com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(_da5.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_da6,e.message]));}else{elem.innerHTML=dojo.string.substitute(_da5.iwMessages.E_WIDGET_INCORRECTCONFIG_1,[_da6]);}}});},_logUpdateMarkupError:function(mode){this._getResourceBundle();var _da7=dojo.string.substitute(this.iwMessages.E_IWIDGETDEF_CONTENTNOTAVAILABLE_1,[mode]);},_loadWidgetSharedResource:function(cb2){var _da8=this.widgetDef.getResources();this._getResourceBundle();if(typeof _da8!="undefined"&&_da8!==null){var size=_da8.length-1;if(size==-1){cb2();}var _da9=[];var temp=[];for(var x in _da8){if(Object.prototype.hasOwnProperty.call(_da8,x)){var _daa=_da8[x];if(_daa.isImage()||_daa.isCSS()){temp.push(_daa);}else{_da9.push(_daa);}}}for(var y=0;y<temp.length;y++){_da9.push(temp[y]);}var me=this;var mycb=function(i,_dab,data,_dac){if(data&&_dac&&_dab.isJS()){me.error="true";if(!me.data){me.data=[];}var msg=dojo.string.substitute(me.iwMessages.E_RESOURCE_LOAD_FAIL_2,[_dab.src,data.message]);me.data.push({data:msg,status:_dac});}if(size==i){if(me.error&&me.error=="true"){dojo.query("> ."+me.ns+"loading",me.rootElement).forEach(function(elem){elem.innerHTML="";var _dad=me.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale);if(!_dad){_dad="'"+me.getIWidgetInstance().widgetXMLUrl+"'";}else{_dad="'"+unescape(_dad)+"'";}if(me.widgetDef){var _dae=me.widgetDef.getWidgetId();if(_dae){_dad="'"+_dae+"' ("+_dad+")";}}var _daf="";var _db0=(dojo.isArray(me.data))?me.data[0]:me.data;_daf="";for(var j in _db0){if(Object.prototype.hasOwnProperty.call(_db0,j)){if(j=="data"){_daf=_daf.concat("'"+_db0[j]+"'").concat("\n");}}}com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(me.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_dad,_daf]));});me.error=null;me.data=null;}else{if(cb2){cb2();}}}};for(var i=0;i<_da9.length;i++){var _db1=_da9[i];if(typeof _db1!="undefined"&&_db1!==null){com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").loadResource(_db1,this.id,dojo.partial(mycb,i,_db1));}}}},handleEvent:function(_db2){var _db3=_db2.declaredClass;if(typeof _db3!="undefined"&&_db3!==null&&_db3=="com.ibm.mm.iwidget.IEventImpl"){var _db4=_db2.name;return this._handleEvent(_db4,_db2);}var _db5=_db2.scope;if(typeof _db5!="undefined"&&_db5!==null){if(_db5=="instance"){_db5=this.getIWidgetInstance();}else{if(_db5=="eventmodel"){_db5=this._getPublicEvents();}}}else{_db5=this;}var _db6=_db2.methodname;if(typeof _db6!="undefined"&&_db6!==null){if(_db5[_db6]&&dojo.isFunction(_db5[_db6])){_db5[_db6].apply(_db5,_db2.params);}}},_handleEvent:function(_db7,_db8){var _db9="_handleEvent(eventName, iEvent)";if(this.bIsLoggable){this.LOGGER.entering(_db9,[_db7,dojo.toJson(_db8)]);}_db8=this._deserializePayload(_db8);if(typeof _db7=="undefined"||_db7===null){return false;}if(!this.loaded){if(!this._eventqueue){this._eventqueue={};}this._eventqueue[_db7]=_db8;return;}try{if(_db7==iwConstants.EVENTS.onNavStateChanged){return this._handleOnNavStateChanged(_db8);}if(_db7==iwConstants.EVENTS.onWindowStateChanged){var _dba=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _dbb=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_dba,this.id);var _dbc=_db8.payload.newWindowState;_dbb.setWindowState(_dbc);var _dbd=dojo.contentBox(this.rootElement.parentNode);this.handleSizeChanged({"newWidth":Math.max(0,_dbd.w),"newHeight":Math.max(0,_dbd.h)});return this._handleEventInternal(_db7,_db8);}if(_db7==iwConstants.EVENTS.onModeChanged){if(this._inIframe()){var _dbe={};_dbe.methodname="_handleOnModeChange";_dbe.hubclient=this.hubId;_dbe.params=[_db8.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_dbe,this.hubId);return;}return this._handleModeChange(_db8);}if(_db7=="onNewWire"){return this._handleNewWire(_db8);}if(_db7=="onRemoveWire"){return this._handleRemoveWire(_db8);}return this._handleEventInternal(_db7,_db8);}catch(e){var _dbf=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);_dbf.severe("_handleEvent","widget:"+this.hubId+"eventName:"+_db7+" HandleEventException:"+e);}},getPublicEventHandler:function(_dc0){var _dc1=this._getPublicEvents()||null;if(!_dc1){return null;}var _dc2=_dc1.find(_dc0)||null;if(!_dc2){return null;}var _dc3=_dc2.handlingFn||null;if(!_dc3){var _dc4=_dc2.getAttribute("isComplete");if(typeof _dc4!=="undefined"&&_dc4===false){var _dc5=iwConstants.EVENTS.onIncompleteEventDescription;var _dc6={eventDescription:_dc2};var _dc7=new com.ibm.mm.iwidget.IEventImpl(_dc5,null,_dc6);this._handleEventInternal(_dc5,_dc7);_dc2=_dc1.find(_dc0);_dc3=_dc2.handlingFn;}}var _dc8=null;if(_dc3){if(dojo.isFunction(_dc3)){_dc8=_dc3;}else{var _dc9=this._getHandlerScope(_dc3)||null;if(_dc9){_dc8=dojo.hitch(_dc9,_dc3);}}}return _dc8;},getPublishedEvents:function(){if(!this.publishedEvents){this.publishedEvents={};}return this.publishedEvents;},getHandledEvents:function(){if(!this.handledEvents){this.handledEvents={};}return this.handledEvents;},_inIframe:function(){if(this._isInIframe){return this._isInIframe;}var _dca=false;var type=this.eventSvr.getType();if(typeof type!="undefined"&&type==com.ibm.mm.iwidget.Constants.eventservice.type.IFRAME){_dca=true;}this._isInIframe=_dca;return this._isInIframe;},setMainframeId:function(_dcb){this._mainframeId=_dcb;},setModal:function(_dcc){this._isModal=_dcc;},isModal:function(){return this._isModal?this._isModal:false;},_handleDataSync:function(_dcd){if(typeof _dcd.attributes!="undefined"&&_dcd.attributes!==null){var _dce=_dcd.attributes;this._syncModifiableProperties(_dce,this.getIWidgetInstance().getAttributes());}if(typeof _dcd.idescriptors!="undefined"&&_dcd.idescriptors!==null){var _dcf=_dcd.idescriptors;this._syncModifiableProperties(_dcf,this.getIWidgetInstance().getIDescriptorItems());}if(typeof _dcd.wiremodel!="undefined"&&_dcd.wiremodel!==null){var _dd0=_dcd.wiremodel;this._syncWireModel(_dd0,this.getIWidgetInstance().getWireModel());}this.commit(true);},_syncModifiableProperties:function(_dd1,_dd2){var _dd3=_dd1._items;if(_dd1._dirty){for(var i in _dd3){if(Object.prototype.hasOwnProperty.call(_dd3,i)){var name=i;var temp=_dd3[i];if(dojo.isString(temp)){if(temp&&temp==_dd2.DELETE_TOKEN){_dd2.removeItem(name);}}else{var _dd4=(_dd3[i].readOnly)?_dd3[i].readOnly:false;var _dd5=_dd3[i].values;if(typeof _dd5!="undefined"&&_dd5!==null){for(var j in _dd5){if(Object.prototype.hasOwnProperty.call(_dd5,j)){var _dd6=_dd5[j];if(_dd6&&_dd6==_dd2.DELETE_TOKEN){_dd2.removeItemValue(name,j);}else{if(_dd6){_dd2.setItemValue(name,_dd6,_dd4,j);}}}}}}}}}},_syncWireModel:function(_dd7,_dd8){var _dd9=_dd7._wires;for(var i in _dd9){if(Object.prototype.hasOwnProperty.call(_dd9,i)){var _dda=_dd9[i];if(_dda._isDirty&&_dda._type&&_dda._type=="NEW"){_dd8.addWire(_dda.SourceWidget,_dda.SourceEvent,_dda.TargetEvent);}else{if(_dda._isDirty&&_dda._type&&_dda._type=="DELETE"){_dd8.removeWire(_dda.SourceWidget,_dda.SourceEvent,_dda.TargetEvent);}}}}var _ddb=_dd7._targets;_dd8._targets=_ddb;},setStateData:function(_ddc){this.stateData=_ddc;},updateState:function(){var _ddd;if(!this._inIframe()){var _dde=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _ddf=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_dde,this.id)||null;if(_ddf){var _de0=_ddf.getWidgetState("cp");if(_de0){_ddd=new com.ibm.mm.iwidget.IEventImpl(iwConstants.EVENTS.onNavStateChanged,"json",_de0);this._handleEventInternal(iwConstants.EVENTS.onNavStateChanged,_ddd);}}}else{if(this.stateData){_ddd=new com.ibm.mm.iwidget.IEventImpl(iwConstants.EVENTS.onNavStateChanged,null,this.stateData);this._handleEventInternal(iwConstants.EVENTS.onNavStateChanged,_ddd);}}},_handleOnNavStateChanged:function(_de1){if(!this._inIframe()){var _de2=_de1.payload;if(_de2){var _de3=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _de4=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_de3,this.id);_de4.setWidgetState("cp",_de2);var _de5=_de3.commit();_de5.start();}}else{var _de6={};_de6.methodname="_handleOnNavStateChanged";_de6.params=[_de1];this.eventSvr._publishEvent(this.eventSvr.WIDGETEVENT_PREFIX+"_stub_"+this.id,_de6);}},_initialize:function(_de7){var lang=this.widgetDef.getDefaultLanguage()||null;if(lang){this.defaultLanguage=lang;}else{this.defaultLanguage="en";}var _de8=this._getInitDefaultMode()||null;if(!_de8){_de8=iwConstants.mode_view;}this.currentMode=_de8;this._handleSaveMode();this._initManagedItemSet();this._getShareableItemSets();this._getPublicEvents(dojo.hitch(this,function(_de9){this.getWires();if(_de7){_de7();}}));},getPublicEvent:function(name){var _dea=this._getPublicEvents();return _dea.find(name);},_getPublicEvents:function(_deb){if(!this.publicEvents){var _dec=com.ibm.mashups.services.ServiceManager.getService("WidgetEventModelFactoryService");var dfr=_dec.createEventModel(this,{context:this,callback:"_eventProviderModeChange",unregister:function(_ded){this.unregisterArray.push(_ded);}});dfr.setFinishedCallback(dojo.hitch(this,function(_dee,_def){this.publicEvents=_dee;if(_deb){_deb(this.publicEvents);}}));var sync=(_deb)?false:true;if(ibmConfig.dojotest){sync=true;}dfr.start(sync);}return this.publicEvents;},_eventProviderModeChange:function(_df0,_df1,_df2){var _df3=this.publicEvents;var _df4=com.ibm.mashups.services.ServiceManager.getService("WidgetEventModelFactoryService");var dfr=_df4.createEventModel(this,{context:this,callback:"_eventProviderModeChange",unregister:function(_df5){this.unregisterArray.push(_df5);}});dfr.setFinishedCallback(dojo.hitch(this,function(_df6,_df7){this.publicEvents=_df6;}));dfr.start(true);var _df8={};_df8.isHandled="true";var _df9=_df3.getEvents(_df8);if(_df9){for(var i=0;i<_df9.length;i++){var _dfa=_df9[i];var _dfb=this.getPublicEvent(_dfa.name);if(_dfa&&_dfb){_dfb.copyRuntimeProperties(_dfa);}}}},_getPublishedEvents:function(){var _dfc=this.getWidgetPublishedEvents()||null;var arr={};if(_dfc){var i=0;for(i;i<_dfc.length;i++){arr[_dfc[i].name]=_dfc[i];}}return arr;},_getHandledEvents:function(){var _dfd=this.getWidgetHandledEvents()||null;var arr={};if(_dfd){var i=0;for(i;i<_dfd.length;i++){arr[_dfd[i].name]=_dfd[i];}}return arr;},getWidgetPublishedEvents:function(){var _dfe=this._getPublicEvents();if(_dfe){var _dff={};_dff.isPublished="true";return _dfe.getEvents(_dff);}return null;},getWidgetHandledEvents:function(){var _e00=this._getPublicEvents();if(_e00){var _e01={};_e01.isHandled="true";return _e00.getEvents(_e01);}return null;},getWires:function(){return this.getIWidgetInstance().getWires();},_handleNewWire:function(_e02){var _e03=_e02.payload;var _e04=this.getIWidgetInstance().getWireModel();_e04.registerTargets(_e03.targetWidget,_e03.targetEvent,_e03.sourceEvent);this.commit();var _e05=_e03.sourceEvent;var _e06=this._getPublicEvents();if(!_e06){return false;}var _e07=_e06.find(_e05);if(_e07){var _e08=_e07.getOnNewWire();if(_e08){var _e09=this._getHandlerScope(_e08);if(_e09&&dojo.isFunction(_e09)){_e09(_e02);}else{if(_e09&&dojo.isObject(_e09)){_e09[_e08](_e02);}}return true;}}return false;},_handleRemoveWire:function(_e0a){var _e0b=_e0a.payload;var _e0c=_e0b.targetEvent;if(this.id==_e0b.sourceWidget){_e0c=_e0b.sourceEvent;}var _e0d=this._getPublicEvents()||null;if(!_e0d){return false;}var _e0e=_e0d.find(_e0c)||null;if(_e0e){var _e0f=_e0e.getOnRemoveWire();if(_e0f){var _e10=this._getHandlerScope(_e0f);if(_e10&&dojo.isFunction(_e10)){_e10(_e0a);}else{if(_e10&&dojo.isObject(_e10)){_e10[_e0f](_e0a);}}return true;}}return false;},_getShareableItemSets:function(){if(this.shareableItemSets){return this.shareableItemSets;}this.shareableItemSets={};this.shareableItemSets.mapping={};this.shareableItemSets.itemsets={};this.shareableItemSets.listeners={};var _e11=this.widgetDef._getShareableItemSets();if(_e11){var _e12=null;for(var i in _e11){if(Object.prototype.hasOwnProperty.call(_e11,i)){_e12=new com.ibm.mm.iwidget.itemset.ShareableItemSetFactory(this,_e11[i]);var _e13=_e11[i].onItemSetChanged||null;if(_e13){if(!this.shareableItemSets.listeners[i]){this.shareableItemSets.listeners[i]=[];}this.shareableItemSets.listeners[i].push(_e12.addListener(_e13));}this.shareableItemSets.itemsets[i]=_e12;var _e14=_e11[i].alias||null;if(_e14){this.shareableItemSets.mapping[_e14]=_e14;}}}}return this.shareableItemSets;},_getShareableItemSet:function(id){var _e15=this._getShareableItemSets();if(_e15&&_e15.mapping[id]){var _e16=_e15.mapping[id];return _e15.itemsets[_e16];}else{if(_e15&&_e15.itemsets[id]){return _e15.itemsets[id];}}var _e17=new com.ibm.mm.iwidget.itemset.ShareableItemSetFactory(this.widgetwrapper,null,name);_e15.itemsets[id]=_e17;return _e15.itemsets[id];},_executeCallbackQueue:function(){com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").executeCallbackQueue(this.id);},_handleSaveMode:function(){var _e18=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _e19=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_e18,this.id);var _e1a=_e19.getWidgetMode();if(_e1a!=this.currentMode){if(!((_e1a===null)&&(this.currentMode==com.ibm.mm.iwidget.Constants.mode.VIEW))){_e19.setWidgetMode(this.currentMode);var _e1b=_e18.commit();_e1b.start();}}},_transform:function(_e1c,_e1d){var _e1e=this.getPublicEvent(_e1c);if(!(!_e1e||!_e1e.type||!_e1d.type)){var _e1f=new com.ibm.mm.iwidget.IEventImpl(_e1e.name,_e1e.type,_e1d.payload,null);var _e20=new com.ibm.mm.enabler.utils.EventTransformerImpl();var _e21=_e20._transform(_e1d,_e1f)||null;if(_e21){_e1d=_e21;}}return _e1d;},_getModeFromNavStateModel:function(){var _e22=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _e23=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_e22,this.id);return _e23.getWidgetMode();}});com.ibm.mm.iwidget.widget.IWidgetWrapperImpl=com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl;if((ibmConfig.enablerLayerModules)&&(dojo.indexOf(ibmConfig.enablerLayerModules,"CoreModel")>=0)){dojo["require"]("com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl");}}if(!dojo._hasResource["com.ibm.mashups.livetext.CallbackModel"]){dojo._hasResource["com.ibm.mashups.livetext.CallbackModel"]=true;dojo.provide("com.ibm.mashups.livetext.CallbackModel");dojo.declare("com.ibm.mashups.livetext.CallbackModel",null,{preProcessCallbackFunc:function(_e24,_e25,_e26){},postProcessCallbackFunc:function(_e27,_e28,_e29,_e2a){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry_API"]){dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry_API"]=true;dojo.provide("com.ibm.mashups.livetext.ConfigEntry_API");dojo.provide("com.ibm.mashups.livetext.ConfigEntry");dojo.declare("com.ibm.mashups.livetext.ConfigEntry",null,{constructor:function(_e2b,_e2c,_e2d,path,_e2e,_e2f,id){},isEqual:function(_e30){}});}if(!dojo._hasResource["com.ibm.mm.livetext.ConfigEntryImpl"]){dojo._hasResource["com.ibm.mm.livetext.ConfigEntryImpl"]=true;dojo.provide("com.ibm.mm.livetext.ConfigEntryImpl");dojo.declare("com.ibm.mm.livetext.ConfigEntryImpl",com.ibm.mashups.livetext.ConfigEntry,{constructor:function(_e31,_e32,_e33,path,_e34,_e35,id){this.match=_e31;this.wait=_e35;this.procEnc=_e32;this.mod=_e33;this.path=path;this.baseCls=_e34;this.id=id;},isEqual:function(_e36){return _e36&&_e36.match==this.match&&_e36.wait==this.wait&&_e36.procEnc==this.procEnc&&_e36.mod==this.mod&&_e36.path==this.path&&_e36.baseCls==this.baseCls&&_e36.id==this.id;}});com.ibm.mashups.livetext.ConfigEntry=com.ibm.mm.livetext.ConfigEntryImpl;}if(!dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry"]){dojo._hasResource["com.ibm.mashups.livetext.ConfigEntry"]=true;dojo.provide("com.ibm.mashups.livetext.ConfigEntry");}if(!dojo._hasResource["com.ibm.mashups.livetext.Exception"]){dojo._hasResource["com.ibm.mashups.livetext.Exception"]=true;dojo.provide("com.ibm.mashups.livetext.Exception");dojo.declare("com.ibm.mashups.livetext.Exception",null,{constructor:function(_e37,_e38){},getMessage:function(_e39){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.LivetextBatchModel"]){dojo._hasResource["com.ibm.mashups.livetext.LivetextBatchModel"]=true;dojo.provide("com.ibm.mashups.livetext.LivetextBatchModel");dojo.declare("com.ibm.mashups.livetext.LivetextBatchModel",null,{processTag:function(_e3a,_e3b){},unprocessTag:function(_e3c){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.LivetextModel"]){dojo._hasResource["com.ibm.mashups.livetext.LivetextModel"]=true;dojo.provide("com.ibm.mashups.livetext.LivetextModel");dojo.declare("com.ibm.mashups.livetext.LivetextModel",null,{processTag:function(node){},unprocessTag:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.livetext.ServiceModel_API"]){dojo._hasResource["com.ibm.mashups.livetext.ServiceModel_API"]=true;dojo.provide("com.ibm.mashups.livetext.ServiceModel_API");dojo.provide("com.ibm.mashups.livetext.ServiceModel");dojo.declare("com.ibm.mashups.livetext.ServiceModel",null,{SERVICE_NAME:"livetextService",init:function(_e3d){},onTagChanged:function(_e3e,_e3f,_e40,_e41){},onUnchangeTag:function(node,_e42,_e43,_e44,_e45){},onTagContentChanged:function(_e46,_e47,_e48,_e49){},onAddConfigEntry:function(_e4a,_e4b){},onRemoveConfigEntry:function(_e4c){}});com.ibm.mashups.livetext.ServiceModel.SERVICE_NAME=com.ibm.mashups.livetext.ServiceModel.prototype.SERVICE_NAME;}if(!dojo._hasResource["com.ibm.mm.livetext.ServiceModelImpl"]){dojo._hasResource["com.ibm.mm.livetext.ServiceModelImpl"]=true;dojo.provide("com.ibm.mm.livetext.ServiceModelImpl");dojo.declare("com.ibm.mm.livetext.ServiceModelImpl",com.ibm.mashups.livetext.ServiceModel,{_initialized:false,_tagTypes:null,_rootContainer:null,tagChanged:"/com/ibm/mashups/livetext/livetextchanged",unchangeTag:"/com/ibm/mashups/livetext/livetextunchange",tagStatusChange:"/com/ibm/mashups/livetext/livetextchanged",tagContentChanged:"/com/ibm/mashups/livetext/livetextcontentchanged",entryAdded:"/com/ibm/mashups/livetext/configentryadded",entryRemoved:"/com/ibm/mashups/livetext/configentryremoved",constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLoggable=this.LOGGER.isLoggable(this.LOG_LEVEL);this.LogLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;if(com.ibm.mm.livetext.ServiceModelStatic){console.warn("WARNING: Do not create the LiveText Framework multiple times!");return;}com.ibm.mm.livetext.ServiceModelStatic=true;dojo.subscribe(this.entryAdded,this,"onAddConfigEntry");dojo.subscribe(this.entryRemoved,this,"onRemoveConfigEntry");},init:function(_e4d){if(this._initialized){console.warn("WARNING: Do not initialize the LiveText Framework multiple times!");return;}this._initialized=true;if(!_e4d){_e4d={};}this._loadTags(_e4d);dojo.subscribe(this.tagChanged,this,"onTagChanged");dojo.subscribe(this.unchangeTag,this,"onUnchangeTag");dojo.subscribe(this.tagContentChanged,this,"onTagContentChanged");dojo.publish(this.tagContentChanged,[_e4d.node||document,("continueAfterException" in _e4d)?_e4d.continueAfterException:true,_e4d.preProcessCallbackFunc,_e4d.postProcessCallbackFunc]);},_getNodes:function(node,_e4e){var k=[];if(_e4e=="undfined"||!_e4e){console.error("Why are we having tagType undefined ::::");return k;}var _e4f;var a;var _e50=0;if(_e4e.processEnclosedTags!="undefined"&&_e4e.processEnclosedTags){var _e51=_e4e.match;a=[];_e4f=dojo.query(_e51,node);_e4f.forEach(function(node,_e52,_e53){a.push(node);});return a;}else{var _e54=_e4e.match.split(",");a=[];var b=[];for(_e50=0,l=_e54.length;_e50<l;_e50++){_e4f=dojo.query(_e54[_e50]+" "+_e54[_e50],node);_e4f.forEach(function(node,_e55,_e56){a.push(node);});var _e57=dojo.query(_e54[_e50],node);_e57.forEach(function(node,_e58,_e59){b.push(node);});}var _e5a,_e5b;while(a.length>0){_e5a=a[0];_e5b=0;while(_e5b<b.length){if(_e5a==b[_e5b]){a.splice(0,1);b.splice(_e5b,1);break;}else{_e5b++;}}}return b;}},onTagChanged:function(node,_e5c,_e5d,_e5e){var _e5f="onTagChanged";if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e5f,"inside onTagChanged:"+node+":"+_e5c+":"+_e5d+":"+_e5e);}var tag=null;for(var _e60=0,l=this._tagTypes.length;_e60<l;_e60++){tag=this._tagTypes[_e60];if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e5f,"Calling _processTypeTag for tag"+tag.baseClass);}this._processTypeTag(node,tag,_e5c,_e5d,_e5e,true);}},onUnchangeTag:function(node,_e61,_e62,_e63,_e64){var tag=null;for(var _e65=0,l=this._tagTypes.length;_e65<l;_e65++){tag=this._tagTypes[_e65];this._unprocessTypeTag(node,tag,_e61,_e62,_e63,false);}if(dojo.isFunction(_e64)){_e64(node);}},onTagContentChanged:function(node,_e66,_e67,_e68){var _e69="onTagContentChanged";if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e69,"inside onTagContentChanged"+node+":"+_e66+":"+_e67+":"+_e68);}var tag=null;for(var _e6a=0,l=this._tagTypes.length;_e6a<l;_e6a++){tag=this._tagTypes[_e6a];this._processTypeTag(node,tag,_e66,_e67,_e68,false);}},_processTypeTag:function(node,tag,_e6b,_e6c,_e6d,_e6e){tag=tag||null;if(tag===null){return;}var _e6f="_processTypeTag";var _e70=[];if(_e6e&&this._checkRoot(node,tag)){_e70[0]=node;}_e70=_e70.concat(this._getNodes(node,tag));var id=tag.id||null;if(id===null){id="";}if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e6f,"inside _processTypeTag length of nodes is :${0}: and base class is :${1}: and id of tag is :${2}:",[_e70.length,tag.baseClass,id]);}var _e71=[];_e71=_e71.concat(_e70);if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e6f,"inside _processTypeTag found :${0}: tags that match :${1}:",[_e71.length,tag.match]);}if(_e71.length>0){tag.loaded=tag.loaded||null;if(tag.loaded===null){this._loadTagHandler(tag);}var _e72=[];if(dojo.isFunction(_e6c)){try{_e6c(node,_e71,tag);}catch(error1){console.debug(error1);}}if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){if(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel){this.LOGGER.trace(_e6f,"calling processTag with tagHanlder ${0}",[tag.tagHandler.processTag]);}}if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e6f,"tagHanlder is Instanceof of LivetextBatchModel ${0}:",[(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel)]);}if(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel){try{tag.tagHandler.processTag(_e70,tag);}catch(error){this.LOGGER.trace("_processTypeTag","processTag tag:"+tag.baseClass+" error:"+error.message);_e72[_e72.length]=error;}}else{for(var _e73=0,l=_e70.length;_e73<l;_e73++){try{tag.tagHandler.processTag(_e70[_e73]);}catch(error2){this.LOGGER.trace("_processTypeTag","processTag tag:"+tag.baseClass+" error:"+error2.message);_e72[_e72.length]=error2;if(_e6b){break;}}}}if(dojo.isFunction(_e6d)){try{_e6d(node,_e71,_e72,tag);}catch(error3){console.debug(error3);}}}},_unprocessTypeTag:function(node,tag,_e74,_e75,_e76,_e77){var tags=[];if(_e77&&this._checkRoot(node,tag)){tags[0]=node;}tags=tags.concat(this._getNodes(node,tag));var _e78=[];_e78=_e78.concat(tags);var _e79=[];if(dojo.isFunction(_e75)){try{_e75(node,_e78,tag);}catch(error1){console.debug(error1);}}if(_e78.length>0){tag.loaded=tag.loaded||null;if(tag.loaded===null){this._loadTagHandler(tag);}if(tag.tagHandler instanceof com.ibm.mashups.livetext.LivetextBatchModel){try{tag.tagHandler.unprocessTag(nodes,tag);}catch(error2){_e79[_e79.length]=error2;}}else{for(var _e7a=0,l=tags.length;_e7a<l;_e7a++){try{tag.tagHandler.unprocessTag(tags[_e7a]);}catch(error3){_e79[_e79.length]=error3;if(_e74){break;}}}}}if(dojo.isFunction(_e76)){try{_e76(node,_e78,_e79,tag);}catch(error4){console.debug(error4);}}},_checkRoot:function(node,tag){var _e7b=false;node=node||null;if(node!==null&&node.nodeType){var copy={};if(!this._rootContainer){this._rootContainer=dojo.create("div",{style:{display:"none"}},dojo.body());}copy.copyNodeParent=document.createElement("div");this._rootContainer.appendChild(copy.copyNodeParent);copy.copyOfNode=node.cloneNode(false);copy.copyNodeParent.appendChild(copy.copyOfNode);copy.result=this._getNodes(copy.copyNodeParent,tag);copy.result=copy.result||null;if(copy.result!==null&&copy.result.length>0){_e7b=true;}dojo.destroy(copy.copyOfNode);dojo.destroy(copy.copyNodeParent);delete copy.copyOfNode;delete copy.copyNodeParent;delete copy.result;}return _e7b;},_loadTags:function(){var _e7c="_loadTags";this._tagTypes=this._tagTypes||null;if(this._tagTypes===null){var _e7d=this;if(ibmConfig.livetextService){this._tagTypes=ibmConfig.livetextService;}else{dojo.xhrGet({url:dojo.moduleUrl("com.ibm.mm.livetext","tagservice.entries.cfg"),ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},handleAs:"text",sync:true,load:function(_e7e){_e7d._tagTypes=dojo.fromJson(_e7e);if(_e7d.LOGGER.isLoggable(_e7d.LogLevel.TRACE)){_e7d.LOGGER.trace(_e7c,"got Inside _loadTags of ServiceModelImpl"+_e7d._tagTypes);}},error:function(data){console.dir(data);}});}}},onAddConfigEntry:function(_e7f,_e80){this._loadTags();if(!dojo.some(this._tagTypes,function(_e81){return _e7f.isEqual(_e81);})){if(_e80){this._tagTypes.unshift({"match":_e7f.match,"processEnclosedTags":_e7f.procEnc,"waitOnPreTag":_e7f.wait,"module":_e7f.mod,"path":_e7f.path,"baseClass":_e7f.baseCls,"id":_e7f.id});}else{this._tagTypes.push({"match":_e7f.match,"processEnclosedTags":_e7f.procEnc,"waitOnPreTag":_e7f.wait,"module":_e7f.mod,"path":_e7f.path,"baseClass":_e7f.baseCls,"id":_e7f.id});}}},onRemoveConfigEntry:function(_e82){this._loadTags();for(var i=0;;i<this._tagTypes.length){if(_e82.isEqual(this._tagTypes[i])){this._tagTypes[i].splice(i,1);}else{i++;}}},parseDom:function(_e83,node){dojo.publish(this.tagChanged,[node]);},_loadTagHandler:function(tag){var _e84="_loadTagHandler";if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e84,"inside _loadTagHandler:${0}:${1}:${2}:${3}",[tag.match,tag.baseClass,tag.module,tag.path]);}try{dojo.registerModulePath(tag.module,tag.path);dojo["require"](tag.baseClass);var _e85="{create:function(){return new "+tag.baseClass+"()}}";var _e86=dojo.fromJson(_e85);tag.tagHandler=_e86.create();if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e84,"loaded tagHandler:${0}:",[tag.tagHandler]);}tag.loaded=true;}catch(e){if(this.LOGGER.isLoggable(this.LogLevel.SEVERE)){this.LOGGER.severe(_e84,"Loading failed for path :${0}: and module :${1}:",[tag.path,tag.module]);}}}});com.ibm.mashups.services.ServiceManager.setService(com.ibm.mashups.livetext.ServiceModel.SERVICE_NAME,"com.ibm.mm.livetext.ServiceModelImpl");}if(!dojo._hasResource["com.ibm.mashups.livetext.ServiceModel"]){dojo._hasResource["com.ibm.mashups.livetext.ServiceModel"]=true;dojo.provide("com.ibm.mashups.livetext.ServiceModel");}if(!dojo._hasResource["tagservices.skins"]){dojo._hasResource["tagservices.skins"]=true;dojo.provide("tagservices.skins");dojo.provide("com.ibm.mm.livetext.skins");dojo.declare("tagservices.skins",null,{skinIdPrefix:"mm_ibm_skin_",allSkins:[],allVars:[],tempSkinHtmlObj:null,tempSkinJsObj:null,isProcessing:0,waitingList:[],subscribeHandler:null,skinAttachEvent:"/skinservice/attachEnd",LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("tagservices.skins"),processTag:function(tag){this.tempSkinHtmlObj={};this.tempSkinJsObj={};if(!tag){return;}var _e87=tag.getAttribute("skin");this._getSkinTemplate(_e87,tag);},unprocessTag:function(tag){var _e88=this._findSkinNode(tag);var _e89=_e88.parentNode;_e89.insertBefore(tag,_e88);com.ibm.mm.enabler.utils.Dom.destroyNode(_e88);},_findSkinNode:function(node){var _e8a=node;while(_e8a&&_e8a.id!=this.skinIdPrefix+node.id){_e8a=_e8a.parentNode;}return _e8a;},_getSkinTemplate:function(_e8b,tag){var _e8c=this.allSkins[_e8b];if(!_e8c){var _e8d=this;var _e8e=this._getSkinResourceUrl(_e8b,"skin.html");var _e8f=this._getSkinResourceUrl(_e8b,"skin.js");dojo.xhrGet({url:_e8e,handleAs:"text",sync:true,load:function(_e90){dojo.xhrGet({url:_e8f,handleAs:"json",sync:true,load:function(_e91){_e90=_e90.replace(/<!--.*-->\s*/,"");_e8d.allSkins[_e8b]=_e90;_e8d.allVars[_e8b]=_e91;_e8d.startAttatchSkin(_e8b,tag);},error:function(data){_e8d.allSkins[_e8b]=_e90;_e8d.startAttatchSkin(_e8b,tag);}});},error:function(data){this.LOGGER.severe("_getSkinTemplate",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_LOAD_TEMPLATE_FAIL_1,[data]));}});}else{this.startAttatchSkin(_e8b,tag);}},startAttatchSkin:function(_e92,tag){if(this.isProcessing===0){this.executeReplaceSkin(_e92,tag);}else{this.addToWaitingList(_e92,tag);}},chooseNext:function(){if(this.waitingList.length!==0){var _e93=this.waitingList.pop();this.executeReplaceSkin(_e93.skin,_e93.tag);}},addToWaitingList:function(_e94,tag){if(!this.subscribeHandler){this.subscribeHandler=dojo.subscribe(this.skinAttachEvent,this,"chooseNext");}var _e95={};_e95.skin=_e94;_e95.tag=tag;this.waitingList.push(_e95);},executeReplaceSkin:function(_e96,tag){this.isProcessing=1;var temp=this.allSkins[_e96];if(temp){var _e97=this._getNodeToReplace(tag);var _e98=_e97.parentNode;var anId=dojox.uuid.generateRandomUuid().replace(/\-/g,"");var args=this._getArgs(_e96,tag,anId);if(!args){this.LOGGER.severe("executeReplaceSkin",com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_NOT_EXIST_0);return;}var _e99=this._getSkinResourceUrl(_e96,"skin.css");com.ibm.mm.builder.utils.htmlUtil.loadCss(_e99);if(builderConfig.isBidi){var _e9a=this._getSkinResourceUrl(_e96,"skin_rtl.css");com.ibm.mm.builder.utils.htmlUtil.loadCss(_e9a);}var _e9b=dojo.string.substitute(temp,args);_e9b=_e9b.replace(/\/>/g,"></div>");var _e9c=this._getNodeFromMarkup(_e9b);dojo.addClass(_e9c,"mumWidgetTitleBar");_e98.replaceChild(_e9c,_e97);var _e9d=dojo.byId(anId);_e9d.parentNode.replaceChild(tag,_e9d);if(!(dojo.hasClass(_e97,"iw-iWidget")||dojo.hasClass(_e97,"mm_iWidget"))){}var para={};para.widgetId=tag.id;para.skinNodeId=_e9c.id;para.skinParam=args;com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.skinLoaded",para);}this.isProcessing=0;dojo.publish(this.skinAttachEvent,[null]);},_getSkinResourceUrl:function(_e9e,_e9f){try{var _ea0=com.ibm.mm.builder.utils.skinUtil._getSkinModel();var skin=com.ibm.mm.builder.utils.skinUtil.getSkinNode(_e9e)||com.ibm.mm.builder.utils.skinUtil.getDefaultSkin();var url=_ea0.findResourceURL(skin,_e9f);return url;}catch(ex){this.LOGGER.severe("_getSkinResourceUrl",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_LOAD_ROOT_FAIL_1,[ex.message]));}return null;},_getArgs:function(_ea1,tag,anId){var args={};var _ea2=this.allVars[_ea1];if(_ea2){dojo.mixin(args,_ea2);}args.widgetBody="<div id='"+anId+"'/>";args.skinId=this.skinIdPrefix+tag.id;if(!args.process){args.process=function(_ea3,_ea4){};}args.process(_ea1,tag.id);return args;},_getNodeMarkup:function(tag){var _ea5=document.createElement("div");_ea5.appendChild(tag.cloneNode(true));var _ea6=_ea5.innerHTML;_ea5.removeChild(_ea5.firstChild);return _ea6;},_getNodeFromMarkup:function(_ea7){var _ea8=document.createElement("div");_ea8.innerHTML=_ea7;return _ea8.removeChild(_ea8.firstChild);},_getNodeToReplace:function(tag){var node=dojo.byId(this.skinIdPrefix+tag.id);if(!node){node=tag;}return node;},_showParent:function(node){var _ea9=node.parentNode;while(_ea9){_ea9=_ea9.parentNode;}}});}if(!dojo._hasResource["tagservices.widgets"]){dojo._hasResource["tagservices.widgets"]=true;dojo.provide("tagservices.widgets");dojo.provide("com.ibm.mm.livetext.widgets");dojo.declare("tagservices.widgets",null,{queue:[],queueHandle:null,queueRendering:true,constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _eaa=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);queueRendering=_eaa.getValue(com.ibm.mashups.enabler.services.ConfigConstants.QUEUE_RENDERING);},processTag:function(tag){var _eab="processTag";var _eac=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_eac){this.LOGGER.entering(_eab,arguments);}var id=dojo.attr(tag,"id");if(typeof id!="undefined"){var _ead=dojo.attr(tag,"lazyLoad");var _eae=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);if(_eae===null){_eae=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().createWidget(tag);}if(_eae){if(!_ead||(_ead&&_ead!="true")){if((queueRendering===true)&&!dojo.hasClass(tag,"iw-Standalone")){this.queue.push({priority:dojo.position(tag).y,widgetId:id});this.processQueue(false);}else{com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().renderWidget(_eae);}}else{_eae.lazyLoad=true;}}}},processQueue:function(_eaf){if(this.queue.length>0){if(_eaf){while(this.queue.length>0){var json=this.queue.shift();var _eb0=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(json.widgetId);if(_eb0){com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().renderWidget(_eb0);break;}}}else{this.queue.sort(function(_eb1,_eb2){return _eb1.priority-_eb2.priority;});}if(!this.queueHandle){var that=this;this.queueHandle=setTimeout(function(){that.queueHandle=setTimeout(function(){that.queueHandle=null;dojo.hitch(that,that.processQueue)(true);},5);},0);}}},unprocessTag:function(tag){var ns=["iw-","mm_"];for(var n=0,l=ns.length;n<l;n++){var _eb3=dojo.query("."+ns[n]+iwConstants.CSSCLASS_INSTANCE.iwContent,tag);for(var i=0;i<_eb3.length;i++){com.ibm.mm.enabler.utils.Dom.destroyNode(_eb3[i]);}}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.Primeable"]){dojo._hasResource["com.ibm.mashups.enabler.Primeable"]=true;dojo.provide("com.ibm.mashups.enabler.Primeable");dojo.declare("com.ibm.mashups.enabler.Primeable",null,{setPrimingData:function(data){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.SelectionLocator"]){dojo._hasResource["com.ibm.mashups.enabler.model.SelectionLocator"]=true;dojo.provide("com.ibm.mashups.enabler.model.SelectionLocator");dojo.declare("com.ibm.mashups.enabler.model.SelectionLocator",null,{findDefaultAcceptParent:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.Constants");dojo.declare("com.ibm.mashups.enabler.navigation.Constants",null,{NAVIGATION_PAGE:"NavigationPage",NAVIGATION_LABEL:"NavigationLabel",NAVIGATION_URL:"NavigationURL"});com.ibm.mashups.enabler.navigation.Constants=new com.ibm.mashups.enabler.navigation.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.NavigationModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.NavigationModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.NavigationModel_API");dojo.provide("com.ibm.mashups.enabler.model.NavigationModel");dojo.declare("com.ibm.mashups.enabler.model.NavigationModel",[com.ibm.mashups.enabler.TreeModelController,com.ibm.mashups.enabler.model.SelectionLocator,com.ibm.mashups.enabler.Discardable,com.ibm.mashups.enabler.Invalidatable,com.ibm.mashups.enabler.Primeable],{setPrimingData:function(data){},hasLayoutModel:function(_eb4){},getLayoutModel:function(_eb5){},getSharedRoot:function(){},findDefaultAcceptParent:function(){},confirmExport:function(_eb6){},create:function(_eb7){},commit:function(){}});com.ibm.mashups.enabler.model.NavigationModel.TOPIC_BASE="/"+("com.ibm.mashups.enabler.model.NavigationModel".replace(/\./ig,"/"))+"/";com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_NODE=com.ibm.mashups.enabler.model.NavigationModel.TOPIC_BASE+"invalidateNode";com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_CHILDREN=com.ibm.mashups.enabler.model.NavigationModel.TOPIC_BASE+"invalidateChildren";}if(!dojo._hasResource["com.ibm.mashups.enabler.MetaData_API"]){dojo._hasResource["com.ibm.mashups.enabler.MetaData_API"]=true;dojo.provide("com.ibm.mashups.enabler.MetaData_API");dojo.provide("com.ibm.mashups.enabler.MetaData");dojo.declare("com.ibm.mashups.enabler.MetaData",null,{getMetaDataNames:function(){},getMetaData:function(name){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.MetaData"]){dojo._hasResource["com.ibm.mashups.enabler.MetaData"]=true;dojo.provide("com.ibm.mashups.enabler.MetaData");}if(!dojo._hasResource["com.ibm.mashups.enabler.ModifiableMetaData_API"]){dojo._hasResource["com.ibm.mashups.enabler.ModifiableMetaData_API"]=true;dojo.provide("com.ibm.mashups.enabler.ModifiableMetaData_API");dojo.provide("com.ibm.mashups.enabler.ModifiableMetaData");dojo.declare("com.ibm.mashups.enabler.ModifiableMetaData",com.ibm.mashups.enabler.MetaData,{setMetaData:function(name,_eb8){},confirmSetMetaData:function(name,_eb9){},removeMetaData:function(name){},confirmRemoveMetaData:function(name){}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.meta.MetaDataMetaImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.meta.MetaDataMetaImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.meta.MetaDataMetaImpl");dojo.declare("com.ibm.mm.enabler.persistence.meta.MetaDataMetaImpl",[],{getMetadataNames:function(){dojo.deprecated("com.ibm.mashups.enabler.ModifiableMetaData.getMetadataNames","getMetadataNames() is deprecated, please use getMetaDataNames()");return this._getMDMContext().getMetaDataNames();},getMetadata:function(name){dojo.deprecated("com.ibm.mashups.enabler.ModifiableMetaData.getMetadata","getMetadata() is deprecated, please use getMetaData()");return this._getMDMContext().getMetaData(name);},confirmSetMetaData:function(name,_eba){return this._getMDMContext().hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},confirmRemoveMetaData:function(name){return this._getMDMContext().hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},_getMDMContext:function(){return dojo.isFunction(this._getBaseContext)?this._getBaseContext():this;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.RoleType"]){dojo._hasResource["com.ibm.mashups.enabler.ac.RoleType"]=true;dojo.provide("com.ibm.mashups.enabler.ac.RoleType");dojo.declare("com.ibm.mashups.enabler.ac.RoleType",null,{USER:"USER",PRIVILEGED_USER:"PRIVILEGED USER",EDITOR:"EDITOR",MANAGER:"MANAGER",ADMIN:"ADMINISTRATOR",UNKNOWN:"UNKNOWN"});com.ibm.mashups.enabler.ac.RoleType=new com.ibm.mashups.enabler.ac.RoleType();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.EffectiveAccess_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.EffectiveAccess_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.EffectiveAccess_API");dojo.provide("com.ibm.mashups.enabler.ac.EffectiveAccess");dojo.declare("com.ibm.mashups.enabler.ac.EffectiveAccess",null,{hasRole:function(_ebb){},isPrivate:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.EffectiveAccess"]){dojo._hasResource["com.ibm.mashups.enabler.ac.EffectiveAccess"]=true;dojo.provide("com.ibm.mashups.enabler.ac.EffectiveAccess");}if(!dojo._hasResource["com.ibm.mm.enabler.utils.APIEnforcementHelperImpl"]){dojo._hasResource["com.ibm.mm.enabler.utils.APIEnforcementHelperImpl"]=true;dojo.provide("com.ibm.mm.enabler.utils.APIEnforcementHelperImpl");dojo.declare("com.ibm.mm.enabler.utils.APIEnforcementHelperImpl",null,{constructor:function(){this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this._promptMode=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.API_ENFORCEMENT_MODE);},enforceDefined:function(_ebc,text,_ebd){if(typeof _ebc=="undefined"){this._promptViolation(text,_ebd);}},enforceDefinedNotNull:function(_ebe,text,_ebf){if(_ebe===null||typeof _ebe=="undefined"){this._promptViolation(text,_ebf);}},_promptViolation:function(text,_ec0){var _ec1=dojo.string.substitute(text,_ec0);if(this._promptMode==com.ibm.mashups.enabler.services.ConfigConstants.API_ENFORCEMENT_MODE_ERROR){throw new Error(_ec1);}else{console.warn(_ec1);}},invalidate:function(){this._promptMode=this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.API_ENFORCEMENT_MODE);}});com.ibm.mm.enabler.utils.APIEnforcementHelper=new com.ibm.mm.enabler.utils.APIEnforcementHelperImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.ac.EffectiveAccessImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.EffectiveAccessImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.EffectiveAccessImpl");dojo.declare("com.ibm.mm.enabler.ac.EffectiveAccessImpl",com.ibm.mashups.enabler.ac.EffectiveAccess,{constructor:function(){var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns_ac=nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_AC]);this.EDIT_LINK="atom:link[@rel='edit']";this.XPATH0="atom:content/*";this.XPATH1="atom:content/*/ac:allowed-access";this.XPATH2="atom:content/*/ac:allowed-access/ac:access-level";this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.enforcementHelper=com.ibm.mm.enabler.utils.APIEnforcementHelper;},_init:function(data){this.xmlData=data;this.XPATH0="atom:content";this.XPATH1="atom:content/ac:allowed-access";this.XPATH2="atom:content/ac:allowed-access/ac:access-level";},hasRole:function(_ec2){this.enforcementHelper.enforceDefinedNotNull(_ec2,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["roletype",this.declaredClass,"hasRole(roletype)"]);if(dojo.isString(_ec2)){_ec2=_ec2.toUpperCase();}if(this._hasAllowedAccess()){var _ec3=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.XPATH2,this.xmlData,this.ns_ac);if(_ec3&&_ec3.length>0){for(var i=0,l=_ec3.length;i<l;i++){var type=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_ec3[i],"ac:type","type",this.ns_ac.ac);if(type&&type.toUpperCase()==_ec2){return true;}}}return false;}else{return !!(_ec2==com.ibm.mashups.enabler.ac.RoleType.USER||this._hasEditLink());}},_isPrivate:function(){var _ec4=false;var _ec5=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.XPATH1,this.xmlData,this.ns_ac);if(_ec5){_ec4=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_ec5,"ac:private","private",this.ns_ac.ac)=="true"?true:false;}return _ec4;},_hasEditLink:function(){return com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.EDIT_LINK,this.xmlData,this.ns_ac)?true:false;},_hasAllowedAccess:function(){return com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.XPATH1,this.xmlData,this.ns_ac)?true:false;},_setRole:function(_ec6){if(dojo.isString(_ec6)){_ec6=_ec6.toUpperCase();}var _ec7=this._createAllowedAccess();var expr=this.XPATH2+"[ac:type='"+_ec6+"']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns_ac);if(!node){var _ec8=com.ibm.mm.enabler.utils.Utils.createNode("ac:access-level",this.ns_ac.ac);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData.ownerDocument,_ec8,"ac:type","type",this.ns_ac.ac,_ec6);_ec7.appendChild(_ec8);}},_setUserOwned:function(_ec9){var _eca=this._createAllowedAccess();if(_eca){com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData.ownerDocument,_eca,"ac:user-owned","user-owned",this.ns_ac.ac,_ec9?"true":"false");}},_createAllowedAccess:function(){var _ecb=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.XPATH1,this.xmlData,this.ns_ac);if(!_ecb){_ecb=com.ibm.mm.enabler.utils.Utils.createNode("ac:allowed-access",this.ns_ac.ac);var _ecc=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.XPATH0,this.xmlData,this.ns_ac);if(_ecc){_ecc.appendChild(_ecb);}else{_ecb=null;}}return _ecb;}});}if(!dojo._hasResource["com.ibm.mm.enabler.MetaDataImpl"]){dojo._hasResource["com.ibm.mm.enabler.MetaDataImpl"]=true;dojo.provide("com.ibm.mm.enabler.MetaDataImpl");dojo.declare("com.ibm.mm.enabler.MetaDataImpl",[com.ibm.mm.enabler.persistence.meta.MetaDataMetaImpl,com.ibm.mm.enabler.ac.EffectiveAccessImpl],{constructor:function(){this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_SPACE);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.mdi_ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML,nsf.NS_CA]));this.MODEL_METADATA="atom:content/ca:application/ca:meta-data";this.MODEL_METADATA_BASE="ca:meta-data";this.NAME_ATTR="ca:name";},setMetadata:function(name,_ecd){dojo.deprecated("com.ibm.mashups.enabler.ModifiableMetaData.setMetadata","setMetadata() is deprecated, please use setMetaData()");return this.setMetaData(name,_ecd);},removeMetadata:function(name){dojo.deprecated("com.ibm.mashups.enabler.ModifiableMetaData.removeMetadata","removeMetadata() is deprecated, please use removeMetaData()");this.removeMetaData(name);},getMetaDataNames:function(){var _ece=[];var expr=this.MODEL_METADATA+"[@"+this.NAME_ATTR+"]";var md=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.mdi_ns);if(md){for(var i=0,l=md.length;i<l;++i){_ece.push(md[i].getAttribute(this.NAME_ATTR));}}return _ece;},getMetaData:function(name){var expr=this.MODEL_METADATA+"[@"+this.NAME_ATTR+"='"+name+"']";var md=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.mdi_ns);return md?com.ibm.mm.enabler.utils.Dom.textContent(md):null;},setMetaData:function(name,_ecf){var _ed0=null;var expr=this.MODEL_METADATA+"[@"+this.NAME_ATTR+"='"+name+"']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.mdi_ns);if(node){_ed0=com.ibm.mm.enabler.utils.Dom.textContent(node);com.ibm.mm.enabler.utils.Dom.textContent(node,_ecf);}else{var _ed1=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:content/*",this.xmlData,this.mdi_ns);if(_ed1){var _ed2=this.xmlData.ownerDocument;var _ed3=com.ibm.mm.enabler.utils.Dom.createElement(_ed2,this.MODEL_METADATA_BASE,this.mdi_ns.ca);var pos=this.NAME_ATTR.indexOf(":");var _ed4=this.NAME_ATTR.slice(pos+1);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_ed2,_ed3,this.NAME_ATTR,_ed4,this.mdi_ns.ca,name);com.ibm.mm.enabler.utils.Dom.textContent(_ed3,_ecf);_ed1.appendChild(_ed3);}}this._setDirty();return _ed0;},removeMetaData:function(name){var _ed5=null;var expr=this.MODEL_METADATA+"[@"+this.NAME_ATTR+"='"+name+"']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.mdi_ns);if(node){_ed5=com.ibm.mm.enabler.utils.Dom.textContent(node);dojo.destroy(node);this._setDirty();}return _ed5;}});}if(!dojo._hasResource["com.ibm.mm.enabler.MetaDataImpl2"]){dojo._hasResource["com.ibm.mm.enabler.MetaDataImpl2"]=true;dojo.provide("com.ibm.mm.enabler.MetaDataImpl2");dojo.declare("com.ibm.mm.enabler.MetaDataImpl2",[com.ibm.mm.enabler.persistence.meta.MetaDataMetaImpl,com.ibm.mm.enabler.ac.EffectiveAccessImpl],{constructor:function(){this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.mdi_ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML]));this.MODEL_METADATA="atom:content/*/model:metadata";this.BASE_VALUE="base:value";},setMetadata:function(name,_ed6){dojo.deprecated("com.ibm.mashups.enabler.ModifiableMetaData.setMetadata","setMetadata() is deprecated, please use setMetaData()");return this.setMetaData(name,_ed6);},removeMetadata:function(name){dojo.deprecated("com.ibm.mashups.enabler.ModifiableMetaData.removeMetadata","removeMetadata() is deprecated, please use removeMetaData()");this.removeMetaData(name);},getMetaDataNames:function(){var md=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.MODEL_METADATA+"/@name",this.xmlData,this.mdi_ns);if(md&&md.length>0){return dojo.map(md,function(item){return com.ibm.mm.enabler.utils.Dom.textContent(item);});}return [];},getMetaData:function(name,_ed7){var res=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.MODEL_METADATA+"[@name='"+name+"']/"+this.BASE_VALUE,this.xmlData,this.mdi_ns);if(res){res=res.getAttribute("value");}if(res&&_ed7){var _ed8=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(res);if(_ed8){return _ed8;}}return res;},setMetaData:function(name,_ed9){var _eda;var _edb=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.MODEL_METADATA+"[@name='"+name+"']/"+this.BASE_VALUE,this.xmlData,this.mdi_ns);if(_edb&&_edb.length>0){_eda=_edb[0];for(var i=1,l=_edb.length;i<l;i++){dojo.destroy(_edb[i].parentNode);}}else{var _edc=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:content/*",this.xmlData,this.mdi_ns);if(_edc){var _edd=this.xmlData.ownerDocument;var _ede=com.ibm.mm.enabler.utils.Dom.createElement(_edd,"model:metadata",this.mdi_ns.model);_ede.setAttribute("name",name);_eda=com.ibm.mm.enabler.utils.Dom.createElement(_edd,this.BASE_VALUE,this.mdi_ns.base);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData.ownerDocument,_eda,"xsi:type","type",com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaceUri("xsi"),"xsd:string");_ede.appendChild(_eda);_edc.appendChild(_ede);}}var _edf=_eda.getAttribute("value")||null;if(_edf!=_ed9){_eda.setAttribute("value",_ed9);this._setDirty();}return _edf;},removeMetaData:function(name){var _ee0;var _ee1=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.MODEL_METADATA+"[@name='"+name+"']",this.xmlData,this.mdi_ns);if(_ee1&&_ee1.length>0){_ee0=this.getMetaData(name);dojo.forEach(_ee1,function(item){dojo.destroy(item);},this);this._setDirty();}return _ee0||null;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ModifiableMetaData"]){dojo._hasResource["com.ibm.mashups.enabler.ModifiableMetaData"]=true;dojo.provide("com.ibm.mashups.enabler.ModifiableMetaData");}if(!dojo._hasResource["com.ibm.mashups.enabler.ThemeProvider"]){dojo._hasResource["com.ibm.mashups.enabler.ThemeProvider"]=true;dojo.provide("com.ibm.mashups.enabler.ThemeProvider");dojo.declare("com.ibm.mashups.enabler.ThemeProvider",null,{getTheme:function(){},setTheme:function(_ee2){},getThemeIdentifier:function(){},setThemeIdentifier:function(_ee3){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ContentNode"]){dojo._hasResource["com.ibm.mashups.enabler.content.ContentNode"]=true;dojo.provide("com.ibm.mashups.enabler.content.ContentNode");dojo.declare("com.ibm.mashups.enabler.content.ContentNode",[com.ibm.mashups.enabler.Identifiable],{});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ContentPage"]){dojo._hasResource["com.ibm.mashups.enabler.content.ContentPage"]=true;dojo.provide("com.ibm.mashups.enabler.content.ContentPage");dojo.declare("com.ibm.mashups.enabler.content.ContentPage",[com.ibm.mashups.enabler.content.ContentNode,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.Transformable,com.ibm.mashups.enabler.DirtyFlagProvider],{});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ContentProvider"]){dojo._hasResource["com.ibm.mashups.enabler.content.ContentProvider"]=true;dojo.provide("com.ibm.mashups.enabler.content.ContentProvider");dojo.declare("com.ibm.mashups.enabler.content.ContentProvider",null,{getContent:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.ContentProvider.getContent");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationElement_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationElement");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationElement",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.DefaultLocalized,com.ibm.mashups.enabler.ThemeProvider,com.ibm.mashups.enabler.content.ContentProvider,com.ibm.mashups.enabler.ac.EffectiveAccess,com.ibm.mashups.enabler.Transformable,com.ibm.mashups.enabler.DirtyFlagProvider],{isHidden:function(){},setHidden:function(hide){},confirmSetHidden:function(hide){},getNavigationElementType:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.EditLinkProvider"]){dojo._hasResource["com.ibm.mashups.enabler.EditLinkProvider"]=true;dojo.provide("com.ibm.mashups.enabler.EditLinkProvider");dojo.declare("com.ibm.mashups.enabler.EditLinkProvider",null,{getEditLink:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.NextLinkProvider"]){dojo._hasResource["com.ibm.mashups.enabler.NextLinkProvider"]=true;dojo.provide("com.ibm.mashups.enabler.NextLinkProvider");dojo.declare("com.ibm.mashups.enabler.NextLinkProvider",null,{_getNextURI:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ThreadingLinkProvider"]){dojo._hasResource["com.ibm.mashups.enabler.ThreadingLinkProvider"]=true;dojo.provide("com.ibm.mashups.enabler.ThreadingLinkProvider");dojo.declare("com.ibm.mashups.enabler.ThreadingLinkProvider",null,{getParentLink:function(){},getChildrenLink:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.space.SpaceIdentifierAspect"]){dojo._hasResource["com.ibm.mm.enabler.space.SpaceIdentifierAspect"]=true;dojo.provide("com.ibm.mm.enabler.space.SpaceIdentifierAspect");dojo.declare("com.ibm.mm.enabler.space.SpaceIdentifierAspect",null,{getSpaceIdentifier:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceHandlerImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceHandlerImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl");dojo.declare("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},_initTransition:function(ctx,fn){this._transitionCtx=ctx;this._transitionFn=fn;},_initDelegators:function(_ee4,_ee5,_ee6){var _ee7=dojo.getObject(this.declaredClass).prototype;com.ibm.mm.enabler.utils.Misc.forIn(_ee4,function(f,fn){if(dojo.isFunction(f)&&!Object.prototype.hasOwnProperty.call(_ee7,fn)){if(!_ee6||!(_ee6&&_ee6[fn])){this[fn]=dojo.hitch(this,(function(fn){return function(){return (_ee5&&_ee5[fn])?this._delegate(fn,arguments,_ee5[fn]):this._delegate(fn,arguments);};})(fn));}}},this);},_delegate:function(fn,args,_ee8){var _ee9=this.LOGGER.isLoggable(this.LOG_LEVEL);var id;if(!dojo.isFunction(this._persistence[fn])){id=(this.getID)?this.getID():"unknown";if(_ee9){this.LOGGER.trace("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl._delegate","No json implementation found for function '${0}' in object with id '${1}'; switching to xml.",[fn,id]);}this._transitionFn.apply(this._transitionCtx,[id]).start();}else{if(_ee8&&dojo.isFunction(this._persistence[_ee8])&&!this._persistence[_ee8].apply(this._persistence,args||[])){id=(this.getID)?this.getID():"unknown";if(_ee9){this.LOGGER.trace("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl._delegate","Conditional function '${0}' indicated to switch to xml implementation for function '${1}' in object with id '${2}'.",[_ee8,fn,id]);}this._transitionFn.apply(this._transitionCtx,[id]).start();}}if(!dojo.isFunction(this._persistence[fn])){if(_ee9){this.LOGGER.trace("com.ibm.mm.enabler.persistence.PersistenceHandlerImpl._delegate","Function '${0}' not available in xml as well.",fn);}throw new Error("fn not available!");}return this._persistence[fn].apply(this._persistence,args||[]);},_getPersistence:function(){return this._persistence;},_setPersistence:function(p){this._persistence=p;},toString:function(){if(!this._persistence){return "";}return this._delegate("toString");}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationElementImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationElementImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationElementImpl");dojo.declare("com.ibm.mm.enabler.IdentifiablePrivate",null,{_setRawID:function(){},_getRawID:function(){},setID:function(){}});dojo.declare("com.ibm.mm.enabler.navigation.NavigationElementImpl",[com.ibm.mashups.enabler.navigation.NavigationElement,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(_eea){this.navModel=_eea;var e=com.ibm.mashups.enabler;this._initDelegators(e.DefaultLocalized.prototype);this._initDelegators(e.Identifiable.prototype);this._initDelegators(e.Localized.prototype);this._initDelegators(e.MetaData.prototype);this._initDelegators(e.ModifiableLocalized.prototype);this._initDelegators(e.ModifiableMetaData.prototype);this._initDelegators(e.NextLinkProvider.prototype);this._initDelegators(e.ThemeProvider.prototype);this._initDelegators(e.Transformable.prototype);this._initDelegators(e.EditLinkProvider.prototype);this._initDelegators(e.DirtyFlagProvider.prototype);var n=e.navigation;this._initDelegators(n.NavigationElement.prototype);var c=e.content;this._initDelegators(c.ServerRuntimeContent.prototype);this._initDelegators(c.ServerRuntimeContentProvider.prototype);this._initDelegators(c.ContentProvider.prototype,null,{getContent:true});this._initDelegators(e.ac.EffectiveAccess.prototype,{hasRole:"hasCachedHasRole"});this._initDelegators(e.ThreadingLinkProvider.prototype);this._initDelegators(com.ibm.mm.enabler.space.SpaceIdentifierAspect.prototype);this._initDelegators(com.ibm.mm.enabler.IdentifiablePrivate.prototype);var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this._initTransition(nm,nm.getModifiableNode);},getContent:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_eeb,sync){var _eec="getContent";var _eed=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_eed){this.LOGGER.entering(_eec,arguments);}var _eee=null;var dfr=this._getPersistence().getContent();dfr.setFinishedCallback(dojo.hitch(this,function(node,_eef){if(node){_eee=this.navModel._wrapContent(node);}_eeb.finish(_eee,_eef);}));dfr.start(sync);if(_eed){this.LOGGER.exiting(_eec,_eee);}return _eee;});}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationElement"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationElement");}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContent"]){dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContent"]=true;dojo.provide("com.ibm.mashups.enabler.content.ServerRuntimeContent");dojo.declare("com.ibm.mashups.enabler.content.ServerRuntimeContent",null,{getServerRuntimeMarkup:function(_ef0){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.ServerRuntimeContent.getServerRuntimeMarkup");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContentProvider"]){dojo._hasResource["com.ibm.mashups.enabler.content.ServerRuntimeContentProvider"]=true;dojo.provide("com.ibm.mashups.enabler.content.ServerRuntimeContentProvider");dojo.declare("com.ibm.mashups.enabler.content.ServerRuntimeContentProvider",null,{getServerRuntimeContent:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.ServerRuntimeContentProvider.getServerRuntimeContent");},primeServerRuntimeContent:function(_ef1){throw new Error("Unimplemented SPI: com.ibm.mashups.enabler.content.ServerRuntimeContentProvider.primeServerRuntimeContent");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationNode_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationNode");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationNode",[com.ibm.mashups.enabler.navigation.NavigationElement,com.ibm.mashups.enabler.content.ServerRuntimeContentProvider,com.ibm.mashups.enabler.RepresentationProvider],{getExportPageURL:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationNodeImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationNodeImpl",[com.ibm.mm.enabler.navigation.NavigationElementImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.navigation.NavigationNode.prototype);this._initDelegators(com.ibm.mashups.enabler.content.ServerRuntimeContentProvider.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationNode"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationNode");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationLabel_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationLabel");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationLabel",[com.ibm.mashups.enabler.navigation.NavigationElement],{});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationLabelImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationLabelImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationLabelImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationLabelImpl",[com.ibm.mashups.enabler.navigation.NavigationLabel,com.ibm.mm.enabler.navigation.NavigationElementImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.navigation.NavigationLabel.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationLabel"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationLabel");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationURL_API");dojo.provide("com.ibm.mashups.enabler.navigation.NavigationURL");dojo.declare("com.ibm.mashups.enabler.navigation.NavigationURL",[com.ibm.mashups.enabler.navigation.NavigationElement],{getURL:function(){},setURL:function(url){}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationURLImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationURLImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationURLImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationURLImpl",[com.ibm.mm.enabler.navigation.NavigationElementImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.navigation.NavigationURL.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.NavigationURL"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.NavigationURL");}if(!dojo._hasResource["com.ibm.mm.enabler.EmptyModelIteratorImpl"]){dojo._hasResource["com.ibm.mm.enabler.EmptyModelIteratorImpl"]=true;dojo.provide("com.ibm.mm.enabler.EmptyModelIteratorImpl");dojo.declare("com.ibm.mm.enabler.EmptyModelIteratorImpl",[com.ibm.mm.enabler.DeferredIteratorImpl],{constructor:function(){},start:function(){this.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);},hasNext:function(dfr){if(dfr){dfr.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return false;},next:function(dfr){if(dfr){dfr.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return null;},setCursorPosition:function(){},getCursorPosition:function(){return 0;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._size);},_size:function(dfr,sync){if(dfr){dfr.finish(0,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return 0;}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.FactoryImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.FactoryImpl",null,{createNavigationElement:function(p,_ef2){var type=p.getNavigationElementType();var c=com.ibm.mashups.enabler.navigation.Constants;var w;switch(type){case c.NAVIGATION_PAGE:w=new com.ibm.mm.enabler.navigation.NavigationNodeImpl(_ef2);break;case c.NAVIGATION_LABEL:w=new com.ibm.mm.enabler.navigation.NavigationLabelImpl(_ef2);break;case c.NAVIGATION_URL:w=new com.ibm.mm.enabler.navigation.NavigationURLImpl(_ef2);break;default:console.warn("No navigation element type specified!");break;}w._setPersistence(p);p._setContext({getBaseContext:function(){return w;}});return w;}});com.ibm.mm.enabler.navigation.persistence.Factory=new com.ibm.mm.enabler.navigation.persistence.FactoryImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl"]){dojo._hasResource["com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl"]=true;dojo.provide("com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl");dojo.declare("com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl",[com.ibm.mm.enabler.DeferredIteratorImpl],{constructor:function(_ef3,_ef4){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.persistenceProvider=_ef3;this.modelProvider=_ef4;this.entries=[];this.entryCache={};this.context=null;this.cursor=0;this.loadFurtherNodes=true;this.sizeValue=null;this._inboundNodes={};this._numInboundNodes=0;com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getCreatedNodes(),function(node,id){this._inboundNodes[id]=null;this._numInboundNodes++;},this);com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getInboundNodes(),function(node,id){this._inboundNodes[id]=null;this._numInboundNodes++;},this);this._outboundNodes={};this._numOutboundNodes=0;com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getDeletedNodes(),function(node,id){this._outboundNodes[id]=null;this._numOutboundNodes++;},this);com.ibm.mm.enabler.utils.Misc.forIn(this.modelProvider.getOutboundNodes(),function(node,id){this._outboundNodes[id]=null;this._numOutboundNodes++;},this);},hasNext:function(dfr,sync){if(typeof this.entries[this.cursor]=="undefined"){var _ef5=0;if(this.loadFurtherNodes){this._loadAheadInternal(dfr||null,true);_ef5=this.cursor;}else{this.entries[0]=null;}}var _ef6=this.entries[this.cursor];var _ef7=_ef6?true:false;if(_ef7&&this._outboundNodes[_ef6]===null){this.cursor++;return this.hasNext(dfr,sync);}return _ef7;},next:function(dfr,sync){if(this.hasNext(dfr||null,true)){var _ef8=this.entries[this.cursor++];var _ef9=this.modelProvider.lookupNodeInCacheByID(_ef8);return (typeof _ef9=="undefined")?this.entryCache[_ef8]:_ef9;}return null;},_insertInbound:function(_efa,_efb){for(var id in this._inboundNodes){_efa.splice(_efb,0,id);_efb++;}},setCursorPosition:function(_efc){if(_efc<0){return;}if(!this.loadFurtherNodes){if(_efc>=this.size().start()){return;}}this.cursor=_efc;this.persistenceProvider.setCursorPosition(this.context,this);},getCursorPosition:function(){return this.cursor;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._size);},_size:function(dfr,sync){if(!this.sizeValue){this.hasNext(null,true);}var size=this.sizeValue+this._numInboundNodes-this._numOutboundNodes;if(size<0){size=0;}if(dfr){dfr.finish(size,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return size;},start:function(sync){this._loadAheadInternal(this,sync,true);},_loadAheadInternal:function(_efd,sync,_efe){var _eff="_loadAhead";var _f00=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_f00){this.LOGGER.entering(_eff,arguments);}if(!this.context){this.context=this.persistenceProvider.getLoadAheadContext(null,this);}var _f01;var dfr=this.persistenceProvider.loadAhead(this.context);dfr.setFinishedCallback(dojo.hitch(this,function(_f02,_f03){if(_f02==null){this.loadFurtherNodes=false;this.sizeValue=0;this.entries[this.cursor]=null;this._insertInbound(this.entries,this.cursor);if(_efd){_efd.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_BAD_REQUEST);}return;}this.loadFurtherNodes=_f02.loadFurtherNodes;this.sizeValue=_f02.size;if(_f02.size==0){this.entries[this.cursor]=null;this._insertInbound(this.entries,this.cursor);if(_efd){_efd.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return;}var c=0;if(_f02.nodes){for(var i=0,l=_f02.nodes.length;i<l;i++){var node=_f02.nodes[i];var _f04=node.getID();if(this._outboundNodes[_f04]===null){continue;}this.entries[this.cursor+c++]=node.getID();this.entryCache[_f04]=node;this.modelProvider.contributeNodeToCache(node);if(_efd){_efd.nextFinish(node);}}}if(this.loadFurtherNodes){if(_f02.nodes&&_efe){this.context=this.persistenceProvider.getLoadAheadContext(this.context,this);this._loadAheadInternal(_efd,sync,_efe);}}else{this.entries[this.cursor+c]=null;this._insertInbound(this.entries,this.cursor+c);if(_efd){_efd.finish(null,_f03);}}}));dfr.start(sync);if(_f00){this.LOGGER.exiting(_eff);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.AnonymousMode"]){dojo._hasResource["com.ibm.mashups.enabler.user.AnonymousMode"]=true;dojo.provide("com.ibm.mashups.enabler.user.AnonymousMode");dojo.declare("com.ibm.mashups.enabler.user.AnonymousMode",null,{USER:"user",ANONYMOUS:"anonymous"});com.ibm.mashups.enabler.user.AnonymousMode=new com.ibm.mashups.enabler.user.AnonymousMode();}if(!dojo._hasResource["com.ibm.mm.enabler.AnonymousHelper"]){dojo._hasResource["com.ibm.mm.enabler.AnonymousHelper"]=true;dojo.provide("com.ibm.mm.enabler.AnonymousHelper");dojo.declare("com.ibm.mm.enabler.AnonymousHelper",null,{constructor:function(){},_isAnonymous:function(){return ibmConfig.anonymousUser?true:false;},_isAnonymousLockedOnMode:function(){return ibmConfig["com.ibm.mashups.anonymous.mode.locked.on"]?true:false;},_isAnonymousLockedDown:function(){if(!this._isAnonymous()){return false;}return !this._isAnonymousLockedOnMode();},_isAnonymousLockedOn:function(){if(!this._isAnonymous()){return false;}return this._isAnonymousLockedOnMode();},getAnonymousMode:function(){if(this._isAnonymousLockedDown()){return com.ibm.mashups.enabler.user.AnonymousMode.ANONYMOUS;}else{return com.ibm.mashups.enabler.user.AnonymousMode.USER;}}});com.ibm.mm.enabler.AnonymousHelper=new com.ibm.mm.enabler.AnonymousHelper();}if(!dojo._hasResource["com.ibm.mm.enabler.ConfirmableModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ConfirmableModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ConfirmableModelImpl");dojo.declare("com.ibm.mm.enabler.ConfirmableModelImpl",null,{constructor:function(){this.helper=com.ibm.mm.enabler.AnonymousHelper;},_isAnonymous:function(){return (this.helper.getAnonymousMode()==com.ibm.mashups.enabler.user.AnonymousMode.ANONYMOUS);},isAnonymous:function(){return this._isAnonymous();},getConfirmCreate:function(_f05){return !this._isAnonymous();},getConfirmInsert:function(node,_f06,_f07){if(this._isAnonymous()){return false;}var _f08=true,_f09=true,_f0a=true;if(_f07){_f0a=_f07.hasRole(com.ibm.mashups.enabler.ac.RoleType.USER);}if(_f06&&_f0a){_f08=_f06.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);}if(node&&_f0a&&_f08){_f09=node.hasRole(com.ibm.mashups.enabler.ac.RoleType.USER);}return _f0a&&_f08&&_f09;},getConfirmReparent:function(node,_f0b,_f0c,next){if(this._isAnonymous()){return false;}var _f0d=false;if(node&&_f0b&&_f0c){if(node.isPrivate()){if(_f0c.isPrivate()){_f0d=true;}else{_f0d=_f0c.hasRole(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER);}}else{if(!_f0b.isPrivate()&&!_f0c.isPrivate()){_f0d=_f0c.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)&&node.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);}}}return _f0d;},getConfirmReorder:function(node,_f0e,next){if(this._isAnonymous()){return false;}var _f0f=false;if(node&&_f0e){if(_f0e.isPrivate()){if(node.isPrivate()){_f0f=true;}}else{if(node.isPrivate()){_f0f=_f0e.hasRole(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER);}else{_f0f=_f0e.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)&&node.hasRole(com.ibm.mashups.enabler.ac.RoleType.USER);}}}return _f0f;},getConfirmRemove:function(node){if(this._isAnonymous()){return false;}if(node){return node.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);}return false;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.PersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.PersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.PersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.PersistenceProvider",null,{findBySelection:function(url,_f10,_f11,_f12,_f13){},remove:function(url,_f14,_f15){},store:function(url,_f16,_f17,_f18){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.url.ModelUrlConstantsImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.url.ModelUrlConstantsImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.url.ModelUrlConstantsImpl");dojo.declare("com.ibm.mm.enabler.model.url.ModelUrlConstantsImpl",null,{PARAMETER_ASPECT:"aspect",PARAMETER_ASPECT_VALUE_ACCESS_CONTROL:"ac",PARAMETER_ASPECT_VALUE_COMPOSITE_APPLICATION:"ca",PARAMETER_REPRESENTATION:"rep",PARAMETER_REPRESENTATION_VALUE_FULL:"full",PARAMETER_REPRESENTATION_VALUE_INSTANCE:"instance",PARAMETER_LEVELS:"levels",PARAMETER_MDNAME:"mdname",PARAMETER_MODE:"mode",PARAMETER_MODE_VALUE_REFRESH:"refresh",PARAMETER_STATE_URL:"stateURL",PARAMETER_UPDATE:"update",PARAMETER_UPDATE_VALUE_REPLACE:"replace",PARAMETER_FILTER_BY_URL:"filterByURL",PARAMETER_NOCACHE:"nocache",PARAMETER_JSON:"json"});}if(!dojo._hasResource["com.ibm.mm.enabler.model.url.ModelUrlConstants"]){dojo._hasResource["com.ibm.mm.enabler.model.url.ModelUrlConstants"]=true;dojo.provide("com.ibm.mm.enabler.model.url.ModelUrlConstants");com.ibm.mm.enabler.model.url.ModelUrlConstants=new com.ibm.mm.enabler.model.url.ModelUrlConstantsImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.JsonPersistenceProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.JsonPersistenceProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.JsonPersistenceProviderImpl");dojo.declare("com.ibm.mm.enabler.persistence.JsonPersistenceProviderImpl",com.ibm.mashups.enabler.persistence.PersistenceProvider,{MY_MASHUP_APPS:"MY_MM_APPS",COLLECTION:"collection",constructor:function(){this._initializeCache();this.urlType=com.ibm.mashups.enabler.model.url.ModelUrlFactory.RESOURCE_URL;},_initializeCache:function(){this._internalCache={};this._internalCache.pages={};this._internalCache.trails={};this._internalCache.parents={};this._internalCache.widgets={};this._internalCache.topLevels={};this._internalCache.rootNodes={};this._internalCache.spaces={};this._internalCache.favorites=[];this._page2SpaceMap={};this._spaceForPage={};},findPage:function(_f19,_f1a,_f1b,sync,_f1c){var _f1d=function(_f1e,_f1f){if(_f1e==this.COLLECTION){if(this._internalCache.rootNodes[this.MY_MASHUP_APPS]){_f1e=this._internalCache.rootNodes[this.MY_MASHUP_APPS];}}if(this._internalCache.pages[_f1e]){return this._internalCache.pages[_f1e];}return null;};var _f20=_f1d.apply(this,[_f19,_f1a])||null;if(_f20){if(dojo.isFunction(_f1b)){_f1b(_f20,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{var _f21=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.pages)){_f21={"sections":["pages"]};if(!this.hasWidgetsCached(_f19)){_f21.sections.push("widgets");}}this.findBySelection(_f19,_f1a,_f21,dojo.hitch(this,function(_f22){if(_f22==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f20=_f1d.apply(this,[_f19,_f1a])||null;}if(dojo.isFunction(_f1b)){_f1b(_f20,_f22);}}),sync,_f1c);}return _f20;},hasCachedFindPage:function(_f23){if(_f23==this.COLLECTION){var _f24=this._internalCache.rootNodes[this.MY_MASHUP_APPS];if(_f24){_f23=_f24;}}return !!this._internalCache.pages[_f23];},getParentID:function(_f25){if(this._internalCache.pages){return this._internalCache.parents[_f25];}return null;},getParent:function(_f26,_f27,sync,_f28){var _f29=function(_f2a){if(this._internalCache.pages){var _f2b=this._internalCache.parents[_f2a];if(_f2b){_f2c=this._internalCache.pages[_f2b]||null;}}return _f2c;};var _f2c=null;var _f2d=false;for(var _f2e in this._internalCache.rootNodes){var _f2f=this._internalCache.rootNodes[_f2e];if(_f2f==_f26){_f2d=true;break;}}if(_f2d){if(dojo.isFunction(_f27)){_f27(_f2c,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return _f2c;}_f2c=_f29.apply(this,[_f26])||null;if(_f2c==null){var _f30=null;_f30={"sections":["pages"],"pages":{"select":["trail"]}};this.findBySelection(_f26,null,_f30,dojo.hitch(this,function(_f31){if(_f31==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f2c=_f29.apply(this,[_f26])||null;}if(dojo.isFunction(_f27)){_f27(_f2c,_f31);}}),sync,_f28);}else{if(dojo.isFunction(_f27)){if(_f2c){_f27(_f2c,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}else{_f27(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}}return _f2c;},hasCachedGetParent:function(_f32){for(var _f33 in this._internalCache.rootNodes){var _f34=this._internalCache.rootNodes[_f33];if(_f34==_f32){return true;}}return !!this._internalCache.parents[_f32];},getChildren:function(_f35,_f36,sync,_f37){if(!_f35||(typeof _f35.children=="undefined")){if(dojo.isFunction(_f36)){_f36(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}var _f38=function(_f39){var _f3a=null;if(this._internalCache.pages[_f39]){var _f3b=this._internalCache.pages[_f39];_f3a=[];if(_f3b.children&&dojo.isArray(_f3b.children)){for(var i=0,l=_f3b.children.length;i<l;++i){var _f3c=_f3b.children[i];var _f3d=this._internalCache.pages[_f3c];_f3a.push(_f3d);}}}return _f3a;};var _f3e=null;var _f3f=_f35.id;if(_f35.children==null){var _f40=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.pages)){_f40={"sections":["pages"],"pages":{"select":["children"],"params":{"includeRoot":"false"}}};if(!this.hasWidgetsCached(_f3f)){_f40.sections.push("widgets");}}this.findBySelection(_f3f,null,_f40,dojo.hitch(this,function(_f41){if(_f41==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f3e=_f38.apply(this,[_f3f])||null;}if(dojo.isFunction(_f36)){_f36(_f3e,_f41);}}),sync,_f37);}else{_f3e=_f38.apply(this,[_f3f])||null;var _f42=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK;if(!_f3e){_f42=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}if(dojo.isFunction(_f36)){_f36(_f3e,_f42);}}return _f3e;},hasCachedGetChildren:function(_f43){var _f44=false;var _f45=this._internalCache.pages[_f43];if(_f45&&dojo.isArray(_f45.children)){_f44=_f45.children.length>0;}return _f44;},hasCachedHasChildren:function(_f46){return this._internalCache.pages[_f46];},findSpace:function(_f47,_f48,sync,_f49){var _f4a=function(_f4b){if(this._internalCache.spaces[_f4b]){return this._internalCache.spaces[_f4b];}return null;};var _f4c=_f4a.apply(this,[_f47])||null;if(_f4c){if(dojo.isFunction(_f48)){_f48(_f4c,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{var _f4d=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.pages)){_f4d={"sections":["spaces"],"spaces":{"select":["current"]}};}this.findBySelection(this.COLLECTION,_f47,_f4d,dojo.hitch(this,function(_f4e){if(_f4e==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f4c=_f4a.apply(this,[_f47])||null;}if(dojo.isFunction(_f48)){_f48(_f4c,_f4e);}}),sync,_f49);}return _f4c;},getSpace:function(_f4f,_f50,sync,_f51){var _f52=function(_f53){if(this._page2SpaceMap[_f53]){var _f54=this._page2SpaceMap[_f53];if(_f54==this.MY_MASHUP_APPS){return this.MY_MASHUP_APPS;}else{if(this._internalCache.spaces[_f54]){return this._internalCache.spaces[_f54];}}}return null;};var _f55=null;var _f56=_f52.apply(this,[_f4f])||null;if(_f56){if(_f56==this.MY_MASHUP_APPS){if(dojo.isFunction(_f50)){_f50(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}else{_f55=_f56;if(dojo.isFunction(_f50)){_f50(_f55,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}}else{var _f57=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.spaces)){_f57={"sections":["spaces"],"spaces":{"select":["current"]}};}this.findBySelection(_f4f,null,_f57,dojo.hitch(this,function(_f58){if(_f58==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f55=_f52.apply(this,[_f4f])||null;if(!_f55){this._page2SpaceMap[_f4f]=this.MY_MASHUP_APPS;_f55=this.MY_MASHUP_APPS;}}if(dojo.isFunction(_f50)){_f50(_f55,_f58);}}),sync,_f51);}return _f55;},getFavoriteSpaces:function(_f59,sync,_f5a){var _f5b=this.COLLECTION;var _f5c=function(_f5d){if(this._internalCache.favorites.length>0){var _f5e=[];for(var i=0;i<this._internalCache.favorites.length;++i){var _f5f=this._internalCache.favorites[i];_f5e.push(this._internalCache.spaces[_f5f]);}return _f5e;}return null;};var _f60=null;var _f61=_f5c.apply(this)||null;if(_f61){_f60=_f61;if(dojo.isFunction(_f59)){_f59(_f60,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{var _f62=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.spaces)){_f62={"sections":["spaces"],"spaces":{"select":["favorite"]}};}this.findBySelection(_f5b,null,_f62,dojo.hitch(this,function(_f63){if(_f63==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f60=_f5c.apply(this)||null;}if(dojo.isFunction(_f59)){_f59(_f60,_f63);}}),sync,_f5a);}return _f60;},getWidgetData:function(_f64,_f65,_f66,sync,_f67){var _f68=function(_f69,_f6a){if(this._internalCache.widgets[_f69]){return this._internalCache.widgets[_f69][_f6a]||null;}else{return null;}};var _f6b=null;var _f6c=_f68.apply(this,[_f64,_f65])||null;if(_f6c){_f6b=_f6c;if(dojo.isFunction(_f66)){_f66(_f6b,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{var _f6d=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.pages)&&this._internalCache.pages[_f64]){_f6d={"sections":["widgets"]};}this.findBySelection(_f64,null,_f6d,dojo.hitch(this,function(_f6e){if(_f6e==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f6b=_f68.apply(this,[_f64,_f65])||null;}if(dojo.isFunction(_f66)){_f66(_f6b,_f6e);}}),sync,_f67);}return _f6b;},findBySelection:function(page,_f6f,_f70,_f71,sync,_f72){var isId=true;if(page==this.COLLECTION){isId=false;}if(typeof sync=="undefined"){sync=true;}var _f73=[{"value":page,"isID":isId}];if(_f6f){_f73.push({"value":_f6f,"isID":true});}var _f74=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,_f72);_f74.setNodes(_f73);if(_f70){var sel=dojo.toJson(_f70);_f74.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_JSON,sel);}var _f75=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_f74,null,null,true,(sync===true));_f75.setHandleAs("json");if(_f72){var s=_f72._findStrategyByType("com.ibm.mashups.enabler.strategy.NoCacheStrategy");if(s){s._apply(_f75);}}_f75.read(dojo.hitch(this,function(type,data,xhr,args){this._cacheCallback(page,data,xhr.status);if(dojo.isFunction(_f71)){_f71(xhr.status);}}));},_findBySelectionInCache:function(_f76,_f77,_f78,_f79){if(!_f77){_f77=this.MY_MASHUP_APPS;}var _f7a=null;if(!_f78){_f78={"sections":["pages"]};}if(_f76==this.COLLECTION){if(this._internalCache.rootNodes[_f77]){_f76=this._internalCache.rootNodes[_f77];}}if(this._internalCache.pages[_f76]){_f7a=this._internalCache.pages[_f76];}return _f7a;},_cacheCallback:function(_f7b,data,_f7c,_f7d){if(_f7c!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){return;}if(data.spaces){this._handleSpaceCache(data.spaces);}if(data.pages){this._handlePageCache(data.pages);}if(data.widgets){this._handleWidgetCache(_f7b,data.widgets);}},_handleSpaceCache:function(_f7e){var _f7f=null;if(_f7e.select){var _f80=_f7e.select;if(_f80.id){_f7f=_f80.id;}if(_f80.favorites){this._internalCache.favorites=_f80.favorites;}}for(var i=0,l=_f7e.data.length;i<l;++i){var _f81=_f7e.data[i];var _f82=_f81.id;this._internalCache.spaces[_f82]=_f81;}return _f7f;},_handlePageCache:function(_f83){var _f84=null;var _f85;if(_f83.select){var _f86=_f83.select;_f85=_f86.id;_f84=_f85;var _f87=null;for(var ii=0,ll=_f83.data.length;ii<ll;++ii){var _f88=_f83.data[ii].id;if(_f88==_f84){_f87=_f83.data[ii].space;break;}}if(!_f87){_f87=this.MY_MASHUP_APPS;}if(_f86.trail){var _f89=_f86.trail;this._internalCache.trails[_f85]=_f89;for(var l=_f89.length,i=l-1;i>0;i--){this._internalCache.parents[_f89[i]]=_f89[i-1];}}if(_f86.topLevel){var tl=_f86.topLevel;this._internalCache.topLevels[_f87]=tl;}if(_f86.root){this._internalCache.rootNodes[_f87]=_f86.root;}else{if(_f86.trail){this._internalCache.rootNodes[this.MY_MASHUP_APPS]=_f86.trail[0];}}}for(var j=0,m=_f83.data.length;j<m;++j){var page=_f83.data[j];_f85=page.id;this._page2SpaceMap[_f85]=page.space;var _f8a=this._internalCache.pages[_f85];if(_f8a){if(page.roles){_f8a.roles=page.roles;}if(page.children){_f8a.children=page.children;}}else{this._internalCache.pages[_f85]=page;}if(page.children&&dojo.isArray(page.children)){for(var c=0,cl=page.children.length;c<cl;++c){var _f8b=page.children[c];this._internalCache.parents[_f8b]=_f85;}}}return _f84;},_setPageParent:function(_f8c,_f8d){this._internalCache.parents[_f8c]=_f8d;},_handleWidgetCache:function(_f8e,_f8f){if(_f8f.data&&dojo.isArray(_f8f.data)){var _f90=_f8f.data;if(typeof this._internalCache.widgets[_f8e]=="undefined"){this._internalCache.widgets[_f8e]={};}for(var i=0,l=_f90.length;i<l;++i){var _f91=_f90[i];this._internalCache.widgets[_f8e][_f91.id]=_f91;}}},hasSpaceFavoritesCached:function(){return (this._internalCache.favorites.length>0);},hasWidgetsCached:function(_f92){if(this._internalCache.widgets[_f92]){return true;}else{return false;}},invalidatePage:function(id,_f93){if(!id){this._internalCache.pages={};this._internalCache.trails={};this._internalCache.parents={};this._page2SpaceMap={};this._spaceForPage={};}else{if(_f93){var node=this._internalCache.pages[id];if(node){node.children=null;}}else{delete this._internalCache.pages[id];delete this._internalCache.trails[id];delete this._page2SpaceMap[id];delete this._spaceForPage[id];var _f94=this._internalCache.parents[id];if(_f94){var _f95=this._internalCache.pages[_f94];if(_f95){_f95.children=null;}}var _f96=[];for(var _f97 in this._internalCache.parents){_f94=this._internalCache.parents[_f97];if(_f94==id){_f96.push(_f97);}}for(var i=0,l=_f96.length;i<l;i++){delete this._internalCache.parents[_f96[i]];}}}this.invalidateWidget(id);},invalidateSpace:function(id){if(!id){this._internalCache.spaces={};this._internalCache.rootNodes={};this._internalCache.topLevels={};this._internalCache.favorites=[];}else{delete this._internalCache.spaces[id];}},invalidateFavorites:function(){this._internalCache.favorites=[];},invalidateWidget:function(_f98,id){if(!_f98){this._internalCache.widgets={};}else{if(this._internalCache.widgets[_f98]){if(!id){this._internalCache.widgets[_f98]={};}else{delete this._internalCache.widgets[_f98][id];}}}}});com.ibm.mm.enabler.persistence.JsonPersistenceProvider=new com.ibm.mm.enabler.persistence.JsonPersistenceProviderImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.persistence._setPrimingDataMixin"]){dojo._hasResource["com.ibm.mm.enabler.persistence._setPrimingDataMixin"]=true;dojo.provide("com.ibm.mm.enabler.persistence._setPrimingDataMixin");dojo.declare("com.ibm.mm.enabler.persistence._setPrimingDataMixin",null,{setPrimingData:function(data){var _f99={data:[],select:{root:data.id}};this._extractNavigationNodes(data,_f99);com.ibm.mm.enabler.persistence.JsonPersistenceProvider._handlePageCache(_f99);},_extractNavigationNodes:function(node,_f9a,_f9b){if(!com.ibm.mm.enabler.utils.Misc.isEmpty(node)){var c={};_f9a.data.push(c);var id=node.id;c.id=id;c.type=node.type?node.type:"page";if(node.metadata){c.metadata={};com.ibm.mm.enabler.utils.Misc.forIn(node.metadata,function(v,n){c.metadata[n]=v;},this);}if(node.isPrivate){c.isPrivate=node.isPrivate;}if(node.roles&&dojo.isArray(node.roles)){c.roles=[];dojo.forEach(node.roles,function(r){switch(r){case "user":c.roles.push(com.ibm.mashups.enabler.ac.RoleType.USER);break;case "privilegedUser":c.roles.push(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER);break;case "editor":c.roles.push(com.ibm.mashups.enabler.ac.RoleType.EDITOR);break;case "manager":c.roles.push(com.ibm.mashups.enabler.ac.RoleType.MANAGER);break;case "admin":c.roles.push(com.ibm.mashups.enabler.ac.RoleType.ADMIN);break;default:c.roles.push(r);}},this);}c.title=node.title;c.locale=node.locale;c.theme=node.theme;c.layoutURL=node.layoutURL;if(dojo.isArray(node.children)){var l=node.children.length;if(l===0||!com.ibm.mm.enabler.utils.Misc.isEmpty(node.children[l-1])){c.children=null;if(l>1&&com.ibm.mm.enabler.utils.Misc.isEmpty(node.children[0])){var _f9c=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;for(var i=1;i<l;i++){var _f9d=node.children[i];_f9c._setPageParent(_f9d.id,id);this._extractNavigationNodes(_f9d,_f9a);}}}else{if(l>1){c.children=[];for(var j=0;j<l-1;j++){this._extractNavigationNodes(node.children[j],_f9a,c);}}}}else{c.children=[];}if(_f9b){_f9b.children.push(id);}}return _f9a;}});}if(!dojo._hasResource["com.ibm.mm.enabler.LazyLoadSupport"]){dojo._hasResource["com.ibm.mm.enabler.LazyLoadSupport"]=true;dojo.provide("com.ibm.mm.enabler.LazyLoadSupport");dojo.declare("com.ibm.mm.enabler.LazyLoadSupport",null,{lazyLoadModules:function(_f9e){if(ibmConfig.moduleLayerMapping){var _f9f=com.ibm.mm.enabler.LazyLoadSupport;if(!_f9f._scriptsLoaded){_f9f._scriptsLoaded={};}if(!_f9f._scriptsLoaded[_f9e]){for(var i=0,l=_f9e.length;i<l;i++){var _fa0=_f9e[i];var _fa1=ibmConfig.moduleLayerMapping[_fa0];if(_fa1){if(dojo.isArray(_fa1)){for(var j=0,m=_fa1.length;j<m;j++){this._loadScript(_fa1[j]);}}else{this._loadScript(_fa1);}}else{if(typeof _fa1=="undefined"){console.warn("No layer found to load for '"+_fa0+"'.");}}}_f9f._scriptsLoaded[_f9e]=true;}}},_loadScript:function(name){var _fa2=com.ibm.mm.enabler.LazyLoadSupport;if(!_fa2._scriptsLoaded[name]){if(ibmConfig.isDebug){console.info("Lazy loading edit layer '"+name+"'");}if((name.indexOf("/")===0)||(name.indexOf("http")===0)){var _fa3={url:name,handleAs:"javascript",sync:true};dojo.xhrGet(_fa3);}else{dojo["require"](name,true);}_fa2._scriptsLoaded[name]=true;}}});}if(!dojo._hasResource["com.ibm.mm.enabler.content.ContentPageImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.ContentPageImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.ContentPageImpl");dojo.declare("com.ibm.mm.enabler.content.ContentPageImpl",[com.ibm.mashups.enabler.content.ContentPage,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(){var e=com.ibm.mashups.enabler;this._initDelegators(e.Identifiable.prototype);this._initDelegators(e.MetaData.prototype);this._initDelegators(e.ModifiableMetaData.prototype);this._initDelegators(e.Transformable.prototype);this._initDelegators(e.EditLinkProvider.prototype);this._initDelegators(e.DirtyFlagProvider.prototype);var c=e.content;this._initDelegators(c.ContentPage.prototype);this._initDelegators(e.ac.EffectiveAccess.prototype,{hasRole:"hasCachedHasRole"});var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this._initTransition(nm,nm.getModifiableContentNode);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.StaticContentPage_API"]){dojo._hasResource["com.ibm.mashups.enabler.content.StaticContentPage_API"]=true;dojo.provide("com.ibm.mashups.enabler.content.StaticContentPage_API");dojo.provide("com.ibm.mashups.enabler.content.StaticContentPage");dojo.declare("com.ibm.mashups.enabler.content.StaticContentPage",[com.ibm.mashups.enabler.content.ContentPage,com.ibm.mashups.enabler.ModifiableMetaData],{getStaticMarkup:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.StaticContentPage.getStaticMarkup");},setStaticMarkup:function(_fa4){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.StaticContentPage.setStaticMarkup");},confirmSetStaticMarkup:function(_fa5){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.StaticContentPage.confirmSetStaticMarkup");},refreshStaticMarkup:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.StaticContentPage.refreshStaticMarkup");},confirmRefreshStaticMarkup:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.StaticContentPage.confirmRefreshStaticMarkup");},getStaticContentURL:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.StaticContentPage.getStaticContentURL");},setStaticContentURL:function(url){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.StaticContentPage.setStaticContentURL");},confirmSetStaticContentURL:function(url){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.StaticContentPage.confirmSetStaticContentURL");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.StaticContentPage"]){dojo._hasResource["com.ibm.mashups.enabler.content.StaticContentPage"]=true;dojo.provide("com.ibm.mashups.enabler.content.StaticContentPage");}if(!dojo._hasResource["com.ibm.mm.enabler.content.StaticContentPageImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.StaticContentPageImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.StaticContentPageImpl");dojo.declare("com.ibm.mm.enabler.content.StaticContentPageImpl",[com.ibm.mashups.enabler.content.StaticContentPage,com.ibm.mm.enabler.content.ContentPageImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.content.StaticContentPage.prototype);}});}if(!dojo._hasResource["com.ibm.mm.enabler.content.persistence.ContentNodeFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.persistence.ContentNodeFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.persistence.ContentNodeFactoryImpl");dojo.provide("com.ibm.mm.enabler.content.persistence.ContentNodeFactory");dojo.declare("com.ibm.mm.enabler.content.persistence.ContentNodeFactoryImpl",null,{createContentNode:function(p,_fa6){var _fa7=null;if(_fa6){_fa7=new com.ibm.mm.enabler.content.StaticContentPageImpl();}else{_fa7=new com.ibm.mm.enabler.content.ContentPageImpl();}_fa7._setPersistence(p);p._setContext({getBaseContext:function(){return _fa7;}});return _fa7;}});com.ibm.mm.enabler.content.persistence.ContentNodeFactory=new com.ibm.mm.enabler.content.persistence.ContentNodeFactoryImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.NavigationModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.NavigationModelImpl");dojo.declare("com.ibm.mm.enabler.navigation.NavigationModelImpl",[com.ibm.mashups.enabler.model.NavigationModel,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.ConfirmableModelImpl,com.ibm.mm.enabler.persistence._setPrimingDataMixin,com.ibm.mm.enabler.LazyLoadSupport],{constructor:function(){this.enforcementHelper=com.ibm.mm.enabler.utils.APIEnforcementHelper;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.loadedNodes={};this.createdNodes={};this.deletedNodes={};this._movedNodes={};this.contentNodes={};dojo.subscribe(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_NODE,this,"_invalidateNode");this._jsonModel=null;this._xmlModel=null;},_getPersistenceModel:function(ctx){var m=null;if(ctx&&ctx.refNode&&this.isModifiableNode(ctx.refNode)){m=this._getXmlModel();}if(!m){if((ctx&&dojo.isFunction(ctx.hasCachedFn)&&ctx.hasCachedFn())||this._isJsonPersistenceEnabled()){m=this._getJsonModel();}else{m=this._getXmlModel();}}return m?m:this._getXmlModel();},_hasXmlModel:function(){return !!this._xmlModel;},_getXmlModel:function(){if(!this._xmlModel){this.lazyLoadModules(["NavigationModelXml"]);dojo["require"]("com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl");this._xmlModel=com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl.prototype._getInstance(this);this._xmlModel.setStrategy(this.getStrategies());this._xmlModel.addDirtyCallback(this,this._setModelDirty);}return this._xmlModel;},_hasJsonModel:function(){return !!this._jsonModel;},_isJsonPersistenceEnabled:function(){return (ibmConfig&&ibmConfig.json&&ibmConfig.json["resource-service"]);},_getJsonModel:function(_fa8){if(!this._jsonModel){dojo["require"]("com.ibm.mm.enabler.navigation.persistence.json.NavigationModelJsonImpl");this._jsonModel=com.ibm.mm.enabler.navigation.persistence.json.NavigationModelJsonImpl.prototype._getInstance();this._jsonModel.setStrategy(this.getStrategies());}return this._jsonModel;},_getInstance:function(){var _fa9=com.ibm.mm.enabler.navigation.NavigationModelImpl._instance;return _fa9?_fa9:(com.ibm.mm.enabler.navigation.NavigationModelImpl._instance=new com.ibm.mm.enabler.navigation.NavigationModelImpl());},_resolve:function(node){var _faa=null;if(node){var id=dojo.isString(node)?node:node.getID();_faa=(id in this.deletedNodes)?null:this.find(id).start();}return _faa;},_wrap:function(node){var _fab=null;if(node){if(node.addDirtyCallback){node.removeDirtyCallback(this._setModelDirty);node.addDirtyCallback(this,this._setModelDirty);}var id=node.getID();var _fac=com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl);if(id in this.loadedNodes){if(_fac){if(this.loadedNodes[id]!==node){this.loadedNodes[id]._setPersistence(node._getPersistence());}}else{if(!this.isModifiableNode(this.loadedNodes[id])){this.loadedNodes[id]._setPersistence(node);var base=this.loadedNodes[id];node._setContext({getBaseContext:function(){return base;}});}}}else{if(_fac){this.loadedNodes[id]=node;}else{this.loadedNodes[id]=new com.ibm.mm.enabler.navigation.persistence.Factory.createNavigationElement(node,this);}}_fab=this.loadedNodes[id];}return _fab;},_unwrap:function(node){return (node&&dojo.isFunction(node._getPersistence))?node._getPersistence():node;},_setModelDirty:function(){this.setDirty();},find:function(uri){this.enforcementHelper.enforceDefinedNotNull(uri,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["id",this.declaredClass,"find(id)"]);return new com.ibm.mm.enabler.DeferredImpl(this,this._find,uri);},_find:function(_fad,sync,uri){var _fae="find";var _faf=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_faf){this.LOGGER.entering(_fae,arguments);}if(!uri){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(uri);var _fb0=null;if(this.deletedNodes[id]){if(_fad){_fad.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}_fb0=null;}else{if(this.loadedNodes[id]){if(_fad){_fad.finish(this.loadedNodes[id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_fb0=this.loadedNodes[id];}else{var dfr=this._getPersistenceModel({hasCachedFn:function(){var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;return jp.hasCachedFindPage(id);}}).find(uri);dfr.setFinishedCallback(dojo.hitch(this,function(node,_fb1,data){if(node){_fb0=this._wrap(node);}_fad.finish(_fb0,_fb1,data);}));dfr.start(sync);}}if(_faf){this.LOGGER.exiting(_fae,_fb0);}return _fb0;},isModifiableNode:function(node){return !!this._unwrap(node).xmlData;},getModifiableNode:function(node,_fb2){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["node",this.declaredClass,"getModifiableNode(node)"]);return new com.ibm.mm.enabler.DeferredImpl(this,function(_fb3,sync,node){var _fb4="getModifiable";var _fb5=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_fb5){this.LOGGER.entering(_fb4,arguments);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);var _fb6=null;if((this.deletedNodes[id])&&(!_fb2)){if(_fb3){_fb3.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}_fb6=null;}else{if(!this.loadedNodes[id]||!this.isModifiableNode(this.loadedNodes[id])){var dfr=this._getXmlModel().find(id);dfr.setFinishedCallback(dojo.hitch(this,function(node,_fb7,data){if(node){_fb6=this._wrap(node);}_fb3.finish(_fb6,_fb7,data);}));dfr.start(sync);}else{if(_fb3){_fb3.finish(this.loadedNodes[id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_fb6=this.loadedNodes[id];}}if(_fb5){this.LOGGER.exiting(_fb4,_fb6);}return _fb6;},node);},_wrapContent:function(node){var _fb8=null;if(node){var id=node.getID();var _fb9=com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl);if(id in this.contentNodes){if(_fb9){if(this.contentNodes[id]!==node){this.contentNodes[id]._setPersistence(node._getPersistence());}}else{if(!this.isModifiableNode(this.contentNodes[id])){this.contentNodes[id]._setPersistence(node);var base=this.contentNodes[id];node._setContext({getBaseContext:function(){return base;}});}}}else{if(_fb9){this.contentNodes[id]=node;}else{this.contentNodes[id]=new com.ibm.mm.enabler.content.persistence.ContentNodeFactory.createContentNode(node,true);}}_fb8=this.contentNodes[id];}return _fb8;},getModifiableContentNode:function(node){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["node",this.declaredClass,"getModifiableContentNode(node)"]);return new com.ibm.mm.enabler.DeferredImpl(this,function(_fba,sync,node){var _fbb="getModifiableContentNode";var _fbc=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_fbc){this.LOGGER.entering(_fbb,arguments);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);var _fbd=null;var _fbe=this.find(id).start(true);var dfr=this.getModifiableNode(_fbe);dfr.setFinishedCallback(dojo.hitch(this,function(_fbf,_fc0){var _fc1=_fbf.getContent();_fc1.setFinishedCallback(dojo.hitch(this,function(_fc2,_fc3){if(_fc2){_fbd=this._wrapContent(_fc2);}_fba.finish(_fbd,_fc3);}));_fc1.start(sync);}));dfr.start(sync);if(_fbc){this.LOGGER.exiting(_fbb,_fbd);}return _fbd;},node);},getSharedRoot:function(){return this.getRoot();},findDefaultAcceptParent:function(){return this.getRoot();},getRoot:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_fc4,sync){var _fc5="getRoot";var _fc6=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_fc6){this.LOGGER.entering(_fc5,arguments);}var _fc7=null;if(this.root){if(_fc4){_fc4.finish(this.root,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_fc7=this.root;}else{var dfr=this._getPersistenceModel({hasCachedFn:function(){var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;return jp.hasCachedFindPage(jp.COLLECTION);}}).getRoot();dfr.setFinishedCallback(dojo.hitch(this,function(node,_fc8,data){if(node){_fc7=this.root=this._wrap(node);}_fc4.finish(_fc7,_fc8,data);}));dfr.start(sync);}if(_fc6){this.LOGGER.exiting(_fc5,_fc7);}return _fc7;});},hasChildren:function(node){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["node",this.declaredClass,"hasChildren(node)"]);node=this._resolve(node);return node?this._getPersistenceModel({refNode:node,hasCachedFn:function(){var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;return jp.hasCachedHasChildren(node.getID());}}).hasChildren(this._unwrap(node)):false;},getChildren:function(_fc9){this.enforcementHelper.enforceDefinedNotNull(_fc9,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["node",this.declaredClass,"getChildren(node)"]);var that=this;_fc9=this._resolve(_fc9);if(!_fc9||this.hasChildren(_fc9)===false){return new com.ibm.mm.enabler.EmptyModelIteratorImpl();}var pm=this._getPersistenceModel({hasCachedFn:function(){var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;var _fca=jp.hasCachedGetChildren(_fc9.getID());if(!_fca){com.ibm.mashups.enabler.navigation.Factory.getNavigationModel().getModifiableNode(_fc9.getID()).start();}return _fca;}});var _fcb=pm._getIteratorPersistenceHandler(this._unwrap(_fc9));return new com.ibm.mm.enabler.ModelIteratorOrderedBaseImpl({loadAhead:function(_fcc){return new com.ibm.mm.enabler.DeferredImpl(that,function(dfr,sync){var _fcd=_fcb.loadAhead(_fcc);_fcd.setFinishedCallback(dojo.hitch(that,function(_fce,_fcf,data){if(_fce){var _fd0=[];for(var i=0;i<_fce.nodes.length;i++){_fd0.push(this._wrap(_fce.nodes[i]));}_fce.nodes=_fd0;}dfr.finish(_fce,_fcf,data);}));_fcd.start(sync);});},getLoadAheadContext:function(_fd1,_fd2){return _fcb.getLoadAheadContext(_fd1,_fd2);},setCursorPosition:function(_fd3,_fd4){return _fcb.setCursorPosition(_fd3,_fd4);}},{getCreatedNodes:function(){return that.createdNodes;},getDeletedNodes:function(){return that.deletedNodes;},lookupNodeInCacheByID:function(id){if(that.deletedNodes[id]){return null;}else{if(that.loadedNodes[id]&&that.isModifiableNode(that.loadedNodes[id])){return that.loadedNodes[id];}}},contributeNodeToCache:function(node){if(!that.loadedNodes[node.getID()]){that._wrap(node);}},getInboundNodes:function(){var _fd5={};var _fd6=that._movedNodes[_fc9.getID()];if(_fd6){com.ibm.mm.enabler.utils.Misc.forIn(_fd6,function(node,id){if(node===true){_fd5[id]=that._resolve(id);}});}return _fd5;},getOutboundNodes:function(){var _fd7={};var _fd8=that._movedNodes[_fc9.getID()];if(_fd8){com.ibm.mm.enabler.utils.Misc.forIn(_fd8,function(node,id){if(node===false){_fd7[id]=that._resolve(id);}});}return _fd7;}});},getParent:function(node){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["node",this.declaredClass,"getParent(node)"]);node=this._resolve(node);if(!node){return new com.ibm.mm.enabler.DeferredImpl(this,function(_fd9,sync,node){_fd9.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);return null;});}return new com.ibm.mm.enabler.DeferredImpl(this,function(_fda,sync,node){var _fdb="getParent";var _fdc=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_fdc){this.LOGGER.entering(_fdb,arguments);}var _fdd=null;var that=this;var dfr=this._getPersistenceModel({refNode:node,hasCachedFn:function(){var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;return jp.hasCachedGetParent(node.getID());}}).getParent(node,{lookupNodeInCache:dojo.hitch(that,function(id){if(this.deletedNodes[id]){return null;}else{if(this.loadedNodes[id]){return this._unwrap(this.loadedNodes[id]);}}return null;})});dfr.setFinishedCallback(dojo.hitch(this,function(node,_fde,data){if(node){_fdd=this._wrap(node);}_fda.finish(_fdd,_fde,data);}));dfr.start(sync);if(_fdc){this.LOGGER.exiting(_fdb,_fdd);}return _fdd;},node);},confirmExport:function(node){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["page",this.declaredClass,"confirmExport(page)"]);node=this._resolve(node);return node?this._getXmlModel().confirmExport(node):false;},confirmCreate:function(_fdf){return this._getXmlModel().confirmCreate(_fdf);},create:function(_fe0){return new com.ibm.mm.enabler.navigation.persistence.Factory.createNavigationElement(this._getXmlModel().create(_fe0),this);},commit:function(){var that=this;return this._getXmlModel().commit({getNodes:function(){var _fe1={};com.ibm.mm.enabler.utils.Misc.forIn(that.createdNodes,function(node,id){_fe1[id]=that._unwrap(node);});var _fe2={};com.ibm.mm.enabler.utils.Misc.forIn(that.deletedNodes,function(node,id){_fe2[id]=that._unwrap(dojo.hitch(that,that.getModifiableNode)(node,true).start());});var _fe3={};com.ibm.mm.enabler.utils.Misc.forIn(that.loadedNodes,function(node,id){if(that.isModifiableNode(node)){_fe3[id]=that._unwrap(node);}});return {createdNodes:_fe1,deletedNodes:_fe2,loadedNodes:_fe3};},getModel:function(){return that;},getModelNode:dojo.hitch(that,function(node){return that._wrap(node);}),getModelContentNode:dojo.hitch(that,function(node){return that._wrapContent(node);}),updateModelContentNodeID:dojo.hitch(that,function(_fe4,_fe5){if(that.contentNodes[_fe5]&&_fe4!=_fe5){that.contentNodes[_fe4]=that.contentNodes[_fe5];delete that.contentNodes[_fe5];}}),nodeCreated:dojo.hitch(that,function(cid,node){delete that.loadedNodes[cid];delete that.createdNodes[cid];var w=that._wrap(node);w.setClean();}),nodeUpdated:dojo.hitch(that,function(node){that._wrap(node).setClean();}),nodeDeleted:dojo.hitch(that,function(id){delete that.deletedNodes[id];})});},confirmInsert:function(node,_fe6,_fe7){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["node",this.declaredClass,"confirmInsert(node, parentNode, nextNode)"]);this.enforcementHelper.enforceDefinedNotNull(_fe6,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["parentNode",this.declaredClass,"confirmInsert(node, parentNode, nextNode)"]);var _fe8=null;if(node){if(!this.isModifiableNode(node)){this.getModifiableNode(node).start();}_fe8=this._unwrap(node);}var _fe9=null;if(_fe6){this.getModifiableNode(_fe6).start();_fe9=this._unwrap(_fe6);}var _fea=null;if(_fe7){this.getModifiableNode(_fe7).start();_fea=this._unwrap(_fe7);}var that=this;return this._getXmlModel().confirmInsert(_fe8,_fe9,_fea,{getOldParent:dojo.hitch(that,function(){var _feb=that.getParent(node).start();that.getModifiableNode(_feb).start();return that._unwrap(_feb);})});},_moveNode:function(_fec,_fed,_fee){if(!this._movedNodes[_fed]){this._movedNodes[_fed]={};}if(this._movedNodes[_fed][_fec]===!_fee){delete this._movedNodes[_fed][_fec];}else{this._movedNodes[_fed][_fec]=_fee;}},insert:function(node,_fef,_ff0){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["node",this.declaredClass,"insert(node, parentNode, nextNode)"]);var _ff1=this.loadedNodes[node.getID()]?this.getParent(node).start():null;var _ff2=this.hasChildren(_fef)===false;var _ff3=!!this.loadedNodes[node.getID()];var _ff4=false;if(_ff1){var _ff5=this.getChildren(_ff1);if(_ff5.size().start()===1){_ff4=true;}}if(!this.isModifiableNode(node)){this.getModifiableNode(node).start();}var _ff6=this._unwrap(node);var _ff7;if(_fef){this.getModifiableNode(_fef).start();_ff7=this._unwrap(_fef);}var _ff8;if(_ff0){this.getModifiableNode(_ff0).start();_ff8=this._unwrap(_ff0);}var _ff9=_ff1?_ff1.getID():null;if(_fef){var _ffa=node.getID();if(_ff3){var _ffb=_fef.getID();if(_ff9!=_ffb){this._moveNode(_ffa,_ffb,true);if(_ff9){this._moveNode(_ffa,_ff9,false);}}}}var that=this;return this._getXmlModel().insert(_ff6,_ff7,_ff8,{wasOnlyChild:dojo.hitch(that,function(){return _ff4;}),getOldParent:dojo.hitch(that,function(){that.getModifiableNode(_ff1).start();return that._unwrap(_ff1);}),getOldSiblings:dojo.hitch(that,function(){var _ffc={};var id=node.getID();that.getModifiableNode(_ff1).start();var _ffd=that.getChildren(_ff1);prev=null;while(_ffd.hasNext()){current=_ffd.next();if(current.getID()==id&&prev!==null){that.getModifiableNode(prev).start();_ffc.prev=that._unwrap(prev);if(_ffd.hasNext()){var next=_ffd.next();that.getModifiableNode(next).start();_ffc.next=that._unwrap(next);}else{_ffc.next=null;}break;}prev=current;}return _ffc;}),isOnlyChild:_ff2,getPrevNode:dojo.hitch(that,function(){var _ffe=that.getChildren(_fef);prev=null;var _fff=_ff0?_ff0.getID():null;while(_ffe.hasNext()){current=_ffe.next();if(current.getID()==_fff){break;}prev=current;}if(prev){that.getModifiableNode(prev).start();return that._unwrap(prev);}return null;}),isManaged:dojo.hitch(that,function(id){return _ff3;}),nodeInserted:dojo.hitch(that,function(node){var id=node.getID();that.loadedNodes[id]=that._wrap(node);that.createdNodes[id]=null;}),isCreated:dojo.hitch(that,function(id){return that.createdNodes[id]===null;})});},confirmRemove:function(node){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["node",this.declaredClass,"confirmRemove(node)"]);return node?this._getPersistenceModel().confirmRemove(this._unwrap(node)):false;},remove:function(node){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["node",this.declaredClass,"remove(node)"]);node=this._resolve(node);if(node){var id=node.getID();if(!this.isModifiableNode(node)){this.getModifiableNode(node).start();}var _1000=this.getParent(node).start();var _1001=this.getChildren(_1000);var size=_1001.size().start();this.getModifiableNode(_1000).start();var _1002=this._unwrap(_1000);this.deletedNodes[id]=this.loadedNodes[id];delete this.createdNodes[id];var _1003=this._unwrap(this.loadedNodes[id]);_1003._removeDirtyCallback(this._setModelDirty);this._setDirty();return this._getXmlModel().remove(_1003,{parent:_1002,isOnlyChild:size===1});}},hasLayoutModel:function(node,_1004){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["page",this.declaredClass,"hasLayoutModel(page)"]);node=this._resolve(node);if(node){if(!this.isModifiableNode(node)){if(_1004){return false;}else{this.getModifiableNode(node).start();}}return this._getXmlModel().hasLayoutModel(this._unwrap(node));}},getLayoutModel:function(node,_1005){this.enforcementHelper.enforceDefinedNotNull(node,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["page",this.declaredClass,"getLayoutModel(page)"]);node=this._resolve(node);if(node){if(!this.isModifiableNode(node)){if(_1005){return null;}else{this.getModifiableNode(node).start();}}return this._getXmlModel().getLayoutModel(this._unwrap(node));}},invalidate:function(node){if(node){var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);dojo.publish(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_NODE,[{nodes:id}]);}else{var _1006=[];for(var id in this.loadedNodes){_1006.push(id);}dojo.publish(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_NODE,[{nodes:_1006}]);this.setClean();}},_invalidateNode:function(_1007){if(_1007.nodes){_1007=_1007.nodes;}var _1008=dojo.isArray(_1007)?_1007:[_1007];for(var i=0,l=_1008.length;i<l;++i){var _1009=_1008[i];delete this.loadedNodes[_1009];if(_1009 in this.contentNodes){delete this.contentNodes[_1009];}if(_1009 in this.createdNodes){delete this.createdNodes[_1009];}if(_1009 in this.deletedNodes){delete this.deletedNodes[_1009];}if(this.root&&(this.root.getID()==_1009)){delete this.root;}for(var p in this._movedNodes){delete this._movedNodes[p][_1009];}}},discard:function(node){if(this._hasXmlModel()){this._getXmlModel().discard(node);}},setStrategy:function(s){if(this._hasXmlModel()){this._getXmlModel().setStrategy(s);}if(this._hasJsonModel()){this._getJsonModel().setStrategy(s);}return this.inherited(arguments);},addStrategy:function(s){if(this._hasXmlModel()){this._getXmlModel().addStrategy(s);}if(this._hasJsonModel()){this._getJsonModel().addStrategy(s);}return this.inherited(arguments);},removeStrategy:function(s){if(this._hasXmlModel()){this._getXmlModel().removeStrategy(s);}if(this._hasJsonModel()){this._getJsonModel().removeStrategy(s);}return this.inherited(arguments);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.NavigationModel"]){dojo._hasResource["com.ibm.mashups.enabler.model.NavigationModel"]=true;dojo.provide("com.ibm.mashups.enabler.model.NavigationModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.SharedNavigationNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.SharedNavigationNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.SharedNavigationNode_API");dojo.provide("com.ibm.mashups.enabler.navigation.SharedNavigationNode");dojo.declare("com.ibm.mashups.enabler.navigation.SharedNavigationNode",com.ibm.mashups.enabler.navigation.NavigationNode,{});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.SharedNavigationNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.SharedNavigationNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.SharedNavigationNodeImpl");dojo.declare("com.ibm.mm.enabler.navigation.SharedNavigationNodeImpl",[com.ibm.mashups.enabler.navigation.SharedNavigationNode,com.ibm.mm.enabler.navigation.NavigationNodeImpl],{});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.SharedNavigationNode"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.SharedNavigationNode"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.SharedNavigationNode");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.SharedNavigationRoot_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.SharedNavigationRoot_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.SharedNavigationRoot_API");dojo.provide("com.ibm.mashups.enabler.navigation.SharedNavigationRoot");dojo.declare("com.ibm.mashups.enabler.navigation.SharedNavigationRoot",com.ibm.mashups.enabler.navigation.NavigationNode,{});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.SharedNavigationRootImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.SharedNavigationRootImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.SharedNavigationRootImpl");dojo.declare("com.ibm.mm.enabler.navigation.SharedNavigationRootImpl",[com.ibm.mashups.enabler.navigation.SharedNavigationRoot,com.ibm.mm.enabler.navigation.NavigationNodeImpl],{});}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.SharedNavigationRoot"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.SharedNavigationRoot"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.SharedNavigationRoot");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.SharedNavigationModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.SharedNavigationModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.SharedNavigationModel_API");dojo.provide("com.ibm.mashups.enabler.model.SharedNavigationModel");dojo.declare("com.ibm.mashups.enabler.model.SharedNavigationModel",com.ibm.mashups.enabler.TreeModel,{getLayoutModel:function(node){},isAccepted:function(id){}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.SharedNavigationModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.SharedNavigationModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.SharedNavigationModelImpl");dojo.declare("com.ibm.mm.enabler.navigation.SharedNavigationModelImpl",[com.ibm.mashups.enabler.model.SharedNavigationModel,com.ibm.mm.enabler.navigation.NavigationModelImpl,com.ibm.mm.enabler.LazyLoadSupport],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},_getInstance:function(){var _100a=com.ibm.mm.enabler.navigation.SharedNavigationModelImpl._instance;return _100a?_100a:(com.ibm.mm.enabler.navigation.SharedNavigationModelImpl._instance=new com.ibm.mm.enabler.navigation.SharedNavigationModelImpl());},isAccepted:function(node){var _100b=this._unwrap(node);return this._getXmlModel().isAccepted(_100b);},_hasJsonModel:function(){return false;},_getJsonModel:function(){return null;},_getXmlModel:function(){if(!this._xmlModel){this.lazyLoadModules(["SharedNavigationModelXml"]);dojo["require"]("com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationModelXmlImpl");this._xmlModel=com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationModelXmlImpl.prototype._getInstance(this);this._xmlModel.setStrategy(this.getStrategies());dojo.forEach(this._dirtyCallbacks,function(e){this._xmlModel.addDirtyCallback(e.ctx,e.fn,e.args,e.alwaysFire);});}return this._xmlModel;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.SharedNavigationModel"]){dojo._hasResource["com.ibm.mashups.enabler.model.SharedNavigationModel"]=true;dojo.provide("com.ibm.mashups.enabler.model.SharedNavigationModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.Factory_API");dojo.provide("com.ibm.mashups.enabler.navigation.Factory");dojo.declare("com.ibm.mashups.enabler.navigation.Factory",null,{getNavigationModel:function(){},getSharedNavigationModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.FactoryImpl");dojo.declare("com.ibm.mm.enabler.navigation.FactoryImpl",com.ibm.mashups.enabler.navigation.Factory,{getNavigationModel:function(){return com.ibm.mm.enabler.navigation.NavigationModelImpl.prototype._getInstance();},getSharedNavigationModel:function(){return com.ibm.mm.enabler.navigation.SharedNavigationModelImpl.prototype._getInstance();}});com.ibm.mashups.enabler.navigation.Factory=new com.ibm.mm.enabler.navigation.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.Factory");}if(!dojo._hasResource["com.ibm.mm.enabler.iwidget.UtilsModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.iwidget.UtilsModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.iwidget.UtilsModelImpl");dojo.declare("com.ibm.mm.enabler.iwidget.UtilsModelImpl",com.ibm.mm.iwidget.UtilsExtendedImpl,{_getWidgetTitle:function(_100c){var _100d="_getWidgetTitle(modelId)";if(com.ibm.mm.iwidget.Utils.bIsLoggable){com.ibm.mm.iwidget.Utils.bIsLoggable.LOGGER.entering(_100d,_100c);}var _100e=com.ibm.mm.enabler.utils.Model.getCurrentPageID();var title=null;var _100f=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _1010=_100f.find(_100e).start();if(_100f.hasLayoutModel(_1010,true)){var _1011=_100f.getLayoutModel(_1010);var _1012=_1011.find(_100c).start();title=_1012!=null?_1012.getTitle(dojo.locale):null;if(title!==null&&title!==undefined){if(com.ibm.mm.iwidget.Utils.bIsLoggable){com.ibm.mm.iwidget.Utils.LOGGER.trace(_100d,_100c+": using title from model: "+title);}}}else{if(!((ibmConfig)&&(ibmConfig.json)&&(ibmConfig.json["resource-service"]))){if(com.ibm.mm.iwidget.Utils.bIsLoggable){com.ibm.mm.iwidget.Utils.LOGGER.trace(_100d,_100c+": no json resource-service; not updating title");com.ibm.mm.iwidget.Utils.LOGGER.exiting(_100d);}return null;}var _1013=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;if(!_1013){if(com.ibm.mm.iwidget.Utils.bIsLoggable){com.ibm.mm.iwidget.Utils.LOGGER.trace(_100d,_100c+": no json persistence provider; not updating title");com.ibm.mm.iwidget.Utils.LOGGER.exiting(_100d);}return null;}_1013.getWidgetData(_100e,_100c,function(_1014,_1015){if(_1015==200){var _1016=_1014;if(_1016){if(_1016.title){title=_1016.title;if(com.ibm.mm.iwidget.Utils.bIsLoggable){com.ibm.mm.iwidget.Utils.LOGGER.trace(_100d,_100c+": using title from json: "+title);}}}}else{com.ibm.mm.iwidget.Utils.LOGGER.severe(_100d,"error loading json data. Status:"+_1015,_1014);}});}if(com.ibm.mm.iwidget.Utils.bIsLoggable){com.ibm.mm.iwidget.Utils.LOGGER.exiting(_100d,title);}return title;}});com.ibm.mm.iwidget.Utils=new com.ibm.mm.enabler.iwidget.UtilsModelImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.Constants");dojo.declare("com.ibm.mashups.enabler.runtime.skin.Constants",null,{DYNAMIC_CONTENT_TITLE:"lm-dynamic-title",DYNAMIC_CONTENT_ICON:"lm-dynamic-icon",ORDINAL_FIRST:0,ORDINAL_LAST:50000});com.ibm.mashups.enabler.runtime.skin.Constants=new com.ibm.mashups.enabler.runtime.skin.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinNode"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinNode"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinNode");dojo.declare("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinNode",com.ibm.mashups.enabler.Identifiable,{getStyle:function(){},getDynamicContent:function(name){},getLayoutNode:function(){},getDomElementForDynamicContent:function(name){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.ModifiableRuntimeSkinNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.ModifiableRuntimeSkinNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.ModifiableRuntimeSkinNode_API");dojo.provide("com.ibm.mashups.enabler.runtime.skin.ModifiableRuntimeSkinNode");dojo.declare("com.ibm.mashups.enabler.runtime.skin.ModifiableRuntimeSkinNode",com.ibm.mashups.enabler.runtime.skin.RuntimeSkinNode,{checkStyle:function(style){},setStyle:function(style){},setDynamicContent:function(name,value){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.FilterControl"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.FilterControl"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.FilterControl");dojo.declare("com.ibm.mashups.enabler.runtime.skin.FilterControl",null,{constructor:function(){this.disagree=false;},setDisagree:function(){this.disagree=true;},isDisagree:function(){return this.disagree;}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl");dojo.declare("com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl",[com.ibm.mashups.enabler.runtime.skin.RuntimeSkinNode,com.ibm.mashups.enabler.runtime.skin.ModifiableRuntimeSkinNode],{CHANGE_VIEWPORT:1,CHANGE_DC:2,constructor:function(_1017,model){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.style={size:null,location:null};this.dynamicContent={};this.layoutNodeId=_1017;this.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this.model=model;},getStyle:function(){var _1018="getStyle()";var _1019=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1019){this.LOGGER.entering(_1018);}var node=this.getLayoutNode();var value=node?this._deserializeStyle(node.getMetaData("css-style")):null;if(_1019){this.LOGGER.exiting(_1018,value);}return value;},_deserializeStyle:function(_101a){var _101b={};if(typeof _101a==="undefined"||null===_101a||_101a.length===0){return _101b;}var attrs=_101a.split(";");for(var i=0;i<attrs.length;i++){var _101c=attrs[i].split(":");if(2==_101c.length){if(_101c[0].charAt(0)=="\""){_101c[0]=_101c[0].substr(1);}_101b[dojo.string.trim(_101c[0])]=dojo.string.trim(_101c[1]);}else{if(1==_101c.length){if(_101c[0].charAt(0)=="\""){_101c[0]=_101c[0].substr(1);}_101b[dojo.string.trim(_101c[0])]="";}}}return _101b;},_serializeStyle:function(_101d){var _101e="";if(typeof _101d==="undefined"||null===_101d){return _101e;}var _101f={};for(var i in _101d){if(Object.prototype.hasOwnProperty.call(_101d,i)){if((i!=i.toUpperCase())&&(_101d[i.toUpperCase()])){_101f[i.toUpperCase()]="skip";}}}for(var i in _101d){if(Object.prototype.hasOwnProperty.call(_101d,i)){if(!_101f[i]){var value=_101d[i];if(typeof value==="undefined"||null===value||""===value){_101e+=i+"; ";}else{_101e+=i+": "+value+"; ";}}}}return _101e;},checkStyle:function(_1020){var _1021="check(style)";var _1022=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1022){this.LOGGER.entering(_1021,_1020);}var node=this.getLayoutNode();if(!node){return false;}var _1023=this.getStyle();var chain=this.model._buildStyleFilterChain(node,true);var _1024=new com.ibm.mashups.enabler.runtime.skin.FilterControl();chain.doFilter(this.getLayoutNode(),_1023,_1020,_1024);var _1025=!_1024.isDisagree();if(_1022){this.LOGGER.exiting(_1021,_1025);}return _1025;},setStyle:function(_1026){var _1027="setStyle(newStyle)";var _1028=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1028){this.LOGGER.entering(_1027,_1026);}var _1029=this.getStyle();var chain=this.model._buildStyleFilterChain(this.getLayoutNode(),false);chain.doFilter(this.getLayoutNode(),_1029,_1026);if(_1028){this.LOGGER.exiting(_1027);}},getDomElementForDynamicContent:function(name){var _102a;var _102b=dojo.query(".id-"+this.layoutNodeId+"");if(_102b.length!==1){return null;}_102a=_102b[0];var elems=dojo.query("."+name,_102a);if(elems.length!==1){return null;}return elems[0];},getDynamicContent:function(name){var _102c="getDynamicContent(name)";var _102d=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_102d){this.LOGGER.entering(_102c,name);}var _102e=this.getDomElementForDynamicContent(name);var value=null;if(_102e&&"IMG"==_102e.nodeName){value=_102e.src;}else{if(_102e){value=_102e.innerHTML;}}if(_102d){this.LOGGER.exiting(_102c,value);}return value;},setDynamicContent:function(name,value){var _102f="setDynamicContent(name, value)";var _1030=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1030){this.LOGGER.entering(_102f,[name,value]);}var _1031=this.getDynamicContent(name);var chain=this.model._buildDCFilterChain(this.getLayoutNode(),false);chain.doFilter(this.getLayoutNode(),name,_1031,value);},getLayoutNode:function(){var lm=this.model._getLayoutModel();this.layoutNode=lm.find(this.layoutNodeId).start();return this.layoutNode;},_setLayoutNode:function(_1032){this.layoutNode=_1032;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.ModifiableRuntimeSkinNode"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.ModifiableRuntimeSkinNode"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.ModifiableRuntimeSkinNode");}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinLocator"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinLocator"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinLocator");dojo.declare("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinLocator",com.ibm.mashups.enabler.Locator,{findByLayoutNode:function(_1033){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilterChain_API"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilterChain_API"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.StyleFilterChain_API");dojo.provide("com.ibm.mashups.enabler.runtime.skin.StyleFilterChain");dojo.declare("com.ibm.mashups.enabler.runtime.skin.StyleFilterChain",null,{doFilter:function(_1034,_1035,_1036,_1037){}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.StyleFilterChainImpl"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.StyleFilterChainImpl"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.StyleFilterChainImpl");dojo.declare("com.ibm.mm.enabler.runtime.skin.StyleFilterChainImpl",[com.ibm.mashups.enabler.runtime.skin.StyleFilterChain],{constructor:function(_1038,_1039){this.filters=_1038;this.changing=_1039;this.current=0;},doFilter:function(_103a,_103b,_103c,_103d){if(this.current>=this.filters.length){return;}if(this.changing){this.filters[this.current++].onChangingStyle(_103a,_103b,_103c,_103d,this);}else{this.filters[this.current++].onChangeStyle(_103a,_103b,_103c,this);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilterChain"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilterChain"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.StyleFilterChain");}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilter"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.StyleFilter"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.StyleFilter");dojo.declare("com.ibm.mashups.enabler.runtime.skin.StyleFilter",null,{onChangingStyle:function(_103e,_103f,_1040,_1041,_1042){},onChangeStyle:function(_1043,_1044,_1045,_1046){},onChangeLayoutControl:function(_1047){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel_API");dojo.provide("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel");dojo.declare("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel",[com.ibm.mashups.enabler.ListModel,com.ibm.mashups.enabler.runtime.skin.RuntimeSkinLocator,com.ibm.mashups.enabler.Invalidatable],{addStyleFilter:function(_1048,_1049,_104a){},removeStyleFilter:function(_104b){},find:function(id){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain_API"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain_API"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain_API");dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain");dojo.declare("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain",null,{doFilter:function(_104c,name,_104d,_104e,_104f){}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl");dojo.declare("com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl",[com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain],{constructor:function(_1050,_1051){this.filters=_1050;this.changing=_1051;this.current=0;},doFilter:function(_1052,name,_1053,_1054,_1055){if(this.current>=this.filters.length){return;}if(this.changing){this.filters[this.current++].onChangingDynamicContent(_1052,name,_1053,_1054,_1055,this);}else{this.filters[this.current++].onChangeDynamicContent(_1052,name,_1053,_1054,this);}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilterChain");}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter");dojo.declare("com.ibm.mashups.enabler.runtime.skin.DynamicContentFilter",null,{onChangingDynamicContent:function(_1056,name,_1057,_1058,_1059,_105a){},onChangeDynamicContent:function(_105b,name,_105c,_105d,_105e){}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemStyleFilter"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemStyleFilter"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.SystemStyleFilter");dojo.declare("com.ibm.mm.enabler.runtime.skin.SystemStyleFilter",[com.ibm.mashups.enabler.runtime.skin.StyleFilter],{constructor:function(_105f,_1060,_1061){this.navModel=_105f;this.layoutModel=_1060;this.rsModel=_1061;},onChangingStyle:function(_1062,_1063,_1064,_1065,_1066){_1066.doFilter(_1062,_1063,_1064,_1065);},onChangeStyle:function(_1067,_1068,_1069,_106a){var _106b=com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl.prototype._serializeStyle(_1069);_1067.setMetaData("css-style",_106b);_106a.doFilter(_1067,_1068,_1069);}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter");dojo.declare("com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter",null,{onChangingDynamicContent:function(_106c,name,_106d,_106e,_106f,_1070){_1070.doFilter(_106c,name,_106d,_106e,_106f,_1070);},onChangeDynamicContent:function(_1071,name,_1072,_1073,_1074){_1074.doFilter(_1071,name,_1072,_1073);if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1071,com.ibm.mashups.enabler.layout.LayoutControl)||(typeof _1073==="undefined"||null===_1073)||_1072===_1073){return;}var _1075=com.ibm.mashups.enabler.runtime.skin.Factory.getRuntimeSkinModel();var _1076=_1075.findByLayoutNode(_1071);var node=_1076.getDomElementForDynamicContent(name);if(!node){return;}if(name==com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE){node.innerHTML=_1073.replace(/&amp;/g,"&").replace(/&quot;/g,"\"").replace(/&gt;/g,">").replace(/&lt;/g,"<");}else{if(name==com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_ICON){node.src=_1073;}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl");dojo.declare("com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl",[com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel,com.ibm.mm.enabler.model.ModelImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.nodes=new dojox.collections.Dictionary();var ids=[];this.cursor=0;this.styleChains=new dojox.collections.Dictionary();this.dcChains=new dojox.collections.Dictionary();this.currentPage=null;this.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.styleFilters=new dojox.collections.SortedList();this.styleFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST,new dojox.collections.ArrayList());this.styleFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST,new dojox.collections.ArrayList());this.styleFilterIDs=new dojox.collections.SortedList();this.dcFilters=new dojox.collections.SortedList();this.dcFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST,new dojox.collections.ArrayList());this.dcFilters.add(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST,new dojox.collections.ArrayList());this.dcFilterIDs=new dojox.collections.SortedList();},invalidate:function(node){if(node){var id=node.getLayoutNode().getID();if(this.styleChains.containsKey(id)){this.styleChains.remove(id);}}else{this.styleChains.clear();}},getInstance:function(){var _1077=com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl._instance;var ret=_1077?_1077:(com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl._instance=new com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl());ret.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();ret.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();return ret;},_buildIteratorNodes:function(node,lm){var _1078="buildIteratorNodes(node, lm)";var _1079=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1079){this.LOGGER.entering(_1078,[node,lm]);}if(typeof node=="undefined"||null===node){if(_1079){this.LOGGER.exiting(_1078);}return;}if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.layout.LayoutControl)||com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.layout.LayoutContainer)){if(_1079){this.LOGGER.trace(_1078,"Adding runtime skin node with id: "+node.getID());}this.nodes.add(node.getID(),new com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl(node,this));this.ids[this.ids.length]=node.getID();}var _107a=lm.getChildren(node);while(_107a.hasNext()){this._buildIteratorNodes(_107a.next(),lm);}if(_1079){this.LOGGER.exiting(_1078);}},iterator:function(){var _107b="iterator()";var _107c=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_107c){this.LOGGER.entering(_107b);}this.nodes.clear();this.ids=[];var page=this._getCurrentPage();this.cursor=0;if(page===null){if(_107c){this.LOGGER.exiting(_107b);}return this;}var _107d=this.navModel.getLayoutModel(page);if(_107d===null){if(_107c){this.LOGGER.exiting(_107b);}return this;}var root=_107d.getRoot().start();this._buildIteratorNodes(root,_107d);if(_107c){this.LOGGER.exiting(_107b);}return this;},start:function(sync){},hasNext:function(){return this.size()>this.cursor;},next:function(){if(!this.hasNext()){return null;}var ret=null;var id=this.ids[this.cursor++];ret=this.nodes.entry(id).valueOf()||null;return ret;},size:function(){return this.nodes.count;},setCursorPosition:function(_107e){this.cursor=_107e;},getCursorPosition:function(){return this.cursor;},_getCurrentPage:function(){var _107f="_getCurrentPage()";var _1080=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1080){this.LOGGER.entering(_107f);}var _1081=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(this.navStateModel,null);var _1082=_1081.getPageID();if(_1080){this.LOGGER.trace(_107f,"page id is "+_1082);}if(typeof _1082=="undefined"||null===_1082){if(_1080){this.LOGGER.exiting(_107f,null);}return null;}var node=this.navModel.find(_1082).start();if(_1080){this.LOGGER.exiting(_107f,node);}return node;},_getLayoutModel:function(){var page=this._getCurrentPage();if(null===page){return null;}return this.navModel.getLayoutModel(page);},_hasPageChanged:function(page){if(this.currentPage===null||com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(page)!=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this.currentPage)){this.currentPage=page;this.nodes.clear();this.ids=[];return true;}return false;},_isLayoutNodeOnCurrentPage:function(_1083){return true;},find:function(id){var _1084="find(id)";var _1085=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1085){this.LOGGER.entering(_1084,id);}if(typeof id=="undefined"||id===null){return null;}var page=this._getCurrentPage();this._hasPageChanged(page);if(!this._isLayoutNodeOnCurrentPage(id)){if(this.nodes.containsKey(id)){this.nodes.remove(id);}if(_1085){this.LOGGER.trace(_1084,id+" is not on the current page");this.LOGGER.exiting(_1084,null);}return null;}if(this.nodes.containsKey(id)){if(_1085){this.LOGGER.trace(_1084,id+" is cached");this.LOGGER.exiting(_1084,this.nodes.entry(id).valueOf());}return this.nodes.entry(id).valueOf();}var _1086=new com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl(id,this);this.nodes.add(id,_1086);this.ids[this.ids.length]=id;if(_1085){this.LOGGER.exiting(_1084,_1086);}return _1086;},findByLayoutNode:function(_1087){var _1088="findByLayoutNode(layoutNode)";var _1089=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1089){this.LOGGER.entering(_1088,_1087);}if(typeof _1087=="undefined"||null===_1087){if(_1089){this.LOGGER.exiting(_1088,null);}return null;}var _108a=this.find(_1087.getID());if(_108a){_108a._setLayoutNode(_1087);}if(_1089){this.LOGGER.exiting(_1088,_108a);}return _108a;},_generateFilterId:function(){if(!this._listenerCounter){this._listenerCounter=1;}else{this._listenerCounter++;}return this._listenerCounter;},addStyleFilter:function(_108b,_108c,_108d){var _108e="ordinal, filter, scopeObject";var _108f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_108f){this.LOGGER.entering(_108e,[_108b,_108c,_108d]);}if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_108c,com.ibm.mashups.enabler.runtime.skin.StyleFilter)){if(_108f){this.LOGGER.exiting(_108e,-1);}return -1;}var id=this._addFilter(_108b,_108c,_108d,this.styleFilterIDs,this.styleFilters,this.styleChains);if(_108f){this.LOGGER.exiting(_108e,id);}return id;},_addFilter:function(_1090,_1091,_1092,ids,_1093,_1094){var _1095="_addFilter(ordinal, filter, scopeObject, ids, filters)";var _1096=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1096){this.LOGGER.entering(_1095,[_1090,_1091,_1092,ids,_1093]);}if(typeof _1090!="number"){this.LOGGER.trace(_1095,"ordinal is not a number");this.LOGGER.exiting(_1095,-1);return -1;}var _1097;var _1098=false;if(typeof _1092=="undefined"||null===_1092||!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1092,com.ibm.mashups.enabler.layout.LayoutNode)){_1097=null;if(_1096){this.LOGGER.trace(_1095,"no scope object");}}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1092,com.ibm.mashups.enabler.layout.LayoutControl)){_1097=_1092;if(_1096){this.LOGGER.trace(_1095,"scope object is a LayoutControl");}}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1092,com.ibm.mashups.enabler.layout.LayoutContainer)){_1097=_1092;_1098=true;if(_1096){this.LOGGER.trace(_1095,"scope object is a LayoutContainer");}}else{_1097=null;if(_1096){this.LOGGER.trace(_1095,"no scope object");}}}}var id=this._generateFilterId();var _1099={id:id,filter:_1091,scope:_1097,isContainer:_1098,ordinal:_1090};var list;if(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST>=_1090){list=_1093.item(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST);list.insert(0,_1099);ids.add(id,com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST);}else{if(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST<=_1090){list=_1093.item(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST);list.add(_1099);ids.add(id,com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST);}else{list=_1093.item(_1090);if(typeof list==="undefined"||null===list){list=new dojox.collections.ArrayList();this.styleFilters.add(_1090,list);}list.add(_1099);ids.add(id,_1090);}}_1094.clear();if(_1096){this.LOGGER.exiting(_1095,id);}return id;},removeStyleFilter:function(_109a){this._removeFilter(_109a,this.styleFilterIDs,this.styleFilters,this.styleChains);},_removeFilter:function(_109b,ids,_109c,_109d){var _109e=ids.item(_109b);if(typeof _109e=="undefined"||null===_109e){return;}var list=_109c.item(_109e);if(typeof list!=="undefined"&&null!==list&&0<list.count){var index=-1;var _109f=0;var _10a0=list.getIterator();while(!_10a0.atEnd()){var _10a1=_10a0.get();if(_10a1.id===_109b){index=_109f;break;}_109f++;}if(index!==-1){list.removeAt(index);_109d.clear();}}ids.remove(_109b);},_getStyleFilters:function(){return this.styleFilters;},_determineFilters:function(_10a2,_10a3,_10a4){var _10a5="_determineFilters(layoutNode, filters, chains)";var _10a6=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_10a6){this.LOGGER.entering(_10a5,[_10a2,_10a3,_10a4]);}var page=this._getCurrentPage();if(this._hasPageChanged(page)){if(_10a6){this.LOGGER.trace(_10a5,"page change, clear chain cache");}_10a4.clear();}else{if(_10a4.containsKey(_10a2.getID())){var id=_10a2.getID();if(_10a6){this.LOGGER.trace(_10a5,id+" chain is cached");this.LOGGER.exiting(_10a5,_10a4.entry(id).valueOf());}return _10a4.entry(id).valueOf();}}var _10a7=this._getLayoutModel();var _10a8=[];for(var i=0;i<_10a3.count;i++){var _10a9=_10a3.getByIndex(i).getIterator();while(!_10a9.atEnd()){var _10aa=_10a9.get();if(typeof _10aa=="undefined"||null===_10aa){continue;}if(_10aa.scope===null){if(_10a6){this.LOGGER.trace(_10a5,"adding filter "+_10aa.id+", no scope");}_10a8[_10a8.length]=_10aa.filter;}else{if(false===_10aa.isContainer&&_10a2.getID()==_10aa.scope.getID()){if(_10a6){this.LOGGER.trace(_10a5,"adding filter "+_10aa.id+", layoutcontrol matches scope");}_10a8[_10a8.length]=_10aa.filter;}else{if(true===_10aa.isContainer&&null!==_10a7){var _10ab=_10a7.getParent(_10a2).start();if(null===_10ab){_10ab=_10a7.getRoot().start();}if(_10ab.getID()==_10aa.scope.getID()||(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_10a2,com.ibm.mashups.enabler.layout.LayoutContainer)&&_10a2.getID()==_10aa.scope.getID())){if(_10a6){this.LOGGER.trace(_10a5,"adding filter "+_10aa.id+", layoutcontainer is the scope");}_10a8[_10a8.length]=_10aa.filter;}}}}}}_10a4.add(_10a2.getID(),_10a8);if(_10a6){this.LOGGER.exiting(_10a5,_10a8);}return _10a8;},_determineStyleFilters:function(_10ac){var _10ad=this._determineFilters(_10ac,this.styleFilters,this.styleChains);_10ad=_10ad.slice(0);_10ad[_10ad.length]=new com.ibm.mm.enabler.runtime.skin.SystemStyleFilter(this.navModel,this._getLayoutModel(),this);return _10ad;},_determineDynamicContentFilters:function(_10ae){var _10af=this._determineFilters(_10ae,this.dcFilters,this.dcChains);_10af=_10af.slice(0);_10af[_10af.length]=new com.ibm.mm.enabler.runtime.skin.SystemDynamicContentFilter(this);return _10af;},_buildStyleFilterChain:function(_10b0,_10b1){var _10b2=this._determineStyleFilters(_10b0);return new com.ibm.mm.enabler.runtime.skin.StyleFilterChainImpl(_10b2,_10b1);},_buildDCFilterChain:function(_10b3,_10b4){var _10b5=this._determineDynamicContentFilters(_10b3);return new com.ibm.mm.enabler.runtime.skin.DynamicContentFilterChainImpl(_10b5,_10b4);},_layoutControlChange:function(_10b6,noop,oldID,newID){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.RuntimeSkinModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.Factory_API");dojo.provide("com.ibm.mashups.enabler.runtime.skin.Factory");dojo.declare("com.ibm.mashups.enabler.runtime.skin.Factory",null,{getRuntimeSkinModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.runtime.skin.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.runtime.skin.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.runtime.skin.FactoryImpl");dojo.declare("com.ibm.mm.enabler.runtime.skin.FactoryImpl",com.ibm.mashups.enabler.runtime.skin.Factory,{getRuntimeSkinModel:function(){return com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.runtime.skin.Factory=new com.ibm.mm.enabler.runtime.skin.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.runtime.skin.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.runtime.skin.Factory");}if(!dojo._hasResource["com.ibm.mm.enabler.iwidget.manageditemset.IDescriptorModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.iwidget.manageditemset.IDescriptorModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.iwidget.manageditemset.IDescriptorModelImpl");dojo.declare("com.ibm.mm.enabler.iwidget.manageditemset.IDescriptorModelImpl",[com.ibm.mm.iwidget.manageditemset.IDescriptorExtendedImpl,com.ibm.mm.enabler.LazyLoadSupport],{_getDynamicTitle:function(){var _10b7=com.ibm.mm.iwidget.Utils.getModelID(this.widget.id);return com.ibm.mm.iwidget.Utils._getWidgetTitle(_10b7);},_setDynamicTitleOrIcon:function(name,value){if(name==iwConstants.iDescriptorItems.title){this._hasDynamicTitle=true;}if(name==iwConstants.iDescriptorItems.icon){this._hasDynamicIcon=true;}var _10b8=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(this.navStateModel,null);var _10b9=_10b8.getPageID();var _10ba=null;if(com.ibm.mashups.enabler.navigation&&com.ibm.mashups.enabler.navigation.Factory){_10ba=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();}if(_10ba){var page=_10ba.find(_10b9).start();var lm=_10ba.getLayoutModel(page);var _10bb=lm.find(this.widget.id).start();var _10bc=com.ibm.mashups.enabler.runtime.skin.Factory.getRuntimeSkinModel();var _10bd=_10bc.findByLayoutNode(_10bb);if(name==iwConstants.iDescriptorItems.title){_10bd.setDynamicContent(com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE,value);}if(name==iwConstants.iDescriptorItems.icon){_10bd.setDynamicContent(com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_ICON,value);}}},commit:function(_10be){if(this.instanceiDescriptorItems._isDirty()){var _10bf=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(this.navStateModel,null);var _10c0=_10bf.getPageID();var _10c1=null;if(com.ibm.mashups.enabler.navigation&&com.ibm.mashups.enabler.navigation.Factory){_10c1=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();}if(_10c1){var page=_10c1.find(_10c0).start();var lm=_10c1.getLayoutModel(page);var _10c2=lm.find(this.widget.id).start();var _10c3=this.instanceiDescriptorItems.getAllNames();for(var j in _10c3){if(Object.prototype.hasOwnProperty.call(_10c3,j)){var _10c4=this.instanceiDescriptorItems._items[_10c3[j]].values;for(var v in _10c4){if(Object.prototype.hasOwnProperty.call(_10c4,v)){if(_10c3[j]==iwConstants.iDescriptorItems.title){_10c2.setTitle(_10c4[v],v);}if(_10c3[j]==iwConstants.iDescriptorItems.description){_10c2.setDescription(_10c4[v],v);}}}}}_10c1.commit().start();}}this.inherited(arguments.callee.nom,arguments);}});com.ibm.mm.iwidget.manageditemset.IDescriptorImpl=com.ibm.mm.enabler.iwidget.manageditemset.IDescriptorModelImpl;}if(!dojo._hasResource["com.ibm.mm.enabler.iwidget.services.EventServiceModel"]){dojo._hasResource["com.ibm.mm.enabler.iwidget.services.EventServiceModel"]=true;dojo.provide("com.ibm.mm.enabler.iwidget.services.EventServiceModel");dojo.declare("com.ibm.mm.enabler.iwidget.services.EventServiceModelImpl",com.ibm.mm.iwidget.services.EventServiceExtendedImpl,{BROADCAST_EVENTS_COOKIE_ID:"com.ibm.mashups.enabler.broadcastEvents",BROADCAST_EVENTS_SOURCE_ID_COOKIE_ID:"com.ibm.mashups.enabler.broadcastEventsSourceId",_switchPageForBroadcastEvents:function(_10c5,_10c6,_10c7,_10c8,_10c9,_10ca,_10cb){var _10cc=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _10cd=_10cc.find(_10c7).start();if(_10cd){var _10ce=_10cd.getSpaceIdentifier();if(_10ce){var _10cf=_10ce.getID();if((_10cf)&&(_10cf!=_10cb)){_10c8=_10cf;}}}if(!_10c8){_10c8=_10cb;}this.broadcastEventsCache=_10c5;this.broadcastEventsSourceIdCache=_10c6;if(dojo.cookie.isSupported()){dojo.cookie(this.BROADCAST_EVENTS_COOKIE_ID,dojo.toJson(_10c5),{expires:1});dojo.cookie(this.BROADCAST_EVENTS_SOURCE_ID_COOKIE_ID,_10c6,{expires:1});}if((_10c8)&&(typeof _10c8=="string")){if(_10c8!=_10cb){_10ca.setSpaceID(_10c8);}var _10d0=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_10c9,_10c8);_10d0.setPageID(_10c7);}else{var _10d0=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_10c9);_10d0.setPageID(_10c7);}var _10d1=_10c9.commit();_10d1.start();},_handleBroadcastEventsCache:function(){if(this.broadcastEventsCache===null||typeof this.broadcastEventsCache=="undefined"){if(dojo.cookie.isSupported()){this.broadcastEventsCache=dojo.fromJson(dojo.cookie(this.BROADCAST_EVENTS_COOKIE_ID));}}if(this.broadcastEventsCache&&dojo.isArray(this.broadcastEventsCache)){if(this.broadcastEventsSourceIdCache===null||typeof this.broadcastEventsSourceIdCache=="undefined"){if(dojo.cookie.isSupported()){this.broadcastEventsSourceIdCache=dojo.cookie(this.BROADCAST_EVENTS_SOURCE_ID_COOKIE_ID);}}this.broadcastEvents(dojo.map(this.broadcastEventsCache,function(item){return item;}),this.broadcastEventsSourceIdCache);this.broadcastEventsCache=null;this.broadcastEventsSourceIdCache=null;dojo.cookie(this.BROADCAST_EVENTS_COOKIE_ID,null,{expires:-1});dojo.cookie(this.BROADCAST_EVENTS_SOURCE_ID_COOKIE_ID,null,{expires:-1});}}});if(!ibmConfig.insideSandbox){com.ibm.mashups.services.ServiceManager.setService("eventService","com.ibm.mm.enabler.iwidget.services.EventServiceModelImpl");}}if(!dojo._hasResource["com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl");dojo.declare("com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl",com.ibm.mm.iwidget.widget.IWidgetWrapperExtendedImpl,{_query:function(_10d2){var _10d3=dojo.byId(_10d2);if(_10d3!=null&&dojo.hasClass(_10d3,"iw-Standalone")){return [];}var _10d4=dojo.query("#layoutContainers > .component-container > .id-"+_10d2);if(!!_10d4&&_10d4.length>0){return _10d4;}_10d4=dojo.query("#layoutContainers > .hiddenWidgetsDiv > .component-container > .id-"+_10d2);if(!!_10d4&&_10d4.length>0){return _10d4;}return dojo.query(".id-"+_10d2);},_updateTitle:function(){var _10d5="_updateTitle()";if(this.bIsLoggable){this.LOGGER.entering(_10d5);}var _10d6=com.ibm.mm.iwidget.Utils.getModelID(this.id);var _10d7,elem;var _10d8=this._query(_10d6);if(_10d8.length!==1){if(this.bIsLoggable){this.LOGGER.trace(_10d5,_10d6+": no layout node; not updating title");this.LOGGER.exiting(_10d5);}return;}_10d7=_10d8[0];var elems=dojo.query("."+com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE,_10d7);if(elems.length!==1){if(this.bIsLoggable){this.LOGGER.trace(_10d5,_10d6+": no dynamic content title element; not updating title");this.LOGGER.exiting(_10d5);}return;}elem=elems[0];var title=com.ibm.mm.iwidget.Utils._getWidgetTitle(_10d6);if(title===null){title=this.widgetDef.getIDescriptorItems().getItemValue("title",dojo.locale);if(this.bIsLoggable){this.LOGGER.trace(_10d5,_10d6+": using title from widget xml: "+title);}}if(title!==null){elem.innerHTML=title;if(this.bIsLoggable){this.LOGGER.trace(_10d5,_10d6+": set title to: "+title);}}if(this.bIsLoggable){this.LOGGER.exiting(_10d5);}}});com.ibm.mm.iwidget.widget.IWidgetWrapperImpl=com.ibm.mm.enabler.iwidget.widget.IWidgetWrapperModelImpl;}if(!dojo._hasResource["com.ibm.mm.enabler.utils.Model"]){dojo._hasResource["com.ibm.mm.enabler.utils.Model"]=true;dojo.provide("com.ibm.mm.enabler.utils.Model");com.ibm.mm.enabler.utils.Model={LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.utils.Model"),LOG_LEVEL:com.ibm.mashups.enabler.logging.LogLevel.TRACE,getCurrentPageID:function(){var _10d9=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _10da=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_10d9,null);var _10db=_10da.getPageID();return _10db;},getCurrentPageDeferred:function(){var _10dc="getCurrentPageDeferred()";var _10dd=com.ibm.mm.enabler.utils.Model.LOGGER.isLoggable(this.LOG_LEVEL);if(_10dd){com.ibm.mm.enabler.utils.Model.LOGGER.entering(_10dc);}var _10de=this.getCurrentPageID();if(_10dd){com.ibm.mm.enabler.utils.Model.LOGGER.trace(_10dc,"page id is "+_10de);}if(typeof _10de=="undefined"||null===_10de){if(_10dd){com.ibm.mm.enabler.utils.Model.LOGGER.exiting(_10dc,null);}return null;}var _10df=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _10e0=_10df.find(_10de);if(_10dd){this.LOGGER.exiting(_10dc,_10e0);}return _10e0;},getCurrentPageLayoutModel:function(){var _10e1="getCurrentPageLayoutModel()";var _10e2=com.ibm.mm.enabler.utils.Model.LOGGER.isLoggable(this.LOG_LEVEL);if(_10e2){com.ibm.mm.enabler.utils.Model.LOGGER.entering(_10e1);}var _10e3=com.ibm.mm.enabler.utils.Model.getCurrentPageDeferred().start();if(!_10e3){return null;}if(_10e2){com.ibm.mm.enabler.utils.Model.LOGGER.trace(_10e1,"page id is "+_10e3.getID());}var _10e4=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _10e5=_10e4.getLayoutModel(_10e3);if(_10e2){this.LOGGER.exiting(_10e1,_10e5);}return _10e5;}};}if(!dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl"]){dojo._hasResource["com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl"]=true;dojo.provide("com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl");dojo.declare("com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl",com.ibm.mm.iwidget.itemset.ShareableItemSetImpl,{constructor:function(_10e6,_10e7,name){var _10e8=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var dfd=com.ibm.mm.enabler.utils.Model.getCurrentPageDeferred();var scope;if(dfd){scope=this._getScope(dfd.start(),_10e8);}if(!scope){scope="global";}var psid=this.alias;if(!psid){psid=this.id;}this.shareableAccessor=com.ibm.mashups.enabler.model.state.AccessorFactory.getShareableParameterSetAccessor(this.navigationStateModel,psid,scope);},_getScope:function(_10e9,_10ea){if(_10e9){var scope=_10e9.getMetaData("param.sharing.scope");if(scope){return scope;}var _10eb=_10ea.getParent(_10e9);if(_10eb){var _10ec=_10eb.start();if(_10ec){return this._getScope(_10ec,_10ea);}}}return null;}});com.ibm.mm.iwidget.itemset.ShareableItemSetFactory=com.ibm.mm.iwidget.itemset.ShareableItemSetExtendedModelImpl;}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModelFactory_API");dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModelFactory");dojo.declare("com.ibm.mashups.enabler.ac.AccessControlModelFactory",null,{getAccessControlModel:function(_10ed){},getAccessControlModel:function(_10ee){},getAccessControlModel:function(_10ef){},getAccessControlModel:function(_10f0,_10f1){},getAccessControlModel:function(_10f2,_10f3){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl");dojo.declare("com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl",[com.ibm.mashups.enabler.ac.AccessControlModelFactory,com.ibm.mm.enabler.LazyLoadSupport],{modelMessages:null,_resourceACModels:null,_resourceSpaceACModels:null,constructor:function(){this._resourceACModels={};this._resourceSpaceACModels={};this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");},_transformXNode:function(xNode){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutContainer)){xNode=xNode._getContent();dojo.deprecated("com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel","The method com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel used in conjunction with com.ibm.mashups.enabler.layout.LayoutNode is deprecated, please use com.ibm.mashups.enabler.content.ContentNode as parameter instead!");}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutFragment)){dojo.deprecated("com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel","The method com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel used in conjunction with com.ibm.mashups.enabler.layout.LayoutFragment is deprecated, please use com.ibm.mashups.enabler.content.ContentNode as parameter instead!");}}return xNode;},_getResourceSpaceAccessControlModel:function(_10f4,xNode){var ret=null;var _10f5=_10f4.getID();var xID=xNode.getID();if(this._resourceSpaceACModels[_10f5]){ret=this._resourceSpaceACModels[_10f5][xID];}if(!ret){ret=new com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl(_10f4,xNode);if(!this._resourceSpaceACModels[_10f5]){this._resourceSpaceACModels[_10f5]={};}this._resourceSpaceACModels[_10f5][xID]=ret;}return ret;},_getResourceAccessControlModel:function(xNode){var ret=null;var xID=xNode.getID();ret=this._resourceACModels[xID];if(!ret){ret=new com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl(xNode);this._resourceACModels[xID]=ret;}return ret;},_getSpaceAccessControlModel:function(_10f6){return new com.ibm.mm.enabler.ac.SpaceAccessControlModelImpl(_10f6);},_getAccessControlModelFromSingleNode:function(xNode){xNode=this._transformXNode(xNode);var ret=null;if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.space.SpaceNode)){ret=this._getSpaceAccessControlModel(xNode);}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.content.ContentNode)||com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutFragment)){ret=this._getResourceAccessControlModel(xNode);}else{throw new Error(dojo.string.substitute(this.modelMessages.E_INVALID_PARAM_TYPE_0,{num:1,type:"com.ibm.mashups.enabler.space.SpaceNode|com.ibm.mashups.enabler.content.ContentNode"}));}}return ret;},getAccessControlModel:function(){com.ibm.mashups.enabler.ac.AccessControlModelFactory.lazyLoadModules(["AccessControlModel","SpaceModel","LayoutModel"]);var xNode,ret=null;if(arguments.length===2&&arguments[0]===null){dojo.deprecated("com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel","The method com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel/2 used with null as first parameter is deprecated, please use com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel/1 instead!");ret=this._getAccessControlModelFromSingleNode(arguments[1]);}else{if(arguments.length===2){var _10f7=arguments[0];xNode=arguments[1];if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_10f7,com.ibm.mashups.enabler.space.SpaceNode)){throw new Error(dojo.string.substitute(this.modelMessages.E_INVALID_PARAM_TYPE_0,{num:1,type:"com.ibm.mashups.enabler.space.SpaceNode"}));}xNode=this._transformXNode(xNode);if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.content.ContentNode)&&!com.ibm.mm.enabler.utils.Misc.isInstanceOf(xNode,com.ibm.mashups.enabler.layout.LayoutFragment)){throw new Error(dojo.string.substitute(this.modelMessages.E_INVALID_PARAM_TYPE_0,{num:2,type:"com.ibm.mashups.enabler.content.ContentNode"}));}ret=this._getResourceSpaceAccessControlModel(_10f7,xNode);}else{if(arguments.length===1){ret=this._getAccessControlModelFromSingleNode(arguments[0]);}else{throw new Error(this.modelMessages.E_INVALID_PARAM_COUNT_0);}}}if(ret!==null&&dojo.isFunction(ret._init)&&dojo.isFunction(ret._loadAheadResource)){ret._init();ret._loadAheadResource(null,true);}return ret;}});com.ibm.mashups.enabler.ac.AccessControlModelFactory=new com.ibm.mm.enabler.ac.AccessControlModelFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModelFactory"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModelFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.VirtualResourceType"]){dojo._hasResource["com.ibm.mashups.enabler.ac.VirtualResourceType"]=true;dojo.provide("com.ibm.mashups.enabler.ac.VirtualResourceType");dojo.declare("com.ibm.mashups.enabler.ac.VirtualResourceType",null,{ROOT:"wps.PORTAL",TEMPLATE:"wps.TEMPLATE_DEPLOYMENT",SPACE:"wps.APPLICATION_ENTITIES"});com.ibm.mashups.enabler.ac.VirtualResourceType=new com.ibm.mashups.enabler.ac.VirtualResourceType();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessFactory_API");dojo.provide("com.ibm.mashups.enabler.ac.AccessFactory");dojo.declare("com.ibm.mashups.enabler.ac.AccessFactory",null,{getEffectiveAccess:function(node){},getEffectiveAccessVirtualResource:function(_10f8){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.AccessFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.AccessFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.AccessFactoryImpl");dojo.declare("com.ibm.mm.enabler.ac.AccessFactoryImpl",[com.ibm.mashups.enabler.ac.AccessFactory],{getEffectiveAccess:function(node){if((node)&&(node.hasRole)){return node;}return null;},getEffectiveAccessVirtualResource:function(_10f9){var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,null);myUrl.setNodes([{value:_10f9,isID:true,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ACCESS}]);var _10fa=null;var _10fb=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,true);_10fb.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;var ns=nsf.getNameSpaces([nsf.NS_ATOM]);var expr="//atom:entry";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,ns);if(node){_10fa=node;}}}));if(_10fa){var ret=new com.ibm.mm.enabler.ac.EffectiveAccessImpl();ret._init(_10fa);return ret;}return null;}});com.ibm.mashups.enabler.ac.AccessFactory=new com.ibm.mm.enabler.ac.AccessFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessFactory"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessFactory");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.Constants");dojo.declare("com.ibm.mashups.enabler.ac.operation.Constants",null,{EDIT_PAGE_LAYOUT:"com.ibm.mashups.enabler.ac.operation.editpagelayout",EDIT_PAGE_PROPERTIES:"com.ibm.mashups.enabler.ac.operation.editpageproperties",ASSIGN_PAGE_PERMISSIONS:"com.ibm.mashups.enabler.ac.operation.assignpagepermissions",WIDGET_MODE_VIEW:"com.ibm.mashups.enabler.ac.operation.widgetmode.view",WIDGET_MODE_PERSONALIZE:"com.ibm.mashups.enabler.ac.operation.widgetmode.personalize",WIDGET_MODE_EDIT:"com.ibm.mashups.enabler.ac.operation.widgetmode.edit",WIDGET_MODE_CONFIG:"com.ibm.mashups.enabler.ac.operation.widgetmode.config"});com.ibm.mashups.enabler.ac.operation.Constants=new com.ibm.mashups.enabler.ac.operation.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.Operation_API");dojo.provide("com.ibm.mashups.enabler.ac.operation.Operation");dojo.declare("com.ibm.mashups.enabler.ac.operation.Operation",null,{isAllowed:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.Operation"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.Operation");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel_API");dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel");dojo.declare("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel",[com.ibm.mashups.enabler.model.Model],{getOperation:function(_10fc,_10fd){},setOperation:function(_10fe,_10ff){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory_API");dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory");dojo.declare("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory",null,{getAllowedOperationsModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl",com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory,{constructor:function(){},getAllowedOperationsModel:function(){return com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory=new com.ibm.mm.enabler.ac.operation.AllowedOperationsModelFactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModelFactory");}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AbstractOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AbstractOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AbstractOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AbstractOperationImpl",[com.ibm.mashups.enabler.ac.operation.Operation],{constructor:function(_1100){this.context=_1100;this.roleCheck=null;},isAllowed:function(){this.context=this.context||null;if(this.context===null){return false;}if(!this.context.contentNode){return false;}var _1101=com.ibm.mashups.enabler.ac.AccessFactory.getEffectiveAccess(this.context.contentNode);_1101=_1101||null;if(_1101!==null&&_1101.hasRole(this.roleCheck)){return true;}return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1102){this.context=_1102;this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1103){this.context=_1103;this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1104){this.context=_1104;this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.MANAGER;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl",[com.ibm.mm.enabler.ac.operation.AbstractOperationImpl],{constructor:function(_1105,mode){this.context=_1105;this.mode=mode;if(this.mode==com.ibm.mm.iwidget.Constants.mode.PERSONALIZE){this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.USER;}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.EDIT){this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG){this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.USER;}else{this.roleCheck=com.ibm.mashups.enabler.ac.RoleType.USER;}}}},_getCurrentMode:function(){var _1106=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1107=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_1106,this.context.id);return _1107.getWidgetMode();},_getCurrentPageID:function(){var _1108=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();return com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_1108).getPageID();},_getSupportModes:function(){var _1109=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _110a=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _110b=_110a.findWidgetWindow(this.context.id,this._getCurrentPageID(_1109)).start();var _110c=_110a.getWidgetDefinitionByWindow(_110b).start();return _110c.getSupportedModes();},_isSupportedMode:function(){var _110d=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _110e=this._getSupportModes(_110d);var _110f=(dojo.indexOf(_110e,this.mode)>=0);if(_110f&&(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG)){var _1110=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1111=_1110.findWidgetWindow(this.context.id,this._getCurrentPageID(_110d)).start();var _1112=_1110.getWidgetInstance(_1111).start();if(_1112.isSandboxed()){_110f=false;}}return _110f;},_isModeSwitchable:function(){var _1113=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1114=this._getCurrentMode(_1113);var _1115=[com.ibm.mm.iwidget.Constants.mode.EDIT,com.ibm.mm.iwidget.Constants.mode.PERSONALIZE,com.ibm.mm.iwidget.Constants.mode.CONFIG];return (dojo.indexOf(_1115,_1114)<0||dojo.indexOf(_1115,this.mode)<0);},isAllowed:function(){if(!this._isSupportedMode()){return false;}if(!this._isModeSwitchable()){return false;}var _1116=this.inherited(arguments);if(_1116){if(this.mode==com.ibm.mm.iwidget.Constants.mode.PERSONALIZE){var _1117=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _1118=_1117.getValue(com.ibm.mashups.enabler.services.ConfigConstants.WIDGET_PERSONALIZE_ENABLED);if(typeof _1118!="undefined"){if(!_1118){return false;}}var _1119=com.ibm.mashups.enabler.user.Factory.getUserModel().findCurrentUser().start();if(_1119&&_1119.isVirtual()){var _111a=_1119.getVirtualType();if(com.ibm.mashups.enabler.user.VirtualType.ANONYMOUS_USER==_111a){return false;}}}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG){if(!ibmConfig["com.ibm.mm.internal.allowConfig"]){return false;}}}}return _1116;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl");dojo.declare("com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl",com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.additionalOperations=[];},getInstance:function(){var _111b=com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl._instance;return _111b?_111b:(com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl._instance=new com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl());},getOperation:function(_111c,_111d){return new com.ibm.mm.enabler.DeferredImpl(this,this._getOperation,{"operationName":_111c,"jsonContext":_111d});},_getOperation:function(dfr,sync,_111e){var _111f="_getOperation";var _1120=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1120){this.LOGGER.entering(_111f,arguments);}var _1121=_111e.operationName;var _1122=_111e.jsonContext;var _1123=null;if(_1121){var _1124=this.additionalOperations[_1121]||null;if(dojo.isFunction(_1124)){var _1125=function(_1126){_1123=_1126;dfr.finish(_1123,(_1123!==null)?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);};dojo.partial(_1124)(_1121,_1122,sync,_1125);if(_1120){this.LOGGER.exiting(_111f,[_1123]);}return _1123;}switch(_1121){case com.ibm.mashups.enabler.ac.operation.Constants.EDIT_PAGE_LAYOUT:_1123=new com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl(_1122);break;case com.ibm.mashups.enabler.ac.operation.Constants.EDIT_PAGE_PROPERTIES:_1123=new com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl(_1122);break;case com.ibm.mashups.enabler.ac.operation.Constants.ASSIGN_PAGE_PERMISSIONS:_1123=new com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl(_1122);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_VIEW:_1123=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1122,com.ibm.mm.iwidget.Constants.mode.VIEW);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_PERSONALIZE:_1123=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1122,com.ibm.mm.iwidget.Constants.mode.PERSONALIZE);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_EDIT:_1123=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1122,com.ibm.mm.iwidget.Constants.mode.EDIT);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_CONFIG:_1123=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1122,com.ibm.mm.iwidget.Constants.mode.CONFIG);break;}}dfr.finish(_1123,(_1123!==null)?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);if(_1120){this.LOGGER.exiting(_111f,[_1123]);}return _1123;},setOperation:function(_1127,_1128){if(!_1127){return false;}if(!_1128){return false;}this.additionalOperations[_1127]=_1128;return true;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.operation.AllowedOperationsModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.catalog.Factory_API");dojo.provide("com.ibm.mashups.enabler.catalog.Factory");dojo.declare("com.ibm.mashups.enabler.catalog.Factory",null,{getCatalogCategoryModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.catalog.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.catalog.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.catalog.FactoryImpl");dojo.declare("com.ibm.mm.enabler.catalog.FactoryImpl",[com.ibm.mashups.enabler.catalog.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getCatalogCategoryModel:function(){com.ibm.mashups.enabler.catalog.Factory.lazyLoadModules(["CatalogModel"]);return com.ibm.mm.enabler.catalog.CatalogCategoryModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.catalog.Factory=new com.ibm.mm.enabler.catalog.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.catalog.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.catalog.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent_API"]){dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent_API"]=true;dojo.provide("com.ibm.mashups.enabler.content.RuntimeContent_API");dojo.provide("com.ibm.mashups.enabler.content.RuntimeContent");dojo.declare("com.ibm.mashups.enabler.content.RuntimeContent",null,{getRuntimeMarkup:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.RuntimeContent.getRuntimeMarkup");}});}if(!dojo._hasResource["com.ibm.mm.enabler.content.RuntimeContentImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.RuntimeContentImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.RuntimeContentImpl");dojo.declare("com.ibm.mm.enabler.content.RuntimeContentImpl",com.ibm.mashups.enabler.content.RuntimeContent,{_scope:null,constructor:function(scope,func){this._scope=scope;this._getRuntimeMarkup=func||(function(){});},getRuntimeMarkup:function(){return new com.ibm.mm.enabler.DeferredImpl(this._scope||null,this._getRuntimeMarkup);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent"]){dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContent"]=true;dojo.provide("com.ibm.mashups.enabler.content.RuntimeContent");}if(!dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContentProvider"]){dojo._hasResource["com.ibm.mashups.enabler.content.RuntimeContentProvider"]=true;dojo.provide("com.ibm.mashups.enabler.content.RuntimeContentProvider");dojo.declare("com.ibm.mashups.enabler.content.RuntimeContentProvider",null,{getRuntimeContent:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.content.RuntimeContentProvider.getRuntimeContent");}});}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.layout.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.layout.Constants");dojo.declare("com.ibm.mashups.enabler.layout.Constants",null,{LAYOUT_CONTROL:"LayoutControl",LAYOUT_CONTAINER:"LayoutContainer",CONTEXT_WIDGET_DEFINITION_ID:"WidgetDefinitionID",CONTEXT_WIDGET_DEFINITION_URL:"WidgetDefinitionURL",DISPLAY_TITLE:"displayTitle",CONTEXT_TYPE:"type"});com.ibm.mashups.enabler.layout.Constants=new com.ibm.mashups.enabler.layout.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.layouttemplate.Factory_API");dojo.provide("com.ibm.mashups.enabler.layouttemplate.Factory");dojo.declare("com.ibm.mashups.enabler.layouttemplate.Factory",null,{getTemplateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.layouttemplate.Factory"]){dojo._hasResource["com.ibm.mm.enabler.layouttemplate.Factory"]=true;dojo.provide("com.ibm.mm.enabler.layouttemplate.Factory");dojo.declare("com.ibm.mm.enabler.layouttemplate.Factory",[com.ibm.mashups.enabler.layouttemplate.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getTemplateModel:function(){if(!com.ibm.mashups.enabler.layouttemplate.Factory._model){com.ibm.mashups.enabler.layouttemplate.Factory.lazyLoadModules(["LayoutTemplateModel"]);com.ibm.mashups.enabler.layouttemplate.Factory._model=new com.ibm.mm.enabler.layouttemplate.LayoutTemplateModel();}return com.ibm.mashups.enabler.layouttemplate.Factory._model;}});com.ibm.mashups.enabler.layouttemplate.Factory=new com.ibm.mm.enabler.layouttemplate.Factory();}if(!dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.layouttemplate.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.layouttemplate.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.theme.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.theme.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.theme.Factory_API");dojo.provide("com.ibm.mashups.enabler.theme.Factory");dojo.declare("com.ibm.mashups.enabler.theme.Factory",null,{getThemeModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.theme.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.theme.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.theme.FactoryImpl");dojo.declare("com.ibm.mm.enabler.theme.FactoryImpl",[com.ibm.mashups.enabler.theme.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getThemeModel:function(){com.ibm.mashups.enabler.theme.Factory.lazyLoadModules(["ThemeModel"]);return com.ibm.mm.enabler.theme.ThemeModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.theme.Factory=new com.ibm.mm.enabler.theme.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.theme.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.theme.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.theme.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.VirtualType"]){dojo._hasResource["com.ibm.mashups.enabler.user.VirtualType"]=true;dojo.provide("com.ibm.mashups.enabler.user.VirtualType");dojo.declare("com.ibm.mashups.enabler.user.VirtualType",null,{ALL_AUTHENTICATED_GROUP:"all authenticated group",ANONYMOUS_USER:"anonymous user",UNKNOWN:"unknown"});com.ibm.mashups.enabler.user.VirtualType=new com.ibm.mashups.enabler.user.VirtualType();}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Entity_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Entity_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Entity_API");dojo.provide("com.ibm.mashups.enabler.user.Entity");dojo.declare("com.ibm.mashups.enabler.user.Entity",[com.ibm.mashups.enabler.Identifiable],{getDisplayName:function(){},getCN:function(){},getAttribute:function(name){},getReadOnlyAttributeNames:function(){},getReadWriteAttributeNames:function(){},getAttributeNames:function(){},isVirtual:function(){},getVirtualType:function(){},getEntityType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.EntityImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.EntityImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.EntityImpl");dojo.declare("com.ibm.mm.enabler.user.EntityImpl",[com.ibm.mashups.enabler.user.Entity,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(){var e=com.ibm.mashups.enabler;this._initDelegators(e.Identifiable.prototype);var u=e.user;this._initDelegators(u.Entity.prototype);var um=com.ibm.mashups.enabler.user.Factory.getUserModel();this._initTransition(um,um.getModifiableNode);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Entity"]){dojo._hasResource["com.ibm.mashups.enabler.user.Entity"]=true;dojo.provide("com.ibm.mashups.enabler.user.Entity");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.User_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.User_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.User_API");dojo.provide("com.ibm.mashups.enabler.user.User");dojo.declare("com.ibm.mashups.enabler.user.User",[com.ibm.mashups.enabler.user.Entity],{getLoginName:function(){},getSN:function(){},getEmail:function(){},setAttribute:function(name,value){},removeAttribute:function(name){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.UserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.UserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.UserImpl");dojo.declare("com.ibm.mm.enabler.user.UserImpl",[com.ibm.mashups.enabler.user.User,com.ibm.mm.enabler.user.EntityImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.user.User.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.User"]){dojo._hasResource["com.ibm.mashups.enabler.user.User"]=true;dojo.provide("com.ibm.mashups.enabler.user.User");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.CurrentUser_API");dojo.provide("com.ibm.mashups.enabler.user.CurrentUser");dojo.declare("com.ibm.mashups.enabler.user.CurrentUser",[com.ibm.mashups.enabler.user.User],{getJ2EEPrincipalName:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.CurrentUserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.CurrentUserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.CurrentUserImpl");dojo.declare("com.ibm.mm.enabler.user.CurrentUserImpl",[com.ibm.mashups.enabler.user.CurrentUser,com.ibm.mm.enabler.user.UserImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.user.CurrentUser.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser"]){dojo._hasResource["com.ibm.mashups.enabler.user.CurrentUser"]=true;dojo.provide("com.ibm.mashups.enabler.user.CurrentUser");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Group_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Group_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Group_API");dojo.provide("com.ibm.mashups.enabler.user.Group");dojo.declare("com.ibm.mashups.enabler.user.Group",[com.ibm.mashups.enabler.user.Entity],{});}if(!dojo._hasResource["com.ibm.mm.enabler.user.GroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.GroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.GroupImpl");dojo.declare("com.ibm.mm.enabler.user.GroupImpl",[com.ibm.mashups.enabler.user.Group,com.ibm.mm.enabler.user.EntityImpl],{constructor:function(){this._initDelegators(com.ibm.mashups.enabler.user.Group.prototype);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Group"]){dojo._hasResource["com.ibm.mashups.enabler.user.Group"]=true;dojo.provide("com.ibm.mashups.enabler.user.Group");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Attribute_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Attribute_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Attribute_API");dojo.provide("com.ibm.mashups.enabler.user.Attribute");dojo.declare("com.ibm.mashups.enabler.user.Attribute",null,{getName:function(){},getType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AttributeImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AttributeImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AttributeImpl");dojo.declare("com.ibm.mm.enabler.user.AttributeImpl",[com.ibm.mashups.enabler.user.Attribute,com.ibm.mm.enabler.persistence.PersistenceHandlerImpl],{constructor:function(){var u=com.ibm.mashups.enabler.user;this._initDelegators(u.Attribute.prototype);var um=com.ibm.mashups.enabler.user.Factory.getUserModel();this._initTransition(um,um.getModifiableNode);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Attribute"]){dojo._hasResource["com.ibm.mashups.enabler.user.Attribute"]=true;dojo.provide("com.ibm.mashups.enabler.user.Attribute");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.UserModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.UserModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.UserModel_API");dojo.provide("com.ibm.mashups.enabler.model.UserModel");dojo.declare("com.ibm.mashups.enabler.model.UserModel",[com.ibm.mashups.enabler.Commitable,com.ibm.mashups.enabler.ListModel,com.ibm.mashups.enabler.Locator],{getAnonymousMode:function(){},findCurrentUser:function(){},findUsersByAttribute:function(_1129,_112a){},findGroupByID:function(id){return new Deferred();},findGroupsByAttribute:function(_112b,_112c){return new Deferred();},findGroupAttributes:function(){return [];},findUserAttributes:function(){return [];},getVirtualUsers:function(){return [];},getVirtualGroups:function(){return [];},getLookasideAttributeNames:function(){return [];}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AllAuthGroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AllAuthGroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AllAuthGroupImpl");dojo.declare("com.ibm.mm.enabler.user.AllAuthGroupImpl",[com.ibm.mm.enabler.user.EntityImpl],{constructor:function(_112d,_112e){this.allAuthID=_112d;this.allAuthIDEncoded=_112e;},getID:function(){return this.allAuthID;},getCN:function(){return "all authenticated portal users";},getDisplayName:function(){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ALL_AUTH;},getEntityType:function(){return "group";},getAttribute:function(_112f){return null;},isVirtual:function(){return true;},getVirtualType:function(){return com.ibm.mashups.enabler.user.VirtualType.ALL_AUTHENTICATED_GROUP;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.AnonUserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AnonUserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AnonUserImpl");dojo.declare("com.ibm.mm.enabler.user.AnonUserImpl",[com.ibm.mm.enabler.user.EntityImpl],{constructor:function(_1130,_1131){this.anonUserID=_1130;this.anonUserIDEncoded=_1131;},getAttribute:function(_1132){return null;},getAttributeNames:function(){return [];},getID:function(){return this.anonUserID;},getLoginName:function(){return "anonymous portal user";},getSN:function(){return "anonymous portal user";},getCN:function(){return "anonymous portal user";},getEmail:function(){return null;},getDisplayName:function(){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ANON;},getEntityType:function(){return "user";},setAttribute:function(name,value){return null;},removeAttribute:function(name){return null;},getChangedAttributeNames:function(){return {};},getAddedAttributeNames:function(){return {};},getRemovedAttributeNames:function(){return {};},clearChangedAttributeNames:function(){},isVirtual:function(){return true;},getVirtualType:function(){return com.ibm.mashups.enabler.user.VirtualType.ANONYMOUS_USER;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.UserModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.UserModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.UserModelImpl");dojo.provide("com.ibm.mm.enabler.model.UserModel.iConfig");dojo.declare("com.ibm.mm.enabler.user.UserModelImpl",[com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.LazyLoadSupport],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _1133=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var eps=_1133.getValue("ConfigProvider.Endpoints");this.anonUserID=_1133.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANON_VIRTUAL_USER_ID);if((typeof this.anonUserID=="undefined")||(this.anonUserID===null)){this.anonUserID="anonymous portal user";}this.allAuthID=_1133.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ALL_AUTH_VIRTUAL_GROUP_ID);if((typeof this.allAuthID=="undefined")||(this.allAuthID===null)){this.allAuthID="all authenticated portal users";}this.anonEnabled=false;var _1134=_1133.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANON_MODE_ENABLED)||false;if(_1134===true||_1134=="true"||_1134=="on"||_1134=="TRUE"||_1134=="ON"){this.anonEnabled=true;}this.anonUserIDEncoded=encodeURIComponent(this.anonUserID);this.allAuthIDEncoded=encodeURIComponent(this.allAuthID);this.anonUser=null;this.allAuth=null;this.currentUser=null;this.loadedUsers={};},_lazyInit:function(){if(this.anonUser){return;}this.anonUser=new com.ibm.mm.enabler.user.AnonUserImpl(this.anonUserID,this.anonUserIDEncoded);this.allAuth=new com.ibm.mm.enabler.user.AllAuthGroupImpl(this.allAuthID,this.allAuthIDEncoded);},_getPersistenceModel:function(){var m=this._getJsonModel();return m?m:this._getXmlModel();},_hasXmlModel:function(){return !!this._xmlModel;},_getXmlModel:function(){if(!this._xmlModel){this.lazyLoadModules(["UserModelXml"]);dojo["require"]("com.ibm.mm.enabler.user.persistence.xml.UserModelImpl");this._xmlModel=com.ibm.mm.enabler.user.persistence.xml.UserModelImpl.prototype._getInstance(this.anonUserID,this.anonUserIDEncoded,this.anonUser,this.allAuthID,this.allAuthIDEncoded,this.allAuth);}return this._xmlModel;},_hasJsonModel:function(){return !!this._jsonModel;},_getJsonModel:function(){if((ibmConfig)&&(ibmConfig.json)&&(ibmConfig.json.userAttributes)&&(ibmConfig.json.user)){if(!this._jsonModel){dojo["require"]("com.ibm.mm.enabler.user.persistence.json.UserModelImpl");this._jsonModel=com.ibm.mm.enabler.user.persistence.json.UserModelImpl.prototype._getInstance(this.anonUserID,this.anonUserIDEncoded,this.anonUser,this.allAuthID,this.allAuthIDEncoded,this.allAuth);}return this._jsonModel;}return null;},_getInstance:function(){var _1135=com.ibm.mm.enabler.user.UserModelImpl._instance;return _1135?_1135:(com.ibm.mm.enabler.user.UserModelImpl._instance=new com.ibm.mm.enabler.user.UserModelImpl());},getAnonymousMode:function(){return com.ibm.mm.enabler.AnonymousHelper.getAnonymousMode();},getVirtualUsers:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._getVirtualUsers);},_getVirtualUsers:function(dfr,sync){this._lazyInit();var users=[];if(this.anonEnabled){users.push(this.anonUser);}return users;},getVirtualGroups:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._getVirtualGroups);},_getVirtualGroups:function(dfr,sync){this._lazyInit();var _1136=[];_1136.push(this.allAuth);return _1136;},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync,id){var _1137="find";var _1138=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1138){this.LOGGER.entering(_1137,arguments);}this._lazyInit();if(this.currentUser!==null&&this.currentUser.getID()==id){if(dfr){dfr.finish(this.currentUser,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.currentUser;}if((id===this.anonUserID)||(id===this.anonUserIDEncoded)){this.entry=this.anonUser;if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.anonUser;}if((id===this.allAuthID)||(id===this.allAuthIDEncoded)){this.entry=this.allAuth;if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.allAuth;}if(id in this.loadedUsers){this.entry=this.loadedUsers[id];if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.entry;}var _1139=null;var _113a=this._getXmlModel().find(id);_113a.setFinishedCallback(dojo.hitch(this,function(node,_113b){if(node){var _113c=new com.ibm.mm.enabler.user.UserImpl();_113c._setPersistence(node);_1139=this.loadedUsers[_113c.getID()]=_113c;}dfr.finish(_1139,_113b);}));_113a.start(sync);if(_1138){this.LOGGER.exiting(_1137);}return _1139;},uri);},getModifiableNode:function(node){return new com.ibm.mm.enabler.DeferredImpl(this,function(_113d,sync,node){var _113e="getModifiable";var _113f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_113f){this.LOGGER.entering(_113e,arguments);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);var _1140;if(!(this.loadedUsers[id])||!this.loadedUsers[id]._getPersistence().data.ownerDocument){var dfr;if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.user.CurrentUser)){dfr=this._getXmlModel().findCurrentUser(id);dfr.setFinishedCallback(dojo.hitch(this,function(node,_1141){if(node){if(this.currentUser){this.currentUser._setPersistence(node);this.loadedUsers[id]=this.currentUser;}else{var _1142=new com.ibm.mm.enabler.user.CurrentUserImpl();_1142._setPersistence(node);this.currentUser=_1142;this.loadedUsers[id]=_1142;}_1140=this.loadedUsers[id];}_113d.finish(_1140,_1141);}));dfr.start();}else{dfr=this._getXmlModel().find(id);dfr.setFinishedCallback(dojo.hitch(this,function(node,_1143){if(node){if(this.loadedUsers[id]){this.loadedUsers[id]._setPersistence(node);}else{var _1144=new com.ibm.mm.enabler.user.UserImpl();_1144._setPersistence(node);this.loadedUsers[id]=_1144;}_1140=this.loadedUsers[id];}_113d.finish(_1140,_1143);}));dfr.start();}if(_113d){_113d.finish(this.loadedUsers[id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_1140=this.loadedUsers[id];}if(_113f){this.LOGGER.exiting(_113e,_1140);}return _1140;},node);},findUserAttributes:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var _1145="findUserAttributes";var _1146=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1146){this.LOGGER.entering(_1145,arguments);}var _1147=null;var _1148=this._getPersistenceModel().findUserAttributes();_1148.setFinishedCallback(dojo.hitch(this,function(nodes,_1149){if(nodes){_1147=[];for(var i=0;i<nodes.length;i++){var node=new com.ibm.mm.enabler.user.AttributeImpl();node._setPersistence(nodes[i]);_1147.push(node);}}dfr.finish(_1147,_1149);}));_1148.start(sync);if(_1146){this.LOGGER.exiting(_1145);}return _1147;});},findCurrentUser:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var _114a="findCurrentUser";var _114b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_114b){this.LOGGER.entering(_114a,arguments);}if(this.currentUser!==null){if(dfr){dfr.finish(this.currentUser,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.currentUser;}var _114c=this._getPersistenceModel().findCurrentUser();_114c.setFinishedCallback(dojo.hitch(this,function(node,_114d){if(node){this.currentUser=new com.ibm.mm.enabler.user.CurrentUserImpl();this.currentUser._setPersistence(node);this.loadedUsers[this.currentUser.getID()]=this.currentUser;}dfr.finish(this.currentUser,_114d);}));_114c.start(sync);if(_114b){this.LOGGER.exiting(_114a);}return this.currentUser;});},findUsersByAttribute:function(_114e,_114f){return this._getXmlModel().findUsersByAttribute(_114e,_114f);},findGroupByID:function(id){return this._getXmlModel().findGroupByID(id);},findGroupsByAttribute:function(_1150,_1151){return this._getXmlModel().findGroupsByAttribute(_1150,_1151);},findGroupAttributes:function(){return this._getXmlModel().findGroupAttributes();},isDirty:function(){if(this._hasXmlModel()){this._getXmlModel().isDirty(this.currentUser._getPersistence());}else{return false;}},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,function(dfr,sync,_1152){if(this.currentUser){var _1153=this._getXmlModel().commit(this.currentUser._getPersistence());_1153.setOperationCallback(function(node,mode,_1154,_1155){if(node){_1155._setPersistence(node);}if(dfr&&dfr.operationCallback){dfr.operationCallback(_1155,mode,_1154,dfr.operationCallbackParameters);}},this.currentUser);_1153.setFinishedCallback(function(node,_1156,_1157){if(node){_1157._setPersistence(node);}if(dfr){dfr.finish(_1157,_1156,dfr.operationCallbackParameters);}},this.currentUser);_1153.start(sync);}});},getLookasideAttributeNames:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){if(!this.lookasideAttributes){this.lookasideAttributes=[];var _1158=this.findUserAttributes().start();for(var i=0;i<_1158.length;i++){var _1159=_1158[i].getName()||"";if(_1159.indexOf("com.ibm.mashups.user.")===0){this.lookasideAttributes.push(_1159);}}}dfr.finish(this.lookasideAttributes,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);return this.lookasideAttributes;});}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.UserModel"]){dojo._hasResource["com.ibm.mashups.enabler.model.UserModel"]=true;dojo.provide("com.ibm.mashups.enabler.model.UserModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.user.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.user.Factory_API");dojo.provide("com.ibm.mashups.enabler.user.Factory");dojo.declare("com.ibm.mashups.enabler.user.Factory",null,{getUserModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.FactoryImpl");dojo.declare("com.ibm.mm.enabler.user.FactoryImpl",com.ibm.mashups.enabler.user.Factory,{getUserModel:function(){return com.ibm.mm.enabler.user.UserModelImpl.prototype._getInstance();}});com.ibm.mashups.enabler.user.Factory=new com.ibm.mm.enabler.user.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.user.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.user.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.user.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.remote.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.remote.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.remote.Factory_API");dojo.provide("com.ibm.mashups.enabler.remote.Factory");dojo.declare("com.ibm.mashups.enabler.remote.Factory",null,{getRemoteModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.remote.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.remote.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.remote.FactoryImpl");dojo.declare("com.ibm.mm.enabler.remote.FactoryImpl",[com.ibm.mashups.enabler.remote.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getRemoteModel:function(){com.ibm.mashups.enabler.remote.Factory.lazyLoadModules(["RemoteModel"]);return new com.ibm.mm.enabler.remote.RemoteModelImpl();}});com.ibm.mashups.enabler.remote.Factory=new com.ibm.mm.enabler.remote.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.remote.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.remote.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.remote.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.template.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.template.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.template.Factory_API");dojo.provide("com.ibm.mashups.enabler.template.Factory");dojo.declare("com.ibm.mashups.enabler.template.Factory",null,{getTemplateModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.template.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.template.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.template.FactoryImpl");dojo.declare("com.ibm.mm.enabler.template.FactoryImpl",[com.ibm.mashups.enabler.template.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getTemplateModel:function(){com.ibm.mashups.enabler.template.Factory.lazyLoadModules(["TemplateModel"]);return com.ibm.mm.enabler.template.TemplateModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.template.Factory=new com.ibm.mm.enabler.template.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.template.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.template.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.template.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.Factory_API");dojo.provide("com.ibm.mashups.enabler.model.Factory");dojo.declare("com.ibm.mashups.enabler.model.Factory",null,{getCatalogCategoryModel:function(){},getNavigationModel:function(){},getSharedNavigationModel:function(){},getThemeModel:function(){},getUserModel:function(){},getRemoteModel:function(){},getTemplateModel:function(){},getSpaceModel:function(){},getSpaceExtensionModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.FactoryImpl");dojo.declare("com.ibm.mm.enabler.model.FactoryImpl",null,{getCatalogCategoryModel:function(){dojo.deprecated("com.ibm.mashups.model.Factory.getCatalogCategoryModel","The method com.ibm.mashups.model.Factory.getCatalogCategoryModel is deprecated, please use com.ibm.mashups.enabler.catalog.Factory.getCatalogCategoryModel instead!");return com.ibm.mashups.enabler.catalog.Factory.getCatalogCategoryModel();},getNavigationModel:function(){dojo.deprecated("com.ibm.mashups.model.Factory.getNavigationModel","The method com.ibm.mashups.model.Factory.getNavigationModel is deprecated, please use com.ibm.mashups.enabler.navigation.Factory.getNavigationModel instead!");return com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();},getSharedNavigationModel:function(){dojo.deprecated("com.ibm.mashups.model.Factory.getSharedNavigationModel","The method com.ibm.mashups.model.Factory.getSharedNavigationModel is deprecated, please use com.ibm.mashups.enabler.navigation.Factory.getSharedNavigationModel instead!");return com.ibm.mashups.enabler.navigation.Factory.getSharedNavigationModel();},getThemeModel:function(){dojo.deprecated("com.ibm.mashups.model.Factory.getThemeModel","The method com.ibm.mashups.model.Factory.getThemeModel is deprecated, please use com.ibm.mashups.enabler.theme.Factory.getThemeModel instead!");return com.ibm.mashups.enabler.theme.Factory.getThemeModel();},getUserModel:function(){dojo.deprecated("com.ibm.mashups.model.Factory.getUserModel","The method com.ibm.mashups.model.Factory.getUserModel is deprecated, please use com.ibm.mashups.enabler.user.Factory.getUserModel instead!");return com.ibm.mashups.enabler.user.Factory.getUserModel();},getRemoteModel:function(){dojo.deprecated("com.ibm.mashups.model.Factory.getRemoteModel","The method com.ibm.mashups.model.Factory.getRemoteModel is deprecated, please use com.ibm.mashups.enabler.remote.Factory.getRemoteModel instead!");return com.ibm.mashups.enabler.remote.Factory.getRemoteModel();},getSpaceModel:function(){dojo.deprecated("com.ibm.mashups.model.Factory.getSpaceModel","The method com.ibm.mashups.model.Factory.getSpaceModel is deprecated, please use com.ibm.mashups.enabler.space.Factory.getSpaceModel instead!");return com.ibm.mashups.enabler.space.Factory.getSpaceModel();},getSpaceExtensionModel:function(){dojo.deprecated("com.ibm.mashups.model.Factory.getSpaceExtensionModel","The method com.ibm.mashups.model.Factory.getSpaceExtensionModel is deprecated, please use com.ibm.mashups.enabler.space.Factory.getSpaceExtensionModel instead!");return com.ibm.mashups.enabler.space.Factory.getSpaceExtensionModel();},getTemplateModel:function(){dojo.deprecated("com.ibm.mashups.model.Factory.getTemplateModel","The method com.ibm.mashups.model.Factory.getTemplateModel is deprecated, please use com.ibm.mashups.enabler.template.Factory.getTemplateModel instead!");return com.ibm.mashups.enabler.template.Factory.getTemplateModel();}});com.ibm.mashups.enabler.model.Factory=new com.ibm.mm.enabler.model.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.model.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.model.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.staticSkin.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.staticSkin.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.staticSkin.Factory_API");dojo.provide("com.ibm.mashups.enabler.model.staticSkin.Factory");dojo.declare("com.ibm.mashups.enabler.model.staticSkin.Factory",null,{getStaticSkinModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.staticSkin.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.staticSkin.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.staticSkin.FactoryImpl");dojo.declare("com.ibm.mm.enabler.model.staticSkin.FactoryImpl",[com.ibm.mashups.enabler.model.staticSkin.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getStaticSkinModel:function(){com.ibm.mashups.enabler.model.staticSkin.Factory.lazyLoadModules(["ThemeModel"]);return com.ibm.mm.enabler.theme.StaticSkinModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.model.staticSkin.Factory=new com.ibm.mm.enabler.model.staticSkin.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.model.staticSkin.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.model.staticSkin.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.model.staticSkin.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry_API"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry_API"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry_API");dojo.provide("com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry");dojo.declare("com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry",null,{addTypeMappingFilter:function(_115a){}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.TypeMappingRegistryImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.TypeMappingRegistryImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.TypeMappingRegistryImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.TypeMappingRegistryImpl",com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry,{_PERSISTENCE_JSON:"json",_PERSISTENCE_XML:"xml",constructor:function(){this._filters={};this._filters[this._PERSISTENCE_JSON]=[];this._filters[this._PERSISTENCE_XML]=[];this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);},_addTypeMappingFilter:function(f,_115b){dojo.forEach([this._PERSISTENCE_JSON,this._PERSISTENCE_XML],function(p){if(f[p]&&dojo.isFunction(f[p].fn)){var _115c={fn:f[p].fn,scope:f[p].scope};if(_115b){this._filters[p].splice(0,0,_115c);}else{this._filters[p].push(_115c);}}},this);},addTypeMappingFilter:function(f){this._addTypeMappingFilter(f);},_getJsonType:function(data){return this._getType(data,this._PERSISTENCE_JSON);},_getXmlType:function(data){return this._getType(data,this._PERSISTENCE_XML);},_getType:function(data,p){var _115d;for(var i=this._filters[p].length;i>0;i--){var _115e=this._filters[p][i-1];try{_115d=_115e.fn.apply(_115e.scope||null,[data]);}catch(e){this.LOGGER.warning("_getType","Type mapping filter failed to execute; skipping. Reason: "+e.message);}if(_115d){break;}}return _115d||null;}});com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry=new com.ibm.mm.enabler.navigation.persistence.TypeMappingRegistryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry"]){dojo._hasResource["com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry"]=true;dojo.provide("com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry");}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.Constants");dojo.declare("com.ibm.mashups.enabler.persistence.Constants",null,{NAVIGATION_MODEL_PERSISTENCE_PROVIDER:"NavigationModelPersistenceProvider",SPACE_MODEL_PERSISTENCE_PROVIDER:"SpaceModelPersistenceProvider"});com.ibm.mashups.enabler.persistence.Constants=new com.ibm.mashups.enabler.persistence.Constants();}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.ModelPersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.ModelPersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.ModelPersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.ModelPersistenceProvider",null,{findBySelection:function(url,_115f,_1160,_1161){},create:function(_1162){},remove:function(_1163,_1164,_1165){},store:function(_1166,_1167,_1168){},getModifiable:function(node){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.NavigationModelPersistenceProvider",[com.ibm.mashups.enabler.persistence.ModelPersistenceProvider],{find:function(url,_1169,_116a){},findBySelection:function(url,_116b,_116c,_116d){},create:function(_116e){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider");dojo.declare("com.ibm.mashups.enabler.persistence.SpaceModelPersistenceProvider",[com.ibm.mashups.enabler.persistence.ModelPersistenceProvider],{find:function(url,_116f,_1170){},findBySelection:function(url,_1171,_1172,_1173){},create:function(_1174){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.Factory_API");dojo.provide("com.ibm.mashups.enabler.persistence.Factory");dojo.declare("com.ibm.mashups.enabler.persistence.Factory",null,{getModelPersistenceProvider:function(type){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.persistence.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.persistence.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService_API"]){dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService_API"]=true;dojo.provide("com.ibm.mashups.enabler.services.StrategyService_API");dojo.provide("com.ibm.mashups.enabler.services.StrategyService");dojo.declare("com.ibm.mashups.enabler.services.StrategyService",null,{SERVICE_NAME:"strategyService",setStrategy:function(model,_1175){},getStrategies:function(model){},getStrategy:function(model,_1176){},addStrategy:function(model,_1177){},removeStrategy:function(model,_1178){}});com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME="strategyService";}if(!dojo._hasResource["com.ibm.mm.enabler.services.StrategyServiceImpl"]){dojo._hasResource["com.ibm.mm.enabler.services.StrategyServiceImpl"]=true;dojo.provide("com.ibm.mm.enabler.services.StrategyServiceImpl");dojo.declare("com.ibm.mm.enabler.services.StrategyServiceImpl",[com.ibm.mashups.enabler.services.StrategyService],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.map={};this.map["com.ibm.mashups.enabler.widget.WidgetModel"]=new com.ibm.mm.enabler.model.ModelImpl();this.map["com.ibm.mashups.enabler.layout.LayoutModel"]=new com.ibm.mm.enabler.model.ModelImpl();},setStrategy:function(model,_1179){var _117a=this.map[model];if(_117a){_117a.setStrategy(_1179);}},getStrategies:function(model){var _117b=this.map[model];if(_117b){return _117b.getStrategies(strategy);}return null;},getStrategy:function(model,_117c){var _117d=this.map[model];if(_117d){return _117d.getStrategy(_117c);}return null;},addStrategy:function(model,_117e){var _117f=this.map[model];if(_117f){_117f.addStrategy(_117e);}},removeStrategy:function(model,_1180){var _1181=this.map[model];if(_1181){_1181.removeStrategy(_1180);}}});com.ibm.mashups.services.ServiceManager.setService("strategyService","com.ibm.mm.enabler.services.StrategyServiceImpl");}if(!dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService"]){dojo._hasResource["com.ibm.mashups.enabler.services.StrategyService"]=true;dojo.provide("com.ibm.mashups.enabler.services.StrategyService");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.CatalogCategoryLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_1182){this.loadAheadCatalogCategoryModel=_1182;this.catalogCategoryModel=null;},isLoadAheadCatalogCategoryModel:function(){return this.loadAheadCatalogCategoryModel;},setCatalogCategoryModel:function(_1183){this.catalogCategoryModel=_1183||null;},getCatalogCategoryModel:function(){if(null===this.catalogCategoryModel){this.catalogCategoryModel=com.ibm.mashups.enabler.catalog.Factory.getCatalogCategoryModel();}return this.catalogCategoryModel;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy_API"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy_API"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy_API");dojo.provide("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_1184,_1185,_1186){},isLoadAheadLayoutModel:function(){return this.loadAheadLayoutModel;},isLoadAheadTheme:function(){return this.loadAheadTheme;}});}if(!dojo._hasResource["com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl"]){dojo._hasResource["com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl"]=true;dojo.provide("com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl");dojo.declare("com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl",[com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(_1187,_1188,_1189){this.loadAheadLayoutModel=!!_1187;this.loadAheadUser=!!_1189;this.userModel=null;var _118a=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _118b=_118a.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PAGE_LOAD_OPTIMIZATION_THEME);if(_118b===true){this.loadAheadTheme=!!_1188;}else{this.loadAheadTheme=false;}},_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH]));this.prefix=this.serviceJson.idprefix;},isLoadAheadLayoutModel:function(){return this.loadAheadLayoutModel;},isLoadAheadTheme:function(){return this.loadAheadTheme;},isLoadAheadUser:function(){return this.loadAheadUser;},setUserModel:function(_118c){this.userModel=_118c;},getUserModel:function(){if(!this.userModel){this.userModel=com.ibm.mashups.enabler.user.Factory.getUserModel();}return this.userModel;},_processLoadAhead:function(_118d,sync){if(!com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()){return;}var _118e=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();_118e.startTransaction();if(this.loadAheadUser){var _118f=this.getUserModel();_118f.findCurrentUser().start();}this._initServiceDoc();for(var i=0;i<_118d.length;i++){if(this.loadAheadLayoutModel){var href=null;var id=null;var expr="atom:link[@rel='related' and @ext:class='content-node']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_118d[i].xmlData,this.ns);if(node){href=node.getAttribute("href");id=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,node);}var _1190=(id!==null)?id:_118d[i].getID();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(href,null);var _1191=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1191.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(args.node)){var _1192=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:feed/atom:entry",data,this.ns);if(_1192){args.node._setFragmentData(_1192);}}}),{"node":_118d[i]});myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_MEDIA_URL,null);myUrl.setNodes([{value:_1190,isID:true},{value:"index.html",isID:false}]);_1191=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,true,sync);_1191.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(args.node)){args.node._setFragmentMediaData(data);}}),{"node":_118d[i]});}if(this.loadAheadTheme){var _1193=_118d[i].getThemeIdentifier().getID();if(_1193!==null){var _1194=com.ibm.mashups.enabler.theme.Factory.getThemeModel();_1194.find(_1193).start();}}}_118e.endTransactionDeferred().start();},_processFind:function(node,sync){if(this.loadAheadLayoutModel){this._initServiceDoc();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL,null);var uri="0";myUrl.setNodes([{value:uri,isID:true}]);serviceReq=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);serviceReq.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(node)){var _1195=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:feed/atom:entry",data,this.ns);if(_1195){node._setFragmentData(_1195);}}}));myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_MEDIA_URL,null);myUrl.setNodes([{value:uri,isID:true},{value:"index.html",isID:false}]);serviceReq=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,true,sync);serviceReq.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(node)){node._setFragmentMediaData(data);}}));}if(this.loadAheadTheme){var _1196=com.ibm.mashups.enabler.theme.Factory.getThemeModel();_1196.find("0").start();}}});com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy=com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl;}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_1197){this.windowMap=_1197;},getWidgetWindowMap:function(){return this.windowMap;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Factory_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Factory_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Factory_API");dojo.provide("com.ibm.mashups.enabler.widget.Factory");dojo.declare("com.ibm.mashups.enabler.widget.Factory",null,{getWidgetModel:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.FactoryImpl");dojo.declare("com.ibm.mm.enabler.widget.FactoryImpl",[com.ibm.mashups.enabler.widget.Factory,com.ibm.mm.enabler.LazyLoadSupport],{getWidgetModel:function(){com.ibm.mashups.enabler.widget.Factory.lazyLoadModules(["WidgetModel"]);return com.ibm.mm.enabler.widget.WidgetModelImpl.prototype.getInstance();}});com.ibm.mashups.enabler.widget.Factory=new com.ibm.mm.enabler.widget.FactoryImpl();}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Factory");}if(!dojo._hasResource["com.ibm.mashups.enabler.model.Constants"]){dojo._hasResource["com.ibm.mashups.enabler.model.Constants"]=true;dojo.provide("com.ibm.mashups.enabler.model.Constants");dojo.declare("com.ibm.mashups.enabler.model.Constants",null,{constructor:function(){this.SCHEME_SEPARATOR=":";this.CLIENT_ID_SCHEME="cid";this.CLIENT_ID_PREFIX=this.CLIENT_ID_SCHEME+this.SCHEME_SEPARATOR;}});com.ibm.mashups.enabler.model.Constants=new com.ibm.mashups.enabler.model.Constants();}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.PersistenceImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.PersistenceImpl");dojo.declare("com.ibm.mm.enabler.persistence.PersistenceImpl",null,{_setContext:function(ctx){this._ctx=ctx;},_getContext:function(){return this._ctx;},_getBaseContext:function(){var base;var ctx=this._getContext();if(ctx&&dojo.isFunction(ctx.getBaseContext)){base=ctx.getBaseContext();}return base||this;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl",[com.ibm.mm.enabler.persistence.PersistenceImpl],{constructor:function(d){this.data=d;},toString:function(){return dojo.toJson(this.data);},_getJsonData:function(){return this.data;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl",[com.ibm.mashups.enabler.Identifiable],{getID:function(){return this.data.id;},isDirty:function(){return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl",[com.ibm.mm.enabler.persistence.meta.MetaDataMetaImpl],{getMetaDataNames:function(){var _1198=[];com.ibm.mm.enabler.utils.Misc.forIn(this.data.metadata,function(value,name){_1198.push(name);},this);return _1198;},getMetaData:function(name){return this.data.metadata?(this.data.metadata[name]||null):null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl",[com.ibm.mashups.enabler.ac.EffectiveAccess],{hasRole:function(_1199){if(dojo.isString(_1199)){_1199=_1199.toUpperCase();}if(this.data.roles&&dojo.isArray(this.data.roles)){for(var i=0,l=this.data.roles.length;i<l;++i){var type=this.data.roles[i];if(type&&type.toUpperCase()==_1199){return true;}}}return false;},isPrivate:function(){return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.LocalizedJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.LocalizedJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.LocalizedJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.LocalizedJsonImpl",[com.ibm.mashups.enabler.Localized],{getLocales:function(){return this.data.locale?[this.data.locale]:[];},getTitle:function(){return this.data.title||null;},getDescription:function(){return this.data.description||null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.DefaultLocalizedJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.DefaultLocalizedJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.DefaultLocalizedJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.DefaultLocalizedJsonImpl",[com.ibm.mashups.enabler.DefaultLocalized],{getDefaultLocale:function(){return this.data.locale||null;},getDefaultTitle:function(){return this.getTitle();},getDefaultDescription:function(){return this.getDescription();}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.EditLinkProviderJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.EditLinkProviderJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.EditLinkProviderJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.EditLinkProviderJsonImpl",[com.ibm.mashups.enabler.EditLinkProvider],{getEditLink:function(){return this.data["editURL.xml"]||null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.NextLinkProviderJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.NextLinkProviderJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.NextLinkProviderJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.NextLinkProviderJsonImpl",[com.ibm.mashups.enabler.NextLinkProvider],{_getNextURI:function(){return this.data.nextURL||null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.json.ThreadingLinkProviderJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.json.ThreadingLinkProviderJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.json.ThreadingLinkProviderJsonImpl");dojo.declare("com.ibm.mm.enabler.persistence.json.ThreadingLinkProviderJsonImpl",[com.ibm.mashups.enabler.ThreadingLinkProvider],{getParentLink:function(){return this.data.parentURL||null;},getChildrenLink:function(){return this.data.childrenURL||null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.meta.NavigationElementMetaImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.meta.NavigationElementMetaImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.meta.NavigationElementMetaImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.meta.NavigationElementMetaImpl",null,{isHidden:function(){return (this._getBaseContext().getMetaData("com.ibm.mashups.navigation.hidden")=="true")||(this._getBaseContext().getMetaData("com.ibm.portal.Hidden")=="true");}});}if(!dojo._hasResource["com.ibm.mm.enabler.content.persistence.json.StaticContentPageJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.persistence.json.StaticContentPageJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.persistence.json.StaticContentPageJsonImpl");dojo.declare("com.ibm.mm.enabler.content.persistence.json.StaticContentPageJsonImpl",[com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl,com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl,com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl,com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl],{_LAYOUT_TEMPLATE_REF_MDNAME:"com.ibm.portal.layout.template.ref",getStaticContentURL:function(){return this._getBaseContext().getMetaData(this._LAYOUT_TEMPLATE_REF_MDNAME);},confirmSetStaticContentURL:function(url){return this._getBaseContext().confirmSetMetaData(this._LAYOUT_TEMPLATE_REF_MDNAME,url);},confirmSetStaticMarkup:function(_119a){return this._getBaseContext().hasRole(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER)||this._getBaseContext().hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},hasCachedHasRole:function(){return !!(this.data.roles&&dojo.isArray(this.data.roles));}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationElementJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationElementJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.json.NavigationElementJsonImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.json.NavigationElementJsonImpl",[com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl,com.ibm.mm.enabler.persistence.json.EditLinkProviderJsonImpl,com.ibm.mm.enabler.persistence.json.NextLinkProviderJsonImpl,com.ibm.mm.enabler.persistence.json.ThreadingLinkProviderJsonImpl,com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl,com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl,com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl,com.ibm.mm.enabler.persistence.json.LocalizedJsonImpl,com.ibm.mm.enabler.persistence.json.DefaultLocalizedJsonImpl,com.ibm.mm.enabler.navigation.persistence.meta.NavigationElementMetaImpl],{getThemeIdentifier:function(){return this.data.theme?new com.ibm.mm.enabler.IdentifierImpl(this.data.theme):null;},getSpaceIdentifier:function(){return this.data.space?new com.ibm.mm.enabler.IdentifierImpl(this.data.space):null;},getContent:function(){return new com.ibm.mm.enabler.DeferredImpl(this,dojo.hitch(this,function(dfr){var _119b=new com.ibm.mm.enabler.content.persistence.json.StaticContentPageJsonImpl(this.data);if(dfr){dfr.finish(_119b,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return _119b;}));},hasCachedHasRole:function(){return !!(this.data.roles&&dojo.isArray(this.data.roles));}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationNodeJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationNodeJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.json.NavigationNodeJsonImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.json.NavigationNodeJsonImpl",[com.ibm.mm.enabler.navigation.persistence.json.NavigationElementJsonImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},getNavigationElementType:function(){return com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE;},getServerRuntimeMarkup:function(_119c){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync,_119d){var _119e="_getServerRuntimeMarkup";var _119f=true;if(_119f){this.LOGGER.entering(_119e,arguments);}var _11a0=this.data.layoutURL;if(!_11a0){var _11a1=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.LAYOUT_URL,this);var id=this.getID();_11a1.setNodes([{value:id,isID:true}]);_11a0="?uri="+_11a1.getModelURI()+"/index.html";}var _11a2=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_11a0,this);var _11a3=_11a2.getParameter("digest");if(_11a3=="skip"){_11a2.setParameter("mode",null);_11a2.setParameter("digest",null);}var _11a4=com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator();if(!_119d){_119d=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();}var _11a5=_11a4.getURL(_119d);_11a2.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_STATE_URL,_11a5);var _11a6={};var _11a7=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_11a2,null,null,true,sync);_11a7.enableLogoutVerificationForRawRetrieval();_11a7.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){_11a6.markup=data;}_11a6.status=xhr.status;if(dfr){dfr.finish(_11a6.markup,_11a6.status);}}));if(_119f){this.LOGGER.exiting(_119e,[_11a6]);}return _11a6.markup;},_119c);},getServerRuntimeContent:function(){return this;}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationLabelJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationLabelJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.json.NavigationLabelJsonImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.json.NavigationLabelJsonImpl",[com.ibm.mm.enabler.navigation.persistence.json.NavigationElementJsonImpl],{getNavigationElementType:function(){return com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_LABEL;}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationURLJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationURLJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.json.NavigationURLJsonImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.json.NavigationURLJsonImpl",[com.ibm.mm.enabler.navigation.persistence.json.NavigationElementJsonImpl],{getNavigationElementType:function(){return com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_URL;},getURL:function(){return this.data.url;}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.json.FactoryImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.json.FactoryImpl",null,{constructor:function(){var tfr=com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry;tfr._addTypeMappingFilter({json:{fn:function(d){var c=com.ibm.mashups.enabler.navigation.Constants;var _11a8;switch(d.type){case c.NAVIGATION_PAGE:_11a8=c.NAVIGATION_PAGE;break;case c.NAVIGATION_LABEL:_11a8=c.NAVIGATION_LABEL;break;case c.NAVIGATION_URL:_11a8=c.NAVIGATION_URL;break;default:_11a8=null;}return _11a8;}}},true);tfr._addTypeMappingFilter({json:{fn:function(d){var c=com.ibm.mashups.enabler.navigation.Constants;var _11a9;switch(d.type){case "page":_11a9=c.NAVIGATION_PAGE;break;case "label":_11a9=c.NAVIGATION_LABEL;break;case "url":_11a9=c.NAVIGATION_URL;break;default:_11a9=null;}return _11a9;}}},true);},createNavigationElementPersistence:function(data){var type=com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry._getJsonType(data);var c=com.ibm.mashups.enabler.navigation.Constants;var p;switch(type){case c.NAVIGATION_PAGE:p=new com.ibm.mm.enabler.navigation.persistence.json.NavigationNodeJsonImpl(data);break;case c.NAVIGATION_LABEL:p=new com.ibm.mm.enabler.navigation.persistence.json.NavigationLabelJsonImpl(data);break;case c.NAVIGATION_URL:p=new com.ibm.mm.enabler.navigation.persistence.json.NavigationURLJsonImpl(data);break;default:console.warn("Navigation element type cannot be resolved.");break;}return p;}});com.ibm.mm.enabler.navigation.persistence.json.Factory=new com.ibm.mm.enabler.navigation.persistence.json.FactoryImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.space.persistence.meta.SpaceNodeMetaImpl"]){dojo._hasResource["com.ibm.mm.enabler.space.persistence.meta.SpaceNodeMetaImpl"]=true;dojo.provide("com.ibm.mm.enabler.space.persistence.meta.SpaceNodeMetaImpl");dojo.declare("com.ibm.mm.enabler.space.persistence.meta.SpaceNodeMetaImpl",null,{constructor:function(){this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);},isHidden:function(){return (this.getMetaData(this._getHiddenMetaNameFixed())=="true")||(this.getMetaData(this._getHiddenMetaNameDynamic())=="true");},_getHiddenMetaNameFixed:function(){return "{http://www.ibm.com/xmlns/prod/lotus/mashups/v1.0/extensions}com.ibm.mashups.space.hidden";},_getHiddenMetaNameDynamic:function(){var name=this.cs.getValue("com.ibm.mashups.space.hidden");if(name.search("^\\{http://.*\\}.+")==-1){name="{http://www.ibm.com/xmlns/prod/lotus/mashups/v1.0/extensions}"+name;}return name;}});}if(!dojo._hasResource["com.ibm.mm.enabler.space.persistence.json.SpaceNodeJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.space.persistence.json.SpaceNodeJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.space.persistence.json.SpaceNodeJsonImpl");dojo.declare("com.ibm.mm.enabler.space.persistence.json.SpaceNodeJsonImpl",[com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl,com.ibm.mm.enabler.persistence.json.IdentifiableJsonImpl,com.ibm.mm.enabler.persistence.json.EditLinkProviderJsonImpl,com.ibm.mm.enabler.persistence.json.MetaDataJsonImpl,com.ibm.mm.enabler.persistence.json.LocalizedJsonImpl,com.ibm.mm.enabler.persistence.json.DefaultLocalizedJsonImpl,com.ibm.mm.enabler.persistence.json.EffectiveAccessJsonImpl,com.ibm.mm.enabler.space.persistence.meta.SpaceNodeMetaImpl],{getRootNavigation:function(){return new com.ibm.mm.enabler.IdentifierImpl(this.data.navroot);},isFavorite:function(){return (this.data.isFavorite)?this.data.isFavorite:true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.space.persistence.json.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.space.persistence.json.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.space.persistence.json.FactoryImpl");dojo.declare("com.ibm.mm.enabler.space.persistence.json.FactoryImpl",null,{createSpaceNodePersistence:function(data){return new com.ibm.mm.enabler.space.persistence.json.SpaceNodeJsonImpl(data);}});com.ibm.mm.enabler.space.persistence.json.Factory=new com.ibm.mm.enabler.space.persistence.json.FactoryImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationModelIteratorJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationModelIteratorJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.json.NavigationModelIteratorJsonImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.json.NavigationModelIteratorJsonImpl",com.ibm.mm.enabler.DeferredIteratorImpl,{constructor:function(_11aa,model,um){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.model=model;this.entries=[];this.cursor=0;this.sizeValue=null;this.loadedNodes={};this.parentNode=_11aa;},_reset:function(){this.cursor=0;},start:function(){this._start(true);},_start:function(sync){while(this.hasNext(this,sync)){this.next(this,sync);}},hasNext:function(dfr,sync){if(typeof this.entries[this.cursor]=="undefined"){this._loadAhead(dfr||null,typeof sync=="undefined"?true:sync);}return this.entries[this.cursor]?true:false;},next:function(dfr,sync){return this._next(null,true);},_next:function(dfr,sync){return this.hasNext(dfr||null,typeof sync=="undefined"?true:sync)?this.entries[this.cursor++]:null;},setCursorPosition:function(_11ab){this.cursor=_11ab;},getCursorPosition:function(){return this.cursor;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._size);},_size:function(dfr,sync){if(!this.sizeValue){this.hasNext(null,true);}if(dfr){dfr.finish(this.sizeValue,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.sizeValue;},_loadAhead:function(_11ac,sync){var _11ad="_loadAhead";var _11ae=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_11ae){this.LOGGER.entering(_11ad,arguments);}var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;this._old=false;this.entries=[];var d=_11ac;jp.getChildren(this.parentNode.data,dojo.hitch(this,function(_11af,_11b0,_11b1){if(_11af){if(dojo.isArray(_11af)){for(var i=0,l=_11af.length;i<l;++i){var f=com.ibm.mm.enabler.navigation.persistence.json.Factory;var entry=f.createNavigationElementPersistence(_11af[i]);this.entries.push(entry);this.sizeValue=this.entries.length;if(d){d.nextFinish(entry);}}if(d){d.finish(null,_11b0);}}if(d){d.finish(this.entries,_11b0);}}}),sync,this);if(_11ae){this.LOGGER.exiting(_11ad);}}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationModelJsonImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.json.NavigationModelJsonImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.json.NavigationModelJsonImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.json.NavigationModelJsonImpl",[com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.ConfirmableModelImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");dojo.subscribe(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_CHILDREN,this,"_invalidateChildren");dojo.subscribe(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_NODE,this,"_invalidateNode");},_getInstance:function(){var _11b2=com.ibm.mm.enabler.navigation.persistence.json.NavigationModelJsonImpl._instance;return _11b2?_11b2:(com.ibm.mm.enabler.navigation.persistence.json.NavigationModelJsonImpl._instance=new com.ibm.mm.enabler.navigation.persistence.json.NavigationModelJsonImpl());},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,uri);},getRoot:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){return this._find(dfr,sync,"collection");});},hasChildren:function(node){var _11b3=node._getJsonData();return (typeof _11b3.children!=="undefined");},getChildren:function(node){return new com.ibm.mm.enabler.navigation.persistence.json.NavigationModelIteratorJsonImpl(node,this);},getParent:function(node,_11b4){return new com.ibm.mm.enabler.DeferredImpl(this,this._getParent,[node,_11b4]);},_getParent:function(_11b5,sync,_11b6){var _11b7="_getParent";var _11b8=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_11b8){this.LOGGER.entering(_11b7,arguments);}var uri=_11b6[0];var _11b9=_11b6[1];if(!uri){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(uri);var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;var _11ba=jp.getParentID(id);if(_11ba&&_11b9){var _11bb=_11b9.lookupNodeInCache(_11ba);if(_11bb){if(_11b5){_11b5.finish(_11bb,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}}var d=_11b5;var _11bc=null;jp.getParent(id,dojo.hitch(this,function(_11bd,_11be){if(_11bd){var f=com.ibm.mm.enabler.navigation.persistence.json.Factory;_11bc=f.createNavigationElementPersistence(_11bd,_11bd.type);}d.finish(_11bc,_11be);}),sync,this);if(_11b8){this.LOGGER.exiting(_11b7,_11bc);}return _11bc;},_find:function(_11bf,sync,uri,_11c0){var _11c1="_find";var _11c2=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_11c2){this.LOGGER.entering(_11c1,arguments);}if(!uri){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(uri);var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;var d=_11bf;var _11c3=null;jp.findPage(id,null,dojo.hitch(this,function(_11c4,_11c5,_11c6){if(_11c4){var f=com.ibm.mm.enabler.navigation.persistence.json.Factory;_11c3=f.createNavigationElementPersistence(_11c4,_11c4.type);}d.finish(_11c3,_11c5);}),sync,this);if(_11c2){this.LOGGER.exiting(_11c1,_11c3);}return _11c3;},_invalidateNode:function(_11c7){this._invalidate(_11c7,false);},_invalidateChildren:function(_11c8){this._invalidate(_11c8,true);},_invalidate:function(_11c9,_11ca){var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;if(!_11c9){jp.invalidatePage();return;}var _11cb;if(dojo.isArray(_11c9.nodes)){_11cb=_11c9.nodes;}else{_11cb=[_11c9.nodes];}for(var i=0,l=_11cb.length;i<l;++i){jp.invalidatePage(_11cb[i],!!_11ca);}},confirmCreate:function(){return true;},confirmRemove:function(node){return this.getConfirmRemove(node);},confirmInsert:function(node,_11cc,_11cd){return true;},_getIteratorPersistenceHandler:function(_11ce){var that=this;return {loadAhead:function(_11cf){return new com.ibm.mm.enabler.DeferredImpl(that,function(_11d0,sync,node){var _11d1="loadAhead";var _11d2=this.LOGGER.isLoggable(that.LOG_LEVEL);if(_11d2){this.LOGGER.entering(_11d1,arguments);}var _11d3=null;var jp=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;var f=com.ibm.mm.enabler.navigation.persistence.json.Factory;var jNode=jp.findPage(_11ce.getID(),null,null,true,this);jp.getChildren(jNode,dojo.hitch(this,function(_11d4,_11d5,_11d6){if((_11d4)&&(dojo.isArray(_11d4))){_11d3={nodes:[],loadFurtherNodes:false};for(var i=0,l=_11d4.length;i<l;++i){_11d3.nodes.push(f.createNavigationElementPersistence(_11d4[i]));}_11d3.size=_11d3.nodes.length;if(_11d0){_11d0.finish(_11d3,_11d5);}}else{if(_11d0){_11d0.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_BAD_REQUEST);}}}),sync,this);if(_11d2){this.LOGGER.exiting(_11d1,_11d3);}return _11d3;});},getLoadAheadContext:function(_11d7,_11d8){return _11d7;},setCursorPosition:function(_11d9,_11da){return _11d9;}};}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesImpl");dojo.declare("com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesImpl",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_11db){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.bIsLogging=this.LOGGER.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE);this.widget=_11db;this.pageID=com.ibm.mm.enabler.utils.Model.getCurrentPageID();this.modelID=com.ibm.mm.iwidget.Utils.getModelID(_11db.getID());this.widgetXmlAttributes={};var _11dc=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.PERSISTENCE_MODE_ATTRIBUTES_JSON_INJECTXML);if(!_11dc||_11dc=="true"){if(this.bIsLogging){this.LOGGER.trace(LOG_METHOD,"Injecting the widget xml attributes into the widget attributes map.");}var _11dd=this.widget.getIWidgetDefinition().start(true);var _11de=_11dd.toSpecObject();var _11df=_11de.itemSets.attributes;if(_11df){var items=_11df.items;for(var name in items){this.widgetXmlAttributes[name]={"values":[items[name]._value],"readOnly":false};}}}this.attributesMap={};this._init();},_init:function(){var _11e0="_init";if(this.bIsLogging){this.LOGGER.entering(_11e0);}var type=com.ibm.mashups.enabler.persistence.Constants.NAVIGATION_MODEL_PERSISTENCE_PROVIDER;var _11e1=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;_11e1.getWidgetData(this.pageID,this.modelID,dojo.hitch(this,this._initCallback));if(this.bIsLogging){this.LOGGER.exiting(_11e0);}},_initCallback:function(_11e2,_11e3){var _11e4="_initCallback(result, status)";if(this.bIsLogging){this.LOGGER.entering(_11e4,[_11e2,_11e3]);}if(_11e3==200){var _11e5=_11e2;if(_11e5){this._initAttributes(_11e5);}else{console.warn("FAILSAFE ACTIVATED! Should never happen and needs to be investigated...");this._initAttributes(null);}}else{this.LOGGER.severe(_11e4,"error loading json data. Status:"+_11e3,_11e2);}if(this.bIsLogging){this.LOGGER.exiting(_11e4);}},_initAttributes:function(_11e6){var _11e7="_initAttributes(jsonWidgetData)";if(this.bIsLogging){this.LOGGER.entering(_11e7,[_11e6]);}var mode=this.widget.currentMode;this.attributesMap={};this.attributesMap=dojo.mixin(this.attributesMap,this.widgetXmlAttributes);if(!_11e6){return;}this.attributesMap=dojo.mixin(this.attributesMap,_11e6.definition);if(mode===iwConstants.mode.CONFIG){if(this.bIsLogging){this.LOGGER.trace(LOG_METHOD,"Returing attributes map for config mode.",this.attributesMap);}return;}this.attributesMap=dojo.mixin(this.attributesMap,_11e6.entity);if(mode===iwConstants.mode.EDIT){if(this.bIsLogging){this.LOGGER.trace(LOG_METHOD,"Returing attributes map for edit mode.",this.attributesMap);}return;}this.attributesMap=dojo.mixin(this.attributesMap,_11e6.window);if(this.bIsLogging){this.LOGGER.trace(LOG_METHOD,"Returing attributes map for personalize mode.",this.attributesMap);}if(this.bIsLogging){this.LOGGER.exiting(_11e7);}},setItemValue:function(_11e8,value){this.attributesMap[_11e8]={"values":[value],"readOnly":false};return this;},getItemValue:function(_11e9){var node=this.attributesMap[_11e9];if(node){return node.values[0];}return null;},getAllNames:function(){var _11ea=[];for(var name in this.attributesMap){_11ea.push(name);}return _11ea;},removeItem:function(_11eb){if(_11eb in this.attributesMap){delete this.attributesMap[_11eb];}return this;},isReadOnly:function(_11ec){var node=this.attributesMap[_11ec];if(node){return node.readOnly;}return false;},save:function(_11ed){},commit:function(_11ee){},addListener:function(fn){var _11ef=this.widget._registerListener(iwConstants.ATTRIBUTES,fn);return _11ef;},removeListener:function(_11f0){return this.widget._removeListener(iwConstants.ATTRIBUTES,_11f0);}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesFactoryImpl");dojo.declare("com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesFactoryImpl",com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory,{constructor:function(){this.modes=["JSON"];},createPersistentAttributes:function(_11f1,_11f2){return new com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesImpl(_11f1);},getSupportedPersistenceMode:function(){return this.modes;}});com.ibm.mashups.services.ServiceManager.getService("persistentAttributesFactoryService").setFactory("JSON",new com.ibm.mm.enabler.widget.attributes.JSONPersistentAttributesFactoryImpl());}if(!dojo._hasResource["com.ibm.mm.iwidget.WidgetStub"]){dojo._hasResource["com.ibm.mm.iwidget.WidgetStub"]=true;dojo.provide("com.ibm.mm.iwidget.WidgetStub");dojo.declare("com.ibm.mm.iwidget.WidgetStub",null,{constructor:function(_11f3){this._wrapper=_11f3;this.id=_11f3.id;this.publishedEvents=_11f3._getPublishedEvents();this.handledEvents=_11f3._getHandledEvents();this.payloadDefs=_11f3.widgetDef.getPayloadDefs();this.supportedModes=_11f3.widgetDef.getSupportedModes();},getPublishedEventsNames:function(){if(!this.publishedEvents){return null;}var _11f4=[];var _11f5;for(_11f5 in this.publishedEvents){if(Object.prototype.hasOwnProperty.call(this.publishedEvents,_11f5)){_11f4.push(_11f5);}}if(_11f4.length===0){return null;}return _11f4;},getHandledEventsNames:function(){if(!this.handledEvents){return null;}var _11f6=[];var _11f7;for(_11f7 in this.handledEvents){if(Object.prototype.hasOwnProperty.call(this.handledEvents,_11f7)){_11f6.push(_11f7);}}if(_11f6.length===0){return null;}return _11f6;},getPublishedEvent:function(_11f8){if(!this.publishedEvents){return null;}return [this.publishedEvents[_11f8]];},getHandledEvent:function(_11f9){if(!this.handledEvents){return null;}return [this.handledEvents[_11f9]];},getPayloadDefs:function(){return this.payloadDefs;},getPayloadDef:function(name){var _11fa=this.payloadDefs[name];if(typeof _11fa=="undefined"){return null;}return _11fa;},getPayloadDefNames:function(){var arr=[];var a;for(a in this.payloadDefs){if(Object.prototype.hasOwnProperty.call(this.payloadDefs,a)){arr.push(a);}}if(arr.length===0){return null;}return arr;},getWires:function(){return this._wrapper.getWires();},getSupportedModes:function(){return this.supportedModes;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.IWidgetMetadataImpl"]){dojo._hasResource["com.ibm.mm.iwidget.IWidgetMetadataImpl"]=true;dojo.provide("com.ibm.mm.iwidget.IWidgetMetadataImpl");dojo.declare("com.ibm.mm.iwidget.IWidgetMetadataImpl",null,{constructor:function(id){this._id=id;this._items={};},CONSTANTS:{"title":"title","icon":"icon"},getItemValue:function(_11fb,_11fc){if(!_11fc){_11fc="en";}if(typeof _11fb=="undefined"||_11fb===null){return null;}if(!this.CONSTANTS[_11fb]){return null;}var _11fd=this._getInternalIWidgetWrapper();if(_11fd===null){return null;}var data=this._items[_11fb][_11fc];if(typeof data=="undefined"||data===null){if(!this._loadData(_11fb,_11fc)){return null;}data=this._items[_11fb][_11fc];}if(data.detail!="undefined"&&data.detail!==null){return data.detail;}else{return null;}},_setItemValue:function(_11fe,value){if(typeof _11fe=="undefined"||_11fe===null||typeof value=="undefined"||value===null){return null;}if(!this.CONSTANTS[_11fe]){return null;}var _11ff=this._getInternalIWidgetWrapper().getIWidgetInstance().getIDescriptorItems();if(!_11ff){return;}_11ff.setItemValue(_11fe,value);},setItemValue:function(_1200,value,_1201){if(typeof _1200=="undefined"||_1200===null||typeof value=="undefined"||value===null){return null;}if(!this.CONSTANTS[_1200]){return null;}var _1202=this._getInternalIWidgetWrapper().getIWidgetInstance().getIDescriptorItems();if(!_1202){return;}_1202.setItemValue(_1200,value,_1201);},save:function(){com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().commit().start();},_getInternalIWidgetWrapper:function(){if(typeof (this._internalWidgetWrapper)=="undefined"||this._internalWidgetWrapper===null){var _1203=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(this._id);if(typeof _1203=="undefined"||_1203===null){return null;}this._internalWidgetWrapper=_1203;}return this._internalWidgetWrapper;},_loadData:function(_1204,_1205){if(!_1205){_1205="en";}var rc=false;var _1206={};var _1207=this._getInternalIWidgetWrapper().getIWidgetInstance().getIDescriptorItems();if(_1207&&_1207.getItemValue(_1204,_1205)){var _1208=dojo.toJson(_1207.getItemValue(_1204,_1205));_1206.isDirty=true;_1206.detail=dojo.fromJson(_1208);rc=true;}else{_1206.detail={};_1206.detail.itemName=_1204;_1206.isDirty=false;}this._items[_1204][_1205]=_1206;return rc;},_updateMarkup:function(_1209){var _120a=_1209.itemName;var _120b=_1209.defaultValue;var node;var _120c=com.ibm.mashups.services.ServiceManager.getService("iwidgetFragmentService");var _120d=_120c.getItemSet(this._id,iwConstants.IDESCRIPTOR);if(!_120d){node=_120c.createItemSet(iwConstants.IDESCRIPTOR);var _120e=dojo.byId(this._id);_120e.insertBefore(node,_120e.firstChild.nextSibling);_120d=_120c.getItemSet(this._id,iwConstants.IDESCRIPTOR);}var _120f=_120c.getItem(_120d,_120a);if(!_120f){node=_120c.createItem(_120a,_120b);_120d.appendChild(node);}else{_120f.innerHTML=_120b;}this._getInternalIWidgetWrapper().getIWidgetInstance().loadItemSets();}});}if(!dojo._hasResource["com.ibm.mm.iwidget.IWidgetWrapperImpl"]){dojo._hasResource["com.ibm.mm.iwidget.IWidgetWrapperImpl"]=true;dojo.provide("com.ibm.mm.iwidget.IWidgetWrapperImpl");dojo.declare("com.ibm.mm.iwidget.IWidgetWrapperImpl",null,{constructor:function(id){this.id=id;},getiWidgetMetadata:function(){return new com.ibm.mm.iwidget.IWidgetMetadataImpl(this.id);},getInstanceAttributes:function(){var _1210=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(this.id);if(typeof _1210=="undefined"||_1210===null){return null;}_1210.getIWidgetInstance().loadItemSets();var _1211=_1210.getIWidgetInstance()._getAttributes();var _1212=new com.ibm.mm.iwidget.itemset.DefaultItemSetImpl();for(var _1213 in _1211){if(Object.prototype.hasOwnProperty.call(_1211,_1213)){var _1214=_1211[_1213].defaultLocale;var _1215=_1211[_1213].values[_1214];_1212.setItemValue(_1213,_1215,false);}}return _1212;}});}if(!dojo._hasResource["com.ibm.mm.iwidget.services.QueryServiceImpl"]){dojo._hasResource["com.ibm.mm.iwidget.services.QueryServiceImpl"]=true;dojo.provide("com.ibm.mm.iwidget.services.QueryServiceImpl");dojo.declare("com.ibm.mm.iwidget.services.QueryServiceImpl",null,{getiWidgetWrapperById:function(id){var _1216=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(id);if(typeof _1216=="undefined"||_1216===null){return null;}return new com.ibm.mm.iwidget.IWidgetWrapperImpl(id);},getWidgetById:function(id,obj,cb){var _1217=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(id);if(typeof _1217=="undefined"||_1217===null){return null;}if(!obj||!cb){if(_1217.isLoaded()){return new com.ibm.mm.iwidget.WidgetStub(_1217);}else{return null;}}var cbn=function(_1218,obj,cb){obj[cb](new com.ibm.mm.iwidget.WidgetStub(_1218));};if(_1217.isLoaded()){cbn(_1217,obj,cb);}else{com.ibm.mashups.services.ServiceManager.getService("eventService").subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+id,null,function(){var _1219=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);cbn(_1219,obj,cb);});}},getWidgetsByDefUrl:function(url){var arr=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().widgetArr;for(var id in arr){if(Object.prototype.hasOwnProperty.call(arr,id)){var _121a=arr[id];if(_121a&&_121a!==null){var _121b=_121a.getIWidgetInstance().widgetXMLUrl;if(typeof _121b!="undefined"&&_121b!==null&&url==_121b){arr.push(id);}}}}return arr;}});com.ibm.mashups.services.ServiceManager.setService("queryService",new com.ibm.mm.iwidget.services.QueryServiceImpl());}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.RoleNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.RoleNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.RoleNode_API");dojo.provide("com.ibm.mashups.enabler.ac.RoleNode");dojo.declare("com.ibm.mashups.enabler.ac.RoleNode",[com.ibm.mashups.enabler.Identifiable],{getRoleName:function(){},getRoleType:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl",[com.ibm.mashups.enabler.EditLinkProvider],{constructor:function(){this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns_elp=nsf.getNameSpaces([nsf.NS_ATOM]);},getEditLink:function(_121c){var _121d=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._EDIT_LINK,this.xmlData,this.ns_elp);if(node){_121d=node.getAttribute("href");}else{if(_121c){return null;}throw new Error(dojo.string.substitute(this.modelMessages.E_ELEMENT_NOT_FOUND_2,[com.ibm.mm.enabler.utils.Atom._EDIT_LINK,this.toString()]));}return _121d;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.RoleNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.RoleNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.RoleNodeImpl");dojo.declare("com.ibm.mm.enabler.ac.RoleNodeImpl",[com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.TransformableImpl,com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl],{constructor:function(data,_121e,_121f){this.nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=this.nsf.getNameSpaces([this.nsf.NS_ATOM,this.nsf.NS_AC,this.nsf.NS_AI]);this.modified=false;this.xmlData=data;this.um=_121e;if(_121f){this.roleType=_121f;}else{this.roleType=com.ibm.mashups.enabler.ac.RoleType.UNKNOWN;var expr="atom:content/ac:role";var role=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(role){var rt=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(role,"ac:type","type",this.ns.ac);if(rt){rt=rt.toUpperCase();if(rt.indexOf(com.ibm.mashups.enabler.ac.RoleType.USER)===0){this.roleType=com.ibm.mashups.enabler.ac.RoleType.USER;}else{if(rt.indexOf(com.ibm.mashups.enabler.ac.RoleType.EDITOR)===0){this.roleType=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}else{if(rt.indexOf(com.ibm.mashups.enabler.ac.RoleType.MANAGER)===0){this.roleType=com.ibm.mashups.enabler.ac.RoleType.MANAGER;}else{if("EDIT"==rt){this.roleType=com.ibm.mashups.enabler.ac.RoleType.EDITOR;}else{if("MANAGE"==rt){this.roleType=com.ibm.mashups.enabler.ac.RoleType.MANAGER;}}}}}}}}},getRoleName:function(){var expr="atom:content/ac:role";var role=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(role){return com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(role,"ac:type","type",this.ns.ac);}return this.getRoleType();},getRoleType:function(){return this.roleType;},toString:function(){return com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.RoleNode"]){dojo._hasResource["com.ibm.mashups.enabler.ac.RoleNode"]=true;dojo.provide("com.ibm.mashups.enabler.ac.RoleNode");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.MemberNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.MemberNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.MemberNode_API");dojo.provide("com.ibm.mashups.enabler.ac.MemberNode");dojo.declare("com.ibm.mashups.enabler.ac.MemberNode",null,{getEntity:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.MemberNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.MemberNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.MemberNodeImpl");dojo.declare("com.ibm.mm.enabler.ac.MemberNodeImpl",[com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl],{constructor:function(_1220,data,_1221){this.nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=this.nsf.getNameSpaces([this.nsf.NS_ATOM,this.nsf.NS_AC,this.nsf.NS_AI]);this.prefix="role";this.modified=false;this.xmlData=data;this.um=_1221;this.roleID=_1220;if(this.xmlData){var expr="atom:content/ac:member";var _1222=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(_1222){this.memberID=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_1222,"ac:id","id",this.ns.ac);this.memberType=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_1222,"ac:type","type",this.ns.ac);if(this.memberID){var e=null;if(this.memberType=="user"){e=this.um.find(this.memberID).start();}else{if(this.memberType=="group"){e=this.um.findGroupByID(this.memberID).start();if((typeof e=="undefined")||(e===null)){e=this.um.find(this.memberID).start();}}else{var _1223=this.um.getVirtualUsers().start();for(var i=0,l=_1223.length;i<l;i++){if(_1223[i].getID()==this.memberID){e=_1223[i];break;}}if(e==null){var _1224=this.um.getVirtualGroups().start();for(i=0,l=_1224.length;i<l;i++){if(_1224[i].getID()==this.memberID){e=_1224[i];break;}}if(e==null){e=this.um.findGroupByID(this.memberID).start();if((typeof e=="undefined")||(e===null)){e=this.um.find(this.memberID).start();}}}}}this.entity=e;}}}},getEntity:function(){return this.entity;},getID:function(){if(this.entity){return this.entity.getID();}return this.memberID;},_toEntry:function(){return com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.MemberNode"]){dojo._hasResource["com.ibm.mashups.enabler.ac.MemberNode"]=true;dojo.provide("com.ibm.mashups.enabler.ac.MemberNode");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.MemberModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.MemberModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.MemberModel_API");dojo.provide("com.ibm.mashups.enabler.ac.MemberModel");dojo.declare("com.ibm.mashups.enabler.ac.MemberModel",[com.ibm.mashups.enabler.ListModelController],{create:function(_1225){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.MemberModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.MemberModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.MemberModelImpl");dojo.declare("com.ibm.mm.enabler.ac.MemberModelImpl",[com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.DeferredIteratorImpl,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.ConfirmableModelImpl],{constructor:function(_1226,_1227,_1228,_1229){this.roleID=_1226;this.accessControlModel=_1227;this.um=_1228;this.cid=0;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=this.nsf.getNameSpaces([this.nsf.NS_ATOM,this.nsf.NS_AC,this.nsf.NS_AI]);this.prefix="role";this.xmlDom=com.ibm.mm.enabler.utils.Dom.createDocument();this.accessControlModel.membersCursor[this.roleID]=0;if(_1229){this.xmlData=undefined;this.accessControlModel.membersEntries[this.roleID]=[];this.accessControlModel.membersEntries[this.roleID][0]=null;return;}else{this.xmlData=this.accessControlModel.xmlDataMember[this.roleID];var expr="//atom:entry";var _122a=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.ns);if(_122a&&_122a.length>0){for(var i=0;i<_122a.length;i++){var node=new com.ibm.mm.enabler.ac.MemberNodeImpl(this.roleID,_122a[i],this.um);this.accessControlModel.membersEntries[this.roleID][this.accessControlModel.membersCursor[this.roleID]+i]=node.getID();this.accessControlModel._cacheNodeMembers(this.roleID,node);}var len=this.accessControlModel.membersEntries[this.roleID].length;this.accessControlModel.membersEntries[this.roleID][len]=null;}else{this.accessControlModel.membersEntries[this.roleID]=[];this.accessControlModel.membersEntries[this.roleID][0]=null;}}},create:function(_122b){if(!_122b){throw new Error("MemberModelImpl.create: no context");}if(!_122b.type){throw new Error("MemberModelImpl.create: no type context");}if(!_122b.id){throw new Error("MemberModelImpl.create: no type context");}var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns.atom);entry.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns.atom));var title=com.ibm.mm.enabler.utils.Utils.createNode("atom:title",this.ns.atom);com.ibm.mm.enabler.utils.Dom.textContent(title,"Member");entry.appendChild(title);var _122c=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",this.ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_122c,time.toGMTString());entry.appendChild(_122c);var _122d=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_122d.setAttribute("type","application/xml");var _122e=com.ibm.mm.enabler.utils.Utils.createNode("ac:member",this.ns.ac);com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_122e,"ac:id",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_122b.id);com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_122e,"ac:type",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_122b.type);_122d.appendChild(_122e);entry.appendChild(_122d);var _122f=new com.ibm.mm.enabler.ac.MemberNodeImpl(this.roleID,entry,this.um);return _122f;},iterator:function(){return this;},start:function(sync){while(this._hasNext(this,sync)){if(this._next(this,sync)){continue;}else{break;}}},hasNext:function(){return this._hasNext(null,true);},_hasNext:function(_1230,sync){var _1231=false;var next=this.accessControlModel.membersEntries[this.roleID][this.accessControlModel.membersCursor[this.roleID]];if(next!==null&&next!==undefined){_1231=true;}return _1231;},next:function(){return this._next(null,true);},_next:function(_1232,sync){var _1233=this._hasNext(_1232,sync);var _1234=this.accessControlModel.membersEntries[this.roleID];var _1235=this.accessControlModel.membersLoadedNodes[this.roleID];var ret=_1233?_1235[_1234[this.accessControlModel.membersCursor[this.roleID]]]:null;this.accessControlModel.membersCursor[this.roleID]++;return ret;},size:function(){return this.accessControlModel.membersSizeValue[this.roleID];},setCursorPosition:function(_1236){this.accessControlModel.membersCursor[this.roleID]=_1236;},getCursorPosition:function(){return this.accessControlModel.membersCursor[this.roleID];},insert:function(node,_1237){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this.accessControlModel.getRoleModel()._getRoles();}this.accessControlModel.membersCreatedNodes[this.roleID][node.getID()]=node;var _1238=this.accessControlModel.membersEntries[this.roleID].length;if((!_1238)||(_1238===0)){this.accessControlModel.membersEntries[this.roleID][0]=node.getID();this.accessControlModel.membersEntries[this.roleID][1]=null;}else{this.accessControlModel.membersEntries[this.roleID][_1238-1]=node.getID();this.accessControlModel.membersEntries[this.roleID][_1238]=null;}this.accessControlModel._cacheNodeMembers(this.roleID,node);},find:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,id);},_find:function(_1239,sync,id){if(id in this.accessControlModel.membersDeletedNodes[this.roleID]){if(_1239){_1239.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}if(id in this.accessControlModel.membersLoadedNodes[this.roleID]){if(_1239){_1239.finish(this.accessControlModel.membersLoadedNodes[this.roleID][id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.accessControlModel.membersLoadedNodes[this.roleID][id];}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelUrl(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,this);myUrl.setNodes([{value:id,isID:true}]);var _123a=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var entry=null;var _123b={};_123b.node=null;_123a.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",data,this.ns);if(nodes){var _123c=new com.ibm.mm.enabler.ac.MemberNodeImpl(nodes,this);this.accessControlModel.membersNewid[this.roleID]=_123c.getID();this.membersLoadedNodes[this.roleID][this.membersNewid[this.roleID]]=_123c;_123b.node=this.accessControlModel.membersLoadedNodes[this.roleID][this.membersNewid[this.roleID]];}else{if(sync){_123b.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(_1239){_1239.finish(_123b.node||null,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_123b.status=xhr.status;}}}));if(_123b.status){throw new Error(dojo.string.substitute(this.modelMessages.E_COMNODE_NOTFOUND_1,[id,_123b.status]));}retVal=_123b.node;return retVal;},remove:function(node){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this.accessControlModel.getRoleModel()._getRoles();}var id=node.getID();if(!(id in this.accessControlModel.membersDeletedNodes[this.roleID])){this.accessControlModel.membersDeletedNodesMemberIDs[this.roleID][id]=node.getEntity().getID();this.accessControlModel.membersDeletedNodes[this.roleID][id]=node;}if(id in this.accessControlModel.membersLoadedNodes[this.roleID]){delete this.accessControlModel.membersLoadedNodes[this.roleID][id];}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.MemberModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.MemberModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.MemberModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.RoleModel_API");dojo.provide("com.ibm.mashups.enabler.ac.RoleModel");dojo.declare("com.ibm.mashups.enabler.ac.RoleModel",[com.ibm.mashups.enabler.ListModelController],{create:function(_123d){},getMemberModel:function(_123e){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.RoleModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.RoleModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.RoleModelImpl");dojo.declare("com.ibm.mm.enabler.ac.RoleModelImpl",[com.ibm.mashups.enabler.ac.RoleModel,com.ibm.mashups.enabler.ListModel,com.ibm.mm.enabler.DeferredIteratorImpl,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.ConfirmableModelImpl],{constructor:function(_123f,_1240){this.accessControlModel=_123f;this.um=_1240;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);this.nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,this.nsf.getNameSpaces([this.nsf.NS_ATOM,this.nsf.NS_AC,this.nsf.NS_AI]));this.prefix="role";this.xmlDom=com.ibm.mm.enabler.utils.Dom.createDocument();this.cid=0;},create:function(_1241){if(!_1241){throw new Error("RoleModelImpl.create: no context");}if(!_1241.roletype){throw new Error("RoleModelImpl.create: no roletype context");}var _1242=this.getCursorPosition();this.setCursorPosition(0);var _1243=this.iterator();while(_1243.hasNext()){var role=_1243.next();if(role.getRoleType()==_1241.roletype){if(_1242){this.setCursorPosition(_1242);}else{this.setCursorPosition(0);}return null;}}var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns.atom);entry.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns.atom));var title=com.ibm.mm.enabler.utils.Utils.createNode("atom:title",this.ns.atom);com.ibm.mm.enabler.utils.Dom.textContent(title,"Role");entry.appendChild(title);var _1244=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",this.ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_1244,time.toGMTString());entry.appendChild(_1244);var _1245=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_1245.setAttribute("type","application/xml");var _1246=com.ibm.mm.enabler.utils.Utils.createNode("ac:role",this.ns.ac);var _1247=this.accessControlModel._getCreationRoleName(_1241.roletype);if(!_1247){_1247=_1241.roletype;}com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1246,"ac:type",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_1247);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_1246,"creation-context:role-types","role-types",this.ns["creation-context"],_1241.roletype);var _1248=this.accessControlModel._getCreationResourceID();com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_1246,"creation-context:resource-id","resource-id",this.ns["creation-context"],_1248);_1245.appendChild(_1246);entry.appendChild(_1245);var _1249=new com.ibm.mm.enabler.ac.RoleNodeImpl(entry,this.um,_1241.roletype);_1249.setID(""+(this.cid++));return _1249;},remove:function(role){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this._getRoles();}var _124a=role.getID();for(var i=this.accessControlModel.rolesEntries.length;i>0;i--){if(this.accessControlModel.rolesEntries[i]==_124a){this.accessControlModel.rolesEntries.splice(i,1);break;}}this.accessControlModel._removeNodeRoles(role);},iterator:function(){return this;},start:function(sync){while(this._hasNext(this,sync)){if(this._next(this,sync)){continue;}else{break;}}},hasNext:function(){return this._hasNext(null,true);},_hasNext:function(_124b,sync){var _124c=false;var next=this.accessControlModel.rolesEntries[this.accessControlModel.rolesCursor];if(next!==null&&next!==undefined){_124c=true;}return _124c;},next:function(){return this._next(null,true);},_next:function(_124d,sync){var _124e=this._hasNext(_124d,sync);var _124f=this.accessControlModel.rolesEntries;var _1250=this.accessControlModel.rolesLoadedNodes;var ret=_124e?_1250[_124f[this.accessControlModel.rolesCursor]]:null;this.accessControlModel.rolesCursor++;return ret;},size:function(){return this.accessControlModel.rolesSizeValue;},setCursorPosition:function(_1251){this.accessControlModel.rolesCursor=_1251;},getCursorPosition:function(){return this.accessControlModel.rolesCursor;},insert:function(node,_1252){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this._getRoles();}this.accessControlModel.rolesCreatedNodes[node.getID()]=node;var _1253=this.accessControlModel.rolesEntries.length;if((!_1253)||(_1253===0)){this.accessControlModel.rolesEntries[0]=node.getID();this.accessControlModel.rolesEntries[1]=null;}else{this.accessControlModel.rolesEntries[_1253-1]=node.getID();this.accessControlModel.rolesEntries[_1253]=null;}this.accessControlModel._cacheNodeRoles(node);},_getRoles:function(){var roles={};this.setCursorPosition(0);var _1254=this.iterator();while(_1254.hasNext()){var role=_1254.next();var _1255=role.getID();roles[_1255]=_1255;}return roles;},find:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,id);},_find:function(_1256,sync,id){if(id in this.accessControlModel.rolesLoadedNodes){if(_1256){_1256.finish(this.accessControlModel.rolesLoadedNodes[id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.accessControlModel.rolesLoadedNodes[id];}if(id in this.accessControlModel.rolesDeletedNodes){if(_1256){_1256.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,this);myUrl.setNodes([{value:id,isID:true}]);var _1257=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var entry=null;var _1258={};_1258.node=null;_1257.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",data,this.ns);if(node){var _1259=new com.ibm.mm.enabler.ac.RoleNodeImpl(node,this);this.accessControlModel.rolesNewid=_1259.getID();this.rolesLoadedNodes[this.rolesNewid]=_1259;_1258.node=this.accessControlModel.rolesLoadedNodes[this.rolesNewid];}else{if(sync){_1258.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(_1256){_1256.finish(_1258.node,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_1258.status=xhr.status;}}}));if(_1258.status){throw new Error(dojo.string.substitute(this.modelMessages.E_COMNODE_NOTFOUND_1,[id,_1258.status]));}retVal=_1258.node;return retVal;},getMemberModel:function(_125a){if(!_125a){return null;}var id=_125a.getID();if(!id){return null;}if(this.accessControlModel.memberModel){if(this.accessControlModel.memberModel[id]){return this.accessControlModel.memberModel[id];}}this.accessControlModel._loadAheadMember(_125a,null,true);if(this.accessControlModel.memberModel[id]){return this.accessControlModel.memberModel[id];}return null;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.RoleModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.RoleModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModel_API");dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModel");dojo.declare("com.ibm.mashups.enabler.ac.AccessControlModel",[com.ibm.mashups.enabler.model.Model],{isInitialized:function(){},getOwner:function(){},setOwner:function(user){},confirmSetOwner:function(user){},getRoleModel:function(){},getRoleModel:function(_125b){},confirmGetRoleModel:function(){},commit:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ACLinkProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.ACLinkProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.ACLinkProviderImpl");dojo.declare("com.ibm.mm.enabler.ACLinkProviderImpl",null,{constructor:function(){var _125c=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns_acrlp=dojo.delegate(_125c.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML,nsf.NS_EXT,nsf.NS_AC,nsf.NS_CA]));this.AC_RESOURCE_ATOM_LINK="atom:link[@ext:rel='ac-resource-config']";this.AC_ROLES_ATOM_LINK="atom:link[@ext:rel='roles']";this.CA_ROLES_ATOM_LINK="atom:link[@ca:rel='roles']";this.AC_MEMBERS_ATOM_LINK="atom:link[@ac:rel='members']";},getACResourceLink:function(_125d){var _125e=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_RESOURCE_ATOM_LINK,_125d,this.ns_acrlp);if(node){_125e=node.getAttribute("href");}return _125e;},getACRolesLink:function(_125f){var _1260=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_ROLES_ATOM_LINK,_125f,this.ns_acrlp);if(node){_1260=node.getAttribute("href");}return _1260;},getCARolesLink:function(_1261){var _1262=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.CA_ROLES_ATOM_LINK,_1261,this.ns_acrlp);if(node){_1262=node.getAttribute("href");}return _1262;},getACMembersLink:function(_1263){var _1264=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_MEMBERS_ATOM_LINK,_1263,this.ns_acrlp);if(node){_1264=node.getAttribute("href");}return _1264;}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.AccessControlModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.AccessControlModelImpl");dojo.declare("com.ibm.mm.enabler.ac.AccessControlModelImpl",[com.ibm.mashups.enabler.ac.AccessControlModel,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.ACLinkProviderImpl,com.ibm.mm.enabler.ConfirmableModelImpl],{constructor:function(_1265){this.mainResource=_1265;this.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AI_URL;},_init:function(){this.initialContentsMembers=null;this.rolesLoadedNodes={};this.rolesCreatedNodes={};this.rolesDeletedNodes={};var _1266;this.roleModel=_1266;this.rolesStart=null;this.rolesNum=null;this.rolesSizeValue=9999;this.rolesEntries=[];this.rolesCursor=0;this.rolesSize=null;this.membersLoadedNodes={};this.membersCreatedNodes={};this.membersDeletedNodes={};this.membersDeletedNodesMemberIDs={};this.memberModel={};this.membersEntries={};this.membersCursor={};this.membersSize={};this.xmlDataMember={};this.initialContentsMember={};this.owner=null;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.um=com.ibm.mashups.enabler.user.Factory.getUserModel();this.prefix="resource";this.nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=this.nsf.getNameSpaces([this.nsf.NS_ATOM,this.nsf.NS_XML,this.nsf.NS_OPENSEARCH,this.nsf.NS_AC,this.nsf.NS_AI,this.nsf.NS_APP,this.nsf.NS_CA]);this.changedProperties={};},getResource:function(){return this.mainResource;},_isPageInSpace:function(){return false;},_getPossibleRoles:function(){return null;},_getRolesLink:function(){return null;},_getMembersLink:function(_1267){return null;},_getCreationRoleName:function(_1268){return null;},_getCreationResourceID:function(){return this.mainResource.getID();},_filterRole:function(node){return false;},setID:function(id){throw new Error(this.modelMessages.E_UNSUPPORTED_OP_0);},isInitialized:function(){return true;},getRoleModel:function(){if(this.roleModel===undefined){this._loadAheadRole(null,true);}return this.roleModel;},getRoleModel:function(_1269){if(this.roleModel===undefined){this._loadAheadRole(null,true);}return this.roleModel;},confirmGetRoleModel:function(){if(com.ibm.mm.enabler.AnonymousHelper.getAnonymousMode()==com.ibm.mashups.enabler.user.AnonymousMode.ANONYMOUS){return false;}return this.mainResource.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);},_loadAheadRole:function(_126a,sync){var myUrl;var _126b;this.rolesEntries=[];this.rolesStart=0;this.rolesCursor=0;var _126c=this._getPossibleRoles();if((this._isPageInSpace())&&(_126c)){var i=0;for(var _126d in _126c){if(Object.prototype.hasOwnProperty.call(_126c,_126d)){var _126e=_126c[_126d];myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_126b=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_126b);myUrl.setParameter("filter","type="+_126e);this.__loadAheadRole(myUrl,_126a,sync,i,_126d);i++;}}this.roleModel=new com.ibm.mm.enabler.ac.RoleModelImpl(this,this.um);}else{if(!this.rolesNextLink){var link=this._getRolesLink();if(link){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(link,this);}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_126b=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_126b);}}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.rolesNextLink,this);}myUrl.setParameter("start",this.rolesPosition);if(this.url===com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL){myUrl.setParameter("filter","all");}if(this.strategy){for(var x in this.strategy){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(this.strategy[x],com.ibm.mm.enabler.strategy.PageLoadAheadStrategyImpl)){myUrl.setParameter("num",this.strategy[x].getInterval());break;}}}this.__loadAheadRole(myUrl,_126a,sync,null);}},__loadAheadRole:function(myUrl,_126f,sync,_1270,_1271){var _1272=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1270=_1270||null;_1272.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var expr,nodes;if(_1270===null){if(!this.rolesSizeValue){expr="atom:feed/openSearch:totalResults";var _1273=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);if(_1273){this.rolesSizeValue=com.ibm.mm.enabler.utils.Dom.textContent(_1273);}}this.rolesNextLink=null;expr="atom:feed/atom:link[@rel='next']";nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);if(nodes){this.rolesNextLink=nodes.getAttribute("href");}}nodes=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("//atom:entry",data,this.ns);if(nodes.length>0){var i,c,l,node;if(_1270===null){for(i=0,c=0,l=nodes.length;i<l;i++){node=new com.ibm.mm.enabler.ac.RoleNodeImpl(nodes[i],this.um);if(this._filterRole(node)){continue;}this.rolesEntries[this.rolesCursor+c]=node.getID();this._cacheNodeRoles(node);c++;if(_126f&&_126f.foreachCallback){_126f.foreachCallback(this.rolesLoadedNodes[id],_126f.foreachCallbackParameters);}}}else{for(i=0,c=0,l=nodes.length;i<l;i++){node=new com.ibm.mm.enabler.ac.RoleNodeImpl(nodes[i],this.um,_1271);if(this._filterRole(node)){continue;}this.rolesEntries[this.rolesCursor+_1270+c]=node.getID();this._cacheNodeRoles(node);c++;}}}if(_1270===null){this.rolesEntries[this.rolesEntries.length]=this.rolesNextLink?undefined:null;this.roleModel=new com.ibm.mm.enabler.ac.RoleModelImpl(this,this.um);}else{this.rolesEntries[this.rolesEntries.length]=null;}if(_126f){_126f.finish(null,xhr.status);}}else{if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_126f){_126f.finish(null,xhr.status);}}}}));},_cacheNodeRoles:function(node){var id=node.getID();if(!(id in this.rolesLoadedNodes)){this.rolesLoadedNodes[id]=node;}return this.rolesLoadedNodes[id];},_replaceNodeRoles:function(_1274,_1275){if(_1274){var oldID=_1274.getID();var newID=_1275.getID();var len=this.rolesEntries.length;if(len<=1){this.rolesEntries=[];this.rolesEntries[0]=_1275.getID();}else{for(var i=0;i<len;i++){var id=this.rolesEntries[i];if(id==oldID){this.rolesEntries[i]=newID;if(this.membersCreatedNodes[oldID]){this.membersCreatedNodes[newID]=this.membersCreatedNodes[oldID];delete this.membersCreatedNodes[oldID];}break;}}}delete this.rolesCreatedNodes[oldID];delete this.rolesLoadedNodes[oldID];}this._cacheNodeRoles(_1275);},_loadAheadMember:function(role,_1276,sync){this._loadMemberModel(role.getID(),role.getRoleType(),this._getMembersLink(role.xmlData),null,true);},_loadMemberModel:function(id,_1277,link,_1278,sync){this.memberModel[id]=null;this.membersLoadedNodes[id]={};this.membersCreatedNodes[id]={};this.membersDeletedNodes[id]={};this.membersDeletedNodesMemberIDs[id]={};this.membersEntries[id]=[];this.membersCursor[id]=0;this.xmlDataMember[id]={};this.initialContentsMember[id]={};if(this.rolesCreatedNodes[id]){var node=new com.ibm.mm.enabler.ac.MemberModelImpl(id,this,this.um,true);this.memberModel[id]=node;return;}var myUrl=null;if(!link){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);var _1279=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_MEMBER},{value:_1277,isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_1279);}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(link,this);}var _127a=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _127b=this.membersEntries[id];var model=this.model;_127a.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var expr="atom:feed";var feed=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);var _127c=feed||data;this.xmlDataMember[id]=_127c;this.initialContentsMember[id]=com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlDataMember[id]);var node=new com.ibm.mm.enabler.ac.MemberModelImpl(id,this,this.um,false);this.memberModel[id]=node;if(_1278){_1278.finish(null,xhr.status);}}else{if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_1278){_1278.finish(null,xhr.status);}}}}));},_cacheNodeMembers:function(_127d,_127e){var id=_127e.getID();if(!(id in this.membersLoadedNodes[_127d])){this.membersLoadedNodes[_127d][id]=_127e;}return this.membersLoadedNodes[_127d][id];},__commit:function(_127f,sync){if((typeof com.ibm.mashups.enabler.space!="undefined")&&(typeof com.ibm.mashups.enabler.space.Factory!="undefined")&&(typeof com.ibm.mashups.enabler.space.SpaceNode!="undefined")){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(this.mainResource,com.ibm.mashups.enabler.space.SpaceNode)){var _1280=this.mainResource;var _1281=com.ibm.mashups.enabler.space.Factory.getSpaceExtensionModel();var _1282=_1281.findExtensionBySpace(_1280).start();if(_1282){var _1283=this._diffAccessControlChanges();if(_1283!==null){var _1284=_1282.onSpaceUpdate(_1280.getID(),dojo.toJson(_1283,true),null);if(_1284&&_1284.getState()!="OK"){return;}}}}}this._acquire();var id;var link;var myUrl;var _1285;var _1286;for(id in this.rolesCreatedNodes){if(Object.prototype.hasOwnProperty.call(this.rolesCreatedNodes,id)){var role=this.rolesCreatedNodes[id];var _1287=role.getRoleName();link=this._getRolesLink();if(link){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(link,this);}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_1286=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_1286);}_1285=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);this._acquire();_1285.create(role.toString(),dojo.hitch(this,function(type,data,xhr,args){var _1288=null;if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("//atom:entry",data,this.ns);if(nodes.length>0){for(var i=0,l=nodes.length;i<l;i++){_1288=new com.ibm.mm.enabler.ac.RoleNodeImpl(nodes[i],this.um);if(_1288.getRoleName()==_1287){var len=this.rolesEntries.length;var _1289=null;for(var id in this.rolesCreatedNodes){if(Object.prototype.hasOwnProperty.call(this.rolesCreatedNodes,id)){var node=this.rolesCreatedNodes[id];if(node.getRoleName()==_1288.getRoleName()){_1289=node;break;}}}this._replaceNodeRoles(_1289,_1288);break;}}}}if(_127f&&_127f.operationCallback){_127f.operationCallback(_1288,com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status,_127f.operationCallbackParameters);}this._release(_127f,xhr.status);}));}}this.rolesCreatedNodes={};for(var id3 in this.rolesDeletedNodes){if(this.rolesDeletedNodes.hasOwnProperty(id3)){var _128a=this.rolesDeletedNodes[id3];var _128b=_128a.getEditLink();myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelUrl(_128b,this);_1285=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);this._acquire();_1285.remove(dojo.hitch(this,function(type,data,xhr,args){if(_127f&&_127f.operationCallback){_127f.operationCallback(id3,com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status,_127f.operationCallbackParameters);}this._release(_127f,xhr.status);}));}}this.rolesDeletedNodes={};for(var id1 in this.rolesLoadedNodes){if(Object.prototype.hasOwnProperty.call(this.rolesLoadedNodes,id1)){var role1=this.rolesLoadedNodes[id1];var _128c=role1.getID();var _128d=role1.getRoleType();for(id in this.membersCreatedNodes[_128c]){if(Object.prototype.hasOwnProperty.call(this.membersCreatedNodes[_128c],id)){var _128e=this.membersCreatedNodes[_128c][id];link=this._getMembersLink(role1.xmlData);if(link){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(link,this);}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_1286=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_MEMBER},{value:_128d,isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_1286);}_1285=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);this._acquire();_1285.create(_128e._toEntry(),dojo.hitch(this,function(type,data,xhr,args){var _128f=null;if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var expr="//atom:entry";var _1290=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,data,this.ns);if(_1290&&_1290.length>0){for(var i=0,l=_1290.length;i<l;i++){_128f=new com.ibm.mm.enabler.ac.MemberNodeImpl(id,_1290[i],this.um);}}}if(_127f&&_127f.operationCallback){_127f.operationCallback(_128f,com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status,_127f.operationCallbackParameters);}this._release(_127f,xhr.status);}));}}this.membersCreatedNodes[_128c]={};for(var id2 in this.membersDeletedNodes[_128c]){if(Object.prototype.hasOwnProperty.call(this.membersDeletedNodes[_128c],id2)){var _1291=this.membersDeletedNodes[_128c][id2];var _1292=this.membersDeletedNodesMemberIDs[_128c][id2];var _1293=null;link=_1291.getEditLink();if(link){_1293=new com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(link,this);}else{_1293=new com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_1286=[{value:_1292,isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_MEMBER},{value:_128d,isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];_1293.setNodes(_1286);}_1285=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1293,null,null,false,sync);this._acquire();_1285.remove(dojo.hitch(this,function(type,data,xhr,args){var _1294=null;if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){_1294=id2;}if(_127f&&_127f.operationCallback){_127f.operationCallback(_1294,com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status,_127f.operationCallbackParameters);}this._release(_127f,xhr.status);}));}}this.membersDeletedNodes[_128c]={};this.membersDeletedNodesMemberIDs[_128c]={};}}},_initDelta:function(){var delta={accesscontrol:{}};var _1295,type;if(this.subResource){_1295=this.subResource.getID();type="page";if((typeof com.ibm.mashups.enabler.space!="undefined")&&(typeof com.ibm.mashups.enabler.space.SpaceNode!="undefined")){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(this.subResource,com.ibm.mashups.enabler.space.SpaceNode)){type="space";}}}else{_1295=this.mainResource.getID();type="space";}delta.accesscontrol.resourceid=_1295;delta.accesscontrol.type=type;return delta;},_diffAccessControlChanges:function(){var delta=null;var i,l;if("owner" in this.changedProperties){if(!delta){delta=this._initDelta();}var _1296=this.getOwner();if(_1296!=this.changedProperties.owner){delta.accesscontrol.owner=(typeof (_1296)=="string")?_1296:_1296.getID();}}if("roleblock" in this.changedProperties){if(!delta){delta=this._initDelta();}for(var _1297 in this.changedProperties.roleblock){if(Object.prototype.hasOwnProperty.call(this.changedProperties.roleblock,_1297)){var _1298=this.changedProperties.roleblock[_1297];var _1299=this._getRoleTypes(_1297);var _129a=(_1299.length!=_1298.length);if(!_129a){for(var i2=0,l2=_1299.length;i2<l2;i2++){if(typeof _1298[_1299[i2]]!="undefined"){_129a=true;break;}}}if(_129a){if(!delta.accesscontrol.roleblock){delta.accesscontrol.roleblock={};}delta.accesscontrol.roleblock[_1297]=_1299;}}}}if("role" in this.changedProperties){if(!delta){delta=this._initDelta();}var _129b=function(_129c,_129d,_129e){var id;var _129f=[];var index=0;if(_129c){for(id in _129c){if(Object.prototype.hasOwnProperty.call(_129c,id)){if(_129c[id]){_129f[index++]=_129c[id];}}}}if(_129d){for(id in _129d){if(Object.prototype.hasOwnProperty.call(_129d,id)){if(typeof _129c[id]=="undefined"&&_129d[id]){_129f[index++]=_129d[id];}}}}if(_129e){for(id in _129e){if(_129e[id]){var _12a0=_129e[id].getID();for(var j=0;j<_129f.length;j++){if(_129f[j].getID()==_12a0){_129f.splice(j,1);break;}}}}}return _129f;};var _12a1=function(delta,_12a2,role,_12a3,_12a4,_12a5,_12a6){var id;var _12a7=false;for(id in _12a4){if(Object.prototype.hasOwnProperty.call(_12a4,id)){_12a7=true;}}var _12a8=false;for(id in _12a6){if(Object.prototype.hasOwnProperty.call(_12a6,id)){_12a8=true;}}if(_12a3&&(_12a7||_12a8)||!_12a3){if(!delta.accesscontrol.role){delta.accesscontrol.role=[];}delta.accesscontrol.role[_12a2]={};delta.accesscontrol.role[_12a2].name=role.getRoleType();var _12a9=_129b(_12a4,_12a5,_12a6);for(var i=0,l=_12a9.length;i<l;i++){var _12aa=_12a9[i];var _12ab=_12aa.getEntity();if(_12ab){if(!delta.accesscontrol.role[_12a2].member){delta.accesscontrol.role[_12a2].member=[];}delta.accesscontrol.role[_12a2].member[i]={id:_12aa.getID(),type:_12ab.getEntityType()};}}}};var _12ac=0;var _12ad=_129b(this.rolesCreatedNodes,this.rolesLoadedNodes,this.rolesDeletedNodes);for(i=0,l=_12ad.length;i<l;i++){var role=_12ad[i];var _12ae=role.getID();var _12af=false;for(var id in this.changedProperties.role){if(Object.prototype.hasOwnProperty.call(this.changedProperties.role,id)){var _12b0=this.changedProperties.role[id];if(_12b0==_12ae){_12af=true;break;}}}_12a1(delta,_12ac,role,_12af,this.membersCreatedNodes[_12ae],this.membersLoadedNodes[_12ae],this.membersDeletedNodes[_12ae]);_12ac++;}}this.changedProperties={};return delta;},_removeNodeRoles:function(role){var id=role.getID();if(id in this.rolesLoadedNodes){delete this.rolesLoadedNodes[id];}if(id in this.rolesCreatedNodes){delete this.rolesCreatedNodes[id];}else{this.rolesDeletedNodes[id]=role;}if(this.membersCreatedNodes[id]){delete this.membersCreatedNodes[id];}},_acquire:function(){this.requestCount++;},_release:function(_12b1,_12b2){this.statusCode=Math.max(parseInt(_12b2,10),this.statusCode);this.requestCount--;if(this.requestCount<=0){if(_12b1){_12b1.finish(null,this.statusCode);}}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.AccessControlModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.AccessControlModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceAccessControlModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceAccessControlModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.ResourceAccessControlModel_API");dojo.provide("com.ibm.mashups.enabler.ac.ResourceAccessControlModel");dojo.declare("com.ibm.mashups.enabler.ac.ResourceAccessControlModel",[com.ibm.mashups.enabler.ac.AccessControlModel],{isInheritanceBlock:function(_12b3){},setInheritanceBlock:function(_12b4,value){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl");dojo.declare("com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl",[com.ibm.mashups.enabler.ac.ResourceAccessControlModel,com.ibm.mm.enabler.ac.AccessControlModelImpl],{constructor:function(_12b5){this.mainResource=_12b5;this.subResource=this.mainResource;this.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL;this.url2=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL;},_getRolesLink:function(){return this.getACRolesLink(this.mainResource.getXml());},_getMembersLink:function(_12b6){return this.getACMembersLink(_12b6);},_getResourceLink:function(){return this.getACResourceLink(this.mainResource.getXml());},isInheritanceBlock:function(_12b7){return this.isRoleBlock(_12b7,"inheritance");},setInheritanceBlock:function(_12b8,value){this.setRoleBlock(_12b8,value,"inheritance");},getOwner:function(){if(this.owner===null){if(this.xmlData===undefined){this._loadAheadResource(null,true);}var expr="atom:content/ac:resource-config/ac:owner";var owner=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(owner){var _12b9=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(owner,"ac:id","id",this.ns.ac);this.owner=this.um.find(_12b9).start();}}return this.owner;},setOwner:function(user){if(this.xmlData===undefined){this._loadAheadResource(null,true);}if(!this.changedProperties.owner){this.changedProperties.owner=this._getOwner();}this.owner=user;var expr="atom:content/ac:resource-config/ac:owner";var owner=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(owner){com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(owner,"ac:id",this.nsf.getNameSpaceUri(this.nsf.NS_AC),user.getID());}else{expr="atom:content/ac:resource-config";var _12ba=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(_12ba){var tn=com.ibm.mm.enabler.utils.Dom.createElement(this.xmlData.ownerDocument,"ac:owner",this.nsf.getNameSpaceUri(this.nsf.NS_AC));com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(tn,"ac:id",this.nsf.getNameSpaceUri(this.nsf.NS_AC),user.getID());_12ba.appendChild(tn);}}},confirmSetOwner:function(user){return this.subResource.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);},confirmGetRoleModel:function(){return this.subResource.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);},_getOwner:function(){if(this.xmlData===undefined){this._loadAheadResource(null,true);}var expr="atom:content/ac:resource-config/ac:owner";var owner=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(owner){return com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(owner,"ac:id","id",this.nsf.getNameSpaceUri(this.nsf.NS_AC));}return null;},_loadAheadResource:function(_12bb,sync){if(this.xmlData===undefined){var myUrl=null;var link=this._getResourceLink();if(link){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(link,this);}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url2,this);var _12bc=[{value:this.subResource.getID(),isID:true,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_RESOURCE}];myUrl.setNodes(_12bc);}var _12bd=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_12bd.read(dojo.hitch(this,function(type,data,xhr,args){var expr="atom:feed";var feed=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);var _12be=feed||data;expr="atom:entry";this.xmlData=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_12be,this.ns);this.initialContentsResource=com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData);if(_12bb){_12bb.finish(null,xhr.status);}}));}},isRoleBlock:function(_12bf,_12c0){if(this.xmlData===undefined){this._loadAheadResource(null,true);}if(_12bf){_12bf=_12bf.toUpperCase();_12c0=_12c0.toUpperCase();var expr="atom:content/ac:resource-config/ac:role-block";var _12c1=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.ns);if(_12c1){for(var i=0,l=_12c1.length;i<l;i++){var _12c2=_12c1[i];var block=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_12c2,"ac:block-type","block-type",this.ns.ac);var type=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_12c2,"ac:type","type",this.ns.ac);if(block&&type){if(_12bf==type.toUpperCase()){if(_12c0==block.toUpperCase()){return true;}}}}}}return false;},isPropagationBlock:function(_12c3){return this.isRoleBlock(_12c3,"propagation");},setRoleBlock:function(_12c4,value,_12c5){if(this.xmlData===undefined){this._loadAheadResource(null,true);}if(!this.changedProperties.roleblock){this.changedProperties.roleblock={};}if(!this.changedProperties.roleblock[_12c5]){this.changedProperties.roleblock[_12c5]=this._getRoleTypes(_12c5);}var expr,block;if(!value){expr="atom:content/ac:resource-config/ac:role-block";var _12c6=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.ns);if(_12c6){_12c4=_12c4.toUpperCase();_12c5=_12c5.toUpperCase();for(var i=0,l=_12c6.length;i<l;i++){var _12c7=_12c6[i];block=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_12c7,"ac:block-type","block-type",this.ns.ac);var type=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_12c7,"ac:type","type",this.ns.ac);if(block&&type){if(_12c4==type.toUpperCase()){if(_12c5==block.toUpperCase()){dojo.destroy(_12c7);return;}}}}}}else{expr="atom:content/ac:resource-config";var _12c8=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);block=com.ibm.mm.enabler.utils.Dom.createElement(this.xmlData.ownerDocument,"ac:role-block",this.ns.ac);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData.ownerDocument,block,"ac:block-type","block-type",this.ns.ac,_12c5);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData.ownerDocument,block,"ac:type","type",this.ns.ac,_12c4);_12c8.appendChild(block);}},_getRoleTypes:function(_12c9){if(this.xmlData===undefined){this._loadAheadResource(null,true);}var _12ca=[];var expr="atom:content/ac:resource-config/ac:role-block[@ac:block-type='"+_12c9+"']";var _12cb=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.ns);for(var i=0,l=_12cb.length;i<l;i++){_12ca[i]=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_12cb[i],"ac:type","type",this.ns.ac);}return _12ca;},setPropagationBlock:function(_12cc,value){this.setRoleBlock(_12cc,value,"propagation");},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit);},_commit:function(_12cd,sync){if(this.initialContentsResource&&this.initialContentsResource!==com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData)){this.statusCode=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK;this.requestCount=0;this._acquire();var myUrl=new com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url2,this);var _12ce=[{value:this.subResource.getID(),isID:true,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_RESOURCE}];myUrl.setNodes(_12ce);var _12cf=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,true);this._acquire();_12cf.update(com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData),dojo.hitch(this,function(type,data,xhr,args){this.initialContentsResource=com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData);if(_12cd&&_12cd.operationCallback){_12cd.operationCallback(this,com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,_12cd.operationCallbackParameters);}this._release(_12cd,xhr.status);}));}this.__commit(_12cd,sync);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceAccessControlModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceAccessControlModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.ResourceAccessControlModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.SpaceAccessControlModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.SpaceAccessControlModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.SpaceAccessControlModel_API");dojo.provide("com.ibm.mashups.enabler.ac.SpaceAccessControlModel");dojo.declare("com.ibm.mashups.enabler.ac.SpaceAccessControlModel",com.ibm.mashups.enabler.ac.AccessControlModel,{getOwnerDeferred:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.SpaceAccessControlModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.SpaceAccessControlModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.SpaceAccessControlModelImpl");dojo.declare("com.ibm.mm.enabler.ac.SpaceAccessControlModelImpl",[com.ibm.mashups.enabler.ac.SpaceAccessControlModel,com.ibm.mm.enabler.ac.AccessControlModelImpl],{constructor:function(_12d0){this.mainResource=_12d0;this.xmlData=this.mainResource.getXml();this.initialContentsResource=null;this.xmlDataResources=null;this._init();},_filterRole:function(node){return (node.getRoleName().indexOf("@")>0);},_getRolesLink:function(){return this.getCARolesLink(this.mainResource.getXml());},_getMembersLink:function(_12d1){return this.getACMembersLink(_12d1);},getOwner:function(){return this.mainResource.getOwner();},getOwnerDeferred:function(){return this.mainResource.getOwnerDeferred();},setOwner:function(user){this.mainResource.setOwner(user);},confirmSetOwner:function(user){return this.mainResource.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit);},_commit:function(_12d2,sync){var e=com.ibm.mashups.enabler;if((typeof e.space!="undefined")&&(typeof e.space.Factory!="undefined")){var _12d3=e.space.Factory.getSpaceModel();_12d3.commit().start();}this.__commit(_12d2,sync);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.SpaceAccessControlModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.SpaceAccessControlModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.SpaceAccessControlModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel_API");dojo.provide("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel");dojo.declare("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel",com.ibm.mashups.enabler.ac.SpaceAccessControlModel,{});}if(!dojo._hasResource["com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl");dojo.declare("com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl",[com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel,com.ibm.mm.enabler.ac.ResourceAccessControlModelImpl],{_metaPrefix:"com.ibm.mashups.acl.role.",constructor:function(_12d4,_12d5){this.mainResource=_12d4;this.subResource=_12d5;this.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AI_URL;this.url2=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL;},_getRolesLink:function(){return this.getACRolesLink(this.mainResource.getXml());},_getResourceLink:function(){return this.getACResourceLink(this.subResource.getXml());},_getCreationRoleName:function(_12d6){return _12d6+"@"+this.subResource.getID();},_getCreationResourceID:function(){return this.subResource.getID();},_isPageInSpace:function(){return true;},_getPossibleRoles:function(){var roles={};var names=this.subResource.getMetaDataNames();for(var i=0,l=names.length;i<l;i++){var l2=this._metaPrefix.length;if(names[i].indexOf(this._metaPrefix)===0){var _12d7=names[i].substring(l2);var _12d8=this.subResource.getMetaData(names[i]);roles[_12d7]=_12d8;}}return roles;},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit);},_commit:function(_12d9,sync){com.ibm.mm.enabler.utils.Misc.forIn(this.rolesCreatedNodes,function(role){this.subResource.setMetaData(this._metaPrefix+role.getRoleType(),role.getRoleName());},this);com.ibm.mashups.enabler.navigation.Factory.getNavigationModel().commit().start(true);this.inherited(arguments);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel"]){dojo._hasResource["com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel"]=true;dojo.provide("com.ibm.mashups.enabler.ac.ResourceSpaceAccessControlModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutNode_API"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutNode_API"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutNode_API");dojo.provide("com.ibm.mashups.enabler.layout.LayoutNode");dojo.declare("com.ibm.mashups.enabler.layout.LayoutNode",[com.ibm.mashups.enabler.Transformable,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.Identifiable],{getLayoutNodeType:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.layout.LayoutNode.getLayoutNodeType");}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutNodeImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutNodeImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutNodeImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutNodeImpl",[com.ibm.mashups.enabler.layout.LayoutNode,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.TransformableImpl,com.ibm.mm.enabler.MetaDataImpl2,com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl,com.ibm.mm.enabler.ac.EffectiveAccessImpl],{constructor:function(node,_12da){this.setXml(node,true);this.layoutModel=_12da;},_getLayoutModel:function(){return this.layoutModel;},getLayoutNodeType:function(){return this._type;},toString:function(){return com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutNode"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutNode"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutNode");}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutContainer_API"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutContainer_API"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutContainer_API");dojo.provide("com.ibm.mashups.enabler.layout.LayoutContainer");dojo.declare("com.ibm.mashups.enabler.layout.LayoutContainer",[com.ibm.mashups.enabler.layout.LayoutNode,com.ibm.mashups.enabler.content.RuntimeContentProvider],{});}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredSetImpl"]){dojo._hasResource["com.ibm.mm.enabler.DeferredSetImpl"]=true;dojo.provide("com.ibm.mm.enabler.DeferredSetImpl");dojo.declare("com.ibm.mm.enabler.DeferredSetImpl",com.ibm.mm.enabler.DeferredImpl,{_deferreds:null,_returns:null,_started:false,_status:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,constructor:function(){this._deferreds=new dojox.collections.ArrayList();this._returns=new dojox.collections.ArrayList();},addDeferred:function(_12db){if(this._started){throw new Error();}var _12dc=_12db.getFinishedCallback();var _12dd=_12db.getFinishedCallbackParameters();_12db.setFinishedCallback(dojo.hitch(this,"_return"),{adtlCallback:_12dc,adtlParameters:_12dd,deferred:_12db});this._deferreds.add(_12db);},_return:function(_12de,_12df,args){var _12e0=args.adtlCallback;var _12e1=args.adtlParameters;var _12e2=args.deferred;if(_12e0){_12e0(_12de,_12df,_12e1);}this._status=Math.max(this._status,_12df);this._returns.add({deferred:_12e2,result:_12de,status:_12df});if(this._deferreds.count==this._returns.count){this._finish();}},_finish:function(){var _12e3=this.getFinishedCallback();if(_12e3){_12e3(this._returns,this._status,this.getFinishedCallbackParameters());}},start:function(sync){if(!this._started){this._started=true;this.inherited(arguments);sync=(sync||typeof (sync)=="undefined");if(this._deferreds.count>0){this._deferreds.forEach(function(_12e4){_12e4.start(sync);},this);}else{this._finish();}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredSet"]){dojo._hasResource["com.ibm.mm.enabler.DeferredSet"]=true;dojo.provide("com.ibm.mm.enabler.DeferredSet");dojo.declare("com.ibm.mm.enabler.DeferredSet",com.ibm.mm.enabler.DeferredSetImpl,{});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutContainerImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutContainerImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutContainerImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutContainerImpl",[com.ibm.mashups.enabler.layout.LayoutContainer,com.ibm.mm.enabler.layout.LayoutNodeImpl,com.ibm.mashups.enabler.content.RuntimeContentProvider],{constructor:function(){this._type=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTAINER;},_getContent:function(){return this._getLayoutModel()._getNavigationNode().getContent().start(true);},_templates:{baseMarkup:dojo.string.trim(dojo.cache("com.ibm.mm.enabler.layout","templates/LayoutContainerFragment.html","<div class=\"component-container ${containerClass} id-${containerId}\" name=\"${containerName}\">\n ${childrenMarkup}\n</div>\n"))},getRuntimeContent:function(){return new com.ibm.mm.enabler.content.RuntimeContentImpl(this,this._getRuntimeMarkup);},_templateFunc:function(_12e5,sync,_12e6){var ret=null;var _12e7=this.getMetaData("css-classes");var cName=this.getMetaData("com.ibm.portal.layoutnode.localname");ret=dojo.string.substitute(this._templates.baseMarkup,{containerClass:_12e7||"",containerId:com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this),containerName:cName||"",childrenMarkup:_12e6||""});if(_12e5){_12e5.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return ret;},_getRuntimeMarkup:function(_12e8,sync){var chain=new com.ibm.mm.enabler.DeferredSet();if(this._getLayoutModel().hasChildren(this)){var _12e9=this._getLayoutModel().getChildren(this);while(_12e9.hasNext()){var child=_12e9.next();var _12ea=child.getRuntimeContent().getRuntimeMarkup();chain.addDeferred(_12ea);}}var ret=null;chain.setFinishedCallback(dojo.hitch(this,function(_12eb,_12ec,args){var _12ed=args.origDf;if(_12ec==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var _12ee=[];_12eb.forEach(function(item,idx,arr){this.push(item.result);},_12ee);ret=this._templateFunc(_12ed,sync,_12ee.join("\n"));}else{if(_12ed){_12ed.finish(null,_12ec);}}return ret;}),{origDf:_12e8});chain.start(sync);return ret;},getLayoutNodeType:function(){return this._type;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutContainer"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutContainer"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutContainer");}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl_API"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl_API"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutControl_API");dojo.provide("com.ibm.mashups.enabler.layout.LayoutControl");dojo.declare("com.ibm.mashups.enabler.layout.LayoutControl",[com.ibm.mashups.enabler.layout.LayoutNode,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.content.RuntimeContentProvider],{getSkin:function(){throw new Error("Unimplemented API: com.ibm.mashups.enabler.layout.LayoutControl.getSkin");},setSkin:function(id){throw new Error("Unimplemented API: com.ibm.mashups.enabler.layout.LayoutControl.setSkin");},getWidgetBody:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl",[com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mm.enabler.ac.EffectiveAccessImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _12ef=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.li_ns=dojo.delegate(_12ef.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML]));this.enforcementHelper=com.ibm.mm.enabler.utils.APIEnforcementHelper;this.BASE_NLS_TITLE_STRING="base:nls-string";this.BASE_NLS_DESCRIPTION_STRING="base:nls-string";this.BASE_NS=this.li_ns.base;this.TITLE_ELEMENT="atom:content/*/model:title";this.TITLE=this.TITLE_ELEMENT+"/"+this.BASE_NLS_TITLE_STRING;this.DESCRIPTION_ELEMENT="atom:content/*/model:description";this.DESCRIPTION=this.DESCRIPTION_ELEMENT+"/"+this.BASE_NLS_DESCRIPTION_STRING;},_normalizeLocale:function(loc){return (dojo.isString(loc)&&loc.length>0)?loc.replace(/_/g,"-").toLowerCase():null;},getLocales:function(){this._readLocales();var _12f0=[];com.ibm.mm.enabler.utils.Misc.forIn(this._cache.titles,function(title,loc){_12f0.push(loc);});return _12f0;},getTitle:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"getTitle(locale)"]);this._readLocales();var title=this._cache.titles[this._normalizeLocale(loc)];return (typeof title=="undefined")?null:title;},getTitles:function(loc){this._readLocales();var _12f1={};if(loc){var nLoc=this._normalizeLocale(loc);com.ibm.mm.enabler.utils.Misc.forIn(this._cache.titles,function(title,l){if(l.indexOf(nLoc)===0){_12f1[l]=title;}});}else{_12f1=dojo.clone(this._cache.titles);}return _12f1;},getDescription:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"getDescription(locale)"]);this._readLocales();var _12f2=this._cache.descriptions[this._normalizeLocale(loc)];return (typeof _12f2=="undefined")?null:_12f2;},getDescriptions:function(loc){this._readLocales();var _12f3={};if(loc){var nLoc=this._normalizeLocale(loc);com.ibm.mm.enabler.utils.Misc.forIn(this._cache.descriptions,function(_12f4,l){if(l.indexOf(nLoc)===0){_12f3[l]=_12f4;}});}else{_12f3=dojo.clone(this._cache.descriptions);}return _12f3;},_getLang:function(node){return com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"xml:lang","lang",this.li_ns.xml);},_readLocales:function(){if(!this._cache){this._cache={titles:{},descriptions:{}};var _12f5=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_12f5){for(var i=_12f5.length;i>0;i--){var title=_12f5[i-1];this._cache.titles[this._normalizeLocale(this._getLang(title))]=com.ibm.mm.enabler.utils.Dom.textContent(title);}}var _12f6=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_12f6){for(var j=_12f6.length;j>0;j--){var _12f7=_12f6[j-1];this._cache.descriptions[this._normalizeLocale(this._getLang(_12f7))]=com.ibm.mm.enabler.utils.Dom.textContent(_12f7);}}}},setTitle:function(title,loc){this.enforcementHelper.enforceDefinedNotNull(title,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["title",this.declaredClass,"setTitle(title, locale)"]);this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"setTitle(title, locale)"]);if(dojo.isString(title)&&loc){if(this.getTitle(loc)==title){return;}var _12f8=com.ibm.mashups.enabler.xml.XPath.createXPath(this.TITLE_ELEMENT,this.xmlData,this.li_ns);var _12f9=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_NLS_TITLE_STRING,_12f8,this.li_ns);var nLoc=this._normalizeLocale(loc);var _12fa=false;var i=_12f9.length;while(--i>=0){var t=_12f9[i];var lang=this._getLang(t);if(lang!==null&&this._normalizeLocale(lang)==nLoc){com.ibm.mm.enabler.utils.Dom.textContent(t,title);_12fa=true;break;}}if(!_12fa){var _12fb=this.xmlData.ownerDocument;var node=com.ibm.mm.enabler.utils.Dom.createElement(_12fb,this.BASE_NLS_TITLE_STRING,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_12fb,node,"xml:lang","lang",this.li_ns.xml,loc);com.ibm.mm.enabler.utils.Dom.textContent(node,title);_12f8.appendChild(node);}this._cache.titles[nLoc]=title;this._setDirty();}},confirmSetTitle:function(title,_12fc){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},removeTitle:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"removeTitle(locale)"]);if(loc){var _12fd=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_12fd&&_12fd.length>0){var nLoc=this._normalizeLocale(loc);for(var i=_12fd.length;i>0;i--){var title=_12fd[i-1];var lang=this._getLang(title);if(lang!==null&&this._normalizeLocale(lang)==nLoc){dojo.destroy(title);break;}}delete this._cache.titles[nLoc];this._setDirty();}}},confirmRemoveTitle:function(loc){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},removeTitles:function(){var _12fe=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_12fe&&_12fe.length>0){for(var i=_12fe.length;i>0;i--){var _12ff=_12fe[i-1].parentNode;_12ff.removeChild(_12fe[i-1]);}this._cache.titles={};this._setDirty();}},confirmRemoveTitles:function(){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},setDescription:function(_1300,loc){this.enforcementHelper.enforceDefinedNotNull(_1300,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["description",this.declaredClass,"setDescription(description, locale)"]);this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"setDescription(description, locale)"]);if(dojo.isString(_1300)&&loc){if(this.getDescription(loc)==_1300){return;}var _1301=com.ibm.mashups.enabler.xml.XPath.createXPath(this.DESCRIPTION_ELEMENT,this.xmlData,this.li_ns);var _1302=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_NLS_DESCRIPTION_STRING,_1301,this.li_ns);var nLoc=this._normalizeLocale(loc);var _1303=false;var i=_1302.length;while(--i>=0){var desc=_1302[i];var lang=this._getLang(desc);if(lang!==null&&this._normalizeLocale(lang)==nLoc){com.ibm.mm.enabler.utils.Dom.textContent(desc,_1300);_1303=true;break;}}if(!_1303){var _1304=this.xmlData.ownerDocument;var node=com.ibm.mm.enabler.utils.Dom.createElement(_1304,this.BASE_NLS_DESCRIPTION_STRING,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_1304,node,"xml:lang","lang",this.li_ns.xml,loc);com.ibm.mm.enabler.utils.Dom.textContent(node,_1300);_1301.appendChild(node);}this._cache.descriptions[nLoc]=_1300;this._setDirty();}},confirmSetDescription:function(title,_1305){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},removeDescription:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"removeDescription(locale)"]);if(loc){var _1306=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_1306&&_1306.length>0){var _1307=this._normalizeLocale(loc);for(var i=_1306.length;i>0;i--){var desc=_1306[i-1];var lang=this._getLang(desc);if(lang!==null&&this._normalizeLocale(lang)==_1307){dojo.destroy(desc);break;}}delete this._cache.descriptions[this._normalizeLocale(loc)];this._setDirty();}}},confirmRemoveDescription:function(loc){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},removeDescriptions:function(){var _1308=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_1308&&_1308.length>0){for(var i=_1308.length;i>0;i--){dojo.destroy(_1308[i-1]);}this._cache.descriptions={};this._setDirty();}},confirmRemoveDescriptions:function(){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.SkinIdentifiable"]){dojo._hasResource["com.ibm.mm.enabler.layout.SkinIdentifiable"]=true;dojo.provide("com.ibm.mm.enabler.layout.SkinIdentifiable");dojo.declare("com.ibm.mm.enabler.layout.SkinIdentifiable",com.ibm.mm.enabler.IdentifierImpl,{});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutControlImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutControlImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutControlImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutControlImpl",[com.ibm.mashups.enabler.layout.LayoutControl,com.ibm.mm.enabler.layout.LayoutNodeImpl,com.ibm.mashups.enabler.content.RuntimeContentProvider,com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl],{_skins:new dojox.collections.Dictionary(),configService:null,_cachedSkinData:{},_templates:{widgetFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/WidgetFragment.html","<div class=\"${css.iwWidget}\" id=\"${instanceID}\" sandbox=\"${sandboxEnabled}\">\n <a class=\"${css.iwDefinition}\" href=\"${widgetDefinitionURI}\"></a>\n ${eventDescriptions}\n ${events}\n ${itemSets}\n ${receivedEvents}\n</div>\n"),valueFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ValueFragment.html","<span class=\"${css.iwValue}\" lang=\"${loc}\">${val}</span>\n"),eventDescFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/EventDescriptionFragment.html"," <span class=\"${css.iwEventDescription}\" title=\"${eventDescName}\">\n <span class=\"${css.iwPayloadType}\">${payloadType}</span>\n <span class=\"${css.iwDescription}\">\n ${descriptions}\n </span>\n <span class=\"${css.iwTitle}\">\n ${titles}\n </span>\n </span>\n"),mappedNameFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/MappedNameFragment.html","<span class=\"${name}\">${value}</span>\n"),eventFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/EventFragment.html","<span class=\"${css.iwEvent} ${additionalClasses}\" title=\"${eventName}\">\n <a class=\"${css.iwDescRef}\" href=\"#${eventDescName}\"></a>\n ${mappedName}\n</span>\n"),itemSetFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ItemSetFragment.html","<span class=\"${css.iwItemSet}\" title=\"${setName}\">\n ${items}\n</span>\n"),receivedEventFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ReceivedEventFragment.html","<span class=\"${css.iwReceivedEvent}\">\n <a class=\"${css.iwSourceEvent}\" href=\"#${sourceWidgetID}\">${sourceEventName}</a>\n <span class=\"${css.iwTargetEvent}\">${targetEventName}</span>\n</span>\n"),itemSetItemFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ItemSetItemFragment.html","<a class=\"${css.iwItem}${readOnly}\" href=\"#${itemName}\">${itemValue}</a>\n"),gadgetFragment:dojo.cache("com.ibm.mm.enabler.layout.gadget","templates/GadgetFragment.html","<div class=\"${css.iwOSGadget}\" id=\"${instanceID}\" style=\"overflow: auto; position: relative; width: 100%; height: 100%;\">\n <a class=\"${css.iwDefinition}\" href=\"${gadgetDefinitionURI}\"></a>\n ${itemSets}\n</div>\n"),baseMarkup:dojo.string.trim(dojo.cache("com.ibm.mm.enabler.layout","templates/LayoutControlFragment.html","<div class=\"component-control id-${controlId}\" style=\"${cssStyle}\">\n ${skinMarkup}\n</div>\n"))},constructor:function(){var _1309=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.ns=dojo.delegate(_1309.namespaces,com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaces([com.ibm.mm.enabler.model.NameSpaceFactory.NS_ATOM]));this.id_prefix=_1309.idprefix;this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this._type=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL;this._displayTitle=null;},_getDisplayTitle:function(){return this._displayTitle;},_setDisplayTitle:function(_130a){this._displayTitle=_130a;},_getWidgetFragment:function(_130b,_130c,_130d,_130e,_130f,_1310,_1311){return dojo.string.substitute(this._templates.widgetFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,instanceID:com.ibm.mm.iwidget.Utils.getMarkupID(_130b.getID()),sandboxEnabled:!!_130d,widgetDefinitionURI:_130c||"",eventDescriptions:_130e||"",events:_130f||"",itemSets:_1310||"",receivedEvents:_1311||""});},_getValueFragment:function(_1312,value){var ret=dojo.string.substitute(this._templates.valueFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,loc:_1312||"",val:value||""});return ret;},_getEventDescriptionFragment:function(_1313,_1314,_1315,_1316){return dojo.string.substitute(this._templates.eventDescFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,eventDescName:_1313||"",payloadType:_1314||"",descriptions:_1315||"",titles:_1316||""});},_eventDescSuffix:"_desc",_getEventDescriptions:function(_1317){var _1318={};return dojo.map(_1317.getEvents(_1318)||[],function(event){var _1319=[];var _131a=[];dojo.forEach(event.getLocales()||[],function(_131b){_1319.push(this._getValueFragment(_131b,event.getTitle(_131b)));_131a.push(this._getValueFragment(_131b,event.getDescription(_131b)));},this);return this._getEventDescriptionFragment(event.getName()+this._eventDescSuffix,event.getPayloadType(),_131a.join("\n"),_1319.join("\n"));},this);},_getMappedNameFragment:function(_131c){var ret="";dojo.forEach(_131c,function(item,idx,arr){var temp=dojo.string.substitute(this._templates.mappedNameFragment,{name:item.name,value:item.value});ret=ret+temp;},this);return ret;},_getEventFragment:function(event,_131d){var _131e=[];var _131f=[];if(event.isPublished()){_131f.push(com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwPublished);}if(event.isHandled()){_131f.push(com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwHandled);}if(_131d){var _1320=_131d.getPublicEvent(event.getName());if(_1320){if(_1320.handlingFn){if(!dojo.isFunction(_1320.handlingFn)){_131e.push({name:"iw-Handler",value:_1320.handlingFn});}}if(_1320.getOnRemoveWire()){_131e.push({name:"iw-Remove-Wire",value:_1320.getOnRemoveWire()});}if(_1320.getOnNewWire()){_131e.push({name:"iw-New-Wire",value:_1320.getOnNewWire()});}}}var _1321=event.getName();return dojo.string.substitute(this._templates.eventFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,additionalClasses:_131f.join(" "),eventName:_1321,eventDescName:_1321+this._eventDescSuffix,mappedName:this._getMappedNameFragment(_131e)||""});},_getEvents:function(_1322,_1323){var _1324={};return dojo.map(_1322.getEvents(_1324)||[],function(item){return this._getEventFragment(item,_1323);},this);},_getReceivedEventFragment:function(wire){return dojo.string.substitute(this._templates.receivedEventFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,sourceWidgetID:wire.getSourceWidget().getID(),sourceEventName:wire.getSourceEventName(),targetEventName:wire.getTargetEventName()});},_getReceivedEvents:function(_1325){return dojo.map(this._getLayoutModel().getWireModel().findByTargetWidget(_1325).start(),function(wire){return this._getReceivedEventFragment(wire);},this);},_getItemSetItemFragment:function(name,_1326,_1327){return dojo.string.substitute(this._templates.itemSetItemFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,readOnly:_1327?" "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwReadOnly:"",itemName:name||"",itemValue:(dojo.isArray(_1326)&&_1326.length===1)?dojox.html.entities.encode(_1326[0]):dojo.toJson(_1326)||""});},_getItemSetFragment:function(_1328){var items=dojo.map(_1328.getNames()||[],function(name){return this._getItemSetItemFragment(name,_1328.getValues(name),_1328.isReadOnly(name));},this);return dojo.string.substitute(this._templates.itemSetFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,setName:"attributes",items:items.join("\n")});},getWidgetBody:function(){return this._getWidgetBody();},_getWidgetBody:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_1329,sync){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _132a=wm.getWidgetWindow(this);_132a.setFinishedCallback(dojo.hitch(this,function(_132b,_132c,args){var _132d=args.deferred;var sync=args.sync;var wm=args.wm;var ret=null;if(_132c==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK&&_132b){var _132e=new com.ibm.mm.enabler.DeferredSetImpl();_132e.addDeferred(wm.getHierarchicalPreferences(_132b));_132e.setFinishedCallback(dojo.hitch(this,function(_132f,_1330,args){var _1331=args.deferred;var _1332=args.wWindow;var wm=args.wm;var ret=null;if(_1330==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var prefs=_132f.item(0).result;var _1333=wm.getWidgetInstance(_1332).start(true);var _1334=_1333;var _1335=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _1336=_1335.find(_1332.getID());var _1337=this._getEventDescriptions(_1334);var _1338=this._getEvents(_1334,_1336);var _1339=this._getItemSetFragment(prefs);var _133a=this._getReceivedEvents(_1332);var _133b=wm.getWidgetDefinitionByWindow(_1332).start(true);ret=this._getWidgetFragment(_1332,_133b.getURL(),_133b._isSandboxed()||_1333.isSandboxed(),_1337.join("\n"),_1338.join("\n"),_1339,_133a.join("\n"));}if(_1331){_1331.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}),{deferred:_132d,wWindow:_132b,wm:wm});ret=_132e.start(sync);}else{if(_132d){_132d.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}return ret;}),{deferred:_1329,sync:sync,wm:wm});var ret=_132a.start(sync);return ret;});},_getOpenSocialGadgetBody:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_133c,sync){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _133d=wm.getWidgetWindow(this);_133d.setFinishedCallback(dojo.hitch(this,function(_133e,_133f,args){var _1340=args.deferred;var sync=args.sync;var wm=args.wm;var ret=null;com.ibm.mm.enabler.opensocial.OpenSocial.removeGadgetInstance(_133e.getID());if(_133f==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK&&_133e){var _1341=new com.ibm.mm.enabler.DeferredSetImpl();_1341.addDeferred(wm.getHierarchicalPreferences(_133e));_1341.setFinishedCallback(dojo.hitch(this,function(_1342,_1343,args){var _1344=args.deferred;var _1345=args.wWindow;var wm=args.wm;var ret=null;if(_1343==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var prefs=_1342.item(0).result;var _1346=this._getItemSetFragment(prefs);var _1347=wm.getWidgetInstance(_1345).start(true);var _1348=wm.getWidgetDefinitionByWindow(_1345).start(true);ret=this._getGadgetFragment(_1345,_1348.getURL(),_1346);}if(_1344){_1344.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}),{deferred:_1340,wWindow:_133e,wm:wm});ret=_1341.start(sync);}else{if(_1340){_1340.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}return ret;}),{deferred:_133c,sync:sync,wm:wm});var ret=_133d.start(sync);return ret;});},_getGadgetFragment:function(_1349,_134a,_134b){return dojo.string.substitute(this._templates.gadgetFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,instanceID:com.ibm.mm.iwidget.Utils.getMarkupID(_1349.getID()),gadgetDefinitionURI:_134a||"",itemSets:_134b||""});},_getGenericWidgetURI:function(){return this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NON_PREVIEWABLE_WIDGET_LOCATION)||dojo.moduleUrl("com.ibm.mm.enabler.layout.widget","NonPreviewableContentWidget.xml").toString();},_getGenericWidgetBody:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_134c,sync){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _134d=wm.getWidgetWindow(this);_134d.setFinishedCallback(dojo.hitch(this,function(_134e,_134f,args){var _1350=args.deferred;var sync=args.sync;var ret=null;if(_134f==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK&&_134e){ret=this._getWidgetFragment(_134e,this._getGenericWidgetURI());}if(_1350){_1350.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}),{deferred:_134c,sync:sync});var ret=_134d.start(sync);return ret;});},replaceControl:function(_1351,_1352){return _1351.replace(com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_CONTROL,_1352);},replaceTitle:function(_1353,title){return _1353.replace(com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_TITLE,title);},_templateFunc:function(_1354,sync,_1355){var _1356=false;var _1357=false;if(_1354.context){var _1358=null;var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1359=wm.getWidgetWindow(_1354.context).start();_1358=wm.getWidgetDefinitionByWindow(_1359).start(true);if(_1358&&dojo.isFunction(_1358.getType)&&_1358.getType()){_1356=(_1358.getType()==com.ibm.mm.iwidget.Constants.OSGADGET_DEFINITION_TYPE);}if(com.ibm.mashups.enabler.services.IdentificationService.isServerID(_1359.getID())){_1357=true;}}var def;if(dojo.isString(_1355)&&!this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NON_PREVIEWABLE_WIDGET_LOCATION)&&!_1356){def=this._getWidgetBody();}else{if(_1356&&_1357){def=this._getOpenSocialGadgetBody();}else{def=this._getGenericWidgetBody();}}def.setFinishedCallback(dojo.hitch(this,function(_135a,_135b,args){var _135c=args.skinData;var _135d=args.deferred;var ret=null;if(dojo.isString(_135c)&&!this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NON_PREVIEWABLE_WIDGET_LOCATION)){_135c=this.replaceControl(_135c,_135a);var _135e=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();var title=_135e.getTitle(this);if((title===null)||(typeof title=="undefined")){if(_1358!==null){title=_135e.getTitle(_1358);}if((title===null)||(typeof title=="undefined")){title="";}}_135c=this.replaceTitle(_135c,title);}else{_135c=_135a;}ret=dojo.string.substitute(this._templates.baseMarkup,{controlId:com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this),cssStyle:this.getMetaData("css-style")||"",skinMarkup:_135c});if(_135d){_135d.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return ret;}),{deferred:_1354,skinData:_1355});return def;},getRuntimeContent:function(){return new com.ibm.mm.enabler.content.RuntimeContentImpl(this,function(_135f,sync){var self=this;var skin=this.getSkin();var _1360=null;if(skin){var _1361=com.ibm.mashups.enabler.model.staticSkin.Factory.getStaticSkinModel();var rawID=this.getSkin()._getRawID();var _1362=rawID.substring(1+rawID.lastIndexOf(":"));var _1363=_1361.find(skin,_1362);_1363.setFinishedCallback(function(_1364,_1365,_1366){var ret=null;var _1367=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD;var _1368=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;if(_1365==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var _1369=_1364._getMediaURL();if(_1369){if(_1369 in self._cachedSkinData){if(_1367 in self._cachedSkinData[_1369]){ret=self._templateFunc(_1366,sync,self._cachedSkinData[_1369][_1367]).start(sync);}else{if(_1366){_1366.finish(null,_1368);}}}else{var req=new com.ibm.mm.enabler.services.ModelRestServiceRequest(new com.ibm.mm.enabler.utils.HttpUrl(_1369),null,null,true,sync);req.read(function(_136a,_136b,xhr,_136c){self._cachedSkinData[_1369]={};self._cachedSkinData[_1369][_136a]=_136b;if(_136a==_1367){ret=self._templateFunc(_136c,sync,_136b).start(sync);}else{if(_136c){_136c.finish(null,_1368);}}},_1366);}}else{ret=self._templateFunc(_1366,sync,null).start(sync);}}else{if(_1366){_1366.finish(null,_1368);}}return ret;},_135f);_1360=_1363.start(sync);}else{_1360=this._templateFunc(_135f,sync,null).start(sync);}return _1360;});},setMetaData:function(name,value){var _136d=this.inherited(arguments);dojo.publish(com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_SET,[this,name,_136d,value]);this._setDirty();return _136d;},removeMetaData:function(name){var _136e=this.inherited(arguments);dojo.publish(com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_REMOVE,[this,name,_136e,null]);this._setDirty();return _136e;},getSkin:function(){var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.layout.LayoutControlImpl.XPATH_SKIN_ELEMENT,this.getXml(),this.ns);if(node){var id=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"ext:uri","uri",this.ns.ext);var skin=new com.ibm.mm.enabler.layout.SkinIdentifiable(id);if(this._skins.containsKey(skin.getID())){return this._skins.item(skin.getID());}else{this._skins.add(skin.getID(),skin);return skin;}}return null;},setSkin:function(id){if(this.layoutModel._isEmpty(id)){throw new Error(this.layoutModel.modelMessages.E_PARAM_ISNULL_0);}var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.layout.LayoutControlImpl.XPATH_SKIN_ELEMENT,this.getXml(),this.ns);var _136f;if(!node){node=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);node.setAttribute("rel","related");node.setAttribute("type","application/atom+xml");com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.getXml().ownerDocument,node,"ext:rel","rel",this.ns.ext,"skin");this.getXml().appendChild(node);}else{_136f=this.getSkin().getID();}var newId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);if(newId!=_136f){var _1370=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.THEME_URL,this.layoutModel);_1370.setNodes([{value:newId,isID:true},{value:this.layoutModel._getNavigationNode().getThemeIdentifier().getID(),isID:true}]);node.setAttribute("href",_1370.getAbsoluteURL());com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.getXml().ownerDocument,node,"ext:uri","uri",this.ns.ext,_1370.getModelURI());this._setDirty();if(this._skins.containsKey(_136f)){var it=this._skins.item(_136f);this._skins.remove(_136f);it.setID(_1370.getModelURI());this._skins.add(newId,it);}dojo.publish(com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_SKIN_SET,[this,null,_136f||null,newId]);}},_getWidgetWindowURI:function(){var uri=com.ibm.mashups.enabler.xml.XPath.evaluateString("atom:link[@ext:rel='portlet']/@ext:uri",this.getXml(),this.ns);return uri?dojo.string.trim(uri):null;},_getWidgetDefinitionURL:function(){var xp2="atom:content/model:layout-control/@creation-context:widget-definition-url";return com.ibm.mashups.enabler.xml.XPath.evaluateString(xp2,this.getXml(),this.ns);},_getContext:function(){var _1371={};var xp1="atom:content/model:layout-control/@creation-context:portlet-definition";var id=com.ibm.mashups.enabler.xml.XPath.evaluateString(xp1,this.getXml(),this.ns);if(id){_1371[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_ID]=new com.ibm.mm.enabler.IdentifierImpl(id);_1371[com.ibm.mashups.enabler.layout.Constants.CONTEXT_TYPE]=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL;return _1371;}var url=this._getWidgetDefinitionURL();if(url){_1371[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_URL]=url;_1371[com.ibm.mashups.enabler.layout.Constants.CONTEXT_TYPE]=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL;return _1371;}return null;}});com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_BASE="/"+"com.ibm.mashups.enabler.model.LayoutControl".replace(/\./ig,"/")+"/";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_SKIN_BASE=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_BASE+"skin/";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_SKIN_SET=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_SKIN_SET+"set";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_BASE=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_BASE+"meta/";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_SET=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_BASE+"set";com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_REMOVE=com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_BASE+"remove";com.ibm.mm.enabler.layout.LayoutControlImpl.XPATH_SKIN_ELEMENT="atom:link[@ext:rel = 'skin' and @rel = 'related']";com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_START="<\\s*a\\s+rel\\s*=\\s*(\"|')dynamic-content(\"|')\\s+href\\s*=\\s*(\"|')";com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_END="(\"|')\\s*>.*?<\\s*/\\s*a\\s*>";com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_CONTROL=new RegExp(com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_START+"lm:control"+com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_END,"i");com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_TITLE=new RegExp(com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_START+"lm:title"+com.ibm.mm.enabler.layout.LayoutControlImpl._REGEX_END,"i");}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutControl"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutControl");}if(!dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutFragment"]){dojo._hasResource["com.ibm.mashups.enabler.layout.LayoutFragment"]=true;dojo.provide("com.ibm.mashups.enabler.layout.LayoutFragment");dojo.declare("com.ibm.mashups.enabler.layout.LayoutFragment",[com.ibm.mashups.enabler.layout.LayoutNode],{getFragment:function(){},setFragment:function(_1372){},confirmSetFragment:function(_1373){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.Wire_API"]){dojo._hasResource["com.ibm.mashups.enabler.wire.Wire_API"]=true;dojo.provide("com.ibm.mashups.enabler.wire.Wire_API");dojo.provide("com.ibm.mashups.enabler.wire.Wire");dojo.declare("com.ibm.mashups.enabler.wire.Wire",[com.ibm.mashups.enabler.Identifiable],{getSourceWidget:function(){},getSourceEvent:function(){},getSourceEventName:function(){},getSourcePage:function(){},getTargetWidget:function(){},getTargetEvent:function(){},getTargetEventName:function(){},getTargetPage:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.wire.WireImpl"]){dojo._hasResource["com.ibm.mm.enabler.wire.WireImpl"]=true;dojo.provide("com.ibm.mm.enabler.wire.WireImpl");dojo.declare("com.ibm.mm.enabler.wire.WireImpl",[com.ibm.mashups.enabler.wire.Wire,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl],{constructor:function(node,_1374){this.xmlData=node;this.wireModel=_1374;this.idService=com.ibm.mashups.enabler.services.IdentificationService;},_getWireModel:function(){return this.wireModel;},toString:function(){return com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData);},_getWireModelUrl:function(){return this.wireModel.href;},_getWireUri:function(){var expr="atom:id";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.wireModel.ns);if(node){return dojo.string.trim(com.ibm.mm.enabler.utils.Dom.textContent(node));}return null;},_getNode:function(_1375){var expr="atom:link[@ext:rel='"+_1375+"']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.wireModel.ns);return node||null;},_getIdentifier:function(_1376){var _1377=null;var node=this._getNode(_1376);if(node){var id=null;var uri=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"ext:uri","uri",this.wireModel.ns.ext);if(uri){var aPos=uri.indexOf("@");if(aPos!=-1){uri=uri.slice(0,aPos);}var idPos=uri.lastIndexOf(":");if(idPos!=-1){uri=uri.slice(idPos+1);}idPos=uri.toUpperCase().lastIndexOf("%3A");if(idPos!=-1){uri=uri.slice(idPos+3);}idPos=uri.lastIndexOf("/");if(idPos!=-1){uri=uri.slice(idPos+1);}id=uri;}if(id){_1377=new com.ibm.mm.enabler.IdentifierImpl(id,uri);}}return _1377;},_setIdentifier:function(_1378,value){var node=this._getNode(_1378);if(node){var id=null;com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.ownerDocument,node,"ext:uri","uri",this.wireModel.ns.ext,value);}},_updateEventIDs:function(){this._updateIdentifier("sourcePortletWindow",com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL);this._updateIdentifier("communicationSource",com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL);this._updateIdentifier("targetPortletWindow",com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL);this._updateIdentifier("communicationTarget",com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL);},_updateIdentifier:function(name,_1379){var oldID=this._getIdentifier(name);var newID=this.idService.resolveID(oldID);var _137a=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1379,this.wireModel);_137a.setNodes([{value:newID,isID:true}]);var _137b=dojo.string.trim(_137a.getModelURI());this._setIdentifier(name,_137b);},_getName:function(_137c){var node=this._getNode(_137c);if(node){var name=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"model:internalName","internalName",this.wireModel.ns.model);if(name){return name;}}return null;},getSourceWidget:function(){var _137d="sourcePortletWindow";return this._getIdentifier(_137d);},getSourceEvent:function(){var _137e="communicationSource";return this._getIdentifier(_137e);},getSourceEventName:function(){var _137f="communicationSource";return this._getName(_137f);},getSourcePage:function(){var _1380="sourcePage";return this._getIdentifier(_1380);},getTargetWidget:function(){var _1381="targetPortletWindow";return this._getIdentifier(_1381);},getTargetEvent:function(){var _1382="communicationTarget";return this._getIdentifier(_1382);},getTargetEventName:function(){var _1383="communicationTarget";return this._getName(_1383);},getTargetPage:function(){var _1384="targetPage";return this._getIdentifier(_1384);},getXml:function(){return this.xmlData;},setXml:function(xml){this.xmlData=xml;this._setDirty();}});}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.Wire"]){dojo._hasResource["com.ibm.mashups.enabler.wire.Wire"]=true;dojo.provide("com.ibm.mashups.enabler.wire.Wire");}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.WireModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.wire.WireModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.wire.WireModel_API");dojo.provide("com.ibm.mashups.enabler.wire.WireModel");dojo.declare("com.ibm.mashups.enabler.wire.WireModel",[com.ibm.mashups.enabler.ListModelController,com.ibm.mashups.enabler.DirtyFlagProvider],{create:function(_1385){},findByTargetWidget:function(id){},findBySourceWidget:function(id){}});}if(!dojo._hasResource["com.ibm.mm.enabler.wire.WireModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.wire.WireModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.wire.WireModelImpl");dojo.declare("com.ibm.mm.enabler.wire.WireModelImpl",[com.ibm.mashups.enabler.wire.WireModel,com.ibm.mashups.enabler.ListModelController,com.ibm.mm.enabler.ConfirmableModelImpl,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.DeferredIteratorImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl],{_cidCounter:0,_cursor:0,_layoutModel:null,constructor:function(href,uri,_1386){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.uri=uri;this.href=href;this._layoutModel=_1386;var _1387=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.entryUrl=_1387.url;this.prefix=_1387.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(_1387.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH,nsf.NS_XHTML,nsf.NS_XSI]));this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this._nodes=new dojox.collections.Dictionary();this._ids=[];this._insertedNodes=new dojox.collections.Dictionary();this._deletedNodes=new dojox.collections.Dictionary();var _1388=function(){var _1389="WireModel.dirtyHandler()";var _138a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_138a){this.LOGGER.trace(_1389,"Wire Model has been changed. Switching to edit representation.");}var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);cs.switchToModifiablePersistenceMode();this.removeDirtyCallback(_1388);};this.addDirtyCallback(this,dojo.hitch(this,_1388));},_setWireModelDirty:function(){this._setDirty();},create:function(_138b){if(this._isEmpty(_138b)||this._isEmpty(_138b.sourceWidgetId)||this._isEmpty(_138b.sourcePageId)||this._isEmpty(_138b.sourcePageId)||this._isEmpty(_138b.sourceEventId)||this._isEmpty(_138b.targetWidgetId)||this._isEmpty(_138b.targetPageId)||this._isEmpty(_138b.targetEventId)){throw new Error(this.modelMessages.E_INVALID_CONTEXT_SPECIFIED_0);}var _138c=com.ibm.mm.enabler.utils.Atom.createEntry("New Wire","model:wire",this.ns.model);var entry=_138c.entryElement;com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_138c.idElement,"ext:uniquename",this.ns.ext,"wire.orderDetails.orderId");com.ibm.mm.enabler.utils.Dom.textContent(_138c.idElement,"cid:"+this._cidCounter++);var _138d=com.ibm.mm.enabler.utils.Utils.createNode("model:isimmediateswitch",this.ns.model);_138d.setAttribute("value","false");_138c.modelElement.appendChild(_138d);var _138e=com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL;var _138f=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_138e,this);_138f.setNodes([{value:dojo.string.trim(_138b.sourcePageId.getID()),isID:true}]);var _1390=dojo.string.trim(_138f.getModelURI());var link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"sourcePage");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1390);entry.appendChild(link);_138e=com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL;_138f=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_138e,this);_138f.setNodes([{value:dojo.string.trim(_138b.sourceWidgetId.getID()),isID:true}]);_1390=dojo.string.trim(_138f.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"sourcePortletWindow");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1390);entry.appendChild(link);_138e=com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL;_138f=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_138e,this);_138f.setNodes([{value:dojo.string.trim(_138b.targetPageId.getID()),isID:true}]);_1390=dojo.string.trim(_138f.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"targetPage");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1390);entry.appendChild(link);_138e=com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL;_138f=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_138e,this);_138f.setNodes([{value:dojo.string.trim(_138b.targetWidgetId.getID()),isID:true}]);_1390=dojo.string.trim(_138f.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"targetPortletWindow");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1390);entry.appendChild(link);_138e=com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL;_138f=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_138e,this);_138f.setNodes([{value:dojo.string.trim(_138b.sourceEventId.getID()),isID:true}]);_1390=dojo.string.trim(_138f.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"communicationSource");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1390);if(_138b.sourceEventId.getName){var _1391=_138b.sourceEventId.getName();com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"model:internalName",this.ns.model,_1391);}entry.appendChild(link);_138e=com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL;_138f=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_138e,this);_138f.setNodes([{value:dojo.string.trim(_138b.targetEventId.getID()),isID:true}]);_1390=dojo.string.trim(_138f.getModelURI());link=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);link.setAttribute("rel","related");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:rel",this.ns.ext,"communicationTarget");com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"ext:uri",this.ns.ext,_1390);if(_138b.targetEventId.getName){var _1392=_138b.targetEventId.getName();com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"model:internalName",this.ns.model,_1392);}entry.appendChild(link);ret=new com.ibm.mm.enabler.wire.WireImpl(entry,this);return ret;},confirmCreate:function(_1393){var page=this._layoutModel._getNavigationNode();if(page){return page.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)?true:false;}else{return this.getConfirmCreate();}},insert:function(node,_1394){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}this._getData();var id=node.getID();this._nodes.add(id,node);this._ids.push(id);this._insertedNodes.add(id,node);this._setDirty();node._addDirtyCallback(this,this._setWireModelDirty);dojo.publish(com.ibm.mashups.enabler.wire.WireModel.TOPIC_WIRE_ADDED,[this,node]);},confirmInsert:function(node,_1395,_1396){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(this._isEmpty(_1395)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}return true;},remove:function(node){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}node=this.find(node).start(true);if(node){var id=node.getID();this._deleteNode(node.getXml());this._nodes.remove(id);for(var ds=0;ds<this._ids.length;ds++){if(this._ids[ds]==id){this._ids.splice(ds,1);break;}}if(!this._insertedNodes.remove(id)){this._deletedNodes.add(id,node);}this._setDirty();node._removeDirtyCallback(this._setWireModelDirty);dojo.publish(com.ibm.mashups.enabler.wire.WireModel.TOPIC_WIRE_REMOVED,[this,node]);}},confirmRemove:function(node){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var page=this._layoutModel._getNavigationNode();if(page){return page.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)?true:false;}else{return this.getConfirmRemove();}},iterator:function(){this._cursor=0;return this;},_getData:function(_1397,sync){if(!this._data){this._loadAhead(_1397,true);}return this._data;},_loadAhead:function(_1398,sync){var _1399=null;if(_1398){_1399=_1398.getFinishedCallback();}if(this._data){if(_1399){_1399(this._data,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_1398.getFinishedCallbackParameters());}return this._data;}else{if(!this.href){if(_1399){_1399(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND,_1398.getFinishedCallbackParameters());}return null;}}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.href,this);var _139a=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_139a.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){this._data=data;var _139b=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("/atom:feed/atom:entry[not(thr:in-reply-to)]",data,this.ns);if(_139b&&_139b.length>0){for(var i=0,l=_139b.length;i<l;i++){var node=new com.ibm.mm.enabler.wire.WireImpl(_139b[i],this);var id=node.getID();this._nodes.add(id,node);this._ids[i]=id;}}}else{if(_1398&&_1399){_1399(null,xhr.status,_1398.getFinishedCallbackParameters());}}}));return this._data;},_isEmpty:function(obj){return com.ibm.mm.enabler.utils.Misc.isEmpty(obj);},_checkValidNode:function(id){if(this._isEmpty(id)&&!com.ibm.mm.enabler.utils.Misc.isInstanceOf(id,com.ibm.mashups.enabler.Identifiable)){throw new Error(dojo.string.substitute(this.modelMessages.E_WIRENODE_NOTFOUND_1,[id]));}return true;},_findNode:function(id){this._checkValidNode(id);var xp="/atom:feed/atom:entry[contains(atom:id/text(),':"+com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id)+"')]";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(xp,this._getData(),this.ns);return node?new com.ibm.mm.enabler.wire.WireImpl(node,this):null;},find:function(id){if(this._isEmpty(id)){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}this._checkValidNode(id);if(id.getID){id=id.getID();}return new com.ibm.mm.enabler.DeferredImpl(this,function(_139c,sync,id){var _139d=_139c.getFinishedCallback();var node;if(this._nodes.containsKey(id)){node=this._nodes.entry(id).valueOf();}else{node=this._findNode(id);if(node){this._nodes.add(id,node);this._ids.push(id);}}if(node&&_139d){_139d(node,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_139c.getFinishedCallbackParameters());}else{if(_139d){_139d(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND,_139c.getFinishedCallbackParameters());}}return node;},id);},_replaceNodeXmlFromFeed:function(node,_139e){var entry=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",_139e,this.ns);if(entry){this._replaceNodeXml(node,entry);}},_replaceNodeXml:function(node,_139f){var _13a0=node.getXml().parentNode;var oldId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);this._deleteNode(node.getXml());node.setXml(_139f);node._setClean();if(_13a0){_13a0.appendChild(node.getXml());}var newId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);if(oldId!=newId){this._nodes.remove(oldId);for(var ds=0;ds<this._ids.length;ds++){if(this._ids[ds]==oldId){this._ids.splice(ds,1);break;}}this._nodes.add(newId,node);this._ids.push(newId);}},_isDirty:function(){this._nodes.forEach(function(entry){var node=entry.valueOf();if(node._isDirty()){return true;}},this);if(this._insertedNodes.count>0||this._deletedNodes.count>0){return true;}return false;},_commit:function(_13a1,sync,_13a2){var _13a3=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _13a4=_13a3.create();_13a4.startTransaction(_13a3.CONTEXT_ENABLER);this._nodes.forEach(function(entry){var node=entry.valueOf();if(node._isDirty()&&!this._insertedNodes.containsKey(entry.key)&&!this._deletedNodes.containsKey(entry.key)){var _13a5=node.getEditLink();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_13a5,this);var _13a6=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);node._updateEventIDs();_13a2._acquire();_13a6.update(node.toString(),dojo.hitch(this,function(type,data,xhr,args){var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(args.node);var _13a7=args.deferred;if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){this._replaceNodeXmlFromFeed(args.node,data);}var _13a8;if(_13a7){_13a7.finishOperation(id,com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status);}_13a2._release(_13a1,xhr.status);}),{node:node,deferred:_13a1});}},this);this._insertedNodes.forEach(function(entry){var node=entry.valueOf();node._updateEventIDs();var _13a9=this._layoutModel.find(node.getSourceWidget().getID()).start();var _13aa=this._layoutModel.find(node.getTargetWidget().getID()).start();if((!_13a9)||(!_13aa)){return;}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.href,this);var _13ab=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_13a2._acquire();_13ab.create(node.toString(),dojo.hitch(this,function(type,data,xhr,args){var _13ac=args.deferred;if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_CREATED){this._replaceNodeXmlFromFeed(node,data);}if(_13ac){_13ac.finishOperation(node,com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}_13a2._release(_13ac,xhr.status);}),{node:node,deferred:_13a1});},this);_13a4.endTransactionDeferred().start();this._insertedNodes.clear();this._deletedNodes.forEach(function(entry){var node=entry.valueOf();var _13ad=node.getEditLink();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_13ad,this);node._updateEventIDs();var _13ae=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_13a2._acquire();_13ae.remove(dojo.hitch(this,function(type,data,xhr,_13af){var _13b0;if(_13af){_13af.finishOperation(node.getID(),com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status);}_13a2._release(_13af,xhr.status);}),_13a1);},this);this._deletedNodes.clear();},hasNext:function(){return this.size().start(true)>this._cursor;},next:function(){var ret=null;if(this.hasNext()){var _13b1=this._cursor++;var id=this._ids[_13b1];ret=this._nodes.item(id).valueOf()||null;if(ret){var _13b2=this.getForeachCallback();if(_13b2){_13b2(ret,this.getForeachCallbackParameters());}}}return ret;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_13b3,sync){if(!this._data){this._getData();}var size=this._nodes.count;var _13b4=_13b3.getFinishedCallback();if(_13b4){_13b4(size,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_13b3.getFinishedCallbackParameters());}return size;});},setCursorPosition:function(_13b5){if(_13b5<0){throw new Error(this.modelMessages.E_PARAM_IS_SMALLER_ZERO_0);}this._cursor=_13b5||0;},getCursorPosition:function(){return this._cursor;},_deleteNode:function(node){if(node&&node.parentNode){node.parentNode.removeChild(node);}},findByTargetWidget:function(id){if(this._isEmpty(id)){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}this._checkValidNode(id);if(id.getID){id=id.getID();}return new com.ibm.mm.enabler.DeferredImpl(this,function(_13b6,sync,id){var _13b7=_13b6.getFinishedCallback();var wires=[];var it=this.iterator();it.start(true);it.setCursorPosition(0);while(it&&it.hasNext()){var wire=it.next();if((wire.getTargetWidget())&&(wire.getTargetWidget().getID()==id)){wires.push(wire);}}if(wires&&_13b7){_13b7(wires,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_13b6.getFinishedCallbackParameters());}else{if(_13b7){_13b7(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND,_13b6.getFinishedCallbackParameters());}}return wires;},id);},findBySourceWidget:function(id){if(this._isEmpty(id)){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}this._checkValidNode(id);if(id.getID){id=id.getID();}return new com.ibm.mm.enabler.DeferredImpl(this,function(_13b8,sync,id){var _13b9=_13b8.getFinishedCallback();var wires=[];var it=this.iterator();it.start(true);it.setCursorPosition(0);while(it&&it.hasNext()){var wire=it.next();if((wire.getSourceWidget())&&(wire.getSourceWidget().getID()==id)){wires.push(wire);}}if(wires&&_13b9){_13b9(wires,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_13b8.getFinishedCallbackParameters());}else{if(_13b9){_13b9(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND,_13b8.getFinishedCallbackParameters());}}return wires;},id);}});}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.WireModel"]){dojo._hasResource["com.ibm.mashups.enabler.wire.WireModel"]=true;dojo.provide("com.ibm.mashups.enabler.wire.WireModel");com.ibm.mashups.enabler.wire.WireModel.TOPIC_BASE="/"+("com.ibm.mashups.enabler.wire.WireModel".replace(/\./ig,"/"))+"/";com.ibm.mashups.enabler.wire.WireModel.TOPIC_WIRE_ADDED=com.ibm.mashups.enabler.wire.WireModel.TOPIC_BASE+"add";com.ibm.mashups.enabler.wire.WireModel.TOPIC_WIRE_REMOVED=com.ibm.mashups.enabler.wire.WireModel.TOPIC_BASE+"remove";}if(!dojo._hasResource["com.ibm.mashups.enabler.wire.WireModelProvider"]){dojo._hasResource["com.ibm.mashups.enabler.wire.WireModelProvider"]=true;dojo.provide("com.ibm.mashups.enabler.wire.WireModelProvider");dojo.declare("com.ibm.mashups.enabler.wire.WireModelProvider",null,{getWireModel:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.model.LayoutModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.model.LayoutModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.model.LayoutModel_API");dojo.provide("com.ibm.mashups.enabler.model.LayoutModel");dojo.declare("com.ibm.mashups.enabler.model.LayoutModel",[com.ibm.mashups.enabler.TreeModelController,com.ibm.mashups.enabler.wire.WireModelProvider,com.ibm.mashups.enabler.DirtyFlagProvider],{create:function(_13ba){},getRoot:function(){},hasChildren:function(node){},getChildren:function(node){},getParent:function(node){},isModifiable:function(node){},isDeletable:function(node){},find:function(id){}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutModelIteratorImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutModelIteratorImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutModelIteratorImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutModelIteratorImpl",com.ibm.mm.enabler.DeferredIteratorImpl,{node:null,layoutModel:null,_cursor:0,_last:null,constructor:function(node,_13bb){this.node=node;this.layoutModel=_13bb;this._setEntries();},_setEntries:function(){var xp="/atom:feed/atom:entry[contains(thr:in-reply-to/@ref,':"+com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this.node)+"')]";this._entries=dojo.map(com.ibm.mashups.enabler.xml.XPath.evaluateXPath(xp,this.layoutModel._getData(),this.layoutModel.ns)||[],this._transform,this);},_getId:function(node){var xp="atom:id";var rawID=dojo.string.trim(com.ibm.mashups.enabler.xml.XPath.evaluateString(xp,node,this.layoutModel.ns));return com.ibm.mm.enabler.IdentifiableHelper.getID(rawID);},_getEntries:function(){return this._entries;},_transform:function(elem){var ret=null;var id=this._getId(elem);if(this.layoutModel._nodes.containsKey(id)){ret=this.layoutModel._nodes.item(id);}else{ret=this.layoutModel._transformNode(elem);this.layoutModel._nodes.add(ret.getID(),ret);}return ret;},hasNext:function(){return this.size().start(true)>this._cursor;},hasPrevious:function(){return this._cursor>0;},_findEntryById:function(id){var ret=null;if(id){dojo.forEach(this._getEntries(),function(node,idx,arr){if(node.getID()==id){ret=node;}},this);}return ret;},_firstEntry:function(){var _13bc={};dojo.forEach(this._getEntries(),function(node,idx,arr){var _13bd=this.layoutModel._getNextNodeID(node);if(_13bd){_13bc[_13bd]=true;}},this);var ret=null;dojo.forEach(this._getEntries(),function(node,idx,arr){if(!(node.getID() in _13bc)){ret=node;}},this);return ret;},_nextEntry:function(node){if(!node){return this._firstEntry();}else{return this._findEntryById(this.layoutModel._getNextNodeID(node));}},_lastEntry:function(){var ret=null;dojo.forEach(this._getEntries(),function(node,idx,arr){var _13be=this.layoutModel._getNextNodeID(node);if(!_13be){ret=node;}},this);return ret;},_previousEntry:function(node){if(!node){return this._lastEntry();}else{var _13bf=this.layoutModel._findPointingNodeID(node);return this._findEntryById(_13bf);}},previous:function(){if(!this.hasPrevious()){return null;}var elem=this._previousEntry(this._last);this._last=elem;this._cursor--;return elem||null;},next:function(){if(!this.hasNext()){return null;}var elem=this._nextEntry(this._last);this._last=elem;this._cursor++;return elem||null;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_13c0,sync){var size=this._getEntries().length;if(_13c0){_13c0.finish(size,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return size;});},seekToEnd:function(){this.setCursorPosition(this.size().start(true));this._last=null;},setCursorPosition:function(_13c1){if(_13c1<0){throw new Error(this.layoutModel.modelMessages.E_PARAM_IS_SMALLER_ZERO_0);}this._cursor=_13c1||0;var x;for(var i=0,size=this.size().start(true);i<this._cursor&&i<size;i++){x=this._nextEntry(x);}this._last=x;},getCursorPosition:function(){return this._cursor;},start:function(){while(this.hasNext()){this.nextFinish(this.next());}}});}if(!dojo._hasResource["com.ibm.mm.enabler.strategy.HiddenMetaDataLoadingStrategyHelperImpl"]){dojo._hasResource["com.ibm.mm.enabler.strategy.HiddenMetaDataLoadingStrategyHelperImpl"]=true;dojo.provide("com.ibm.mm.enabler.strategy.HiddenMetaDataLoadingStrategyHelperImpl");dojo.declare("com.ibm.mm.enabler.strategy.HiddenMetaDataLoadingStrategyHelperImpl",null,{_applyHiddenMetaDataLoadingStrategyToModelURL:function(_13c2){var s=this._findStrategyByType("com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy");if(s){dojo.forEach(s.getHiddenMetaDataToLoad(),function(name){_13c2.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_MDNAME,name);});}}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelBaseMixin"]){dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelBaseMixin"]=true;dojo.provide("com.ibm.mm.enabler.layout._LayoutModelBaseMixin");dojo.declare("com.ibm.mm.enabler.layout._LayoutModelBaseMixin",null,{_nodes:null,_cidPrefix:"cid:",constructor:function(){this._nodes=new dojox.collections.Dictionary();},_setLMBaseDirty:function(){this._setDirty();},_deleteNode:function(node){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.Transformable)){node=node.getXml();}dojo.destroy(node);},_isClientNode:function(node){return (node&&node._getRawID().indexOf(this._cidPrefix)===0);},_getData:function(){if(!this._data){this.getRoot().start(true);}return this._data;},_isEmpty:function(obj){return obj===null||typeof obj=="undefined";},isModifiable:function(node){var _13c3="isModifiable(node)";var _13c4=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13c4){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13c3,[node]);}if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(this._isClientNode(node)){return true;}var mod=com.ibm.mashups.enabler.xml.XPath.evaluateString("atom:content//model:modifiable",node.getXml(),this.ns);var ret=dojo.string.trim(mod).toLowerCase()=="true";if(_13c4){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13c3,[ret]);}return ret;},isDeletable:function(node){var _13c5="isDeletable(node)";var _13c6=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13c6){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13c5,[node]);}if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(this._isClientNode(node)){return true;}var del=com.ibm.mashups.enabler.xml.XPath.evaluateString("atom:content//model:deletable",node.getXml(),this.ns);var ret=dojo.string.trim(del).toLowerCase()=="true";if(_13c6){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13c5,[ret]);}return ret;},_isContainer:function(node){if(this._isEmpty(node)){return false;}if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.Transformable)){node=node.getXml();}return com.ibm.mashups.enabler.xml.XPath.evaluateBoolean("atom:content/model:layout-container",node,this.ns);},_isControl:function(node){if(this._isEmpty(node)){return false;}if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.Transformable)){node=node.getXml();}return com.ibm.mashups.enabler.xml.XPath.evaluateBoolean("atom:content/model:layout-control",node,this.ns);},_transformNode:function(node){var ret=this._isContainer(node)?new com.ibm.mm.enabler.layout.LayoutContainerImpl(node,this):new com.ibm.mm.enabler.layout.LayoutControlImpl(node,this);ret._addDirtyCallback(this,this._setLMBaseDirty);return ret;}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelWireModelProviderMixin"]){dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelWireModelProviderMixin"]=true;dojo.provide("com.ibm.mm.enabler.layout._LayoutModelWireModelProviderMixin");dojo.declare("com.ibm.mm.enabler.layout._LayoutModelWireModelProviderMixin",null,{_wireModel:null,_setLMWireModelProvDirty:function(){this._setDirty();},getWireModel:function(){var _13c7="getWireModel()";var _13c8=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13c8){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13c7,[]);}if(!this._wireModel&&this._getData()){var expr="/atom:feed/atom:link[@ext:rel='wire']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this._getData(),this.ns);if(node){var href=node.getAttribute("href");var uri=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"ext:uri","uri",this.ns.ext);this._wireModel=new com.ibm.mm.enabler.wire.WireModelImpl(href,uri,this);this._wireModel._addDirtyCallback(this,this._setLMWireModelProvDirty);}}if(!this._wireModel){this._wireModel=new com.ibm.mm.enabler.wire.WireModelImpl(null,null,this);this._wireModel._addDirtyCallback(this,this._setLMWireModelProvDirty);}if(_13c8){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13c7,[this._wireModel]);}return this._wireModel;}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelLocatorMixin"]){dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelLocatorMixin"]=true;dojo.provide("com.ibm.mm.enabler.layout._LayoutModelLocatorMixin");dojo.declare("com.ibm.mm.enabler.layout._LayoutModelLocatorMixin",null,{find:function(id){var _13c9="find(id)";var _13ca=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13ca){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13c9,[id]);}var ret=this._find(id);if(_13ca){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13c9,[ret]);}return ret;},_setLMLocatorDirty:function(){this._setDirty();},_checkValidNode:function(id){if(this._isEmpty(id)&&!com.ibm.mm.enabler.utils.Misc.isInstanceOf(id,com.ibm.mashups.enabler.Identifiable)){throw new Error(dojo.string.substitute(this.modelMessages.E_LAYOUTNODE_NOTFOUND_1,[id]));}},_findNode:function(id){this._checkValidNode(id);var xp="/atom:feed/atom:entry[contains(atom:id/text(),':"+com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id)+"')]";return com.ibm.mashups.enabler.xml.XPath.evaluateEntry(xp,this._getData(),this.ns)||null;},_find:function(id){if(this._isEmpty(id)){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}this._checkValidNode(id);return new com.ibm.mm.enabler.DeferredImpl(this,function(_13cb,sync,id){var _13cc=_13cb.getFinishedCallback();var node=null;var tId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);if(this._nodes.containsKey(tId)){node=this._nodes.item(tId);}else{node=this._findNode(id);if(this._nodes.containsKey(tId)){node=this._nodes.item(tId);}else{if(node){node=this._transformNode(node);node._addDirtyCallback(this,this._setLMLocatorDirty());this._nodes.add(tId,node);}}}if(_13cb){_13cb.finish(node,node?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return node;},id);}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelTreeModelMixin"]){dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelTreeModelMixin"]=true;dojo.provide("com.ibm.mm.enabler.layout._LayoutModelTreeModelMixin");dojo.declare("com.ibm.mm.enabler.layout._LayoutModelTreeModelMixin",null,{_root:null,getRoot:function(){var _13cd="getRoot()";var _13ce=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13ce){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13cd,arguments);}var ret=new com.ibm.mm.enabler.DeferredImpl(this,this._getRoot);if(_13ce){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13cd,[ret]);}return ret;},_getRoot:function(_13cf,sync){if(this._root){if(_13cf){_13cf.finish(this._root,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this._root;}else{if(!this.href){if(_13cf){_13cf.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.href,this);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);var md={};var mds="com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy";var s=this._findStrategyByType(mds);if(s){dojo.forEach(s.getHiddenMetaDataToLoad(),function(name){md[name]=null;});}var _13d0=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME);s=_13d0.getStrategy("com.ibm.mashups.enabler.layout.LayoutModel",mds);if(s){dojo.forEach(s.getHiddenMetaDataToLoad(),function(name){md[name]=null;});}for(var n in md){myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_MDNAME,n);}var _13d1=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_13d1.read(dojo.hitch(this,function(type,data,xhr,_13d2){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){this._data=data;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("/atom:feed/atom:entry[not(thr:in-reply-to)]",data,this.ns);if(node){this._root=new com.ibm.mm.enabler.layout.LayoutContainerImpl(node,this);}if(_13d2){_13d2.finish(this._root||null,this._root?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}else{if(_13d2){_13d2.finish(null,xhr.status);}}}),_13cf);return this._root;},hasChildren:function(node){var _13d3="hasChildren(node)";var _13d4=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13d4){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13d3,arguments);}this._assertValidNode(node);var ret=this._findRepliesNode(node.getXml())!==null;if(_13d4){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13d3,[ret]);}return ret;},_assertValidNode:function(node){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.layout.LayoutNode)){throw new Error(dojo.string.substitute(this.modelMessages.E_LAYOUTNODE_NOTFOUND_1,[node]));}},getChildren:function(node){var _13d5="getChildren(node)";var _13d6=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13d6){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13d5,arguments);}this._assertValidNode(node);var ret=new com.ibm.mm.enabler.layout.LayoutModelIteratorImpl(node,this);if(_13d6){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13d5,[ret]);}return ret;},getParent:function(node){var _13d7="getParent(node)";var _13d8=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13d8){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13d7,arguments);}this._assertValidNode(node);var ret=new com.ibm.mm.enabler.DeferredImpl(this,this._getParentDeferredStart,{node:node});if(_13d8){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13d7,[ret]);}return ret;},_getParentDeferredStart:function(_13d9,sync,args){var node=args.node;var ret=null;var xid=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("thr:in-reply-to",node.getXml(),this.ns);if(xid){var rawId=xid.getAttribute("ref");var id=com.ibm.mm.enabler.IdentifiableHelper.getID(rawId);if(this._nodes.containsKey(id)){ret=this._nodes.item(id);}else{var xp="/atom:feed/atom:entry[contains(atom:id/text(),'"+rawId+"')]";var node2=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(xp,this._getData(),this.ns);if(node2){ret=new com.ibm.mm.enabler.layout.LayoutContainerImpl(node2,this);this._nodes.add(com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(ret),ret);}}}if(_13d9){_13d9.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelTreeModelControllerMixin"]){dojo._hasResource["com.ibm.mm.enabler.layout._LayoutModelTreeModelControllerMixin"]=true;dojo.provide("com.ibm.mm.enabler.layout._LayoutModelTreeModelControllerMixin");dojo.declare("com.ibm.mm.enabler.layout._LayoutModelTreeModelControllerMixin",[com.ibm.mm.enabler.layout._LayoutModelTreeModelMixin],{_deletedNodes:null,constructor:function(){this._deletedNodes=new dojox.collections.Dictionary();},_deParent:function(node){var _13da=this.getParent(node).start(true);if(_13da){var _13db=this.getChildren(_13da);if(_13db&&_13db.size().start(true)===1){this._deleteNode(this._findRepliesNode(_13da.getXml()));return true;}}return false;},_findRepliesNode:function(entry){return com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@rel='replies']",entry,this.ns)||null;},_findPointingNodeID:function(node){var ret=null;var xp="/atom:feed/atom:entry[contains(atom:link[@rel=\"next\"]/@ext:uri,\":"+com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node)+"@\")]/atom:id";var id=com.ibm.mashups.enabler.xml.XPath.evaluateString(xp,this._getData(),this.ns);if(id){var rawID=dojo.string.trim(id);ret=com.ibm.mm.enabler.IdentifiableHelper.getID(rawID);}return ret;},_getPrevious:function(node){var _13dc=this._findPointingNodeID(node);if(_13dc){return this.find(_13dc).start(true);}return null;},_setNext:function(node,_13dd){if(node){var next=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@rel='next']",node.getXml(),this.ns);if(!next&&_13dd){next=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);next.setAttribute("rel","next");next.setAttribute("type","application/atom+xml");node.getXml().appendChild(next);}if(next&&_13dd){var _13de=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);_13de.setNodes([{value:_13dd.getID(),isID:true},{value:this.navigationNode.getID(),isID:true}]);next.setAttribute("href","?uri="+_13de.getModelURI());com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.getXml().ownerDocument,next,"ext:uri","uri",this.ns.ext,_13de.getModelURI());}else{if(next){this._deleteNode(next);}}}},_getNextNodeRawID:function(node){var ret=null;if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.Transformable)){node=node.getXml();}var xp="atom:link[@rel='next']";var n=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(xp,node,this.ns);if(n){ret=dojo.string.trim(com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(n,"ext:uri","uri",this.ns.ext));}return ret;},_getNextNodeID:function(node){var ret=this._getNextNodeRawID(node);if(ret){ret=com.ibm.mm.enabler.IdentifiableHelper.getID(ret);}return ret;},_getNext:function(node){var _13df=this._getNextNodeID(node.getXml());if(_13df){return this.find(_13df).start(true);}return null;},_setParent:function(node,_13e0){if(node&&_13e0){var _13e1=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);_13e1.setNodes([{value:_13e0.getID(),isID:true},{value:this.navigationNode.getID(),isID:true}]);var thr=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("thr:in-reply-to",node.getXml(),this.ns);if(!thr){thr=com.ibm.mm.enabler.utils.Utils.createNode("thr:in-reply-to",this.ns.thr);node.xmlData.appendChild(thr);}var _13e2=_13e1.getModelURI();thr.setAttribute("ref",_13e2);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.getXml().ownerDocument,thr,"ext:uri","uri",this.ns.ext,_13e2);thr.setAttribute("href",_13e1.getAbsoluteURL());}},_setReplies:function(node){var _13e3=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);_13e3.setNodes([{value:node.getID(),isID:true}]);_13e3.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);var reply=this._findRepliesNode(node.getXml());if(reply===null){reply=com.ibm.mm.enabler.utils.Dom.createElement(this._getData(),"atom:link",this.ns.atom);reply.setAttribute("rel","replies");reply.setAttribute("type","application/atom+xml");node.getXml().appendChild(reply);}reply.setAttribute("href",_13e3.getAbsoluteURL());com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this._getData(),reply,"ext:uri","uri",this.ns.ext,_13e3.getModelURI());},create:function(_13e4){var _13e5="create(context)";var _13e6=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13e6){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13e5,arguments);}if(this._isEmpty(_13e4)){throw new Error(this.modelMessages.E_PARAM_ISNULL_0);}var _13e7=_13e4[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_ID];var _13e8=_13e4[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_URL];var type=_13e4[com.ibm.mashups.enabler.layout.Constants.CONTEXT_TYPE];var _13e9=_13e4[com.ibm.mashups.enabler.layout.Constants.DISPLAY_TITLE];if(this._isEmpty(type)||(type!=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL&&type!=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTAINER)){throw new Error(this.modelMessages.E_INVALID_CONTEXT_MISSING_TYPE_0);}if(type==com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL&&!(this._isEmpty(_13e7)^this._isEmpty(_13e8))){throw new Error(this.modelMessages.E_INVALID_CONTEXT_SPECIFIED_0);}if(!this._isEmpty(_13e7)&&(!dojo.isString(_13e7)&&!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_13e7,com.ibm.mashups.enabler.Identifiable))){throw new Error(this.modelMessages.E_WIDGETDEF_MUST_BE_IDENTIFIABLE_0);}var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns.atom);com.ibm.mashups.enabler.services.IdentificationService.attachClientID(this._cidCounter);var id=com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns.atom);com.ibm.mm.enabler.utils.Dom.textContent(id,this._cidPrefix+this._cidCounter++);entry.appendChild(id);var _13ea=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_13ea.setAttribute("type","application/xml");entry.appendChild(_13ea);var mNode,ret;if(type==com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL){mNode=com.ibm.mm.enabler.utils.Utils.createNode("model:layout-control",this.ns.model);var attr,val;if(_13e7){attr="portlet-definition";var _13eb=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL,this);_13eb.setNodes([{value:com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(_13e7),isID:true}]);val=_13eb.getModelURI();}else{attr="widget-definition-url";val=_13e8.toString();}com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this._getData(),mNode,"creation-context:"+attr,attr,this.ns["creation-context"],val);ret=new com.ibm.mm.enabler.layout.LayoutControlImpl(entry,this);ret._setDisplayTitle(_13e9);ret._addDirtyCallback(this,this._setLMBaseDirty);}else{if(type==com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTAINER){mNode=com.ibm.mm.enabler.utils.Utils.createNode("model:layout-container",this.ns.model);ret=new com.ibm.mm.enabler.layout.LayoutContainerImpl(entry,this);ret._addDirtyCallback(this,this._setLMBaseDirty);}}_13ea.appendChild(mNode);if(_13e6){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13e5,[ret]);}return ret;},_cidCounter:0,confirmCreate:function(_13ec){var _13ed="confirmCreate(context)";var _13ee=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13ee){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13ed,arguments);}var ret=this.getConfirmCreate();if(_13ee){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13ed,[ret]);}return ret;},insert:function(node,_13ef,_13f0){var _13f1="insert(node,parentNode,nextNode)";var _13f2=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13f2){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13f1,arguments);}if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(this._isEmpty(_13ef)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node)==com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(_13f0)){throw new Error(this.modelMessages.E_LAYOUTNODE_NEXT_CAN_NOT_BE_ITSELF_0);}var _13f3=this.getParent(node).start(true);var _13f4=this.getChildren(_13ef)._lastEntry();var _13f5=this._getNext(node);var _13f6=this._getPrevious(node);var _13f7=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(_13f3)!=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(_13ef);if(_13f7){if(_13f3){this._deParent(node);}this._setParent(node,_13ef);node._setDirty();this._setReplies(_13ef);}if(_13f0){var _13f8=this._getPrevious(_13f0);if(_13f8){this._setNext(_13f8,node);}}else{if(_13f4){this._setNext(_13f4,node);}}if(_13f6){this._setNext(_13f6,_13f5||null);}this._setNext(node,_13f0||null);node._setDirty();this._nodes.add(com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node),node);node._addDirtyCallback(this,this._setLMBaseDirty);this._setDirty();_13ef.getXml().parentNode.appendChild(node.getXml());if(_13f2){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13f1);}},confirmInsert:function(node,_13f9,_13fa){var _13fb="confirmInsert(node,parentNode,nextNode)";var _13fc=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13fc){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13fb,arguments);}if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(this._isEmpty(_13f9)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var ret=this._isContainer(_13f9)&&com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node)!=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(_13f9)&&this.getConfirmInsert(null,this.navigationNode,null)&&this.isModifiable(node)&&this.isModifiable(_13f9);if(_13fc){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13fb,[ret]);}return ret;},remove:function(node){var _13fd="confirmInsert(node,parentNode,nextNode)";var _13fe=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_13fe){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_13fd,arguments);}var ret=this._remove(node);this._setDirty();if(_13fe){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_13fd,[ret]);}return ret;},_remove:function(node,_13ff){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}node=this.find(node).start(true);if(node){var _1400=-1;if(this._isContainer(node)){var _1401=this.getChildren(node);var _1402=[];while(_1401.hasNext()){var child=_1401.next();_1402.push(child);}dojo.forEach(_1402,function(node){this._remove(node,true);},this);}var _1403=this.getParent(node).start(true);if(_1403){_1400=this.getChildren(_1403).size().start(true)-1;}this._deleteNode(node.getXml());var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);this._nodes.remove(id);node._removeDirtyCallback(this._setLMBaseDirty);this._setDirty();if(!_13ff&&!this._isClientNode(node)){this._deletedNodes.add(id,node);}if(id==com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this._root)){this._root=null;}if(_1400===0){this._deParent(node);}else{if(_1400>0){var _1404=this._getNext(node);var _1405=this._getPrevious(node);if(_1405){this._setNext(_1405,_1404);}}else{}}}},confirmRemove:function(node){var ret;var _1406="confirmRemove(node)";var _1407=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_1407){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_1406,arguments);}if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(this.isDeletable(node)){if(this.navigationNode.isPrivate()){ret=this.navigationNode.hasRole(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER);}else{ret=this.navigationNode.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);}}else{ret=false;}if(_1407){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_1406,[ret]);}return ret;}});}if(!dojo._hasResource["com.ibm.mm.enabler.layout.LayoutModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.layout.LayoutModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.layout.LayoutModelImpl");dojo.declare("com.ibm.mm.enabler.layout.LayoutModelImpl",[com.ibm.mashups.enabler.model.LayoutModel,com.ibm.mashups.enabler.TreeModelController,com.ibm.mashups.enabler.wire.WireModelProvider,com.ibm.mm.enabler.strategy.HiddenMetaDataLoadingStrategyHelperImpl,com.ibm.mm.enabler.ConfirmableModelImpl,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.layout._LayoutModelBaseMixin,com.ibm.mm.enabler.layout._LayoutModelWireModelProviderMixin,com.ibm.mm.enabler.layout._LayoutModelTreeModelControllerMixin,com.ibm.mm.enabler.layout._LayoutModelLocatorMixin,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.LazyLoadSupport],{ns:null,urlType:com.ibm.mashups.enabler.model.url.ModelUrlFactory.LAYOUT_URL,entryUrl:"",navigationNode:null,constructor:function(href,uri,_1408){this.uri=uri;this.href=href;this.navigationNode=_1408;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");var _1409=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.prefix=_1409.idprefix;this.entryUrl=this.href;this.ns=dojo.delegate(_1409.namespaces,com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaces([com.ibm.mm.enabler.model.NameSpaceFactory.NS_ATOM,com.ibm.mm.enabler.model.NameSpaceFactory.NS_THR,com.ibm.mm.enabler.model.NameSpaceFactory.NS_XML,com.ibm.mm.enabler.model.NameSpaceFactory.NS_OPENSEARCH,com.ibm.mm.enabler.model.NameSpaceFactory.NS_XHTML,com.ibm.mm.enabler.model.NameSpaceFactory.NS_XSI]));var _140a=function(){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);cs.switchToModifiablePersistenceMode();this.removeDirtyCallback(_140a);};this.addDirtyCallback(this,dojo.hitch(this,_140a));},_getNavigationNode:function(){return this.navigationNode;},_commit:function(_140b,sync,_140c){if(!com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()){sync=true;}var _140d=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _140e=_140d.create();_140e.startTransaction(_140d.CONTEXT_ENABLER);this.widgetWindowLoadAheadMap={};this._commitChanges(_140b,sync,_140c,this.getRoot().start(true));var _140f=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME);var _1410=new com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy(this.widgetWindowLoadAheadMap);_140f.setStrategy("com.ibm.mashups.enabler.widget.WidgetModel",_1410);_140e.endTransactionDeferred().start();_140f.removeStrategy("com.ibm.mashups.enabler.widget.WidgetModel","com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy");this._commitWireModel(_140b,sync,_140c);_140e=_140d.create();_140e.startTransaction(_140d.CONTEXT_ENABLER);this._commitDelete(_140b,sync,_140c);_140e.endTransactionDeferred().start();this._setClean();},_replaceNodeXmlFromFeed:function(node,_1411,_1412){if(_1412){var entry=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",_1412,this.ns);if(entry){this._replaceNodeXml(node,_1411,entry);}}},_replaceNodeXml:function(node,_1413,_1414){if(dojo.isWebKit){_1414=_1414.cloneNode(true);}var _1415=node.getXml().parentNode;if(!_1413){_1413=this._getPrevious(node);}var _1416=this._getNext(node);var _1417=this._isClientNode(node);var oldId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);this._deleteNode(node.getXml());node.setXml(_1414);node._setClean();_1415.appendChild(node.getXml());if(_1413&&_1417){this._setNext(_1413,node);}if(_1416){this._setNext(node,_1416);}var newId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);if(oldId!=newId){this._nodes.remove(oldId);this._nodes.add(newId,node);}this._setDirty();},_commitWireModel:function(_1418,sync,_1419){if(this._wireModel){this.lazyLoadModules(["WidgetModel"]);var _141a=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();if(this._wireModel._isDirty()&&_141a.isDirty()){_141a.commit().start(sync);}this._wireModel._commit(_1418,sync,_1419);}},_commitDelete:function(_141b,sync,_141c){this._deletedNodes.forEach(function(entry){var node=entry.valueOf();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(node.getEditLink(),this);var _141d=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_141c._acquire();_141d.remove(dojo.hitch(this,function(type,data,xhr,_141e){if(_141e){_141e.finishOperation(node.getID(),com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status);}_141c._release(_141e,xhr.status);}),_141b);},this);this._deletedNodes.clear();},_commitChanges:function(_141f,sync,_1420,_1421){if(!_1421){return;}var _1422=this.getChildren(_1421);var _1423=null;while(_1422.hasNext()){var node=_1422.next();if(this._isClientNode(node)){this._insertCommit(node,_1423,_141f,sync,_1420);}else{if(node&&node._isDirty()){this._updateCommit(node,_141f,sync,_1420);}}if(this._isContainer(node)){this._commitChanges(_141f,sync,_1420,node);}_1423=node;}},_prepareNodeCommit:function(node){var _1424=true;var _1425=null;var _1426=node;while(_1424){var _1427=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@rel='next']",_1426.getXml(),this.ns);if(_1427){var _1428=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_1427);var _1429=this.find(_1428).start();var _142a=this._isClientNode(_1429);var _142b=_1429._isDirty();_1424=_142a||_142b;if(!_1424){_1425=_1429;}_1426=_1429;}else{_1424=false;_1425=null;}}_1426=new com.ibm.mm.enabler.layout.LayoutNodeImpl(node.getXml().cloneNode(true),this);this._setNext(_1426,_1425);return _1426;},_updateCommit:function(node,_142c,sync,_142d){var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(node.getEditLink(),this);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);var _142e=node;if(this._isControl(node)){myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);this.widgetWindowLoadAheadMap[node.getID()]=node;_142e=this._prepareNodeCommit(node);}var _142f=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_142d._acquire();_142f.update(_142e.toString(),dojo.hitch(this,function(type,data,xhr,args){var _1430=args.deferred;try{if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){this._replaceNodeXmlFromFeed(args.node,null,data);}if(_1430){_1430.finishOperation(com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(args.node),com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status);}}catch(e){console.error(e);}_142d._release(_1430,xhr.status);}),{node:node,deferred:_142c});},_insertCommit:function(node,_1431,_1432,sync,_1433){var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.entryUrl,this);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);var _1434=node;if(this._isControl(node)){myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);this.widgetWindowLoadAheadMap[node.getID()]=node;_1434=this._prepareNodeCommit(node);}var _1435=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1433._acquire();_1435.create(_1434.toString(),dojo.hitch(this,function(type,data,xhr,args){var _1436=args.deferred;var node=args.node;var _1437=args.previousNode;try{if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_CREATED){this._replaceNodeXmlFromFeed(node,_1437,data);}if(_1436){_1436.finishOperation(node,com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}}catch(e){console.error(e);}_1433._release(_1436,xhr.status);}),{node:node,previousNode:_1431,deferred:_1432});},_getMediaLink:function(){var _1438=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@ext:rel='media']",this.root.xmlData,this.ns);if(_1438){return _1438.getAttribute("href");}return null;},_getEditMediaLink:function(){var _1439=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@rel='edit-media']",this.root.xmlData,this.ns);if(_1439){return _1439.getAttribute("href");}return null;}});com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.layout.LayoutModelImpl");com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;}if(!dojo._hasResource["com.ibm.mashups.enabler.model.LayoutModel"]){dojo._hasResource["com.ibm.mashups.enabler.model.LayoutModel"]=true;dojo.provide("com.ibm.mashups.enabler.model.LayoutModel");}if(!dojo._hasResource["com.ibm.mashups.enabler.strategy.UserLoadAheadStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.UserLoadAheadStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.UserLoadAheadStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.UserLoadAheadStrategy",com.ibm.mashups.enabler.strategy.Strategy,{constructor:function(_143a){this.loadAheadUser=_143a;this.userModel=null;},isLoadAheadUser:function(){return this.loadAheadUser;},setUserModel:function(_143b){this.userModel=_143b;},getUserModel:function(){if(null===this.userModel){this.userModel=com.ibm.mashups.enabler.user.Factory.getUserModel();}return this.userModel;}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Event"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Event"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Event");dojo.declare("com.ibm.mashups.enabler.widget.Event",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.Localized],{getName:function(){},isPublished:function(){},isHandled:function(){},getPayloadType:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.EventProvider"]){dojo._hasResource["com.ibm.mashups.enabler.widget.EventProvider"]=true;dojo.provide("com.ibm.mashups.enabler.widget.EventProvider");dojo.declare("com.ibm.mashups.enabler.widget.EventProvider",null,{getEvents:function(_143c){},getEvent:function(name){},getEventByID:function(id){},HANDLED_NAME_PREFIX:"handled_",PUBLISHED_NAME_PREFIX:"published_"});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiableEvent"]){dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiableEvent"]=true;dojo.provide("com.ibm.mashups.enabler.widget.ModifiableEvent");dojo.declare("com.ibm.mashups.enabler.widget.ModifiableEvent",[com.ibm.mashups.enabler.widget.Event,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.DirtyFlagProvider],{setName:function(name){},setPayloadType:function(_143d){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiableEventProvider"]){dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiableEventProvider"]=true;dojo.provide("com.ibm.mashups.enabler.widget.ModifiableEventProvider");dojo.declare("com.ibm.mashups.enabler.widget.ModifiableEventProvider",[com.ibm.mashups.enabler.widget.EventProvider,com.ibm.mashups.enabler.DirtyFlagProvider],{createEvent:function(name,_143e){},getEvents:function(_143f){},getEvent:function(name){},addEvent:function(event){},removeEvent:function(event){},confirmAddEvent:function(event){},confirmRemoveEvent:function(event){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.Preferences"]){dojo._hasResource["com.ibm.mashups.enabler.widget.Preferences"]=true;dojo.provide("com.ibm.mashups.enabler.widget.Preferences");dojo.declare("com.ibm.mashups.enabler.widget.Preferences",null,{getValue:function(name){},getValues:function(name){},isReadOnly:function(name){},getNames:function(){},getMap:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiablePreferences"]){dojo._hasResource["com.ibm.mashups.enabler.widget.ModifiablePreferences"]=true;dojo.provide("com.ibm.mashups.enabler.widget.ModifiablePreferences");dojo.declare("com.ibm.mashups.enabler.widget.ModifiablePreferences",[com.ibm.mashups.enabler.widget.Preferences,com.ibm.mashups.enabler.DirtyFlagProvider],{confirmRemove:function(name){},confirmSetValue:function(name,value){},confirmSetValues:function(name,_1440){},confirmSetReadOnly:function(name){},setValue:function(name,value){},setValue:function(name,value,_1441){},setValues:function(name,_1442){},setValues:function(name,_1443,_1444){},remove:function(name){}});com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_BASE="/"+("com.ibm.mashups.enabler.widget.ModifiablePreferences".replace(/\./ig,"/"))+"/";com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET=com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_BASE+"set";com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE=com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_BASE+"remove";}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.PreferencesProvider_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.PreferencesProvider_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.PreferencesProvider_API");dojo.provide("com.ibm.mashups.enabler.widget.PreferencesProvider");dojo.declare("com.ibm.mashups.enabler.widget.PreferencesProvider",null,{getPreferences:function(){}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.PreferencesImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.PreferencesImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.PreferencesImpl");dojo.declare("com.ibm.mm.enabler.widget.PreferencesImpl",[com.ibm.mashups.enabler.widget.Preferences],{constructor:function(node,_1445,_1446){this.prefProvider=_1445;this.defaultPreferences=_1446;var _1447=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.li_ns=dojo.delegate(_1447.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML,nsf.NS_XSI]));this.PREFERENCES="atom:content/*/model:portletpreferences[@name='${0}']/base:value";this.PREFERENCES_BY_NAME="atom:content/*/model:portletpreferences[@name='${0}']";this.PREFERENCES_TOP="atom:content/*/model:portletpreferences";this.STAR_NODE="atom:content/*";this.BASE_NS=this.li_ns.base;this.BASE_VALUE="base:value";this.BASE_STRING="base:String";this.XSI_NS=this.li_ns.xsi;this.XSI_TYPE="xsi:type";this.MODEL_NS=this.li_ns.model;this.MODEL_PORTLETPREFERENCES="model:portletpreferences";},_getPrefNode:function(name){if(!name){return null;}var _1448=null;var expr=dojo.string.substitute(this.PREFERENCES_BY_NAME,[name]);var _1449=this.prefProvider._getPreferencesXML();var _144a=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_1449,this.li_ns);return _144a||_1448;},getValue:function(name){var _144b=this._getPrefNode(name);if(_144b){var _144c="base:value[@xsi:type='base:String' and position()=1]/@value";var value=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_144c,_144b,this.li_ns);if(value){return com.ibm.mm.enabler.utils.Dom.textContent(value);}}if(this.defaultPreferences){return this.defaultPreferences.getValue(name);}return null;},getValues:function(name){var _144d=this._getPrefNode(name);if(_144d){var _144e="base:value[@xsi:type='base:String']/@value";var _144f=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_144e,_144d,this.li_ns);if(_144f&&_144f.length>0){return dojo.map(_144f,function(node){return com.ibm.mm.enabler.utils.Dom.textContent(node);});}}if(this.defaultPreferences){return this.defaultPreferences.getValues(name);}return null;},isReadOnly:function(name){var _1450=false;var _1451=this._getPrefNode(name);if(_1451){var _1452=_1451.getAttribute("read-only");if(_1452=="true"){_1450=true;}}else{if(this.defaultPreferences){_1450=this.defaultPreferences.isReadOnly(name);}}return _1450;},getNames:function(){var _1453=[];var names={};var _1454=this.prefProvider._getPreferencesXML();var _1455=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.PREFERENCES_TOP,_1454,this.li_ns);var i;if(_1455){var _1456=_1455.length;for(i=0;i<_1456;i++){names[_1455[i].getAttribute("name")]=null;}}if(this.defaultPreferences){var _1457=this.defaultPreferences.getNames();var _1458=_1457.length;for(i=0;i<_1458;++i){names[_1457[i]]=null;}}for(var name in names){if(Object.prototype.hasOwnProperty.call(names,name)){_1453.push(name);}}return _1453;},_getValueForMap:function(_1459){if(_1459){var _145a="base:value[@xsi:type='base:String' and position()=1]/@value";var value=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_145a,_1459,this.li_ns);if(value){return com.ibm.mm.enabler.utils.Dom.textContent(value);}}return null;},getMap:function(){var _145b={};var _145c=this.prefProvider._getPreferencesXML();var _145d=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.PREFERENCES_TOP,_145c,this.li_ns);var i;if(this.defaultPreferences){_145b=this.defaultPreferences.getMap();}if(_145d){var map={};var _145e=_145d.length;for(i=0;i<_145e;i++){var name=_145d[i].getAttribute("name");var value=this._getValueForMap(_145d[i]);map[name]=value;}dojo.mixin(_145b,map);}return _145b;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.ModifiablePreferencesImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.ModifiablePreferencesImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.ModifiablePreferencesImpl");dojo.declare("com.ibm.mm.enabler.widget.PreferencesUpdateContext",null,{source:"<instance>",type:"<context>"});dojo.declare("com.ibm.mm.enabler.widget.ModifiablePreferencesImpl",[com.ibm.mashups.enabler.widget.ModifiablePreferences,com.ibm.mm.enabler.widget.PreferencesImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl],{setValue:function(name,value,_145f,_1460){if(value===null){return false;}name=name||null;if(!name||name===null||name==="undefined"){var indx=value.indexOf(":");if(indx>0){name=value.substring(2,indx-1);}var indx2=value.indexOf(",");if(indx2>indx){value=value.substring(indx+2,indx2-1);}}if(!this.confirmSetValue(name,value)){return false;}var _1461=this.getValue(name);var _1462=this._setValuesInternally(name,[value],_145f);if(_1462){var _1463=null;if(_1460){_1463=_1460;}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,[this,name,_1461,value,_1463]);}return _1462;},setValues:function(name,_1464,_1465){if(_1464===null){return false;}if(!this.confirmSetValues(name,_1464)){return false;}return this._setValuesInternally(name,_1464,_1465);},_setValuesInternally:function(name,_1466,_1467){if(!dojo.isArray(_1466)){return false;}if(this.defaultPreferences&&this.defaultPreferences.isReadOnly(name)){return false;}var _1468=this._getPrefNode(name);var _1469=this.prefProvider._getPreferencesXML();var _146a=_1469.ownerDocument;if(_1468){if(_1468.hasChildNodes()){var _146b=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_VALUE,_1468,this.li_ns);dojo.forEach(_146b,dojo.destroy);}}else{var _146c=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.STAR_NODE,_1469,this.li_ns);if(!_146c){return false;}_1468=com.ibm.mm.enabler.utils.Dom.createElement(_146a,this.MODEL_PORTLETPREFERENCES,this.MODEL_NS);_1468.setAttribute("name",name);_146c.appendChild(_1468);_1468.setAttribute("read-only","false");}if(this.confirmSetReadOnly(name)){if(_1467===true){_1468.setAttribute("read-only","true");}else{if(_1467===false){_1468.setAttribute("read-only","false");}}}var _146d=_1466.length;for(var i=0;i<_146d;++i){var value=_1466[i];var node=com.ibm.mm.enabler.utils.Dom.createElement(_146a,this.BASE_VALUE,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_146a,node,this.XSI_TYPE,"type",this.XSI_NS,this.BASE_STRING);node.setAttribute("value",value);_1468.appendChild(node);}this._setDirty();return true;},remove:function(name,_146e){if(!this.confirmRemove(name)){return false;}var _146f=this._getPrefNode(name);if(!_146f){return false;}var _1470=this.getValue(name);var _1471=this.prefProvider._getPreferencesXML();var _1472=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.STAR_NODE,_1471,this.li_ns);if(!_1472){return false;}_1472.removeChild(_146f);this._setDirty();var _1473=null;if(_146e){_1473=_146e;}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE,[this,name,_1470,null,_1473]);return true;},confirmRemove:function(name){var _1474=this._getPrefNode(name);if(!_1474){return false;}return true;},confirmSetValue:function(name,value){return true;},confirmSetValues:function(name,_1475){return true;},confirmSetReadOnly:function(name){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl");dojo.declare("com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl",com.ibm.mashups.enabler.widget.ModifiablePreferences,{constructor:function(_1476){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _1477="constructor(basePreferences)";var _1478=this.LOGGER.isLoggable(this.LOG_LEVEL,_1476);if(_1478){this.LOGGER.entering(_1477);}this.basePrefs=_1476;this.prefProvider=this.basePrefs.prefProvider;this.parentPrefs=this.prefProvider._getParentHierarchicalPreferences();dojo.subscribe(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,this,"_setValueHandler");dojo.subscribe(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE,this,"_removeHandler");this.eventContext={source:this,type:"hierachyUpdate",provider:this.prefProvider.getID()};if(_1478){this.LOGGER.exiting(_1477);}},isReadOnly:function(name){if(this.basePrefs.getValue(name)!==null){return this.basePrefs.isReadOnly(name);}if(this.parentPrefs){return this.parentPrefs.isReadOnly(name);}return false;},getValue:function(name){var value=this.basePrefs.getValue(name);if(value!==null){return value;}if(this.parentPrefs){return this.parentPrefs.getValue(name);}return null;},getValues:function(name){var _1479=this.basePrefs.getValues(name);if(_1479!==null){return _1479;}if(this.parentPrefs){return this.parentPrefs.getValues(name);}return null;},setValue:function(name,value,_147a,_147b){var _147c="setValue(name, value, readOnly, _context)";var _147d=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,value,_147a,_147b]);if(_147d){this.LOGGER.entering(_147c);}if(!this.confirmSetValue(name,value)){if(_147d){this.LOGGER.trace(_147c,"confirmSetValue is false");}if(_147d){this.LOGGER.exiting(_147c,false);}return false;}if(_147d){this.LOGGER.trace(_147c,"Setting the new value");}var _147e=this.getValue(name);var _147f=this.basePrefs.setValue(name,value,_147a,_147b);if(_147d){this.LOGGER.exiting(_147c,_147f);}return _147f;},setValues:function(name,_1480,_1481){var _1482="setValues(name, values, readOnly)";var _1483=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,_1480,_1481]);if(_1483){this.LOGGER.entering(_1482);}if(!this.confirmSetValues(name,_1480)){if(_1483){this.LOGGER.trace(_1482,"confirmSetValues is false");}if(_1483){this.LOGGER.exiting(_1482,false);}return false;}if(_1483){this.LOGGER.trace(_1482,"Setting the new values");}var _1484=this.basePrefs.setValues(name,_1480,_1481);if(_1483){this.LOGGER.exiting(_1482,_1484);}return _1484;},remove:function(name,_1485){var _1486=this.basePrefs.remove(name,_1485);return _1486;},getNames:function(){var _1487="getNames()";var _1488=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1488){this.LOGGER.entering(_1487);}var _1489=[];var names={};var i;if(this.parentPrefs){if(_1488){this.LOGGER.trace(_1487,"Getting names from parent preference");}var _148a=this.parentPrefs.getNames();var _148b=_148a.length;for(i=0;i<_148b;++i){names[_148a[i]]=null;}}if(_1488){this.LOGGER.trace(_1487,"Getting own names");}var _148c=this.basePrefs.getNames();var _148d=_148c.length;for(i=0;i<_148d;++i){names[_148c[i]]=null;}for(var name in names){if(Object.prototype.hasOwnProperty.call(names,name)){_1489.push(name);}}if(_1488){this.LOGGER.exiting(_1487);}return _1489;},getMap:function(){var _148e="getMap()";var _148f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_148f){this.LOGGER.entering(_148e);}var _1490={};if(this.parentPrefs){if(_148f){this.LOGGER.trace(_148e,"Getting map from parent preference");}_1490=this.parentPrefs.getMap();}if(_148f){this.LOGGER.trace(_148e,"Getting own map");}var _1491=this.basePrefs.getMap();dojo.mixin(_1490,_1491);if(_148f){this.LOGGER.exiting(_148e);}return _1490;},confirmRemove:function(name){return this.basePrefs.confirmRemove(name);},confirmSetValue:function(name,value){var _1492="confirmSetValue(name, value)";var _1493=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,value]);if(_1493){this.LOGGER.entering(_1492);}if(this.parentPrefs&&this.parentPrefs.isReadOnly(name)){if(_1493){this.LOGGER.trace(_1492,"Preference is read only on parent");}if(_1493){this.LOGGER.exiting(_1492,false);}return false;}var _1494=this.basePrefs.confirmSetValue(name,value);if(_1493){this.LOGGER.trace(_1492,"Confirm on base preferences is ${0}",_1494);}if(_1493){this.LOGGER.exiting(_1492,_1494);}return _1494;},confirmSetValues:function(name,_1495){return this.confirmSetValue(name,_1495);},confirmSetReadOnly:function(name){return false;},_valueExistsOnHierarchy:function(_1496){},_setValueHandler:function(_1497,_1498,_1499,_149a,_149b){if(_1497!==this.basePrefs&&_1497!==this.parentPrefs){return;}var myOV=_1499;if(_1497===this.basePrefs){if(_1499===null&&this.parentPrefs){myOV=this.parentPrefs.getValue(_1498);}}else{if(_1497===this.parentPrefs){var _149c=this.basePrefs.getValue(_1498);if(_149c!==null){return;}}}if(_149b===null){_149b=this.eventContext;}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,[this,_1498,myOV,_149a,_149b]);},_removeHandler:function(_149d,_149e,_149f,_14a0,_14a1){if(_149d!==this.basePrefs&&_149d!==this.parentPrefs){return;}if(_14a1===null){_14a1=this.eventContext;}var value;if(_149d===this.parentPrefs){value=this.basePrefs.getValue(_149e);if(value!==null){return;}}if(_149d===this.basePrefs){if(this.parentPrefs){value=this.parentPrefs.getValue(_149e);if(value!==null){dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,[this,_149e,_149f,value,_14a1]);return;}}}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE,[this,_149e,_149f,_14a0,_14a1]);}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.PreferencesProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.PreferencesProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.PreferencesProviderImpl");dojo.declare("com.ibm.mm.enabler.widget.PreferencesProviderImpl",com.ibm.mashups.enabler.widget.PreferencesProvider,{getPreferences:function(){if(!this.preferences){var _14a2=this._getPreferencesXML();if(!_14a2){return null;}var _14a3=null;var _14a4=null;if(this._getDefaultPreferencesXML){_14a3=this._getDefaultPreferencesXML();if(_14a3){var me=this;var _14a5={_getPreferencesXML:function(){return me._getDefaultPreferencesXML();}};_14a4=new com.ibm.mm.enabler.widget.PreferencesImpl(_14a3,_14a5);}}this.preferences=new com.ibm.mm.enabler.widget.ModifiablePreferencesImpl(_14a2,this,_14a4);}return this.preferences;},_getParentPreferences:function(){var _14a6=this.model._getParent(this);if(_14a6&&_14a6.getPreferences){return _14a6.getPreferences();}else{return null;}},_getHierarchicalPreferences:function(){if(!this.hierarchicalPrefs){this.hierarchicalPrefs=new com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl(this.getPreferences());}return this.hierarchicalPrefs;},_getParentHierarchicalPreferences:function(){var _14a7=this.model._getParent(this);if(_14a7&&_14a7._getParentHierarchicalPreferences){return _14a7._getHierarchicalPreferences();}else{return null;}}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.PreferencesProvider"]){dojo._hasResource["com.ibm.mashups.enabler.widget.PreferencesProvider"]=true;dojo.provide("com.ibm.mashups.enabler.widget.PreferencesProvider");}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetDefinition_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetDefinition_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetDefinition_API");dojo.provide("com.ibm.mashups.enabler.widget.WidgetDefinition");dojo.declare("com.ibm.mashups.enabler.widget.WidgetDefinition",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.widget.PreferencesProvider,com.ibm.mashups.enabler.widget.ModifiableEventProvider],{_type:"definition",getURL:function(){},getType:function(){},getSupportedModes:function(){}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetDefinition"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetDefinition"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetDefinition");}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetInstance_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetInstance_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetInstance_API");dojo.provide("com.ibm.mashups.enabler.widget.WidgetInstance");dojo.declare("com.ibm.mashups.enabler.widget.WidgetInstance",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.ModifiableMetaData,com.ibm.mashups.enabler.widget.PreferencesProvider,com.ibm.mashups.enabler.widget.ModifiableEventProvider],{_type:"instance"});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetInstance"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetInstance"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetInstance");}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetWindow"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetWindow"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetWindow");dojo.declare("com.ibm.mashups.enabler.widget.WidgetWindow",[com.ibm.mashups.enabler.Identifiable,com.ibm.mashups.enabler.widget.PreferencesProvider,com.ibm.mashups.enabler.widget.ModifiableEventProvider],{_type:"window"});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetModel_API"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetModel_API"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetModel_API");dojo.provide("com.ibm.mashups.enabler.widget.WidgetModel");dojo.declare("com.ibm.mashups.enabler.widget.WidgetModel",[com.ibm.mashups.enabler.Commitable,com.ibm.mashups.enabler.model.Model,com.ibm.mashups.enabler.Locator,com.ibm.mashups.enabler.Discardable,com.ibm.mashups.enabler.DirtyFlagProvider],{find:function(id){},findWidgetWindow:function(_14a8,_14a9){},getWidgetDefinitionByWindow:function(_14aa){},getWidgetDefinitionByInstance:function(_14ab){},getWidgetWindow:function(_14ac){},isWidgetWindowCached:function(id){},getWidgetInstance:function(_14ad){},getHierarchicalPreferences:function(_14ae){},getHierarchicalEventProvider:function(_14af){}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.ModifiableEventImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.ModifiableEventImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.ModifiableEventImpl");dojo.declare("com.ibm.mm.enabler.widget.ModifiableEventImpl",[com.ibm.mashups.enabler.widget.ModifiableEvent,com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl],{constructor:function(node,_14b0){this.xmlData=node;this.eventProvider=_14b0;var _14b1=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.li_ns=dojo.delegate(_14b1.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML,nsf.NS_XSI,nsf.NS_EVENT_DATATYPES]));this.QNAME_XPATH="model:qname";this.PAYLOAD_TYPE_XPATH="model:payload-type";this.PUBLISHED_LNAME="publish-event";this.PROCESSED_LNAME="process-event";this.MODEL_QNAME="model:qname";this.MODEL_PAYLOAD_TYPE="model:payload-type";this.STAR_NODE="atom:content/*";this.BASE_NS=this.li_ns.base;this.BASE_VALUE="base:value";this.BASE_STRING="base:String";this.XSI_NS=this.li_ns.xsi;this.XSI_TYPE="xsi:type";this.MODEL_NS=this.li_ns.model;this.TITLE_ELEMENT="model:title";this.TITLE=this.TITLE_ELEMENT+"/"+this.BASE_NLS_TITLE_STRING;this.DESCRIPTION_ELEMENT="model:description";this.DESCRIPTION=this.DESCRIPTION_ELEMENT+"/"+this.BASE_NLS_TITLE_STRING;this.DEFAULT_PAYLOAD_PREFIX="mmpayload";this.DEFAULT_NAME_PREFIX="mmname";this.DATATYPE_NS=this.li_ns[nsf.NS_EVENT_DATATYPES];this.XMLNS_NS=nsf.getNameSpaces([nsf.NS_XMLNS])[nsf.NS_XMLNS];},getID:function(){var rawID=this.xmlData.getAttribute("id");return com.ibm.mm.enabler.IdentifiableHelper.getID(rawID);},getName:function(){var expr=this.QNAME_XPATH;var _14b2=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.li_ns);if(!_14b2){return null;}var qName=com.ibm.mm.enabler.utils.Dom.textContent(_14b2);var _14b3=null;var _14b4=null;if(qName.indexOf(":")!=qName.length-1){_14b3=com.ibm.mm.enabler.utils.Dom.getNodeNSPrefix(qName);_14b4=com.ibm.mm.enabler.utils.Dom.removeNodeNS(qName);}else{_14b4=qName;}if(_14b3===null){return _14b4;}var ns=com.ibm.mm.enabler.utils.Dom.lookupNamespaceURI(_14b2,_14b3);if(ns===null){return _14b4;}return "{"+ns+"}"+_14b4;},isPublished:function(){var _14b5=com.ibm.mm.enabler.utils.Dom.getLocalName(this.xmlData);return (_14b5==this.PUBLISHED_LNAME);},isHandled:function(){var _14b6=com.ibm.mm.enabler.utils.Dom.getLocalName(this.xmlData);return (_14b6==this.PROCESSED_LNAME);},getPayloadType:function(){var expr=this.PAYLOAD_TYPE_XPATH;var _14b7=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.li_ns);if(!_14b7){return null;}var _14b8=com.ibm.mm.enabler.utils.Dom.textContent(_14b7);var _14b9=com.ibm.mm.enabler.utils.Dom.getNodeNSPrefix(_14b8);var _14ba=com.ibm.mm.enabler.utils.Dom.removeNodeNS(_14b8);if(_14b9===null){return _14ba;}var ns=com.ibm.mm.enabler.utils.Dom.lookupNamespaceURI(_14b7,_14b9);if(ns===null){return _14ba;}return "{"+ns+"}"+_14ba;},_setQNameNode:function(_14bb,_14bc,value,_14bd){var expr=_14bc;var _14be=this.xmlData.ownerDocument;var _14bf=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.li_ns);if(!_14bf){_14bf=com.ibm.mm.enabler.utils.Dom.createElement(_14be,_14bb,this.li_ns.model);this.xmlData.appendChild(_14bf);}var nsUri=null;var _14c0=null;var _14c1=value.indexOf("{");if(_14c1===0){var nsEnd=value.indexOf("}");if(nsEnd==-1){throw new Error("Name is not a valid qName");}nsUri=value.substring(_14c1+1,nsEnd);_14c0=value.substring(nsEnd+1);}else{_14c0=value;}if(nsUri!==null){com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_14bf.ownerDocument,_14bf,"xmlns:"+_14bd,_14bd,this.XMLNS_NS,nsUri);com.ibm.mm.enabler.utils.Dom.textContent(_14bf,_14bd+":"+_14c0);}else{com.ibm.mm.enabler.utils.Dom.textContent(_14bf,_14c0);}},setName:function(name){if(this.getName()==name){return;}this._setQNameNode(this.MODEL_QNAME,this.QNAME_XPATH,name,this.DEFAULT_NAME_PREFIX);this._setDirty();},setPayloadType:function(_14c2){var _14c3=_14c2;var _14c4=_14c2.indexOf("{");if(_14c4==-1){_14c3="{"+this.DATATYPE_NS+"}"+_14c2;}if(this.getPayloadType()==_14c3){return;}this._setQNameNode(this.MODEL_PAYLOAD_TYPE,this.PAYLOAD_TYPE_XPATH,_14c3,this.DEFAULT_PAYLOAD_PREFIX);this._setDirty();},_getXML:function(){return this.xmlData;},_setXML:function(_14c5){this.xmlData=_14c5;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl");dojo.declare("com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl",com.ibm.mashups.enabler.widget.EventProvider,{constructor:function(_14c6){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _14c7="constructor(baseEventProvider)";var _14c8=this.LOGGER.isLoggable(this.LOG_LEVEL,_14c6);if(_14c8){this.LOGGER.entering(_14c7);}this.baseEP=_14c6;this.parentEP=this.baseEP._getParentHierarchicalEventProvider();if(_14c8){this.LOGGER.exiting(_14c7);}},createEvent:function(name,_14c9){var _14ca="createEvent(name, handled)";var _14cb=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,_14c9]);if(_14cb){this.LOGGER.entering(_14ca);}var _14cc=this.baseEP.createEvent(name,_14c9);if(_14cb){this.LOGGER.exiting(_14ca,_14cc);}return _14cc;},getEvents:function(_14cd){var _14ce="getEvents()";var _14cf=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_14cf){this.LOGGER.entering(_14ce);}var _14d0=[];var _14d1={};var i;var _14d2;if(_14cf){this.LOGGER.trace(_14ce,"Getting own events");}var _14d3=this.baseEP.getEvents(_14cd);var _14d4=_14d3.length;for(i=0;i<_14d4;++i){var _14d5=_14d3[i];if(_14d5.isHandled()){_14d2=this.HANDLED_NAME_PREFIX;}else{_14d2=this.PUBLISHED_NAME_PREFIX;}_14d1[_14d2+_14d5.getName()]=_14d3[i];}if(this.parentEP){if(_14cf){this.LOGGER.trace(_14ce,"Getting events from parent event provider");}var _14d6=this.parentEP.getEvents(_14cd);var _14d7=_14d6.length;var name;for(i=0;i<_14d7;++i){var _14d8=_14d6[i];name=_14d8.getName();if(_14d8.isHandled()){_14d2=this.HANDLED_NAME_PREFIX;}else{_14d2=this.PUBLISHED_NAME_PREFIX;}var _14d9=_14d2+name;if(!(_14d9 in _14d1)){_14d1[_14d9]=_14d6[i];}}}for(var _14da in _14d1){if(Object.prototype.hasOwnProperty.call(_14d1,_14da)){_14d0.push(_14d1[_14da]);}}if(_14cf){this.LOGGER.exiting(_14ce);}return _14d0;},getEvent:function(name){var event=this.baseEP.getEvent(name);if(event!==null){return event;}if(this.parentEP){return this.parentEP.getEvent(name);}return null;},addEvent:function(event){var _14db="addEvent(event)";var _14dc=this.LOGGER.isLoggable(this.LOG_LEVEL,[event]);if(_14dc){this.LOGGER.entering(_14db);}if(!this.confirmAddEvent(event)){if(_14dc){this.LOGGER.trace(_14db,"confirmAddEvent is false");}if(_14dc){this.LOGGER.exiting(_14db);}return;}this.baseEP.addEvent(event);if(_14dc){this.LOGGER.exiting(_14db);}},removeEvent:function(event){var _14dd="removeEvent(event)";var _14de=this.LOGGER.isLoggable(this.LOG_LEVEL,[event]);if(_14de){this.LOGGER.entering(_14dd);}if(!this.confirmRemoveEvent(event)){if(_14de){this.LOGGER.trace(_14dd,"confirmRemoveEvent is false");}if(_14de){this.LOGGER.exiting(_14dd);}return;}this.baseEP.removeEvent(event);if(_14de){this.LOGGER.exiting(_14dd);}},confirmAddEvent:function(event){return this.baseEP.confirmAddEvent(event);},confirmRemoveEvent:function(event){return this.baseEP.confirmRemoveEvent(event);},getEventByID:function(id){var event=this.baseEP.getEventByID(id);if(event!==null){return event;}if(this.parentEP){return this.parentEP.getEventByID(id);}return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.ModifiableEventProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.ModifiableEventProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.ModifiableEventProviderImpl");dojo.declare("com.ibm.mm.enabler.widget.ModifiableEventProviderImpl",[com.ibm.mashups.enabler.widget.ModifiableEventProvider,com.ibm.mm.enabler.DirtyFlagProviderImpl],{constructor:function(){this._events=null;this.EVENTS_TOP_XPATH="atom:content/*/model:events";this.EVENTS_XPATH=this.EVENTS_TOP_XPATH+"/*";this.PARENT_XPATH="atom:content/*";this.MODEL_PUBLISH_EVENT="model:publish-event";this.MODEL_PROCESS_EVENT="model:process-event";this.MODEL_EVENTS="model:events";this._eventProviderIsDirty=false;this.idService=com.ibm.mashups.enabler.services.IdentificationService;},createEvent:function(name,_14df){var _14e0=this._getEventXML().ownerDocument;var _14e1=this.MODEL_PUBLISH_EVENT;if(_14df){_14e1=this.MODEL_PROCESS_EVENT;}var node=com.ibm.mm.enabler.utils.Dom.createElement(_14e0,_14e1,this.ns.model);node.setAttribute("id","cid:"+this.idService.createClientID());var _14e2=new com.ibm.mm.enabler.widget.ModifiableEventImpl(node,this);_14e2._addDirtyCallback(this,function(){this._setDirty();});_14e2.setName(name);_14e2.setPayloadType("{"+this.ns.xsi+"}String");_14e2._setDirty();return _14e2;},getEvents:function(_14e3){var _14e4=true;var _14e5=false;var _14e6=false;if(typeof _14e3!="undefined"&&_14e3!==null){if(_14e3[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS]!==null&&_14e3[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS]===true){_14e5=true;_14e4=false;}if(_14e3[com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS]!==null&&_14e3[com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS]===true){_14e6=true;_14e4=false;}if(_14e6&&_14e5){_14e4=true;}}if(this._events===null){this._loadEventsFromXML();}var _14e7=[];for(var _14e8 in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_14e8)){_14e7.push(this._events[_14e8]);}}var event;if(this._defaultEventProvider){var _14e9=this._defaultEventProvider.getEvents();var _14ea=_14e9.length;for(var i=0;i<_14ea;++i){event=_14e9[i];if(event.isHandled()){namePrefix=this.HANDLED_NAME_PREFIX;}else{namePrefix=this.PUBLISHED_NAME_PREFIX;}if(!(namePrefix+event.getName() in this._events)){_14e7.push(event);}}}var _14eb=[];if(!_14e4){var _14ec=_14e7.length;for(var j=0;j<_14ec;++j){event=_14e7[j];if(_14e5&&event.isHandled()){_14eb.push(event);}else{if(_14e6&&event.isPublished()){_14eb.push(event);}}}_14e7=_14eb;}return _14e7;},_updateEventsFromXML:function(_14ed){if(this._events===null){return;}if(!this._getEventXML()){return;}var expr=this.EVENTS_XPATH;var _14ee=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,(_14ed)?_14ed:this._getEventXML(),this.ns);if(!_14ee){return;}var _14ef=_14ee.length;var _14f0;for(var i=0;i<_14ef;++i){var event=new com.ibm.mm.enabler.widget.ModifiableEventImpl(_14ee[i],this);var _14f1;if(event.isHandled()){_14f1=this.HANDLED_NAME_PREFIX;}else{_14f1=this.PUBLISHED_NAME_PREFIX;}var _14f2=_14f1+event.getName();if(_14f2 in this._events){var oldID=this._events[_14f2].getID();this._events[_14f2]._setXML(event._getXML());var newID=this._events[_14f2].getID();if(oldID!=newID){this.idService.attachServerID(oldID,newID);}}}},_loadEventsFromXML:function(){var expr=this.EVENTS_XPATH;var _14f3=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this._getEventXML(),this.ns);this._events={};if(!_14f3){return;}var _14f4=_14f3.length;var _14f5;for(var i=0;i<_14f4;++i){var event=new com.ibm.mm.enabler.widget.ModifiableEventImpl(_14f3[i],this);var _14f6;if(event.isHandled()){_14f6=this.HANDLED_NAME_PREFIX;}else{_14f6=this.PUBLISHED_NAME_PREFIX;}var _14f7=_14f6+event.getName();this._events[_14f7]=event;}},getEvent:function(name){if(this._events===null){this._loadEventsFromXML();}if(name===null){return null;}var _14f8=this.HANDLED_NAME_PREFIX+name;if(_14f8 in this._events){return this._events[_14f8];}_14f8=this.PUBLISHED_NAME_PREFIX+name;if(_14f8 in this._events){return this._events[_14f8];}if(this._defaultEventProvider){return this._defaultEventProvider.getEvent(name);}return null;},addEvent:function(event){if(!event){return;}if(!this.confirmAddEvent(event)){return;}var expr=this.EVENTS_TOP_XPATH;var _14f9=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this._getEventXML(),this.ns);if(!_14f9){var _14fa=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.PARENT_XPATH,this._getEventXML(),this.ns);if(!_14fa){return;}_14f9=com.ibm.mm.enabler.utils.Dom.createElement(this._getEventXML().ownerDocument,this.MODEL_EVENTS,this.ns.model);_14fa.appendChild(_14f9);}_14f9.appendChild(event._getXML());if(this._events===null){this._loadEventsFromXML();}var _14fb;if(event.isHandled()){_14fb=this.HANDLED_NAME_PREFIX;}else{_14fb=this.PUBLISHED_NAME_PREFIX;}var _14fc=_14fb+event.getName();this._events[_14fc]=event;this._eventProviderIsDirty=true;this._setDirty();},removeEvent:function(event){if(!event){return;}if(!this.confirmRemoveEvent(event)){return;}var expr=this.EVENTS_TOP_XPATH;var _14fd=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this._getEventXML(),this.ns);if(!_14fd){return;}_14fd.removeChild(event._getXML());if(this._events!==null){var _14fe;if(event.isHandled()){_14fe=this.HANDLED_NAME_PREFIX;}else{_14fe=this.PUBLISHED_NAME_PREFIX;}var _14ff=_14fe+event.getName();if(_14ff in this._events){delete this._events[_14ff];}}this._eventProviderIsDirty=true;this._setDirty();},confirmAddEvent:function(event){return true;},confirmRemoveEvent:function(event){return true;},_getHierarchicalEventProvider:function(){if(!this.hierarchicalEvents){this.hierarchicalEvents=new com.ibm.mm.enabler.widget.HierarchicalEventProviderImpl(this);}return this.hierarchicalEvents;},_getParentHierarchicalEventProvider:function(){var _1500=this.model._getParent(this);if(_1500&&_1500._getParentHierarchicalEventProvider){return _1500._getHierarchicalEventProvider();}else{return null;}},_getEventXML:function(){return this.xmlData;},_isEventProviderDirty:function(){if(this._eventProviderIsDirty){return true;}if(this._events===null){return false;}for(var _1501 in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_1501)){var event=this._events[_1501];if(event._isDirty()){return true;}}}return false;},_setEventProviderClean:function(){this._eventProviderIsDirty=false;if(this._events===null){return;}for(var _1502 in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_1502)){var event=this._events[_1502];event._setClean();}}},_isEmpty:function(obj){return obj===null||typeof obj=="undefined";},getEventByID:function(id){if(this._events===null){this._loadEventsFromXML();}if(id===null){return null;}var _1503=this.getEvents(null);if(_1503&&_1503!==null){for(var i=0,l=_1503.length;i<l;i++){if(_1503[i].getID()===id){return _1503[i];}}}return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.utils"]){dojo._hasResource["com.ibm.mm.enabler.widget.utils"]=true;dojo.provide("com.ibm.mm.enabler.widget.utils");dojo.declare("com.ibm.mm.enabler.widget.ChildNodeImpl",null,{_getParentID:function(){var _1504=this._getParentLink();var _1505=null;if(_1504){_1505=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_1504);}return _1505;},_setParent:function(node,_1506,_1507){if(_1506!==null){var _1508=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1507,this);_1508.setNodes([{value:_1506.getID(),isID:true}]);var thr=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("thr:in-reply-to",node.xmlData,this.ns);if(!thr){thr=com.ibm.mm.enabler.utils.Utils.createNode("thr:in-reply-to",this.ns.thr);node.xmlData.appendChild(thr);}com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.xmlData.ownerDocument,thr,"ext:uri","uri",this.ns.ext,_1508.getModelURI());thr.setAttribute("ref",_1508.getModelURI());thr.setAttribute("href",_1508.getAbsoluteURL());}},_getParentHref:function(){var _1509=this._getParentLink();var _150a=null;if(_1509){_150a=_1509.getAttribute("href");}return _150a;},_getRelationXML:function(){return this.xmlData;},_getParentLink:function(){var _150b=this._getRelationXML();return com.ibm.mm.enabler.widget.utils.getParentLink(_150b,this.ns);}});com.ibm.mm.enabler.widget.utils.getParentLink=function(_150c,ns){var expr="thr:in-reply-to";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_150c,ns);return node||null;};}if(!dojo._hasResource["com.ibm.mm.enabler.widget.WidgetWindowImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.WidgetWindowImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.WidgetWindowImpl");dojo.declare("com.ibm.mm.enabler.widget.WidgetWindowImpl",[com.ibm.mashups.enabler.widget.WidgetWindow,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.widget.PreferencesProviderImpl,com.ibm.mm.enabler.widget.ChildNodeImpl,com.ibm.mm.enabler.widget.ModifiableEventProviderImpl],{constructor:function(_150d,_150e,model){this.xmlData=_150d;if(_150e){this.entity=new com.ibm.mm.enabler.IdentifierImpl(_150e);}this.model=model;this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET);this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XSI]));},_setXMLData:function(_150f,_1510){this.xmlData=_150f;this.entity.xmlData=_1510;this._setClean();},_getPreferencesXML:function(){if(this.entity){return this.entity.xmlData;}},_getRawEntityID:function(){if(this.entity){return this.entity._getRawID();}return null;},_setRawEntityID:function(_1511){if(this.entity){this.entity._setRawID(_1511);}},_setEntityParent:function(_1512,_1513){this._setParent(this.entity,_1512,_1513);},_getRelationXML:function(){if(this.entity){return this.entity.xmlData;}return this.xmlData;},_getEventXML:function(){if(this.entity){return this.entity.xmlData;}return this.xmlData;},_isDirty:function(){return this.getPreferences()._isDirty()||this._isEventProviderDirty();},_setClean:function(){this._dirty=false;this.getPreferences()._setClean();this._setEventProviderClean();}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.WidgetInstanceImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.WidgetInstanceImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.WidgetInstanceImpl");dojo.declare("com.ibm.mm.enabler.widget.WidgetInstanceImpl",[com.ibm.mashups.enabler.widget.WidgetInstance,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.MetaDataImpl2,com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl,com.ibm.mm.enabler.widget.PreferencesProviderImpl,com.ibm.mm.enabler.widget.ChildNodeImpl,com.ibm.mm.enabler.widget.ModifiableEventProviderImpl],{constructor:function(node,model){this.xmlData=node;this.model=model;this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET);this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XSI]));},_setXMLData:function(_1514){this.xmlData=_1514;this._setClean();},_getPreferencesXML:function(){return this.xmlData;},_isDirty:function(){return this.getPreferences()._isDirty()||this._isEventProviderDirty();},_setClean:function(){this._dirty=false;this.getPreferences()._setClean();this._setEventProviderClean();},setSandboxed:function(_1515){var expr="atom:content/model:portlet-entity";var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(nodes){com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData.ownerDocument,nodes,"model:sandboxed","sandboxed",this.ns.model,_1515?"true":"false");this.getPreferences()._setDirty();}},isSandboxed:function(){var expr="atom:content/model:portlet-entity";var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(nodes){var _1516=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(nodes,"model:sandboxed","sandboxed",this.ns.model);if(typeof (_1516)!=="undefined"&&"true"===_1516){return true;}}return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.SimpleEventProviderImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.SimpleEventProviderImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.SimpleEventProviderImpl");dojo.declare("com.ibm.mm.enabler.widget.SimpleEventProviderImpl",com.ibm.mashups.enabler.widget.EventProvider,{constructor:function(_1517){this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET);this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR]));this._events=null;this.EVENTS_XPATH="atom:content/*/model:events/*";this.PARENT_XPATH="atom:content/*";this.MODEL_PUBLISH_EVENT="model:publish-event";this.MODEL_PROCESS_EVENT="model:process-event";this.xmlData=_1517;},getEvents:function(_1518){var _1519=true;var _151a=false;var _151b=false;if(typeof _1518!="undefined"&&_1518!==null){if(_1518[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS]!==null&&_1518[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS]===true){_151a=true;_1519=false;}if(_1518[com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS]!==null&&_1518[com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS]===true){_151b=true;_1519=false;}if(_151b&&_151a){_1519=true;}}if(this._events===null){this._loadEventsFromXML();}var _151c=[];for(var _151d in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_151d)){_151c.push(this._events[_151d]);}}var event;if(this._defaultEventProvider){var _151e=this._defaultEventProvider.getEvents(_1518);var _151f=_151e.length;for(var i=0;i<_151f;++i){event=_151e[i];if(event.isHandled()){namePrefix=this.HANDLED_NAME_PREFIX;}else{namePrefix=this.PUBLISHED_NAME_PREFIX;}if(!(namePrefix+event.getName() in this._events)){_151c.push(event);}}}var _1520=[];if(!_1519){var _1521=_151c.length;for(var j=0;j<_1521;++j){event=_151c[j];if(_151a&&event.isHandled()){_1520.push(event);}else{if(_151b&&event.isPublished()){_1520.push(event);}}}_151c=_1520;}return _151c;},getEvent:function(name){if(this._events===null){this._loadEventsFromXML();}if(name===null){return null;}var _1522=this.HANDLED_NAME_PREFIX+name;if(_1522 in this._events){return this._events[_1522];}_1522=this.PUBLISHED_NAME_PREFIX+name;if(_1522 in this._events){return this._events[_1522];}return null;},_loadEventsFromXML:function(){var expr=this.EVENTS_XPATH;var _1523=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this._getEventXML(),this.ns);this._events={};if(!_1523){return;}var _1524=_1523.length;var _1525;for(var i=0;i<_1524;++i){var event=new com.ibm.mm.enabler.widget.ModifiableEventImpl(_1523[i],this);var _1526;if(event.isHandled()){_1526=this.HANDLED_NAME_PREFIX;}else{_1526=this.PUBLISHED_NAME_PREFIX;}var _1527=_1526+event.getName();this._events[_1527]=event;}},getEventByID:function(id){if(this._events===null){this._loadEventsFromXML();}if(id===null){return null;}var _1528=this.getEvents(null);if(_1528&&_1528!==null){for(var i=0,l=_1528.length;i<l;i++){if(_1528[i].getID()===id){return _1528[i];}}}return null;},_getEventXML:function(){return this.xmlData;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.WidgetDefinitionImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.WidgetDefinitionImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.WidgetDefinitionImpl");dojo.declare("com.ibm.mm.enabler.widget.WidgetDefinitionImpl",[com.ibm.mashups.enabler.widget.WidgetDefinition,com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl,com.ibm.mm.enabler.MetaDataImpl2,com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl,com.ibm.mm.enabler.widget.PreferencesProviderImpl,com.ibm.mm.enabler.widget.ModifiableEventProviderImpl],{constructor:function(_1529,_152a,model){this.xmlData=_1529;this.portletXML=_152a;this.model=model;this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET);this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XSI]));this.modes=null;this.MODEL_NS=this.ns.model;this.MODEL_SUPPORTS="model:supports";this.MODEL_MIME_TYPE="model:mime-type";this.MODEL_PORTLET_MODE="model:portlet-mode";this.MODEL_PORTLET_DEF="atom:content/model:portlet-definition";},_getPortletDefinitionNode:function(){return com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.MODEL_PORTLET_DEF,this.xmlData,this.ns);},getURL:function(){var url=null;var node=this._getPortletDefinitionNode();if(node){url=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"model:url","url",this.ns.model);}return url;},_setURL:function(url){var node=this._getPortletDefinitionNode();if(node){com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.ownerDocument,node,"model:url","url",this.ns.model,url);}},getType:function(){var type=null;var node=this._getPortletDefinitionNode();if(node){type=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"model:type","type",this.ns.model);}return type;},_setType:function(type){var node=this._getPortletDefinitionNode();if(node){com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.ownerDocument,node,"model:type","type",this.ns.model,type);}},_setXMLData:function(_152b,_152c){this.xmlData=_152b;this.portletXML=_152c;this._setClean();},_getPreferencesXML:function(){return this.xmlData;},_isDirty:function(){return this.getPreferences()._isDirty()||this._isEventProviderDirty();},_setClean:function(){this._dirty=false;this.getPreferences()._setClean();this._setEventProviderClean();},_createModeMap:function(){this.portlet2WidgetModesMap={view:"view",edit_defaults:"edit",edit:"personalize",config:"config",help:"help"};this.widget2PortletModesMap={view:"view",edit:"edit_defaults",personalize:"edit",config:"config",help:"help"};},getSupportedModes:function(){if(!this.portlet2WidgetModesMap){this._createModeMap();}var expr="atom:content/model:portlet-definition/model:supports[model:mime-type='html']/model:portlet-mode";var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this.xmlData,this.ns);return dojo.map(nodes||[],function(node){var _152d=com.ibm.mm.enabler.utils.Dom.textContent(node);if(_152d in this.portlet2WidgetModesMap){return this.portlet2WidgetModesMap[_152d];}return _152d;},this);},_setSupportedModes:function(modes){if(!this.widget2PortletModesMap){this._createModeMap();}var _152e=this.xmlData.ownerDocument;var expr="atom:content/model:portlet-definition/model:supports[model:mime-type='html']";var _152f=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(_152f){var _1530=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("*",_152f,this.ns);dojo.forEach(_1530,dojo.destroy);}else{var _1531=this._getPortletDefinitionNode();if(!_1531){return;}_152f=com.ibm.mm.enabler.utils.Dom.createElement(_152e,this.MODEL_SUPPORTS,this.MODEL_NS);_1531.appendChild(_152f);}if(!_152f){return;}var _1532=com.ibm.mm.enabler.utils.Dom.createElement(_152e,this.MODEL_MIME_TYPE,this.MODEL_NS);com.ibm.mm.enabler.utils.Dom.textContent(_1532,"html");_152f.appendChild(_1532);if(!dojo.isArray(modes)){return;}dojo.forEach(modes,function(_1533){var _1534=_1533;if(_1533 in this.widget2PortletModesMap){_1534=this.widget2PortletModesMap[_1533];}var _1535=com.ibm.mm.enabler.utils.Dom.createElement(_152e,this.MODEL_PORTLET_MODE,this.MODEL_NS);com.ibm.mm.enabler.utils.Dom.textContent(_1535,_1534);_152f.appendChild(_1535);},this);},_setSandboxed:function(_1536){var expr="atom:content/model:portlet-definition";var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(nodes){com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData.ownerDocument,nodes,"model:sandboxed","sandboxed",this.ns.model,_1536?"true":"false");this.getPreferences()._setDirty();}},_isSandboxed:function(){var expr="atom:content/model:portlet-definition";var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(nodes){var _1537=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(nodes,"model:sandboxed","sandboxed",this.ns.model);if(typeof (_1537)!=="undefined"&&"true"===_1537){return true;}}return false;}});}if(!dojo._hasResource["com.ibm.mm.enabler.model.SemaphoreHelperImpl"]){dojo._hasResource["com.ibm.mm.enabler.model.SemaphoreHelperImpl"]=true;dojo.provide("com.ibm.mm.enabler.model.SemaphoreHelperImpl");dojo.declare("com.ibm.mm.enabler.model.SemaphoreHelperImpl",null,{_initSemaphore:function(){this.requestCount=0;},_acquire:function(){this.requestCount++;},_release:function(_1538,_1539){this.statusCode=Math.max(parseInt(_1539,10),this.statusCode);this.requestCount--;if(this.requestCount<=0){if(_1538){_1538.finish(null,this.statusCode);}}}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl");dojo.declare("com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl",com.ibm.mashups.iwidget.itemset.ManagedItemSet,{constructor:function(_153a){this.widgetWrapper=_153a;this.widgetModel=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();this.pageID=com.ibm.mm.enabler.utils.Model.getCurrentPageID();this.modelID=com.ibm.mm.iwidget.Utils.getModelID(_153a.getID());this.widgetWindow=this.widgetModel.findWidgetWindow(this.modelID,this.pageID).start();this.widgetInstance=this.widgetModel.getWidgetInstance(this.widgetWindow).start();this.widgetDefinition=this.widgetModel.getWidgetDefinitionByInstance(this.widgetInstance).start();this.preferences=this._getPreferences();this._initItems();this.listeners=new dojox.collections.ArrayList();this.uuid=dojox.uuid.generateRandomUuid();this.autoCommit=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.ICONTEXT_AUTO_COMMIT);dojo.subscribe(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,this,"_preferencesSetCallback");dojo.subscribe(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE,this,"_preferencesRemoveCallback");},_initItems:function(){this._items={};var map=this.preferences.getMap();for(var name in map){this._items[name]={value:map[name],change:null};}},setItemValue:function(_153b,value){if(!this.preferences.confirmSetValue(_153b,value)){return null;}if(_153b in this._items){var _153c=this._items[_153b];_153c.value=value;_153c.change=com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_CHANGEDVALUE;}else{this._items[_153b]={"value":value,"change":com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_NEWITEM};}return this;},getItemValue:function(_153d){if(!(_153d in this._items)){return null;}var _153e=this._items[_153d];if(_153e.change==com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_REMOVEDITEM){return null;}return _153e.value;},getAllNames:function(){var _153f=[];for(var _1540 in this._items){if(Object.prototype.hasOwnProperty.call(this._items,_1540)){var _1541=this._items[_1540];if(_1541.change!==com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_REMOVEDITEM){_153f.push(_1540);}}}if(_153f.length===0){return null;}return _153f;},removeItem:function(_1542){if(!(_1542 in this._items)){return null;}var _1543=this._items[_1542].change;if(_1543==com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_NEWITEM||(_1543==com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_CHANGEDVALUE&&!this.preferences.confirmRemove(_1542))){delete this._items[_1542];return this;}if(!this.preferences.confirmRemove(_1542)){return null;}this._items[_1542].change=com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_REMOVEDITEM;this._items[_1542].value=null;return this;},isReadOnly:function(_1544){return this.preferences.isReadOnly(_1544);},save:function(_1545){return this.commit(_1545);},commit:function(_1546){var _1547=true;var _1548={source:this,type:"iContext"};var _1549=[];for(var _154a in this._items){if(Object.prototype.hasOwnProperty.call(this._items,_154a)){var _154b=this._items[_154a].change;if(_154b===null){continue;}var _154c=this.preferences.getValue(_154a);var value=this._items[_154a].value;if(_154b==com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_NEWITEM||_154b==com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_CHANGEDVALUE){if(!this.preferences.setValue(_154a,value,false,_1548)){_1547=false;}}else{if(_154b==com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_REMOVEDITEM){if(!this.preferences.remove(_154a,_1548)){_1547=false;}}}_1549.push({"id":_154a,"alias":null,"changeType":_154b,"oldVal":_154c,"newVal":value});}}var self=this;if(this.autoCommit===true){var dfr=this.widgetModel.commit();dfr.setFinishedCallback(function(){if(!_1547){if(dojo.isFunction(_1546)){_1546("attributes",false);}return;}var _154d=self._createIEvent([_1549]);self._callListeners(_154d);self.preferences=self._getPreferences();self._initItems();if(_1547){if(dojo.isFunction(_1546)){_1546("attributes",true);}}});dfr.start(false);}else{if(!_1547){if(dojo.isFunction(_1546)){_1546("attributes",false);}return;}var _154e=this._createIEvent([_1549]);this._callListeners(_154e);this.preferences=this._getPreferences();this._initItems();if(_1547){if(dojo.isFunction(_1546)){_1546("attributes",true);}}}},addListener:function(fn){if(!dojo.isFunction(fn)){return null;}this.listeners.add(fn);var index=this.listeners.indexOf(fn);return this.uuid+"_"+index;},removeListener:function(_154f){if(dojo.isFunction(_154f)){if(this.listeners.contains(fn)){this.listeners.remove(fn);}}else{if(dojo.isString(_154f)){var parts=_154f.split(_154f);if(parts.length!=2){return;}var index=parts[1];this.listeners.removeAt(parseInt(index,10));}}return this._internal().removeListener(_154f);},_getPreferences:function(){var mode=this.widgetWrapper.currentMode;if(mode===iwConstants.mode.CONFIG){return this.widgetDefinition.getPreferences();}if(mode===iwConstants.mode.EDIT){return this.widgetModel.getHierarchicalPreferences(this.widgetInstance).start();}return this.widgetModel.getHierarchicalPreferences(this.widgetWindow).start();},_preferencesSetCallback:function(_1550,_1551,_1552,_1553,_1554){if(_1550!==this.preferences){return;}var type=null;if(_1554.source===this){return;}if(_1554.type=="iContext"){if(this._items[_1551]&&this._items[_1551].change===null){this._items[_1551].value=_1553;}else{this._items[_1551]={value:_1553,change:null};}}var cType=com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_CHANGEDVALUE;if(_1552===null){cType=com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_NEWITEM;}var _1555={id:_1551,alias:null,changeType:cType,oldVal:_1552,newVal:_1553};var _1556=this._createIEvent([_1555]);this._callListeners(_1556);},_preferencesRemoveCallback:function(_1557,_1558,_1559,_155a,_155b){if(_1557!==this.preferences){return;}var type=null;if(_155b.source===this){return;}if(_155b.type=="iContext"){if(this._items[_1558]&&this._items[_1558].change===null){delete this._items[_1558];}}if(_155b&&_155b.type=="iContext"){return;}var cType=com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_REMOVEDITEM;var _155c={itemName:_1558,alias:null,changeType:cType,oldVal:_1559,newVal:_155a};var _155d=this._createIEvent([_155c]);this._callListeners(_155d);},_createIEvent:function(_155e){var _155f={name:"onItemSetChanged",type:null,source:null,payload:{itemSetName:"attributes",alias:null,changes:_155e}};return _155f;},_callListeners:function(_1560){var _1561=this.listeners.count;for(var i=0;i<_1561;++i){var cbFn=this.listeners.item(i);if(cbFn){cbFn(_1560);}}}});com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_NEWITEM="newItem";com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_REMOVEDITEM="removedItem";com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl.CHANGE_CHANGEDVALUE="changedValue";}if(!dojo._hasResource["com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesFactoryImpl");dojo.declare("com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesFactoryImpl",com.ibm.mashups.iwidget.itemset.PersistentAttributesFactory,{constructor:function(){this.modes=[com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL,com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL_PREFERENCES];},createPersistentAttributes:function(_1562,_1563){return new com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesImpl(_1562);},getSupportedPersistenceMode:function(){return this.modes;}});com.ibm.mashups.services.ServiceManager.getService("persistentAttributesFactoryService").setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL,new com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesFactoryImpl());com.ibm.mashups.services.ServiceManager.getService("persistentAttributesFactoryService").setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL_PREFERENCES,new com.ibm.mm.enabler.widget.attributes.WidgetModelPersistentAttributesFactoryImpl());}if(!dojo._hasResource["com.ibm.mm.enabler.widget.icontext.WidgetModelEventsImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.icontext.WidgetModelEventsImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.icontext.WidgetModelEventsImpl");dojo.declare("com.ibm.mm.enabler.widget.icontext.WidgetModelEventsImpl",com.ibm.mashups.iwidget.model.EventModel,{constructor:function(_1564){this.widgetWrapper=_1564;this.widgetModel=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();this.pageID=com.ibm.mm.enabler.utils.Model.getCurrentPageID();this.modelID=com.ibm.mm.iwidget.Utils.getModelID(_1564.getID());this.widgetWindow=this.widgetModel.findWidgetWindow(this.modelID,this.pageID).start();if(!this.widgetWindow){throw new Error("WidgetWindow can't be found");}this.widgetInstance=this.widgetModel.getWidgetInstance(this.widgetWindow).start();this.widgetDefinition=this.widgetModel.getWidgetDefinitionByInstance(this.widgetInstance).start();this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.enabler.widget.icontext.WidgetModelEventsImpl");this._runtimeIEventModels={};this._runtimeIEventModels[iwConstants.mode.CONFIG]={};this._runtimeIEventModels[iwConstants.mode.EDIT]={};this._runtimeIEventModels[iwConstants.mode.VIEW]={};this.autoCommit=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME).getValue(com.ibm.mashups.enabler.services.ConfigConstants.ICONTEXT_AUTO_COMMIT);this._initRuntimeModel();},_initRuntimeModel:function(){var _1565=this.widgetWrapper.widgetDef._getPublicEvents();if(_1565){com.ibm.mm.enabler.utils.Misc.forIn(_1565,function(evt,i){this._runtimeIEventModels[iwConstants.mode.CONFIG][i]=evt;},this);}},_getHierarchicalRuntimeModel:function(mode){if(mode&&mode==iwConstants.mode.CONFIG){return this._runtimeIEventModels[iwConstants.mode.CONFIG];}var _1566={};if(mode&&mode==iwConstants.mode.EDIT){return dojo.mixin(_1566,this._runtimeIEventModels[iwConstants.mode.CONFIG],this._runtimeIEventModels[iwConstants.mode.EDIT]);}var _1567=dojo.mixin(_1566,this._runtimeIEventModels[iwConstants.mode.CONFIG],this._runtimeIEventModels[iwConstants.mode.EDIT]);return dojo.mixin(_1567,this._runtimeIEventModels[iwConstants.mode.VIEW]);},_getEventProvider:function(mode){if(!mode){mode=this._getMode();}if(mode==iwConstants.mode.CONFIG){return this.widgetDefinition;}return this.widgetModel.getHierarchicalEventProvider(this.widgetInstance).start();},_getRuntimeModel:function(mode){if(!mode){mode=iwConstants.mode.VIEW;}var model=this._runtimeIEventModels[mode];if(typeof model=="undefined"){model=null;}return model;},_getMode:function(){var mode=this.widgetWrapper.currentMode;if(mode&&mode==iwConstants.mode.CONFIG){return mode;}return iwConstants.mode.EDIT;},_getContext:function(mode){if(!mode){mode=this._getMode();}if(mode&&mode==iwConstants.mode.CONFIG){return this.widgetDefinition;}return this.widgetInstance;},_find:function(name){if(!name){return null;}var mode=this._getMode();var _1568=this._getHierarchicalRuntimeModel(mode);if(_1568===null){return null;}if(_1568[name]&&_1568[name]!==null){return _1568[name];}return this._findInWidgetModel(name,mode);},_findInWidgetModel:function(name,mode){var _1569=this._getEventProvider(mode);var _156a=_1569.getEvent(name);if(!_156a){return null;}return _156a;},find:function(name){var _156b=this._find(name);if(!_156b){return null;}return this._toIEventDescription(_156b);},eventExists:function(id){var _156c=this.find(id);if(!_156c){return false;}return true;},_getEventDescObj:function(_156d){var obj=_156d;var _156e=_156d.declaredClass;if(!_156e){obj=new com.ibm.mm.iwidget.IEventDescriptionImpl(_156d);}return obj;},_createEvent:function(_156f,_1570){var _1571=this._getEventDescObj(_156f);var _1572=this.eventExists(_1571.name);if(_1572){return false;}else{var mode=this._getMode();var _1573=this._getRuntimeModel(mode);_1571.setAttribute("isComplete",true);_1573[_1571.name]=_1571;var _1574=this._getContext(mode);var _1575=((_1571.isHandled==true)||(_1571.isHandled=="true"))?true:false;var _1576=_1574.createEvent(_1571.name,_1575);_1576=this._addEvent(_1576,_1571);_1574.addEvent(_1576);if(_1570){this._commit();}return true;}},createEvent:function(_1577){return this._createEvent(_1577,true);},_addEvent:function(_1578,_1579){var _157a=_1579.type;if(_157a){_1578.setPayloadType(_157a);}var _157b=_1579.getLocales();for(var i=0;i<_157b.length;i++){var _157c=_157b[i];var title=_1579.getAttribute("title",_157c);var desc=_1579.getAttribute("description",_157c);if(title){_1578.setTitle(title,_157c);}if(desc){_1578.setDescription(desc,_157c);}}return _1578;},removeEvent:function(_157d){return this._removeEvent(_157d,true);},_removeEvent:function(_157e,_157f){if(!_157e){return false;}var mode=this._getMode();var _1580=this._findInWidgetModel(_157e,mode);if(_1580===null){return true;}var _1581=this._getRuntimeModel(mode);if(typeof _1581[_157e]!="undefined"){delete _1581[_157e];}var _1582=this._getContext(mode);_1582.removeEvent(_1580);if(_157f){this._commit();}return true;},isUpdateEventRequired:function(_1583){return true;},updateEvent:function(_1584){return this._updateEvent(_1584,true);},_updateEvent:function(_1585,_1586){if(!_1585){return false;}var _1587=this._getEventDescObj(_1585);var mode=this._getMode();var _1588=this._findInWidgetModel(_1587.name,mode);if(_1588===null){return false;}var _1589=this._getRuntimeModel(mode);_1587.setAttribute("isComplete",true);_1589[_1587.name]=_1587;this._addEvent(_1588,_1587);if(_1586){this._commit();}return true;},getEvents:function(_158a){var mode=this._getMode();var _158b=this._getEventProvider(mode).getEvents();var temp=this._toIEventDescriptions(_158b);var _158c=this._mergeRuntimeModel(temp,mode);if(_158c===null){return null;}if(!_158a){return _158c;}if(dojo.isString(_158a)){try{_158a=dojo.fromJson(_158a);}catch(e){return null;}}var _158d=[];if(typeof _158a.isHandled!="undefined"&&_158a.isHandled&&!_158a.handlingFn){for(var i=0,l=_158c.length;i<l;i++){var _158e=_158c[i];if(!!_158e.isHandled){if(!_158e.handlingFn){_158d.push(_158e);}}}if(_158d.length===0){return null;}return _158d;}for(var j in _158c){if(Object.prototype.hasOwnProperty.call(_158c,j)){var _158f=_158c[j];var rc=com.ibm.mashups.enabler.utils.EventModelHelper.checkMatch(_158f._getInternalJsonObj(),_158a);if(rc){_158d.push(_158f);}}}if(_158d.length===0){return null;}else{return _158d;}},setEvents:function(_1590){var _1591=true;for(var i in _1590){if(Object.prototype.hasOwnProperty.call(_1590,i)){var _1592=_1590[i];var temp=this._find(_1592.name);if(temp){rc=this._updateEvent(_1592);}else{rc=this._createEvent(_1592);}if(!rc){_1591=false;}}}this._commit();return _1591;},removeEvents:function(_1593){var _1594=true;for(var i in _1593){if(_1593.hasOwnProperty(i)){var _1595=_1593[i];rc=this._removeEvent(_1595);if(!rc){_1594=false;}}}this._commit();return _1594;},commit:function(){this.widgetModel.commit().start();},_commit:function(){if(this.autoCommit===true){this.commit();}},_toIEventDescriptions:function(_1596){if(!_1596||!dojo.isArray(_1596)||_1596.length===0){return null;}return dojo.map(_1596,this._toIEventDescription,this);},_toIEventDescription:function(_1597){if(!_1597.getName){return _1597;}if((_1597.__json)&&(_1597._isDirty)&&(!_1597._isDirty())){return new com.ibm.mm.iwidget.IEventDescriptionImpl(_1597.__json);}var obj={name:_1597.getName(),isHandled:_1597.isHandled(),isPublished:_1597.isPublished(),type:_1597.getPayloadType(),localizedAttributes:{},attributes:{},isComplete:false};com.ibm.mm.enabler.utils.Misc.forIn(_1597.getTitles(),function(title,_1598){if(!(_1598 in obj.localizedAttributes)){obj.localizedAttributes[_1598]={};}obj.localizedAttributes[_1598][iwConstants.event.TITLE]=title;var _1599=_1597.getDescription(_1598);if(_1599){obj.localizedAttributes[_1598][iwConstants.event.DESCRIPTION]=_1599;}},this);_1597.__json=obj;return new com.ibm.mm.iwidget.IEventDescriptionImpl(obj);},_mergeRuntimeModel:function(arr,mode){if(!arr){return null;}if(dojo.isArray(arr)&&arr.length===0){return null;}var _159a=this._getHierarchicalRuntimeModel(mode);var _159b=com.ibm.mm.enabler.utils.Misc.isEmpty(_159a);if(_159b){return arr;}for(var j=0;j<arr.length;j++){var _159c=arr[j];var name=_159c.name;if(_159a[name]){arr[j]=_159a[name];}}return arr;}});}if(!dojo._hasResource["com.ibm.mm.enabler.widget.icontext.WidgetModelEventsFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.icontext.WidgetModelEventsFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.icontext.WidgetModelEventsFactoryImpl");dojo.declare("com.ibm.mm.enabler.widget.icontext.WidgetModelEventsFactoryImpl",com.ibm.mashups.iwidget.model.EventModelFactory,{constructor:function(){this.modes=[com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL];},createEventModel:function(_159d,_159e){return new com.ibm.mm.enabler.widget.icontext.WidgetModelEventsImpl(_159d);},getSupportedPersistenceMode:function(){return this.modes;}});com.ibm.mashups.services.ServiceManager.getService("WidgetEventModelFactoryService").setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL,new com.ibm.mm.enabler.widget.icontext.WidgetModelEventsFactoryImpl());}if(!dojo._hasResource["com.ibm.mm.enabler.wire.icontext.ReadOnlyWireModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.wire.icontext.ReadOnlyWireModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.wire.icontext.ReadOnlyWireModelImpl");dojo.declare("com.ibm.mm.enabler.wire.icontext.ReadOnlyWireModelImpl",null,{constructor:function(_159f){this._instance=_159f;this.svc=com.ibm.mashups.services.ServiceManager.getService("eventService");this.modelID=com.ibm.mm.iwidget.Utils.getModelID(this._instance.id);dojo.subscribe(com.ibm.mashups.enabler.wire.WireModel.TOPIC_WIRE_ADDED,this,"_wireAddedCallback");dojo.subscribe(com.ibm.mashups.enabler.wire.WireModel.TOPIC_WIRE_REMOVED,this,"_wireRemovedeCallback");},toJson:function(){return null;},isDirty:function(){return false;},setDirty:function(_15a0){throw "Cannot call setDirty on on Read Only WireModel";},registerTargets:function(tw,te,se){if(!this._targets){this._targets={};}if(!this._targets[tw]){this._targets[tw]=[];}var wire={tw:tw,te:te,sw:this._instance.id,se:se};this._targets[tw].push(wire);},getTargets:function(){if(!this._targets){return null;}return this._targets;},removeTargets:function(tw,te,se){if(this._targets){if(this._targets[tw]){if(!te&&!se){delete (this._targets[tw]);}}}},getEventName:function(_15a1,_15a2){if(_15a1&&_15a1!==null){for(var i=0,l=_15a1.length;i<l;i++){if(_15a1[i].getID()==_15a2.getID()){return _15a1[i].getName();}}}return null;},_addWire:function(wire,_15a3){var wire2=this._findWire(wire.getID())||null;if(wire2===null){if(!this._wires){this._wires=[];}_15a3=_15a3||false;if(!_15a3){wire.setType(wire.TYPE_NEW);}this._wires.push(wire);var index;var _15a4=wire.SourceEvent;if(_15a4){index=_15a4.indexOf("publish.");if(index===0){_15a4=_15a4.substring(8);}}var _15a5=wire.TargetEvent;if(_15a5){index=_15a5.indexOf("process.");if(index===0){_15a5=_15a5.substring(8);}}this.svc.subscribeWire(wire.SourceWidget,_15a4,this._instance.id,_15a5);}},_removeWire:function(id){var wire=this._findWire(id)||null;if(wire!==null){for(var i in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,i)){if(this._wires[i].getID()==id){this._wires[i].setType(this._wires[i].TYPE_DELETE);var index;var _15a6=wire.SourceEvent;if(_15a6){index=_15a6.indexOf("publish.");if(index===0){_15a6=_15a6.substring(8);}}var _15a7=wire.TargetEvent;if(_15a7){index=_15a7.indexOf("process.");if(index===0){_15a7=_15a7.substring(8);}}this.svc.unSubscribeWire(wire.SourceWidget,_15a6,this._instance.id,_15a7);break;}}}}},addWire:function(_15a8,_15a9,_15aa){var aWire={};aWire.SourceWidget=_15a8;aWire.SourceEvent=_15a9;aWire.TargetEvent=_15aa;var wire=new com.ibm.mm.iwidget.widget.WireImpl(this._instance.id,aWire);this._addWire(wire);},removeWire:function(_15ab,_15ac,_15ad){var aWire={};_15ab=_15ab||null;_15ac=_15ac||null;_15ad=_15ad||null;if(_15ab!==null&&_15ac!==null&&_15ad!==null){aWire.SourceWidget=_15ab;aWire.SourceEvent=_15ac;aWire.TargetEvent=_15ad;var _15ae=new com.ibm.mm.iwidget.widget.WireImpl(this._instance.id,aWire);this._removeWire(_15ae.getID());}else{if(_15ab!==null){for(var w in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,w)){if(this._wires[w].getSourceWidgetID()==_15ab){this._wires[w].setType(this._wires[w].TYPE_DELETE);var wire=this._wires[w];this.svc.unSubscribeWire(_15ab,wire.SourceEvent,wire.TargetWidget,wire.TargetEvent);}}}}}},_findWire:function(id){var wire;this._wires=this._wires||null;if(this._wires!==null){for(var w in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,w)){if(this._wires[w].getID()==id){wire=this._wires[w]||null;if((wire.getType()!==null)&&(wire.getType()==wire.TYPE_DELETE)){delete this._wires[w];wire=null;}else{break;}}}}}return wire||null;},getWires:function(){if(!this._wires){this._loadWires();}var arr=[];for(var wire in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,wire)){var aWire=this._wires[wire];if(aWire.getType()!=aWire.TYPE_DELETE){arr.push(aWire);}}}return arr;},_loadWires:function(){this._wires=[];var _15af=com.ibm.mm.enabler.utils.Model.getCurrentPageLayoutModel();var _15b0=_15af.getWireModel();var _15b1=_15b0.findByTargetWidget(this.modelID).start(true);dojo.forEach(_15b1||[],function(wire){var aWire={};aWire.SourceWidget=com.ibm.mm.iwidget.Utils.getMarkupID(wire.getSourceWidget().getID());aWire.SourceEvent=wire.getSourceEventName();aWire.TargetEvent=wire.getTargetEventName();this._addWire(new com.ibm.mm.iwidget.widget.WireImpl(this._instance.id,aWire),true);},this);},commit:function(){throw "Cannot call commit on Read Only WireModel";},_addToDOM:function(aWire){throw "Cannot call _addToDOM on Read Only WireModel";},_removeFromDOM:function(aWire){throw "Cannot call _removeFromDOM on Read Only WireModel";},_wireAddedCallback:function(_15b2,wire){if(wire.getTargetWidget().getID()==this.modelID){var _15b3=com.ibm.mm.iwidget.Utils.getMarkupID(wire.getSourceWidget().getID());var _15b4=wire.getSourceWidget().getID();var _15b5=wire.getTargetWidget().getID();var _15b6=wire.getSourceEvent();var _15b7=wire.getTargetEvent();var _15b8=com.ibm.mm.enabler.utils.Model.getCurrentPageID();var _15b9=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _15ba=_15b9.findWidgetWindow(_15b4,_15b8).start();var _15bb=_15b9.getHierarchicalEventProvider(_15ba).start();var _15bc=_15bb.getEvents(null);var _15bd=this.getEventName(_15bc,_15b6);var _15be=_15b9.findWidgetWindow(_15b5,_15b8).start();var _15bf=_15b9.getHierarchicalEventProvider(_15be).start();_15bc=_15bf.getEvents(null);var _15c0=this.getEventName(_15bc,_15b7);var _15c1=_15bd;var _15c2=_15c0;this.addWire(_15b3,_15c1,_15c2);}},_wireRemovedeCallback:function(_15c3,wire){if(wire.getTargetWidget().getID()==this.modelID){var _15c4=com.ibm.mm.iwidget.Utils.getMarkupID(wire.getSourceWidget().getID());var _15c5=wire.getSourceWidget().getID();var _15c6=wire.getTargetWidget().getID();var _15c7=wire.getSourceEvent();var _15c8=wire.getTargetEvent();var _15c9=com.ibm.mm.enabler.utils.Model.getCurrentPageID();var _15ca=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _15cb=_15ca.findWidgetWindow(_15c5,_15c9).start();var _15cc=_15ca.getHierarchicalEventProvider(_15cb).start();var _15cd=_15cc.getEvents(null);var _15ce=this.getEventName(_15cd,_15c7);var _15cf=_15ca.findWidgetWindow(_15c6,_15c9).start();var _15d0=_15ca.getHierarchicalEventProvider(_15cf).start();_15cd=_15d0.getEvents(null);var _15d1=this.getEventName(_15cd,_15c8);var _15d2=_15ce;var _15d3=_15d1;this.removeWire(_15c4,_15d2,_15d3);}}});}if(!dojo._hasResource["com.ibm.mm.enabler.wire.icontext.WireModelWireProviderFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.wire.icontext.WireModelWireProviderFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.wire.icontext.WireModelWireProviderFactoryImpl");dojo.declare("com.ibm.mm.enabler.wire.icontext.WireModelWireProviderFactoryImpl",com.ibm.mashups.iwidget.widget.WireProviderFactory,{constructor:function(){this.modes=[com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL];},createWireProvider:function(_15d4,_15d5){return new com.ibm.mm.enabler.wire.icontext.ReadOnlyWireModelImpl(_15d4);},getSupportedPersistenceMode:function(){return this.modes;}});com.ibm.mashups.services.ServiceManager.getService("WireProviderFactoryService").setFactory(com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL,new com.ibm.mm.enabler.wire.icontext.WireModelWireProviderFactoryImpl());}if(!dojo._hasResource["com.ibm.mm.enabler.widget.WidgetModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.widget.WidgetModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.widget.WidgetModelImpl");dojo.declare("com.ibm.mm.enabler.widget.WidgetModelImpl",[com.ibm.mashups.enabler.widget.WidgetModel,com.ibm.mm.enabler.strategy.HiddenMetaDataLoadingStrategyHelperImpl,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.model.SemaphoreHelperImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.ServiceDocConsumer],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _15d6="constructor()";var _15d7=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_15d7){this.LOGGER.entering(_15d6);}this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.definitions={};this.instances={};this.controls=new dojox.collections.ArrayList();this.windows={};this.cachedWindows={};this.urlType=com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL;this.widgetDefinitionIDByURL={};this.idService=com.ibm.mashups.enabler.services.IdentificationService;var _15d8=function(){var _15d9="WidgetModel.dirtyHandler()";var _15da=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_15da){this.LOGGER.trace(_15d9,"Widget Model has been changed. Switching to edit representation.");}var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);cs.switchToModifiablePersistenceMode();this.removeDirtyCallback(_15d8);};this.addDirtyCallback(this,dojo.hitch(this,_15d8));if(_15d7){this.LOGGER.exiting(_15d6);}},_initServiceDoc:function(){var _15db=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(_15db.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML,nsf.NS_XSI,nsf.NS_THR,nsf.NS_EVENT_DATATYPES]));this.DATATYPE_NS=this.ns[nsf.NS_EVENT_DATATYPES];this.inherited("_initServiceDoc",arguments);},_getNS:function(){this._initServiceDoc();return this.ns;},getInstance:function(){var _15dc=com.ibm.mm.enabler.widget.WidgetModelImpl._instance;return _15dc?_15dc:(com.ibm.mm.enabler.widget.WidgetModelImpl._instance=new com.ibm.mm.enabler.widget.WidgetModelImpl());},_setWidgetModelDirty:function(){this._setDirty();},find:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,id);},findWidgetWindow:function(_15dd,_15de){return new com.ibm.mm.enabler.DeferredImpl(this,this._findWidgetWindow,{"windowID":_15dd,"pageID":_15de});},getWidgetDefinitionByWindow:function(_15df){return new com.ibm.mm.enabler.DeferredImpl(this,this._getWidgetDefinitionByWindow,_15df);},getWidgetDefinitionByInstance:function(_15e0){return new com.ibm.mm.enabler.DeferredImpl(this,this._getWidgetDefinitionByInstance,_15e0);},getWidgetWindow:function(_15e1){return new com.ibm.mm.enabler.DeferredImpl(this,this._getWidgetWindow,_15e1);},isWidgetWindowCached:function(id){return (id in this.cachedWindows);},getWidgetInstance:function(_15e2){return new com.ibm.mm.enabler.DeferredImpl(this,this._getWidgetInstance,_15e2);},commit:function(){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit);},isDirty:function(){var _15e3="isDirty()";var _15e4=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_15e4){this.LOGGER.entering(_15e3);}if(_15e4){this.LOGGER.trace(_15e3,"Checking for WidgetWindows");}for(var id in this.cachedWindows){if(Object.prototype.hasOwnProperty.call(this.cachedWindows,id)){var _15e5=this.cachedWindows[id];if(_15e5._isDirty()){if(_15e4){this.LOGGER.trace(_15e3,"Window ${0} is dirty ...",_15e5.getID());}if(_15e4){this.LOGGER.exiting(_15e3,true);}return true;}}}if(_15e4){this.LOGGER.trace(_15e3,"Checking for WidgetInstances");}for(var _15e6 in this.instances){if(Object.prototype.hasOwnProperty.call(this.instances,_15e6)){var _15e7=this.instances[_15e6];if(_15e7._isDirty()){if(_15e4){this.LOGGER.trace(_15e3,"Instance ${0} is dirty ...",_15e6);}if(_15e4){this.LOGGER.exiting(_15e3,true);}return true;}}}if(_15e4){this.LOGGER.trace(_15e3,"Checking for WidgetDefinitions");}for(var defID in this.definitions){if(Object.prototype.hasOwnProperty.call(this.definitions,defID)){var _15e8=this.definitions[defID];if(_15e8._isDirty()){if(_15e4){this.LOGGER.trace(_15e3,"Definition ${0} is dirty ...",defID);}if(_15e4){this.LOGGER.exiting(_15e3,true);}return true;}}}if(_15e4){this.LOGGER.exiting(_15e3,false);}return false;},getHierarchicalPreferences:function(_15e9){return new com.ibm.mm.enabler.DeferredImpl(this,this._getHierarchicalPreferences,_15e9);},getHierarchicalEventProvider:function(_15ea){return new com.ibm.mm.enabler.DeferredImpl(this,this._getHierarchicalEventProvider,_15ea);},_find:function(_15eb,sync,id){var _15ec="_find(deferred, sync, id)";var _15ed=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_15ed){this.LOGGER.entering(_15ec,[_15eb,sync,id]);}if(!id||dojo.isString(id)){if(_15ed){this.LOGGER.trace(_15ec,"id is null or a string");}throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var _15ee;var idStr=id.getID();if(idStr in this.definitions){var _15ef=this.definitions[idStr];if(_15eb){_15eb.finish(_15ef,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_15ee=_15ef;}else{var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);myUrl.setNodes([{value:idStr,isID:true}]);myUrl.setParameter("mode","download");myUrl.setParameter("rep","full");myUrl.setParameter("levels","-all");myUrl.setParameter("events","single");this._applyHiddenMetaDataLoadingStrategyToModelURL(myUrl);var _15f0=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _15f1={};_15f1.node=null;_15f0.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var _15f2=this._getDefinitionFromFeed(data);if(!_15f2){throw new Error(dojo.string.substitute(this.modelMessages.E_WIDGET_NOTFOUND_1,[id]));}_15ee=_15f2;_15f1.node=_15f2;}if(_15eb){_15eb.finish(_15f1.node,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_15f1.status=xhr.status;}}}));if(_15f1.status){throw new Error(dojo.string.substitute(this.modelMessages.E_NODE_NOTFOUND_1,[uri,_15f1.status]));}}if(_15ed){this.LOGGER.exiting(_15ec,_15ee);}return _15ee;},_findWidgetWindow:function(_15f3,sync,_15f4){var _15f5="_findWidgetWindow(deferred, sync, idData)";var _15f6=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_15f6){this.LOGGER.entering(_15f5,[_15f3,sync,_15f4]);}if(!_15f4||!_15f4.windowID||!_15f4.pageID){if(_15f6){this.LOGGER.trace(_15f5,"id is null or a string");}throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var ids=[];ids[0]=_15f4.windowID;ids[1]=_15f4.pageID;var _15f7=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME);var _15f8=_15f7.getStrategy("com.ibm.mashups.enabler.widget.WidgetModel","com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy");if(_15f8){var skip=false;if(this.widgetWindowLoadAheadStrategyOnGoingMarker){if(sync){skip=true;}else{setTimeout(dojo.hitch(this,function(){this.__findWidgetWindow(_15f3,sync,ids);}),0);return null;}}if(!skip){try{this.widgetWindowLoadAheadStrategyOnGoingMarker=true;_15f8=_15f8.getWidgetWindowMap();if(ids[0] in _15f8){var _15f9=[];for(var id in _15f8){if(!(id in this.cachedWindows)){_15f9.push(id);}}if(_15f9.length>0){this.preLoadWidgetWindows(ids[1],_15f9);_15f7.removeStrategy("com.ibm.mashups.enabler.widget.WidgetModel","com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy");}}}catch(e){console.log(e);}this.widgetWindowLoadAheadStrategyOnGoingMarker=false;}}return this.__findWidgetWindow(_15f3,sync,ids);},__findWidgetWindow:function(_15fa,sync,ids){var _15fb="__findWidgetWindow(deferred, sync, ids)";var _15fc=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_15fc){this.LOGGER.entering(_15fb,[_15fa,sync,ids]);}if(this.widgetWindowLoadAheadStrategyOnGoingMarker){setTimeout(dojo.hitch(this,function(){this.__findWidgetWindow(_15fa,sync,ids);}),0);}var _15fd=null;if(ids[0] in this.cachedWindows){_15fd=this.cachedWindows[ids[0]];if(_15fa){_15fa.finish(_15fd,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{_15fd=this._loadFullWindowParentTree(_15fa,sync,ids,false);}if(_15fc){this.LOGGER.exiting(_15fb,_15fd);}return _15fd;},preLoadWidgetWindows:function(_15fe,_15ff){if(!com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()){return;}var _1600=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _1601=_1600.create();_1601.startTransaction(_1600.CONTEXT_ENABLER);var ids;for(var i=0,l=_15ff.length;i<l;i++){ids=[];ids[0]=_15ff[i];ids[1]=_15fe;this._loadFullWindowParentTree(null,false,ids,false);}_1601.endTransactionDeferred().start();},_getWidgetDefinitionByWindow:function(_1602,sync,_1603){var _1604="_getWidgetDefinitionByWindow(deferred, sync, widWindow)";var _1605=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1605){this.LOGGER.entering(_1604,[_1602,sync,_1603]);}if(!_1603){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var _1606;var _1607=this.getWidgetInstance(_1603).start();if(_1607){var _1608=this.getWidgetDefinitionByInstance(_1607).start();if(_1608){if(_1602){_1602.finish(_1608,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_1606=_1608;}}if(_1605){this.LOGGER.exiting(_1604,_1606);}return _1606;},_getWidgetDefinitionByID:function(_1609,sync,defID){var _160a="_getWidgetDefinitionByID(deferred, sync, instance)";var _160b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_160b){this.LOGGER.entering(_160a,[_1609,sync,instance]);}if(!defID){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var _160c=null;if(defID in this.definitions){var _160d=this.definitions[defID];if(_1609){_1609.finish(_160d,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_160c=_160d;}else{var _160e=instance._getParentHref();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_160e,this);myUrl.setParameter("mode","download");myUrl.setParameter("rep","full");myUrl.setParameter("levels","-all");myUrl.setParameter("events","single");this._applyHiddenMetaDataLoadingStrategyToModelURL(myUrl);var _160f=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _1610={};_1610.node=null;_160f.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var _1611=this._getDefinitionFromFeed(data);if(!_1611){throw new Error(dojo.string.substitute(this.modelMessages.E_WIDGET_NOTFOUND_1,[instance]));}_160c=_1611;_1610.node=_1611;}if(_1609){_1609.finish(_1610.node,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_1610.status=xhr.status;}}}));if(_1610.status){throw new Error(dojo.string.substitute(this.modelMessages.E_NODE_NOTFOUND_1,[uri,_1610.status]));}}if(_160b){this.LOGGER.exiting(_160a,_160c);}return _160c;},_getWidgetDefinitionByInstance:function(_1612,sync,_1613){var _1614="_getWidgetDefinitionByInstance(deferred, sync, instance)";var _1615=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1615){this.LOGGER.entering(_1614,[_1612,sync,_1613]);}if(!_1613){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var _1616=null;var defID;if(dojo.isString(_1613)){defID=_1613;}else{defID=_1613._getParentID();defID=this.idService.resolveID(defID);}if(defID in this.definitions){var _1617=this.definitions[defID];if(_1612){_1612.finish(_1617,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_1616=_1617;}else{var myUrl=null;if(dojo.isString(_1613)){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);myUrl.setNodes([{value:defID,isID:true}]);}else{var _1618=_1613._getParentHref();myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_1618,this);}myUrl.setParameter("mode","download");myUrl.setParameter("rep","full");myUrl.setParameter("levels","-all");myUrl.setParameter("events","single");this._applyHiddenMetaDataLoadingStrategyToModelURL(myUrl);var _1619=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _161a={};_161a.node=null;_1619.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var _161b=this._getDefinitionFromFeed(data);if(!_161b){throw new Error(dojo.string.substitute(this.modelMessages.E_WIDGET_NOTFOUND_1,[_1613]));}_1616=_161b;_161a.node=_161b;}if(_1612){_1612.finish(_161a.node,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_161a.status=xhr.status;}}}));if(_161a.status){throw new Error(dojo.string.substitute(this.modelMessages.E_NODE_NOTFOUND_1,[uri,_161a.status]));}}if(_1615){this.LOGGER.exiting(_1614,_1616);}return _1616;},_getWidgetWindow:function(_161c,sync,_161d){var _161e="_getWidgetWindow(deferred, sync, control)";var _161f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_161f){this.LOGGER.entering(_161e,[_161c,sync,_161d]);}if(!_161d){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var _1620;var index=this.controls.indexOf(_161d);if(index>-1){var _1621=this.windows[index];if(_161c){_161c.finish(_1621,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_1620=_1621;}else{var uri=_161d._getWidgetWindowURI();var _1622=null;if(!uri){_1622=_161d._getContext();if(!_1622){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(!_1622[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_ID]&&!_1622[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_URL]){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}_1620=this._getWidgetWindowByContext(_1622,_161d);if(_161c){_161c.finish(_1620,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{var ids=this._splitFullWindowID(uri);if(ids.length!=2){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(ids[0] in this.cachedWindows){_1620=this.cachedWindows[ids[0]];}else{_1620=this._loadFullWindowParentTree(_161c,sync,_161d,false);}if(_161c){_161c.finish(_1620,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}}if(_161f){this.LOGGER.exiting(_161e,_1620);}return _1620;},_loadFullWindowParentTree:function(_1623,sync,_1624,_1625){var _1626="_loadFullWindowParentTree(deferred, sync, control, idUpdateOnly)";var _1627=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1627){this.LOGGER.entering(_1626,[_1623,sync,_1624,_1625]);}if(typeof _1625=="undefined"){_1625=false;}var _1628=null;var ids;if(!dojo.isArray(_1624)){var uri=_1624._getWidgetWindowURI();ids=this._splitFullWindowID(uri);if(ids.length!=2){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}}else{ids=_1624;}var _1629=ids[0];var _162a=ids[1];var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);myUrl.setNodes([{value:_1629,isID:true},{value:_162a,isID:true}]);myUrl.setParameter("mode","download");myUrl.setParameter("rep","full");myUrl.setParameter("levels","-all");myUrl.setParameter("events","single");this._applyHiddenMetaDataLoadingStrategyToModelURL(myUrl);var _162b=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _162c={};_162c.node=null;_162b.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var _162d=this._getWindowFromFeed(data,_1624,_1625);if(!_162d){throw new Error(dojo.string.substitute(this.modelMessages.E_WIDGET_NOTFOUND_1,[_1624]));}_1628=_162d;_162c.node=_162d;this._getInstanceFromFeed(data,_1625);this._getDefinitionFromFeed(data,_1625);}if(_1623){_1623.finish(_162c.node,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_162c.status=xhr.status;}}}));if(_1627){this.LOGGER.exiting(_1626,_1628);}return _1628;},_getWidgetInstance:function(_162e,sync,_162f){var _1630="_getWidgetInstance(deferred, sync, widWindow)";var _1631=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1631){this.LOGGER.entering(_1630,[_162e,sync,_162f]);}if(!_162f){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var _1632;var _1633=_162f._getParentID();if(_1633 in this.instances){var _1634=this.instances[_1633];if(_162e){_162e.finish(_1634,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_1632=_1634;}else{var _1635=_162f._getParentHref();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_1635,this);myUrl.setParameter("mode","download");myUrl.setParameter("rep","full");myUrl.setParameter("levels","-all");myUrl.setParameter("events","single");this._applyHiddenMetaDataLoadingStrategyToModelURL(myUrl);var _1636=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _1637={};_1637.node=null;_1636.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var _1638=this._getInstanceFromFeed(data);if(!_1638){throw new Error(dojo.string.substitute(this.modelMessages.E_WIDGET_NOTFOUND_1,[window]));}this._getDefinitionFromFeed(data);_1632=_1638;_1637.node=_1638;}if(_162e){_162e.finish(_1637.node,xhr.status);}if(sync&&type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){_1637.status=xhr.status;}}}));if(_1637.status){throw new Error(dojo.string.substitute(this.modelMessages.E_NODE_NOTFOUND_1,[uri,_1637.status]));}}if(_1631){this.LOGGER.exiting(_1630,_1632);}return _1632;},_commit:function(_1639,sync){var _163a="_commit(deferred, sync)";var _163b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_163b){this.LOGGER.entering(_163a,[_1639,sync]);}this._initSemaphore();this._acquire();this.statusCode=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK;if(!this.isDirty()){if(_163b){this.LOGGER.trace(_163a,"Model isn't dirty, exiting");}this._release(_1639,this.statusCode);if(_163b){this.LOGGER.exiting(_163a);}return;}var id,_163c,_163d,_163e,defID,_163f;if(_163b){this.LOGGER.trace(_163a,"Checking for WidgetWindows to commit");}var _1640=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _1641=_1640.create();_1641.startTransaction(_1640.CONTEXT_ENABLER);for(id in this.cachedWindows){if(Object.prototype.hasOwnProperty.call(this.cachedWindows,id)){_163c=this.cachedWindows[id];if((_163c._isDirty())&&(!this.idService.isClientID(_163c.getID()))){if(_163b){this.LOGGER.trace(_163a,"Window ${0} is dirty, committing ...",_163c.getID());}this._commitWidgetModelNode(_1639,sync,_163c);_163c._setClean();}}}if(_163b){this.LOGGER.trace(_163a,"Checking for WidgetInstances to commit");}for(_163d in this.instances){if(Object.prototype.hasOwnProperty.call(this.instances,_163d)){_163e=this.instances[_163d];if(_163e._type&&_163e._type=="window"&&_163e._isDirty()&&(!this.idService.isClientID(_163e.getID()))){if(_163b){this.LOGGER.trace(_163a,"Instance ${0} is dirty, committing ...",_163d);}this._commitWidgetModelNode(_1639,sync,_163e);_163e._setClean();}}}_1641.endTransactionDeferred().start();var _1640=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _1641=_1640.create();_1641.startTransaction(_1640.CONTEXT_ENABLER);if(_163b){this.LOGGER.trace(_163a,"Checking for WidgetInstances to commit");}for(_163d in this.instances){if(Object.prototype.hasOwnProperty.call(this.instances,_163d)){_163e=this.instances[_163d];if((!_163e._type||_163e._type!="window")&&_163e._isDirty()&&(!this.idService.isClientID(_163e.getID()))){if(_163b){this.LOGGER.trace(_163a,"Instance ${0} is dirty, committing ...",_163d);}this._commitWidgetModelNode(_1639,sync,_163e);_163e._setClean();}}}if(_163b){this.LOGGER.trace(_163a,"Checking for WidgetDefinitions to commit");}for(defID in this.definitions){if(Object.prototype.hasOwnProperty.call(this.definitions,defID)){_163f=this.definitions[defID];if(_163f._isDirty()&&(!this.idService.isClientID(_163f.getID()))){if(_163b){this.LOGGER.trace(_163a,"Definition ${0} is dirty, committing ...",defID);}this._commitWidgetModelNode(_1639,sync,_163f);_163f._setClean();}}}_1641.endTransactionDeferred().start();this._release(_1639,this.statusCode);this._setClean();if(_163b){this.LOGGER.exiting(_163a);}},_commitWidgetModelNode:function(_1642,sync,node){var _1643="_commitWidgetModelNode(deferred, sync, node)";var _1644=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1644){this.LOGGER.entering(_1643,[_1642,sync,node]);}var _1645=null;var _1646=null;var id=null;if(node._type=="window"){id=node.entity.getID();if(this.idService.isClientID(id)){var _1647=this._createNewPersNttyOnServer(_1642,node);if(!_1647){return;}if(_1644){this.LOGGER.trace(_1643,"The ID for the newly created entity is ${0}",_1647);}node._setRawEntityID(_1647);id=com.ibm.mm.enabler.IdentifiableHelper.getID(_1647);}_1645=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);_1645.setNodes([{value:id,isID:true}]);_1646=node.entity.xmlData;}else{try{_1645=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(node.getEditLink(),this);}catch(err){id=node.getID();_1645=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);_1645.setNodes([{value:id,isID:true}]);}_1646=node.xmlData;}_1645.setParameter("update","replace");_1645.setParameter("rep","full");_1645.setParameter("events","single");var _1648=com.ibm.mm.enabler.utils.Dom.innerXML(_1646);this._acquire();serviceReq=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1645,null,null,false,sync);serviceReq.update(_1648,dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD&&data){if(node._type=="window"){var _1649=this._getInstanceFromFeed(data,true);if(_1649){node.entity.xmlData=_1649.xmlData;}}else{if(node._type=="instance"){var _164a=this._getInstanceFromFeed(data,true);if(_164a){node.xmlData=_164a.xmlData;}}else{if(node._type=="definition"){var def=this._getDefinitionFromFeed(data,true);if(def){node.xmlData=def.xmlData;}}}}node._updateEventsFromXML();}var _164b=_1642.getOperationCallback();if(_164b){_164b(node,com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status,_1642.operationCallbackParameters);}this._release(_1642,xhr.status);}),id);if(_1644){this.LOGGER.exiting(_1643);}},_createNewPersNttyOnServer:function(_164c,_164d){var ns=this._getNS();var _164e=_164d.xmlData.ownerDocument;var _164f=_164d._getParentID();var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns.atom);var id=com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns.atom);com.ibm.mm.enabler.utils.Dom.textContent(id,"cid:0");entry.appendChild(id);var _1650=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_1650.setAttribute("type","application/xml");entry.appendChild(_1650);var _1651=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);_1651.setNodes([{value:_164f,isID:true}]);_1651.setParameter("rep","full");_1651.setParameter("events","single");var _1652=com.ibm.mm.enabler.utils.Utils.createNode("model:portlet-entity",this.ns.model);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_164e,_1652,"creation-context:portlet-entity","portlet-entity",this.ns["creation-context"],_1651.getModelURI());_1650.appendChild(_1652);var _1653=com.ibm.mm.enabler.utils.Dom.innerXML(entry);var _1654=null;this._acquire();serviceReq=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1651,null,null,false,true);serviceReq.create(_1653,dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD&&data){var expr="atom:feed/atom:entry[atom:content/model:portlet-entity]/atom:id";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);if(node){_1654=com.ibm.mm.enabler.utils.Dom.textContent(node);}}var _1655=_164c.getOperationCallback();if(_1655){_1655(_1654,com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,_164c.operationCallbackParameters);}this._release(_164c,xhr.status);}),id);return _1654;},_getHierarchicalPreferences:function(_1656,sync,_1657){var _1658;if(_1657&&_1657._getHierarchicalPreferences){preferences=_1657._getHierarchicalPreferences();}else{preferences=_1657.getPreferences();}if(_1656){_1656.finish(preferences,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return preferences;},_getHierarchicalEventProvider:function(_1659,sync,_165a){var ep;if(_165a&&_165a._getHierarchicalEventProvider){ep=_165a._getHierarchicalEventProvider();}else{ep=_165a;}if(_1659){_1659.finish(ep,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return ep;},_updateLayoutControl:function(_165b,sync){var uri=_165b._getWidgetWindowURI();if(!uri){return;}var index=this.controls.indexOf(_165b);if(index==-1){return;}var _165c=this.windows[index];this._updateFullWindowParentTree(_165c,_165b,sync);},_updateFullWindowParentTree:function(wnd,_165d,sync){var uri=_165d._getWidgetWindowURI();var ids=this._splitFullWindowID(uri);if(ids.length!=2){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var _165e=ids[0];var _165f=ids[1];var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);myUrl.setNodes([{value:_165e,isID:true},{value:_165f,isID:true}]);myUrl.setParameter("mode","download");myUrl.setParameter("rep","full");myUrl.setParameter("levels","-all");myUrl.setParameter("events","single");this._applyHiddenMetaDataLoadingStrategyToModelURL(myUrl);var _1660=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _1661={};_1661.node=null;_1660.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var _1662=this._getWindowFromFeed(data,_165d,true);if(!_1662){throw new Error(dojo.string.substitute(this.modelMessages.E_WIDGET_NOTFOUND_1,[_165d]));}var oldID=wnd.getID();var newID=_1662.getID();wnd._setRawID(_1662._getRawID());this.idService.attachServerID(oldID,newID);var _1663=this.getWidgetInstance(wnd).start();var _1664=this._getInstanceFromFeed(data,true);this._copyWidgetStateInfo(oldID,newID);delete this.instances[_1663.getID()];_1663._setRawID(_1664._getRawID());this.instances[_1663.getID()]=_1663;wnd._setEntityParent(_1663,this.urlType);var def=this.getWidgetDefinitionByInstance(_1663).start();var _1665=this._getDefinitionFromFeed(data,true);if(def.getID()!=_1665.getID()){var oldID=def.getID();delete this.definitions[def.getID()];def._setRawID(_1665._getRawID());this.definitions[def.getID()]=def;_1663._setParent(_1663,def,this.urlType);var newID=def.getID();this.idService.attachServerID(oldID,newID);if(def._updateEventsFromXML){def._updateEventsFromXML(_1665.xmlData);}}}}));},_copyWidgetStateInfo:function(oldID,newID){var _1666=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1667=com.ibm.mashups.enabler.model.state.AccessorFactory;var _1668=_1667.getWidgetAccessor(_1666,oldID),_1669=_1667.getWidgetAccessor(_1666,newID);dojo.forEach(["WidgetMode","WindowState","Size"],function(part){this._copyWidgetStatePart(_1668,_1669,part);},this);_1666.commit().start();},_copyWidgetStatePart:function(_166a,_166b,part){switch(part){case "WidgetMode":case "WindowState":var value=_166a["get"+part]();if(value){_166b["set"+part](value);}break;case "Size":var size=_166a.getSize();if(size){_166b.setSize(size.w,size.h);}break;default:}},_getWidgetWindowByContext:function(_166c,_166d){var _166e="_getWidgetWindowByContext(context, control)";var _166f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_166f){this.LOGGER.entering(_166e,[_166c,_166d]);}var _1670=this._getWidgetDefinitionByContext(_166c);var _1671=this._createWidgetInstance(_1670);var _1672=this._createWidgetWindow(_1671,_166d.getID());var index=this.controls.indexOf(_166d);if(index>-1){throw new Error(this.modelMessages.E_PARAM_IS_SMALLER_ZERO_0);}else{this.controls.add(_166d);var _1673=_166d;var me=this;dojo.connect(_166d,"setXml",this,function(){var _1674=com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled();var _1675=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME);var _1676=_1675.getStrategy("com.ibm.mashups.enabler.widget.WidgetModel","com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy");if((_1676)&&(_1674)){var map=_1676.getWidgetWindowMap();if(!_1676.listener){_1676.listener=dojo.connect(_1675,"removeStrategy",this,function(_1677,_1678){if((_1677=="com.ibm.mashups.enabler.widget.WidgetModel")&&(_1678=="com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy")){if(!com.ibm.mm.enabler.utils.Misc.isEmpty(map)){var _1679=com.ibm.mashups.enabler.services.IdentificationService;var _167a=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _167b=_167a.create();_167b.startTransaction(_167a.CONTEXT_ENABLER);for(var id in map){if(_1679.isServerID(id)){var _167c=map[id];if(_167c){me._updateLayoutControl(_167c,false);}}}_167b.endTransactionDeferred().start();for(var id in map){delete map[id];}}dojo.disconnect(_1676.listener);delete _1676.listener;}});}var _167d=_1673.getID();var value=map[_167d];if(typeof value=="undefined"){for(var id in map){var _167e=map[id];if((_167e)&&(_167e.getID()==_167d)){map[_167d]=_167e;delete map[id];break;}}}var _167f=com.ibm.mashups.enabler.services.IdentificationService;var _1680=false;for(var id in map){if(!_167f.isServerID(id)){_1680=true;break;}}if(!_1680){var _1681=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _1682=_1681.create();_1682.startTransaction(_1681.CONTEXT_ENABLER);for(var id in map){var _167e=map[id];if(_167e){me._updateLayoutControl(_167e,false);}}_1682.endTransactionDeferred().start();for(var id in map){delete map[id];}}}else{me._updateLayoutControl(_1673,true);}});index=this.controls.indexOf(_166d);this.windows[index]=_1672;this.cachedWindows[_1672.getID()]=_1672;}this.definitions[_1670.getID()]=_1670;this.instances[_1671.getID()]=_1671;var _1683=_1672;if(_166f){this.LOGGER.exiting(_166e,_1683);}return _1683;},_getWidgetDefinitionByContext:function(_1684){var _1685="_getWidgetDefinitionByContext(context)";var _1686=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1686){this.LOGGER.entering(_1685,[_1684]);}var _1687=null;var _1688=_1684[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_ID];var url=_1684[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_URL];if(_1688){_1687=this._getWidgetDefinitionByInstance(null,true,_1688.getID());}else{if(url){_1687=this._getWidgetDefinitionFromURL(url);}}if(_1686){this.LOGGER.exiting(_1685,_1687);}return _1687;},_getWidgetDefinitionFromURL:function(url){var id=this.widgetDefinitionIDByURL[url];if(id){var def=this.find(new com.ibm.mm.enabler.IdentifierImpl(id)).start();if(def){return def;}}var scope=com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL;var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(scope,this);myUrl.setNodes([{value:"collection",isID:false}]);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_FILTER_BY_URL,url);var _1689=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,true);var _168a={};_1689.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var _168b=this._getDefinitionFromFeed(data);if(_168b){this.widgetDefinitionIDByURL[url]=_168b.getID();}}}));var id=this.widgetDefinitionIDByURL[url];if(id){var def=this.find(new com.ibm.mm.enabler.IdentifierImpl(id)).start(true);if(def){return def;}}var _168c=com.ibm.mashups.services.ServiceManager.getService("widgetLoadService");var _168d;_168c.getWidgetXML(url,true,function(data,_168e,xhr){if(typeof xhr!="undefined"&&xhr!==null){_168e=xhr.status;}if(_168e!=200){data=null;}_168d=data;});if(_168d===null){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var _168f=this._createWidgetDefinition(_168d,url);if(_168f){this.widgetDefinitionIDByURL[url]=_168f.getID();}return _168f;},_createWidgetDefinition:function(_1690,url){var _1691="_createWidgetDefinition(iWidgetDefinition, url)";var _1692=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1692){this.LOGGER.entering(_1691,[_1690,url]);}var _1693=this._createWidgetNode(_1690.getSupportedModes());var _1694=this._createDefinitionNode(new com.ibm.mm.enabler.IdentifierImpl(_1693));var def=new com.ibm.mm.enabler.widget.WidgetDefinitionImpl(_1694,_1693,this);def._setURL(url);def._addDirtyCallback(this,this._setWidgetModelDirty);var _1695=_1690.widgetDef;if(_1695&&dojo.isFunction(_1695.getType)&&_1695.getType()===com.ibm.mm.iwidget.Constants.OSGADGET_DEFINITION_TYPE){var _1696=["view"];def._setSupportedModes(_1696);def._setType(_1695.getType());}else{if(typeof this.widgetDefinitionCache=="undefined"){this.widgetDefinitionCache={};}var entry;if((url)&&(url in this.widgetDefinitionCache)){entry=this.widgetDefinitionCache[url];}else{var _1697=_1690.toSpecObject();var _1698="false";if(_1697._sandbox&&_1697._sandbox.toLowerCase()==="true"){_1698="true";}entry=[];entry.push("<atom:entry");for(var ns in this.ns){if(ns.indexOf("xml")!==0){entry.push(" xmlns:"+ns+"=\""+this.ns[ns]+"\"");}}entry.push(">");var _1699=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:content",def.xmlData,this.ns);def.xmlData.removeChild(_1699);while(def.xmlData.firstChild){entry.push(com.ibm.mm.enabler.utils.Dom.innerXML(def.xmlData.firstChild));def.xmlData.removeChild(def.xmlData.firstChild);}entry.push("<atom:content type=\"application/xml\">");entry.push("<model:portlet-definition model:sandboxed=\""+_1698+"\" model:type=\"iWidget\" model:url=\""+url+"\">");if(_1697.itemSets.idescriptor&&_1697.itemSets.idescriptor.items&&_1697.itemSets.idescriptor.items.title){var title=_1697.itemSets.idescriptor.items.title;var lang=title._lang;entry.push("<model:title>");entry.push("<base:nls-string xml:lang=\""+title._lang+"\">"+title._value+"</base:nls-string>");var _169a=title.alts;for(var alt in _169a){if(lang!=alt){entry.push("<base:nls-string xml:lang=\""+_169a[alt]._lang+"\">"+_169a[alt]._value+"</base:nls-string>");}}entry.push("</model:title>");}if(_1697.itemSets.idescriptor&&_1697.itemSets.idescriptor.items&&_1697.itemSets.idescriptor.items.description){var _169b=_1697.itemSets.idescriptor.items.description;var lang=_169b._lang;entry.push("<model:description>");entry.push("<base:nls-string xml:lang=\""+_169b._lang+"\">"+_169b._value+"</base:nls-string>");var _169c=_169b.alts;for(var alt in _169c){if(lang!=alt){entry.push("<base:nls-string xml:lang=\""+_169c[alt]._lang+"\">"+_169c[alt]._value+"</base:nls-string>");}}entry.push("</model:description>");}var _169d=_1697.itemSets.attributes;if(_169d){var prefs=def.getPreferences();for(var _169e in _169d.items){if(Object.prototype.hasOwnProperty.call(_169d.items,_169e)){var item=_169d.items[_169e];var _169f="false";if(item._readOnly&&item._readOnly==="true"){_169f="true";}entry.push("<model:portletpreferences name=\""+dojox.html.entities.encode(_169e)+"\" read-only=\""+_169f+"\"><base:value value=\""+dojox.html.entities.encode(item._value)+"\" xsi:type=\"base:String\"/></model:portletpreferences>");}}prefs._setClean();}entry.push("<model:events>");var _16a0=function(_16a1){var id="cid:"+name;entry.push("<model:"+((_16a1)?"publish-event":"process-event")+" id=\""+id+"\">");var _16a2=function(_16a3,value,_16a4){var nsUri=null;var _16a5=null;var _16a6=value.indexOf("{");if(_16a6===0){var nsEnd=value.indexOf("}");if(nsEnd==-1){if(_16a4){nsUri=this.DATATYPE_NS;}_16a5=value;}else{nsUri=value.substring(_16a6+1,nsEnd);_16a5=value.substring(nsEnd+1);}}else{if(_16a4){nsUri=this.DATATYPE_NS;}_16a5=value;}if(nsUri!=null){return "<model:"+_16a3+" xmlns:ns=\""+nsUri+"\">ns:"+_16a5+"</model:"+_16a3+">";}else{return "<model:"+_16a3+">"+_16a5+"</model:"+_16a3+">";}};entry.push(dojo.hitch(this,_16a2)("qname",name,false));entry.push(dojo.hitch(this,_16a2)("payload-type",_16a7._payloadType,true));var lang=null;var _16a8=false;if(_16a7._title){lang=_16a7._lang;entry.push("<model:title>");_16a8=true;entry.push("<base:nls-string xml:lang=\""+_16a7._lang+"\">"+_16a7._title+"</base:nls-string>");}for(var alt in _16a7.alts){if((_16a7.alts[alt]._title)&&(lang!=alt)){if(!_16a8){entry.push("<model:title>");_16a8=true;}entry.push("<base:nls-string xml:lang=\""+_16a7.alts[alt]._lang+"\">"+_16a7.alts[alt]._title+"</base:nls-string>");}}if(_16a8){entry.push("</model:title>");}lang=null;_16a8=false;if(_16a7._description){lang=_16a7._lang;entry.push("<model:description>");_16a8=true;entry.push("<base:nls-string xml:lang=\""+_16a7._lang+"\">"+_16a7._description+"</base:nls-string>");}for(var alt in _16a7.alts){if((_16a7.alts[alt]._title)&&(lang!=alt)){if(!_16a8){entry.push("<model:description>");_16a8=true;}entry.push("<base:nls-string xml:lang=\""+_16a7.alts[alt]._lang+"\">"+_16a7.alts[alt]._description+"</base:nls-string>");}}if(_16a8){entry.push("</model:description>");}entry.push("</model:"+((_16a1)?"publish-event":"process-event")+">");};for(var _16a9 in _1697.events){if(Object.prototype.hasOwnProperty.call(_1697.events,_16a9)){var _16aa=_1697.events[_16a9];var name,event,alias=null;if(_16aa._alias){alias=_16aa._alias;name=_16aa._id;}else{name=_16aa._id;}var _16ab=(_16aa._eventDescName)?_16aa._eventDescName:_16aa._description;if(!_16ab){continue;}var _16a7=_1697.eventDescriptions[_16ab];if(!_16a7){continue;}if(_16aa._published){dojo.hitch(this,_16a0)(true);}if(_16aa._handled){dojo.hitch(this,_16a0)(false);}}}entry.push("</model:events>");var _16ac={view:"view",edit:"edit_defaults",personalize:"edit",config:"config",help:"help"};var _16ad=_1697._supportedModes;if(_16ad===undefined||_16ad===null){_16ad="view";}var modes=_16ad.split(" ");entry.push("<model:supports><model:mime-type>html</model:mime-type>");for(var i=0,l=modes.length;i<l;i++){var _16ae=modes[i];if(modes[i] in _16ac){_16ae=_16ac[modes[i]];}entry.push("<model:portlet-mode>"+_16ae+"</model:portlet-mode>");}entry.push("</model:supports>");entry.push("</model:portlet-definition>");entry.push("</atom:content>");entry.push("</atom:entry>");entry=entry.join("");if(url){this.widgetDefinitionCache[url]=entry;}}def.xmlData=com.ibm.mm.enabler.utils.Dom.createDocument(entry).firstChild;def._setClean();}if(_1692){this.LOGGER.exiting(_1691,def);}return def;},_createWidgetInstance:function(_16af){var _16b0=this._createEntityNode(_16af);return new com.ibm.mm.enabler.widget.WidgetInstanceImpl(_16b0,this);},_createWidgetWindow:function(_16b1,newID){var _16b2=this._createEntityNode(_16b1);var _16b3=new com.ibm.mm.enabler.IdentifierImpl(_16b2);var _16b4=this._createWindowNode(_16b3,newID);return new com.ibm.mm.enabler.widget.WidgetWindowImpl(_16b4,_16b2,this);},_createModelNode:function(type,_16b5,newID){var ns=this._getNS();var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns.atom);var _16b6=entry.ownerDocument;var id=com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns.atom);com.ibm.mm.enabler.utils.Dom.textContent(id,"cid:"+(newID?newID:this.idService.createClientID()));entry.appendChild(id);entry.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("atom:title",this.ns.atom));var _16b7=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",this.ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_16b7,time.toGMTString());entry.appendChild(_16b7);var _16b8=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_16b8.setAttribute("type","application/xml");var _16b9=com.ibm.mm.enabler.utils.Utils.createNode("model:"+type,this.ns.model);_16b8.appendChild(_16b9);entry.appendChild(_16b8);if(_16b5){var _16ba=com.ibm.mm.enabler.utils.Utils.createNode("thr:in-reply-to",this.ns.thr);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_16b6,_16ba,"ext:uri","uri",this.ns.ext,_16b5._getRawID());_16ba.setAttribute("ref",_16b5._getRawID());_16ba.setAttribute("href","#");var _16bb=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns.atom);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_16b6,_16bb,"ext:uri","uri",this.ns.ext,_16b5._getRawID());_16bb.setAttribute("rel","related");_16bb.setAttribute("type","application/atom+xml");_16bb.setAttribute("href","#");entry.appendChild(_16ba);entry.appendChild(_16bb);}return entry;},_createWindowNode:function(_16bc,newID){return this._createModelNode("portlet-window",_16bc,newID);},_createEntityNode:function(_16bd){return this._createModelNode("portlet-entity",_16bd);},_createWidgetNode:function(modes){if(modes.length===0){return null;}var ns=this._getNS();var _16be=this._createModelNode("portlet");var expr="atom:content/model:portlet";var _16bf=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_16be,this.ns);if(!_16bf){return null;}var _16c0=com.ibm.mm.enabler.utils.Utils.createNode("model:supports",this.ns.model);_16bf.appendChild(_16c0);var _16c1=com.ibm.mm.enabler.utils.Utils.createNode("model:mime-type",this.ns.model);com.ibm.mm.enabler.utils.Dom.textContent(_16c1,"html");_16c0.appendChild(_16c1);var _16c2=modes.length;for(var i=0;i<_16c2;++i){var _16c3=com.ibm.mm.enabler.utils.Utils.createNode("model:portlet-mode",this.ns.model);com.ibm.mm.enabler.utils.Dom.textContent(_16c3,modes[i]);_16c0.appendChild(_16c3);}return _16be;},_createDefinitionNode:function(_16c4){return this._createModelNode("portlet-definition",_16c4);},_createPersonalizedNttyNode:function(_16c5){var entry=this._createEntityNode();var ns=this._getNS();var expr="thr:in-reply-to";var _16c6=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_16c5,this.ns)||null;expr="atom:link[@rel='related']";var _16c7=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_16c5,this.ns)||null;if(dojo.isWebKit){_16c6=_16c6.cloneNode(true);_16c7=_16c7.cloneNode(true);}entry.appendChild(_16c6);entry.appendChild(_16c7);return entry;},_splitFullWindowID:function(_16c8){var parts=_16c8.split("@");if(parts.length!=2){return null;}var _16c9=parts[0].split(":");var _16ca=parts[1].split(":");var _16cb=_16c9[_16c9.length-1];var _16cc=_16ca[_16ca.length-1];return [_16cb,_16cc];},_getPersonalizedEntity:function(feed,uri){var ns=this._getNS();var expr="atom:feed/atom:entry[atom:content/model:portlet-entity]";var _16cd=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,feed,this.ns);var _16ce=null;if(!_16cd||_16cd.length==1){return null;}expr="atom:feed/atom:entry[contains(atom:id/child::text(),'"+uri+"')]";var _16cf=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,feed,this.ns);return _16cf||null;},_getWindowFromFeed:function(feed,_16d0,_16d1){var ns=this._getNS();var expr="atom:feed/atom:entry[atom:content/model:portlet-window]";var _16d2=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,feed,this.ns);var _16d3=null;if(_16d2){expr="thr:in-reply-to";var link=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_16d2,this.ns);var _16d4=null;if(link){var uri=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(link,"ext:uri","uri",this.ns.ext);_16d4=this._getPersonalizedEntity(feed,uri);if(!_16d4){_16d4=this._createPersonalizedNttyNode(_16d2);}}if(!_16d1){var index=this.controls.indexOf(_16d0);var wnd;if(index>-1){var oldID=this.windows[index].getID();this.windows[index]._setXMLData(_16d2,_16d4);var newID=this.windows[index].getID();if(oldID!==newID){delete this.cachedWindows[oldID];this.cachedWindows[newID]=this.windows[index];}wnd=this.windows[index];}else{wnd=new com.ibm.mm.enabler.widget.WidgetWindowImpl(_16d2,_16d4,this);if(!dojo.isArray(_16d0)){this.controls.add(_16d0);index=this.controls.indexOf(_16d0);this.windows[index]=wnd;}var id=wnd.getID();this.cachedWindows[id]=wnd;}_16d3=wnd;}else{_16d3=new com.ibm.mm.enabler.widget.WidgetWindowImpl(_16d2,_16d4,this);}}return _16d3;},_getInstanceFromFeed:function(feed,_16d5){var ns=this._getNS();var expr="atom:feed/atom:entry[atom:content/model:portlet-entity]";var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,feed,this.ns);var _16d6=null;if(!nodes){return null;}var _16d7=null;var _16d8;if(nodes.length==1){_16d7=nodes[0];}else{var _16d9={};var _16da=nodes.length;var i;for(i=0;i<_16da;++i){_16d8=new com.ibm.mm.enabler.IdentifierImpl(nodes[i]);var id=_16d8.getID();_16d9[id]=null;}for(i=0;i<_16da;++i){var _16db=nodes[i];var _16dc=com.ibm.mm.enabler.widget.utils.getParentLink(_16db,this.ns);var _16dd=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_16dc);if(!(_16dd in _16d9)){_16d7=_16db;break;}}}if(!_16d5){_16d8=new com.ibm.mm.enabler.IdentifierImpl(_16d7);var _16de=_16d8.getID();_16d8=null;if(_16de in this.instances){this.instances[_16de]._setXMLData(_16d7);}else{this.instances[_16de]=new com.ibm.mm.enabler.widget.WidgetInstanceImpl(_16d7,this);}return this.instances[_16de];}return new com.ibm.mm.enabler.widget.WidgetInstanceImpl(_16d7,this);},_allChildElementsOfTagName:function(node,name){var _16df="_allChildElementsOfTagName(node, name)";var _16e0=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_16e0){this.LOGGER.entering(_16df,[node,name]);}var _16e1=true;var child;for(var i=0;i<node.childNodes.length;i++){child=node.childNodes[i];if(child.nodeName!=name){_16e1=false;if(_16e0){this.LOGGER.exiting(_16df,_16e1);}return _16e1;}}if(_16e0){this.LOGGER.exiting(_16df,_16e1);}return _16e1;},_getDefinitionFromFeed:function(feed,_16e2){var _16e3="_getDefinitionFromFeed(feed, skipCacheUpdate)";var _16e4=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_16e4){this.LOGGER.entering(_16e3,[feed,_16e2]);}var ns=this._getNS();var expr="atom:feed/atom:entry[atom:content/model:portlet-definition]";var _16e5=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,feed,this.ns);var _16e6=null;var url=null;if(_16e5){expr="atom:content/model:portlet-definition";var _16e7=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_16e5,this.ns);if(_16e7.childElementCount==0||this._allChildElementsOfTagName(_16e7,"model:portletpreferences")){url=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_16e7,"model:url","url",this.ns.model);if(_16e4){this.LOGGER.trace(_16e3,"partial managed data from server; loading widget definition from widget xml file at ${0}",url);}var id=this.widgetDefinitionIDByURL[url];if(id){if(this.definitions[id]){return this.definitions[id];}}var _16e8=com.ibm.mashups.services.ServiceManager.getService("widgetLoadService");var _16e9;_16e8.getWidgetXML(url,true,function(data,_16ea,xhr){if(typeof xhr!="undefined"&&xhr!==null){_16ea=xhr.status;}if(_16ea!=200){data=null;}_16e9=data;});if(_16e9===null){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var _16eb=this._createWidgetDefinition(_16e9,url);expr="atom:content/model:portlet-definition";var _16ec=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_16eb.xmlData,this.ns);var _16ed;var child;var _16ee=false;while(_16ec.firstChild){_16ed=_16ec.firstChild;_16ee=false;if(_16ed.nodeName=="model:portletpreferences"){for(var j=0;j<_16e7.childNodes.length;j++){child=_16e7.childNodes[j];if((child.nodeName=="model:portletpreferences")&&(child.getAttribute("name")==_16ed.getAttribute("name"))){_16ee=true;if(_16e4){this.LOGGER.trace(_16e3,"duplicate portletpreference for ${0} found; using config one from feed; ignoring edit one from widget xml",child.getAttribute("name"));}break;}}}if(!_16ee){var _16ef=_16ed;if(dojo.isWebKit){var _16f0=function(node){var _16f1=node.cloneNode(false);for(var x=0,l=node.childNodes.length;x<l;x++){_16f1.appendChild(_16f0(node.childNodes[x]));}return _16f1;};_16ef=_16f0(_16ed);_16ec.removeChild(_16ed);}_16e7.appendChild(_16ef);}else{_16ec.removeChild(_16ed);}}var _16f2=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_16ec,"model:sandboxed","sandboxed",this.ns.model);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(feed,_16e7,"model:sandboxed","sandboxed",this.ns.model,_16f2);}expr="atom:feed/atom:entry[atom:content/model:portlet]";var _16f3=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,feed,this.ns)||null;if(!_16e2){var _16f4=new com.ibm.mm.enabler.IdentifierImpl(_16e5);var defID=_16f4.getID();if(defID in this.definitions){this.definitions[defID]._setXMLData(_16e5,_16f3);}else{this.definitions[defID]=new com.ibm.mm.enabler.widget.WidgetDefinitionImpl(_16e5,_16f3,this);}_16e6=this.definitions[defID];if(url){this.widgetDefinitionIDByURL[url]=defID;}}else{_16e6=new com.ibm.mm.enabler.widget.WidgetDefinitionImpl(_16e5,_16f3,this);}}if(_16e4){this.LOGGER.exiting(_16e3,_16e6);}return _16e6;},_getParent:function(_16f5){if(!_16f5._type){return null;}var type=_16f5._type;var _16f6=null;if(type=="window"){_16f6=this.getWidgetInstance(_16f5).start();}else{if(type=="instance"){_16f6=this.getWidgetDefinitionByInstance(_16f5).start();}else{_16f6=null;}}return _16f6;},discard:function(){this.definitions={};this.instances={};this.controls.clear();this.windows={};this.cachedWindows={};this._setClean();},invalidate:function(){this.discard();}});}if(!dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetModel"]){dojo._hasResource["com.ibm.mashups.enabler.widget.WidgetModel"]=true;dojo.provide("com.ibm.mashups.enabler.widget.WidgetModel");}if(!dojo._hasResource["com.ibm.mm.enabler.DeferredDataComposerImpl"]){dojo._hasResource["com.ibm.mm.enabler.DeferredDataComposerImpl"]=true;dojo.provide("com.ibm.mm.enabler.DeferredDataComposerImpl");dojo.declare("com.ibm.mm.enabler.DeferredDataComposerImpl",null,{_dataFromXhr:function(xhr){return {responseText:xhr.responseText,statusCode:xhr.status};}});com.ibm.mm.enabler.DeferredDataComposer=new com.ibm.mm.enabler.DeferredDataComposerImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.DefaultLocalizedXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.DefaultLocalizedXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.DefaultLocalizedXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.DefaultLocalizedXmlImpl",[com.ibm.mashups.enabler.ModifiableLocalized,com.ibm.mm.enabler.ac.EffectiveAccessImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _16f7=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.dli_ns=dojo.delegate(_16f7.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_XML]));this._DEFAULT_TITLE="atom:title";this._DEFAULT_DESCRIPTION="atom:summary";this._DEFAULT_LOCALE=this._DEFAULT_TITLE+"/@xml:lang";},getDefaultLocale:function(){return com.ibm.mashups.enabler.xml.XPath.evaluateString(this._DEFAULT_LOCALE,this.xmlData,this.dli_ns)||null;},getDefaultTitle:function(){var title=com.ibm.mashups.enabler.xml.XPath.evaluateString(this._DEFAULT_TITLE,this.xmlData,this.dli_ns);if(title===""){title=null;}return title;},getDefaultDescription:function(){var _16f8=com.ibm.mashups.enabler.xml.XPath.evaluateString(this._DEFAULT_DESCRIPTION,this.xmlData,this.dli_ns);if(_16f8===""){_16f8=null;}return _16f8;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.NextLinkProviderXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.NextLinkProviderXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.NextLinkProviderXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.NextLinkProviderXmlImpl",[com.ibm.mashups.enabler.NextLinkProvider],{constructor:function(node){this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns_nlp=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM]));},_getNextURI:function(){var _16f9=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(com.ibm.mm.enabler.utils.Atom._LINK,this.xmlData,this.ns_nlp);if(node){_16f9=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(node,"ext:rel","rel",this.ns_nlp.ext);}else{throw new Error(dojo.string.substitute(this.modelMessages.E_ELEMENT_NOT_FOUND_2,[com.ibm.mm.enabler.utils.Atom._LINK,this.toString()]));}return _16f9;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.ThreadingLinkProviderXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.ThreadingLinkProviderXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.ThreadingLinkProviderXmlImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.ThreadingLinkProviderXmlImpl",null,{constructor:function(){var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns_tlp=nsf.getNameSpaces([nsf.NS_ATOM]);},getParentLink:function(){return com.ibm.mashups.enabler.xml.XPath.evaluateString(com.ibm.mm.enabler.utils.Atom._IN_REPLY_TO_LINK_HREF,this.xmlData,this.ns_tlp)||null;},getChildrenLink:function(){return com.ibm.mashups.enabler.xml.XPath.evaluateString(com.ibm.mm.enabler.utils.Atom._REPLIES_LINK_HREF,this.xmlData,this.ns_tlp)||null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.persistence.xml.XmlPersistenceImpl"]){dojo._hasResource["com.ibm.mm.enabler.persistence.xml.XmlPersistenceImpl"]=true;dojo.provide("com.ibm.mm.enabler.persistence.xml.XmlPersistenceImpl");dojo.declare("com.ibm.mm.enabler.persistence.xml.XmlPersistenceImpl",[com.ibm.mm.enabler.persistence.PersistenceImpl],{constructor:function(d){this.xmlData=d;},toString:function(){return com.ibm.mm.enabler.utils.Dom.innerXML(this.xmlData);}});}if(!dojo._hasResource["com.ibm.mm.enabler.content.persistence.xml.ContentPageXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.persistence.xml.ContentPageXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.persistence.xml.ContentPageXmlImpl");dojo.declare("com.ibm.mm.enabler.content.persistence.xml.ContentPageXmlImpl",[com.ibm.mashups.enabler.content.ContentPage,com.ibm.mm.enabler.persistence.xml.XmlPersistenceImpl,com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.MetaDataImpl2,com.ibm.mm.enabler.TransformableImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.ac.EffectiveAccessImpl],{_navigationNode:null,constructor:function(node,_16fa){this.xmlData=node;this._navigationNode=_16fa;},setMetaData:function(name,value,_16fb){if(this._navigationNode.shouldSyncMetaData()&&!_16fb){this._navigationNode.setMetaData(name,value,true);}this.inherited(arguments);},removeMetaData:function(name,_16fc){if(this._navigationNode.shouldSyncMetaData()&&!_16fc){this._navigationNode.removeMetaData(name,true);}this.inherited(arguments);}});}if(!dojo._hasResource["com.ibm.mm.enabler.content.persistence.xml.StaticContentPageXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.persistence.xml.StaticContentPageXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.persistence.xml.StaticContentPageXmlImpl");dojo.declare("com.ibm.mm.enabler.content.persistence.xml.StaticContentPageXmlImpl",[com.ibm.mashups.enabler.content.StaticContentPage,com.ibm.mm.enabler.content.persistence.xml.ContentPageXmlImpl,com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl],{constructor:function(node){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_CA]));this._MEDIA_LINK="atom:link[@ext:rel='media']";this._LAYOUT_TEMPLATE_REF_MDNAME="com.ibm.portal.layout.template.ref";this._staticMarkup=null;this._refreshStaticMarkup=true;this._isStaticMarkupDirty=false;},getStaticContentURL:function(){return this.getMetaData(this._LAYOUT_TEMPLATE_REF_MDNAME);},setStaticContentURL:function(url){return this.setMetaData(this._LAYOUT_TEMPLATE_REF_MDNAME,url);},confirmSetStaticContentURL:function(url){return this.confirmSetMetaData(this._LAYOUT_TEMPLATE_REF_MDNAME,url);},getStaticMarkup:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._getStaticMarkup);},_getStaticMarkup:function(dfr,sync){var _16fd="_getStaticMarkup";var _16fe=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_16fe){this.LOGGER.entering(_16fd,[dfr,sync]);}if(this._staticMarkup){if(dfr){dfr.finish(this._staticMarkup,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this._staticMarkup;}var _16ff=null;var _1700=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._MEDIA_LINK,this.xmlData,this.ns);if(_1700){_16ff=_1700.getAttribute("href");}else{if(dfr){dfr.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}var _1701=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_16ff,this);result={};var _1702=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1701,null,null,true,sync);_1702.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){result.markup=data;}if(dfr){dfr.finish(result.markup||null,xhr.status);}result.status=xhr.status;}));if(_16fe){this.LOGGER.exiting(_16fd,[result]);}return result.markup;},setStaticMarkup:function(_1703){if(_1703&&_1703!=this._staticMarkup){this._isStaticMarkupDirty=true;this._staticMarkup=_1703;}},confirmSetStaticMarkup:function(_1704){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER)||this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},refreshStaticMarkup:function(){this._refreshStaticMarkup=true;this._setDirty();},confirmRefreshStaticMarkup:function(){return true;}});}if(!dojo._hasResource["com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactoryImpl");dojo.provide("com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactory");dojo.declare("com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactoryImpl",null,{constructor:function(){this.serviceJson=null;this._CONTENT_NODE_TYPE_PAGE="content-page";this._CONTENT_NODE_TYPE_STATIC_PAGE="static-content-page";},_lazyInit:function(){if(this.serviceJson){return;}this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM]));},createContentNode:function(_1705,_1706){var _1707=null;this._lazyInit();var expr="atom:content/*";var _1708=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_1705,this.ns);var type=_1708?com.ibm.mm.enabler.utils.Dom.getLocalName(_1708):null;switch(type){case this._CONTENT_NODE_TYPE_PAGE:_1707=new com.ibm.mm.enabler.content.persistence.xml.ContentPageXmlImpl(null,_1706);break;case this._CONTENT_NODE_TYPE_STATIC_PAGE:_1707=new com.ibm.mm.enabler.content.persistence.xml.StaticContentPageXmlImpl(null,_1706);break;default:_1707=new com.ibm.mm.enabler.content.persistence.xml.ContentPageXmlImpl(null,_1706);break;}_1707.setXml(_1705,true);return _1707;}});com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactory=new com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactoryImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationElementXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationElementXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.xml.NavigationElementXmlImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.xml.NavigationElementXmlImpl",[com.ibm.mashups.enabler.navigation.NavigationElement,com.ibm.mm.enabler.persistence.xml.XmlPersistenceImpl,com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.TransformableImpl,com.ibm.mm.enabler.persistence.xml.LocalizedXmlImpl,com.ibm.mm.enabler.persistence.xml.DefaultLocalizedXmlImpl,com.ibm.mm.enabler.MetaDataImpl2,com.ibm.mm.enabler.persistence.xml.EditLinkProviderXmlImpl,com.ibm.mm.enabler.persistence.xml.NextLinkProviderXmlImpl,com.ibm.mm.enabler.persistence.xml.ThreadingLinkProviderXmlImpl,com.ibm.mm.enabler.ac.EffectiveAccessImpl,com.ibm.mm.enabler.navigation.persistence.meta.NavigationElementMetaImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.space.SpaceIdentifierAspect],{constructor:function(){this.cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this._contentNode=null;this._CONTENT_NODE_LINK="atom:link[@rel='related' and @ext:class='content-node']";this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns_nav=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_CA]));this._THEME_LINK="atom:link[@ext:rel='theme']";this._theme_changed=false;},isPrivate:function(){return this._isPrivate();},setHidden:function(hide){var name=this.cs.getValue("com.ibm.mashups.navigation.hidden");this.setMetaData(name,(hide)?"true":"false");},confirmSetHidden:function(hide){var ret1=this.confirmSetMetaData("com.ibm.mashups.navigation.hidden",(hide)?"true":"false");var ret2=this.confirmSetMetaData("com.ibm.portal.Hidden",(hide)?"true":"false");return (ret1&&ret2);},getSpaceIdentifier:function(){var _1709=null;var _170a=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@ca:rel='application']",this.xmlData,this.ns_nav);if(_170a){var id=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_170a);var href=_170a.getAttribute("href");_1709=new com.ibm.mm.enabler.IdentifierImpl(id,{"href":href});}return _1709;},getTheme:function(){var id=this.getThemeIdentifier();return id?id.getID():null;},setTheme:function(id){this.setThemeIdentifier(new com.ibm.mm.enabler.IdentifierImpl(id));},getThemeIdentifier:function(){var _170b=null;var _170c=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._THEME_LINK,this.xmlData,this.ns_nav);if(_170c){var id=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_170c);var href=_170c.getAttribute("href");_170b=new com.ibm.mm.enabler.IdentifierImpl(id,{"href":href});}return _170b||null;},isThemeChanged:function(){return this._theme_changed;},setThemeIdentifier:function(_170d){var _170e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._THEME_LINK,this.xmlData,this.ns_nav);if(!_170d){if(_170e&&"true"==com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_170e,"ext:inherited","inherited",this.ns_nav.ext)){dojo.destroy(_170e);}return;}if(!_170e){_170e=com.ibm.mm.enabler.utils.Dom.createElement(this.xmlData.ownerDocument,"atom:link",this.ns_nav.atom);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData.ownerDocument,_170e,"ext:rel","rel",this.ns_nav.ext,"theme");this.xmlData.appendChild(_170e);}var oldId=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_170e);if(oldId!=_170d.getID()){var _170f=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.THEME_URL,this);_170f.setNodes([{value:_170d.getID(),isID:true}]);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData.ownerDocument,_170e,"ext:uri","uri",this.ns_nav.ext,_170f.getModelURI());}this._setDirty();this._theme_changed=true;},getNavigationElementType:function(){return this._type;},_createContentNode:function(){var entry=com.ibm.mm.enabler.utils.Utils.createNode("atom:entry",this.ns_nav.atom);entry.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("atom:id",this.ns_nav.atom));var _1710=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns_nav.atom);_1710.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("model:static-content-page",this.ns_nav.model));entry.appendChild(_1710);var node=com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactory.createContentNode(entry,this);node.refreshStaticMarkup();node._setClean();return node;},getContent:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._getContent);},_getContent:function(dfr,sync){var _1711="_getContent";var _1712=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1712){this.LOGGER.entering(_1711,arguments);}if(this._contentNode){dfr.finish(this._contentNode,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);return this._contentNode;}var _1713;var _1714=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._CONTENT_NODE_LINK,this.xmlData,this.ns_nav);if(_1714){_1713=_1714.getAttribute("href");}else{this._contentNode=this._createContentNode();this._contentNode.setID(this.getID());com.ibm.mashups.enabler.navigation.Factory.getNavigationModel()._wrapContent(this._contentNode);dfr.finish(this._contentNode,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);return this._contentNode;}var _1715=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_1713,this);_1715.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);_1715.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_MDNAME,this._LAYOUT_TEMPLATE_REF_MDNAME);_1715.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);var _1716={};var _1717=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1715,null,null,false,sync);_1717.read(dojo.hitch(this,function(type,data,xhr,args){_1716.status=xhr.status;if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var expr="atom:feed/atom:entry";var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns_nav);if(nodes){this._contentNode=com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactory.createContentNode(nodes,this);com.ibm.mashups.enabler.navigation.Factory.getNavigationModel()._wrapContent(this._contentNode);_1716.node=this._contentNode;}else{_1716.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}dfr.finish(_1716.node||null,_1716.status);}));if(_1712){this.LOGGER.exiting(_1711,[_1716]);}return _1716.node;}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationNodeXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationNodeXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.xml.NavigationNodeXmlImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.xml.NavigationNodeXmlImpl",[com.ibm.mm.enabler.navigation.persistence.xml.NavigationElementXmlImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this._fragmentData=null;this._fragmentMediaData=null;this._LAYOUT_VIEW_LINK="atom:link[@ext:rel='layout' and @type='text/html']";this._RESOURCE_LINK="atom:link[@ext:rel='resourcefeed']";this._LAYOUT_TEMPLATE_REF_MDNAME="com.ibm.portal.layout.template.ref";this._type=com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE;},getExportPageURL:function(){var _1718=null;var _1719=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._RESOURCE_LINK,this.xmlData,this.ns_nav);if(_1719){_1718=_1719.getAttribute("href");}return _1718||null;},_getFragmentData:function(){return this._fragmentData;},_setFragmentData:function(data){this._fragmentData=data;},_getFragmentMediaData:function(){return this._fragmentMediaData;},_setFragmentMediaData:function(data){this._fragmentMediaData=data;},getServerRuntimeMarkup:function(_171a){return new com.ibm.mm.enabler.DeferredImpl(this,this._getServerRuntimeMarkup,_171a);},_getServerRuntimeMarkup:function(dfr,sync,_171b){var _171c="_getServerRuntimeMarkup";var _171d=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_171d){this.LOGGER.entering(_171c,arguments);}var _171e={};var _171f=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._LAYOUT_VIEW_LINK,this.xmlData,this.ns_nav);if(_171f){var _1720=_171f.getAttribute("href");var _1721=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_1720,this);var _1722=_1721.getParameter("digest");if(_1722=="skip"){_1721.setParameter("mode",null);_1721.setParameter("digest",null);}var _1723=com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator();if(!_171b){_171b=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();}var _1724=_1723.getURL(_171b);_1721.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_STATE_URL,_1724);var _1725=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1721,null,null,true,sync);_1725.enableLogoutVerificationForRawRetrieval();_1725.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){_171e.markup=data;}_171e.status=xhr.status;if(dfr){dfr.finish(_171e.markup,_171e.status);}}));}else{_171e.markup=null;_171e.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;if(dfr){dfr.finish(_171e.markup,_171e.status);}}if(_171d){this.LOGGER.exiting(_171c,[_171e]);}return _171e.markup;},getServerRuntimeContent:function(){return this;},confirmSetDescription:function(_1726,_1727){var _1728=1024;var limit=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.LIMIT_PAGE_DESCRIPTION);if(limit){limit=parseInt(limit,10);if(isNaN(limit)||limit<0){limit=_1728;}}else{limit=_1728;}return (_1726.length<=limit)&&this.inherited(arguments);},shouldSyncMetaData:function(){return com.ibm.mashups.enabler.navigation.Factory.getNavigationModel().getStrategy("com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy")!==null;},setMetaData:function(name,value,_1729){if(this.shouldSyncMetaData()&&!_1729){var _172a=this.getContent().start(true);if(_172a){_172a.setMetaData(name,value,true);}}this.inherited(arguments);},removeMetaData:function(name,_172b){if(this.shouldSyncMetaData()&&!_172b){var _172c=this.getContent().start(true);if(_172c){_172c.removeMetaData(name,true);}}this.inherited(arguments);}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationNodeXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationNodeXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationNodeXmlImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationNodeXmlImpl",[com.ibm.mashups.enabler.navigation.SharedNavigationNode,com.ibm.mm.enabler.navigation.persistence.xml.NavigationNodeXmlImpl],{});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationRootXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationRootXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationRootXmlImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationRootXmlImpl",[com.ibm.mashups.enabler.navigation.SharedNavigationRoot,com.ibm.mm.enabler.navigation.persistence.xml.NavigationNodeXmlImpl],{});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationLabelXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationLabelXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.xml.NavigationLabelXmlImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.xml.NavigationLabelXmlImpl",[com.ibm.mm.enabler.navigation.persistence.xml.NavigationElementXmlImpl],{constructor:function(){this._type=com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_LABEL;}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationURLXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationURLXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.xml.NavigationURLXmlImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.xml.NavigationURLXmlImpl",[com.ibm.mm.enabler.navigation.persistence.xml.NavigationElementXmlImpl],{constructor:function(){this._type=com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_URL;this._URL_TARGET_LINK="atom:link[@ext:rel='content-url-target' and @rel='related']";},getURL:function(){var _172d=null;var _172e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._URL_TARGET_LINK,this.xmlData,this.ns_nav);if(_172e){_172d=_172e.getAttribute("href");}return _172d||null;},setURL:function(url){var _172f=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._URL_TARGET_LINK,this.xmlData,this.ns_nav);if(!_172f){_172f=com.ibm.mm.enabler.utils.Utils.createNode("atom:link",this.ns_nav.atom);this.xmlData.appendChild(_172f);_172f.setAttribute("rel","related");com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlData,_172f,"ext:rel","rel",this.ns_nav.ext,"content-url-target");}_172f.setAttribute("href",url);}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.FactoryImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.FactoryImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.xml.FactoryImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.xml.FactoryImpl",null,{constructor:function(){this.serviceJson=null;var tfr=com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry;var c=com.ibm.mashups.enabler.navigation.Constants;tfr._addTypeMappingFilter({xml:{fn:function(d){this._lazyInit();var expr="atom:link[@ext:class='content-node']";var _1730=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,d,this.ns);var type=_1730?com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_1730,"ext:rel","rel",this.ns.ext):null;var c=com.ibm.mashups.enabler.navigation.Constants;var _1731;switch(type){case "page":_1731=c.NAVIGATION_PAGE;break;case "label":_1731=c.NAVIGATION_LABEL;break;case "url":_1731=c.NAVIGATION_URL;break;default:_1731=null;}return _1731;},scope:this}},true);tfr.addTypeMappingFilter({xml:{fn:function(d){this._lazyInit();var expr="atom:link[@ext:class='content-node']";var _1732=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,d,this.ns);var type=_1732?com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_1732,"ext:rel","rel",this.ns.ext):null;var c=com.ibm.mashups.enabler.navigation.Constants;var _1733;switch(type){case "staticpage":_1733=c.NAVIGATION_PAGE;break;case "internalurl":case "externalurl":_1733=c.NAVIGATION_URL;break;default:_1733=null;}return _1733;},scope:this}});},_lazyInit:function(){if(!this.serviceJson){this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM]));}},createNavigationElementPersistence:function(_1734,type){var p;if(!type){type=com.ibm.mashups.enabler.navigation.persistence.TypeMappingRegistry._getXmlType(_1734);}var c=com.ibm.mashups.enabler.navigation.Constants;switch(type){case "page":case c.NAVIGATION_PAGE:this._lazyInit();var expr="atom:link[@ext:class='content-node']";var _1735=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_1734,this.ns);var _1736=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_1735,"ext:user-own","user-own",this.ns.ext);if(_1736=="false"){p=new com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationNodeXmlImpl();}else{p=new com.ibm.mm.enabler.navigation.persistence.xml.NavigationNodeXmlImpl();}break;case "label":case c.NAVIGATION_LABEL:this._lazyInit();expr="//model:navigation-node[@type='shared-root']";var _1737=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_1734,this.ns);if(_1737){p=new com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationRootXmlImpl();}else{p=new com.ibm.mm.enabler.navigation.persistence.xml.NavigationLabelXmlImpl();}break;case "url":case c.NAVIGATION_URL:p=new com.ibm.mm.enabler.navigation.persistence.xml.NavigationURLXmlImpl();break;default:console.warn("Navigation element type cannot be resolved.");break;}if(p){p.setXml(_1734,true);}return p;}});com.ibm.mm.enabler.navigation.persistence.xml.Factory=new com.ibm.mm.enabler.navigation.persistence.xml.FactoryImpl();}if(!dojo._hasResource["com.ibm.mm.enabler.strategy.PageLoadAheadStrategyExecutor"]){dojo._hasResource["com.ibm.mm.enabler.strategy.PageLoadAheadStrategyExecutor"]=true;dojo.provide("com.ibm.mm.enabler.strategy.PageLoadAheadStrategyExecutor");dojo.declare("com.ibm.mm.enabler.strategy.PageLoadAheadStrategyExecutor",com.ibm.mm.enabler.LazyLoadSupport,{constructor:function(_1738){this.strategies=_1738;this.loadAheadUser=false;this.loadAheadLayoutModel=false;this.userLoadAheadStrategy=null;this.pageLoadAheadStrategy=null;for(var x in this.strategies){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(this.strategies[x],com.ibm.mashups.enabler.strategy.UserLoadAheadStrategy)){this.loadAheadUser=this.strategies[x].isLoadAheadUser();this.userLoadAheadStrategy=this.strategies[x];}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(this.strategies[x],com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy)){var _1739=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _173a=_1739.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PAGE_LOAD_OPTIMIZATION);if(_173a===true){this.loadAheadLayoutModel=this.strategies[x].isLoadAheadLayoutModel();}var _173b=_1739.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PAGE_LOAD_OPTIMIZATION_THEME);if(_173a===true){this.loadAheadTheme=this.strategies[x].isLoadAheadTheme();}else{this.loadAheadTheme=false;}this.pageLoadAheadStrategy=_1738[x];}}}this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.prefix=this.serviceJson.idprefix;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH]));},processLoadAhead:function(_173c,_173d,sync){if(!com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()){return;}this.lazyLoadModules(["ThemeModel","LayoutModel"]);var _173e=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _173f=_173e.create();_173f.startTransaction(_173e.CONTEXT_ENABLER);if(_173c.length>0){var _1740="atom:link[@rel='edit']";var _1741=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_1740,_173c[0].xmlData,this.ns);if(_1741){var _1742=_1741.getAttribute("href");var h_url=new com.ibm.mm.enabler.utils.HttpUrl(_1742);_173f.statics.digest=h_url.getParameter("digest");}}if(this.loadAheadUser){var _1743=this.userLoadAheadStrategy.getUserModel();_1743.findCurrentUser().start();}for(var i=0;i<_173c.length;i++){if(this.loadAheadLayoutModel){if(_173c[i].getNavigationElementType()==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE){_173c[i].getContent().start(false);}}if(this.loadAheadTheme){var _1744=_173c[i].getThemeIdentifier().getID();if(_1744!==null){var _1745=com.ibm.mashups.enabler.theme.Factory.getThemeModel();_1745.find(_1744).start();}com.ibm.mm.builder.utils.skinUtil.getAllSkins();}}if(this.loadAheadLayoutModel){for(var j in _173d){if(Object.prototype.hasOwnProperty.call(_173d,j)){var _1746=_173d[j];_1746.getRoot().start(false);}}}_173f.endTransactionDeferred().start();}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl",[com.ibm.mashups.enabler.model.NavigationModel,com.ibm.mm.enabler.model.ModelImpl,com.ibm.mm.enabler.ConfirmableModelImpl,com.ibm.mm.enabler.strategy.HiddenMetaDataLoadingStrategyHelperImpl,com.ibm.mm.enabler.model.SemaphoreHelperImpl,com.ibm.mm.enabler.DirtyFlagProviderImpl,com.ibm.mm.enabler.ServiceDocConsumer,com.ibm.mm.enabler.LazyLoadSupport],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.layoutModels={};this.cid=0;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");this.urlType=com.ibm.mashups.enabler.model.url.ModelUrlFactory.NAVIGATION_URL;this._ATOM_ENTRY="atom:feed/atom:entry";this._ATOM_LINK="atom:link";this._CONTENT_NODE_LINK=this._ATOM_LINK+"[@rel='related' and @ext:class='content-node']";this._LAYOUT_LINK=this._ATOM_LINK+"[@rel='related' and @ext:rel='layout']";this._MEDIA_LINK=this._ATOM_LINK+"[@ext:rel='media']";this._INTERNAL_URL_LINK=this._ATOM_LINK+"[@ext:rel='internalurl']";this._CONTENT_REL=this._ATOM_LINK+"[@ext:rel='content']";this._NEXT_LINK=this._ATOM_LINK+"[@rel='next']";this._REPLIES_LINK=this._ATOM_LINK+"[@rel='replies']";this._IN_REPLY_TO_LINK="thr:in-reply-to";this._LAYOUT_TEMPLATE_REF_MDNAME="com.ibm.portal.layout.template.ref";this.THR_INREPLYTO_URI_PREFIX=this._IN_REPLY_TO_LINK+"[@ext:uri='";this.THR_INREPLYTO_URI_SUFFIX="']";this.initialContents={};dojo.subscribe(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_NODE,this,"_invalidateNode");},_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_NAVIGATION);this.entryUrl=this.serviceJson.url;this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH,nsf.NS_XHTML,nsf.NS_APP]));this.fragmentServiceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.fragmentPrefix=this.serviceJson.idprefix;var _1747=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_SPACE_NAVIGATION);this.spaceNavigationEntryUrl=_1747.url;},_getInstance:function(){var _1748=com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl._instance;return _1748?_1748:(com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl._instance=new com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl());},_setNavigationModelDirty:function(){this._setDirty();},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,uri);},getSharedRoot:function(){return this.findDefaultAcceptParent();},findDefaultAcceptParent:function(){return this.getRoot();},getRoot:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){return this._find(dfr,sync,"collection");});},hasChildren:function(node){return this._getChildrenLink(node)?true:false;},_getChildrenLink:function(node){node=this._resolve(node);this._initServiceDoc();return com.ibm.mashups.enabler.xml.XPath.evaluateString(this._REPLIES_LINK+"/@href",node.getXml(),this.ns);},_resolve:function(node){if(!node){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}return dojo.isString(node)?this.find(node).start():node;},getParent:function(uri,_1749){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync,node){node=this._resolve(node);var _174a=null;if(node!==null){var _174b=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._IN_REPLY_TO_LINK+"[@ext:uri]",node.getXml(),this.ns);if(_174b){var _174c=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_174b);if(_1749){_174a=_1749.lookupNodeInCache(_174c);}if(_174a){if(dfr){dfr.finish(_174a,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{_174a=this._find(dfr,sync,_174c,true);}}else{if(dfr){dfr.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}}return _174a||null;},uri);},_setParent:function(node,_174d,_174e){if(node!==null&&_174d!==null){this._initServiceDoc();var _174f=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_174e,this);_174f.setNodes([{value:_174d.getID(),isID:true}]);var _1750=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._IN_REPLY_TO_LINK,node.getXml(),this.ns);if(!_1750){_1750=com.ibm.mm.enabler.utils.Utils.createNode(this._IN_REPLY_TO_LINK,this.ns.thr);node.getXml().appendChild(_1750);}com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.getXml().ownerDocument,_1750,"ext:uri","uri",this.ns.ext,_174f.getModelURI());_1750.setAttribute("ref",_174f.getModelURI());_1750.setAttribute("href",_174f.getAbsoluteURL());}},_setNext:function(node,_1751){if(node){this._initServiceDoc();var next=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._NEXT_LINK,node.getXml(),this.ns);var _1752=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);if(next){if(_1751){_1752.setNodes([{value:_1751.getID(),isID:true}]);next.setAttribute("href","?uri="+_1752.getModelURI());com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.getXml().ownerDocument,next,"ext:uri","uri",this.ns.ext,_1752.getModelURI());}else{dojo.destroy(next);}}else{if(_1751){_1752.setNodes([{value:_1751.getID(),isID:true}]);next=com.ibm.mm.enabler.utils.Utils.createNode(this._ATOM_LINK,this.ns.atom);next.setAttribute("href","?uri="+_1752.getModelURI());next.setAttribute("rel","next");next.setAttribute("type","application/atom+xml");com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.getXml().ownerDocument,next,"ext:uri","uri",this.ns.ext,_1752.getModelURI());node.getXml().appendChild(next);}}}},_replaceNext:function(oldID,newID,_1753){var _1754=com.ibm.mashups.enabler.services.IdentificationService.isServerID(oldID);if(!_1754){com.ibm.mm.enabler.utils.Misc.forIn(_1753,function(node,id){var _1755=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._NEXT_LINK,node.getXml(),this.ns);if(_1755){var _1756=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_1755);if(_1756==oldID){var _1757=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);if(newID){_1757.setNodes([{value:newID,isID:true}]);_1755.setAttribute("href","?uri="+_1757.getModelURI());com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(node.getXml().ownerDocument,_1755,"ext:uri","uri",this.ns.ext,_1757.getModelURI());}else{dojo.destroy(_1755);}this.initialContents[node.getID()]=node.toString();}}},this);}},_setRepliesLink:function(_1758){replies=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._REPLIES_LINK,_1758.getXml(),this.ns);if(!replies){var _1759=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);_1759.setNodes([{value:_1758.getID(),isID:true}]);_1759.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_LEVELS,"2");_1759.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);var _175a=_1758.getXml().ownerDocument;replies=com.ibm.mm.enabler.utils.Dom.createElement(_175a,this._ATOM_LINK,this.ns.atom);replies.setAttribute("href",_1759.getAbsoluteURL());replies.setAttribute("rel","replies");replies.setAttribute("type","application/atom+xml");com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_175a,replies,"ext:uri","uri",this.ns.ext,_1759.getModelURI());_1758.getXml().appendChild(replies);}},insert:function(node,_175b,_175c,ctx){this._initServiceDoc();var _175d="insert";var _175e=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_175e){this.LOGGER.entering(_175d,[node,_175b,_175c]);}var prev=ctx.getPrevNode();if(ctx.isManaged()){var _175f=ctx.getOldSiblings();if(_175f&&_175f.prev){this._setNext(_175f.prev,_175f.next);}if(ctx.wasOnlyChild()){var _1760=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._REPLIES_LINK,ctx.getOldParent().getXml(),this.ns);if(_1760){_1760.parentNode.removeChild(_1760);}}node.__oldParentID=ctx.getOldParent().getID();}else{ctx.nodeInserted(node);}if(ctx.isOnlyChild){this._setRepliesLink(_175b);}if(prev){this._setNext(prev,node);}this._setParent(node,_175b,this.urlType);this._setNext(node,_175c);if(ctx.isCreated(node.getID())){var _1761=node.getContent().start();var links=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._CONTENT_NODE_LINK,_175b.getXml(),this.ns);if(links){var uri=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(links,"ext:uri","uri",this.ns.ext);if(uri){parentId=new com.ibm.mm.enabler.IdentifierImpl(uri);}}this._setParent(_1761,parentId||_175b,com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL);}node.setDirty();if(_175e){this.LOGGER.exiting(_175d);}},confirmInsert:function(node,_1762,_1763,ctx){if(node===null||typeof node=="undefined"){console.warn("TEMPORARY FIX: Gracefully returning 'true' on NavigationModel.confirmInsert(node) with null or undefined node.");return true;}if(node){var _1764=false;var _1765=node._getRawID().indexOf(com.ibm.mashups.enabler.model.Constants.CLIENT_ID_PREFIX)===0;if(_1765){if(_1762){if(_1762.isPrivate()){return node.isPrivate();}else{return _1762.hasRole(node.isPrivate()?com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER:com.ibm.mashups.enabler.ac.RoleType.EDITOR);}}else{return false;}}else{var _1766=ctx.getOldParent();if(_1766){if(_1766.getID()!=_1762.getID()){_1764=true;}}if(_1764){return this.getConfirmReparent(node,_1766,_1762,_1763);}else{return this.getConfirmReorder(node,_1762,_1763);}}}},confirmExport:function(node){return (com.ibm.mm.enabler.AnonymousHelper.getAnonymousMode()==com.ibm.mashups.enabler.user.AnonymousMode.ANONYMOUS)?false:true;},remove:function(node,ctx){this._initServiceDoc();var _1767="remove";var _1768=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1768){this.LOGGER.entering(_1767,[node]);}var _1769=ctx.parent;if(_1769&&ctx.isOnlyChild){var _176a=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._REPLIES_LINK,_1769.getXml(),this.ns);if(_176a){_176a.parentNode.removeChild(_176a);}}if(_1768){this.LOGGER.exiting(_1767);}},confirmRemove:function(node){if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(node,com.ibm.mashups.enabler.Identifiable)){node=this.find(node).start(true);}return this.getConfirmRemove(node);},hasLayoutModel:function(node){var page=this._resolve(node);if(page){this._initServiceDoc();var _176b=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._LAYOUT_LINK,page.getXml(),this.ns);if(_176b){return true;}}return false;},getLayoutModel:function(node){if(!this.hasLayoutModel(node)){return null;}var _176c=null;if(typeof (node)=="string"){_176c=node;node=this._find(null,true,_176c);}else{_176c=node.getID();}if(!(_176c in this.layoutModels)){this.lazyLoadModules(["LayoutModel"]);var _176d;var _176e;if(node){var _176f=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._LAYOUT_LINK,node.getXml(),this.ns);if(_176f){_176d=_176f.getAttribute("href");_176e=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_176f);}}this.layoutModels[_176c]=new com.ibm.mm.enabler.layout.LayoutModelImpl(_176d||null,_176e||_176c,node);this.layoutModels[_176c]._addDirtyCallback(this,this._setNavigationModelDirty);if(com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()&&(this.strategy!==null)&&(node)&&(!node._fragmentData)){var _1770=new com.ibm.mm.enabler.strategy.PageLoadAheadStrategyExecutor(this.strategy);_1770.processLoadAhead([node],[this.layoutModels[_176c]],false);}}return this.layoutModels[_176c];},_postContentNode:function(_1771,page,_1772,dfr,_1773,sync,ctx){var _1774="_postContentNode";var _1775=this.LOGGER.isLoggable(this.LOG_LEVEL);var _1776=false;var _1777=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);var _1778=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_1777.url,this);if(_1771._refreshStaticMarkup){_1778.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_MODE,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_MODE_VALUE_REFRESH);_1776=true;}_1778.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);_1778.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_MDNAME,this._LAYOUT_TEMPLATE_REF_MDNAME);var _1779=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@ext:rel='theme']",_1771.getXml(),this.ns);if(_1779){dojo.destroy(_1779);}var oldId=_1771.getID();var _177a=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1778,null,null,false,sync);_177a.create(_1771.toString(),dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){if(data!==null){var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._ATOM_ENTRY,data,this.ns);if(node){_1771.setXml(node,true);_1771._setClean();_1771._refreshStaticMarkup=false;if(ctx){ctx.updateModelContentNodeID(_1771.getID(),oldId);}var _177b=_1771.getEditLink();var _177c=com.ibm.mashups.enabler.xml.XPath.evaluateString(com.ibm.mm.enabler.utils.Atom._ID,_1771.getXml(),this.ns);var _177d=page.getXml();var link=com.ibm.mm.enabler.utils.Dom.createElement(_177d.ownerDocument,this._ATOM_LINK,this.ns.atom);link.setAttribute("rel","related");link.setAttribute("href",_177b);link.setAttribute("type","application/atom+xml");com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_177d.ownerDocument,link,"ext:rel","rel",this.ns.ext,"page");com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_177d.ownerDocument,link,"ext:class","class",this.ns.ext,"content-node");com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_177d.ownerDocument,link,"ext:uri","uri",this.ns.ext,_177c);_177d.appendChild(link);if(_1771._staticMarkup){var _177e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._MEDIA_LINK,_1771.getXml(),this.ns);if(_177e){var _177f=_177e.getAttribute("href");var _1780=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_177f,this);var _1781=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1780,null,null,true,sync);_1781.create(_1771._staticMarkup,dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){_1771._staticMarkup=data;_1771._isStaticMarkupDirty=false;}else{if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_1775){this.LOGGER.warning(_1774,this.modelMessages.E_XHR_REQUEST_FAILED_2,[xhr,data||"n/a"]);}}}if(dfr){dfr.finishOperation(_1771._staticMarkup,com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}if(_1772 in this.layoutModels){var lm=this.getLayoutModel(_1772);this._clearLayoutNodeCSSMetaData(lm,lm.getRoot().start(true));}_1773.finish();}));}}else{if(_1776){if(_1772 in this.layoutModels){var lm=this.getLayoutModel(_1772);this._clearLayoutNodeCSSMetaData(lm,lm.getRoot().start(true));}}if(dfr&&ctx){dfr.finishOperation(ctx.getModelContentNode(_1771),com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}_1773.finish();}}}}else{if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_1775){this.LOGGER.warning(_1774,this.modelMessages.E_XHR_REQUEST_FAILED_2,[xhr,data||"n/a"]);}}ctx._failedNodes[oldId]=true;ctx._omitPages[_1772]=true;if(dfr){dfr.finishOperation(ctx.getModelContentNode(_1771),com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}_1773.finish();}}));},_putContentNode:function(_1782,_1783,dfr,ctx){var _1784="_putContentNode";var sync=true;this._initServiceDoc();var _1785=this.LOGGER.isLoggable(this.LOG_LEVEL);var _1786=false;var url=_1782.getEditLink();var _1787=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(url,this);if(_1782._refreshStaticMarkup){_1787.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_MODE,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_MODE_VALUE_REFRESH);_1786=true;}_1787.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);this._applyNavigationUpdateStrategy(_1787,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_UPDATE_VALUE_REPLACE);_1787.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_MDNAME,this._LAYOUT_TEMPLATE_REF_MDNAME);var _1788=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@ext:rel='theme']",_1782.getXml(),this.ns);if(_1788){dojo.destroy(_1788);}this._applyHiddenMetaDataLoadingStrategyToModelURL(_1787);var _1789=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_1787,null,null,false,sync);_1789.update(_1782.toString(),dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){if(data!==null){var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._ATOM_ENTRY,data,this.ns);if(node){_1782.xmlData=node;_1782._setClean();_1782._refreshStaticMarkup=false;}}}else{if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_1785){this.LOGGER.warning(_1784,this.modelMessages.E_XHR_REQUEST_FAILED_2,[xhr,data||"n/a"]);}}}if(dfr&&ctx){dfr.finishOperation(ctx.getModelContentNode(_1782),com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}}));if(_1782._staticMarkup&&_1782._isStaticMarkupDirty){_1786=true;var _178a=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._MEDIA_LINK,_1782.getXml(),this.ns);if(_178a){var _178b=_178a.getAttribute("href");var _178c=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_178b,this);var _178d=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_178c,null,null,true,sync);_178d.update(_1782._staticMarkup,dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){_1782._staticMarkup=data;_1782._isStaticMarkupDirty=false;}else{if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_1785){this.LOGGER.warning(_1784,this.modelMessages.E_XHR_REQUEST_FAILED_2,[xhr,data||"n/a"]);}}}if(dfr){dfr.finishOperation(_1782._staticMarkup,com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}}));}}if(_1786){if(_1783 in this.layoutModels){var lm=this.getLayoutModel(_1783);this._clearLayoutNodeCSSMetaData(lm,lm.getRoot().start(true));}}},_clearLayoutNodeCSSMetaData:function(lm,node){var _178e=lm.getChildren(node);while(_178e.hasNext()){var child=_178e.next();if(child.isDirty()){child.removeMetaData("css-style");if(child.getLayoutNodeType()==com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTAINER){child._setClean();}}if(lm.hasChildren(child)){this._clearLayoutNodeCSSMetaData(lm,child);}}},create:function(_178f){this._initServiceDoc();var entry=com.ibm.mm.enabler.utils.Atom.createEntry(null,"model:navigation-node",this.ns.model).entryElement;var type=(_178f&&_178f.type)?_178f.type:com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE;if(type==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE){if(_178f&&_178f.template){entry=_178f.template.getXml().cloneNode(true);var _1790=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._IN_REPLY_TO_LINK,entry,this.ns);if(_1790){_1790.parentNode.removeChild(_1790);}}}else{if(type==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_LABEL){}else{if(type==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_URL){}else{throw new Error(this.modelMessages.E_INVALID_CONTEXT_SPECIFIED_0);}}}var node=com.ibm.mm.enabler.navigation.persistence.xml.Factory.createNavigationElementPersistence(entry,type);if(node){var cid=com.ibm.mashups.enabler.model.Constants.CLIENT_ID_PREFIX+((_178f&&_178f.cid)?_178f.cid:this.cid++);node._setRawID(cid);node._setRole(com.ibm.mashups.enabler.ac.RoleType.USER);node._setRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);node._setRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER);node._setRole(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER);node._setUserOwned(true);node._addDirtyCallback(this,this._setNavigationModelDirty);}return node||null;},confirmCreate:function(_1791){return this.getConfirmCreate();},commit:function(ctx){return new com.ibm.mm.enabler.DeferredOperationImpl(this,function(_1792,sync){this._initServiceDoc();var _1793="_commit";var _1794=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1794){this.LOGGER.entering(_1793,[_1792,sync]);}var nodes=ctx.getNodes();var _1795=nodes.loadedNodes;var _1796=nodes.createdNodes;var _1797=nodes.deletedNodes;var id,dfr,_1798,myUrl,expr,entry,page,_1799,_179a,edit;var _179b=[];var _179c=[];var _179d=[];var _179e={};com.ibm.mm.enabler.utils.Misc.forIn(_1795,function(node,id){if(id in _1796){_179c.push(id);var _179f=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._NEXT_LINK,node.getXml(),this.ns);if(_179f){var _17a0=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_179f);if(_1796[_17a0]===null){_179e[id]=_17a0;_179f.parentNode.removeChild(_179f);}}}else{var _17a1=_1795[id]._contentNode;if(_1795[id].isDirty()||(_17a1&&(_17a1.isDirty()||_17a1._isStaticMarkupDirty))){_179d.push(id);}}},this);var _17a2=[];dojo.forEach(_179c,function(id){var _17a3=_179e[id];if(_17a3){var index=dojo.indexOf(_17a2,_17a3);_17a2.splice(index==-1?0:index,0,id);}else{_17a2.push(id);}},this);var _17a4={};_17a4.code=parseInt(com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,10);var _17a5=new com.ibm.mm.enabler.DeferredImpl(this,function(_17a6,sync,_17a7){_17a6.finish();});var _17a8=_17a5;ctx._failedNodes={};ctx._omitPages={};dojo.forEach(_17a2,function(id){var _17a9=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._CONTENT_NODE_LINK,_1795[id].getXml(),this.ns);if(!_17a9){dfr=new com.ibm.mm.enabler.DeferredImpl(this,function(_17aa,sync,args){var id=args.id;var page=_1795[id];var _17ab=args.status;var _17ac=args.baseDfr;_1799=page.getContent().start()||null;var _17ad=[{parentXpath:"atom:content/*",element:"model:title",replace:true},{parentXpath:"atom:content/*",element:"model:description",replace:true}];com.ibm.mm.enabler.utils.Utils.transferElements(page.getXml(),_1799.getXml(),_17ad,this.ns);this._postContentNode(_1799,page,id,_17ac,_17aa,sync,ctx);},{id:id,baseDfr:_1792,status:_17a4});_17a8.setChainedDeferred(dfr);_17a8=dfr;}dfr=new com.ibm.mm.enabler.DeferredImpl(this,function(_17ae,sync,args){var id=args.id;var _17af=args.status;var _17b0=args.baseDfr;var _17b1=args.contentLink;if(ctx._omitPages[id]){_17ae.finish();return;}page=_1795[id];var model=ctx.getModel();var _17b2=dojo.hitch(model,model.getParent)(ctx.getModelNode(page)).start();if(!_17b2){_17b2=this.getParent(page).start();}_179a=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);_179a.setNodes([{value:id,isID:true}]);entry=com.ibm.mm.enabler.utils.Utils.createFeed(_179a.getModelURI(),"IBM Lotus Mashups Navigation Feed",_1795[id],this.ns);myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_17b2.getSpaceIdentifier()?this.spaceNavigationEntryUrl:this.entryUrl,this);myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_COMPOSITE_APPLICATION);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);if(!_17b1){this._applyNavigationCreationStrategy(myUrl);}_1798=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1798.create(entry,dojo.hitch(this,function(type,data,xhr,args){var id=args.id;var _17b3=args.status;var _17b4=args.baseDfr;var _17b5=args.chainDfr;var page=args.page;if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_1794){this.LOGGER.warning(_1793,this.modelMessages.E_XHR_REQUEST_FAILED_2,[xhr,data||"n/a"]);}}else{var _17b6=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._ATOM_ENTRY,data,this.ns);if(_17b6){page.setXml(_17b6);this.initialContents[page.getID()]=page.toString();ctx.nodeCreated(id,page);this._setRepliesLink(_17b2);this._replaceNext(id,page.getID(),_1795);dojo.publish(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_CHILDREN,[{nodes:_17b2.getID()}]);if(this.layoutModels[id]&&!this.layoutModels[page.getID()]){this.layoutModels[page.getID()]=this.layoutModels[id];this._invalidateLayoutModel(id);}}}if(_17b4){_17b4.finishOperation(ctx.getModelNode(page),com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}_17b3.code=this._overallStatus(xhr.status,_17b3.code);_17b5.finish();}),{id:id,baseDfr:_17b0,chainDfr:_17ae,page:page,status:_17af});},{id:id,baseDfr:_1792,contentLink:_17a9,status:_17a4});_17a8.setChainedDeferred(dfr);_17a8=dfr;},this);dojo.forEach(_179d,function(id){var dfr=new com.ibm.mm.enabler.DeferredImpl(this,function(_17b7,sync,args){var id=args.id;var _17b8=args.status;var _17b9=args.baseDfr;page=_1795[id];_1799=page._contentNode;if(_1799&&(_1799._isDirty()||_1799._isStaticMarkupDirty)){this._putContentNode(_1799,id,_17b9,ctx);}_179a=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);_179a.setNodes([{value:id,isID:true}]);var _17ba=_1795[id];if(!_1795[id].isThemeChanged()){_17ba=com.ibm.mm.enabler.navigation.persistence.xml.Factory.createNavigationElementPersistence(_1795[id].getXml(),_1795[id].getNavigationElementType());_17ba.setThemeIdentifier(null);}entry=com.ibm.mm.enabler.utils.Utils.createFeed(_179a.getModelURI(),"IBM Lotus Mashups Navigation Feed",_17ba,this.ns);edit=page.getEditLink();myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(edit,this);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);this._applyNavigationUpdateStrategy(myUrl,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_UPDATE_VALUE_REPLACE);myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_COMPOSITE_APPLICATION);this._applyHiddenMetaDataLoadingStrategyToModelURL(myUrl);_1798=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1798.update(entry,dojo.hitch(this,function(type,data,xhr,args){var page=args.page;var _17bb=args.status;var _17bc=args.baseDfr;var _17bd=args.chainDfr;if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_1794){this.LOGGER.warning(_1793,this.modelMessages.E_XHR_REQUEST_FAILED_2,[xhr,data||"n/a"]);}}else{var _17be=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._ATOM_ENTRY,data,this.ns);if(_17be){page.setXml(_17be);this.initialContents[page.getID()]=page.toString();ctx.nodeUpdated(page);var model=ctx.getModel();var _17bf=dojo.hitch(model,model.getParent)(ctx.getModelNode(page)).start();if(_17bf){var _17c0=[_17bf.getID()];if((page.__oldParentID)&&(page.__oldParentID!=_17bf.getID())){_17c0.push(page.__oldParentID);}dojo.publish(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_CHILDREN,[{nodes:_17c0}]);}}}if(_17bc){_17bc.finishOperation(ctx.getModelNode(page),com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}_17bb.code=this._overallStatus(xhr.status,_17bb.code);_17bd.finish();}),{page:page,baseDfr:_17b9,chainDfr:_17b7,status:_17b8});},{id:id,baseDfr:_1792,status:_17a4});_17a8.setChainedDeferred(dfr);_17a8=dfr;},this);com.ibm.mm.enabler.utils.Misc.forIn(_1797,function(node,id){var dfr=new com.ibm.mm.enabler.DeferredImpl(this,function(_17c1,sync,args){var id=args.id;var _17c2=args.status;var _17c3=args.baseDfr;var _17c4=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._IN_REPLY_TO_LINK+"[@ext:uri]",_1797[id].getXml(),this.ns);var _17c5=_17c4?com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_17c4):null;delete this.layoutModels[id];edit=_1797[id].getEditLink();myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(edit,this);_1798=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1798.remove(dojo.hitch(this,function(type,data,xhr,args){var id=args.id;var navid=id;var _17c6=args.status;var _17c7=args.baseDfr;var _17c8=args.chainDfr;var _17c9=args.parentId;var _17ca=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._INTERNAL_URL_LINK,_1797[id].getXml(),this.ns);var _17cb=com.ibm.mashups.enabler.xml.XPath.evaluateString(this._CONTENT_NODE_LINK+"/@href",_1797[id].getXml(),this.ns);var _17cc=true;var s=this._findStrategyByType("com.ibm.mashups.enabler.strategy.NavigationDeletionStrategy");if(s){var _17cd=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this._CONTENT_REL,_1797[id].getXml(),this.ns);if(_17cd){var _17ce=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_17cd);try{_17cc=s.isDeleteContentByID(_1797[id],_17ce);}catch(e){this.LOGGER.warning("commit","Custom implementation of NavigationDeletionStrategy failed to execute; skipping. Reason: "+e.message);}}}if(_17cb&&!_17ca&&_17cc){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_17cb,this);_1798=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1798.remove(dojo.hitch(this,function(type,data,xhr,args){var id=args.id;var _17cf=args.status;var _17d0=args.baseDfr;var _17d1=args.parentId;if(_17d0){_17d0.finishOperation(id,com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_1794){this.LOGGER.warning(_1793,this.modelMessages.E_XHR_REQUEST_FAILED_2,[xhr,data||"n/a"]);}}var sc=com.ibm.mm.enabler.model.HttpStatusCodes;if(_17cf.code==sc.HTTP_NOT_FOUND||_17cf.code==sc.HTTP_OK){ctx.nodeDeleted(navid);_179b.push([_17d1,true]);}_17cf.code=this._overallStatus(xhr.status,_17cf.code);_17c8.finish();}),{id:id,baseDfr:_17c7,chainDfr:_17c8,status:_17c6,parentId:_17c9});}else{if(_17c7){_17c7.finishOperation(id,com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(_1794){this.LOGGER.warning(_1793,this.modelMessages.E_XHR_REQUEST_FAILED_2,[xhr,data||"n/a"]);}}var sc=com.ibm.mm.enabler.model.HttpStatusCodes;if(_17c6.code==sc.HTTP_NOT_FOUND||_17c6.code==sc.HTTP_OK){ctx.nodeDeleted(navid);_179b.push([_17c9,true]);}_17c6.code=this._overallStatus(xhr.status,_17c6.code);_17c8.finish();}}),{id:id,baseDfr:_17c3,chainDfr:_17c1,status:_17c2,parentId:_17c5});},{id:id,baseDfr:_1792,chainDfr:_17a8,status:_17a4});_17a8.setChainedDeferred(dfr);_17a8=dfr;},this);var _17d2=new com.ibm.mm.enabler.DeferredImpl(this,function(_17d3,_17d4,args){var _17d5=args.baseDfr;this.statusCode=_17a4.code;this._initSemaphore();this._acquire();try{com.ibm.mm.enabler.utils.Misc.forIn(this.layoutModels,function(model,id){if(!(id in ctx._failedNodes)){model._commit(_17d5,sync,this);}},this);}catch(e){console.error(e);}_17d3.finish();},{baseDfr:_1792,status:_17a4});_17a8.setChainedDeferred(_17d2);_17a8=_17d2;var _17d6=new com.ibm.mm.enabler.DeferredImpl(this,function(_17d7,sync,args){var _17d8=args.baseDfr;var _17d9=args.status;dojo.forEach(_179d,function(id){this._invalidateLayoutModel(id);},this);var model=ctx.getModel();var _17da=[];var _17db=[];dojo.forEach(_179b,function(data){var id=data[0];var _17dc=data[1];if(_17dc){_17da.push(id);}else{_17db.push(id);}},this);if(_17da.length>0){dojo.publish(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_CHILDREN,[{nodes:_17da}]);}if(_17db.length>0){dojo.publish(com.ibm.mashups.enabler.model.NavigationModel.TOPIC_INVALIDATE_NODE,[{nodes:_17db}]);}model._movedNodes={};com.ibm.mashups.enabler.navigation.Factory.getSharedNavigationModel().invalidate();this._release(_17d8,0);},{baseDfr:_1792,status:_17a4});_17a8.setChainedDeferred(_17d6);_17a5.start(sync);this._setClean();if(_1794){this.LOGGER.exiting(_1793);}});},_acquire:function(){this.requestCount++;},_release:function(_17dd,_17de){this.statusCode=Math.max(parseInt(_17de,10),this.statusCode);this.requestCount--;if(this.requestCount<=0){if(_17dd){_17dd.finish(null,this.statusCode);}}},_overallStatus:function(_17df,_17e0){return Math.max(parseInt(_17df,10),_17e0);},_find:function(_17e1,sync,uri,_17e2){this._initServiceDoc();var _17e3="_find";var _17e4=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_17e4){this.LOGGER.entering(_17e3,arguments);}if(!uri){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(uri);var _17e5=null;var myUrl;var href=com.ibm.mm.enabler.utils.Utils.getHrefFromIdentifiable(uri);if(href){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(href,this);}else{if(uri=="collection"){myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.entryUrl,this);}else{myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.urlType,this);myUrl.setNodes([{value:com.ibm.mm.enabler.utils.Misc.encodeModelID4Uri(uri),isID:true}]);}}var s=this._findStrategyByType("com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy");var _17e6="1";if(s){if(_17e2){var _17e7=s.getParentLevel();if(_17e7){_17e6="-"+(_17e7+1);}}else{var _17e8=s.getChildrenLevel();if(_17e8&&_17e8>0){_17e6=_17e8+1;}}}myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_LEVELS,_17e6);myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);myUrl.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_COMPOSITE_APPLICATION);myUrl.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);this._applyHiddenMetaDataLoadingStrategyToModelURL(myUrl);this._applyNoCacheStrategy(myUrl);var _17e9=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.entryUrl,this);com.ibm.mm.enabler.utils.Misc._transferURLParameter(_17e9,myUrl);var _17ea=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _17eb={};_17eb.node=null;_17ea.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this._ATOM_ENTRY,data,this.ns);if(nodes){for(var i=0;i<nodes.length;i++){var node=com.ibm.mm.enabler.navigation.persistence.xml.Factory.createNavigationElementPersistence(nodes[i]);if(id==node.getID()||id==node.getUniqueName()||((node.getID().indexOf(id))==1)){_17eb.node=node;}else{var _17ec=com.ibm.mashups.enabler.xml.XPath.evaluateBoolean(this._IN_REPLY_TO_LINK+"[@ext:uri]",node.getXml(),this.ns);if(uri=="collection"&&(this.urlType!=com.ibm.mashups.enabler.model.url.ModelUrlFactory.NAVIGATION_URL||!_17ec)){_17eb.node=node;}}}}else{if(sync){_17eb.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(_17e1){_17e1.finish(_17eb.node,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){if(xhr.status!=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND){if(_17e4){this.LOGGER.warning(_17e3,this.modelMessages.E_XHR_REQUEST_FAILED_2,[xhr,data||"n/a"]);}if(sync){_17eb.status=xhr.status;}}}}));_17e5=_17eb.node;if(_17e4){this.LOGGER.exiting(_17e3,_17e5);}return _17e5;},_invalidateNode:function(_17ed){if(_17ed.nodes){_17ed=_17ed.nodes;}var _17ee=dojo.isArray(_17ed)?_17ed:[_17ed];for(var i=0,l=_17ee.length;i<l;++i){var _17ef=_17ee[i];this._invalidateLayoutModel(_17ef);}},_invalidateLayoutModel:function(id){if(this.layoutModels[id]&&this.layoutModels[id]._wireModel){this.layoutModels[id]._wireModel=null;}delete this.layoutModels[id];},_applyNoCacheStrategy:function(url){var s=this._findStrategyByType("com.ibm.mashups.enabler.strategy.NoCacheStrategy");if(s){url.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_NOCACHE,"true");}},_applyNavigationUpdateStrategy:function(url,def){var value;var s=this._findStrategyByType("com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy");if(s){value=s.getURLUpdateParameterValue();}url.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_UPDATE,value||def);},_applyNavigationCreationStrategy:function(url){var _17f0=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);if(_17f0.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVIGATION_CREATION_NOOP)===true){url.setParameter("handlesink","noop");}},_getIteratorPersistenceHandler:function(_17f1){this._initServiceDoc();var that=this;return {loadAhead:function(_17f2){return new com.ibm.mm.enabler.DeferredImpl(that,function(_17f3,sync,node){var _17f4="loadAhead";var _17f5=this.LOGGER.isLoggable(that.LOG_LEVEL);if(_17f5){this.LOGGER.entering(_17f4,arguments);}var _17f6=null;if(!_17f2.url){_17f6={nodes:[],size:0,loadFurtherNodes:false};if(_17f3){_17f3.finish(_17f6,200);}if(_17f5){this.LOGGER.exiting(_17f4,_17f6);}return _17f6;}var _17f7=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.entryUrl,this);com.ibm.mm.enabler.utils.Misc._transferURLParameter(_17f7,_17f2.url);var _17f8=new com.ibm.mm.enabler.services.ModelRestServiceRequest(_17f2.url,null,null,false,sync);_17f8.read(dojo.hitch(this,function(type,data,xhr,args){var id;var f=com.ibm.mm.enabler.navigation.persistence.xml.Factory;if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){_17f6={nodes:[],loadFurtherNodes:false};_17f6.size=com.ibm.mashups.enabler.xml.XPath.evaluateNumber("atom:feed/opensearch:totalResults",data,this.ns);var nodes=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("atom:feed/atom:entry",data,this.ns);if(nodes){for(var i=0;i<nodes.length;i++){var expr=this._IN_REPLY_TO_LINK+"/@ext:uri";var _17f9=com.ibm.mashups.enabler.xml.XPath.evaluateString(expr,nodes[i],this.ns);if(_17f9&&_17f9.indexOf(_17f2.parentId)!=-1){var node=f.createNavigationElementPersistence(nodes[i]);_17f6.nodes.push(node);}else{_17f6.size--;}}}var next=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:feed/atom:link[@rel='next']",data,this.ns);if(next){_17f6.loadFurtherNodes=true;var url=next.getAttribute("href");_17f2.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(url,this);_17f2.url.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);_17f2.url.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_COMPOSITE_APPLICATION);_17f2.url.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);this._applyHiddenMetaDataLoadingStrategyToModelURL(_17f2.url);this._applyNoCacheStrategy(_17f2.url);}if(_17f3){_17f3.finish(_17f6,xhr.status);}}else{if(_17f3){_17f3.finish(null,xhr.status);}}}));if(_17f5){this.LOGGER.exiting(_17f4,_17f6);}return _17f6;});},getLoadAheadContext:function(_17fa,_17fb){if(!_17fa){_17fa={};var href=that._getChildrenLink(_17f1);if(href){_17fa.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(href,that);if(that.strategy){for(var x in that.strategy){if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(that.strategy[x],com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy)){_17fa.url.setParameter("num",that.strategy[x].getInterval());_17fa.url.setParameter("start",_17fb.getCursorPosition());break;}}}_17fa.url.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_ACCESS_CONTROL);_17fa.url.addParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_ASPECT_VALUE_COMPOSITE_APPLICATION);_17fa.url.setParameter(com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION,com.ibm.mm.enabler.model.url.ModelUrlConstants.PARAMETER_REPRESENTATION_VALUE_FULL);that._applyHiddenMetaDataLoadingStrategyToModelURL(_17fa.url);that._applyNoCacheStrategy(_17fa.url);}else{_17fa.url=null;}_17fa.parentId=_17f1.getID();}return _17fa;},setCursorPosition:function(_17fc,_17fd){if((_17fc)&&(_17fc.url)){_17fc.url.setParameter("start",_17fd.getCursorPosition());}return _17fc;}};}});}if(!dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationModelXmlImpl"]){dojo._hasResource["com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationModelXmlImpl"]=true;dojo.provide("com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationModelXmlImpl");dojo.declare("com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationModelXmlImpl",[com.ibm.mm.enabler.navigation.persistence.xml.NavigationModelXmlImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.urlType=com.ibm.mashups.enabler.model.url.ModelUrlFactory.SHARED_NAVIGATION_URL;},_initServiceDoc:function(){this.inherited("_initServiceDoc",arguments);this.serviceJson=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_SHARED_NAVIGATION);this.entryUrl=this.serviceJson.url;this.prefix=this.serviceJson.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(this.serviceJson.namespaces,nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_THR,nsf.NS_XML,nsf.NS_OPENSEARCH,nsf.NS_XHTML,nsf.NS_APP]));},_getInstance:function(){var _17fe=com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationModelXmlImpl._instance;return _17fe?_17fe:(com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationModelXmlImpl._instance=new com.ibm.mm.enabler.navigation.persistence.xml.SharedNavigationModelXmlImpl());},isAccepted:function(node){if(node===null||typeof node=="undefined"){throw new Error(dojo.string.substitute(this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["id",this.declaredClass,"isAccepted(id)"]));}if(typeof (node)=="string"){node=this.find(node.getID()).start();}if(!node){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}var expr="atom:link[@ext:rel='linked']";return com.ibm.mashups.enabler.xml.XPath.evaluateBoolean(expr,node.xmlData,this.ns);}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.UserBaseImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.UserBaseImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.UserBaseImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.UserBaseImpl",null,{constructor:function(data,_17ff,_1800){this.anonUserID=_17ff;this.anonUserIDEncoded=_1800;},getReadOnlyAttributeNames:function(){this.getAttributeNames();return this.readOnlyAttNames;},getReadWriteAttributeNames:function(){this.getAttributeNames();return this.lookasideAttNames;},getAttributeNames:function(){if(typeof this.attNames!="undefined"&&this.attNames!==null){return this.attNames;}this.attNames=[];this.lookasideAttNames=[];this.readOnlyAttNames=[];var array=this._getAttributeNames();var _1801=array.length;for(var i=0;i<_1801;i++){var aName=array[i];if(aName.indexOf("com.ibm.mashups.user.")===0){this.lookasideAttNames.push(aName);}else{this.readOnlyAttNames.push(aName);}this.attNames.push(aName);}return this.attNames;},getLoginName:function(){return this.getAttribute("principalName");},getSN:function(){return this.getAttribute("sn");},getCN:function(){return this.getAttribute("cn");},getEmail:function(){var email=this.getAttribute("email");if(!email){return this.getAttribute("mail");}return email;},getDisplayName:function(){if((this.getID()==this.anonUserID)||(this.getID()==this.anonUserIDEncoded)){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ANON;}var _1802=this.getAttribute("displayName");if((typeof _1802=="undefined")||(_1802===null)||(_1802.length===0)){var _1803=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _1804=_1803.getValue(com.ibm.mashups.enabler.services.ConfigConstants.DEFAULT_USER_DISPLAY_PROP);if((typeof _1804!="undefined")&&(_1804!==null)){_1802=this.getAttribute(_1804);}}if((typeof _1802=="undefined")||(_1802===null)||(_1802.length===0)){_1802=this.getLoginName();}return _1802;},getEntityType:function(){return "user";},isVirtual:function(){if((this.getID()==this.anonUserID)||(this.getID()==this.anonUserIDEncoded)){return true;}return false;},getVirtualType:function(){if((this.getID()==this.anonUserID)||(this.getID()==this.anonUserIDEncoded)){return com.ibm.mashups.enabler.user.VirtualType.ANONYMOUS_USER;}return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.json.UserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.json.UserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.json.UserImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.json.UserImpl",[com.ibm.mm.enabler.user.persistence.UserBaseImpl,com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl],{getAttribute:function(_1805){if(typeof _1805=="undefined"||_1805===null){return null;}var _1806=this.data.attributes[_1805];if(_1806){return _1806[0];}return null;},_getAttributeNames:function(){var ret=[];for(var aName in this.data.attributes){ret.push(aName);}return ret;},getID:function(){return this.data.id;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.json.CurrentUserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.json.CurrentUserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.json.CurrentUserImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.json.CurrentUserImpl",[com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl,com.ibm.mm.enabler.user.persistence.json.UserImpl],{getJ2EEPrincipalName:function(){var _1807=this.getAttribute("j2ee_principialname");if(_1807){return _1807;}else{return this.getLoginName();}}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.json.AttributeImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.json.AttributeImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.json.AttributeImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.json.AttributeImpl",com.ibm.mm.enabler.persistence.json.JsonPersistenceImpl,{getName:function(){return this.data.name;},getType:function(){return this.data.type;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.json.UserModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.json.UserModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.json.UserModelImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.json.UserModelImpl",[com.ibm.mm.enabler.model.ModelImpl],{constructor:function(_1808,_1809,_180a,_180b,_180c,_180d){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.anonUserID=_1808;this.anonUserIDEncoded=_1809;this.anonUser=_180a;this.allAuthID=_180b;this.allAuthIDEncoded=_180c;this.allAuth=_180d;},_getInstance:function(_180e,_180f,_1810,_1811,_1812,_1813){var _1814=com.ibm.mm.enabler.user.persistence.json.UserModelImpl._instance;return _1814?_1814:(com.ibm.mm.enabler.user.persistence.json.UserModelImpl._instance=new com.ibm.mm.enabler.user.persistence.json.UserModelImpl(_180e,_180f,_1810,_1811,_1812,_1813));},findCurrentUser:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var _1815="findCurrentUser";var _1816=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1816){this.LOGGER.entering(_1815,arguments);}var _1817=ibmConfig.json.user;var _1818=new com.ibm.mm.enabler.user.persistence.json.CurrentUserImpl(_1817,this.anonUserID,this.anonUserIDEncoded);if(dfr){dfr.finish(_1818,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}if(_1816){this.LOGGER.exiting(_1815,_1818);}return _1818;});},findUserAttributes:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var _1819="findUserAttributes";var _181a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_181a){this.LOGGER.entering(_1819,arguments);}var _181b=ibmConfig.json.userAttributes;var _181c=_181b.length;this.attEntry=[];for(var i=0;i<_181c;i++){this.attEntry.push(new com.ibm.mm.enabler.user.persistence.json.AttributeImpl(_181b[i]));}if(dfr){dfr.finish(this.attEntry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}if(_181a){this.LOGGER.exiting(_1819,this.attEntry);}return this.attEntry;});}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.EntityImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.EntityImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.xml.EntityImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.xml.EntityImpl",[com.ibm.mm.enabler.persistence.xml.IdentifiableXmlImpl,com.ibm.mm.enabler.persistence.xml.XmlPersistenceImpl],{});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.UserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.UserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.xml.UserImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.xml.UserImpl",[com.ibm.mm.enabler.user.persistence.UserBaseImpl,com.ibm.mm.enabler.user.persistence.xml.EntityImpl],{constructor:function(data,_181d,_181e){this.xmlData=data;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_UM]);this.changedAttributes={};this.addedAttributes={};this.removedAttributes={};},getAttribute:function(_181f){if(typeof _181f=="undefined"||_181f===null){return null;}if(this.removedAttributes[_181f]){return null;}else{if(this.changedAttributes[_181f]){return this.changedAttributes[_181f];}else{if(this.addedAttributes[_181f]){return this.addedAttributes[_181f];}}}var expr="atom:content/um:profile/um:attribute[@name='"+_181f+"']/um:attributeValue";var _1820=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(!_1820){return null;}var _1821=com.ibm.mm.enabler.utils.Dom.textContent(_1820);return _1821;},_getAttributeNames:function(){var _1822=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("atom:content/um:profile/um:attribute",this.xmlData,this.ns);if(_1822.length===0){return [];}var ret=[];for(var i=0;i<_1822.length;i++){var aNode=_1822[i];var aName=aNode.getAttribute("name");ret.push(aName);}return ret;},getID:function(){var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:id",this.xmlData,this.ns);if(!node){return null;}var _1823=com.ibm.mm.enabler.utils.Dom.textContent(node);if((_1823===null)||(_1823.length===0)){return null;}var pos=_1823.indexOf("profiles/");if(pos==-1){pos=_1823.indexOf("profiles:");}var id=_1823.slice(pos+"profiles:".length);return decodeURIComponent(id);},setAttribute:function(name,value){var _1824=null;var expr="atom:content/*/um:attribute"+"[@name='"+name+"']/"+"um:attributeValue";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(node){com.ibm.mm.enabler.utils.Dom.textContent(node,value);this.changedAttributes[name]=value;this.removedAttributes[name]=null;}else{var _1825=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:content/um:profile",this.xmlData,this.ns);if(_1825){var _1826=this.xmlData.ownerDocument;var _1827=com.ibm.mm.enabler.utils.Dom.createElement(_1826,"um:attribute",this.ns.um);_1827.setAttribute("name",name);_1827.setAttribute("type","xs:string");_1827.setAttribute("multiValued","false");var _1828=com.ibm.mm.enabler.utils.Dom.createElement(_1826,"um:attributeValue",this.ns.um);com.ibm.mm.enabler.utils.Dom.textContent(_1828,value);_1827.appendChild(_1828);_1825.appendChild(_1827);this.changedAttributes[name]=null;this.addedAttributes[name]=value;this.removedAttributes[name]=null;}}return _1824;},removeAttribute:function(name){var expr="atom:content/*/um:attribute"+"[@name='"+name+"']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(node){dojo.destroy(node);this.changedAttributes[name]=null;this.addedAttributes[name]=null;this.removedAttributes[name]="";return "";}},getChangedAttributeNames:function(){return this.changedAttributes;},getAddedAttributeNames:function(){return this.addedAttributes;},getRemovedAttributeNames:function(){return this.removedAttributes;},clearChangedAttributeNames:function(){this.changedAttributes={};this.addedAttributes={};this.removedAttributes={};}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.CurrentUserImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.CurrentUserImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.xml.CurrentUserImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.xml.CurrentUserImpl",[com.ibm.mm.enabler.user.persistence.xml.UserImpl],{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},getJ2EEPrincipalName:function(){var _1829=this.getAttribute("j2ee_principialname");if(_1829){return _1829;}else{return this.getLoginName();}}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.AttributeImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.AttributeImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.xml.AttributeImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.xml.AttributeImpl",com.ibm.mm.enabler.persistence.xml.XmlPersistenceImpl,{constructor:function(data){var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_UM]);this.xmlData=data;},getName:function(){var _182a=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:title",this.xmlData,this.ns);if(!_182a){return null;}return com.ibm.mm.enabler.utils.Dom.textContent(_182a);},getType:function(){var _182b=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:content/um:attribute",this.xmlData,this.ns);if(!_182b){return null;}return _182b.getAttribute("type");}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.GroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.GroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.xml.GroupImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.xml.GroupImpl",[com.ibm.mm.enabler.user.persistence.xml.EntityImpl],{constructor:function(data,_182c,_182d){this.xmlData=data;this.allAuthID=_182c;this.allAuthIDEncoded=_182d;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_UM]);},getID:function(){var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:id",this.xmlData,this.ns);if(!node){return null;}var _182e=com.ibm.mm.enabler.utils.Dom.textContent(node);if((_182e===null)||(_182e.length===0)){return null;}if(com.ibm.mm.enabler.model.UserModel.iConfig.getID){return com.ibm.mm.enabler.model.UserModel.iConfig.getID(_182e);}var pos=_182e.indexOf("profiles/");if(pos==-1){pos=_182e.indexOf("profiles:");}var id=_182e.slice(pos+"profiles:".length);return decodeURIComponent(id);},getCN:function(){var _182f=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:content/um:profile/um:attribute[@name='cn']/um:attributeValue",this.xmlData,this.ns);if(!_182f){return null;}var cn=com.ibm.mm.enabler.utils.Dom.textContent(_182f);return cn;},getDisplayName:function(){if((this.getID()==this.allAuthID)||(this.getID()==this.allAuthIDEncoded)){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ALL_AUTH;}var _1830=null;var _1831=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:content/um:profile/um:attribute[@name='displayName']/um:attributeValue",this.xmlData,this.ns);if(_1831){_1830=com.ibm.mm.enabler.utils.Dom.textContent(_1831);}if((typeof _1830=="undefined")||(_1830===null)||(_1830.length===0)){var _1832=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _1833=_1832.getValue(com.ibm.mashups.enabler.services.ConfigConstants.DEFAULT_GROUP_DISPLAY_PROP);if((typeof _1833!="undefined")&&(_1833!==null)){_1830=this.getAttribute(_1833);}}if((typeof _1830=="undefined")||(_1830===null)||(_1830.length===0)){_1830=this.getCN();}return _1830;},getEntityType:function(){return "group";},getAttribute:function(_1834){var expr="atom:content/um:profile/um:attribute[@name='"+_1834+"']/um:attributeValue";var _1835=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.ns);if(!_1835){return null;}return com.ibm.mm.enabler.utils.Dom.textContent(_1835);},isVirtual:function(){if((this.getID()==this.allAuthID)||(this.getID()==this.allAuthIDEncoded)){return true;}return false;},getVirtualType:function(){if((this.getID()==this.allAuthID)||(this.getID()==this.allAuthIDEncoded)){return com.ibm.mashups.enabler.user.VirtualType.ALL_AUTHENTICATED_GROUP;}return null;}});}if(!dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.UserModelImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.persistence.xml.UserModelImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.persistence.xml.UserModelImpl");dojo.declare("com.ibm.mm.enabler.user.persistence.xml.UserModelImpl",[com.ibm.mm.enabler.model.ModelImpl],{constructor:function(_1836,_1837,_1838,_1839,_183a,_183b){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.anonUserID=_1836;this.anonUserIDEncoded=_1837;this.anonUser=_1838;this.allAuthID=_1839;this.allAuthIDEncoded=_183a;this.allAuth=_183b;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=nsf.getNameSpaces([nsf.NS_ATOM,nsf.NS_UM]);},_getInstance:function(_183c,_183d,_183e,_183f,_1840,_1841){var _1842=com.ibm.mm.enabler.user.persistence.xml.UserModelImpl._instance;return _1842?_1842:(com.ibm.mm.enabler.user.persistence.xml.UserModelImpl._instance=new com.ibm.mm.enabler.user.persistence.xml.UserModelImpl(_183c,_183d,_183e,_183f,_1840,_1841));},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,uri);},_find:function(dfr,sync,id){var _1843="_find";var _1844=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1844){this.LOGGER.entering(_1843,arguments);}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.USER_URL,this);myUrl.setSchemeSpecificPart("users:profiles:"+encodeURIComponent(id));myUrl.setParameter("expandRefs","true");var _1845=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _1846=null;_1845.read(dojo.hitch(this,function(type,data,xhr,args){if(type!=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_ERROR){var _1847=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK;var _1848=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",data,this.ns);if(_1848){_1846=new com.ibm.mm.enabler.user.persistence.xml.UserImpl(_1848,this.anonUserID,this.anonUserIDEncoded);}if(_1846!==null){}else{if(sync){_1847=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(dfr){dfr.finish(_1846,_1847);}}));if(_1844){this.LOGGER.exiting(_1843);}return _1846;},findUsersByAttribute:function(_1849,_184a){return new com.ibm.mm.enabler.DeferredImpl(this,this._findUsersByAttribute,{name:_1849,value:_184a});},_findUsersByAttribute:function(dfr,sync,attr){var _184b="_findUsersByAttributes";var _184c=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_184c){this.LOGGER.entering(_184b,arguments);}var _184d=attr.name;var _184e=attr.value;var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.USER_URL,this);myUrl.setSchemeSpecificPart("users:profiles");myUrl.setParameter("expandRefs","true");myUrl.setParameter("searchAttributes",_184d+"="+encodeURIComponent(_184e));var _184f=null;var _1850=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1850.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var _1851=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("atom:feed/atom:entry",data,this.ns);_184f=dojo.map(_1851,function(_1852){return new com.ibm.mm.enabler.user.persistence.xml.UserImpl(_1852,this.anonUserID,this.anonUserIDEncoded);},this);}dfr&&dfr.finish(_184f,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}));if(_184c){this.LOGGER.exiting(_184b);}return _184f;},findGroupByID:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._findGroupByID,id);},_findGroupByID:function(dfr,sync,id){var _1853="_findGroupByID";var _1854=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1854){this.LOGGER.entering(_1853,arguments);}if((id===this.allAuthID)||(id===this.allAuthIDEncoded)){return this.allAuth;}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.USER_URL,this);myUrl.setSchemeSpecificPart("groups:profiles:"+encodeURIComponent(id));myUrl.setParameter("expandRefs","true");var _1855=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _1856=null;_1855.read(dojo.hitch(this,function(type,data,xhr,args){var _1857=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",data,this.ns);if(_1857){retVal=new com.ibm.mm.enabler.user.persistence.xml.GroupImpl(_1857,this.allAuthID,this.allAuthIDEncoded)||null;}if(dfr){dfr.finish(retVal,xhr.status);}}));if(_1854){this.LOGGER.exiting(_1853);}return retVal;},findGroupsByAttribute:function(_1858,_1859){return new com.ibm.mm.enabler.DeferredImpl(this,this._findGroupsByAttribute,{name:_1858,value:_1859});},_findGroupsByAttribute:function(dfr,sync,attr){var _185a="_findGroupsByAttribute";var _185b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_185b){this.LOGGER.entering(_185a,arguments);}var _185c=attr.name;var _185d=attr.value;var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.USER_URL,this);myUrl.setSchemeSpecificPart("groups:profiles");myUrl.setParameter("expandRefs","true");myUrl.setParameter("searchAttributes",_185c+"="+encodeURIComponent(_185d));var _185e=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _185f=null;_185e.read(dojo.hitch(this,function(type,data,xhr,args){var _1860=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("atom:feed/atom:entry",data,this.ns);_185f=dojo.map(_1860,function(_1861){return new com.ibm.mm.enabler.user.persistence.xml.GroupImpl(_1861,this.allAuthID,this.allAuthIDEncoded);},this);if(dfr){dfr.finish(_185f,xhr.status);}}));if(_185b){this.LOGGER.exiting(_185a);}return _185f;},findCurrentUser:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._findCurrentUser);},_findCurrentUser:function(dfr,sync){var _1862="_findCurrentUser";var _1863=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1863){this.LOGGER.entering(_1862,arguments);}var _1864=null;var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.USER_URL,this);myUrl.setSchemeSpecificPart("currentuser:profile");myUrl.setParameter("expandRefs","true");var _1865=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1865.read(dojo.hitch(this,function(type,data,xhr,args){var _1866=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",data,this.ns);if(_1866){_1864=new com.ibm.mm.enabler.user.persistence.xml.CurrentUserImpl(_1866,this.anonUserID,this.anonUserIDEncoded);}if(dfr){dfr.finish(_1864,xhr.status);}}));if(_1863){this.LOGGER.exiting(_1862);}return _1864;},findGroupAttributes:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._findGroupAttributes);},_findGroupAttributes:function(dfr,sync){var _1867="findGroupAttributes";var _1868=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1868){this.LOGGER.entering(_1867,arguments);}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.USER_URL,this);myUrl.setSchemeSpecificPart("attributes:groups");myUrl.setParameter("expandRefs","true");var _1869=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _186a=null;_1869.read(dojo.hitch(this,function(type,data,xhr,args){var _186b=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("atom:feed/atom:entry",data,this.ns);_186a=dojo.map(_186b,function(_186c){return new com.ibm.mm.enabler.user.persistence.xml.AttributeImpl(_186c);},this);if(dfr){dfr.finish(_186a,xhr.status);}}));if(_1868){this.LOGGER.exiting(_1867);}return _186a;},findUserAttributes:function(){return new com.ibm.mm.enabler.DeferredImpl(this,this._findUserAttributes);},_findUserAttributes:function(dfr,sync){var _186d="_findUserAttributes";var _186e=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_186e){this.LOGGER.entering(_186d,arguments);}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.USER_URL,this);myUrl.setSchemeSpecificPart("attributes:users");myUrl.setParameter("expandRefs","true");var _186f=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var _1870=null;_186f.read(dojo.hitch(this,function(type,data,xhr,args){var _1871=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("atom:feed/atom:entry",data,this.ns);_1870=dojo.map(_1871,function(_1872){return new com.ibm.mm.enabler.user.persistence.xml.AttributeImpl(_1872);},this);if(dfr){dfr.finish(_1870,xhr.status);}}));if(_186e){this.LOGGER.exiting(_186d);}return _1870;},isDirty:function(node){var _1873="isDirty()";var _1874=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1874){this.LOGGER.entering(_1873,arguments);}if(node){if(node.getAddedAttributeNames()||node.getChangedAttributeNames()||node.getChangedAttributeNames()){if(_1874){this.LOGGER.exiting(_1873,true);}return true;}}if(_1874){this.LOGGER.exiting(_1873,false);}return false;},commit:function(node){return new com.ibm.mm.enabler.DeferredOperationImpl(this,this._commit,node);},_commit:function(_1875,sync,node){if(node){if(node.getAddedAttributeNames()||node.getChangedAttributeNames()||node.getChangedAttributeNames()){var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.USER_URL,this);myUrl.setSchemeSpecificPart("currentuser:profile");myUrl.setParameter("expandRefs","true");var _1876=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,true);_1876.update(node.toString(),dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){node.clearChangedAttributeNames();var _1877=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",data,this.ns);if(_1877){node=new com.ibm.mm.enabler.user.persistence.xml.UserImpl(_1877,this.anonUserID,this.anonUserIDEncoded);}if(_1875&&_1875.operationCallback){_1875.operationCallback(node,com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status,_1875.operationCallbackParameters);}}if(_1875){_1875.finish(node,xhr.status);}}));}}}});}if(!dojo._hasResource["com.ibm.mashups.data.exception"]){dojo._hasResource["com.ibm.mashups.data.exception"]=true;dojo.provide("com.ibm.mashups.data.exception");dojo.declare("com.ibm.mashups.data.exception",null,{constructor:function(_1878,_1879){},getMessage:function(_187a){}});}if(!dojo._hasResource["com.ibm.mashups.data.model"]){dojo._hasResource["com.ibm.mashups.data.model"]=true;dojo.provide("com.ibm.mashups.data.model");dojo.declare("com.ibm.mashups.data.model",null,{getValue:function(item,_187b){},getValueType:function(item,_187c){},getValues:function(item,_187d){},getAttributes:function(item){},hasAttribute:function(item,_187e){},isItem:function(_187f){},fetch:function(_1880){},serialize:function(){}});}if(!dojo._hasResource["com.ibm.mm.data.table"]){dojo._hasResource["com.ibm.mm.data.table"]=true;dojo.provide("com.ibm.mm.data.table");dojo.declare("com.ibm.mm.data.table",dojox.data.CsvStore,{constructor:function(_1881){if(this._isCSVLike(_1881.data)){_1881.data=this._CSVLike2CSV(_1881.data);}this._attributes=[];this._attributeIndexes={};this._dataArray=[];this._arrayOfAllItems=[];this._loadFinished=false;if(_1881.url){this.url=_1881.url;}this._csvData=_1881.data;if(_1881.label){this.label=_1881.label;}else{if(this.label===""){this.label=undefined;}}this._storeProp="_csvStore";this._idProp="_csvId";this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._loadInProgress=false;this._queuedFetches=[];},_isCSVLike:function(_1882){var data=dojo.clone(_1882);if(data&&dojo.isString(data)&&data.length>0){data=data.replace(/\n/g,"");var rows=data.split("|");if(!rows||rows.length<2){return false;}var _1883=this._splitterCSVLikeRow(rows[0]);if(!_1883||_1883.length<=0){return false;}var _1884=_1883.length;for(var i=1;i<rows.length;i++){if(rows[i]==""){break;}var _1885=this._splitterCSVLikeRow(rows[i]);if(!_1885||_1885.length!=_1884){return false;}}return true;}return false;},_splitterCSVLikeRow:function(_1886){var cells=_1886.split(",");var len=cells.length;var i,j,k;for(var m=0;m<len;m++){i=j=-1;for(k=0;k<cells.length;k++){if(i==-1&&cells[k].charAt(0)=="\""&&cells[k].charAt(cells[k].length-1)!="\""){i=k;continue;}if(i>0&&cells[k].charAt(cells[k].length-1)=="\""&&cells[k].charAt(0)!="\""){j=k;break;}}if(i>0&&j>0){var str=cells[i];for(k=i+1;k<j+1;k++){str=str+","+cells[k];}var temp=[];for(k=0;k<i;k++){temp.push(cells[k]);}temp.push(str);for(k=j+1;k<cells.length;k++){temp.push(cells[k]);}cells=temp;}else{break;}}return cells;},_CSVLike2CSV:function(_1887){var _1888=["string"];function _inArray(item,_1889){for(var i=0;i<_1889.length;i++){if(item.toUpperCase()==_1889[i].toUpperCase()){return true;}}return false;};function _addTypeInfo(_188a,_188b){var i;if(!_188b){_188b=[];for(i=0;i<_188a.length;i++){_188b.push("text");}}if(_188a.length!=_188b.length){throw ("Illegal CSV like data");}for(i=0;i<_188a.length;i++){_188a[i]=_188a[i]+"<"+_188b[i]+">";}return _188a;};var data=dojo.clone(_1887);if(data&&dojo.isString(data)&&data.length>0){data=data.replace(/\n/g,"");var rows=data.split("|");var csv=[];var _188c;if(rows.length>=2){_188c=this._splitterCSVLikeRow(rows[0]);var _188d=this._splitterCSVLikeRow(rows[1]);var i;var _188e=true;for(i=0;i<_188d.length;i++){if(!_inArray(_188d[i],_1888)){_188e=false;break;}}if(_188e){_188c=_addTypeInfo(_188c,_188d);csv.push(_188c.join(","));for(i=2;i<rows.length;i++){csv.push(rows[i]);}}else{_188c=_addTypeInfo(_188c,null);csv.push(_188c.join(","));for(i=1;i<rows.length;i++){csv.push(rows[i]);}}}else{_188c=this._splitterCSVLikeRow(rows[0]);_188c=_addTypeInfo(_188c,null);csv.push(_188c.join(","));}return csv.join("\n");}else{throw ("Illegal CSV like data");}},_processData:function(data){this._getArrayOfArraysFromCsvFileContents(data);this._processAttributeTypes();this._arrayOfAllItems=[];for(var i=0;i<this._dataArray.length;i++){this._arrayOfAllItems.push(this._createItemFromIdentity(i));}this._loadFinished=true;this._loadInProgress=false;},_processAttributeTypes:function(){var _188f=[];this._attributeTypes={};var _1890,_1891,_1892;var myRE=/^(\w|\s)+<(\w|(.\w)+)+>$/;for(index=0;index<this._attributes.length;index++){_1890=this._attributes[index];if(_1890.match(myRE)){_1891=_1890.indexOf("<");_1892=_1890.substring(0,_1891);_188f[_188f.length]=_1892;this._attributeTypes[_1892]=_1890.substring(_1891+1,_1890.length-1);this._attributeIndexes[_1892]=this._attributeIndexes[_1890];delete this._attributeIndexes[_1890];}else{_188f[_188f.length]=_1890;this._attributeTypes[_1890]="text";}}this._attributes=_188f;},getValueType:function(item,_1893){return this._attributeTypes[_1893];},toJson:function(){var obj={};obj.className=this.declaredClass;var json={};json.data=this._csvData;obj.json=dojo.toJson(json);return dojo.toJson(obj);},serialize:function(){var _1894="";var _1895,_1896,_1897;for(index=0;index<this._attributes.length;index++){_1895=this._attributes[index];_1894+=_1895+"<"+this._attributeTypes[_1895]+">,";}_1894+="\n";if(this._dataArray){for(index=0;index<this._dataArray.length;index++){_1896=this._dataArray[index];if(_1896){for(index0=0;index0<_1896.length;index0++){_1897=_1896[index0];if(_1897.indexOf(",")>=0){_1894+="\""+_1897+"\",";}else{_1894+=_1897+",";}}_1894+="\n";}}}return _1894;}});}if(!dojo._hasResource["com.ibm.mashups.data.util"]){dojo._hasResource["com.ibm.mashups.data.util"]=true;dojo.provide("com.ibm.mashups.data.util");dojo.provide("com.ibm.mashups.data.Util");dojo.declare("com.ibm.mashups.data.Util",null,{encodeCSVCell:function(cell){cell=""+cell;var _1898=cell.replace(/"/g,"\"\"");if(_1898.indexOf(",")>=0||_1898.indexOf("\"")>=0){_1898="\""+_1898+"\"";}_1898=_1898.replace(/\n/g,"");return _1898;},JSONObject2CSV:function(json){if(!dojo.isArray(json)){json=[json];}var _1899="",_189a="";var _189b=true;for(var i=0;i<json.length;i++){_189b=true;var _189c=json[i];for(var key in _189c){if(Object.prototype.hasOwnProperty.call(_189c,key)){if(i===0){if(!_189b){_1899+=",";}_1899+=this.encodeCSVCell(key);}if(!_189b){_189a+=",";}_189a+=this.encodeCSVCell(json[i][key]);_189b=false;}}if(i===0){_1899+="\n";}_189a+="\n";}return _1899+_189a;},JSONObject2Table:function(json){var csv=this.JSONObject2CSV(json);var table=new com.ibm.mm.data.table({data:csv});return table;}});com.ibm.mashups.data.Util=new com.ibm.mashups.data.Util();}if(!dojo._hasResource["com.ibm.mm.enabler.LegacySupport"]){dojo._hasResource["com.ibm.mm.enabler.LegacySupport"]=true;dojo.provide("com.ibm.mm.enabler.LegacySupport");dojo.provide("com.ibm.enabler.aggregation.javascript");dojo.provide("com.ibm.enabler.iw");dojo.provide("com.ibm.enabler.xpath");dojo.provide("com.ibm.enabler.xslt");dojo.provide("com.ibm.enabler.services");dojo.provide("com.ibm.enabler.debug");dojo.provide("com.ibm.enabler.iw.eventImpl");dojo.provide("com.ibm.enabler.dom");dojo.provide("com.ibm.mm.enabler.dom");dojo.provide("com.ibm.enabler.utilities");dojo.provide("com.ibm.mm.enabler.utilities");dojo.provide("com.ibm.mm.enabler.iw");dojo.provide("com.ibm.mm.iwidget.iEvents");dojo.provide("com.ibm.mm.enabler.utilities.HttpUrl");dojo.provide("com.ibm.mm.enabler.debug");com.ibm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER=com.ibm.mm.enabler.aggregation.javascript.JAVASCRIPT_HANDLER;com.ibm.mm.iwidget.utils=com.ibm.mm.iwidget.Utils;com.ibm.enabler.iw.utils=com.ibm.mm.iwidget.utils;com.ibm.mm.enabler.utilities={};com.ibm.mm.enabler.utilities=dojo.mixin(com.ibm.mm.enabler.utilities,com.ibm.mm.enabler.utils.LocaleHelper,com.ibm.mm.enabler.utils.URLHelper,com.ibm.mm.enabler.utils.Misc,com.ibm.mm.enabler.utils.Dom);com.ibm.enabler.utilities=com.ibm.mm.enabler.utilities;com.ibm.enabler.dom=com.ibm.mm.enabler.dom;dojo.declare("com.ibm.mm.enabler.utilities.HttpUrl",com.ibm.mm.enabler.utils.HttpUrl,{constructor:function(){}});dojo.declare("com.ibm.enabler.utilities.HttpUrl",com.ibm.mm.enabler.utilities.HttpUrl,{constructor:function(){}});com.ibm.mm.enabler.xpath=com.ibm.mm.enabler.xml.xpath;com.ibm.enabler.xpath.evaluateXPath=com.ibm.mashups.enabler.xml.XPath.evaluateXPath;if(com.ibm.mm.enabler.xslt){com.ibm.enabler.xslt.getXmlHttpRequest=com.ibm.mm.enabler.xslt.getXmlHttpRequest;com.ibm.enabler.xslt.loadXml=com.ibm.mm.enabler.xslt.loadXml;com.ibm.enabler.xslt.loadXmlString=com.ibm.mm.enabler.xslt.loadXmlString;com.ibm.enabler.xslt.loadXsl=com.ibm.mm.enabler.xslt.loadXsl;com.ibm.enabler.xslt.transform=com.ibm.mm.enabler.xslt.transform;com.ibm.enabler.xslt.transformAndUpdate=com.ibm.mm.enabler.xslt.transformAndUpdate;}com.ibm.mm.enabler.debug=com.ibm.mm.enabler.logging.LegacyLogger;com.ibm.enabler.debug.Constants=com.ibm.mm.enabler.debug.Constants;com.ibm.enabler.debug.log=com.ibm.mm.enabler.debug.log;com.ibm.enabler.debug.entry=com.ibm.mm.enabler.debug.entry;com.ibm.enabler.debug.exit=com.ibm.mm.enabler.debug.exit;com.ibm.enabler.debug.info=com.ibm.mm.enabler.debug.info;com.ibm.enabler.debug.warn=com.ibm.mm.enabler.debug.warn;com.ibm.enabler.debug.error=com.ibm.mm.enabler.debug.error;dojo.declare("com.ibm.enabler.iw.iEventDescriptionImpl",com.ibm.mm.iwidget.IEventDescriptionImpl,{constructor:function(){}});com.ibm.mm.enabler.iw.utils=com.ibm.mm.iwidget.utils;com.ibm.mm.iwidget.iEvents.Constants=iwConstants.EVENTS;com.ibm.mm.enabler.iw.iEvents=com.ibm.mm.iwidget.iEvents;dojo.declare("com.ibm.mm.enabler.iw.iEventDescriptionImpl",com.ibm.mm.iwidget.IEventDescriptionImpl,{constructor:function(){}});dojo.provide("com.ibm.mashups.iwidget.services");com.ibm.mashups.iwidget.services.ServiceManager=com.ibm.mashups.services.ServiceManager;dojo.provide("com.ibm.mm.enabler.iw.eventImpl");dojo.declare("com.ibm.mm.iwidget.itemset.PersistentAttributes",com.ibm.mm.iwidget.manageditemset.PersistentAttributes,{constructor:function(){}});dojo.provide("com.ibm.mm.livetext.serviceImpl");com.ibm.mm.livetext.serviceImpl=com.ibm.mm.livetext.ServiceModelImpl;iWidgetContainer=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();}(function () { var reg = new ExtensionRegistry(); reg.disconnect( "dojo.declare" ); })();var Base32 = { ALPHABET: "0123456789ABCDEFGHIJKLMNOPQRSTUV", ENCODING_BASE: 5, DIGIT_MASK: 31, encode: function ( str ) { var digits = (str.length * 8 + this.ENCODING_BASE - 1) / this.ENCODING_BASE; var index = 0, digit = 0, bitsAvailable = 0; var result = ""; for ( var i = 0; i < digits; i++ ) { if ( bitsAvailable < this.ENCODING_BASE && index < str.length ) { var next = str.charCodeAt( index++ ); if ( next < 0 ) { next += 256; } digit = digit | ( next << bitsAvailable ); bitsAvailable += 8; } result += this.ALPHABET.charAt( digit & this.DIGIT_MASK ); digit = ( digit >>> this.ENCODING_BASE ); bitsAvailable -= this.ENCODING_BASE; } return result; }, toByte: function ( value ) { return value & 0x00ff; }, toCharacter: function ( value ) { //need to truncate the digit value to a byte for translating it to a character return String.fromCharCode( this.toByte( value ) ); }, decode: function ( str ) { var digit = 0, bitsAvailable = 0, max = str.length; var result = ""; for ( var i = 0; i < max; i++ ) { var next = this.ALPHABET.indexOf( str.charAt( i ) ); digit = digit | (next << bitsAvailable); bitsAvailable += this.ENCODING_BASE; if ( bitsAvailable >= 8 ) { result += this.toCharacter( digit ); digit = digit >>> 8; bitsAvailable -= 8; } } if ( digit != 0 ) { result += this.toCharacter( digit ); } return result; } }//if(!dojo._hasResource["com.ibm.mm.extension.url"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. //dojo._hasResource["com.ibm.mm.extension.url"] = true; dojo.provide("com.ibm.mm.extension.url"); dojo.declare( "com.ibm.mm.extension.url.ModelUrlFactoryImpl", [com.ibm.mm.enabler.model.url.ModelUrlFactoryImpl], { WEBDAV_URL: "webdav", /** * @private **/ constructor: function () { var factory = com.ibm.mashups.enabler.model.url.ModelUrlFactory; this.schemeMap = {}; this.schemeMap[factory.NAVIGATION_URL] = "nm"; this.schemeMap[factory.SHARED_NAVIGATION_URL] = "snm"; this.schemeMap[factory.FRAGMENT_URL] = "cm"; this.schemeMap[factory.FRAGMENT_MEDIA_URL] = "spa"; this.schemeMap[factory.COMMUNITY_URL] = "ai"; this.schemeMap[factory.USER_URL] = "um"; this.schemeMap[factory.THEME_URL] = "tl"; this.schemeMap[factory.THEME_MEDIA_URL] = "theme-media"; this.schemeMap[factory.CATALOG_URL] = "catalog"; this.schemeMap[factory.CONFIG_URL] = "config"; this.schemeMap[factory.SPACE_URL] = "space"; this.schemeMap[factory.SPACE_FAVORITE_URL] = "space-favorite"; this.schemeMap[factory.AC_URL] = "ac"; this.schemeMap[factory.AI_URL] = "ai"; this.schemeMap[factory.TEMPLATE_URL] = "template"; this.schemeMap[factory.WEBDAV_URL] = "dav:mmdav"; this.schemeMap[factory.WIDGET_URL] = "pm"; this.schemeMap[factory.LAYOUT_URL] = "lm"; this.schemeMap[factory.EVENT_URL] = "ce"; // internal, not exposed this.schemeMap["service"] = "service"; }, createModelURL: function ( origFn, fnArgs ){ var urlType = fnArgs[0]; var model = fnArgs[1]; var modelSchema = this.schemeMap[urlType]; if (!modelSchema) return null; var urlImpl; if (urlType == com.ibm.mashups.enabler.model.url.ModelUrlFactory.THEME_MEDIA_URL) { urlImpl = new com.ibm.mm.extension.url.ThemeResourceUrlImpl(modelSchema, model); } else if (urlType == com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_MEDIA_URL) { urlImpl = new com.ibm.mm.extension.url.SchemeBasedModelMediaUrlImpl(modelSchema, model); } else { urlImpl = new com.ibm.mm.extension.url.SchemeBasedModelUrlImpl(modelSchema, model); } return urlImpl; }, getModelURL: function ( origFn, fnArgs ) { var url = fnArgs[0]; var model = fnArgs[1]; return new com.ibm.mm.extension.url.StringBasedModelUrlImpl(url,model); } } ); dojo.declare("com.ibm.mm.extension.url.BaseModelUrl", [com.ibm.mashups.enabler.model.url.ModelUrl], { modelSchema:null, schemeSpecific: null, isMediaUrl: false, httpUrl: null, VALUE: "value", IS_ID: "isID", SUBMODEL: "submodel", constructor: function() { this.nodes = []; this.prefix = null; var factory = com.ibm.mashups.enabler.model.url.ModelUrlFactory; this.subModelSchemeMap = {}; this.subModelSchemeMap[factory.SUBMODEL_RESOURCE] = "resourceconfig"; this.subModelSchemeMap[factory.SUBMODEL_ROLE] = "role"; this.subModelSchemeMap[factory.SUBMODEL_MEMBER] = "member"; this.subModelSchemeMap[factory.SUBMODEL_ACCESS] = "access"; // get the locale of the document this.locale = document.documentElement.lang; }, _loadPrefix: function() { if (this.prefix==null) { this.prefix = "oid"; } }, setPrimaryNode: function (value, isID, subModel) { var primary = {}; this.setPrimaryNodePortal(value, isID, primary); primary.subModel = subModel; this.nodes[0] = primary; }, setSecondaryNode: function (value, isID, subModel) { var secondary = {}; secondary.value = value; secondary.isID = (isID != null) ? isID : true; if (this.modelSchema == "tl") { this.modelSchema = "sl"; } else if ((this.modelSchema == "spa") && (value=="index.html")) { secondary.value = "html/index.html"; } secondary.subModel = subModel; this.nodes[1] = secondary; }, setNodes: function(nodes) { for (var i=0; i < nodes.length; i++) { nodes[i].isID = (nodes[i].isID != null) ? nodes[i].isID : true; } this.nodes = nodes; var handled = false; if (this.modelSchema == "ai" && nodes.length > 0) { if ((nodes.length==2) && (nodes[0].value=="collection") && (nodes[0].isID==false) && (nodes[0].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_ROLE)) { this.nodes = []; this.setPrimaryNode("applications/"+nodes[1].value+"/roles",false); handled = true; } else if ((nodes.length==3) && (nodes[0].value=="collection") && (nodes[0].isID==false) && (nodes[0].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_MEMBER) && (nodes[1].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_ROLE)) { this.nodes = []; this.setPrimaryNode("roles/"+nodes[1].value+"/members",false); handled = true; } else if ((nodes.length==3) && (nodes[0].value!="collection") && (nodes[0].isID==false) && (nodes[0].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_MEMBER) && (nodes[1].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_ROLE)) { this.nodes = []; //this.setPrimaryNode("member:oid:"+nodes[0].value+"@role:"+nodes[1].value+"@oid:"+nodes[2].value,false); this.setPrimaryNode("roles/"+nodes[1].value+"/members/"+nodes[0].value,false); handled = true; } } else if (this.modelSchema == "ac" && nodes.length > 0) { if ((nodes.length==2) && (nodes[0].value=="collection") && (nodes[0].isID==false) && (nodes[0].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_ROLE)) { this.nodes = []; this.setPrimaryNode("role:oid:"+nodes[1].value,false); handled = true; } else if ((nodes.length==3) && (nodes[0].value=="collection") && (nodes[0].isID==false) && (nodes[0].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_MEMBER) && (nodes[1].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_ROLE)) { this.nodes = []; this.setPrimaryNode("member:"+nodes[1].value+"@oid:"+nodes[2].value,false); handled = true; } else if ((nodes.length==3) && (nodes[0].value!="collection") && (nodes[0].isID==false) && (nodes[0].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_MEMBER) && (nodes[1].subModel==com.ibm.mm.enabler.model.UrlFactory.SUBMODEL_ROLE)) { this.nodes = []; this.setPrimaryNode("member:oid:"+nodes[0].value+"@role:"+nodes[1].value+"@oid:"+nodes[2].value,false); handled = true; } } if (!handled) { if (nodes.length==1) { this.setPrimaryNode(nodes[0].value, nodes[0].isID, nodes[0].subModel); } else if (nodes.length==2) { this.setPrimaryNode(nodes[0].value, nodes[0].isID, nodes[0].subModel); this.setSecondaryNode(nodes[1].value, nodes[1].isID, nodes[1].subModel); } } this._updateURI(); }, setSchemeSpecificPart: function (value) { this.nodes = []; if(this.modelSchema == "um") { value = "secure/" + value.replace(":", "/"); } this.schemeSpecific = value; this._updateURI(); }, getSchemeSpecificPart: function() { if (this.schemeSpecific != null) return this.schemeSpecific; var tempSSP = ""; if (this.isMediaUrl) tempSSP = "/"; if (!this.nodes) return tempSSP; if (this.isMediaUrl) { for (var i = 0; i < this.nodes.length; i++) { var node = this.nodes[i]; // the prefix MUST only be loaded if the prefix is needed, since the // loading method uses this function as well which would causea infinite loop if (node.isID && !this.prefix) this._loadPrefix(); if (i>0) { if (i<this.nodes.length-1) tempSSP += "@"; else tempSSP += "/"; } tempSSP += node.value; } } else { for (var i = 0; i < this.nodes.length; i++) { var node = this.nodes[i]; // the prefix MUST only be loaded if the prefix is needed, since the // loading method uses this function as well which would causea infinite loop if (node.isID && !this.prefix) this._loadPrefix(); if (tempSSP!="") tempSSP += "@"; if (node.subModel) tempSSP += this.subModelSchemeMap[node.subModel] + ":"; if (node.isID) tempSSP += this.prefix + ":"; tempSSP += node.value; } } return tempSSP; }, _updateURI: function() { var uri = this.modelSchema + ":" + this.getSchemeSpecificPart(); this.httpUrl.setParameter("uri", uri); }, addParameter: function (name, value) { if (name == "start") { this.httpUrl.addParameter("start-index", value); } else if (name == "num") { this.httpUrl.addParameter("max-results", value); } else { this.httpUrl.addParameter(name, value); } }, setParameter: function(name, value) { if (name == "start") { this.httpUrl.setParameter("start-index", value); } else if (name == "num") { this.httpUrl.setParameter("max-results", value); } else { this.httpUrl.setParameter(name, value); } }, getParameter: function(name) { return this.httpUrl.getParameter(name); }, getParameters: function() { return this.httpUrl.getParameters(); }, getAbsoluteURL: function () { if (this.locale && !this.getParameter("locale")) { this.addParameter("locale", this.locale); } return this.httpUrl.toString(); }, getProxifiedAbsoluteURL: function () { if (this.locale && !this.getParameter("locale")) { this.addParameter("locale", this.locale); } return this.httpUrl.toProxifiedString(); }, getModelURI: function () { return this.httpUrl.getParameter("uri"); }, toProxifiedString: function () { if (this.locale && !this.getParameter("locale")) { this.addParameter("locale", this.locale); } // TBD: REMOVE AFTER FULL SWITCH return this.httpUrl.toProxifiedString(); }, setPrimaryNodePortal: function (value, isID, primary) { if(this.modelSchema == "nm") { if (value=="collection") { primary.value = "ibm.portal.Home"; primary.isID = true; } else { primary.value = value; primary.isID = true; } } else if(this.modelSchema == "snm") { if (value=="collection") { primary.value = "ibm.portal.sharedPages"; primary.isID = true; } else { primary.value = value; primary.isID = true; } this.modelSchema = "nm"; } else if(this.modelSchema == "tl" && value=="collection") { primary.value= "all:mashup"; primary.isID = false; } //DAWINTER else if(this.modelSchema == "tl" && isID==true) { primary.value = value; primary.isID = true; /** * This has been introduced with 244615f_1 and removed with * 275909. The "mashup" parameter is only required by the * mashup integration, please see also wp.mmi.deploy and service * document. */ //this.setParameter("filter","mashup"); } else if(this.modelSchema == "cm" && value=="collection") { primary.value = "ibm.portal.MashupContentRoot"; primary.isID = true; } else if(this.modelSchema == "catalog" && value=="collection") { primary.value="all"; primary.isID=false; } else if(this.modelSchema == "ai") { if (value=="collection") { primary.value="communities/collection"; primary.isID=false; } else { primary.value=value; primary.isID=false; } } else if (this.modelSchema == "spa") { //var newvalue = value.substring(0, value.indexOf("/")); primary.value = value; primary.isID = (isID != null) ? isID : true; } else if(this.modelSchema == "space") { this.modelSchema = "ai"; if (value=="collection") { primary.value="/applications"; primary.isID=false; } else { primary.value="/applications/"+value; primary.isID=false; } } else if(this.modelSchema == "space-favorite") { this.modelSchema = "ai"; if (value=="collection") { primary.value="/application-favorites/"; primary.isID=false; } else { primary.value="/application-favorites/"+value; primary.isID=false; } } else if(this.modelSchema == "template") { this.modelSchema = "ai"; if (value=="collection") { primary.value="/templates"; primary.isID=false; } else { primary.value="/templates/"+value; primary.isID=false; } } else { primary.value = value; primary.isID = (isID != null) ? isID : true; } } } ); dojo.declare("com.ibm.mm.extension.url.SchemeBasedModelUrlImpl", [com.ibm.mm.extension.url.BaseModelUrl], { constructor: function (modelSchema, model) { this.modelSchema = modelSchema; this.model = model; var url = ""; // add the contextroot // add the public contenthandler url var contenthandlerpath = portalMashupsConfig.contentHandlerContextPath; if(contenthandlerpath.indexOf("?")!=-1) { contenthandlerpath = contenthandlerpath.substring(0, contenthandlerpath.indexOf("?")); } url += contenthandlerpath; this.httpUrl = new com.ibm.mm.enabler.utilities.HttpUrl(url); this.httpUrl.setParameter("uri", this.modelSchema); // first initialization //OR var navDeclClass = "com.ibm.mm.enabler.model.NavigationModelImpl"; var sharedDeclClass = "com.ibm.mm.enabler.model.SharedNavigationModelImpl"; var layoutDeclClass = "com.ibm.mm.enabler.model.LayoutModelImpl"; var widgetDeclClass = "com.ibm.mm.enabler.widget.WidgetModelImpl"; if (model && model.declaredClass == navDeclClass) { // config service and parameter for hidden pages var cs = com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME); navHiddenName = cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NAVIGATION_HIDDEN); this.httpUrl.addParameter("mdname", navHiddenName); this.httpUrl.addParameter("mdname", "com.ibm.portal.rendertype"); } else if (model && model.declaredClass == sharedDeclClass) { // need to specify the backlink aspect. This must be requested // explicitly for performance reasons on the portal server this.httpUrl.setParameter("aspect", "backlinks"); } else if (model && model.declaredClass == layoutDeclClass) { // need access to the names of the layout containers this.httpUrl.addParameter("mdname", "com.ibm.portal.layoutnode.localname"); } else if (model && model.declaredClass == widgetDeclClass) { this.httpUrl.addParameter("filter", "application"); } //-OR } } ); dojo.declare("com.ibm.mm.extension.url.SchemeBasedModelMediaUrlImpl", [com.ibm.mm.extension.url.SchemeBasedModelUrlImpl], { constructor: function(modelSchema, model) { this.isMediaUrl = true; } }); dojo.declare("com.ibm.mm.extension.url.ThemeResourceUrlImpl", [com.ibm.mm.extension.url.BaseModelUrl], { constructor: function (modelSchema, model) { this.modelSchema = modelSchema; this.model = model; this.httpUrl = new com.ibm.mm.enabler.utilities.HttpUrl("/"); this.httpUrl.setParameter("uri", this.modelSchema); // first initialization }, _updateURI: function() { // at this point we know it must be a theme or skin resource we try to fetch if (this.nodes.length==2) { // theme var themeId = this.nodes[0].value; var resource = this.nodes[1].value; var themeNode = this.model.find(themeId).start(); var url = themeNode._getBaseUrl(); this.httpUrl = new com.ibm.mm.enabler.utilities.HttpUrl(url+resource); } else if (this.nodes.length==3) { // skin var skinId = this.nodes[0].value; var themeId = this.nodes[1].value; var resource = this.nodes[2].value; var skinNode = this.model.find(skinId).start(); var url = skinNode._getBaseUrl(); this.httpUrl = new com.ibm.mm.enabler.utilities.HttpUrl(url+resource); } else { this.httpUrl = new com.ibm.mm.enabler.utilities.HttpUrl("/"); } } } ); dojo.declare("com.ibm.mm.extension.url.StringBasedModelUrlImpl", [com.ibm.mm.extension.url.BaseModelUrl], { constructor: function (url,model) { if(url.indexOf("?")==0) { contenthandlerpath = portalMashupsConfig.contentHandlerContextPath; if(contenthandlerpath.indexOf("?")!=-1) { contenthandlerpath = contenthandlerpath.substring(0, contenthandlerpath.indexOf("?")); url = contenthandlerpath + url; } else { url = contenthandlerpath + url; } } if (!com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.CONTEXT_ROOT) { com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.CONTEXT_ROOT = com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME) .getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT); com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.PRIVATE_HANDLER = com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.CONTEXT_ROOT + com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME) .getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE); com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.PUBLIC_HANDLER = com.ibm.mm.enabler.model.url.StringBasedModelUrlImpl.CONTEXT_ROOT + com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME) .getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC); } this.httpUrl = new com.ibm.mm.enabler.utilities.HttpUrl(url); //OR var navDeclClass = "com.ibm.mm.enabler.model.NavigationModelImpl"; var sharedDeclClass = "com.ibm.mm.enabler.model.SharedNavigationModelImpl"; var layoutDeclClass = "com.ibm.mm.enabler.model.LayoutModelImpl"; var widgetDeclClass = "com.ibm.mm.enabler.widget.WidgetModelImpl"; if (model && model.declaredClass == navDeclClass) { // config service and parameter for hidden pages var cs = com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME); navHiddenName = cs.getValue("com.ibm.mashups.navigation.hidden"); this.httpUrl.setParameter("mdname", navHiddenName); } else if (model && model.declaredClass == sharedDeclClass) { // need to specify the backlink aspect. This must be requested // explicitly for performance reasons on the portal server this.httpUrl.addParameter("aspect", "backlinks"); } else if (model && model.declaredClass == layoutDeclClass) { // need access to the names of the layout containers this.httpUrl.addParameter("mdname", "com.ibm.portal.layoutnode.localname"); } else if (model && model.declaredClass == widgetDeclClass) { this.httpUrl.addParameter("filter", "application"); } } } ); com.ibm.mm.extension.url.UrlFactory = new com.ibm.mm.extension.url.ModelUrlFactoryImpl(); //} /* Redirects */ ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelUrl": { type: "around", handler: function (urlType, baseURL) { return com.ibm.mm.extension.url.UrlFactory.createModelURL(urlType, baseURL); } } } ); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL": { type: "around", handler: function (urlType, baseURL) { return com.ibm.mm.extension.url.UrlFactory.createModelURL(urlType, baseURL); } } } ); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelUrl": { type: "around", handler: function (url, url2) { return com.ibm.mm.extension.url.UrlFactory.getModelURL(url, url2); } } } ); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL": { type: "around", handler: function (url, url2) { return com.ibm.mm.extension.url.UrlFactory.getModelURL(url, url2); } } } ); /* ibmConfig.extensions.push ( { "com.ibm.mashups.enabler.AccessLevel.getByString": {type: "around", handler: function(func,args) { if (args[0] == "User") return com.ibm.mashups.enabler.AccessLevel.VIEW; else if (args[0] == "Editor") return com.ibm.mashups.enabler.AccessLevel.EDIT; else return -1; } } }); */ /* ibmConfig.extensions.push ( { "com.ibm.mashups.enabler.AccessLevel.getAsString": {type: "around", handler: function (func,args) { if (args[0] == com.ibm.mashups.enabler.AccessLevel.VIEW) { return "User"; } else if (args[0] == com.ibm.mashups.enabler.AccessLevel.EDIT) { return "Editor"; } else { return "undefined"; } } } }); */ ibmConfig.extensions.push ( { "com.ibm.mashups.enabler.model.NavigationModel.findDefaultAcceptParent": {type: "around", handler: function(func,args) { // first check if a shared pages parent has been configured var pageID = ibmConfig.sharedPagesParent; if (pageID == null) { // look for the selected page in the state var state = com.ibm.mashups.enabler.model.state; // get the nav state model var navStateModel = state.NavigationStateModelFactory.getNavigationStateModel(); // get space accessor var spaceAccessor = state.AccessorFactory.getSpaceAccessor(navStateModel); var spaceID = spaceAccessor.getSpaceID(); // get page accessor (spaceID may be null) var pageAccessor = state.AccessorFactory.getPageAccessor(navStateModel, spaceID); pageID = pageAccessor.getPageID(); } if (pageID == null) { // use the Home label as our last resort pageID = "ibm.portal.Home"; } // lookup selected page return this.find(pageID); }}}); ibmConfig.extensions.push ( { "com.ibm.mashups.enabler.model.NavigationModel.create": { type: "after", handler: function(navigationNode, args) { // check if page template specified, if so then we need a plain content page with the creation-context pointing to this template // without the normal metadata for the static content page if (!args[0].pageTemplate) { for (var key in ibmConfig.nodeMetaData) { var value = ibmConfig.nodeMetaData[key]; if (value != null) { navigationNode.setMetaData(key, value); } } } return navigationNode; } } }); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel": { type: "after", handler: function (model, args) { var originalModel = args[0]; // console.debug("getAccessControlModel",model, originalModel); if (model instanceof com.ibm.mashups.enabler.ac.ResourceAccessControlModel) { // if only resourceNode (Control|Layout), model._portal_is_resource_ac_model = true; } else if (model instanceof com.ibm.mashups.enabler.ac.SpaceAccessControlModel) { // if only SpaceNode model._portal_is_space_ac_model = true; } return model; } } }); // OR ibmConfig.extensions.push( { "com.ibm.mashups.enabler.ac.AccessControlModel.setOwner": { type: "around", handler: function (func, args) { // step 1, get the current / old owner var oldOwner = this.getOwner(); var newOwner = args[0]; // step 2, process the setOwner task func(args); // call the super method // steo 3, remove the old owner if ((this._portal_is_space_ac_model) && (oldOwner.getID() != newOwner.getID())) { var roleModel = this.getRoleModel(); var it = roleModel.iterator(); var role; var found = false; while (it.hasNext()) { role = it.next(); if (role.getRoleType() == com.ibm.mashups.enabler.ac.RoleType.MANAGER) { found = true; break; } } if (!found) { return; } var memberModel = roleModel.getMemberModel(role); var oldOwnerMemberNode = memberModel.find(oldOwner.getID()).start(); if (oldOwnerMemberNode) { memberModel.remove(oldOwnerMemberNode); } } } } } ); // -OR ibmConfig.extensions.push( { "com.ibm.mashups.enabler.ac.AccessControlModel.commit": { type: "after", handler: function (dfr, args) { if (typeof ibm !== "undefined" && ibm && typeof ibm.toolbar !== "undefined" && ibm.toolbar && typeof ibm.toolbar.ProjectSupport !== "undefined" && ibm.toolbar.ProjectSupport) { // in the context of managed pages, replace the start() method of the deferred object to invoke the original // start function AND to refresh the site toolbar and the navigation bar; this is to make sure access control // changes made via the page permission widget are reflected in the user interface dfr.start = function(sync) { // original start function var mode = (sync || typeof sync === "undefined") ? true : false; dojo.hitch(this.context, this.startfn)(this, mode, this.params); // refresh for managed pages ibm.toolbar.ProjectSupport.loadTop(); } } return dfr; } } }); ibmConfig.extensions.push ( { "com.ibm.mashups.enabler.ac.ResourceAccessControlModel.isInitialized": { type: "around", handler: function(func, args) { var resourceXML = this.getResource().getXml(); var AC_IS_PRIVATE = "atom:content/*/ac:allowed-access[@ac:private='true']"; var ns = { "atom" : "http://www.w3.org/2005/Atom", "model" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements", "ac" : "http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0", "xhtml" : "http://www.w3.org/1999/xhtml", "xml" : "http://www.w3.org/XML/1998/namespace" }; var isPrivate = com.ibm.mashups.enabler.xml.XPath.evaluateBoolean(AC_IS_PRIVATE, resourceXML, ns); return isPrivate ? false : func(args); } }}); ibmConfig.extensions.push ( { "com.ibm.mashups.enabler.ac.ResourceAccessControlModel.getRoleModel": { type: "before", handler: function(args) { if (typeof this.roleModel == "undefined") { if (this._portal_is_resource_ac_model) { // service document var serviceJson = com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT); var prefix = serviceJson.idprefix; // name spaces var ns = { "ac" : "http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0", "app" : "http://www.w3.org/2007/app", "atom" : "http://www.w3.org/2005/Atom", "base" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base", "ca" : "http://www.ibm.com/xmlns/prod/composite-applications/v1.0", "creation-context" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.1.0/portal-creation-context", "ext" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model", "model" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements", "opensearch" : "http://a9.com/-/spec/opensearch/1.1/", "thr" : "http://purl.org/syndication/thread/1.0", "xhtml" : "http://www.w3.org/1999/xhtml", "xml" : "http://www.w3.org/XML/1998/namespace" }; // atom id var ATOM_ID = "atom:id"; // static content page var MODEL_STATIC_CONTENT_PAGE = "atom:content/model:static-content-page"; // content var MODEL_CONTENT = "atom:content/model:static-content-page/model:content"; // titles of a page var MODEL_ANY_TITLE = "atom:content/*/model:title"; // describtions of a page var MODEL_ANY_DESCRIPTION = "atom:content/*/model:description"; // atom link var ATOM_LINK = "atom:link"; // link from contents to page var ATOM_LINK_LINKED = ATOM_LINK + "[@ext:rel='linked']"; // link to static page var ATOM_LINK_STATICPAGE = ATOM_LINK + "[@ext:rel='staticpage']"; // link to theme link var ATOM_LINK_THEME = ATOM_LINK + "[@ext:rel='theme']"; // creation-context var CREATION_CONTEXT = "creation-context"; // copy creation-context var COPY_STRING = "copy"; var CREATION_CONTEXT_COPY = CREATION_CONTEXT + ":" + COPY_STRING; // copy creation-context: domain provider information var DOMAIN_PROVIDER_STRING = "domainprovider"; var CREATION_CONTEXT_DOMAIN_PROVIDER = CREATION_CONTEXT + ":" + DOMAIN_PROVIDER_STRING; // private creation-context var PRIVATE_STRING = "private"; var CREATION_CONTEXT_PRIVATE = CREATION_CONTEXT + ":" + PRIVATE_STRING; // check if node is public already var resourceXml = this.mainResource.getXml(); // resourceXml: xml of existing contents if (this.getACRolesLink(resourceXml) == null) { // layout info var layoutId = this.mainResource.getID(); var layoutEditLink = this.mainResource.getEditLink(); // page id (from page link in existing contents) var nodes = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(ATOM_LINK_LINKED, resourceXml, ns); var doDelete; var pageId; if (nodes && nodes.length > 0) { doDelete = true; pageId = com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(prefix, nodes[0]); } else { doDelete = false; pageId = layoutId; // contract: navigation node id equals content node id } // locate page var nm = com.ibm.mashups.enabler.model.Factory.getNavigationModel(); var page = nm.find(pageId).start(); // create new contents //var lm = nm.getLayoutModel(page); var layoutEntry = com.ibm.mm.enabler.utils.Utils.createNode("atom:entry", ns.atom); var id = com.ibm.mm.enabler.utils.Utils.createNode("atom:id", ns.atom); var url = com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelUrl(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL, this); url.setNodes([{ value: this.uri, isID: true }]); com.ibm.mm.enabler.utils.Dom.textContent(id, url.getModelURI()); layoutEntry.appendChild(id); var content = com.ibm.mm.enabler.utils.Utils.createNode("atom:content", ns.atom); var node = com.ibm.mm.enabler.utils.Utils.createNode("model:static-content-page", ns.model); content.appendChild(node); layoutEntry.appendChild(content); // set client id var aid = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(ATOM_ID, layoutEntry, ns); if (aid && aid.length > 0) { com.ibm.mm.enabler.utils.Dom.textContent(aid[0], "cid:0"); } // copy existing contents var pages = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(MODEL_STATIC_CONTENT_PAGE, layoutEntry, ns); if (pages && pages.length > 0) { // copy creation-context: copy existing contents com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(layoutEntry.ownerDocument, pages[0], CREATION_CONTEXT_COPY, COPY_STRING, ns[CREATION_CONTEXT], layoutId); // private creation-context: set new contents non-private com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(layoutEntry.ownerDocument, pages[0], CREATION_CONTEXT_PRIVATE, PRIVATE_STRING, ns[CREATION_CONTEXT], "false"); // Set the domain of the new node to the one of the parent com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(layoutEntry.ownerDocument, pages[0], CREATION_CONTEXT_DOMAIN_PROVIDER, DOMAIN_PROVIDER_STRING, ns[CREATION_CONTEXT], "ibm.portal.sharedPages"); } // copy titles and descriptions from the page to the contents var pageXml = page.getXml(); var pageTitleXml = com.ibm.mashups.enabler.xml.XPath.evaluateEntry(MODEL_ANY_TITLE, pageXml, ns); if (pageTitleXml) { var clonedTitleXml = pageTitleXml.cloneNode(true); node.appendChild(clonedTitleXml); } var pageDescXml = com.ibm.mashups.enabler.xml.XPath.evaluateEntry(MODEL_ANY_DESCRIPTION, pageXml, ns); if (pageDescXml) { var clonedDescXml = pageDescXml.cloneNode(true); node.appendChild(clonedDescXml); } // copy theme var theme = page.getTheme(); if (theme != null) { var themeLink; var themeLinks = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(ATOM_LINK_THEME, layoutEntry, ns); if (themeLinks && themeLinks.length > 0) { // take the existing theme link themeLink = themeLinks[0]; } else { // create a new theme link themeLink = com.ibm.mm.enabler.utils.Utils.createNode(ATOM_LINK, ns.atom); layoutEntry.appendChild(themeLink); } var layoutDOM = layoutEntry.ownerDocument; // update the theme link with the new theme themeLink.setAttribute("rel", "related"); // the "rel" attribute is defined in the default NS com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(layoutDOM, themeLink, "ext:rel", "rel", ns.ext, "theme"); com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(layoutDOM, themeLink, "ext:uri", "uri", ns.ext, "tl:oid:" + theme); com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(layoutDOM, themeLink, "ext:inherited", "inherited", ns.ext, "false"); } // POST new contents var feed = com.ibm.mm.enabler.utils.Utils.createFeed("cm:oid:ibm.portal.sharedPages", "IBM Lotus Mashups Fragment Feed", dojox.xml.parser.innerXML(layoutEntry), ns); var fragmentUrl = com.ibm.mm.enabler.model.UrlFactory.createModelUrl(com.ibm.mm.enabler.model.UrlFactory.FRAGMENT_URL, this); fragmentUrl.setNodes([{ value: "ibm.portal.sharedPages", isID: true }]); var fragmentReq = new com.ibm.mm.enabler.services.ModelRestServiceRequest(fragmentUrl, null, null, false, true); var request_success = false; fragmentReq.create(feed, dojo.hitch(this, function(type, data, xhr, args) { if (data !== null && type == com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD) { var nodes = com.ibm.mashups.enabler.xml.XPath.evaluateXPath("atom:feed/atom:entry", data, ns); if (nodes && nodes.length > 0) { request_success = true; // replace existing ... var c; while ((c = resourceXml.firstChild)) { resourceXml.removeChild(c); } // ... with new contents var children = nodes[0].childNodes; for (var i = 0, l = children.length; i < l; i++) { resourceXml.appendChild(children[i].cloneNode(true)); } } } } ) ); if (!request_success) { // we don't do anything as the request was not successful. This usually happens when a user doesn't have enough rights. return args; } // remove markup (cmvc 279817/jazz 19866) var contentPage = page.getContent().start(); var contentPageXml = contentPage.getXml(); var content = com.ibm.mashups.enabler.xml.XPath.evaluateEntry(MODEL_CONTENT, contentPageXml, ns); content.parentNode.removeChild(content); // update navigtion node with reference to new contents page.setMetaData("com.ibm.portal.navigation.follow_internal_urls", "true"); var pageXml = page.getXml(); // pageXml: xml of navigation node var links = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(ATOM_LINK_STATICPAGE, pageXml, ns); var targetLink; if (links && links.length > 0) { targetLink = links[0]; } else { var link = com.ibm.mm.enabler.utils.Utils.createNode("atom:link", ns.atom); com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(pageXml.ownerDocument, link, "atom:rel", "rel", ns.atom, "related"); com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(pageXml.ownerDocument, link, "ext:rel", "rel", ns.ext, "page"); com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(pageXml.ownerDocument, link, "ext:class", "class", ns.ext, "content-node"); pageXml.appendChild(link); targetLink = link; } /* <atom:link portal:rel="staticpage" portal:class="content-node" portal:uri="cm:oid:6_M8768B1A08I610IOJ13DRJ00C4" rel="related"/> */ var ids = com.ibm.mashups.enabler.xml.XPath.evaluateXPath("atom:id", resourceXml, ns); if (targetLink && ids && ids.length > 0) { com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(pageXml.ownerDocument, targetLink, "ext:uri", "uri", ns.ext, com.ibm.mm.enabler.utils.Dom.textContent(ids[0])); } var s =com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy("merge"); nm.addStrategy(s); nm.commit().start(true); nm.removeStrategy("com.ibm.mashups.enabler.strategy.NavigationUpdateStrategy"); if (doDelete == true) { // delete old content myUrl = com.ibm.mm.enabler.model.UrlFactory.getModelUrl(layoutEditLink, this); serviceReq = new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl, null, null, false, true); serviceReq.remove( dojo.hitch(this, function(type, data, xhr, args){}) ); } nm.invalidate(page); // by doing a timeout we postpone processing of the event, hence giving other JS code the option to // finish rendering before the page is reloaded window.setTimeout(function() { // force a page reload var runtimeModel = com.ibm.mashups.builder.model.Factory.getRuntimeModel(), eventService = com.ibm.mashups.services.ServiceManager.getService("eventService"), currentPageId = runtimeModel.getCurrentPage().getID(); eventService.broadcastEvent("com.ibm.mashups.builder.switchPage", currentPageId); }, 0); } } } // return to original enabler function return args; }}}); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.content.StaticContentPage.setXml": { type: "before", handler: function(args) { var xmlData = args[0]; var ns = { "ac" : "http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0", "app" : "http://www.w3.org/2007/app", "atom" : "http://www.w3.org/2005/Atom", "base" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base", "creation-context" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.1.0/portal-creation-context", "ext" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model", "model" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements", "opensearch" : "http://a9.com/-/spec/opensearch/1.1/", "thr" : "http://purl.org/syndication/thread/1.0", "xhtml" : "http://www.w3.org/1999/xhtml", "xml" : "http://www.w3.org/XML/1998/namespace" }; var content = com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:content/model:static-content-page/model:content", xmlData, ns); if (content) { // remove the content var domParent = content.parentNode; domParent.removeChild(content); } return args; } } });dojo.provide("com.ibm.portal.extension.state"); dojo.require("dojo.cookie"); com.ibm.portal.extension.state.ObjectIDUtilities = { //Required prefix for a valid ObjectID widgetIDPrefix: "7eAe", portletWindowIDPrefix: "Z7_", //encodes a widget ID into a valid Portal ObjectID value. encodeWidgetID: function ( /*String*/unencodedId ) { var retVal = unencodedId; if ( !this.isObjectID( unencodedId ) ) { // append the generic ObjectID prefix retVal = this.widgetIDPrefix + Base32.encode( unencodedId ); } return retVal; }, //decodes a widget ID that was encoded by the corresponding encode method. decodeWidgetID: function ( /*String*/encodedId ) { var retVal = encodedId; if ( encodedId.indexOf( this.widgetIDPrefix ) === 0 ) { retVal = encodedId.substring( this.widgetIDPrefix.length ); retVal = Base32.decode( retVal ); } return retVal; }, // checks if the given id represents a object id isObjectID: function( /*String*/ id ) { return id.indexOf( this.portletWindowIDPrefix ) === 0 ; } }; /** * Portlet mode mapper implementation which converts a given portlet mode * into the corresponding iWidget mode. The mapping is specified as follows: * <ul> * <li>iWidget mode "view" --> portlet mode "view"</li> * <li>iWidget mode "edit" --> portlet mode "edit_defaults"</li> * <li>iWidget mode "personalize" --> portlet mode "edit"</li> * <li>iWidget mode "config" --> portlet mode "config"</li> * <li>iWidget mode "help" --> portlet mode "help"</li> * </ul> */ com.ibm.portal.extension.state.PortletModeMapper = { // portlet modes PORTLET_MODE_VIEW: "view", PORTLET_MODE_EDIT: "edit", PORTLET_MODE_EDIT_DEFAULTS: "edit_defaults", PORTLET_MODE_CONFIG: "config", PORTLET_MODE_HELP: "help", DEFAULT_PORTLET_MODE: "view", // iwidget modes IWIDGET_MODE_VIEW: com.ibm.mm.iwidget.Constants.mode.VIEW, IWIDGET_MODE_EDIT: com.ibm.mm.iwidget.Constants.mode.EDIT, IWIDGET_MODE_PERSONALIZE: com.ibm.mm.iwidget.Constants.mode.PERSONALIZE, IWIDGET_MODE_CONFIG: com.ibm.mm.iwidget.Constants.mode.CONFIG, IWIDGET_MODE_HELP: com.ibm.mm.iwidget.Constants.mode.HELP, DEFAULT_IWIDGET_MODE: com.ibm.mm.iwidget.Constants.mode.VIEW, /** * Converts the given iwidget mode into the corresponding portlet mode */ toPortletMode: function ( /*String*/iWidgetMode ) { var portletMode = iWidgetMode; if (iWidgetMode) { if (iWidgetMode == this.IWIDGET_MODE_VIEW) { portletMode = this.PORTLET_MODE_VIEW; } else if (iWidgetMode == this.IWIDGET_MODE_EDIT) { portletMode = this.PORTLET_MODE_EDIT_DEFAULTS; } else if (iWidgetMode == this.IWIDGET_MODE_PERSONALIZE) { portletMode = this.PORTLET_MODE_EDIT; } else if (iWidgetMode == this.IWIDGET_MODE_CONFIG) { portletMode = this.PORTLET_MODE_CONFIG; } else if (iWidgetMode == this.IWIDGET_MODE_HELP) { portletMode = this.PORTLET_MODE_HELP; } } return portletMode; }, /** * Converts the given portlet mode into the corresponding iwidget mode */ toIWidgetMode: function ( /*String*/portletMode ) { var iWidgetMode = portletMode; if (portletMode) { if (portletMode == this.PORTLET_MODE_VIEW) { iWidgetMode = this.IWIDGET_MODE_VIEW; } else if (portletMode == this.PORTLET_MODE_EDIT) { iWidgetMode = this.IWIDGET_MODE_PERSONALIZE; } else if (portletMode == this.PORTLET_MODE_EDIT_DEFAULTS) { iWidgetMode = this.IWIDGET_MODE_EDIT; } else if (portletMode == this.PORTLET_MODE_CONFIG) { iWidgetMode = this.IWIDGET_MODE_CONFIG; } else if (portletMode == this.PORTLET_MODE_HELP) { iWidgetMode = this.IWIDGET_MODE_HELP; } } return iWidgetMode; } }; /** * Window state mapper implementation which converts a given portlet window state * into the corresponding iwidget window state. The mapping is specified as follows: * <ul> * <li>iWidget window state "normal" --> portlet window state "normal"</li> * <li>iWidget window state "minimize" --> portlet window state "minimized"</li> * <li>iWidget window state "maximize" --> portlet window state "maximized"</li> * </ul> */ com.ibm.portal.extension.state.WindowStateMapper = { // portlet window states WINDOW_STATE_NORMAL: "normal", WINDOW_STATE_MAXIMIZED: "maximized", WINDOW_STATE_MINIMIZED: "minimized", DEFAULT_WINDOW_STATE: "normal", // iwidget window states IWIDGET_WINDOW_STATE_NORMAL: com.ibm.mm.iwidget.Constants.windowstate.NORMAL, IWIDGET_WINDOW_STATE_MAXIMIZE: com.ibm.mm.iwidget.Constants.windowstate.MAXIMIZE, IWIDGET_WINDOW_STATE_MINIMIZE: com.ibm.mm.iwidget.Constants.windowstate.MINIMIZE, DEFAULT_IWIDGET_WINDOW_STATE: com.ibm.mm.iwidget.Constants.windowstate.NORMAL, /** * Converts the given iwidget window state into the corresponding * portlet window state. */ toPortletWindowState: function ( /*String*/iWidgetWindowState ) { var windowState = null; if (iWidgetWindowState) { if (iWidgetWindowState == this.IWIDGET_WINDOW_STATE_NORMAL) { windowState = this.WINDOW_STATE_NORMAL; } else if (iWidgetWindowState == this.IWIDGET_WINDOW_STATE_MAXIMIZE) { windowState = this.WINDOW_STATE_MAXIMIZED; } else if (iWidgetWindowState == this.IWIDGET_WINDOW_STATE_MINIMIZE) { windowState = this.WINDOW_STATE_MINIMIZED; } } return windowState; }, /** * Converts the given portlet window state into the corresponding * iwidget window state. */ toIWidgetWindowState: function ( /*String*/portletWindowState ) { var windowState = null; if (portletWindowState) { if (portletWindowState == this.WINDOW_STATE_NORMAL) { windowState = this.IWIDGET_WINDOW_STATE_NORMAL; } else if (portletWindowState == this.WINDOW_STATE_MAXIMIZED) { windowState = this.IWIDGET_WINDOW_STATE_MAXIMIZE; } else if (portletWindowState == this.WINDOW_STATE_MINIMIZED) { windowState = this.IWIDGET_WINDOW_STATE_MINIMIZE; } } return windowState; } }; /** * CSA2-specific implementation of the navigation preprocessor. */ dojo.declare( "com.ibm.portal.extension.state.CSANavigationStateProcessor", null, { constructor: function () { // initialize the logger var className = "com.ibm.portal.extension.state.CSANavigationStateProcessor"; this.LOGGER = com.ibm.mashups.enabler.logging.Logger.getLogger(className); this.LOG_LEVEL = com.ibm.mashups.enabler.logging.LogLevel.TRACE; // get the mode /window state converters this.modeMapper = com.ibm.portal.extension.state.PortletModeMapper; this.windowStateMapper = com.ibm.portal.extension.state.WindowStateMapper; // get ObjectID utilities this.oidUtils = com.ibm.portal.extension.state.ObjectIDUtilities; // create state manager var contentHandlerPath = portalMashupsConfig.contentHandlerContextPath; this.stateManager = new com.ibm.portal.state.StateManager(contentHandlerPath); this.stateCache = {}; // set a default value for the maximum URL length if (dojo.isIE) { this.threshold = 2048; } else { this.threshold = 8192; } }, /** * Decodes the url and stores the state into a JSON Object. */ decode: function(/*String*/url, /*Function*/callback){ // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decode"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, url); } // result object var state = null; // decode the hash // get the hash part of the URL var hash = this.decodeHash(url); if (hash) { // check if the hash contains a serialized JSON object if (dojo.trim(hash).indexOf("{") === 0 || dojo.trim(hash).indexOf("[") === 0) { try { // try to convert into a JSON object state = dojo.fromJson(hash); } catch (error) { // seems the hash did not contain valid JSON data } } if (state === null) { // check if the hash contains a portal URL if (hash.indexOf("http") === 0 || hash.indexOf("/") === 0) { // decode the portal URL var stateXML = this.decodePortalURL(hash); if (stateXML) { // convert into a JSON representation state = this.fromPortalState(stateXML); } else if (bIsLoggable) { // log the decoding error this.log(logMethod, "Could not decode URL ${0}", [ hash ]); } } } } // check if we have a cached decoding result if (state === null) { var cachedStateXML = this.getCachedStateXML(url); if (cachedStateXML) { state = this.fromPortalState(cachedStateXML); } } // check if we need to decode the entire URL if (state === null) { // decode the portal URL var stateXML = this.decodePortalURL(url); if (stateXML) { // convert into a JSON representation state = this.fromPortalState(stateXML); } else if (bIsLoggable) { // log the decoding error this.log(logMethod, "Could not decode URL ${0}", [ url ]); } } // last fallback if (state === null) { state = {}; } // exit logging if (bIsLoggable) { this.logExit(logMethod, dojo.toJson(state)); } // return result if (callback) { callback(state); } else { return state; } }, /** * Encodes the given state object and generates fragment. */ encode: function(/*JSON*/state, /*Function*/callback, /*JSON*/oldState, /*JSON*/additionalParams) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "encode"; // entry logging if (bIsLoggable) { //this.logEntry(logMethod, dojo.toJson(state)); } // the processor var processor = this; // check if a callback has been provided if (callback) { processor.serializeState(state, function(serializedState) { callback(serializedState, additionalParams); }); } else { return processor.serializeState(state); } }, /** * Encodes the given state object and generates a full URL. * The following optional parameters can be provided: * { * newWindow: <true|false>, * themeTemplate: <themeTemplateName>, * soloState: { * portletWindowID: <portletWindowID>, * returnSelection: <pageID> * }, * pocURI: <pocURI>, * queryParams: <JSON> * } */ generateURL: function(/*JSON*/state, /*Function*/callback, /*JSON*/params) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "generateURL"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, [dojo.toJson(state), dojo.toJson(params)]); } // the processor var processor = this; // convert into portal state var stateXML = processor.toPortalState(state); // process state based on param map if (params) { stateXML = processor.processState(stateXML, params); } // check if a callback has been provided if (callback) { // generate portal URL processor.generatePortalURL(stateXML, params, function(url) { // exit logging if (bIsLoggable) { processor.logExit(logMethod, url); } // invoke callback callback(url); }); } else { var url = processor.generatePortalURL(stateXML, params); // exit logging if (bIsLoggable) { processor.logExit(logMethod, url); } return url; } }, /** * Processes the state based on the given param map */ processState: function(/*XMLDocument*/stateXML, /*JSON*/params) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "processState"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, dojo.toJson(params)); } // check for URI property var pocURI = params.pocURI; if (pocURI) { // set URI into state var selectionAcc = this.stateManager.newSelectionAccessor(stateXML); selectionAcc.setURI(pocURI); // set URI params var uriParams = params.queryParams; if (uriParams) { var selectionParams = selectionAcc.getParameters(); // iterate over uri params for (var name in uriParams) { if (uriParams.hasOwnProperty(name)) { var value = uriParams[name]; if (value) { if (dojo.isArray(value)) { selectionParams.setValues(name, value); } else { selectionParams.setValue(name, value); } } } } } } // check for newWindow property var newWindow = params.newWindow; if (newWindow) { // create a state partition var statePartitionAcc = this.stateManager.newStatePartitionAccessor(stateXML); statePartitionAcc.includeStatePartition(); } // check for themeTemplate property var themeTemplate = params.themeTemplate; if (themeTemplate) { // set theme template var themeTemplateAcc = this.stateManager.newThemeTemplateAccessor(stateXML); themeTemplateAcc.setThemeTemplate(themeTemplate); } // check for solo selection information var soloState = params.soloState; if (soloState) { // get the window ID var windowID = soloState.portletWindowID; if (windowID) { // convert the ID into a valid ObjectID windowID = this.oidUtils.encodeWidgetID(windowID); // get solo accessor var soloAcc = this.stateManager.newSoloStateAccessor(stateXML); // set portlet window to solo state soloAcc.setSoloPortlet(windowID); // set return selection (if any) var returnSelection = soloState.returnSelection; if (returnSelection) { soloAcc.setReturnSelection(returnSelection); } } } // exit logging if (bIsLoggable) { this.logExit(logMethod, dojox.xml.parser.innerXML(stateXML)); } return stateXML; }, /** * Preprocesses the given state. */ preprocess: function(/*JSON*/state, /*Function*/callback) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "preprocess"; // nothing to do here // exit logging if (bIsLoggable) { //this.logExit(logMethod); } // check if callback needs to be invoked if (callback) { callback(state); } else { return state; } }, /** * Disposes the processor. */ dispose: function(/*Function*/callback) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "dispose"; // entry logging if (bIsLoggable) { this.logEntry(logMethod); } // nothing to do here // invoke callback (if any) if (callback) { callback(); } }, /** * Postprocesses the given state. */ postprocess: function(/*JSON*/state, /*Function*/callback, /*JSON*/oldState, /*JSON*/additionalParams) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "postprocess"; // nothing to do here // exit logging if (bIsLoggable) { //this.logExit(logMethod); } // check if callback needs to be invoked if (callback) { callback(state, additionalParams); } else { return state; } }, /** * Checks if we have a cached decoding result for the given URL. */ getCachedStateXML: function(url) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "getCachedStateXML"; var cachedState = null; // currently we only cache the state of the last full page // refresh (aka "bootstrap state"). if (this.isBaseURL(url)) { // get bootstrap state var bootstrapState = ibmCfg.portalConfig.bootstrapState; if (bootstrapState) { // log the fact that we have a cache hit if (bIsLoggable) { this.log(logMethod, "Using cached bootstrap state..."); } // restore the XML representation cachedState = com.ibm.mm.enabler.utils.Dom.createDocument(bootstrapState); } } return cachedState; }, /** * Checks if the given URL corresponds with the URL in the browser address bar. */ isBaseURL: function(url) { var isBase = (url === top.location.href); if (!isBase) { // check if it is equal to the base URL isBase = (url === this.getBaseURL()); } return isBase; }, /** * Returns the href attribute value of the alternate link element that * contains a portal URL with the current navigational state. Returns * null if the link element is not present in the head element of the * page. */ getBaseURL: function() { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "getBaseURL"; // entry logging if (bIsLoggable) { this.logEntry(logMethod); } var result = null; var head = dojo.query("head")[0]; if (head) { var link = dojo.query("link[rel='alternate'][id='com.ibm.lotus.NavStateUrl']",head)[0]; if (link) { result = dojo.attr(link, "href"); } } // exit logging if (bIsLoggable) { this.logExit(logMethod, result); } return result; }, /** * Serializes the state based on the current threshold. */ serializeState: function(/*JSON*/state, /*Function*/callback) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "serializeState"; // the processor var processor = this; // serialize Json object var serialized = dojo.toJson(state); // check if we need to generate a portal URL if (processor.isTooLong(serialized)) { // check if callback has been provided if (callback) { // serialize state into portal URL processor.generateURL(state, function(url) { if (processor.isTooLong(url)) { if (bIsLoggable) { processor.log(logMethod, "URL is getting too long. Discarding the client-side state..."); } callback(""); } else { callback(url); } }); } else { // serialize state into portal URL var url = processor.generateURL(state); if (processor.isTooLong(url)) { if (bIsLoggable) { processor.log(logMethod, "URL is getting too long. Discarding the client-side state..."); } return ""; } else { return url; } } } else { // check if callback has been provided if (callback) { callback(serialized); } else { return serialized; } } }, /** * Checks if the given serialized fits into the browser's URL. */ isTooLong: function(serializedState) { // get the current base URL var url = top.location.href; // check for the hash var idx = url.lastIndexOf("#"); // determine the length of the serialized state // (to simulate Dojo we need to encode the state) var stateLength = encodeURIComponent(serializedState).length; var tooLong = false; if (idx > 0) { tooLong = (idx + stateLength > this.threshold); } else { tooLong = (url.length + stateLength > this.threshold); } return tooLong; }, /** * Retrieves the hash part of the URL */ decodeHash: function(/*String*/url) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decodeHash"; // check for the "#" var idx = url.lastIndexOf("#"); var hash = null; if (idx > 0 && url.length - 1 > idx) { hash = decodeURIComponent(url.substring(idx + 1)); } // exit logging if (bIsLoggable) { this.logExit(logMethod, hash); } return hash; }, /** * Decodes the given portal URL. */ decodePortalURL: function(/*String*/url, /*Function*/callback) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decodePortalURL"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, url); } // the processor var processor = this; // get the serialization manager var s11nManager = processor.stateManager.getSerializationManager(); // check if a callback has been provided if (callback) { // decode URL s11nManager.deserialize(url, function(status, url, stateXML) { // exit logging if (bIsLoggable) { if (stateXML) { processor.logExit(logMethod, dojox.xml.parser.innerXML(stateXML)); } else { processor.logExit(logMethod, null); } } // invoke callback if (status == s11nManager.STATUS_OK) { callback(stateXML); } else { callback(null); } }); } else { // decode URL var response = s11nManager.deserialize(url); var stateXML = null; if (response.status == s11nManager.STATUS_OK) { // get state XML stateXML = response.state; } // exit logging if (bIsLoggable) { if (stateXML) { processor.logExit(logMethod, dojox.xml.parser.innerXML(stateXML)); } else { processor.logExit(logMethod, null); } } return stateXML; } }, /** * Returns the serialized version of the given state document or null if it has not been cached. */ fromCache: function(/*XMLDocument*/stateXML, /*Object*/params) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "fromCache"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, [dojox.xml.parser.innerXML(stateXML),dojo.toJson(params)]); } var result; var stateXMLStr = dojox.xml.parser.innerXML(stateXML); var paramsJson; if (params) { paramsJson = dojo.toJson(params); } else { paramsJson = null; } if (this.stateCache.state == stateXMLStr && this.stateCache.params == paramsJson) { result = this.stateCache.serialized; } else { result = null; } // exit logging if (bIsLoggable) { this.logExit(logMethod, result); } return result; }, /** * Puts the serialized version of the given state document to the cache. */ toCache: function(/*XMLDocument*/stateXML, /*Object*/params, /*String*/serialized) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "toCache"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, [dojox.xml.parser.innerXML(stateXML), dojo.toJson(params), serialized]); } var stateXMLStr = dojox.xml.parser.innerXML(stateXML); this.stateCache.state = stateXMLStr; var paramsJson; if (params) { paramsJson = dojo.toJson(params); } else { paramsJson = null; } this.stateCache.params = paramsJson; this.stateCache.serialized = serialized; // exit logging if (bIsLoggable) { this.logExit(logMethod); } }, /** * Generates a portal URL which encodes the given state document. */ generatePortalURL: function(/*XMLDocument*/stateXML, /*JSON*/params, /*Function*/callback) { // check for a cached portal URL for the given state var cachedURL = this.fromCache(stateXML,params); if (cachedURL) { // dispatch to callback if any if (callback) { callback(cachedURL); } else { return cachedURL; } } else { // the processor var processor = this; // get serialization manager var s11nManager = processor.stateManager.getSerializationManager(); // check if a callback has been provided if (callback) { // create URL s11nManager.serialize(stateXML, true, function(status, resultState, url) { // put the serialization result to the internal cache processor.toCache(stateXML, params, url); // dispatch to the callback callback(url); }, false, params); } else { // create URL var retObj = s11nManager.serialize(stateXML, true, null, false, params); // put the serialization result to the internal cache processor.toCache(stateXML, params, retObj.url); return retObj.url; } } }, /** * Converts the given portal state document into a corresponding * JSON representation that can be interpreted by enabler. */ fromPortalState: function(/*XMLDocument*/stateXML) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "fromPortalState"; // entry logging if (bIsLoggable) { this.logEntry(logMethod); } // the processor var processor = this; // create JSON object var state = {}; // handle page selection var selAcc = processor.stateManager.newSelectionAccessor(stateXML); var pageID = selAcc.getPageSelection(); if (pageID) { // set the page selection state.pid = {}; state.pid.value = pageID; } // handle locale var localeAcc = processor.stateManager.newLocaleAccessor(stateXML); var locale = localeAcc.getLocale(); if (locale) { state.locale = locale; } // handle label mappings var sources = selAcc.getMappingSources(); if (sources && sources.length > 0) { state.labelmappings = {}; dojo.forEach(sources, function(srcId) { var target = selAcc.getMapping(srcId); state.labelmappings[srcId] = { value: target }; }); } // handle state partition var partAcc = processor.stateManager.newStatePartitionAccessor(stateXML); var partitionID = partAcc.getStatePartition(); if (partitionID) { state.partitionID = partitionID; } // handle portlet state var portlets = processor.stateManager.newPortletListAccessor(stateXML).getPortlets(); if (portlets && portlets.length > 0) { // initialize widget params state.wparams = {}; // iterate dojo.forEach(portlets, function(portletWindowID) { processor.decodePortletState(portletWindowID, stateXML, state); }); } // handle shared parameters var scopeIDs = processor.stateManager.newSharedStateListAccessor(stateXML).getScopeIDs(); if (scopeIDs && scopeIDs.length > 0) { // initialize shared params state.sparams = {}; // TODO remove the following line as soon as portal state APIs supports multiple shared item sets state.sparams["public-render-parameters"] = {}; var publicRenderParams = state.sparams["public-render-parameters"]; // iterate dojo.forEach(scopeIDs, function(scopeID) { processor.decodeSharedParameters(scopeID, stateXML, publicRenderParams); }); } // exit logging if (bIsLoggable) { this.logExit(logMethod, dojo.toJson(state)); } return state; }, /** * Converts the state of the portlet with the given id into a corresponding * iwidget state and adds the iwidget state to the given state JSON object. */ decodePortletState: function(/*String*/portletWindowID, /*XMLDocument*/stateXML, /*JSON*/state) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decodePortletState"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, portletWindowID); } // convert portlet window ID into iwidget ID var widgetID = this.oidUtils.decodeWidgetID(portletWindowID); // get a portlet accessor var pAcc = this.stateManager.newPortletAccessor(portletWindowID, stateXML); // get private render parameters var renderParams = pAcc.getRenderParameters(); // bucket for reserved params var reservedParams = {}; // bucket for custom params var customParams = {}; // check if widget id is a valid ObjectID if (this.oidUtils.isObjectID(widgetID)) { // restore reserved params // get the portlet mode var portletMode = pAcc.getPortletMode(); if (portletMode) { // convert portlet mode into iwidget mode var iwidgetMode = this.modeMapper.toIWidgetMode(portletMode); // update reserved params reservedParams.md = iwidgetMode; } // get the window state var windowState = pAcc.getWindowState(); if (windowState) { // convert window state into iwidget window state var iwidgetWindowState = this.windowStateMapper.toIWidgetWindowState(windowState); // update reserved params reservedParams.st = iwidgetWindowState; } // restore custom parameters if (renderParams) { var names = renderParams.getNames(); dojo.forEach(names, function(name) { var values = renderParams.getValues(name); if (values) { customParams[name] = values; } }); } } else { // real iwidget if (renderParams) { var reserved = renderParams.getValue("rp"); if (reserved) { // restore JSON representation reservedParams = dojo.fromJson(reserved); } var custom = renderParams.getValue("cp"); if (custom) { customParams = dojo.fromJson(custom); } } } // update widget params var wParams = state.wparams; // initialize widget params if (reservedParams || customParams) { wParams[widgetID] = {"value": {}}; } // add reserved params if (reservedParams) { wParams[widgetID]["value"]["rp"] = reservedParams; } // add custom params if (customParams) { wParams[widgetID]["value"]["cp"] = customParams; } // exit logging if (bIsLoggable) { this.logExit(logMethod, dojo.toJson(state)); } }, /** * Retrieves the shared parameters for the given scope and copies them * into the given state JSON object (sharedItemSet). */ decodeSharedParameters: function(/*String*/scopeID, /*XMLDocument*/stateXML, /*JSON*/sharedItemSet) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decodeSharedParameters"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, scopeID); } // get a shared state accessor var sharedStateAccessor = this.stateManager.newSharedStateAccessor(scopeID, stateXML); if (sharedStateAccessor) { var qnames = sharedStateAccessor.getQNames(); if (qnames && qnames.length > 0) { // initialize JSON sharedItemSet[scopeID] = {}; sharedItemSet[scopeID].value = {}; var sharedItems = sharedItemSet[scopeID].value; // iterate var processor = this; dojo.forEach(qnames, function(qname) { var values = sharedStateAccessor.getValues(qname); if (dojo.isArray(values)) { // dispatch processor.decodeSharedParameter(qname, values, sharedItems); } }); } } // exit logging if (bIsLoggable) { this.logExit(logMethod, dojo.toJson(sharedItemSet)); } }, /** * Decodes a single shared parameter. */ decodeSharedParameter: function(/*String*/qname, /*Array*/values, /*JSON*/sharedItems) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decodeSharedParameter"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, qname, dojo.toJson(values)); } // decode QName var itemName = this.qnameToItemName(qname); // convert array into String var serializedArray = dojo.toJson(values); // add item to bucket sharedItems[itemName] = {}; sharedItems[itemName].value = serializedArray; // exit logging if (bIsLoggable) { this.logExit(logMethod, dojo.toJson(sharedItems)); } }, /** * Converts the given JSON representation of the state into a * corresponding portal state document. */ toPortalState: function(/*JSON*/state) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "toPortalState"; // entry logging if (bIsLoggable) { this.logEntry(logMethod); } // create a new portal state document var stateXML = this.stateManager.newState(); // get page selection var pageID = state.pid.value; var selAcc = this.stateManager.newSelectionAccessor(stateXML); if (pageID) { selAcc.setPageSelection(pageID); } // get locale var locale = state.locale; if (locale) { var localeAcc = this.stateManager.newLocaleAccessor(stateXML); localeAcc.setLocale(locale); } // get label mappings var labelMappings = state.labelmappings; if (labelMappings) { for (srcId in labelMappings) { if (labelMappings.hasOwnProperty(srcId)) { var target = labelMappings[srcId].value; if (target) { selAcc.setMapping(srcId, target); } } } } // get widget parameters var wParams = state.wparams; if (wParams) { // iterate over widget states for (var widgetID in wParams) { if (Object.prototype.hasOwnProperty.call(wParams, widgetID)) { // check if the widget has state if (wParams[widgetID]) { // get parameters var wParamsValue = wParams[widgetID].value ? wParams[widgetID].value : wParams[widgetID]; if (wParamsValue) { // decode iwidget state this.decodeWidgetState(widgetID, wParamsValue, stateXML); } } } } } // get shared parameters var sParams = state.sparams; if (sParams) { // iterate over shareable item sets for (var itemSetID in sParams) { if (Object.prototype.hasOwnProperty.call(sParams, itemSetID)) { // make sure the item set is not empty var scopedItems = sParams[itemSetID]; if (scopedItems) { // decode the shareable item set this.decodeShareableItemSet(itemSetID, scopedItems, stateXML); } } } } // exit logging if (bIsLoggable) { this.logExit(logMethod, dojox.xml.parser.innerXML(stateXML)); } return /*XMLDocument*/stateXML; }, /** * Determines the state of the iwidget with the given ID and adds it to * the given state document. */ decodeWidgetState: function(/*String*/widgetID, /*JSON*/widgetState, /*XMLDocument*/stateXML) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decodeWidgetState"; // entry logging if (bIsLoggable) { //this.logEntry(logMethod, [widgetID, dojo.toJson(widgetState)]); } // get reserved params var reservedParams = widgetState.rp; // get custom parameters var customParams = widgetState.cp; // convert into a portlet window ID var portletWindowID = this.oidUtils.encodeWidgetID(widgetID); // portlet accessor is created lazily to avoid empty portlet elements in state document var portletAcc = null; // check if the widget represents a portlet (based on the widgetID!) if (this.oidUtils.isObjectID(widgetID)) { // process reserved params if (reservedParams) { // get the iwidget window state var iWidgetWindowState = reservedParams.st; if (iWidgetWindowState && iWidgetWindowState != this.windowStateMapper.DEFAULT_IWIDGET_WINDOW_STATE) { // get portlet accessor if (portletAcc === null) { portletAcc = this.stateManager.newPortletAccessor(portletWindowID, stateXML); } // convert into portlet window state var windowState = this.windowStateMapper.toPortletWindowState(iWidgetWindowState); // set window state into state portletAcc.setWindowState(windowState); } // get the iwidget mode var iWidgetMode = reservedParams.md; if (iWidgetMode && iWidgetMode != this.modeMapper.DEFAULT_IWIDGET_MODE) { // get portlet accessor if (portletAcc === null) { portletAcc = this.stateManager.newPortletAccessor(portletWindowID, stateXML); } // convert into a portlet mode var portletMode = this.modeMapper.toPortletMode(iWidgetMode); // set portlet mode into state portletAcc.setPortletMode(portletMode); } } // process custom parameters (-> private render parameters) if (customParams) { // get portlet accessor if (portletAcc === null) { portletAcc = this.stateManager.newPortletAccessor(portletWindowID, stateXML); } // get current render params var renderParams = portletAcc.getRenderParameters(); for (var key in customParams) { if (Object.prototype.hasOwnProperty.call(customParams, key)) { var values = customParams[key]; // don't encode null or undefined values! if (values) { renderParams.setValues(key, values); } } } } } else { // process reserved parameters if (!this.isDefaultState(reservedParams)) { // get portlet accessor if (portletAcc === null) { portletAcc = this.stateManager.newPortletAccessor(portletWindowID, stateXML); } // serialize JSON portletAcc.getRenderParameters().setValue("rp", dojo.toJson(reservedParams)); } // process custom parameters if (customParams) { // get portlet accessor if (portletAcc === null) { portletAcc = this.stateManager.newPortletAccessor(portletWindowID, stateXML); } // serialize JSON portletAcc.getRenderParameters().setValue("cp", dojo.toJson(customParams)); } } // exit logging if (bIsLoggable) { this.logExit(logMethod, dojox.xml.parser.innerXML(stateXML)); } }, /** * Decodes the shareable item set with the given ID */ decodeShareableItemSet: function(/*String*/itemSetID, /*JSON*/scopedItems, /*XMLDocument*/stateXML) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decodeShareableItemSet"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, [itemSetID, dojo.toJson(scopedItems)]); } // TODO remove the following check as soon as state DTD can deal with multiple shared item sets! if (itemSetID == "public-render-parameters") { // iterate over scopes for (var scopeID in scopedItems) { if (Object.prototype.hasOwnProperty.call(scopedItems, scopeID)) { var items = scopedItems[scopeID]; if (items && items.value) { this.decodeShareableItems(itemSetID, scopeID, items.value, stateXML); } } } } // exit logging if (bIsLoggable) { this.logExit(logMethod, dojox.xml.parser.innerXML(stateXML)); } }, /** * Decodes the given set of shareable items for the given scope. */ decodeShareableItems: function(/*String*/itemSetID, /*String*/scopeID, /*JSON*/items, /*XMLDocument*/stateXML) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decodeShareableItems"; // entry logging if (bIsLoggable) { //this.logEntry(logMethod, [itemSetID, scopeID, dojo.toJson(items)]); } // accessor is initialized lazily to avoid unnecessary elements in the state var sharedStateAccessor = null; // iterate over scopes for (var name in items) { if (Object.prototype.hasOwnProperty.call(items, name)) { if (items[name]) { // get values var valueBucket = items[name]; if (valueBucket && valueBucket.value) { // get shared state accessor for the given scope if (sharedStateAccessor === null) { sharedStateAccessor = this.stateManager.newSharedStateAccessor(scopeID, stateXML); } // dispatch this.decodeShareableItem(sharedStateAccessor, name, valueBucket.value); } } } } // exit logging if (bIsLoggable) { //this.logExit(logMethod, dojox.xml.parser.innerXML(stateXML)); } }, /** * Decodes a single shareable item and writes it into the state using the given accessor */ decodeShareableItem: function(sharedStateAccessor, /*String*/itemName, /*String*/value) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "decodeShareableItem"; // entry logging if (bIsLoggable) { //this.logEntry(logMethod, [itemName, value]); } // convert into a qname var qname = this.itemNameToQName(itemName); try { // try to deserialize var values = dojo.fromJson(value); if (dojo.isArray(values)) { // set multi value sharedStateAccessor.setValues(qname, values); } else { // fallback sharedStateAccessor.setValue(qname, value); } } catch (e) { // fallback sharedStateAccessor.setValue(qname, value); } // exit logging if (bIsLoggable) { //this.logExit(logMethod); } }, /** * Decodes the given qname. If the qname is based on the default Mashups * namespace, the namespace needs to be removed. */ qnameToItemName: function(/*String*/qname) { // TODO return qname; }, /** * Converts the given name into a qualified name * as expected by portal. If the given name does not * provide a namespace, the default Mashups namespace * is used to create the qname. */ itemNameToQName: function(/*String*/name) { // TODO return name; }, /** * Sets the length threshold */ setThreshold: function(threshold) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "setThreshold"; // entry logging if (bIsLoggable) { this.logEntry(logMethod, threshold); } // set the threshold this.threshold = threshold; }, /** * Checks if the given parameters represent default state only. */ isDefaultState: function(/*JSON*/reservedParams) { // prepare logging var bIsLoggable = this.isLoggable(); var logMethod = "isDefaultState"; // undefined bucket implies default state if (!reservedParams) { // exit logging if (bIsLoggable) { //this.logExit(logMethod, true); } return true; } // get the mode var mode = reservedParams.md; if (mode && mode != this.modeMapper.DEFAULT_IWIDGET_MODE) { // exit logging if (bIsLoggable) { this.logExit(logMethod, false); } return false; } // get the window state var windowState = reservedParams.st; if (windowState && windowState != this.windowStateMapper.DEFAULT_IWIDGET_WINDOW_STATE) { // exit logging if (bIsLoggable) { this.logExit(logMethod, false); } return false; } // check if there is an unknown reserved param for (var key in reservedParams) { if (reservedParams.hasOwnProperty(key)) { if (key != "st" && key != "md") { // exit logging if (bIsLoggable) { this.logExit(logMethod, false); } return false; } } } // exit logging if (bIsLoggable) { //this.logExit(logMethod, true); } // default state return true; }, /** * Checks if logging is enabled for the default logging level. */ isLoggable: function() { return this.LOGGER.isLoggable(this.LOG_LEVEL); }, /** * Entry logging for the function with the given name */ logEntry: function(name, args) { this.LOGGER.entering(name, args); }, /** * Logging for the function with the given name */ log: function(name, msg, args) { this.LOGGER.log(this.LOG_LEVEL, name, msg, args); }, /** * Exit logging for the function with the given name */ logExit: function(name, retVal) { this.LOGGER.exiting(name, retVal); } }); // singleton com.ibm.portal.extension.state.CSANavigationStateProcessor.SINGLETON = new com.ibm.portal.extension.state.CSANavigationStateProcessor(); dojo.declare("com.ibm.portal.extension.state.PersistenceManager", null, { constructor: function() { this.LOGGER = com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass); this.LOG_LEVEL = com.ibm.mashups.enabler.logging.LogLevel.TRACE; this.bIsLoggable = this.LOGGER.isLoggable(this.LOG_LEVEL); this._dirty = false; this._cookiePath = ibmPortalConfig["portalContext"]; }, COOKIE_NAME_PREFIX: "digest.ignore.portal.state.", COOKIE_NAME_ANONYMOUS: "digest.ignore.portal.state.anonymous", COOKIE_THRESHOLD: 4096, dispose: function() { var id = this._getCookieID(); if (id && dojo.cookie(id)) { dojo.cookie(id, null, { expires: -1 }); } delete this._state; delete this._cookieID; this._dirty = false; }, _getCookieID: function() { if (!this._cookieID) { // get user id var configSvr = com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME); var uid = configSvr.getValue(com.ibm.mashups.enabler.services.ConfigConstants.USER); if (uid && uid != "null" && uid.length > 0) { this._cookieID = this.COOKIE_NAME_PREFIX + uid; } else { this._cookieID = this.COOKIE_NAME_ANONYMOUS; } } return this._cookieID; }, _deleteCookie: function(item) { if (item && item.indexOf(this.COOKIE_NAME_PREFIX) == 0) { item = item.split('='); if (this._getCookieID() != item[0] + "" && item) { dojo.cookie(item[0], null, { path: this._cookiePath, expires: -1 }); } } }, _init: function(/*String*/statePartitionID) { if (!this._state) { this._state = {}; if (dojo.cookie.isSupported()) { var cookie = dojo.cookie(this._getCookieID()); // delete old cookies dojo.forEach(document.cookie.split(/;\s*/), this._deleteCookie, this); if (cookie) { this._state = dojo.fromJson(cookie); } } } if (!this._state[statePartitionID]) { this._state[statePartitionID] = {}; } }, getThreshold: function() { return this.COOKIE_THRESHOLD; }, getState: function(/*String*/id, /*String*/statePartitionID) { // determine the state partition var partitionID = this._getStatePartition(statePartitionID); // init this._init(partitionID); if (!id) { // if id is not defined, then return the whole state object return this._state[partitionID]; } else { // lookup state for state partition ID var state = this._state[partitionID][id]; if (state) { return state; } } return null; }, setState: function(/*String*/id,/*object*/ value, /*String*/statePartitionID) { // determine the state partition var partitionID = this._getStatePartition(statePartitionID); // init this._init(partitionID); if (value) { // set the new state for the given id this._state[partitionID][id] = value; } else { // overwrite the entire state this._state[partitionID] = id; } this._dirty = true; }, remove: function(id, statePartitionID) { // determine the state partition var partitionID = this._getStatePartition(statePartitionID); // init this._init(partitionID); if (this._state[partitionID][id]) { delete this._state[partitionID][id]; this._dirty = true; } }, clear: function() { this._state = {}; }, commit: function() { if (this._dirty) { if (dojo.cookie.isSupported()) { dojo.cookie(this._getCookieID(), dojo.toJson(this._state), { path: this._cookiePath }); } this._dirty = false; } }, _getStatePartition: function(/*String*/partitionID) { if (partitionID) { return partitionID; } else { return "def"; } } }); // singleton com.ibm.portal.extension.state.PersistenceManager.SINGLETON = new com.ibm.portal.extension.state.PersistenceManager(); /** * CSA2-specific implementation of the navigation preprocessor for server side aggregation. */ dojo.declare("com.ibm.portal.extension.state.SSANavigationStateProcessor", [com.ibm.portal.extension.state.CSANavigationStateProcessor], { constructor: function () { // initialize the logger this.LOGGER = com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass); // get the persistence manager this.persistenceManager = com.ibm.portal.extension.state.PersistenceManager.SINGLETON; this.widgetModel = com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel(); }, _isEmpty: function (object) { for (var i in object) { if (Object.prototype.hasOwnProperty.call(object, i) && typeof(object) == "object") { return false; } } return true; }, generateURL: function(/*JSON*/state, /*Function*/callback, /*JSON*/params) { // check if we have a cached URL var url = null; if (params && params.skipState && params.pocURI) { var links = dojo.query("link[title=" + params.pocURI + "]"); if (links && links.length > 0) { var cachedURL = dojo.attr(links[0], "href"); if (cachedURL) { url = cachedURL; } } else { var base = dojo.query("base[href]")[0]; if(base) { url = dojo.attr(base, "href") + "?uri=" + params.pocURI; } } // remove SSA-specific params params.pocURI = null; params.skipState = false; } if (url) { // cache hit if (callback) { callback(url, params); } else { return url; } } else { // cache miss -> call CSA URL generator return this.inherited(arguments, [ state, callback, params ]); } }, _mergeState: function(/*object*/stateA, /*object*/stateB) { // merge stateB into stateA; values of stateB wins over stateA for (var i in stateB) { if (Object.prototype.hasOwnProperty.call(stateB, i)) { if (Object.prototype.hasOwnProperty.call(stateA, i) && !this._isEmpty(stateB[i])) { this._mergeState(stateA[i], stateB[i]); } else { stateA[i] = stateB[i]; } } } }, /** * Decodes the url and stores the state into a JSON Object. */ decode: function(url, callback) { // logging support var LOG_METHOD = "decode"; var bIsLoggable = this.LOGGER.isLoggable(this.LOG_LEVEL); if (bIsLoggable) { this.logEntry(LOG_METHOD, arguments); } var processor = this; // in case that the given URL corresponds with the URL // in the address bar, we need to check if we have a // normalized version of this URL if (url === top.location.href) { // check if there is a link element holding the base URL var baseURL = processor.getBaseURL(); if (baseURL) { url = baseURL; } } // check if there is a callback if (callback) { processor.inherited(arguments, [ url, function(urlState) { // get the current state from the persistence manager var state = processor.persistenceManager.getState(null, urlState.partitionID); // if the state object is an url... if (dojo.isString(state)) { //... then call super to convert the url to an object state = processor.inherited(arguments, [ state ]); } // merge processor._mergeState(state, urlState); // exit trace if (bIsLoggable) { processor.logExit(LOG_METHOD, state); } callback(state); }]); } else { var urlState = processor.inherited(arguments, [ url ]); // get the current state from the persistence manager var state = processor.persistenceManager.getState(null, urlState.partitionID); // if the state object is an url... if (dojo.isString(state)) { //... then call super to convert the url to an object state = processor.inherited(arguments, [ state ]); } // merge processor._mergeState(state, urlState); // exit trace if (bIsLoggable) { processor.logExit(LOG_METHOD, state); } return state; } }, /** * Encodes the given state object and generates fragment. */ encode: function(state, callback, oldState, additionalParams) { // logging support var LOG_METHOD = "encode"; var bIsLoggable = this.LOGGER.isLoggable(this.LOG_LEVEL); // entry logging if (bIsLoggable) { this.logEntry(LOG_METHOD, [ dojo.toJson(state), callback, dojo.toJson(oldState), dojo.toJson(additionalParams) ]); } // clear the current state this.persistenceManager.clear(); // in SSA we need to store the widget state only // get widget parameters var wParams = state.wparams; if (wParams) { // get the previous widget paramaters to determine state changes var oldWParams = oldState ? oldState.wparams : undefined; // widget parameters that need to be stored var widgetParams = null; // iterate over widget states for (var widgetID in wParams) { if (Object.prototype.hasOwnProperty.call(wParams, widgetID)) { if (this._isUnmanagedWidget(widgetID)) { var widgetState = wParams[widgetID]; if (widgetState && widgetState.value) { // retrieve the data from the value property widgetState = widgetState.value; // normalize the state var normalizedWidgetState = null; // check if the previous state was a default state to determine state changes var isOldStateDefaultState = false; if (oldWParams) { var oldWidgetState = oldWParams[widgetID]; if (oldWidgetState && oldWidgetState.value) { var oldReservedParams = oldWidgetState.value.rp; if (oldReservedParams) { isOldStateDefaultState = this.isDefaultState(oldReservedParams); } } } // handle reserved params var reservedParams = widgetState.rp; if (reservedParams && !(this.isDefaultState(reservedParams) && isOldStateDefaultState)) { if (normalizedWidgetState === null) { normalizedWidgetState = {}; } normalizedWidgetState.rp = reservedParams; } // handle custom params var customParams = widgetState.cp; if (customParams) { if (normalizedWidgetState === null) { normalizedWidgetState = {}; } normalizedWidgetState.cp = customParams; } // add the widget state if (normalizedWidgetState) { if (widgetParams === null) { widgetParams = {}; } widgetParams[widgetID] = {"value": normalizedWidgetState}; } } } } } if (widgetParams) { // set the widget parameters this.persistenceManager.setState("wparams", widgetParams, state.partitionID); } } // commit the changes this.persistenceManager.commit(); // exit trace if (bIsLoggable) { this.logExit(LOG_METHOD); } // callback handling if (callback) { // check if we have to enforce a full page refresh for SSA if (additionalParams && additionalParams.allowRedirect) { // set the doRedirect property additionalParams.doRedirect = true; } // invoke the callback function callback("", additionalParams, additionalParams); } else { return ""; } }, _isUnmanagedWidget: function(widgetID) { var result = false; var widget = this.widgetModel.find(widgetID); var isStandalone = (widget && widget.isStandalone()); if (!isStandalone && widget) { result = dojo.hasClass(widget.rootElement, "iw-iWidget"); } return result; } }); // singleton com.ibm.portal.extension.state.SSANavigationStateProcessor.SINGLETON = new com.ibm.portal.extension.state.SSANavigationStateProcessor(); // determine the nav state processor var com_ibm_portal_extension_state_navStateProcessor = (ibmCfg && ibmCfg["themeConfig"] && ibmCfg["themeConfig"]["isPageRenderModeCSA"]) ? com.ibm.portal.extension.state.CSANavigationStateProcessor.SINGLETON : com.ibm.portal.extension.state.SSANavigationStateProcessor.SINGLETON; // Register our extensions ibmConfig.extensions.push( { /** * Extension for NavigationStateProcessor.encode */ "com.ibm.mashups.enabler.model.state.NavigationStateProcessor.encode": { type: "around", handler: function (executor, fnArgs) { // get the processor var processor = com_ibm_portal_extension_state_navStateProcessor; // dispatch to the processor return processor.encode(fnArgs[0], fnArgs[1], fnArgs[2], fnArgs[3]); } }, /** * Extension for NavigationStateProcessor.postprocess */ "com.ibm.mashups.enabler.model.state.NavigationStateProcessor.postprocess": { type: "around", handler: function (executor, fnArgs) { // get the processor var processor = com_ibm_portal_extension_state_navStateProcessor; // dispatch to the processor return processor.postprocess(fnArgs[0], fnArgs[1], fnArgs[2], fnArgs[3]); } }, /** * Extension for NavigationStateProcessor.decode */ "com.ibm.mashups.enabler.model.state.NavigationStateProcessor.decode": { type: "around", handler: function (executor, fnArgs) { // get the processor var processor = com_ibm_portal_extension_state_navStateProcessor; // dispatch to the processor return processor.decode(fnArgs[0], fnArgs[1]); } }, /** * Extension for NavigationStateProcessor.preprocess */ "com.ibm.mashups.enabler.model.state.NavigationStateProcessor.preprocess": { type: "around", handler: function (executor, fnArgs) { // get the processor var processor = com_ibm_portal_extension_state_navStateProcessor; // dispatch to the processor return processor.preprocess(fnArgs[0], fnArgs[1]); } }, /** * Extension for NavigationStateProcessor.generateURL */ "com.ibm.mashups.enabler.model.state.NavigationStateProcessor.generateURL": { type: "around", handler: function (executor, fnArgs) { // get the processor var processor = com_ibm_portal_extension_state_navStateProcessor; // dispatch to the processor return processor.generateURL(fnArgs[0], fnArgs[1], fnArgs[2]); } }, /** * Extension for NavigationStateProcessor.dispose */ "com.ibm.mashups.enabler.model.state.NavigationStateProcessor.dispose": { type: "around", handler: function (executor, fnArgs) { // get the processor var processor = com_ibm_portal_extension_state_navStateProcessor; // dispatch to the processor processor.dispose(fnArgs[0]); } } }); // Redirect ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.state.NavigationStateProcessor.generateUrl": { type: "around", handler: function (executor, fnArgs) { return com.ibm.mashups.enabler.model.state.NavigationStateProcessor.generateURL(executor, fnArgs); } } } ); dojo.declare("com.ibm.mm.extension.model.NavigationModelImpl", null, { constructor: function() { this.ns = { "ac" : "http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0", "app" : "http://www.w3.org/2007/app", "atom" : "http://www.w3.org/2005/Atom", "base" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base", "creation-context" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.1.0/portal-creation-context", "ext" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model", "model" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements", "opensearch" : "http://a9.com/-/spec/opensearch/1.1/", "thr" : "http://purl.org/syndication/thread/1.0", "xhtml" : "http://www.w3.org/1999/xhtml", "xml" : "http://www.w3.org/XML/1998/namespace" }; this._CREATION_CONTEXT = "creation-context"; this._ACCESS = "ac"; this._PRIVATE = "private"; this._CREATION_CONTEXT_PRIVATE = this._CREATION_CONTEXT + ":" + this._PRIVATE; this._ACCESS_PRIVATE = this._ACCESS + ":" + this._PRIVATE; // contributor role name this._CONTRIBUTOR = "Contributor"; }, create: function(nm, node, context) { if (node != null) { if (!context || !context.template) { // init array? if (nm._portal_createdNodes == null) { nm._portal_createdNodes = []; } // keep track of all created nodes... add node nm._portal_createdNodes[node.getID()] = node; } if (context) { if (context.template) { // this is added for sharing a page node.setMetaData("com.ibm.portal.navigation.follow_internal_urls", "true"); } if (context["private"]) { var expr = "atom:content/*"; // add the 'private' creation-context to the navigation node var navigationXml = node.getXml(); var nav = com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr, navigationXml, this.ns); if (nav) { this._setAttributeWithNS(navigationXml.ownerDocument, nav, this._CREATION_CONTEXT_PRIVATE, this._PRIVATE, this.ns[this._CREATION_CONTEXT], "" + context["private"]); var allowedAccess = com.ibm.mashups.enabler.xml.XPath.evaluateEntry("ac:allowed-access", nav, this.ns); if (allowedAccess) { this._setAttributeWithNS(navigationXml.ownerDocument, allowedAccess, this._ACCESS_PRIVATE, this._PRIVATE, this.ns[this._ACCESS], "" + context["private"]); } } // add the 'private' creation-context to the content node var content = node.getContent().start(); if (content) { var contentXml = content.getXml(); var res = com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr, contentXml, this.ns); if (res) { this._setAttributeWithNS(contentXml.ownerDocument, res, this._CREATION_CONTEXT_PRIVATE, this._PRIVATE, this.ns[this._CREATION_CONTEXT], "" + context["private"]); var allowedAccess = com.ibm.mashups.enabler.xml.XPath.evaluateEntry("ac:allowed-access", res, this.ns); if (allowedAccess) { this._setAttributeWithNS(navigationXml.ownerDocument, allowedAccess, this._ACCESS_PRIVATE, this._PRIVATE, this.ns[this._ACCESS], "" + context["private"]); } } } } } if(!node._getRawID && node.getID){ // client side Portal nodes don't have this function node._getRawID = function(){return com.ibm.mashups.enabler.model.Constants.CLIENT_ID_PREFIX + node.getID();}; } } }, remove: function(executor, nm, args) { // within space? var inSpace = false; var navNode = args[0]; var id = navNode.getID(); // execute the super function var result = executor(args); // keep track of all created nodes... remove node if (id != null && nm._portal_createdNodes != null) { delete nm._portal_createdNodes[id]; } // Prevents the commit methode from removing the fragment within a space if (inSpace) { var expr = "atom:link[@rel='related' and @ext:class='content-node']"; var nodes = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr, navNode.xmlData, this.ns); if (nodes && nodes.length > 0) { dojo.removeAttr(nodes[0], "href"); } } return result; }, insert: function(nm, node, parentNode) { var id = node.getID(); // node is successfully created... (and not moved!) if (nm._portal_createdNodes != null && nm._portal_createdNodes[id] != null) { // nodes of a space must be public var createdNode = nm._portal_createdNodes[node.getID()]; var spaceNode = com.ibm.mashups.enabler.model.Factory.getSpaceModel().findSpaceByNavigation(parentNode).start(); createdNode._portal_isPrivate = (spaceNode != null) ? "false" : "true"; } // set parent of content to the contentNode of related navNode to fix internal url use case var parentNode_CTN_ID = null; var expr = "atom:link[@rel='related' and @ext:rel='content-topology']"; var parentNode_CTNRefs = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr, parentNode.getXml(), this.ns); if (parentNode_CTNRefs && parentNode_CTNRefs.length > 0) { parentNode_CTN_ID = com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix, parentNode_CTNRefs[0]); } var content = node.getContent().start(); if (content && parentNode_CTN_ID) { // first set parent of content node this._setContentParent(content, parentNode_CTN_ID, nm); } }, /** * Extends the Mashups implementation by checking whether the current user is a member of the contributor or * the editor role. Both roles include the permission to create child pages. * * @param (Object) node * @param (Object) parentNode */ confirmInsert: function(node, parentNode) { var result = false; // check for client id var isClientNode = node._getRawID().indexOf(com.ibm.mashups.enabler.model.Constants.CLIENT_ID_PREFIX) === 0; if (isClientNode && parentNode && !parentNode.isPrivate() && node && !node.isPrivate()) { result = parentNode.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR); if (!result) { result = parentNode.hasRole(this._CONTRIBUTOR); } } return result; }, /** * @param {Object} node * @param {Object} parentNodeID * @param {Object} navModel */ _setContentParent: function(node, parentNodeId, navModel) { if (node !== null && parentNodeId !== null) { var modelUrl = com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL, navModel); modelUrl.setNodes([{ value: parentNodeId, isID: true }]); var thr = com.ibm.mashups.enabler.xml.XPath.evaluateXPath("thr:in-reply-to", node.getXml(), this.ns); if (!thr || thr.length === 0) { thr = com.ibm.mm.enabler.utils.Utils.createNode("thr:in-reply-to", this.ns.thr); node.getXml().appendChild(thr); } else { thr = thr[0]; } this._setAttributeWithNS(node.getXml().ownerDocument, thr, "ext:uri", "uri", this.ns.ext, modelUrl.getModelURI()); thr.setAttribute("ref", modelUrl.getModelURI()); thr.setAttribute("href", modelUrl.getAbsoluteURL()); } }, commit_after: function(nm) { if (nm._portal_createdNodes != null) { // invalidate created pages for (var nodeID in nm._portal_createdNodes) { var node = nm._portal_createdNodes[nodeID]; nm.invalidate(node); } // clear created nodes indicator nm._portal_createdNodes = []; } }, _setAttributeWithNS: function(dom, element, attName, localAttName, nsUri, value) { if (dojo.isIE) { var attribute = dom.createNode(2, attName, nsUri); // set value attribute.nodeValue = value; // attach to element element.setAttributeNode(attribute); } else { element.setAttributeNS(nsUri, attName, value); } } }); com.ibm.mm.extension.model.NavigationModel = new com.ibm.mm.extension.model.NavigationModelImpl(); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.NavigationModel.create": { type: "after", handler: function(result, args) { com.ibm.mm.extension.model.NavigationModel.create(this, result, args[0]); // check if page template specified, if so then we need a plain content page with the creation-context pointing to this template if (args[0].pageTemplate && this.ns) { var cn = result.getContent().start(); var node = null; var entry = com.ibm.mm.enabler.utils.Utils.createNode("atom:entry", cn.ns.atom); entry.appendChild(com.ibm.mm.enabler.utils.Utils.createNode("atom:id", cn.ns.atom)); var content = com.ibm.mm.enabler.utils.Utils.createNode("atom:content", cn.ns.atom); var modelNode = com.ibm.mm.enabler.utils.Utils.createNode("model:static-content-page", cn.ns.model); com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(modelNode, "creation-context:copy", cn.ns["creation-context"], args[0].pageTemplate); if (args[0]["private"] === true) { com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(modelNode, "creation-context:private", cn.ns["creation-context"], "true"); } var utils = com.ibm.mm.enabler.utils; var titleNode = utils.Utils.createNode("model:title", cn.ns.model); var titleString = utils.Utils.createNode("base:nls-string", cn.ns.base); utils.Utils.setAttributeWithNS(titleString, "xml:lang", "http://www.w3.org/XML/1998/namespace", dojo.locale); utils.Dom.textContent(titleString, "."); titleNode.appendChild(titleString); modelNode.appendChild(titleNode); content.appendChild(modelNode); entry.appendChild(content); node = com.ibm.mm.enabler.content.persistence.xml.ContentNodeFactory.createContentNode(entry, this); var replacementXml = node.getXml(); cn.setXml(replacementXml, true); } return result; } } }); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.NavigationModel.remove": { type: "around", handler: function(executor, args) { return com.ibm.mm.extension.model.NavigationModel.remove(executor, this, args); } } }); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.NavigationModel.insert": { type: "after", handler: function(result, args) { com.ibm.mm.extension.model.NavigationModel.insert(this, args[0], args[1]); return result; } } }); ibmConfig.extensions.push ( { "com.ibm.mashups.enabler.model.NavigationModel.commit": { type: "after", handler: function(dfr, args) { var nmContext = this; // replace start() method of the deferred object to invoke orginal // start function AND to have portal specific post processing done dfr.start = function(sync) { var mode = (sync || typeof(sync) == 'undefined') ? true : false; dojo.hitch(this.context, this.startfn)(this, mode, this.params); com.ibm.mm.extension.model.NavigationModel.commit_after(nmContext); } return dfr; } } }); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.NavigationModel.confirmInsert": { type: "after", handler: function(result, args) { if (!result) { // if Mashups returns false, perform an additional check of the users role memberships for the specified node // because Mashups itself does not know the Contributor role of Portal, which allows users to create child pages. result = com.ibm.mm.extension.model.NavigationModel.confirmInsert(args[0], args[1]); } return result; } } }); dojo.declare("com.ibm.mm.extension.model.widget.PreferencesImpl", [com.ibm.mashups.enabler.widget.Preferences], { /** * * @param {XMLDOMNode} node the xml node for this preferences * @param {PreferencesProvider} prefProvider the preferences provider * @param {Preferences} defaultPreferences the default preferences */ constructor: function(node, prefProvider, defaultPreferences) { //this.xmlData = node; this.prefProvider = prefProvider; this.defaultPreferences = defaultPreferences; // service document and initialization var serviceJson = com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_WIDGET); var nsf = com.ibm.mm.enabler.model.NameSpaceFactory; this.li_ns = dojo.delegate(serviceJson.namespaces, nsf.getNameSpaces([nsf.NS_ATOM, nsf.NS_XML, nsf.NS_XSI])); this.PREFERENCES = "atom:content/*/model:portletpreferences[@name='${0}']/base:value"; this.PREFERENCES_BY_NAME = "atom:content/*/model:portletpreferences[@name='${0}']"; this.PREFERENCES_TOP = "atom:content/*/model:portletpreferences"; this.STAR_NODE = "atom:content/*"; this.BASE_NS = this.li_ns.base; this.BASE_VALUE = "base:value"; this.BASE_STRING = "base:String"; this.XSI_NS = this.li_ns.xsi; this.XSI_TYPE = "xsi:type"; this.MODEL_NS = this.li_ns.model; this.MODEL_PORTLETPREFERENCES = "model:portletpreferences"; }, _getPrefNode: function(name) { if (!name) { return null; } var result = null; var expr = dojo.string.substitute(this.PREFERENCES_BY_NAME, [name]); var xmlData = this.prefProvider._getPreferencesXML(); var preference = com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr, xmlData, this.li_ns); return preference || result; }, getValue: function(name) { var prefNode = this._getPrefNode(name); if (prefNode) { var valExpr = "base:value[@xsi:type='base:String' and position()=1]/@value"; var value = com.ibm.mashups.enabler.xml.XPath.evaluateEntry(valExpr, prefNode, this.li_ns); if (value) { return com.ibm.mm.enabler.utils.Dom.textContent(value); } } if (this.defaultPreferences) { return this.defaultPreferences.getValue(name); } return null; }, getValues: function(name) { var prefNode = this._getPrefNode(name); if (prefNode) { var valExpr = "base:value[@xsi:type='base:String']/@value"; var values = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(valExpr, prefNode, this.li_ns); if (values && values.length > 0) { return dojo.map(values, function(node) { return com.ibm.mm.enabler.utils.Dom.textContent(node); }); } } if (this.defaultPreferences) { return this.defaultPreferences.getValues(name); } return null; }, isReadOnly: function(name) { var result = false; var prefNode = this._getPrefNode(name); if (prefNode) { var attReadOnly = prefNode.getAttribute("read-only"); if (attReadOnly == "true") { result = true; // make sure that either ro setting is accepted } } else { if (this.defaultPreferences) { result = this.defaultPreferences.isReadOnly(name); } } return result; }, getNames: function() { var result = []; var names = {}; var xmlData = this.prefProvider._getPreferencesXML(); var preferences = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.PREFERENCES_TOP, xmlData, this.li_ns); var i; if (preferences) { var prefCount = preferences.length; for (i = 0; i < prefCount; i++) { names[preferences[i].getAttribute("name")] = null; } } if (this.defaultPreferences) { var defNames = this.defaultPreferences.getNames(); var defNameCount = defNames.length; for (i = 0; i < defNameCount; ++i) { names[defNames[i]] = null; } } for (var name in names) { if (Object.prototype.hasOwnProperty.call(names,name)) { result.push(name); } } return result; }, _getValueForMap: function(prefNode) { if (prefNode) { var valExpr = "base:value[@xsi:type='base:String' and position()=1]/@value"; var value = com.ibm.mashups.enabler.xml.XPath.evaluateEntry(valExpr, prefNode, this.li_ns); if (value) { return com.ibm.mm.enabler.utils.Dom.textContent(value); } } return null; }, getMap: function() { var result = {}; var xmlData = this.prefProvider._getPreferencesXML(); var preferences = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.PREFERENCES_TOP, xmlData, this.li_ns); var i; if (this.defaultPreferences) { result = this.defaultPreferences.getMap(); } if (preferences) { var map = {}; var prefCount = preferences.length; for (i = 0; i < prefCount; i++) { var name = preferences[i].getAttribute("name"); var value = this._getValueForMap(preferences[i]); map[name] = value; } dojo.mixin(result, map); } return result; } }); dojo.declare("com.ibm.mm.extension.model.widget.HierarchicalPreferencesImpl", com.ibm.mashups.enabler.widget.ModifiablePreferences, { constructor: function(wm, orgPrefProvider, origHPrefs) { this.wmContext = wm; this.orgPrefProvider = orgPrefProvider; this.basePrefs = origHPrefs; this.LOGGER = this.basePrefs.LOGGER; this.LOG_LEVEL = this.basePrefs.LOG_LEVEL; var ns = { "atom" : "http://www.w3.org/2005/Atom", "model" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements" }; var expr = "atom:entry[atom:content/model:portlet]"; var nodes = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr, this.orgPrefProvider.xmlData.parentNode, ns); if (nodes && nodes.length > 0) { var portletXmlData = nodes[0]; this.parentPrefs = new com.ibm.mm.extension.model.widget.PreferencesImpl( this.portletXmlData, { _getPreferencesXML: function() { return portletXmlData; } }, null); } else { this.parentPrefs = null; } }, isReadOnly: function(name) { if (this.basePrefs.getValue(name) !== null) { return this.basePrefs.isReadOnly(name); } if (this.parentPrefs) { return this.parentPrefs.isReadOnly(name); } return false; }, getValue: function(name) { var value = this.basePrefs.getValue(name); if (value !== null) { return value; } if (this.parentPrefs) { return this.parentPrefs.getValue(name); } return null; }, getValues: function(name) { var values = this.basePrefs.getValues(name); if (values !== null) { return values; } if (this.parentPrefs) { return this.parentPrefs.getValues(name); } return null; }, setValue: function(name, value, readOnly, _context) { return this.basePrefs.setValue(name, value, readOnly, _context); }, setValues: function(name, values, readOnly) { return this.basePrefs.setValues(name, values, readOnly); }, remove: function(name, _context) { return this.basePrefs.remove(name, _context); }, getNames: function() { // logging support var LOG_METHOD = "getNames()"; var bIsLoggable = this.LOGGER.isLoggable(this.LOG_LEVEL); if (bIsLoggable) { this.LOGGER.entering(LOG_METHOD); } var result = []; var names = {}; var i; if (this.parentPrefs) { // log this if (bIsLoggable) { this.LOGGER.trace(LOG_METHOD, "Getting names from parent preference"); } var parentNames = this.parentPrefs.getNames(); var parentNameCount = parentNames.length; for (i = 0; i < parentNameCount; ++i) { names[parentNames[i]] = null; } } // log this if (bIsLoggable) { this.LOGGER.trace(LOG_METHOD, "Getting own names"); } var baseNames = this.basePrefs.getNames(); var baseNameCount = baseNames.length; for (i = 0; i < baseNameCount; ++i) { names[baseNames[i]] = null; } for (var name in names) { if (Object.prototype.hasOwnProperty.call(names,name)) { result.push(name); } } // exit trace if (bIsLoggable) { this.LOGGER.exiting(LOG_METHOD); } return result; }, getMap: function() { // logging support var LOG_METHOD = "getMap()"; var bIsLoggable = this.LOGGER.isLoggable(this.LOG_LEVEL); if (bIsLoggable) { this.LOGGER.entering(LOG_METHOD); } var result = {}; if (this.parentPrefs) { // log this if (bIsLoggable) { this.LOGGER.trace(LOG_METHOD, "Getting map from parent preference"); } result = this.parentPrefs.getMap(); } // log this if (bIsLoggable) { this.LOGGER.trace(LOG_METHOD, "Getting own map"); } var baseMap = this.basePrefs.getMap(); dojo.mixin(result,baseMap); // exit trace if (bIsLoggable) { this.LOGGER.exiting(LOG_METHOD); } return result; }, confirmRemove: function(name) { return this.basePrefs.confirmRemove(name); }, confirmSetValue: function(name, value) { return this.basePrefs.confirmSetValue(name, value); }, confirmSetValues: function(name, values) { return this.basePrefs.confirmSetValues(name, values); }, confirmSetReadOnly: function(name) { return false; } }); ibmConfig.extensions.push ( { "com.ibm.mashups.enabler.widget.WidgetModel.getHierarchicalPreferences": { type: "around", handler: function (func, args) { var wmContext = this; var dfr = func(args); // call the super method // replace start() method of the deferred object to invoke orginal // start function AND to have portal specific post processing done dfr.start = function(sync) { var mode = (sync || typeof(sync) == 'undefined') ? true : false; var ret = dojo.hitch(this.context, this.startfn)(this, mode, this.params); if (ret) { ret = new com.ibm.mm.extension.model.widget.HierarchicalPreferencesImpl(wmContext, args[0], ret); } return ret; } var dfr_finish = dfr.finish; dfr.finish = function(result, status, data){ if (data) { data = new com.ibm.mm.extension.model.widget.HierarchicalPreferencesImpl(wmContext, args[0], data); } return dojo.hitch(dfr, dfr_finish)(result, status, data); } return dfr; } }});dojo.declare("com.ibm.mm.extension.model.LayoutModelImpl", null, { constructor: function() { this.ns = { "app" : "http://www.w3.org/2007/app", "atom" : "http://www.w3.org/2005/Atom", "base" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base", "creation-context" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.1.0/portal-creation-context", "ext" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model", "model" : "http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements", "opensearch" : "http://a9.com/-/spec/opensearch/1.1/", "thr" : "http://purl.org/syndication/thread/1.0", "xhtml" : "http://www.w3.org/1999/xhtml", "xml" : "http://www.w3.org/XML/1998/namespace" }; }, create: function(nm, node, context) { if (node != null && (!context || !context.template)) { node.setMetaData("com.ibm.portal.content.mashuppage", "true"); } }, confirmRemove: function(nm, func, node) { if (nm.isDeletable(node)) { return nm.navigationNode.hasRole(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER) || nm.navigationNode.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR); } return false; }, confirmInsert: function(lm, func, args) { var node = args[0]; var parent = args[1]; var next = args[2]; var confirm = true; // check if parent is a CONTAINER if (com.ibm.mm.enabler.utils.Misc.isInstanceOf(node, com.ibm.mashups.enabler.Transformable)) { var xmlData = parent.getXml(); confirm = confirm && com.ibm.mashups.enabler.xml.XPath.evaluateBoolean("atom:content/model:layout-container", xmlData, this.ns); } // node must not equal parent if (confirm) { confirm = confirm && (node.getID() != parent.getID()); } // editor can do an insert on public pages and privileged user can do an insert in any case (i.e. for public and non-public pages) if (confirm) { confirm = confirm && ( lm.navigationNode.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR) || lm.navigationNode.hasRole(com.ibm.mashups.enabler.ac.RoleType.PRIVILEGED_USER)); } // nodes must be modifiable if (confirm) { confirm = confirm && lm.isModifiable(node) && lm.isModifiable(parent); } return confirm; } }); com.ibm.mm.extension.model.LayoutModel = new com.ibm.mm.extension.model.LayoutModelImpl(); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.LayoutModel.create": { type: "after", handler: function(result, args) { com.ibm.mm.extension.model.LayoutModel.create(this, result, args[0]); return result; } } }); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.LayoutModel.confirmRemove": { type: "around", handler: function(func, args) { return com.ibm.mm.extension.model.LayoutModel.confirmRemove(this, func, args[0]); } } }); ibmConfig.extensions.push( { "com.ibm.mashups.enabler.model.LayoutModel.confirmInsert": { type: "around", handler: function(func, args) { return com.ibm.mm.extension.model.LayoutModel.confirmInsert(this, func, args); } } }); (function(){ // EXTENSION SEEMS NOT TO WORK, SO WE NEED A LITTLE HACK // FIXME make this an extension var ns, origSetXmlFunc = com.ibm.mm.enabler.layout.LayoutControlImpl.prototype.setXml, getNS = function() { if(!ns) { var serviceCollection = com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT); // define namespaces ns = dojo.delegate(serviceCollection.namespaces, com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaces([ com.ibm.mm.enabler.model.NameSpaceFactory.NS_ATOM ]) ); } return ns; } dojo.extend(com.ibm.mm.enabler.layout.LayoutControlImpl,{ setXml: function(xml) { var xp = "atom:content/*/model:*[local-name() = 'templateName' or local-name() = 'containerChild' or local-name() = 'controlChild']"; var nodes = com.ibm.mashups.enabler.xml.XPath.evaluateXPath(xp,xml,getNS()); if (nodes && nodes.length > 0) { dojo.forEach(nodes, dojo.destroy); } origSetXmlFunc.apply(this,arguments); } }); })(); (function(){ var operation = com.ibm.mashups.enabler.ac.operation, opConstants = operation.Constants, allowedOpsModel = operation.AllowedOperationsModelFactory.getAllowedOperationsModel(); dojo.mixin(opConstants, { EDIT_LAYOUT: "com.ibm.mashups.enabler.ac.operation.EditLayout", EDIT_PROPERTIES: "com.ibm.mashups.enabler.ac.operation.EditPageProperties", ASSIGN_ROLES: "com.ibm.mashups.enabler.ac.operation.AssignRoles", VIEW: "com.ibm.mashups.enabler.ac.operation.view", EDIT: "com.ibm.mashups.enabler.ac.operation.edit", EDIT_DEFAULTS: "com.ibm.mashups.enabler.ac.operation.edit_defaults", CONFIG: "com.ibm.mashups.enabler.ac.operation.config", HELP: "com.ibm.mashups.enabler.ac.operation.help" }); var setOperationsFeedPageOp = function(operationName, roleCheck) { allowedOpsModel.setOperation(operationName, function(opName, jsonContext, sync, finished){ var pageId = jsonContext.contentNode.getID(); new com.ibm.pb.extension.contextmenu.ContextMenuAcOperation(pageId, ibmPortalConfig.contentHandlerURI+"wp.operations/page:oid:"+pageId, sync, roleCheck, finished); }); }, setOperationsFeedPortletOp = function(operationName, roleCheck) { allowedOpsModel.setOperation(operationName, function(opName, jsonContext, sync, finished){ var pageId = jsonContext.contentNode.getID(); new com.ibm.pb.extension.contextmenu.ContextMenuAcOperation(jsonContext.id, ibmPortalConfig.contentHandlerURI+"wp.operations/portlet:oid:"+jsonContext.id+"@oid:"+pageId, sync, roleCheck, finished); }); }, pageOps = [ [opConstants.EDIT_LAYOUT, "EditLayout"], [opConstants.EDIT_PROPERTIES, "EditPageProperties"], [opConstants.ASSIGN_ROLES, "AssignRoles"]], portletOps = [ [opConstants.VIEW, "view"], [opConstants.EDIT, "edit"], [opConstants.EDIT_DEFAULTS, "edit_defaults"], [opConstants.CONFIG, "config"], [opConstants.HELP, "help"]], i=0; for(i=0;i<pageOps.length;i++) { setOperationsFeedPageOp(pageOps[i][0], pageOps[i][1]); } for(i=0;i<portletOps.length;i++) { setOperationsFeedPortletOp(portletOps[i][0], portletOps[i][1]); } })(); /* Initialize Portal extensions for Enabler */ (function(){ var c = ibmConfig; if ( c && c.extensions && c.extensions.length > 0 ) { var configVar = {}, e = c.extensions; function forInLoop ( obj, work ) { for (var prop in obj ) { if (Object.prototype.hasOwnProperty.call( obj, prop ) ) { work( prop, obj[prop] ); } } } for ( var i = 0; i < e.length; i++ ) { forInLoop( e[i], function ( name, value ) { configVar[name] = value; }); } var mappingFn = c[ "mappingFunction" ]; var extReg = new ExtensionRegistry( mappingFn ); extReg.process( e ); } })();dojo.addOnLoad(function(){ livetextService = com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.livetext.ServiceModel.SERVICE_NAME); TagService = SemTagSvc = livetextService; var onTagContentChanged = livetextService.onTagContentChanged, onTagChanged = livetextService.onTagChanged; livetextService.onTagChanged = function() { if (ibmConfig && ibmConfig["pageLoadOptimizationAppWidgets"]) { var mp = com.ibm.mashups.enabler.io.XHRMultipartFactory.create(); mp.startTransaction(); onTagChanged.apply(this, arguments); mp.endTransactionDeferred(true).start(); } else { onTagChanged.apply(this, arguments); } }; livetextService.onTagContentChanged = function() { if (ibmConfig && ibmConfig["pageLoadOptimizationTheme"]) { var mp = com.ibm.mashups.enabler.io.XHRMultipartFactory.create(); mp.startTransaction(); onTagContentChanged.apply(this, arguments); mp.endTransactionDeferred(true).start(); } else { onTagContentChanged.apply(this, arguments); } }; });dojo.addOnLoad(function(){ /* connect any status events coming from enabler to the new status bar which uses i$ rather than dojo */ dojo.subscribe("/portal/status", function(args) { i$.fireEvent("/portal/status", [args]); }); dojo.subscribe("/message/status", function(args) { i$.fireEvent("/message/status", [args]); }); dojo.subscribe("/portal/status/clear", function(args) { i$.fireEvent("/portal/status/clear", [args]); }); dojo.subscribe("/message/status/clear", function(args) { i$.fireEvent("/message/status/clear", [args]); }); });dojo.provide("com.ibm.mm.builder.nls.mmbuilder_portal_en");dojo.provide("com.ibm.mm.builder.nls.coreWidgetsMessages");com.ibm.mm.builder.nls.coreWidgetsMessages._built=true;dojo.provide("com.ibm.mm.builder.nls.coreWidgetsMessages.en");com.ibm.mm.builder.nls.coreWidgetsMessages.en={"E_SPACE_UTIL_INVALID_NAME_BLANK_0":"BMWMB0092E: The space name is required.","E_PUB_API_MOVE_PAGE_1":"BMWMB0061E: The page could not be moved. Error details: ${0}.","E_SPACE_IMPORT_FAIL_1":"BMWMB0106E: The space could not be created. Error detail: ${0}.","E_EDITPAGE_SAVE_ERROR_0":"BMWMB0105E: The page cannot be saved because the navigation layout model is returning null.","E_HTML_EDITOR_CREATE_0":"BMWMB0019E: The HTML Markup widget cannot load because the Dijit editor could not be created. Refresh the page and try again.","E_SPACE_MANAGER_NO_SPACE_FOR_SPACE_CREATION_0":"BMWMB0084E: The space cannot be duplicated because the original space does not exists. Try duplicating a different space.","E_PUBLISH_SPACE_EXPLORTING_SPACE_1":"BMWMB0153E: The following space could not be exported: ${0}.","E_LAYOUT_NOT_SUPPORTED_0":"BMWMB0009E: The layout cannot be changed because it is not supported yet.","E_PUBLISH_PAGE_EXPLORTING_PAGE_1":"BMWMB0053E: The following page could not be exported: ${0}.","E_SKIN_THEME_NOT_EXIST_0":"BMWMB0045E: The page theme was not found in the theme model.","I_TOOLBOX_PAGE_SAVED_1":"BMWMB0001I: Page '${0}' was saved successfully.","E_SPACE_CREATE_FAIL_1":"BMWMB0108E: The space cannot be created. Error detail: ${0}.","E_SHARE_WITH_ME_COMMUNITY_FAIL_1":"BMWMB0041E: The community was not found in the following node: ${0}.","E_COLUMN_LAYOUT_INIT_1":"BMWMB0014E: The page could not load because the column layout widget failed to initialize. Error detail: ${0}","E_SPACE_COPY_FAIL_1":"BMWMB0109E: The space cannot be copied. Error detail: ${0}.","E_USER_SEARCH_ERROR_1":"BMWMB0118E: An error occurred when searching for users and groups. Error details: ${0}.","E_SPACE_MANAGER_SPACE_OWNER_IS_REQUIRED_0":"BMWMB0079E: A space owner is required.","E_PAGE_UTIL_INVALID_NAME_EMPTY_0":"BMWMB0032E: A page name is required.","I_SUCCESSFUL_AUTO_WIRING_2":"BMWMB0012I: Widget '${0}' was wired with '${1}' successfully.","E_SPACE_MANAGER_SPACE_DESC_HAS_MAX_LIMIT_0":"BMWMB0104E: Space descriptions cannot exceed 512 characters.","E_NAV_REFRESH_NAVIGATION_1":"BMWMB0028E: The navigation could not be refreshed. Error details: ${0}.","E_SPACE_UTIL_INVALID_NAME_LENGTH_0":"BMWMB0093E: The space name cannot contain more than 255 characters.","E_EMBEDDING_WIDTHHEIGHT_INPUTERROR1_0":"BMWMB0066E: The value must be between 50 and 2000 pixels.","E_SPACE_IMPORT_INVALID_FILE_TYPE_0":"BMWMB0097E: The file type for the space import is invalid.","E_EMBEDDING_WIDTHHEIGHT_INPUTERROR2_0":"BMWMB0067E: The value must be an integer.","E_MAIN_LOAD_INVALIDTHEME_0":"BMWMB0099E: The page theme could not be loaded and has temporarily changed to the default theme. Go to Page Settings to change the theme.","E_MAIN_LOAD_NAV_MODEL_FAIL_1":"BMWMB0038E: The navigation model using enabler API (URI: ${0}) could not be loaded. Contact your system administrator for help.","E_HTML_UTIL_SET_CLASS_1":"BMWMB0027E: The class attribute could not be set. Error detail: ${0}","E_SPACE_MANAGER_PAGE_EXPORT_URL_IS_NULL_0":"BMWMB0100E: The URL of the page export is required.","E_SPACE_MANAGER_SPACE_CREATED_FAILED_0":"BMWMB0081E: The space was not created.","E_ACL_FAIL_TO_GET_PERMISSION_1":"BMWMB0007E: Permission for this user was not found . Error detail: ${0}","E_PAGE_IMPORT_FAIL_1":"BMWMB0107E: The page could not be created. Error detail: ${0}.","E_EMBEDDING_NOPREVIEWDLG_ERROR_0":"BMWMB0064E: The preview window does not exist.","E_PAGE_UTIL_INVALID_DESCRIPTION_LENGTH_1":"BMWMB0120E: The page description is limited to ${0} characters. Shorten your description and save again.","E_COLUMN_WITH_RESIZER_CHANGE_SIZE_1":"BMWMB0023E: The column size cannot be changed because the cursor position could not be determined. Error details: ${0}","E_SHARE_PAGE_NO_PERMISSION_0":"BMWMB0080E: The page cannot be shared. Ask your system administrator to confirm that you have the required permissions.","I_CONTENTSHELF_WIDGET_SANDBOX_0":"BMWMB0116I: The trust setting that you just marked applies to all subsequent users of this widget.","E_NEW_PAGE_POSITION_MISSING_0":"BMWMB0075E: A new position is required to reorder the page.","E_SPACE_MANAGER_PAGE_OWNER_IS_REQUIRED_0":"BMWMB0117E: A page owner is required.","E_FREEFORM_LAYOUT_LOAD_1":"BMWMB0016E: The page cannot display because the free-form layout widget could not be loaded. Error detail: ${0}","E_NAV_NO_PAGE_OR_NET_DISCONNECT_0":"BMWMB0069E: The server cannot be reached. Try reloading your browser.","E_COLUMN_CREATE_WIDGET_1":"BMWMB0004E: The widget could not be created. Error detail: ${0}","E_PUB_API_PAGE_MODE_CHANGE_1":"BMWMB0056E: The page mode could not be updated. Error details: ${0}.","I_PUBLISH_PAGE_1":"BMWMB0002I: Page '${0}' was published successfully.","E_TAG_SERVICE_ATTACH_FAIL_1":"BMWMB0047E: The skin could not be attached. Error details: ${0}.","E_SPACE_MANAGER_SPACE_NAME_HAS_MAX_LIMIT_0":"BMWMB0102E: The space name cannot exceed 256 characters.","E_SPACE_IMPORT_FILENAME_IS_REQUIRED_0":"BMWMB0096E: A file is required.","E_PAGE_UTIL_INVALID_NAME_LENGTH_0":"BMWMB0034E: The page name cannot contain more than 255 characters.","E_COLUMN_DND_1":"BMWMB0003E: The drag and drop action could not be completed. Refresh the page and try again. Error detail: ${0}","E_PUB_API_PAGE_PROPERTY_UPDATE_1":"BMWMB0060E: The page property could not be updated. Error details: ${0}.","E_SPACE_UTIL_INVALID_NAME_EMPTY_0":"BMWMB0091E: A space name is required.","E_PUB_API_PAGE_SAVE_1":"BMWMB0059E: The page content could not be saved. Error details: ${0}.","E_SKIN_LOAD_TEMPLATE_FAIL_1":"BMWMB0044E: The following skin template could not be found: ${0}.","E_DND_CREATEWIDGET_0":"BMWMB0054E: The widget definition was not found.","I_TOOLBOX_DELETE_WARN_1":"BMWMB0055I: Do you want to delete catalog entry ${0}?","E_LAYOUT_UTIL_CHOOSE_SKIN_0":"BMWMB0026E: The skin cannot be selected because the theme could not be found in the theme model.","E_PUB_API_DELETE_PAGE_1":"BMWMB0071E: The page could not be deleted. Error details: ${0}.","E_COLUMN_LAYOUT_LOAD_1":"BMWMB0015E: The page could not be accessed because the column layout widget failed to load properly. Error detail: ${0}","E_HTML_UTIL_REMOVE_ATTR_FAIL_0":"BMWMB0042E: The widget attribute 'widgetstatus' could not be removed.","E_EMBEDDING_WIDGET_ERROR_0":"BMWMB0063E: No supported mode could be found to display the widget.","E_LAYOUT_UTIL_CREATE_SKIN_CONF_0":"BMWMB0025E: The skin cannot be created because the theme could not be found in the theme model.","E_SKIN_LOAD_ROOT_FAIL_1":"BMWMB0046E: The following skin root URL could not be found: ${0}.","E_MAIN_LOAD_THEME_MODEL_FAIL_0":"BMWMB0138E: The following theme could not be found: ${0}. Contact your system administrator.","E_NAV_LOAD_PAGE_1":"BMWMB0121E: The page could not be loaded. Error details: ${0}.","E_PAGE_UTIL_INVALID_NAME_DUP_1":"BMWMB0036E: A page named [ ${0} ] already exists. Select a different name.","E_SPACE_MANAGER_NO_TEMPLATE_FOR_SPACE_CREATION_0":"BMWMB0082E: The specified template does not exist in the catalog. Try using a different template.","E_EMBEDDING_NOWIDGET_ERROR_1":"BMWMB0065E: The following widget instance does not exist: ${0}.","E_NAVIGATION_SWITCH_PAGE_1":"BMWMB0021E: The page cannot be loaded. Error details: ${0}","I_NO_AUTO_WIRING_2":"BMWMB0013I: The wire between widgets '${0}' and '${1}' could not be created.","E_CONTEXT_MENU_FAIL_1":"BMWMB0112E: The context menu could not be loaded. Error details: ${0}.","E_CONTEXT_MENU_FAIL_2":"BMWMB0113E: The context menu could not be loaded. Error details: ${0}.","E_PAGE_UTIL_INVALID_NAME_BLANK_0":"BMWMB0033E: A page name is required.","E_SPACE_MANAGER_PAGE_ID_IS_NULL_0":"BMWMB0077E: A page ID is required.","E_SPACE_UTIL_INVALID_NAME_CHAR_0":"BMWMB0094E: A space name cannot contain any of the following characters: \n\t\t\t @\\/:*?\"<>|.","E_CONTEXT_MENU_FAIL_3":"BMWMB0114E: The context menu could not be loaded. Error details: ${0}.","E_CONTEXT_MENU_FAIL_4":"BMWMB0115E: The context menu could not be loaded because the ID does not exist. Error details: ${0}.","E_MAIN_LOAD_PAGE_FAIL_2":"BMWMB0039E: The page cannot be loaded because of the following error: ${0} - ${1}. Contact your system administrator.","E_SPACE_SAVE_AS_TEMPLATE_FAIL_1":"BMWMB0110E: The space could not be saved as a template. Error detail: ${0}.","E_PAGE_MENU_FAIL_ACCESS_1":"BMWMB0049E: The access level could not be found. Provide your system administrator with the following error details: ${0}.","E_EMBEDDING_PAGEACCESS_ERROR_0":"BMWMB0070E: Either the content you requested does not exist, or the content owner has not granted you permission to view it.","E_MOVE_PAGE_INSUFFICIENT_ACCESS_RIGHTS_0":"BMWMB0111E: The page cannot be moved because of insufficient access rights.","I_PUBLISH_SPACE_1":"BMWMB0102I: Space '${0}' was published successfully.","E_PAGE_SOURCE_GET_SINGLE_WIDGET_1":"BMWMB0024E: The widget source could not be found. Error detail: ${0}","E_ACL_FAIL_TO_CALL_COMMUNITY_COMMIT_1":"BMWMB0101E: The following function was not called: communityModel.commit(). Error detail: ${0}","E_PUB_API_CREATE_PAGE_1":"BMWMB0062E: The page could not be created. Error details: ${0}.","E_ACCOUNT_SETTING_SAVE_FAIL_1":"BMWMB0098E: The account settings could not be saved. Error details: ${0}.","E_DIFFERENT_LOCATION_REQUIRED_0":"BMWMB0074E: This selection keeps the page in its current position. To move the page, select a different location.","E_PAGE_UTIL_INVALID_NAME_CHAR_0":"BMWMB0035E: A page name cannot contain any of the following characters: \n\t\t\t @\\/:*?\"<>|.","E_PUBLISH_PAGE_NO_PERMISSION_0":"BMWMB0083E: The page [ ${0} ] cannot be viewed because the page owner [ ${1} ] has not given you view permission.","E_SPACE_MANAGER_SPACE_NAME_HAS_INVALID_CHAR_0":"BMWMB0103E: The space name contains one or more of the following invalid characters: @\\/:*?\"<>|.","E_DATA_VIEWER_LOAD_G11N_PROP_0":"BMWMB0018E: The Data Viewer widget cannot load because the widget's language resource file cannot be found.","E_SPACE_UTIL_INVALID_NAME_DUP_1":"BMWMB0095E: A space named [ ${0} ] already exists. Select a different name.","I_SHARE_PAGE_CAN_NOT_GIVE_PERMISSION_0":"BMWMB0085I: Can not give '${0}' edit permission.","E_HTML_MARKUP_LOAD_FAIL_1":"BMWMB0051E: The HTML Markup widget could not be loaded. Error details: ${0}.","E_SKIN_NOT_EXIST_0":"BMWMB0043E: This skin does not exist in the current theme.","E_SKIN_NOT_EXIST_1":"BMWMB0072E: This skin does not exist in the current theme. Use the default skin instead.","E_MODE_SELECTOR_GET_CATALOG_1":"BMWMB0022E: The catalog cannot be loaded. Error details: ${0}","E_MAIN_INVALID_ID_2":"BMWMB0011E: Content for the page ID {0} cannot be found. Error detail: ${1}","E_SYSTEM_WIDGET_ONUNLOAD_ERROR_2":"BMWMB0068E: The system widget ${0} could not be destroyed. Error details: ${1}.","E_SKIN_NOT_EXIST_2":"BMWMB0073E: This skin does not exist in the current theme. Use the first skin instead.","E_SPACE_MANAGER_SPACE_ID_IS_NULL_0":"BMWMB0076E: A space ID is required.","E_SPACE_MANAGER_SPACE_NAME_IS_REQUIRED_0":"BMWMB0090E: A space name is required.","E_NAV_PANE_PUBLISH_EVENT_ERROR_1":"BMWMB0052E: The following event could not be invoked: serviceManager.getService publishEvent. Error details: ${0}."};dojo.provide("com.ibm.mm.builder.nls.coreWidgetsStr");com.ibm.mm.builder.nls.coreWidgetsStr._built=true;dojo.provide("com.ibm.mm.builder.nls.coreWidgetsStr.en");com.ibm.mm.builder.nls.coreWidgetsStr.en={"I_COLUMN_CONF_COLUMN_NUMBER_1":"One","I_COLUMN_CONF_COLUMN_NUMBER_2":"Two","I_COLUMN_CONF_COLUMN_NUMBER_3":"Three","I_CHANGE_PAGE_OWNER_HEADER":"Changing page owner for","I_CHANGE_SPACE_OWNER_NOTE":"Users with edit permission can add, delete, and configure pages in the space. Users with view access can only view pages in the space.","I_COLUMN_CONF_COLUMN_NUMBER_4":"Four","I_CONTEXT_MENU_RESIZE":"Resize","I_PAGE_PROPERTIES_CHANGE_OWNER":"Change Owner","I_COLUMN_CONF_MOVEWIDGET_COLUMN_INFO_1":"Column ${0}","I_PAGE_PROPERTIES_NO_PAGE_OWNER":"No Page Owner","I_PAGE_PROPERTIES_PAGE_WIDTH_MODE_FIXED":"Fixed width","I_COLUMN_CONF_ALLCOLUMN_FOR":"Settings for all columns:","I_ACL_PERMISSION_EDIT":"Edit","I_COMMON_ACTION_LOGIN_ALT":"Log In","I_COLUMN_CONF_MOVEWIDGET_SELECTED_ROW_INFO_1":"Row ${0} is selected.","I_PAGE_PROPERTIES_AUTO_WIRING":"Automatic Wiring","I_SPACE_MANAGER_SPACE_INFO_NO_OWNER":"No Owner.","E_SPACE_MANAGER_LIST_HUB_PAGES_FAILED":"Failed to load pages in catalog, please try again.","I_SPACE_MANAGER_ACTIONS":"Actions","W_NO_PAGE_TO_SHOW":"No pages currently exist. \n Either create a new mashup page and add it to your navigation, or add a new or existing page to your space. Spaces must contain at least one page.","I_PUBLISH_PAGE_LABEL_VERSION":"Version:","I_COLUMN_CONF_WIDGET_APPLY_SKIN_ALL":"Apply to future and all existing widgets","I_ACL_INSUFFICIENT_PERMISSION":"You do not have sufficient access rights (delegate) on the user <${0}> to share this page.","I_ACCOUNT_SETTINGS_LOGIN_LAST_PAGE":"The last page I visited.","EDIT_SPACE_PROPERTIES":"Edit Settings: ${0}","I_FREEFORM_CONF_PAGE_BACKGROUND":"Page Background","I_FREEFORM_CONF_MORE":"More Options...","I_FREEFORM_CONF_PAGE_BG_NONE":"None","I_PUBLISH_SPACE_LABEL_PERMISSION_PRIVATE":"Private(Space is invisible to all other users)","I_AUTO_WIRING_NOTIFICATION_SENDING_TO":"Sending to ${0}","I_EMBED_PREVIEW_BYDEFAULT":"Always open preview by default.","I_PUBLISH_PAGE_LABEL_PERMISSION_PRIVATE":"Private (Page displays in the catalog for you only)","I_EMBED_PREVIEW_CLOSE":"Close Preview","I_SPACE_MANAGER_SPACE_INFO":"Owned by ${0} | Pages : ${1}","I_WIRING_OTHER_WIDGETS_SEND":"Select another widget to receive content","I_WIRING_SEND_EVENT_DESCRIPTION":"This event send data to ${0} event(s)","I_COLUMN_CONF_WIDGET_DEFAULT_SKIN":"Default skin for new widgets","I_ACL_SEARCHSCOPE":"Show Search Scope","E_SPACE_MANAGER_PAGE_CATALOG_PAGE_REQUIRED":"You are attempting to use a page that does not exist in the catalog. Try using a different page.","I_ACL_REASSIGN_BTN":"Reassign","I_WIRING_EVENT_CONTENT_SEND":"${0} ${1} as ${2} ${3}","I_PUBLISH_PAGE_LABEL_DESC":"Description:","I_WIRING_EVENTS_RECEIVE":"Select content to receive","I_COMMON_ACTION_HELP_ALT":"Open the IBM Mashup Center wiki","I_CHANGE_PAGE_OWNER_SAME":"The same permissions as the space","I_CONTEXT_MENU_WIDGET_HEIGHT":"Widget height:","I_AUTO_WIRING_OPEN_PROPERTIES":"View and modify widget wiring.","I_COMMON_PREVIEW":"Preview","I_CREATE_SUBPAGE_IN_SPACE_TITLE":"Create a child page for: ${0}","I_EMBED_PAGE_WIDTH_INPUT_TITLE":"Set width","CREATE_SPACE_FROM_SPACE":"Duplicate an existing space","I_MODE_SELECTOR_BUTTON":"Mode Selector button","I_ACL_SEARCHINPUT":"Search Input","I_SPACE_MANAGER_RECENT_SPACES_HINT":"Displays the last five spaces you visited","I_PAGE_SOURCE_SOURCE_MODE":"Source Mode","COPY_SPACE_CAPTION":"Duplicate: ${0}","I_FREEFORM_CONF_PAGE_BG_URL":"URL","I_SEARCH_NO_RESULT_TEXT_USER":"No users were found. Try another search item.","I_WIRINGGRAPH_TITLE":"Wiring Graph","CREATE_SPACE_FROM_EMPTY":"Create an empty page","PAGE_MENU_PUBPAGE_CON_TEXT1":"The last saved version of the page will be published to the catalog.","I_PUBLISH_PAGE_EXPORTING_PAGE_1":"Exporting page via ${0}","PAGE_MENU_PUBPAGE_CON_TEXT2":"Do you want to save your changes before publishing this page?","I_ACCOUNT_SETTINGS_DISPLAY_NOTIFICATION":"Notify me when automatic wiring occurs. Notification includes a list of widgets that are wired together.","I_FREEFORM_CONF_PAGE_MARGIN":"Page Margin","I_WIRING_EVENT_TITLE_SEND":"${0} as ${1}: ${2}","I_PUBLISH_PAGE_CANCEL_LINK_TITLE":"Cancel","I_FREEFORM_CONF_RESTORE_DEFAULT_PAGE_PROPERTIES":"Restore default page properties","PAGE_MENU_PUBPAGE_CON_PWOS":"Do not save","I_PAGE_PROPERTIES_PAGE_WIDTH_MODE":"Page width","I_AUTO_WIRING_NOTIFICATION_TITLE":"Auto-Wiring Notifications","I_QUICK_WIRE_CANNOT_CREATE":"There is no proposed quick wire between widget \"${0}\" and widget \"${1}\".","I_MODE_SELECTOR_GO_EDIT":"Go to Edit","I_COLUMN_CONF_PAGE_PROPERTIES":"Page Properties","I_WIRING_OTHER_EVENTS_RECEIVE":"Select other content to receive","I_COLUMN_CONF_COLUMN_PROP_BORDER":"Border:","I_SPACE_MANAGER_PAGE_INFO":"Owned by ${0}","I_PUBLISH_SPACE_EXPORTING_SPACE_1":"Exporting space via ${0}","I_PAGE_SAVE_TITLE":"Save Page","COPY_SPACE_NAME":"Space name:","I_SPACE_MANAGER_FAVORITE_SPACES":"Favorite Spaces","I_EMBED_PAGE_SCROLL_BAR_OFF_TITLE":"Scroll bar off","I_COMMON_ACTION_LOGIN":"Log In","I_CONTEXT_MENU_WIDGET_ICONURL":"Widget Icon URL","I_ACL_DIALOG_DESC":"Search for users and groups, and then drag them from list to list to give them view and edit permissions","I_CONTEXT_MENU_WIRE":"Edit Wiring","I_PAGE_SAVE_KEEP_EDIT":"Cancel","I_IFRAME_TITLE":"iframe","I_EMBED_PAGE_PREVIEW_TITLE":"Preview for ${0}","I_SPACE_IS_HOME_SPACE":"Home Space","I_CREATE_PAGE_IN_SPACE_PAGE_DESCRIPTION":"Page description:","I_CREATE_PAGE_IN_SPACE_ADD_FROM_CATALOG":"Add a page from the catalog","I_PAGE_PROPERTIES_HINT_FOR_FLUID_MODE":"Minimum page width:","I_SYSTEM_MESSAGE_APPLY":"Apply","I_NVA_TITLE":"Hidden Widgets","I_FREEFORM_CONF_PAGE_COLOR_PICKER_COLOR_TITLE":"Red is ${0}, Green is ${1}, Blue is ${2}","I_COLUMN_CONF_PAGE_BG_IMAGE_PROP_REPEATH":"Repeat Horizontal","I_WIRING_WIDGETEVENTS_RECEIVE":"Select content to send","COPY_SPACE_HINT":"The new space will have the same share settings as the original space.","I_FREEFORM_CONF_PAGE_BG_IMAGE_TRANS":"Background Image Transparency","I_ACL_SEARCH_RESULT":"Search Results","I_FREEFORM_CONF_WIDGET_PROPERTIES":"Widget Properties","I_PUBLISH_SPACE_LABEL_PERMISSION_PUBLIC":"Public(All users can view this space)","PAGE_MENU_DELETE_MESSAGE":"Do you want to delete or remove this page and all its child pages?","I_ACL_GROUP_SEARCH":"Group Search","E_SPACE_MANAGER_PAGE_TO_COPY_REQUIRED":"You are attempting to duplicate a page that does not exist. Try duplicating a different page.","I_SPACE_MANAGER_IMPORT":"Import","EDIT_SPACE_ICON_ALT_IMAGE10":"Reviews","I_COLUMN_CONF_PAGE_BG_IMAGE_PROP_REPEATV":"Repeat Vertical","LAYOUT_BORDER_STYLE_DOTTED":"dotted","EDIT_SPACE_ICON_ALT_IMAGE11":"PDA","EDIT_SPACE_ICON_ALT_IMAGE12":"Computer","I_WIRING_PORTLETS_AND_WIDGETS":"NOTE: Wires between portlets and widgets may not function properly in a server side aggregated page.","EDIT_SPACE_ICON_ALT_IMAGE13":"Money","I_COLUMN_CONF_WIDTH_BETWEEN_COLUMN":"Width between columns","I_COLUMN_CONF_MORE":"More Options...","EDIT_SPACE_ICON_ALT_IMAGE14":"Data","EDIT_SPACE_ICON_ALT_IMAGE15":"Default","I_ACCOUNT_SETTINGS_LOGIN_TITLE":"When I login, take me to:","I_PUBLISH_SPACE_LABEL_DESC":"Description:","I_PAGE_PROPERTIES_ADVANCED":"Advanced","EDIT_SPACE_ICON_ALT_IMAGE16":"Checklist","I_CONTEXT_MENU_COLUMNWIDGET_POSITION_IN_COLUMN_LABEL":"Position in column:","I_CONTEXT_MENU_CONFIG":"Edit Settings","EDIT_SPACE_ICON_ALT_IMAGE17":"Feeds","EDIT_SPACE_ICON_ALT_IMAGE18":"Files","I_MODE_SELECTOR_GO_CATALOG_NEW_WINDOW":"Open Catalog in a New Browser","EDIT_SPACE_ICON_ALT_IMAGE19":"Global repository","I_FREEFORM_CONF_RESTORE_BUTTON":"Restore Defaults","I_COLUMN_CONF_PAGE_BORDER":"Page Border","I_COMMON_OK":"OK","I_CREATE_PAGE_IN_SPACE_FIRST_PAGE_NOTE":"Create a page for the space. In order to use this space, at least one page is required. Create a first page now.","I_SYSTEM_MESSAGE_NAME":"System Message","I_CHANGE_SPACE_OWNER_EDIT":"Edit permission on this space","I_ACL_INCLUDE_VIEWER":"Include viewers from parent","CREATE_SPACE_FROM_TEMPLATE":"Create a new space using a template","I_ACCOUNT_SETTINGS_TITLE":"My Account Settings","I_WIRING_PAYLOAD_TYPE_MATCH":"Consider payload type only for matching of sources and targets","I_WIRINGGRAPH_LINK_EXPLAIN_TEXT":"A wire exists between widget ${0} and widget ${1}.","EDIT_SPACE_ICON_ALT_IMAGE20":"Global process","EDIT_SPACE_ICON_ALT_IMAGE21":"Home","EDIT_SPACE_ICON_ALT_IMAGE22":"Graph","I_SPACE_MANAGER_FILTER_SPACES":"Filter Spaces","I_SEARCH_INPUT_VALID_ITEM":"Specify a valid search item.","I_CONTEXT_MENU_WIDGET_TOP_LABEL":"Top coordinate","EDIT_SPACE_ICON_ALT_IMAGE23":"Globe","I_CONTEXT_MENU_COLUMNWIDGET_POSITION_IN_COLUMN_PANEBOX_TITLE":"Row ${0} of column ${1}","I_PAGE_SOURCE_CONTENT_FRAME":"Content Frame","I_COLUMN_CONF_OPTIONS_FOR_NUMBER_1":"Column One","EDIT_SPACE_ICON_ALT_IMAGE24":"Human 01","I_COLUMN_CONF_OPTIONS_FOR_NUMBER_2":"Column Two","EDIT_SPACE_ICON_ALT_IMAGE25":"Human 02","I_COLUMN_CONF_OPTIONS_FOR_NUMBER_3":"Column Three","EDIT_SPACE_ICON_ALT_IMAGE26":"Human 03","I_COLUMN_CONF_OPTIONS_FOR_ALL":"All columns","I_NAVIGATION_NEW_PAGE":"Create a New Page","I_COLUMN_CONF_OPTIONS_FOR_NUMBER_4":"Column Four","I_SEARCH_TEXT":"Enter search text","EDIT_SPACE_ICON_ALT_IMAGE27":"User related","EDIT_SPACE_ICON_ALT_IMAGE28":"Inbox","I_SPACE_MANAGER_ACTION_CREATE_COPY":"Create a copy","EDIT_SPACE_ICON_ALT_IMAGE29":"Laptop","I_COLUMN_LAYOUT_NAME":"Column Layout","I_COMMON_EDITSETTING":"Edit Setting","I_COLUMN_CONF_RESTORE_DEFAULT_WIDGET_PROPERTIES":"Restore default widget properties","I_SPACE_MANAGER_RECENT_SPACES_TITLE":"Recent Spaces","I_COMMON_REMOVE":"Remove","I_SYSTEM_CONF_TITLE":"${0} Edit","I_ACL_USER_SEARCH":"User Search","I_CHANGE_PAGE_OWNER_NEW_NAME":"Name of new owner:","I_COLUMN_CONF_PAGE_BG_NONE":"None","I_SEARCH_INDICATE":"Searching...","I_AUTO_WIRING_NOTIFICATION_DISABLE_NOTI":"Do not show this notification again","I_EMBED_PAGE_TITLE":"Display on a Web Page: ${0}","EDIT_SPACE_ICON_ALT_IMAGE30":"Stats 2","I_COMMON_CANCEL":"Cancel","EDIT_SPACE_ICON_ALT_IMAGE31":"Server","EDIT_SPACE_ICON_ALT_IMAGE32":"Mail","I_CHANGE_PAGE_OWNER_SEARCH_RESULTS":"Search results:","I_PAGE_PROPERTIES_THEME":"Theme:","EDIT_SPACE_ICON_ALT_IMAGE33":"Diagram","I_SPACE_MANAGER_ACTION_ADD_PAGE":"Add a new page","EDIT_SPACE_ICON_ALT_IMAGE34":"Cart","EDIT_SPACE_ICON_ALT_IMAGE35":"Space","EDIT_SPACE_ICON_ALT_IMAGE36":"Stats","EDIT_SPACE_ICON_ALT_IMAGE37":"Tables","EDIT_SPACE_ICON_ALT_IMAGE38":"Teams","EDIT_SPACE_ICON_ALT_IMAGE39":"Tasks","I_SPACE_MANAGER_DELETE_SPACE_TITLE":"Delete: ${0}","I_COLUMN_CONF_PAGE_BG_IMAGE_TRANS":"Background Image Transparency","EDIT_SPACE_CHOOSE_THEME":"Choose a theme:","I_EMBED_PAGE_WIDTH_MODE_AUTO_TITLE":"Use auto width","I_MODE_SELECTOR_CREATE_FEED":"Create New Feed ...","I_COLUMN_CONF_PAGE_BG_IMAGE_PRO_REPEATB":"Repeat Both","I_WIDGET_BUILDER":"Widget Builder","I_WIRING_OTHER_WIDGETS_RECEIVE":"Select another widget to send content","I_EDIT_PROPERTIE_PAGE":"Edit: ${0}","I_DELETEDLG_CONFIRMDELETE_CHILD_DESC":"Delete this page and all its child pages?","I_DELETEDLG_CONFIRMDELETE":"Do you want to delete this page and all its child pages ?","I_COLUMN_CONF_PAGE_BORDER_COLOR":"Page Border Color","I_CHANGE_PAGE_OWNER_VIEW":"View permissions on this page","EDIT_SPACE_ICON_ALT_IMAGE40":"Truck","EDIT_SPACE_ICON_ALT_IMAGE41":"Business Compass","EDIT_SPACE_CHOOSE_ICON":"Choose an icon:","I_SPACE_MANAGER_YOUR_SPACES":"Your Spaces","I_CREATE_PAGE_IN_SPACE_DUPLICATE_PAGE_PAGE":"Page:","I_EMBED_PAGE_MARKUP_TEXTAREA_TITLE":"Markup","I_PAGE_SAVE_NO_SAVE":"Do not save","I_CONTEXT_MENU_MODE_HELP":"Help","I_COLUMN_CONF_PAGE_BG_IMAGE_PROP_CENTER":"Center","I_WIRING_NO_RECEIVE_EVENTS":"No action is available to receive content.","I_SEARCH_NO_RESULT_TEXT_GROUP":"No groups were found. Try another search item.","I_SPACE_PERSONAL_SPACE_PAGE_DESCRIPTION":"My Mashup Apps is your personal work zone for assembling, configuring, and wiring mashup applications. In this mode, you can create individual mashup pages, set sharing permissions, and publish those pages to the community-based catalog for others to discover and reuse. You can also reuse pages that others have shared with you and use them as building blocks in your own applications.","I_IMPORT_PAGE_TITLE":"Import Page","I_PUBLISH_SPACE_LABEL_TAG":"Tags:","I_CONTEXT_MENU_DISPLAY":"Display","PAGE_MENU_PUBPAGE_CON_SAP":"Save","EDIT_SPACE_THEME":"Theme","I_CONTEXT_MENU_WIDGET_WIDTH_TITLE":"Widget width","I_WIRINGGRAPH_BOTTOM_MESSAGE_BEFORE":"Only wires to and from ${0} are displayed.","I_FREEFORM_CONF_PAGE_BG_URL_REQUIRED":"URL Required","I_PAGE_PROPERTIES_AUTO_WIRING_TXT":"Enable automatic wiring when you want the page to wire widgets together automatically. The widget creator must have configured the widgets to accept automatic wiring. The widgets must also share a common event name and payload type.","I_PUBLISH_SPACE_LABEL_VERSION":"Version:","CREATE_SPACE_EXISTING_SPACE":"Existing space list","I_SEARCH_CATALOG":"Search the Catalog","I_CONTEXT_MENU_WIRE_GRAPH":"View Wiring Graph","I_ACCOUNT_SETTINGS_WHEN_NOTI_ENABLED":"When enabled:","I_MODE_SELECTOR_GO_SOURCE":"View Source","I_WIRING_CWIDGET_SEND":"Widget to send content","I_IMPORT_SPACE_TITLE":"Import Space","I_WIRING_PROMPTER_SEND_1":"What content do you want '${0}' to send to another widget on the page ?","I_WIRING_PROMPTER_SEND_2":"Which widget on the page do you want to receive the content '${0}' ?","I_FREEFORM_CONF_PAGE_BG_IMAGE_PROP_SCALE":"Scale","I_WIRING_PROMPTER_SEND_3":"Which action do you want to take place when '${0}' receives the content '${1}' ?","PAGE_MENU_EMBPAGE_CON_PWOS":"Do not save","I_SPACE_MANAGER_HIDDEN":"- Hidden from space manager and selector menus","E_SPACE_MANAGER_CREATE_NEW_PAGE_FAIL":"Failed to create this page. Try again.","I_PAGE_SAVE_WARNING":"The page you are leaving has unsaved changes.","I_COLUMN_CONF_COLUMN_BORDER_COLOR":"Column Border Color","I_WIRINGGRAPH_LOADING_MESSAGE":"Loading...","MESSAGE_BOX_ICON_ERROR":"error","I_WIRING_NO_MATCH_WIDGET":"A connection widget is not available.","I_SPACE_PERSONAL_SPACE":"My Mashup Apps","I_COLUMN_CONF_MOVEWIDGET_ROW_INFO_1":"Row ${0}","I_SYSTEM_MESSAGE_DONE":"Done","I_WIRING_PAYLOAD_TYPE_OR_ALIAS_MATCH":"Consider semantic types or payload type for matching of sources and targets","EDIT_SPACE_ICON":"Icon","I_SPACE_MANAGER_ALL_SPACES":"All Spaces","I_PUBLISH_PAGE_TITLE":"Publish: ${0}","I_SPACE_PORTAL":"Portal","I_COLUMN_CONF_RESTORE_TITLE":"Restore the page back to the default settings:","EDIT_SPACE_INFORMATION":"Space Information","I_EMBED_PAGE_HEIGHT_INPUT_TITLE":"Set height","I_COLUMN_CONF_PAGE_BG_IMAGE_PROP_SCALE":"Scale","I_CREATE_PAGE_IN_SPACE_EMPTY_PAGE":"Create an empty page","CREATE_SPACE_DESC":"Space description:","I_COLUMN_CONF_COLOUR":"Red is ${0}, Green is ${1}, Blue is ${2}","SWITCH_JAWS_MODE":"If JAWS didn't turn off the virtual cursor pc mode, please use Insert plus Z to change JAWS mode","I_CHANGE_PAGE_OWNER_HEADER_COMBO":"Changing page owner for ${0}'s ${1}","I_COLUMN_CONF_PAGE_BG_URL":"URL","I_WIRING_EVENT_CONTENT_RECEIVE":"${0} ${1} using ${2} ${3}","I_ACCOUNT_SETTINGS_LOGIN_PROPS":"Login Properties","I_NAVIGATION_REDIRECT_MESSAGE":"You can't visit the page, because it has been deleted or you do not have authority.","I_ACL_PERMISSION_VIEW":"View","PUBLISH_SPACE_CAPTION":"Publish as Template: ${0}","I_CONTEXT_MENU_MOVE":"Move","LAYOUT_BORDER_STYLE_NONE":"none","I_SPACE_MANAGER_NEW_PAGE":"New Page","CREATE_SPACE_CAPTION":"Create Space","I_COMMON_PUBLISH":"Publish","I_WIRING_PROMPTER_RECEIVE_1":"What content do you want ${0} to receive from another widget ?","I_SEARCH_GROUP":"Search for Group","I_WIRING_PROMPTER_RECEIVE_2":"Which widget on your page should send content to action '${0}' ?","I_WIRING_PROMPTER_RECEIVE_3":"Which action's content do you want the ${0} send to ${1} ?","I_CONTEXT_MENU_WIDGET_RIGHT_LABEL":"Right coordinate","I_COLUMN_CONF_WIDGET_PROPERTIES":"Widget Properties","I_SPACE_MANAGER_DONE":"Done","I_COLUMN_CONF_RESTORE_BUTTON":"Restore Defaults","I_CHANGE_PAGE_OWNER":"Change Page Owner","I_WIRING_RECEIVE_EVENT_DESCRIPTION":"This event receive data from ${0} event(s)","I_CONTEXT_MENU_WIDGET_TITLE":"Widget name:","I_WIRING_NAME":"Wiring","I_SKIN_WIRE_ICON_TITLE":"Wire widgets","I_ACL_INCLUDE_EDITOR":"Include editors from parent","I_DELETECONFIRM_WIDGETDELETE":"The widget you are deleting:","I_PUBLISH_PAGE_LABEL_TAG":"Tags:","I_CONTEXT_MENU_RENAME_WIDGET_BLANK_ERROR":"Widget name cannot be blank.","I_WIRING_CWIDGET_RECEIVE":"Widget to receive content","I_COLUMN_CONF_COLUMN_PROP_BG_COLOR":"Background color:","I_WIRING_MATCHING_MODE":"Matching Mode","I_SPACE_MANAGER_SAVE_SPACE_AS_TEMPLATE_OK":"Space \"${0}\" has been saved as a template.","I_EMBED_PAGE_SCROLL_BAR_ON_TITLE":"Scroll bar on","I_COLUMN_CONF_RESTORE_DEFAULT_PAGE_PROPERTIES":"Restore default page properties","I_MODE_SELECTOR_OPEN":"Open Mode Selector Menu","I_SPACE_MANAGER_COPY_OF":"Copy of ${0}","I_FREEFORM_CONF_PRO_TITLE":"Properties for Freeform Layout","I_EMBED_WIDGET_HEADERTEXT":"Add ${0} to Web page","I_CREATE_PAGE_IN_SPACE_TITLE":"Create Page","I_PUBLISH_PAGE_LABEL_SHARE_METHOD":"Sharing Method:","I_MODE_SELECTOR_GO_CATALOG":"Open Catalog in a Dialog Box","I_COMMON_CLOSE":"Close","I_FREEFORM_CONF_PAGE_COLOR":"Background Color:","I_COLUMN_CONF_WIDGET_APPLY_TOWIDGETS":"Apply to all widgets","I_FREEFORM_CONF_SKIN_SELECTED":"${0} skin is selected","I_CONTEXT_MENU_RESIZE_WIDGET_PROMPT":"Resize: ${0}","I_CHANGE_SPACE_OWNER_SEARCH_RESULTS_EMPTY":"Search result is empty.","I_ACL_DIALOG_TITLE":"Share: ${0}","I_REORDER_PAGE_DIALOG_TITLE":"Move: ${0}","I_SPACE_SELECTOR_IN_PERSONAL_SPACE":"Space selector action menu cannot be opened in personal space","I_COMMON_ACTION_HELP":"Help","I_AS_CHILD_OF_SELECTED_PAGE":"As child of the selected page","I_COMMON_RETURN":"Return","I_QUICK_WIRE_CREATED":"Widget \"${0}\", which is hidden, sends \"${1}\" to widget \"${2}\".","I_SPACE_MANAGER_DELETE_PAGE_TITLE":"Delete: ${0}","I_PUBLISH_PAGE_LABEL_TITLE":"Title:","I_EMBED_PREVIEW_FRAME":"Preview iframe","I_MODE_IS_SELECT":"is selected","MESSAGE_BOX_ICON_WARN":"warn","I_SPACE_MANAGER_NEW_SPACE":"Create Space","I_MODE_SELECTOR_GO_VIEW":"Go to View","I_CREATE_PAGE_IN_SPACE_DUPLICATE_PAGE":"Create a page by duplicating another page","I_ACL_ADD_TO_EDIT":"Add to Edit","I_FREEFORM_CONF_RESTORE_TITLE":"Restore page settings","I_TOOLBOX_CATEGORY_NAME":"Catalog","I_COLUMN_CONF_WIDGET_PROP_VMARGINS":"Vertical widget margins","I_COLUMN_CONF_RESTORE_DEFAULT_COLUMN_PROPERTIES":"Restore default column properties","I_SPACE_MANAGER_FAVORITES_QUICK_ACCESS":"Favorites Quick Access","LAYOUT_BORDER_STYLE_SOLID":"solid","I_CONTEXT_MENU_RENAME_WIDGET_PROMPT":"Rename: ${0}","E_PAGE_PROPERTIES_WRONG_PAGE_WIDTH":"The width must be between ${0} and ${1} pixels.","I_EMBED_ANON_MESSAGE":"To allow users to view this page without logging in, you must share this page with the anonymous user by selecting Share from the page menu, searching for the user anonymous, and then providing the anonymous user with view permission.","PAGE_MENU_PUBPAGE_CON_RETURN":"Cancel","I_AUTO_WIRING_NOTIFICATION_RECEIVING_FROM":"Receiving from ${0}","I_WIRING_SHOW_GRAPH":"Show Graph","I_WIRING_TEXT_AS":"as","I_PUBLISH_SPACE_LABEL_PERMISSION":"Permission:","MESSAGE_BOX_ICON_INFO":"info","CREATE_SPACE_NAME":"Space name:","I_SPACE_MANAGER_ACTION_SAVE_AS_TEMPLATE":"Save as a template","I_COLUMN_CONF_PAGE_EDGE":"Page Edge","I_TOOLBOX_NO_CHILD_IN_CATEGORY":"No widgets exist in this category. Widgets can be added from the ${0}","I_QUICK_WIRE_ALREADY_CREATED_TITLE":"Quick wire already been created","I_WIRING_ALIAS_MATCH":"Consider semantic types only for matching of sources and targets","I_ACL_CONFLICT_TITLE":"Permission Conflict","I_EMBED_PAGE_DESC":"To display this page here as well as on another Web page, copy (Ctrl-C) the markup below, and paste it (Ctrl-V) into the HTML markup of the Web page.","I_TABTHEME_SHARE":"Share","I_DELETEDLG_CONFIRMDELETE_PAGEONLY_DESC":"Delete this page only, and move its child pages to the parent of this page?","I_ACCOUNT_SETTINGS_CHANGE_AUTOWIRE_SETTINGS":"Change settings for automatic wiring","I_MOVE_THE_PAGE_TO_BE":"Move this page to be:","I_QUICK_WIRE_ALREADY_CREATED":"The proposed wire between widget \"${0}\" and widget \"${1}\" has already been created.","I_ACL_REASSIGN_NOT_CHANGE":"Do not change","EDIT_SPACE_OWNER":"Space owner:","I_QUICK_WIRE_CANNOT_CREATE_TITLE":"Can't create quick wire","I_AUTO_WIRING_INTERFACE_TIP_HIDDEN":"This hidden widget ( ${0} ) can be automatically wired with other widgets on the page. You can ${1} open the automatic wiring properties ${2} to modify this setting.","I_ACCOUNT_SETTINGS_WHEN_NOTI_DISABLED":"When disabled:","I_PAGE_PROPERTIES_ENABLE_AUTO_WIRING":"Enable automatic wiring","I_SPACE_SELECTOR_OPEN_ACTION_MENU":"Open Space Selector Action Menu","I_TOOLBOX_SAVE_PAGE_TOOLTIP":"Save this page","I_SKIN_EDIT_ICON_TITLE":"Open a menu of options","I_COLUMN_CONF_PAGE_BACKGROUND_IMAGE":"Background Image","I_PUBLISH_PAGE_LABEL_PERMISSION":"Permissions:","I_EMBED_PAGE_ON":"On","I_PAGE_PROPERTIES_PAGE_OWNER":"Page Owner","E_RENAME_NO_SCRIPT_ALLOWED":"No script code is allowed in widget name","E_SPACE_MANAGER_PAGE_NAME_REQUIRED":"Page name is required.","I_CHANGE_SPACE_OWNER_VIEW":"View permission on this space","I_COMMON_ACTION_LOGOUT_ALT":"Log out","E_CREATE_PAGE_IN_SPACE_DESCRIPTION_REQUIRED":"Page description is required.","I_PUBLISH_PAGE_LABEL_SHARE_METHOD_URL":"Publish page as URL","I_PAGE_PROPERTIES_HINT_FOR_FIXED_MODE":"Page width:","I_EMBED_PAGE_OFF":"Off","I_WIRING_OTHER_EVENTS_SEND":"Select other content to send","I_SPACE_MANAGER_LOADING":"Loading...","I_SYSTEM_MESSAGE_MSG_CODE":"Message Code: ${0}","EDIT_SPACE_ICON_ALT":"Space icon number: ${0}","I_CREATE_PAGE_IN_SPACE_PAGE_NAME":"Page name:","I_WIRING_DONE":"Done","I_WIRING_WIDGETEVENTS_SEND":"Select an action","CREATE_SPACE_MAKE_FAVORITE":"Make this space a favorite space","I_AUTO_WIRING_NOTIFICATION_TITLE_FOR_WIDGET":"Auto-Wiring Notifications for the hidden widget: ${0}","I_SPACE_MORE_SPACES":"More Spaces","I_COLUMN_CONF_INDIVIDUALCOL_FOR":"Settings for an individual column:","I_EMBED_PAGE_HEIGHT":"Height:","EDIT_SPACE_ICON_ALT_IMAGE1":"Application","EDIT_SPACE_ICON_ALT_IMAGE2":"Alerts","EDIT_SPACE_ICON_ALT_IMAGE3":"Measurements","I_PUBLISH_WARNING":"The last saved version of this page will be published to the catalog. Do you want to save your changes before publishing this page?","EDIT_SPACE_ICON_ALT_IMAGE4":"Service","I_SEARCH_TITLE":"Search","EDIT_SPACE_ICON_ALT_IMAGE5":"Business","I_ACL_REMOVE":"Remove Selected from List","EDIT_SPACE_ICON_ALT_IMAGE6":"Company","I_PUBLISH_SPACE_LABEL_TITLE":"Title:","EDIT_SPACE_ICON_ALT_IMAGE7":"Calculator","I_PUBLISH_WITHOUT_SAVING":"Do not save","EDIT_SPACE_ICON_ALT_IMAGE8":"Car","I_FREEFORM_CONF_PAGE_BG_IMAGE_PROPERTIES":"Image Properties","I_MORE_PAGE_TITLE":"More Pages","EDIT_SPACE_ICON_ALT_IMAGE9":"Clock","I_MAIN_CONTENT":"","I_WIRING_SETTINGS_DIALOG_NAME":"Settings","I_FREEFORM_CONF_RESTORE_DEFAULT_WIDGET_PROPERTIES":"Restore default widget properties","E_SPACE_MANAGER_PAGE_DESCRIPTION_REQUIRED":"Page description is required.","PAGE_MENU_EMBPAGE_CON_RETURN":"Cancel","CREATE_SPACE_CHOOSE_THEME":"Choose a theme for this space:","I_ACL_INFORMATION_1":"These people or groups currently have permissions:","I_COLUMN_CONF_WIDGET_APPLY_SKIN":"Apply to future and existing widgets using default skin","I_ACL_INFORMATION_2":"What would you like to do:","I_SPACE_MANAGER_DELETE_PAGE_PROMPT":"Would you like to delete the page \"${0}\"?","I_PAGE_ACTION_MENU":"Page Action Menu","I_EMBED_WIDGET_DESC_WITHEDITMODE":"To add this widget to a Web page, open the widget in edit mode, copy (Ctrl-C) the markup below, and then paste it (Ctrl-V) into the HTML markup of the Web page.","I_EMBED_PAGE_AUTOWIDTH":"Auto width","I_COMMON_SAVE":"Save","I_CONTEXT_MENU_RENAME_WIDGET":"Rename Widget","CREATE_SPACE_FAVORITE_LIMIT":"You have reached the limit of ${0} favorites. You must remove a favorite before adding another.","I_COLUMN_CONF_MOVEWIDGET_SELECTED_COLUMN_INFO_1":"Column ${0} is selected.","I_SPACE_MANAGE_SPACES":"Space Manager","I_COMMON_ADD":"ADD","I_CONTEXT_MENU_CUSTOMIZE_TITLE_AND_ICON":"Rename","I_COLUMN_DRAG_HANDLER":"Drag or use left or right arrow keys to resize ${0} or ${1}","I_SPACEMANAGER_SHOW_OR_HIDE":"Show or hide the children","I_COMMON_ACTION_SETTINGS":"Settings","I_COLUMN_CONF_PAGE_BG_IMAGE_PROPERTIES":"Image Properties","I_EDIT_PROPERTIES_SETTINGS":"Settings","I_CHANGE_PAGE_OWNER_NOTE":"If you select to keep the same permissions as the parent page or space, this page may disappear from your view if you do not have view permissions for that parent page or space. \n If you select to have view permissions only, you will not be able to edit or modify permissions for the page, unless you are the owner of the space that contains the page.","I_CONTEXT_MENU_MODE":"Widget Actions","I_SPACE_MANAGER_IMPORT_SPACE":"Import Space","E_PUBLISH_PAGE_PUBLISH_FAILED_MSG_0":"An error occurred when publishing this page or space to the catalog. Ask your system administrator to check the log file on the server for configuration errors.","CREATE_SPACE_BLANK":"Create a blank space","I_COLUMN_CONF_COLUMN_NUMBER":"Number of columns","I_COLUMN_CONF_WIDGET_PROP_HMARGINS":"Horizontal widget margins","I_SYSTEM_MESSAGE_CLEAR":"Clear","I_WIRING_TITLE_RECEIVE":"Receive","I_SPACE_SELECTOR_ACTION_MENU_BUTTON":"Space Selector Action Menu Button","I_FREEFORM_CONF_PAGE_BG_IMAGE_PRO_REPEATB":"Repeat Both","I_EMBED_PAGE_WIDTH_MODE_PIXEL_TITLE":"Use width pixel","I_COLUMN_CONF_PAGE_MARGIN":"Page Margin","I_SPACE_MANAGER_NO_DESCRIPTION":"No description","I_WIRING_NO_SEND_EVENTS":"No action is available to send content.","I_FREEFORM_LAYOUT_NAME":"FreeForm Layout","I_COLUMN_CONF_PAGEBGIMAGEURL_INPUT":"Type the URL of the background image","I_COLUMN_CONF_COLUMN_PROPERTIES":"Column Properties","I_FREEFORM_CONF_LESS":"Fewer Options...","I_WIRING_TEXT_USING":"using","I_ACL_INFORMATION_HAS":"${0} ${2} has ${3} ${1}","I_ABOVE_THE_SELECTED_PAGE":"Above the selected page","I_SPACE_MANAGER_NO_SPACES_FOUND":"No spaces found.","I_CONTEXT_MENU_WIDGET_INPUT_INVALIDMESSAGE":"Numbers only.","I_FREEFORM_CONF_PAGE_BG_IMAGE_PROP_CENTER":"Center","I_CONTEXT_MENU_COLUMNWIDGET_COLUMN_LABEL":"Column:","I_CONTEXT_MENU_COLUMNWIDGET_COLUMN_PANEBOX_TITLE":"Column ${0}","I_PAGE_SOURCE_EDIT_MODE":"Edit Mode","I_CHANGE_SPACE_OWNER_NONE":"No permission on this space","E_CREATE_PAGE_IN_SPACE_NAME_REQUIRED":"Page name is required.","I_WIRING_WIDGETS_SEND":"Select a widget to receive content","I_FREEFORM_CONF_PAGE_BORDER_COLOR":"Page Border Color","I_PUBLISH_PAGE_LABEL_SHARE_METHOD_UPLOAD":"Publish page definition and artifacts","E_PUBLISH_PAGE_REQUIRED_FIELDS_EMPTY_0":"Title and Version are required fields","I_CREATE_PAGE_IN_SPACE_DUPLICATE_PAGE_SPACE":"Space:","I_PAGE_SAVE_SUGGEST":"What would you like to do:","I_EMBED_PAGE_WIDTH":"Width:","I_EMBED_PAGE_UNIT":"px","I_EDIT_PROPERTIE_ACCOUNT":"My Account Settings","I_PUBLISH_PUBLISHING":"Publishing...","THEMES_DEFAULT_COLUMN_THEME":"Default Column Theme","I_PAGE_SAVE_WARNING2":"You need to save the current page before performing this action.","I_PAGE_PROPERTIES_DISABLE_AUTO_WIRING":"Disable automatic wiring","I_PAGE_SAVE_WARNING3":"You have unsaved widgets on the page.","LAYOUT_BORDER_STYLE_DOUBLE":"double","I_SPACE_CREATE_NEW_SPACE":"Create a New Space...","I_SPACE_MANAGER_NO_TITLE":"Untitled","I_COLUMN_CONF_PAGE_BG_URL_REQUIRED":"URL Required","I_ACCOUNT_SETTINGS_LOGIN_HOME_SPACE":"My home space.","I_QUICK_WIRE_CREATED_TITLE":"Quick wire created","E_PUBLISH_SPACE_REQUIRED_FIELDS_EMPTY_0":"Title, Description, and Version are required fields","I_WIRING_EVENT_TITLE_RECEIVE":"${0} using ${1}: ${2}","I_CONTEXT_MENU_MOVE_WIDGET_PROMPT":"Move: ${0}","I_DELETECONFIRM_SENDCONTENT":"Sends content to:","I_ACCOUNT_SETTINGS_NOTIFY_ME":"Notify me when widgets on my current mashup page support the automatic wiring feature. Notification includes a list of widgets that can be automatically wired.","I_SPACE_PERSONAL_SPACE_PAGE_TITLE":"My Page","I_TABTHEME_SHARE_ALT":"Share actions","I_CHANGE_PAGE_OWNER_OWNERSHIP_TYPE":"After transferring ownership, I will have:","I_WIRING_EVENTS_SEND":"Select content to send","I_TOOLBOX_ADD_WIDGET_TOOLTIP":"Open the catalog in a new browser","I_SYSTEM_MODE_TITLE":"${1} ${0}","I_ACL_ADD_TO_PERSONALIZE":"Add to Personalize","EDIT_NO_SPACE_OWNER":"No Space Owner","I_TOOLBOX_NVA_TOOLTIP":"View hidden widgets","I_COMMON_DELETE":"Delete","I_COLUMN_CONF_ICON_HOVERTEXT":"Configure the page layout","I_FREEFORM_CONF_PAGE_BG_IMAGE_PROP_REPEATH":"Repeat Horizontal","I_COMMON_ACTION_SETTINGS_ALT":"Open Account Settings","I_CONTEXT_MENU_WIDGET_INPUT_TITLE1":"Enter the widget's left coordinate.","I_CONTEXT_MENU_WIDGET_INPUT_TITLE2":"Enter the widget's top coordinate.","I_TOOLBOX_NVA_DND_TOOLTIP":"Hide widget","I_ACCOUNT_SETTINGS_NOTIFICATIONS":"Automatic Wiring Notifications","I_WIRINGGRAPH_NO_WIRING":"No wiring connected.","I_MORE_PAGE_FROM_WHO":"${1} from ${0}","I_FREEFORM_CONF_PAGE_BG_IMAGE_PROP_REPEATV":"Repeat Vertical","I_WIRING_TITLE_SEND":"Send","I_CONTEXT_MENU_WIDGET_LEFT_LABEL":"Left coordinate","COPY_SPACE_COPY_OF":"Copy of ${0}","I_DELETECONFIRM_RECCONTENT":"Receives content from:","I_MODE_SELECTOR_GO_SHARE":"View More Pages","I_SPACE_MANAGER_DELETE_SPACE_PROMPT":"Would you like to delete the space \"${0}\" and all of its pages?","I_FREEFORM_CONF_PAGE_PROPERTIES":"Page Properties","I_FREEFORM_CONF_PAGE_EDGE":"Page Edge","I_SEARCH_USER":"Search for User","I_BROWSER_TITLE":"IBM Mashup Center","I_MORE_PAGE_DESC":"Page authors have shared these pages with you. To accept a page into your navigation, click Add.","I_AUTO_WIRING_NOTIFICATION_OPEN_WIRE_INTERFACE":"Open the wiring interface","I_WIRING_PROMPTER_STEP_1":"Step 1","I_PAGE_SOURCE_TITLE":"Page Source","I_WIRING_PROMPTER_STEP_2":"Step 2","THEMES_TAB_THEME":"Tab Theme","I_WIRING_PROMPTER_STEP_3":"Step 3","I_DELETECONFIRM_KEEPORDELETE":"Do you want to keep or delete the widget","I_EMBED_PAGE_UPDATEMARKUP":"Refresh Markup","I_PAGE_PROPERTIES_TITLE":"Properties for ${0}","I_NAVIGATION_REDIRECT_TITLE":"You have been redirected","I_SPACE_MANAGER_FILTER_SPACES_TITLE":"input condition here to filter spaces","EDIT_SPACE_CHANGEOWNER":"Change","I_FREEFORM_CONF_ICON_HOVERTEXT":"Click to configure the page layout","I_COLUMN_CONF_PRO_TITLE":"Properties for Column Layout","I_COLUMN_CONF_LESS":"Fewer Options...","I_PAGE_PROPERTIES_GENERAL_PROPERTIES":"General Properties","CHANGE_SPACE_OWNER_CAPTION":"Change Owner","I_HTMLFRAGMENT_CANTLOAD_URL":"Cannot load Web content from the URL you specified.","I_BELOW_THE_SELECTED_PAGE":"Below the selected page","I_EMBED_WIDGET_DESC_NOEDITMODE":"To add this widget to a Web page, copy (Ctrl-C) the markup below, and then paste it (Ctrl-V) into the HTML markup of the Web page.","I_FREEFORM_CONF_PAGE_BORDER":"Page Border","I_HTMLFRAGMENT_ERROR_INVALID_URL":"The URL you specified is invalid. Are you sure you want to use it?","I_EMBED_DIALOG_TITLE":"Embedding","I_PAGE_PROPERTIES_THEME_MSG":"This action will save the current state of your page with the selected theme.","PAGE_MENU_EMBPAGE_CON_TEXT1":"The last saved version of your page will display in the embedded page.","I_PUBLISH_PAGE_LABEL_PERMISSION_PUBLIC":"Public (Page displays in the catalog for all users)","PAGE_MENU_EMBPAGE_CON_TEXT2":"Do you want to save your changes?","CHANGE_SPACE_OWNERNAME":"Owner name:","I_COMMON_ACTION_LOGOUT":"Log out","I_COLUMN_RESIZER":"Resize bar","E_PUBLISH_PAGE_PUBLISH_FAILED_2":"Failed to publish page. ${0} Server response: ${1}","I_CHANGE_PAGE_OWNER_EDIT":"Edit permissions on this page","I_IMPORT_WIDGET_PROMPT":"Select a file to import:","I_WIRING_SWITCH_TO_TARGET_PAGE":"Switch page","THEMES_DEFAULT_THEME":"Default Theme","I_PAGE_PROPERTIES_PAGE_WIDTH_MODE_FLUID":"Fluid width","I_CATALOG_PANE_TITLE":"Catalog","I_AUTO_WIRING_INTERFACE_TIP":"This widget ( ${0} ) can be automatically wired with other widgets on the page. You can ${1} open the automatic wiring properties ${2} to modify this setting.","I_WIRING_TEXT_FROM":"from","I_EMBED_PAGE_SCROLLS":"Scroll bars:","I_WIRINGGRAPH_BOTTOM_MESSAGE_AFTER":"are displayed.","I_ACL_ADD_TO_VIEW":"Add to View","I_FREEFORM_CONF_WIDGET_DEFAULT_SKIN":"Default skin","I_SPACE_MANAGER_SAVE_SPACE_AS_TEMPLATE_FAILED":"Failed to save space \"${0}\" as a template.","I_CONTEXT_MENU_WIDGET_WIDTH":"Widget width:","I_CONTEXT_MENU_MODE_PRINT":"Print","I_CONTEXT_MENU_SKIN":"Select Skin","I_WIRING_WIDGETS_RECEIVE":"Select a widget to send content","I_FREEFORM_CONF_PAGE_BACKGROUND_IMAGE":"Background Image","I_ACCOUNT_SETTINGS_DEFAULT_INFO":"Automatic wiring is disabled by default. To enable it, go to the Advanced section of the Page Settings dialog box.","I_SPACE_MANAGER_PAGES_NUM_COUNTING":"Counting...","I_PAGE_PROPERTIES_PAGE_TITLE":"Page name:","THEMES_TAB_COLUMN_THEME":"Tab Column Theme","I_CONTEXT_MENU_HIDE":"Hide","I_CONTEXT_MENU_WIDGET_HEIGHT_TITLE":"Widget height","E_PUBLISH_SPACE_PUBLISH_FAILED_2":"Failed to publish space. ${0} Server response: ${1}","I_ACL_SHARESPACE_DIALOG_TITLE":"Share: ${0}","PAGE_MENU_EMBPAGE_CON_SAP":"Save","I_COLUMN_CONF_MOVEWIDGET_INFO":"To move this widget, select the column and the position within the column.","I_COLUMN_CONF_PAGE_BACKGROUND_COLOR":"Background color:","I_MODE_SELECTOR_CREATE_FEEDMASHUP":"Create Feed Mashup ...","COPY_SPACE_DESC":"Space description:","I_PAGE_SAVE_SUGGEST2":"Save or discard the changes before leaving the page."}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.provide("com.ibm.mm.builder");if(!dojo._hasResource["com.ibm.mashups.enabler.space.Factory"]){dojo._hasResource["com.ibm.mashups.enabler.space.Factory"]=true;dojo.provide("com.ibm.mashups.enabler.space.Factory");com.ibm.mashups.enabler.space.Factory={getSpaceExtensionModel:function(){return null;},getSpaceModel:function(){return {create:function(){return null;},commit:function(){return {start:function(){return null;},setFinishedCallback:function(){}};},confirmExport:function(){return false;},confirmCopy:function(){return false;},getSubmittableImportForm:function(){return null;},confirmCreate:function(){return false;},insert:function(){},confirmInsert:function(){return false;},remove:function(){},confirmRemove:function(){return false;},iterator:function(){return null;},setStrategy:function(){},getStrategies:function(){return null;},getStrategy:function(){return null;},addStrategy:function(){},removeStrategy:function(){},find:function(){return {start:function(){return null;},setFinishedCallback:function(){}};},invalidate:function(){},getSubmittableForm:function(){return null;},findSpaceByNavigation:function(){return {start:function(){return null;},setFinishedCallback:function(){}};},findFavorites:function(){return {start:function(){return null;},setFinishedCallback:function(){}};}};}};}if(!dojo._hasResource["com.ibm.mm.builder.builderpre"]){dojo._hasResource["com.ibm.mm.builder.builderpre"]=true;dojo.i18n._preloadLocalizations("com.ibm.mm.builder.nls.mmbuilder_portal",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);dojo.provide("com.ibm.mm.builder.builderpre");builderConfig={};(function(){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);builderConfig.productName=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PRODUCT_NAME);builderConfig.enablerPath=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_ENABLER);builderConfig.builderPath=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_BUILDER);builderConfig.locale=cs.getValue("locale");builderConfig.isBidi=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CLIENT_IS_BIDI);builderConfig.hasHub=false;var _1=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.HUB_URL);if(_1&&(dojo.trim(_1)!="")){builderConfig.hasHub=true;}builderConfig.pageAutoWiringDefault=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.AUTO_WIRING_DEFAULT_ENABLED);builderConfig.sandboxDisabled=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.WIDGETDEFID_SANDBOX_DISABLED);builderConfig.createSpaceOnTemplateMode=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CREATE_SPACE_TEMPLATE_MODE);builderConfig.favoriteSpacesMaximumNumber=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.FAVORITE_SPACES_MAXIMUM_NUMBER);builderConfig.recentSpacesMaximumNumber=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.RECENT_SPACES_MAXIMUM_NUMBER);builderConfig.spaceTemplateQueryCount=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SPACEMANAGER_SPACE_QUERYCOUNT);builderConfig.spaceTemplateQueryKeyword=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SPACEMANAGER_SPACE_QUERYKEYWORD);builderConfig.pageQueryCount=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SPACEMANAGER_PAGE_QUERYCOUNT);builderConfig.pageQueryKeyword=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SPACEMANAGER_PAGE_QUERYKEYWORD);})();dojo.declare("com.ibm.mm.builder.builderpre",null,{});try{com.ibm.mm.builder.coreWidgetsMessages=dojo.i18n.getLocalization("com.ibm.mm.builder","coreWidgetsMessages");com.ibm.mm.builder.coreWidgetsStrings=dojo.i18n.getLocalization("com.ibm.mm.builder","coreWidgetsStr");}catch(e){com.ibm.mm.builder.coreWidgetsMessages=dojo.i18n.getLocalization("com.ibm.mm.builder","coreWidgetsMessages",ibmConfig["default.locale"]);com.ibm.mm.builder.coreWidgetsStrings=dojo.i18n.getLocalization("com.ibm.mm.builder","coreWidgetsStr",ibmConfig["default.locale"]);}}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.SystemWidget"]){dojo._hasResource["com.ibm.mm.builder.iwidget.SystemWidget"]=true;dojo.provide("com.ibm.mm.builder.iwidget.SystemWidget");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.mm.builder.iwidget.SystemWidget",null,{cws:com.ibm.mm.builder.coreWidgetsStrings,cwm:com.ibm.mm.builder.coreWidgetsMessages,eventService:com.ibm.mashups.services.ServiceManager.getService("eventService"),LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass),onPageModeChanged:function(_2){var pl=_2.payload;if(!pl||pl.length<2){return;}var _3="on"+pl.charAt(0).toUpperCase()+pl.substring(1).toLowerCase();if(this[_3]){this[_3]();}},getViewRootNode:function(){return this._getModeRootNode("view");},_getModeRootNode:function(_4){var _5=dojo.query("> .iw-Content."+_4,this.iContext.getRootElement())[0];if(!_5){_5=dojo.query("> .mm_Content."+_4,this.iContext.getRootElement())[0];}return _5;}});dojo.declare("com.ibm.mm.builder.iwidget.SystemTemplatedWidget",com.ibm.mm.builder.iwidget.SystemWidget,{onView:function(){this._loadMode("View");},onEdit:function(){this._loadMode("Edit");},_loadMode:function(_6){if(this[_6+"IsLoaded"]){return;}var _7={};for(var _8 in this){if(typeof this[_8]=="function"&&!(_8 in this.constructor.superclass)){_7[_8]=dojo.hitch(this,this[_8]);}}var _9=this["get"+_6+"RootNode"]();var _a=dojo.isIE?com.ibm.mm.builder.utils.htmlUtil.addMissingQuoteInTitle(_9.innerHTML):_9.innerHTML;var _b=new com.ibm.mm.builder.iwidget.TemplatedWidget(dojo.mixin({templateString:_a},_7));var _c={};for(var nn in _b){if(Object.prototype.hasOwnProperty.call(_b,nn)){var rr=_b[nn];if((rr&&rr.nodeType==1&&nn!=="domNode")||rr instanceof dijit._Widget){_c[nn]=rr;}}}dojo.mixin(this,_c);_9.innerHTML="";_9.appendChild(_b.domNode);this[_6+"IsLoaded"]=true;}});dojo.declare("com.ibm.mm.builder.iwidget.TemplatedWidget",[dijit._Widget,dijit._Templated],{widgetsInTemplate:true,postMixInProperties:function(){var t=this.templateString;if(t){this.templateString=dojo.string.substitute(t,com.ibm.mm.builder.coreWidgetsStrings,function(v,k){return v||"$ {"+k+"}";});}}});}if(!dojo._hasResource["com.ibm.mm.builder.eventTopics"]){dojo._hasResource["com.ibm.mm.builder.eventTopics"]=true;dojo.provide("com.ibm.mm.builder.eventTopics");com.ibm.mm.builder.eventTopics={Hidden_Widgets_Correl_Display:"/builder/hwc/display",Page_ModeChanged:"/builder/changeMode",Page_ContentChanged:"pageChanged",Page_OnChanged:"onChangeMode",Page_Save:"/builder/page/save",Update_Page_With_Default_Content:"/builder/page/update",Page_OnSave:"/builder/pageSaved",Goto_Catalog:"/builder/goto/catalog",Open_Catalog:"/builder/open/catalog",Open_Catalog_New_Window:"/builder/open/catalog_new_window",WirePane_OverWidget:"wirePane/moveOverWidget",WirePane_OutWidget:"wirePane/moveOutWidget",Banner_BackgroundChanged:"/builder/backgroundChanged",Banner_BackgroundChangedBack:"/builder/backgroundChangedBack",Widget_ConfigurationFinished:"/widget/action/finished",Widget_Hide:"/widget/action/hide",Widget_Create:"/widget/action/create",Widget_Column_AddOrDel:"/widget/column/addOrDel",Resize_StartSizing:"/startSizing",Resize_StartHeightSizing:"/startHeightSizing",Resize_ChangeSizing:"/changeSizing",Resize_ChangeHeightSizing:"/changeHeightSizing",Resize_EndSizing:"/endSizing",Resize_EndHeightSizing:"/endHeightSizing",Save_Icon_Change:"/saveIconChange",WidgetMenu_Hide:"/widgetMenu/action/hide",UpdateViewPageControl:"/ACL/pageControl/view",UpdatePersonalizePageControl:"/ACL/pageControl/personalize",UpdateEditPageControl:"/ACL/pageControl/edit",UpdateSearchPageControl:"/ACL/pageControl/search",UpdateAllPageControl:"/ACL/pageControl/all",AclDialogHide:"/ACL/dialogHide",Publish_Page_Show:"/publish/page/show",Publish_Page_Hide:"/publish/page/hide",FreeForm_Layout_Loaded:"/freeformlayout/loaded"};com.ibm.mm.builder.Topics=com.ibm.mm.builder.eventTopics;}if(!dojo._hasResource["com.ibm.mm.builder.constant"]){dojo._hasResource["com.ibm.mm.builder.constant"]=true;dojo.provide("com.ibm.mm.builder.constant");com.ibm.mm.builder.constant={appURL:"http://localhost:8080",enablerModelIdPrefix:"id:",iwIWidget:"iw-iWidget",iWStandalone:"iw-Standalone",mmIWidget:"mm_iWidget",iwOAGadget:"iw-OAGadget",mmOAGadget:"mm_OAGadget",iwGGadget:"iw-OSGadget",mmGGadget:"mm_OSGadget",osGadgetChrome:"gadgets-gadget-chrome",osGadgetUserPrefs:"gadgets-gadget-user-prefs-dialog",osGadgetContent:"gadgets-gadget-content",iwDefinition:"iw-Definition",mmDefinition:"mm_Definition",iwItemSet:"iw-ItemSet",mmItemSet:"mm_ItemSet",iwItem:"iw-Item",mmItem:"mm_Item",generic_widget_icon:"/wps/mccbuilder.v3001/images/generic_widget_icon.gif",skinIdPrefix:"mm_ibm_skin_",skinClass:"iWidgetSkin",dragHandler:"_dragHandler",resizeHandler:"_resizer",resizeHandlerExt:"_res",resizeHeightExt:"_heightRes",widgetBody:"_widgetBody",widgetContent:"_content",menuHandler:"_menu",iWidgetContent:"mm_Content",iwWidgetContent:"iw-Content",iWidgetLoading:"mm_loading",iwWidgetLoading:"iw-loading",handledEvents:"mm_handledEvents",event:"mm_event",publishedEvents:"mm_publishedEvents",iwReceivedEvent:"iw-ReceivedEvent",receivedEvent:"mm_ReceivedEvent",iwEvent:"iw-Event",mmEvent:"mm_Event",sourceWidget:"mm_SourceWidget",mmSourceEventName:"mm_SourceEventName",mmTargetEventName:"mm_TargetEventName",iwSourceEvent:"iw-SourceEvent",iwTargetEvent:"iw-TargetEvent",sourceEvent:"mm_SourceEvent",targetEvent:"mm_TargetEvent",itemSet:"mm_itemSet",item:"mm_item",itemName:"mm_itemName",itemValue:"mm_itemValue",configPannelNode:"configPannelNode",widget_span_attr_class:"class",widget_span_attr_widget:"widget",widget_span_attr_style:"style",widget_span_attr_onNewWire:"onnewwire",widget_span_attr_id:"id",widget_span_attr_visible:"visible",widget_span_attr_skin:"skin",nva_skin_upper:"_upper",no_page_message:"No page to show. Please use navigation widget to create a new page.",aclIdPrefix:"_acl",editbarDragHandler:"_dragHandler_editbar",freeformLayoutClass:"freednd",columnLayoutClass:"fixeddnd",HWCClass:"nva",toolboxClass:"toolbox",nvaSkinName:"nva",layoutWidgetItemSet:"LayoutWidgetAttributes",autoWiringEnabled:"com.ibm.mashups.builder.autoWiringEnabled",dbcsEnlarged:"dbcsEnlarged",NavigationPageSize:20,ToolboxPageSize:20,editBarHeight:35,intervalToKeepSessionAlive:5*60*1000,defaultWidgetWidth:400,cookieKey_previous_pid:"digest.ignore.previous_pid",cookieKey_globalPageId:"digest.ignore.global_page_id",cookieKey_globalPageOpenedSpaceId:"digest.ignore.global_page_id_openedSpace",cookieKey_login_flag:"MUMLoginFlag"};}if(!dojo._hasResource["com.ibm.mashups.builder.IEvent"]){dojo._hasResource["com.ibm.mashups.builder.IEvent"]=true;dojo.provide("com.ibm.mashups.builder.IEvent");dojo.declare("com.ibm.mashups.builder.IEvent",null,{SWITCH_PAGE:"com.ibm.mashups.builder.switchPage",PAGE_SWITCHED:"com.ibm.mashups.builder.pageSwitched",SWITCH_SPACE:"com.ibm.mashups.builder.switchSpace",REFRESH_SPACE_SELECTOR:"com.ibm.mashups.builder.refreshSpaceSelector",REFRESH_SPACE_LIST_IN_SPACE_MANAGER:"com.ibm.mashups.builder.spacemanager.refreshSpaceList",REFRESH_NAVIGATION:"com.ibm.mashups.builder.refreshNavigation",REFRESH_PALETTE:"com.ibm.mashups.builder.refreshPalette",LAYOUT_REFRESH:"com.ibm.mashups.builder.layoutRefresh",LAYOUT_REFRESHED:"com.ibm.mashups.builder.layoutRefreshed",REFRESH_CONTEXT_MENU:"com.ibm.mashups.builder.refreshContextMenu",VIEW_HIDDEN_WIDGETS:"com.ibm.mashups.builder.viewHiddenWidgets",HIDE_HIDDEN_WIDGETS:"com.ibm.mashups.builder.hideHiddenWidgets",CHANGE_PAGE_MODE:"com.ibm.mashups.builder.changePageMode",ADD_WIDGET_FROM_TOOLBOX:"com.ibm.mashups.builder.addWidgetFromToolbox",ADD_WIDGET:"com.ibm.mashups.builder.addWidget",RESET_STYLE:"com.ibm.mashups.builder.resetStyle",DISPLAY_WIDGET:"com.ibm.mashups.builder.displayWidget",HIDE_WIDGET:"com.ibm.mashups.builder.hideWidget",RENAME_WIDGET:"com.ibm.mashups.builder.renameWidget",RENAME_ACTION:"com.ibm.mashups.builder.renameAction",MOVE_ACTION:"com.ibm.mashups.builder.moveAction",RESIZE_ACTION:"com.ibm.mashups.builder.resizeAction",CHANGE_SKIN:"com.ibm.mashups.builder.changeSkin",SKIN_LOADED:"com.ibm.mashups.builder.skinLoaded",RESIZE_WIDGET:"com.ibm.mashups.builder.resizeWidget",WIDGET_RESIZED:"com.ibm.mashups.builder.widgetResized",WIDGET_MOVED:"com.ibm.mashups.builder.widgetMoved",WIDGET_DELETED:"com.ibm.mashups.builder.widgetDeleted",EMBED_PAGE:"com.ibm.mashups.builder.embedPage",EMBED_WIDGET:"com.ibm.mashups.builder.embedWidget",LOAD_PAGESOURCE:"com.ibm.mashups.builder.loadPageSource",SAVE_PAGE:"com.ibm.mashups.builder.savePage",PAGE_SAVED:"com.ibm.mashups.builder.pageSaved",EDIT_PAGE:"com.ibm.mashups.builder.editPage",UPDATE_PAGE_TITLE:"com.ibm.mashups.builder.updatePageTitle",HIGHLIGHT_WIDGET:"com.ibm.mashups.builder.highlightWidget",REMOVE_WIDGET_HIGHTLIGHT:"com.ibm.mashups.builder.removeWidgetHighlight",ADD_NEW_WIRE:"com.ibm.mashups.builder.addNewWire",REMOVE_WIRE:"com.ibm.mashups.builder.removeWire",CREATE_AUTO_WIRE:"com.ibm.mashups.builder.createAutoWire",AUTO_WIRE_CREATED:"com.ibm.mashups.builder.autoWireCreated",CREATE_QUICK_WIRE:"com.ibm.mashups.builder.createquickWire",QUICK_WIRE_CREATED:"com.ibm.mashups.builder.quickWireCreated",EDIT_WIRE:"com.ibm.mashups.builder.editWire",DISPLAY_WIRE_GRAPH:"com.ibm.mashups.builder.displayWireGraph",SHARE_PAGE:"com.ibm.mashups.builder.sharePage",SHARE_SPACE:"com.ibm.mashups.builder.shareSpace",PUBLISH_PAGE:"com.ibm.mashups.builder.publishPage",VIEW_MORE_PAGE:"com.ibm.mashups.builder.viewMorePage",DISPLAY_IN_MASHUP_DIALOG:"com.ibm.mashups.builder.displayInMashupDialog",CLOSE_MASHUP_DIALOG:"com.ibm.mashups.builder.closeMashupDialog",STATE_CHANGED:"com.ibm.mashups.builder.stateChanged",OPEN_PAGE:"com.ibm.mashups.builder.openPage",CLOSE_PAGE:"com.ibm.mashups.builder.closePage",CREATE_PAGE:"com.ibm.mashups.builder.createPage",CREATE_SPACE:"com.ibm.mashups.builder.createSpace",EDIT_SPACE:"com.ibm.mashups.builder.editSpace",COPY_SPACE:"com.ibm.mashups.builder.copySpace",CHANGE_SPACE_OWNER:"com.ibm.mashups.builder.changeSpaceOwner",MANAGE_SPACES:"com.ibm.mashups.builder.manageSpaces"});com.ibm.mashups.builder.iEvents=new com.ibm.mashups.builder.IEvent();}if(!dojo._hasResource["com.ibm.mashups.liveTracing"]){dojo._hasResource["com.ibm.mashups.liveTracing"]=true;dojo.provide("com.ibm.mashups.liveTracing");(function(){var _d=com.ibm.mashups.liveTracing={debugCookieName:"digest.ignore.debug.mashups",_arrayToString:function(_e){var _f="";while(_e.length>0){_f+=_e.shift();if(_e.length>0){_f+="|";}}return _f;},enableDebug:function(_10){var _11=dojo.cookie(_d.debugCookieName);var _12={};if(_11){_12=dojo.fromJson(_11);}_12.enableDebug=true;if(_10){if(dojo.isString(_10)){var _13=_10.split(",");_10=this._arrayToString(_13);}else{if(dojo.isArray(_10)){_10=this._arrayToString(_10);}}_12.traceString=_10;}_11=dojo.toJson(_12);dojo.cookie(_d.debugCookieName,_11,{path:"/"});console.info("You just enabled debugging and uncompressed javascript versions. Please refresh to activate.");},disableDebug:function(){var _14=dojo.cookie(_d.debugCookieName);var _15={};if(_14){_15=dojo.fromJson(_14);}if(_15.enableDebug){delete _15.enableDebug;}if(_15.traceString){delete _15.traceString;}_14=dojo.toJson(_15);dojo.cookie(_d.debugCookieName,_14,{path:"/"});console.info("You just disabled debugging and uncompressed javascript versions. Please refresh to activate.");},clear:function(){dojo.cookie(_d.debugCookieName,null,{path:"/",expires:-1});},showEffectiveTracing:function(){alert(ibmConfig.traceConfig);},showConfiguredTracing:function(){alert(dojo.cookie(_d.debugCookieName));}};})();}if(!dojo._hasResource["com.ibm.mm.builder.DeferredImpl"]){dojo._hasResource["com.ibm.mm.builder.DeferredImpl"]=true;dojo.provide("com.ibm.mm.builder.DeferredImpl");dojo.declare("com.ibm.mm.builder.DeferredImpl",[com.ibm.mashups.enabler.Deferred],{constructor:function(_16,_17,_18){this.context=_16;this.startfn=_17;this.params=_18;},setFinishedCallback:function(_19,_1a){this.finishedCallback2=_19;this.finishedCallbackParameters2=_1a;return this;},start:function(_1b){var _1c=(_1b||typeof (_1b)=="undefined")?true:false;return dojo.hitch(this.context,this.startfn)(this,_1c,this.params);},getFinishedCallback:function(){return this.finishedCallback2;},getFinishedCallbackParameters:function(){return this.finishedCallbackParameters2;}});}if(!dojo._hasResource["com.ibm.mashups.builder.model.Page"]){dojo._hasResource["com.ibm.mashups.builder.model.Page"]=true;dojo.provide("com.ibm.mashups.builder.model.Page");dojo.declare("com.ibm.mashups.builder.model.Page",null,{isDirty:function(){return true;},setDirty:function(_1d){},getID:function(){return "";},setID:function(_1e){},getPageMode:function(){return "";},setPageMode:function(_1f){},setAutoWiringEnablement:function(_20){},getAutoWiringEnablement:function(){},isAutoWiringEnabled:function(){}});}if(!dojo._hasResource["com.ibm.mashups.builder.model.Theme"]){dojo._hasResource["com.ibm.mashups.builder.model.Theme"]=true;dojo.provide("com.ibm.mashups.builder.model.Theme");dojo.declare("com.ibm.mashups.builder.model.Theme",null,{getID:function(){return "";},setID:function(_21){},registerLayout:function(_22){},getLayouts:function(){}});}if(!dojo._hasResource["com.ibm.mashups.builder.model.ContextMenuItem"]){dojo._hasResource["com.ibm.mashups.builder.model.ContextMenuItem"]=true;dojo.provide("com.ibm.mashups.builder.model.ContextMenuItem");dojo.declare("com.ibm.mashups.builder.model.ContextMenuItem",null,{isSeparator:false,iconClass:"",description:"",title:"",localized:null,enabled:true,id:"",ordinal:0,actionCallBackFunction:null,actionCallBackFunctionName:null});}if(!dojo._hasResource["com.ibm.mashups.builder.model.ContextMenuLoader"]){dojo._hasResource["com.ibm.mashups.builder.model.ContextMenuLoader"]=true;dojo.provide("com.ibm.mashups.builder.model.ContextMenuLoader");dojo.declare("com.ibm.mashups.builder.model.ContextMenuLoader",null,{getItems:function(_23,_24,_25,_26){},onChange:function(){}});}if(!dojo._hasResource["com.ibm.mashups.builder.model.ContextMenu"]){dojo._hasResource["com.ibm.mashups.builder.model.ContextMenu"]=true;dojo.provide("com.ibm.mashups.builder.model.ContextMenu");dojo.declare("com.ibm.mashups.builder.model.ContextMenu",null,{getContextMenu:function(_27,_28,_29,_2a){return null;},getContextMenuDeferred:function(_2b,_2c,_2d,_2e){return null;},registerContextMenu:function(_2f,_30){},addContribution:function(_31,_32,_33){},removeContribution:function(_34,id){},getContributions:function(_35){},registerListener:function(_36,_37,_38){},registerListener:function(_39,_3a){},unregisterListener:function(_3b){}});}if(!dojo._hasResource["com.ibm.mashups.builder.model.Runtimemodel"]){dojo._hasResource["com.ibm.mashups.builder.model.Runtimemodel"]=true;dojo.provide("com.ibm.mashups.builder.model.Runtimemodel");dojo.declare("com.ibm.mashups.builder.model.RuntimeModel",null,{getCurrentContextMenu:function(){return new com.ibm.mashups.builder.model.ContextMenu();},getCurrentPage:function(){return new com.ibm.mashups.builder.model.Page();},getCurrentTheme:function(){return new com.ibm.mashups.builder.model.Theme();}});}if(!dojo._hasResource["com.ibm.mashups.builder.model.Factory"]){dojo._hasResource["com.ibm.mashups.builder.model.Factory"]=true;dojo.provide("com.ibm.mashups.builder.model.Factory");dojo.declare("com.ibm.mashups.builder.model.Factory",null,{getRuntimeModel:function(){return new com.ibm.mashups.builder.model.RuntimeModel();},getContextMenuModel:function(){return new com.ibm.mashups.builder.model.ContextMenu();}});}if(!dojo._hasResource["com.ibm.mashups.builder.Model"]){dojo._hasResource["com.ibm.mashups.builder.Model"]=true;dojo.provide("com.ibm.mashups.builder.Model");}if(!dojo._hasResource["com.ibm.mm.builder.model.Page"]){dojo._hasResource["com.ibm.mm.builder.model.Page"]=true;dojo.provide("com.ibm.mm.builder.model.Page");dojo.declare("com.ibm.mm.builder.model.PageImpl",[com.ibm.mashups.builder.model.Page],{dirty:false,currentPageId:null,currentPageMode:null,_isAutoWiringEnabled:builderConfig.pageAutoWiringDefault,isDirty:function(){return this.dirty;},setDirty:function(_3c){this.dirty=_3c;dojo.publish(com.ibm.mm.builder.eventTopics.Save_Icon_Change,[_3c]);},getID:function(){return this.currentPageId;},setID:function(_3d){this.currentPageId=_3d;},getPageMode:function(){return this.currentPageMode;},setPageMode:function(_3e){this.currentPageMode=_3e;},setAutoWiringEnablement:function(_3f){if(_3f!==null&&(_3f=="true"||_3f=="false"||_3f===true||_3f===false)){this._isAutoWiringEnabled=eval(_3f);}else{this._isAutoWiringEnabled=builderConfig.pageAutoWiringDefault;}},getAutoWiringEnablement:function(){var _40=com.ibm.mm.builder.utils.pageUtil.getCurrentPageNode();var _41=_40.getContent().start();var _42=_41.getMetaData(com.ibm.mm.builder.constant.autoWiringEnabled);if(_42===null){_42=builderConfig.pageAutoWiringDefault;}return (_42===true||_42==="true");},isAutoWiringEnabled:function(){return this.getAutoWiringEnablement();}});}if(!dojo._hasResource["com.ibm.mm.builder.model.Theme"]){dojo._hasResource["com.ibm.mm.builder.model.Theme"]=true;dojo.provide("com.ibm.mm.builder.model.Theme");dojo.declare("com.ibm.mm.builder.model.ThemeImpl",[com.ibm.mashups.builder.model.Theme],{currentThemeId:null,layouts:null,constructor:function(){this.layouts=[];},_hasRegister:function(_43){for(var i=0;i<this.layouts.length;i++){if(_43==this.layouts[i]){return true;}}return false;},registerLayout:function(_44){},getLayouts:function(){return this.layouts;},getID:function(){return this.currentThemeId;},setID:function(_45){this.currentThemeId=_45;}});}if(!dojo._hasResource["com.ibm.mm.builder.DelegatedDeferredImpl"]){dojo._hasResource["com.ibm.mm.builder.DelegatedDeferredImpl"]=true;dojo.provide("com.ibm.mm.builder.DelegatedDeferredImpl");dojo.declare("com.ibm.mm.builder.DelegatorDeferredImpl",com.ibm.mm.builder.DeferredImpl,{constructor:function(){this._delegates=[];this._finishedData=[];var me=this;this.finishedCallback2=function(_46,_47,_48){if(!me._restarted||!me._finished){me._finishedData=[_46,_47,_48];me._finished=true;while(me._delegates.length>0){me._fireDelegate(me._delegates.shift());}return me._finish.apply(me,arguments);}};},_finish:function(_49,_4a,_4b){if(this._hiddenCallback){return this._hiddenCallback.apply(this,arguments);}},setFinishedCallback:function(_4c,_4d){this._hiddenCallback=_4c;this.finishedCallbackParameters2=_4d;return this;},start:function(_4e){if(this._started){return;}this._started=true;return this.inherited(arguments);},_restart:function(_4f){if(_4f&&this._started&&!this._finished){this._restarted=true;this._started=false;return this.start(true);}},_fireDelegate:function(dfd){var _50=this._finishedData,cbk=dfd.getFinishedCallback(),_51=dfd.getFinishedCallbackParameters();if(cbk){return cbk(_50[0],_50[1],_51);}},addDelegate:function(dfd){this._delegates.push(dfd);dfd.delegator=this;if(this._finished){this._fireDelegate(this._delegates.shift());}return this;}});dojo.declare("com.ibm.mm.builder.DelegatedDeferredImpl",com.ibm.mm.builder.DeferredImpl,{delegator:null,setFinishedCallback:function(_52,_53){var me=this;this.finishedCallback2=function(_54,_55,_56){if(me._started){me._result=_54;return _52.apply(this,arguments);}};this.finishedCallbackParameters2=_53;return this;},start:function(_57){if(!this.delegator){return;}this._started=true;var _58=(_57||typeof (_57)==="undefined")?true:false;if(this.delegator._finished&&this.finishedCallback2){this.delegator.addDelegate(this);return this._result;}else{if(_58&&this.delegator._started&&!this.delegator._finished){return this.delegator._restart(_58);}else{if(!this.delegator._started){return this.delegator.start(_58);}}}}});}if(!dojo._hasResource["com.ibm.mm.builder.model.contextMenu.ConfigServiceXmlMenuLoader"]){dojo._hasResource["com.ibm.mm.builder.model.contextMenu.ConfigServiceXmlMenuLoader"]=true;dojo.provide("com.ibm.mm.builder.model.contextMenu.ConfigServiceXmlMenuLoader");dojo.require("dojox.xml.parser");dojo.declare("com.ibm.mm.builder.model.contextMenu.ConfigServiceXmlLocalized",com.ibm.mashups.enabler.Localized,{ns:{"cm":"http://www.ibm.com/xmlns/prod/sw/context-menu/1.0"},constructor:function(){this._data=[];},getLocales:function(){var ret=[];for(var i=0;i<this._data.length;++i){ret.push(this._data[i].locale);}return ret;},getTitle:function(_59){var def=0;for(var i=0;i<this._data.length;++i){if(this._data[i].locale.toLowerCase().replace("_","-")==_59.toLowerCase()){return this._data[i].title;}else{if(!def&&this._data[i].locale.toLowerCase().replace("_","-")==ibmConfig["default.locale"]){def=i;}}}return (this._data[def]&&this._data[def].title)?this._data[def].title:null;},getDescription:function(_5a){var def=0;for(var i=0;i<this._data.length;++i){if(this._data[i].locale.toLowerCase().replace("_","-")==_5a.toLowerCase()){return this._data[i].description;}else{if(!def&&this._data[i].locale.toLowerCase().replace("_","-")==ibmConfig["default.locale"]){def=i;}}}return (this._data[def]&&this._data[def].description)?this._data[def].description:null;},setTitles:function(_5b){var _5c=com.ibm.mashups.enabler.xml.XPath;var _5d=_5c.evaluateXPath("cm:title/cm:nls-string",_5b,this.ns);var i=_5d.length;if(i>0){while(--i>=0){var _5e=com.ibm.mm.enabler.utils.Dom.getAttributeWithNS(_5d[i],"xml:lang","lang","http://www.w3.org/XML/1998/namespace");if(_5e!==null){var _5f=_5d[i].firstChild.nodeValue;this._data.push({"locale":_5e,"title":_5f,"description":null});}}}else{_5d=_5c.evaluateXPath("cm:title",_5b,this.ns);if(_5d.length>0){this._data.push({"locale":"en","title":_5d[0].firstChild.nodeValue,"description":null});}}},setTitle:function(_60,_61){_61.replace(/-/g,"_");for(var i=0;i<this._data.length;++i){if(this._data[i].locale==_61){this._data[i].title=_60;return null;}}var _62={"locale":_61,"title":_60,"description":null};this._data.push(_62);return null;},setDescription:function(_63,_64){for(var i=0;i<this._data.length;++i){if(this._data[i].locale==_64){this._data[i].description=_63;return null;}}var _65={"locale":_64,"title":null,"description":_63};this._data.push(_65);return null;}});dojo.declare("com.ibm.mm.builder.model.contextMenu.ConfigServiceXmlMenuLoader",com.ibm.mashups.builder.model.ContextMenuLoader,{CONTEXT_MENU_PROVIDER:ibmConfig["ConfigProvider.ContextMenu_Provider"]?ibmConfig["ConfigProvider.ContextMenu_Provider"]:"ContextMenu_Provider",CONFIG_SERVICE_PROPERTY:"contextmenu.xml",ns:{"cm":"http://www.ibm.com/xmlns/prod/sw/context-menu/1.0"},constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.xmlData=null;},getItems:function(_66,_67,_68,_69){var _6a="getItems",lgr=this.LOGGER;lgr.entering(_6a,arguments);dfd=new com.ibm.mm.builder.DeferredImpl(this,function(_6b,_6c,_6d){var _6e=_6b.getFinishedCallback(),_6f=_6b.getFinishedCallbackParameters(),res;if(!this.xmlData){var dfd=this.getData().setFinishedCallback(dojo.hitch(this,function(_70,_71,_72){res=_70;if(_71==200){this.xmlData=_70;res=this._initMenuItems(_66,_67,_68,_69);}if(_6e){_6e(res,_71,_6f);}}));dfd.start(_6c);}else{res=this._initMenuItems(_66,_67,_68,_69);if(_6e){_6e(res,200,_6f);}}return res;});lgr.exiting(_6a,arguments);return dfd;},getData:function(){var _73="getData",lgr=this.LOGGER;if(!this._baseLoader){this._baseLoader=new com.ibm.mm.builder.DelegatorDeferredImpl(this,function(_74,_75,_76){var _77=_74.getFinishedCallback(),_78=_74.getFinishedCallbackParameters();lgr.trace(_73,"Start loading remote data");if(this.xmlData){lgr.trace(_73,"Data already loaded ${0}",[this.xmlData]);if(_77){_77(this.xmlData,200,_78);}}else{this._loadFromService(_75,dojo.hitch(this,function(_79,_7a,_7b){lgr.trace(_73,"Called back from service loader ${0} ${1} ${2}",[typeof (_79),_7a,_7b||""]);var res=_79;if(_7a==200){res=this.xmlData=com.ibm.mm.enabler.utils.Dom.createDocument(_79);lgr.trace(_73,"Data loaded successfully ${0}",[this.xmlData]);}if(_77){_77(res,_7a,_78);}}));}return this.xmlData;});}var dfd=new com.ibm.mm.builder.DelegatedDeferredImpl();this._baseLoader.addDelegate(dfd);return dfd;},_loadFromService:function(_7c,_7d){var _7e="_loadFromService",lgr=this.LOGGER;lgr.entering(_7e,arguments);var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var co=cs.getConfigObject(this.CONTEXT_MENU_PROVIDER);var _7f=this.CONFIG_SERVICE_PROPERTY;var _80=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_MENU_NAME);if(_80&&_80!==""){_7f=_80;}var _81=co.getValueDeferred(_7f);_81.setFinishedCallback(_7d);var res=_81.start(_7c);lgr.exiting(_7e,[res]);return res;},_initMenuItems:function(_82,_83,_84,_85){var _86="_initMenuItems",lgr=this.LOGGER;lgr.entering(_86,arguments);var ret=[];if(this.xmlData){var _87="cm:contextmenu/cm:menu[@definition=\""+_82+"\"]";var _88=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_87,this.xmlData,this.ns);var _89=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();if(_88&&_88.length>0){_87="cm:contextMenuItem";var _8a=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_87,_88[0],this.ns);if(_8a&&_8a.length>0){for(var i=0;i<_8a.length;++i){var _8b=this._getMetaData("cm:meta-data",_8a[i]);_8b=_8b.length===0?null:_8b;if(this._checkVisibility(_8a[i],_83,_84,_8b,_85)){var _8c=this._checkSeparator(_8a[i]);var _8d=this._getLocalized(_8a[i]);var _8e=_89.getTitle(_8d);var _8f=_89.getDescription(_8d);var _90=this._getIconClass(_8a[i]);var _91=this._getState(_8a[i],_83,_84,_8b,_85);var _92=this._getFunction("cm:action-handler",_8a[i]);var _93;if(_92){_93=this._buildMethod(_92,_83,_84,_8b,_85);}var _94={"isSeparator":_8c,"localized":_8d,"title":_8e,"description":_8f,"iconClass":_90===null?"":_90,"enabled":_91,"id":_8a[i].getAttribute("id"),"ordinal":_8a[i].getAttribute("ordinal"),"actionCallBackFunction":_93,"actionCallBackFunctionName":_92};ret.push(_94);}}}}}lgr.exiting(_86,[ret]);return ret;},_checkVisibility:function(_95,_96,_97,_98,_99){var _9a=true;var _9b=this._getFunction("cm:visibility-provider",_95);if(_9b){try{_9a=this._buildMethod(_9b,_96,_97,_98,_99)();if(_9a===null||_9a===""){_9a=true;}}catch(e){this.LOGGER.severe("_checkVisibility",e,_95);}}return !!_9a;},_checkSeparator:function(_9c){var _9d=_9c.getAttribute("separator");if(_9d===true||_9d=="true"){return true;}return false;},_getState:function(_9e,_9f,_a0,_a1,_a2){var _a3=true;var _a4=this._getFunction("cm:state-provider",_9e);if(_a4){try{_a3=this._buildMethod(_a4,_9f,_a0,_a1,_a2)();if(_a3===null||_a3===""){_a3=true;}}catch(e){this.LOGGER.severe("_getState",e,_9e);}}return !!_a3;},_buildMethod:function(_a5,_a6,_a7,_a8,_a9){var _aa=null;try{if(_a5.match("^"+"javascript:")=="javascript:"){if(_a9&&_a9.context){_aa=dojo.hitch(_a9.context,function(){return eval(_a5);});}else{_aa=function(){return eval(_a5);};}}else{if(_a9&&_a9.context){_aa=dojo.hitch(_a9.context,function(){return eval(_a5).call(_a9.context,_a6,_a7,_a8,_a9);});}else{_aa=function(){return eval(_a5).call(this,_a6,_a7,_a8,_a9);};}}}catch(e){this.LOGGER.severe("_buildMethod",e,_a5);_aa=function(){};}return _aa;},_getLocalized:function(_ab){var _ac=new com.ibm.mm.builder.model.contextMenu.ConfigServiceXmlLocalized();_ac.setTitles(_ab);nodes=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("cm:description",_ab,this.ns);if(nodes&&nodes.length>0){_ac.setDescription(nodes[0].firstChild.nodeValue,"en");}return _ac;},_getFunction:function(_ad,_ae){var _af=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_ad,_ae,this.ns);if(_af&&_af.length>0&&_af[0].firstChild){return _af[0].firstChild.nodeValue;}return null;},_getIconClass:function(_b0){return _b0.getAttribute("iconClass");},_getMetaData:function(_b1,_b2){var _b3=[];var _b4=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_b1,_b2,this.ns);if(_b4&&_b4.length>0){for(var i=0;i<_b4.length;++i){if(_b4[i].firstChild){var _b5={"key":_b4[i].firstChild.nodeValue,"value":_b4[i].firstChild.nodeValue};_b3.push(_b5);}}}return _b3;}});}if(!dojo._hasResource["com.ibm.mm.builder.DeferredListImpl"]){dojo._hasResource["com.ibm.mm.builder.DeferredListImpl"]=true;dojo.provide("com.ibm.mm.builder.DeferredListImpl");dojo.declare("com.ibm.mm.builder.DeferredListImpl",com.ibm.mm.builder.DeferredImpl,{constructor:function(){this._list=[];this._resultList=[];this._status=200;this._numFinished=0;},add:function(){for(var i=0;i<arguments.length;i++){var dfd=arguments[i],cbk=dfd.getFinishedCallback(),_b6=dfd.getFinishedCallbackParameters(),obj={cbk:cbk,params:_b6,dfd:dfd,result:null};dfd.setFinishedCallback(dojo.hitch(this,"_eachBack"),obj);dfd.setFinishedCallback=dojo.hitch(this,"_setOverride",obj);this._list.push(obj);}return this;},_setOverride:function(obj,_b7,_b8){obj.cbk=_b7;obj.params=_b8;return obj.dfd;},_eachBack:function(res,_b9,_ba){this._numFinished++;_ba.result=[res,_b9,_ba.params];if(_ba.cbk){_ba.cbk(res,_b9,_ba.params);}if(this._numFinished===this._list.length){this._done();}},_done:function(){var cbk=this.getFinishedCallback(),_bb=this.getFinishedCallbackParameters();this._resultList=dojo.map(this._list,function(obj){return obj.result;},this);if(cbk){cbk(this._resultList,this._status,_bb);}},start:function(_bc){if(!this._started){this._started=true;_bc=(_bc||typeof (_bc)=="undefined")?true:false;dojo.hitch(this.context,this.startfn||function(){})(this,_bc,this.params);if(this._list.length>0){dojo.forEach(this._list,function(obj){obj.dfd.start(_bc);});}else{this._done();}}return this._resultList;}});}if(!dojo._hasResource["com.ibm.mm.builder.model.ContextMenu"]){dojo._hasResource["com.ibm.mm.builder.model.ContextMenu"]=true;dojo.provide("com.ibm.mm.builder.model.ContextMenu");dojo.declare("com.ibm.mm.builder.model.ContextMenuImpl",[com.ibm.mashups.builder.model.ContextMenu],{_baseTopic:"Builder/ContextMenuImpl",configServiceLoader:new com.ibm.mm.builder.model.contextMenu.ConfigServiceXmlMenuLoader(),constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this._menus={};this._contrIdCounter=0;this.evtSvc=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");this.evtSvc.subscribeEvent("com.ibm.mashups.builder.refreshContextMenu",this,"_fireChange");},getContextMenu:function(_bd,_be,_bf,_c0){var _c1="getContextMenu",lgr=this.LOGGER;lgr.entering(_c1,arguments);dojo.deprecated("com.ibm.mashups.builder.model.ContextMenu.getContextMenu","The method com.ibm.mashups.builder.model.ContextMenu.getContextMenu is deprecated, please use com.ibm.mashups.builder.model.ContextMenu.getContextMenuDeferred instead!");var _c2=this.getContextMenuDeferred.apply(this,arguments).start();lgr.exiting(_c1,[_c2]);return _c2;},getContextMenuDeferred:function(_c3,_c4,_c5,_c6){var _c7="getContextMenuDeferred",lgr=this.LOGGER;lgr.entering(_c7,arguments);var _c8=this._getMenuDef(_c3),_c9=_c8.contributions.slice(),_ca=_c8.base||this.configServiceLoader,_cb=[_c3,_c4,_c5,_c6];var _cc=_ca.getItems.apply(_ca,_cb);var _cd=dojo.map(_c9,function(_ce){return _ce.loader.getItems.apply(_ce.loader,_cb);},this);var _cf=new com.ibm.mm.builder.DeferredListImpl(this);_cf.add(_cc).add.apply(_cf,_cd);var _d0=new com.ibm.mm.builder.DeferredImpl(this,function(_d1,_d2,_d3){var _d4=_d1.getFinishedCallback(),_d5=_d1.getFinishedCallbackParameters(),res,me=this;_cf.setFinishedCallback(function(_d6,_d7,_d8){res=me._mergingCallback.apply(me,arguments);if(_d4){_d4(res,_d7,_d5);}},{contextMenuId:_c3,contributions:_c9}).start(_d2);return res;});lgr.exiting(_c7,[_d0]);return _d0;},_mergingCallback:function(_d9,_da,_db){var _dc="_mergingCallback",lgr=this.LOGGER;lgr.entering(_dc,arguments);var _dd=[],len=_d9.length,ret;if(len>0){var _de=_d9.shift();len--;if(_de[1]==200){_dd.push(_de[0]);}else{lgr.severe(_dc,com.ibm.mm.builder.coreWidgetsMessages.E_CONTEXT_MENU_FAIL_1,[[_db.contextMenuId,_de[0],_de[1]]]);}}for(var i=0;i<len;i++){if(_d9[i][1]==200){_dd.push(_d9[i][0]);}else{_db.contributions.splice(i,1);lgr.severe(_dc,com.ibm.mm.builder.coreWidgetsMessages.E_CONTEXT_MENU_FAIL_2,[[_db.contextMenuId,_d9[i][0],_d9[i][1]]]);}}ret=this._mergeItems(_dd,_db);lgr.exiting(_dc,[ret]);return ret;},_mergeItems:function(_df,_e0){var _e1=[],i,j,k,len,_e2,_e3,_e4=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();if(_df.length>0){_e1.push.apply(_e1,_df[0]);len=_df.length;for(i=1;i<len;i++){_e1.push({__isContribution__:true,contribution:_e0.contributions[i-1],ordinal:_e0.contributions[i-1].ordinal,items:_df[i]});}_e1.sort(this._sortByOrdinal);for(j=0;j<_e1.length;j++){_e2=_e1[j];if(_e2.__isContribution__===true){_e3=_e2.items.sort(this._sortByOrdinal);for(k=0;k<_e3.length;k++){if(_e3[k].localized){if(_e3[k].title==null){_e3[k].title=_e4.getTitle(_e3[k].localized);}if(_e3[k].description==null){_e3[k].description=_e4.getDescription(_e3[k].localized);}}_e3[k].contributionId=_e2.contribution.id;_e3[k].ordinal=j+k;}_e1.splice.apply(_e1,[j,1].concat(_e3));j+=_e3.length-1;}else{_e2.ordinal=j;}}}return _e1;},_getMenuDef:function(_e5){if(!this._menus[_e5]){this._menus[_e5]={base:null,changeTimer:null,contributions:[]};}return this._menus[_e5];},_genContrId:function(_e6){return _e6+"_Contribution"+this._contrIdCounter++;},_connectListener:function(_e7,_e8,_e9){_e9.connection=dojo.connect(_e8,"onChange",this,function(){delete _e9.delegator;this._fireChange(_e7);});return _e9.connection;},registerContextMenu:function(_ea,_eb){var _ec="registerContextMenu",lgr=this.LOGGER;lgr.entering(_ec,arguments);var def=this._getMenuDef(_ea);def.base=_eb;if(_eb){this._connectListener(_ea,_eb,def);}this._fireChange(_ea);lgr.exiting(_ec,[true]);return true;},addContribution:function(_ed,_ee,_ef){var _f0="addContribution",lgr=this.LOGGER;lgr.entering(_f0,arguments);var _f1=this._getMenuDef(_ed).contributions;var id=null;if(_ee){id=this._genContrId(_ed);var _f2={loader:_ee,ordinal:_ef,id:id};_f1.push(_f2);_f1.sort(this._sortByOrdinal);this._connectListener(_ed,_ee,_f2);this._fireChange(_ed);}lgr.exiting(_f0,[id]);return id;},removeContribution:function(_f3,id){var _f4="removeContribution",lgr=this.LOGGER;lgr.entering(_f4,arguments);var _f5=this._getMenuDef(_f3).contributions,ret=null;if(id){for(var i=0;i<_f5.length;i++){if(_f5[i].id===id){ret=_f5[i].loader;if(_f5[i].connection){dojo.disconnect(_f5[i].connection);}_f5.splice(i,1);break;}}if(ret){this._fireChange(_f3);}}lgr.exiting(_f4,[ret]);return ret;},getContributions:function(_f6){var _f7="getContributions",lgr=this.LOGGER;lgr.entering(_f7,arguments);var _f8=this._getMenuDef(_f6).contributions,ret=dojo.map(_f8,function(_f9){return _f9.loader;},this);lgr.exiting(_f7,[ret]);return ret;},_sortByOrdinal:function(a,b){return (a.ordinal!=null?a.ordinal:Number.MAX_VALUE)-(b.ordinal!=null?b.ordinal:Number.MAX_VALUE);},registerListener:function(_fa,_fb,_fc){var _fd="registerListener",lgr=this.LOGGER;lgr.entering(_fd,arguments);if(arguments.length<3){_fc=_fb;_fb=dojo.global;}var ret=dojo.subscribe(this._baseTopic+"/"+_fa,_fb,_fc);lgr.exiting(_fd,[ret]);return ret;},unregisterListener:function(_fe){var _ff="unregisterListener",lgr=this.LOGGER;lgr.entering(_ff,arguments);var ret=dojo.unsubscribe(_fe);lgr.exiting(_ff,[ret]);},_fireChange:function(_100){var _101="_fireChange",lgr=this.LOGGER,me=this;lgr.trace(_101,"Queuing event to indicate context menu ${0} has been updated",[_100]);var _102=this._getMenuDef(_100);if(!_102.changeTimer){_102.changeTimer=setTimeout(function(){lgr.trace(_101,"Firing event to indicate context menu ${0} has been updated",[_100]);clearTimeout(_102.changeTimer);delete _102.changeTimer;dojo.publish(me._baseTopic+"/"+_100,[_100]);},1);}}});}if(!dojo._hasResource["com.ibm.mm.builder.model.Runtimemodel"]){dojo._hasResource["com.ibm.mm.builder.model.Runtimemodel"]=true;dojo.provide("com.ibm.mm.builder.model.Runtimemodel");dojo.declare("com.ibm.mm.builder.model.RuntimeModelImpl",[com.ibm.mashups.builder.model.RuntimeModel],{page:null,theme:null,contextMenu:null,getCurrentContextMenu:function(){if(!this.contextMenu){this.contextMenu=new com.ibm.mm.builder.model.ContextMenuImpl();}return this.contextMenu;},getCurrentPage:function(){if(!this.page){this.page=new com.ibm.mm.builder.model.PageImpl();}return this.page;},getCurrentTheme:function(){if(!this.theme){this.theme=new com.ibm.mm.builder.model.ThemeImpl();}return this.theme;}});}if(!dojo._hasResource["com.ibm.mm.builder.model.Factory"]){dojo._hasResource["com.ibm.mm.builder.model.Factory"]=true;dojo.provide("com.ibm.mm.builder.model.Factory");dojo.declare("com.ibm.mm.builder.model.FactoryImpl",[com.ibm.mashups.builder.model.Factory],{builderRuntimeModel:null,contextMenuModel:null,getRuntimeModel:function(){if(!this.builderRuntimeModel){this.builderRuntimeModel=new com.ibm.mm.builder.model.RuntimeModelImpl();}return this.builderRuntimeModel;},getContextMenuModel:function(){if(!this.contextMenuModel){this.contextMenuModel=new com.ibm.mm.builder.model.ContextMenuImpl();}return this.contextMenuModel;}});com.ibm.mashups.builder.model.Factory=new com.ibm.mm.builder.model.FactoryImpl();}if(!dojo._hasResource["com.ibm.mm.builder.Model"]){dojo._hasResource["com.ibm.mm.builder.Model"]=true;dojo.provide("com.ibm.mm.builder.Model");}if(!dojo._hasResource["com.ibm.mm.catalog.CatalogPane"]){dojo._hasResource["com.ibm.mm.catalog.CatalogPane"]=true;dojo.provide("com.ibm.mm.catalog.CatalogPane");dojo.declare("com.ibm.mm.catalog.CatalogPane",null,{constructor:function(){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.catalog.CatalogPane");this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.dlg={};},show:function(_103,_104){var _105="",_106="";try{_105=this.getCatalogURL(_103)||com.ibm.mm.catalog.hubUtil.getHubSecuredUrl();_105=this._addOpenedInSuffix(_105,_104);}catch(error){if(this.LOGGER&&this.LOGGER.isLoggable(this.LOG_LEVEL)){this.LOGGER.severe("show",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_MODE_SELECTOR_GET_CATALOG_1,[error.message]));}return;}if(_105){if(!_104){if(!this.dlg[_105]){this.dlg[_105]=com.ibm.mashups.builder.displayLMDialog(dojo.create("div"),{title:com.ibm.mm.builder.coreWidgetsStrings.I_CATALOG_PANE_TITLE,containerBackgroundColor:"white",nodeWidth:(0.9*screen.availWidth+"px"),nodeHeight:(0.8*screen.availHeight+"px"),displayCloseButton:true,closeCallback:dojo.hitch(this,function(){var _107=dojo.query("iframe",this.dlg[_105].domNode);if(_107.length>0){var _108=_107[0];this.resetSrc(_108,"javascript:false;");}})});}else{this.dlg[_105].show();}var _109=dojo.query("iframe",this.dlg[_105].domNode);if(_109.length>0){this.resetSrc(_109[0],_105);}else{dojo.query(dojo.create("iframe",{src:_105},this.dlg[_105].containerNode,"only")).style({width:"99.5%",height:"99%",border:"0 none"});}}else{var _10a=window.open(_105,"hub");if(_10a){_10a.focus();}}}},resetSrc:function(_10b,src){try{var idoc;if(dojo.isIE||dojo.isWebKit>521){idoc=_10b.contentWindow.document;}else{if(dojo.isSafari){idoc=_10b.document;}else{idoc=_10b.contentWindow;}}if(!idoc){_10b.location=src;return;}else{idoc.location.replace(src);}}catch(e){console.log("resetSrc: ",e);}},_addOpenedInSuffix:function(url,_10c){var _10d=url;if(!_10c){if(_10d.indexOf("?")!=-1){_10d=[_10d,"&"].join("");}_10d=[_10d,"openedIn=dialog"].join("");}return _10d;},getCatalogURL:function(_10e){dojo.require("dojox.encoding.base64");var _10f=([window.location.protocol,"//",window.location.host,builderConfig.enablerPath].join("")),_110=[];for(var i=0,l=_10f.length;i<l;i++){_110.push(_10f.charCodeAt(i));}var _111=dojox.encoding.base64.encode(_110);switch(_10e){case com.ibm.mm.catalog.CATALOGCREATEFEEDUI:return encodeURI([com.ibm.mm.catalog.hubUtil.getHubFeedCreationUrl(),"&serverUrl=",_111].join(""));case com.ibm.mm.catalog.CATALOGCREATEFEEDMASHUPUI:return encodeURI([com.ibm.mm.catalog.hubUtil.getHubFeedMashupCreationUrl(),"&serverUrl=",_111].join(""));case com.ibm.mm.catalog.CATALOGCREATENEWWIDGETUI:return encodeURI([com.ibm.mm.catalog.hubUtil.getHubWidgetCreationUrl(),"&serverUrl=",_111].join(""));default:var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _112=cs.getValue("anonymousUser");var _113=cs.getValue("securityOff");if(_112||_113){return encodeURI([com.ibm.mm.catalog.hubUtil.getHubAnonymousUrl(),"?serverUrl=",_111].join(""));}else{return encodeURI([com.ibm.mm.catalog.hubUtil.getHubSecuredUrl(),"?serverUrl=",_111].join(""));}}}});com.ibm.mm.catalog.CatalogPane=new com.ibm.mm.catalog.CatalogPane();com.ibm.mm.catalog.CATALOGUI=0;com.ibm.mm.catalog.CATALOGUI_NEW_WINDOW=3;com.ibm.mm.catalog.CATALOGCREATEFEEDUI=1;com.ibm.mm.catalog.CATALOGCREATEFEEDMASHUPUI=2;com.ibm.mm.catalog.CATALOGCREATENEWWIDGETUI=4;}if(!dojo._hasResource["com.ibm.mashups.builder.Api"]){dojo._hasResource["com.ibm.mashups.builder.Api"]=true;dojo.provide("com.ibm.mashups.builder.Api");com.ibm.mashups.builder.builderTopicHandlers=null;com.ibm.mashups.builder.createLMDialog=function(_114,_115){return new com.ibm.mm.builder.widget.CustomDialog(_115,_114);};com.ibm.mashups.builder.displayLMDialog=function(_116,_117){var dlg=com.ibm.mashups.builder.createLMDialog(_116,_117);dlg.show();return dlg;};com.ibm.mashups.builder.showWidgetConfigDialog=function(_118){var menu=new com.ibm.mm.builder.widget.WidgetMenu({iwidgetId:_118});menu.showEditPane();};com.ibm.mashups.builder.closeWidgetConfigDialog=function(_119){dojo.publish(com.ibm.mm.builder.eventTopics.Widget_ConfigurationFinished,[_119]);};com.ibm.mashups.builder.subscribeBuilderTopics=function(_11a,obj,_11b){var _11c=dojo.subscribe(_11a,obj,_11b);if(!com.ibm.mashups.builder.builderTopicHandlers){com.ibm.mashups.builder.builderTopicHandlers=[];}com.ibm.mashups.builder.builderTopicHandlers.push(_11c);};com.ibm.mashups.builder.clearBuilderTopicHandlers=function(){dojo.forEach(com.ibm.mashups.builder.builderTopicHandlers,dojo.unsubscribe);com.ibm.mashups.builder.builderTopicHandlers=[];};}if(!dojo._hasResource["com.ibm.mm.builder.utils.userUtil"]){dojo._hasResource["com.ibm.mm.builder.utils.userUtil"]=true;dojo.provide("com.ibm.mm.builder.utils.userUtil");com.ibm.mm.builder.utils.userUtil.isLookasideEnabled=function(_11d){var _11e=this.getUserModel().getLookasideAttributeNames().start();if((typeof _11e=="undefined")||(_11e===null)||(_11e.length===0)){return false;}if((typeof _11d=="undefined")||(_11d===null)){return true;}for(var i=0;i<_11e.length;i++){if(_11d==_11e[i]){return true;}}return false;};com.ibm.mm.builder.utils.userUtil.getCurrentUser=function(){return this.getUserModel().findCurrentUser().start();};com.ibm.mm.builder.utils.userUtil.getCurrentUserID=function(){return this.getUserModel().findCurrentUser().start().getID();};com.ibm.mm.builder.utils.userUtil.getUserModel=function(){if(com.ibm.mm.builder.userModel===null){com.ibm.mm.builder.userModel=com.ibm.mashups.enabler.user.Factory.getUserModel();}return com.ibm.mm.builder.userModel;};com.ibm.mm.builder.utils.userUtil.getAnonymousMode=function(){return this.getUserModel().getAnonymousMode();};com.ibm.mm.builder.utils.userUtil.isLockedDownAnonymousMode=function(){return this.getAnonymousMode()===com.ibm.mashups.enabler.user.AnonymousMode.ANONYMOUS;};com.ibm.mm.builder.userModel=null;}if(!dojo._hasResource["com.ibm.mm.builder.utils.enablerUtil"]){dojo._hasResource["com.ibm.mm.builder.utils.enablerUtil"]=true;dojo.provide("com.ibm.mm.builder.utils.enablerUtil");com.ibm.mm.builder.utils.enablerUtil.getPageMetaData=function(key,_11f){var _120=null;if(typeof _11f!="undefined"){_120=com.ibm.mm.builder.utils.pageUtil.getPageNode(_11f);}else{_120=com.ibm.mm.builder.utils.pageUtil.getCurrentPageNode();}if(_120){var _121=_120.getContent().start();return _121.getMetaData(key);}return null;};com.ibm.mm.builder.utils.enablerUtil.setPageMetaData=function(key,_122,_123){var _124=_123?com.ibm.mm.builder.utils.pageUtil.getPageNode(_123):com.ibm.mm.builder.utils.pageUtil.getCurrentPageNode();if(_124){var _125=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();var _126=_124.getContent().start();_126.setMetaData(key,_122);_125.commit().start();}};com.ibm.mm.builder.utils.enablerUtil.setPageJSONMetaData=function(_127,_128){var _129=_128?com.ibm.mm.builder.utils.pageUtil.getPageNode(_128):com.ibm.mm.builder.utils.pageUtil.getCurrentPageNode();if(_129){var _12a=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();var _12b=_12a.getLayoutModel(_129.getID());if(_12b){var _12c=_12b.getRoot().start();if(_12c){for(var key in _127){if(Object.prototype.hasOwnProperty.call(_127,key)){_12c.setMetaData(key,_127[key]);}}_12a.commit().start();}}}};com.ibm.mm.builder.utils.enablerUtil.removePageMetaData=function(keys,_12d){var _12e=_12d?com.ibm.mm.builder.utils.pageUtil.getPageNode(_12d):com.ibm.mm.builder.utils.pageUtil.getCurrentPageNode();if(_12e){var _12f=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();var _130=_12f.getLayoutModel(_12e.getID());if(_130){var _131=_130.getRoot().start();if(_131){dojo.forEach(keys,function(key){if(key!="com.ibm.mashups.acl.role.USER"&&key!="com.ibm.mashups.acl.role.EDITOR"){_131.removeMetaData(key);}});_12f.commit().start();}}}};com.ibm.mm.builder.utils.enablerUtil.getUnescapedNodeTitle=function(node,_132){if(!node){return null;}var _133="";if(_132){_133=node.getTitle(_132);}if(!_133){_133=com.ibm.mashups.enabler.context.Factory.getLocalizedContext().getTitle(node);}return _133;};com.ibm.mm.builder.utils.enablerUtil.getNodeTitle=function(node,_134){return com.ibm.mm.builder.utils.htmlUtil.escapeString(com.ibm.mm.builder.utils.enablerUtil.getUnescapedNodeTitle(node,_134));};com.ibm.mm.builder.utils.enablerUtil.getNodeDescription=function(node,_135){if(!node){return null;}var desc=null;try{if(_135){desc=node.getDescription(_135);}if(!desc){desc=com.ibm.mashups.enabler.context.Factory.getLocalizedContext().getDescription(node);}if(!desc||desc==="null"){desc="";}}catch(ex){console.log("failed to load the description of the node");}return desc;};}if(!dojo._hasResource["com.ibm.mm.builder.utils.spaceUtil"]){dojo._hasResource["com.ibm.mm.builder.utils.spaceUtil"]=true;dojo.provide("com.ibm.mm.builder.utils.spaceUtil");(function(){var _136=com.ibm.mashups.enabler;var _137=com.ibm.mm.builder;var _138=_137.constant;var _139=_136.strategy;var ef=_136.model.Factory;var af=_136.model.state.AccessorFactory;var _13a=com.ibm.mashups.enabler.space.Factory;var _13b=_137.utils.userUtil;var _13c=com.ibm.mm.builder.utils.enablerUtil;var cs=com.ibm.mashups.services.ServiceManager.getService(_136.services.ConfigService.SERVICE_NAME);var _13d=com.ibm.mashups.enabler.services.ConfigConstants;var es=com.ibm.mashups.services.ServiceManager.getService("eventService");var cws=com.ibm.mm.builder.coreWidgetsStrings;var _13e={getSpaceModel:function(_13f){if(_13f||!this.spaceModel){if(this.spaceModel){delete this.spaceModel;}var _140=_13a.getSpaceModel();_140.setStrategy(new com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy(com.ibm.mm.builder.constant.NavigationPageSize));this.spaceModel=_140;}this.currentSpaceNode=null;return this.spaceModel;},getSpaceByNavigation:function(_141){if(_141){return this.getSpaceModel().findSpaceByNavigation(_141).start();}return null;},getSpaceIdByPageId:function(_142){var s=this.getSpaceByNavigation(com.ibm.mm.builder.utils.pageUtil.getPageNode(_142));if(s){return s.getID();}return null;},getCurrentSpaceId:function(){return this.getSpaceAccessor().getSpaceID();},getCurrentSpaceNode:function(){if(!this.currentSpaceNode||this.currentSpaceNode.getID()!==this.getCurrentSpaceId()){this.currentSpaceNode=this.getSpaceNode(this.getCurrentSpaceId());}return this.currentSpaceNode;},setSpaceId:function(sid){this.getSpaceAccessor().setSpaceID(sid);com.ibm.mm.builder.utils.navigationUtil.getNavigationModel().commit().start();if(!sid){dojo.cookie("inPersonalSpace","true");}else{dojo.cookie("inPersonalSpace",null);}},getSpaceAccessor:function(){this.spaceAccessor=this.spaceAccessor||af.getSpaceAccessor(com.ibm.mm.builder.utils.navigationUtil.getNavigationStateModel());return this.spaceAccessor;},getWelcomeSpaceId:function(){return cs.getValue(_13d.WELCOME_SPACE_ID);},getHomeSpaceId:function(){if(_13b.isLookasideEnabled("com.ibm.mashups.user.DEFAULT_SPACE")){try{this._homeSpaceId=this._homeSpaceId||_13b.getCurrentUser().getAttribute("com.ibm.mashups.user.DEFAULT_SPACE");if(this._homeSpaceId==="null"){return null;}if(this._homeSpaceId==="-1"){return null;}return this._homeSpaceId;}catch(e){return null;}}return null;},setHomeSpaceId:function(sid){sid=sid||"-1";this._homeSpaceId=sid;var _143=_13b.getUserModel();var user=_13b.getCurrentUser();if(user){user.setAttribute("com.ibm.mashups.user.DEFAULT_SPACE",sid);_143.commit().start();es.broadcastEvent("com.ibm.mashups.builder.refreshSpaceSelector");}},isHomeSpace:function(_144){return this.getHomeSpaceId()===_144;},isWelcomeSpace:function(_145){return this.getWelcomeSpaceId()===_145;},isPersonalSpace:function(_146){return !this.getCurrentSpaceId();},getSpaceTitle:function(_147,_148){return _13c.getNodeTitle(this.getSpaceNode(_147),_148)||this.getPersonalSpaceTitle();},getPersonalSpaceTitle:function(){if(ibmConfig.PERSONAL_SPACE_KEY&&cws[ibmConfig.PERSONAL_SPACE_KEY]){return cws[ibmConfig.PERSONAL_SPACE_KEY];}return cws.I_SPACE_PERSONAL_SPACE;},getSpaceIconURL:function(_149){var _14a=_149.getMetaDataNames();for(var i=0;i<_14a.length;i++){if(_14a[i]&&(_14a[i]=="iconUrl"||_14a[i].search("^{.*}iconUrl$")!==-1)){return _149.getMetaData(_14a[i]);}}return null;},setSpaceIconURL:function(_14b,_14c){var _14d=_14b.getMetaDataNames();var _14e=false;for(var i=0;i<_14d.length;i++){if(_14d[i]&&(_14d[i]=="iconUrl"||_14d[i].search("^{.*}iconUrl$")!==-1)){_14b.setMetaData(_14d[i],_14c);_14e=true;}}if(!_14e){_14b.setMetaData("{http://www.ibm.com/xmlns/prod/lotus/mashups/v1.0/extensions}iconUrl",_14c);}return;},getSpaceNode:function(_14f){if(_14f===this.getCurrentSpaceId()&&this.currentSpaceNode){return this.currentSpaceNode;}_14f=_14f||this.getCurrentSpaceId();if(_14f){return this.getSpaceModel().find(_14f).start();}},validateSpaceName:function(_150){var cwm=com.ibm.mm.builder.coreWidgetsMessages;if(!_150){return false;}if(_150.length===0){alert(cwm.E_SPACE_UTIL_INVALID_NAME_EMPTY_0);return false;}_150=dojo.trim(_150);if(_150.length===0){alert(cwm.E_SPACE_UTIL_INVALID_NAME_BLANK_0);return false;}if(_150.length>=256){alert(cwm.E_SPACE_UTIL_INVALID_NAME_LENGTH_0);return false;}var _151=ibmConfig[_13d.BUILDER_TITLE_FILTER_REGEXP];if(_151){if(_150.match(_151)){alert(cwm.E_SPACE_UTIL_INVALID_NAME_CHAR_0);return false;}}return true;},isVisiable:function(node){if(!node){return false;}if(dojo.isString(node)){node=this.getSpaceNode(node);}if(!node.isHidden()){return true;}return this.isBusinessSpaceServer()?this.canEdit(node):false;},canEdit:function(node){if(!node){return false;}var ac=com.ibm.mm.builder.utils.acModelUtil;return ac.isSpaceOwner(node)||ac.canEditSpace(node);},isBusinessSpaceServer:function(){return cs.getValue(_13d.SERVER_TYPE)==_13d.SERVER_TYPE_BSPACE;}};com.ibm.mm.builder.utils.spaceUtil=_13e;})();}if(!dojo._hasResource["com.ibm.mm.builder.utils.pageUtil"]){dojo._hasResource["com.ibm.mm.builder.utils.pageUtil"]=true;dojo.provide("com.ibm.mm.builder.utils.pageUtil");com.ibm.mm.builder.utils.pageUtil.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.utils.pageUtil");com.ibm.mm.builder.utils.pageUtil.getPageIdFromSpace=function(_152){return this.getPageAccessor(_152).getPageID();};com.ibm.mm.builder.utils.pageUtil.getFirstPageInSpace=function(_153){return this.getFirstChildPageId(com.ibm.mm.builder.utils.navigationUtil.getNavigationRootNodeId(_153));};com.ibm.mm.builder.utils.pageUtil.getFirstPageInHomeSpace=function(){var _154=com.ibm.mm.builder.utils.spaceUtil.getHomeSpaceId();return this.getFirstChildPageId(com.ibm.mm.builder.utils.navigationUtil.getNavigationRootNodeId(_154));};com.ibm.mm.builder.utils.pageUtil.setPageId=function(pid,_155){this.getPageAccessor(_155||com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceId()).setPageID(pid);this.changePageMode("view");};com.ibm.mm.builder.utils.pageUtil.getPageAccessor=function(_156){return com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(com.ibm.mm.builder.utils.navigationUtil.getNavigationStateModel(),_156);};com.ibm.mm.builder.utils.pageUtil.getPageModeAccessor=function(_157){return com.ibm.mashups.enabler.model.state.AccessorFactory.getPageModeAccessor(com.ibm.mm.builder.utils.navigationUtil.getNavigationStateModel());};com.ibm.mm.builder.utils.pageUtil.getCurrentPageMode=function(){return this.getPageModeAccessor(com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceId()).getPageMode();};com.ibm.mm.builder.utils.pageUtil.getCurrentPageId=function(){return com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();};com.ibm.mm.builder.utils.pageUtil.getCurrentPageNode=function(){if(!this.currentPageNode||this.currentPageNode.getID()!==this.getCurrentPageId()){this.currentPageNode=this.getPageNode(this.getCurrentPageId());}return this.currentPageNode;};com.ibm.mm.builder.utils.pageUtil.getParentPageId=function(_158){var p=this.getParentPageNode(_158);return (p)?p.getID():null;};com.ibm.mm.builder.utils.pageUtil.getFirstChildPageId=function(_159){var p=this.getFirstChildPage(_159);return (p)?p.getID():null;};com.ibm.mm.builder.utils.pageUtil.getFirstChildPage=function(_15a){var page=this.getPageNode(_15a);if(page){var _15b=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();if(_15b.hasChildren(page)){var iter=_15b.getChildren(page);while(iter.hasNext()){var node=iter.next();if(this.isVisiable(node)){return node;}}}}return null;};com.ibm.mm.builder.utils.pageUtil.getParentPageNode=function(_15c){var _15d=null;var _15e=com.ibm.mm.builder.utils.navigationUtil;var _15f=com.ibm.mm.builder.utils.spaceUtil;var _160=_15e.getNavigationModel();var pid=this._getPageId(_15c);if(pid){_15d=_160.getParent(pid).start();}return _15d||_15e.getNavigationRootNode(_15f.getCurrentSpaceId());};com.ibm.mm.builder.utils.pageUtil.getSiblingPages=function(_161){return this.getChildPages(this.getParentPageNode(_161));};com.ibm.mm.builder.utils.pageUtil.getChildPages=function(page){if(typeof page==="string"){page=this.getPageNode(page);if(!page){return null;}}var _162=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();return _162.hasChildren(page)?_162.getChildren(page):null;};com.ibm.mm.builder.utils.pageUtil.getDefaultPage=function(_163){return this.getPageNode(_163)||this.getFirstRootPageId();};com.ibm.mm.builder.utils.pageUtil.getDefaultPageId=function(_164){var p=this.getDefaultPage(_164);if(!p.getID){return p;}return (p)?p.getID():null;};com.ibm.mm.builder.utils.pageUtil.getFirstRootPageId=function(){var _165=com.ibm.mm.builder.utils;var _166=_165.navigationUtil.getNavigationRootNodeId(_165.spaceUtil.getCurrentSpaceId());return this.getFirstChildPageId(_166);};com.ibm.mm.builder.utils.pageUtil.getCurrentSpacePageIdByPageTitle=function(_167,_168){var iter=this.getSiblingPages(this.getFirstRootPageId());while(iter.hasNext()){var page=iter.next();if(this.getPageTitle(page.getID(),_168)==_167){return page.getID();}}return null;};com.ibm.mm.builder.utils.pageUtil.getPageContent=function(_169){var _16a=this.getPageLayoutModel(_169);if(!_16a){return null;}var _16b=_16a.getRoot().start();if(_16b){return _16b.getFragment();}alert(com.ibm.mm.builder.coreWidgetsMessages.E_NAV_NO_PAGE_OR_NET_DISCONNECT_0);return null;};com.ibm.mm.builder.utils.pageUtil.getPageTitle=function(page,_16c){if(!page){return null;}if(dojo.isString(page)){page=this.getPageNode(page);}return com.ibm.mm.builder.utils.enablerUtil.getNodeTitle(page,_16c);};com.ibm.mm.builder.utils.pageUtil.getUnescapedPageTitle=function(page,_16d){if(!page){return null;}if(dojo.isString(page)){page=this.getPageNode(page);}return com.ibm.mm.builder.utils.enablerUtil.getUnescapedNodeTitle(page,_16d);};com.ibm.mm.builder.utils.pageUtil.getCurrentPageTitle=function(_16e){return this.getPageTitle(this.getDefaultPageId(),_16e);};com.ibm.mm.builder.utils.pageUtil.getPageDescription=function(_16f,_170){var node=this.getPageNode(_16f);return com.ibm.mm.builder.utils.enablerUtil.getNodeDescription(node,_170);};com.ibm.mm.builder.utils.pageUtil.getPageLayoutItemSet=function(_171){var _172=this.getPageLayoutModel(this._getPageId(_171));if(!_172){return null;}var _173=_172.getRoot().start();if(_173){return _173.getMetaData(com.ibm.mm.builder.constant.layoutWidgetItemSet);}return null;};com.ibm.mm.builder.utils.pageUtil.createPage=function(_174,_175,_176){var _177=com.ibm.mm.builder.utils;var _178=this.getPageNode(_175||this.getParentPageId()||_177.navigationUtil.getNavigationRootNodeId(_177.spaceUtil.getCurrentSpaceId()));var _179=_177.navigationUtil.getNavigationModel();var _17a=_179.create(null);_17a.setTitle(_174,dojo.locale);_17a.setTitle(_174,ibmConfig["default.locale"]);var _17b=_177.themeUtil.getThemeId(_178.getID());if(!_177.themeUtil.getThemeModel().find(_17b).start()){_17b=_177.themeUtil.getDefaultThemeId();}_17a.setTheme(_17b);_179.insert(_17a,_178,null);var _17c=_179.getLayoutModel(_17a.getID());if(_17c){var _17d=_17c.create();_17c.insert(_17d);_17d.setFragment(" ");var _17e=_179.commit();var _17f=null;_17e.setOperationCallback(function(node,_180,_181,_182){if(!node&&_181>=400){com.ibm.mm.builder.utils.pageUtil.LOGGER.severe("createPage",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_PUB_API_CREATE_PAGE_1,[_181]));}else{_17f=node.getID();}});_17e.setFinishedCallback(function(ret,_183){if(!_17f||_183>=400){if(_176){_176();}com.ibm.mm.builder.utils.pageUtil.LOGGER.severe("createPage",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_PUB_API_CREATE_PAGE_1,[_183]));}else{dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid,null,{expires:-1});var es=com.ibm.mashups.services.ServiceManager.getService("eventService");es.broadcastEvent("com.ibm.mashups.builder.pageCreated",_17f);es.broadcastEvent("com.ibm.mashups.builder.switchPage",_17f);es.broadcastEvent("com.ibm.mashups.builder.spacemanager.pageCreated",_17f);}});_17e.start(false);}else{this.LOGGER.trace("cannot get layoutmodel");}};com.ibm.mm.builder.utils.pageUtil.updatePage=function(_184,_185){var _186=_184?this.getPageNode(_184):this.getCurrentPageNode();if(!_186){return;}var _187=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();var _188=false;var _189=null;if(_185.content){if(_187.hasLayoutModel(_186)){var _18a=_187.getLayoutModel(_186);if(_18a){var _18b=_18a.getRoot().start()||_18a.create();_18b.setFragment(_185.content);_18a.insert(_18b);_188=true;}}}if(_185.title&&_185.title!=this.getPageTitle(_186)){if(this.validatePageName(_185.title)){_186.setTitle(_185.title,dojo.locale);_188=true;}else{return;}}if(_185.description&&_185.description!=com.ibm.mm.builder.utils.enablerUtil.getNodeDescription(_186)){_186.setDescriptione(_185.description,dojo.locale);_188=true;}var _18c=com.ibm.mm.builder.utils.themeUtil.getThemeId(_186);if(_185.theme&&_185.theme!=_18c){_186.setTheme(_185.theme);_188=true;}if(_18c==="null"){_186.setTheme(com.ibm.mm.builder.utils.themeUtil.getDefaultThemeId());_188=true;}if(_188){_187.commit().start();com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(false);}};com.ibm.mm.builder.utils.pageUtil.saveCurrentPage=function(_18d){var _18e={};_18e.content=_18d||this.getPageContent();this.updatePage(null,_18e);};com.ibm.mm.builder.utils.pageUtil.deletePage=function(_18f){com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(false);var _190=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();_190.remove(this._getPageId(_18f));_190.commit().start();com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setID(null);};com.ibm.mm.builder.utils.pageUtil.isRoot=function(_191){var node=this.getPageNode(_191);var _192=com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceId();return !node||node.getID()==com.ibm.mm.builder.utils.navigationUtil.getNavigationRootNodeId(_192);};com.ibm.mm.builder.utils.pageUtil.getPageLayoutModel=function(_193){var _194=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();return _194.getLayoutModel(this._getPageId(_193));};com.ibm.mm.builder.utils.pageUtil.getPageLayoutNode=function(_195){var _196=this.getPageLayoutModel(_195);if(_196){return _196.getRoot().start();}};com.ibm.mm.builder.utils.pageUtil.getPageNode=function(_197){var pid=this._getPageId(_197);if(pid){var _198=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel(true);try{return _198.find(pid).start();}catch(e){return null;}}};com.ibm.mm.builder.utils.pageUtil._getPageId=function(_199){return _199||this.getCurrentPageId();};com.ibm.mm.builder.utils.pageUtil.validatePageName=function(_19a){var cwm=com.ibm.mm.builder.coreWidgetsMessages;if(!_19a){return false;}if(_19a.length===0){alert(cwm.E_PAGE_UTIL_INVALID_NAME_EMPTY_0);return false;}_19a=dojo.trim(_19a);if(_19a.length===0){alert(cwm.E_PAGE_UTIL_INVALID_NAME_BLANK_0);return false;}if(_19a.length>=256){alert(cwm.E_PAGE_UTIL_INVALID_NAME_LENGTH_0);return false;}var _19b=ibmConfig[com.ibm.mashups.enabler.services.ConfigConstants.BUILDER_TITLE_FILTER_REGEXP];if(_19b){if(_19a.match(_19b)){alert(cwm.E_PAGE_UTIL_INVALID_NAME_CHAR_0);return false;}}return true;};com.ibm.mm.builder.utils.pageUtil.getEmptyPageMessage=function(msg){var _19c="<div class='empty_div'>"+"<div class='empty_outer_div'>"+"<div class='empty_inner_div'>"+com.ibm.mm.builder.utils.htmlUtil.formatMessage(msg)+"</div>"+"</div>"+"</div>";return _19c;};com.ibm.mm.builder.utils.pageUtil.encodeBase64=function(str){function _19d(str){var _19e=[];for(var i=0,len=str.length;i<len;i++){var ch=str.charCodeAt(i);if((ch>=1)&&(ch<=127)){_19e.push(str.charAt(i));}else{if(ch>2047){_19e.push(String.fromCharCode(224|((ch>>12)&15)));_19e.push(String.fromCharCode(128|((ch>>6)&63)));_19e.push(String.fromCharCode(128|((ch>>0)&63)));}else{_19e.push(String.fromCharCode(192|((ch>>6)&31)));_19e.push(String.fromCharCode(128|((ch>>0)&63)));}}}return _19e.join("");};str=_19d(str);var _19f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var out,i,len;var c1,c2,c3;len=str.length;var i=0;out=[];while(i<len){c1=str.charCodeAt(i++)&255;if(i===len){out.push(_19f.charAt(c1>>2));out.push(_19f.charAt((c1&3)<<4));out.push("==");break;}c2=str.charCodeAt(i++);if(i===len){out.push(_19f.charAt(c1>>2));out.push(_19f.charAt(((c1&3)<<4)|((c2&240)>>4)));out.push(_19f.charAt((c2&15)<<2));out.push("=");break;}c3=str.charCodeAt(i++);out.push(_19f.charAt(c1>>2));out.push(_19f.charAt(((c1&3)<<4)|((c2&240)>>4)));out.push(_19f.charAt(((c2&15)<<2)|((c3&192)>>6)));out.push(_19f.charAt(c3&63));}return out.join("");};com.ibm.mm.builder.utils.pageUtil.isEmptyPage=function(_1a0){if(!_1a0){return true;}return !com.ibm.mm.builder.utils.navigationUtil.getNavigationModel().hasLayoutModel(_1a0);};com.ibm.mm.builder.utils.pageUtil.isVisiable=function(node){if(!node){return false;}if(dojo.isString(node)){node=this.getPageNode(node);}if(!node.isHidden()){return true;}return com.ibm.mm.builder.utils.spaceUtil.isBusinessSpaceServer()?this.canEdit(node):false;};com.ibm.mm.builder.utils.pageUtil.canEdit=function(node){var _1a1=com.ibm.mashups.enabler;var _1a2=_1a1.navigation.Factory.getNavigationModel();var page=_1a2.find(node.getID()).start();var type=page.getNavigationElementType();if(type==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE){var sc=page.getContent().start();if(page.getMetaData("com.ibm.portal.static.page.file.name.html")){return sc.confirmSetStaticMarkup("");}else{if(page.hasRole(com.ibm.mashups.enabler.ac.RoleType.ADMIN)||page.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)||page.hasRole("Privileged User")){return true;}else{return false;}}}else{if(type==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_LABEL){return page.confirmSetHidden(true);}else{return false;}}};com.ibm.mm.builder.utils.pageUtil.updatePageTitle=function(){var _1a3=this.getUnescapedPageTitle(this.getCurrentPageId());var _1a4=com.ibm.mashups.enabler.context.Factory.getPageContext();if(_1a4){if(!_1a3||dojo.trim(_1a3)==""){_1a4.setBrowserTitle(builderConfig.productName);}else{_1a4.setBrowserTitle(builderConfig.productName+" - "+_1a3);}}};com.ibm.mm.builder.utils.pageUtil.isGlobalPage=function(){return dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid)&&dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid)!=="null";};com.ibm.mm.builder.utils.pageUtil.savePageWithConfirm=function(_1a5,_1a6){if(com.ibm.pb.contextMenu.sharedActions.widgetEditModeChecker()){return;}if(com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().isDirty()){var cws=com.ibm.mm.builder.coreWidgetsStrings;var _1a7=new com.ibm.mm.builder.dialog.PageSaveConfirmDialog({contentWarning:cws.I_PAGE_SAVE_WARNING,contentQuestion:cws.I_PAGE_SAVE_SUGGEST,btnSaveText:cws.I_COMMON_SAVE,btnNotSaveText:cws.I_PAGE_SAVE_NO_SAVE,btnCancelText:cws.I_PAGE_SAVE_KEEP_EDIT,hideNotSave:true,callbackSave:_1a5,callbackNotSave:_1a5,callbackCancel:_1a6});_1a7.show();}else{if(_1a5){_1a5();}}};com.ibm.mm.builder.utils.pageUtil.changePageMode=function(mode){if(mode=="view"||mode=="edit"){com.ibm.mm.builder.utils.pageUtil.getPageModeAccessor().setPageMode(mode);com.ibm.mm.builder.utils.navigationUtil.getNavigationStateModel().commit().start();}};com.ibm.mm.builder.utils.pageUtil.isPageDescriptionLengthExceed=function(_1a8){var _1a9=_1a8.replace(/[^\x00-\xff]/gi,"--").length;var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _1aa=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.LIMIT_PAGE_DESCRIPTION);if(_1a9>_1aa){return _1aa;}else{return 0;}};com.ibm.mm.builder.utils.pageUtil.getLayoutModel=function(){var _1ab=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1ac=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_1ab,null);var _1ad=_1ac.getPageID();var _1ae=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var page=_1ae.find(_1ad).start();var lm=_1ae.getLayoutModel(page);return lm;};com.ibm.mm.builder.utils.pageUtil.getLayoutControlByWidgetId=function(_1af){var lm=com.ibm.mm.builder.utils.pageUtil.getLayoutModel();var _1b0=lm.find(_1af).start();if(!_1b0){_1b0=com.ibm.mm.builder.utils.pageUtil.getLayoutControlByWidgetIdContinue(lm.getRoot().start(),_1af);}return _1b0;};com.ibm.mm.builder.utils.pageUtil.getLayoutControlByWidgetIdContinue=function(node,_1b1){var ret=null;var lm=com.ibm.mm.builder.utils.pageUtil.getLayoutModel();if(node.getLayoutNodeType()==com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTAINER){if(lm.hasChildren(node)){var _1b2=lm.getChildren(node);while(_1b2.hasNext()){ret=com.ibm.mm.builder.utils.pageUtil.getLayoutControlByWidgetIdContinue(_1b2.next(),_1b1);if(ret){return ret;}}}}else{if(node.getLayoutNodeType()==com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1b3=wm.getWidgetWindow(node).start().getID();if(_1b3==_1b1){return node;}}}return ret;};}if(!dojo._hasResource["com.ibm.mm.builder.utils.navigationUtil"]){dojo._hasResource["com.ibm.mm.builder.utils.navigationUtil"]=true;dojo.provide("com.ibm.mm.builder.utils.navigationUtil");dojo.require("dojo.data.ItemFileWriteStore");dojo.require("dojo.cookie");(function(){var _1b4=com.ibm.mashups.enabler;var _1b5=com.ibm.mm.builder;var _1b6=_1b4.strategy;var ef=_1b4.model.Factory;var ems=_1b4.model.state;var af=ems.AccessorFactory;var _1b7=_1b5.utils.pageUtil;var _1b8=_1b5.utils.userUtil;var _1b9=_1b5.utils.spaceUtil;var cs=com.ibm.mashups.services.ServiceManager.getService(_1b4.services.ConfigService.SERVICE_NAME);var es=com.ibm.mashups.services.ServiceManager.getService("eventService");var _1ba=_1b4.logging.Logger.getLogger("com.ibm.mm.builder.utils.navigationUtil");var _1bb={getNavigationModel:function(_1bc){if(!this._navModel){var _1bd=ef.getNavigationModel();var _1be=new _1b6.ListLoadAheadStrategy(com.ibm.mm.builder.constant.NavigationPageSize);var _1bf=[];var _1c0=dojo.trim(ibmConfig["com.ibm.mashups.builder.contentShelf.mode"]||"")=="hub";if(_1c0){_1bf=[_1be];}else{var _1c1=new _1b6.UserLoadAheadStrategy(true);_1c1.setUserModel(_1b5.utils.userUtil.getUserModel());_1bf=[_1be,_1c1];}for(var i=0;i<_1bf.length;i++){_1bd.addStrategy(_1bf[i]);}this._navModel=_1bd;com.ibm.mm.builder.utils.pageUtil.currentPageNode=null;this.personalSpaceNavigationRootNode=null;}if(typeof _1bc!="undefined"){var _1c2=null;if(_1bc){_1c2=new _1b6.PageLoadAheadStrategy(true,false,false);}else{_1c2=new _1b6.PageLoadAheadStrategy(true,true,true);}this._navModel.removeStrategy("com.ibm.mashups.enabler.strategy.PageLoadAheadStrategy");this._navModel.addStrategy(_1c2);}return this._navModel;},getSharedNavigationModel:function(){if(!this._sharedNavModel){var _1c3=ef.getSharedNavigationModel();_1c3.setStrategy(new _1b4.strategy.ListLoadAheadStrategy(com.ibm.mm.builder.constant.NavigationPageSize));this._sharedNavModel=_1c3;}return this._sharedNavModel;},getNavigationStateModel:function(){if(!this.navigationStateModel){this.navigationStateModel=ems.NavigationStateModelFactory.getNavigationStateModel();}return this.navigationStateModel;},getNavigationRootNode:function(_1c4){if(_1c4){var _1c5=_1b9.getSpaceModel().find(_1c4).start();if(_1c5){return _1b7.getPageNode(_1c5.getRootNavigation().getID());}}return this.getPersonalSpaceNavigationRootNode();},getPersonalSpaceNavigationRootNode:function(){if(!this.personalSpaceNavigationRootNode){this.personalSpaceNavigationRootNode=this.getNavigationModel().getRoot().start();}return this.personalSpaceNavigationRootNode;},getPersonalSpaceNavigationRootId:function(){return this.getPersonalSpaceNavigationRootNode().getID();},getNavigationRootNodeId:function(_1c6){return this.getNavigationRootNode(_1c6).getID();},getSharedNavigationRootNode:function(){return this.getSharedNavigationModel().getRoot().start();},getFirstPageNode:function(){if(_1b8.isLockedDownAnonymousMode()){this.autoAcceptAllPages();}var pid=_1b7.getPageIdFromSpace();if(dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid)){pid=dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid);dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid,null,{expires:-1});}if(pid){var page=_1b7.getPageNode(pid);if(page){return page;}else{try{page=this.getSharedNavigationModel().find(pid).start();var _1c7=this.getNavigationModel();var root=this.getPersonalSpaceNavigationRootNode();_1c7.insert(page,root,null);_1c7.commit().start();return _1c7.find(pid).start();}catch(e){}}}if(this.isLastPageWhenLogin()){if(!pid&&_1b9.getCurrentSpaceId()){if(_1b9.getSpaceNode(_1b9.getCurrentSpaceId())){pid=_1b7.getFirstPageInSpace(_1b9.getCurrentSpaceId());return _1b7.getPageNode(pid);}else{return this.gotoHomeSpace();}}}var sid=_1b9.getCurrentSpaceId();if(sid){pid=_1b7.getFirstPageInSpace(sid);if(pid){var _1c8=_1b7.getPageNode(pid);if(_1c8){return _1c8;}}_1b9.setSpaceId(sid);return null;}if(dojo.cookie("inPersonalSpace")&&dojo.cookie("inPersonalSpace")!=="null"){return this.gotoPersonalSpace();}return this.gotoHomeSpace();},gotoHomeSpace:function(){var _1c9=_1b9.getHomeSpaceId();if(_1c9&&_1b9.getSpaceNode(_1c9)){_1b9.setSpaceId(_1c9);var pid=_1b7.getFirstPageInHomeSpace();if(pid){var page=_1b7.getPageNode(pid);if(page){return page;}else{return null;}}else{var _1ca=_1b9.getSpaceModel().find(_1c9).start();if(_1ca){return _1b7.getPageNode(_1ca.getRootNavigation().getID());}else{return null;}}}var _1cb=_1b9.getWelcomeSpaceId();if(_1cb&&_1b9.getSpaceNode(_1cb)){_1b9.setSpaceId(_1cb);var wpid=_1b7.getFirstPageInSpace(_1cb);if(wpid){var _1cc=_1b7.getPageNode(wpid);if(_1cc){return _1cc;}}return null;}return this.gotoPersonalSpace();},gotoPersonalSpace:function(){_1b9.setSpaceId(null);var _1cd=this.getNavigationModel();var root=this.getPersonalSpaceNavigationRootNode();var pid=_1b7.getPageIdFromSpace();if(pid){try{var page=this.getSharedNavigationModel().find(pid).start();_1cd.insert(page,root,null);_1cd.commit().start();return this.getNavigationModel().find(pid).start();}catch(e){}}if(!_1cd.hasChildren(root)){this.autoAcceptPagesFromDefaultGroup();}return _1b7.getFirstChildPage(root.getID());},autoAcceptPagesFromDefaultGroup:function(){var _1ce=this.getNavigationModel();var _1cf=this.getNavigationRootNode();var _1d0=this.getSharedNavigationModel();var _1d1=this.getSharedNavigationRootNode();var iter=_1d0.getChildren(_1d1);while(iter.hasNext()){var _1d2=iter.next();var _1d3=false;var _1d4=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CLIENT_AUTO_ACCEPT_SHARED_GROUPNAME);if(_1d4=="*"){_1d3=true;}else{_1d0.find(_1d2.getID()).start();var _1d5=_1d0.getLayoutModel(_1d2.getID());if(_1d5){var _1d6=_1d5.getRoot().start();var _1d7=com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_1d6);var _1d8=com.ibm.mm.builder.utils.acModelUtil.getAllMembersInModel(_1d7);var _1d9=_1d4.split(";");for(var i=0,n=_1d8.length;i<n;i++){var _1da=_1d8[i].getDisplayName();for(var x=0,y=_1d9.length;x<y;x++){if(_1d9[x]==_1da){_1d3=true;break;}}}}}if(_1d3){var page=_1d0.find(_1d2.getID()).start();_1ce.insert(page,_1cf);}}_1ce.commit().start();},autoAcceptAllPages:function(){try{var _1db=this.getNavigationModel();var _1dc=this.getNavigationRootNode();var _1dd=this.getSharedNavigationModel();var _1de=this.getSharedNavigationRootNode();var iter=_1dd.getChildren(_1de);while(iter.hasNext()){_1db.insert(iter.next(),_1dc);}_1db.commit().start();}catch(e){console.log(e);}},getRedirectAddress:function(){return _1b4.model.state.UrlGeneratorFactory.getUrlGenerator().getUrl(this.getNavigationStateModel());},reorderPageNode:function(_1df,_1e0,_1e1){var _1e2=null;try{var _1e3=this.getNavigationModel();var _1e4=this.getReorderPageContext(_1e0,_1e1),page=_1b7.getPageNode(_1df),_1e5=_1e4.parent,next=_1e4.next;if(_1e3.confirmInsert(page,_1e5,next)){_1e3.insert(page,_1e5,next);var _1e6=_1e3.commit();var _1e7=null;_1e6.setOperationCallback(function(_1e8){var _1e9=_1e8.request;if(_1e9){if(_1e9.statusCode>=400){if(_1e9.responseText){_1e2=_1e9.responseText;}else{var _1ea=dojo.i18n.getLocalization("com.ibm.mm.builder","coreWidgetsMessages");_1e2=dojo.string.substitute(_1ea.E_PUB_API_MOVE_PAGE_1,[_1e9.statusCode]);}}}},null,true);_1e6.setFinishedCallback(function(_1eb){if(_1eb.statusCode<400){es.broadcastEvent("com.ibm.mashups.builder.refreshNavigation");}},null,true);_1e6.start(true);}}catch(e){_1e2=e.message;_1ba.severe("reorderPageNode",_1e2);}return _1e2;},getReorderPageContext:function(_1ec,_1ed){var _1ee=this.getNavigationModel(),page=_1b7.getPageNode(_1ec),_1ef=null,next=null;switch(_1ed){case "previous":_1ef=_1ee.getParent(_1ec).start();next=page;break;case "next":_1ef=_1ee.getParent(_1ec).start();var _1f0=_1ee.getChildren(_1ef);while(_1f0.hasNext()){var _1f1=_1f0.next();if(_1f1.getID()===_1ec){next=_1f0.next();break;}}break;default:_1ef=page;}return {parent:_1ef,next:next};},getPageContext:function(_1f2){var _1f3=this.getNavigationModel(),page=_1b7.getPageNode(_1f2),_1f4=null,next=null,_1f5=null;_1f4=_1f3.getParent(_1f2).start();var _1f6=_1f3.getChildren(_1f4);while(_1f6.hasNext()){var _1f7=_1f6.next();if(_1f7.getID()===_1f2){if(_1f6.hasNext()){next=_1f6.next();}break;}_1f5=_1f7;}return {parent:_1f4,previous:_1f5,next:next};},isDescendant:function(_1f8,_1f9,_1fa){var _1fb=this.getNavigationModel();var _1fc=this.getNavigationRootNodeId();var _1fd=_1f9;if(!_1fa||_1fa<=0){_1fa=0;}var _1fe=0;while(_1f8!==_1fd){var _1ff=_1fb.getParent(_1fd).start();if(!_1ff){return false;}_1fd=_1ff.getID();_1fe++;if(_1fa>0&&_1fe>=_1fa){break;}if(_1fc===_1fd){break;}}if(_1fa<=0||_1fe==_1fa){return _1f8===_1fd;}else{return false;}},isPortal:function(){if(ibmCfg.portalConfig.portalContext){return true;}return false;},isLastPageWhenLogin:function(){if(this.isPortal()){return true;}try{var u=com.ibm.mm.builder.utils.userUtil.getCurrentUser();return u.getAttribute("com.ibm.mashups.user.WHERE_TO_GO_WHEN_LOGIN")==="lastpage";}catch(e){return true;}},setPageIDCookie:function(_200){if(this.isPortal()){return;}dojo.cookie("url_pid","pid="+_200,{path:"/"});},updateSpaceTitleInNavBar:function(){var _201=com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceNode();var _202=dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageOpenedSpaceId);if(_202){_201=com.ibm.mm.builder.utils.spaceUtil.getSpaceNode(_202);}var _203=dojo.query("span#spaceName")[0];if(_203){var _204=dojo.query("h2",_203);if(_204[0]){var n=_203.removeChild(_204[0]);dojo.destroy(n);}currentSpaceTitle=_201?com.ibm.mm.builder.utils.enablerUtil.getNodeTitle(_201):null;if(currentSpaceTitle){var _205=dojo.create("h2",{innerHTML:currentSpaceTitle},_203);dojo.style(_205,"width","auto");dojo.style(_205,"padding","15px 20px 0px");}}}};com.ibm.mm.builder.utils.navigationUtil=_1bb;})();}if(!dojo._hasResource["com.ibm.mm.builder.utils.acModelUtil"]){dojo._hasResource["com.ibm.mm.builder.utils.acModelUtil"]=true;dojo.provide("com.ibm.mm.builder.utils.acModelUtil");com.ibm.mm.builder.utils.acModelUtil.VIEW=0;com.ibm.mm.builder.utils.acModelUtil.PERSONALIZE=1;com.ibm.mm.builder.utils.acModelUtil.EDIT=2;com.ibm.mm.builder.utils.acModelUtil.OWNER=3;com.ibm.mm.builder.utils.acModelUtil.getUserPermission=function(_206){var _207=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();var _208=_207.find(_206).start(true);var _209=_208.getContent().start(true);if(_208.getMetaData("com.ibm.portal.static.page.file.name.html")){if(_209.confirmSetStaticMarkup("")){return com.ibm.mm.builder.utils.acModelUtil.EDIT;}}else{if(_209.hasRole(com.ibm.mashups.enabler.ac.RoleType.ADMIN)||_209.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)||_209.hasRole("Privileged User")){return com.ibm.mm.builder.utils.acModelUtil.EDIT;}}return com.ibm.mm.builder.utils.acModelUtil.VIEW;};com.ibm.mm.builder.utils.acModelUtil.getPageOwner=function(_20a){if(!_20a){return null;}var _20b=com.ibm.mm.builder.utils.spaceUtil.getSpaceIdByPageId(_20a);var _20c=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();var _20d=_20c.getLayoutModel(_20a);var _20e=_20d.getRoot().start();var _20f=null;if(!_20b){_20f=com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_20e);}else{var _210=com.ibm.mm.builder.utils.spaceUtil.getSpaceModel();var _211=_210.find(_20b).start();_20f=com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_211,_20e);}var _212=_20f.getOwner();if(_212){return _212;}return null;};com.ibm.mm.builder.utils.acModelUtil.getSpaceOwner=function(_213){var _214=com.ibm.mm.builder.utils.spaceUtil.getSpaceNode(_213);var _215=com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_214);return _215.getOwner();};com.ibm.mm.builder.utils.acModelUtil.isOwner=function(_216){var _217=com.ibm.mm.builder.utils.acModelUtil.getPageOwner(_216);if(_217){var _218=com.ibm.mm.builder.utils.userUtil.getCurrentUserID();if(_217.getID()==_218){return true;}}return false;};com.ibm.mm.builder.utils.acModelUtil.getViewers=function(_219){return com.ibm.mm.builder.utils.acModelUtil.getMemberListFromRoleModel(com.ibm.mashups.enabler.ac.RoleType.USER,_219);};com.ibm.mm.builder.utils.acModelUtil.getEditors=function(_21a){return com.ibm.mm.builder.utils.acModelUtil.getMemberListFromRoleModel(com.ibm.mashups.enabler.ac.RoleType.EDITOR,_21a);};com.ibm.mm.builder.utils.acModelUtil.addViewers=function(_21b,_21c){com.ibm.mm.builder.utils.acModelUtil.insertMemberWithRoleType(_21b,_21c,com.ibm.mashups.enabler.ac.RoleType.USER);};com.ibm.mm.builder.utils.acModelUtil.addEditors=function(_21d,_21e){com.ibm.mm.builder.utils.acModelUtil.insertMemberWithRoleType(_21d,_21e,com.ibm.mashups.enabler.ac.RoleType.EDITOR);};com.ibm.mm.builder.utils.acModelUtil.insertMemberWithRoleType=function(_21f,_220,_221){if(!_220){return;}var _222=_21f.getRoleModel();var role=com.ibm.mm.builder.utils.acModelUtil.createRole(_21f,_222,_221);if(role){var _223=_222.getMemberModel(role);if(_223){for(var _224 in _220){if(Object.prototype.hasOwnProperty.call(_220,_224)){var _225=_223.create({type:_220[_224],id:_224});_223.insert(_225,null);}}}}};com.ibm.mm.builder.utils.acModelUtil.createRole=function(_226,_227,_228){_227.setCursorPosition(0);var _229=_227.iterator();if(!_229){return;}var role=null;while(_229.hasNext()){role=_229.next();if(!role){continue;}if(role.getRoleType()==_228){return role;}}role=_227.create({roletype:_228});_227.insert(role,null);return role;};com.ibm.mm.builder.utils.acModelUtil.getPageAC=function(_22a){if(!_22a){return null;}var _22b=null;var _22c=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();var page=_22c.find(_22a).start();var type=page.getNavigationElementType();if(type==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE){var _22d=_22c.getLayoutModel(_22a);var _22e=_22d.getRoot().start();var _22f=com.ibm.mm.builder.utils.spaceUtil.getSpaceIdByPageId(_22a);if(_22f){var _230=com.ibm.mm.builder.utils.spaceUtil.getSpaceModel();var _231=_230.find(_22f).start();_22b=com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_231,_22e);}else{_22b=com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_22e);}return _22b;}else{if(type==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_LABEL){return null;}else{return null;}}};com.ibm.mm.builder.utils.acModelUtil.getPersonalPageAC=function(_232){var _233=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();_233.find(_232).start();var _234=_233.getLayoutModel(_232);var _235=_234.getRoot().start();var _236=com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_235);return _236;};com.ibm.mm.builder.utils.acModelUtil.getSpacePageAC=function(_237,_238){var _239=com.ibm.mm.builder.utils.spaceUtil.getSpaceModel();var _23a=_239.find(_237).start();var _23b=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();_23b.find(_238).start();var _23c=_23b.getLayoutModel(_238);var _23d=_23c.getRoot().start();return com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_23a,_23d);};com.ibm.mm.builder.utils.acModelUtil.canEditSpace=function(_23e){var _23f=com.ibm.mm.builder.utils.spaceUtil.getSpaceNode(_23e);var ea=com.ibm.mashups.enabler.ac.AccessFactory.getEffectiveAccess(_23f);if(ea.hasRole("editor")||ea.hasRole("manager")){return true;}return false;};com.ibm.mm.builder.utils.acModelUtil.getSpaceAC=function(_240){if(!_240){return null;}var _241=com.ibm.mm.builder.utils.spaceUtil.getSpaceModel();var _242=_241.find(_240).start();return com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_242);};com.ibm.mm.builder.utils.acModelUtil.getAllMembersInModel=function(_243){var _244=[];if(_243.isInitialized()){var _245=_243.getRoleModel();_245.setCursorPosition(0);var _246=_245.iterator();if(_246){while(_246.hasNext()){var role=_246.next();if(!role){continue;}var _247=_245.getMemberModel(role);if(!_247){continue;}_247.setCursorPosition(0);var _248=_247.iterator();if(!_248){continue;}while(_248.hasNext()){var _249=_248.next();if(!_249){continue;}_244.push(_249.getEntity());}}}}return _244;};com.ibm.mm.builder.utils.acModelUtil.getMemberListFromRoleModel=function(_24a,_24b){var _24c=[];if(_24b.isInitialized()){var _24d=_24b.getRoleModel();_24d.setCursorPosition(0);var _24e=_24d.iterator();if(!_24e){return _24c;}while(_24e.hasNext()){var role=_24e.next();if(!role||(role.getRoleType()!=_24a)){continue;}var _24f=_24d.getMemberModel(role);if(!_24f){continue;}_24f.setCursorPosition(0);var _250=_24f.iterator();if(!_250){continue;}while(_250.hasNext()){var _251=_250.next();if(!_251){continue;}_24c.push(_251.getEntity());}}}return _24c;};com.ibm.mm.builder.utils.acModelUtil.removeAllMembers=function(_252){com.ibm.mm.builder.utils.acModelUtil.removeViewers(_252);com.ibm.mm.builder.utils.acModelUtil.removeEditors(_252);};com.ibm.mm.builder.utils.acModelUtil.removeViewers=function(_253,_254){com.ibm.mm.builder.utils.acModelUtil.removeMembersWithRoleType(_253,com.ibm.mashups.enabler.ac.RoleType.USER,_254);};com.ibm.mm.builder.utils.acModelUtil.removeEditors=function(_255,_256){com.ibm.mm.builder.utils.acModelUtil.removeMembersWithRoleType(_255,com.ibm.mashups.enabler.ac.RoleType.EDITOR,_256);};com.ibm.mm.builder.utils.acModelUtil.removeMembersWithRoleType=function(_257,_258,_259){var _25a=com.ibm.mm.builder.utils.userUtil.getCurrentUserID();var _25b=(arguments.length==2);if(!_25b&&!_259){return;}var _25c=_257.getRoleModel();_25c.setCursorPosition(0);var _25d=_25c.iterator();if(!_25d){return;}while(_25d.hasNext()){var role=_25d.next();if(!role||(role.getRoleType()!=_258)){continue;}var _25e=_25c.getMemberModel(role);if(!_25e){continue;}_25e.setCursorPosition(0);var _25f=_25e.iterator();if(!_25f){continue;}while(_25f.hasNext()){var _260=_25f.next();if(!_260){continue;}var _261=_260.getEntity();if(_261.getID()!=_25a){if(!_25b){for(var id in _259){if((_261.getID()==id)&&(_261.getEntityType()==_259[id])){_25e.remove(_260);break;}}}else{_25e.remove(_260);}}}}};com.ibm.mm.builder.utils.acModelUtil.isPageOwner=function(_262){return this.isOwner(_262);};com.ibm.mm.builder.utils.acModelUtil.isSpaceOwner=function(_263){if(!_263){return false;}if(!_263.declaredClass){_263=com.ibm.mm.builder.utils.spaceUtil.getSpaceNode(_263);}if(_263){var _264=this.getSpaceOwner(_263.getID());if(_264){return _264.getID()===com.ibm.mm.builder.utils.userUtil.getCurrentUserID();}}return false;};}if(!dojo._hasResource["com.ibm.mm.builder.utils.iwidgetUtil"]){dojo._hasResource["com.ibm.mm.builder.utils.iwidgetUtil"]=true;dojo.provide("com.ibm.mm.builder.utils.iwidgetUtil");dojo.require("dojox.uuid.Uuid");dojo.require("dojox.uuid.generateTimeBasedUuid");com.ibm.mm.builder.utils.iwidgetUtil.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.utils.iwidgetUtil");com.ibm.mm.builder.utils.iwidgetUtil.dumpItemSetsToJSON=function(att){var obj={};dojo.forEach(att.getAllNames(),function(name){obj[name]=att.getItemValue(name);});return dojo.toJson(obj);};com.ibm.mm.builder.utils.iwidgetUtil.loadItemSetsFromJSON=function(att,_265){if(_265){var obj=dojo.fromJson(_265);for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){att.setItemValue(key,obj[key],false);}}}};com.ibm.mm.builder.utils.iwidgetUtil.loadItemSetsFromJSONObject=function(att,_266){if(_266){for(var key in _266){if(Object.prototype.hasOwnProperty.call(_266,key)){att.setItemValue(key,_266[key],false);}}}};com.ibm.mm.builder.utils.iwidgetUtil.getWidgetInstanceIcon=function(_267){var _268=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_267);if(!_268){return com.ibm.mm.builder.constant.generic_widget_icon;}else{var _269=_268.getIWidgetInstance().getIDescriptorItems().getItemValue("icon");var _26a=com.ibm.mashups.enabler.utils.EndpointHelper.resolve(_269);var _26b=_26a||com.ibm.mm.builder.constant.generic_widget_icon;if(builderConfig.isBidi){return this.getRtlIconUrl(_26b);}return _26b;}};com.ibm.mm.builder.utils.iwidgetUtil.getOriginalWidgetInstanceTitle=function(_26c){var _26d=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_26c);if(!_26d){return null;}var idi=_26d.getIWidgetInstance().getIDescriptorItems();return unescape(idi.getItemValue("title",dojo.locale)||idi.getItemValue("title",ibmConfig["default.locale"]));};com.ibm.mm.builder.utils.iwidgetUtil.getWidgetInstanceTitle=function(_26e){return com.ibm.mm.builder.utils.htmlUtil.escapeString(this.getOriginalWidgetInstanceTitle(_26e));};com.ibm.mm.builder.utils.iwidgetUtil.saveWidgetInstanceTitleAndIcon=function(_26f,_270,_271){this.saveWidgetInstanceTitle(_26f,_270,dojo.locale);this.saveWidgetInstanceIcon(_26f,_271);};com.ibm.mm.builder.utils.iwidgetUtil.saveWidgetInstanceTitle=function(_272,_273,_274){var _275=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_272);if(_275){var _276="-";var _277=_274.split("-");if(_277.length==1){_277=_274.split("_");_276="_";}if(_277.length>=2){_277[1]=_277[1].toUpperCase();}var _278="";for(var i=0;i<_277.length;i++){_278=_278+_277[i];if(i<_277.length-1){_278=_278+_276;}}var _279=_275.getIWidgetInstance();var md=_279.getIDescriptorItems();md.setItemValue("title",escape(_273),false,_278);com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().commit().start();}};com.ibm.mm.builder.utils.iwidgetUtil.formatWidgetTitle=function(_27a){if(!_27a){return "";}return _27a.replace(/^(&nbsp;)*/,"").replace(/</g,"&lt;").replace(/>/g,"&gt;");};com.ibm.mm.builder.utils.iwidgetUtil.saveWidgetInstanceIcon=function(_27b,_27c){var _27d=this.getiWidgetWrapper(_27b);var md=_27d.getIDescriptorItems();if(!_27c){_27c="/wps/mccbuilder.v3001/images/generic_widget_icon.gif";}md.setItemValue("icon",_27c);com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().commit().start();};com.ibm.mm.builder.utils.iwidgetUtil.getRtlIconUrl=function(_27e){if(!_27e||_27e.match("_rtl")){return _27e;}var _27f=_27e;var _280=this.getRtlIconToTest(_27e);try{var xhr=this.getXhr();if(xhr&&_280){xhr.onreadystatechange=function(){};xhr.open("HEAD",_280,false);xhr.send(null);if(xhr.readyState==4&&xhr.status==200){_27f=_280;}}}catch(err){}return _27f;};com.ibm.mm.builder.utils.iwidgetUtil.getRtlIconToTest=function(_281){if(!_281){return _281;}var _282=_281.lastIndexOf(".");var _283=_281.substr(0,_282);var _284=_281.substr(_282+1);return _283.concat("_rtl.",_284);};com.ibm.mm.builder.utils.iwidgetUtil.getXhr=function(){if(window.ActiveXObject){try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(err){return;}}}else{if(window.XMLHttpRequest){return new XMLHttpRequest();}}};com.ibm.mm.builder.utils.iwidgetUtil.getiWidgetWrapper=function(_285){return com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_285).getIWidgetInstance();};com.ibm.mm.builder.utils.iwidgetUtil.updateWidgetIDescriptor=function(_286,_287){var _288=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_286);if(_288){var _289=_288.getIWidgetInstance();var md=_289.getIDescriptorItems();var _28a=_287.getIconURL(false);if(!_28a){_28a="/wps/mccbuilder.v3001/images/generic_widget_icon.gif";}md.setItemValue("icon",_28a);dojo.forEach(_287.getLocales(),function(l){md.setItemValue("title",escape(_287.getTitle(l)),false,l);});com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().commit().start();}};com.ibm.mm.builder.utils.iwidgetUtil.definitionMap={};com.ibm.mm.builder.utils.iwidgetUtil.updateWidgetInstance=function(_28b,_28c){var self=com.ibm.mm.builder.utils.iwidgetUtil;if(_28c){self.definitionMap[_28b.id]=_28c;}dojo.publish("/com/ibm/mashups/livetext/livetextchanged",[_28b,false,function(_28d,_28e){},function(_28f,_290,_291){var _292=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_28b.id);if(_292){var wdid=self.definitionMap[_28b.id];if(wdid){var _293=com.ibm.mm.builder.utils.toolboxUtil.getWidgetDefinition(wdid);self.updateWidgetIDescriptor(_28b.id,_293);self.definitionMap[_28b.id]=null;}com.ibm.mm.builder.utils.skinUtil.updateTitleAndIcon(_28b.id);}}]);};com.ibm.mm.builder.utils.iwidgetUtil.getWidgetXMLURL=function(_294){var def=dojo.query(".mm_Definition",dojo.byId(_294))[0];if(!def){def=dojo.query(".iw-Definition",dojo.byId(_294))[0];}if(def){return def.getAttribute("href");}else{return "";}};com.ibm.mm.builder.utils.iwidgetUtil._getUid=function(){return "ns_"+dojox.uuid.generateTimeBasedUuid().replace(/\-/g,"");};com.ibm.mm.builder.utils.iwidgetUtil.loadWidgets=function(div,_295){dojo.publish("/com/ibm/mashups/livetext/livetextchanged",[div,false,function(_296,_297){var _298=_297.length;var _299=0;var cb=function(){_299++;if(_299==_298){if(_295){_295();}}};dojo.forEach(_297,function(tag){var _29a=tag.getAttribute("lazyLoad");if(!_29a||(_29a&&_29a!="true")){dojo.subscribe(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+tag.id,this,cb);}else{cb();}});},function(_29b,_29c,_29d){}]);};com.ibm.mm.builder.utils.iwidgetUtil.toggleMarkedSandboxWidget=function(_29e){var tu=com.ibm.mm.builder.utils.toolboxUtil;var _29f=this.isMarkedSandboxWidget(_29e)?"false":"true";tu.getWidgetDefinition(_29e).setMetadata("sandbox_user",_29f);tu.getCatalogModel().commit().start();return _29f=="true";};com.ibm.mm.builder.utils.iwidgetUtil.isWidgetTrusted=function(_2a0){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _2a1=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SANDBOXENABLED);if(!_2a1){return false;}return com.ibm.mm.builder.utils.iwidgetUtil.isTrustedWidget(_2a0);};com.ibm.mm.builder.utils.iwidgetUtil.isMarkedSandboxWidget=function(_2a2){return "true"==com.ibm.mm.builder.utils.toolboxUtil.getWidgetDefinition(_2a2).getMetadata("sandbox_user");};com.ibm.mm.builder.utils.iwidgetUtil.isSandboxWidget=function(_2a3){return "true"==com.ibm.mm.builder.utils.toolboxUtil.getWidgetDefinition(_2a3).getMetadata("sandbox_definition");};com.ibm.mm.builder.utils.iwidgetUtil.isDisabledSandboxWidget=function(_2a4){if(!this.diabledSandboxList){if(dojo.isString(builderConfig.sandboxDisabled)){this.diabledSandboxList=[builderConfig.sandboxDisabled];}else{this.diabledSandboxList=builderConfig.sandboxDisabled;}}if(this.diabledSandboxList.length===0){return false;}var _2a5=com.ibm.mm.builder.utils.toolboxUtil.getWidgetDefinition(_2a4).getDefinitionURL(false);for(var i=0;i<this.diabledSandboxList.length;i++){if(dojo.trim(_2a5)===dojo.trim(this.diabledSandboxList[i])){return true;}else{if(dojo.trim(_2a5).indexOf(dojo.trim(this.diabledSandboxList[i]))!==-1&&dojo.trim(this.diabledSandboxList[i]).indexOf("/")!==0){return true;}else{if(dojo.trim(_2a5).indexOf(dojo.trim(this.diabledSandboxList[i]))!==-1&&dojo.trim(this.diabledSandboxList[i]).indexOf("/")===0&&dojo.trim(_2a5).indexOf(":")!==-1){var buf=_2a5.split("//");var _2a6=buf[0];var buf2=buf[1].split("/");var host=buf2[0];if(_2a6==window.location.protocol&&window.location.host==host){return true;}else{if(_2a6==window.location.protocol&&_2a6=="http:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="80"){return true;}}else{if(_2a6==window.location.protocol&&_2a6=="https:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="443"){return true;}}}}}}}}return false;};com.ibm.mm.builder.utils.iwidgetUtil.isTrustedWidget=function(_2a7){return this.isDisabledSandboxWidget(_2a7)||!(this.isSandboxWidget(_2a7)||this.isMarkedSandboxWidget(_2a7));};com.ibm.mm.builder.utils.iwidgetUtil.invokeCallbackByWidgetInstanceId=function(_2a8,_2a9){var _2aa=null;if(!_2a8||!_2a9){return _2aa;}var wm=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_2a8);if(wm&&wm.loaded){_2a9();}else{var _2ab=com.ibm.mashups.services.ServiceManager.getService("eventService");_2aa=_2ab.subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_2a8,null,_2a9);}return _2aa;};com.ibm.mm.builder.utils.iwidgetUtil.hideWidget=function(_2ac){var _2ad=dojo.byId(com.ibm.mm.builder.constant.skinIdPrefix+_2ac);if(_2ad){_2ad.style.display="none";}};com.ibm.mm.builder.utils.iwidgetUtil.showWidget=function(_2ae){var _2af=dojo.byId(com.ibm.mm.builder.constant.skinIdPrefix+_2ae);if(_2af){_2af.style.display="";}};com.ibm.mm.builder.utils.iwidgetUtil.getWidgetSpanByMetadata=function(_2b0,_2b1){var _2b2=null;var _2b3=dojo.fromJson(_2b0.widgetParam);var _2b4={id:_2b0.id,_md:_2b0};_2b4.getID=function(){return this._md.id;};_2b4.getTitle=function(_2b5){if(!this._md.title){return null;}return this._md.title[_2b5];};_2b4.getLocales=function(){if(!this._md.title){return [];}if(!this.locales){this.locales=[];for(var l in this._md.title){if(Object.prototype.hasOwnProperty.call(this._md.title,l)){this.locales.push(l);}}}return this.locales;};_2b4.getIconURL=function(){return this._md.icon;};com.ibm.mm.builder.utils.toolboxUtil.setWidgetDefinition(_2b4);if(_2b3&&_2b3.length){_2b2=com.ibm.mm.builder.utils.iWidgetSpecUtil.newItemSetSpan();dojo.forEach(_2b3,function(item){com.ibm.mm.builder.utils.iWidgetSpecUtil.newItemSetKeyValue(_2b2,item.itemName,item.itemValue);});}if(_2b1){_2b2=_2b2||com.ibm.mm.builder.utils.iWidgetSpecUtil.newItemSetSpan();for(var key in _2b1){if(Object.prototype.hasOwnProperty.call(_2b1,key)){var ii=dojo.query("[href='#"+key+"']",_2b2);if(ii&&ii[0]){ii[0].innerHTML=_2b1[key];}else{com.ibm.mm.builder.utils.iWidgetSpecUtil.newItemSetKeyValue(_2b2,key,_2b1[key]);}}}}var _2b6=document.createElement("span");if(this.widgetType!==null&&this.widgetType=="mm_OAGadget"){dojo.addClass(_2b6,com.ibm.mm.builder.constant.mmOAGadget);}else{if(this.widgetType!==null&&this.widgetType=="mm_OSGadget"){dojo.addClass(_2b6,com.ibm.mm.builder.constant.mmGGadget);}else{dojo.addClass(_2b6,com.ibm.mm.builder.constant.mmIWidget);}}_2b6.setAttribute(com.ibm.mm.builder.constant.widget_span_attr_id,""+this._getUid());var _2b7=com.ibm.mm.builder.freeLayOutBean||com.ibm.mm.builder.columnLayoutBean;if(_2b7){_2b6.setAttribute(com.ibm.mm.builder.constant.widget_span_attr_skin,_2b7.getSelectedSkin());}com.ibm.mm.builder.utils.iWidgetSpecUtil.setWidgetDefXML(_2b6,_2b0.definition);if(com.ibm.mm.builder.widget.sandboxEnabled){if(_2b0.sandbox_definition==="true"||_2b0.sandbox_user==="true"){_2b6.setAttribute("sandbox","true");}}if(_2b0["com.ibm.mashups.builder.autoWiringEnabled"]==="true"){_2b6.setAttribute("autowiringenabled","true");}if(_2b2){_2b6.appendChild(_2b2);}return _2b6;};com.ibm.mm.builder.utils.iwidgetUtil.getWidgetSupportedModes=function(_2b8){var _2b9=null;var _2ba=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_2b8);if(_2ba){var _2bb=_2ba.getIWidgetDefinition();_2bb.setFinishedCallback(function(_2bc,_2bd){if(_2bc){_2b9=_2bc.getSupportedModes();}});_2bb.start(false);}return _2b9;};com.ibm.mm.builder.utils.iwidgetUtil.isWidgetVisible=function(_2be){var _2bf=dojo.byId(_2be);if(_2bf){return _2bf.getAttribute("visible")?eval(_2bf.getAttribute("visible")):false;}return false;};com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2=function(lcId){var _2c0=com.ibm.mm.builder.utils.iwidgetUtil.getLayoutControl(lcId);var lc=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();var _2c1=lc.getPreferredLocale();var _2c2=_2c0.getTitle(_2c1);if(!_2c2){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _2c3=wm.getWidgetWindow(_2c0).start();if(_2c3){var _2c4=wm.getWidgetDefinitionByWindow(_2c3).start();if(_2c4){_2c2=com.ibm.mashups.enabler.context.Factory.getLocalizedContext().getTitle(_2c4);}}}return _2c2||"";};com.ibm.mm.builder.utils.iwidgetUtil.getWidgetIconCSA2=function(lcId){var lc=com.ibm.mm.builder.utils.iwidgetUtil.getLayoutControl(lcId);var icon=lc.getMetaData("thumbnail")||lc.getMetaData("icon");if(!icon){return com.ibm.mm.builder.constant.generic_widget_icon;}else{return icon;}};com.ibm.mm.builder.utils.iwidgetUtil.getLayoutControl=function(lcId){var _2c5=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _2c6=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _2c7=_2c6.find(_2c5).start();var _2c8=_2c6.getLayoutModel(_2c7);var _2c9=_2c8.find(lcId).start();return _2c9;};}if(!dojo._hasResource["com.ibm.mm.builder.utils.wireUtil"]){dojo._hasResource["com.ibm.mm.builder.utils.wireUtil"]=true;dojo.provide("com.ibm.mm.builder.utils.wireUtil");com.ibm.mm.builder.utils.wireUtil.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.utils.wireUtil");com.ibm.mm.builder.utils.wireUtil.highlightWidget=function(id){var _2ca=com.ibm.pb.layout.LayoutParser.findById(id);var _2cb=dojo.coords(_2ca);var _2cc=dojo._docScroll();var _2cd=dojo.byId("mmDiv_highlight");if(!_2cd){_2cd=document.createElement("div");_2cd.id="mmDiv_highlight";_2cd.style.position="absolute";_2cd.style.backgroundImage="url('"+builderConfig.builderPath+"/images/widget_highligh_color.png')";document.body.appendChild(_2cd);}_2cd.style.display="none";_2cd.style.cssText+="; left: "+(_2cb.x+_2cc.x)+"px; "+"top: "+(_2cb.y+_2cc.y)+"px; "+"width: "+_2cb.w+"px; "+"height: "+_2cb.h+"px; "+"zIndex: 780;";_2cd.style.display="";};com.ibm.mm.builder.utils.wireUtil.removeHighlight=function(){var _2ce=dojo.byId("mmDiv_highlight");if(_2ce){_2ce.style.display="none";}};com.ibm.mm.builder.utils.wireUtil.triggerAutowire=function(lcId){var _2cf=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getAutoWiringEnablement();if(_2cf){var _2d0=com.ibm.mm.builder.utils.wireUtil.isAutowireEnabled(lcId);if(_2d0){com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.createAutoWire",lcId);}}};com.ibm.mm.builder.utils.wireUtil.isAutowireEnabled=function(lcId){var lc=com.ibm.mm.builder.utils.wireUtil.getLayoutControl(lcId);var _2d1=lc.getMetaData("onAutoWire");return (_2d1=="true"?true:false);};com.ibm.mm.builder.utils.wireUtil.getLayoutControl=function(lcId){var _2d2=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _2d3=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _2d4=_2d3.find(_2d2).start();var _2d5=_2d3.getLayoutModel(_2d4);var _2d6=_2d5.find(lcId).start();return _2d6;};com.ibm.mm.builder.utils.wireUtil.getEventByNameAndType=function(_2d7,_2d8,type){var _2d9=new Object();_2d9[type]=true;var _2da=_2d7.getEvents(_2d9);var _2db=null;for(var i=0,l=_2da.length;i<l;i++){var evt=_2da[i];if(evt.getName()==_2d8){_2db=_2d7.getEventByID(evt.getID());}}return _2db;};com.ibm.mm.builder.utils.wireUtil.addWireCSA2=function(_2dc,_2dd,_2de,_2df){var _2e0=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _2e1=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _2e2=_2e1.find(_2e0).start();var _2e3=_2e1.getLayoutModel(_2e2);var _2e4=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _2e5=_2e3.find(_2dc).start();var _2e6=_2e4.getWidgetWindow(_2e5).start();var _2e7=_2e4.getHierarchicalEventProvider(_2e6).start();var _2e8=com.ibm.mm.builder.utils.wireUtil.getEventByNameAndType(_2e7,_2dd,com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS);var _2e9=_2e3.find(_2de).start();var _2ea=_2e4.getWidgetWindow(_2e9).start();var _2eb=_2e4.getHierarchicalEventProvider(_2ea).start();var _2ec=com.ibm.mm.builder.utils.wireUtil.getEventByNameAndType(_2eb,_2df,com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS);var ctx={};ctx.sourceWidgetId=_2e6;ctx.sourcePageId=_2e2;ctx.sourceEventId=_2e8;ctx.targetWidgetId=_2ea;ctx.targetPageId=_2e2;ctx.targetEventId=_2ec;var _2ed=_2e3.getWireModel();var wire=_2ed.create(ctx);var _2ee=com.ibm.mm.builder.utils.wireUtil.isWireCreated(_2ed,wire,_2e6);if(!_2ee&&wire){_2ed.insert(wire,null);com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);}return !_2ee;};com.ibm.mm.builder.utils.wireUtil.isWireCreated=function(_2ef,_2f0,_2f1){var _2f2=_2ef.findBySourceWidget(_2f1).start();for(var i=0;i<_2f2.length;i++){var wire=_2f2[i];var _2f3=wire.getSourceWidget().getID();var _2f4=_2f0.getSourceWidget().getID();var _2f5=wire.getTargetWidget().getID();var _2f6=_2f0.getTargetWidget().getID();var _2f7=wire.getSourceEvent().getID();var _2f8=_2f0.getSourceEvent().getID();var _2f9=wire.getTargetEvent().getID();var _2fa=_2f0.getTargetEvent().getID();if(_2f3==_2f4&&_2f5==_2f6&&_2f7==_2f8&&_2f9==_2fa){return true;}}return false;};com.ibm.mm.builder.utils.wireUtil.getAllLayoutControlsCSA2=function(_2fb){var _2fc=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _2fd=_2fc.find(_2fb).start();var _2fe=_2fc.getLayoutModel(_2fd);var _2ff=[];if(_2fe){var _300=_2fe.getRoot().start();if(_2fe.hasChildren(_300)){_2ff=com.ibm.mm.builder.utils.wireUtil._findControlInContainer(_2fe,_300,_2ff);}}return _2ff;};com.ibm.mm.builder.utils.wireUtil._findControlInContainer=function(_301,node,_302){if(node.getLayoutNodeType()=="LayoutContainer"){var _303=_301.getChildren(node);_303.setCursorPosition(0);while(_303.hasNext()){var _304=_303.next();_302=com.ibm.mm.builder.utils.wireUtil._findControlInContainer(_301,_304,_302);}}else{if(node.getLayoutNodeType()=="LayoutControl"){_302.push(node);}}return _302;};com.ibm.mm.builder.utils.wireUtil.getAllWidgetsInLayouts=function(_305){var _306=[];if(_305){for(var i=0;i<_305.length;i++){try{var _307=eval("_"+_305[i]+"_iContext.scope.getWidgets()");_306=_306.concat(_307);}catch(e){continue;}}}return _306;};com.ibm.mm.builder.utils.wireUtil.getAllMatchHandleEvents=function(id,_308,_309){com.ibm.mm.builder.utils.wireUtil.LOGGER.entering("wireUtil: getMatchHandleEvents with "+_308);var _30a=[];var _30b=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);if(!_30b){return _30a;}var _30c=_30b.getPublicEvent(_308);var _30d=com.ibm.mm.builder.utils.wireUtil.getAllWidgetsInLayouts(_309);var len=_30d.length;var _30e=0;for(var x=0;x<len;x++){var _30f=_30d[x];var _310=dojo.byId(_30f);if(_30f!=id&&_310.getAttribute("internalWidget")!="true"){_30e=0;var _311=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_30f);if(!_311||_311.isLoaded()===false){continue;}var _312=[];var _313=false;var _314=[];var type=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetInstanceTitle(_30f);var _315=_311.getWidgetHandledEvents();if(_315!==null){for(var n=0;n<_315.length;n++){var _316=_315[n];if(_316.getAttribute("private")!="true"){var _317=false;var _318=false;var _319=com.ibm.mm.builder.utils.wireUtil.isEventFlexCompatible(_30c,_316);if(_319){_313=true;_318=true;var _31a=_311.getWires();if(_31a===null){_31a=[];}for(var i=0;i<_31a.length;i++){aWire=_31a[i];if(id==aWire.getSourceWidgetID()&&_308==aWire.getSourceEventName()&&_316.name==aWire.getTargetEventName()){_317=true;_30e++;_314.push(aWire);}}}var _31b=com.ibm.mm.builder.utils.wireUtil.createMatchEvent(_30f,type,_318,_317,_316.name,_316.type,_316.description);_312.push(_31b);}}}_30a.push(com.ibm.mm.builder.utils.wireUtil.createMatchWidget(_30f,type,_313,_30e,_312,_314,_311.getWires()));}}com.ibm.mm.builder.utils.wireUtil.LOGGER.exiting("wireUtil: getMatchHandleEvents with "+_308);return _30a;};com.ibm.mm.builder.utils.wireUtil.getAllMatchPubEvents=function(id,_31c,_31d){com.ibm.mm.builder.utils.wireUtil.LOGGER.entering("wireUtil: getAllMatchPubEvents");var _31e=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);var _31f=[];if(!_31e){return _31f;}var _320=_31e.getPublicEvent(_31c);var _321=com.ibm.mm.builder.utils.wireUtil.getAllWidgetsInLayouts(_31d);var len=_321.length;var _322=_31e.getWires();if(_322===null){_322=[];}for(var x=0;x<len;x++){var _323=_321[x];var _324=dojo.byId(_323);if(_323!=id&&_324.getAttribute("internalWidget")!="true"){var _325=0;var _326=[];var _327=false;var _328=[];var _329=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_323);if(!_329||_329.isLoaded()===false){continue;}var type=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetInstanceTitle(_323);var _32a=_329.getWidgetPublishedEvents();if(_32a!==null){for(var n=0;n<_32a.length;n++){var _32b=_32a[n];if(_32b.getAttribute("private")!="true"){var _32c=false;var _32d=false;var _32e=com.ibm.mm.builder.utils.wireUtil.isEventFlexCompatible(_32b,_320);if(_32e){_327=true;_32d=true;for(var i=0;i<_322.length;i++){aWire=_322[i];if(_323==aWire.getSourceWidgetID()&&_32b.name==aWire.getSourceEventName()&&_31c==aWire.getTargetEventName()){_32c=true;_325++;_328.push(aWire);}}}var _32f=com.ibm.mm.builder.utils.wireUtil.createMatchEvent(_323,type,_32d,_32c,_32b.name,_32b.type,_32b.description);_326.push(_32f);}}}_31f.push(com.ibm.mm.builder.utils.wireUtil.createMatchWidget(_323,type,_327,_325,_326,_328,_329.getWires()));}}com.ibm.mm.builder.utils.wireUtil.LOGGER.exiting("wireUtil: getAllMatchPubEvents");return _31f;};com.ibm.mm.builder.utils.wireUtil.createMatchWidget=function(id,type,_330,_331,_332,_333,_334){var _335={};_335.id=id;_335.type=type;_335.hasMatchEvent=_330;_335.totalWiredEvents=_331;_335.events=_332;_335.wiredEvents=_333;_335.receivedWires=_334;return _335;};com.ibm.mm.builder.utils.wireUtil.createMatchEvent=function(id,type,_336,_337,_338,_339,_33a){var _33b={};_33b.id=id;_33b.type=type;_33b.isMatch=_336;_33b.isWired=_337;_33b.name=_338;_33b.payloadType=_339;_33b.description=_33a;return _33b;};com.ibm.mm.builder.utils.wireUtil.createWireSpan=function(_33c,_33d,_33e){var _33f=document.createElement("span");_33f.className=com.ibm.mm.builder.constant.receivedEvent;var _340=document.createElement("a");_340.className=com.ibm.mm.builder.constant.iwSourceEvent;_340.setAttribute("href","#"+_33c);_340.innerHTML=_33d;var _341=document.createElement("span");_341.className=com.ibm.mm.builder.constant.iwTargetEvent;_341.innerHTML=_33e;_33f.appendChild(_340);_33f.appendChild(_341);return _33f;};com.ibm.mm.builder.utils.wireUtil.addWireWhenMatch=function(_342,_343){var _344=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_342);if(!_344){return false;}var _345=_344.getWidgetPublishedEvents();var _346=_345[0].name;var _347=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_343);if(!_347){return false;}var _348=_347.getWidgetHandledEvents();var _349=_348[0].name;var rc=com.ibm.mm.builder.utils.wireUtil.addWire(_342,_346,_343,_349);return rc;};com.ibm.mm.builder.utils.wireUtil.addWire=function(_34a,_34b,_34c,_34d){var rc=false;var _34e=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _34f=_34e.find(_34c);if(_34f!==null){var _350=_34f.getIWidgetInstance();_350.addWire(_34a,_34b,_34d);var _351=_34e.commit();_351.start(false);rc=true;}return rc;};com.ibm.mm.builder.utils.wireUtil.isWireExist=function(_352,_353,_354,_355){var _356=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_354);if(!_356){return false;}var _357=_356.getWires();var _358=false;for(var i=0;i<_357.length;i++){var wire=_357[i];if(_352==wire.getSourceWidgetID()&&_353==getSourceEventName()&&_354==getTargetWidgetID()&&_355==getTargetEventName()){_358=true;break;}}return _358;};com.ibm.mm.builder.utils.wireUtil.removeWire=function(_359,_35a,_35b,_35c){var rc=false;var _35d=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _35e=_35d.find(_35b);if(_35e!==null){var _35f=_35e.getIWidgetInstance();_35f.removeWire(_359,_35a,_35c);var _360=_35d.commit();_360.start();rc=true;}return rc;};com.ibm.mm.data.dataTypeChecker=null;com.ibm.mm.builder.utils.wireUtil.dataTypeChecker=function(){if(com.ibm.mm.data.dataTypeChecker===null){com.ibm.mm.data.dataTypeChecker=new com.ibm.mm.data.datatypes();}return com.ibm.mm.data.dataTypeChecker;};com.ibm.mm.builder.utils.wireUtil.isEventCompatible=function(_361,_362){if(_361===null||_362===null){return false;}var _363=com.ibm.mm.builder.utils.wireUtil.dataTypeChecker();var _364=_363.doesTypeMatch(_362.type,_361.type);return _364;};com.ibm.mm.builder.utils.wireUtil.isEventFlexCompatible=function(_365,_366){if(_365===null||_366===null){return false;}var _367=com.ibm.mm.builder.utils.wireUtil.dataTypeChecker();var _368=_367.doesTypeFlexMatch(_366.type,_365.type);return _368;};com.ibm.mm.builder.utils.wireUtil.isWidgetCompatible=function(_369,_36a){if(_369===null||_36a===null||_369==_36a){return false;}var _36b=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_36a);if(!_36b){return false;}var _36c=_36b.getWidgetHandledEvents();var _36d=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_369);if(!_36d){return false;}var _36e=_36d.getWidgetPublishedEvents();if(_36e===null||_36c===null||_36e.length<1||_36c.length<1){return false;}var _36f=_36e[0].type;var _370=_36c[0].type;var _371=com.ibm.mm.builder.utils.wireUtil.dataTypeChecker();var _372=_371.doesTypeMatch(_370,_36f);return _372;};com.ibm.mm.builder.utils.wireUtil.isEventCompatibleForAutowire=function(_373,_374){if(_373===null||_374===null){return false;}if(_373.name!=_374.name){return false;}if(_373.type=="any"||_374.type=="any"||_373.type!=_374.type){return false;}return true;};com.ibm.mm.builder.utils.wireUtil.isEventCompatibleForAutowireCSA2=function(_375,_376){if(_375===null||_376===null){return false;}if(_375.getName()!=_376.getName()){return false;}if(_375.getPayloadType()=="any"||_376.getPayloadType()=="any"||_375.getPayloadType()!=_376.getPayloadType()){return false;}return true;};com.ibm.mm.builder.utils.wireUtil.setupAutoWiring=function(id){var _377={"widgetId":id,"hasAutoWire":false,"publishTo":[],"receiveFrom":[]};var lcId=id;var _378={};var _379={};var lc=com.ibm.mm.builder.utils.wireUtil.getLayoutControl(lcId);var _37a=com.ibm.mm.builder.utils.wireUtil.getWidgetPublishedEventsCSA2(lc);var _37b=com.ibm.mm.builder.utils.wireUtil.getWidgetHandledEventsCSA2(lc);var _37c=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _37d=com.ibm.mm.builder.utils.wireUtil.getAllLayoutControlsCSA2(_37c);var len=_37d.length;for(var x=0;x<len;x++){var _37e=_37d[x];if(_37e.getID()!=lcId){var _37f=com.ibm.mm.builder.utils.wireUtil.isAutowireEnabled(_37e.getID());if(_37f){if(_37a!=null){var _380=_37a.length;for(var y=0;y<_380;y++){var _381=com.ibm.mm.builder.utils.wireUtil.getWidgetHandledEventsCSA2(_37e);if(_381!=null){for(var n=0;n<_381.length;n++){var _382=_381[n];var _383=com.ibm.mm.builder.utils.wireUtil.isEventCompatibleForAutowireCSA2(_37a[y],_382);if(_383){var _384=_37e.getID();com.ibm.mm.builder.utils.wireUtil.addWireCSA2(lcId,_37a[y].getName(),_384,_382.getName());_377.hasAutoWire=true;if(_378[_384]==undefined){_377.publishTo.push(_384);_378[_384]=true;}}}}}}if(_37b!=null){var _385=_37b.length;for(var z=0;z<_385;z++){var _386=com.ibm.mm.builder.utils.wireUtil.getWidgetPublishedEventsCSA2(_37e);if(_386!=null){for(var m=0;m<_386.length;m++){var _387=_386[m];var _383=com.ibm.mm.builder.utils.wireUtil.isEventCompatibleForAutowireCSA2(_387,_37b[z]);if(_383){var _388=_37e.getID();com.ibm.mm.builder.utils.wireUtil.addWireCSA2(_388,_387.getName(),lcId,_37b[z].getName());_377.hasAutoWire=true;if(_379[_388]==undefined){_377.receiveFrom.push(_388);_379[_388]=true;}}}}}}}}}return _377;};com.ibm.mm.builder.utils.wireUtil.checkAutoWiringCSA2=function(id){var _389=com.ibm.mm.builder.utils.wireUtil.isAutowireEnabled(id);if(!_389){return false;}var lc=com.ibm.mm.builder.utils.wireUtil.getLayoutControl(id);var _38a=com.ibm.mm.builder.utils.wireUtil.getWidgetPublishedEventsCSA2(lc);var _38b=com.ibm.mm.builder.utils.wireUtil.getWidgetHandledEventsCSA2(lc);var _38c=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _38d=com.ibm.mm.builder.utils.wireUtil.getAllLayoutControlsCSA2(_38c);var len=_38d.length;for(var x=0;x<len;x++){var _38e=_38d[x];if(_38e.getID()!=id){var _38f=com.ibm.mm.builder.utils.wireUtil.isAutowireEnabled(_38e.getID());if(_38f){if(_38a!=null){var _390=_38a.length;for(var y=0;y<_390;y++){var _391=com.ibm.mm.builder.utils.wireUtil.getWidgetHandledEventsCSA2(_38e);if(_391!=null){for(var n=0;n<_391.length;n++){var _392=_391[n];var _393=com.ibm.mm.builder.utils.wireUtil.isEventCompatibleForAutowireCSA2(_38a[y],_392);if(_393){return true;}}}}}if(_38b!=null){var _394=_38b.length;for(var z=0;z<_394;z++){var _395=com.ibm.mm.builder.utils.wireUtil.getWidgetPublishedEventsCSA2(_38e);if(_395!=null){for(var m=0;m<_395.length;m++){var _396=_395[m];var _393=com.ibm.mm.builder.utils.wireUtil.isEventCompatibleForAutowireCSA2(_396,_38b[z]);if(_393){return true;}}}}}}}}return false;};com.ibm.mm.builder.utils.wireUtil.checkAutoWiring=function(id){if(dojo.byId(id)===null||dojo.byId(id).getAttribute("autowiringenabled")!="true"){return false;}var _397=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);var _398=_397.getWidgetPublishedEvents();var _399=_397.getWidgetHandledEvents();var _39a=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentTheme();var _39b=_39a.getLayouts();var _39c=com.ibm.mm.builder.utils.wireUtil.getAllWidgetsInLayouts(_39b);var len=_39c.length;for(var x=0;x<len;x++){var _39d=_39c[x];if(_39d!=id){var _39e=dojo.byId(_39d);if(_39e.getAttribute("autowiringenabled")=="true"&&_39e.getAttribute("internalWidget")!="true"){var _39f=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_39d);if(_398!==null){for(var y=0;y<_398.length;y++){var _3a0=_39f.getWidgetHandledEvents();if(_3a0!==null){for(var n=0;n<_3a0.length;n++){var _3a1=_3a0[n];if(com.ibm.mm.builder.utils.wireUtil.isEventCompatibleForAutowire(_398[y],_3a1)){return true;}}}}}if(_399!==null){for(var z=0;z<_399.length;z++){var _3a2=_39f.getWidgetPublishedEvents();if(_3a2!==null){for(var m=0;m<_3a2.length;m++){var _3a3=_3a2[m];if(com.ibm.mm.builder.utils.wireUtil.isEventCompatibleForAutowire(_3a3,_399[z])){return true;}}}}}}}}return false;};com.ibm.mm.builder.utils.wireUtil.getWidgetPublishedEventsCSA2=function(_3a4){var _3a5=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _3a6=_3a5.getWidgetWindow(_3a4).start();var _3a7=_3a5.getHierarchicalEventProvider(_3a6).start();var _3a8=new Object();_3a8[com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS]=true;var _3a9=_3a7.getEvents(_3a8);return _3a9;};com.ibm.mm.builder.utils.wireUtil.getWidgetHandledEventsCSA2=function(_3aa){var _3ab=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _3ac=_3ab.getWidgetWindow(_3aa).start();var _3ad=_3ab.getHierarchicalEventProvider(_3ac).start();var _3ae=new Object();_3ae[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS]=true;var _3af=_3ad.getEvents(_3ae);return _3af;};com.ibm.mm.builder.utils.wireUtil.getAllMatchPubEventsCSA2=function(_3b0,_3b1,_3b2,_3b3){com.ibm.mm.builder.utils.wireUtil.LOGGER.entering("wireUtil: getAllMatchPubEventsCSA2");var _3b4=[];if(!_3b0){return _3b4;}var _3b5=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _3b6=_3b5.find(_3b2).start();var lm=_3b5.getLayoutModel(_3b6);var _3b7=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _3b8=_3b7.getWidgetWindow(_3b0).start();var _3b9=_3b7.getHierarchicalEventProvider(_3b8).start();var _3ba=com.ibm.mm.builder.utils.wireUtil.getEventByNameAndType(_3b9,_3b1,com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS);var _3bb=com.ibm.mm.builder.utils.wireUtil.getAllLayoutControlsCSA2(_3b2);var len=_3bb.length;for(var x=0;x<len;x++){var _3bc=_3bb[x];var _3bd=_3b7.getWidgetWindow(_3bc).start();if(_3bc!=_3b0){var _3be=0;var _3bf=[];var _3c0=false;var _3c1=[];var type=_3bc.getTitle(dojo.locale);if(!type){var _3c2=_3b7.getWidgetDefinitionByWindow(_3bd).start();type=_3c2.getTitle(dojo.locale);}var _3c3=com.ibm.mm.builder.utils.wireUtil.getWidgetPublishedEventsCSA2(_3bc);if(_3c3!==null){for(var n=0;n<_3c3.length;n++){var _3c4=_3c3[n];var _3c5=false;var _3c6=false;var _3c7=com.ibm.mm.builder.utils.wireUtil.isEventCompatibleCSA2(_3c4,_3ba,_3b3);if(_3c7){_3c0=true;_3c6=true;var _3c8=com.ibm.mm.builder.utils.wireUtil.getWiresSourceCSA2(_3bc,_3b2);if(_3c8===null){_3c8=[];}for(var i=0;i<_3c8.length;i++){var _3c9=_3c8[i];if(_3bd.getID()==_3c9.getSourceWidget().getID()&&_3b8.getID()==_3c9.getTargetWidget().getID()&&_3c4.getID()==_3c9.getSourceEvent().getID()&&_3ba.getID()==_3c9.getTargetEvent().getID()){_3c5=true;_3be++;_3c1.push(_3c9);}}}var _3ca=com.ibm.mm.builder.utils.wireUtil.createMatchEvent(_3bc.getID(),type,_3c6,_3c5,_3c4.getName(),_3c4.getPayloadType(),_3c4.getDescription(ibmConfig["default.locale"]));_3bf.push(_3ca);}}var _3cb=com.ibm.mm.builder.utils.wireUtil.getWiresSourceCSA2(_3bc,_3b2);_3b4.push(com.ibm.mm.builder.utils.wireUtil.createMatchWidget(_3bc.getID(),type,_3c0,_3be,_3bf,_3c1,_3cb));}}com.ibm.mm.builder.utils.wireUtil.LOGGER.exiting("wireUtil: getAllMatchPubEvents");return _3b4;};com.ibm.mm.builder.utils.wireUtil.getPublicEventCSA2=function(_3cc,_3cd){var _3ce=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _3cf=_3ce.getWidgetWindow(_3cc).start();var _3d0=_3ce.getHierarchicalEventProvider(_3cf).start();var _3d1=null;var _3d2=_3d0.getEvents(_3d1);if(_3d2&&_3d2!==null){var _3d3=[];for(var i=0;i<_3d2.length;i++){if(_3d2[i].isHandled()){_3d3.push(_3d2[i]);}}return _3d3;}return null;};com.ibm.mm.builder.utils.wireUtil.getWiresTargetCSA2=function(_3d4,_3d5){var _3d6=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _3d7=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _3d8=_3d7.find(_3d5).start();var lm=_3d7.getLayoutModel(_3d8);var _3d9=lm.getWireModel();var _3da=_3d6.getWidgetWindow(_3d4).start();var _3db=[];var _3dc=_3d9.iterator();if(_3dc!==null){_3dc.setCursorPosition(0);while(_3dc.hasNext()){var _3dd=_3dc.next();if(_3dd.getTargetWidget().getID()==_3da.getID()){_3db.push(_3dd);}}return _3db;}return null;};com.ibm.mm.builder.utils.wireUtil.getWiresSourceCSA2=function(_3de,_3df){var _3e0=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _3e1=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _3e2=_3e1.find(_3df).start();var lm=_3e1.getLayoutModel(_3e2);var _3e3=lm.getWireModel();var _3e4=_3e0.getWidgetWindow(_3de).start();var _3e5=[];var _3e6=_3e3.iterator();if(_3e6!==null){_3e6.setCursorPosition(0);while(_3e6.hasNext()){var _3e7=_3e6.next();if(_3e7.getSourceWidget().getID()==_3e4.getID()){_3e5.push(_3e7);}}return _3e5;}return null;};com.ibm.mm.builder.utils.wireUtil.isEventFlexCompatibleCSA2=function(_3e8,_3e9){if(_3e8===null||_3e9===null){return false;}var _3ea=com.ibm.mm.builder.utils.wireUtil.dataTypeChecker();var _3eb=_3ea.doesTypeFlexMatch(_3e9.getPayloadType(),_3e8.getPayloadType());return _3eb;};com.ibm.mm.builder.utils.wireUtil.isEventCompatibleByName=function(_3ec,_3ed){if(_3ec===null||_3ed===null){return false;}result=(_3ec.getName()===_3ed.getName());return result;};com.ibm.mm.builder.utils.wireUtil.isEventCompatibleByPayloadType=function(_3ee,_3ef){if(_3ee===null||_3ef===null){return false;}var _3f0=com.ibm.mm.builder.utils.wireUtil.dataTypeChecker();var _3f1=_3f0.doesTypeFlexMatch(_3ef.getPayloadType(),_3ee.getPayloadType());return _3f1;};com.ibm.mm.builder.utils.wireUtil.isEventCompatibleCSA2=function(_3f2,_3f3,_3f4){var _3f5=com.ibm.mm.builder.utils.wireUtil;var _3f6={SEMANTIC_TYPES_ONLY:0,PAYLOAD_TYPES_ONLY:1,SEMANTIC_OR_PAYLOAD_TYPES:2};var _3f7=false;if(_3f4===_3f6.SEMANTIC_TYPES_ONLY){_3f7=_3f5.isEventCompatibleByName(_3f2,_3f3);}else{if(_3f4===_3f6.PAYLOAD_TYPES_ONLY){_3f7=_3f5.isEventCompatibleByPayloadType(_3f2,_3f3);}else{_3f7=(_3f5.isEventCompatibleByName(_3f2,_3f3)||_3f5.isEventCompatibleByPayloadType(_3f2,_3f3));}}return _3f7;};com.ibm.mm.builder.utils.wireUtil.getAllMatchHandleEventsCSA2=function(_3f8,_3f9,_3fa,_3fb){com.ibm.mm.builder.utils.wireUtil.LOGGER.entering("wireUtil: getMatchHandleEvents with "+_3f9);var _3fc=[];if(!_3f8){return _3fc;}var _3fd=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _3fe=_3fd.find(_3fa).start();var lm=_3fd.getLayoutModel(_3fe);var _3ff=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _400=lm.getWireModel();var _401=_3ff.getWidgetWindow(_3f8).start();var _402=_3ff.getHierarchicalEventProvider(_401).start();var _403=com.ibm.mm.builder.utils.wireUtil.getEventByNameAndType(_402,_3f9,com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS);var _404=com.ibm.mm.builder.utils.wireUtil.getAllLayoutControlsCSA2(_3fa);var len=_404.length;var _405=0;var _406=_400.findByTargetWidget(_401.getID()).start(true);if(_406===null){_406=[];}for(var x=0;x<len;x++){var _407=_404[x];var _408=_3ff.getWidgetWindow(_407).start();if(_407!=_3f8){_405=0;var _409=[];var _40a=false;var _40b=[];var type=_407.getTitle(dojo.locale);if(!type){var _40c=_3ff.getWidgetDefinitionByWindow(_408).start();type=_40c.getTitle(dojo.locale);}var _40d=com.ibm.mm.builder.utils.wireUtil.getWidgetHandledEventsCSA2(_407);if(_40d!==null){for(var n=0;n<_40d.length;n++){var _40e=_40d[n];var _40f=false;var _410=false;var _411=com.ibm.mm.builder.utils.wireUtil.isEventCompatibleCSA2(_403,_40e,_3fb);if(_411){_40a=true;_410=true;var _412=_400.findByTargetWidget(_408.getID()).start(true);if(_412===null){_412=[];}for(var i=0;i<_412.length;i++){aWire=_412[i];if(_408.getID()==aWire.getTargetWidget().getID()&&_401.getID()==aWire.getSourceWidget().getID()&&_403.getID()==aWire.getSourceEvent().getID()&&_40e.getID()==aWire.getTargetEvent().getID()){_40f=true;_405++;_40b.push(aWire);}}}var _413=com.ibm.mm.builder.utils.wireUtil.createMatchEvent(_407.getID(),type,_410,_40f,_40e.getName(),_40e.getPayloadType(),_40e.getDescription(ibmConfig["default.locale"]));_409.push(_413);}}_3fc.push(com.ibm.mm.builder.utils.wireUtil.createMatchWidget(_407.getID(),type,_40a,_405,_409,_40b,_406));}}com.ibm.mm.builder.utils.wireUtil.LOGGER.exiting("wireUtil: getMatchHandleEvents with "+_3f9);return _3fc;};}if(!dojo._hasResource["com.ibm.mm.builder.utils.htmlUtil"]){dojo._hasResource["com.ibm.mm.builder.utils.htmlUtil"]=true;dojo.provide("com.ibm.mm.builder.utils.htmlUtil");com.ibm.mm.builder.utils.htmlUtil.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.utils.htmlUtil");if(this.widgetType!==null&&this.widgetType=="mm_OSGadget"){com.ibm.mm.builder.utils.htmlUtil.widgetClass=new RegExp("\\b"+com.ibm.mm.builder.constant.mmGGadget+"\\b");}else{com.ibm.mm.builder.utils.htmlUtil.widgetClass=new RegExp("\\b"+com.ibm.mm.builder.constant.mmIWidget+"\\b");}com.ibm.mm.builder.utils.htmlUtil.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2};com.ibm.mm.builder.utils.htmlUtil.endsWith=function(str,end,_414){if(_414){str=str.toLowerCase();end=end.toLowerCase();}if((str.length-end.length)<0){return false;}return str.lastIndexOf(end)==str.length-end.length;};com.ibm.mm.builder.utils.htmlUtil.startsWith=function(str,_415,_416){if(_416){str=str.toLowerCase();_415=_415.toLowerCase();}return str.indexOf(_415)===0;};com.ibm.mm.builder.utils.htmlUtil.getAttribute=function(node,attr){node=dojo.byId(node);if((!node)||(!node.getAttribute)){return null;}var ta=typeof attr=="string"?attr:new String(attr);var v=node.getAttribute(ta.toUpperCase());if((v)&&(typeof v=="string")&&(v!="")){return v;}if(v&&v.value){return v.value;}if((node.getAttributeNode)&&(node.getAttributeNode(ta))){return (node.getAttributeNode(ta)).value;}else{if(node.getAttribute(ta)){return node.getAttribute(ta);}else{if(node.getAttribute(ta.toLowerCase())){return node.getAttribute(ta.toLowerCase());}}}return null;};com.ibm.mm.builder.utils.htmlUtil.getParentByType=function(node,type){var _417=dojo.doc;var _418=dojo.byId(node);type=type.toLowerCase();while((_418)&&(_418.nodeName.toLowerCase()!=type)){if(_418==(_417.body||_417.documentElement)){return null;}_418=_418.parentNode;}return _418;};com.ibm.mm.builder.utils.htmlUtil.hasAttribute=function(node,attr){return com.ibm.mm.builder.utils.htmlUtil.getAttribute(dojo.byId(node),attr)?true:false;};com.ibm.mm.builder.utils.htmlUtil.hasClass=function(node,_419){return (new RegExp("(^|\\s+)"+_419+"(\\s+|$)")).test(com.ibm.mm.builder.utils.htmlUtil.getClass(node));};com.ibm.mm.builder.utils.htmlUtil.addClass=function(node,_41a){if(com.ibm.mm.builder.utils.htmlUtil.hasClass(node,_41a)){return false;}_41a=(com.ibm.mm.builder.utils.htmlUtil.getClass(node)+" "+_41a).replace(/^\s+|\s+$/g,"");return com.ibm.mm.builder.utils.htmlUtil.setClass(node,_41a);};com.ibm.mm.builder.utils.htmlUtil.setClass=function(node,_41b){node=dojo.byId(node);var cs=new String(_41b);try{if(typeof node.className=="string"){node.className=cs;}else{if(node.setAttribute){node.setAttribute("class",_41b);node.className=cs;}else{return false;}}}catch(e){com.ibm.mm.builder.utils.htmlUtil.LOGGER.severe("setClass",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_HTML_UTIL_SET_CLASS_1,[e.message]));}return true;};com.ibm.mm.builder.utils.htmlUtil.getClass=function(node){node=dojo.byId(node);if(!node){return "";}var cs="";if(node.className){cs=node.className;}else{if(com.ibm.mm.builder.utils.htmlUtil.hasAttribute(node,"class")){cs=com.ibm.mm.builder.utils.htmlUtil.getAttribute(node,"class");}}return cs.replace(/^\s+|\s+$/g,"");};com.ibm.mm.builder.utils.htmlUtil.getClasses=function(node){var c=com.ibm.mm.builder.utils.htmlUtil.getClass(node);return (c=="")?[]:c.split(/\s+/g);};com.ibm.mm.builder.utils.htmlUtil.getChildrenbyClass=function(_41c,_41d){var _41e=dojo.query("."+_41c,_41d);var len=_41e.length;var _41f=[];for(var x=0;x<len;x++){if(com.ibm.mm.builder.utils.htmlUtil.isDirectChild(_41e[x],_41d)){_41f.push(_41e[x]);}}return _41f;};com.ibm.mm.builder.utils.htmlUtil.setUnderlayBgColor=function(){var _420=document.getElementsByTagName("BODY")[0];var tags=dojo.query(".dijitDialogUnderlay",_420);var len=tags.length;for(var k=0;k<len;k++){dojo.style(tags[k],{background:"black",opacity:"0.35",filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0.35"});}};com.ibm.mm.builder.utils.htmlUtil.isDirectChild=function(_421,_422){var _423=_421.className;var _424=_421.parentNode;while(_424!=_422){if(_424.className==_423){return false;}else{_424=_424.parentNode;}}return true;};com.ibm.mm.builder.utils.htmlUtil.getDirectChildrenbyClass=function(_425,_426){var _427=dojo.query("."+_425,_426);var len=_427.length;var _428=[];for(var x=0;x<len;x++){if(_427[x].parentNode==_426){_428.push(_427[x]);}}return _428;};com.ibm.mm.builder.utils.htmlUtil.combineTwoColumn=function(root,left,_429){if(this.endsWith(root,"/>")){root=root.substr(0,root.length-2);root=root+">\n";}else{if(this.endsWith(root,"</div>",true)){root=root.substr(0,root.length-6)+"\n";}else{return "";}}root=root+left;root=root+_429;root=root+"</div>";return root;};com.ibm.mm.builder.utils.htmlUtil.getElementById=function(_42a,_42b){var _42c=null;var _42d=_42a.getElementsByTagName("*");for(var ii=0;ii<_42d.length;ii++){if(_42d[ii].id==_42b){_42c=_42d[ii];break;}}return (_42c);};com.ibm.mm.builder.utils.htmlUtil.getElementsByClassName=function(){var _42e=[];var _42f=["div","span"];for(index=0;index<_42f.length;index++){els=document.getElementsByTagName(_42f[index]);var _430=els.length;for(var i=0;i<_430;i++){if(this.widgetClass.test(els[i].className)){_42e[_42e.length]=els[i];}}}return _42e;};com.ibm.mm.builder.utils.htmlUtil.getElementString=function(node){var ndiv=document.createElement("div");var _431=node.cloneNode(true);ndiv.appendChild(_431);return ndiv.innerHTML;};com.ibm.mm.builder.utils.htmlUtil.getInclosedWidgets=function(node){var _432=[];if(node!==null){var _433=this.getElementsByClassName();if(_433&&_433.length>0){for(var _434=0;_434<_433.length;_434++){var _435=_433[_434];if(node==this.getWidgetParent(_435)){_432[_432.length]=_435;}}}}return _432;};com.ibm.mm.builder.utils.htmlUtil.getChildWidgets=function(_436){var _437=[];if(_436){var _438=dojo.byId(_436);var _439=_438.childNodes;if(_439!==null&&_439.length>0){for(var _43a=0;_43a<_439.length;_43a++){child=_439[_43a];if(child){if(this.widgetClass.test(child.className)){_437[_437.length]=child;}else{children=checkChildElement(child);if(children!==null){for(ii=0;ii<children.length;ii++){_437[_437.length]=children[ii];}}}}}}}return _437;};com.ibm.mm.builder.utils.htmlUtil.checkParentElement=function(_43b){if(_43b){var _43c=_43b.parentNode;if(_43c){if(_43c.className){if(this.widgetClass.test(_43c.className)){return _43c.id;}}return this.checkParentElement(_43c);}}return null;};com.ibm.mm.builder.utils.htmlUtil.prependChild=function(node,_43d){if(_43d.firstChild){_43d.insertBefore(node,_43d.firstChild);}else{_43d.appendChild(node);}return true;};com.ibm.mm.builder.utils.htmlUtil.disableSelection=function(_43e){_43e=dojo.byId(_43e)||dojo.body();if(dojo.isMoz){_43e.style.MozUserSelect="none";}else{if(dojo.isSafari){_43e.style.KhtmlUserSelect="none";}else{if(dojo.isIE){_43e.unselectable="on";}else{return false;}}}return true;};com.ibm.mm.builder.utils.htmlUtil.getWidgetParent=function(id){if(id===null){return null;}return this.checkParentElement(dojo.byId(id));};com.ibm.mm.builder.utils.htmlUtil.setStyle=function(){var node=arguments[0];for(var i=1;i<arguments.length;i++){stylePair=arguments[i].split(":");node.style[stylePair[0]]=stylePair[1];}};com.ibm.mm.builder.utils.htmlUtil.createRadioButton=function(_43f,_440,_441,_442,_443){var _444="<input type='radio' name='";_444=_444+_43f+(_443?("' title='"+_443):"")+"' value='";_444=_444+_440+"' onclick='";_444=_444+_441+"'";if(_442){_444=_444+" checked>";}else{_444=_444+">";}return _444;};com.ibm.mm.builder.utils.htmlUtil.getLimitedString=function(text,_445){if(!text){return "";}if(text.length>_445){text=text.substr(0,_445)+"...";}return text;};com.ibm.mm.builder.utils.htmlUtil.addShadow=function(_446,_447){for(var i=0;i<_447.length;i++){var div=document.createElement("div");div.className=_447[i];_446.appendChild(div);}};com.ibm.mm.builder.utils.htmlUtil.getSubstitute=function(_448,args){if(_448&&args){return dojo.string.substitute(_448,args);}return _448;};com.ibm.mm.builder.utils.htmlUtil.getCurrentStyle=function(obj,prop){if(obj.currentStyle){var _449=obj.currentStyle[prop];if(ibmConfig.fontSizeEnlarged&&prop==="fontSize"&&_449.match(/em/)){var p=obj.parentNode;var _44a=false;while(p&&p.tagName.toLowerCase()!="body"){if(dojo.hasClass(p,"dialog_container")){_44a=true;break;}p=p.parentNode;}if(_44a){var _44b=parseFloat(_449.replace("em",""));var _44c=parseFloat((p.currentStyle[prop]).replace("em",""));_449=_44b*_44c+"em";}}return _449;}else{if(window.getComputedStyle){prop=prop.replace(/([A-Z])/g,"-$1");prop=prop.toLowerCase();return window.getComputedStyle(obj,"").getPropertyValue(prop);}}return null;};com.ibm.mm.builder.utils.htmlUtil.createElementWithClass=function(type,_44d,_44e){var node=document.createElement(type);dojo.addClass(node,_44d);if(_44e){node.innerHTML=_44e;}return node;};com.ibm.mm.builder.utils.htmlUtil.getStrWidthByFontStyle=function(str,_44f,_450,_451){if(!this.stringCheckDiv){this.stringCheckDiv=document.createElement("span");this.stringCheckDiv.style.whiteSpace="nowrap";this.stringCheckDiv.style.position="absolute";document.body.appendChild(this.stringCheckDiv);}_44f=_44f||this.getCurrentStyle(document.body,"fontSize")||"";_450=_450||this.getCurrentStyle(document.body,"fontFamily")||"";_451=_451||this.getCurrentStyle(document.body,"fontWeight")||"";this.stringCheckDiv.style.cssText+="; font-size: "+_44f+"; font-family: "+_450+"; font-weight: "+_451;this.stringCheckDiv.innerHTML=this.formatBlankSpace(str);this.stringCheckDiv.style.display="";var w=this.stringCheckDiv.scrollWidth;this.stringCheckDiv.style.display="none";return w;};com.ibm.mm.builder.utils.htmlUtil.getStrWidth=function(str,node,_452){if(_452&&_452.fontSize){this._fontSize=_452.fontSize;this._fontFamily=_452.fontFamily||"Arial,Helvetica,sans-serif";this._fontWeight=_452.fontWeight||"normal";return this.getStrWidthByFontStyle(str,this._fontSize,this._fontFamily,this._fontWeight);}if(node){this._fontSize=this._fontFamily=this._fontWeight=null;while(node&&!(this._fontSize&&this._fontFamily&&this._fontWeight)){if(!this._fontSize){this._fontSize=this.getCurrentStyle(node,"fontSize");}if(!this._fontFamily){this._fontFamily=this.getCurrentStyle(node,"fontFamily");}if(!this._fontWeight){this._fontWeight=this.getCurrentStyle(node,"fontWeight");}node=node.parentNode;}}return this.getStrWidthByFontStyle(str,this._fontSize,this._fontFamily,this._fontWeight);};com.ibm.mm.builder.utils.htmlUtil.getStrWithLimit=function(str,node,_453,_454){if(!str||str.length<=0||!_453||_453<=0){return "";}var _455=2;var _456=0.618;var _457=str.substring(0,1)+"...";var _458=this.getStrWidth(_457,node,_454);if(_453<=_458){return _457;}var _459=this.getStrWidth(str,node,_454);if(_459<_453){return str;}else{var _45a=0;var end=str.length;while(_45a<end){if(end-_45a<=_455){while(this.getStrWidth(str.substring(0,_45a)+"...")>_453){_45a-=1;}return (str.substring(0,_45a)+"...");}var _45b=_45a+Math.round((end-_45a)*_456);var _45c=this.getStrWidth(str.substring(0,_45b));if(_45c<_453){_45a=_45b;end=end;}else{_45a=_45a;end=_45b;}}}};com.ibm.mm.builder.utils.htmlUtil.truncateAllChildNodesText=function(node,_45d,_45e){dojo.forEach(dojo.query(".truncatedLabel",node),function(item){com.ibm.mm.builder.utils.htmlUtil.truncateNodeText(item,_45d,_45e);});};com.ibm.mm.builder.utils.htmlUtil.truncateNodeText=function(node,_45f,_460){var _461=(node.tagName.toLowerCase()==="input")?"value":"innerHTML";if(!_45f){_45f="title";}var _462=0;var str=node[_461];if(str.length===0){return;}if(dojo.hasAttr(node,"widthlimit")){_462=parseInt(dojo.attr(node,"widthlimit"),10);}else{_462=dojo.contentBox(node).w;if(_462===0){_462=parseInt(dojo.style(node,"width"),10);}}if(_462>0){var _463=com.ibm.mm.builder.utils.htmlUtil.getStrWithLimit(str,node,_462,_460);if(_463.length<=str.length+2&&!dojo.hasAttr(node,_45f)){dojo.attr(node,_45f,this.unEscapeString(str));}node[_461]=(_461==="innerHTML"&&(!dojo.hasAttr(node,"keepBlankSpace")))?this.formatBlankSpace(_463):_463;}};com.ibm.mm.builder.utils.htmlUtil.truncateAllChildNodesWord=function(node){dojo.forEach(dojo.query(".wordTruncatedLabel",node),function(item){com.ibm.mm.builder.utils.htmlUtil.truncateWord(item);});};com.ibm.mm.builder.utils.htmlUtil.truncateWord=function(node,_464,_465,_466){if(_466!==true){if(ibmConfig.fontSizeEnlarged){return _464;}}if(!node){return _464;}var _467=(node.tagName.toLowerCase()==="input")?"value":"innerHTML";var str=_464||node[_467];if(str.length===0){return _464;}var _468=str.split(" ");if(!_465&&dojo.hasAttr(node,"widthlimit")){_465=parseInt(dojo.attr(node,"widthlimit"),10);}var _469=_465?_465:dojo.contentBox(node).w;dojo.forEach(_468,function(_46a,_46b){_468[_46b]=com.ibm.mm.builder.utils.htmlUtil.getStrWithLimit(_46a,node,_469);});var _46c=_468.join(" ");var _46d=(_467==="innerHTML"&&(!dojo.hasAttr(node,"keepBlankSpace")))?this.formatBlankSpace(_46c):_46c;if(!str){node[_467]=_46d;}else{return _46d;}};com.ibm.mm.builder.utils.htmlUtil.markTruncation=function(node,_46e){dojo.addClass(node,"truncatedLabel");dojo.attr(node,"widthLimit",_46e);};com.ibm.mm.builder.utils.htmlUtil.formatBlankSpace=function(_46f){if(!_46f){return "";}return _46f.replace(/\s/g,"&nbsp;");};com.ibm.mm.builder.utils.htmlUtil.formatDisplayedContent=function(_470,_471,_472){if(!_470){return "";}if(!_471){_470=_470.replace(/&/g,"&amp;");}if(!_472){_470=_470.replace(/\s/g,"&nbsp;");}return _470;};com.ibm.mm.builder.utils.htmlUtil.escapeString=function(_473){if(!_473){return "";}return _473.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");};com.ibm.mm.builder.utils.htmlUtil.unEscapeString=function(_474){if(!_474){return "";}return _474.replace(/&amp;/g,"&").replace(/&quot;/g,"\"").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;/g," ");};com.ibm.mm.builder.utils.htmlUtil.formatMessage=function(str){if(!str||str.length<=0){return "";}else{var _475=str.indexOf("\n");if(_475>0){var _476=str.substring(0,_475);var _477=str.substring(_475);return "<div class='firstLineFont truncatedLabel' widthLimit='400'>"+_476+"</div><span class='leftLineFont'>"+_477.replace(/\n/g,"<br/>")+"</span>";}else{return str.replace(/\n/g,"<br/>");}}};com.ibm.mm.builder.utils.htmlUtil.setNodeTitle=function(_478,_479,_47a){if(!_479||!_478){return;}if(!_47a||_47a<=0){try{var _47b=this.getCurrentStyle(_479,"width");if(_47b=="auto"){_47a=dojo.style(_479,"width");}else{if(_47b.indexOf("%")>-1){_47a=dojo.coords(_479).w;}else{_47a=parseFloat(_47b.match(/\d*\.?\d*/));}}}catch(e){_47a=null;}}_479.title="";if(!_47a||_47a=="auto"){_479.innerHTML=this.formatBlankSpace(_478);return;}var _47c=this.getStrWithLimit(_478,_479,_47a);_479.innerHTML=this.formatBlankSpace(_47c);if(_478!=_47c){_479.title=this.unEscapeString(_478);}};com.ibm.mm.builder.utils.htmlUtil.setNodeTitleWithStyle=function(_47d,_47e,_47f,_480){if(!_47e||!_47f||!_47d||_47f<=0||!_480){return;}_47e.title="";var _481=this.getStrWithLimit(_47d,_47e,_47f,_480);if(_47e.tagName=="INPUT"){_47e.value=_481;}else{_47e.innerHTML=this.formatDisplayedContent(_481);}_47e.title=_47d;};com.ibm.mm.builder.utils.htmlUtil.setCombinedStringInNode=function(_482,_483,node,_484,_485){var _486=this.getStrWidth(_482,node);if(_486>_484){var _487=dojo.string.substitute(_482,[_483]);this.setNodeTitle(_487,node,_484);return;}var _488=document.createElement("span");_488.className=_485;node.appendChild(_488);var _489=this.getStrWithLimit(_483,_488,_484-_486);var _48a=dojo.string.substitute(_482,["<span class=\""+_485+"\">"+this.formatDisplayedContent(_489)+"</span>"]);node.removeChild(_488);node.innerHTML=_48a;if(_489!=_483){node.title=dojo.string.substitute(_482,[_483]);}};com.ibm.mm.builder.utils.htmlUtil.loadCss=function(_48b){this.loadedCss=this.loadedCss||[];for(var i=0;i<this.loadedCss.length;i++){var css=this.loadedCss[i];if(css==_48b){return;}}var _48c=document.getElementsByTagName("head")[0];var _48d=document.createElement("link");_48d.type="text/css";_48d.rel="stylesheet";_48d.href=_48b;_48d.media="screen";_48c.appendChild(_48d);this.loadedCss.push(_48b);};com.ibm.mm.builder.utils.htmlUtil.removeIframe=function(node){if(!node){return;}var _48e=dojo.query("iframe",node)[0];if(_48e){_48e.parentNode.removeChild(_48e);}};com.ibm.mm.builder.utils.htmlUtil.showNodes=function(_48f){dojo.forEach(_48f,function(node){if(node.style){node.style.display="";}});};com.ibm.mm.builder.utils.htmlUtil.hideNodes=function(_490){dojo.forEach(_490,function(node){if(node.style){node.style.display="none";}});};com.ibm.mm.builder.utils.htmlUtil.releaseNode=function(node){if(node){try{node.onmouseout=null;node.onmousemove=null;node.onclick=null;node.onfocus=null;node.onkeypress=null;node.innerHTML="";}catch(e){}}};com.ibm.mm.builder.utils.htmlUtil.uncheckAll=function(_491){dojo.forEach(_491,function(item){var _492=dojo.query("input",item);if(_492){var _493=dojo.query("input",item)[0];_493.checked=false;}});};com.ibm.mm.builder.utils.htmlUtil.getAllCheckedNodes=function(_494){var _495=[];dojo.forEach(_494.childNodes,function(item){var _496=dojo.query("input",item)[0];if(_496.checked){_495.push(item);}});return _495;};com.ibm.mm.builder.utils.htmlUtil.showScrollBar=function(_497){if(_497!="layoutwidget"){return;}var _498=dojo.byId(_497);if(!_498){return;}var _499=_498.parentNode;while(_499){if(_499.nodeName.toLowerCase()==="#document"){break;}_499=_499.parentNode;}if(!_499){return;}_499=_498.parentNode.parentNode.parentNode;if(dojo.isIE&&(_499.URL.match(/mycontenthandler/))){var rDiv=dojo.query(".mm_Content > div",_498)[0];if(rDiv){rDiv.style.position="static";}var _49a=dojo.query(".wrapper",_498)[0];if(_49a){_49a.style.position="static";}}};com.ibm.mm.builder.utils.htmlUtil.addMissingQuoteInTitle=function(str){if(!str){return "";}return str.replace(/title\s*=\s*\${([^}]+)}/g,"title=\"${$1}\"");};}if(!dojo._hasResource["com.ibm.mm.builder.widget.CustomDialogResizer"]){dojo._hasResource["com.ibm.mm.builder.widget.CustomDialogResizer"]=true;dojo.provide("com.ibm.mm.builder.widget.CustomDialogResizer");dojo.require("dojox.layout.ResizeHandle");dojo.declare("com.ibm.mm.builder.widget.CustomDialogResizer",[dojox.layout.ResizeHandle],{innerContainer:null,innerMargin:null,oritation:"right",intLeftRTLOrig:0,resizeShadow:null,onResize:null,templateString:"<div dojoAttachPoint=\"resizeHandle\" class=\"customDialogResizeHandle\"><div></div></div>",_beginSizing:function(e){if(this._isSizing){return false;}this.targetWidget=dijit.byId(this.targetId);if(this.targetWidget){this.activeResize=true;}this.targetDomNode=this.targetWidget?this.targetWidget.domNode:dojo.byId(this.targetId);if(this.targetContainer){this.targetDomNode=this.targetContainer;}if(!this.targetDomNode){return;}this.intLeftRTLOrig=parseInt(this.targetDomNode.style.left,10);if(!this.activeResize){this.targetDomNode.appendChild(this._activeResizeNode);dojo.fadeIn({node:this._activeResizeNode,duration:120,beforeBegin:dojo.hitch(this,function(){this._activeResizeNode.style.display="";})}).play();}this._isSizing=true;this.startPoint={"x":e.clientX,"y":e.clientY};var mb=(this.targetWidget)?dojo.marginBox(this.targetDomNode):dojo.contentBox(this.targetDomNode);this.startSize={"w":mb.w,"h":mb.h};this._connects=[];this._connects.push(dojo.connect(document,"onmousemove",this,"_updateSizing"));this._connects.push(dojo.connect(document,"onmouseup",this,"_endSizing"));this._connects.push(dojo.connect(document,"onmouseleave",this,"_endSizing"));this.resizeShadow=document.createElement("div");this.targetContainer.appendChild(this.resizeShadow);dojo.attr(this.resizeShadow,{"class":"dialog_resize_shadow"});dojo.style(this.resizeShadow,"width",mb.w+"px");dojo.style(this.resizeShadow,"height",mb.h+"px");e.preventDefault();},_changeSizing:function(e){var tmp=this._getNewCoords(e);if(tmp===false){return;}if(this.targetWidget&&typeof this.targetWidget.resize=="function"){this.targetWidget.resize(tmp);}else{var _49b=0;if(builderConfig.isBidi){_49b=this.intLeftRTLOrig-tmp.dx;}dojo.style(this.targetDomNode,"width",tmp.w+"px");dojo.style(this.targetDomNode,"height",tmp.h+"px");if(builderConfig.isBidi){dojo.style(this.targetDomNode,"left",_49b+"px");}if(this.innerContainer&&this.innerMargin){this.innerContainer.style.height=(tmp.h-this.innerMargin.top-this.innerMargin.bottom)+"px";this.innerContainer.style.width=(tmp.w-this.innerMargin.left-this.innerMargin.right-2)+"px";}}dojo.style(this.resizeShadow,"width",tmp.w+"px");dojo.style(this.resizeShadow,"height",tmp.h+"px");e.preventDefault();if(this.onResize!==null){this.onResize(tmp.w,tmp.h);}},_getNewCoords:function(e){try{if(!e.clientX||!e.clientY){return false;}}catch(exception){return false;}this._activeResizeLastEvent=e;var dx=this.startPoint.x-e.clientX;var dy=this.startPoint.y-e.clientY;var newW=0;var newH=(this._resizeY)?this.startSize.h-dy:this.startSize.h;if(!builderConfig.isBidi){newW=(this._resizeX)?this.startSize.w-dx:this.startSize.w;}else{newW=(this._resizeX)?this.startSize.w+dx:this.startSize.w;}if(this.minSize){if(newW<this.minSize.w){newW=this.minSize.w;}if(newH<this.minSize.h){newH=this.minSize.h;}}return {w:newW,h:newH,dx:dx};},_endSizing:function(e){this.inherited(arguments);dojo.forEach(this._connects,function(c){dojo.disconnect(c);});if(this.targetDomNode){var _49c=this.targetDomNode.id;if(_49c.indexOf("_edit")!=-1){var _49d=_49c.substr(0,_49c.length-5);var _49e=com.ibm.mashups.services.ServiceManager.getService("eventService");var _49f=dojo.query(".dialog_container",this.targetDomNode)[0];var _4a0={"newWidth":parseInt(_49f.style.width,10),"newHeight":parseInt(_49f.style.height,10)};_49e.publishEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+"."+_49d,_4a0);}}this.targetContainer.removeChild(this.resizeShadow);this.resizeShadow=null;}});}if(!dojo._hasResource["com.ibm.mm.builder.widget.CustomDialogMoveable"]){dojo._hasResource["com.ibm.mm.builder.widget.CustomDialogMoveable"]=true;dojo.provide("com.ibm.mm.builder.widget.CustomDialogMoveable");dojo.require("dojo.dnd.Mover");dojo.declare("com.ibm.mm.builder.widget.CustomDialogMoveable",dojo.dnd.Moveable,{adjustPosOnMouseUp:function(){this.node.style.left=this.checkValue(this.node.style.left);this.node.style.top=this.checkValue(this.node.style.top);},checkValue:function(_4a1){try{var _4a2=parseInt(_4a1.substring(0,_4a1.length-2),10);if(_4a2<0){return "0px";}}catch(e){}return _4a1;},onMoveStop:function(_4a3){com.ibm.mm.builder.widget.CustomDialogMoveable.superclass.onMoveStop.call(this,_4a3);this.adjustPosOnMouseUp();}});}if(!dojo._hasResource["com.ibm.mm.builder.widget.CustomDialog"]){dojo._hasResource["com.ibm.mm.builder.widget.CustomDialog"]=true;dojo.provide("com.ibm.mm.builder.widget.CustomDialog");dojo.require("dojo.fx");dojo.require("dijit.Dialog");dojo.declare("com.ibm.mm.builder.widget.CustomDialog",[dijit.Dialog],{templateString:"<div dojoAttachPoint='dialogNode' waiRole='dialog' title='' aria-label='dialog'>"+"<div dojoAttachPoint='dialogDivsNode' class='customDialogDiv lotusDialog' role='region' aria-label='dialog'>"+"<div dojoAttachPoint='titleBar' class='dialog_titlebar' waiRole='dialog' aria-label='dialog'>"+"<a title='${closeIconTitle}' class='dialog_titlebar_close_wrapper lotusBtnImg' dojoAttachPoint='closeButtonNode'"+"href='javascript:;' aria-label='${closeIconTitle}' dojoAttachEvent='onclick:trueHide,onkeypress:hideWithKey'>"+"<img alt='${closeIconTitle}' title='${closeIconTitle}' class='dialog_titlebar_close' src='"+builderConfig.builderPath+"/images/oneui/blank.gif'/>"+"<span class='lotusAltText'>X</span>"+"</a>"+"<div dojoAttachPoint='titleNode' class='dialog_titlebar_title'></div>"+"</div>"+"<div dojoAttachPoint='containerNode' class='dialog_container'></div>"+"<span dojoAttachPoint='tabEnd' ></span>"+"<div dojoAttachPoint='leftBar' class='dialog_leftsidebar'></div>"+"<div dojoAttachPoint='rightBar' class='dialog_rightsidebar'></div>"+"<div dojoAttachPoint='endBar' class='dialog_endbar'></div>"+"<div dojoAttachPoint='leftResizeHandler' class='dialog_leftResize_handler'></div>"+"<div dojoAttachPoint='rightResizeHandler' class='dialog_rightResize_handler'></div>"+"</div>"+"</div>",baseClass:"custom_dialog",sharedWidget:false,belongId:null,nodeWidth:null,nodeHeight:null,title:null,titleHeight:28,titleBarHeight:"0px",endBarHeight:"0px",bottomHeight:14,topBarBackground:null,topBarOpacity:null,bottomBarBackground:null,bottomBarOpacity:null,bottomBarTip:null,bottomBarTipColor:"white",leftBarWidth:"0px",rightBarWidth:"0px",displayCloseButton:true,containerNodePadding:null,containerBackgroundColor:null,containerOpacity:null,dialogOpacity:null,hasLeftBottomResizer:false,hasRightBottomResizer:true,modelDialog:true,needUnderLay:true,initLeftPosition:null,initTopPosition:null,alwaysCenter:true,subDialogs:null,roundCorner:false,dialogStack:[],innerConnects:[],closeCallback:null,displayCallback:null,dynaInitialized:false,closeIconTitle:com.ibm.mm.builder.coreWidgetsStrings.I_COMMON_CANCEL,scrollEnabled:false,postCreate:function(){this.inherited(arguments);this.domNode.className="custom_dialog";this.subDialogs=[];if(this.scrollEnabled){dojo.style(this.containerNode,"overflow","scroll");}dojo.subscribe("/enabler/pageChanged",this,"destroyOnPageChange");},setTitle:function(_4a4){this.title=_4a4||this.title;if(this.title&&this.titleNode&&this.title!=this.titleNode.title){com.ibm.mm.builder.utils.htmlUtil.setNodeTitle(this.title,this.titleNode);}dojo.attr(this.dialogNode,"title",this.title);dojo.attr(this.titleBar,"title",this.title);},containXOjbect:function(){return document.applets.length>0||document.getElementsByTagName("Object").length>0;},oldWidgetSpecHitch:function(){},registerSubDialog:function(_4a5){if(dojo.isString(_4a5)){this.subDialogs.push(_4a5);var _4a6=dijit.byId(_4a5);if(_4a6&&!_4a6.modelDialog){_4a6.domNode.style.zIndex=this.domNode.style.zIndex;}}},hideWithKey:function(_4a7){var _4a8=_4a7.keyCode;if(_4a8!=dojo.keys.ENTER){return true;}this.hide();},hide:function(){this.doHide();},doHide:function(){if(!this.open){return;}if(!dojo.isIE&&this.closeButtonNode.style.display!="none"){this.closeButtonNode.focus();}if(this.dialogStack.length>1){var _4a9=this.dialogStack.pop();dojo.disconnect(_4a9.onKeyHandler);var _4aa=this.dialogStack[this.dialogStack.length-1];_4aa.onKeyHandler=dojo.connect(document.documentElement,"onkeypress",_4aa,"_onKey");}else{if(this.dialogStack.length===1){var _4ab=this.dialogStack.pop();dojo.disconnect(_4ab.onKeyHandler);}}dojo.forEach(this.subDialogs,function(_4ac){var _4ad=dijit.byId(_4ac);if(_4ad){_4ad.hide();}});setTimeout(this.oldWidgetSpecHitch,this.duration);var ds=com.ibm.mm.builder.widget.customDialogStack;if(!this._alreadyInitialized||this!=ds[ds.length-1]){return;}if(this.modelDialog){com.ibm.mm.builder.widget.customDlgHighestZIndex-=2;this.domNode.style.zIndex=com.ibm.mm.builder.widget.customDlgZIndexOnPage;}if(this._fadeIn.status()=="playing"){this._fadeIn.stop();}com.ibm.mm.builder.widget.customDialogStack.pop();this._fadeOut.play();if(this._scrollConnected){this._scrollConnected=false;}dojo.forEach(this._modalconnects,dojo.disconnect);this._modalconnects=[];if(this._relativePosition){delete this._relativePosition;}this.open=false;},trueHide:function(){this.doHide();},_onKey:function(evt){if(dijit._dialogStack&&((dijit._dialogStack.length>1&&dijit._dialogStack[0].dialog===null)||(dijit._dialogStack.length>0&&dijit._dialogStack[0] instanceof dijit.Dialog))){return;}var ds=com.ibm.mm.builder.widget.customDialogStack;if(ds[ds.length-1]!=this){return;}if(evt.charOrCode){var dk=dojo.keys;var node=evt.target;if(evt.charOrCode===dk.TAB){this._getFocusItems(this.domNode);}var _4ae=(this._firstFocusItem==this._lastFocusItem);if(node==this._firstFocusItem&&evt.shiftKey&&evt.charOrCode===dk.TAB){if(!_4ae){dijit.focus(this._lastFocusItem);}dojo.stopEvent(evt);}else{if(node==this._lastFocusItem&&evt.charOrCode===dk.TAB&&!evt.shiftKey){if(!_4ae){dijit.focus(this._firstFocusItem);}dojo.stopEvent(evt);}else{while(node){if(node==this.domNode){if(evt.charOrCode==dk.ESCAPE){this.onCancel();}else{return;}}node=node.parentNode;}if(evt.charOrCode!==dk.TAB){dojo.stopEvent(evt);}else{if(!dojo.isOpera){try{this._firstFocusItem.focus();}catch(e){}}}}}}},_getUnderlay:function(){if(!this._underlay){this._underlay=new com.ibm.mm.builder.widget.CustomDialogUnderlay();}return this._underlay;},_isMac:function(){return navigator.appVersion.indexOf("Macintosh")>=0;},_setup:function(){this.moveableHandles=[];if(!dijit._underlay){dijit._underlay=new dijit.DialogUnderlay();}if(this.titleBar){this.moveableHandles.push(new com.ibm.mm.builder.widget.CustomDialogMoveable(this.domNode,{handle:this.titleBar}));}if(this.leftBar){this.moveableHandles.push(new com.ibm.mm.builder.widget.CustomDialogMoveable(this.domNode,{handle:this.leftBar}));}if(this.rightBar){this.moveableHandles.push(new com.ibm.mm.builder.widget.CustomDialogMoveable(this.domNode,{handle:this.rightBar}));}if(this.endBar){this.moveableHandles.push(new com.ibm.mm.builder.widget.CustomDialogMoveable(this.domNode,{handle:this.endBar}));}if(this.modelDialog){this.domNode.style.zIndex=com.ibm.mm.builder.widget.customDlgZIndexOnPage;}else{com.ibm.mm.builder.utils.htmlUtil.setClass(this.domNode,"custom_dialog_nomodel");}var node=this.domNode;if(this.modelDialog&&this.needUnderLay){var _4af=this._getUnderlay();this._fadeIn=dojo.fx.combine([dojo.fadeIn({node:node,duration:this.duration,onEnd:dojo.hitch(this,function(){if(this.dialogOpacity!=null){dojo.style(this.domNode,"opacity",this.dialogOpacity);}})}),dojo.fadeIn({node:_4af.domNode,duration:this.duration,onEnd:dojo.hitch(this,function(){_4af.show();_4af.setZIndex(dojo.style(node,"zIndex")-1);if(!(this._isMac()&&dojo.isSafari==4)){this._addBackIFrame(dojo.style(node,"zIndex")-2);}})})]);this._fadeOut=dojo.fx.combine([dojo.fadeOut({node:node,duration:600}),dojo.fadeOut({node:_4af.domNode,duration:700,onEnd:dojo.hitch(this,function(){node.style.display="none";_4af.hide();this._removeBackIFrame();if(this.closeCallback){setTimeout(dojo.hitch(this,this.closeCallback),500);}})})]);}else{this._fadeIn=dojo.fadeIn({node:node,duration:this.duration,onEnd:dojo.hitch(this,function(){if(this.dialogOpacity!=null){dojo.style(this.domNode,"opacity",this.dialogOpacity);}})});this._fadeOut=dojo.fadeOut({node:node,duration:600,onEnd:dojo.hitch(this,function(){node.style.display="none";if(this.closeCallback){setTimeout(dojo.hitch(this,this.closeCallback),500);}})});}},InitDialogSkin:function(){if(this.roundCorner){dojo.addClass(this.dialogNode,"mumRoundCorner");}this.closeButtonNode.style.display=this.displayCloseButton?"":"none";if(!this.title){this.titleNode.style.display="none";com.ibm.mm.builder.utils.htmlUtil.setClass(this.titleBar,"dialog_titlebar_notitle");com.ibm.mm.builder.utils.htmlUtil.setClass(this.leftBar,"dialog_leftsidebar_notitle");com.ibm.mm.builder.utils.htmlUtil.setClass(this.rightBar,"dialog_rightsidebar_notitle");this.titleHeight=14;}else{this.titleNode.style.display="";com.ibm.mm.builder.utils.htmlUtil.setClass(this.titleBar,"dialog_titlebar");com.ibm.mm.builder.utils.htmlUtil.setClass(this.leftBar,"dialog_leftsidebar");com.ibm.mm.builder.utils.htmlUtil.setClass(this.rightBar,"dialog_rightsidebar");this.titleHeight=28;}if(this.nodeWidth){(this.containerNode.style.width=this.nodeWidth);}dojo.forEach((this.nodeStyle||"").split(";"),function(_4b0){var kvp=_4b0.split(":");if(kvp.length===2){this.containerNode.style[kvp[0]]=kvp[1];}},this);if(this.nodeHeight){this.containerNode.style.height=this.nodeHeight;}if(this.containerNodePadding){this.containerNode.style.padding=this.containerNodePadding;}if(this.leftBarWidth){this.leftBar.style.width=this.leftBarWidth;}if(this.leftBarWidth){this.containerNode.style.marginLeft=this.leftBarWidth;}if(this.rightBarWidth){this.rightBar.style.width=this.rightBarWidth;}if(this.rightBarWidth){this.containerNode.style.marginRight=this.rightBarWidth;}if(this.containerBackgroundColor){this.containerNode.style.backgroundColor=this.containerBackgroundColor;}if(this.containerOpacity){this.containerNode.style.opacity=this.containerOpacity;}if(this.topBarBackground){this.titleBar.style.backgroundColor=this.topBarBackground;}if(this.topBarOpacity){this.titleBar.style.opacity=this.topBarOpacity;}if(this.topBarOpacity){this.titleBar.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity="+this.topBarOpacity*100;}if(this.titleBarHeight!="0px"){this.titleBar.style.height=this.titleBarHeight;}if(this.bottomBarBackground){this.endBar.style.backgroundColor=this.bottomBarBackground;}if(this.bottomBarOpacity){this.endBar.style.opacity=this.bottomBarOpacity;}if(this.bottomBarOpacity){this.endBar.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity="+this.bottomBarOpacity*100;}if(this.endBarHeight&&this.endBarHeight!="0px"){this.endBar.style.height=this.endBarHeight;var _4b1=parseInt(this.endBarHeight,10)+1+"px";this.leftBar.style.bottom=_4b1;this.rightBar.style.bottom=_4b1;}if(this.bottomBarTip){this.endBar.innerHTML=this.bottomBarTip;this.endBar.style.color=this.bottomBarTipColor;}if(this.hasLeftBottomResizer){this.leftResizeHandler.style.display="";this.leftResizer=new com.ibm.mm.builder.widget.CustomDialogResizer({targetContainer:this.domNode,animateSizing:false,activeResize:true,innerContainer:this.containerNode,innerMargin:{top:this.titleHeight,bottom:this.bottomHeight,left:parseInt(this.leftBarWidth,10),right:parseInt(this.rightBarWidth,10)},onResize:dojo.hitch(this,"onResize")},this.leftResizeHandler);this.leftResizer.startup();}if(this.hasRightBottomResizer){this.rightResizeHandler.style.display="";this.rightResizer=new com.ibm.mm.builder.widget.CustomDialogResizer({targetContainer:this.domNode,animateSizing:false,activeResize:true,innerContainer:this.containerNode,innerMargin:{top:this.titleHeight,bottom:this.bottomHeight,left:parseInt(this.leftBarWidth,10),right:parseInt(this.rightBarWidth,10)},onResize:dojo.hitch(this,"onResize")},this.rightResizeHandler);this.rightResizer.startup();}},show:function(){if(this.open){return;}if(!this._alreadyInitialized){this._setup();this.InitDialogSkin();this._alreadyInitialized=true;}if(this._fadeOut.status()=="playing"){this._fadeOut.stop();}this._modalconnects.push(dojo.connect(window,"onscroll",this,"layout"));this._modalconnects.push(dojo.connect(window,"onresize",this,function(){var _4b2=dijit.getViewport();if(!this._oldViewport||_4b2.h!=this._oldViewport.h||_4b2.w!=this._oldViewport.w){this.layout();this._oldViewport=_4b2;}}));if(this.dialogStack.length>0){var _4b3=this.dialogStack[this.dialogStack.length-1];dojo.disconnect(_4b3.onKeyHandler);}this.dialogStack.push(this);if(this.modelDialog){this._modalconnects.push(this.onKeyHandler=dojo.connect(document.documentElement,"onkeypress",this,"_onKey"));}dojo.style(this.domNode,"opacity",0);var _4b4=[];if(!this.dynaInitialized){if(dojo.isIE==6){dojo.query("div",this.domNode).forEach(function(node,i){var _4b5=[];_4b5.node=node;_4b5.height=node.style.height;node.style.height="auto";_4b4.push(_4b5);});}}this.domNode.style.display="block";this.domNode.style.visibility="";this.open=true;if(!this.dynaInitialized){this.domNode.style.height=null;if(this.nodeHeight!==null){this.containerNode.style.height=this.nodeHeight;}else{this.containerNode.style.height=null;}var _4b6=parseInt(this.leftBarWidth.substring(0,this.leftBarWidth.length-2),10);var _4b7=parseInt(this.rightBarWidth.substring(0,this.rightBarWidth.length-2),10);var _4b8;if(this.nodeWidth!==null){this.containerNode.style.width=this.nodeWidth;_4b8=parseInt(this.nodeWidth.substring(0,this.nodeWidth.length-2),10);this.domNode.style.width=(_4b8+_4b6+_4b7+2)+"px";}else{var node;if(this.containerNode.hasChildNodes()){node=this.containerNode.childNodes[0];}else{node=this.containerNode;}_4b8=dojo.coords(node).w;this.containerNode.style.width=_4b8+"px";this.domNode.style.width="auto";}if(dojo.isIE==6){for(var i=0;i<_4b4.length;i++){if(_4b4[i].height&&_4b4[i].height!="auto"){_4b4[i].node.style.height=_4b4[i].height;}else{_4b4[i].node.style.height="";}}}this._position();this.positionWithGivenValue();this.dynaInitialized=true;}else{if(this.alwaysCenter&&this.initLeftPosition===null&&this.initTopPosition===null){this._position();}dojo.style(this.containerNode,"width","100%");}if(this.modelDialog){com.ibm.mm.builder.widget.customDlgHighestZIndex+=2;this.domNode.style.zIndex=com.ibm.mm.builder.widget.customDlgHighestZIndex;}this.setTitle();com.ibm.mm.builder.widget.customDialogStack.push(this);this._fadeIn.play();this._savedFocus=dijit.getFocus(this);_4b4=null;this._getFocusItems(this.domNode);setTimeout(dojo.hitch(this,function(){try{var _4b9=dijit._getTabNavigable(this.containerNode);var f=_4b9.lowest||_4b9.first||this._firstFocusItem;if(f){dijit.focus(f);}if(this.displayCallback){this.displayCallback();}}catch(e){this.closeButtonNode.focus();}}),this.duration+500);},setNodeWidth:function(_4ba){this.containerNode.style.width=this.nodeWidth=_4ba;if(this.dynaInitialized){var _4bb=parseInt(this.leftBarWidth,10);var _4bc=parseInt(this.rightBarWidth,10);var _4bd=this.nodeWidth?parseInt(this.nodeWidth,10):dojo.coords(this.containerNode).w;this.domNode.style.width=(_4bd+_4bb+_4bc+2)+"px";}},setNodeHeight:function(_4be){this.containerNode.style.height=this.nodeHeight=_4be;},setBottomTip:function(tip){this.endBar.innerHTML=this.bottomBarTip=tip;},setBottomTipColor:function(_4bf){this.endBar.style.color=this.bottomBarTipColor=_4bf;},autoAdjust:function(){},onCancel:function(){this.trueHide();},destroyOnPageChange:function(){if(!this.sharedWidget){this.destroy();}},destroy:function(){this.open&&this.hide();dojo.forEach(this.innerConnects,dojo.disconnect);if(this.moveableHandles){for(var i=0;i<this.moveableHandles.length;i++){this.moveableHandles[i].destroy();}}dojo.destroy(this.leftBar);dojo.destroy(this.rightBar);dojo.destroy(this.endBar);dojo.destroy(this.closeButtonNode);dojo.destroy(this.titleBar);this.leftResizer&&this.leftResizer.destroy();this.rightResizer&&this.rightResizer.destroy();dojo.destroy(this.leftResizeHandler);dojo.destroy(this.rightResizeHandler);if(this._underlay){this._underlay.destroy();this._underlay=null;}this.shimmer&&dojo.destroy(this.shimmer);this.inherited(arguments);},positionWithGivenValue:function(){if(this.initLeftPosition){this.domNode.style.left=this.initLeftPosition;}if(this.initTopPosition){this.domNode.style.top=this.initTopPosition;}},_position:function(){if(dojo.hasClass(dojo.body(),"dojoMove")){return;}window.setTimeout(dojo.hitch(this,function(){var _4c0=dijit.getViewport();var mb=dojo.marginBox(this.domNode);if(mb){var left=Math.floor((_4c0.l+(_4c0.w-mb.w)/2));var top=Math.floor((_4c0.t+(_4c0.h-mb.h)/2));this.domNode.style.left=left>0?left+"px":"0px";this.domNode.style.top=top>0?top+"px":"0px";}else{this._position();}}),100);},layout:function(){if(this.domNode.style.display!="none"&&this.modelDialog&&this.needUnderLay){this._getUnderlay().layout();}},_addBackIFrame:function(_4c1){this.shimmer=document.createElement("iframe");this.shimmer.style.position="absolute";this.shimmer.style.zIndex=_4c1;this.shimmer.setAttribute("frameborder","0");this.shimmer.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";document.body.appendChild(this.shimmer);this._adjustBackIFramePosition();},_adjustBackIFramePosition:function(){var _4c2=dijit.getViewport();this.shimmer.style.top=_4c2.t+"px";this.shimmer.style.left=_4c2.l+"px";this.shimmer.style.width=_4c2.w+"px";this.shimmer.style.height=_4c2.h+"px";var _4c3=dijit.getViewport();if(_4c2.w!=_4c3.w){this.shimmer.style.width=_4c3.w+"px";}if(_4c2.h!=_4c3.h){this.shimmer.style.height=_4c3.h+"px";}},_removeBackIFrame:function(){if(this.shimmer){dojo.destroy(this.shimmer);this.shimmer=null;}},onResize:function(_4c4,_4c5){}});com.ibm.mm.builder.widget.customDialogStack=[];com.ibm.mm.builder.widget.customDlgZIndexOnPage=800;com.ibm.mm.builder.widget.customDlgHighestZIndex=800;com.ibm.mm.builder.widget.editDialogUnderlay=null;dojo.declare("com.ibm.mm.builder.widget.CleanDialog",com.ibm.mm.builder.widget.CustomDialog,{_getUnderlay:function(){if(!com.ibm.mm.builder.widget.editDialogUnderlay){com.ibm.mm.builder.widget.editDialogUnderlay=new com.ibm.mm.builder.widget.CustomDialogUnderlay({id:"cleanDialogUnderlay"});}return com.ibm.mm.builder.widget.editDialogUnderlay;}});dojo.declare("com.ibm.mm.builder.widget.GeneralWidgetModeDialog",com.ibm.mm.builder.widget.CleanDialog,{postCreate:function(){this.inherited(arguments);this.modeChangeHandle=dojo.subscribe(iwConstants.EVENTS.modeChanged,this,this.onModeChanged);},onModeChanged:function(_4c6,mode){this.hide();},hideWithKey:function(_4c7){var _4c8=_4c7.keyCode;if(_4c8!=dojo.keys.ENTER){return true;}this.trueHide();},trueHide:function(){if(this.belongId){com.ibm.mashups.services.ServiceManager.getService("eventService").fireEvent(this.belongId,"onModeChanged",{newMode:"view"});return;}this.doHide();},destroy:function(){dojo.unsubscribe(this.modeChangeHandle);this.inherited(arguments);}});dojo.declare("com.ibm.mm.builder.widget.WidgetEditDialog",com.ibm.mm.builder.widget.GeneralWidgetModeDialog,{onModeChanged:function(_4c9,mode){if(mode==="edit"&&this.belongId===_4c9){this.hide();}}});dojo.declare("com.ibm.mm.builder.widget.CustomDialogUnderlay",dijit.DialogUnderlay,{templateString:"<div class=\"customDialogUnderlayWrapper\" id=\"${id}_underlay\">"+"<div class=\"customDialogUnderlay\" dojoAttachPoint=\"node\"></div>"+"</div>",setZIndex:function(_4ca){dojo.style(this.domNode,"zIndex",_4ca);}});}if(!dojo._hasResource["com.ibm.mm.builder.dialog.PageSaveConfirmDialog"]){dojo._hasResource["com.ibm.mm.builder.dialog.PageSaveConfirmDialog"]=true;dojo.provide("com.ibm.mm.builder.dialog.PageSaveConfirmDialog");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.mm.builder.dialog.PageSaveConfirmDialog",[dijit._Widget,dijit._Templated],{frameDialog:null,callbackSave:null,callbackNotSave:null,callbackCancel:null,contentWarning:null,contentQuestion:null,btnSaveText:null,btnNotSaveText:null,btnCancelText:null,hideNotSave:false,savePageOnSave:true,frameWidth:"540px",templateString:"<div role=\"alertdialog\">\n <div class=\"mmConfirmDlgTop\">\n <div class=\"mmConfirmDlgText1\" role=\"alert\">\n <span dojoAttachPoint=\"warningMsg\">${contentWarning}</span>\n </div>\n <div class=\"mmConfirmDlgText2\" role=\"alert\">\n <span dojoAttachPoint=\"suggestMsg\">${contentQuestion}</span>\n </div>\n </div>\n <div class=\"mmConfirmDlgBottomArea lotusDialogFooter\" dojoAttachPoint = \"mmConfirmFooter\">\n <input type=\"button\" dojoAttachPoint=\"saveBtn\" style=\"margin: 0\" class=\"lotusFormButton truncatedLabel\" \n\t\t\tdojoAttachEvent=\"onclick: _onSave,onkeypress:_onSaveWithKey\" \n\t\t\trole=\"button\" wairole=\"button\" aria-label=\"${btnSaveText}\" title=\"${btnSaveText}\" value=\"${btnSaveText}\"/>\n <input type=\"button\" dojoAttachPoint=\"notSaveBtn\" class=\"lotusFormButton truncatedLabel\" \n\t\t\tdojoAttachEvent=\"onclick: _onNotSave,onkeypress:_onNotSaveWithKey\" \n\t\t\trole=\"button\" wairole=\"button\" aria-label=\"${btnNotSaveText}\" title=\"${btnNotSaveText}\" value=\"${btnNotSaveText}\"/>\n <a href=\"javascript:void(0);\" dojoAttachPoint=\"cancelBtn\" aria-label=\"${btnCancelText}\" \n\t\t\tdojoAttachEvent=\"onclick: _onCancel,onkeypress:_onCancelWithKey\"\n\t\t\tclass=\"common_cancel lotusAction confirm_cancel truncatedLabel\" title=\"${btnCancelText}\">${btnCancelText}</a>\n </div>\n</div>\n",postCreate:function(){var _4cb={id:"pageSaveConfirmDialog",title:com.ibm.mm.builder.coreWidgetsStrings.I_PAGE_SAVE_TITLE,displayCloseButton:true,hasRightBottomResizer:false,leftBarWidth:"0px",rightBarWidth:"0px"};this.frameDialog=new com.ibm.mm.builder.widget.CleanDialog(dojo.mixin(_4cb,{nodeWidth:this.frameWidth,displayCloseButton:true,closeCallback:function(){this.destroy();}}));this.frameDialog.containerNode.appendChild(this.domNode);if(this.hideNotSave){dojo.style(this.notSaveBtn,"display","none");}},_onSaveWithKey:function(e){if(e.charCode===dojo.keys.SPACE||e.keyCode===dojo.keys.ENTER){this._onSave(e);}},_onSave:function(){this.frameDialog.hide();if(this.savePageOnSave){var _4cc=com.ibm.mashups.services.ServiceManager.getService("eventService");this.pageSavedHandle=_4cc.subscribeEvent("com.ibm.mashups.builder.pageSaved",this,"_onSaveContinue");_4cc.broadcastEvent("com.ibm.mashups.builder.savePage");}else{this.callbackSave&&this.callbackSave();}},_onSaveContinue:function(){if(this.pageSavedHandle){var _4cd=com.ibm.mashups.services.ServiceManager.getService("eventService");_4cd.unsubscribeEvent(this.pageSavedHandle);this.pageSavedHandle=null;}this.callbackSave&&this.callbackSave();},_onNotSaveWithKey:function(e){if(e.charCode===dojo.keys.SPACE||e.keyCode===dojo.keys.ENTER){this._onNotSave(e);}},_onNotSave:function(){this.frameDialog.hide();var _4ce=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage();if(_4ce){var _4cf=_4ce.getID();var nm=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();var page=nm.find(_4cf).start();page&&nm.invalidate(page);com.ibm.mashups.enabler.widget.Factory.getWidgetModel().cachedWindows={};var nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _4d0=com.ibm.mashups.enabler.model.state.AccessorFactory.getLayoutAccessor(nsm,_4cf);_4d0.setTemplateURL(null);_4ce.setDirty(false);}this.callbackNotSave&&this.callbackNotSave();},_onCancelWithKey:function(e){if(e.charCode===dojo.keys.SPACE||e.keyCode===dojo.keys.ENTER){this._onCancel();}},_onCancel:function(){this.frameDialog.hide();this.callbackCancel&&this.callbackCancel();},show:function(){this.frameDialog&&this.frameDialog.show();}});}if(!dojo._hasResource["com.ibm.mm.builder.dnd.ACLSource"]){dojo._hasResource["com.ibm.mm.builder.dnd.ACLSource"]=true;dojo.provide("com.ibm.mm.builder.dnd.ACLSource");dojo.declare("com.ibm.mm.builder.dnd.ACLSource",dojo.dnd.AutoSource,{checkAcceptance:function(_4d1,_4d2){return (this.name!="aclSearch");},onDndCancel:function(){this.inherited(arguments);},_uncheckAll:function(_4d3){if(!_4d3){_4d3=this;}try{if(_4d3.node&&_4d3.node.childNodes){com.ibm.mm.builder.utils.htmlUtil.uncheckAll(_4d3.node.childNodes);}}catch(e){}},onDropExternal:function(_4d4,_4d5,copy){this._uncheckAll(_4d4);var _4d6=_4d5;if(!!_4d4.selectedNodes&&_4d4.selectedNodes.length>0){_4d6=_4d4.selectedNodes;}if(_4d4.name=="aclSearch"){_4d6=this.layout.checkDraggedNode(_4d4,this,_4d6);}var _4d7=this.before?this.targetAnchor:(this.targetAnchor?this.targetAnchor.nextSibling:null);dojo.forEach(_4d6,function(item){this.layout.transferNode(_4d4,this,item.id,_4d7,(_4d4.name==="aclSearch"));if(!this.before&&_4d7){_4d7=_4d7.nextSibling;}},this);dojo.publish(_4d4.name);dojo.publish(com.ibm.mm.builder.eventTopics.UpdateAllPageControl);},onDropInternal:function(_4d8,copy){},destroy:function(){dojo.forEach(this.container,"item.destroy();");this.inherited(arguments);}});com.ibm.mm.builder.dnd.ACLSource.createSource=function(_4d9,_4da,_4db,name,_4dc,_4dd){return new com.ibm.mm.builder.dnd.ACLSource(_4d9,{accept:_4da,layout:_4db,name:name,listLengthPerPage:_4dc,container:[],allStayedUsers:{},currentPage:1,totalPage:1,creator:function(item,hint){if(hint=="avatar"){var n=document.createElement("div");this.selectedNodes=[];dojo.forEach(this.node.childNodes,function(item){var _4de=dojo.query("input",item)[0];if(_4de.checked){_4de.checked=false;dojo.removeClass(item,this.name+"ItemHover");var _4df=item.cloneNode(true);n.appendChild(_4df);this.selectedNodes.push(_4df);_4de.checked=true;}},this);return {node:n,data:item,type:["acluser"]};}}});};}if(!dojo._hasResource["com.ibm.mm.builder.widget.OpenSearchPopup"]){dojo._hasResource["com.ibm.mm.builder.widget.OpenSearchPopup"]=true;dojo.provide("com.ibm.mm.builder.widget.OpenSearchPopup");dojo.require("dijit._base.focus");dojo.require("dijit._base.place");dojo.require("dijit._base.window");opensearch={};opensearch.popup=new function(){var _4e0=[],_4e1=1003,_4e2=1;this.prepare=function(node){dojo.body().appendChild(node);var s=node.style;if(s.display=="none"){s.display="";}s.visibility="hidden";s.position="absolute";s.top="-9999px";};this.open=function(args){var _4e3=args.popup,_4e4=args.orient||{"BL":"TL","TL":"BL"},_4e5=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+_4e2++);var _4e6=dojo.doc.createElement("div");dijit.setWaiRole(_4e6,"presentation");_4e6.id=id;_4e6.className="dijitPopup";_4e6.style.zIndex=_4e1+_4e0.length;_4e6.style.left=_4e6.style.top="0px";_4e6.style.visibility="hidden";if(args.parent){_4e6.dijitPopupParent=args.parent.id;}dojo.body().appendChild(_4e6);var s=_4e3.domNode.style;s.display="";s.visibility="";s.position="";_4e6.appendChild(_4e3.domNode);var _4e7=new dijit.BackgroundIframe(_4e6);var best=_4e5?dijit.placeOnScreenAroundElement(_4e6,_4e5,_4e4,_4e3.orient?dojo.hitch(_4e3,"orient"):null):dijit.placeOnScreen(_4e6,args,_4e4=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"]);_4e6.style.visibility="visible";var _4e8=[];var _4e9=function(){for(var pi=_4e0.length-1;pi>0&&_4e0[pi].parent===_4e0[pi-1].widget;pi--){}return _4e0[pi];};_4e8.push(dojo.connect(_4e6,"onkeypress",this,function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;if(evt.charOrCode==dojo.keys.ESCAPE&&args.onCancel){dojo.stopEvent(evt);args.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _4ea=_4e9();if(_4ea&&_4ea.onCancel){_4ea.onCancel();}}}}));if(_4e3.onCancel){_4e8.push(dojo.connect(_4e3,"onCancel",null,args.onCancel));}_4e8.push(dojo.connect(_4e3,_4e3.onExecute?"onExecute":"onChange",null,function(){var _4eb=_4e9();if(_4eb&&_4eb.onExecute){_4eb.onExecute();}}));_4e0.push({wrapper:_4e6,iframe:_4e7,widget:_4e3,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_4e8});if(_4e3.onOpen){_4e3.onOpen(best);}return best;};this.close=function(_4ec){while(dojo.some(_4e0,function(elem){return elem.widget==_4ec;})){var top=_4e0.pop(),_4ed=top.wrapper,_4ee=top.iframe,_4ef=top.widget,_4f0=top.onClose;if(_4ef.onClose){_4ef.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(!_4ef||!_4ef.domNode){return;}this.prepare(_4ef.domNode);_4ee.destroy();dojo.destroy(_4ed);if(_4f0){_4f0();}}};}();}if(!dojo._hasResource["com.ibm.mm.builder.widget.ShadowMenu"]){dojo._hasResource["com.ibm.mm.builder.widget.ShadowMenu"]=true;dojo.provide("com.ibm.mm.builder.widget.ShadowMenu");dojo.require("dijit.Menu");dojo.require("dojox.fx.Shadow");dojo.declare("com.ibm.mm.builder.widget.ShadowMenu",[dijit.Menu],{offset_x:0,offset_y:0,leftClickToOpen:true,openPosition:"BL",disable_shadow:false,postCreate:function(){this.inherited(arguments);if(!this.isLeftToRight()){this.offset_x=-this.offset_x;}if(dojo.isIE===6){return;}this._connects.push([dojo.connect(window,"resize",this,function(){if(this.shadow){this.shadow.setDisabled(true);}dijit.popup.close(this);})]);dojo.addClass(this.domNode,"lotusActionMenu");},onItemHover:function(item){if(this.popupFocusTimer){clearTimeout(this.popupFocusTimer);}this.inherited(arguments);},_openMyself:function(e,node,_4f1){if(this.leftClickToOpen&&e.button>0){return;}try{dojo.stopEvent(e);}catch(err){}var _4f2=e.target;if(this.targetNodeIds&&this.targetNodeIds.length==1){_4f2=this.targetNodeIds[0];}var _4f3=dojo.coords(_4f2,true);var cbox=dojo.contentBox(_4f2);var _4f4=0;if(this.openPosition.charAt(1)=="R"){_4f4=this.isLeftToRight()?cbox.w:-cbox.w;}var x=_4f3.x+_4f4+(this.offset_x||0)+(this.isLeftToRight()?0:cbox.w);var y=_4f3.y+(this.openPosition.charAt(0)=="B"?cbox.h:0)+(this.offset_y||0);var self=this;var _4f5=null;try{_4f5=dijit.getFocus(this);}catch(error){}this.closeAndRestoreFocus=function(){if(self.refocus&&_4f5){dijit.focus(_4f5);}dijit.popup.close(self);};this._prepareData();if(this.getChildren().length===0){return;}dijit.popup.open({popup:this,x:x,y:y,onExecute:this.closeAndRestoreFocus,onCancel:this.closeAndRestoreFocus,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);dijit.popup.close(this);};},_prepareData:function(){if(!this._isMenuCreated&&!this._isMenuCreating){this._isMenuCreating=true;this.prepareData();this._isMenuCreated=true;this._isMenuCreating=false;}},prepareData:function(){},_openPopup:function(){if(this.focusedChild.popup._prepareData){this.focusedChild.popup._prepareData();}if(this.focusedChild.popup.getChildren().length===0){return;}this._orient=this.isLeftToRight()?{"TR":"TL","TL":"TR"}:{"TL":"TR","TR":"TL"};this.inherited(arguments);},onOpen:function(){this.inherited(arguments);if(this.disable_shadow){return;}var p=dojo.marginBox(this.domNode);if(p.w<1&&p.h<1){return;}this.shadow=this.shadow||new com.ibm.mm.builder.widget.Shadow({node:this.domNode});this.resizeShadow();},resizeShadow:function(){var s=this.shadow;setTimeout(function(){if(s){s.resize();s.setDisabled(false);}},50);},onClose:function(){dojo.forEach(this.containerNode.childNodes,function(item){dojo.removeClass(item,"dijitMenuItemHover");dojo.removeClass(item,"dijitMenuItemSelected");});this.inherited(arguments);if(this.shadow){this.shadow.setDisabled(true);}},destroy:function(){if(this.shadow){this.shadow.destroy();this.shadow=null;}this._onBlur=null;this.closeAndRestoreFocus=null;try{dijit.popup.close(this);}catch(e){}this.inherited(arguments);}});dojo.declare("com.ibm.mm.builder.widget.Shadow",dojox.fx.Shadow,{shadowPng:dojo.moduleUrl("com.ibm.mm.builder.widget","resources/shadow"),shadowThickness:5,shadowOffset:0,shadowOffset_x:5,postCreate:function(){this.inherited(arguments);this.node.style.position="relative";this.realNode=this.node;this.node=this._getFakeNode(this.realNode);this.pieces={};var x0=this.shadowOffset_x;var x1=-1*this.shadowThickness+this.shadowOffset_x;var y0=this.shadowOffset;var y1=this.shadowOffset+this.shadowThickness;if(this.isLeftToRight()){this._makePiece("tr","top",y0,"left",0);this._makePiece("r","top",y1,"left",0,"scale");this._makePiece("bl","top",0,"left",x1);this._makePiece("b","top",0,"left",x0,"scale");this._makePiece("br","top",0,"left",0);}else{x1=-1*this.shadowThickness;this._makePiece("tl","top",y0,"left",x1);this._makePiece("l","top",y1,"left",x1,"scale");this._makePiece("bl","top",0,"left",x1);this._makePiece("b","top",0,"left",0,"scale");this._makePiece("br","top",0,"right",0);}this.nodeList=dojo.query(".shadowPiece",this.node);dojo.forEach(this.nodeList,"dojo.attr(item,\"alt\",\"\");item.style.zIndex=1001;");},_getFakeNode:function(node){var _4f6=dojo.coords(node,true);var _4f7=dojo.query(dojo.create("div",null,dojo.body())).addClass("mashupsShadowNode").style({position:"absolute",left:_4f6.x+"px",top:_4f6.y+"px",zIndex:998})[0];dojo.query(dojo.create("iframe",{frameborder:0},_4f7)).addClass("shadowedNodePlaceHolder").addClass("shadowPiece").style({heith:"0px",width:"0px"});this._resizeFakeNode(_4f7);return _4f7;},setDisabled:function(_4f8){this.inherited(arguments);if(this.node){this.node.style.visibility=_4f8?"hidden":"visible";}},resize:function(args){this._resizeFakeNode();var x,y;if(args){x=args.x;y=args.y;}else{var co=dojo.marginBox(this.realNode);x=co.w;y=co.h;}var _4f9=Math.max(x-this.shadowOffset_x,0);var _4fa=Math.max(y-(this.shadowOffset+this.shadowThickness),0);y=Math.max(y,1);x=Math.max(x,1);if(this.isLeftToRight()){dojo.marginBox(this.pieces.r,{h:_4fa,l:x});dojo.marginBox(this.pieces.tr,{l:x});dojo.marginBox(this.pieces.br,{l:x});}else{dojo.marginBox(this.pieces.l,{h:_4fa});}dojo.marginBox(this.pieces.b,{w:_4f9,t:y});dojo.marginBox(this.pieces.bl,{t:y});dojo.marginBox(this.pieces.br,{t:y});},_resizeFakeNode:function(node){var _4fb=node||this.node;var _4fc=dojo.coords(this.realNode,true);var pl=dojo.query(".shadowedNodePlaceHolder",_4fb)[0];if(pl){dojo.marginBox(pl,{w:_4fc.w,h:_4fc.h});}if(_4fb){dojo.marginBox(_4fb,{l:_4fc.x,t:_4fc.y});}},uninitialize:function(){if(this.node){dojo.destroy(this.node);this.node=null;}this.inherited(arguments);}});}if(!dojo._hasResource["com.ibm.mm.builder.widget.OpenSearchDropdownMenu"]){dojo._hasResource["com.ibm.mm.builder.widget.OpenSearchDropdownMenu"]=true;dojo.provide("com.ibm.mm.builder.widget.OpenSearchDropdownMenu");dojo.require("dijit.Menu");dojo.declare("com.ibm.mm.builder.widget.OpenSearchDropdownMenu",[com.ibm.mm.builder.widget.ShadowMenu],{_openMyself:function(e,node,_4fd){if(this.leftClickToOpen&&e.button>0){return;}try{dojo.stopEvent(e);}catch(exp){}var _4fe=e.target;if(this.targetNodeIds&&this.targetNodeIds.length==1){_4fe=this.targetNodeIds[0];}var _4ff=dojo.coords(_4fe,true);var cbox=dojo.contentBox(_4fe);var x=_4ff.x+(this.offset_x||0);var y=_4ff.y+cbox.h+(this.offset_y||0);var self=this;var _500=dijit.getFocus(this);function _501(){if(self.refocus){dijit.focus(_500);}opensearch.popup.close(self);};opensearch.popup.open({popup:this,x:x,y:y,onExecute:_501,onCancel:_501,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);opensearch.popup.close(this);};},destroy:function(){com.ibm.mm.builder.widget.OpenSearchDropdownMenu.superclass.destroy.call(this);if(this.domNode&&this.domNode.id){dijit.registry.remove(this.domNode.id);}if(this._onBlur){this._onBlur=null;}dijit.popup.close(this);},postCreate:function(){this.entrys=[];dojo.addClass(this.domNode,"OpenSearchDropdownMenu");com.ibm.mm.builder.widget.OpenSearchDropdownMenu.superclass.postCreate.apply(this);dojo.subscribe("com.ibm.mm.catalog.Topics.SearchType_Change",this,"changeSelected");},changeSelected:function(type){var self=this;dojo.forEach(this.entrys,function(item){if(type===item.type){self.setCurrentSearchType(item.domNode);}});},setCurrentSearchType:function(_502){var _503=null;if(this._currentSearchType){if(this._currentSearchType==_502){return;}var _504=dojo.query("td",this._currentSearchType)[0];dojo.removeClass(_504,"checked");var _505=dojo.query("td",this._currentSearchType)[1];dojo.removeClass(_505,"checked");_503=dojo.query("span",_505)[0];_503.innerHTML="";}var _506=dojo.query("td",_502)[0];dojo.addClass(_506,"checked");var _507=dojo.query("td",_502)[1];dojo.addClass(_507,"checked");this._currentSearchType=_502;_503=dojo.query("span",_507)[0];_503.innerHTML=" "+com.ibm.mm.builder.coreWidgetsStrings.I_MODE_IS_SELECT;}});dojo.declare("com.ibm.mm.builder.widget.OpenSearchDropdownMenuItem",[dijit.MenuItem],{type:"",iconSrc:builderConfig.builderPath+"/images/blueCheckmark.gif",postCreate:function(){this.inherited("postCreate",arguments);this.iconNode.src=this.iconSrc;dojo.addClass(this.iconNode.parentNode,"menuItemCheckMark");this.domNode.setAttribute("type",this.type);var _508=dojo.doc.createElement("span");dojo.addClass(_508,"access");this.containerNode.appendChild(_508);}});dojo.declare("com.ibm.mm.builder.widget.OpenSearchDropdownMenuSeparator",[dijit.MenuSeparator],{templateString:"<tr class=\"dijitMenuSeparator\"><td colspan=3>"+"<div class=\"modeSelector_seperator\">"+"<div class=\"menuItemCheckMark\" dojoAttachPoint=\"markSeparator\"> </div>"+"<div class=\"modeSelector_divider\"\"></div>"+"</div>"+"</td></tr>",destroy:function(){dijit.registry.remove(this.domNode.id);},postCreate:function(){dojo.setSelectable(this.domNode,false);this.domNode.style.height="2px";this.domNode.style.lineHeight="2px";this.markSeparator.style.background="url(/wps/mccbuilder.v3001/images/sideBar.gif)";this.domNode.style.fontSize="1pt";}});}if(!dojo._hasResource["com.ibm.mm.builder.widget.ViewMorePage"]){dojo._hasResource["com.ibm.mm.builder.widget.ViewMorePage"]=true;dojo.provide("com.ibm.mm.builder.widget.ViewMorePage");dojo.declare("com.ibm.mm.builder.widget.ViewMorePage",[dijit._Widget,dijit._Templated,dijit._Container],{templateString:"<div><div dojoAttachPoint=\"containerNode\"></div></div>",postCreate:function(){this.pageList=[];dojo.forEach(this.items,function(item){this.addChild(new com.ibm.mm.builder.widget.ViewMorePageItem({title:item.title,pid:item.pid,pre:item.pre,end:item.end}));},this);},reGenerate:function(_509){this.pageList=[];this.items=_509;this.destroyDescendants();dojo.forEach(this.items,function(item){this.addChild(new com.ibm.mm.builder.widget.ViewMorePageItem({title:item.title,pid:item.pid,pre:item.pre,end:item.end}));},this);}});dojo.declare("com.ibm.mm.builder.widget.ViewMorePageItem",[dijit._Widget,dijit._Templated,dijit._Container,dijit._Contained],{templateString_rtl:"<div style=\"height:25px\" waiRole=\"presentation\">"+"<div dojoAttachPoint=\"treeItemDividerTop\" class=\"treeItemDividerTop\"></div>"+"<div dojoAttachPoint=\"contentNode\" class=\"pageItemContent\" dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover\" waiRole=\"presentation\">"+"<span style=\"float:right\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\">"+"</span>"+"<span style=\"float:right\" dojoAttachPoint=\"labelDescNodePre\" class=\"treeItemDesc treeItemDescPreLoc\"></span>"+"<span style=\"float:right\" dojoAttachPoint=\"labelNode\" class=\"treeItemText\" role=\"listitem\" tabindex=\"0\"></span>"+"<span style=\"float:right\" dojoAttachPoint=\"labelDescNode\" class=\"treeItemDesc treeItemDescLoc\"></span>"+"<span style=\"padding:0px 20px;float:left\">"+"<input dojoAttachPoint=\"btnAddNode\" class=\"sharingPageTreeButton\" type=\"button\" value=\"\" dojoAttachEvent=\"onclick:_onAddClick\"/>"+"<input style=\"display:none\" class=\"sharingPageTreeButton\" dojoAttachPoint=\"btnRemoveNode\" type=\"button\" value=\"\" dojoAttachEvent=\"onclick:_onRemoveClick\"/>"+"</span>"+"</div>"+"<div dojoAttachPoint=\"treeItemDividerBottom\" class=\"treeItemDividerBottom\"></div>"+"</div>",templateString:"<div style=\"height:25px\" waiRole=\"presentation\">"+"<div dojoAttachPoint=\"treeItemDividerTop\" class=\"treeItemDividerTop\"></div>"+"<div dojoAttachPoint=\"contentNode\" class=\"pageItemContent\" dojoAttachEvent=\"onmouseenter:_onHover,onmouseleave:_onUnhover\" waiRole=\"presentation\">"+"<span style=\"float:left\" dojoAttachPoint=\"iconNode\" waiRole=\"presentation\">"+"</span>"+"<span style=\"float:left\" dojoAttachPoint=\"labelDescNodePre\" class=\"treeItemDesc treeItemDescPreLoc\"></span>"+"<span style=\"float:left\" dojoAttachPoint=\"labelNode\" class=\"treeItemText\" role=\"listitem\" tabindex=\"0\"></span>"+"<span style=\"float:left\" dojoAttachPoint=\"labelDescNode\" class=\"treeItemDesc treeItemDescLoc\"></span>"+"<span style=\"padding:0px 20px;float:right\">"+"<input dojoAttachPoint=\"btnAddNode\" class=\"sharingPageTreeButton\" type=\"button\" value=\"\" dojoAttachEvent=\"onclick:_onAddClick\"/>"+"<input style=\"display:none\" class=\"sharingPageTreeButton\" dojoAttachPoint=\"btnRemoveNode\" type=\"button\" value=\"\" dojoAttachEvent=\"onclick:_onRemoveClick\"/>"+"</span>"+"</div>"+"<div dojoAttachPoint=\"treeItemDividerBottom\" class=\"treeItemDividerBottom\"></div>"+"</div>",postMixInProperties:function(){if(builderConfig.isBidi){this.templateString=this.templateString_rtl;}},postCreate:function(){this.labelDescNodePre.innerHTML=this.pre;this.labelDescNode.innerHTML=this.end;this.labelNode.innerHTML=this.title;this.domNode.title=com.ibm.mm.builder.utils.htmlUtil.unEscapeString(this.title);this.btnAddNode.value=com.ibm.mm.builder.coreWidgetsStrings.I_COMMON_ADD;this.btnRemoveNode.value=com.ibm.mm.builder.coreWidgetsStrings.I_COMMON_REMOVE;this._changeToAdd();},_onHover:function(){dojo.addClass(this.domNode,"highLightTreeItem");dojo.addClass(this.labelNode,"highLightTreeText");this.treeItemDividerTop.style.backgroundImage="url('"+builderConfig.builderPath+"/images/divider_morepages_hover_top.png')";},_onUnhover:function(){dojo.removeClass(this.domNode,"highLightTreeItem");dojo.removeClass(this.labelNode,"highLightTreeText");this.treeItemDividerTop.style.backgroundImage="";},_changeToAdd:function(){this.labelNode.style.color="#000000";this.labelNode.style.fontSize="12px";this.labelNode.fontFamily="Arial";this.btnAddNode.style.display="";this.btnRemoveNode.style.display="none";},_changeToRemove:function(){this.labelNode.style.color="#BDBDD3";this.btnAddNode.style.display="none";this.btnRemoveNode.style.display="";},_onRemoveClick:function(){this._changeToAdd();this.removeItem(this.getParent().pageList,this.pid);},removeItem:function(_50a,_50b){for(var i=0,n=0;i<_50a.length;i++){if(_50a[i]!=_50b){_50a[n++]=_50a[i];}}_50a.length-=1;},_onAddClick:function(){this._changeToRemove();this.getParent().pageList.push(this.pid);}});}if(!dojo._hasResource["com.ibm.mm.builder.dialog.ACLReassignDialog"]){dojo._hasResource["com.ibm.mm.builder.dialog.ACLReassignDialog"]=true;dojo.provide("com.ibm.mm.builder.dialog.ACLReassignDialog");dojo.declare("com.ibm.mm.builder.dialog.ACLReassignDialog",null,{aclReassignDialog:null,aclReassignRootDiv:null,constructor:function(){this.init();},init:function(){this.initACLReassignContent();var _50c=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID()+"_accessControlReassign";var _50d=(dojo.isIE)?"370px":"350px";this.aclReassignDialog=new com.ibm.mm.builder.widget.CustomDialog({id:_50c,title:com.ibm.mm.builder.coreWidgetsStrings.I_ACL_CONFLICT_TITLE,nodeWidth:_50d,containerBackgroundColor:"white",hasRightBottomResizer:false},this.aclReassignRootDiv);},initACLReassignContent:function(){this.maxLen=dojo.isIE?50:95;if(ibmConfig.fontSizeEnlarged&&dojo.isSafari){this.maxLen=dojo.isSafari<4?65:60;}this.aclReassignRootDiv=document.createElement("div");var _50e=document.createElement("div");dojo.addClass(_50e,"accessControlReassignDiv");var _50f=document.createElement("span");dojo.addClass(_50f,"accessControlReassignTitle");_50f.innerHTML=com.ibm.mm.builder.coreWidgetsStrings.I_ACL_INFORMATION_1+"<br/><br/>";_50e.appendChild(_50f);var _510=document.createElement("span");dojo.addClass(_510,"accessControlReassignConfirm");_510.innerHTML="<br/>"+com.ibm.mm.builder.coreWidgetsStrings.I_ACL_INFORMATION_2+"<br/><br/>";_50e.appendChild(_510);var _511=document.createElement("div");dojo.addClass(_511,"accessControlReassignBottomDiv");var _512=com.ibm.mm.builder.utils.htmlUtil;var _513=document.createElement("input");_513.setAttribute("type","button");_513.setAttribute("value",_512.getStrWithLimit(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_REASSIGN_BTN,_513,this.maxLen));_513.setAttribute("title",com.ibm.mm.builder.coreWidgetsStrings.I_ACL_REASSIGN_BTN);dojo.attr(_513,"role","button");dojo.attr(_513,"wai-role","button");dojo.attr(_513,"aria-label",com.ibm.mm.builder.coreWidgetsStrings.I_ACL_REASSIGN_BTN);dojo.addClass(_513,"lotusFormButton");dojo.addClass(_513,"lotusFormButtonReassign");this._defaultFocus=_513;var _514=document.createElement("input");_514.setAttribute("type","button");_514.setAttribute("value",_512.getStrWithLimit(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_REASSIGN_NOT_CHANGE,_514,this.maxLen));_514.setAttribute("title",com.ibm.mm.builder.coreWidgetsStrings.I_ACL_REASSIGN_NOT_CHANGE);dojo.attr(_514,"role","button");dojo.attr(_514,"wai-role","button");dojo.attr(_514,"aria-label",com.ibm.mm.builder.coreWidgetsStrings.I_ACL_REASSIGN_NOT_CHANGE);dojo.addClass(_514,"lotusFormButton");dojo.addClass(_514,"lotusFormButtonReassignNoChange");_511.appendChild(_513);_511.appendChild(_514);_50e.appendChild(_511);this.aclReassignRootDiv.appendChild(_50e);dojo.connect(_513,"onclick",this,"reassign");dojo.connect(_514,"onclick",this,"noChange");},_getSource:function(perm){switch(perm){case "aclView":this.viewIsSource=true;return com.ibm.mm.builder.dnd.viewSource;case "aclPersonal":this.personalizeIsSource=true;return com.ibm.mm.builder.dnd.personalizeSource;case "aclEdit":this.editIsSource=true;return com.ibm.mm.builder.dnd.editSource;}},reassign:function(){for(var i=0;i<this.aclReassignList.length;i++){var _515=this._getSource(this.aclReassignList[i].perm);this.layout.transferNode(_515,this.target,this.aclReassignList[i].id,null,false);}if(this.viewIsSource){dojo.publish("aclView");this.viewIsSource=false;}if(this.personalizeIsSource){dojo.publish("aclPersonalize");this.personalizeIsSource=false;}if(this.editIsSource){dojo.publish("aclEdit");this.editIsSource=false;}dojo.publish(com.ibm.mm.builder.eventTopics.UpdateAllPageControl);this.hide();},noChange:function(){this.hide();},show:function(_516,_517,list){this.layout=_516;this.viewIsSource=false;this.editIsSource=false;this.target=_517;this.aclReassignList=list;var _518=document.createElement("span");dojo.addClass(_518,"accessControlReassignList");_518.innerHTML=this._listToHtml(this.aclReassignList);var _519=dojo.query(".accessControlReassignList",this.aclReassignDialog.domNode);if(!!_519&_519.length>0){dojo.destroy(_519[0]);}var _51a=dojo.query(".accessControlReassignConfirm",this.aclReassignDialog.domNode)[0];_51a.parentNode.insertBefore(_518,_51a);this.aclReassignDialog.show();this._defaultFocus.focus();},hide:function(){this.aclReassignDialog.hide();},_listToHtml:function(list){var _51b="";for(var i=0;i<list.length;i++){var perm;switch(list[i].perm){case "aclView":perm=com.ibm.mm.builder.coreWidgetsStrings.I_ACL_PERMISSION_VIEW;break;case "aclPersonalize":perm="Personalize";break;case "aclEdit":perm=com.ibm.mm.builder.coreWidgetsStrings.I_ACL_PERMISSION_EDIT;break;default:perm="";}var _51c=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_INFORMATION_HAS,[list[i].name,"<span class='accessControlReassignLevel'>"+perm+"</span>"," <span class='accessControlReassignHas' > "," </span>"]);_51b=_51b+"<span>"+_51c+"</span><br/>";}return _51b;}});}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.navigation.NavigationStore"]){dojo._hasResource["com.ibm.mm.builder.iwidget.navigation.NavigationStore"]=true;dojo.provide("com.ibm.mm.builder.iwidget.navigation.NavigationStore");dojo.require("dojo.data.ItemFileReadStore");dojo.declare("com.ibm.mm.builder.model.NavigationStore",dojo.data.ItemFileReadStore,{constructor:function(_51d,_51e,_51f){this.navigationModel=_51d;this.navigationUtil=com.ibm.mm.builder.utils.navigationUtil;this.pageUtil=com.ibm.mm.builder.utils.pageUtil;this.acModeUtil=com.ibm.mm.builder.utils.acModelUtil;this.items=[];this.canSeeHiddenPages=this.acModeUtil.isPageOwner(_51f)||this.acModeUtil.getUserPermission(_51f)===this.acModeUtil.EDIT;var root=this.navigationUtil.getNavigationRootNode(_51e);this.items.push(root);var _520=this.navigationModel.getChildren(root);while(_520.hasNext()){var _521=_520.next();if(this.pageUtil.isVisiable(_521)||this.canSeeHiddenPages){this.items.push(_521);}}this.parent_node_map={};this.id_node_map={};this.rootNode=root;root.__type="root";dojo.forEach(this.items,function(node){var _522=this.navigationModel.getParent(node.getID()).start();var _523=_522?_522.getID():null;if(_523){if(!this.parent_node_map[_523]){this.parent_node_map[_523]=[];}this.parent_node_map[_523].push(node);this.id_node_map[node.getID()]=node;}},this);dojo.forEach(this.items,function(node){node.__children=this.parent_node_map[node.getID()];var _524=this.navigationModel.hasChildren(node);node.__type=_524?"_stub":"node";},this);},getValue:function(item,_525,_526){var _527=this.getValues(item,_525);return (_527.length>0)?_527[0]:_526;},getValues:function(item,_528){var _529=null;switch(_528){case "id":_529=[item.getID()];break;case "title":if(this.rootNode===item){_529=[" "];}else{_529=[this.pageUtil.getUnescapedPageTitle(item.getID())];}break;case "description":_529=[this.pageUtil.getPageDescription(item.getID())];break;case "type":_529=item.__type;break;case "parentId":var _52a=this.navigationModel.getParent(item.getID()).start();var _52b=_52a?_52a.getID():null;_529=[_52b];break;case "children":_529=item.__children;break;case "selfUri":_529=[item.getID()];break;default:_529=null;}_529=(_529&&dojo.isArray(_529))?_529:[_529];return _529;},getAttributes:function(item){return ["id","title","description","type","parentId","children","selfUri"];},hasAttribute:function(item,_52c){return !!(this.getValue(item,_52c));},containsValue:function(item,_52d,_52e){return this.getValue(item,_52d)==_52e;},isItem:function(_52f){return _52f.getID();},isItemLoaded:function(_530){return this.isItem(_530)&&_530.__type!=="_stub";},loadItem:function(_531){var item=_531.item;this._assertIsItem(item);var _532=this.navigationModel.getChildren(item);item.__children=[];while(_532.hasNext()){var _533=_532.next();if(this.pageUtil.isVisiable(_533)||this.canSeeHiddenPages){if(!_533.__type){_533.__type=this.navigationModel.hasChildren(_533)?"_stub":"node";}var _534=this.navigationModel.getParent(_533.getID()).start();var _535=_534?_534.getID():null;if(!this.parent_node_map[_535]){this.parent_node_map[_535]=[];}this.parent_node_map[_535].push(_533);this.id_node_map[_533.getID()]=_533;this.items.push(_533);item.__children.push(_533);}}item.__type="node";if(_531.onItem){var _536=_531.scope?_531.scope:dojo.global;_531.onItem.call(_536,item);}},getFeatures:function(){return {"dojo.data.api.Read":true,"dojo.data.api.Identity":"id"};},close:function(_537){},getLabel:function(item){return this.getValue(item,"title");},getLabelAttributes:function(item){return ["title"];},getIdentity:function(item){return this.getValue(item,"id");},getIdentityAttributes:function(item){return ["id"];},fetchItemByIdentity:function(_538){var node=this.id_node_map[_538.identify];node=node?node:null;if(_538.onItem){var _539=_538.scope?_538.scope:dojo.global;_538.onItem.call(_539,node);}},fetch:function(_53a){var _53b=_53a.query;if(_53b===null){_53a.onComplete([this.rootNode],_53a);}},getRootItem:function(){return this.rootNode;},reset:function(){dojo.forEach(this.items,function(item){delete item.__type;delete item.__children;});}});}if(!dojo._hasResource["com.ibm.mm.builder.dialog.DialogFooter"]){dojo._hasResource["com.ibm.mm.builder.dialog.DialogFooter"]=true;dojo.provide("com.ibm.mm.builder.dialog.DialogFooter");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.mm.builder.dialog.DialogFooter",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"${baseClass}\" role=\"region\" aria-label=\"dialog footer\">"+"<input id=\"${saveId}\" role=\"button\" wairole=\"button\" aria-label=\"${saveText}\" title=\"${saveText}\" type=\"button\" class=\"${saveClass}\" value=\"${saveText}\" dojoAttachPoint=\"saveNode\" dojoAttachEvent=\"onclick:onSave\" accesskey=\"${saveAccessKey}\"/>"+"<a id=\"${cancelId}\" role=\"button\" wairole=\"button\" title=\"${cancelText}\" aria-label=\"${cancelText}\" class=\"${cancelClass}\" href=\"JavaScript:void(0)\" dojoAttachPoint=\"cancelNode\" dojoAttachEvent=\"onclick:onCancel,onkeypress:_onCancelKeypress\">${cancelText}</a>"+"</div>",baseClass:"lotusDialogFooter",widgetId:"",IWID:"",saveId:"_${widgetId}_btn_save",saveClass:"lotusFormButton common_save",saveText:"${I_COMMON_SAVE}",saveAccessKey:"Q",cancelId:"_${widgetId}_cancel_text",cancelClass:"common_cancel lotusAction",cancelText:"${I_COMMON_CANCEL}",cancelAccessKey:"",resourceBundles:[com.ibm.mm.builder.coreWidgetsStrings],postMixInProperties:function(){this.inherited(arguments);if(this.IWID){this.widgetId=this.IWID.substr(1,this.IWID.length-2);}var _53c=dojo.mixin.apply(dojo,[{},this].concat(this.resourceBundles));dojo.forEach(["saveId","saveText","cancelId","cancelText"],function(prop){this[prop]=dojo.string.substitute(this[prop],_53c);},this);},postCreate:function(){if(!this.cancelAccessKey){this.cancelNode.removeAttribute("accesskey");}if(!this.saveAccessKey){this.saveNode.removeAttribute("accesskey");}this.inherited(arguments);},_onSaveKeypress:function(e){if(e.charCode===dojo.keys.SPACE||e.keyCode===dojo.keys.ENTER){this.onSave(e);}},_onCancelKeypress:function(e){if(e.charCode===dojo.keys.SPACE||e.keyCode===dojo.keys.ENTER){this.onCancel(e);}},onSave:function(evt){},onCancel:function(evt){}});}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.spacemanager.SpaceManagerConstants"]){dojo._hasResource["com.ibm.mm.builder.iwidget.spacemanager.SpaceManagerConstants"]=true;dojo.provide("com.ibm.mm.builder.iwidget.spacemanager.SpaceManagerConstants");dojo.setObject("com.ibm.mm.builder.iwidget.spacemanager.SpaceManagerConstants",{ModelName:{"SpacesCategory":"spaces_category","RecentlyVisitedSpaces":"recently_visited_spaces","FavoriteSpaces":"favorite_spaces","AllSpaces":"all_spaces","MySpaces":"my_spaces"},Topic:{"Space":{"create":"/spaceManager/space/create","update":"/spaceManager/space/update","delete":"/spaceManager/space/delete","filter":"/spaceManager/space/filter","refresh":"/spaceManager/space/refresh","switch":"/spaceManager/space/switch","switchPage":"/spaceManager/space/switchPage","addToRecentSpaces":"/spaceManager/space/addToRecentSpaces","removeFromRecentSpaces":"/spaceManager/space/removeFromRecentSpaces","refreshRecentSpaces":"/spaceManager/space/refreshRecentSpaces","changeSpaceTitle":"/spaceManager/space/changeSpaceTitle"},"Category":{"change":"/spaceManager/category/change"},"Common":{"showMessage":"/spaceManager/common/showMessage","hideMessage":"/spaceManager/common/hideMessage"}},Config:{"RecentSpaces":{"MAX_LENGTH":builderConfig.recentSpacesMaximumNumber,"INITIAL_SIZE":builderConfig.recentSpacesMaximumNumber}},Action:{"ADD_PAGE":"refreshWithNewPages","ADD_FAVORITE":"refreshWithAddFavorite","SHOW_SPACE":"refreshWithShowSpace","HIDE_SPACE":"refreshWithHideSpace","SHOW_PAGE":"refreshWithShowPage","HIDE_PAGE":"refreshWithHidePage","MAKE_HOME":"refreshWithMakeHomeSpace","UNMAKE_HOME":"refreshWithUnmakeHomeSpace","CREATE_SPACE":"refreshWithCreateSpace","DELETE_SPACE":"refreshWithDeleteSpace","EDIT_SPACE":"refreshWithEditSpace","CHANGE_OWNER":"refreshWithChangeOwner","DELETE_PAGE":"refreshWithDeletePage","EDIT_PAGE":"refreshWithEditPage","REMOVE_FAVORITE":"refreshWithRemoveFavorite","MOVE_PAGE":"refreshWithMovePage"},CookieKey:{RECENT_SPACES:"digest.ignore.recent.spaces."},"ALL":"all","FAVORITE":"favorite","MY":"my"});}if(!dojo._hasResource["com.ibm.mm.builder.dialog.ReorderingPageDialog"]){dojo._hasResource["com.ibm.mm.builder.dialog.ReorderingPageDialog"]=true;dojo.provide("com.ibm.mm.builder.dialog.ReorderingPageDialog");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.Tree");dojo.require("dijit.tree.TreeStoreModel");dojo.require("dojo.fx");dojo.require("dojo.string");dojo.declare("com.ibm.mm.builder.dialog.ReorderingPageDialog",[dijit._Widget,dijit._Templated],{pageId:null,spaceId:null,widgetId:null,store:null,navigationTree:null,targetPageId:null,_lastSelection:null,messageBox:null,navTree:null,pageTitleLabel:null,form:null,widgetsInTemplate:true,templateString:null,constructor:function(args){dojo.mixin(this,args);this.navigationUtil=com.ibm.mm.builder.utils.navigationUtil;this.pageUtil=com.ibm.mm.builder.utils.pageUtil;this.spaceUtil=com.ibm.mm.builder.utils.spaceUtil;this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.dialog.ReorderingPageDialog");this.templateString="<div class='reorder-page-dialog'> <form dojoAttachPoint='form' onsubmit='return false;'> <div class='dialog-content'> <div class='lotusMessage' role='alert' dojoAttachPoint='messageBox' style='display:none'></div> <div class='page-position-buttons-area' role='region' aria-label='page position buttons'> <fieldset> <legend class='title' dojoAttachPoint='pageTitleLabel'></legend> <ul class='buttons-list'> <li> <input id='"+this.widgetId+"above' type='radio' name='position' value='previous'> <label for='"+this.widgetId+"above' class='page-position-buttons'>${I_ABOVE_THE_SELECTED_PAGE}</label> </li> <li> <input id='"+this.widgetId+"below' type='radio' name='position' value='next'> <label for='"+this.widgetId+"below' class='page-position-buttons'>${I_BELOW_THE_SELECTED_PAGE}</label> </li> <li> <input id='"+this.widgetId+"children' type='radio' name='position' value='children' checked> <label for='"+this.widgetId+"children' class='page-position-buttons'>${I_AS_CHILD_OF_SELECTED_PAGE}</label> </li> </ul> </fieldset> </div> <div class='nav-tree'> <div dojoAttachPoint='navTree' role='region' aria-label='page tree'></div> </div> </div> <div dojoType='com.ibm.mm.builder.dialog.DialogFooter' dojoAttachEvent='onSave: save, onCancel: hide'> </div> </form> </div>";},postMixInProperties:function(){this.bundle=com.ibm.mm.builder.coreWidgetsStrings;this.messages=com.ibm.mm.builder.coreWidgetsMessages;dojo.mixin(this,this.bundle);},setPageId:function(_53d,_53e){this.pageId=_53d;this.spaceId=_53e||this.spaceUtil.getSpaceIdByPageId(_53d);dojo.fadeOut({node:this.messageBox}).play();},refresh:function(){this.showMessage(false);this.targetPageId=null;this.currentPageId=this.pageId;var _53f=this.pageUtil.getPageTitle(this.currentPageId);this.pageTitleLabel.innerHTML=this.bundle.I_MOVE_THE_PAGE_TO_BE;if(this.navigationTree){this.navigationTree.destroy();}var _540=this.navigationUtil.getNavigationModel();this.store=new com.ibm.mm.builder.model.NavigationStore(_540,this.spaceId,this.pageId);var _541=new dijit.tree.TreeStoreModel({store:this.store,labelAttr:"title",typeAttr:"type",childrenAttr:["children"]});this.navigationTree=new dijit.Tree({id:"navigation_tree_"+this.widgetId,model:_541,persist:false,showRoot:true,getIconClass:function(item,_542){return (!item||item===this.model.store.rootNode)?"rootNode":"pageNode";}}).placeAt(this.navTree);if(!dojo.isIE){dojo.query(".dijitTreeIsRoot .dijitTreeRow .dijitTreeLabel",this.navTree).at(0).style({backgroundColor:"inherit"});}this.navigationTree.startup();this.connect(this.navigationTree,"onClick","onTitleClick");this.connect(this.navigationTree,"_expandNode","onExpandNode");},onExpandNode:function(node){},onTitleClick:function(item,node){var _543=node.contentNode;if(_543!==this._lastSelection){if(this._lastSelection){dojo.removeClass(this._lastSelection,"selected");}dojo.addClass(_543,"selected");this._lastSelection=_543;}var _544=dojo.query("input[name='position']",this.form);_544.forEach(function(_545){_545.disabled=false;});if(item===this.pageUtil.getPageNode(this.currentPageId)){this.showMessage(this.messages.E_DIFFERENT_LOCATION_REQUIRED_0,"error");_544.forEach(function(_546){_546.disabled=true;});}else{if(this.navigationUtil.isDescendant(this.currentPageId,item.getID())){this.showMessage(this.messages.E_NEW_PAGE_POSITION_MISSING_0,"error");_544.forEach(function(_547){_547.disabled=true;});}else{var _548=this.pageUtil.getPageNode(this.currentPageId);var _549=this._getInvalidMoveMethod(item,_548);if(!!_549&&_549.length>0){if(_549.length<3){this.showMessage(false);}else{this.showMessage(this.messages.E_DIFFERENT_LOCATION_REQUIRED_0,"error");}this._disableInputs(_544,_549);}if(!dojo.every(_544,function(_54a){return _54a.disabled;})){_544.forEach(function(_54b){if(!_54b.disabled){var _54c=_54b.value;var _54d=this.navigationUtil.getReorderPageContext(item.getID(),_54c);_54b.disabled=!this.navigationUtil.getNavigationModel().confirmInsert(_548,_54d.parent,_54d.next);}},this);if(dojo.every(_544,function(_54e){return _54e.disabled;})){this.showMessage(this.messages.E_MOVE_PAGE_INSUFFICIENT_ACCESS_RIGHTS_0,"error");}else{this.showMessage(false);}}}}this.targetPageId=item.getID();},_getInvalidMoveMethod:function(item,page){if(item===this.store.rootNode){var _54f=["previous","next"];var _550=this.navigationUtil.getPageContext(page.getID());if(_550.parent==item){_54f.push("children");}return _54f;}else{var _551=this.navigationUtil.getPageContext(item.getID());var _552=[];if(_551.next==page){_552.push("next");}if(_551.previous==page){_552.push("previous");}if(this.navigationUtil.isDescendant(item.getID(),page.getID(),1)){_552.push("children");}return _552;}},_disableInputs:function(_553,_554){if(!dojo.isArray(_554)){_554=[];}var _555=false;_553.forEach(function(_556){if(dojo.indexOf(_554,_556.value)>=0){if(_556.disabled===false&&_556.checked===true){_556.checked=false;_555=true;}_556.disabled=true;}else{_556.disabled=false;}});if(_555===true){var _557=false;_553.forEach(function(_558){if(_558.disabled===false&&!_557){_558.checked=true;_557=true;}});}},hide:function(){com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.closeMashupDialog",this.widgetId);if(this.store){this.store.reset();}},save:function(){var _559=dojo.formToObject(this.form).position;var _55a=this.pageUtil.getParentPageId(this.currentPageId);var _55b=this.pageUtil.getParentPageId(this.targetPageId);var _55c=this.pageUtil.getPageNode(this.currentPageId);if(this.targetPageId&&_559){var _55d=this.navigationUtil.getReorderPageContext(this.targetPageId,_559);if(this.navigationUtil.getNavigationModel().confirmInsert(_55c,_55d.parent,_55d.next)){var _55e=this.navigationUtil.reorderPageNode(this.currentPageId,this.targetPageId,_559);if(_55e){this.showMessage(_55e,"error");}else{var _55f=com.ibm.mm.builder.iwidget.spacemanager.SpaceManagerConstants;dojo.publish(_55f.Topic.Space.refresh,[_55f.Action.MOVE_PAGE,{currentPageId:this.currentPageId,currentPageParentId:_55a,targetPageId:this.targetPageId,targetPageParentId:_55b,position:_559}]);this.hide();}}else{this.showMessage(this.messages.E_MOVE_PAGE_INSUFFICIENT_ACCESS_RIGHTS_0,"error");}}else{this.showMessage(this.messages.E_NEW_PAGE_POSITION_MISSING_0,"error");this.LOGGER.severe("save",this.messages.E_NEW_PAGE_POSITION_MISSING_0);}},showMessage:function(_560,type){if(!_560){dojo.fadeOut({node:this.messageBox}).play();dojo.style(this.messageBox,"display","none");return false;}dojo.empty(this.messageBox);var img=dojo.create("img",{},this.messageBox);var span=dojo.create("span",{"innerHTML":_560},this.messageBox);switch(type){case "info":dojo.attr(img,{"alt":"Information","src":builderConfig.builderPath+"/images/info_icon.png"});dojo.toggleClass(this.messageBox,"lotusWarning",false);dojo.toggleClass(this.messageBox,"lotusInfo",true);break;case "warning":dojo.attr(img,{"alt":"Warning","src":builderConfig.builderPath+"/images/warning_icon.png"});dojo.toggleClass(this.messageBox,"lotusWarning",true);dojo.toggleClass(this.messageBox,"lotusInfo",false);break;default:dojo.attr(img,{"alt":"Error","src":builderConfig.builderPath+"/images/error_icon.png"});dojo.toggleClass(this.messageBox,"lotusWarning",false);dojo.toggleClass(this.messageBox,"lotusInfo",false);}dojo.style(this.messageBox,"display","block");dojo.fadeIn({node:this.messageBox}).play();}});}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WiringModel"]){dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WiringModel"]=true;dojo.provide("com.ibm.mm.builder.iwidget.wiringscreen.WiringModel");dojo.provide("com.ibm.mm.builder.iwidget.wiringscreen.SelectedModel");dojo.declare("com.ibm.mm.builder.iwidget.wiringscreen.WiringModel",null,{constructor:function(_561){var _562=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _563=this.navModel.find(_562).start();this.layoutModel=this.navModel.getLayoutModel(_563);this.widgetModel=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _564=this.layoutModel.find(_561).start();this.selectedWindowId=this.widgetModel.getWidgetWindow(_564).start().getID();this.selectedWidgetId=_561;var _565=null;_565=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentTheme();this.layouts=_565.getLayouts();this.wiringModel=[];this.root=null;this.selectedRoot=[];this.notRootWidgets=[];this.rootArray=[];},setupWiringModel:function(){this.setupInitialData();this._setupModel();},setupWidgetWindowMap:function(){var _566=this.layoutModel.getRoot().start();if(this.layoutModel.hasChildren(_566)){var _567=this.layoutModel.getChildren(_566);_567.setCursorPosition(0);while(_567.hasNext()){var node=_567.next();var _568=this.layoutModel.getChildren(node);_568.setCursorPosition(0);while(_568.hasNext()){var _569=_568.next();if(_569 instanceof (com.ibm.mashups.enabler.layout.LayoutControl)){var lcID=_569.getID();var _56a=this.widgetModel.getWidgetWindow(_569).start();var _56b=_56a.getID();this.widgetWindowMap[_56b]=lcID;}}}}},setupInitialData:function(){this.eventsMap={};this.widgetWindowMap={};var _56c=null;var _56d={};var _56e=null;var _56f=null;this.setupWidgetWindowMap();var _570=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _571=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _572=_570.find(_571).start();var lm=_570.getLayoutModel(_572);var lc=lm.find(this.selectedWidgetId).start();_56c=com.ibm.mm.builder.utils.wireUtil.getWiresTargetCSA2(lc,_571);_56d[this.selectedWidgetId]=this.selectedWidgetId;for(var n=0;n<_56c.length;n++){_56f=_56c[n];_56e={};_56e[_56f.getSourceEventName()]=_56d;var _573=_56f.getSourceWidget().getID();var _574=_56f.getTargetWidget().getID();if(this.widgetWindowMap[_573]&&this.widgetWindowMap[_574]){this.rootArray.push({sourceWidget:_573,sourceEvent:_56f.getSourceEventName(),targetWidget:_574,targetEvent:_56f.getTargetEventName()});}}var _575=this._getOtherLayoutControls(_571);for(var i=0;i<_575.length;i++){var _576=_575[i];var _577=com.ibm.mm.builder.utils.wireUtil.getWiresTargetCSA2(_576,_571);for(var j=0,_578=_577.length;j<_578;j++){if(_577[j].getSourceWidget().getID()==this.selectedWindowId){var wire=_577[j];this.rootArray.push({sourceWidget:wire.getSourceWidget().getID(),sourceEvent:wire.getSourceEventName(),targetWidget:wire.getTargetWidget().getID(),targetEvent:wire.getTargetEventName()});}}}},_getOtherWidgets:function(){var _579=com.ibm.mm.builder.utils.wireUtil.getAllWidgetsInLayouts(this.layouts);var len=_579.length;var _57a=[];for(var x=0;x<len;x++){var id=_579[x];if(id!=this.selectedWidgetId){var _57b=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);_57a.push(_57b);}}return _57a;},_getOtherLayoutControls:function(_57c){var _57d=com.ibm.mm.builder.utils.wireUtil.getAllLayoutControlsCSA2(_57c);var len=_57d.length;var _57e=[];for(var x=0;x<len;x++){var _57f=_57d[x];if(_57f.getID()!=this.selectedWidgetId){_57e.push(_57f);}}return _57e;},_setupRootArray:function(){var _580=this.eventsMap;for(var _581 in _580){if(Object.prototype.hasOwnProperty.call(_580,_581)){for(var _582 in _580[_581]){if(Object.prototype.hasOwnProperty.call(_580[_581],_582)){for(var _583 in _580[_581][_582]){if(Object.prototype.hasOwnProperty.call(_580[_581][_582],_583)&&_580[_581][_582][_583].length>0){var _584={source:_581,event:_582,target:_583,dataName:""};this.rootArray.push(_584);}}}}}}},_setupModel:function(){for(var i=0,_585=this.rootArray.length;i<_585;i++){var wire=this.rootArray[i];this._addLinkToModel(wire.sourceWidget,wire.targetWidget);}},_addLinkToModel:function(_586,_587){var _588=this.widgetWindowMap[_586];var _589=this.widgetWindowMap[_587];var _58a=this.getModel(_588);var _58b=this.getModel(_589);_58a.childrenArray.push(_589);_58b.parents.push(_588);},getSelectedModelFrom:function(_58c){return new com.ibm.mm.builder.iwidget.wiringscreen.SelectedModel(_58c,this);},getRootFrom:function(_58d){this.selectedRoot=this.getParents(_58d);if(this.selectedRoot.length===0){this.selectedRoot.push(this.getModel(_58d));}return this.selectedRoot;},getChildren:function(_58e){var _58f=[];for(var i=0,_590=this.wiringModel.length;i<_590;i++){if(this.wiringModel[i].id==_58e){var _591=this.wiringModel[i].childrenArray;for(var j=0;j<_591.length;j++){var _592=this.getInfo(_591[j]);if(_592){_58f.push(_592);}}break;}else{continue;}}return _58f;},getParents:function(_593){var _594=[];for(var i=0,_595=this.wiringModel.length;i<_595;i++){if(this.wiringModel[i].id==_593){var _596=this.wiringModel[i].parents;for(var j=0;j<_596.length;j++){var _597=this.getInfo(_596[j]);if(_597){_594.push(_597);}}break;}else{continue;}}return _594;},getInfo:function(_598){for(var i=0,_599=this.wiringModel.length;i<_599;i++){if(this.wiringModel[i].id==_598){return this.wiringModel[i];}else{continue;}}},getModel:function(_59a){var _59b="";var _59c="";var _59d=true;var _59e=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _59f=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _5a0=_59f.find(_59e).start();var lm=_59f.getLayoutModel(_5a0);var lc=lm.find(_59a).start();var _5a1=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _5a2=_5a1.getWidgetWindow(lc).start();var _5a3=com.ibm.mm.builder.utils.enablerUtil.getNodeTitle(lc,dojo.locale);if(_5a3==null){_5a3="";}var icon=lc.getMetaData("icon")||lc.getMetaData("thumbnail");if(icon===null){icon=com.ibm.mm.builder.constant.generic_widget_icon;}_59b=_5a3;_59c=icon;var _5a1=this.getInfo(_59a);if(_5a1===null||_5a1===undefined){_5a1={id:_59a,name:_59b,icon:_59c,parents:[],childrenArray:[],visibility:_59d,position:{x:0,y:0},selected:false};this.wiringModel.push(_5a1);}return _5a1;},_alreadyInWidgetInfoArray:function(_5a4,_5a5){var _5a6=[];var _5a7=true;if(dojo.isArray(_5a4)){_5a6=_5a4;}else{_5a6=[_5a4];}for(var i=0;i<_5a6.length;i++){var _5a8=false;for(var j=0,_5a9=_5a5.length;j<_5a9;j++){if(_5a6[i].id==_5a5[j].id){_5a8=true;break;}}_5a7=_5a7&&_5a8;}return _5a7;},_removeFromWidgetInfoArray:function(_5aa,_5ab){for(var i=0,_5ac=_5ab.length;i<_5ac;i++){if(_5aa.id==_5ab[i].id){_5ab.splice(i,1);}}}});dojo.declare("com.ibm.mm.builder.iwidget.wiringscreen.SelectedModel",com.ibm.mm.builder.iwidget.wiringscreen.WiringModel,{constructor:function(_5ad,_5ae){this.size={x:1,y:1};this.parentsHeight=[0];this.childrenHeight=[0];this.levelHeight=[];this.parentModel=_5ae;this.widgetId=_5ad;this.wiringModel=[];this._setModelFrom(_5ad);},_setModelFrom:function(_5af){var _5b0=this.parentModel.getModel(_5af);if(_5b0){this._addSelectedItem(_5b0);this._addParentsToModel(this.widgetId,1);this._addChildrenToModel(this.widgetId,1);this._computeWiringMapSize();this._computeWidgetsPosition();}},hasLink:function(){return (this.levelHeight.length>1);},_addSelectedItem:function(_5b1){_5b1.position.y=1;_5b1.position.x=0;_5b1.selected=true;this.wiringModel.push(_5b1);},_addParentsToModel:function(_5b2,_5b3){var _5b4=this.parentModel.getParents(_5b2);if(_5b4.length>0&&(this.parentsHeight[_5b3]===null||this.parentsHeight[_5b3]===undefined)){this.parentsHeight.push(0);}for(var i=0,_5b5=_5b4.length;i<_5b5;i++){if(!this.getInfo(_5b4[i].id)){_5b4[i].position.x=-_5b3;this.parentsHeight[_5b3]++;_5b4[i].position.y=this.parentsHeight[_5b3];_5b4[i].selected=false;this.wiringModel.push(_5b4[i]);}}},_addChildrenToModel:function(_5b6,_5b7){var _5b8=this.parentModel.getChildren(_5b6);if(this._alreadyInWidgetInfoArray(_5b8,this.wiringModel)){return;}if(_5b8.length>0&&(this.childrenHeight[_5b7]===null||this.childrenHeight[_5b7]===undefined)){this.childrenHeight.push(0);}for(var i=0,_5b9=_5b8.length;i<_5b9;i++){if(!this.getInfo(_5b8[i].id)){_5b8[i].position.x=_5b7;this.childrenHeight[_5b7]++;_5b8[i].position.y=this.childrenHeight[_5b7];_5b8[i].selected=false;this.wiringModel.push(_5b8[i]);}}},_computeWiringMapSize:function(){var _5ba=this.parentsHeight.length+this.childrenHeight.length-1;var _5bb=1;var i=1;for(i=1;i<this.parentsHeight.length;i++){if(this.parentsHeight[i]>_5bb){_5bb=this.parentsHeight[i];}}for(i=1;i<this.childrenHeight.length;i++){if(this.childrenHeight[i]>_5bb){_5bb=this.childrenHeight[i];}}this.size={x:_5ba,y:_5bb};for(i=0;i<_5ba;i++){this.levelHeight.push(0);}},_computeWidgetsPosition:function(){var _5bc=this.parentsHeight.length-1;for(var i=0,_5bd=this.wiringModel.length;i<_5bd;i++){this.wiringModel[i].position.x+=_5bc;if(this.levelHeight[this.wiringModel[i].position.x]<this.wiringModel[i].position.y){this.levelHeight[this.wiringModel[i].position.x]=this.wiringModel[i].position.y;}}}});}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WiringItem"]){dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WiringItem"]=true;dojo.provide("com.ibm.mm.builder.iwidget.wiringscreen.WiringItem");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.mm.builder.iwidget.wiringscreen.WiringItem",[dijit._Widget,dijit._Templated],{templateString:"<div class=\"wiringgraphitem\">\n\t<div class=\"wiringgraphitemimage\" dojoAttachPoint=\"imageNode\"></div>\n\t<div class=\"wiringgraphitemname truncatedLable\" dojoAttachPoint=\"textNode\" widthLimit=\"190\" keepBlankSpace=\"\"></div>\n</div>\n",id:"",icon:null,name:null,title:null,originalname:null,parents:null,childrenArray:null,visibility:true,position:{x:0,y:0},maxNameLength:12,cutLength:9,IEMaxNameLength:12,defaultName:"Mashups Widget",isSelected:false,widgetNameStyleName:"itemname",postCreate:function(){var _5be=dojo.locale;if(_5be&&(_5be.indexOf("zh-tw")===0||_5be.indexOf("ja")===0||_5be.indexOf("ko")===0)){this.maxNameLength=6;this.cutLength=4;this.IEMaxNameLength=6;}this._setWidgetName();this._setWidgetImage();this._setImageBackground();this.domNode.setAttribute("id",this.id+"_overviewgraph_item");},_setWidgetName:function(){this.textNode.innerHTML=this.title||this.defaultName;com.ibm.mm.builder.utils.htmlUtil.truncateNodeText(this.textNode,null,{fontSize:"1.2em",fontWeight:"bold"});if(this.isSelected){this._setWidgetNameStyle("selected");}else{if(this.visibility){this._setWidgetNameStyle("visible");}else{this._setWidgetNameStyle("hidden");}}},_setWidgetNameStyle:function(_5bf){com.ibm.mm.builder.utils.htmlUtil.addClass(this.textNode,_5bf+this.widgetNameStyleName);},_setWidgetImage:function(){var _5c0=document.createElement("img");_5c0.setAttribute("src",this.icon);dojo.attr(_5c0,"width",19);dojo.attr(_5c0,"height",19);this.imageNode.appendChild(_5c0);this.imageNode.setAttribute("id",this.id+"_overviewgraph_item_icon");this.imageNode.title=this.title||this.defaultName;_5c0.alt=this.title||this.defaultName;},_setImageBackground:function(){if(this.visibility){com.ibm.mm.builder.utils.htmlUtil.addClass(this.imageNode,"visibleitembackground");}else{com.ibm.mm.builder.utils.htmlUtil.addClass(this.imageNode,"hiddenitembackground");}},_getShortName:function(){this.originalname=this.title;if(!this.title){return this.defaultName;}this.title=dojo.trim(this.title);var _5c1=this.maxNameLength;if(dojo.isIE){_5c1=this.IEMaxNameLength;}if(this.title.length<_5c1){return this.title;}else{this.title=this.title.substring(0,this.cutLength)+"...";return this.title;}},getImageNode:function(){return this.imageNode;}});}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WiringCanvas"]){dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WiringCanvas"]=true;dojo.provide("com.ibm.mm.builder.iwidget.wiringscreen.WiringCanvas");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.mm.builder.iwidget.wiringscreen.WiringCanvas",[dijit._Widget,dijit._Templated],{templateString:"<div class='wiringcanvas'>"+"<div DojoAttachPoint='graphContainer' class='graphcontainer'>"+"</div>"+"</div>",alone:true,diagramNode:null,cws:com.ibm.mm.builder.coreWidgetsStrings,constructor:function(_5c2){this.itemList=[];this.finishedWidgetList=[];this.finishedLinkList=[];this.widgetItemQueue=[];this.bgWidth=82;this.itemWidth=92;this.gridHorizontalInterval=120;this.bgHeight=54;this.gridHeight=2*this.bgHeight;this.gridWidth=this.itemWidth+this.gridHorizontalInterval;this.arrowWidth=12;this.arrowHeight=10;this.canvasMargin=0;this.minCanvasWidth=420;this.minCanvasHeight=100;this.maxDialogHeight=5*this.gridHeight+10;this.lineCornerRadius=4;this.dialogSideBarWidth=0;this.dialogBackgroundColor="#1f1f1f";this.dialogTopAndBottom=20+36+2+2;this.explainText="";},postCreate:function(){this.createDialog();},showGraph:function(){this.showLoading();this.createModel();dojo["require"]("dojox.gfx");this.hideLoading();this.createGraph();},createDialog:function(){this.wiringDialog=new com.ibm.mm.builder.widget.CleanDialog({id:this.selectedWidgetId+"_wireGraph",nodeWidth:null,nodeHeight:null,title:this.cws.I_WIRINGGRAPH_TITLE,containerBackgroundColor:null,displayCloseButton:true,modelDialog:this.alone,hasRightBottomResizer:false,leftBarWidth:this.dialogSideBarWidth+"px",rightBarWidth:this.dialogSideBarWidth+"px",containerNodePadding:"0px",bottomBarTipColor:"#ff9a9a",closeCallback:dojo.hitch(this,function(){this.destroy();})});this.wiringDialog.containerNode.appendChild(this.domNode);if(!this.alone){var _5c3=dijit.byId("wireInterface_uniDialog");if(_5c3){_5c3.registerSubDialog(this.selectedWidgetId+"_wireGraph");}}},showLoading:function(){this.loadingNode=document.createElement("div");var _5c4=builderConfig.builderPath+"/images/loading.gif";this.loadingNode.innerHTML="<img border='0' src='"+_5c4+"'/>"+"<span style='font-size:1.3em;color:white'>"+this.I_WIRINGGRAPH_LOADING_MESSAGE+"</span>";this.wiringDialog.domNode.style.width=this.minCanvasWidth+"px";this.graphContainer.appendChild(this.loadingNode);this.show();},hideLoading:function(){this.graphContainer.removeChild(this.loadingNode);},createModel:function(){this.parentWiringModel=new com.ibm.mm.builder.iwidget.wiringscreen.WiringModel(this.selectedWidgetId);this.parentWiringModel.setupWiringModel();this.wiringModel=this.parentWiringModel.getSelectedModelFrom(this.selectedWidgetId);},createGraph:function(){this.wiringDialog.setNodeWidth(this.getCanvasWidth()+"px");this.wiringDialog.show();window.setTimeout(dojo.hitch(this,function(){this._setupCanvas();var _5c5=this.wiringModel.getRootFrom(this.selectedWidgetId);for(var i=0,_5c6=_5c5.length;i<_5c6;i++){this.widgetItemQueue.push(_5c5[i]);}this._drawLinks();if(this.wiringModel.hasLink()){this._setupBottomTips();this.diagramExplainTextNode.innerHTML=this.explainText;dojo.attr(this.diagramNode,"title",this.explainText);}else{var msg=this.cws.I_WIRINGGRAPH_NO_WIRING?this.cws.I_WIRINGGRAPH_NO_WIRING:"No wiring connected";this.diagramExplainTextNode.innerHTML=msg;dojo.attr(this.diagramNode,"title",msg);}}),700);},_setupBottomTips:function(){var _5c7=this._getWidget({"id":this.selectedWidgetId});var _5c8=com.ibm.mm.builder.utils.iwidgetUtil.formatWidgetTitle(_5c7.title);var _5c9="<span style='font-style:italic'>"+_5c8+"</span>";var _5ca=dojo.string.substitute(this.cws.I_WIRINGGRAPH_BOTTOM_MESSAGE_BEFORE,[_5c9]);com.ibm.mm.builder.utils.htmlUtil.setClass(this.diagramTip,"wiringgrpahbottomtip");this.diagramTip.innerHTML=_5ca;},_setupCanvas:function(){var _5cb=this.getCanvasWidth();var _5cc=this.getCanvasHeight();this.diagramNode=document.createElement("div");dojo.attr(this.diagramNode,"tabindex","0");this.diagramExplainTextNode=document.createElement("span");this.diagramTip=document.createElement("div");this.domNode.style.width=_5cb+"px";com.ibm.mm.builder.utils.htmlUtil.setClass(this.diagramNode,"diagramnode");com.ibm.mm.builder.utils.htmlUtil.setClass(this.diagramExplainTextNode,"diagramExplainTextNode");this.graphContainer.appendChild(this.diagramExplainTextNode);this.graphContainer.appendChild(this.diagramNode);this.graphContainer.appendChild(this.diagramTip);this.surface=dojox.gfx.createSurface(this.diagramNode,_5cb,this._getSurfaceHeight());},show:function(){this.wiringDialog.show();},_drawLinks:function(){var _5cd=this.widgetItemQueue.splice(0,1)[0];this._drawLinksFrom(_5cd);},_drawLinksFrom:function(_5ce){if(!_5ce){return;}var _5cf=this.wiringModel.getChildren(_5ce.id);this._getWidgetDomNode(_5ce);for(var i=0,_5d0=_5cf.length;i<_5d0;i++){var _5d1=_5cf[i];if(_5d1){this._createLink(_5ce,_5d1);}}this.finishedWidgetList.push(_5ce.id);for(var j=0,_5d2=_5cf.length;j<_5d2;j++){if(_5cf[j]){this.widgetItemQueue.push(_5cf[j]);}}this._drawLinksFrom(this.widgetItemQueue.splice(0,1)[0]);},_isFinishedWidget:function(id){for(var i=0,_5d3=this.finishedWidgetList.length;i<_5d3;i++){if(this.finishedWidgetList[i]==id){return true;}}return false;},_isFinishedLink:function(_5d4,_5d5){for(var i=0,_5d6=this.finishedLinkList.length;i<_5d6;i++){if(this.finishedLinkList[i].source==_5d4&&this.finishedLinkList[i].target==_5d5){return true;}}return false;},_createLink:function(_5d7,_5d8){if(this._isRelateToSelectedWidget(_5d7,_5d8)){if(this._isFinishedLink(_5d8.id,_5d7.id)){this._createBackArrow(_5d8);}else{this._createForwardLink(_5d7,_5d8);}this._generateExplainText(_5d7,_5d8);}},_generateExplainText:function(_5d9,_5da){this.explainText+=dojo.string.substitute(this.cws.I_WIRINGGRAPH_LINK_EXPLAIN_TEXT,[_5d9.title,_5da.title]);},_isRelateToSelectedWidget:function(_5db,_5dc){if(_5db.id==this.selectedWidgetId||_5dc.id==this.selectedWidgetId){return true;}return false;},_createBackArrow:function(_5dd){var _5de=this._getWidgetDomNode(_5dd);var _5df=this._getBackArrowPoint(_5de);var _5e0=this._createImage(builderConfig.builderPath+(!builderConfig.isBidi)?"/images/arow_head_left.gif":"/images/arow_head_left.gif",this.arrowWidth,this.arrowHeight);_5e0.setTransform(dojox.gfx.matrix.translate(_5df.x,_5df.y));},_createImage:function(src,_5e1,_5e2){var _5e3=this.surface.createImage({width:_5e1,height:_5e2,src:src});if(dojo.isSafari!=4){return _5e3;}else{var _5e4=this.surface.createGroup();_5e4.add(_5e3);return _5e3;}},_createForwardLink:function(_5e5,_5e6){var _5e7=this._getWidgetDomNode(_5e5);var _5e8=this._getWidgetDomNode(_5e6);var _5e9=this._getStartPoint(_5e7);var _5ea=this._getEndPoint(_5e8);var _5eb=this._getMiddlePoints(_5e9,_5ea);var _5ec={color:[255,255,255],width:2,dashstyle:"solid"};var _5ed=(!builderConfig.isBidi)?(_5eb[0].x-this.lineCornerRadius):(_5eb[0].x+this.lineCornerRadius);var path="M"+_5e9.x+" "+_5e9.y+" L"+(_5ed)+" "+_5eb[0].y;this.surface.createPath(path).setStroke(_5ec);path="M"+(_5ed)+" "+_5eb[0].y+" S"+_5eb[0].x+" "+_5eb[0].y+" "+_5eb[0].x+" "+this._getFirstCornerStartY(_5eb);this.surface.createPath(path).setStroke(_5ec);path="M"+(_5eb[0].x)+" "+this._getFirstCornerStartY(_5eb)+" L"+_5eb[1].x+" "+this._getSecondCornerStartY(_5eb);this.surface.createPath(path).setStroke(_5ec);var endX=(!builderConfig.isBidi)?(_5eb[1].x+this.lineCornerRadius):(_5eb[1].x-this.lineCornerRadius);path="M"+_5eb[1].x+" "+this._getSecondCornerStartY(_5eb)+" S"+_5eb[1].x+" "+_5eb[1].y+" "+endX+" "+_5eb[1].y;this.surface.createPath(path).setStroke(_5ec);path="M"+(endX)+" "+_5eb[1].y+" L"+_5ea.x+" "+_5ea.y;this.surface.createPath(path).setStroke(_5ec);var _5ee=this._getArrowPoint(_5ea);var _5ef=(!builderConfig.isBidi)?"/images/arow_head.gif":"/images/arow_head_left.gif";var _5f0=this._createImage(builderConfig.builderPath+_5ef,this.arrowWidth,this.arrowHeight);_5f0.setTransform(dojox.gfx.matrix.translate(_5ee.x,_5ee.y));this.finishedLinkList.push({"source":_5e5.id,"target":_5e6.id});},_getFirstCornerStartY:function(_5f1){var y=_5f1[0].y;if(_5f1[0].y<_5f1[1].y){return y+this.lineCornerRadius;}else{if(_5f1[0].y>_5f1[1].y){return y-this.lineCornerRadius;}else{return y;}}},_getSecondCornerStartY:function(_5f2){var y=_5f2[1].y;if(_5f2[0].y<_5f2[1].y){return y-this.lineCornerRadius;}else{if(_5f2[0].y>_5f2[1].y){return y+this.lineCornerRadius;}else{return y;}}},_getWidgetDomNode:function(_5f3){return this._getWidget(_5f3).domNode;},_getWidgetImageNode:function(_5f4){return this._getWidget(_5f4).getImageNode();},_getWidget:function(_5f5){for(var i=0,_5f6=this.itemList.length;i<_5f6;i++){if(this.itemList[i].id==_5f5.id){return this.itemList[i].itemWidget;}}var _5f7;var _5f8=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(_5f5.id);var _5f9=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetIconCSA2(_5f5.id);dojo.mixin(_5f5,{"isSelected":(_5f5.id==this.selectedWidgetId),"title":_5f8,"icon":_5f9});var item=new com.ibm.mm.builder.iwidget.wiringscreen.WiringItem(_5f5);var _5fa=(this.wiringModel.size.x*this.gridWidth<=this.minCanvasWidth+80)?60:20;var _5fb=20;var _5fc=(this.minCanvasWidth-100)/2;var _5fd=20;var _5fe=this.gridWidth;var _5ff=this.gridHeight;var _600=this.itemWidth;_5f7=item.domNode;var x=null;var y=null;if(!this.wiringModel.hasLink()){if(builderConfig.isBidi){x=this.getCanvasWidth()-(_5f5.position.x*_5fe+_5fc)-_600+"px";}else{x=(_5f5.position.x*_5fe+_5fc)+"px";}y=((_5f5.position.y-1)*_5ff+_5fd)+"px";this._setWidgetPositionAndAdd(_5f7,x,y);}else{if(this.wiringModel.levelHeight[_5f5.position.x]==this.wiringModel.size.y){if(builderConfig.isBidi){x=this.getCanvasWidth()-(_5f5.position.x*_5fe+_5fa)-_600+"px";}else{x=(_5f5.position.x*_5fe+_5fa)+"px";}y=((_5f5.position.y-1)*_5ff+_5fb)+"px";this._setWidgetPositionAndAdd(_5f7,x,y);}else{var _601=((this.wiringModel.size.y-1)/this.wiringModel.levelHeight[_5f5.position.x])*_5ff;var _602=_601/2;if(builderConfig.isBidi){x=this.getCanvasWidth()-(_5f5.position.x*_5fe+_5fa)-_600+"px";}else{x=(_5f5.position.x*_5fe+_5fa)+"px";}y=((_5f5.position.y-1)*_601+_5fb+_602)+"px";this._setWidgetPositionAndAdd(_5f7,x,y);}}this.itemList.push({id:_5f5.id,itemWidgetNode:_5f7,itemWidget:item});return item;},_createHighlightDiv:function(item){var _603=document.createElement("div");com.ibm.mm.builder.utils.htmlUtil.setClass(_603,"hightlightwiringgraphitem");_603.appendChild(item.domNode);return _603;},_getStartPoint:function(node){var _604=dojo.coords(node);var px=_604.l+this.itemWidth-(this.itemWidth-this.bgWidth)/2;if(builderConfig.isBidi){px=px-this.itemWidth;}var py=_604.t+this.bgHeight/2;return {x:px,y:py};},_getEndPoint:function(node){var _605=dojo.coords(node);var px=_605.l-this.arrowWidth+(this.itemWidth-this.bgWidth)/2;if(builderConfig.isBidi){px=px+this.itemWidth;}var py=_605.t+this.bgHeight/2;return {x:px,y:py};},_getMiddlePoints:function(_606,end){var mx=(_606.x+end.x)/2;var my1=_606.y;var my2=end.y;return [{x:mx,y:my1},{x:mx,y:my2}];},_getArrowPoint:function(end){return {x:end.x,y:(end.y-this.arrowHeight/2)};},_getBackArrowPoint:function(node){var _607=this._getStartPoint(node);return {x:_607.x-2,y:_607.y-this.arrowHeight/2};},_getPixel:function(v){return parseInt(v.substring(0,v.indexOf("p")),10);},getCanvasWidth:function(){var _608=this.wiringModel.size.x*this.gridWidth-80;if(_608<this.minCanvasWidth){_608=this.minCanvasWidth;}return _608;},getMMDialogWidth:function(){var _609=(this.getCanvasWidth()+2*(this.dialogSideBarWidth+1)+2*this.canvasMargin);return (_609+"px");},getCanvasHeight:function(){var _60a=this.wiringModel.size.y*this.gridHeight+10;if(_60a<this.minCanvasHeight){_60a=this.minCanvasHeight;}return _60a;},_getDialogContainerHeight:function(){var _60b=this.getCanvasHeight();if(_60b>this.maxDialogHeight){_60b=this.maxDialogHeight;}return _60b;},getMMDialogHeight:function(){var _60c=this._getDialogContainerHeight()+this.dialogTopAndBottom;return (_60c+"px");},_getSurfaceHeight:function(){return (this.getCanvasHeight()-4);},_setWidgetPositionAndAdd:function(_60d,left,top){_60d.style.top=top;_60d.style.left=left;this.graphContainer.appendChild(_60d);},destroy:function(){for(var i=0,_60e=this.itemList.length;i<_60e;i++){this.itemList[i].itemWidget.destroy();}this.inherited(arguments);this.wiringDialog.destroy();}});}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WiringSettingsDialog"]){dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WiringSettingsDialog"]=true;dojo.provide("com.ibm.mm.builder.iwidget.wiringscreen.WiringSettingsDialog");com.ibm.mm.builder.iwidget.wiringscreen.WiringSettingsConstants={SEMANTIC_TYPES_ONLY:0,PAYLOAD_TYPES_ONLY:1,SEMANTIC_OR_PAYLOAD_TYPES:2,SETTING_MATCHING_TYPE:"matchingType"};dojo.declare("com.ibm.mm.builder.iwidget.wiringscreen.WiringSettingsDialog",[dijit._Widget,dijit._Templated],{notificationDialog:null,widgetId:null,dialogWidgetId:"Mashup_Wiring_Settings_Dlg",templateString:"<div style=\"padding: 10px;\" dojoAttachPoint=\"wiringSettingsDiv\">\n<div class=\"mumGreenTitleDiv\" dojoAttachPoint=\"matchingOptionsTitleDiv\"></div>\n<div class=\"mumCurrentWidgetContentDivSend\" dojoAttachPoint=\"matchingOptionsDiv\">\n <div><input type=\"radio\" name=\"matchingOption\" dojoAttachPoint=\"matchingOption1\"><span dojoAttachPoint=\"matchingOption1Text\"></span></div>\n <div><input type=\"radio\" name=\"matchingOption\" dojoAttachPoint=\"matchingOption2\"><span dojoAttachPoint=\"matchingOption2Text\"></span></div>\n <div><input type=\"radio\" name=\"matchingOption\" dojoAttachPoint=\"matchingOption3\"><span dojoAttachPoint=\"matchingOption3Text\"></span></div>\n</div>\n<div class=\"mumCurrentWidgetBottomSend\"></div>\n<div class=\"bottomDiv\" dojoAttachPoint=\"bottomDiv\">\n\t<input type='submit' dojoAttachPoint='buttonDivDone'class='lotusFormButton'></input>\n</div>\n</div>\n",constants:com.ibm.mm.builder.iwidget.wiringscreen.WiringSettingsConstants,constructor:function(){},onSettingsSaved:function(_60f){},postCreate:function(){this.initContent();},setOuterContext:function(ctx){this.outerContext=ctx;},setMatchingType:function(_610){switch(_610){case 0:this.matchingOption1.checked=true;break;case 1:this.matchingOption2.checked=true;break;case 2:this.matchingOption3.checked=true;break;default:this.matchingOption1.checked=true;}},initContent:function(){var cws=com.ibm.mm.builder.coreWidgetsStrings;this.matchingOptionsTitleDiv.innerHTML=cws.I_WIRING_MATCHING_MODE;this.matchingOption1Text.innerHTML=cws.I_WIRING_ALIAS_MATCH;this.matchingOption1.value=this.constants.SEMANTIC_TYPES_ONLY;this.matchingOption2Text.innerHTML=cws.I_WIRING_PAYLOAD_TYPE_MATCH;this.matchingOption2.value=this.constants.PAYLOAD_TYPES_ONLY;this.matchingOption3Text.innerHTML=cws.I_WIRING_PAYLOAD_TYPE_OR_ALIAS_MATCH;this.matchingOption3.value=this.constants.SEMANTIC_OR_PAYLOAD_TYPES;dojo.attr(this.buttonDivDone,"title",cws.I_WIRING_DONE);dojo.attr(this.buttonDivDone,"value",cws.I_WIRING_DONE);dojo.connect(this.buttonDivDone,"onclick",dojo.hitch(this,this.makeSelectionAndClose));var _611=document.createElement("div");_611.appendChild(this.wiringSettingsDiv);this.notificationDialog=dijit.byId(this.dialogWidgetId);if(!this.notificationDialog){this.notificationDialog=new com.ibm.mm.builder.widget.CustomDialog({id:this.dialogWidgetId,title:cws.I_WIRING_SETTINGS_DIALOG_NAME,needUnderLay:true,roundCorner:false,modelDialog:true,hasRightBottomResizer:false},_611);}},destroy:function(){this.notificationDialog.destroy();},show:function(_612){this.notificationDialog.show();},hide:function(){if(this.notificationDialog){this.notificationDialog.hide();}},_buildSettingsMap:function(){var _613={};_613[this.constants.SETTING_MATCHING_TYPE]=this._getMatchingType();return _613;},_getMatchingType:function(){var _614;if(this.matchingOption1.checked){_614=parseInt(this.matchingOption1.value);}else{if(this.matchingOption2.checked){_614=parseInt(this.matchingOption2.value);}else{if(this.matchingOption3.checked){_614=parseInt(this.matchingOption3.value);}}}return _614;},makeSelection:function(){var _615=this._buildSettingsMap();this.onSettingsSaved(_615);},makeSelectionAndClose:function(){this.makeSelection();this.hide();}});}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WirePaneWithSettings"]){dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.WirePaneWithSettings"]=true;dojo.provide("com.ibm.mm.builder.iwidget.wiringscreen.WirePaneWithSettings");dojo.require("dijit.Dialog");dojo.require("dijit._Widget");dojo.require("dijit._Templated");(function(){var cws=com.ibm.mm.builder.coreWidgetsStrings;var _616=com.ibm.mm.builder.utils.htmlUtil;dojo.declare("com.ibm.mm.builder.iwidget.wiringscreen.WirePaneWithSettings",[dijit._Widget,dijit._Templated],{templateString:"<div dojoAttachPoint='wirePaneDiv' class='mumWirePaneDiv lotusui30' >\n <div dojoAttachPoint='prompter' class='mumPrompter'>\n <div dojoAttachPoint='closer' class='mumPrompterCloser'> </div>\n <div dojoAttachPoint='contentNode' class='mumPrompterContent'>\n <div dojoAttachPoint='contentTextNode' tabindex='0' class='mumPrompterContentText'></div>\n <div dojoAttachPoint='contentLabelNode' class='mumPrompterContentLabel'></div>\n </div>\n <div dojoAttachPoint='arrowNode' class='mumPrompterArrow'></div>\n <div dojoAttachPoint='arrowNodeMid' class='mumPrompterArrowMid'></div>\n <div dojoAttachPoint='arrowNodeBottom' class='mumPrompterArrowBottom'></div>\n <div dojoAttachPoint='bottomShadow' class='mumPrompterBottomShadow'></div>\n <div dojoAttachPoint='lbCornerShadow' class='mumPrompterBottomCornerShadow'></div>\n </div>\n <div dojoAttachPoint=\"wirePaneWarningMessage\" class=\"lotusWarning lotusMessage\" style=\"margin: 5px 0px;\"></div>\n <div dojoAttachPoint='wirePaneTitleDiv' class='mumWirePaneTitleDiv' tabindex=0 role=\"tablist\">\n <div dojoAttachPoint='shadowCenter' class='titleCenterShadow'></div>\n <div tabindex='0' dojoAttachPoint='wirePaneTitleDivRight' class='mumWirePaneTitleDivSendTabSend' role=\"tab\" id=\"wirePaneTabSend\">\n <div dojoAttachPoint='leftDivOfSendTab' class='mumLeftDivOfSendTabSend'>\n <div dojoAttachPoint='sendIconDiv' class='mumSendIconDivSend'></div>\n </div>\n <div dojoAttachPoint='midDivOfSendTab' class='mumMidDivOfSendTabSend'>\n <div dojoAttachPoint='sendTextDiv' class='mumSendTextDiv'></div>\n </div>\n <div dojoAttachPoint='rightDivOfSendTab' class='mumRightDivOfSendTabSend'>\n <div dojoAttachPoint='sendWireCountDiv' class='mumSendWireCountDiv'></div>\n </div>\n </div>\n <div tabindex='0' dojoAttachPoint='wirePaneTitleDivLeft' class='mumWirePaneTitleDivReceiveTabSend' role=\"tab\" id=\"wirePaneTabReceive\">\n <div dojoAttachPoint='leftDivOfReceiveTab' class='mumLeftDivOfReceiveTabSend'>\n <div dojoAttachPoint='recIconDiv' class='mumReceiveIconDivSend'></div>\n </div>\n <div dojoAttachPoint='midDivOfReceiveTab' class='mumMidDivOfReceiveTabSend'>\n <div dojoAttachPoint='receiveTextDiv' class='mumReceiveTextDiv'></div>\n </div>\n <div dojoAttachPoint='rightDivOfReceiveTab' class='mumRightDivOfReceiveTabSend'>\n <div dojoAttachPoint='receiveWireCountDiv' class='mumReceiveWireCountDiv'></div>\n </div>\n </div>\n <div dojoAttachPoint='shadowCorner' class='titleCornerShadow'></div>\n </div>\n\t<div dojoAttachPoint=\"tabpanel\" role=\"tabpanel\" aria-labelledby=\"wirePaneTab\">\n \t<div dojoAttachPoint='firstAreaTopDiv' class='firstAreaTopDivSend'></div>\n \t<div dojoAttachPoint='firstAreaDiv' class='mumFirstAreaDivSend'>\n \t<div dojoAttachPoint='firstRightShadow' class='mumSideShadow'></div>\n \t<div dojoAttachPoint='wirePaneMatchingOptionsDiv'></div>\n \t<div dojoAttachPoint='wirePaneCurrentWidgetDiv'></div>\n \t<div dojoAttachPoint='wirePaneEventsDiv'></div>\n \t</div>\n \t<div dojoAttachPoint='firstAreaBottomDiv' class='mumFirstAreaBottomDivSend'></div>\n\t\t<div dojoAttachPoint='secondAreaDiv' class='mumSecondAreaDivSend'>\n \t<div dojoAttachPoint='secondRightShadow' class='mumSideShadow'></div>\n \t<div dojoAttachPoint='wirePaneWidgetsDiv'></div>\n \t<div dojoAttachPoint='wirePaneWidgetEventsDiv'></div>\n \t</div>\n \t<div dojoAttachPoint='secondAreaBottomDiv' class='mumSecondAreaBottomDivSend'></div>\n \t<div dojoAttachPoint='bottomDiv' class='bottomDiv'>\n \t<div dojoAttachPoint='bottomQmarkDiv' class='bottomQmarkDiv'></div>\n \t<input type='submit' dojoAttachPoint='buttonDivSettings' class='lotusFormButton'></input>\n \t<input type='submit' dojoAttachPoint='buttonDivGraph' class='lotusFormButton'></input>\n\t\t\t<input type='submit' dojoAttachPoint='buttonDivDone'class='lotusFormButton'></input>\n \t</div>\n\t</div>\n</div>\n",iContext:null,iwidgetId:"",displayQName:"true",wirePane:null,wirePaneDiv:null,wirePaneTitleDiv:null,wirePaneTitleDivLeft:null,wirePaneWarningMessage:null,sendIconDiv:null,sendWireCountDiv:null,receiveWireCountDiv:null,wirePaneTitleDivRight:null,recIconDiv:null,wirePaneCurrentWidgetDiv:null,wirePaneEventsDiv:null,wirePaneWidgetsDiv:null,wirePaneWidgetEventsDiv:null,wirePaneAdaptersDiv:null,firstAreaTopDiv:null,firstAreaDiv:null,firstAreaBottomDiv:null,secondAreaBottomDiv:null,secondAreaDiv:null,secondAreaTopDiv:null,thirdAreaDiv:null,bottomQmarkDiv:null,bottomDiv:null,prompter:null,widgetObj:null,highlightTimer:null,selectedEvent:"",selectedWireWidget:"",widgets:null,eventsMap:null,currentType:"",grayTip:null,showPrompter:true,currentPageId:"",localized:com.ibm.mashups.enabler.context.Factory.getLocalizedContext(),wiringSettingsDialog:null,wiringSettings:null,wiringSettingsConstants:com.ibm.mm.builder.iwidget.wiringscreen.WiringSettingsConstants,actionStep:1,clickedWidgetDiv:null,allHanWires:0,allPubWires:0,titleFontStyle:{fontSize:"1.4em",fontFamily:"Arial,Helvetica,sans-serif",fontWeight:"bold"},defaultFontStyle:{fontSize:"1.4em",fontFamily:"Arial,Helvetica,sans-serif",fontWeight:"normal"},italicStyle:{fontSize:"1.4em",fontFamily:"Arial,Helvetica,sans-serif",fontWeight:"normal",fontStyle:"italic"},LOGGER:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.iwidget.wiringscreen.WirePane2"),setSelectedEvent:function(_617){this.selectedEvent=_617;},destroy:function(){if(this.wiringSettingsDialog){this.wiringSettingsDialog.destroy();}this.inherited(arguments);},initWirePane:function(){var _618=this.iContext.getiWidgetAttributes();var _619=_618.getItemValue("displaySettings");var _61a=_618.getItemValue("displayPortletsAndWidgetsWarningMessage");_619=(_619==="true"?true:false);_61a=(_61a==="true"?true:false);if(_61a){this.wirePaneWarningMessage.innerHTML=cws.I_WIRING_PORTLETS_AND_WIDGETS;}else{this.hideElement(this.wirePaneWarningMessage);}this.grayTip=document.createElement("div");this.grayTip.innerHTML=cws.I_WIRING_NO_MATCH_WIDGET;dojo.fx.wipeOut({node:this.secondAreaDiv,duration:10}).play();this.hideElement(this.secondAreaBottomDiv);this.createTitleDiv();this.wirePaneEventsDiv.setAttribute("id","wirePaneEventsDiv_id");this.wirePaneWidgetsDiv.style.display="none";dojo.fx.wipeOut({node:this.wirePaneWidgetEventsDiv,duration:10}).play();dojo.attr(this.buttonDivDone,"title",cws.I_WIRING_DONE);dojo.attr(this.buttonDivDone,"value",cws.I_WIRING_DONE);dojo.attr(this.buttonDivGraph,"title",cws.I_WIRING_SHOW_GRAPH);dojo.attr(this.buttonDivGraph,"value",cws.I_WIRING_SHOW_GRAPH);dojo.attr(this.wirePaneTitleDivLeft,"title",cws.I_WIRING_TITLE_RECEIVE+" "+this.allHanWires);dojo.attr(this.wirePaneTitleDivRight,"title",cws.I_WIRING_TITLE_SEND+" "+this.allPubWires);this.connect(this.closer,"onclick",this.closePrompter);this.connect(this.bottomQmarkDiv,"onclick",this.onClickQmark);var _61b=function(){com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.closeMashupDialog",this.iContext.widgetId);com.ibm.mm.builder.utils.wireUtil.removeHighlight();};this.connect(this.buttonDivDone,"onclick",dojo.hitch(this,_61b));this.connect(this.buttonDivGraph,"onclick",dojo.hitch(this,function(){this.onClickShowGraph();com.ibm.mm.builder.utils.wireUtil.removeHighlight();}));if(_619){dojo.attr(this.buttonDivSettings,"title",cws.I_COMMON_ACTION_SETTINGS);dojo.attr(this.buttonDivSettings,"value",cws.I_COMMON_ACTION_SETTINGS);dojo.connect(this.buttonDivSettings,"onclick",dojo.hitch(this,this.openWiringSettings));}else{this.hideElement(this.buttonDivSettings);}if(this.iContext.dialogContainer){this.connect(this.iContext.dialogContainer.closeButtonNode,"onclick",dojo.hitch(this,_61b));}},hideElement:function(div){div.style.display="none";},showElement:function(div){div.style.display="";},displayPrompter:function(step){this.actionStep=step;if(this.showPrompter===false){return;}var _61c={"TL":"TR","BR":"BL"};var _61d=this.getProperColor(step);var _61e=dojo.query(".mumPrompterCloser",this.prompter)[0];_616.setClass(_61e,"mumPrompterCloser");dojo.addClass(_61e,"mumCloser"+_61d);_61e.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/"+_61d.toLowerCase()+"_closer.png' alt=''>";var _61f=dojo.query(".mumPrompterContent",this.prompter)[0];_616.setClass(_61f,"mumPrompterContent");dojo.addClass(_61f,"mumContent"+_61d);var _620=dojo.query(".mumPrompterArrow",this.prompter)[0];_616.setClass(_620,"mumPrompterArrow");dojo.addClass(_620,"mumPrompterArrow"+_61d);var _621=dojo.query(".mumPrompterContentText",this.prompter)[0];var _622=dojo.query(".mumPrompterContentLabel",this.prompter)[0];_616.setClass(_622,"mumPrompterContentLabel");dojo.addClass(_622,"mumLabel"+_61d);dojo.attr(_621,"keepBlankSpace","");var _623=_616.truncateWord(_621,this.widgetObj.widgetname,120);var _624=_616.truncateWord(_621,this.selectedEventTitle,120,true);var _625=_616.truncateWord(_621,this.selectedWireWidget,120);var _626={fontSize:"1.2em"};switch(step){case "1":if(this.currentType=="Send"){_621.innerHTML=_616.getStrWithLimit(dojo.string.substitute(cws.I_WIRING_PROMPTER_SEND_1,[""+_623+""]),_621,585,_626);}else{_621.innerHTML=_616.getStrWithLimit(dojo.string.substitute(cws.I_WIRING_PROMPTER_RECEIVE_1,[""+_623+""]),_621,530,_626);}_622.innerHTML=cws.I_WIRING_PROMPTER_STEP_1;_616.setClass(this.prompter,"mumPrompterAtEvents");break;case "2":if(this.currentType=="Send"){_621.innerHTML=_616.getStrWithLimit(dojo.string.substitute(cws.I_WIRING_PROMPTER_SEND_2,[""+_624+""]),_621,585,_626);}else{_621.innerHTML=_616.getStrWithLimit(dojo.string.substitute(cws.I_WIRING_PROMPTER_RECEIVE_2,[""+_624+""]),_621,530,_626);}_622.innerHTML=cws.I_WIRING_PROMPTER_STEP_2;_616.setClass(this.prompter,"mumPrompterAtWidgets");break;case "3":if(this.currentType=="Send"){_621.innerHTML=_616.getStrWithLimit(dojo.string.substitute(cws.I_WIRING_PROMPTER_SEND_3,[""+_625+"",""+_624+""]),_621,585,_626);}else{_621.innerHTML=_616.getStrWithLimit(dojo.string.substitute(cws.I_WIRING_PROMPTER_RECEIVE_3,[""+_625+"",""+_623+""]),_621,530,_626);}_622.innerHTML=cws.I_WIRING_PROMPTER_STEP_3;_616.setClass(this.prompter,"mumPrompterAtWidgetEvents");break;}this.prompter.style.visibility="visible";window.setTimeout(dojo.hitch(this,function(){var _627=dojo.coords(this.prompter);var _628=dojo.coords(this.arrowNode);var temp=_627.h-_628.h+_628.t;this.arrowNodeMid.style.height=temp+"px";}),200);},closePrompter:function(){this.showPrompter=false;this.prompter.style.visibility="hidden";this.bottomQmarkDiv.style.visibility="visible";},onClickQmark:function(){this.showPrompter=true;this.prompter.style.visibility="visible";this.displayPrompter(this.actionStep);this.bottomQmarkDiv.style.visibility="hidden";},onClickShowGraph:function(){com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.displayWireGraph",this.iwidgetId);},getProperColor:function(step){switch(step){case "1":if(this.currentType=="Send"){return "Green";}else{return "Blue";}break;case "2":if(this.currentType=="Send"){return "Blue";}else{return "Green";}break;case "3":if(this.currentType=="Send"){return "Blue";}else{return "Green";}break;}},getProperName:function(name){var _629="<span title='"+name+"' >";if(name.length>=18){_629=_629+name.substring(0,14)+"...";}else{_629=_629+name;}_629=_629+"</span>";return _629;},getProperTitle:function(name,len){var _62a="<span tabindex='0' title='"+name+"' >";if(len===null){len=25;}if(name.length>=len){_62a=_62a+name.substring(0,len-4)+"...";}else{_62a=_62a+name;}_62a=_62a+"</span>";return _62a;},getShownType:function(type){var _62b=com.ibm.mm.builder.utils.wireUtil.dataTypeChecker();if(this.displayQName=="false"){type=type.replace(/^\{.*}/,"");}return _62b.getTypeLabel(type);},wipeIn:function(args){args.node=dojo.byId(args.node);var node=args.node,s=node.style,o;var anim=dojo.animateProperty(dojo.mixin({properties:{height:{start:function(){o=s.overflow;s.overflow="hidden";if(s.visibility=="hidden"||s.display=="none"){s.height="1px";s.display="";s.visibility="";return 1;}else{var _62c=dojo.style(node,"height");return Math.max(_62c,1);}},end:function(){return node.scrollHeight;}}}},args));this.connect(anim,"onEnd",function(){s.overflow=o;});return anim;},createDivWithClass:function(_62d){var _62e=document.createElement("div");dojo.addClass(_62e,_62d);return _62e;},adjustDivsStyle:function(){this.tabpanel.setAttribute("aria-labelledby","wirePaneTab"+this.currentType);this.adjustTitleDiv();_616.setClass(this.firstAreaTopDiv,"firstAreaTopDiv"+this.currentType);_616.setClass(this.firstAreaDiv,"mumFirstAreaDiv"+this.currentType);_616.setClass(this.secondAreaDiv,"mumSecondAreaDiv"+this.currentType);_616.setClass(this.firstAreaBottomDiv,"mumFirstAreaBottomDiv"+this.currentType);_616.setClass(this.secondAreaBottomDiv,"mumSecondAreaBottomDiv"+this.currentType);this.hideElement(this.secondAreaBottomDiv);},onClickTitlePaneLeft:function(e){if(this.currentType=="Send"){this.currentType="Receive";_616.setClass(this.wirePaneTitleDivLeft,"mumWirePaneTitleDivLeftClick");_616.setClass(this.wirePaneTitleDivRight,"mumWirePaneTitleDivSendTab");dijit.setWaiState(this.wirePaneTitleDivLeft,"pressed","true");dijit.setWaiState(this.wirePaneTitleDivLeft,"selected","true");dojo.attr(this.wirePaneTitleDivLeft,"tabindex","0");dijit.setWaiState(this.wirePaneTitleDivRight,"pressed","false");dijit.setWaiState(this.wirePaneTitleDivRight,"selected","false");dojo.attr(this.wirePaneTitleDivRight,"tabindex","-1");_616.setClass(this.sendIconDiv,"mumSendIconDiv");_616.setClass(this.recIconDiv,"mumReceiveIconDivClick");this.adjustDivsStyle();this.createReceiveEventsDiv();dojo.fx.wipeOut({node:this.secondAreaDiv,duration:10}).play();this.hideElement(this.secondAreaBottomDiv);}this.displayPrompter("1");dijit.focus(this.wirePaneTitleDivLeft);},onKeyPresTitlePane:function(e){var key=e.keyCode;if(key===dojo.keys.LEFT_ARROW){this.onClickTitlePaneLeft(e);}else{if(key===dojo.keys.RIGHT_ARROW){this.onClickTitlePaneRight(e);}}},onClickTitlePaneRight:function(e){if(this.currentType=="Receive"){this.currentType="Send";_616.setClass(this.wirePaneTitleDivLeft,"mumWirePaneTitleDivReceiveTab");_616.setClass(this.wirePaneTitleDivRight,"mumWirePaneTitleDivRightClick");dijit.setWaiState(this.wirePaneTitleDivRight,"pressed","true");dijit.setWaiState(this.wirePaneTitleDivRight,"selected","true");dojo.attr(this.wirePaneTitleDivRight,"tabindex","0");dijit.setWaiState(this.wirePaneTitleDivLeft,"pressed","false");dijit.setWaiState(this.wirePaneTitleDivLeft,"selected","false");dojo.attr(this.wirePaneTitleDivLeft,"tabindex","-1");_616.setClass(this.sendIconDiv,"mumSendIconDivClick");_616.setClass(this.recIconDiv,"mumReceiveIconDiv");this.adjustDivsStyle();this.createSendEventsDiv();dojo.fx.wipeOut({node:this.secondAreaDiv,duration:10}).play();this.hideElement(this.secondAreaBottomDiv);}this.displayPrompter("1");dijit.focus(this.wirePaneTitleDivRight);},onMouseOverCurrentWidget:function(e){var _62f=e.currentTarget;dojo.addClass(_62f,"mumMouseOverCurrentWidget"+this.currentType);},onMouseOutCurrentWidget:function(e){var _630=e.currentTarget;dojo.removeClass(_630,"mumMouseOverCurrentWidget"+this.currentType);},onKeyPressEvent:function(e){switch(e.keyCode){case dojo.keys.ENTER:this.onClickEvent(e);break;}},onClickEvent:function(e){var _631=e.currentTarget;var _632=dojo.query(".mumEventDivReturnImg"+this.currentType,_631);_632[0].style.visibility="visible";_632[0].setAttribute("role","button");if(_631.getAttribute("isClicked")!="true"){var _633=_631.getAttribute("eventName");this.selectedEvent=_633;this.selectedEventTitle=_631.getAttribute("eventTitle");this.widgets=this.eventsMap[this.currentType+"-"+_633];var _634=dojo.query(".mumEventDiv",this.wirePaneEventsDiv);if(_634.length>1){for(var i=0;i<_634.length;i++){var _635=_634[i];if(_635.getAttribute("eventName")!=_633){dojo.fx.combine([dojo.fadeOut({node:_635,duration:1000}),dojo.fx.wipeOut({node:_635,duration:1000})]).play();_635.setAttribute("isClicked","false");}}}_631.setAttribute("isClicked","true");_616.setClass(_631,"mumEventDivClicked"+this.currentType);var _636=this.createWidgetsDiv();_616.setClass(this.firstAreaBottomDiv,"mumFirstAreaBottomDivExpand"+this.currentType);this.showElement(this.secondAreaBottomDiv);dojo.fx.wipeIn({node:this.secondAreaDiv,duration:1000}).play();this.showElement(this.secondAreaBottomDiv);this.displayPrompter("2");}},onKeyPressEventReturnImg:function(e){switch(e.keyCode){case dojo.keys.ENTER:this.onClickEventReturnImg(e);break;}},onClickEventReturnImg:function(e){var _637=e.currentTarget.parentNode;_616.setClass(_637,"mumEventDiv");var _638=dojo.query(".mumEventDivCount"+this.currentType,_637);var _639=parseInt(_638[0].innerHTML,10);if(_639>0){dojo.addClass(_637,"mumEventDivWired");}if(_637.getAttribute("isClicked")=="false"){return;}var _63a=e.currentTarget;_63a.style.visibility="hidden";var _63b=dojo.query(".mumEventDiv",this.firstAreaDiv);if(_63b.length==1){_63b[0].setAttribute("isClicked","false");dojo.stopEvent(e);}else{if(_63b.length>1){for(var j=0;j<_63b.length;j++){var _63c=_63b[j];dojo.fx.combine([dojo.fadeIn({node:_63c,duration:1000}),this.wipeIn({node:_63c,duration:1000})]).play();_63c.setAttribute("isClicked","false");}dojo.stopEvent(e);}}_616.setClass(this.firstAreaBottomDiv,"mumFirstAreaBottomDiv"+this.currentType);dojo.fx.wipeOut({node:this.secondAreaDiv,duration:500}).play();this.hideElement(this.secondAreaBottomDiv);dojo.fx.wipeOut({node:this.wirePaneWidgetEventsDiv,duration:10}).play();this.displayPrompter("1");},onKeyPressWidget:function(e){switch(e.keyCode){case dojo.keys.ENTER:this.onClickWidget(e);break;}},onClickWidget:function(e){var _63d=e.currentTarget;this.selectedWireWidget=_63d.getAttribute("widgetName");this.clickedWidgetDiv=_63d;var _63e=dojo.query(".mumWidgetDivReturnImg"+this.currentType,_63d);_63e[0].style.visibility="visible";_63e[0].setAttribute("tabindex","0");_63e[0].setAttribute("role","button");var _63f=e.currentTarget.getAttribute("widgetId");_616.setClass(_63d,"mumWidgetClicked"+this.currentType);if(_63d.getAttribute("isClicked")=="true"){return;}var _640=dojo.query(".mumWireWidget"+this.currentType,this.wirePaneWidgetsDiv);if(_640.length>0){for(var i=0;i<_640.length;i++){var _641=_640[i];if(_641.getAttribute("widgetId")!=_63f){dojo.fx.combine([dojo.fadeOut({node:_641,duration:1000}),dojo.fx.wipeOut({node:_641,duration:1000})]).play();_641.setAttribute("isClicked",false);}}}_63d.setAttribute("isClicked","true");this.createWidgetEventsDiv(_63f);dojo.fx.wipeIn({node:this.wirePaneWidgetEventsDiv,duration:1000}).play();dojo.fadeIn({node:this.wirePaneWidgetEventsDiv,duration:1000}).play();this.displayPrompter("3");window.clearTimeout(this.highlightTimer);dojo.publish(com.ibm.mm.builder.eventTopics.WirePane_OutWidget,[_63f]);},onKeyPressWidgetReturnImg:function(e){switch(e.keyCode){case dojo.keys.ENTER:this.onClickWidgetReturnImg(e);break;}},onClickWidgetReturnImg:function(e){e.currentTarget.style.visibility="hidden";var _642=e.currentTarget.parentNode;if(_642.getAttribute("isClicked")=="false"){return;}_616.setClass(_642,"mumWireWidget"+this.currentType);var _643=dojo.query(".mumWireWidget"+this.currentType,this.wirePaneWidgetsDiv);if(_643.length>1){for(var i=0;i<_643.length;i++){var _644=_643[i];dojo.fadeIn({node:_644,duration:1000}).play();this.wipeIn({node:_644,duration:1000}).play();_644.setAttribute("isClicked","false");}}_642.setAttribute("isClicked","false");dojo.fx.wipeOut({node:this.wirePaneWidgetEventsDiv,duration:1000}).play();dojo.fadeOut({node:this.wirePaneWidgetEventsDiv,duration:1000}).play();dojo.stopEvent(e);this.displayPrompter("2");},onMouseOverWidget:function(e){var _645=e.currentTarget;if(_645.getAttribute("isClicked")=="true"){return;}var _646=_645.getAttribute("widgetId");var _647=this;this.highlightTimer=window.setTimeout(function(){com.ibm.mm.builder.utils.wireUtil.highlightWidget(_646);},300);},onMouseOutWidget:function(e){var _648=e.currentTarget;if(_648.getAttribute("isClicked")=="true"){return;}var _649=_648.getAttribute("widgetId");var _64a=this.getWidgetFromMap(_649);if(_64a.totalWiredEvents>0){dojo.addClass(_648,"mumHasWiredEvent");}window.clearTimeout(this.highlightTimer);com.ibm.mm.builder.utils.wireUtil.removeHighlight();},restoreEventDiv:function(_64b){if(_64b.getAttribute("isClicked")){_64b.setAttribute("isClicked","false");_616.setClass(_64b,"mumWidgetPaneEventDiv");var _64c=dojo.query(".mumWidgetPaneEventActionDiv",_64b);if(_64c&&_64c.length>0){for(var i=0;i<_64c.length;i++){var _64d=_64c[i];_64b.removeChild(_64d);}}}},onClickConEventDiv:function(e){var _64e=e.currentTarget;var id=_64e.getAttribute("belongId");var _64f=_64e.getAttribute("eventName");var _650=this.getEventFromWidget(id,_64f);var _651=document.createElement("div");_616.setClass(_651,"mumWidgetPaneEventInfoDiv"+this.currentType);var _652=dojo.query(".checkMarkDiv",_64e)[0];if(_650.isWired){_616.setClass(_64e,"mumWidgetPaneEventDiv");this.disconnectEvent(id,_64f);_652.innerHTML="<input type='checkbox' dojoType='Checkbox' title='"+_64e.firstChild.title+"'/>";_64e.setAttribute("isChecked","");}else{this.connectEvent(id,_64f);_652.innerHTML="<input type='checkbox' dojoType='Checkbox' checked=true title='"+_64e.firstChild.title+"'/>";_616.setClass(_64e,"mumWidgetPaneEventDivCheck"+this.currentType);_64e.setAttribute("isChecked","checked");}_652.childNodes[0].focus();},onMouseOverConEventDiv:function(e){var _653=e.currentTarget;var _654=_653.getAttribute("isChecked");if(_654=="checked"){_616.setClass(_653,"mumWidgetPaneEventDivCheckMouseOver"+this.currentType);}else{_616.setClass(_653,"mumWidgetPaneEventDivMouseOver");}},onMouseOutConEventDiv:function(e){var _655=e.currentTarget;var _656=_655.getAttribute("isChecked");if(_656=="checked"){_616.setClass(_655,"mumWidgetPaneEventDivCheck"+this.currentType);}else{_616.setClass(_655,"mumWidgetPaneEventDiv");}},onClickWidgetPaneEventReturnImg:function(e){var _657=e.currentTarget.parentNode;var _658=dojo.query(".mumWidgetPaneEventInfoDiv"+this.currentType,_657);var _659=dojo.query(".mumWidgetPaneEventReturnImg",_657);_657.removeChild(_659[0]);dojo.removeClass(_658[0],"mumFloatLeft");var _65a=dojo.query(".mumWidgetPaneEventDiv",this.mumWidgetEventsDiv);var _65b=null;for(var m=0;m<_65a.length;m++){_65b=_65a[m];dojo.fadeIn({node:_65b,duration:1000}).play();dojo.fx.wipeIn({node:_65b,duration:1000}).play();}var _65c=dojo.query(".mumWidgetPaneEventDivGray",this.mumWidgetEventsDiv);for(var n=0;n<_65c.length;n++){_65b=_65c[n];dojo.fadeIn({node:_65b,duration:1000}).play();dojo.fx.wipeIn({node:_65b,duration:1000}).play();}dojo.stopEvent(e);},getWidgetFromMap:function(id){var _65d;for(var i=0;i<this.widgets.length;i++){_65d=this.widgets[i];if(id==_65d.id){return _65d;}}return null;},getEventFromWidget:function(id,_65e){var _65f;for(var i=0;i<this.widgets.length;i++){var _660=this.widgets[i];if(id==_660.id){var _661=_660.events;for(var j=0;j<_661.length;j++){_65f=_661[j];if(_65f.name==_65e){break;}}break;}}return _65f;},updateEventsMap:function(_662,_663,_664,_665,_666){var _667=_665;var _668=_664;if(this.currentType=="Receive"){_667=_663;_668=_662;}var _669=-1;if(_666){_669=1;}for(var i=0;i<this.widgets.length;i++){var _66a=this.widgets[i];if(_668==_66a.id){_66a.totalWiredEvents+=_669;var _66b=_66a.events;for(var j=0;j<_66b.length;j++){var _66c=_66b[j];if(_66c.name==_667){_66c.isWired=_666;}}break;}}},getWireModel:function(){var _66d=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _66e=_66d.find(this.currentPageId).start();var lm=_66d.getLayoutModel(_66e);var _66f=lm.getWireModel();return _66f;},getLayoutModel:function(){var _670=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _671=_670.find(this.currentPageId).start();var lm=_670.getLayoutModel(_671);return lm;},getLayoutControl:function(lcId){var lc=this.getLayoutModel().find(lcId).start();return lc;},addWire:function(_672,_673,_674,_675,_676){var _677=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _678=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _679=_678.find(this.currentPageId).start();var _67a=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _67b=this.getLayoutControl(_672);var _67c=_67a.getWidgetWindow(_67b).start();var _67d=_67a.getHierarchicalEventProvider(_67c).start();var _67e=com.ibm.mm.builder.utils.wireUtil.getEventByNameAndType(_67d,_673,com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS);var _67f=this.getLayoutControl(_674);var _680=_67a.getWidgetWindow(_67f).start();var _681=_67a.getHierarchicalEventProvider(_680).start();var _682=com.ibm.mm.builder.utils.wireUtil.getEventByNameAndType(_681,_675,com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS);var ctx={};ctx.sourceWidgetId=_67c;ctx.sourcePageId=_679;ctx.sourceEventId=_67e;ctx.targetWidgetId=_680;ctx.targetPageId=_679;ctx.targetEventId=_682;var _683=this.getWireModel();var wire=_683.create(ctx);if(wire){_683.insert(wire,null);}if(_676){this.updateEventsMap(_672,_673,_674,_675,true);}com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);},removeWire:function(_684,_685,_686,_687,_688){var _689=this.getWireModel();var _68a=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _68b=this.getLayoutControl(_684);var _68c=_68a.getWidgetWindow(_68b).start();var _68d=this.getLayoutControl(_686);var _68e=_68a.getWidgetWindow(_68d).start();var _68f=_68a.getHierarchicalEventProvider(_68e).start();var _690=_68a.getHierarchicalEventProvider(_68c).start();var _691=com.ibm.mm.builder.utils.wireUtil.getEventByNameAndType(_68f,_687,com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS);var _692=com.ibm.mm.builder.utils.wireUtil.getEventByNameAndType(_690,_685,com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS);var _693=null;var _694=_689.iterator();if(_694!==null){_694.setCursorPosition(0);while(_694.hasNext()){var _695=_694.next();if(_695.getTargetWidget().getID()==_68e.getID()&&_695.getSourceWidget().getID()==_68c.getID()){if(_695.getTargetEvent().getID()==_691.getID()&&_695.getSourceEvent().getID()==_692.getID()){_693=_695;}}}}if(_693!==null){_689.remove(_693);}if(_688){this.updateEventsMap(_684,_685,_686,_687,false);}},disconnectEvent:function(id,_696){if(this.currentType=="Send"){this.removeWire(this.iwidgetId,this.selectedEvent,id,_696,true);}else{this.removeWire(id,_696,this.iwidgetId,this.selectedEvent,true);}this.updateEventWireCount(id,-1);},connectEvent:function(id,_697){if(this.currentType=="Send"){this.addWire(this.iwidgetId,this.selectedEvent,id,_697,true);}else{this.addWire(id,_697,this.iwidgetId,this.selectedEvent,true);}this.updateEventWireCount(id,1);},updateEventWireCount:function(id,num){var _698=dojo.query(".mumEventDivClicked"+this.currentType,this.wirePaneEventsDiv);for(var i=0;i<_698.length;i++){var _699=_698[i];if(_699.getAttribute("eventName")==this.selectedEvent){var _69a=dojo.query(".mumEventDivCount"+this.currentType,_699)[0];var _69b;if(_69a.innerHTML==""||_69a.innerHTML===null){_69b=0;}else{_69b=parseInt(_69a.innerHTML,10);}_69b=_69b+num;_616.setClass(_69a,"mumEventDivCount"+this.currentType);if(_69b>0){_69a.innerHTML=_69b;if(_69b==1){dojo.addClass(_69a,"mumEventDivCountSingleWire"+this.currentType);}else{dojo.addClass(_69a,"mumEventDivCountMultiWire"+this.currentType);}}else{_69a.innerHTML="";}this._insertEventA11yHint(this.currentType,_699,_69b);}}var _69c=dojo.query(".mumCurrentWidgetArrow"+this.currentType,this.wirePaneCurrentWidgetDiv)[0];var _69d=dojo.query(".mumCurrentWidgetName"+this.currentType,this.wirePaneCurrentWidgetDiv)[0];if(this.currentType=="Send"){this.allPubWires+=num;if(builderConfig.isBidi){this.sendIconDiv.innerHTML="("+this.allPubWires+")";}else{this.sendWireCountDiv.innerHTML="("+this.allPubWires+")";}if(this.allPubWires===0){dojo.addClass(_69c,"mumHiddenElement");_616.setNodeTitleWithStyle(_69d.title,_69d,375,this.titleFontStyle);}else{if(this.allPubWires==1&&num==1){dojo.removeClass(_69c,"mumHiddenElement");_616.setNodeTitleWithStyle(_69d.title,_69d,345,this.titleFontStyle);}}dojo.attr(this.wirePaneTitleDivRight,"title",cws.I_WIRING_TITLE_SEND+" "+this.allPubWires);}else{this.allHanWires+=num;if(builderConfig.isBidi){this.recIconDiv.innerHTML="("+this.allHanWires+")";}else{this.receiveWireCountDiv.innerHTML="("+this.allHanWires+")";}if(this.allHanWires===0){dojo.addClass(_69c,"mumHiddenElement");_616.setNodeTitleWithStyle(_69d.title,_69d,375,this.titleFontStyle);}else{if(this.allHanWires==1&&num==1){dojo.removeClass(_69c,"mumHiddenElement");_616.setNodeTitleWithStyle(_69d.title,_69d,345,this.titleFontStyle);}}dojo.attr(this.wirePaneTitleDivLeft,"title",cws.I_WIRING_TITLE_RECEIVE+" "+this.allHanWires);}var _69e=this.getWidgetFromMap(id);var _69f=dojo.query(".mumWireIndicator"+this.currentType,this.clickedWidgetDiv)[0];var _6a0=dojo.query(".mumWireWidgetTitle",this.clickedWidgetDiv)[0];if(_69e.totalWiredEvents>0){_69f.style.display="";_616.setNodeTitleWithStyle(_6a0.title,_6a0,345,this.titleFontStyle);}else{_616.setNodeTitleWithStyle(_6a0.title,_6a0,375,this.titleFontStyle);_69f.style.display="none";}},resetEventWireCount:function(){if(builderConfig.isBidi){this.sendIconDiv.innerHTML="("+this.allPubWires+")";}else{this.sendWireCountDiv.innerHTML="("+this.allPubWires+")";}if(builderConfig.isBidi){this.recIconDiv.innerHTML="("+this.allHanWires+")";}else{this.receiveWireCountDiv.innerHTML="("+this.allHanWires+")";}},createWidgetEventsDiv:function(id){this.wirePaneWidgetEventsDiv.innerHTML="";var _6a1=document.createElement("div");if(this.currentType=="Send"){_616.setClass(_6a1,"mumWireWidgetsTitleDivSend");_616.setNodeTitleWithStyle(cws.I_WIRING_WIDGETEVENTS_SEND,_6a1,425,this.titleFontStyle);}else{if(this.currentType=="Receive"){_616.setClass(_6a1,"mumWireWidgetsTitleDivReceive");_616.setNodeTitleWithStyle(cws.I_WIRING_WIDGETEVENTS_RECEIVE,_6a1,425,this.titleFontStyle);}}dojo.attr(_6a1,"tabindex","0");_616.setClass(this.wirePaneWidgetEventsDiv,"mumWidgetEventsDiv"+this.currentType);var _6a2=this.createDivWithClass("mumWidgetEventsContentDiv"+this.currentType);_6a2.setAttribute("role","menu");dojo.disconnect(this.eventsDivOverHandler);dojo.disconnect(this.eventsDivOutHandler);this.eventsDivOverHandler=dojo.connect(_6a2,"onmouseover",_6a2,function(){dojo.addClass(this,"hover");},true);this.eventsDivOutHandler=dojo.connect(_6a2,"onmouseout",_6a2,function(){dojo.removeClass(this,"hover");},true);for(var i=0;i<this.widgets.length;i++){var _6a3=this.widgets[i];if(_6a3.id==id){var _6a4=_6a3.events;for(var j=0;j<_6a4.length;j++){var _6a5=_6a4[j];var _6a6=_6a5.name;var _6a7=document.createElement("div");_6a7.setAttribute("belongId",id);_6a7.setAttribute("eventName",_6a6);if(_6a5.isMatch){this.connect(_6a7,"onclick",this.onClickConEventDiv);this.connect(_6a7,"onmouseover",this.onMouseOverConEventDiv);this.connect(_6a7,"onmouseout",this.onMouseOutConEventDiv);var _6a8=document.createElement("div");dojo.addClass(_6a8,"checkMarkDiv");dojo.addClass(_6a8,"mumFloatLeft");if(_6a5.isWired){_6a8.innerHTML="<input type='checkbox' dojoType='Checkbox' checked=true>";_6a7.setAttribute("isChecked","checked");_616.setClass(_6a7,"mumWidgetPaneEventDivCheck"+this.currentType);}else{_616.setClass(_6a7,"mumWidgetPaneEventDiv");_6a8.innerHTML="<input type='checkbox' dojoType='Checkbox'>";_6a7.setAttribute("isChecked","");}var _6a9=this.createDivWithClass("mumWidgetPaneEventInfoDiv"+this.currentType);_6a9.setAttribute("role","menuitem");dojo.attr(_6a9,"tabindex","0");var _6aa="";var _6ab="";var _6ac=null;var _6ad=this.getLayoutControl(id);_6ac=null;if(_6ad){var _6ae=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _6af=_6ae.getWidgetWindow(_6ad).start();var _6b0=_6ae.getHierarchicalEventProvider(_6af).start();_6ac=_6b0.getEvent(_6a6);}_6aa=_6ac.getTitle(dojo.locale)||_6ac.getTitle(ibmConfig["default.locale"])||_6ac.getName();_6ab=_6ac.getDescription(dojo.locale)||_6ac.getName();var _6b1=this.createDivWithClass("mumWidgetPaneEventInfoText"+this.currentType);dojo.addClass(_6b1,"mumEventDivText1");var _6b2=this.createDivWithClass("mumWidgetPaneEventInfoText"+this.currentType);dojo.addClass(_6b2,"mumEventDivText3");_6b1.title=_6aa;_6b1.innerHTML=_616.escapeString(_6aa);this._setupEventTypeDiv(_6b2,_6a5.payloadType);var _6b3=document.createElement("div");_6b3.appendChild(_6b1);var _6b4=document.createElement("div");_6b4.appendChild(_6b2);if(_6a5.isWired){_6a8.innerHTML="<input type='checkbox' dojoType='Checkbox' checked=true title='"+_6a9.title+"' />";_6a7.setAttribute("isChecked","checked");_616.setClass(_6a7,"mumWidgetPaneEventDivCheck"+this.currentType);}else{_616.setClass(_6a7,"mumWidgetPaneEventDiv");_6a8.innerHTML="<input type='checkbox' dojoType='Checkbox' title='"+_6a9.title+"' />";_6a7.setAttribute("isChecked","");}_6a9.appendChild(_6a8);var _6b5=_6a9.innerHTML;var _6b6;var _6b7=null;if(this.currentType=="Send"){_6b7=dojo.string.substitute(cws.I_WIRING_EVENT_TITLE_RECEIVE,[_6aa,this.getShownType(_6a5.payloadType),_6ab]);_6a9.title=_6b7;_6b6=dojo.string.substitute(cws.I_WIRING_EVENT_CONTENT_RECEIVE,[_6b3.innerHTML,"<div class=\"mumWidgetPaneEventInfoTextMid\">","</div>",_6b4.innerHTML]);}else{_6b7=dojo.string.substitute(cws.I_WIRING_EVENT_TITLE_SEND,[_6a6,this.getShownType(_6a5.payloadType),_6ab]);_6a9.title=_6b7;_6b6=dojo.string.substitute(cws.I_WIRING_EVENT_CONTENT_SEND,[_6b3.innerHTML,"<div class=\"mumWidgetPaneEventInfoTextMid\">","</div>",_6b4.innerHTML]);}_6a9.innerHTML=_6a9.innerHTML+_6b6;_6b1=dojo.query(".mumEventDivText1",_6a9)[0];var _6b8=_616.getStrWidth(_6b1.innerHTML,_6b1,this.defaultFontStyle);_6b2=dojo.query(".mumEventDivText3",_6a9)[0];var _6b9=_616.getStrWidth(_6b2.innerHTML,_6b2,this.defaultFontStyle);var _6ba=dojo.query(".mumWidgetPaneEventInfoTextMid",_6a9)[0];var _6bb=_616.getStrWidth(_6ba.innerHTML,_6ba,this.italicStyle);_6ba.title=_6ba.innerHTML;var _6bc=dojo.isIE?380:395;if(_6b8+_6bb+_6b9>_6bc){var _6bd=_6bc-_6bb;var _6be=_6bd-_6b8;var _6bf=_6bd-_6b9;if(_6be>60){_6b9=_6be;_616.setNodeTitleWithStyle(_6b2.innerHTML,_6b2,_6b9,this.defaultFontStyle);}else{if(_6bf>60){_6b8=_6bf;_616.setNodeTitleWithStyle(_6b1.innerHTML,_6b1,_6b8,this.defaultFontStyle);}else{_6b8=_6bd*0.6;_6b9=_6bd*0.4;_616.setNodeTitleWithStyle(_6b1.innerHTML,_6b1,_6b8,this.defaultFontStyle);_616.setNodeTitleWithStyle(_6b2.innerHTML,_6b2,_6b9,this.defaultFontStyle);}}}_6a7.appendChild(_6a9);}_6a2.appendChild(_6a7);}break;}}var _6c0=this.createDivWithClass("mumWidgetEventsBottomDiv"+this.currentType);this.wirePaneWidgetEventsDiv.appendChild(_6a1);this.wirePaneWidgetEventsDiv.appendChild(_6a2);this.wirePaneWidgetEventsDiv.appendChild(_6c0);},createWidgetsDiv:function(){this.wirePaneWidgetsDiv.innerHTML="";this.wirePaneWidgetEventsDiv.innerHTML="";this.hideElement(this.wirePaneWidgetEventsDiv);_616.setClass(this.wirePaneWidgetsDiv,"mumPaneDiv");_616.setClass(this.grayTip,"mumWireWidgetTip"+this.currentType);this.grayTip.innerHTML=cws.I_WIRING_NO_MATCH_WIDGET;var _6c1=document.createElement("div");if(this.currentType=="Send"){_616.setClass(_6c1,"mumWireWidgetsTitleDivSend");_616.setNodeTitleWithStyle(cws.I_WIRING_WIDGETS_SEND,_6c1,425,this.titleFontStyle);}else{if(this.currentType=="Receive"){_616.setClass(_6c1,"mumWireWidgetsTitleDivReceive");_616.setNodeTitleWithStyle(cws.I_WIRING_WIDGETS_RECEIVE,_6c1,425,this.titleFontStyle);}}dojo.attr(_6c1,"tabindex","0");var _6c2=this.createDivWithClass("mumWidgetsContentDiv"+this.currentType);_6c2.setAttribute("role","menu");this.wirePaneEventsDiv.appendChild(_6c2);var _6c3=0;var _6c4;for(var i=0;i<this.widgets.length;i++){var _6c5=this.widgets[i];if(_6c5.hasMatchEvent){_6c3++;_6c4=_6c5.id;var _6c6=document.createElement("div");_6c6.setAttribute("widgetId",_6c5.id);_6c6.setAttribute("isClicked","false");_6c6.setAttribute("widgetName",_6c5.type);_6c6.setAttribute("title",_6c5.type);_6c6.setAttribute("tabindex","0");_6c6.setAttribute("role","menuitem");dojo.addClass(_6c6,"mumWireWidget"+this.currentType);var _6c7=document.createElement("div");this.connect(_6c6,"onmouseover",this.onMouseOverWidget);this.connect(_6c6,"onmouseout",this.onMouseOutWidget);this.connect(_6c6,"onclick",this.onClickWidget);this.connect(_6c6,"onkeypress",this.onKeyPressWidget);var _6c8=com.ibm.mm.builder.utils.iwidgetUtil;var _6c9=_6c8.getWidgetIconCSA2(_6c5.id);var _6ca=document.createElement("div");_6ca.innerHTML="<img src='"+_6c9+"' class='mumWirePaneWidgetIcon' alt=''>";_616.setClass(_6ca,"mumWireWidgetImg");_6c6.appendChild(_6ca);var _6cb=document.createElement("div");_616.setClass(_6cb,"mumWireWidgetTitle");_6c6.appendChild(_6cb);_6c7.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/"+(this.currentType==="Send"?"receive":"send")+(builderConfig.isBidi?"_arrow_rtl.png' alt=''>":"_arrow.png' alt=''>");_616.setClass(_6c7,"mumWireIndicator"+this.currentType);_6c7.style.display="none";if(_6c5.totalWiredEvents>0){dojo.addClass(_6c6,"mumHasWiredEvent");_6c7.style.display="";_616.setNodeTitleWithStyle(_6c5.type,_6cb,345,this.titleFontStyle);}else{_616.setNodeTitleWithStyle(_6c5.type,_6cb,375,this.titleFontStyle);}var _6cc=document.createElement("div");_6cc.setAttribute("role","button");_616.setClass(_6cc,"mumWidgetDivReturnImg"+this.currentType);this.connect(_6cc,"onclick",this.onClickWidgetReturnImg);this.connect(_6cc,"onkeypress",this.onKeyPressWidgetReturnImg);dojo.attr(_6cc,"title",cws["I_WIRING_OTHER_WIDGETS_"+this.currentType.toUpperCase()]);_6cc.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/"+(this.currentType=="Send"?"blue":"green")+"_expand.png' alt=''>";_6cc.style.visibility="hidden";_6cc.setAttribute("tabindex","0");_6c6.appendChild(_6cc);_6c6.appendChild(_6c7);_6c2.appendChild(_6c6);}}this.wirePaneWidgetEventsDiv.innerHTML="";var _6cd=this.createDivWithClass("mumWidgetsBottomDiv"+this.currentType);this.wirePaneWidgetsDiv.appendChild(_6c1);if(_6c3===0){_6c2.appendChild(this.grayTip);}this.wirePaneWidgetsDiv.appendChild(_6c2);this.wirePaneWidgetsDiv.appendChild(_6cd);this.wirePaneWidgetsDiv.style.display="";this.LOGGER.exiting("WirePane_createWidgetsDiv");return _6c3;},initAllData:function(){if(typeof this.matchingType==="undefined"){var _6ce=this.iContext.getiWidgetAttributes();var _6cf=_6ce.getItemValue("matchingType");if(!_6cf){_6cf=_6ce.getItemValue("defaultMatchingType");}this.matchingType=parseInt(_6cf);}this.eventsMap={};var _6d0=null;var _6d1=null;var _6d2=null;var _6d3=null;var _6d4=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();this.currentPageId=_6d4;var _6d5=this.getLayoutControl(this.iwidgetId);_6d0=com.ibm.mm.builder.utils.wireUtil.getWidgetHandledEventsCSA2(_6d5);_6d1=com.ibm.mm.builder.utils.wireUtil.getWidgetPublishedEventsCSA2(_6d5);this.allHanWires=0;this.allPubWires=0;var _6d6=null;if(_6d0){for(var n=0;n<_6d0.length;n++){_6d2=_6d0[n];_6d6=com.ibm.mm.builder.utils.wireUtil.getAllMatchPubEventsCSA2(_6d5,_6d2.getName(),_6d4,this.matchingType);for(var i=0;i<_6d6.length;i++){this.allHanWires=this.allHanWires+_6d6[i].wiredEvents.length;}this.eventsMap["Receive-"+_6d2.getName()]=_6d6;}}if(_6d1){for(var m=0;m<_6d1.length;m++){_6d3=_6d1[m];_6d6=com.ibm.mm.builder.utils.wireUtil.getAllMatchHandleEventsCSA2(_6d5,_6d3.getName(),_6d4,this.matchingType);for(var j=0;j<_6d6.length;j++){this.allPubWires=this.allPubWires+_6d6[j].wiredEvents.length;}this.eventsMap["Send-"+_6d3.getName()]=_6d6;}}},createReceiveEventsDiv:function(){this.createCurrentWidgetDiv();this.wirePaneEventsDiv.innerHTML="";_616.setClass(this.wirePaneEventsDiv,"mumEventsDiv");_616.setClass(this.grayTip,"mumWireWidgetTipSend");this.grayTip.innerHTML=cws.I_WIRING_NO_RECEIVE_EVENTS;dojo.attr(this.grayTip,"tabindex","0");dojo.attr(this.grayTip,"title",cws.I_WIRING_NO_RECEIVE_EVENTS);var _6d7=document.createElement("div");dojo.attr(_6d7,"tabindex","0");_616.setClass(_6d7,"mumEventsTitleDivReceive");_616.setNodeTitleWithStyle(cws.I_WIRING_EVENTS_RECEIVE,_6d7,425,this.titleFontStyle);this.wirePaneEventsDiv.appendChild(_6d7);var _6d8=[];var _6d9=this.getLayoutControl(this.iwidgetId);_6d8=com.ibm.mm.builder.utils.wireUtil.getWidgetHandledEventsCSA2(_6d9);var _6da=this.createDivWithClass("mumEventsContentDiv"+this.currentType);_6da.setAttribute("role","menu");this.wirePaneEventsDiv.appendChild(_6da);var _6db=false;for(var n=0;n<_6d8.length;n++){var _6dc=_6d8[n];var _6dd=document.createElement("div");_616.setClass(_6dd,"mumEventDiv");_6da.appendChild(_6dd);_6db=true;var _6de="";var _6df="";var _6e0="";var _6e1="";_6de=_6dc.getTitle(dojo.locale)||_6dc.getTitle(ibmConfig["default.locale"])||_6dc.getName();_6df=_6dc.getDescription(dojo.locale)||_6dc.getName();_6e0=_6dc.getPayloadType();_6e1=_6dc.getName();var _6e2=dojo.string.substitute(cws.I_WIRING_EVENT_TITLE_RECEIVE,[_6de,this.getShownType(_6e0),_6df]);_6dd.title=_6e2;var _6e3=this.eventsMap["Receive-"+_6e1];var _6e4=0;for(var i=0;i<_6e3.length;i++){_6e4=_6e4+_6e3[i].totalWiredEvents;}var _6e5=document.createElement("div");_616.setClass(_6e5,"mumEventDivCount"+this.currentType);if(_6e4>0){_6e5.innerHTML=_6e4;dojo.addClass(_6dd,"mumEventDivWired");if(_6e4==1){dojo.addClass(_6e5,"mumEventDivCountSingleWire"+this.currentType);}else{dojo.addClass(_6e5,"mumEventDivCountMultiWire"+this.currentType);}}var _6e6=document.createElement("div");_6e6.setAttribute("role","button");_6e6.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/blue_expand.png' alt=''>";_616.setClass(_6e6,"mumEventDivReturnImg"+this.currentType);this.connect(_6e6,"onclick",this.onClickEventReturnImg);_6e6.style.visibility="hidden";this.connect(_6e6,"onkeypress",this.onKeyPressEventReturnImg);_6e6.setAttribute("tabindex","0");dojo.attr(_6e6,"title",cws["I_WIRING_OTHER_EVENTS_"+this.currentType.toUpperCase()]);var _6e7=document.createElement("div");_616.setClass(_6e7,"grayBar");_6e7.style.visibility="hidden";_6dd.setAttribute("eventName",_6e1);_6dd.setAttribute("eventTitle",_6de);_6dd.setAttribute("isClicked","false");_6dd.setAttribute("role","menuitem");_6dd.setAttribute("tabindex","0");_6dd.appendChild(_6e5);var _6e8=this.createDivWithClass("mumEventDivTextReceive");dojo.addClass(_6e8,"mumEventDivText1");_6e8.title=_6de;_6e8.innerHTML=_616.escapeString(_6de);var _6e9=this.createDivWithClass("mumEventDivTextReceive");dojo.addClass(_6e9,"mumEventDivText3");this._setupEventTypeDiv(_6e9,_6e0);var _6ea=document.createElement("div");_6ea.appendChild(_6e8);var _6eb=document.createElement("div");_6eb.appendChild(_6e9);var _6ec=_6dd.innerHTML;var _6ed=dojo.string.substitute(cws.I_WIRING_EVENT_CONTENT_RECEIVE,[_6ea.innerHTML,"<div class=\"mumEventDivText2\">","</div>",_6eb.innerHTML]);_6dd.innerHTML=_6dd.innerHTML+_6ed;_6e8=dojo.query(".mumEventDivText1",_6dd)[0];var _6ee=_616.getStrWidth(_6e8.innerHTML,_6e8,this.defaultFontStyle);_6e9=dojo.query(".mumEventDivText3",_6dd)[0];var _6ef=_616.getStrWidth(_6e9.innerHTML,_6e9,this.defaultFontStyle);var _6f0=dojo.query(".mumEventDivText2",_6dd)[0];var _6f1=_616.getStrWidth(_6f0.innerHTML,_6f0,this.italicStyle);_6f0.title=_6f0.innerHTML;var _6f2=dojo.isIE?370:380;if(_6ee+_6f1+_6ef>_6f2){var _6f3=_6f2-_6f1;var _6f4=_6f3-_6ee;var _6f5=_6f3-_6ef;if(_6f4>60){_6ef=_6f4;_616.setNodeTitleWithStyle(_6e9.innerHTML,_6e9,_6ef,this.defaultFontStyle);}else{if(_6f5>60){_6ee=_6f5;_616.setNodeTitleWithStyle(_6e8.innerHTML,_6e8,_6ee,this.defaultFontStyle);}else{_6ee=_6f3*0.6;_6ef=_6f3*0.4;_616.setNodeTitleWithStyle(_6e8.innerHTML,_6e8,_6ee,this.defaultFontStyle);_616.setNodeTitleWithStyle(_6e9.innerHTML,_6e9,_6ef,this.defaultFontStyle);}}}_6dd.appendChild(_6e6);this.connect(_6dd,"onclick",this.onClickEvent);this.connect(_6dd,"onkeypress",this.onKeyPressEvent);this._insertEventA11yHint("Receive",_6dd,_6e4);}if(!_6db){_6da.appendChild(this.grayTip);}var _6f6=this.createDivWithClass("mumEventsBottomDiv"+this.currentType);this.wirePaneEventsDiv.appendChild(_6f6);},createSendEventsDiv:function(){this.createCurrentWidgetDiv();this.wirePaneEventsDiv.innerHTML="";_616.setClass(this.wirePaneEventsDiv,"mumEventsDiv");_616.setClass(this.grayTip,"mumWireWidgetTipReceive");this.grayTip.innerHTML=cws.I_WIRING_NO_SEND_EVENTS;dojo.attr(this.grayTip,"tabindex","0");dojo.attr(this.grayTip,"title",cws.I_WIRING_NO_SEND_EVENTS);var _6f7=document.createElement("div");_616.setClass(_6f7,"mumEventsTitleDivSend");_616.setNodeTitleWithStyle(cws.I_WIRING_EVENTS_SEND,_6f7,425,this.titleFontStyle);dojo.attr(_6f7,"tabindex","0");this.wirePaneEventsDiv.appendChild(_6f7);var _6f8=[];var _6f9=this.getLayoutControl(this.iwidgetId);_6f8=com.ibm.mm.builder.utils.wireUtil.getWidgetPublishedEventsCSA2(_6f9);var _6fa=this.createDivWithClass("mumEventsContentDiv"+this.currentType);_6fa.setAttribute("role","menu");this.wirePaneEventsDiv.appendChild(_6fa);var _6fb=false;for(var n=0;n<_6f8.length;n++){var _6fc=_6f8[n];var _6fd=document.createElement("div");_6fd.setAttribute("role","menuitem");_616.setClass(_6fd,"mumEventDiv");_6fa.appendChild(_6fd);_6fb=true;var _6fe="";var _6ff="";var _700="";var _701="";_6fe=_6fc.getTitle(dojo.locale)||_6fc.getTitle(ibmConfig["default.locale"])||_6fc.getName();_6ff=_6fc.getDescription(dojo.locale)||_6fc.getName();_700=_6fc.getPayloadType();_701=_6fc.getName();var _702=dojo.string.substitute(cws.I_WIRING_EVENT_TITLE_SEND,[_6fe,this.getShownType(_700),_6ff]);_6fd.title=_702;var _703=this.eventsMap["Send-"+_701];var _704=0;for(var i=0;i<_703.length;i++){_704=_704+_703[i].totalWiredEvents;}var _705=document.createElement("div");_616.setClass(_705,"mumEventDivCount"+this.currentType);if(_704>0){_705.innerHTML=_704;dojo.addClass(_6fd,"mumEventDivWired");if(_704==1){dojo.addClass(_705,"mumEventDivCountSingleWire"+this.currentType);}else{dojo.addClass(_705,"mumEventDivCountMultiWire"+this.currentType);}}var _706=document.createElement("div");_706.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/green_expand.png' alt=''>";_616.setClass(_706,"mumEventDivReturnImg"+this.currentType);this.connect(_706,"onclick",this.onClickEventReturnImg);_706.style.visibility="hidden";this.connect(_706,"onkeypress",this.onKeyPressEventReturnImg);_706.setAttribute("tabindex","0");dojo.attr(_706,"title",cws["I_WIRING_OTHER_EVENTS_"+this.currentType.toUpperCase()]);_6fd.setAttribute("eventName",_701);_6fd.setAttribute("eventTitle",_6fe);_6fd.setAttribute("isClicked","false");_6fd.setAttribute("tabindex","0");_6fd.appendChild(_705);var _707=this.createDivWithClass("mumEventDivTextSend");dojo.addClass(_707,"mumEventDivText1");_707.title=_6fe;_707.innerHTML=_616.escapeString(_6fe);var _708=this.createDivWithClass("mumEventDivTextSend");dojo.addClass(_708,"mumEventDivText3");this._setupEventTypeDiv(_708,_700);var _709=document.createElement("div");_709.appendChild(_707);var _70a=document.createElement("div");_70a.appendChild(_708);var _70b=_6fd.innerHTML;var _70c=dojo.string.substitute(cws.I_WIRING_EVENT_CONTENT_SEND,[_709.innerHTML,"<div class=\"mumEventDivText2\">","</div>",_70a.innerHTML]);_6fd.innerHTML=_6fd.innerHTML+_70c;_707=dojo.query(".mumEventDivText1",_6fd)[0];var _70d=_616.getStrWidth(_707.innerHTML,_707,this.defaultFontStyle);_708=dojo.query(".mumEventDivText3",_6fd)[0];var _70e=_616.getStrWidth(_708.innerHTML,_708,this.defaultFontStyle);var _70f=dojo.query(".mumEventDivText2",_6fd)[0];var _710=_616.getStrWidth(_70f.innerHTML,_70f,this.italicStyle);_70f.title=_70f.innerHTML;var _711=dojo.isIE?370:380;if(_70d+_710+_70e>_711){var _712=_711-_710;var _713=_712-_70d;var _714=_712-_70e;if(_713>60){_70e=_713;_616.setNodeTitleWithStyle(_708.innerHTML,_708,_70e,this.defaultFontStyle);}else{if(_714>60){_70d=_714;_616.setNodeTitleWithStyle(_707.innerHTML,_707,_70d,this.defaultFontStyle);}else{_70d=_712*0.6;_70e=_712*0.4;_616.setNodeTitleWithStyle(_707.innerHTML,_707,_70d,this.defaultFontStyle);_616.setNodeTitleWithStyle(_708.innerHTML,_708,_70e,this.defaultFontStyle);}}}_6fd.appendChild(_706);this.connect(_6fd,"onclick",this.onClickEvent);this.connect(_6fd,"onkeypress",this.onKeyPressEvent);this._insertEventA11yHint("Send",_6fd,_704);}if(!_6fb){_6fa.appendChild(this.grayTip);}var _715=this.createDivWithClass("mumEventsBottomDiv"+this.currentType);this.wirePaneEventsDiv.appendChild(_715);},createCurrentWidgetDiv:function(){this.wirePaneCurrentWidgetDiv.innerHTML="";var _716;_616.setClass(this.wirePaneCurrentWidgetDiv,"mumPaneDiv");var _717=this.createDivWithClass("mumCurrentWidgetArrow"+this.currentType);_717.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/"+this.currentType.toLowerCase()+(builderConfig.isBidi?"_arrow_rtl.png' alt=''>":"_arrow.png' alt=''>");var _718=this.createDivWithClass("mumCurrentWidgetContentDiv"+this.currentType);_718.setAttribute("role","menu");var _719=this.createDivWithClass("mumCurrentWidgetDiv"+this.currentType);_719.setAttribute("role","menuitem");dojo.disconnect(this.widgetDivOverHandler);dojo.disconnect(this.widgetDivOutHandler);this.widgetDivOverHandler=dojo.connect(_719,"onmouseover",_719,function(){dojo.addClass(this,"hover");},true);this.widgetDivOutHandler=dojo.connect(_719,"onmouseout",_719,function(){dojo.removeClass(this,"hover");},true);var _71a=this.createDivWithClass("mumCurrentWidgetIcon");_71a.innerHTML="<img src='"+this.widgetObj.widgetIconSrc+"' class='mumWirePaneWidgetIcon' alt=''>";var _71b=this.createDivWithClass("mumCurrentWidgetName"+this.currentType);dojo.attr(_71b,"tabindex","0");if(this.currentType=="Send"){_716=this.createDivWithClass("mumGreenTitleDiv");dojo.attr(_716,"tabindex","0");_616.setNodeTitleWithStyle(cws.I_WIRING_CWIDGET_SEND,_716,425,this.titleFontStyle);dojo.attr(_716,"title",cws.I_WIRING_CWIDGET_SEND);if(this.allPubWires===0){dojo.addClass(_717,"mumHiddenElement");_616.setNodeTitleWithStyle(this.widgetObj.widgetname,_71b,375,this.titleFontStyle);}else{_616.setNodeTitleWithStyle(this.widgetObj.widgetname,_71b,345,this.titleFontStyle);}}else{_716=this.createDivWithClass("mumBlueTitleDiv");dojo.attr(_716,"tabindex","0");_616.setNodeTitleWithStyle(cws.I_WIRING_CWIDGET_RECEIVE,_716,425,this.titleFontStyle);dojo.attr(_716,"title",cws.I_WIRING_CWIDGET_RECEIVE);if(this.allHanWires===0){dojo.addClass(_717,"mumHiddenElement");_616.setNodeTitleWithStyle(this.widgetObj.widgetname,_71b,375,this.titleFontStyle);}else{_616.setNodeTitleWithStyle(this.widgetObj.widgetname,_71b,345,this.titleFontStyle);}}_719.appendChild(_71a);_719.appendChild(_71b);_719.appendChild(_717);var _71c=this.createDivWithClass("mumCurrentWidgetBottom"+this.currentType);_718.appendChild(_719);this.wirePaneCurrentWidgetDiv.appendChild(_716);this.wirePaneCurrentWidgetDiv.appendChild(_718);this.wirePaneCurrentWidgetDiv.appendChild(_71c);},createTitleDiv:function(){var span=document.createElement("span");span.innerHTML=cws.I_WIRING_TITLE_RECEIVE;this.receiveTextDiv.appendChild(span);if(builderConfig.isBidi){this.recIconDiv.innerHTML="("+this.allHanWires+")";this.receiveWireCountDiv.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/receive_arrow_deselect_rtl.png' alt=''>";}else{this.receiveWireCountDiv.innerHTML="("+this.allHanWires+")";this.recIconDiv.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/receive_arrow_deselect.png' alt=''>";}var _71d=document.createElement("span");_71d.innerHTML=cws.I_WIRING_TITLE_SEND;this.sendTextDiv.appendChild(_71d);if(builderConfig.isBidi){this.sendIconDiv.innerHTML="("+this.allPubWires+")";this.sendWireCountDiv.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/send_arrow_rtl.png' alt='' role='presentation'>";}else{this.sendWireCountDiv.innerHTML="("+this.allPubWires+")";this.sendIconDiv.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/send_arrow.png' alt='' role='presentation'>";}this.connect(this.wirePaneTitleDivLeft,"onclick",this.onClickTitlePaneLeft);this.connect(this.wirePaneTitleDivLeft,"onkeypress",this.onKeyPresTitlePane);this.connect(this.wirePaneTitleDivRight,"onclick",this.onClickTitlePaneRight);this.connect(this.wirePaneTitleDivRight,"onkeypress",this.onKeyPresTitlePane);this.adjustDivsStyle();},adjustTitleDiv:function(){_616.setClass(this.wirePaneTitleDivLeft,"mumWirePaneTitleDivReceiveTab"+this.currentType);_616.setClass(this.leftDivOfReceiveTab,"mumLeftDivOfReceiveTab"+this.currentType);_616.setClass(this.midDivOfReceiveTab,"mumMidDivOfReceiveTab"+this.currentType);_616.setClass(this.rightDivOfReceiveTab,"mumRightDivOfReceiveTab"+this.currentType);if(builderConfig.isBidi){_616.setClass(this.receiveWireCountDiv,"mumReceiveIconDiv"+this.currentType);_616.setClass(this.recIconDiv,"mumReceiveWireCountDiv");this.receiveWireCountDiv.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/receive_arrow"+(this.currentType==="Send"?"_deselect":"")+"_rtl.png' alt=''>";}else{_616.setClass(this.recIconDiv,"mumReceiveIconDivReceive");this.recIconDiv.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/receive_arrow"+(this.currentType==="Send"?"_deselect":"")+".png' alt=''>";}_616.setClass(this.wirePaneTitleDivRight,"mumWirePaneTitleDivSendTab"+this.currentType);_616.setClass(this.leftDivOfSendTab,"mumLeftDivOfSendTab"+this.currentType);_616.setClass(this.midDivOfSendTab,"mumMidDivOfSendTab"+this.currentType);_616.setClass(this.rightDivOfSendTab,"mumRightDivOfSendTab"+this.currentType);if(builderConfig.isBidi){_616.setClass(this.sendWireCountDiv,"mumSendIconDiv"+this.currentType);_616.setClass(this.sendIconDiv,"mumSendWireCountDiv");this.sendWireCountDiv.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/send_arrow"+(this.currentType==="Send"?"":"_deselect")+"_rtl.png' alt=''>";}else{_616.setClass(this.sendIconDiv,"mumSendIconDivSend");this.sendIconDiv.innerHTML="<img src='"+builderConfig.builderPath+"/images/wiringscreen/send_arrow"+(this.currentType==="Send"?"":"_deselect")+".png' alt=''>";}},display:function(_71e){this.iwidgetId=_71e;this.currentType="Send";this.eventsMap={};if(this.wirePane){this.wirePaneDiv.innerHTML="";this.buildRendering();}this.widgetObj={};var _71f=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();this.currentPageId=_71f;this.widgetObj.widgetIconSrc=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetIconCSA2(this.iwidgetId);this.widgetObj.widgetname=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(this.iwidgetId);this.initAllData();this.initWirePane();this.createSendEventsDiv();var _720=dojo.query("."+com.ibm.mm.builder.constant.iwWidgetContent,this.iContext.getRootElement())[0];if(_720){_720.appendChild(this.wirePaneDiv);}else{this.iContext.getRootElement().appendChild(this.wirePaneDiv);}this.displayPrompter("1");},setContext:function(_721){this.iContext=_721;},_insertA11yHint:function(_722,hint){this._removeA11yHint(_722);dojo.create("span",{innerHTML:hint,"class":"access"},_722,"first");},_removeA11yHint:function(_723){dojo.query(".access",_723).forEach(dojo.destroy);},_insertEventA11yHint:function(_724,_725,_726){if(_726>0){this._insertA11yHint(_725,"This event"+(_724=="Send"?" sends data to ":" receives data from ")+_726+" event"+(_726==1?"":"s"));}else{this._removeA11yHint(_725);}},openWiringSettings:function(){if(!this.wiringSettingsDialog){this.wiringSettingsDialog=new com.ibm.mm.builder.iwidget.wiringscreen.WiringSettingsDialog();this.wiringSettingsDialog.setOuterContext(this.iContext);dojo.connect(this.wiringSettingsDialog,"onSettingsSaved",this,this.settingsSaved);}this.wiringSettingsDialog.setMatchingType(this.matchingType);this.wiringSettingsDialog.show();},resetView:function(){if(this.firstAreaBottomDiv){_616.setClass(this.firstAreaBottomDiv,"mumFirstAreaBottomDiv"+this.currentType);dojo.fx.wipeOut({node:this.secondAreaDiv,duration:500}).play();}if(this.secondAreaBottomDiv){this.hideElement(this.secondAreaBottomDiv);dojo.fx.wipeOut({node:this.wirePaneWidgetEventsDiv,duration:10}).play();}this.displayPrompter("1");if(this.currentType==="Send"){this.createSendEventsDiv();}else{if(this.currentType==="Receive"){this.createReceiveEventsDiv();}}this.resetEventWireCount();},settingsSaved:function(_727){this.wiringSettings=_727;this.matchingType=_727[this.wiringSettingsConstants.SETTING_MATCHING_TYPE];var _728=this.iContext.getiWidgetAttributes();_728.setItemValue("matchingType",this.matchingType);var me=this;_728.save(function(){me.initAllData();me.resetView();});},_setupEventTypeDiv:function(div,_729){payloadLabel=this.getShownType(_729);div.innerHTML=_616.escapeString(payloadLabel);div.title=payloadLabel;}});})();}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringDisabledTip"]){dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringDisabledTip"]=true;dojo.provide("com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringDisabledTip");dojo.declare("com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringDisabledTip",[dijit._Widget,dijit._Templated],{autoWiringResult:false,contentRoot:null,notificationDialog:null,widgetId:null,templateString:"<div dojoAttachPoint='autoWiringNotiDiv' class='mumAutoWiringTipDiv'>"+"<div class='mumAWDNIcon'>"+"<img dojoAttachPoint='wiringIcon' />"+"</div>"+"<div class='mumAWDNMiddle' >"+"<div dojoAttachPoint='tipText' class='mumAWDNTip'>"+"</div>"+"<div dojoAttachPoint='NotiCfgNode' class=''>"+"<input type='checkbox' dojoAttachPoint='NotiCfgCheckNode' dojoAttachEvent='onclick: onNotNotifyMeClicked' class='mumAutoWiringNotiCfgCheck'/>"+"<div dojoAttachPoint='NotiCfgLabel' class='mumAutoWiringNotiCfgLable'></div>"+"</div>"+"</div>"+"<div dojoAttachPoint='okNode' class='mumAutoWiringOk'>"+"<div dojoAttachPoint='okTextHidden' class='mumAutoWiringOKTextHidden'>"+"</div>"+"<div dojoAttachPoint='okText' class='mumAutoWiringOKText'>"+"</div>"+"</div>"+"</div>",constructor:function(){},postCreate:function(){this.initContent();},updateContent:function(_72a){var _72b=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(_72a);_72b=com.ibm.mm.builder.utils.htmlUtil.formatBlankSpace(_72b);var tip=dojo.query(".mumAWDNTip",this.notificationDialog.domNode)[0];tip.innerHTML=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_AUTO_WIRING_INTERFACE_TIP,[_72b,"<span class='mumAWDNTipLink'>","</span>"]);var link=dojo.query(".mumAWDNTipLink",tip)[0];dojo.connect(link,"onclick",this,"onClickOpenAWProperties");if(com.ibm.mm.builder.utils.userUtil.isLookasideEnabled("com.ibm.mashups.user.AUTO_WIRE_DISABLED_NOTIFICATIONS")){var _72c=com.ibm.mm.builder.utils.userUtil.getUserModel();var user=_72c.findCurrentUser().start();var _72d=user.getAttribute("com.ibm.mashups.user.AUTO_WIRE_DISABLED_NOTIFICATIONS");this.NotiCfgCheckNode.checked=!_72d;}},setOuterWirePaneContext:function(_72e){this.outerContext=_72e;},onNotNotifyMeClicked:function(_72f){if(com.ibm.mm.builder.utils.userUtil.isLookasideEnabled("com.ibm.mashups.user.AUTO_WIRE_DISABLED_NOTIFICATIONS")){var _730=com.ibm.mm.builder.utils.userUtil.getUserModel();var user=_730.findCurrentUser().start();user.setAttribute("com.ibm.mashups.user.AUTO_WIRE_DISABLED_NOTIFICATIONS",!this.NotiCfgCheckNode.checked);_730.commit().start();}},onClickOpenAWProperties:function(){this.hide();var _731=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.closeMashupDialog",this.outerContext.widgetId);com.ibm.mm.builder.commonActions.editPage(_731);},initContent:function(){this.wiringIcon.alt=this.wiringIcon.title=com.ibm.mm.builder.coreWidgetsStrings.I_WIRING_NAME;dojo.attr(this.wiringIcon,"src",builderConfig.builderPath+(builderConfig.isBidi?"/images/d_wiring_icon_rtl.png":"/images/d_wiring_icon.png"));this.NotiCfgLabel.innerHTML=com.ibm.mm.builder.coreWidgetsStrings.I_AUTO_WIRING_NOTIFICATION_DISABLE_NOTI;this.okText.innerHTML="<a href='javascript:'>"+com.ibm.mm.builder.coreWidgetsStrings.I_COMMON_OK+"</a>";dojo.connect(this.okText,"onclick",this,"hide");this.okTextHidden.innerHTML="<a href='javascript:'>"+com.ibm.mm.builder.coreWidgetsStrings.I_COMMON_OK+"</a>";var _732=document.createElement("div");_732.appendChild(this.autoWiringNotiDiv);this.notificationDialog=dijit.byId("this.notificationDialog");if(!this.notificationDialog){this.notificationDialog=new com.ibm.mm.builder.widget.CustomDialog({id:"Mashup_Auto_Wiring_Disable_Tip_Dlg",needUnderLay:false,roundCorner:true,modelDialog:true,hasRightBottomResizer:false,dialogOpacity:0.85},_732);}},destroy:function(){this.notificationDialog.destroy();},show:function(_733){this.updateContent(_733);this.notificationDialog.show();},hide:function(){if(this.notificationDialog){this.notificationDialog.hide();}}});}if(!dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringNotification"]){dojo._hasResource["com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringNotification"]=true;dojo.provide("com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringNotification");dojo.declare("com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringNotification",[dijit._Widget,dijit._Templated],{autoWiringResult:null,contentRoot:null,notificationDialog:null,widgetId:null,location:null,templateString:"<div dojoAttachPoint='autoWiringNotiDiv' class='mumAutoWiringNotiDiv'>"+"<div dojoAttachPoint='autoWiringNotiDivMain' class='mumAutoWiringNotiDivMain'>"+"<div dojoAttachPoint='titleNode' class='mumAutoWiringTitle'>"+"<span dojoAttachPoint='titleIconNode' class='mumAutoWiringTitleIcon'>"+"</span>"+"<span dojoAttachPoint='titleText' class='mumAutoWiringTitleText'>"+"</span>"+"</div>"+"<div dojoAttachPoint='contentNode' class='mumAutoWiringContent'>"+"</div>"+"<div dojoAttachPoint='actionsNode' class='mumAutoWiringActions'>"+"<div dojoAttachPoint='openWiringNode' class='mumAutoWiringOpenWiring'>"+"</div>"+"<div dojoAttachPoint='NotiCfgNode' class='mumAutoWiringNotiCfg'>"+"<input type='checkbox' dojoAttachPoint='NotiCfgCheckNode' dojoAttachEvent='onclick: onNotifyMeClicked' class='mumAutoWiringNotiCfgCheck'/>"+"<div dojoAttachPoint='NotiCfgLabel' class='mumAutoWiringNotiCfgLable'></div>"+"</div>"+"</div>"+"</div>"+"<div dojoAttachPoint='okNode' class='mumAutoWiringOk'>"+"<div dojoAttachPoint='okTextHidden' class='mumAutoWiringOKTextHidden'>"+"</div>"+"<div dojoAttachPoint='okText' class='mumAutoWiringOKText'>"+"</div>"+"</div>"+"</div>",constructor:function(){},onNotifyMeClicked:function(_734){if(com.ibm.mm.builder.utils.userUtil.isLookasideEnabled("com.ibm.mashups.user.AUTO_WIRE_ENABLED_NOTIFICATIONS")){var _735=com.ibm.mm.builder.utils.userUtil.getUserModel();var user=_735.findCurrentUser().start();user.setAttribute("com.ibm.mashups.user.AUTO_WIRE_ENABLED_NOTIFICATIONS",!this.NotiCfgCheckNode.checked);_735.commit().start();}},onClickOpenWiring:function(){var _736=this.autoWiringResult.widgetId;var _737=com.ibm.mm.builder.utils.iwidgetUtil;var _738=_737.getWidgetIconCSA2(_736);var _739={nodeWidth:"486px",title:com.ibm.mm.builder.coreWidgetsStrings.I_WIRING_NAME,titleIconUrl:_738,leftBarWidth:"18px",rightBarWidth:"12px",displayCloseButton:true,hasRightBottomResizer:false};var _73a={widgetTypeId:"wireInterface",eventName:"com.ibm.mashups.builder.editWire",eventPayload:_736,dialogParam:_739,hasRightBottomResizer:false,requestRefresh:true};com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.displayInMashupDialog",_73a);},initContent:function(){this.fillInText();if(!this.autoWiringResult){return;}this.titleIconNode.innerHTML="";var _73b=document.createElement("img");this.titleIconNode.appendChild(_73b);_73b.alt=_73b.title=com.ibm.mm.builder.coreWidgetsStrings.I_WIRING_NAME;dojo.attr(_73b,"src",builderConfig.builderPath+(builderConfig.isBidi?"/images/d_wiring_icon_rtl.png":"/images/d_wiring_icon.png"));this.contentNode.innerHTML="";var _73c=this.autoWiringResult.publishTo;var _73d=this.autoWiringResult.receiveFrom;var _73e=null;for(var i=0;i<_73c.length;i++){_73e=this.createWireDiv(_73c[i],"Send");this.contentNode.appendChild(_73e);}for(var j=0;j<_73d.length;j++){_73e=this.createWireDiv(_73d[j],"Receive");this.contentNode.appendChild(_73e);}dojo.connect(this.openWiringNode,"onclick",this,"onClickOpenWiring");dojo.connect(this.okText,"onclick",this,"hide");},hide:function(){var _73f=dijit.byId("Mashup_Auto_Wiring_Notification_Dlg"+this.widgetId);if(_73f){_73f.hide();_73f.destroy();}},createWireDiv:function(_740,type){var _741=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(_740);_741=com.ibm.mm.builder.utils.htmlUtil.formatBlankSpace(_741);var _742=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetIconCSA2(_740);var _743=document.createElement("div");dojo.addClass(_743,"mumAutoWiringWireDiv");var _744=document.createElement("div");_743.appendChild(_744);dojo.addClass(_744,"mumAWWireDivIcon");var _745=document.createElement("img");_744.appendChild(_745);_745.alt=_745.title=com.ibm.mm.builder.utils.htmlUtil.unEscapeString(_741);dojo.attr(_745,"src",_742);var _746=document.createElement("div");_743.appendChild(_746);dojo.addClass(_746,"mumAWWireDivText");if(type=="Send"){_746.innerHTML=_746.title=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_AUTO_WIRING_NOTIFICATION_SENDING_TO,[_741]);}else{_746.innerHTML=_746.title=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_AUTO_WIRING_NOTIFICATION_RECEIVING_FROM,[_741]);}return _743;},fillInText:function(){var _747=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetInstanceTitle(this.widgetId);_747=com.ibm.mm.builder.utils.htmlUtil.formatBlankSpace(_747);if(this.location.inNVA){this.titleText.innerHTML=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_AUTO_WIRING_NOTIFICATION_TITLE_FOR_WIDGET,[_747]);}else{this.titleText.innerHTML=com.ibm.mm.builder.coreWidgetsStrings.I_AUTO_WIRING_NOTIFICATION_TITLE;}this.openWiringNode.innerHTML="<a href='javascript:'>"+com.ibm.mm.builder.coreWidgetsStrings.I_AUTO_WIRING_NOTIFICATION_OPEN_WIRE_INTERFACE+"</a>";this.NotiCfgLabel.innerHTML=com.ibm.mm.builder.coreWidgetsStrings.I_AUTO_WIRING_NOTIFICATION_DISABLE_NOTI;this.okText.innerHTML="<a href='javascript:'>"+com.ibm.mm.builder.coreWidgetsStrings.I_COMMON_OK+"</a>";this.okTextHidden.innerHTML="<a href='javascript:'>"+com.ibm.mm.builder.coreWidgetsStrings.I_COMMON_OK+"</a>";},showAutoWiringResult:function(id,_748,_749){this.widgetId=id;this.autoWiringResult=_748;this.location=_749;dojo.subscribe("widgetDeleted"+id,this,"hide");this.initContent();var _74a=dijit.byId("Mashup_Auto_Wiring_Notification_Dlg"+this.widgetId);if(_74a){_74a.destroy();}var _74b=document.createElement("div");_74b.appendChild(this.autoWiringNotiDiv);this.notificationDialog=new com.ibm.mm.builder.widget.CustomDialog({id:"Mashup_Auto_Wiring_Notification_Dlg"+this.widgetId,needUnderLay:false,roundCorner:true,modelDialog:false,initLeftPosition:_749.x+"px",initTopPosition:_749.y+"px",hasRightBottomResizer:false,dialogOpacity:0.85},_74b);this.notificationDialog.show();}});} dojo.provide("pagebuilder.nls.pb_base_layer_en");dojo.provide("com.ibm.bundles.nls.Theme");com.ibm.bundles.nls.Theme._built=true;dojo.provide("com.ibm.bundles.nls.Theme.en");com.ibm.bundles.nls.Theme.en={"theme_choose_skin":"Choose Skin","page_goTo_csa":"Switch to Client-Side Mode","theme_hiddenContentDesc":"Place content into the area below to prevent it from displaying when the page is viewed.","space_description":"Space","edit_wires_title":"Edit Wires","page_force_ssa_link":"Use server side mode.","exportSpace_title":"Export Space","layout_renderingError":"An error occurred rendering the assigned layout.","tagAndRate_description":"Tagging and Rating","site_promotion_title":"Site Promotions...","rate_title":"Rate...","theme_edit_wiring":"Edit Wiring...","theme_maximize":"Maximize","close_analytics_title":"Close Analytics Reports","theme_go_to_edit":"Go to Edit mode","dnd_not_instantiated":"Drag and drop could not be instantiated","theme_config_control":"Configure...","skin_show_titlebar":"Show title bar","catalog_title":"Catalog","theme_wire_widget":"Wire Widget","dnd_disabled":"Drag and drop is disabled","createFeed_title":"Create New Feed...","statusbar_messages_available":"${0} messages are available for review","page_title":"Page","move_left":"Move Left","layout_error_contactAdmin":"If the problem persists, contact your administrator.","page_analytics_reports_description":"Analytics Reports for Pages","embedPage_description":"Display on a Web Page","browseTags_description":"Browse Tags","close_analytics_description":"Close Analytics Reports","theme_actions_menu":"Actions Button","theme_close_shelf_help":"Button will close customize shelf","createSpace_title":"Create a New Space","editPageLayout_description":"Edit Page Layout","theme_sign_up":"Sign Up","page_goTo_ssa":"Switch to Server-Side Mode","theme_restore":"Restore","statusbar_items_available":"${0} items are available for review","other_description":"Other","theme_move":"Move...","layout_missingError":"The assigned layout does not exist.","statusbar_show_details":"Show Details","analytics_description":"Analytics","a11y_skip_portlet":"Skip to next portlet","dnd_copy_failed":"An error occurred copying the resource.","layout_resizer":"Layout Resizer","theme_move_page":"Move Page","dnd_locked_container":"Cannot move a resource to a locked container.","advanced_description":"Advanced","shareSpace_title":"Share Space","statusbar_warning":"Warning","context_portlet_menu_renderingError":"An error occurred rendering the portlet menu.","editPage_description":"Edit Page","exportSpace_description":"Export Space","removePage_title":"Remove Page","theme_remove_page":"Are you sure you want to remove this page and all of its children?","move_down":"Move Down","viewSource_title":"View Source","create_child_page_link":"Click here to create a child page.","layout_error_explanation":"This could be a result of an error during the page creation process, manual changes made to the page layout, or the actions of an Administrator.","theme_global_page_closing_non_active":"You are trying to close a global page that is not currently open.","theme_hide_portlet":"Hide Portlet","publishPage_description":"Publish Page","sharePage_title":"Share Page...","theme_more_pages":"More Pages","theme_display_shelf_help":"Button will display customize shelf below","theme_refresh_page":"Refresh Page","io_insufficient_permissionsError":"There are insufficient permissions to perform the requested operation.","editPageLayout_title":"Edit Page Layout","a11y_skip_widget":"Skip to next widget","move_up":"Move Up","theme_add_pages_shared":"Add Pages Shared with Me","theme_help":"Help","deleteSpace_title":"Delete Space","theme_complementary_content":"Complementary Content","theme_login":"Log In","theme_global_page_active":"The global page is currently active. Close the global page before continuing.","theme_hiddenControl":"hidden","removeFromFav_title":"Remove form Favorites","page_description":"Page","theme_additional_actions":"Additional Actions","theme_refresh_description":"Refresh the page to show the most recent information.","page_save_operation_not_complete":"A save operation to the server has not yet completed.","theme_remove_page_name":"Are you sure you want to remove the page ${0} and all of its children?","space_title":"Space","removeSharedPages_title":"Remove Page","statusbar_multiple":"Multiple Messages","sharing_description":"Share","statusbar_hide_details":"Hide Details","tagAndRate_title":"Tagging and Rating","deleteSpace_description":"Delete Space","sharing_title":"Share","page_initError":"An error occurred initializing the page.","theme_menu":"Menu","assignPagePermissions_description":"Assign Page Permissions","statusbar_clear":"Clear","theme_more_actions":"More Actions","newSiblingPage_title":"New Sibling Page...","widgetBuilder_title":"Create a New Widget...","currently_selected":"currently selected","theme_edit_settings_portal":"Edit Shared Settings...","createFeed_description":"Create New Feed","assignPagePermissions_title":"Assign Page Permissions","statusbar_error":"Error","site_promotion_description":"Add this Page to a Site Promotion","createSpace_description":"Create a New Space","theme_global_page_cannot_close":"The global page cannot be closed.","browseTags_title":"Browse Tags","ally_display_actions_menu":"Display actions menu","theme_delete":"Delete","theme_confirm_leave_edit":"Your changes have not been saved. Are you sure you want to leave Edit mode?","dnd_move_failed":"An error occurred moving the resource.","deletePage_title":"Delete Page","theme_share":"Share","movePage_description":"Move Page","aria_edit_mode":"Going to Edit mode. Options will be displayed below in the toolbar.","theme_logout":"Log Out","theme_customize":"Customize","generic_tag_description":"Add this Page to an Analytics Tag","deletePage_description":"Delete Page","openCatalog_title":"Open Catalog as a New Page","theme_edit_my_profile":"Edit My Profile","newSiblingPage_description":"New Sibling Page","edit_wires_description":"Add, modify, or remove wires.","theme_go_to_view":"Go to View mode","private_public_modelError":"Cannot place a public resource under a private resource.","statusbar_info":"Information","theme_edit_settings":"Edit Settings...","theme_view_wiring":"View Wiring Graph","a11y_focus_titlebar":"Focus will be moved to the title bar.","shareSpace_description":"Share Space","aria_view_mode":"Going to view mode.","openCatalogInDlg_description":"Open Catalog in a Dialog Box","setAsHomeSpace_title":"Set As Home Space","theme_global_page_already_opened":"The global page is already opened.","theme_accountSetting":"Settings","widgetBuilder_description":"Create a New Widget","edit_description":"Edit","theme_delete_page":"Are you sure you want to delete this page and all of its children?","theme_actions":"Actions","layout_error_mismatch":"The assigned layout does not match the actual page layout.","removePage_description":"Remove Page","theme_share_this_page":"Share this Page","a11y_skip_region":"Skip to next region","theme_viewWireGraph":"View Wiring Graph","context_page_menu_renderingError":"An error occurred rendering the page menu.","skin_hide_titlebar":"Hide title bar","theme_delete_page_name":"Are you sure you want to delete the page ${0} and all of its children?","editSpace_description":"Edit Space Settings","createDataMashup_title":"Create Data Mashup...","openCatalog_description":"Open Catalog as a New Page","addSharedPages_description":"Add Shared Pages","removeSharedPages_description":"Remove Page","theme_impersonation":"Impersonate","theme_hide":"Hide","advanced_title":"Advanced","portlet_analytics_reports":"Portlet Reports","embedPage_title":"Display on a Web Page...","other_title":"Other","layout_error_symptoms":"Until this problem is fixed, attempts to customize this page by adding content or changing the layout may not work properly.","theme_hide_widget":"Hide Widget","editPage_title":"Edit Page","a11y_layout_resized_pixels":"The left container is set to ${0} pixels and the right container is set to ${1} pixels.","io_serverError":"Internal server error.","theme_minimize":"Minimize","no_content_node":"This page does not support content.","theme_display":"Display","sharePage_description":"Share Page","page_analytics_reports":"Page Reports","statusbar_status_error":"A runtime error occurred","theme_menu_cannot_render":"Menu cannot be rendered.","createDataMashup_description":"Create Data Mashup","layout_error_heading":"Error with the Page Layout","layout_error_tryRecreate":"Try deleting the page and creating it again.","generic_tag_title":"Analytics Tags...","portlet_analytics_reports_description":"Analytics Reports for Portlets","tag_title":"Tag...","theme_rename":"Rename...","a11y_display_menu":"Display menu","theme_personalize_control":"Personalize...","catalog_description":"Catalog","io_missingResource":"The requested resource does not exist.","openCatalogInDlg_title":"Open Catalog in a Dialog Box","move_right":"Move Right","theme_websphere_portal":"IBM WebSphere Portal","publishPage_title":"Publish Page...","tag_description":"Tag","theme_back":"Back","theme_resize":"Resize...","a11y_show_focus_titlebar":"Show title bar. Focus will be moved to the title bar.","page_force_ssa_msg":"This page contains one or more portlets that do not support client-side mode.","theme_share_page":"Share Page","theme_refresh":"Refresh","rate_description":"Rate","editPageProperties_title":"Edit Page Properties...","theme_global_page_not_opened":"The global page is not open.","editPageProperties_description":"Edit Page Properties","statusbar_print":"Print","newChildPage_title":"New Child Page...","setAsHomeSpace_description":"Set As Home Space","a11y_layout_resized":"The left container is set to ${0} and the right container is set to ${1}.","io_networkError":"An error occurred communicating with the server.","addSharedPages_title":"Add Shared Pages...","viewSource_description":"View Source","analytics_title":"Analytics","editSpace_title":"Edit Space","a11y_skip_content":" link using access key S.","duplicateSpace_description":"Duplicate Space","newChildPage_description":"New Child Page","duplicateSpace_title":"Duplicate Space","a11y_layout_resizer":"Use the arrow keys to resize the layout containers","a11y_display_user_menu":"Display user menu","removeFromFav_description":"Remove form Favorites","theme_edit_control":"Edit","movePage_title":"Move Page...","edit_title":"Edit"}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("pagebuilder.nls.pb_base_layer",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.pb.iwidget.control"]){dojo._hasResource["com.ibm.pb.iwidget.control"]=true;dojo.provide("com.ibm.pb.iwidget.control");(function(){var _1=com.ibm.mashups.iwidget,_2=_1.Constants,_3=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.EventService.SERVICE_NAME),_4=_1.model.Factory.getGlobalWidgetModel();com.ibm.pb.iwidget.control={onLoad:function(id,cb){if(id){var _5=_4.find(id);if(_5){if(_5.isLoaded()===false){var me=this;_3.subscribeEvent(_2.WIDGET_LOADED+"."+id,null,function(){cb(_5);});return;}else{cb(_5);return;}}}cb();}};var _6=com.ibm.pb.iwidget.control;})();}if(!dojo._hasResource["com.ibm.pb.extension.Operations"]){dojo._hasResource["com.ibm.pb.extension.Operations"]=true;dojo.provide("com.ibm.pb.extension.Operations");dojo.declare("com.ibm.pb.extension.SimpleOperation",[com.ibm.mashups.enabler.ac.operation.Operation],{allowed:false,constructor:function(_7,_8){this.allowed=_7;if(_8){_8(this);}},isAllowed:function(_9){return this.allowed;}});(function(){var _a=com.ibm.pb.extension.Operations={PAGE_ACTIONS:"com.ibm.pb.extension.Operations.pageActions",CREATE_PAGE:"com.ibm.pb.extension.Operations.createPage"},_b=com.ibm.pb.extension.SimpleOperation,_c=com.ibm.mashups.enabler,_d=_c.ac.operation.AllowedOperationsModelFactory.getAllowedOperationsModel(),_e=_c.navigation.Factory.getNavigationModel(),_f=_c.navigation.Constants;_d.setOperation(_a.PAGE_ACTIONS,function(_10,_11,_12,_13){new _b(_c.user.Factory.getUserModel().getAnonymousMode()!=_c.user.AnonymousMode.ANONYMOUS,_13);});_d.setOperation(_a.CREATE_PAGE,function(_14,_15,_16,_17){var _18=_15.navNode||_15.contentNode,_19=dojo.some([true,false],function(_1a){var res=false,_1b={type:_f.NAVIGATION_PAGE};if(_1a){_1b["private"]=true;}if(_e.confirmCreate(_1b)){var _1c=_e.create(_1b);res=_e.confirmInsert(_1c,_18);}return res;});new _b(_19,_17);});})();}if(!dojo._hasResource["com.ibm.pb.layout.LayoutParser"]){dojo._hasResource["com.ibm.pb.layout.LayoutParser"]=true;dojo.provide("com.ibm.pb.layout.LayoutParser");(function(){var lp=com.ibm.pb.layout.LayoutParser={CONTAINER_QUERY:".component-container",CONTROL_QUERY:".component-control",ROOT_NODE_ID:"layoutContainers",ID_MATCHER:/id-([\S]+)/,_rootNode:null,_containersCache:null,extractID:function(_1d){var m=(dojo.attr(_1d,"class")||"").match(lp.ID_MATCHER);return m&&m[1];},findById:function(id){if(!id){return null;}var ele=dojo.query("> .component-container > .id-"+id,this.getRootNode());if(!!ele&&ele.length>0){return ele[0];}ele=dojo.query("> .hiddenWidgetsDiv > .component-container > .id-"+id,this.getRootNode());if(!!ele&&ele.length>0){return ele[0];}return dojo.query(".id-"+id,this.getRootNode())[0];},findContainers:function(_1e){if(_1e==this.getRootNode()){if(!this._containersCache){this._containersCache=dojo.query(lp.CONTAINER_QUERY,_1e);}return this._containersCache;}else{return dojo.query(lp.CONTAINER_QUERY,_1e);}},findControls:function(_1f){return dojo.query(lp.CONTROL_QUERY,_1f);},getRootNode:function(){if(!lp._rootNode){lp._rootNode=dojo.byId(lp.ROOT_NODE_ID);}return lp._rootNode;},clearCachedContainers:function(){this._containersCache=null;}};})();}if(!dojo._hasResource["com.ibm.pb.contextMenu.sharedActions"]){dojo._hasResource["com.ibm.pb.contextMenu.sharedActions"]=true;dojo.provide("com.ibm.pb.contextMenu.sharedActions");(function(){var _20=com.ibm.mashups.enabler,_21=com.ibm.mashups.builder,_22=com.ibm.pb.iwidget.control,_23=_21.model.Factory.getRuntimeModel(),_24=com.ibm.mashups.services.ServiceManager.getService("eventService"),_25=_20.navigation.Factory.getNavigationModel(),_26=_20.ac.operation.AllowedOperationsModelFactory.getAllowedOperationsModel(),_27=com.ibm.pb.extension.Operations,_28=_20.model.state.NavigationStateModelFactory,_29=_20.model.state.AccessorFactory,_2a=com.ibm.pb.layout.LayoutParser,_2b=_20.context.Factory.getLocalizedContext();var _2c={confirmShowAddContent:function(_2d,_2e,_2f,_30){if(!_2c.canEditPage(_2d)){return false;}else{if(_30.isMaximized){return false;}else{if(_2c.isLegacyPage(_2d,_30.layoutMetadataKey,_30.layoutFileMetadataKey)){return false;}else{return true;}}}},confirmShowChangeStyle:function(_31,_32,_33,_34){var _35=_25.find(_31).start();if(!_2c.canEditPage(_31)){return false;}else{if(!_35.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)){return false;}else{return true;}}},confirmShowChangeLayout:function(_36,_37,_38,_39){var _3a=_25.find(_36).start();if(!_2c.canEditPage(_36)){return false;}else{if(_39.isMaximized){return false;}else{if(!_3a.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)){return false;}else{if(_2c.isLegacyPage(_36,_39.layoutMetadataKey,_39.layoutFileMetadataKey)){return false;}else{return true;}}}}},showAddContent:function(_3b,_3c,_3d,_3e){if(!ibmCfg.controllers.addContent){var _3f=ibmConfig.fontSizeEnlarged?_3e.maxLabelLengthLarge:_3e.maxLabelLength;var _40=ibmPortalConfig.isWcmPresent?_3e.addContentWCM:_3e.addContent;var _41=_20.widget.Factory.getWidgetModel();ibmCfg.controllers.addContent=new com.ibm.pb.customize.AddContentPaletteContainer({logger:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.pb.customize.enabler.AddContentController"),smallWidget:true,draggable:true,dndType:"sm",numRows:ibmCfg.portalConfig.portalContext?3:4,maxLabelLength:_3f,imagePath:_3e.imagePath,blankImg:_3e.blankImg,jsonFile:_40,allowedListJsonFile:_3e.addContentAllowed,navModel:_25,widgetModel:_41},document.createElement("div"));}return ibmCfg.controllers.addContent;},showChangeStyle:function(_42,_43,_44,_45){if(!ibmCfg.controllers.changeStyle){var _46=_25.find(_42).start(),url=_46.getMetaData(_45.styleMetadataKey);var _47=9;if(ibmCfg.portalConfig&&ibmCfg.portalConfig.portalContext){_47=16;}var _48=(url)?url.substring(url.lastIndexOf("/")+1):_45.pageDefaultStyle;var _49=ibmConfig.fontSizeEnlarged?_45.maxLabelLengthLarge:_45.maxLabelLength;ibmCfg.controllers.changeStyle=new com.ibm.pb.customize.ChangeStylePaletteContainer({logger:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.pb.customize.enabler.ChangeStyleController"),currentSet:_48,itemLimit:_47,numRows:2,maxLabelLength:_49,jsonFile:_45.changeStyle,imagePath:_45.imagePath,navModel:_25},document.createElement("div"));dojo.subscribe("com.ibm.pb.customize.pageStyleChanged",function(url){var _4a=(url)?url.substring(url.lastIndexOf("/")+1):_45.defaultStyle;ibmCfg.controllers.changeStyle.currentSet=ibmCfg.controllers.changeStyle.current=_4a;if(ibmCfg.controllers.changeStyle.started){dojo.hitch(ibmCfg.controllers.changeStyle,"changeSelected",_4a)();}});}return ibmCfg.controllers.changeStyle;},showChangeLayout:function(_4b,_4c,_4d,_4e){var _4f=_25.find(_4b).start(),_50=_4f.getContent().start(),url=_50.getMetaData(_4e.layoutMetadataKey);var _51=_4e.defaultLayout;if(url){if(url.lastIndexOf("/")==url.length-1){url=url.substring(0,url.length-1);}_51=url.substring(url.lastIndexOf("/")+1);}if(!ibmCfg.controllers.changeLayout){var _52=ibmConfig.fontSizeEnlarged?_4e.maxLabelLengthLarge:_4e.maxLabelLength;var _53=9;if(ibmCfg.portalConfig&&ibmCfg.portalConfig.portalContext){_53=16;}ibmCfg.controllers.changeLayout=new com.ibm.pb.customize.ChangeLayoutPaletteContainer({logger:com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.pb.customize.enabler.ChangeLayoutController"),currentSet:_51,itemLimit:_53,numRows:2,maxLabelLength:_52,jsonFile:_4e.changeLayout,imagePath:_4e.imagePath,navModel:_25},document.createElement("div"));}else{ibmCfg.controllers.changeLayout.currentSet=ibmCfg.controllers.changeLayout.current=ibmCfg.controllers.changeLayout.current=_51;if(ibmCfg.controllers.changeLayout.started){dojo.hitch(ibmCfg.controllers.changeLayout,"changeSelected",_51)();}}return ibmCfg.controllers.changeLayout;},hasAllowedPortletsList:function(_54){var _55=_25.find(_54).start(),_56=_25.getLayoutModel(_55.getID()),_57=_56.getRoot().start(),xml=_57.getXml(),_58="//*[model:allPortletsAllowed=\"false\"]";return com.ibm.mashups.enabler.xml.XPath.evaluateBoolean(_58,xml,{atom:"http://www.w3.org/2005/Atom",model:"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements"});},isLegacyPage:function(_59,_5a,_5b){if(_59){var _5c=_25.find(_59).start();if(_5c.getNavigationElementType()===com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE){_5c=_5c.getContent().start();}var _5d=true;if(ibmCfg.portalConfig.portalContext){_5d=com.ibm.mashups.enabler.xml.XPath.evaluateBoolean("//model:static-content-page",_5c.getXml(),{atom:"http://www.w3.org/2005/Atom",model:"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements"});}if(!_5c){return true;}else{if((_5c.getMetaData(_5b)||_5c.getMetaData(_5a))&&_5d){return false;}else{return true;}}}else{return true;}},isStaticPage:function(_5e){if(_5e){var _5f=_25.find(_5e).start();if(!_5f){return true;}if(_5f.getMetaData("com.ibm.portal.static.page.file.name.html")){return true;}}return false;},canEditPage:function(_60){if(_60){page=_25.find(_60).start();if(!page){return false;}if(page.hasRole(com.ibm.mashups.enabler.ac.RoleType.ADMIN)||page.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)||page.hasRole("Privileged User")){return true;}else{return false;}}else{return false;}},confirmAdvancedActions:function(_61,_62,_63,_64){currentContentID=_2c.getContentId(_61);return (_2c.isOperationAllowed(_20.ac.operation.Constants.EDIT_LAYOUT,{contentNode:currentContentID})||_2c.isOperationAllowed(_20.ac.operation.Constants.EDIT_PROPERTIES,{contentNode:_61})||_2c.confirmEditPageProperties(_61,_62,{operation:_20.ac.operation.Constants.EDIT_PROPERTIES},_64));},confirmEditPage:function(_65,_66,_67,_68){if(!_2c.isAuthenticated){return false;}var _69=_25.find(_65).start(),ret=false;var _6a=_69.getNavigationElementType();if(_6a==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE){if(_69.getContent){if(_2c.isStaticPage(_65)){var sc=_69.getContent().start();ret=sc.confirmSetStaticMarkup("");}else{ret=_2c.canEditPage(_65);}}}return ret;},isEditActive:function(_6b,_6c,_6d,_6e){return (_23.getCurrentPage().getPageMode()!="edit");},editPage:function(_6f,_70,_71,_72){var _73=_20.user.Factory.getUserModel();if(_73.getAnonymousMode()!=_20.user.AnonymousMode.ANONYMOUS&&_23.getCurrentPage().getPageMode()!="edit"){var _74=dojo.getObject("ibmCfg.controllers.rendering");if(_74){_74.changePageMode("edit");}else{_24.broadcastEvent("com.ibm.mashups.builder.changePageMode",mode);_23.getCurrentPage().setPageMode(mode);}}},isOperationAllowed:function(_75,_76){if(_76&&typeof _76.contentNode=="string"){var _77=_25.find(_76.contentNode).start();_76.contentNode=_77.getContent().start();}return _26.getOperation(_75,_76).start().isAllowed();},confirmOperation:function(ID,_78,_79,_7a){var _7b={id:ID};if(!_78||_78=="com.ibm.mashups.enabler.navigation.NavigationNode"){_7b.navID=ID;}else{_7b.navID=_23.getCurrentPage().getID();}if(_79.operation==com.ibm.mashups.enabler.ac.operation.Constants.EDIT_PROPERTIES){_7b.contentID=_7b.navID;}var _7c=_2c.replaceMapVars(_7b,_79.jsonContext);return _2c.isOperationAllowed(_79.operation,_7c);},confirmEditPageProperties:function(ID,_7d,_7e,_7f){var _80=_25.find(ID).start();var _81={id:ID,navID:ID,contentID:ID,contentNode:_80};return _26.getOperation(_7e.operation,_81).start().isAllowed();},confirmChangeLayout:function(ID,_82,_83,_84){var _85=_25.find(ID).start();if(!_85.getContent){return false;}var _86=_85.getContent().start();if(_86.getMetaData("com.ibm.portal.layout.template.ref")||_85.getMetaData("com.ibm.portal.static.page.file.name.html")){return false;}else{return _2c.confirmOperation(ID,_82,_83,_84);}},confirmAssignPermissions:function(ID,_87,_88,_89){var _8a=_25.find(ID).start();var _8b=_8a.getNavigationElementType();if(_8b!=com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE){return false;}return _2c.confirmOperation(ID,_87,_88,_89);},confirmTagAndRatePage:function(_8c,_8d,_8e,_8f){return true;},confirmCPAction:function(_90,_91,_92,_93){var _94=_92.configCheck,_95=false,_96=null;if(_94){if(_91==="com.ibm.mashups.enabler.navigation.NavigationNode"){_96=_25.find(_90).start();}else{if(_91==="com.ibm.mashups.iwidget.widget.IWidgetDefinition"){var nsm=_28.getNavigationStateModel();var _97=_29.getSpaceAccessor(nsm).getSpaceID();var _98=_29.getPageAccessor(nsm,_97);var _99=_98.getPageID();var _9a=_25.find(_99).start();var _9b=_25.getLayoutModel(_9a);_96=_9b.find(_90).start();}else{console.warn("resourceType %o is not valid for a CP action",_91);return;}}var _9c=_96.getMetaData(_92.metadataName);_95=_9c!=="true";}return (_94&&_95);},confirmbrowseTags:function(_9d,_9e,_9f,_a0){return true;},browseTags:function(_a1,_a2,_a3,_a4){var _a5={};_a5.uri="tm:browsetags";_a5.rmparam="rm:oid:"+_a1;var url=_2c.createURL(_a1,_a5);_2c.savePageChecker(function(){top.location.href=url;});},confirmSharing:function(_a6,_a7,_a8,_a9){return (_2c.confirmAddSharedPages(_a6,_a7,_a8,_a9)||_2c.confirmSharePage(_a6,_a7,_a8,_a9)||_2c.isOperationAllowed(_20.ac.operation.Constants.ASSIGN_ROLES,{contentNode:_a6}));},confirmSharePage:function(_aa,_ab,_ac,_ad){if(!_aa){return false;}if(!_25.hasLayoutModel(_aa)){return false;}return _2c.isPrivatePage(_aa)&&_2c.isPageOwner(_aa);},sharePage:function(_ae,_af,_b0,_b1){var _b2=_25.find(_ae).start();try{var _b3=_2b.getLocale(_b2);}catch(e){}var _b4=_b2.getTitle(_b3||dojo.locale)||_b2.getTitle(ibmConfig["default.locale"])||"";var _b5=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_DIALOG_TITLE,[_b4]);_2c.showInShareDialog(_ae,_b5);},assignPagePermissions:function(_b6,_b7,_b8,_b9){var _ba=dojo.i18n.getLocalization("com.ibm.bundles","Theme")["assignPagePermissions_title"];_2c.showInShareDialog(_b6,_ba);},showInShareDialog:function(_bb,_bc){var _bd={widgetTypeId:"sharePage",eventName:"com.ibm.mashups.builder.sharePage",eventPayload:_bb,requestRefresh:true,dialogParam:{title:_bc.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),nodeWidth:"774px",hasRightBottomResizer:false}};_2c.savePageChecker(function(){_24.broadcastEvent("com.ibm.mashups.builder.displayInMashupDialog",_bd);},function(){_24.broadcastEvent("com.ibm.mashups.builder.switchPage",_bb);_24.broadcastEvent("com.ibm.mashups.builder.displayInMashupDialog",_bd);});},confirmAddSharedPages:function(_be,_bf,_c0,_c1){var _c2=_25.find(ibmConfig.sharedPagesParent).start();if(_c2.hasRole(com.ibm.mashups.enabler.ac.RoleType.ADMIN)||_c2.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER)||_c2.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)||_c2.hasRole("Privileged User")){return true;}return false;},addSharedPages:function(_c3,_c4,_c5,_c6){dojo.require("dojo.i18n");nlsBundle=dojo.i18n.getLocalization("com.ibm.bundles","Theme");var _c7=nlsBundle["theme_add_pages_shared"];var _c8={nodeWidth:"600px",containerBackgroundColor:"white",hasLeftBottomResizer:false,hasRightBottomResizer:false,title:_c7};var _c9={widgetTypeId:"viewMorePage",eventName:"com.ibm.mashups.builder.viewMorePage",eventPayload:"",dialogParam:_c8,requestRefresh:true};_2c.savePageChecker(function(){_24.broadcastEvent("com.ibm.mashups.builder.displayInMashupDialog",_c9);},function(){_24.broadcastEvent("com.ibm.mashups.builder.switchPage",_c3);_24.broadcastEvent("com.ibm.mashups.builder.displayInMashupDialog",_c9);});},confirmPageActions:function(_ca,_cb,_cc,_cd){return (_2c.confirmMovePage(_ca,_cb,_cc,_cd)||_2c.confirmDeletePage(_ca,_cb,_cc,_cd)||_2c.confirmCreatePage(_ca,_cb,_cc,_cd));},confirmCreatePage:function(_ce,_cf,_d0,_d1){var _d2=_25.find(_ce).start();return _26.getOperation(_27.CREATE_PAGE,{navNode:_d2}).start().isAllowed();},createPage:function(_d3,_d4,_d5,_d6){_2c.savePageChecker(function(){_22.onLoad(_d5&&_d5.widgetId,function(){var _d7=_28.getNavigationStateModel();var _d8=_29.getSpaceAccessor(_d7);_24.broadcastEvent("com.ibm.mashups.builder.createPage",{spaceId:_d8.getSpaceID(),parentPageId:_d3});});});},confirmCreateSiblingPage:function(_d9,_da,_db,_dc){var _dd=com.ibm.pb.contextMenu.sharedActions.isAuthenticated.apply(this,arguments);var _de=_25.find(_d9).start();var _df=_25.getParent(_de).start();var _e0=(_de.getNavigationElementType()==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE);var _e1=_26.getOperation(_27.CREATE_PAGE,{navNode:_df}).start().isAllowed();return _dd&&_e0&&_e1;},createSiblingPage:function(_e2,_e3,_e4,_e5){var _e6=_25.find(_e2).start();var _e7=_25.getParent(_e6).start();_2c.savePageChecker(function(){_22.onLoad(_e4&&_e4.widgetId,function(){var _e8=_28.getNavigationStateModel();var _e9=_29.getSpaceAccessor(_e8);_24.broadcastEvent("com.ibm.mashups.builder.createPage",{spaceId:_e9.getSpaceID(),parentPageId:_e7.getID()});});});},confirmMovePage:function(_ea,_eb,_ec,_ed){var _ee=_25.find(_ea).start();if(_ee.getNavigationElementType()===com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE){if(_2c.isPrivatePage(_ea)){return true;}var _ef=_25.getParent(_ee).start();if(_ef===null){return false;}if(_ef.hasRole(com.ibm.mashups.enabler.ac.RoleType.ADMIN)||_ef.hasRole(com.ibm.mashups.enabler.ac.RoleType.MANAGER)||_ef.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR)){return true;}}return false;},movePage:function(_f0,_f1,_f2,_f3){_2c.savePageChecker(function(){var _f4={widgetTypeId:"reorderPage",eventName:"com.ibm.mashups.builder.reorderPage",eventPayload:{pageId:_f0,spaceId:null},requestRefresh:true,dialogParam:{id:_f0+"_reorderPane",title:dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_REORDER_PAGE_DIALOG_TITLE,[com.ibm.mm.builder.utils.pageUtil.getPageTitle(_f0)]),nodeWidth:"461px",containerBackgroundColor:"white",hasRightBottomResizer:false}};com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.displayInMashupDialog",_f4);});},isRemovePage:function(_f5,_f6,_f7,_f8){var _f9=_25.find(_f5).start(),_fa=_25.confirmRemove(_f9),_fb=_2c.getContentId(_f5),_fc=_25.find(_fb).start(),_fd=_25.confirmRemove(_fc);if(_fa&&_fd){return false;}else{return true;}},confirmDeletePage:function(_fe,_ff,_100,_101){var node=_25.find(_fe).start();return _25.confirmRemove(node);},deletePage:function(_102,_103,_104,_105){var _106=dojo.i18n.getLocalization("com.ibm.bundles","Theme");var _107=_25.find(_102).start();if(confirm(dojo.string.substitute(_106[_104.confirmMsgKey],[_2b.getTitle(_107)]))){var node=_25.find(_102).start();var _108=_25.getParent(node).start();if(_25.confirmRemove(node)){_25.remove(node);}_25.commit().setFinishedCallback(function(_109,_10a,_10b){com.ibm.pb.contextMenu.sharedActions.widgetEditModeClearer();com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setID(null);com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(false);if(_10a<400||_10a===404){var _10c=_28.getNavigationStateModel();var _10d=_29.getPageAccessor(_10c,null);_10d.setPageID(_108.getID());_10c.commit().setFinishedCallback(function(){var _10e=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");_10e.broadcastEvent("com.ibm.mashups.builder.switchPage",_108.getID());_10e.broadcastEvent("com.ibm.mashups.builder.refreshNavigation",_108.getID());}).start();}else{dojo.publish("/portal/status/theme",["error",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_PUB_API_DELETE_PAGE_1,[_10a]),null]);}}).start();}},deletePage2:function(_10f,_110,_111,_112){var _113=dojo.i18n.getLocalization("com.ibm.bundles","Theme");var _114=_25.find(_10f).start();if(confirm(dojo.string.substitute(_113[_111.confirmMsgKey],[_2b.getTitle(_114)]))){var node=_25.find(_10f).start();var _115=_25.getParent(node).start();var _116=_115;var _117=_25.getChildren(_115);var _118;while(_117.hasNext()){_118=_117.next();if(_118.getID()===_10f){if(_116===_115&&_117.hasNext()){_116=_117.next();}break;}_116=_118;}if(_25.confirmRemove(node)){_25.remove(node);}_25.commit().setFinishedCallback(function(){com.ibm.pb.contextMenu.sharedActions.widgetEditModeClearer();com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setID(null);com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(false);var _119=_28.getNavigationStateModel();var _11a=_29.getPageAccessor(_119,null);_11a.setPageID(_116.getID());_119.commit().setFinishedCallback(function(){var _11b=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");_11b.broadcastEvent("com.ibm.mashups.builder.switchPage",_116.getID());_11b.broadcastEvent("com.ibm.mashups.builder.refreshNavigation",_116.getID());}).start();}).start();}},resizeWidget:function(ID,_11c,_11d,_11e){var _11f=com.ibm.mm.builder.utils.pageUtil.getLayoutControlByWidgetId(ID);var _120=com.ibm.mm.builder.utils.enablerUtil.getNodeTitle(_11f,dojo.locale);var _121=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_CONTEXT_MENU_RESIZE_WIDGET_PROMPT,[_120]);var _122=_2c.getContainerType(ID);if(!com.ibm.pb.contextMenu.sharedActions.resizeWidgetDialog){dojo.require("com.ibm.mm.builder.widget.RuntimeResizeWidget");com.ibm.pb.contextMenu.sharedActions.resizeWidgetDialog=new com.ibm.mm.builder.widget.RuntimeResizeWidget({dlgPara:{title:_121,nodeWidth:"395px",containerBackgroundColor:"white",requestRefresh:true},skinId:ID,showHeight:_122!="row",showWidth:_122!="column"});}else{com.ibm.pb.contextMenu.sharedActions.resizeWidgetDialog.setTitle(_121);com.ibm.pb.contextMenu.sharedActions.resizeWidgetDialog.setupDialog(ID,_122!="column",_122!="row");}},confirmResizeWidget:function(ID,_123,_124,_125){if(com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getPageMode()=="view"){return false;}var _126=ID;var _127=_2c.getWidgetAccessor(_126).getWindowState()||com.ibm.mm.iwidget.Constants.windowstate.NORMAL;return _127==com.ibm.mm.iwidget.Constants.windowstate.NORMAL;},getContainerType:function(_128){var _129=_2a.findById(_128),_12a=_129.parentNode;while(!dojo.hasClass(_12a,"component-container")&&_12a.id!="layoutContainers"){_12a=_12a.parentNode;}if(dojo.hasClass(_12a,"ibmDndColumn")){return "column";}else{if(dojo.hasClass(_12a,"ibmDndRow")){return "row";}else{if(dojo.hasClass(_12a,"ibmDndFreeform")){return "freeform";}else{return null;}}}},confirmEditWiring:function(ID,_12b,_12c,_12d){if(_23.getCurrentPage().getPageMode()=="view"){return false;}var _12e=_2c.getLayoutModel(_23.getCurrentPage().getID()),_12f=_12e.getWireModel();return _12f.confirmCreate();},editWiring:function(ID,_130,_131,_132){var _133={nodeWidth:"486px",title:com.ibm.mm.builder.coreWidgetsStrings.I_WIRING_NAME||"Wiring",leftBarWidth:"18px",rightBarWidth:"12px",displayCloseButton:true,hasRightBottomResizer:false};var _134={widgetTypeId:"wireInterface",eventName:"com.ibm.mashups.builder.editWire",eventPayload:ID,dialogParam:_133,hasRightBottomResizer:false,requestRefresh:true};_24.broadcastEvent("com.ibm.mashups.builder.displayInMashupDialog",_134);if(typeof ibmc!=="undefined"){ibmc.publish("my.setDirtyPage",[true]);}_23.getCurrentPage().setDirty(true);},confirmChangeWidgetMode:function(ID,_135,_136,_137){var _138=_2c.getWidgetAccessor(ID).getWidgetMode()||com.ibm.mm.iwidget.Constants.mode.VIEW;if(_138==_136.mode){return false;}return _2c.confirmOperation(ID,_135,_136,_137);},changeWidgetMode:function(ID,_139,_13a,_13b){if(_13a.mode==com.ibm.mm.iwidget.Constants.mode.HELP){var _13c=com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getURLGenerator(),_13d=_28.getNavigationStateModel(),_13e=_2c.getWidgetAccessor(ID);_13e.setWidgetMode(com.ibm.mm.iwidget.Constants.mode.HELP);_13c.getURL(_13d,function(url){window.open(url,"","resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,width=800,height=600,screenX=10,screenY=10,top=10,left=10");_13d.discard();},{"newWindow":true,"themeTemplate":"Plain","soloState":{"portletWindowID":ID,"returnSelection":_23.getCurrentPage().getID()}});}else{var _13f=ID;_24.publishEvent(_13a.event,{id:_13f,newMode:_13a.mode});if(!ibmCfg.themeConfig.isPageRenderModeCSA&&_2c.getWidgetAccessor(_13f).getWidgetMode()!=_13a.mode){var _13d=_28.getNavigationStateModel();_2c.getWidgetAccessor(_13f).setWidgetMode(_13a.mode);_23.getCurrentPage().setID(_23.getCurrentPage().getID());_13d.commit().start();_2c.savePageChecker(function(){document.location.href=_20.model.state.UrlGeneratorFactory.getUrlGenerator().getUrl(_13d);});}}},getWidgetAccessor:function(id){var _140=_28.getNavigationStateModel(),_141=_29.getWidgetAccessor(_140,id);return _141;},confirmChangeWindowState:function(ID,_142,_143,_144){if(_2c.isPlainThemeTemplate()){return false;}var _145=_28.getNavigationStateModel();var _146=ID;var _147=_29.getWidgetAccessor(_145,_146);var _148=_147.getWindowState();if(!_148){_148=_147.NORMAL;}var _149=_2c.getHiddenContainerID();var _14a=_2a.findById(_149);if(_14a){var _14b=dojo.query(".id-"+ID,_14a);if(_14b.length>0){return false;}}if(_143.newWindowState==_147.NORMAL&&_148==_147.NORMAL){return false;}else{if(_143.newWindowState==_147.MIN&&_148==_147.MIN){return false;}else{if(_143.newWindowState==_147.MAX&&_148==_147.MAX){return false;}}}return true;},changeWindowState:function(ID,_14c,_14d,_14e){var _14f=_28.getNavigationStateModel();var _150=ID;var _151=_29.getWidgetAccessor(_14f,_150);if(ibmCfg.themeConfig.isPageRenderModeCSA){var _152=_151.getWindowState();if(!_152){_152=_151.NORMAL;}_24.publishEvent(_14d.event,{id:_150,controlId:ID,newWindowState:_14d.newWindowState,oldWindowState:_152});}else{var pid=_23.getCurrentPage().getID();_151.setWindowState(_14d.newWindowState);_23.getCurrentPage().setID(pid);_14f.commit().start();if(!_14d.noRefresh){_2c.savePageChecker(function(){top.location.href=_20.model.state.UrlGeneratorFactory.getUrlGenerator().getUrl(_14f);});}else{var _152=_151.MAX;_24.publishEvent(_14d.event,{id:_150,controlId:ID,newWindowState:_14d.newWindowState,oldWindowState:_152});}}},confirmDisplayControl:function(ID,_153,_154,_155){if(_23.getCurrentPage().getPageMode()=="view"){return false;}var _156=_2c.getHiddenContainerID();if(!_156){return false;}var _157=_2c.getLayoutModel(_23.getCurrentPage().getID()),_158=_157.find(ID).start();if(!_158){return false;}var _159=_157.getParent(_158).start();if(_159.getID()==_156){return true;}return false;},displayControl:function(ID,_15a,_15b,_15c){var _15d=_2c.getLayoutModel(_23.getCurrentPage().getID());var _15e=_15d.getRoot();var root=_15e.start();var iter=_15d.getChildren(root);var _15f=null;var _160=dojo.byId("layoutContainers");var _161=null;var _162=dojo.query(".component-container",_160);for(var i=0;i<_162.length;i++){if(dojo.hasClass(_162[i],"hiddenWidgetsContainer")==false){_15f=_162[i];break;}}while(iter.hasNext()){_161=iter.next();if(_15f==_2a.findById(_161.getID())){break;}}if(_161){var _163=_15d.find(ID).start();var _164=null;var iter=_15d.getChildren(_161);if(iter.hasNext()){_164=iter.next();}if(_164&&!(_164 instanceof com.ibm.mashups.enabler.layout.LayoutControl)){_164=null;}_15d.insert(_163,_161,_164);var _165=_2a.findById(_163.getID());if(_164){_15f.insertBefore(_165,_2a.findById(_164.getID()));}else{_15f.appendChild(_165);}if(typeof ibmc!=="undefined"){ibmc.publish("my.setDirtyPage",[true]);}_23.getCurrentPage().setDirty(true);_24.broadcastEvent("com.ibm.mashups.builder.widgetMoved",ID);if(com.ibm.pb.control.DNDController){com.ibm.pb.control.DNDController.getController().dndSources[_161.getID()].sync();}}},confirmHideControl:function(ID,_166,_167,_168){if(_23.getCurrentPage().getPageMode()=="view"){return false;}var _169=_2c.getHiddenContainerID();if(!_169){return false;}var _16a=_2c.getLayoutModel(_23.getCurrentPage().getID()),_16b=_16a.find(ID).start();if(!_16b){return false;}var _16c=_16a.getParent(_16b).start();if(_16c.getID()==_169){return false;}var _16d=_2c.getHiddenContainer();return _16a.confirmInsert(_16b,_16d);},hideControl:function(ID,_16e,_16f,_170){var _171=_2c.getLayoutModel(_23.getCurrentPage().getID()),_172=_2c.getHiddenContainer(),_173=_2a.findById(_172.getID()),_174=_171.find(ID).start(),_175=_2a.findById(_174.getID());_2c.changeWindowState(ID,_16e,{newWindowState:"normal",event:com.ibm.mashups.iwidget.Constants.CHANGE_WIDGETWINDOWSTATE,noRefresh:true},_170);_171.insert(_174,_172);_173.appendChild(_175);if(typeof ibmc!=="undefined"){ibmc.publish("my.setDirtyPage",[true]);}_23.getCurrentPage().setDirty(true);_24.broadcastEvent("com.ibm.mashups.builder.widgetMoved",ID);if(com.ibm.pb.control.DNDController){var dndS=com.ibm.pb.control.DNDController.getController().dndSources;if(dndS[_172.getID()]){dndS[_172.getID()].sync();}}},confirmDeleteControl:function(ID,_176,_177,_178){if(_23.getCurrentPage().getPageMode()=="view"){return false;}var _179=_2c.getLayoutModel(_23.getCurrentPage().getID()),_17a=_179.find(ID).start();if(!_17a){return false;}return _179.confirmRemove(_17a);},deleteControl:function(ID,_17b,_17c,_17d){var _17e=_2c.getLayoutModel(_23.getCurrentPage().getID()),_17f=_2a.findById(ID);var _180=_17e.find(ID).start();var wid=ID;_2c.changeWindowState(ID,_17b,{newWindowState:"normal",event:com.ibm.mashups.iwidget.Constants.CHANGE_WIDGETWINDOWSTATE,noRefresh:true},_17d);_17e.remove(_180);if(_17f){var _181=_17f.parentNode;_181.removeChild(_17f);if(dojo.hasClass(_181,"ibmFreeform")){var _182=690;dojo.query(".component-control",this.node).forEach(function(_183,_184,arr){var _185=dojo.style(_183,"top");var _186=dojo.style(_183,"height");var _187=_185+_186;if(_187>_182){_182=_187;}},this);var _188=dojo.style(_181,"height");var _189=_182+10;if(_188!=_189){dojo.style(_181,"height",_189+"px");var _18a=_2a.extractID(_181);var _18b=_17e.find(_18a).start();_18b.setMetaData("css-style","height:"+_189+"px;");}}}if(typeof ibmc!=="undefined"){ibmc.publish("my.setDirtyPage",[true]);}_23.getCurrentPage().setDirty(true);_24.broadcastEvent("com.ibm.mashups.builder.widgetDeleted",ID);_24.broadcastEvent(com.ibm.mashups.iwidget.Constants.UNLOAD_WIDGETS,[wid]);},widgetEditModeChecker:function(){var _18c=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _18d=_18c.getAllWidgets();var _18e=false;for(var i in _18d){if(Object.prototype.hasOwnProperty.call(_18d,i)){var mode=_18d[i].currentMode;if(mode&&mode!="view"){_18e=true;break;}}}if(_18e){var cws=com.ibm.mm.builder.coreWidgetsStrings;dojo["require"]("com.ibm.mm.builder.dialog.PageSaveConfirmDialog");var _18f=new com.ibm.mm.builder.dialog.PageSaveConfirmDialog({contentWarning:cws.I_PAGE_SAVE_WARNING3,contentQuestion:cws.I_PAGE_SAVE_SUGGEST2,btnSaveText:cws.I_COMMON_RETURN,btnCancelText:cws.I_COMMON_CANCEL,hideNotSave:true,savePageOnSave:false});_18f.show();}return _18e;},widgetEditModeClearer:function(){var _190=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _191=_190.getAllWidgets();for(var i in _191){if(Object.prototype.hasOwnProperty.call(_191,i)){var mode=_191[i].currentMode;if(mode&&mode!="view"){_191[i].currentMode="view";}}}},savePageChecker:function(_192,_193,_194){if(_23.getCurrentPage().isDirty()){ibmCfg.themeConfig.savePageCheckerUnloading=true;if(!_193){_193=_192;}var cws=com.ibm.mm.builder.coreWidgetsStrings;dojo["require"]("com.ibm.mm.builder.dialog.PageSaveConfirmDialog");var _195=new com.ibm.mm.builder.dialog.PageSaveConfirmDialog({contentWarning:cws.I_PAGE_SAVE_WARNING,contentQuestion:cws.I_PAGE_SAVE_SUGGEST,btnSaveText:cws.I_COMMON_SAVE,btnNotSaveText:cws.I_PAGE_SAVE_NO_SAVE,btnCancelText:cws.I_PAGE_SAVE_KEEP_EDIT,hideNotSave:true,callbackSave:function(){ibmCfg.themeConfig.savePageCheckerUnloading=false;if(_192){_192();}},callbackNotSave:function(){ibmCfg.themeConfig.savePageCheckerUnloading=false;if(_193){_193();}},callbackCancel:function(){ibmCfg.themeConfig.savePageCheckerUnloading=false;if(_194){_194();}}});_195.show();}else{if(_192){_192();}}},getContentId:function(_196){var _197=_25.find(_196).start();if(_197&&_197.getContent){var _198=_197.getContent().start();if(_198){_196=_198.getID();}}return _196;},getHiddenContainerID:function(){var dom=dojo.query(".hiddenWidgetsContainer",_2a.getRootNode());if(dom&&dom[0]){return _2a.extractID(dom[0]);}return null;},getHiddenContainer:function(){var _199=_2c.getLayoutModel(_23.getCurrentPage().getID()),root=_199.getRoot().start(),_19a=_199.getChildren(root);while(_19a.hasNext()){var _19b=_19a.next();if(_19b.getMetaData("com.ibm.portal.layoutnode.localname")=="ibmHiddenWidgets"){return _19b;}}return null;},getLayoutModel:function(_19c){return _25.getLayoutModel(_19c);},isPrivatePage:function(_19d){var _19e=_25.find(_19d).start(),xml=_19e.getXml(),expr="./atom:content/*/ac:allowed-access[@ac:private='true']";return com.ibm.mashups.enabler.xml.XPath.evaluateBoolean(expr,xml,{app:"http://www.w3.org/2007/app",atom:"http://www.w3.org/2005/Atom",ac:"http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0"});},isPageOwner:function(_19f){var _1a0=_2c.getLayoutModel(_19f),_1a1=_1a0.getRoot().start(),_1a2=com.ibm.mashups.enabler.ac.AccessControlModelFactory.getAccessControlModel(_1a1),_1a3=_1a2.getOwner();if(_1a3){var _1a4=com.ibm.mashups.enabler.user.Factory.getUserModel(),_1a5=_1a4.findCurrentUser().start();if(_1a3.getID()==_1a5.getID()){return true;}}return false;},isAuthenticated:function(){var _1a6=_20.user.Factory.getUserModel();return _1a6.getAnonymousMode()!=_20.user.AnonymousMode.ANONYMOUS;},isAnonymous:function(){return !_2c.isAuthenticated();},isPlainThemeTemplate:function(){if(ibmCfg&&ibmCfg.portalConfig&&ibmCfg.portalConfig.bootstrapState&&ibmCfg.portalConfig.bootstrapState.indexOf("<theme-template>Plain</theme-template>")>=0){return true;}else{return false;}},broadcastEventFromCurrentPage:function(_1a7,_1a8,_1a9,_1aa){return _2c.broadcastEvent.call(this,_23.getCurrentPage().getID(),_1a8,_1a9,_1aa);},broadcastEvent:function(_1ab,_1ac,_1ad,_1ae){var _1af=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");_1af.broadcastEvent(_1ad.event,{resourceId:_1ab,resourceType:_1ac,domNode:this});},openWidget:function(_1b0,_1b1,_1b2,_1b3){var _1b4=this;_22.onLoad(_1b2&&_1b2.widgetId,function(_1b5){if(_1b5&&_1b5.iScope){_1b5.iScope.open({resourceId:_1b0,resourceType:_1b1,domNode:_1b4});}});},loadURL:function(_1b6,_1b7,_1b8,_1b9){_2c.savePageChecker(function(){top.location.href=_1b8.url;});},refreshPage:function(){_2c.savePageChecker(function(){var url=_2c.createRefreshURL();dojo.cookie("DigestTracker",(new Date()).getTime(),{path:"/"});top.location.href=url;});},createRefreshURL:function(){var _1ba=_28.getNavigationStateModel();var _1bb=_20.model.state.UrlGeneratorFactory.getURLGenerator();return _1bb.getURL(_1ba,null,{"nohash":true});},createURL:function(_1bc,_1bd){var _1be=_28.getNavigationStateModel();var _1bf=_29.getSpaceAccessor(_1be);var _1c0=_29.getPageAccessor(_1be,_1bf.getSpaceID());_1c0.setPageID(_1bc);var _1c1=_20.model.state.UrlGeneratorFactory.getURLGenerator();return (_1c1.getURL(_1be,null,{})+"?"+dojo.objectToQuery(_1bd));},createURL:function(_1c2,_1c3,_1c4){var _1c5=_28.getNavigationStateModel();var _1c6=_29.getSpaceAccessor(_1c5);var _1c7=_29.getPageAccessor(_1c5,_1c6.getSpaceID()),_1c8,_1c9;_1c7.setPageID(_1c2);for(var id in _1c4){_1c9=_1c4[id];_1c8=_29.getWidgetAccessor(_1c5,id);if(_1c9.mode){_1c8.setWidgetMode(_1c9.mode);}if(_1c9.windowState){_1c8.setWindowState(_1c9.windowState);}for(var p in _1c9.parameters){_1c8.setWidgetState(p,_1c9.parameters[p]);}}var _1ca=_20.model.state.UrlGeneratorFactory.getURLGenerator();return (_1ca.getURL(_1c5,null,{})+"?"+dojo.objectToQuery(_1c3));},navigateToPageFromCurrent:function(_1cb,_1cc,_1cd,_1ce){return _2c.redirectToHiddenPage.call(this,_23.getCurrentPage().getID(),_1cc,_1cd,_1ce);},navigateToPage:function(){return _2c.redirectToHiddenPage.apply(this,arguments);},redirectToHiddenPage:function(_1cf,_1d0,_1d1,_1d2){var _1d3=_1cf,_1d4=_25.find(_1cf).start();if(_1d4.getContent){var _1d5=_1d4.getContent().start();_1d3=_1d5.getID();}var _1d6={navID:_1cf,contentID:_1d3};var _1d7=_2c.replaceMapVars(_1d6,_1d1.urlParams);var _1d8=_2c.replaceMapVars(_1d6,_1d1.widgetParams);var url=_2c.createURL(_1d1.targetPageID,_1d7,_1d8);_2c.savePageChecker(function(){if(_1d1&&_1d1.refreshCache){dojo.cookie("DigestTracker",(new Date()).getTime(),{path:"/"});}top.location.href=url;});},replaceMapVars:function(_1d9,_1da){var ret=_1da;if(dojo.isString(_1da)){ret=dojo.string.substitute(_1da,_1d9,function(_1db,key){if(_1db===undefined){if(key==="contentID"){return _2c.getContentId(_1d9.navID);}else{return "";}}else{return _1db;}});}else{if(dojo.isArray(_1da)){ret=[];for(var i=0;i<_1da.length;i++){ret.push(_2c.replaceMapVars(_1d9,_1da[i]));}}else{if(dojo.isObject(_1da)){ret={};for(var key in _1da){ret[key]=_2c.replaceMapVars(_1d9,_1da[key]);}}}}return ret;},confirmLogout:function(){if(com.ibm.pb.contextMenu.sharedActions.widgetEditModeChecker()){return;}if(_23.getCurrentPage().isDirty()){var cws=com.ibm.mm.builder.coreWidgetsStrings;dojo["require"]("com.ibm.mm.builder.dialog.PageSaveConfirmDialog");var _1dc=new com.ibm.mm.builder.dialog.PageSaveConfirmDialog({contentWarning:cws.I_PAGE_SAVE_WARNING,contentQuestion:cws.I_PAGE_SAVE_SUGGEST,btnSaveText:cws.I_COMMON_SAVE,btnNotSaveText:cws.I_PAGE_SAVE_NO_SAVE,btnCancelText:cws.I_PAGE_SAVE_KEEP_EDIT,hideNotSave:false,callbackSave:function(){var _1dd=_25.commit();_1dd.setFinishedCallback(function(){com.ibm.pb.contextMenu.sharedActions.logout();});_1dd.start();},callbackNotSave:function(){com.ibm.pb.contextMenu.sharedActions.logout();},callbackCancel:function(){}});_1dc.show();}else{com.ibm.pb.contextMenu.sharedActions.logout();}},logout:function(){com.ibm.pb.control.NavigationController.getController().setLastNonGlobalPage();com.ibm.pb.control.NavigationController.getController().clearLoginFlag();var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);location.pathname=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.LOGOUT_URL);}};com.ibm.pb.contextMenu.sharedActions=_2c;})();}if(!dojo._hasResource["com.ibm.pb.logging.Loggable"]){dojo._hasResource["com.ibm.pb.logging.Loggable"]=true;dojo.provide("com.ibm.pb.logging.Loggable");(function(){var _1de=com.ibm.mashups.enabler.logging.Logger;dojo.declare("com.ibm.pb.logging.Loggable",null,{LOGGER:null,constructor:function(){this.LOGGER=_1de.getLogger(this.declaredClass);}});})();}if(!dojo._hasResource["com.ibm.pb.data.ResourceLoader"]){dojo._hasResource["com.ibm.pb.data.ResourceLoader"]=true;dojo.provide("com.ibm.pb.data.ResourceLoader");dojo.require("com.ibm.mm.builder.DelegatedDeferredImpl");dojo.declare("com.ibm.pb.data.ResourceLoader",com.ibm.pb.logging.Loggable,{_cache:{},statusCodes:com.ibm.mm.enabler.model.HttpStatusCodes,constructor:function(){this._cache={};},getData:function(url,type){var _1df="getData",lgr=this.LOGGER,me=this;if(!this._cache[url]){this._cache[url]=new com.ibm.mm.builder.DelegatorDeferredImpl(this,function(_1e0,sync,_1e1){var _1e2=_1e0.getFinishedCallback(),_1e3=_1e0.getFinishedCallbackParameters();lgr.trace(_1df,"Start loading remote data");if(_1e0._data){lgr.trace(_1df,"Data already loaded ${0}",[_1e0._data]);if(_1e2){_1e2(_1e0._data,200,_1e3);}}else{dojo.xhrGet({url:url,load:function(data,_1e4){lgr.trace(_1df,"Received response from url ${0} with data ${1}",[url,data]);_1e0._hasFired=true;me._finishDeferred(_1e0,data,200);},error:function(err,_1e5){lgr.warning(_1df,"Error getting data from url ${0}: ${1}",[url,err]);if(!_1e0._hasFired){me._finishDeferred(_1e0,err,me.statusCodes.HTTP_NOT_FOUND);}},handleAs:type,sync:sync});}return _1e0._data;});}var dfd=new com.ibm.mm.builder.DelegatedDeferredImpl();this._cache[url].addDelegate(dfd);return dfd;},_finishDeferred:function(_1e6,data,_1e7){_1e6._data=data;var _1e8=_1e6.getFinishedCallback(),_1e9=_1e6.getFinishedCallbackParameters();if(_1e8){_1e8(data,_1e7,_1e9);}return data;}});com.ibm.pb.data.RESOURCE_LOADER=new com.ibm.pb.data.ResourceLoader();}if(!dojo._hasResource["com.ibm.pb.io.ResourceCache"]){dojo._hasResource["com.ibm.pb.io.ResourceCache"]=true;dojo.provide("com.ibm.pb.io.ResourceCache");dojo.declare("com.ibm.pb.io.ResourceCache",null,{_mpExp:/mashup:huffman/,PLUGIN_ID:"com.ibm.pb.io.ResourceCache",DYNRES:com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.io.DynamicResolver.SERVICE_NAME),constructor:function(){this._cacheKeys=[];this._cache={};},_matcher:function(url){url=url?url.toString():"";var exp=new RegExp(this._cacheKeys.join("|")),m;url=url.replace(/\/(?:\/)+/,"/");if(!url.match(this._mpExp)){return ((m=url.match(exp))?m[0]:false);}return false;},set:function(key,val){if(!key){return;}if(!this._cache[key]){if(this._cacheKeys.length===0){var me=this;this.DYNRES.register(this.PLUGIN_ID,function(url){return me._matcher(url);},function(url,_1ea){return me.get(_1ea);});}this._cacheKeys.push(key);}if(!val){for(var i=0;i<this._cacheKeys.length;i++){if(this._cacheKeys[i]===key){this._cacheKeys.splice(i,1);break;}}if(this._cacheKeys.length===0){this.DYNRES.unregister(this.PLUGIN_ID);}}this._cache[key]=val;},get:function(key){return this._cache[key];}});com.ibm.pb.io.RESOURCE_CACHE=new com.ibm.pb.io.ResourceCache();}if(!dojo._hasResource["com.ibm.pb.iwidget.iWidgetBase"]){dojo._hasResource["com.ibm.pb.iwidget.iWidgetBase"]=true;dojo.provide("com.ibm.pb.iwidget.iWidgetBase");dojo.declare("com.ibm.pb.iwidget.iWidgetBase",com.ibm.pb.logging.Loggable,{builderFactory:com.ibm.mashups.builder.model.Factory,builderEvents:com.ibm.mashups.builder.iEvents,iWidgetConstants:com.ibm.mashups.iwidget.Constants,configConstants:com.ibm.mashups.enabler.services.ConfigConstants,serviceManager:com.ibm.mashups.services.ServiceManager,roleTypes:com.ibm.mashups.enabler.ac.RoleType,constructor:function(){this.runtimeModel=this.builderFactory.getRuntimeModel();this.evtSvc=this.serviceManager.getService(com.ibm.mashups.iwidget.services.EventService.SERVICE_NAME);this.configSvc=this.serviceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);},getItemSetValues:function(_1eb){var _1ec=this.iContext.getiWidgetAttributes();var map={};for(var i=0;i<_1eb.length;i++){var val=_1ec.getItemValue(_1eb[i]);if(val!==null&&val!==undefined){map[_1eb[i]]=val;}}return map;},convertMapTypes:function(map,keys,type){var cnv=null;switch(type){case "Number":cnv=function(key){map[key]=parseInt(map[key],10);};break;case "Boolean":cnv=function(key){map[key]=(map[key]==="true"||map[key]===true)?true:false;};break;case "Object":cnv=function(key){if(dojo.isString(map[key])){map[key]=dojo.eval(map[key]);}};break;default:cnv=function(key){};}dojo.forEach(keys,function(key){if(map[key]!==undefined){cnv(key);}},this);}});}if(!dojo._hasResource["com.ibm.pb.localized.DojoLocalized"]){dojo._hasResource["com.ibm.pb.localized.DojoLocalized"]=true;dojo.provide("com.ibm.pb.localized.DojoLocalized");dojo.require("dojo.i18n");dojo.declare("com.ibm.pb.localized.DojoLocalized",[com.ibm.mashups.enabler.Localized,com.ibm.pb.logging.Loggable],{bundlePackage:"",bundleName:"",bundleKey:"",constructor:function(_1ed){this.bundlePackage=_1ed.bundlePackage;this.bundleName=_1ed.bundleName;this.bundleKey=_1ed.bundleKey;this._locales=[dojo.locale];var _1ee=dojo.config&&dojo.config.extraLocale;if(_1ee){this._locales.push.apply(this._locales,_1ee);}dojo["require"+"Localization"](this.bundlePackage,this.bundleName);},_getBundle:function(_1ef){var _1f0="_getBundle",ret={};try{ret=dojo.i18n.getLocalization(this.bundlePackage,this.bundleName,_1ef);this.LOGGER.trace(_1f0,"Found bundle for locale ${0}",[_1ef]);}catch(err){this.LOGGER.warning("_getBundle","Bundle not found for locale ${0}",[_1ef]);}return ret;},getLocales:function(){var _1f1="getLocales";this.LOGGER.entering(_1f1,[]);if(!this._locales.filtered){this.LOGGER.trace(_1f1,"Filtering locales",[]);this._locales=dojo.filter(this._locales,function(_1f2){var _1f3=this._getBundle(_1f2);var ret=_1f3[this.bundleKey]||_1f3[this.bundleKey+"_title"]||_1f3[this.bundleKey+"_description"];this.LOGGER.trace(_1f1,"Does title or description exist for locale ${0}? ${1}",[_1f2,ret]);return ret;},this);this._locales.filtered=true;}this.LOGGER.exiting(_1f1,[this._locales]);return this._locales;},getTitle:function(_1f4){var _1f5="getTitle";this.LOGGER.entering(_1f5,[_1f4]);var _1f6=this._getBundle(_1f4);var ret=_1f6[this.bundleKey+"_title"]||_1f6[this.bundleKey];this.LOGGER.exiting(_1f5,[_1f4]);return ret;},getDescription:function(_1f7){var _1f8="getDescription";this.LOGGER.entering(_1f8,[_1f7]);var ret=this._getBundle(_1f7)[this.bundleKey+"_description"];this.LOGGER.exiting(_1f8,[_1f7]);return ret;}});} (function(){ var _1=ibmCfg.themeConfig.themeRootURI,_2=ibmCfg.enablerConfig["com.ibm.mashups.contextroot.builder"]; dojo.registerModulePath("wptheme.menuDefinitions",_1+"/menuDefinitions"); dojo.registerModulePath("com.ibm.themes.PageBuilder2.menuDefinitions",_1+"/menuDefinitions"); dojo.registerModulePath("com.ibm.skins",_1+"/skins"); dojo.registerModulePath("com.ibm.common-resources",ibmCfg.themeConfig.commonResourcesRootURI); })(); dojo.provide("pagebuilder.nls.pb_ui_layer_en");dojo.provide("com.ibm.bundles.nls.Shelf");com.ibm.bundles.nls.Shelf._built=true;dojo.provide("com.ibm.bundles.nls.Shelf.en");com.ibm.bundles.nls.Shelf.en={"mashups_hub_gadgets_label":"Gadgets","change_style_light":"Light","change_layout_restoreLayout":"Restore previous layout","add_content_data_viewer":"Data Viewer","add_content_legacyError2":"Content cannot be added to pages with legacy layouts. Assign a layout template before continuing.","menu_unselected_text":"press enter to browse this category","utb_style":"Style","shelf_session_timeout":"Your session has timed out. Log in to continue.","change_layout_label":"Layouts","add_content_cancel":"Cancel","utb_projectmenu_manageprojectdesc":"Manage the selected project","change_style_light_blue":"Light Blue","utb_live_edit":"Live Edit Mode","change_style_greyStyle":"Grey Stripes","utb_save_errors":"There were errors saving the page","change_style_lightGreyStyle":"Light Grey","change_layout_2RowDesc":"This layout has two rows stacking the portlets in a grid.","utb_projectmenu_nofavoriteprojects":"No favorite projects available","utb_overview_more_mappings":"[${0} more]","change_layout_col3CenterDesc":"This layout has two side bars with the main content between them.","change_style_black":"Black","mashup_hub_category_label":"Mashups","change_style_lightGreenStyle":"Light Green","utb_cannot_submit_page_desc":"The page cannot be submitted because the service to do so was not available in the page feed contents.","new_categoryLabel":"New","add_content_launchLabel2":"Content","add_content_feedReader":"Feed Reader","utb_projectmenu_editmode":"Edit","utb_analytics":"Analytics","utb_layout_noChange":"The layout cannot be changed when an item is maximized","add_content_launchLabel":"Add Content","utb_project_mode_desc":"Content changes are added into this project","shelf_saving":"Your changes are being saved...","utb_default_project_template":"Default project template","utb_projectmenu_approveprojectdesc":"Approve the selected project","new_wcm_addWiki":"Add wiki to page","new_wcm_wcmNotCopied":"A WCM library is not finished being copied.","add_content_legacyError":"Content cannot be added to pages with legacy layouts. Assign a layout, and save your changes to use this feature.","shelf_badDatastoreError":"${0} cannot be loaded because the datastore for this content source is undefined.","add_content_close":"close","shelf_bundleUndefined":"The resource bundle ${0} could not be found","utb_projectmenu_approve_with_comments_headline":"Approve Project:","utb_projectmenu_allprojects":"All Projects","shelf_submitSearch":"submit search","change_style_blueStyle":"Blue Lights","utb_projectmenu_projectactionsdesc":"Actions that can be applied to the selected project","utb_projectmenu_editmodepublishedsitedesc":"Launch the published site in edit mode","utb_projectmenu_withdrawprojects":"Withdraw from Review","utb_overview_community":"Community:","change_style_mojo":"Mojo","menu_selected_text":"currently selected category","shelf_saveAndExit":"Save & Exit","change_layout_col3Center":"3 column center","add_content_rss":"RSS","utb_no_edit_page_permission":"You don't have permission to edit this page.","change_layout_col2Left":"2 column left","add_content_widgetActions":"Component options","change_style_gold":"Gold","add_content_feedspace":"Feedspace","utb_projectmenu_submitproject":"Submit for Review","utb_projectmenu_publishedsite":"Published Site","shelf_closeDialog":"Close dialog","change_layout_maximizedError2":"The layout cannot be changed while there is an item maximized.","change_style_launchLabel":"Change Style","new_feed_enterUrl":"Specify a valid URL.","utb_preview":"Preview","add_content_restrictedContentError":"${0} is not allowed on this page","add_content_chart":"Chart","utb_overview_link_manage":"Manage","change_layout_launchLabel":"Change Layout","utb_projectmenu_viewmodepublishedsitedesc":"Launch the published site in view mode","new_generic_add":"Add ${0} to page","utb_create_new_project":"Create a new project:","utb_overview_no_items":"No items to display.","utb_approve":"Approve","new_wcm_wcmNameTaken":"This name is already being used. Try a different name.","change_layout_templateSyncError":"Error with layout template sync.","shelf_socialCategory":"Social Content","new_wcm_blogLibraryDescription":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","shelf_searchSocial":"Search Social","utb_project_action_failed":"Cannot execute project action","utb_project_mode":"Project Edit:","add_content_addToPage":"Add to page","add_content_add":"Add","shelf_unspecified":"Unspecified","add_content_untitled":"Untitled","add_content_tags":"tags: ${0}","change_style_defaultStyle":"Default","change_layout_col2Right":"2 column right","utb_overview_workflow_stage":"Workflow Stage:","change_style_twilight":"Twilight","shelf_feedError":"${0} cannot be loaded. Check the internet connection and proxy settings.","utb_approve_project":"Approve Project","add_content_desc":"Object Palette - Drag and Drop Portlets, Widgets, and Content to the page","utb_projectmenu_reject_with_comments":"Project Rejection","utb_overview_name":"Name:","mashup_hub_components_label":"Components","utb_cannot_reject_page":"Cannot reject the page.","utb_result_error":"Error loading item","category_web_content":"Web Content","utb_projectmenu_allprojectsdesc":"Select from all projects","change_layout_1Row2ColDesc":"This layout has two rows. The second row contains two unequal columns.","utb_public_page":"Public Page","utb_projectmenu_norecentprojects":"No recent projects available","add_content_notLoaded":"This item has not yet loaded.","add_content_ok":"OK","shelf_searchToolsCategory":"Search Tools","utb_save_draft":"Save Draft","change_style_carbon":"Carbon","shelf_searchAll":"Search All","utb_content":"Content","change_style_orangeStyle":"Orange","utb_save_changes":"Save changes","detail_dialog_instruction_text":"press enter to see details dialog","utb_projectmenu_approvalcomments_required":"Required","utb_projectmenu_favoriteprojects":"Favorite Projects:","utb_undo":"Undo","shelf_menu":"Menu","shelf_searchNew":"Search New","new_wcm_blogLibraryDesc":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","add_content_maximizedError2":"Content cannot be added to the page while there is an item maximized.","change_style_launchLabel2":"Style","utb_manage_project":"Manage Project","utb_reject_project":"Reject Project","utb_no":"No","utb_layout_noChange_desc":"Please minimize or restore the maximized content before proceeding to change the layout of the page.","utb_projectmenu_viewmodedesc":"Launch the project in view mode","change_layout_col2Equal":"2 column equal","shelf_configError":"Error reading configuration file or processing its content.","utb_nm_error":"Cannot save the navigation model","change_layout_save_warning":"The layout is not applied until you save the page.","change_style_pinkStyle":"Pink","utb_page_rejected":"The page has been rejected.","add_content_nested_data_viewer":"Nested Data Viewer","change_style_contemporary":"Contemporary","utb_projectmenu_manageproject":"Manage","utb_show_min_toolbar":"Show minimized toolbar","change_style_dark":"Dark","utb_projectmenu_loading":"Loading projects...","utb_projectmenu_approveproject":"Approve","change_layout_custom":"Custom Layout","shelf_jumpTo":"Jump to page","new_feed_enterTitle":"Specify a title.","change_layout_1Row3Col":"1 grid 3 column equal","utb_edit_page_condition":"To edit this page, you must","utb_content_noAdd2":"Content cannot be added to legacy pages","add_content_details":"Details","shelf_searchFeeds":"Search Feeds","new_wcm_addBlog":"Add blog to page","add_content_selectRenderer":"Select how to display the content","utb_page_not_in_draft_state":"You cannot edit this page because the page is no longer in a draft state.","utb_toggle_toolbar":"toggle the toolbar","utb_projectmenu_newproject":"New Project","utb_more":"More","utb_revert":"Revert","utb_project_action_success":"Your action was successfully executed.","utb_workflow":"Workflow","add_content_noPreviewSaved1":"To display this item,","change_style_desc":"Style Palette - Click a style to apply it to the page","add_content_noPreviewSaved2":"save","add_content_noPreviewSaved3":"the page.","utb_save_message":"There are unsaved changes on this page. What do you want to do?","utb_open_project_menu":"launch the project menu","new_blog_copyWcmLibrary":"Your blog is being created...","utb_overview_web_content":"Web Content:","utb_must_be_in_project":"To edit this page, you must be in a project.","mashup_hub_iwidgets_label":"Widgets","utb_end_preview":"Stop Previewing","utb_next_stage":"Next Stage","change_layout_col2RightDesc":"This layout has one side bar on the left with the main content on the right.","add_content_maximizedError":"Content cannot be added to the page while there is a portlet in maximized mode.","utb_customizing_your_page":"You are customizing your page. Changes are only visible to you.","new_wcm_wiki":"Wiki","utb_preview_as_unauthenticated_user":"Preview as unauthenticated user","utb_overview_text_tomorrow":"Tomorrow","add_content_missingRendererError":"Could not find the specified renderer.","change_layout_TopCol3ColDesc":"This layout has two stacked columns. The bottom column contains three unequal columns.","utb_overview_link_view_all":"View all","utb_projectmenu_withdrawprojectdesc":"Withdraw the selected project from review","no_web_content_mapping_desc":"The current page does not have a page content mapping. Please edit the page properties and set a default content mapping.","shelf_hideHiddenContainers":"Hide content","add_content_portlets":"Portlets","change_style_brown":"Brown","shelf_bundleKeyUndefined":"The key ${0} was undefined in the resource bundle ${1}","utb_overview_edit_title":"Edit \"${0}\"","add_content_closeDialog":"Close this dialog","change_layout_maximizedError":"The layout cannot be changed while there is a portlet in maximized mode.","change_layout_col3Equal":"3 column equal","add_content_feed_reader":"Feed Reader","new_wcm_createWcm":"Create WCM Library","utb_open_toolbar":"Open the toolbar","shelf_searchAdminCategory":"Search Administration","utb_discard_project":"Discard Project Draft","utb_projectmenu_noprojectsavailable":"None","shelf_previous":"Previous","new_wcm_feedDescription":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","utb_preview_as_user":"Preview as User","shelf_loading":"Loading...","shelf_page":"Page ${0} of ${1}","utb_project_add_to_favorites":"Add to favorites","change_layout_1Row2Col":"1 grid 2 column unequal","new_feed_title":"Title","change_layout_col2EqualDesc":"This layout has two columns each taking up 50% of the width.","utb_workflow_state_draft":"Draft","new_feed_addFeed":"Add feed to page","change_layout_customDesc":"This layout is a customized T-shaped layout.","utb_new_project_from_template":"New project from:","utb_workflow_state_pending_publish":"Pending publish","utb_edit":"edit","change_layout_desc":"Layout Palette - Click a layout and apply it by saving the page","utb_projectmenu_editmodedesc":"Launch the project in edit mode","change_layout_templateSyncConfirm":"Are you sure you want to sync the layout for this page? All personalizations will be lost.","new_feed_url":"URL","shelf_searchCollabCategory":"Search Collaboration","utb_publish":"Publish","shelf_search":"Search ${0}","change_layout_2Row":"2 grid","change_style_green":"Green","shelf_next":"Next","utb_customizing_this_page":"You are customizing this page. Changes are only visible to you.","utb_yes":"Yes","no_web_content_mapping":"Web Content cannot be added to the page","utb_submit_page_review":"Submit Page for Review","utb_launch_selector":"launch project selector","utb_end_results":"No more results","change_style_blue":"Blue","add_content_all":"All","shelf_communicationsCategory":"Communications","add_content_noPreview":"This item does not support preview","utb_live_edit_desc":"These changes affect everybody","utb_cannot_create_draft":"Cannot create a draft version of the page.","utb_discard_changes":"Discard changes","utb_partClose_toolbar":"Close the statusbar","utb_submit_project":"Submit Project for Review","change_layout_templateSyncLong":"Update the layout of this page by syncing with the template from which it was based. Note that personalizations made to this page will be lost.","utb_projectmenu_projectactions":"Project Actions","utb_projectmenu_projects":"Projects:","shelf_searchWidgets":"Search Widgets","utb_cannot_load_page":"An unexpected error occurred loading the page. The page may be corrupted. Contact your administrator to attempt a resynchronization.","shelf_toolsCategory":"Tools","new_wcm_blogDesc":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_projectment_no_comment_provided":"This project requires a comment.","shelf_saveChanges":"Save","utb_close_toolbar":"Close the toolbar","utb_projectmenu_rejectproject":"Reject","change_layout_templateSync":"Sync assigned layout","utb_cannot_publish_page":"Cannot publish the page for review","shelf_close":"close shelf","utb_layout_noChange2":"The layout cannot be changed on legacy pages","add_content_label":"Content","change_style_greenStyle":"Green Waves","new_wcm_createGeneric":"Create ${0}","utb_overview_loading_content":"Loading content...","new_blog_library_copyWcmLibrary":"Your blog library is being created...","change_style_metal":"Metal","utb_projectmenu_rejectcomments":"Rejection Comments","add_content_noPreviewSaved":"To display this item, save the page.","new_createCategory":"Create","utb_information_message":"Information","shelf_serverError":"Internal server error.","utb_min_toolbar":"Minimize the toolbar","utb_wm_error":"Cannot save the widget model","utb_projectmenu_recentprojects":"Recent Projects:","utb_projectmenu_reject_with_comments_headline":"Reject Project:","new_wcm_blog":"Blog","utb_overview_text_yesterday":"Yesterday","utb_project":"Project","new_portalCategory":"Portal","utb_reject":"Reject","utb_page_actions":"Page Actions","new_portletsCategoryLabel":"Portlets","utb_overview_dots":"...","utb_create_draft":"create a draft","shelf_all":"All","add_content_browseContent":"Browse Content","change_layout_TopCol3Col":"Top column 3 column center","menu_back":"back","generic_browse":"Browse ${0}","new_wcm_addBlogLibrary":"Add blog library to page","utb_show_hidden":"Show Hidden Content","utb_hide_hidden":"Hide Hidden Content","change_style_missingStyleError":"The specified style does not exist","shelf_untitled":"Untitled","shelf_searchPortlets":"Search Portlets","change_style_silver":"Silver","utb_page_submit_wait":"Please wait while your page is being submitted...","utb_cannot_submit_page":"Cannot submit the page for review","shelf_showHiddenContainers":"Show hidden content","utb_partOpen_toolbar":"Open the statusbar","selection_instructions":"press enter to select","new_wcm_wikiDescription":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_layout":"Layout","add_content_rating":"rating: ${0}","change_style_visionary":"Visionary","new_wcm_blogLibrary":"Blog Library","change_style_red":"Red","new_wiki_copyWcmLibrary":"Your wiki is being created...","project_expired":"The current project is no longer available. Click OK to be redirected.","utb_wcm_auth":"Web Content Authoring","add_content_lastMod":"Last modified: ${0}","change_style_browseStyles":"Browse Styles","utb_overview_project_content":"Project Content","shelf_searchCommunications":"Search Communications","utb_close_project_menu":"close the project menu","add_content_addContentError":"Error adding content to the page.","utb_overview_link_read":"Read","change_style_natural":"Natural","change_style_modern":"Modern","add_content_noRating":"no rating","utb_projectmenu_rejectprojectdesc":"Reject the selected project","utb_project_action_wait":"Please wait while your action is being executed...","shelf_noResults":"No results","shelf_searchGadgets":"Search Gadgets","change_layout_TopCol2ColDesc":"This layout has two stacked columns. The bottom column contains two unequal columns.","utb_projectmenu_approve_with_comments":"Project Approval","utb_projectmenu_approvalcomments_optional":"Optional","utb_toggle_statusbar":"toggle the status bar","utb_projectmenu_noprojects":"No projects available","change_style_orchid":"Orchid","shelf_adminCategory":"Administration","mashup_hub_feeds_label":"Feeds","change_style_restoreStyle":"Restore previous style","new_wcm_nameInvalid":"Name must contain at least one alphanumeric (a-zA-Z0-9) character. Try a different name.","utb_last_project":"Open last project:","shelf_unsavedChanges":"The customization shelf has unsaved changes.","change_style_label":"Styles","add_content_addSearch":"Add search results to page","utb_submit_review":"Submit for Review","new_wcm_blogDescription":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_project_add_to_favorites_desc":"Add the new project to the list of favorite projects","change_layout_launchLabel2":"Layout","utb_overview_link_goto":"Go to","utb_projectmenu_approvalcomments":"Approval Comments","change_layout_browseLayouts":"Browse Layouts","change_style_white":"White","change_style_purpleStyle":"Purple","new_creatableCategory":"Creatable","utb_overview_none":"None","utb_overview":"Overview","utb_projectmenu_publishproject":"Publish","utb_workflow_state_published":"Published","utb_end_preview_as":"Stop Previewing as","utb_projectmenu_projectactionsfor":"Actions for","utb_project_publish_failed":"Project failed to publish. Open the manage project view for more details.","utb_private_page":"Private Page","change_layout_col1Desc":"This layout has one column taking up 100% of the available space.","new_wcm_feed":"Feed","change_layout_TopCol2Col":"Top column 2 column unequal","new_feed_feedDesc":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","change_layout_col1":"1 column","shelf_searchCreate":"Search Create","new_wcm_wikiDesc":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_cannot_approve_page":"Cannot approve the page.","utb_projectmenu_viewmode":"View","utb_create_draft_wait":"Please wait while your draft version of the page is being created.","change_style_yellow":"Yellow","utb_overview_text_today":"Today","create":"Create","utb_projectmenu_newprojectdesc":"Create a new project","utb_page_approved":"The page has been approved.","utb_projectmenu_publishprojectdesc":"Publish the selected project","change_layout_col2LeftDesc":"This layout has one side bar on the right with the main content on the left.","utb_content_noAdd_desc":"Please minimize or restore the maximized content before proceeding to add more items to the page.","utb_proceed_discard":"This will reverse all changes made since you last saved. Proceed?","new_wcm_name":"Name","shelf_customize":"Customize","change_style_slate":"Slate","utb_overview_friendly_name":"Friendly Url:","change_layout_1Row3ColDesc":"This layout has two rows. The second row contains three equal columns.","utb_content_noAdd":"Content cannot be added when an item is maximized","shelf_collabCategory":"Collaboration","utb_information":"information","utb_project_create_wait":"Please wait while your project is being created...","utb_overview_page_properties":"Page Properties","utb_unsaved_changes_prompt":"There are unsaved changes on this page. Click OK to save your changes. Click Cancel to discard your changes.","new_wcm_wcmNameInvalid":"Names may contain only alphanumeric (a-zA-Z0-9) characters, spaces, or any of the following characters: \" $ - _ . ! ( ) ,.","utb_overview_link_edit":"Edit","shelf_hiddenContainers":"Hidden Content","utb_more_actions":"More Actions","utb_projectmenu_submitprojectdesc":"Submit the selected project for review","add_content_submit":"Submit","change_layout_col3EqualDesc":"This layout has three columns each taking up 33% of the width."};dojo.provide("com.ibm.bundles.nls.PageCreatorDialog");com.ibm.bundles.nls.PageCreatorDialog._built=true;dojo.provide("com.ibm.bundles.nls.PageCreatorDialog.en");com.ibm.bundles.nls.PageCreatorDialog.en={"wcm_content_scope_label":"Content Scope:","page_dialog_go":"Go","hide_details":"Hide Details","resource_selector_search_resources":"Search Resources","template_dialog_sort_by":"Sort by:","page_dialog_fewer_options":"Fewer Options","template_dialog_table_summary":"Table to display all the available content templates used for page creation","cancel":"Cancel","remember_defaults":"Remember as Default Selection","display_details":"Display details view","page_dialog_page_name":"Page Name:","link_internal":"Link to Portal Page","aggregation_mode":"Aggregation Rendering Mode","page_dialog_more_options":"More Options","page_dialog_share_desc":"Share it with others.","public_tags":"Public tags","wcm_use_page_acl":"Use the access control settings of this page for Web Content","project_dialog_author":"Author:","page_dialog_no_templates_found":"No page templates found.","select":"Select","search_templates_label":"Search Templates:","all":"All","all_templates":"All Templates","page_dialog_page_type":"Page type:","page_dialog_properties_desc":"Edit properties for more advanced properties.","page_dialog_display_actions_option":"Do not show this again","created_by":"Created by ${0}","sort_by":"Sort by:","page_dialog_default":"Default","page_dialog_make_private":"Make this my private page","done":"Done","page_dialog_error_creating_page":"Error creating page.","wcm_site_section_label":"Site Section:","display_summary":"Display summary view","template_dialog_click_to_sort":"Click to sort","page_dialog_customize_page":"Customize Page","tags":"Tags:","page_dialog_friendly_url_modified_warning":"The friendly URL name value has been modified to remove characters that are not allowed.","page_dialog_create_link":"Create Link","page":"Page","resource_selector_no_resources":"No resources have been successfully loaded.","resource_selector_updated_by":"Last updated by","page_dialog_view_properties_now":"View properties now","next":"Next","template_select":"Select Template","template_dialog_search_templates":"Search Templates:","page_template":"Page From Template","page_dialog_no_template":"No template","project_dialog_no_projects":"No projects exist.","show_details":"Show Details","default_text":"Default","aggregation_mode_csa":"Client-Side Aggregation Rendering","page_dialog_friendly_url_required_error":"A friendly URL name is required when using the selected page template.","page_blank":"Blank Page","template_dialog_no_owner":"No owner","template_dialog_click_to_select":"Click to select","page_dialog_link_name":"Link Name:","most_recommendations":"Most Recommendations","jump_to_page_of":"Jump to page ${0} of ${1}","page_dialog_find_template":"Find a template:","page_dialog_close":"Close","page_dialog_select_template":"Select a template","page_dialog_page_template":"Page Template:","select_page_label":"Select page:","page_dialog_type_template":"Choose a template","page_dialog_link_type":"Link Name:","page_dialog_type_blank":"Blank","link_external":"Link to URL","project_dialog_search_projects":"Find project","display_label":"Display:","page_dialog_share_now":"Share now","page_dialog_change":"Change","project_dialog_table_summary":"A table of projects the user can select","page_dialog_customize_desc":"Add content, or change the style and layout.","page_dialog_share_page":"Share Page","page_dialog_blank_page_intro":"Your page is blank. You can:","wcm_create_wcm_page":"Create a Web Content Page","recent_templates":"Recent Templates","url":"URL:","search":"Search","list":"list","create_new_label":"Create New:","template_dialog_title":"Select a Template","template_dialog_search_no_matches":"No matches for the value entered.","page_dialog_page_being_created":"Your page is being created...","resource_selector_table_summary":"Table to display the portal resources that can be selected","page_upload":"Upload Page","create":"Create","title":"Title","resource_select_dialog_select":"Select","template_label":"Template:","page_dialog_create_page":"Create Page","cloud":"cloud","page_dialog_label_name":"Label Name:","project_dialog_title":"Select a project","label":"Label","page_dialog_create_label":"Create Label","resource_select_dialog_title":"Select a Resource","link":"Link","templates":"Templates","page_dialog_friendly_url_name":"Friendly URL Name:","show_label":"Show:","previous":"Previous","template_dialog_owned_by":"Owned by","page_dialog_edit_page_properties":"Edit Page Properties","page_dialog_customize_now":"Customize now","project_dialog_no_author":"No author","page_dialog_page_template_label":"The new page will be based on the following page template:","view_as":"View as","used_in_section_templates":"Templates used by Pages in this section","aggregation_mode_ssa":"Server-Side Aggregation Rendering"};dojo.provide("com.ibm.bundles.nls.NavWidget");com.ibm.bundles.nls.NavWidget._built=true;dojo.provide("com.ibm.bundles.nls.NavWidget.en");com.ibm.bundles.nls.NavWidget.en={"breadcrumb_new_page_label":"New Page","breadcrumb_intro":"You are in:","nav_new_page_nested_label":"Create a New Page","nav_invalid_drop_msg":"Make sure you have sufficient permissions to rearrange pages.","nav_new_page_label":"New Page","nav_renderingError":"An error occurred when rendering the navigation.","nav_new_page_title":"Page Title","nav_new_page_default_value":"Untitled","nav_invalid_drop_error":"This move operation is not allowed.","nav_new_page_empty_nested_label":"Create a child page","nav_new_page_invalid_message":"Title cannot be blank","nav_new_tab_label":"New Tab","nav_createPageError":"An error occurred creating the page.","nav_new_page_prompt_message":"Title cannot be blank"};dojo.provide("com.ibm.bundles.nls.Theme");com.ibm.bundles.nls.Theme._built=true;dojo.provide("com.ibm.bundles.nls.Theme.en");com.ibm.bundles.nls.Theme.en={"theme_choose_skin":"Choose Skin","page_goTo_csa":"Switch to Client-Side Mode","theme_hiddenContentDesc":"Place content into the area below to prevent it from displaying when the page is viewed.","space_description":"Space","edit_wires_title":"Edit Wires","page_force_ssa_link":"Use server side mode.","exportSpace_title":"Export Space","layout_renderingError":"An error occurred rendering the assigned layout.","tagAndRate_description":"Tagging and Rating","site_promotion_title":"Site Promotions...","rate_title":"Rate...","theme_edit_wiring":"Edit Wiring...","theme_maximize":"Maximize","close_analytics_title":"Close Analytics Reports","theme_go_to_edit":"Go to Edit mode","dnd_not_instantiated":"Drag and drop could not be instantiated","theme_config_control":"Configure...","skin_show_titlebar":"Show title bar","catalog_title":"Catalog","theme_wire_widget":"Wire Widget","dnd_disabled":"Drag and drop is disabled","createFeed_title":"Create New Feed...","statusbar_messages_available":"${0} messages are available for review","page_title":"Page","move_left":"Move Left","layout_error_contactAdmin":"If the problem persists, contact your administrator.","page_analytics_reports_description":"Analytics Reports for Pages","embedPage_description":"Display on a Web Page","browseTags_description":"Browse Tags","close_analytics_description":"Close Analytics Reports","theme_actions_menu":"Actions Button","theme_close_shelf_help":"Button will close customize shelf","createSpace_title":"Create a New Space","editPageLayout_description":"Edit Page Layout","theme_sign_up":"Sign Up","page_goTo_ssa":"Switch to Server-Side Mode","theme_restore":"Restore","statusbar_items_available":"${0} items are available for review","other_description":"Other","theme_move":"Move...","layout_missingError":"The assigned layout does not exist.","statusbar_show_details":"Show Details","analytics_description":"Analytics","a11y_skip_portlet":"Skip to next portlet","dnd_copy_failed":"An error occurred copying the resource.","layout_resizer":"Layout Resizer","theme_move_page":"Move Page","dnd_locked_container":"Cannot move a resource to a locked container.","advanced_description":"Advanced","shareSpace_title":"Share Space","statusbar_warning":"Warning","context_portlet_menu_renderingError":"An error occurred rendering the portlet menu.","editPage_description":"Edit Page","exportSpace_description":"Export Space","removePage_title":"Remove Page","theme_remove_page":"Are you sure you want to remove this page and all of its children?","move_down":"Move Down","viewSource_title":"View Source","create_child_page_link":"Click here to create a child page.","layout_error_explanation":"This could be a result of an error during the page creation process, manual changes made to the page layout, or the actions of an Administrator.","theme_global_page_closing_non_active":"You are trying to close a global page that is not currently open.","theme_hide_portlet":"Hide Portlet","publishPage_description":"Publish Page","sharePage_title":"Share Page...","theme_more_pages":"More Pages","theme_display_shelf_help":"Button will display customize shelf below","theme_refresh_page":"Refresh Page","io_insufficient_permissionsError":"There are insufficient permissions to perform the requested operation.","editPageLayout_title":"Edit Page Layout","a11y_skip_widget":"Skip to next widget","move_up":"Move Up","theme_add_pages_shared":"Add Pages Shared with Me","theme_help":"Help","deleteSpace_title":"Delete Space","theme_complementary_content":"Complementary Content","theme_login":"Log In","theme_global_page_active":"The global page is currently active. Close the global page before continuing.","theme_hiddenControl":"hidden","removeFromFav_title":"Remove form Favorites","page_description":"Page","theme_additional_actions":"Additional Actions","theme_refresh_description":"Refresh the page to show the most recent information.","page_save_operation_not_complete":"A save operation to the server has not yet completed.","theme_remove_page_name":"Are you sure you want to remove the page ${0} and all of its children?","space_title":"Space","removeSharedPages_title":"Remove Page","statusbar_multiple":"Multiple Messages","sharing_description":"Share","statusbar_hide_details":"Hide Details","tagAndRate_title":"Tagging and Rating","deleteSpace_description":"Delete Space","sharing_title":"Share","page_initError":"An error occurred initializing the page.","theme_menu":"Menu","assignPagePermissions_description":"Assign Page Permissions","statusbar_clear":"Clear","theme_more_actions":"More Actions","newSiblingPage_title":"New Sibling Page...","widgetBuilder_title":"Create a New Widget...","currently_selected":"currently selected","theme_edit_settings_portal":"Edit Shared Settings...","createFeed_description":"Create New Feed","assignPagePermissions_title":"Assign Page Permissions","statusbar_error":"Error","site_promotion_description":"Add this Page to a Site Promotion","createSpace_description":"Create a New Space","theme_global_page_cannot_close":"The global page cannot be closed.","browseTags_title":"Browse Tags","ally_display_actions_menu":"Display actions menu","theme_delete":"Delete","theme_confirm_leave_edit":"Your changes have not been saved. Are you sure you want to leave Edit mode?","dnd_move_failed":"An error occurred moving the resource.","deletePage_title":"Delete Page","theme_share":"Share","movePage_description":"Move Page","aria_edit_mode":"Going to Edit mode. Options will be displayed below in the toolbar.","theme_logout":"Log Out","theme_customize":"Customize","generic_tag_description":"Add this Page to an Analytics Tag","deletePage_description":"Delete Page","openCatalog_title":"Open Catalog as a New Page","theme_edit_my_profile":"Edit My Profile","newSiblingPage_description":"New Sibling Page","edit_wires_description":"Add, modify, or remove wires.","theme_go_to_view":"Go to View mode","private_public_modelError":"Cannot place a public resource under a private resource.","statusbar_info":"Information","theme_edit_settings":"Edit Settings...","theme_view_wiring":"View Wiring Graph","a11y_focus_titlebar":"Focus will be moved to the title bar.","shareSpace_description":"Share Space","aria_view_mode":"Going to view mode.","openCatalogInDlg_description":"Open Catalog in a Dialog Box","setAsHomeSpace_title":"Set As Home Space","theme_global_page_already_opened":"The global page is already opened.","theme_accountSetting":"Settings","widgetBuilder_description":"Create a New Widget","edit_description":"Edit","theme_delete_page":"Are you sure you want to delete this page and all of its children?","theme_actions":"Actions","layout_error_mismatch":"The assigned layout does not match the actual page layout.","removePage_description":"Remove Page","theme_share_this_page":"Share this Page","a11y_skip_region":"Skip to next region","theme_viewWireGraph":"View Wiring Graph","context_page_menu_renderingError":"An error occurred rendering the page menu.","skin_hide_titlebar":"Hide title bar","theme_delete_page_name":"Are you sure you want to delete the page ${0} and all of its children?","editSpace_description":"Edit Space Settings","createDataMashup_title":"Create Data Mashup...","openCatalog_description":"Open Catalog as a New Page","addSharedPages_description":"Add Shared Pages","removeSharedPages_description":"Remove Page","theme_impersonation":"Impersonate","theme_hide":"Hide","advanced_title":"Advanced","portlet_analytics_reports":"Portlet Reports","embedPage_title":"Display on a Web Page...","other_title":"Other","layout_error_symptoms":"Until this problem is fixed, attempts to customize this page by adding content or changing the layout may not work properly.","theme_hide_widget":"Hide Widget","editPage_title":"Edit Page","a11y_layout_resized_pixels":"The left container is set to ${0} pixels and the right container is set to ${1} pixels.","io_serverError":"Internal server error.","theme_minimize":"Minimize","no_content_node":"This page does not support content.","theme_display":"Display","sharePage_description":"Share Page","page_analytics_reports":"Page Reports","statusbar_status_error":"A runtime error occurred","theme_menu_cannot_render":"Menu cannot be rendered.","createDataMashup_description":"Create Data Mashup","layout_error_heading":"Error with the Page Layout","layout_error_tryRecreate":"Try deleting the page and creating it again.","generic_tag_title":"Analytics Tags...","portlet_analytics_reports_description":"Analytics Reports for Portlets","tag_title":"Tag...","theme_rename":"Rename...","a11y_display_menu":"Display menu","theme_personalize_control":"Personalize...","catalog_description":"Catalog","io_missingResource":"The requested resource does not exist.","openCatalogInDlg_title":"Open Catalog in a Dialog Box","move_right":"Move Right","theme_websphere_portal":"IBM WebSphere Portal","publishPage_title":"Publish Page...","tag_description":"Tag","theme_back":"Back","theme_resize":"Resize...","a11y_show_focus_titlebar":"Show title bar. Focus will be moved to the title bar.","page_force_ssa_msg":"This page contains one or more portlets that do not support client-side mode.","theme_share_page":"Share Page","theme_refresh":"Refresh","rate_description":"Rate","editPageProperties_title":"Edit Page Properties...","theme_global_page_not_opened":"The global page is not open.","editPageProperties_description":"Edit Page Properties","statusbar_print":"Print","newChildPage_title":"New Child Page...","setAsHomeSpace_description":"Set As Home Space","a11y_layout_resized":"The left container is set to ${0} and the right container is set to ${1}.","io_networkError":"An error occurred communicating with the server.","addSharedPages_title":"Add Shared Pages...","viewSource_description":"View Source","analytics_title":"Analytics","editSpace_title":"Edit Space","a11y_skip_content":" link using access key S.","duplicateSpace_description":"Duplicate Space","newChildPage_description":"New Child Page","duplicateSpace_title":"Duplicate Space","a11y_layout_resizer":"Use the arrow keys to resize the layout containers","a11y_display_user_menu":"Display user menu","removeFromFav_description":"Remove form Favorites","theme_edit_control":"Edit","movePage_title":"Move Page...","edit_title":"Edit"};dojo.provide("com.ibm.bundles.nls.SharedMessages");com.ibm.bundles.nls.SharedMessages._built=true;dojo.provide("com.ibm.bundles.nls.SharedMessages.en");com.ibm.bundles.nls.SharedMessages.en={"change_style_missingStyleError_0":"BMWPB0024E: The page style no longer exists in the configuration file for the Change Styles widget.","javascript_loading_error_1":"BMWPB0026E: Some parts of the page might not function because the JavaScript library ${0} did not load completely.","nav_invalid_drop_error_0":"BMWPB0001E: The Move operation could not be completed because sufficient access rights are not set on the parent page.","change_layout_maximizedError_0":"BMWPB0014E: The layout cannot be changed while a portlet is maximized.","shelf_bundleUndefined_1":"BMWPB0017E: The resource bundle ${0} could not be found.","add_content_maximizedError2_0":"BMWPB0015E: Content cannot be added to the page while a component is maximized.","page_dialog_no_templates_found_0":"BMWPB0005E: No page templates were found.","change_layout_maximizedError2_0":"BMWPB0016E: The page layout cannot be changed while a component is maximized.","shelf_customizeError_0":"BMWPB0029E: An error occurred while customizing the page.","add_content_addContentError_0":"BMWPB0021E: Content could not be added to the page.","shelf_bundleKeyUndefined_2":"BMWPB0018E: The key ${0} was undefined in the resource bundle ${1}.","add_content_restrictedContentError_1":"BMWPB0023E: ${0} cannot be added to the page because the content is not allowed on the page.","shelf_session_timeout_0":"BMWPB0012E: Your session has timed out. Log in to continue.","add_content_legacyError2_0":"BMWPB0020E: Content cannot be added to the page because a layout template has not been assigned yet.","add_content_missingRendererError_0":"BMWPB0022E: The portlet or widget could not be added to the page because the content source could not find the specified renderer.","change_layout_templateSyncError_0":"BMWPB0025E: The page definition is not in sync with the page layout template.","nav_renderingError_0":"BMWPB0003E: The page navigation could not be created because the server and browser are not communicating correctly.","shelf_configError_0":"BMWPB0007E: The page cannot be customized because the configuration file that controls the customization options cannot be read or processed correctly.","shelf_serverError_0":"BMWPB0011E: The page builder widgets cannot display correctly because they cannot communicate with the server.","add_content_maximizedError_0":"BMWPB0013E: Content cannot be added to the page while a portlet is maximized.","shelf_configError_1":"BMWPB0028E: The page cannot be customized because the configuration file ${0} that controls the customization options cannot be read or processed correctly.","add_content_legacyError_0":"BMWPB0019E: Content cannot be added to the page because a layout template has not been assigned yet.","nav_createPageError_0":"BMWPB0004E: The page could not be created because the server and browser are not communicating correctly.","shelf_badDatastoreError_1":"BMWPB0008E: ${0} cannot be loaded because the data store for the content source is undefined.","nav_invalid_drop_msg_0":"BMWPB0002E: The Rearrange operation could not be completed because sufficient access rights are not set on the pages in your site.","javascript_disabled_error_0":"BMWPB0027E: The page did not load successfully because JavaScript is disabled in the browser.","widget_definition_parsing_error_1":"BMWPB0028E: The widget ${0} could not be loaded because the schema validation failed.","shelf_feedError_1":"BMWPB0009E: ${0} cannot be loaded because either the Internet connection is not valid or the proxy is not configured to accept nontrusted content."}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("pagebuilder.nls.pb_ui_layer",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.pb.customize.LotusDialog"]){dojo._hasResource["com.ibm.pb.customize.LotusDialog"]=true;dojo.provide("com.ibm.pb.customize.LotusDialog");dojo.declare("com.ibm.pb.customize.LotusDialog",[dijit.Dialog],{blankImg:"",titleText:"",okText:"OK",duration:1,destroyOnClose:false,templateString:"<div class=\"lotusDialogBorder lotusui30 lotusui\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\">"+"<div class=\"lotusDialog\">"+"<h1>"+"<a href=\"javascript:void(0);\" role=\"button\" dojoAttachPoint=\"closeButtonNode\" class=\"lotusBtnImg lotusClose\" title=\"${closeText}\">"+"<img src=\"${blankImg}\" aria-label=\"${closeText}\" alt=\"\"/>"+"<span class=\"lotusAltText\">X</span>"+"</a>"+"<span dojoAttachPoint=\"titleNode\">${titleText}</span>"+"</h1>"+"<div dojoAttachPoint=\"containerNode\">"+"<div dojoAttachPoint=\"contentNode\" class=\"lotusDialogContent\"></div>"+"<div class=\"lotusDialogFooter\">"+"<input value=\"${okText}\" role=\"button\" class=\"lotusFormButton\" dojoAttachPoint=\"submitNode\" type=\"submit\" dojoAttachEvent=\"onclick: submit\"/> "+"<a href=\"javascript:void(0);\" role=\"button\" dojoAttachPoint=\"closeLinkNode\" class=\"lotusAction\">${cancelText}</a>"+"</div>"+"</div>"+"</div>"+"</div>",postMixInProperties:function(){this.nlsBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.closeText=this.nlsBundle["shelf_closeDialog"];this.cancelText=this.nlsBundle["add_content_cancel"];if(this.cssStateNodes){delete this.cssStateNodes.closeButtonNode;}this.inherited(arguments);},onSubmit:function(){},submit:function(){this.onSubmit();},hide:function(){if(this.domNode){return this.inherited(arguments);}},cancel:function(){if(!this._destroyingOnClose){this.hide();if(this.destroyOnClose){this._destroyingOnClose=true;this.destroy();}}},setContent:function(_1,_2,_3,_4){dojo.empty(this.contentNode);if(dojo.isString(_1)){_1=document.createTextNode(_1);}this.contentNode.appendChild(_1);this.titleNode.innerHTML=_2||this.titleText;this.submitNode.value=_3||this.okText;this.onSubmit=_4||function(){};this.show();this.onLoad();}});}if(!dojo._hasResource["com.ibm.pb.customize.LotusWaitingDialog"]){dojo._hasResource["com.ibm.pb.customize.LotusWaitingDialog"]=true;dojo.provide("com.ibm.pb.customize.LotusWaitingDialog");dojo.declare("com.ibm.pb.customize.LotusWaitingDialog",[com.ibm.pb.customize.LotusDialog],{spinner:"",message:"",destroyOnClose:true,templateString:"<div class=\"lotusDialogBorder lotusui30 lotusui\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\">"+"<div class=\"lotusDialog\">"+"<span dojoAttachPoint=\"closeButtonNode\" style=\"display:none\"></span>"+"<div class=\"lotusDialogContent\" dojoAttachPoint=\"containerNode\">"+"<img src=\"${spinner}\" alt=\"${loadingText}\" title=\"${loadingText}\"/>"+"${message}"+"</div>"+"</div>"+"</div>",postMixInProperties:function(){this.nlsBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.loadingText=this.nlsBundle["shelf_loading"];this.message=" "+this.message;this.inherited(arguments);},show:function(){if(!this.domNode){return;}var me=this;this.inherited(arguments);}});}if(!dojo._hasResource["com.ibm.pb.extension.contextmenu.ContextMenuAcOperation"]){dojo._hasResource["com.ibm.pb.extension.contextmenu.ContextMenuAcOperation"]=true;dojo.provide("com.ibm.pb.extension.contextmenu.ContextMenuAcOperation");dojo.declare("com.ibm.pb.extension.contextmenu.ContextMenuAcOperation",[com.ibm.mashups.enabler.ac.operation.Operation],{id:"none",url:"",sync:true,roleCheck:"",finished:null,allowed:false,constructor:function(id,_5,_6,_7,_8){if(!com.ibm.pb.extension.contextmenu.ContextMenuAcOperation.allowedOperations){com.ibm.pb.extension.contextmenu.ContextMenuAcOperation.allowedOperations={};}this.id=id;this.url=_5;this.sync=_6;this.roleCheck=_7;this.finished=_8||function(){};this._checkForFeed();},_checkForFeed:function(){if(com.ibm.pb.extension.contextmenu.ContextMenuAcOperation.allowedOperations[this.id]){if(com.ibm.pb.extension.contextmenu.ContextMenuAcOperation.allowedOperations[this.id][this.roleCheck]){this.allowed=true;}else{this.allowed=false;}this.finished(this);}else{this._getXml();}},_getXml:function(){var me=this,_9=dojo.isIE||dojo.isOpera||dojo.isFF<3.5;dojo.xhrGet({url:this.url,handleAs:(_9)?"text":"xml",sync:this.sync,load:function(_a){var _b=_a;com.ibm.pb.extension.contextmenu.ContextMenuAcOperation.allowedOperations[me.id]={};if(_9){var _c=_b.match(/label="(\w+)"/g);for(var i in _c){if((typeof _c[i])=="string"){var _d=_c[i].substring(7,_c[i].length-1);com.ibm.pb.extension.contextmenu.ContextMenuAcOperation.allowedOperations[me.id][_d]=true;}}}else{var _c=_b.querySelectorAll("menuitem");for(var i in _c){if(_c[i].getAttribute){var _d=_c[i].getAttribute("label");com.ibm.pb.extension.contextmenu.ContextMenuAcOperation.allowedOperations[me.id][_d]=true;}}}me._checkForFeed();}});},isAllowed:function(_e){return this.allowed;}});}if(!dojo._hasResource["com.ibm.widgets.ResourceSelector"]){dojo._hasResource["com.ibm.widgets.ResourceSelector"]=true;dojo.provide("com.ibm.widgets.ResourceSelector");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.Tooltip");dojo.require("dojo.i18n");dojo.require("dijit.form.FilteringSelect");dojo.require("dijit.form.TextBox");dojo.declare("com.ibm.widgets.ResourceSelector",[dijit._Widget,dijit._Templated],{shelfBundle:null,dialogBundle:null,blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString(),autofocus:false,baseUrl:null,feedQueryUrl:null,feedQueryUrlTemplate:null,feedSupportsSearch:false,feedSearchParam:"",atomFeed:true,resourceData:null,filteredResourceData:null,selectedResourceId:null,selectedRow1:null,selectedRow2:null,sortResultMult:1,entryStartIndex:0,value:{},searchResults:null,wasLastKeyEnter:false,outerDivClass:"lotusDialog",showTruncationMessage:false,connections:[],_lastUsedFeedQueryUrl:null,templateString:"<form class=\"lotusForm2 utb-resource-selector\" dojoAttachPoint=\"resourceSelectForm,containerNode\" action=\"javascript:;\">"+"<div class=\"lotusFormField\">"+"<div><label id=\"${id}_search_title\" for=\"${id}_search\">${nlsSearchResourcesLabel}</label></div>"+"<table class=\"lotusLayout\" cellspacing=\"0\" role=\"presentation\"><tr>"+"<td id=\"${id}_search_cell\"><span id=\"${id}_search\" dojoAttachPoint=\"searchSelect\"></span></td>"+"<td class=\"lotusSearch lotusHidden\" dojoAttachPoint=\"searchIconCell\">"+"<span class=\"lotusBtnImg\" title=\"${nlsSubmitSearch}\" >"+"<input class=\"lotusSearchButton\" dojoAttachPoint=\"searchIconInput\" type=\"image\" alt=\"${nlsSubmitSearch}\" src=\"${blankImg}\" />"+"<a href=\"javascript:;\" class=\"lotusAltText\" dojoAttachPoint=\"searchIconAltLink\">${nlsSubmitSearch}</a>"+"</span>"+"</td>"+"</tr>"+"</table>"+"</div>"+"<div class=\"lotusHidden lotusMessage2 lotusWarning\" role=\"alert\" dojoAttachPoint=\"truncationMsgDIV\">"+"<img class=\"lotusIcon lotusIconMsgWarning\" width=\"21\" height=\"21\" src=\"${blankImg}\" alt=\"Warning\" dojoAttachPoint=\"truncationMsgIcon\"/>"+"&nbsp;"+"<span role=\"alert\" class=\"lotusMessageBody\" dojoAttachPoint=\"truncationMsgText\"></span>"+"</div>"+"<div class=\"lotusSort\">"+"<ul class=\"lotusInlinelist\">"+"<li class=\"lotusFirst\">${nlsSortLabel}</li>"+"<li class=\"lotusLast\"><a dojoAttachPoint=\"sortLink\" dojoAttachEvent=\"onclick:_toggleSort\" role=\"button\" title=\"${nlsClickToSort}\" class=\"lotusActiveSort lotusAscending\" tabindex=\"0\" href=\"javascript:;\">${nlsTitle}<span dojoAttachPoint=\"sortLinkIndicator\" class=\"lotusAltText\">&#x2191;</span></a></li>"+"</ul>"+"</div>"+"<div class=\"utb-selector-table\">"+"<fieldset style=\"float:none;\">"+"<legend style=\"display:none;\">"+"${nlsResourceTableSummary}"+"</legend>"+"<table id=\"resourceSelectorTable\" class=\"lotusTable lotusClear\" border=\"0\" cellSpacing=\"0\" cellPadding=\"0\" summary=\"${nlsResourceTableSummary}\">"+"<tbody dojoAttachPoint=\"resourceTableBody\">"+"</tbody>"+"</table>"+"</fieldset>"+"</div>"+"<div role=\"alert\" dojoAttachPoint=\"noResourcesDIV\">${nlsNoResources}</div>"+"<div class=\"lotusHidden\" id=\"resourceSelectorProgressID\" name=\"resourceSelectorProgress\" dojoAttachPoint=\"progressDIV\">"+"<div>"+"<span class=\"lotusLoading\"><img width=\"21\" height=\"21\" src=\"${blankImg}\" alt=\"${nlsLoading}\" role=\"presentation\"></span>&nbsp;<span role=\"alert\">${nlsLoading}</span>"+"</div>"+"</div>"+"</form>",constructor:function(){this.shelfBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.dialogBundle=dojo.i18n.getLocalization("com.ibm.bundles","PageCreatorDialog");this.nlsSubmitSearch=this.shelfBundle["shelf_submitSearch"];this.nlsSortLabel=this.dialogBundle["template_dialog_sort_by"];this.nlsClickToSort=this.dialogBundle["template_dialog_click_to_sort"];this.nlsClickToSelect=this.dialogBundle["template_dialog_click_to_select"];this.nlsPersonLabel=this.dialogBundle["resource_selector_updated_by"];this.nlsNoUser="";this.nlsTitle=this.dialogBundle["title"];this.nlsResourceTableSummary=this.dialogBundle["resource_selector_table_summary"];this.nlsNoResources=this.dialogBundle["resource_selector_no_resources"];this.nlsLoading=this.shelfBundle["shelf_loading"];this.nlsSearchResourcesLabel=this.dialogBundle["resource_selector_search_resources"];this.nlsSearchNoMatches=this.dialogBundle["template_dialog_search_no_matches"];this.baseUrl=location.protocol+"//"+location.host+ibmPortalConfig.contentHandlerURI;},postCreate:function(){this.inherited(arguments);this._lastUsedFeedQueryUrl=this.feedQueryUrl;if(this.feedSupportsSearch===true){this._loadSearchResults("");this._populateSearchSelect();this._initializeSearchIcon();}else{this._loadResourceData();this._populateSearchSelect();}},getAvailableResourcesCount:function(_f){return 0;},getMaxResourcesCount:function(_10){return 0;},_buildFeedQueryUrlFromSearchTerm:function(_11){if(_11===null){_11="";}if(_11!==""){if((typeof this.feedQueryUrlTemplate=="string")&&(this.feedQueryUrlTemplate!=="")){if((typeof this.feedSearchParam=="string")&&(this.feedSearchParam!=="")){var _12={};_12[this.feedSearchParam]=_11;this._lastUsedFeedQueryUrl=dojo.string.substitute(this.feedQueryUrlTemplate,_12);}else{this._lastUsedFeedQueryUrl=this.feedQueryUrlTemplate;}}else{this._lastUsedFeedQueryUrl=this.feedQueryUrl;}}else{this._lastUsedFeedQueryUrl=this.feedQueryUrl;}},_hideLoadingDiv:function(){dojo.addClass(this.progressDIV,"lotusHidden");},_hideTruncationMsgDiv:function(){dojo.addClass(this.truncationMsgDIV,"lotusHidden");},_initializeSearchIcon:function(){dojo.removeClass(this.searchIconCell,"lotusHidden");this.connections.push(dojo.connect(this.searchIconInput,"onclick",this,"_runSearch"));this.connections.push(dojo.connect(this.searchIconAltLink,"onclick",this,"_runSearch"));},_escapeHTML:function(str){return str.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;");},_createHelpIcon:function(_13,_14,_15){var _16=dojo.create("a",{"id":_14,"role":"button","href":"javascript:void(0);","class":this.searchCssClass},_13);var _17=dojo.create("img",{"src":this.blankImg,"alt":"","role":"presentation","width":"16","height":"16"},_16);var _18=dojo.create("span",{"class":"lotusAltText","innerHTML":"?"},_16);var ttp=new dijit.Tooltip({connectId:[_14],label:_15,position:["below"]});return ttp;},_populateSearchSelect:function(){var _19=this.searchSelect;var _1a;if(!this.feedSupportsSearch){_1a=dojo.create("option",{innerHTML:""},_19);_1a.setAttribute("value","");if(this.resourceData!==null){var _1b=this;dojo.forEach(this.resourceData,function(_1c,i){var _1d=dojo.create("option",{innerHTML:_1b._escapeHTML(_1c.title)},_19);_1d.setAttribute("value",_1c.id);});}_19=new dijit.form.FilteringSelect({name:_19.name,displayedValue:"",onChange:dojo.hitch(this,this._search_onChange),isValid:dojo.hitch(this,this._search_isValid),queryExpr:"*${0}*",highlightMatch:"all",invalidMessage:this.nlsSearchNoMatches,autoComplete:false,required:false},_19);this.connections.push(dojo.connect(_19,"_openResultList",this,"_search_openResultList"));this.connections.push(dojo.connect(_19,"_handleOnChange",this,"_search_handleOnChange"));}else{while(_19.hasChildNodes()){_19.removeChild(_19.firstChild);}_19=new dijit.form.TextBox({name:_19.name,displayedValue:""},_19);if(this.nlsSearchTooltip&&this.searchCssClass){this._createHelpIcon(dojo.byId(this.id+"_search_title"),this.id+"_search_tooltip",this.nlsSearchTooltip);}}this.connections.push(dojo.connect(dojo.byId(_19.id),"onkeypress",this,"_search_onKeypress"));},_runSearch:function(){var _1e=dijit.byId(this.searchSelect.id);this._loadSearchResults(_1e.displayedValue);},_search_onChange:function(_1f){var _20=this.resourceData;if(_20!==null){this._updateSelectedId();if(_1f){var _21=dojo.filter(_20,function(_22){return (_22.id===_1f);});if(_21.length>0){this.isViewFiltered=true;this.filteredResourceData=_21;this._displayChoices(_21);}}else{if(this.isViewFiltered&&dojo.byId(this.searchSelect.id).value.length===0){this.isViewFiltered=false;this.filteredResourceData=null;this._displayChoices(_20);this.searchResults=null;}}}},_search_isValid:function(){var rv=true;if(this.wasLastKeyEnter&&this.searchResults&&this.searchResults.length===0){rv=false;}return rv;},_search_openResultList:function(_23,_24){this.searchResults=_23;},_search_onKeypress:function(e){if(e&&e.type&&e.keyCode&&e.keyCode===dojo.keys.ENTER){if(this.feedSupportsSearch){this._runSearch();}else{if(this.searchResults&&this.searchResults.length>0&&this.resourceData!==null){this._updateSelectedId();var _25=this.resourceData;var _26=this.searchResults;var _27=[];var ctr=0;dojo.forEach(_26,function(_28){var _29=_28.value;var _2a=dojo.filter(_25,function(_2b){return (_2b.id===_29);});if(_2a&&_2a.length>0){_27[ctr++]=_2a[0];}});if(_27.length===_25.length){this.isViewFiltered=false;this.filteredResourceData=null;this._displayChoices();}else{if(_27.length>0){this.isViewFiltered=true;this.filteredResourceData=_27;this._displayChoices(_27);}}}this.wasLastKeyEnter=false;if(e&&e.type&&e.keyCode&&e.keyCode===dojo.keys.ENTER){this.wasLastKeyEnter=true;var _2c=dijit.byId(this.searchSelect.id);_2c.validate(true);}}}},_search_handleOnChange:function(_2d,_2e){this.inherited(arguments);if(dojo.byId(this.searchSelect.id).value===""&&this.isViewFiltered){this._search_onChange(null);}},_showLoadingDiv:function(){dojo.removeClass(this.progressDIV,"lotusHidden");dijit.setWaiState(this.resourceTableBody,"live","polite");dijit.setWaiState(this.resourceTableBody,"busy","true");},_showTruncationMsgDiv:function(_2f,_30){if(this.nlsTruncationMsg&&(this.showTruncationMessage===true)){var msg=dojo.string.substitute(this.nlsTruncationMsg,[_2f,_30]);dojo.attr(this.truncationMsgText,"innerHTML",this._escapeHTML(msg));if(this.warningIconClass){dojo.addClass(this.truncationMsgIcon,this.warningIconClass);}dojo.removeClass(this.truncationMsgDIV,"lotusHidden");}},_loadResourceData:function(_31,_32,_33){if(this.resourceData===null){this.resourceData=[];this._showLoadingDiv();this._hideTruncationMsgDiv();var _34=this.baseUrl;var _35="";var idx=this.baseUrl.indexOf("?");if(idx>-1){_35=this.baseUrl.substring(idx+1,this.baseUrl.length);_34=this.baseUrl.substring(0,idx);}var _36=_34+this._lastUsedFeedQueryUrl;if(_35.length>0){if(_36.indexOf("?")>-1){_36=_36+"&"+_35;}else{_36=_36+"?"+_35;}}if(this.atomFeed){this._getEntriesFromAtomFeed(_36);}else{this._getEntriesFromJsonFeed(_36);}this._hideLoadingDiv();this._loadComplete();}},_loadSearchResults:function(_37){this._buildFeedQueryUrlFromSearchTerm(_37);this._clearResultList(this.resourceTableBody);this._clearResourceData();this._loadResourceData();},_getHref:function(_38,_39,_3a){var rv=null;if(_38.links!==null&&_38.links.length>0){var _3b="related";if(_3a){_3b=_3a;}for(var x in _38.links){var _3c=_38.links[x];if(_3c.rel&&_3c.rel==_3b&&_3c.href&&_3c.href.indexOf(_39)>-1){rv=_3c.href;break;}}}return rv;},_getUserDataForEntry:function(_3d,_3e){return null;},_getEntriesFromAtomFeed:function(_3f){var _40=this.resourceData;var me=this;var _41=this.entryStartIndex;var _42=new dojox.atom.io.Connection(true,true);_42.getFeed(_3f,function(_43){var _44=_43.entries;if(_44){var ctr=0;var _45=false;for(var i=_41;i<_44.length;i++){var _46=_44[i];var _47=_46.title.value;var _48="";if(_46.summary){_48=_46.summary.value;}var _49=_46.id;var _4a=this.selectedResourceId;var _4b=false;if(_4a&&_4a.length>0){_4b=(_4a===_49);if(_4b){_45=true;}}var _4c=dojo.hitch(me,me._getUserDataForEntry);var _4d=_4c(_42,_46);var _4e={id:_49,title:_47,description:_48,user:_4d,selected:_4b};var _4f=dojo.hitch(me,me._processEntryResultsBeforeStoring);_4e=_4f(_4e);if(!_45&&_4e.selected){_45=true;}_40[ctr++]=_4e;}if(!_45&&_40.length>0){_40[0].selected=true;}}},function(_50,_51){if(_51.xhr.responseText.indexOf("EJQHL0004E")>=0){alert(me.shelfBundle["project_expired"]||"The current project is no longer available. Click OK to be redirected.");top.location.reload();}});},_getEntriesFromJsonFeed:function(_52){var _53=this.resourceData;var me=this;var _54=null;var _55=dojo.xhrGet({url:_52,sync:true,handleAs:"json",preventCache:true,load:function(_56){_54=_56;},error:function(_57){console.debug("ResourceSelector _getEntriesFromJsonFeed ERROR");console.debug(_57);}});var _58=this.getAvailableResourcesCount(_54);var _59=this.getMaxResourcesCount(_54);if(_59>_58){this._showTruncationMsgDiv(_58,_59);}else{this._hideTruncationMsgDiv();}if(_54&&_54.feed){var _5a=this.resourceData;var _5b=this.selectedResourceId;dojo.forEach(this._getEntriesAsJSON(_54.feed),function(_5c){var ctr=_53.length;var _5d=_5c.id;var _5e=false;if(_5b&&_5b.length>0){_5e=(_5b===_5d);}else{if(ctr===0){_5e=true;}}var _5f=_5c.title.value;var _60="";if(_5c.summary){_60=_5c.summary.value;}var dn=null;dojo.forEach(_5c.author,function(_61){if(_61.distinguishedName){dn=_61.distinguishedName;}});var _62=_5c.type;var _63={id:_5d,title:_5f,description:_60,user:dn,selected:_5e,type:_62};var _64=dojo.hitch(me,me._processEntryResultsBeforeStoring);_63=_64(_63);_53[ctr]=_63;});}},_getEntriesAsJSON:function(_65){return _65.entry;},_processEntryResultsBeforeStoring:function(_66){return _66;},_stripOffPrefix:function(str,_67){var rv=str;if(str&&_67){var pos=str.indexOf(_67);if(pos>-1){rv=str.substring(pos+_67.length);}}return rv;},_clearResourceData:function(){this.resourceData=null;},_clearResultList:function(_68){while(_68.hasChildNodes()){_68.removeChild(_68.firstChild);}dojo.addClass(this.noResourcesDIV,"lotusHidden");},_createRadioButton:function(_69,_6a){if(dojo.isIE&&dojo.isIE<8){var doc=dojo.doc;if(_6a){_6a=dojo.byId(_6a);doc=_6a.ownerDocument;}tag=doc.createElement("<input type='radio' name='resourceValue' />");if(_69){dojo.attr(tag,_69);}if(_6a){dojo.place(tag,_6a);}return tag;}else{return dojo.create("input",_69,_6a);}},_loadComplete:function(){this._displayChoices();},_displayChoices:function(_6b){var _6c=ibmCfg.themeConfig.isRTL;var _6d,_6e;if(_6b){_6d=_6b;}else{_6d=this.resourceData;}if(_6d===null||_6d.length===0){if(this.feedSupportsSearch===true){dijit.removeWaiState(this.resourceTableBody,"live");dijit.removeWaiState(this.resourceTableBody,"busy");dojo.removeClass(this.noResourcesDIV,"lotusHidden");}return;}var _6f=this.resourceTableBody;this._clearResultList(_6f);var _70=-1*this.sortResultMult;var _71=this.sortResultMult;_6d.sort(function(a,b){var _72=a.title.toLowerCase(),_73=b.title.toLowerCase();if(_72<_73){return _70;}if(_72>_73){return _71;}return 0;});var _74=this.nlsClickToSelect;var _75=this.nlsPersonLabel;var _76=this.nlsNoUser;var _77=false;var _78=dojo.hitch(this,"_setSelectedRowBackgroundColor");var _79=this.selectedResourceId&&this.selectedRow1;var _7a=this.selectedResourceId;var _7b=this._createRadioButton;var _7c=this.nlsTypeLabels;var _7d=10;var _7e=dojo.create("tr",{style:{display:"none"}},_6f);var th1=dojo.create("th",{innerHTML:this.nlsClickToSelect,scope:"col"},_7e);var th2=dojo.create("th",{innerHTML:"&nbsp;",scope:"col"},_7e);var th3=dojo.create("th",{innerHTML:this.nlsTitle,scope:"col"},_7e);var _7f=this;dojo.forEach(_6d,function(_80,i){var div;var id=_80.id;var _81=_80.title;var _82=_80.user;var tr1=dojo.create("tr",null,_6f);var td1=dojo.create("td",{className:"lotusFirstCell",style:{width:"16px",paddingLeft:"2px"}},tr1);var _83=_7b({type:"radio",title:_74,name:"resourceValue",value:id,id:id+"_resource_"+i,className:"lotusCheckbox"},td1);_7f.connections.push(dojo.connect(_83,"onclick",_7f,function(evt){_78(tr1);}));var td2=dojo.create("td",{style:{width:"1px",paddingLeft:"0px",paddingRight:"0px",innerHTML:"&nbsp;"}},tr1);var td3=dojo.create("td",null,tr1);var _84=dojo.create("label",{style:{margin:"1px"}},td3);dojo.attr(_84,"for",id+"_resource_"+i);var h4=dojo.create("h4",{"id":id+"_header"},_84);dojo.create("span",{dir:_6c?"RTL":"LTR",innerHTML:_7f._escapeHTML(_81)},h4);if(_80.type&&_7c&&_7c[_80.type]){var pos=_6c?"first":"last";dojo.create("span",{className:"lotusType",innerHTML:_7f._escapeHTML(_7c[_80.type])},h4,pos);}if(_82){div=dojo.create("div",{className:"lotusMeta",innerHTML:_7f._escapeHTML(_75)+"&nbsp;"},td3);var _85="";var _86="";var _87="";if(dojo.isString(_82)){_85=_82;if(_82.indexOf("uid=")===0){var _88=_82.indexOf(",");if(_88>4){_85=_82.substring(4,_88);}}_87=_82;_86=_80.ownerId?_80.ownerId:"";}else{if(dojo.isObject(_82)&&_82.getDisplayName){_85=_82.getDisplayName();_86=_82.getID();_87=_82.dn;}}var _89=dojo.create("span",{className:"vcard X-sametime-resolve"},div);var _8a=dojo.create("a",{className:"fn lotusPerson hasHover",innerHTML:_7f._escapeHTML(_85),onClick:"javascript:SemTagMenu.a11y(event);",href:"javascript:void(0);"},_89);_8a.onmouseover=dojo.hitch(_8a,function(_8b){if(!_8b){_8b=window.event;}var _8c=_8b.target?_8b.target:_8b.srcElement;if(_8c){var _8d=_8c.getBoundingClientRect();var _8e=_8d.height?_8d.height:_8d.bottom-_8d.top;var _8f=window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop;this._ts_y=Math.floor(_8d.top+_8e+_8f);}});_8a.onfocus=_8a.onmouseover;var _90=dojo.create("span",{className:"userObjectId",style:{display:"none"},innerHTML:_7f._escapeHTML(_86)},_89);var _91=dojo.create("span",{className:"uid",style:{display:"none"},innerHTML:_7f._escapeHTML(_87)},_89);_77=true;}else{div=dojo.create("div",{className:"lotusMeta",innerHTML:_7f._escapeHTML(_76)},td3);}var _92=_80.description;if(_92&&_92!==""){dojo.style(td3,"paddingBottom","0px");var tr2=dojo.create("tr",{className:"lotusDetails"},_6f);var td4=dojo.create("td",{className:"lotusFirstCell",innerHTML:"&nbsp;"},tr2);var td5=dojo.create("td",{innerHTML:"&nbsp;"},tr2);var td6=dojo.create("td",{className:"lotusLastCell",colSpan:"2",headers:id+"_header"},tr2);var _93=dojo.create("p",{innerHTML:_7f._escapeHTML(_92)},td6);}var _94=_80.selected;if(_79){if(_7a===_80.id){_94=true;}else{_94=false;}}if(_94){if(dojo.isIE==7){dojo.attr(_83,"defaultChecked","true");}dojo.attr(_83,"checked","true");_78(tr1);}});if(_77){var _95=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.livetext.ServiceModel.SERVICE_NAME);dojo.publish(_95.tagChanged,[_6f]);if(typeof SemTagSvcPortal!="undefined"&&SemTagSvcPortal&&!SemTagSvcPortal.oldFindPosition){SemTagSvcPortal.oldFindPosition=SemTagSvcPortal.findPosition;SemTagSvcPortal.findPosition=function(obj,_96){var pos=SemTagSvcPortal.oldFindPosition(obj,_96);if(obj._ts_y){pos[1]=obj._ts_y;}return pos;};}}dijit.removeWaiState(this.resourceTableBody,"busy");},_toggleSort:function(){var _97=this.sortLink.className.split(" ");if(this.sortResultMult>0){this.sortResultMult=-1;dojo.html.set(this.sortLinkIndicator,"&#x2193;");_97[1]="lotusDescending";}else{this.sortResultMult=1;dojo.html.set(this.sortLinkIndicator,"&#x2191;");_97[1]="lotusAscending";}this.sortLink.className=_97[0]+" "+_97[1];this._updateSelectedId();var _98=null;if(this.isViewFiltered){_98=this.filteredResourceData;}this._displayChoices(_98);},_updateSelectedId:function(){if(this.resourceData){var _99=dojo.formToObject(this.resourceSelectForm).resourceValue;if(_99){this.selectedResourceId=_99;}}},_setSelectedRowBackgroundColor:function(_9a){if(this.selectedRow1){dojo.style(this.selectedRow1,"backgroundColor","transparent");}if(this.selectedRow2){dojo.style(this.selectedRow2,"backgroundColor","transparent");}dojo.style(_9a,"backgroundColor",com.ibm.widgets.ResourceSelector.SELECTED_ROW_COLOR);this.selectedRow1=_9a;var _9b=_9a.nextSibling;if(_9b&&dojo.attr(_9b,"class")==="lotusDetails"){dojo.style(_9b,"backgroundColor",com.ibm.widgets.ResourceSelector.SELECTED_ROW_COLOR);this.selectedRow2=_9b;}else{this.selectedRow2=null;}},submit:function(){dojo.attr(this.submitDialog,"disabled","disabled");this.hide();this.beforeSubmit();this.onSubmit();},cancel:function(){this.hide();},onChange:function(arg){},onComplete:function(){},beforeSubmit:function(){},getSelection:function(){this.value=dojo.formToObject(this.resourceSelectForm);var _9c="";var _9d="";var _9e="";var _9f=this.value.resourceValue;if(this.resourceData&&_9f){dojo.forEach(this.resourceData,function(_a0,i){if(_a0.id===_9f){if(_a0.title){_9c=_a0.title;}if(_a0.description){_9d=_a0.description;}if(_a0.type){_9e=_a0.type;}}});}this.value.resourceName=_9c;this.value.resourceDescription=_9d;this.value.type=_9e;return this.value;},layout:function(){if(this.domNode.style.display!="none"){this._size();}return this.inherited(arguments);},focus:function(){var _a1,_a2=null;dojo.query("input",this.domNode).forEach(function(_a3,_a4,arr){if(_a3.checked){_a2=_a3;}});if(!_a2){_a1=dijit.byId(this.searchSelect.id);if(_a1){if(_a1.focusNode){_a2=_a1.focusNode;}}}if(_a2){dijit.focus(_a2);}},destroy:function(){this.resourceData=null;dojo.forEach(this.connections,dojo.disconnect);this.inherited(arguments);}});com.ibm.widgets.ResourceSelector.SELECTED_ROW_COLOR="#f2f9ff";}if(!dojo._hasResource["com.ibm.widgets.ResourceSelectDialog"]){dojo._hasResource["com.ibm.widgets.ResourceSelectDialog"]=true;dojo.provide("com.ibm.widgets.ResourceSelectDialog");dojo.require("dijit.Dialog");dojo.require("dojo.i18n");dojo.declare("com.ibm.widgets.ResourceSelectDialog",[dijit.Dialog],{lotusui_id:"dijitDialog_lotusui30_ResSlctDlg_container",lotusui_class:"lotusui30",shelfBundle:null,dialogBundle:null,blankImg:"",autofocus:false,resourceData:null,selectedResourceId:null,sortResultMult:1,value:{},cancelHandler:null,templateString:"<div class=\"lotusDialogBorder\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\" dojoAttachPoint=\"dialogDiv\">"+"<div class=\"lotusDialog\" style=\"min-width: 400px;\">"+"<div class=\"lotusDialogHeader\">"+"<h1 class=\"lotusHeading\">"+"<span dojoAttachPoint=\"titleNode,titleBar\" id=\"${id}ResourceSelectDialogTitleSpan_id\">${nlsResourceSelectTitle}</span>"+"</h1>"+"<a role=\"button\" href=\"javascript:void(0);\" dojoAttachPoint=\"closeButtonNode\" dojoAttachEvent=\"onclick:cancel\" class=\"lotusDialogClose\" title=\"${closeText}\">"+"<img src=\"${_blankGif}\" alt=\"\" aria-label=\"${closeText}\" />"+"<span class=\"lotusAltText\">X</span>"+"</a>"+"</div>"+"<div dojoAttachPoint=\"containerNode\" class=\"lotusDialogContent\" style=\"max-height:1000px\">"+"<div class=\"lotusMessage\" dojoAttachPoint=\"resourceSelectError\" style=\"display: none\" role=\"alert\">"+"<span>${nlsTitleError}</span>"+"</div>"+"<div id=\"${id}_selector\" dojoAttachPoint=\"resourceSelector\"></div>"+"</div>"+"<div class=\"lotusDialogFooter\" dojoAttachPoint=\"dialogFooter\">"+"<input value=\"${okText}\" class=\"lotusBtn\" dojoAttachPoint=\"submitDialog\" dojoAttachEvent=\"onclick:submit\" type=\"submit\"/> "+"<input dojoAttachPoint=\"dialogCancel\" dojoAttachEvent=\"onclick:cancel\" class=\"lotusBtn\" type=\"button\" role=\"button\" title=\"${cancelText}\" value=\"${cancelText}\" />"+"</div>"+"</div>"+"</div>",postMixInProperties:function(){this.shelfBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.dialogBundle=dojo.i18n.getLocalization("com.ibm.bundles","PageCreatorDialog");this.cancelText=this.shelfBundle["add_content_cancel"];this.closeText=this.shelfBundle["add_content_close"];this.okText=this.dialogBundle["resource_select_dialog_select"]||"Select";this.nlsTitleError=this.shelfBundle["new_feed_enterTitle"];this.nlsResourceSelectTitle=this.dialogBundle["resource_select_dialog_title"];},postCreate:function(){this.inherited(arguments);this._populateResourceSelector();dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");var _a5=window.setTimeout(dojo.hitch(this,function(){if(this.domNode&&this.domNode.style.display!="none"){this.layout();}window.clearTimeout(_a5);}),this.duration+50);},_findOrCreateLotusUIDIV:function(){var _a6=dojo.byId(this.lotusui_id);if(!_a6){_a6=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class,"wairole":"region","role":"region"},dojo.body());}dijit.setWaiState(_a6,"labelledby",this.id+"ResourceSelectDialogTitleSpan_id");return _a6;},_populateResourceSelector:function(){var _a7=this.resourceSelector;this.selectorWidget=new com.ibm.widgets.ResourceSelector({feedQueryUrl:this.feedQueryUrl},_a7);},submit:function(){dojo.attr(this.submitDialog,"disabled","disabled");this.hide();this.beforeSubmit();this.onSubmit();},setCancelHandler:function(_a8){this.cancelHandler=_a8;},cancel:function(){if(this.cancelHandler&&this.cancelHandler!=null){this.cancelHandler();}this.hide();},onChange:function(arg){},onComplete:function(){},beforeSubmit:function(){},onSubmit:function(){this.value=this.selectorWidget.getSelection();this.onChange(this.value);},layout:function(){if(this.domNode.style.display!="none"){this._size();}return this.inherited(arguments);},focus:function(){this.resourceSelectError.style.display="none";this.submitDialog.removeAttribute("disabled");this.show();},show:function(){this.inherited(arguments);setTimeout(dojo.hitch(this.selectorWidget,"focus"),30);},destroy:function(){this.inherited(arguments);},_getFocusItems:function(_a9){var _aa=this.containerNode;this.containerNode=_a9;this.inherited(arguments);this.containerNode=_aa;}});}if(!dojo._hasResource["com.ibm.widgets.TemplateSelectDialog"]){dojo._hasResource["com.ibm.widgets.TemplateSelectDialog"]=true;dojo.provide("com.ibm.widgets.TemplateSelectDialog");dojo.require("dojo.i18n");dojo.require("dojox.atom.io.model");dojo.require("dojox.atom.io.Connection");dojo.declare("com.ibm.widgets.TemplateSelectDialog",[com.ibm.widgets.ResourceSelectDialog],{postMixInProperties:function(){this.inherited(arguments);this.nlsResourceSelectTitle=this.dialogBundle["page_dialog_select_template"];this.nlsPersonLabel=this.dialogBundle["template_dialog_owned_by"];this.nlsNoUser=this.dialogBundle["template_dialog_no_owner"];this.nlsResourceTableSummary=this.dialogBundle["template_dialog_table_summary"];this.nlsSearchResourcesLabel=this.dialogBundle["template_dialog_search_templates"];this.feedQueryUrl="?uri=nm%3Aoid%3Awps.content.template.root&levels=100";},_populateResourceSelector:function(){var _ab=this.resourceSelector;this.selectorWidget=new com.ibm.widgets.ResourceSelector({feedQueryUrl:this.feedQueryUrl,entryStartIndex:1,_getUserDataForEntry:this._getUserDataForEntry,_processEntryResultsBeforeStoring:this._processEntryResultsBeforeStoring,nlsPersonLabel:this.nlsPersonLabel,nlsNoUser:this.nlsNoUser,nlsResourceTableSummary:this.nlsResourceTableSummary,nlsSearchResourcesLabel:this.nlsSearchResourcesLabel},_ab);},_getUserDataForEntry:function(_ac,_ad){var rv=null;var _ae=this._getHref;var _af=null;if(dojo.isOpera){_af="content";}var _b0=_ae(_ad,com.ibm.widgets.TemplateSelectDialog.CONTENT_MODEL_SCHEMA,_af);if(_b0){_ac.getFeed(_b0,function(_b1){var _b2=_b1.entries;var _b3=_b2[0];if(dojo.isOpera){_af="ac-resource-config";}var _b4=_ae(_b3,com.ibm.widgets.TemplateSelectDialog.RESOURCE_CONFIG_SCHEMA,_af);if(_b4){_ac.getEntry(_b4,function(_b5){if(_b5&&_b5.content&&_b5.content.value){var _b6=_b5.content.value;var _b7=_b6.indexOf("ac:DN=\"");if(_b7>-1){_b7+=7;var _b8=_b6.indexOf("\"",_b7);if(_b8>_b7){rv=_b6.substring(_b7,_b8);}}}});}});}return rv;},_processEntryResultsBeforeStoring:function(_b9){if(_b9){var _ba=_b9.id;_b9.id=this._stripOffPrefix(_ba,com.ibm.widgets.TemplateSelectDialog.NAVIGATION_MODEL_SCHEMA);var _bb=this.selectedResourceId;var _bc=false;if(_bb&&_bb.length>0&&(_bb===_ba)){_b9.selected=true;}}return _b9;}});com.ibm.widgets.TemplateSelectDialog.NAVIGATION_MODEL_SCHEMA="nm:oid:";com.ibm.widgets.TemplateSelectDialog.CONTENT_MODEL_SCHEMA="cm/oid:";com.ibm.widgets.TemplateSelectDialog.RESOURCE_CONFIG_SCHEMA="resourceconfig:oid:";}if(!dojo._hasResource["com.ibm.mm.builder.systemwidget.TemplateSelectDialog"]){dojo._hasResource["com.ibm.mm.builder.systemwidget.TemplateSelectDialog"]=true;dojo.provide("com.ibm.mm.builder.systemwidget.TemplateSelectDialog");dojo.declare("com.ibm.mm.builder.systemwidget.TemplateSelectDialog",[com.ibm.pb.iwidget.iWidgetBase],{controller:null,onLoad:function(){var _bd="onLoad",lgr=this.LOGGER;lgr.entering(_bd,arguments);this.wid="_"+this.iContext.widgetId+"_";var _be=this.getItemSetValues(["controller",]);this.convertMapTypes(_be,["controller"],"Object");dojo.mixin(this,_be);this.model=this.controller.getTreeModel();this.nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();lgr.exiting(_bd,arguments);},onUnload:function(){this._cleanupInternalWidget();},_cleanupInternalWidget:function(){if(this.widget){if(this._changeConnection){dojo.disconnect(this._changeConnection);}this.widget.destroy();}},_initInternalWidget:function(){var me=this;this._cleanupInternalWidget();this.widget=new com.ibm.widgets.TemplateSelectDialog({selectedResourceId:this._selectedTemplateId},this.iContext.getElementById(this.wid+"contents"));this._changeConnection=dojo.connect(this.widget,"onChange",this,"_onChange");this.widget.startup();},_onChange:function(_bf){var _c0="_onChange",lgr=this.LOGGER;lgr.entering(_c0,arguments);var _c1={};_c1.sourceWidget=this._sourceId;_c1.value=_bf;com.ibm.mashups.services.ServiceManager.getService("eventService").fireEvent(this._sourceId,"onTemplateSelectChanged",_bf,null,this.iContext.widgetId);lgr.exiting(_c0,arguments);},onTemplateSelect:function(_c2){var _c3="onTemplateSelect",lgr=this.LOGGER;lgr.entering(_c3,arguments);if(this.widget&&this.widget.open){return;}this._sourceId=_c2.source;this._selectedTemplateId=_c2.payload;if(!this.widget){this._initInternalWidget();}if(_c2.payload!==""){this.widget.focus();}else{this.widget.onSubmit();}lgr.exiting(_c3,arguments);}});}if(!dojo._hasResource["com.ibm.widgets.NewPageDialog"]){dojo._hasResource["com.ibm.widgets.NewPageDialog"]=true;dojo.provide("com.ibm.widgets.NewPageDialog");dojo.require("dijit.Dialog");dojo.require("dojo.i18n");dojo.declare("com.ibm.widgets.NewPageDialog",[dijit.Dialog],{lotusui_id:"dijitDialog_lotusui30_NewPageDlg_container",lotusui_class:"lotusui30",shelfBundle:null,dialogBundle:null,blankImg:"",autofocus:false,showMakePrivate:true,showFriendlyURL:true,showPageTemplate:false,templateHasContentMapping:false,value:{},templateString:"<div class=\"lotusDialogBorder\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\" dojoAttachPoint=\"dialogDiv\">"+"<div class=\"lotusDialog\">"+"<form dojoAttachPoint=\"newPageForm,containerNode\" action=\"javascript:;\">"+"<div class=\"lotusDialogHeader\">"+"<h1 class=\"lotusHeading\">"+"<span dojoAttachPoint=\"titleNode\" id=\"${id}NewPageDialogTitleSpan_id\">${titleText}</span>"+"</h1>"+"<a role=\"button\" href=\"javascript:void(0);\" dojoAttachPoint=\"closeButtonNode\" dojoAttachEvent=\"onclick:cancel\" class=\"lotusDialogClose\" title=\"${closeText}\">"+"<img src=\"${_blankGif}\" alt=\"\" aria-label=\"${closeText}\" />"+"<span class=\"lotusAltText\">X</span>"+"</a>"+"</div>"+"<div class=\"lotusDialogContent\">"+"<div>"+"<div class=\"lotusMessage\" dojoAttachPoint=\"newPageError\" style=\"display: none\" role=\"alert\">"+"${nlsTitleError}"+"</div>"+"<div><label for=\"${id}_name\">${nlsPageTitle}</label></div>"+"<div><input id=\"${id}_name\" type=\"text\" name=\"title\" dojoAttachPoint=\"typingNode, focusNode\" size=\"24\" aria-required=\"true\"/></div><br />"+"<div dojoAttachPoint=\"divFriendlyURL\">"+"<div><label for=\"${id}_friendly\">${nlsFriendlyURL}</label></div>"+"<div><input id=\"${id}_friendly\" type=\"text\" name=\"friendlyURL\" dojoAttachPoint=\"newPageFriendlyURL\" size=\"24\"/></div>"+"</div><br />"+"<div dojoAttachPoint=\"divPrivate\">"+"<input id=\"${id}_private\" type=\"checkbox\" name=\"private\" dojoAttachPoint=\"makePrivate\"/><span> <label for=\"${id}_private\">${nlsMakePrivate}</label></span>"+"</div><br />"+"<div dojoAttachPoint=\"divPageTemplate\">"+"<div><b>${nlsPageTemplate}</b>&nbsp;&nbsp;<span dojoAttachPoint=\"divSelectedTemplateName\">${nlsDefault}&nbsp;</span>&nbsp;&nbsp;<a href=\"javascript:void(0);\" class=\"lotusAction\" dojoAttachPoint=\"showHideTemplateNode\">${nlsChange}</a></div>"+"<div dojoAttachPoint=\"divTemplate\" style=\"display: none\">"+"<div><label for=\"${id}_template\">${nlsPageTemplateLabel}</label></div>"+"<div><select dojoAttachPoint=\"templateSelect\" id=\"${id}_template\" name=\"template\"><option selected value=\"\">${nlsNoTemplate}</option></select></div>"+"</div>"+"</div>"+"</div>"+"</div>"+"<div class=\"lotusDialogFooter\" dojoAttachPoint=\"dialogFooter\">"+"<input value=\"${okText}\" class=\"lotusFormButton\" dojoAttachPoint=\"submitDialog\" dojoAttachEvent=\"onclick:submit\" type=\"submit\"/> "+"<input dojoAttachPoint=\"dialogCancel\" dojoAttachEvent=\"onclick:cancel\" class=\"lotusBtn\" type=\"button\" role=\"button\" title=\"${cancelText}\" value=\"${cancelText}\" />"+"</div>"+"</form>"+"</div>"+"</div>",postMixInProperties:function(){delete this.content;if(this.params){delete this.params.content;}if(this.cssStateNodes){delete this.cssStateNodes.closeButtonNode;}this.shelfBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.dialogBundle=dojo.i18n.getLocalization("com.ibm.bundles","PageCreatorDialog");this.cancelText=this.shelfBundle["add_content_cancel"];this.closeText=this.shelfBundle["add_content_close"];this.okText=this.dialogBundle["create"];this.nlsPageTitle=this.dialogBundle["page_dialog_page_name"];this.nlsTitleError=this.shelfBundle["new_feed_enterTitle"];this.nlsFriendlyURL=this.dialogBundle["page_dialog_friendly_url_name"];this.nlsMakePrivate=this.dialogBundle["page_dialog_make_private"];this.titleText=this.dialogBundle["page_dialog_create_page"];this.nlsPageTemplate=this.dialogBundle["page_dialog_page_template"];this.nlsPageTemplateLabel=this.dialogBundle["page_dialog_page_template_label"];this.nlsNoTemplate=this.dialogBundle["page_dialog_no_template"];this.nlsDefault=this.dialogBundle["page_dialog_default"];this.nlsChange=this.dialogBundle["page_dialog_change"];this.nlsFriendlyUrlRequiredError=this.dialogBundle["page_dialog_friendly_url_required_error"];this.nlsFriendlyUrlModifiedWarning=this.dialogBundle["page_dialog_friendly_url_modified_warning"];this.inherited(arguments);},postCreate:function(){this.inherited(arguments);if(!this.showMakePrivate){dojo.destroy(this.divPrivate);delete this.divPrivate;}this.connect(this.typingNode,"onkeyup",function(){if(this.typingNode.value!=""){this.newPageError.style.display="none";}});this.connect(this.typingNode,"onkeypress",dojo.hitch(this,function(_c4){if(_c4.keyCode==dojo.keys.ENTER){this.submit();}}));if(this.showFriendlyURL){this.connect(this.typingNode,"onkeyup",function(){this.filterFriendlyURL(this.typingNode.value);});this.connect(this.typingNode,"onblur",function(){this.filterFriendlyURL(this.typingNode.value);});}else{dojo.destroy(this.divFriendlyURL);delete this.divFriendlyURL;}if(this.showPageTemplate){this.connect(this.showHideTemplateNode,"onclick",this.fireEventToTemplateSelectDialog);}else{dojo.destroy(this.divPageTemplate);delete this.divPageTemplate;}dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");},_findOrCreateLotusUIDIV:function(){var _c5=dojo.byId(this.lotusui_id);if(!_c5){_c5=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class,"wairole":"region","role":"region"},dojo.body());}dijit.setWaiState(_c5,"labelledby",this.id+"NewPageDialogTitleSpan_id");return _c5;},fireEventToTemplateSelectDialog:function(){if(this.showPageTemplate){var _c6=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();com.ibm.mashups.services.ServiceManager.getService("eventService").fireEvent("templateSelect","onTemplateSelect",this.templateSelect.options[0].value,null,"newPage");}},_escapeHTML:function(str){return str.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;");},_templateSelectChanged:function(_c7){if(this.showPageTemplate){if(_c7.resourceName){this.divSelectedTemplateName.innerHTML=this._escapeHTML(_c7.resourceName);}this.templateSelect.options[0].value=_c7.resourceValue;this.templateHasContentMapping=com.ibm.pb.customize.enabler.AddContentController._pageHasContentMapping(_c7.resourceValue);}},_validatePageName:function(_c8){dojo["require"]("com.ibm.mm.builder.builderpre");var cwm=com.ibm.mm.builder.coreWidgetsMessages;if(!_c8||_c8.length===0){return cwm.E_PAGE_UTIL_INVALID_NAME_EMPTY_0;}_c8=dojo.trim(_c8);if(_c8.length===0){return cwm.E_PAGE_UTIL_INVALID_NAME_BLANK_0;}if(_c8.length>=256){return cwm.E_PAGE_UTIL_INVALID_NAME_LENGTH_0;}var _c9=ibmConfig[com.ibm.mashups.enabler.services.ConfigConstants.BUILDER_TITLE_FILTER_REGEXP];if(_c9){if(_c8.match(_c9)){return cwm.E_PAGE_UTIL_INVALID_NAME_CHAR_0;}}return null;},submit:function(){var _ca=this.typingNode.value.replace(/<(?:\/?).+?>/g,"");this.typingNode.value=_ca;var _cb=this._validatePageName(_ca);if(_cb){this.newPageError.innerHTML=_cb;this.newPageError.style.display="block";return;}if(this.showFriendlyURL&&this.showPageTemplate&&this.templateHasContentMapping&&!this.newPageFriendlyURL.value){this.newPageError.innerHTML=this.nlsFriendlyUrlRequiredError;this.newPageError.style.display="block";this.newPageFriendlyURL.focus();return;}if(this.showFriendlyURL&&this.filterFriendlyURL(this.newPageFriendlyURL.value,true)){this.newPageError.innerHTML=this.nlsFriendlyUrlModifiedWarning;this.newPageError.style.display="block";this.newPageFriendlyURL.focus();return;}dojo.attr(this.submitDialog,"disabled","disabled");this.hide();this.beforeSubmit();var _cc=this;setTimeout(function(){_cc.onSubmit();},this.duration*2);},cancel:function(){if(!this._beingDestroyed){this.hide();}},onChange:function(arg){},onComplete:function(){},beforeSubmit:function(){},onSubmit:function(){if(ibmCfg.themeConfig.launchEditModeForNewPages){com.ibm.pb.control.RenderingController.getController().launchEditModeForNewPage=true;}this.value=dojo.formToObject(this.newPageForm);if(!this.value["private"]&&!this.showMakePrivate&&this.canMakePrivate){this.value["private"]="on";}this.value.onComplete=this.onComplete;this.onChange(this.value);},layout:function(){if(this.domNode.style.display!="none"){this._size();}return this.inherited(arguments);},focus:function(){this.newPageError.style.display="none";if(this.showMakePrivate){this.makePrivate.checked=false;}this.typingNode.value="";if(this.showFriendlyURL){this.newPageFriendlyURL.value="";}this.submitDialog.removeAttribute("disabled");this.show();this.focusNode.focus();if(this.showPageTemplate){this.fireEventToTemplateSelectDialog();}},filterFriendlyURL:function(_cd,_ce){var rv=false;var _cf=_cd.replace(/[!\*\'\(\);:@&=+$,\/?%#\[\]\s]/g,"-");if(_cf!==_cd){rv=true;}if(rv||!_ce){this.newPageFriendlyURL.value=_cf;}return rv;},destroy:function(){this.inherited(arguments);}});}if(!dojo._hasResource["com.ibm.pb.customize.enabler.ChangeStyleController"]){dojo._hasResource["com.ibm.pb.customize.enabler.ChangeStyleController"]=true;dojo.provide("com.ibm.pb.customize.enabler.ChangeStyleController");com.ibm.pb.customize.enabler.ChangeStyleController={current:"",currentSet:"",url:"",navModel:null,dirty:false,started:false,refresh:false,styleMetadataKey:"colorPalette",urlPrefix:ibmCfg.themeConfig.themeRootURI+"/",layoutParser:com.ibm.pb.layout.LayoutParser,startup:function(){this.logger.entering("startup");this.current=this.currentSet;this.started=true;this.setupUI();if(!this.navModel){this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();}this.logger.exiting("startup");},makeDirty:function(_d0){this.logger.entering("makeDirty",[_d0]);this.dirty=_d0;this.logger.exiting("makeDirty",[_d0]);},processChange:function(_d1){this.logger.entering("processChange",[_d1]);this.apply(_d1);this.logger.exiting("processChange",[_d1]);},apply:function(_d2){this.logger.entering("apply",[_d2]);if(_d2.id!=this.current){if(_d2.id==this.currentSet){this.makeDirty(false);}else{if(this.dirty===false){this.makeDirty(true);}}this.current=_d2.id;this.url=_d2.url;this._switchStylesheet(this.current,this.url);}com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);this.logger.exiting("apply",[_d2]);},undo:function(){this.logger.entering("undo");if(this.started){this.apply({id:this.currentSet});}this.logger.exiting("undo");},beforeSubmit:function(_d3){this.logger.entering("beforeSubmit",[_d3]);var dfd=new dojo.Deferred();dfd.callback();this.logger.exiting("beforeSubmit",[_d3]);return dfd;},submit:function(_d4){this.logger.entering("submit",[_d4]);if(!this.dirty){if(_d4.onComplete){_d4.onComplete();}this.logger.exiting("submit",[_d4]);return;}var _d5=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();if(_d5){var _d6=this.navModel.find(_d5);if(_d6){_d6.setFinishedCallback(dojo.hitch(this,"_setMetadata"),_d4);_d6.start(false);}else{this.logger.severe("submit","Cannot get page node object from Navigation Model",[_d4]);if(_d4.onError){_d4.onError();}}}else{this.logger.severe("submit","Cannot get current page id",[_d4]);if(_d4.onError){_d4.onError();}}this.logger.exiting("submit",[_d4]);},_setMetadata:function(_d7,_d8,_d9){this.logger.entering("_setMetadata",[_d7,_d8,_d9]);if(_d8=="200"){var _da=_d7.getContent().start();if(this.url&&_da.confirmSetMetaData(this.styleMetadataKey,this.url)){if(this.url){_da.setMetaData(this.styleMetadataKey,this.url);}}else{if(!this.url&&_da.confirmRemoveMetaData(this.styleMetadataKey)){_da.removeMetaData(this.styleMetadataKey);}else{this.logger.severe("submit","User does not have permission to set or delete page metadata",[_d9]);if(_d9.onError){_d9.onError();}}}this.makeDirty(false);this.currentSet=this.current;if(_d9.onComplete){_d9.onComplete();}}else{this.logger.severe("submit","Cannot find the page object for the current node",[_d9]);if(_d9.onError){_d9.onError();}}this.logger.exiting("_setMetadata",[_d7,_d8,_d9]);},_switchStylesheet:function(_db,url){var i,_dc,_dd=false;for(i=0;(_dc=document.getElementsByTagName("link")[i]);i++){if(_dc.getAttribute("rel").indexOf("style")>=0&&_dc.getAttribute("title")){if(_dc.getAttribute("title")==_db){_dc.disabled=false;if(dojo.isWebKit){_dc.disabled=true;_dc.disabled=false;}_dd=true;}else{_dc.disabled=true;}}}if(dojo.isWebKit){if(_dd){if(!this.webkitLink){this.webkitLink=dojo.create("link",{href:this.urlPrefix+url,type:"text/css",rel:"stylesheet"});document.getElementsByTagName("head")[0].appendChild(this.webkitLink);}else{this.webkitLink.href=this.urlPrefix+url;}}else{if(!url&&this.webkitLink){document.getElementsByTagName("head")[0].removeChild(this.webkitLink);this.webkitLink=null;}}}if(!_dd&&url){this._loadCss(url,_db,true,true);this._switchStylesheet(_db);}},_loadCss:function(_de,_df,_e0,_e1){if(dojo.isIE){var _e2=document.createElement("link");_e2.setAttribute("disabled",_e1);if(_df){_e2.title=_df;}var _e3=document.getElementsByTagName("head")[0];_e3.appendChild(_e2);_e2.setAttribute("type","text/css");_e2.setAttribute("rel",(_e0)?"alternate stylesheet":"stylesheet");_e2.setAttribute("href",this.urlPrefix+_de);_e2.setAttribute("media","screen");}else{var _e2=dojo.create("link",{type:"text/css",rel:(_e0)?"alternate stylesheet":"stylesheet",href:this.urlPrefix+_de,media:"screen",disabled:_e1});if(_df){_e2.title=_df;}var _e3=document.getElementsByTagName("head")[0];_e3.appendChild(_e2);}}};}if(!dojo._hasResource["com.ibm.pb.control.RenderingController"]){dojo._hasResource["com.ibm.pb.control.RenderingController"]=true;dojo.provide("com.ibm.pb.control.RenderingController");dojo.require("dojo.io.script");dojo.declare("com.ibm.pb.control.RenderingController",com.ibm.pb.iwidget.iWidgetBase,{MINIMIZE_CLASS:"ibm-minimized",MAXIMIZE_CLASS:"ibm-maximized",HIDDEN_CONTAINER_NAME:"ibmHiddenWidgets",PRERENDER_BUFFER_ID:"ibmPreRenderBuffer",MAXIMIZE_BUFFER_ID:"ibmMaximizeBuffer",MAXIMIZE_PLACEHOLDER_ID:"ibmMaximizePlaceHolder",STYLE_METADATA:"colorPalette",INITIAL_STYLE_ID:"initial",PAGE_STYLE_METADATA:"pageStyle",PAGE_STYLE_ID:"ibmPageStyleLink",widgetAccessor:null,navStateModel:null,maximizeBuffer:null,preRenderBuffer:null,layoutContainers:null,wStylesNodeID:"layout-wstate-styles",wStylesTemplate:[".component-control{","width: 0 !important;","height: 0 !important;","position: absolute;","top: -9999px;","z-index: -1;","}",".id-${id}{","width: 100% !important;","height: 100% !important;","position: static;","top: 0px;","z-index: 0;","}",".component-container{","height: 100% !important;","width: 100% !important;","margin: 0 !important;","padding: 0 !important;","}"].join(""),activeElement:null,layoutParser:com.ibm.pb.layout.LayoutParser,modeWidgets:{},constructor:function(){var lgr=this.LOGGER,_e4="constructor";lgr.entering(_e4,arguments);this.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.evtSvc.subscribeEvent(this.iWidgetConstants.CHANGE_WIDGETWINDOWSTATE,this,this.onWidgetWindowStateChange);this.evtSvc.subscribeEvent("com.ibm.mashups.builder.preRenderProcess",this,this.onPreRenderProcess);this.evtSvc.subscribeEvent("com.ibm.mashups.builder.layoutRefresh",this,this.onLayoutRefresh);this.configService=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);this.layoutContainers=dojo.byId("layoutContainers");this.preRenderBuffer=dojo.create("div",{id:this.PRERENDER_BUFFER_ID,style:{position:"absolute",top:"-9999px"}},dojo.byId("lotusMain"),"last");this.layoutContainersDefaultY=parseInt(dojo.coords(this.layoutContainers).y);this.wStylesNode=dojo.byId(this.wStylesNodeID);this.doCheckNewPage();lgr.exiting(_e4,arguments);},boostrapPreRenderProcess:function(){var _e5="boostrapPreRenderProcess",lgr=this.LOGGER;lgr.entering(_e5,arguments);try{var _e6=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _e7=nm.find(_e6).start();if(_e7&&_e7.getNavigationElementType()==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_LABEL){var _e8=this.configService.getValue("labelDefaultRuntimeContent");if(_e8){if(dojo.isFunction(_e8)){_e8=_e8(_e6);}this.layoutContainers.innerHTML=_e8;this.layoutContainers.className="ibmLayoutContainers";lgr.exiting(_e5,arguments);return;}}this._setActiveElement();this.processControls(this.layoutContainers,true);dojo.removeClass(this.layoutContainers,"ibmLayoutContainersHidden");if(this.activeElement){this._setActiveElementFocus();}}catch(e){console.log(e);}lgr.exiting(_e5,arguments);},onPreRenderProcess:function(_e9){var _ea="onPreRenderProcess",lgr=this.LOGGER;lgr.entering(_ea,arguments);this.preRenderBuffer.innerHTML=_e9.markup;var _eb=this.runtimeModel.getCurrentPage().getID();var _ec=this.navModel.find(_eb).start();if(ibmConfig["com.ibm.mashups.priming.enabled"]&&_ec.getNavigationElementType()==com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE&&!_e9.id&&this.runtimeModel.getCurrentPage().getPageMode()==com.ibm.mashups.enabler.model.state.PageModeAccessor.VIEW){console.info("activating Optimus Prime, savior of performance and killer of the Requesticons!");_ec.primeServerRuntimeContent(this.preRenderBuffer);}this.processControls(this.preRenderBuffer,!_e9.id);if(this.activeElement){this._setActiveElementFocus();}var _ed=_ec.getMetaData("transition");var _ee=null;if(ibmCfg&&ibmCfg.themeConfig&&ibmCfg.themeConfig.transitions){if(_ed){_ee=ibmCfg.themeConfig.transitions[_ed];}else{_ee=ibmCfg.themeConfig.transitions[ibmCfg.themeConfig.transitions.fallback];}}this.evtSvc.broadcastEvent("com.ibm.mashups.builder.preRenderComplete",{"id":_e9.id,"markupDivId":this.PRERENDER_BUFFER_ID,"fn":_ee});this.doChangeStyle();this.doCheckNewPage();lgr.exiting(_ea,arguments);},processControls:function(_ef,_f0){var _f1="processControls",lgr=this.LOGGER;lgr.entering(_f1,arguments);var _f2=new Array();var _f3=null;var pid=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _f4=com.ibm.mashups.enabler.model.state.AccessorFactory.getLayoutAccessor(this.navStateModel,pid);var _f5=_f4.getTemplateURL();var _f6=false;if(_f5){var _f7=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel().find(pid).start(true);var _f8=_f7.getContent().start(true);var _f9=_f8.getMetaData("com.ibm.portal.layout.template.ref");_f6=(_f5==_f9);}if(this.maximizeBuffer&&_f0){dojo.destroy(this.maximizeBuffer);}if(_f0){this.maximizeBuffer=dojo.create("div",{id:this.MAXIMIZE_BUFFER_ID,style:{position:"absolute",top:"-9999px"}},dojo.byId("lotusMain"),"last");}if(this.layoutContainers.style.height.length>0){this.layoutContainers.style.height="";}if(this.onBrowserResizeHandler){dojo.disconnect(this.onBrowserResizeHandler);}dojo.forEach(dojo.query(".component-control",_ef),function(_fa){var cid=this.layoutParser.extractID(_fa);var id=cid;_f3=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(this.navStateModel,id);_f2.push({node:_fa,id:id,state:_f3.getWindowState(),size:_f3.getSize()});},this);if(_f6){dojo.forEach(_f2,function(_fb){if(_fb.size){this._processWidgetSize(_fb.node,_fb.size);}},this);}dojo.forEach(_f2,function(_fc){if(_fc.state=="minimize"){this._processMinimize(_fc.node);}},this);dojo.forEach(_f2,function(_fd){if(_fd.state=="maximize"){this._processMaximize(_fd.node,_ef);}},this);dojo.forEach(dojo.query(".iw-iWidget[sandbox='true']",_ef),function(_fe){dojo.addClass(_fe,"extendediwiWidget");});for(var i=0,l=_f2.length;i<l;i++){_f2[i].node=null;_f2[i]=null;}_f2.length=0;lgr.exiting(_f1,arguments);},addModeWidgets:function(_ff,_100){if(!this.modeWidgets[_ff]){this.modeWidgets[_ff]=[];}this.modeWidgets[_ff].push.apply(this.modeWidgets[_ff],_100);},changePageMode:function(mode,cb){var page=this.runtimeModel.getCurrentPage(),_101=page.getPageMode(),me=this;if(mode&&mode!=_101){var _102=(typeof ibmCfg.themeConfig.editModeJSURL!=="undefined");var _103=function(){var _104=me.modeWidgets[mode];var _105=function(){me.evtSvc.broadcastEvent("com.ibm.mashups.builder.changePageMode",mode);page.setPageMode(mode);if(cb){cb();}};if(_102&&!me.editModeInitialized){com.ibm.themes.PageBuilder2.initEditMode();me.editModeInitialized=true;}if(_104&&!_104.loaded&&_104.length>0){var _106=_104.length,_107=function(){if(--_106<=0){_104.loaded=true;_105();}};dojo.forEach(_104,function(_108){this.onLoad(_108,_107);},com.ibm.pb.iwidget.control);}else{_105();}};if(_102&&!this.editModeInitialized){dojo.io.script.get({url:ibmCfg.themeConfig.editModeJSURL,checkString:"com.ibm.pb.PB2EditModeLoadedFlag",load:_103});}else{_103();}}},onLayoutRefresh:function(_109){if(this.widgetAccessor&&this.widgetAccessor.getWindowState()==this.widgetAccessor.MAX){this.evtSvc.publishEvent(this.iWidgetConstants.CHANGE_WIDGETWINDOWSTATE,{id:this.widgetAccessor.wid,newWindowState:this.widgetAccessor.NORMAL,oldWindowState:this.widgetAccessor.MAX});}},onWidgetWindowStateChange:function(_10a){var _10b="onWidgetWindowStateChange",lgr=this.LOGGER;lgr.entering(_10b,arguments);this.widgetAccessor=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(this.navStateModel,_10a.id);this.currentWidget=this.layoutParser.findById(_10a.controlId);switch(_10a.newWindowState){case this.widgetAccessor.MIN:this.doMinimize(_10a);break;case this.widgetAccessor.MAX:this.doMaximize(_10a);break;default:this.doRestore(_10a);}lgr.exiting(_10b,arguments);},doMinimize:function(_10c){var _10d="doMinimize",lgr=this.LOGGER;lgr.entering(_10d,arguments);this.widgetAccessor.setWindowState(this.widgetAccessor.MIN);if(_10c.oldWindowState==this.widgetAccessor.MAX){this.doRestore(_10c);}this._processMinimize(this.currentWidget);var lc=this._getLayoutControl(this.layoutParser.extractID(this.currentWidget));var _10e=lc.getMetadata("css-style");if(this.isFreeform()||_10e){this._processMinimizeFreeform(this.currentWidget);}this._updateNavStateModel(_10c);lgr.exiting(_10d,arguments);},doMaximize:function(_10f){var _110="doMaximize",lgr=this.LOGGER;lgr.entering(_110,arguments);this.widgetAccessor.setWindowState(this.widgetAccessor.MAX);if(_10f.oldWindowState==this.widgetAccessor.MIN){this.doRestore(_10f);}this._setActiveElement();this._processMaximize(this.currentWidget,this.layoutContainers);if(this.activeElement){this._setActiveElementFocus();}var lc=this._getLayoutControl(this.layoutParser.extractID(this.currentWidget));var _111=lc.getMetadata("css-style");if(this.isFreeform()||_111){this._processMaximizeFreeform(this.currentWidget);}this._updateNavStateModel(_10f);lgr.exiting(_110,arguments);},doRestore:function(_112){var _113="doRestore",lgr=this.LOGGER;lgr.entering(_113,arguments);this.widgetAccessor.setWindowState(this.widgetAccessor.NORMAL);if(_112.oldWindowState==this.widgetAccessor.MIN){this._removeMinimize(this.currentWidget);}else{if(_112.oldWindowState==this.widgetAccessor.MAX){this._removeMaximize(this.currentWidget);}}var lc=this._getLayoutControl(this.layoutParser.extractID(this.currentWidget));var _114=lc.getMetadata("css-style-backup");if(this.isFreeform()||_114){this._processRestoreFreeform(this.currentWidget);}this._updateNavStateModel(_112);lgr.exiting(_113,arguments);},doCheckNewPage:function(){var _115="doCheckNewPage",lgr=this.LOGGER;lgr.entering(_115,arguments);if(ibmCfg.themeConfig.autoEditNewPages&&dojo.query(".component-control",this.layoutContainers).length==0){lgr.trace(_115,"Going into edit mode on a blank page");this.changePageMode("edit");}else{if(this.launchEditModeForNewPage){lgr.trace(_115,"Going into edit mode for newly created page");this.launchEditModeForNewPage=false;var me=this;var _116=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getPageMode();if(_116=="view"){me.changePageMode("edit");}}}lgr.exiting(_115,arguments);},doChangeStyle:function(id){var _117="doChangeStyle",lgr=this.LOGGER;lgr.entering(_117,arguments);var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var pid=id||com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _118=nm.find(pid);_118.setFinishedCallback(dojo.hitch(this,function(page){this._processPageStyle(page.getMetaData(this.PAGE_STYLE_METADATA));var _119=page.getContent();_119.setFinishedCallback(dojo.hitch(this,function(_11a){this._findAggregatedColorPalette(nm,_11a,page);}));_119.start(false);}));_118.start(false);lgr.exiting(_117,arguments);},_processPageStyle:function(url){var _11b="_processPageStyle",lgr=this.LOGGER;lgr.entering(_11b,arguments);var link=dojo.byId(this.PAGE_STYLE_ID),head=document.getElementsByTagName("head")[0];if(link){head.removeChild(link);delete link;}if(url){var _11c=dojo.create("link",{type:"text/css",id:this.PAGE_STYLE_ID,rel:"stylesheet",href:url,media:"screen"});head.appendChild(_11c);}lgr.exiting(_11b,arguments);},_processColorPalette:function(url){var _11d="_processColorPalette",lgr=this.LOGGER;lgr.entering(_11d,arguments);var csc=com.ibm.pb.customize.enabler.ChangeStyleController;var _11e=this.INITIAL_STYLE_ID;if(url){_11e=url.substring(url.lastIndexOf("/")+1);}dojo.hitch(csc,"_switchStylesheet",_11e,url)();ibmCfg.portalConfig.aggregatedStyle=url;dojo.publish("com.ibm.pb.customize.pageStyleChanged",[url]);lgr.exiting(_11d,arguments);},_findAggregatedColorPalette:function(_11f,_120,page){var _121=_120.getMetaData(this.STYLE_METADATA);if(_121){this._processColorPalette(_121);}else{var _122=_11f.getParent(page);_122.setFinishedCallback(dojo.hitch(this,function(_123){if(!_123){this._processColorPalette(null);}else{if(_123.getContent){var _124=_123.getContent();_124.setFinishedCallback(dojo.hitch(this,function(_125){this._findAggregatedColorPalette(_11f,_125,_123);}));_124.start(false);}else{this._findAggregatedColorPalette(_11f,_123,_123);}}}));_122.start(false);}},_processWidgetSize:function(node,size){if(size.w){dojo.style(node,"width",size.w);}if(size.h){dojo.style(node,"height",size.h);}},_processMinimize:function(_126){var _127="_processMinimize",lgr=this.LOGGER;lgr.entering(_127,arguments);var _128=this.layoutParser.extractID(_126);var _129=dojo.byId(_128+"_minimizebuffer");if(!_129){_129=dojo.create("div",{id:_128+"_minimizebuffer",style:{display:"none"}},_126,"first");}dojo.style(_129,"height",_126.style.height);dojo.addClass(_126,this.MINIMIZE_CLASS);dojo.style(_126,"height",null);lgr.exiting(_127,arguments);},_processMaximize:function(_12a,_12b){var _12c="_processMaximize",lgr=this.LOGGER;lgr.entering(_12c,arguments);if(this.wStylesNode){var _12d=dojo.string.substitute(this.wStylesTemplate,{id:this.layoutParser.extractID(_12a)||""}),_12e=this.wStylesNode;this.wStylesNode=dojo.create("div",{id:this.wStylesNodeID,style:{"display":"none"}},dojo.body());this.wStylesNode.innerHTML=["<p>&nbsp;</p><style>",_12d,"</style>"].join("");dojo.destroy(_12e);}else{var _12f=dojo.contentBox(_12b).h;this.maximizeBuffer=dojo.byId(this.MAXIMIZE_BUFFER_ID);dojo.addClass(_12a,this.MAXIMIZE_CLASS);dojo.create("div",{id:this.MAXIMIZE_PLACEHOLDER_ID,style:{display:"none"}},_12a,"after");if(dojo.isIE){_12b.focus();}var _130=dojo.query("> DIV",_12b);for(var i=0,j=_130.length;i<j;i++){var node=_130[i];if(dojo.hasClass(node,"component-container")||dojo.hasClass(node,"component-container-resizer")){this.maximizeBuffer.appendChild(node);}}dojo.place(_12a,_12b,"last");this._maximizeWidget(_12a,true);}this.onBrowserResizeHandler=dojo.connect(window,"onresize",this,"_onBrowserResize");lgr.exiting(_12c,arguments);},_onBrowserResize:function(){var _131=dojo.query("."+this.MAXIMIZE_CLASS,this.layoutContainers)[0];this._maximizeWidget(_131,false);},_maximizeWidget:function(_132,_133){if(!_132){return;}var _134=dojo.coords(this.layoutContainers).y;if(_134<0){_134=this.layoutContainersDefaultY;}var _135=this._getWindowHeight();var _136=_135-_134;this.layoutContainers.style.height=_136+"px";var _137=dojo.contentBox(_132).h;var _138=dojo.query(".lotusWidgetBody",_132)[0];var _139=dojo.contentBox(_138);var _13a=_139.h;if(_133){if(_13a>0){this.maxWidgetStore={controlHeight:_137+"px",bodyHeight:_13a+"px"};}}var _13b=_136-25;var _13c;if((_13a>0)||(!this.maxWidgetStore)){_13c=_13b-(_137-_13a);}else{_13c=_13b-(parseInt(this.maxWidgetStore["controlHeight"])-parseInt(this.maxWidgetStore["bodyHeight"]));}_132.style.height=_13b+"px";_138.style.height=_13c+"px";var _13d={newHeight:_13c,newWidth:_139.w};var _13e=this.layoutParser.extractID(_132);this.evtSvc.publishEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+"."+_13e,_13d);},_getWindowHeight:function(){if(dojo.isIE){return document.documentElement.offsetHeight||document.body.offsetHeight;}else{return window.innerHeight;}},_removeMinimize:function(_13f){var _140="_removeMinimize",lgr=this.LOGGER;lgr.entering(_140,arguments);var _141=this.layoutParser.extractID(_13f);var _142=dojo.byId(_141+"_minimizebuffer");if(_142){dojo.style(_13f,"height",_142.style.height);dojo.style(_142,"height",null);}dojo.removeClass(_13f,this.MINIMIZE_CLASS);lgr.exiting(_140,arguments);},_removeMaximize:function(_143){var _144="_removeMaximize",lgr=this.LOGGER;lgr.entering(_144,arguments);dojo.removeClass(_143,this.MAXIMIZE_CLASS);var _145=dojo.byId(this.MAXIMIZE_PLACEHOLDER_ID);if(_145){_145.parentNode.replaceChild(_143,_145);var _146=dojo.query("> DIV",dojo.byId(this.MAXIMIZE_BUFFER_ID));for(var i=0,j=_146.length;i<j;i++){var node=_146[i];if(dojo.hasClass(node,"component-container")||dojo.hasClass(node,"component-container-resizer")){this.layoutContainers.appendChild(node);if(dojo.hasClass(node,"component-container")){dojo.publish("/com/ibm/mashups/livetext/livetextchanged",[node,true]);}}}}this.layoutContainers.style.height="";_143.style.height=this.maxWidgetStore["controlHeight"];var _147=dojo.query(".lotusWidgetBody",_143)[0];_147.style.height=this.maxWidgetStore["bodyHeight"];dojo.disconnect(this.onBrowserResizeHandler);lgr.exiting(_144,arguments);},_setActiveElement:function(){if(document.activeElement){this.activeElement=document.activeElement;}},_setActiveElementFocus:function(){if(this.activeElement.nodeName=="IFRAME"){return;}this.activeElement.focus();this.activeElement=null;},_updateNavStateModel:function(_148){var _149="_updateNavStateModel",lgr=this.LOGGER;lgr.entering(_149,arguments);this.evtSvc.publishEvent(com.ibm.mashups.iwidget.Constants.WIDGET_WINDOWSTATECHANGED,{id:_148.id,oldWindowState:_148.oldWindowState,newWindowState:_148.newWindowState});this.navStateModel.commit().start();lgr.exiting(_149,arguments);},isFreeform:function(){return dojo.query(".ibmFreeform",this.layoutContainers).length>0?true:false;},_getLayoutControl:function(id){var _14a=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _14b=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _14c=_14b.find(_14a).start();var _14d=_14b.getLayoutModel(_14c);return _14d.find(id).start();},_processMinimizeFreeform:function(_14e){var _14f="_processMinimizeFreeform",lgr=this.LOGGER;lgr.entering(_14f,arguments);var _150=this.layoutParser.extractID(_14e);var lc=this._getLayoutControl(_150);var _151=lc.getMetadata("css-style");lc.removeMetadata("css-style");lc.setMetadata("css-style-backup",_151);lgr.exiting(_14f,arguments);},_processMaximizeFreeform:function(_152){var _153="_processMaximizeFreeform",lgr=this.LOGGER;lgr.entering(_153,arguments);var _154=this.layoutParser.extractID(_152);var lc=this._getLayoutControl(_154);var _155=lc.getMetadata("css-style");lc.removeMetadata("css-style");lc.setMetadata("css-style-backup",_155);_152.style.position="";_152.style.left="";_152.style.top="";_152.style.height="";_152.style.width="";lgr.exiting(_153,arguments);},_processRestoreFreeform:function(_156){var _157="_processRestoreFreeform",lgr=this.LOGGER;lgr.entering(_157,arguments);var _158=this.layoutParser.extractID(_156);var lc=this._getLayoutControl(_158);var _159=lc.getMetadata("css-style-backup");lc.removeMetadata("css-style-backup");lc.setMetadata("css-style",_159);if(_159){if(this.isFreeform()){dojo.style(_156,"position","absolute");}var left=this._extractStyle(_159,"left");if(left){dojo.style(_156,"left",left);}var top=this._extractStyle(_159,"top");if(top){dojo.style(_156,"top",top);}var _15a=this._extractStyle(_159,"height");if(_15a){dojo.style(_156,"height",_15a);}var _15b=this._extractStyle(_159,"width");if(_15b){dojo.style(_156,"width",_15b);}}lgr.exiting(_157,arguments);},_extractStyle:function(_15c,_15d){var _15e=_15c.indexOf(_15d);if(_15e>-1){var end=_15c.indexOf(";",_15e);var _15f=_15c.substring(_15e+_15d.length+1,end);return dojo.trim(_15f);}else{return null;}}});(function(){var _160=null;com.ibm.pb.control.RenderingController.getController=function(){if(!_160){_160=new com.ibm.pb.control.RenderingController();}return _160;};})();}if(!dojo._hasResource["com.ibm.lang.DeferredQueue"]){dojo._hasResource["com.ibm.lang.DeferredQueue"]=true;dojo.provide("com.ibm.lang.DeferredQueue");dojo.declare("com.ibm.lang.DeferredQueue",null,{constructor:function(def){this.curDef=def;this.firstDef=def;},_addCallbacks:function(_161,_162){_161.addCallbacks(function(res){_162.callback(res);return res;},dojo.hitch(this,function(err){try{if(!err._raised){this.raiseError(err);err._raised=true;}}catch(err2){}_162.callback(err);return err;}));},addBefore:function(def){if(!this.firstDef){this.firstDef=def;}else{var _163=this.firstDef;this.firstDef=def;this._addCallbacks(def,_163);}},add:function(def){if(!this.firstDef){this.firstDef=def;}if(this.curDef){var _164=this.curDef;this.curDef=def;this._addCallbacks(_164,def);}else{this.curDef=def;}return this;},fire:function(res){if(this.firstDef){this.firstDef.callback(res);}return this;},raiseError:function(err){},destroy:function(){delete this.firstDef;delete this.curDef;delete this.raiseError;}});}if(!dojo._hasResource["com.ibm.data._NotificationHelper"]){dojo._hasResource["com.ibm.data._NotificationHelper"]=true;dojo.provide("com.ibm.data._NotificationHelper");dojo.declare("com.ibm.data._NotificationHelper",null,{onDelete:function(_165){return _165;},onNew:function(_166,_167){return {newItem:_166,parentInfo:_167};},onSet:function(item,_168,_169,_16a){return {item:item,attribute:_168,oldValue:_169,newValue:_16a};}});}if(!dojo._hasResource["com.ibm.data.EnablerModelStore"]){dojo._hasResource["com.ibm.data.EnablerModelStore"]=true;dojo.provide("com.ibm.data.EnablerModelStore");dojo.require("dojo.data.ItemFileWriteStore");dojo.declare("com.ibm.data.EnablerModelStore",com.ibm.data._NotificationHelper,{itemClass:"com.ibm.mm.enabler.navigation.NavigationNodeImpl",_isItemCreated:false,_isDirty:false,rootNode:null,globalPage:null,globalPageInSpace:null,constructor:function(){this.navigationUtil=com.ibm.mm.builder.utils.navigationUtil;this.pageUtil=com.ibm.mm.builder.utils.pageUtil;this.spaceUtil=com.ibm.mm.builder.utils.spaceUtil;var root=this.getRootNode();this.rootNode=root;},getRootNode:function(){var pid=null;var _16b=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage();var _16c=[];if(!_16b){var _16d=this.spaceUtil.getCurrentSpaceId();pid=_16d?this.pageUtil.getFirstPageInSpace(_16d):this.pageUtil.getFirstRootPageId();}else{pid=_16b.getID();}if(!pid){return null;}_16b.setID(pid);var _16d=this.spaceUtil.getSpaceIdByPageId(pid);if(_16d!==this.spaceUtil.getCurrentSpaceId()){this.spaceUtil.setSpaceId(_16d);}var _16e=this.navigationUtil.getNavigationModel();var _16f=_16e.find(pid).start();var _170=this.navigationUtil.getNavigationRootNodeId();var _171=this.navigationUtil.getNavigationRootNodeId(this.spaceUtil.getCurrentSpaceId());while(_16f&&_16f.getID()!==_170&&_16f.getID()!==_171){_16c.push(_16f);_16f=_16e.getParent(_16f.getID()).start();}return _16c[_16c.length-1];},getFeatures:function(){return {"dojo.data.api.Read":true,"dojo.data.api.Write":true,"dojo.data.api.Identity":"id","dojo.data.api.Notification":true};},getValue:function(item,_172,_173){var _174=this.getValues(item,_172);return (_174.length>0)?_174[0]:_173;},getValues:function(item,_175){var _176=null;switch(_175){case "id":_176=[item.getID()];break;case "title":if(item.title){_176=[item.title];}else{_176=[this.pageUtil.getUnescapedPageTitle(item.getID())];}break;case "description":_176=[this.pageUtil.getPageDescription(item.getID())];break;case "type":_176=item.type;break;case "parent":if(this.globalPage&&item.openPageId&&item.pageLoadedSpaceId===com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceId()){if(dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid)){var _177=dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid);var _178=com.ibm.mm.builder.utils.pageUtil.getPageNode(_177);var _179=this.navigationUtil.getNavigationModel();var _17a=_179.getParent(_178.getID()).start();_176=[_17a];}else{console.log("Error: previous_pid in cookie is missing!");}}else{var _179=this.navigationUtil.getNavigationModel();var _17a=_179.getParent(item.getID()).start();_176=[_17a];}break;case "parentId":var _179=this.navigationUtil.getNavigationModel();var _17a=_179.getParent(item.getID()).start();var _17b=_17a?_17a.getID():null;_176=[_17b];break;case "children":var _179=this.navigationUtil.getNavigationModel();var _17c=_179.getChildren(item);var _17d=[];while(_17c.hasNext()){var _17e=_17c.next();var _17f=com.ibm.mm.builder.utils.pageUtil.isVisiable(_17e);if(_17f){_17d.push(_17e);}}if(this.globalPage&&this.globalPageInSpace===com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceId()){_17d.push(this.globalPage);}_176=_17d;break;case "hasChildren":if(com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceNode()==item){return false;}var _179=this.navigationUtil.getNavigationModel();_176=[_179.hasChildren(item)];break;default:_176=null;}_176=(_176&&dojo.isArray(_176))?_176:[_176];return _176;},getAttributes:function(item){return ["id","title","description","type","parent","parentId","children","hasChildren"];},hasAttribute:function(item,_180){return !!(this.getValue(item,_180));},containsValue:function(item,_181,_182){return this.getValue(item,_181)==_182;},isItem:function(_183){return _183.declaredClass=="com.ibm.mm.enabler.navigation.NavigationNodeImpl"&&_183.getID();},isItemLoaded:function(_184){return this.isItem(_184)&&_184.loaded;},loadItem:function(_185){},getLabel:function(item){return this.getValue(item,"title");},getLabelAttributes:function(item){return ["title"];},fetch:function(_186){if(!_186){_186={};}var me=this;_186.aborted=false;if(!_186.scope){_186.scope=dojo.global;}var _187=_186.query;var _188=[];var _189=this.navigationUtil.getNavigationModel();if(_187===null){_188.push(this.rootNode);}else{var _18a=com.ibm.mm.builder.utils.spaceUtil;var pid=_187.uri;if(!pid){var _18b=_18a.getCurrentSpaceId();pid=_18b?this.pageUtil.getFirstPageInSpace(_18b):this.pageUtil.getFirstRootPageId();}if(pid){if(com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceId()==pid){_188.push(com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceNode());_188.push(this.navigationUtil.getNavigationRootNode());}else{var _18c=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage();_18c.setID(pid);var _18b=_18a.getSpaceIdByPageId(pid);if(_18b!==_18a.getCurrentSpaceId()){_18a.setSpaceId(_18b);}var _18d=this.navigationUtil.getNavigationModel();var _18e=_18d.find(pid).start();while(_18e){_188.push(_18e);_18e=_18d.getParent(_18e.getID()).start();}}}}_188=this.processFetchedItems(_188,_186);if(_186.onBegin){_186.onBegin.call(_186.scope,this.getResultSize(_188.root,_186,_188),_186);}if(_186.onItem){for(var i=0;i<_188.length;i++){if(_186.aborted){return;}_186.onItem.call(_186.scope,_188[i],_186);}}if(_186.onComplete){if(_186.aborted){return;}if(!_186.onItem){_186.onComplete.call(_186.scope,_188,_186);}else{_186.onComplete.call(_186.scope,null,_186);}}},processFetchedItems:function(_18f,_190){return _18f;},getRootItem:function(){return this.rootNode;},getIdentity:function(item){return this.getValue(item,"id");},getIdentityAttributes:function(item){return ["id"];},fetchItemByIdentity:function(_191){var node=this.pageUtil.getPageNode(getkeywordArgs.identify);node=node?node:null;if(_191.onItem){if(!_191.scope){_191.scope=dojo.global;}_191.onItem.call(_191.scope,node);}},deleteItem:function(item){return false;},setValue:function(item,_192,_193){var lc=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();switch(_192){case "id":item.setID(_193);break;case "title":item.setTitle(_193,lc.getLocale(item)||ibmConfig.locale);break;case "description":item.setDescription(item,lc.getLocale(item)||ibmConfig.locale);break;case "type":item.type=_193;break;case "parent":break;case "parentId":break;case "children":break;case "hasChildren":break;case "position":var _194=com.ibm.mm.builder.utils.navigationUtil.getNavigationModel();_194.insert(item,_193.newParent,_193.next);item.loaded=false;item.created=true;if(_193.oldParent==_193.newParent){this.onSet(item,_192,_193.oldParent,_193.next);}else{if(_193.next){this.onSet(item,"parent_next",_193.oldParent,_193.next);}else{this.onSet(item,"parent",_193.oldParent,_193.newParent);}}break;}},newItem:function(_195,_196){var _197=_195.label;var _198=com.ibm.mm.builder.utils;var _199=_198.navigationUtil.getNavigationModel();var _19a;if(_195.openPageId){_19a=com.ibm.mm.builder.utils.pageUtil.getPageNode(_195.openPageId);_19a.loaded=false;_19a.created=false;_19a.openPageId=_195.openPageId;_19a.pageLoadedSpaceId=_195.pageLoadedSpaceId;_19a.onCreate=function(){};this.globalPageInSpace=_19a.pageLoadedSpaceId;this.globalPage=_19a;}else{_19a=_199.create(null);_19a.setTitle(_197,dojo.locale);_19a.setTitle(_197,ibmConfig["default.locale"]);var _19b=_198.themeUtil.getThemeId(_196.parent.getID());if(!_198.themeUtil.getThemeModel().find(_19b).start()){_19b=_198.themeUtil.getDefaultThemeId();}_19a.setTheme(_19b);_19a.title=_197;_19a.loaded=false;_19a.created=false;_19a.onCreate=function(){};_199.insert(_19a,_196.parent,null);var lm=_199.getLayoutModel(_19a.getID());var _19c=lm.create();lm.insert(_19c);_19c.setFragment(" ");}this.onNew(_19a,_196);this._isItemCreated=true;return _19a;},isCreated:function(item){return !!item.created;},addOnCreate:function(item,_19d){if(this.isCreated(item)){_19d(item);}else{if(!item.onCreateDefQueue){item.onCreateDefQueue=new com.ibm.lang.DeferredQueue(new dojo.Deferred());}item.onCreateDefQueue.add((new dojo.Deferred()).addCallback(_19d));}},_fireCreated:function(item){if(item.onCreateDefQueue){try{item.onCreateDefQueue.fire(item);}catch(ex){console.log(ex);}}},save:function(_19e){var _19f=com.ibm.mm.builder.utils;var _1a0=_19f.navigationUtil.getNavigationModel();this.keywordArgs=_19e;if(this.keywordArgs.openPageId){var _1a1=com.ibm.mm.builder.utils.pageUtil.getPageNode(this.keywordArgs.openPageId);if(this._isItemCreated){this.keywordArgs=_19e;this.keywordArgs.item.onCreate();this.keywordArgs.item.created=true;this.keywordArgs.item.setID(_1a1.getID());this._fireCreated(this.keywordArgs.item);this.onSaveComplete();this._isItemCreated=false;if(this.keywordArgs.onComplete){this.keywordArgs.onComplete(this.keywordArgs);}}}else{if(this._isItemCreated){this.keywordArgs=_19e;this.keywordArgs.item.onCreate();var _1a2=_1a0.commit();_1a2.addFinishedCallback(dojo.hitch(this,function(node){this.keywordArgs.item.created=true;var es=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");es.broadcastEvent("com.ibm.mashups.builder.pageCreated",node.getID());this.keywordArgs.item.setID(node.getID());this._fireCreated(this.keywordArgs.item);this.onSaveComplete();this._isItemCreated=false;if(this.keywordArgs.onComplete){this.keywordArgs.onComplete(this.keywordArgs);}}));_1a2.start(false);}if(this._isDirty){_1a0.commit().start(false);this._isDirty=false;if(_19e.onComplete){_19e.onComplete(_19e);}}}},revert:function(){this._isItemCreated=false;this._isDirty=false;return false;},onSaveComplete:function(args){}});}if(!dojo._hasResource["com.ibm.data.DataTreeModel"]){dojo._hasResource["com.ibm.data.DataTreeModel"]=true;dojo.provide("com.ibm.data.DataTreeModel");dojo.declare("com.ibm.data.DataTreeModel",null,{store:null,query:null,root:null,addQueryParams:null,constructor:function(args){dojo.mixin(this,args);if(!this.addQueryParams){this.addQueryParams={};}},destroy:function(){},reset:function(){this.root=null;},getRoot:function(_1a3,_1a4){},mayHaveChildren:function(item){},getChildren:function(_1a5,_1a6,_1a7){},getIdentity:function(item){return this.store.getIdentity(item);},getLabel:function(item){return this.store.getLabel(item);},getParent:function(item){},newItem:function(args,_1a8){},pasteItem:function(_1a9,_1aa,_1ab,_1ac,_1ad){},onChange:function(item){},onChildrenChange:function(_1ae,_1af){},onTreeChange:function(_1b0,_1b1,_1b2,_1b3){},toString:function(){return "[TreeModel "+this.declaredClass+"]";}});}if(!dojo._hasResource["com.ibm.data.EnablerTreeModel"]){dojo._hasResource["com.ibm.data.EnablerTreeModel"]=true;dojo.provide("com.ibm.data.EnablerTreeModel");dojo.declare("com.ibm.data.EnablerTreeModel",com.ibm.data.DataTreeModel,{eModel:null,store:null,query:null,root:null,addQueryParams:null,constructor:function(args){dojo.mixin(this,args);if(!this.addQueryParams){this.addQueryParams={};}this.connections=[];if(this.store.getFeatures()["dojo.data.api.Notification"]){this.connections.concat([dojo.connect(this.store,"onNew",this,"_onNew"),dojo.connect(this.store,"onSet",this,"_onSet"),dojo.connect(this.store,"onDelete",this,"_onDelete")]);}},destroy:function(){dojo.forEach(this.connections,dojo.disconnect);},reset:function(){this.root=null;},getRoot:function(_1b4,_1b5){this.root=this.store.rootNode;_1b4(this.root);},mayHaveChildren:function(item){return this.store.getValue(item,"hasChildren");},getChildren:function(_1b6,_1b7,_1b8){var _1b9=this.store;if(this.mayHaveChildren(_1b6)){_1b6._children=this.store.getValues(_1b6,"children");if(_1b6._children&&_1b6._children.length>0){_1b7(_1b6._children);}else{_1b6._children=null;_1b7(_1b6._children);}}else{_1b6._children=null;_1b7(_1b6._children);}},getIdentity:function(item){return this.store.getIdentity(item);},getLabel:function(item){return this.store.getLabel(item);},getParent:function(item){return this.store.getValue(item,"parent");},newItem:function(args,_1ba){if(_1ba.getRootNavigation){_1ba=com.ibm.mm.builder.utils.navigationUtil.getNavigationRootNode(_1ba.getID());}var _1bb=this.store.newItem(args,{parent:_1ba});var es=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");if(args.openPageId){this.store.save({item:_1bb,onComplete:args.onComplete,onError:args.onError,scope:args.scope,openPageId:args.openPageId,pageLoadedSpaceId:args.pageLoadedSpaceId});es.broadcastEvent("com.ibm.mashups.builder.saveCheck",dojo.hitch(this,function(){es.broadcastEvents(args.eventsArray||[],args.lastVisitedPage,args.openPageId);}));}else{this.store.save({item:_1bb,onComplete:args.onComplete,onError:args.onError,scope:args.scope});es.broadcastEvent("com.ibm.mashups.builder.saveCheck",dojo.hitch(this,function(){es.broadcastEvent("com.ibm.mashups.builder.switchPage",this.getIdentity(_1bb));}));}return _1bb;},deleteItem:function(args,item){var _1bc=this.getParent(item);this.store.globalPage=null;this._removeChildItem(_1bc,item,null,dojo.hitch(this,function(){this.onTreeChange(_1bc,null,_1bc);}));var es=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");if(args.openPagePayload){}else{es.broadcastEvent("com.ibm.mashups.builder.saveCheck",dojo.hitch(this,function(){es.broadcastEvent("com.ibm.mashups.builder.switchPage",args.lastVisitedPage);}));}},clearGlobalPageItem:function(args,item){var _1bd=this.getParent(item);this.store.globalPage=null;this._removeChildItem(_1bd,item,null,dojo.hitch(this,function(){this.onTreeChange(_1bd,null,_1bd);}));},isCreated:function(item){return this.store.isCreated(item);},addOnCreate:function(item,_1be){return this.store.addOnCreate(item,_1be);},pasteItem:function(_1bf,_1c0,_1c1,copy,_1c2,_1c3){this.store.setValue(_1bf,"position",{newParent:_1c1,oldParent:_1c0,next:_1c2});this.store._isDirty=true;this.store.save({});this.store.onSaveComplete();},toString:function(){return "[TreeModel "+this.declaredClass+"]";},_onNew:function(item,_1c4){this.newPageItem=item;this.newPageParent=_1c4.parent;this._insertChildItem(this.newPageParent,this.newPageItem,null,dojo.hitch(this,function(){this.onTreeChange(this.newPageItem,null,this.newPageParent);}));},_onDelete:function(item){},_onSet:function(item,_1c5,_1c6,_1c7){if(_1c5.indexOf("parent")>-1){var _1c8=null;if(_1c5=="parent_next"){_1c8=this.store.getValue(item,"parent");}else{_1c8=_1c7;_1c7=null;}this._removeChildItem(_1c6,item);this._insertChildItem(_1c8,item,_1c7,dojo.hitch(this,function(){this.onTreeChange(item,_1c6,_1c8,_1c7);}));}else{if(_1c5=="position"){this._moveChildItem(_1c6,item,_1c7,dojo.hitch(this,function(){this.onTreeChange(item,_1c6,_1c6,_1c7);}));}else{this.onChange(item);}}},refreshItemChildren:function(item,_1c9){item._children=null;var func=_1c9?_1c9:function(_1ca){this.onChildrenChange(item,_1ca);};this.getChildren(item,dojo.hitch(this,func));},_insertChildItem:function(_1cb,item,_1cc,_1cd){this.getChildren(_1cb,dojo.hitch(this,function(_1ce){if(!_1ce){_1ce=[];}if(!_1cc){_1ce.push(item);}else{var id=this.getIdentity(_1cc);for(var i=0;i<_1ce.length;i++){if(this.getIdentity(_1ce[i])==id){_1ce.splice(i,0,item);break;}}}if(_1cd){_1cd();}this.onChildrenChange(_1cb,_1ce);}));},_removeChildItem:function(_1cf,item,_1d0){this.getChildren(_1cf,dojo.hitch(this,function(_1d1){var id=this.store.getIdentity(item);if(_1d1){for(var i=0;i<_1d1.length;i++){if(this.store.getIdentity(_1d1[i])==id){_1d1.splice(i,1);break;}}}if(_1d0){_1d0();}this.onChildrenChange(_1cf,_1d1);}));},_moveChildItem:function(_1d2,item,_1d3,_1d4){this.getChildren(_1d2,dojo.hitch(this,function(_1d5){var id=this.store.getIdentity(item);var _1d6=_1d5.length-1;for(var i=0;i<_1d5.length;i++){if(this.store.getIdentity(_1d5[i])==id){_1d5.splice(i,1);i--;}else{if(_1d3&&this.store.getIdentity(_1d5[i])==_1d3){_1d5.splice(i,0,item);i++;}}}if(!_1d3){_1d5.push(item);}if(_1d4){_1d4();}this.onChildrenChange(_1d2,_1d5);}));},onTreeChange:function(_1d7,_1d8,_1d9,_1da){},onChange:function(item){},onChildrenChange:function(_1db,_1dc){}});}if(!dojo._hasResource["com.ibm.data.SelectionModel"]){dojo._hasResource["com.ibm.data.SelectionModel"]=true;dojo.provide("com.ibm.data.SelectionModel");dojo.declare("com.ibm.data.SelectionModel",null,{treeModel:null,selectionPath:[],constructor:function(args){dojo.mixin(this,args);this.modelConnection=dojo.connect(this.treeModel,"onTreeChange",this,"onModelTreeChange");},atLevel:function(_1dd,_1de){return this.selectionPath[_1de?this.selectionPath.length-1-_1dd:_1dd];},getPath:function(){return this.selectionPath.slice();},onModelTreeChange:function(_1df,_1e0,_1e1,_1e2){if(_1e0!=_1e1&&dojo.some(this.selectionPath,function(item){return this._itemIsEqual(item,_1df);},this)){this._calculateNewPath(this.selectionPath[0]);this.onSelectionPathChange(false);}},_itemIsEqual:function(_1e3,_1e4){return (_1e3&&this.treeModel.getIdentity(_1e3))==(_1e4&&this.treeModel.getIdentity(_1e4));},_calculateNewPath:function(_1e5){var cur=_1e5;this.selectionPath.splice(0,this.selectionPath.length);while(cur){this.selectionPath.push(cur);cur=this.treeModel.getParent(cur);}},onSelectionPathChange:function(_1e6){},changeSelection:function(_1e7){this._calculateNewPath(_1e7);this.onSelectionPathChange(true);}});}if(!dojo._hasResource["com.ibm.mm.builder.navigationHelper"]){dojo._hasResource["com.ibm.mm.builder.navigationHelper"]=true;dojo.provide("com.ibm.mm.builder.navigationHelper");dojo.declare("com.ibm.mm.builder.navigationHelper",null,{loaded:false,init:function(){this.store=new com.ibm.data.EnablerModelStore();this.navigationUtil=com.ibm.mm.builder.utils.navigationUtil;this.pageUtil=com.ibm.mm.builder.utils.pageUtil;this.spaceUtil=com.ibm.mm.builder.utils.spaceUtil;var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _1e8=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage();var _1e9=_1e8.getID();if(!_1e9){var _1ea=this.spaceUtil.getCurrentSpaceId();_1e9=_1ea?this.pageUtil.getFirstPageInSpace(_1ea):this.pageUtil.getFirstRootPageId();if(!_1e9&&_1ea){_1e9=_1ea;}else{currentPageID=this.navigationUtil.getNavigationRootNode().getID();}}var _1eb=dojo.hitch(this,function(_1ec){this.treeModel=new com.ibm.data.EnablerTreeModel({newItem:function(args){args.label=args.title;return this.inherited("newItem",arguments);},root:_1ec[_1ec.length-1],store:this.store});this.selectionModel=new com.ibm.data.SelectionModel({treeModel:this.treeModel,selectionPath:_1ec});this.loaded=true;});var args={onComplete:_1eb,onError:function(err){console.error(err);throw err;},query:{uri:_1e9}};if(!this.treeModel||!this.selectionModel){this.store.fetch(args);}},getStore:function(){return this.store;},getTreeModel:function(){return this.treeModel;},getSelectionModel:function(){return this.selectionModel;}});com.ibm.mm.builder.navigationHelper=new com.ibm.mm.builder.navigationHelper();}if(!dojo._hasResource["com.ibm.pb.data.EnablerNavigationTreeModel"]){dojo._hasResource["com.ibm.pb.data.EnablerNavigationTreeModel"]=true;dojo.provide("com.ibm.pb.data.EnablerNavigationTreeModel");(function(){var _1ed=com.ibm.mashups.enabler,em=_1ed.model,_1ee=em.state,_1ef=_1ee.AccessorFactory,_1f0=_1ed.space.Factory,_1f1=_1ed.navigation.Factory,_1f2=_1ed.context.Factory.getLocalizedContext(),_1f3=_1ed.DeferredOperation.prototype,_1f4={};dojo.forEach(["GET","CREATE","MODIFY","DELETE"],function(c){this[c]=_1f3["OPERATION_"+c];},_1f4);dojo.declare("com.ibm.pb.data.EnablerNavigationTreeModel",com.ibm.pb.logging.Loggable,{SAVE_CHECK:"com.ibm.mashups.builder.saveCheck",SWITCH_PAGE:"com.ibm.mashups.builder.switchPage",root:null,nsm:null,nm:null,spm:null,codes:{HTTP_OK:200},globalPages:[],globalPageInSpace:null,constructor:function(args){dojo.safeMixin(this,args);if(!this.nsm){this.nsm=_1ee.NavigationStateModelFactory.getNavigationStateModel();}if(!this.nm){this.nm=_1f1.getNavigationModel();}if(!this.spm){this.spm=_1f0.getSpaceModel();}if(!this.delaySave){this.delaySave=false;}},destroy:function(){},reset:function(root){this.root=root;},_getRootBySpace:function(_1f5,_1f6,_1f7){var _1f8="_getRootBySpace",lgr=this.LOGGER;lgr.entering(_1f8,arguments);try{var _1f9;if(_1f5){_1f9=this.nm.find(_1f5.getRootNavigation());}else{_1f9=this.nm.getRoot();}_1f9.setFinishedCallback(dojo.hitch(this,function(_1fa,_1fb){lgr.trace(_1f8,"Callback: ${0} ${1}",[_1fa,_1fb]);if(_1fa&&!(_1fa instanceof Error)){this.root=_1fa;if(_1f7.onItem){_1f7.onItem(this.root);}}else{if(_1f7.onError){lgr.error(_1f8,"Error getting the root nav node in space ${0}: ${1}",[_1f5,err]);_1f7.onError(_1fa);}}}));lgr.trace(_1f8,"Finding root nav node in space ${0}",[_1f5]);node=_1f9.start(false);}catch(err){lgr.error(_1f8,"Error starting find operation for the root nav node in space ${0}: ${1}",[_1f5,err]);console.error(err);}lgr.exiting(_1f8,arguments);},getRoot:function(_1fc,_1fd){var _1fe="getRoot",lgr=this.LOGGER;lgr.entering(_1fe,arguments);var _1ff=dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageOpenedSpaceId);if(_1ff){var id=_1ff;}else{var id=_1ef.getSpaceAccessor(this.nsm).getSpaceID();}var _200={onItem:_1fc,onError:_1fd};if(id){var dfd=this.spm.find(id);dfd.setFinishedCallback(dojo.hitch(this,"_getRootBySpace"),_200);dfd.start(false);}else{this._getRootBySpace(null,200,_200);}lgr.exiting(_1fe,arguments);},mayHaveChildren:function(item){return this.nm.hasChildren(item);},getChildren:function(_201,_202,_203){var _204="getChildren",lgr=this.LOGGER;lgr.entering(_204,arguments);var dfd=this.nm.getChildren(_201);var _205=[];dfd.setForEachCallback(function(_206){lgr.trace(_204,"Got child ${0}",[_206]);if(_206&&!_206.isHidden()){_205.push(_206);}});dfd.setFinishedCallback(dojo.hitch(this,function(res,_207,_208){lgr.trace(_204,"Finished getting children with status ${0}",[_207]);if(_207==this.codes.HTTP_OK){if(this.globalPageInSpace){var _209=com.ibm.mm.builder.utils.spaceUtil.getSpaceByNavigation(_201);if(_209&&this.globalPageInSpace==_209.getID()){for(var i in this.globalPages){var _20a=false;for(var j in _205){if(this.globalPages[i].getID()==_205[j].getID()){_20a=true;}}if(!_20a){_205.push(this.globalPages[i]);}}}}if(_202){_202(_205);}}else{if(_203){_203(res);}}}));dfd.start(false);lgr.exiting(_204,arguments);},getIdentity:function(item){if(item==null){return null;}return item.getID();},getLabel:function(item){if(item==null){return null;}return _1f2.getTitle(item);},getParent:function(item){var _20b="getParent",lgr=this.LOGGER;lgr.entering(_20b,arguments);if(this._isGlobalPage(item)){var _20c=dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageOpenedSpaceId);if(_20c){var _20d=com.ibm.mm.builder.utils.navigationUtil.getNavigationRootNode(_20c);}else{console.log("Error: globaPageOpenedSpaceId in cookie is missing!");}}else{var _20d=this.nm.getParent(item).start();}lgr.exiting(_20b,[_20d]);return _20d;},newItem:function(args,_20e){var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _20f={type:com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE};if(args["private"]=="on"){_20f["private"]=true;}var _210=args["template"]!=null;if(_210){_20f.pageTemplate=args["template"];}var _211=nm.create(_20f);_211.setTitle(args.title,dojo.locale);_211.setTitle(args.title,ibmCfg.enablerConfig["default.locale"]);if(args.friendlyURL){_211.setMetaData("com.ibm.portal.friendly.name",args.friendlyURL);}var _212=this.getIdentity(_20e);var _213=nm.find(_212).start();nm.insert(_211,_213);var _214=_211.getContent().start();if(!_210){_214.setStaticContentURL(ibmConfig.defaultLayoutTemplateURI);}var dfd=nm.commit();var fail=false;dfd.setOperationCallback(function(ctx){var _215=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");var page=ctx.resource;var mode=ctx.mode;var _216=ctx.parameter;if(ctx.request){var _217=ctx.request.statusCode;}if(!fail&&page&&page instanceof com.ibm.mashups.enabler.navigation.NavigationElement&&page.getID&&_217<300){fail=false;_215.broadcastEvent("com.ibm.mashups.builder.switchPage",page.getID());}else{if(_217>=400){fail=true;if(ctx.request){var _218=ctx.request.responseText;}var _219=dojo.i18n.getLocalization("com.ibm.bundles","PageCreatorDialog");var _21a=new com.ibm.widgets.StatusMessage("error",_218||_219["page_dialog_error_creating_page"],"");dojo.publish("/message/status",[{message:_21a,uid:"ibmStatusBox"}]);}}if(args.callback){args.callback(page,mode,_217,_216);}},null,true);dfd.setFinishedCallback(function(page,_21b){if(args.callback){args.callback(page,null,_21b);}});dfd.start(true);return _211;},newGlobalItem:function(args,_21c){if(_21c.getRootNavigation){_21c=com.ibm.mm.builder.utils.navigationUtil.getNavigationRootNode(_21c.getID());}var _21d=com.ibm.mm.builder.utils.pageUtil.getPageNode(args.openPageId);_21d.loaded=false;_21d.created=false;_21d.openPageId=args.openPageId;_21d.pageLoadedSpaceId=args.pageLoadedSpaceId;_21d.onCreate=function(){};this.globalPageInSpace=_21d.pageLoadedSpaceId;this.globalPages.push(_21d);this.newPageItem=_21d;this.newPageParent=_21c;this._isItemCreated=true;return _21d;},_createItem:function(args,_21e){var _21f=args.title;var _220,mix={loaded:false,created:false};if(args.openPageId){_220=this.nm.find(args.openPageId).start();mix=dojo.mixin(mix,{openPageId:args.openPageId,pageLoadedSpaceId:args.pageLoadedSpaceId});this.globalPageInSpace=args.pageLoadedSpaceId;this.globalPage=_220;}else{if(!this.nm.confirmCreate(args)){return;}_220=this.nm.create(args);_220.setTitle(_21f,_1f2.getPreferredLocale());_220.setTitle(_21f,ibmCfg.enablerConfig["default.locale"]);_220.setTheme(_21e.parent.getTheme());mix.title=_21f;this.nm.insert(_220,_21e.parent,args.next);}dojo.mixin(_220,mix);return _220;},save:function(_221){var _222=_221.scope||dojo.global;var _223=com.ibm.mm.builder.utils;var _224=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");if(_221.openPageId){var _225=this.nm.find(_221.openPageId).start();_225.created=true;_225.setID(_225.getID());this._fireCreated(_225);if(_221.onComplete){_221.onComplete.call(_222);}}else{var _226=this.nm.commit();_226.setOperationCallback(dojo.hitch(this,function(node){node.created=true;var es=com.ibm.mashups.services.ServiceManager.getService("eventService");es.broadcastEvent("com.ibm.mashups.builder.pageCreated",node.getID());node.setID(node.getID());this._fireCreated(node);}));_226.setFinishedCallback(function(page,_227){if(_227>=400){var _228=dojo.i18n.getLocalization("com.ibm.bundles","Theme");var _229=new com.ibm.widgets.StatusMessage("error",_228["dnd_move_failed"],"");dojo.publish("/message/status",[{message:_229,uid:"ibmStatusBox"}]);setTimeout(function(){_224.broadcastEvent("com.ibm.mashups.builder.refreshNavigation");},500);}if(_221.onComplete){_221.onComplete.call(_222);}});_226.start(false);if(this._isDirty){this.nm.commit().start(false);this._isDirty=false;if(_221.onComplete){_221.onComplete(_221);}}}},_fireCreated:function(item){if(item.onCreateDefQueue&&!item.onCreateDefQueue._fired){try{item.onCreateDefQueue.fire(item);item.onCreateDefQueue._fired=true;}catch(ex){console.log(ex);}}},deleteGlobalItem:function(args,item){var _22a=this.getParent(item);for(var i in this.globalPages){if(this.globalPages[i].getID()==item.getID()){this.globalPages.splice(i,1);break;}}this.onTreeChange(null,_22a,_22a);},isCreated:function(item){return true;},addOnCreate:function(item,_22b){if(this.isCreated(item)){if(_22b){_22b(item);}}else{if(!item.onCreateDefQueue){item.onCreateDefQueue=new com.ibm.lang.DeferredQueue(new dojo.Deferred());}item.onCreateDefQueue.add(new dojo.Deferred().addCallback(_22b));}},_updateChildren:function(_22c){if(_22c){this.getChildren(_22c,dojo.hitch(this,function(_22d){this.onChildrenChange(_22c,_22d);}));}},pasteItem:function(_22e,_22f,_230,copy,_231,_232){var _233="pasteItem",lgr=this.LOGGER;lgr.entering(_233,arguments);if(!this.nm.confirmInsert(_22e,_230,_231)){lgr.trace("confirmInsert returns false");}else{lgr.trace("insert into the tree model");this.nm.insert(_22e,_230,_231);this.onTreeChange(_22e,_22f,_230,_231);this._updateChildren(_22f);this._updateChildren(_230);}lgr.exiting(_233,arguments);},toString:function(){return "[TreeModel "+this.declaredClass+"]";},_onNew:function(item,_234){},_onDelete:function(item){},_onSet:function(item,_235,_236,_237){},_isGlobalPage:function(item){for(var i in this.globalPages){if(this.globalPages[i].getID()==item.getID()){return true;}}return false;},onTreeChange:function(_238,_239,_23a,_23b){},onChange:function(item){},onChildrenChange:function(_23c,_23d){}});})();}if(!dojo._hasResource["com.ibm.pb.tree.Traversal"]){dojo._hasResource["com.ibm.pb.tree.Traversal"]=true;dojo.provide("com.ibm.pb.tree.Traversal");dojo.declare("com.ibm.pb.tree.Traversal",com.ibm.pb.logging.Loggable,{model:null,constructor:function(_23e){this.model=_23e;this.stopped=true;},isStopped:function(){return this.stopped;},find:function(node,test,_23f){var _240="find",lgr=this.LOGGER;lgr.entering(_240,arguments);this.collect(node,test,function(list){_23f(list[0]);},function(_241){return _241.list.length>0;});lgr.exiting(_240,arguments);},collect:function(node,test,_242,stop,_243){var _244="collect",lgr=this.LOGGER;lgr.entering(_244,arguments);this.stopped=false;if(!_243){_243={};}if(!_243.list){_243.list=[];}_243.level=1;this.visit(node,test,_242,stop||function(){return false;},_243);lgr.exiting(_244,arguments);},visit:function(node,test,_245,stop,_246){var _247="visit",lgr=this.LOGGER;lgr.entering(_247,arguments);if(test(this.model,node)){lgr.trace(_247,"Found positive testing node ${0}",[node]);_246.list.push(node);}if(stop(_246)){this.stopped=true;lgr.trace(_247,"Hard stopping traversal and calling back with results ${0}",[_246.list]);_245(_246.list);}else{this.next(node,test,_245,stop,_246);}lgr.exiting(_247,arguments);},next:function(node,test,_248,stop,_249){}});}if(!dojo._hasResource["com.ibm.pb.tree.DFSTraversal"]){dojo._hasResource["com.ibm.pb.tree.DFSTraversal"]=true;dojo.provide("com.ibm.pb.tree.DFSTraversal");dojo.declare("com.ibm.pb.tree.DFSTraversal",com.ibm.pb.tree.Traversal,{next:function(node,test,_24a,stop,_24b){var _24c="next",lgr=this.LOGGER;lgr.entering(_24c,arguments);var _24d=null;if(this.model.hasChildren(node)){lgr.trace(_24c,"Traversing down children of ${0}",[node]);var _24e={node:node,test:test,callback:_24a,stop:stop,params:_24b,list:[]},me=this;this.model.getChildren(node).setForEachCallback(function(){me._collectChild.apply(me,arguments);},_24e).setFinishedCallback(function(){me._visitChildren.apply(me,arguments);},_24e).start(false);}else{lgr.trace(_24c,"Reached end of traversal at ${0}",[node]);if(!this.isStopped()){_24a(_24b.list);}}lgr.exiting(_24c,arguments);},_collectChild:function(_24f,_250){_250.list.push(_24f);},_visitChildren:function(_251,_252,_253){var _254="_visitChildren",lgr=this.LOGGER,me=this;lgr.entering(_254,[_251,_252,_253]);if((_252!==200)&&(_252!="200")){lgr.severe(_254,"An error occurred ${0} ${1}",[_252,_251]);lgr.exiting(_254,arguments);return;}var _255=function(){if(!me.isStopped()){var _256=_253.list.shift();if(_256){me._visitChild(_256,_253.test,_255,_253.stop,dojo.delegate(_253.params,{level:_253.params.level+1}));}else{lgr.trace(_254,"Reached end of list of children of ${0}",[_253.node]);_253.callback(_253.params.list);}}else{lgr.trace(_254,"Stopped in the middle of the list of children of ${0}",[_253.node]);_253.callback(_253.params.list);}};lgr.exiting(_254,arguments);_255();},_visitChild:function(node,test,_257,stop,_258){var _259="_visitChild",lgr=this.LOGGER,me=this;lgr.trace(_259,"Visiting next node in list of children ${0}",[node]);if(!this.isStopped()){this.visit(node,test,_257,stop,_258);}else{lgr.trace(_259,"Hard stopped iterating");}}});}if(!dojo._hasResource["com.ibm.pb.control.NavigationController"]){dojo._hasResource["com.ibm.pb.control.NavigationController"]=true;dojo.provide("com.ibm.pb.control.NavigationController");dojo.require("dojo.i18n");dojo.require("dojo.hash");dojo.declare("com.ibm.pb.control.NavigationController",com.ibm.pb.iwidget.iWidgetBase,{navigationConstants:com.ibm.mashups.enabler.navigation.Constants,accFactory:com.ibm.mashups.enabler.model.state.AccessorFactory,treeModel:null,selectionModel:null,_changingSelection:false,currentThemeTemplate:"",lastNonGlobalPageId:null,lastSpaceId:null,globalPageLoadedSpaceId:null,globalPagesOpened:[],globalPagesOpenedBy:[],constructor:function(){var lgr=this.LOGGER,_25a="constructor",me=this;lgr.entering(_25a,arguments);this.themeBundle=dojo.i18n.getLocalization("com.ibm.bundles","Theme");this.navWidgetBundle=dojo.i18n.getLocalization("com.ibm.bundles","NavWidget");this.nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this.spm=com.ibm.mashups.enabler.space.Factory.getSpaceModel();this.spaceAcc=this.accFactory.getSpaceAccessor(this.nsm);this.nm.addStrategy(new com.ibm.mashups.enabler.strategy.TreeLoadAheadStrategy(10,1));this.nm.addStrategy(new com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy(50));this.treeModel=new com.ibm.pb.data.EnablerNavigationTreeModel({nm:this.nm,nsm:this.nsm,spm:this.spm,delaySave:true});this.treeModel.getRoot=dojo.hitch(this,"getRootNavigation");this.selectionModel=new com.ibm.data.SelectionModel({treeModel:this.treeModel,selectionPath:[]});this._restorePersistedGlobalPages();this._changingSelection=true;this.bootstrapping=true;this._bootstrapState=false;this.evtSvc.subscribeEvent(this.iWidgetConstants.NAVSTATE_UPDATED,this,function(){var _25b="NavStateUpdatedHandler";lgr.entering(_25b,arguments);this.nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this.spaceAcc=this.accFactory.getSpaceAccessor(this.nsm);this.treeModel.nsm=this.nsm;var cid=this.getCurrentPageId();if(!this._changingSelection&&cid!==this.currentPageId){this.onSwitchPage(cid,{skipStateUpdate:true});}lgr.exiting(_25b,arguments);});this.evtSvc.subscribeEvent(this.builderEvents.SWITCH_PAGE,this,"onSwitchPage");this.evtSvc.subscribeEvent(this.builderEvents.SWITCH_SPACE,this,"onSwitchSpace");this.evtSvc.subscribeEvent(this.builderEvents.REFRESH_NAVIGATION,this,"onRefreshNavigation");this.evtSvc.subscribeEvent(this.builderEvents.PAGE_SWITCHED,this,"_updateSelModel");this.evtSvc.subscribeEvent("com.ibm.mashups.builder.saveCheck",this,"dirtyPageCheck");dojo.subscribe("/dojo/hashchange",this,this._processHashChange);lgr.exiting(_25a,arguments);},getSelectionModel:function(){return this.selectionModel;},getTreeModel:function(){return this.treeModel;},getThemeTemplate:function(node){return node.getMetaData("com.ibm.portal.theme.template.file.name.html")||"";},getThemeId:function(node){var _25c=node.getThemeIdentifier?node.getThemeIdentifier():null;while(!_25c&&node){node=this.nm.getParent(node).start();_25c=(node&&node.getThemeIdentifier)?node.getThemeIdentifier():null;}if(!_25c){_25c=this.runtimeModel.getCurrentTheme();}return _25c.getID();},getThemeProfile:function(node){var _25d=node.getMetaData("resourceaggregation.profile")||null;while(!_25d&&node){node=this.nm.getParent(node).start();if(node){_25d=node.getMetaData("resourceaggregation.profile")||null;}}return _25d||"";},getRenderMode:function(node){var _25e=node.getMetaData("com.ibm.portal.rendertype")||null;while(!_25e&&node){node=this.nm.getParent(node).start();if(node){_25e=node.getMetaData("com.ibm.portal.rendertype")||null;}}return _25e||ibmConfig.defaultRenderingMode;},_visibleChildFinder:function(node){var _25f="_visibleChildFinder";this._findFirstVisible(node,dojo.hitch(this,function(_260){if(_260&&!(_260 instanceof Error)){this._setCurrentNavNode(_260);}else{this.LOGGER.severe(_25f,"Error finding a visible child of navigation node ${0}: ${1}",[node,_260]);}}));},_isNavLabel:function(_261,node){return node.getNavigationElementType()===this.navigationConstants.NAVIGATION_LABEL;},_setCurrentNavNode:function(node,_262){var _263="_setCurrentNavNode",lgr=this.LOGGER,_264=this.bootstrapping;lgr.entering(_263,arguments);this.currentNavNode=node;this.currentPageId=node.getID();if(this.bootstrapping){this.renderMode=this.getRenderMode(node);this.bootstrapping=false;}this.currentThemeTemplate=this.getThemeTemplate(node).toLowerCase();this.currentThemeProfile=this.getThemeProfile(node).toLowerCase();this._walkUpTree(node,dojo.delegate(_262,{bootstrapping:_264}));this._updateNavigationState(this.currentPageId,_262);if(this.renderMode==="iwidget"){this.setBrowserTitle(node);}lgr.exiting(_263,arguments);},_calculateCurrentPage:function(){var _265="_calculateCurrentPage",lgr=this.LOGGER;lgr.entering(_265,arguments);var _266=this.getCurrentPageId();if(!_266){this._bootstrapState=true;_266=this.runtimeModel.getCurrentPage().getID();}else{this._bootstrapState=false;lgr.trace(_265,"Got current page from the navigation state",[]);}if(!_266){lgr.trace(_265,"No runtime model of current page, getting root navigation",[]);this.treeModel.getRoot(dojo.hitch(this,"_visibleChildFinder"),dojo.hitch(this,function(err){lgr.severe(_265,"Error getting root navigation node ${0}",[err]);}));}else{lgr.trace(_265,"Found current page id ${0}",[_266]);if(_266&&com.ibm.mm.builder.utils.spaceUtil.getSpaceIdByPageId(_266)!=this.globalPageLoadedSpaceId&&!this._isOpenedGlobalPage(_266)){this.onClearGlobalPage();}this.nm.find(_266).setFinishedCallback(dojo.hitch(this,function(node,_267,_268){if(_267==200){this.refresh(node.getID());}else{lgr.trace(_265,"Error finding the current page with id ${0} ${1}",[_266,node||""]);var _269=this.nm.getRoot().start().getID();var _26a=com.ibm.mm.builder.utils.spaceUtil.getSpaceIdByPageId(_269);com.ibm.mm.builder.utils.spaceUtil.setSpaceId(_26a);this.refresh(_269);}})).start(false);}lgr.exiting(_265,arguments);},_updateSelModel:function(){this.selectionModel.changeSelection(this.currentNavNode);},_walkUpTree:function(_26b,_26c){var _26d="_walkUpTree",lgr=this.LOGGER,me=this;if(_26b){var dfd=this.nm.getParent(_26b).setFinishedCallback(function(node){me._walkUpTree(node,_26c);});dfd.start(false);}else{lgr.trace(_26d,"Updating selection to ${0}",[this.currentNavNode.getID()]);if(_26c.bootstrapping){this._updateSelModel();}else{}}},_findFirstVisible:function(_26e,_26f){var _270="_findFirstVisible",lgr=this.LOGGER,me=this;lgr.entering(_270,arguments);var dft=new com.ibm.pb.tree.DFSTraversal(this.nm);dft.find(_26e,function(_271,_272){return !me._isNavLabel(_271,_272)&&!_272.isHidden();},function(_273){lgr.trace(_270,"Found visible non-label node ${0}, executing callback",[_273]);_26f(_273);});lgr.exiting(_270,arguments);},getCurrentSpaceId:function(){var _274=dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageOpenedSpaceId);if(_274){return _274;}else{return this.spaceAcc.getSpaceID();}},getCurrentPageId:function(){var _275=this.accFactory.getPageAccessor(this.nsm,this.spaceAcc.getSpaceID());return _275.getPageID();},getRootNavigation:function(_276,_277){var _278="getRootNavigation",lgr=this.LOGGER;lgr.entering(_278,arguments);var id=this.getCurrentSpaceId(),_279={onItem:_276,onError:_277};if(id){var dfd=this.spm.find(id);dfd.setFinishedCallback(dojo.hitch(this,"_getRootBySpace"),_279);dfd.start(false);}else{this._getRootBySpace(null,200,_279);}lgr.exiting(_278,arguments);},_getRootBySpace:function(_27a,_27b,_27c){var _27d="_getRootBySpace",lgr=this.LOGGER;lgr.entering(_27d,arguments);try{var _27e;if(_27a){_27e=this.nm.find(_27a.getRootNavigation().getID());}else{_27e=this.nm.getRoot();}_27e.setFinishedCallback(dojo.hitch(this,function(_27f,_280){var _281=_27d+":callback";lgr.entering(_281,arguments);if(_27f&&!(_27f instanceof Error)){this.root=_27f;if(_27c.onItem){_27c.onItem(_27f);}}else{if(_27c.onError){lgr.severe(_281,"Error getting the root nav node in space ${0}: ${1}",[_27a,_27f]);_27c.onError(_27f);}}}));lgr.trace(_27d,"Finding root nav node in space ${0}",[_27a]);_27e.start(false);}catch(err){lgr.severe(_27d,"Error starting find operation for the root nav node in space ${0}: ${1}",[_27a,err]);}lgr.exiting(_27d,arguments);},onSwitchSpace:function(_282,_283){var _284="onSwitchSpace",lgr=this.LOGGER,me=this;lgr.entering(_284,arguments);this.dirtyPageCheck(function(){me.switchSpaceHandler(_282,_283);});lgr.exiting(_284,arguments);},switchSpaceHandler:function(_285,_286){var _287="switchSpaceHandler",lgr=this.LOGGER,me=this;lgr.entering(_287,arguments);if(_285){var _288=com.ibm.mashups.enabler.space.Factory.getSpaceModel();var _289=_288.find(_285).start(true);if(!_289){lgr.exiting(_287,arguments);return;}}if(this._isOpenedGlobalPage(this.currentPageId)){this.accFactory.getPageAccessor(this.nsm,this.lastSpaceId).setPageID(this.lastNonGlobalPageId);}if(_285!=this.lastSpaceId){this.onClearGlobalPage();}this.spaceAcc.setSpaceID(_285);if(!_285){dojo.cookie("inPersonalSpace","true");}else{dojo.cookie("inPersonalSpace",null);}var _28a=this.getCurrentPageId(),_28b=null;if(_28a){_28b=this.nm.find(_28a).start();this.accFactory.getPageAccessor(this.nsm,_285).setPageID(_28a);}if(!_28b){this.getRootNavigation(function(_28c){me._findFirstVisible(_28c,function(_28d){if(_28d){me.evtSvc.broadcastEvent(me.builderEvents.SWITCH_PAGE,_28d.getID());}else{if(!_285){com.ibm.mm.builder.utils.navigationUtil.autoAcceptPagesFromDefaultGroup();}me.evtSvc.broadcastEvent(me.builderEvents.SWITCH_PAGE,_28c.getID());}});},function(err){lgr.severe(_287,"${0}",[err.message]);});}else{this.evtSvc.broadcastEvent(this.builderEvents.SWITCH_PAGE,_28a);}lgr.exiting(_287,arguments);},onSwitchPage:function(_28e,_28f){var _290="onSwitchPage",lgr=this.LOGGER;lgr.entering(_290,arguments);if(_28e==this.currentPageId&&!com.ibm.mm.builder.utils.pageUtil.isRoot(_28e)){if(this.spaceAcc.getSpaceID()!==null&&this.spaceAcc.getSpaceID()!==undefined&&this.lastSpaceId!==null&&this.lastSpaceId!==undefined){if(this.spaceAcc.getSpaceID()===this.lastSpaceId){lgr.trace(_290,"skipping switchPage handling as already the current page");lgr.exiting(_290,arguments);return;}}else{lgr.trace(_290,"skipping switchPage handling as already the current page");lgr.exiting(_290,arguments);return;}}if(!this._isOpenedGlobalPage(_28e)){this.lastNonGlobalPageId=_28e;}if(_28e&&com.ibm.mm.builder.utils.spaceUtil.getSpaceIdByPageId(_28e)!=this.globalPageLoadedSpaceId&&!this._isOpenedGlobalPage(_28e)){this.onClearGlobalPage();}this._changingSelection=true;this.nm.find(_28e).setFinishedCallback(dojo.hitch(this,"switchPageHandler"),_28f).start(false);this.lastSpaceId=this.getCurrentSpaceId();lgr.exiting(_290,arguments);},switchPageHandler:function(_291,_292,_293){var _294="switchPageHandler",lgr=this.LOGGER;lgr.entering(_294,arguments);if(this.renderMode!="iwidget"){lgr.trace(_294,"Current rendertype: ${0} - performing a full page refresh",[this.renderMode]);this._reloadToPageWithConfirm(_291.getID());}else{var _295=this._isNavLabel(this.nm,_291);lgr.trace(_294,"Is ${0} a label? ${1}",[_291,_295]);if(_295){this._findFirstVisible(_291,dojo.hitch(this,function(node){if(node){this.evtSvc.broadcastEvent(this.builderEvents.SWITCH_PAGE,node.getID());}else{lgr.trace(_294,"Could not find visible non-label descendant of ${0}, loading directly",[_291]);return this._postLabelCheck(_291,_293);}}));}else{this._postLabelCheck(_291,_293);}}lgr.exiting(_294,arguments);},setLastNonGlobalPage:function(){var es=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");es.broadcastEvent("com.ibm.mashups.builder.switchPage",this.lastNonGlobalPageId);this.onClearGlobalPage();},clearLoginFlag:function(){dojo.cookie(com.ibm.mm.builder.constant.cookieKey_login_flag,null,{expires:-1});},_postLabelCheck:function(_296,_297){var _298="_postLabelCheck",lgr=this.LOGGER;lgr.entering(_298,arguments);var _299=this.getRenderMode(_296);if(_299.toLowerCase()!="iwidget"){lgr.trace(_298,"Switched page rendertype: ${0} - performing a full page refresh",[_299]);this._reloadToPageWithConfirm(_296.getID());}else{var _29a=this.getThemeTemplate(_296).toLowerCase();if(_29a!=this.currentThemeTemplate&&!((_29a===""&&this.currentThemeTemplate==="theme.html")||(_29a==="theme.html"&&this.currentThemeTemplate===""))){lgr.trace(_298,"Switched theme template from ${0} to ${1}",[this.currentThemeTemplate,_29a]);this._reloadToPageWithConfirm(_296.getID());}else{var _29b=this.getThemeProfile(_296).toLowerCase();if(_29b!=this.currentThemeProfile){lgr.trace(_298,"Switched theme profile from ${0} to ${1}",[this.currentThemeProfile,_29b]);this._reloadToPageWithConfirm(_296.getID());}else{this.currentThemeTemplate=_29a;this.currentThemeProfile=_29b;this._postGlobalPageCheck(_296,_297);}}}lgr.exiting(_298,arguments);},_postGlobalPageCheck:function(_29c,_29d){var _29e="_postGlobalPageCheck",lgr=this.LOGGER;lgr.entering(_29e,arguments);var cb=dojo.hitch(this,function(){try{this.refresh(_29c.getID(),true,_29d);}catch(e){this._changingSelection=false;lgr.severe(_29e,"An error occured during page switching ${0}",[e]);}});this.dirtyPageCheck(cb);lgr.exiting(_29e,arguments);},setBrowserTitle:function(_29f){var _2a0="setBrowserTitle",lgr=this.LOGGER;lgr.entering(_2a0,arguments);var _2a1="";if(this.nm.getRoot().start().getID()!=_29f.getID()){_2a1=this.treeModel.getLabel(_29f);}var _2a2=dojo.trim(_2a1||""),_2a3=com.ibm.mashups.enabler.context.Factory.getPageContext();if(_2a3){var _2a4=this.configSvc.getValue(this.configConstants.PRODUCT_NAME);if(_2a4){if(!_2a1||_2a2===""){_2a3.setBrowserTitle(_2a4);}else{_2a3.setBrowserTitle(_2a1);}}else{if(_2a1&&_2a2!==""){_2a3.setBrowserTitle(_2a1);}}}lgr.exiting(_2a0,arguments);},dirtyPageCheck:function(_2a5,_2a6,_2a7){var _2a8="dirtyPageCheck",lgr=this.LOGGER;lgr.entering(_2a8,arguments);if(com.ibm.pb.contextMenu.sharedActions.widgetEditModeChecker()){lgr.exiting(_2a8,arguments);return;}if(this.runtimeModel.getCurrentPage().isDirty()){lgr.trace(_2a8,"Page is dirty, display confirmation dialog",[]);var cws=com.ibm.mm.builder.coreWidgetsStrings;dojo["require"]("com.ibm.mm.builder.dialog.PageSaveConfirmDialog");var _2a9=new com.ibm.mm.builder.dialog.PageSaveConfirmDialog({contentWarning:cws.I_PAGE_SAVE_WARNING,contentQuestion:cws.I_PAGE_SAVE_SUGGEST,btnSaveText:cws.I_COMMON_SAVE,btnNotSaveText:cws.I_PAGE_SAVE_NO_SAVE,btnCancelText:cws.I_PAGE_SAVE_KEEP_EDIT,hideNotSave:true,callbackSave:_2a5,callbackNotSave:_2a6,callbackCancel:_2a7});_2a9.show();}else{lgr.trace(_2a8,"Page is NOT dirty, callback immediately",[]);if(_2a5){_2a5();}}lgr.exiting(_2a8,arguments);},_reloadToPageWithConfirm:function(_2aa){var cb=dojo.hitch(this,this.reloadToPage,_2aa);this.dirtyPageCheck(cb);},reloadToPage:function(_2ab){var _2ac="reloadToPage",lgr=this.LOGGER;lgr.entering(_2ac,arguments);var _2ad=this.nm.find(_2ab).start();if(_2ad){this._setCurrentNavNode(_2ad);}var _2ae=com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getUrlGenerator().getUrl(this.nsm,null,{skipState:true,pocURI:"nm:oid:"+_2ab});lgr.trace(_2ac,"Navigating to URL immediately ${0}",[_2ae]);lgr.exiting(_2ac,arguments);com.ibm.mm.builder.utils.navigationUtil.setPageIDCookie(_2ab);var _2af=top.location.href;top.location.href=_2ae;if(this._removeHash(_2af)==this._removeHash(_2ae)){setTimeout(function(){window.__page_reload_marker=true;top.location.reload(false);},50);}},_removeHash:function(s){var hash=s.indexOf("#");if(hash>=0){s=s.substring(0,hash);}return s;},onRefreshNavigation:function(){this.LOGGER.entering("onRefreshNavigation",arguments);try{this.refresh();}catch(e){var msg=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_NAV_REFRESH_NAVIGATION_1,[e.message]);this.LOGGER.severe("onRefreshNavigation",msg);setTimeout(function(){throw e;},1);}this.LOGGER.exiting("onRefreshNavigation",arguments);},refresh:function(pid,_2b0,_2b1){var _2b2="refresh",lgr=this.LOGGER,me=this,node,_2b3,_2b4=this.getCurrentSpaceId();lgr.entering(_2b2,arguments);if(pid){if(!this.bootstrapping){lgr.trace(_2b2,"Checking for theme change");var _2b5=this.runtimeModel.getCurrentTheme().getID();var _2b6=this.nm.find(pid).start();if(_2b6&&this.getThemeId(_2b6)!=_2b5){lgr.trace(_2b2,"Theme changed!");var cb=dojo.hitch(this,this.reloadToPage,pid);this.dirtyPageCheck(cb);lgr.exiting(_2b2,arguments);return;}}else{if(!_2b1){_2b1={};}_2b1.skipStateUpdate=!this._bootstrapState;lgr.trace(_2b2,"Bootstrapping to current page ${0}",[pid]);}}else{pid=this.getCurrentPageId();if(!pid){lgr.trace(_2b2,"Find the first visible page from the current root");this.getRootNavigation(function(item){lgr.trace(_2b2,"Initiate page switch to ${0}",item);me.refresh(me.treeModel.getIdentity(item),_2b0);},function(err){this._changingSelection=false;lgr.severe(_2b2,"Error getting root navigation ${0}",err.message);setTimeout(function(){throw err;},1);});lgr.exiting(_2b2,arguments);return;}}var _2b7=this.nm.getRoot().start();if(pid==_2b7.getID()){var _2b8=false;this._findFirstVisible(_2b7,dojo.hitch(this,function(_2b9){if(_2b9&&!(_2b9 instanceof Error)){_2b8=true;this.onSwitchPage(_2b9.getID());return;}}));if(_2b8){lgr.exiting(_2b2,arguments);return;}}if(pid){lgr.trace(_2b2,"Reloading navigation");node=this.nm.find(pid).start();if(node){this._setCurrentNavNode(node,_2b1);}}this._changingSelection=false;if(_2b0){var nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();lgr.trace(_2b2,"Setting timeout to fire page switched event later");setTimeout(dojo.hitch(this,function(){lgr.trace(_2b2,"Sending page switched event");this.runtimeModel.getCurrentPage().setDirty(false);this.evtSvc.broadcastEvent(this.builderEvents.PAGE_SWITCHED,pid);}),50);}lgr.exiting(_2b2,arguments);},_updateNavigationState:function(_2ba,_2bb){var _2bc="_updateNavigationState",lgr=this.LOGGER;lgr.entering(_2bc,arguments);this.runtimeModel.getCurrentPage().setID(_2ba);if(!_2bb||!_2bb.skipStateUpdate){var _2bd=com.ibm.mm.builder.utils.spaceUtil.getSpaceIdByPageId(_2ba);if(_2bd!==com.ibm.mm.builder.utils.spaceUtil.getCurrentSpaceId()){com.ibm.mm.builder.utils.spaceUtil.setSpaceId(_2bd);}this.accFactory.getPageAccessor(this.nsm,_2bd).setPageID(_2ba);this.navigationStateUpdated=true;this.nsm.commit({addToHistory:true}).start();}lgr.exiting(_2bc,arguments);},onOpenPage:function(_2be){var _2bf="onOpenPage",lgr=this.LOGGER;lgr.entering(_2bf,arguments);var _2c0=null;if(_2be.payload.pid){_2c0=_2be.payload.pid;}else{_2c0=_2be.payload;}var es=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");es.broadcastEvent("com.ibm.mashups.builder.saveCheck",dojo.hitch(this,function(){var _2c1="onOpenPage_saveCheck",lgr=this.LOGGER;lgr.entering(_2c1,arguments);if(this._isOpenedGlobalPage(_2c0)){}else{this.lastVisitedPage=com.ibm.mm.builder.utils.pageUtil.getCurrentPageId();if(this.lastSpaceId){this.globalPageLoadedSpaceId=this.lastSpaceId;}else{this.globalPageLoadedSpaceId=this.getCurrentSpaceId();}this._addToGlobalPages(_2c0,this.lastVisitedPage);var _2c2=com.ibm.mm.builder.utils.pageUtil.getPageNode(_2c0);var _2c3=com.ibm.mm.builder.utils.navigationUtil.getNavigationRootNode(this.globalPageLoadedSpaceId);var args={title:_2c2.getTitle(dojo.locale),pageLoadedSpaceId:this.globalPageLoadedSpaceId,openPageId:_2c0};if(_2be.payload.pid){args.eventsArray=_2be.payload.eventsArray;args.lastVisitedPage=this.lastVisitedPage;}this.treeModel.newGlobalItem(args,_2c3);lgr.trace(_2c1,"Broadcasting refreshNavigation event");es.broadcastEvent("com.ibm.mashups.builder.refreshNavigation");}setTimeout(dojo.hitch(this,function(){lgr.trace("onOpenPage_Timeout","Broadcasting switch page event");if(_2be.payload.eventsArray){es.broadcastEvents(_2be.payload.eventsArray,com.ibm.mm.builder.utils.pageUtil.getCurrentPageId(),_2c0);}else{es.broadcastEvent("com.ibm.mashups.builder.switchPage",_2c0);}}),50);lgr.exiting(_2c1,arguments);}));lgr.exiting(_2bf,arguments);},onClosePage:function(_2c4){var _2c5="onClosePage",lgr=this.LOGGER;lgr.entering(_2c5,arguments);var _2c6=null;if(_2c4.payload){if(_2c4.payload.closePageId){_2c6=_2c4.payload.closePageId;}else{if(!_2c4.payload.eventsArray){_2c6=_2c4.payload;}}}if(!_2c6){_2c6=com.ibm.mm.builder.utils.pageUtil.getCurrentPageId();}if(!this._isOpenedGlobalPage(_2c6)){console.log("Error: you are closing a global page not opened now!");return;}var es=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");es.broadcastEvent("com.ibm.mashups.builder.saveCheck",dojo.hitch(this,function(){var _2c7="onClosePage_saveCheck",lgr=this.LOGGER;lgr.entering(_2c7,arguments);var _2c8=com.ibm.mm.builder.utils.pageUtil.getPageNode(_2c6);var args={"lastVisitedPage":this._getGlobalPageOpenedBy(_2c6)};if(_2c4.payload&&_2c4.payload.openPagePayload){args.openPagePayload=_2c4.payload.openPagePayload;}this._removeFromGlobalPages(_2c6);this.treeModel.deleteGlobalItem(args,_2c8);this.evtSvc.publishEvent(this.builderEvents.REFRESH_NAVIGATION);setTimeout(dojo.hitch(this,function(){lgr.trace("onClosePage_Timeout","Broadcasting switch page event");if(args.openPagePayload){es.broadcastEvent("com.ibm.mashups.builder.openPage",args.openPagePayload);}else{if(_2c4.payload&&_2c4.payload.eventsArray){es.broadcastEvents(_2c4.payload.eventsArray,null,args.lastVisitedPage,this.globalPageLoadedSpaceId);}else{es.broadcastEvent("com.ibm.mashups.builder.switchPage",args.lastVisitedPage);}}}),50);lgr.exiting(_2c7,arguments);}));lgr.exiting(_2c5,arguments);},onClearGlobalPage:function(){var _2c9="onClearGlobalPage",lgr=this.LOGGER;lgr.entering(_2c9,arguments);for(var i in this.globalPagesOpened){var _2ca=com.ibm.mm.builder.utils.pageUtil.getPageNode(this.globalPagesOpened[i]);var args={"lastVisitedPage":this.lastVisitedPage};this.treeModel.deleteGlobalItem(args,_2ca);}this.globalPagesOpened=[];this.globalPagesOpenedBy=[];this.globalPageLoadedSpaceId=null;dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageId,null,{expires:-1});dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageOpenedSpaceId,null,{expires:-1});dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid,null,{expires:-1});lgr.exiting(_2c9,arguments);},_isOpenedGlobalPage:function(_2cb){for(var i in this.globalPagesOpened){if(this.globalPagesOpened[i]==_2cb){return true;}}return false;},_addToGlobalPages:function(_2cc,_2cd){var _2ce=-1;for(var i in this.globalPagesOpened){if(this.globalPagesOpened[i]==_2cc){_2ce=i;}}if(_2ce>=0){this.globalPagesOpened[_2ce]=_2cc;this.globalPagesOpenedBy[_2ce]=_2cd;}else{this.globalPagesOpened.push(_2cc);this.globalPagesOpenedBy.push(_2cd);}this._persistGlobalPages();},_removeFromGlobalPages:function(_2cf){var _2d0=-1;for(var i in this.globalPagesOpened){if(this.globalPagesOpened[i]==_2cf){_2d0=i;}}if(_2d0>=0){for(var i in this.globalPagesOpened){if(this.globalPagesOpenedBy[i]==_2cf){this.globalPagesOpenedBy[i]=this.globalPagesOpenedBy[_2d0];}}this.globalPagesOpened.splice(_2d0,1);this.globalPagesOpenedBy.splice(_2d0,1);}this._persistGlobalPages();},_getGlobalPageOpenedBy:function(_2d1){for(var i in this.globalPagesOpened){if(this.globalPagesOpened[i]==_2d1){return this.globalPagesOpenedBy[i];}}return null;},_persistGlobalPages:function(){dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageId,dojo.toJson(this.globalPagesOpened));dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid,dojo.toJson(this.globalPagesOpenedBy));dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageOpenedSpaceId,this.globalPageLoadedSpaceId);},_restorePersistedGlobalPages:function(){if(dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageOpenedSpaceId)){this.globalPagesOpened=dojo.fromJson(dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageId));this.globalPagesOpenedBy=dojo.fromJson(dojo.cookie(com.ibm.mm.builder.constant.cookieKey_previous_pid));this.globalPageLoadedSpaceId=dojo.cookie(com.ibm.mm.builder.constant.cookieKey_globalPageOpenedSpaceId);for(var i in this.globalPagesOpened){var _2d2=com.ibm.mm.builder.utils.pageUtil.getPageNode(this.globalPagesOpened[i]);var _2d3=com.ibm.mm.builder.utils.navigationUtil.getNavigationRootNode(this.globalPageLoadedSpaceId);var args={title:_2d2.getTitle(dojo.locale),pageLoadedSpaceId:this.globalPageLoadedSpaceId,openPageId:this.globalPagesOpened[i]};this.treeModel.newGlobalItem(args,_2d3);}}},_processHashChange:function(hash){var _2d4="_processHashChange",lgr=this.LOGGER;lgr.entering(_2d4,arguments);if(!this.navigationStateUpdated){var _2d5=decodeURIComponent(hash);var _2d6=dojo.queryToObject(_2d5);if(_2d6.pid){var _2d7=com.ibm.mashups.services.ServiceManager.getService("eventService");_2d7.publishEvent(com.ibm.mashups.builder.iEvents.SWITCH_PAGE,_2d6.pid);}}this.navigationStateUpdated=false;lgr.exiting(_2d4,arguments);},onUnLoad:function(){var _2d8="onUnLoad",lgr=this.LOGGER;lgr.entering(_2d8,arguments);if(this.tabNavigation){this.tabNavigation.destroy();this.tabNavigation=null;}lgr.exiting(_2d8,arguments);}});(function(){var _2d9=null;com.ibm.pb.control.NavigationController.getController=function(){if(!_2d9){_2d9=new com.ibm.pb.control.NavigationController();}return _2d9;};})();}if(!dojo._hasResource["com.ibm.pb.iwidget.PageModeWidgetHandler"]){dojo._hasResource["com.ibm.pb.iwidget.PageModeWidgetHandler"]=true;dojo.provide("com.ibm.pb.iwidget.PageModeWidgetHandler");dojo.declare("com.ibm.pb.iwidget.PageModeWidgetHandler",null,{CLASS_PREFIX:"pb-pageMode-",renderingController:null,matchingModes:[],constructor:function(args){dojo.safeMixin(this,args);if(!this.matchingModes){this.matchingModes=[];}this.modeWidgets={};dojo.forEach(this.matchingModes,function(mode){this.modeWidgets[mode]=[];},this);},preProcessCallbackFunc:function(_2da,_2db,_2dc){if(this.renderingController&&this._isMatchingIWidgets(_2dc)){dojo.forEach(_2db,function(node){for(var mode in this.modeWidgets){if(dojo.hasClass(node,this.CLASS_PREFIX+mode)){node.setAttribute("lazyLoad","true");var id=node.getAttribute("id");this.modeWidgets[mode].push(id);this.renderingController.addModeWidgets(mode,[id]);}}},this);}},postProcessCallbackFunc:function(_2dd,_2de,_2df,_2e0){},_isMatchingIWidgets:function(_2e1){return _2e1.match&&_2e1.match.indexOf(".iw-iWidget")>-1;}});}if(!dojo._hasResource["com.ibm.pb.data.NavigationPrimer"]){dojo._hasResource["com.ibm.pb.data.NavigationPrimer"]=true;dojo.provide("com.ibm.pb.data.NavigationPrimer");dojo.declare("com.ibm.pb.data.NavigationPrimer",com.ibm.pb.logging.Loggable,{LEVEL_ATTR:"data-nm-level",PRIMED_ATTR:"data-nm-primed",END:{},selPath:null,map:null,constructor:function(){this.selPath=[];this.map={};},parse:function(_2e2){var _2e3="parse",lgr=this.LOGGER;lgr.entering(_2e3,[_2e2]);_2e2=dojo.byId(_2e2);var _2e4=dojo.attr(_2e2,this.LEVEL_ATTR);if(_2e4!==null&&_2e4!==undefined){lgr.trace(_2e3,"Priming the parse root node itself");this._prime(_2e2);}var _2e5=dojo.query("["+this.LEVEL_ATTR+"]",_2e2);if(_2e5.length>0){_2e5.forEach(this._prime,this);}else{lgr.trace(_2e3,"No level nodes detected in descendant nodes");lgr.exiting(_2e3,[null]);return;}lgr.exiting(_2e3,[_2e2]);},_prime:function(_2e6){var _2e7="_prime",lgr=this.LOGGER;lgr.entering(_2e7,[_2e6]);var _2e8=dojo.attr(_2e6,this.LEVEL_ATTR);var _2e9=this.extractData(_2e6);if(_2e9){this.addItem(_2e9);if(!this.selPath[_2e8]){lgr.trace(_2e7,"No previous selection path data at level ${0}",[_2e8]);}}else{if(this.selPath[_2e8]){_2e9=this.selPath[_2e8];lgr.trace(_2e7,"No data provided for selection path data, using previously known",[]);}else{lgr.trace(_2e7,"No data provided for selection path data, and no previous data to use",[]);lgr.exiting(_2e7,[]);return;}}_2e9=this.byId(_2e9.id);this.selPath[_2e8]=_2e9;lgr.trace(_2e7,"Priming selection path data at level ${0}",[_2e8]);var _2ea=dojo.query("["+this.PRIMED_ATTR+"]",_2e6);if(_2ea.length>0){lgr.trace(_2e7,"Found children of ${0}",[_2e9.id]);if(!_2e9.children){_2e9.children=[];}_2ea.forEach(function(_2eb){var _2ec=this.extractData(_2eb);if(_2ec){lgr.trace(_2e7,"Adding child ${0} of ${1}",[_2ec.id,_2e9.id]);this.addItem(_2ec);_2ec=this.byId(_2ec.id);_2e9.children.push(_2ec);}},this);_2e9.children.push(this.END);}else{lgr.trace(_2e7,"Found NO children of ${0}",[_2e9.id]);}lgr.exiting(_2e7,[_2e9]);},addItem:function(data){var _2ed="addItem",lgr=this.LOGGER;if(data&&data.id){if(this.map[data.id]){lgr.trace(_2ed,"Adding properties ${0} for ${1} to existing data",[data,data.id]);dojo.mixin(this.map[data.id],data);}else{lgr.trace(_2ed,"Adding new data ${0} for ${1}",[data,data.id]);this.map[data.id]=data;}}},byId:function(id){return this.map[id];},_normalizeType:function(type){type=type?type.toLowerCase():"page";switch(type){case "internalurl":case "externalurl":type="url";break;case "staticpage":type="page";break;}return type;},extractData:function(_2ee){var _2ef="extractData",lgr=this.LOGGER;var data=dojo.attr(_2ee,this.PRIMED_ATTR);if(data){data=dojo.fromJson(data);data.locale=ibmConfig.locale;data.type=this._normalizeType(data.type);lgr.trace(_2ef,"Extracted data ${0}",[data]);}else{data=null;}return data;},finalize:function(){var _2f0="finalize",lgr=this.LOGGER;for(var i=this.selPath.length-1;i>=0;i--){if(i>0){if(this.selPath[i-1]){if(!this.selPath[i-1].children){this.selPath[i-1].children=[this.selPath[i]];}else{if(this.selPath[i-1].children.length==0){this.selPath[i-1].children.push(this.END,this.selPath[i]);}}}}}var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();if(lgr.isLoggable(com.ibm.mashups.enabler.logging.LogLevel.TRACE)){lgr.trace(_2f0,"Priming navigation model ${0}",[this]);lgr.trace(_2f0,"Priming data:\n ${0}",[dojo.toJson(this.selPath[0],true)]);}var _2f1;for(var i=0;i<this.selPath.length;i++){if(_2f1==null&&this.selPath[i]){_2f1=i;}}nm.setPrimingData(this.selPath[_2f1]);}});}if(!dojo._hasResource["com.ibm.pb.themes.commonInit"]){dojo._hasResource["com.ibm.pb.themes.commonInit"]=true;dojo.provide("com.ibm.pb.themes.commonInit");dojo.require("dojo.i18n");com.ibm.pb.themes.commonInit=function(_2f2){if(!_2f2){_2f2={};}var lgr=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.pb.themes.commonInit"),_2f3="commonInit",_2f4=dojo.i18n.getLocalization("com.ibm.bundles","SharedMessages");lgr.entering(_2f3);if(ibmConfig.primeNavigation){lgr.trace(_2f3,"Priming navigation model");var np=new com.ibm.pb.data.NavigationPrimer();dojo.query(".wpthemeNavList, #wpthemePrimeRoot").forEach(np.parse,np);if(np.selPath.length>0){np.finalize();}ibmCfg.themeConfig.navigationPrimed=true;}var _2f5=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");lgr.trace(_2f3,"Initializing navigation model and HiddenMetaDataLoadingStrategy");var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel(),_2f6=new com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy(ibmCfg.themeConfig.navHiddenMetadata);nm.addStrategy(_2f6);lgr.trace(_2f3,"Initializing navigation node to content node meta data sync strategy");var _2f7=new com.ibm.mashups.enabler.strategy.SyncMetaDataStrategy();nm.addStrategy(_2f7);var _2f8=null;var _2f9=null;var _2fa=false;var _2fb=null;var _2fc=false;if(dojo.cookie(com.ibm.mm.builder.constant.cookieKey_login_flag)){dojo.cookie(com.ibm.mm.builder.constant.cookieKey_login_flag,null,{expires:-1});_2fc=true;}if(dojo.cookie("url_pid")){_2fb=dojo.cookie("url_pid");dojo.cookie("url_pid",null,{expires:-1,path:"/"});if(_2fb.indexOf("pid=")!=0){_2fb="pid="+_2fb;}window.location.hash="#"+encodeURIComponent(_2fb);}lgr.trace(_2f3,"Initializing builder RuntimeModel");var _2fd=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _2fe=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_2fd);var _2ff=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_2fd);var _300=com.ibm.mm.builder.utils.navigationUtil.isLastPageWhenLogin();if(_2fb||_300||!_2fc){_2f8=_2fe.getPageID();if(!_2f8){_2f8=ibmPortalConfig.currentPageOID;lgr.trace(_2f3,"Could not retrieve selected page from navigation state, retrieving from bootstrap config: ${0}",[_2f8]);if("-1"!==_2f8){_2fe.setPageID(_2f8);}}if("-1"!==_2f8){}}if(!_2f9&&_2f8&&_300){if(_2f8!==ibmPortalConfig.currentPageOID){var snm=com.ibm.mashups.enabler.navigation.Factory.getSharedNavigationModel();var _301=snm.find(_2f8).start(true);if(_301&&!snm.isAccepted(_301)){var _302=nm.findDefaultAcceptParent().start(true);if(_302){nm.insert(_301,_302);nm.commit().start(true);_2f9=_301;}}}}if(!_2f9&&(!_300&&_2fc)){_2f9=com.ibm.mm.builder.utils.navigationUtil.gotoHomeSpace();if(_2f9){if((_2f8)&&("-1"!=_2f8)){_2fa=true;}_2f8=_2f9.getID();_2fe.setPageID(_2f8);}}_2fe.setPageID(_2f8);_2fd.commit({addToHistory:true}).start();var _303=com.ibm.mashups.builder.model.Factory.getRuntimeModel();var _304=_303.getCurrentPage();_304.setID(_2f8);_304.setPageMode(dojo.hasClass(dojo.body(),"edit-mode")?"edit":"view");_303.getCurrentTheme().setID(ibmCfg.themeConfig.themeUniqueName);var _305=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME);var s=new com.ibm.mashups.enabler.strategy.HiddenMetaDataLoadingStrategy(ibmCfg.themeConfig.layoutHiddenMetadata);_305.setStrategy("com.ibm.mashups.enabler.layout.LayoutModel",s);if(_2f2.setWindowTitle){var _306="";var _307=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();var _308=_307.getTitle(this.currentPage);if(dojo.isString(ibmCfg.themeConfig.portletOverridePageTitle)&&ibmCfg.themeConfig.portletOverridePageTitle!=_308){_306=ibmCfg.themeConfig.portletOverridePageTitle.replace(/&amp;/g,"&").replace(/&quot;/g,"\"").replace(/&gt;/g,">").replace(/&lt;/g,"<");}else{_306=_308;}com.ibm.mashups.enabler.context.Factory.getPageContext().setBrowserTitle(_306);}if(_2f2.useNavigationController){lgr.trace(_2f3,"Initializing navigation controller");ibmCfg.controllers.navigation=com.ibm.pb.control.NavigationController.getController();}if(_2f2.useRenderingController){lgr.trace(_2f3,"Initializing rendering controller");ibmCfg.controllers.rendering=com.ibm.pb.control.RenderingController.getController();}if(_2f2.useDNDController&&dojo.getObject("com.ibm.pb.control.DNDController")){lgr.trace(_2f3,"Initializing page layout drag-and-drop controller");ibmCfg.controllers.dnd=com.ibm.pb.control.DNDController.getController();if(_304.getPageMode()=="edit"){ibmCfg.controllers.dnd.init();}}if(_2f2.serverRuntimeContentPrimingNode){}if(_2f2.customInit){_2f2.customInit();}if(_2f2.initLiveTextService){i$.addOnLoad(function(){lgr.trace(_2f3,"Initializing live text service");var _309=_2f2.liveTextInitArgs||{},_30a=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.livetext.ServiceModel.SERVICE_NAME);if(_2f2.lazyLoadModeWidgets){var _30b=new com.ibm.pb.iwidget.PageModeWidgetHandler({renderingController:ibmCfg.controllers.rendering,matchingModes:["edit"]});_309.preProcessCallbackFunc=dojo.hitch(_30b,"preProcessCallbackFunc");_309.postProcessCallbackFunc=dojo.hitch(_30b,function(){_30b.postProcessCallbackFunc(arguments);if(_2fa){var _30c=com.ibm.mm.builder.coreWidgetsStrings.I_NAVIGATION_REDIRECT_TITLE?com.ibm.mm.builder.coreWidgetsStrings.I_NAVIGATION_REDIRECT_TITLE:"You have been redirected";var _30d=com.ibm.mm.builder.coreWidgetsStrings.I_NAVIGATION_REDIRECT_TITLE_MESSAGE?com.ibm.mm.builder.coreWidgetsStrings.I_NAVIGATION_REDIRECT_TITLE_MESSAGE:"You can't visit the page, because it has been deleted or you do not have authority.";var _30e=new com.ibm.widgets.StatusMessage("info",_30c,_30d);dojo.publish("/message/status",[{message:_30e,uid:"ibmStatusBox"}]);}});}if(i$.fromPath("SemTagSvcPortalGlobal.isPersonCardHandlerRequired")&&i$.fromPath("SemTagSvcPortalGlobal.isParsingRequired")){var _30f=new com.ibm.mashups.livetext.ConfigEntry(".vcard",false,"portallof",SemTagSvcPortalGlobal.contextUrl+"/javascript","portallof.vcard",false,"hcard");dojo.publish("/com/ibm/mashups/livetext/configentryadded",[_30f]);}if(i$.fromPath("SemTagSvcPortalGlobal.isActionHandlerRequired")&&i$.fromPath("SemTagSvcPortalGlobal.isParsingRequired")){var _310=new com.ibm.mashups.livetext.ConfigEntry(".com\\.ibm\\.portal\\.action",false,"portallof",SemTagSvcPortalGlobal.contextUrl+"/javascript","portallof.vcard",false,"com.ibm.portal.action");dojo.publish("/com/ibm/mashups/livetext/configentryadded",[_310]);}if(i$.fromPath("SemTagSvcPortalGlobal.isC2AHandlerRequired")&&i$.fromPath("SemTagSvcPortalGlobal.isParsingRequired")){var _311=new com.ibm.mashups.livetext.ConfigEntry(".c2a\\:source,.c2a\\:target",false,"portallof",SemTagSvcPortalGlobal.contextUrl+"/javascript","portallof.vcard",false,"c2a");dojo.publish("/com/ibm/mashups/livetext/configentryadded",[_311]);}if(i$.fromPath("com.ibm.pb.decorations.DECORATION_MANAGER")){var _312=new com.ibm.mashups.livetext.ConfigEntry("*.component-control",true,"com.ibm.pb.decorations",ibmConfig["com.ibm.mashups.contextroot.builder"]+"/js/com/ibm/pb/decorations","com.ibm.pb.decorations.DecorationManager",true);dojo.publish("/com/ibm/mashups/livetext/configentryadded",[_312]);}_30a.init(_309);});}if(typeof (stproxy)!="undefined"&&!stproxy.isLoggedIn&&typeof (ibmCfg.portalConfig)!="undefined"&&typeof (ibmCfg.portalConfig.currentUser)!="undefined"&&ibmCfg.portalConfig.currentUser.length>0){lgr.trace(_2f3,"Logging "+ibmCfg.portalConfig.currentUser+" onto Sametime");if(ibmCfg.portalConfig.isUserLoggedIn===false){lgr.info(_2f3,"Sametime login for "+ibmCfg.portalConfig.currentUser+" skipped as anonnymous user login to Sametime not supported.");}else{stproxy.login.loginByToken(ibmCfg.portalConfig.currentUser,stproxy.awareness.AVAILABLE,stproxy.i18nStrings.statusAvailable,function(){lgr.info(_2f3,"Login passed and isLoggedIn is:"+stproxy.isLoggedIn);},function(){lgr.severe(_2f3,"Sametime login for "+ibmCfg.portalConfig.currentUser+" failed.");});}}};}i$.addOnLoad(function(){com.ibm.pb.themes.commonInit({setWindowTitle:false,useNavigationController:true,useRenderingController:true,useDNDController:true,initLiveTextService:true,lazyLoadModeWidgets:true});var _313=dojo.declare("com.ibm.portal.PortalOperation",[com.ibm.mashups.enabler.ac.operation.Operation],{allowed:false,constructor:function(_314,_315){this.allowed=_314;if(_315){_315(this);}},isAllowed:function(_316){return this.allowed;}}),_317=com.ibm.mashups.enabler,_318=_317.ac.operation.AllowedOperationsModelFactory.getAllowedOperationsModel();_318.setOperation(com.ibm.pb.extension.Operations.PAGE_ACTIONS,function(_319,_31a,sync,_31b){var _31c=_317.model.Factory.getUserModel().getAnonymousMode()!=_317.user.AnonymousMode.ANONYMOUS;if(!_31c){if(typeof ibmPortalCPConfig!="undefined"){var cp=ibmPortalCPConfig,node=_31a&&_31a.contentNode;_31c=(cp.isTaggingEnabled&&cp.contextMenu.isTaggingEnabled&&cp.operations.canViewTags&&((node&&node.getMetaData)?node.getMetaData("com.ibm.portal.cp.tagging.isTaggingDisabled")!=="true":true))||(cp.isRatingEnabled&&cp.contextMenu.isRatingEnabled&&cp.operations.canViewRatings&&((node&&node.getMetaData)?node.getMetaData("com.ibm.portal.cp.rating.isRatingDisabled")!=="true":true));}}new _313(_31c,_31b);});dojo.subscribe("/portal/status/theme",dojo.global,function(type,_31d,_31e){var _31f=new com.ibm.widgets.StatusMessage(type,_31d,_31e);dojo.publish("/portal/status",[{message:_31f,uid:"ibmStatusBox"}]);});com.ibm.mashups.services.ServiceManager.getService("eventService").subscribeEvent("com.ibm.mashups.builder.refreshNavigation",window,function(){var nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _320=com.ibm.mashups.enabler.model.state.UrlGeneratorFactory.getUrlGenerator().getUrl(nsm,null,{skipState:true,pocURI:"nm:oid:"+ibmCfg.portalConfig.currentPageOID});top.location.href=_320;});}); com.ibm.pb.io.RESOURCE_CACHE.set("/sabc/mccbuilder.v3001/widget-catalog/NewPageDialog.xml", "<iw:iwidget name=\"com.ibm.mm.builder.systemwidget.NewPageDialog\" xmlns:iw=\"http://www.ibm.com/xmlns/prod/iWidget\" iScope=\"com.ibm.mm.builder.systemwidget.NewPageDialog\" allowInstanceContent=\"true\" supportedModes=\"view\" mode=\"view\" lang=\"en\">\n <iw:resource uri=\"NewPageDialog.js\" skipLoad=\"dojo.getObject(\u0027com.ibm.mm.builder.systemwidget.NewPageDialog\u0027) != null\" />\n <iw:itemSet id=\"attributes\">\n <iw:item id=\"version\" value=\"2.4\"/>\n </iw:itemSet>\n\t\n\t<iw:event id=\"com.ibm.mashups.builder.createPage\" handled=\"true\" onEvent=\"onCreatePage\" eventDescName=\"desc_onCreatePage\"/>\n\t<iw:eventDescription id=\"desc_onCreatePage\" payloadType=\"text\" description=\"Launches this dialog widget\" lang=\"en\"></iw:eventDescription>\n\t\n\t<iw:event id=\"com.ibm.mashups.builder.pageSwitched\" handled=\"true\" onEvent=\"onPageSwitched\" eventDescName=\"desc_onPageSwitched\"/>\n\t<iw:eventDescription id=\"desc_onPageSwitched\" payloadType=\"text\" description=\"Closes dialog on page switch\" lang=\"en\"></iw:eventDescription>\n\t\n\t<iw:event id=\"com.ibm.mashups.builder.templateSelectChanged\" handled=\"true\" onEvent=\"onTemplateSelectChanged\" eventDescName=\"desc_onTemplateSelectChanged\"/>\n\t<iw:eventDescription id=\"desc_onTemplateSelectChanged\" payloadType=\"text\" description=\"Updates this dialog widget\" lang=\"en\"></iw:eventDescription>\n\t\n <iw:content mode=\"view\"><![CDATA[<div id=\"_IWID_contents\"></div>]]></iw:content>\n</iw:iwidget>\n"); dojo.provide("com.ibm.mm.builder.systemwidget.NewPageDialog"); dojo.require("com.ibm.pb.iwidget.iWidgetBase"); dojo.require("com.ibm.widgets.NewPageDialog"); dojo.require("com.ibm.pb.customize.LotusWaitingDialog"); dojo.declare("com.ibm.mm.builder.systemwidget.NewPageDialog",[com.ibm.pb.iwidget.iWidgetBase],{controller:null,showFriendlyURL:false,allowFriendlyURL:false,showMakePrivate:false,showPageTemplate:false,newPage:false,ROLETYPE_PRIVILEGED_USER:"Privileged User",onLoad:function(){ var _1="onLoad",_2=this.LOGGER; _2.entering(_1,arguments); this.wid="_"+this.iContext.widgetId+"_"; var _3=this.getItemSetValues(["controller","showFriendlyURL","allowFriendlyURL","showMakePrivate","showPageTemplate"]); if(typeof _3["showPageTemplate"]=="object"||typeof _3["showPageTemplate"]=="string"){ this.convertMapTypes(_3,["controller","showPageTemplate"],"Object"); this.convertMapTypes(_3,["showFriendlyURL","allowFriendlyURL","showMakePrivate"],"Boolean"); }else{ this.convertMapTypes(_3,["controller"],"Object"); this.convertMapTypes(_3,["showFriendlyURL","allowFriendlyURL","showMakePrivate","showPageTemplate"],"Boolean"); } if(_3["allowFriendlyURL"]==true){ _3["showFriendlyURL"]=_3["allowFriendlyURL"]; } dojo.mixin(this,_3); this.model=this.controller.getTreeModel(); this.nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel(); this.nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); _2.exiting(_1,arguments); },onUnload:function(){ this._cleanupInternalWidget(); },_cleanupInternalWidget:function(){ if(this.widget){ if(this._changeConnection){ dojo.disconnect(this._changeConnection); } this.widget.destroy(); } },_initInternalWidget:function(){ var me=this; this._cleanupInternalWidget(); var _4=this.showMakePrivate&&this._canMakePrivateChild(this._parentId)&&this._canMakePublicChild(this._parentId); this.widget=new com.ibm.widgets.NewPageDialog({beforeSubmit:function(){ if(!dojo.isOpera||dojo.isOpera>=9.8){ me.waitDlg=new com.ibm.pb.customize.LotusWaitingDialog({message:this.dialogBundle.page_dialog_page_being_created,spinner:builderConfig.builderPath+"/images/loading.gif"}); setTimeout(function(){ me.waitDlg.show(); },this.duration); } },showMakePrivate:_4,canMakePrivate:this._canMakePrivateChild(this._parentId),showPageTemplate:this.showPageTemplate,showFriendlyURL:this.showFriendlyURL},this.iContext.getElementById(this.wid+"contents")); this._changeConnection=dojo.connect(this.widget,"onChange",this,"_onChange"); this.widget.startup(); },_canMakePrivateChild:function(_5){ var _6=ibmCfg.portalConfig.inManagedPages&&typeof ibmToolbarConfig!="undefined"&&ibmToolbarConfig.projectUUID&&ibmToolbarConfig.projectUUID!="null"; if(_6){ return false; } var _7=this.nm.find(_5).start(); var _8=false; if(_7){ var _9=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(this.nsm); _8=_7.hasRole(this.ROLETYPE_PRIVILEGED_USER)&&(!ibmCfg.portalConfig.projectUUID||ibmCfg.portalConfig.projectUUID==="null")&&!_9.getSpaceID(); } return _8; },_canMakePublicChild:function(_a){ var _b=this.nm.find(_a).start(); var _c=false; if(_b){ _c=_b.hasRole(this.roleTypes.EDITOR)&&!this._isPrivate(_b); } return _c; },_isPrivate:function(_d){ var _e=false; if(_d){ var _f=_d.getXml(),_10="./atom:content/*/ac:allowed-access[@ac:private='true']"; _e=com.ibm.mashups.enabler.xml.XPath.evaluateBoolean(_10,_f,{app:"http://www.w3.org/2007/app",atom:"http://www.w3.org/2005/Atom",ac:"http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0"}); } return _e; },_onChange:function(_11){ var _12="_onChange",lgr=this.LOGGER,me=this; lgr.entering(_12,arguments); var _13=this.nm.find(this._parentId).start(); lgr.trace(_12,"Creating new node under ${0} ${1}",[this._parentId,_13]); _11.callback=function(_14,_15,_16,_17){ if(me.waitDlg){ me.waitDlg.cancel(); } }; this.model.newItem(_11,_13); lgr.exiting(_12,arguments); },onCreatePage:function(_18){ var _19="onCreatePage",lgr=this.LOGGER; lgr.entering(_19,arguments); this.newPage=true; if(this.widget&&this.widget.open){ return; } this._parentId=_18.payload.parentPageId; this._spaceId=_18.payload.spaceId; this._initInternalWidget(); this.widget.focus(); lgr.exiting(_19,arguments); },onTemplateSelectChanged:function(_1a){ var _1b="onTemplateSelectChanged",lgr=this.LOGGER; lgr.entering(_1b,arguments); this.widget._templateSelectChanged(_1a.payload); lgr.exiting(_1b,arguments); },onPageSwitched:function(_1c){ if(this.newPage){ this.newPage=false,me=this,duration=this.widget?this.widget.duration:200; if(this.waitDlg){ setTimeout(function(){ me.waitDlg.hide(); },duration); } } }}); i$.toPath("com.ibm.mm.builder.createPage.action", function(menuitem) { com.ibm.pb.contextMenu.sharedActions.createPage(ibmCfg.portalConfig.currentPageOID); }); i$.toPath("com.ibm.mm.builder.createPage.visibility", function(menuitem) { return menuitem.visibility !== false && i$.hasClass(document.getElementsByTagName("body")[0],"edit-mode"); }); i$.toPath("com.ibm.mm.builder.createSiblingPage.action", function(menuitem) { com.ibm.pb.contextMenu.sharedActions.createSiblingPage(ibmCfg.portalConfig.currentPageOID); }); i$.toPath("com.ibm.mm.builder.createSiblingPage.visibility", function(menuitem) { return menuitem.visibility !== false && i$.hasClass(document.getElementsByTagName("body")[0],"edit-mode"); });dojo.provide("portalclient.nls.rest_utils_en");dojo.provide("com.ibm.bundles.nls.Resolver");com.ibm.bundles.nls.Resolver._built=true;dojo.provide("com.ibm.bundles.nls.Resolver.en");com.ibm.bundles.nls.Resolver.en={"errorNoPocHandler":"No handler is registered for prefix ${0}","errorDataFormat":"Data format is invalid","errorInit":"An error occurred when initializing the resolver store.","errorWriteNotLoaded":"Item must be loaded before attempting to write to it","errorInvalidString":"${0} is not a string","errorReadOnlyPrefs":"Cannot write to read-only preference attribute with key ${0}","errorNullPrefsKey":"The preferences key cannot be null","errorNotInModel":"Item is not in this model","errorInvalidItem":"${0} is not an item in this store"}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("portalclient.nls.rest_utils",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.lang.DeferredQueue"]){dojo._hasResource["com.ibm.lang.DeferredQueue"]=true;dojo.provide("com.ibm.lang.DeferredQueue");dojo.declare("com.ibm.lang.DeferredQueue",null,{constructor:function(_1){this.curDef=_1;this.firstDef=_1;},_addCallbacks:function(_2,_3){_2.addCallbacks(function(_4){_3.callback(_4);return _4;},dojo.hitch(this,function(_5){try{if(!_5._raised){this.raiseError(_5);_5._raised=true;}}catch(err2){}_3.callback(_5);return _5;}));},addBefore:function(_6){if(!this.firstDef){this.firstDef=_6;}else{var _7=this.firstDef;this.firstDef=_6;this._addCallbacks(_6,_7);}},add:function(_8){if(!this.firstDef){this.firstDef=_8;}if(this.curDef){var _9=this.curDef;this.curDef=_8;this._addCallbacks(_9,_8);}else{this.curDef=_8;}return this;},fire:function(_a){if(this.firstDef){this.firstDef.callback(_a);}return this;},raiseError:function(_b){},destroy:function(){delete this.firstDef;delete this.curDef;delete this.raiseError;}});}if(!dojo._hasResource["com.ibm.xml.xpath"]){dojo._hasResource["com.ibm.xml.xpath"]=true;dojo.provide("com.ibm.xml.xpath");com.ibm.xml.xpath=ibm.portal.xml.xpath;if(dojo.isIE){com.ibm.xml.xpath.evaluate=function(_c,_d,_e,_f){var _10=null;if(_e){var ns="";for(var _11 in _e){ns+="xmlns:"+_11+"='"+_e[_11]+"' ";}if(_d.ownerDocument){_d.ownerDocument.setProperty("SelectionNamespaces",ns);}else{_d.setProperty("SelectionNamespaces",ns);}}if(!_f){_10=_d.selectNodes(_c);var _12=[];for(var i=0;i<_10.length;i++){if(_10[i]){_12.push(_10[i]);}}return _12;}else{return _d.selectSingleNode(_c);}};}else{com.ibm.xml.xpath.evaluate=function(_13,_14,_15,_16){var _17=null;var _18=_14;if(!_18.evaluate){_18=_14.ownerDocument;}try{_17=_18.evaluate(_13,_14,function(_19){return _15[_19]||null;},_16?XPathResult.FIRST_ORDERED_NODE_TYPE:XPathResult.ORDERED_NODE_ITERATOR_TYPE,null);}catch(err){throw new Error("Error with xpath expr: "+_13+" - "+err);}if(!_16){var _1a;var _1b=new Array();var len=0;do{_1a=_17.iterateNext();if(_1a){_1b[len]=_1a;len++;}}while(_1a);return _1b;}else{return _17.singleNodeValue;}};}}if(!dojo._hasResource["com.ibm.xml.XmlNodeList"]){dojo._hasResource["com.ibm.xml.XmlNodeList"]=true;dojo.provide("com.ibm.xml.XmlNodeList");(function(){var _1c=function(_1d,ctx,_1e){return com.ibm.xml.xpath.evaluate.call(this,_1d,ctx,this.ns,_1e);};var _1f=function(arr,ns){arr.constructor=com.ibm.xml.XmlNodeList;dojo._mixin(arr,com.ibm.xml.XmlNodeList.prototype);arr.ns=ns;return arr;};com.ibm.xml.XmlNodeList=function(){var ret=_1f(Array.apply(null,arguments),null);return ret;};var xnl=com.ibm.xml.XmlNodeList,_20=xnl.prototype,d=dojo,dom=com.ibm.domUtilities;xnl.fromArray=function(arr,ns){return _1f(arr,ns);};var _21=function(arr,ctr){if(arr&&(arr instanceof Array||typeof arr=="array")){var _22=ctr?new ctr():[];d.forEach(arr,function(_23){_22=_22.concat(_21(_23,ctr));});return _22;}else{return arr;}};var _24=function(def,_25){return dom.createFromJson(_25.ownerDocument,def,this.ns,_25);};d.extend(xnl,{map:function(_26,_27){var ret=d.map(this,_26,_27,xnl);ret.ns=this.ns;return ret;},indexOf:function(_28,_29,_2a){var _2b=this.length||0,_2c=1,i=0;if(_2a){_2c=_2b=-1;i=this.length-1;}if(_29!=undefined){i=_29;}if(!d.isFunction(_28)){while((_2a&&i>_2b)||i<_2b){if(_28==this[i]){return i;}i+=_2c;}}else{while((_2a&&i>_2b)||i<_2b){if(_28(this[i])){return i;}i+=_2c;}}return -1;},lastIndexOf:function(_2d,_2e){return this.indexOf(_2d,_2e,true);},forEach:function(_2f,_30){d.forEach(this,_2f,_30);return this;},removeProp:function(_31){switch(_31){case "childNodes":this.prop(_31).forEach(function(_32){_32.remove();});return this;case "firstChild":case "lastChild":case "parentNode":case "nextSibling":case "previousSibling":this.prop(_31).remove();return this;case "text":case "textContent":case "xml":case "innerXML":return this.prop(_31,"");case "localName":case "baseName":return this;default:this.forEach(function(_33){delete _33[_31];},this);return this;}},removeAttr:function(_34){this.forEach(function(_35){com.ibm.domUtilities.removeAttribute(_35,_34,this.ns);},this);return this;},prop:function(_36,_37){var _38=false,f=null,ns=this.ns;if(arguments.length<2){switch(_36){case "childNodes":f=function(_39){var ret=xnl.apply(null,dojo._toArray(_39[_36]));ret.ns=ns;return ret;};_38=true;break;case "firstChild":case "lastChild":case "parentNode":case "nextSibling":case "previousSibling":f=function(_3a){return _3a[_36];};_38=true;break;case "text":case "textContent":f=function(_3b){return dom.textContent(_3b);};break;case "xml":case "innerXML":f=function(_3c){return dom.innerXML(_3c);};break;case "localName":case "baseName":_36=[d.isIE?"baseName":"localName"];default:f=function(_3d){return _3d[_36];};}var _3e=d.map(this,f,this);if(_38){_3e=xnl.apply(_3e,_3e);_3e.ns=ns;}return _3e;}else{var _3f=_37;switch(_36){case "text":case "textContent":f=function(_40){dojox.data.dom.textContent(_40,_3f);};break;default:f=function(_41){_41[_36]=_3f;};}if(dojo.isArrayLike(_37)){var sf=f,idx=0;f=function(_42){_3f=_37[idx++];if(_3f!==undefined){sf(_42);}};}d.map(this,f,this);return this;}},attr:function(_43,_44){var ns=this.ns;if(arguments.length<2){return d.map(this,function(_45){if(!dom.hasAttribute(_45,_43,ns)){return;}return dom.getAttribute(_45,_43,ns);},this);}else{if(_44==null){return this.removeAttr(_43);}var _46=_44;var f=function(_47){dom.setAttribute(_47,_43,_46,ns);};if(dojo.isArrayLike(_44)){var sf=f,idx=0;f=function(_48){_46=_44[idx++];if(_46!==undefined){sf(_48);}};}d.map(this,f,this);return this;}},hasAttr:function(_49){return d.map(this,function(_4a){return dom.hasAttribute(_4a,_49,this.ns);},this);},every:function(_4b,_4c){return d.every(this,_4b,_4c);},some:function(_4d,_4e){return d.some(this,_4d,_4e);},filter:function(_4f){var _50=this,a=arguments,_51=0;if(d.isString(_4f)){_50=_50.select(".["+_4f+"]");_51=1;}if(a.length>1){_50=xnl.apply(_50,d.filter(_50,a[_51],a[_51+1]));_50.ns=this.ns;}return _50;},select:function(_52,_53){if(!_52){return this;}var _54=[];this.forEach(function(_55){_54=_54.concat(_1c.call(this,_52,_55,_53)||[]);},this);_54=_1f(_54,this.ns);return _54;},remove:function(){return this.forEach(function(_56){if(_56.parentNode){_56.parentNode.removeChild(_56);}},this);},replace:function(_57){for(var i=0;i<_57.length&&i<this.length;i++){this[i].parentNode.replaceChild(_57[i],this[i]);}return this;},destroy:function(){this.remove();this.splice(0,this.length);return this;},createFromJson:function(def){return this.forEach(dojo.partial(_24,def),this);},toString:function(){return "XmlNodeList{ "+Array.prototype.toString.call(this)+" }";}});d.forEach(["slice","splice","concat"],function(_58){_20[_58]=function(){return _1f(Array.prototype[_58].apply(this,arguments),this.ns);};},this);d.forEach(["attributes","baseURI","childNodes","firstChild","lastChild","localName","baseName","namespaceURI","nextSibling","nodeName","nodeType","ownerDocument","parentNode","prefix","previousSibling","tagName","innerXML","text","textContent"],function(_59){_20[_59]=function(){return this.prop(_59);};},this);_20.$=_20.select;_20._$=_20.prop;_20.text=_20.textContent;})();}if(!dojo._hasResource["com.ibm.xml.SimpleXmlAccessor"]){dojo._hasResource["com.ibm.xml.SimpleXmlAccessor"]=true;dojo.provide("com.ibm.xml.SimpleXmlAccessor");(function(){var dom=com.ibm.domUtilities,_5a=com.ibm.xml.xpath,xnl=com.ibm.xml.XmlNodeList;dojo.declare("com.ibm.xml.SimpleXmlAccessor",null,{namespaces:{},constructor:function(_5b){dojo.mixin(this,_5b);},evaluate:function(_5c,_5d,_5e){var ret=_5a.evaluate(_5c,_5d,this.namespaces,_5e);if(_5e){if(ret){ret=[ret];}else{ret=[];}}return ret;},select:function(_5f,_60,_61){ret=xnl.apply(null,this.evaluate.apply(this,arguments));ret.ns=this.namespaces;return ret;},prop:function(_62,_63,_64){if(arguments.length<3){switch(_63){case "textContent":return dom.textContent(_62);case "localName":case "baseName":return _62[dojo.isIE?"baseName":"localName"];default:return _62[_63];}}else{switch(_63){case "textContent":dom.textContent(_62,_64);return true;default:_62[_63]=_64;return true;}}},attr:function(_65,_66,_67){if(arguments.length<3){if(!dom.hasAttribute(_65,_66,this.namespaces)){return;}return dom.getAttribute(_65,_66,this.namespaces);}else{return dom.setAttribute(_65,_66,_67,this.namespaces);}},replace:function(_68,_69){return _68.parentNode.replaceChild(_69,_68);},getSelf:function(_6a){return _6a;},createElement:function(doc,_6b,_6c){return dom.createElement(doc,_6b,this.namespaces,_6c);},createFromJson:function(_6d,def){return dom.createFromJson(_6d.nodeType!=dom.constants.NodeTypes.document?_6d.ownerDocument:_6d,def,this.namespaces,_6d);}});})();}if(!dojo._hasResource["com.ibm.data.resolver.FaultFactory"]){dojo._hasResource["com.ibm.data.resolver.FaultFactory"]=true;dojo.provide("com.ibm.data.resolver.FaultFactory");dojo.require("dojo.string");dojo.declare("com.ibm.data.resolver.FaultFactory",null,{namespaces:{env:"http://www.w3.org/2003/05/soap-envelope"},selectors:{subcode:"/env:Fault/env:Code/env:Subcode/env:Value",reason:"/env:Fault/env:Reason/env:Text["+(dojo.isIE?"@xml:lang = '${0}'":"lang('${0}')")+"]",role:"/env:Fault/env:Role",detail:"/env:Fault/env:Detail"},constructor:function(){this.engine=new com.ibm.xml.SimpleXmlAccessor({namespaces:this.namespaces});},getFaultError:function(_6e,_6f){var _70=com.ibm.domUtilities.docFromString(_6e);_6f.name="Fault - "+this._getRole(_70);_6f.number=this._getSubCode(_70);_6f.message=this._getReason(_70);_6f.description=this._getDetail(_70);return _6f;},_getSubCode:function(_71){return this.engine.select(this.selectors.subcode,_71,true).text()[0];},_getReason:function(_72,_73){if(!_73){_73=dojo.locale;}var _74=this.selectors.reason;_74=dojo.string.substitute(_74,[_73]);return this.engine.select(_74,_72,true).text()[0];},_getRole:function(_75){return this.engine.select(this.selectors.role,_75,true).text()[0];},_getDetail:function(_76){return this.engine.select(this.selectors.detail,_76,true).text()[0];},toString:function(){return this.declaredClass;}});if(!dojo.isIE){com.ibm.data.resolver.FaultFactory.prototype.namespaces["xml"]="http://www.w3.org/XML/1998/namespace";}}if(!dojo._hasResource["com.ibm.planner.SimplePOPlan"]){dojo._hasResource["com.ibm.planner.SimplePOPlan"]=true;dojo.provide("com.ibm.planner.SimplePOPlan");dojo.declare("com.ibm.planner.SimplePOPlan",null,{constructor:function(_77){this.steps={};this.orderedSteps=[];this._nctr=Math.floor(Math.random()*100001);if(_77){for(var i=0;i<_77.length;i++){this.insertStep(_77[i]);}}},destroy:function(){for(var s in this.steps){this.steps[s].destroy();}delete this.steps;delete this.orderedSteps;},_genName:function(){return "s_"+this._nctr++;},indexOf:function(_78){return dojo.indexOf(this.orderedSteps,_78);},getStep:function(_79){return this.steps[_79];},hasStep:function(_7a){return !!this.steps[_7a];},makeStep:function(_7b,_7c){var _7d=new com.ibm.planner.SimplePOStep(_7b,_7c);this.insertStep(_7d);return _7d;},_insStep:function(_7e,map){if(!map[_7e.name]){var _7f=0;for(var i=0,pre;pre=_7e.preSteps[i],i<_7e.preSteps.length;i++){var _80;if(map[pre.name]){_80=this.indexOf(pre);if(_80>=_7f){_7f=_80+1;}}else{_80=this._insStep(pre,map);if(_80<=_7f){_7f++;}else{_7f=_80+1;}}}this.orderedSteps.splice(_7f,0,_7e);map[_7e.name]=_7e;return _7f;}},orderSteps:function(){this.orderedSteps=[],map={};for(var _81 in this.steps){this._insStep(this.steps[_81],map);}return this;},insertStep:function(_82){if(!_82.name){_82.name=this._genName();}if(!this.steps[_82.name]){this.steps[_82.name]=_82;}return this;},_reset:function(){delete this.groupList;},replan:function(){this._reset();this.orderSteps();return this;},_insertIntoGroupList:function(_83,_84){for(var j=_83.length-1;j>=0;j--){if(!_83[j].hasPreStepOf(_84)){if(j>0){continue;}else{_83[j].addStep(_84);}}else{if(j<_83.length-1){_83[j+1].addStep(_84);return;}else{_83.push(new com.ibm.planner.SimplePOStepGroup([_84]));return;}}}},size:function(){return this.orderedSteps.length;},getList:function(){return this.orderedSteps;},filter:function(_85){this.orderedSteps=dojo.filter(this.orderedSteps,_85);return this;},getGroupList:function(){if(!this.groupList){var _86=[],_87=this.getList();if(_87.length>0){_86.push(new com.ibm.planner.SimplePOStepGroup([_87[0]]));}for(var i=1,st;st=_87[i],i<_87.length;i++){this._insertIntoGroupList(_86,st);}this.groupList=_86;}return this.groupList;}});dojo.declare("com.ibm.planner.SimplePOStep",null,{constructor:function(_88,_89){this.name=_88;this.contents=_89;this.preSteps=[];},destroy:function(){delete this.preSteps;delete this.contents;delete this.name;},isPreStepOf:function(_8a){return _8a.hasPreStep(this);},hasPreStep:function(_8b){return dojo.indexOf(this.preSteps,_8b)>-1;},addPreStep:function(_8c){this.preSteps.push(_8c);},toString:function(){return "<Step '"+this.name+"'>";}});dojo.declare("com.ibm.planner.SimplePOStepGroup",null,{constructor:function(_8d){this.steps=_8d?_8d.slice():[];},destroy:function(){delete this.steps;},getSteps:function(){return this.steps;},addStep:function(_8e){this.steps.push(_8e);},hasPreStepOf:function(_8f){for(var i=0,st;st=this.steps[i],i<this.steps.length;i++){if(st.isPreStepOf(_8f)){return true;}}return false;},toString:function(){return "<StepGroup ("+this.steps+")>";}});}if(!dojo._hasResource["com.ibm.data.DependencyManager"]){dojo._hasResource["com.ibm.data.DependencyManager"]=true;dojo.provide("com.ibm.data.DependencyManager");dojo.declare("com.ibm.data.DependencyManager",null,{constructor:function(_90){this._st=_90;this._rels={};},destroy:function(){delete this._st;delete this._rels;},_initItemDep:function(id){var r=this._rels;if(!r[id]){r[id]=[{}];for(var t in com.ibm.data.DependencyManager.types){r[id].push({});}}return this;},updateDependencyId:function(_91,_92){var r=this._rels;if(r[_91]){r[_92]=r[_91];delete r[_91];}for(var id in r){for(var i=0,_93;_93=r[id],i<r[id].length;i++){if(_93[_91]){_93[_92]=_93[_91];delete _93[_91];}}}return this;},getDependencies:function(_94){this._initItemDep(_94);return this._rels[_94];},getSourcesByType:function(_95,_96){var arr=this.getDependencies(_95);var _97=[];if(arr){for(var id in arr[0]){if(arr[0][id][_96]){_97.push(id);}}}return _97;},getTargetsByType:function(_98,_99){_99++;var arr=this.getDependencies(_98);var _9a=[];if(arr){for(var id in arr[_99]){_9a.push(id);}}return _9a;},addDependency:function(_9b,_9c,_9d){var r=this._rels,_9e=_9d+1;this._initItemDep(_9b);r[_9b][_9e][_9c]=1;this._initItemDep(_9c);if(!r[_9c][0][_9b]){r[_9c][0][_9b]=[];}r[_9c][0][_9b][_9d]=1;return this;},removeDependency:function(_9f,_a0,_a1){var r=this._rels,_a2=_a1+1;if(r[_9f]&&r[_9f][_a2][_a0]){delete r[_9f][_a2][_a0];}if(r[_a0]&&r[_a0][0][_9f]&&r[_a0][0][_9f][_a1]){delete r[_a0][0][_9f][_a1];}return this;},getPlan:function(_a3,_a4){var _a5=new com.ibm.planner.SimplePOPlan();dojo.forEach(_a3,function(_a6){this._buildPlan(_a5,this._st.getIdentity(_a6),_a4);},this);return _a5;},_buildPlan:function(_a7,_a8,_a9){if(!_a7.hasStep(_a8)){var _aa=_a7.makeStep(_a8,null);var _ab=this.getTargetsByType(_a8,_a9);for(var i=0;i<_ab.length;i++){var _ac=this._buildPlan(_a7,_ab[i],_a9);if(_ac){_aa.addPreStep(_ac);}}return _aa;}else{return _a7.getStep(_a8);}}});com.ibm.data.DependencyManager.types={"create":0,"delete":1,"load":2,"order":3};}if(!dojo._hasResource["com.ibm.data.TemplateInstantiator"]){dojo._hasResource["com.ibm.data.TemplateInstantiator"]=true;dojo.provide("com.ibm.data.TemplateInstantiator");dojo.require("dojo.string");dojo.declare("com.ibm.data.TemplateInstantiator",null,{_retrieveTemplate:function(_ad,_ae){if(!_ad){throw new Error("No template defined for "+this.toString());}return _ad;},_fillOutTemplate:function(str,_af,_b0,obj){return dojo.string.substitute(str,_af,_b0,obj);},getTemplateInstance:function(_b1,_b2,_b3){var str=this._fillOutTemplate(_b1,_b2,com.ibm.domUtilities.encodeXML,_b3);var doc=com.ibm.domUtilities.docFromString(str);return doc;}});}if(!dojo._hasResource["com.ibm.data.resolver.SiteMap"]){dojo._hasResource["com.ibm.data.resolver.SiteMap"]=true;dojo.provide("com.ibm.data.resolver.SiteMap");dojo.declare("com.ibm.data.resolver.SiteMap",com.ibm.data.TemplateInstantiator,{namespaces:{mashup:"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.2/mashup-sitemap"},constructor:function(_b4){dojo.mixin(this,_b4);this.engine=new com.ibm.xml.SimpleXmlAccessor({namespaces:this.namespaces});this.data=this.getTemplateInstance(this.template,{});this.data=this.engine.select("/mashup:sitemap",this.data,true)[0];},addEntry:function(_b5){var map=dojo.delegate(_b5,{mode:null,uri:null});var ent=new com.ibm.xml.XmlNodeList(this.engine.createFromJson(this.data,{name:"mashup:entry",attributes:{uri:_b5.uri}}));ent.ns=this.namespaces;var _b6=[];for(var p in map){if(map[p]!=null){_b6.push({name:"mashup:parameter",attributes:{name:p},children:this._getValuesDef(map[p])});}}if(_b5.mode){ent.attr("mode",_b5.mode);}else{ent.removeAttr("mode");}dojo.forEach(_b6,function(def){ent.createFromJson(def);},this);},_getValuesDef:function(_b7){if(!dojo.isArray(_b7)){_b7=[_b7];}return dojo.map(_b7,this._getValueDef,this);},_getValueDef:function(_b8){return {name:"mashup:value",children:[_b8+""]};},getEntries:function(){return this.engine.select("mashup:entry",this.data);},serialize:function(){return com.ibm.domUtilities.stringFromDoc(this.data);}});(function(){var _b9=com.ibm.data.resolver.SiteMap.prototype,_ba=[];for(var _bb in _b9.namespaces){_ba.push("xmlns:",_bb,"=\"",_b9.namespaces[_bb],"\" ");}dojo.extend(com.ibm.data.resolver.SiteMap,{template:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<mashup:sitemap "+_ba.join("")+">"+"</mashup:sitemap>"});})();}if(!dojo._hasResource["com.ibm.lang.Tokenizer"]){dojo._hasResource["com.ibm.lang.Tokenizer"]=true;dojo.provide("com.ibm.lang.Tokenizer");dojo.declare("com.ibm.lang.Tokenizer",null,{splitter:/[ ]/g,constructor:function(_bc){if(_bc){if(dojo.isString(_bc)){_bc=new RegExp(_bc,"g");}this.splitter=_bc;}},tokenize:function(str){var _bd=null,_be=[],_bf=0;while((_bd=this.splitter.exec(str))!=null){if(_bf<_bd.index){_be.push(str.substring(_bf,_bd.index));}_bf=_bd.index;}if(_bf<str.length){_be.push(str.substring(_bf,str.length));}return _be;}});}if(!dojo._hasResource["com.ibm.stream.BitStream"]){dojo._hasResource["com.ibm.stream.BitStream"]=true;dojo.provide("com.ibm.stream.BitStream");(function(){var _c0=com.ibm.stream;_c0.BitStream=function(_c1,_c2){this.bsize=_c1?_c1:8;this.revEndian=_c2;this.init();};dojo.extend(_c0.BitStream,{init:function(){this.slot=0;this.rem=this.bsize;this.buf=[];},getSize:function(){return (this.buf.length*this.bsize)+(this.rem<this.bsize?this.rem:0);},_applyEndianness:function(_c3){if(this.revEndian){var _c4=0,_c5=1;for(var i=0;i<this.bsize;i++){_c4<<=1;_c4|=((_c3>>>i)&_c5);}return _c4;}else{return _c3;}},pushBits:function(_c6,len){while(len){var n=Math.min(len,this.rem),v=(_c6>>>(len-=n))&((1<<n)-1);this.rem-=n;this.slot<<=n;this.slot|=v;if(!this.rem){this._pushVal(this.buf,this.slot);this.slot=0;this.rem=this.bsize;}}},pushBitArray:function(_c7){var arr=_c7.slice();if(this.rem<this.bsize&&arr.length>this.rem){this.pushBitArray(arr.splice(0,this.rem));}var v=0,s=0,_c8=0,end=this.bsize,_c9=arr.slice();while(arr.length>0){v<<=1;v|=(arr.shift()?1:0);if(++s==this.bsize){this.pushBits(v,s);v=0,s=0,_c8=end,end+=this.bsize;}}this.pushBits(v,s);},getBlocks:function(_ca){var b=this.buf.slice(),rem=this.rem;if(this.rem<this.bsize){if(_ca){this._pushVal(b,this.slot);}else{this._pushVal(b,this.slot<<this.rem);rem=0;}}return {blocks:b,remaining:rem};},_pushVal:function(buf,val){val=this._applyEndianness(val);buf.push(val);},toBitStream:function(_cb){var bs=new _c0.BitStream(_cb?_cb:this.bsize);var b=this.buf.slice();for(var i=0;i<b.length;i++){bs.pushBits(b[i],this.bsize);}if(this.rem<this.bsize){bs.pushBits(this.slot,this.bsize-this.rem);}return bs;}});})();}if(!dojo._hasResource["com.ibm.encoding.base64"]){dojo._hasResource["com.ibm.encoding.base64"]=true;dojo.provide("com.ibm.encoding.base64");(function(){var abc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64=com.ibm.encoding.base64={alphabets:{standard:abc,url:abc.replace("+/=","-_!"),regexp:abc.replace("+/","!-"),filename:abc.replace("/","-")},encodeUrl:function(val){return b64.encode(b64._toCharCode(val),b64.alphabets.url).join("");},encodeRegexp:function(val){return b64.encode(b64._toCharCode(val),b64.alphabets.regexp).join("");},encodeFilename:function(val){return b64.encode(b64._toCharCode(val),b64.alphabets.filename).join("");},_toCharCode:function(val){var arr=[];for(var i=0;i<val.length;i++){arr.push(val.charCodeAt(i));}return arr;},encode:function(val,_cc){var bs8=new com.ibm.stream.BitStream(8),abc=_cc.split("");var _cd=val.slice(),_ce=[],_cf=val.length%3;while(_cd.length>0){var buf=_cd.splice(0,3);for(var i=0;i<buf.length;i++){bs8.pushBits(buf[i],8);}_ce=_ce.concat(b64._encodeStream(bs8,abc));bs8.init();}if(_cf){for(var c=3;c>_cf;c--){_ce.push(abc[64]);}}return _ce.join("");},decode:function(str,_d0){var s=str.split(""),abc=_d0.split("");var _d1=s.indexOf(abc[64]);var bs6=new com.ibm.stream.BitStream(6);var buf=[];for(var i=0;i<s.length;i+=4){for(var j=i;j<i+4;j++){bs6.pushBits(abc.indexOf(s[j]),6);}var _d2=b64._decodeStream(bs6,abc);while(j-->_d1){_d2.pop();}buf=buf.concat(_d2);bs6.init();}return buf;},encodeBits:function(val,_d3,_d4){var bs8=new com.ibm.stream.BitStream(8,_d4);bs8.pushBitArray(val);var _d5=bs8.getBlocks().blocks;return b64.encode(_d5,_d3);},_encodeStream:function(_d6,_d7){var bs6=_d6.toBitStream(6),_d8=bs6.getBlocks().blocks,out=[];for(var j=0;j<_d8.length;j++){out.push(_d7[_d8[j]]);}return out;},_decodeStream:function(_d9,_da){var bs8=_d9.toBitStream(8),_db=bs8.getBlocks().blocks,out=[];for(var j=0;j<_db.length;j++){out.push(_db[j]);}return out;}};})();}if(!dojo._hasResource["com.ibm.encoding.huffman"]){dojo._hasResource["com.ibm.encoding.huffman"]=true;dojo.provide("com.ibm.encoding.huffman");(function(){var _dc=/[\/\. ]/g,b64=com.ibm.encoding.base64,_dd=function(arr){return b64.encode(arr,b64.alphabets.url);},_de=function(str){return b64.decode(str,b64.alphabets.url);},_df=function(str){return encodeURIComponent(str.replace(/Z/g,"Z5A")).replace(/%/g,"Z").replace(/~/g,"Z7E");},_e0=function(str){decodeURIComponent(str.replace(/Z7E/g,"~").replace(/Z/g,"%")).replace(/Z5A/g,"Z");};var _e1=com.ibm.encoding.huffman={encodeUrlByRegexp:function(url,_e2){return _e1.encodeUrlByTokens((new com.ibm.lang.Tokenizer(_e2||_dc)).tokenize(url));},encodeUrlByTokens:function(_e3){var _e4=_e1.getTree(_e3),url=_dd(_e4.encodedTree.getBlocks().blocks);for(var i=0;i<_e4.alphTokens.length;i++){url+="/"+_df(_e4.alphTokens[i]);}url+="/"+_dd(_e4.encodedData.getBlocks().blocks);window.tree=_e4;return url;},getTree:function(_e5){return new com.ibm.encoding.huffman.Tree(_e5);},decodeUrl:function(url){}};})();dojo.declare("com.ibm.encoding.huffman.Tree",null,{parts:[],root:null,encodedData:null,alphTokens:[],codes:{},encodedTree:null,constructor:function(_e6,_e7){this.parts=_e6;this._nid=0;if(!_e7){this._buildTree();}},_initTreeCodes:function(){this.codes={};this.alphTokens=[];this.encodedTree=new com.ibm.stream.BitStream(8,true);this._walk(this.root,[]);this._encodeParts();},_walk:function(_e8,_e9){if(_e8[0] instanceof Array||typeof _e8[0]=="array"){this.encodedTree.pushBits(1,1);this._walk(_e8[0][0],_e9.concat(0));this._walk(_e8[0][1],_e9.concat(1));}else{this.encodedTree.pushBits(0,1);this.codes[_e8[0]]=_e9;this.alphTokens.push(_e8[0]);}},_buildTree:function(){var _ea=this._getSortedParts();while(_ea.length>1){var l=_ea.shift(),r=_ea.shift();_ea.push([[l,r],l[1]+r[1]]);_ea.sort(this._compareFrequency);}this.root=_ea[0];this._initTreeCodes();},_encodeParts:function(){this.encodedData=new com.ibm.stream.BitStream(8,true);for(var i=0;i<this.parts.length;i++){this.encodedData.pushBitArray(this.codes[this.parts[i]]);}},_getSortedParts:function(){var _eb={},_ec;for(var i=this.parts.length-1,p;p=this.parts[i],i>=0;i--){if(p in _eb){_eb[p]++;}else{_eb[p]=1;}}var _ed=[];for(var p in _eb){_ed.push([p,_eb[p]]);}return _ed.sort(this._compareFrequency);},_compareFrequency:function(p1,p2){return p1[1]-p2[1];}});}if(!dojo._hasResource["com.ibm.data.ItemsLoader"]){dojo._hasResource["com.ibm.data.ItemsLoader"]=true;dojo.provide("com.ibm.data.ItemsLoader");dojo.declare("com.ibm.data.ItemsLoader",null,{store:null,query:null,queryOptions:null,cacheContext:null,cacheProperty:null,preload:true,fetchOnReload:false,resultSet:null,status:0,constructor:function(_ee){dojo.mixin(this,_ee);if(!this.queryOptions){this.queryOptions={};}this._lastModified=(new Date()).getTime();if(this.preload){setTimeout(dojo.hitch(this,"_load"),1);}},filter:function(_ef){return _ef;},_getResultSet:function(){if(this._lastModified==this.resultSet._lastModified){return this.resultSet;}else{this.resultSet=this.filter(this.resultSet);this._lastModified=this.resultSet._lastModified=(new Date()).getTime();if(this.cacheContext&&this.cacheProperty){this.cacheContext[this.cacheProperty]=this.resultSet;}return this.resultSet;}},_load:function(){if(!this._def){this._def=new dojo.Deferred();if(this.cacheContext&&this.cacheProperty){this.resultSet=this.cacheContext[this.cacheProperty];if(this.resultSet){if(!this.status){this.status=200;}this.resultSet.loaded=true;this._def.callback();return this._def;}}this._fetch();}return this._def;},_getFetchArgs:function(){return {query:this.query,queryOptions:this.queryOptions,onBegin:function(_f0,_f1){this.totalSize=_f0;this._request=_f1;this.status=_f1.xhr.status;},onComplete:function(_f2){_f2.loaded=true;this.resultSet=_f2;this._def.callback();},onError:function(err,_f3){this._request=_f3;this._def.errback(err);},scope:this};},_fetch:function(){this._request=this.store.fetch(this._getFetchArgs());},addOnLoad:function(_f4){this._load().addCallback(this._wrap(_f4));return this;},addOnError:function(_f5){this._load().addErrback(this._wrap(_f5,true));return this;},addOnResult:function(_f6){return this.addOnLoad(_f6).addOnError(_f6);},_wrap:function(f,_f7){if(f){return dojo.hitch(this,function(res){try{f(_f7?res:this._getResultSet());}catch(err){this.raiseError(err);}});}},raiseError:function(err){console.error(err);},reload:function(){if(this._def){this._def.cancel();}delete this._def;if(this.fetchOnReload&&this.cacheContext&&this.cacheProperty){delete this.cacheContext[this.cacheProperty];}this._load();return this;}});}if(!dojo._hasResource["com.ibm.data.PagedItemsLoader"]){dojo._hasResource["com.ibm.data.PagedItemsLoader"]=true;dojo.provide("com.ibm.data.PagedItemsLoader");dojo.declare("com.ibm.data.PagedItemsLoader",com.ibm.data.ItemsLoader,{pageSize:0,constructor:function(_f8){this._pages=[];this._pageDfd=new dojo.Deferred();this.resultSet=[];},_load:function(){if(!this._def){this._def=new dojo.Deferred();if(this.cacheContext&&this.cacheProperty){this._orphanItems=this.cacheContext[this.cacheProperty];if(this._orphanItems){this.query=this._orphanItems.query;}}}return this._def;},hasNext:function(){return (this._orphanItems&&this._orphanItems.length>0)||new Boolean(this.query)==true;},next:function(){if(this.hasNext()){if(!this._curPage){this._makePage();}if(this._curPage&&!this._curPage.loading){this._curPage.load();}}return this;},end:function(){this.addOnPageLoad(dojo.hitch(this,"next"));this.next();return this;},_makePage:function(){var pg=this._curPage=new com.ibm.data.ItemsPage({store:this.store,query:this.query,size:this.pageSize,filter:this.filter});dojo.connect(pg,"onFull",dojo.hitch(this,"_pageFull"));dojo.connect(pg,"onError",dojo.hitch(this,"_pageError"));this._pages.push(pg);if(this._orphanItems){pg.fill(this._orphanItems);}return pg;},_pageFull:function(_f9,_fa,_fb){this.resultSet.push.apply(this.resultSet,_f9);dojo.mixin(this.resultSet,{_lastModified:this._lastModified=(new Date()).getTime(),query:this.query=_fb});this._orphanItems=_fa;delete this._curPage;this._copyDfd().callback(_f9);if(!_fb&&(!_fa||_fa.length==0)){this.resultSet.push.apply(this.resultSet,this._orphanItems);delete this._orphanItems;this._def.callback();}},_pageError:function(err,_fc){this._copyDfd().errback(err);this.resultSet=this.resultSet.concat(this._orphanItems);delete this._orphanItems;this._def.errback(err);},_copyDfd:function(){var df=new dojo.Deferred();df.chain=this._pageDfd.chain.slice();return df;},addOnPageLoad:function(_fd){this._pageDfd.addCallback(this._wrapPage(_fd));return this;},addOnPageError:function(_fe){this._pageDfd.addErrback(this._wrapPage(_fe));return this;},addOnPageResult:function(_ff){return this.addOnPageLoad(_ff).addOnPageError(_ff);},_wrapPage:function(f){if(f){return dojo.hitch(this,function(res){try{f(res);}catch(err){this.raiseError(err);}});}}});dojo.declare("com.ibm.data.ItemsPage",null,{store:null,query:null,items:[],size:50,constructor:function(args){this.items=[];dojo.mixin(this,args);this.full=false;this.loading=false;},filter:function(_100){return _100;},_makeLdr:function(){this._ldr=new com.ibm.data.ItemsLoader({query:this.query,store:this.store,preload:false,filter:this.filter});},load:function(){if(!this.loading&&!this.full){this.loading=true;this._load();}},_load:function(){if(this.query){if(!this._ldr){this._makeLdr();}this._startLoader();}else{this.onFull(this.items,[],null);}},_startLoader:function(){this._ldr.addOnLoad(dojo.hitch(this,"_onLoadFill")).addOnError(dojo.hitch(this,"error"));},_onLoadFill:function(_101){this.query=this._ldr._request.nextQuery;this.fill(_101);},fill:function(_102){var dif=this.size-this.items.length;if(dif>0){this.items.push.apply(this.items,_102.slice(0,dif));if(this.items.length==this.size){this.onFull(this.items,_102.slice(dif),this.query);}else{if(this.loading){this._load();}}}},error:function(err){this.onError(err,this.items);},onFull:function(_103,_104,_105){this.full=true;},onError:function(err,_106){this.full=true;this.err=err;}});}if(!dojo._hasResource["com.ibm.data.Resolver"]){dojo._hasResource["com.ibm.data.Resolver"]=true;dojo.provide("com.ibm.data.Resolver");dojo.require("dojo.DeferredList");dojo.require("dojo.i18n");(function(){var _107={};com.ibm.data.Resolver={register:function(_108,cntr){if(!_107[_108]){_107[_108]=cntr;}},getHandler:function(_109){return _107[_109];},getStore:function(args){return new com.ibm.data.ResolverStore(args);},_flagDigestUpdate:function(){dojo.cookie("DigestTracker",(new Date()).getTime(),{path:"/"});},TOPICS:{UpdateDigest:"/resolver/UpdateDigest"}};dojo.subscribe(com.ibm.data.Resolver.TOPICS.UpdateDigest,com.ibm.data.Resolver._flagDigestUpdate);})();dojo.declare("com.ibm.data.ResolverStore",null,{tunnel:false,states:{"new":0,"dirty":1,"deletedExpl":2,"deletedImpl":3,"deleted":4,"loaded":5,"saving":6},_features:{"dojo.data.api.Read":true,"dojo.data.api.Write":true,"dojo.data.api.Identity":true,"dojo.data.api.Notification":true,"com.ibm.data.api.ServerGenerated":true},namespaces:{},headers:{"DIGEST":"X-Request-Digest","STATUS":"X-Status-Code","URI":"Content-ID","CONTENT_TYPE":"Content-Type","METHOD":"X-Method-Override","AUTH_OVERRIDE":"X-IBM-XHR"},URL_LIMIT:2000,_huffmanTokenizer:/[\/ ]/g,_digest:"",url:"",isAuthenticated:false,saveWait:1,fetchWait:1,constructor:function(args){dojo.mixin(this,args);this._handlers={};this._cachedItems={};this._itemLoaders={};this._cidMap={};this._ioOutQueue=this._getDeferredQueue(new dojo.Deferred()).fire();this._fetchQueue=[];this._laundryQueue=[];this._cidCntr=Math.floor(Math.random()*10000001);this._etagMap={};this._notifyOn=true;this.multiPart=true;var qi=this.url.indexOf("?");if(qi>-1){this.multiPartUrl=this.url.substr(0,qi)+"?uri=mashup:multiplex&"+this.url.substr(qi+1);}else{this.multiPartUrl=this.url+"?uri=mashup:multiplex";}this._auth=dojo.getObject("com.ibm.ajax.auth");this._depMgr=new com.ibm.data.DependencyManager(this);this._messages=dojo.i18n.getLocalization("com.ibm.bundles","Resolver");this._faultFactory=new com.ibm.data.resolver.FaultFactory();dojo.addOnWindowUnload(dojo.hitch(this,function(){this.destroy();}));},destroy:function(){for(var id in this._cachedItems){var item=this._cachedItems[id];try{if(this._isItem(item)){this._getHandlerByItem(item).uninitialize(item);}for(var p in item){delete item[p];}}catch(err){}}delete this._cachedItems;for(var _10a in this._handlers){var h=this._getHandlerByScheme(_10a);h.destroy();delete h._$;}delete this._handlers;delete this._itemLoaders;this._depMgr.destroy();delete this._depMgr;delete this._ioOutQueue;delete this._laundryQueue;delete this._messages;},getNamespaces:function(){return this.namespaces;},applyHandlerStrategy:function(_10b,_10c){var h=this._getHandlerByScheme(_10b);return com.ibm.strategy.Strategy.applyStrategy(h,_10c);},unapplyHandlerStrategy:function(adv){com.ibm.strategy.Strategy.removeStrategy(adv);},_initStoreMeta:function(item,_10d){if(item._$==null){item._$={states:[],store:this};}item._$=dojo.mixin(item._$,_10d);return item;},_getDeferredQueue:function(dfd){var dfdq=new com.ibm.lang.DeferredQueue(dfd);dfdq.raiseError=dojo.hitch(this,"raiseError");return dfdq;},_getSchemeFromUri:function(uri){if(!uri){var err=new Error(this.fmt("errorNoPocHandler",[uri]));this.raiseError(err);throw err;}return uri.split(":")[0];},_getHandlerByScheme:function(_10e){if(!this._handlers[_10e]){var h=com.ibm.data.Resolver.getHandler(_10e);if(!h){var err=new Error(this.fmt("errorNoPocHandler",[_10e]));this.raiseError(err);throw err;}var inst=new h(this,this._depMgr);this._handlers[_10e]=inst;inst._$={stateLists:[[],[],[]]};}return this._handlers[_10e];},_getHandlerByItem:function(item){this._assertItem(item);return this._getHandlerByScheme(item._$.scheme);},_getHandlerByUri:function(uri){return this._getHandlerByScheme(this._getSchemeFromUri(uri));},raiseError:function(_10f){console.error(_10f);},urlToQuery:function(url,_110){return new com.ibm.data.resolver.Query({url:url,scheme:_110});},fmt:function(key,map){return dojo.string.substitute(this._messages[key],map,function(_111,_112){if(_111===null){return "null";}if(_111===undefined){return "undefined";}return _111;});},_isItem:function(_113){return _113&&_113._$&&_113._$.scheme&&_113._$.store===this;},_assertItem:function(_114){if(!this._isItem(_114)){var err=new Error(this.fmt("errorInvalidItem",[_114]));this.raiseError(err);throw err;}return true;},_assertString:function(_115){if(!dojo.isString(_115)){var err=new Error(this.fmt("errorInvalidString",[_115]));this.raiseError(err);throw err;}return true;},_getDigestFromResponse:function(_116,_117){var _118=_117.xhr.getResponseHeader(this.headers.DIGEST);if(_118){if(this._digest){this.url=this.url.replace(this._digest,_118);}this._digest=_118;}},_flagDigestUpdate:function(){dojo.publish(com.ibm.data.Resolver.TOPICS.UpdateDigest);},_queryToHeader:function(_119){return dojo.objectToQuery(_119).replace(/&/mg,"; ");},_isResponseError:function(_11a,xhr){var s=xhr.status;if((s>=200&&s<300)||s==302||s==1223){return false;}return true;},_multiPartContentHandler:function(_11b,xhr,_11c){var _11d=xhr.getResponseHeader(this.headers.STATUS);xhr.status=_11d?_11d-0:200;var _11e=xhr.responseText;if(this._isResponseError(_11b,xhr)){if(xhr.getResponseHeader(this.headers.CONTENT_TYPE)=="application/soap+xml"){_11e=this._faultFactory.getFaultError(_11e,new Error());}else{_11e=new Error(_11e);}}else{_11e=_11c(_11b,xhr);}return _11e;},_createIOMPartDfd:function(_11f,_120){var dfd=new dojo.Deferred(),_121;var _122=_120.method.toUpperCase();switch(_122){case "GET":case "PROPFIND":delete _120.query.digest;_121=_11f.inboundQueue;break;default:if(!_120.headers){_120.headers={};}_120.headers[this.headers.METHOD]=_122;var _123=null;if(dojo.isString(_120.query)){_120.headers[this.headers.URI]="res:/"+_120.query;}else{_120.headers[this.headers.URI]=_120.query.uri;delete _120.query.uri;var _123=this._queryToHeader(_120.query);if(_123.length>0){_120.headers[this.headers.URI]+="; "+_123;}}delete _120.query;_121=_11f.outboundQueue;break;}var _124=_120.error;_120.error=function(_125,args){try{if(_124){_124.call(_120,_125,args);}}catch(err){}};var _126=_120.handle;_120.handle=function(_127,args){try{if(_126){_126.call(_120,_127,args);}}catch(err){}if(_127 instanceof Error){dfd.errback(_127);}else{dfd.callback(_127);}};_121.push(_120);return dfd;},_getSiteMap:function(_128){var sm=new com.ibm.data.resolver.SiteMap();var q;for(var i=0;i<_128.length;i++){q=_128[i].query;if(dojo.isString(q)){q={uri:"res:/"+q};}sm.addEntry(q);}return sm;},_encodeSiteMap:function(sm){return com.ibm.encoding.huffman.encodeUrlByRegexp(sm.serialize(),this._huffmanTokenizer);},_exceedsURLLimit:function(url){return (url.length+window.location.protocol.length+window.location.hostname.length+window.location.port.length+3)>this.URL_LIMIT;},_sendHuffmanRequest:function(_129){if(_129&&_129.length>0){var sm=this._getSiteMap(_129),_12a=this._encodeSiteMap(sm);var _12b;var qi=this.url.indexOf("?");if(qi>-1){_12b=this.url.substr(0,qi)+"mashup/mashup:huffman/"+_12a+"?"+this.url.substr(qi+1);}else{_12b=this.url+"mashup/mashup:huffman/"+_12a;}if(this._exceedsURLLimit(_12b)){this._sendHuffmanRequest(_129.slice(0,_129.length/2));this._sendHuffmanRequest(_129.slice(_129.length/2,_129.length));}else{var hdrs={};hdrs[this.headers.AUTH_OVERRIDE]="true";dojo.xhrGet({headers:hdrs,partContentHandler:dojo.hitch(this,"_multiPartContentHandler"),url:_12b,load:dojo.hitch(this,function(_12c,args){if(!this._authHandler(_12c,args)){return;}this._getDigestFromResponse(_12c,args);com.ibm.utilities.handleMultiPartResponse(_129,_12c,args);}),error:function(err,args){dojo.forEach(_129,function(obj){if(obj.error){try{obj.error(err,args);}catch(e){}}if(obj.handle){try{obj.handle(err,args);}catch(e){}}},this);}});}}},_io:function(_12d){var _12e=null,_12f=null;if(this.multiPart&&_12d.length>1){var _130=[],_131={inboundQueue:[],outboundQueue:[]};_12e=dojo.partial(this._createIOMPartDfd,_131);_12f=dojo.hitch(this,function(){var hdrs={};hdrs[this.headers.AUTH_OVERRIDE]="true";if(_131.outboundQueue.length>0){com.ibm.utilities.multiPartXhr("POST",{headers:hdrs,url:this.multiPartUrl,partContentHandler:dojo.hitch(this,"_multiPartContentHandler"),preHandle:dojo.hitch(this,function(_132,args){if(!this._authHandler(_132,args)){return;}this._getDigestFromResponse(_132,args);})},_131.outboundQueue);}if(_131.inboundQueue.length>0){this._sendHuffmanRequest(_131.inboundQueue);}});}else{var _133=[];_12e=function(_134){if(dojo.isString(_134.query)){_134.url=_134.query;}else{var _135=dojo.objectToQuery(_134.query);if(this.url.indexOf("?")>-1){_134.url=this.url+"&"+_135;}else{_134.url=this.url+"?"+_135;}}delete _134.query;_134.method=_134.method.toLowerCase();if(_134.method=="put"||_134.method=="post"){_134[_134.method+"Data"]=_134.data;}if(!_134.headers){_134.headers={};}_134.headers[this.headers.AUTH_OVERRIDE]="true";if(this.tunnel&&_134.method!="post"&&_134.method!="get"){_134.headers[this.headers.METHOD]=_134.method.toUpperCase();_134.method="post";}var _136=_134.handle;_134.handle=dojo.hitch(this,function(_137,args){if(!this._authHandler(_137,args)){return;}if(_136){_136.call(args,_137,args);}});var _138=_134.load;_134.load=dojo.hitch(this,function(_139,args){this._getDigestFromResponse(_139,args);if(_138){_138.call(args,_139,args);}});var _13a=new dojo.Deferred();_133.push(function(){return dojo.xhr(_134.method,_134,true).addCallbacks(function(resp){return _13a.callback(resp);},function(err){return _13a.errback(err);});});return _13a;};_12f=function(){dojo.forEach(_133,function(_13b){_13b();});};}var dfds=dojo.map(_12d,_12e,this),dfdl=new dojo.DeferredList(dfds);dfdl.addCallback(function(_13c){return dojo.map(_13c,function(res){return res[1];});});return {start:function(res){_12f();return dfdl;},deferredList:dfdl};},_authHandler:function(_13d,args){if(this._auth){if(this._auth.isAuthenticationRequired(_13d,args)){this._auth.authenticationHandler();return false;}}return true;},_ioOut:function(_13e){if(!_13e||_13e.length==0){var _13f=new dojo.Deferred();_13f.callback([]);return _13f;}var _140=this._io(_13e);this._flagDigestUpdate();return _140.start();},_ioIn:function(_141){var _142=this._io(_141);return _142.start();},_fromCache:function(id){return this._cachedItems[id];},_toCache:function(id,item){this._cachedItems[id]=item;},getValue:function(item,_143,_144){this._assertString(_143);return this._getHandlerByItem(item).getValue(item,_143,_144);},getValues:function(item,_145){this._assertString(_145);return this._getHandlerByItem(item).getValues(item,_145);},getAttributes:function(item){return this._getHandlerByItem(item).getAttributes(item);},hasAttribute:function(item,_146){this._assertString(_146);return this._getHandlerByItem(item).hasAttribute(item,_146);},containsValue:function(item,_147,_148){this._assertString(_147);return this._getHandlerByItem(item).containsValue(item,_147,_148);},isItem:function(_149){return this._isItem(_149)&&!this._hasState(_149,this.states["deleted"]);},isItemLoaded:function(_14a){return this.isItem(_14a)&&this._hasState(_14a,this.states["loaded"]);},loadItem:function(_14b){var it=_14b.item;if(this.isItemLoaded(it)){return;}var ldr=this._getItemLoader(it);if(_14b.onItem){ldr.addOnLoad(dojo.hitch(_14b.scope,_14b.onItem));}if(_14b.onError){ldr.addOnError(dojo.hitch(_14b.scope,_14b.onError));}},getLoader:function(_14c){var _14d=dojo.delegate(_14c,{store:this,preload:false}),cls;if(_14c.pageSize!=null){cls=com.ibm.data.PagedItemsLoader;}else{cls=com.ibm.data.ItemsLoader;}return new cls(_14d);},fetch:function(_14e){if(!_14e){_14e={};}_14e.aborted=false;if(!_14e.scope){_14e.scope=dojo.global;}if(!_14e.queryOptions){_14e.queryOptions={};}var _14f=_14e.queryOptions.preventCache;_14e=this._prepareQuery(_14e);var _150=_14e.scheme,_151=this._getHandlerByScheme(_150),_152=_151.definition.handleAs;var _153=dojo.hitch(this,function(_154,_155){try{if(_14e.aborted){return;}if(dojo.isIE&&_152=="xml"){_154=com.ibm.domUtilities.docFromString(_154);}this.processResponse(_154,_14e,_150,_155);}catch(err){this.raiseError(err);}});var _156=function(_157,_158){if(_14e.onError){_14e.onError.call(_14e.scope,_157,_14e);}};if(_14e.url){_14e.query=_14e.url+"?"+dojo.objectToQuery(_14e.query);delete _14e.url;}var sync=_14e.sync||_14e.queryOptions.sync;var args={method:"GET",preventCache:_14f,content:{},query:_14e.query,handleAs:"text",headers:{"X-IBM-XHR":"true"},load:_153,error:_156};if(_152){if(!dojo.isIE||_152!="xml"){args.handleAs=_152;}}if(_14e.queryOptions.timeout!=null){args.timeout=_14e.queryOptions.timeout;}else{if(this.timeout){args.timeout=this.timeout;}}_14e.abort=function(){_14e.aborted=true;};args=this.modifyRequestArgs(args,_14e);if(this._fetchQueue.length==0){setTimeout(dojo.hitch(this,"_flushFetchQueue"),this.fetchWait);}var _159=/opera/i.test(navigator.userAgent);if(sync||_14e.queryOptions.bypassBatch||_159){args.sync=sync;this._ioIn([args]);}else{this._fetchQueue.push([args]);}this._lastRequest=_14e;return _14e;},_flushFetchQueue:function(){try{var q=[],fq=this._fetchQueue.splice(0,this._fetchQueue.length);for(var i=0;i<fq.length;i++){q.push.apply(q,fq[i]);}this._ioIn(q);}catch(err){this.raiseError(err);}},modifyRequestArgs:function(_15a,_15b){return _15a;},_splitUrlParts:function(_15c){if(!_15c||_15c.length==0){return {};}var _15d=_15c.indexOf("?");var str=_15c,path;if(_15d>-1&&(_15d<str.length-1)){str=_15c.substring(_15d+1);path=_15c.substring(0,_15d);}else{str="";path=_15c;}return {query:dojo.queryToObject(str),path:path};},_attachDigestToQuery:function(_15e){if(this._digest){var base=_15e.path?_15e.path:this.url,dIdx=base.indexOf(this._digest);if(dIdx<0||(dIdx>=0&&_15e.query.digest&&_15e.query.digest!=this._digest)){_15e.query.digest=this._digest;}}},_prepareQuery:function(_15f){var q=_15f.query,_160,_161;if(!q){q={};}else{if(q.declaredClass=="com.ibm.data.resolver.Query"){_15f.scheme=q.scheme;q=q.url;}}if(dojo.isString(q)){_161=this._splitUrlParts(q);}else{_161={query:q};}if(!_15f.scheme){_15f.scheme=this._getSchemeFromUri(_161.query.uri);}_160=this._getHandlerByUri(_15f.scheme);var _162=dojo.mixin({},_15f);dojo.forEach(["onBegin","onItem","onComplete","onError","scope","query","scheme"],function(p){delete _162[p];});_161.query=_160.modifyFetchQuery(_161.query,_162);this._attachDigestToQuery(_161);_15f.query=_161.query;_15f.url=_161.path;return this.prepareQuery(_15f);},prepareQuery:function(_163){return _163;},_buildUrl:function(_164,_165){var ret="";var _164=this._prepareQuery(_164);var _166=dojo.objectToQuery(_164.query);if(_165.indexOf("?")>-1){ret=_165+"&"+_166;}else{ret=_165+"?"+_166;}return (this.modifyUrl(_164,ret));},modifyUrl:function(_167,url){return url;},processFetchedItems:function(_168,meta,_169,_16a,_16b){var _16c=(_169.queryOptions&&_169.queryOptions.preventClientCache);var _16d=(_169.queryOptions&&_169.queryOptions.replaceCache);for(var i=0;i<_168.length;i++){this._initStoreMeta(_168[i],{scheme:_16a,pocHandler:_16b});this._addState(_168[i],_16b,this.states["loaded"]);this._toCache(this.getIdentity(_168[i]),_168[i]);}return _168;},processResponse:function(data,_16e,_16f,_170){_16e.xhr=_170.xhr;if(_16e.aborted){return;}var _171=this._getHandlerByScheme(_16f);var _172=_171.processFetch(data,_16e);items=this.processFetchedItems(_172.items,_172.meta,_16e,_16f,_171);if(_16e.onBegin){_16e.onBegin.call(_16e.scope,_172.meta.resultSize,_16e);}if(_16e.aborted){return;}if(_16e.onItem){for(var i=0;i<items.length;i++){if(_16e.aborted){return;}_16e.onItem.call(_16e.scope,items[i],_16e);}}if(_16e.aborted){return;}if(_16e.onComplete){_16e.onComplete.call(_16e.scope,_16e.onItem?null:items,_16e);}},getFeatures:function(){return this._features;},close:function(_173){if(_173&&_173.abort){_173.abort();}},getLabel:function(item){return this._getHandlerByItem(item).getLabel(item);},getLabelAttributes:function(item){return this._getHandlerByItem(item).getLabelAttributes(item);},getIdentity:function(item){return this._getHandlerByItem(item).getIdentity(item);},getIdentityAttributes:function(item){return this._getHandlerByItem(item).getIdentityAttributes(item);},fetchItemByIdentity:function(_174){var item=this.byId(_174.identity);if(this.isItemLoaded(item)){if(_174.onItem){_174.onItem.call(scope?scope:dojo.global,item);}}else{this.loadItem({item:item,onItem:_174.onItem,onError:_174.onError,scope:_174.scope});}},byId:function(id){var item=this._fromCache(id);if(!item){item=this.byCId(id);if(!item){var type=this._getSchemeFromUri(id),h=this._getHandlerByScheme(type);item=h.createStub({id:id});this._initStoreMeta(item,{scheme:type});this._toCache(id,item);}}return item;},_createItemFromProps:function(_175,_176,_177){var _178=_175.scheme;delete _175.scheme;if(!_176){_176={};}if(_176.parent&&!_175.parentId){_175.parentId=this.getIdentity(_176.parent);}else{if(!_176.parent&&_175.parentId){_176.parent=this.byId(_175.parentId);}}if(!_175.locale){_175.locale=dojo.locale;}var _179=this._initStoreMeta(_177.newItem(_175,_176),{scheme:_178});this._addState(_179,_177,this.states["loaded"]);return _179;},newItem:function(_17a,_17b){if(!_17a.scheme){_17a.scheme=_17a.pocType;}var h=this._getHandlerByScheme(_17a.scheme);var _17c=_17b?_17b.parent:null;if(!_17a.id){_17a.id=h.definition.scheme+":"+this.getUniqueCId();}var id=_17a.id;var item=this._createItemFromProps(_17a,_17b,h);item._$.onCreateDefQueue=this._getDeferredQueue(new dojo.Deferred());this.registerCId(h.getIdentity(item),item);this._toCache(id,item);this._changeState(item,h,this.states["new"]);if(this._notifyOn){this.onNew(item,{item:_17c});}return item;},deleteItem:function(item){var h=this._getHandlerByItem(item);this._changeState(item,h,this.states["deletedExpl"]);if(this._notifyOn){}},_getItemLoader:function(item){var id=this.getIdentity(item);if(!this._itemLoaders[id]){this._itemLoaders[id]=(new com.ibm.data.ItemsLoader({query:{uri:id},store:this,filter:function(_17d){return _17d[0];}})).addOnResult(dojo.hitch(this,function(){delete this._itemLoaders[id];}));}return this._itemLoaders[id];},_setValue:function(item,_17e,_17f,_180){this._assertString(_17e);if(this._notifyOn){var _181=this[_180?"getValues":"getValue"](item,_17e);}var h=this._getHandlerByItem(item);if(!this.isItemLoaded(item)){var err=new Error(this.fmt("errorWriteNotLoaded"));this.raiseError(err);throw err;}h.backup(item);var res=h[_180?"setValues":"setValue"](item,_17e,_17f);if(res){this._changeState(item,h,this.states["dirty"]);if(this._notifyOn){}}return res;},setValue:function(item,_182,_183){return this._setValue(item,_182,_183,false);},setValues:function(item,_184,_185){return this._setValue(item,_184,_185,true);},unsetAttribute:function(item,_186){this._assertString(_186);if(this._notifyOn){var _187=this.getValue(item,_186);}var h=this._getHandlerByItem(item);h.backup(item);var res=h.unsetAttribute(item,_186);if(res){this._changeState(item,h,this.states["dirty"]);if(this._notifyOn){}}return res;},onSaveComplete:function(_188){},save:function(_189){var _18a=this._getUnSavedStateList(this.states["new"]),_18b=this._getUnSavedStateList(this.states["dirty"]),_18c=this._getUnSavedStateList(this.states["deletedExpl"]);var _18d=_18a.concat(_18b);if(!_189){_189={};}_189._itemsOfInterest=_18d.concat(_18c);this._queueForLaundry(_18d,_18c,_189);},saveItems:function(_18e,_18f){var _190=[],_191=[];dojo.forEach(_18e,function(item){if(this._hasState(item,this.states["saving"])){return;}if(this._hasState(item,this.states["new"])||this._hasState(item,this.states["dirty"])){_190.push(item);}else{if(this._hasState(item,this.states["deletedExpl"])){_191.push(item);}}},this);if(!_18f){_18f={};}_18f._itemsOfInterest=dojo.isArray(_18e)?_18e.slice():null;this._queueForLaundry(_190,_191,_18f);},saveScheme:function(_192,_193){var h=this._getHandlerByScheme(_192);var _194=this._cleanList(this._getHandlerStateList(h,this.states["new"]),this.states["new"]),_195=this._cleanList(this._getHandlerStateList(h,this.states["dirty"]),this.states["dirty"]),_196=this._cleanList(this._getHandlerStateList(h,this.states["deletedExpl"]),this.states["deletedExpl"]);var _197=_194.concat(_195);if(!_193){_193={};}_193._itemsOfInterest=_197.concat(_196);this._queueForLaundry(_197,_196,_193);},_itemToIOArgs:function(item,_198){var _199=this._getHandlerByItem(item);var _19a=_199.processSave(item);var _19b=this._hasState(item,this.states["new"]);var _19c=_19a.load;_19a.load=dojo.hitch(this,function(data,_19d){this._removeState(item,_199,this.states["new"]);this._removeState(item,_199,this.states["dirty"]);if(_19b){this._fireCreated(item);}if(_19c){_19c.call(_19a,data,_19d);}_19c=null;return data;});var _19e=_19a.error;_19a.error=dojo.hitch(this,function(err,_19f){_198.setError(item,err);if(_19e){_19e.call(_19a,err,_19f);}_19e=null;return err;});var _1a0=_19a.handle;_19a.handle=dojo.hitch(this,function(data,_1a1){this._removeState(item,_199,this.states["saving"]);if(_1a0){_1a0.call(_19a,data,_1a1);}_1a0=null;return data;});return _19a;},_planStepsMapper:function(step,_1a2){var item=this.byId(step.name);var args=this._itemToIOArgs(item,_1a2);if(this._hasState(item,this.states["new"])){args.method="POST";}else{args.method="PUT";}return args;},_filterUnmetDependencies:function(_1a3,type,_1a4){return dojo.filter(_1a3,function(step){var item=this.byId(step.name);var _1a5=this._depMgr.getTargetsByType(step.name,type);return dojo.every(_1a5,function(id){var _1a6=this.byId(id);if(!this.isCreated(_1a6)){_1a4.setError(item,_1a4.getError(_1a6));this._removeState(item,this._getHandlerByItem(item),this.states["saving"]);return false;}return true;},this);},this);},_queueForLaundry:function(_1a7,_1a8,_1a9){if(this._laundryQueue.length==0){setTimeout(dojo.hitch(this,"_launder"),this.saveWait);}dojo.forEach([_1a7,_1a8],function(list){dojo.forEach(list,function(item){this._addState(item,this._getHandlerByItem(item),this.states["saving"]);},this);},this);this._laundryQueue.push({dirtyList:_1a7,delList:_1a8,keywordArgs:_1a9});},_callSaveCallbacks:function(_1aa,_1ab){dojo.forEach(_1aa,function(kw){var _1ac=_1ab.getErrors(kw._itemsOfInterest),_1ad;if(_1ac.length>0){_1ad="onError";}else{_1ad="onComplete";}if(kw[_1ad]){try{kw[_1ad].call(kw.scope?kw.scope:dojo.global,_1ab);}catch(err){this.raiseError(err);}}},this);},_launder:function(){var _1ae=[],_1af=[],_1b0=[],pile;var _1b1=new com.ibm.data.SaveList({store:this});while((pile=this._laundryQueue.shift())!=null){_1ae=_1ae.concat(pile.dirtyList);_1af=_1af.concat(pile.delList);if(pile.keywordArgs){_1b0.push(pile.keywordArgs);}}var _1b2=this._getDeferredQueue(),_1b3=this._getDeferredQueue();dojo.forEach(_1b0,function(_1b4){if(_1b4.onComplete){_1b2.add((new dojo.Deferred()).addCallback(dojo.hitch(_1b4.scope?_1b4.scope:dojo.global,_1b4.onComplete,_1b1)));}if(_1b4.onError){_1b3.add((new dojo.Deferred()).addCallback(dojo.hitch(_1b4.scope?_1b4.scope:dojo.global,_1b4.onError,_1b1)));}},this);var _1b5=this._depMgr.getPlan(_1ae,com.ibm.data.DependencyManager.types["create"]).orderSteps().filter(dojo.hitch(this,function(step){var item=this.byId(step.name);ret=this.isDirty(item);if(ret){_1b1.addItem(item);}return ret;})),_1b6=_1b5.getGroupList();dojo.forEach(_1b6,function(pile){var map={};var _1b7=dojo.map(pile.steps,function(step){var item=this.byId(step.name);map[step.name]=item;return item;},this);var _1b8=this._depMgr.getPlan(_1b7,com.ibm.data.DependencyManager.types["order"]).orderSteps().filter(dojo.hitch(this,function(step){return map[step.name]!=null;}));pile.steps=_1b8.orderedSteps;},this);_1af=dojo.map(_1af,function(item){_1b1.addItem(item);var args={query:{uri:this.getIdentity(item),rep:"empty"},method:"DELETE",load:dojo.hitch(this,function(){var h=this._getHandlerByItem(item);dojo.forEach(["dirty","deletedExpl","deletedImpl","deleted","saving"],function(_1b9){this._removeState(item,h,this.states[_1b9]);},this);h.uninitialize(item);for(var p in item){delete item[p];}})};var _1ba=args.error;args.error=dojo.hitch(this,function(err,_1bb){_1b1.setError(item,err);if(_1ba){_1ba.call(args,err,_1bb);}_1ba=null;return err;});return args;},this);var _1bc=_1b6.shift(),_1bd=new dojo.Deferred();_1bd.addCallback(dojo.hitch(this,function(){var _1be;if(_1bc!=null){_1be=dojo.map(_1bc.steps,function(step){return this._planStepsMapper(step,_1b1);},this);}else{_1be=[];}var _1bf=_1be.concat(_1af);var _1c0=dojo.hitch(this,function(res){if((_1bc=_1b6.shift())!=null){try{_1bc.steps=this._filterUnmetDependencies(_1bc.steps,com.ibm.data.DependencyManager.types["create"],_1b1);_1bf=dojo.map(_1bc.steps,function(step){return this._planStepsMapper(step,_1b1);},this);return this._ioOut(_1bf).addCallback(_1c0);}catch(err){this.raiseError(err);}}else{var _1c1=_1b1.getErrors();if(_1c1.length==0){_1b2.fire(_1b1);}if(_1c1.length>0){_1b3.fire(_1b1,new Error());}this.onSaveComplete(_1b1);_1b1.destroy();}return res;});return this._ioOut(_1bf).addCallback(_1c0);}));this._ioOutQueue.add(_1bd);},revert:function(){for(var pre in this._handlers){this.revertHandler(this._handlers[pre]);}},revertHandler:function(_1c2){var h=this._handlers[_1c2];if(h){var _1c3=["dirty","deletedExpl","new"];dojo.forEach(_1c3,function(_1c4){var list=this._getHandlerStateList(h,this.states[_1c4]);dojo.forEach(list,function(item){this._revertHandlerItem(item,h);},this);},this);}},revertItem:function(item){var h=this._getHandlerByItem(item);if(h){this._revertHandlerItem(item,h);}},_revertHandlerItem:function(item,_1c5){if(this._hasState(item,this.states["new"])){this._removeState(item,_1c5,this.states["new"]);_1c5.uninitialize(item);}else{this._removeState(item,_1c5,this.states["dirty"]);this._removeState(item,_1c5,this.states["deletedExpl"]);_1c5.restore(item);}},_changeState:function(item,_1c6,_1c7){if(this._hasState(item,_1c7)){return;}switch(_1c7){case this.states["new"]:if(this._hasState(item,this.states["dirty"])||this._hasState(item,this.states["deleted"])){return;}this._addState(item,_1c6,_1c7);return;case this.states["dirty"]:if(this._hasState(item,this.states["new"])||this._hasState(item,this.states["deleted"])){return;}this._addState(item,_1c6,_1c7);break;case this.states["deletedExpl"]:case this.states["deletedImpl"]:this._addState(item,_1c6,_1c7);_1c7=this.states["deleted"];case this.states["deleted"]:this._removeState(item,_1c6,this.states["dirty"]);this._removeState(item,_1c6,this.states["new"]);this._addState(item,_1c6,_1c7);var _1c8=this._depMgr.getTargetsByType(this.getIdentity(item),com.ibm.data.DependencyManager.types["delete"]);dojo.forEach(_1c8,function(_1c9){var _1ca=this.byId(_1c9);this._changeState(_1ca,this._getHandlerByItem(_1ca),this.states["deletedImpl"]);},this);break;case this.states["loaded"]:default:this._addState(item,_1c6,_1c7);}},_removeState:function(item,_1cb,_1cc,_1cd){if(!this._hasState(item,_1cc)){return;}delete item._$.states[_1cc];if(!_1cd){var list=this._getHandlerStateList(_1cb,_1cc);if(list){for(var i=0;i<list.length;i++){if(list[i]==item){list.splice(i,1);}break;}}}switch(_1cc){case this.states["deleted"]:var _1ce=this._depMgr.getTargetsByType(this.getIdentity(item),com.ibm.data.DependencyManager.types["delete"]);dojo.forEach(_1ce,function(_1cf){this._removeState(_1cf,this._getHandlerByItem(_1cf),this.states["deletedImpl"]);},this);break;case this.states["deletedImpl"]:if(!this._hasState(item,this.states["deletedExpl"])){this._removeState(item,_1cb,"deleted");}break;case this.states["deletedExpl"]:if(!this._hasState(item,this.states["deletedImpl"])){this._removeState(item,_1cb,"deleted");}break;default:}},_addState:function(item,_1d0,_1d1){if(this._hasState(item,_1d1)){return;}item._$.states[_1d1]=true;var list=this._getHandlerStateList(_1d0,_1d1);if(list){list.push(item);}},_hasState:function(item,_1d2){if(item._$.states[_1d2]){return true;}return false;},_getHandlerStateList:function(_1d3,_1d4){switch(_1d4){case this.states["new"]:case this.states["dirty"]:case this.states["deletedExpl"]:return _1d3._$.stateLists[_1d4];break;default:return null;}},_cleanList:function(list,_1d5){for(var i=0;i<list.length;i++){if(!this._hasState(list[i],_1d5)){list.splice(i,1);}}return list;},_getHandlerUnSavedStateList:function(_1d6){var arr=[];dojo.forEach(["new","dirty","deletedExpl"],function(st){var list=this._getHandlerStateList(_1d6,this.states[st]);this._cleanList(list,this.states[st]);arr=arr.concat(list);},this);return arr;},_getUnSavedStateList:function(_1d7){var arr=[];for(var _1d8 in this._handlers){var h=this._handlers[_1d8];if(_1d7!=null){arr=arr.concat(this._getHandlerStateList(h,_1d7));}else{arr=arr.concat(this._getHandlerUnSavedStateList(h));}}return dojo.filter(arr,function(item){return !this._hasState(item,this.states["saving"]);},this);},isDirty:function(item){if(item&&this._assertItem(item)){return this._hasState(item,this.states["dirty"])||this._hasState(item,this.states["new"])||this._hasState(item,this.states["deleted"]);}else{for(var _1d9 in this._handlers){var h=this._handlers[_1d9],l;if((l=this._getHandlerStateList(h,this.states["dirty"])&&l.length>0)||(l=this._getHandlerStateList(h,this.states["deleted"])&&l.length>0)||(l=this._getHandlerStateList(h,this.states["new"])&&l.length>0)){return true;}}return false;}},isCreated:function(item){this._assertItem(item);return !this._hasState(item,this.states["new"]);},_fireCreated:function(item){if(item._$.onCreateDefQueue){item._$.onCreateDefQueue.fire(item);item._$.onCreateDefQueue.destroy();delete item._$.onCreateDefQueue;}},addOnCreate:function(item,_1da){this._assertItem(item);if(!item._$.onCreateDefQueue){_1da(item);}else{item._$.onCreateDefQueue.add((new dojo.Deferred()).addCallback(_1da));}},getUniqueCId:function(){return "cid:"+this._cidCntr++;},registerCId:function(cid,item){this._cidMap[cid]=item;item._$.cid=cid;this.addOnCreate(item,dojo.hitch(this,function(item){var id=this.getIdentity(item);this._toCache(id,item);this._depMgr.updateDependencyId(cid,id);}));},getCId:function(item){this._assertItem(item);return item._$.cid;},byCId:function(cid){return this._cidMap[cid];},seedStore:function(_1db,_1dc){if(_1db.id&&!_1db.scheme){_1db.scheme=this._getSchemeFromUri(_1db.id);}var h=this._getHandlerByScheme(_1db.scheme);_1db._$seeded=true;var item=this._createItemFromProps(_1db,_1dc,h);this._toCache(h.getIdentity(item),item);return item;},onDelete:function(_1dd){return _1dd;},onNew:function(_1de,_1df){return {newItem:_1de,parentInfo:_1df};},onSet:function(item,_1e0,_1e1,_1e2){return {item:item,attribute:_1e0,oldValue:_1e1,newValue:_1e2};}});dojo.declare("com.ibm.data.resolver.Query",null,{url:null,params:null,scheme:"",constructor:function(args){dojo.mixin(this,args);if(this.url){var qi=this.url.indexOf("?");if(qi>-1){this.params=dojo.queryToObject(this.url.substr(qi+1));}}else{this.url="?"+dojo.objectToQuery(this.params);}},param:function(name,_1e3){if(arguments.length>1){this.params[name]=_1e3;this._updateUrl();}else{return this.params[name];}},_updateUrl:function(){var qi=this.url.indexOf("?");if(qi>-1){this.url=this.url.substring(0,qi+1)+dojo.objectToQuery(this.params);}},toString:function(){return this.url;}});dojo.declare("com.ibm.data.SaveList",null,{store:null,list:null,constructor:function(args){this.list=[];dojo.mixin(this,args);},addItem:function(item){var id=this.store.getIdentity(item);if(!this.list[id]){var inf=[item,null];this.list.push(inf);this.list[id]=inf;}},removeItem:function(item){var id=this.store.getIdentity(item);if(this.list[id]){delete this.list[id];for(var i=0,inf;inf=this.list[i],i<this.list.length;i++){if(this.store.getIdentity(inf[0])==id){this.list.splice(i,1);return;}}}},_getInf:function(item){if(this.store.isItem(item)){var id=this.store.getIdentity(item);if(this.list[id]){return this.list[id];}else{return this.list[this.store.getCId(item)];}}else{for(var i=0;i<this.list.length;i++){if(item==this.list[i][0]){return this.list[i];}}return null;}},hasItem:function(item){return this._getInf(item)!=null;},getData:function(item){return this._getInfResource(item,2);},setData:function(item,data){this._setInfResource(item,data,2);},getDataSet:function(_1e4){return this._getInfSet(_1e4,2);},getError:function(item){return this._getInfResource(item,1);},setError:function(item,err){this._setInfResource(item,err,1);},getErrors:function(_1e5){return this._getInfSet(_1e5,1);},_setInfResource:function(item,res,type){var inf=this._getInf(item);if(inf){inf[type]=res;}},_getInfResource:function(item,type){var inf=this._getInf(item);return inf?inf[type]:null;},_getInfSet:function(_1e6,type){var set=[],_1e7=(type==1?"getError":"getData");if(_1e6){dojo.forEach(_1e6,function(item){var res=this[_1e7](item);if(res){set.push(err);}},this);}else{dojo.forEach(this.list,function(inf){if(inf[type]){set.push(inf[type]);}},this);}return set;},destroy:function(){delete this.list;delete this.store;}});}if(!dojo._hasResource["com.ibm.query.TypeHandler"]){dojo._hasResource["com.ibm.query.TypeHandler"]=true;dojo.provide("com.ibm.query.TypeHandler");dojo.require("dojo.date.stamp");(function(){var th=com.ibm.query.TypeHandler;var dst=dojo.date.stamp;th.types={"Number":{to:function(_1e8){return _1e8-0;},from:function(_1e9){return _1e9.toString();}},"Date":{to:function(_1ea){return dst.fromISOString(_1ea);},from:function(_1eb){return dst.toISOString(_1eb);}}};th.toType=function(_1ec,type){if(th.types[type]&&dojo.isFunction(th.types[type].to)){return th.types[type].to(_1ec);}else{return _1ec;}};th.fromType=function(_1ed,type){if(th.types[type]&&dojo.isFunction(th.types[type].from)){return th.types[type].from(_1ed);}else{return _1ed;}};})();}if(!dojo._hasResource["com.ibm.query.QueryRuleEngine"]){dojo._hasResource["com.ibm.query.QueryRuleEngine"]=true;dojo.provide("com.ibm.query.QueryRuleEngine");dojo.require("dojo.string");dojo.declare("com.ibm.query.QueryRuleEngine",null,{queryRules:{},context:null,types:{},constructor:function(args){this.context=this;dojo.mixin(this,args);},isReadOnly:function(rule){return rule.readOnly;},toType:function(_1ee,type){if(type){var _1ef=this.extractKeyParts(type),_1f0=_1ef.parameters;type=_1ef.key;if(this.types[type]){return this.types[type].to.call(this.context,_1ee,_1f0);}else{return com.ibm.query.TypeHandler.toType(_1ee,type);}}else{return _1ee;}},fromType:function(_1f1,type){if(type){var _1f2=this.extractKeyParts(type),_1f3=_1f2.parameters;type=_1f2.key;if(this.types[type]){return this.types[type].from.call(this.context,_1f1,_1f3);}else{return com.ibm.query.TypeHandler.fromType(_1f1,type);}}else{return _1f1;}},isParameterizable:function(key){return key.charAt(key.length-1)=="$";},getRulesWithParams:function(map){var _1f4={};if(!map){map=this.queryRules;}for(var key in map){if(this.isParameterizable(key)){_1f4[key]=map[key];}}return _1f4;},getQuery:function(_1f5,map,_1f6){var obj=this.extractKeyParts(_1f5);if(!map){map=this.queryRules;}var rule=map[obj.key];if(!rule){return rule;}if(!obj.parameters){rule.parameters=null;rule.ruleKey=obj.key;rule.multiValued=!!_1f6;return rule;}var _1f7={};for(var prop in rule){if(dojo.isString(rule[prop])){_1f7[prop]=dojo.string.substitute(rule[prop],obj.parameters,function(part){return dojo.string.trim(part);});}else{_1f7[prop]=rule[prop];}}_1f7.parameters=obj.parameters;_1f7.ruleKey=obj.key;_1f7.multiValued=!!_1f6;return _1f7;},extractKeyParts:function(_1f8){if(this.isParameterizable(_1f8)){var _1f9=_1f8.indexOf("[");var end=_1f8.lastIndexOf("]");if(_1f9>-1&&end>_1f9){var _1fa=_1f8.substring(0,_1f9)+"$";var _1fb=_1f8.substring(_1f9+1,end).split(",");return {key:_1fa,parameters:_1fb};}}return {key:_1f8,parameters:null};},getByRule:function(data,rule,_1fc){return data;},setByRule:function(data,rule,_1fd,_1fe){if(this.isReadOnly(rule)){return false;}return true;},unsetByRule:function(data,rule,_1ff){if(this.isReadOnly(rule)){return false;}return true;}});}if(!dojo._hasResource["com.ibm.data.resolver.QueryRulePocHandler"]){dojo._hasResource["com.ibm.data.resolver.QueryRulePocHandler"]=true;dojo.provide("com.ibm.data.resolver.QueryRulePocHandler");dojo.declare("com.ibm.data.resolver.QueryRulePocHandler",null,{definition:{scheme:"",handleAs:"text",features:{}},queryRules:{},bodyQueryRules:{},customAttributes:{},queryEngineClass:"com.ibm.query.QueryRuleEngine",types:{"Item":{to:function(_200){if(_200){return this.resolver.byId(_200);}return null;},from:function(_201){if(this.resolver.isItem(_201)){return this.resolver.getIdentity(_201);}else{return _201;}}},"decodedURI":{to:function(_202){return decodeURI(_202);},from:function(_203){return encodeURI(_203);}},"QueryURL$":{to:function(_204,_205){return new com.ibm.data.resolver.Query({url:_204,scheme:_205[0]});},from:function(_206,_207){return _206?_206.url:"";}},"QueryURL":{to:function(_208){return this.types["QueryURL$"].to(_208,[this.handler.definition.scheme]);},from:function(_209){return this.types["QueryURL$"].from(_209,[this.handler.definition.scheme]);}}},constructor:function(_20a,_20b){this.resolver=_20a;this.depMgr=_20b;this.engine=this.buildEngine();},buildEngine:function(){var cls=dojo.getObject(this.queryEngineClass);return new cls({queryRules:this.queryRules,types:this.types,resolver:this.resolver,handler:this});},_getValue:function(item,_20c,_20d,_20e){if(item._unsetAttrs[_20c]){return _20d;}var rule=this.engine.getQuery(_20c,this.customAttributes,_20e);if(rule){return this.customAttributes[_20c].get.call(this,item,_20e,rule.parameters);}else{if(item.data){rule=this.engine.getQuery(_20c,this.queryRules,_20e);if(!rule){return _20d;}var res=this.engine.getByRule(item.data,rule,_20e);if(!res.found){if(item._backupData){res=this.engine.getByRule(item._backupData,rule,_20e);if(res.found){return res.value;}}return _20d;}return res.value;}}return _20d;},getValue:function(item,_20f,_210){return this._getValue(item,_20f,_210,false);},getValues:function(item,_211){return this._getValue(item,_211,[],true);},getAttributes:function(item){var _212=[];for(var x in this.queryRules){_212.push(x);}for(var y in this.customAttributes){_212.push(y);}return _212;},hasAttribute:function(item,_213){if(item._unsetAttrs[_213]){return false;}var rule=this.engine.getQuery(_213,this.queryRules);if(!rule){rule=this.engine.getQuery(_213,this.customAttributes);if(rule){return this.customAttributes[_213].get.call(this,item,false,rule.parameters)!==undefined;}return false;}var res=this.engine.getByRule(item.data,rule);if(!res.found){return false;}return true;},containsValue:function(item,_214,_215){return dojo.some(this.getValues(item,_214),function(val){if(val==_215){return true;}return false;},this);},getLabel:function(item){var arr=this.getLabelAttributes(item);var str="";for(var i=0;i<arr.length;i++){str+=this.getValue(item,arr[i]);}return str;},getLabelAttributes:function(item){},getIdentity:function(item){var arr=this.getIdentityAttributes(item);var str="";for(var i=0;i<arr.length;i++){str+=this.getValue(item,arr[i]);}return str;},getIdentityAttributes:function(item){},newItem:function(_216,_217){},deleteItem:function(item){},_setValue:function(item,_218,_219,_21a){var res=false,rule=this.engine.getQuery(_218,this.customAttributes,_21a);if(rule){res=this.customAttributes[_218].set.call(this,item,_219,_21a,rule.parameters);}else{if(item.data){rule=this.engine.getQuery(_218,this.queryRules,_21a);if(!rule){return false;}res=this.engine.setByRule(item.data,rule,_219,_21a);}}if(res){delete item._unsetAttrs[_218];}return res;},setValue:function(item,_21b,_21c){return this._setValue(item,_21b,_21c,false);},setValues:function(item,_21d,_21e){return this._setValue(item,_21d,_21e,true);},unsetAttribute:function(item,_21f){var rule=this.engine.getQuery(_21f,this.queryRules);if(!rule){rule=this.engine.getQuery(_21f,this.customAttributes);return false;}var res=this.engine.unsetByRule(item.data,rule);if(res){item._unsetAttrs[_21f]=true;}return res;},backup:function(item){if(!item._backupData){}return false;},restore:function(item){if(item._backupData){}return false;},persist:function(item){delete item._backupData;},modifyFetchQuery:function(_220){return _220;},dataToItem:function(data){var item=this.createStub({});item.data=data;return item;},processFetch:function(data,_221){},processSave:function(item){this.updateReferences(item);},updateReferences:function(item){},createStub:function(_222){var stub={toString:function(){return this.id;},data:_222.data,id:_222.id,_unsetAttrs:{},_writeLog:[],_cachedMeta:{}};this.resolver._toCache(stub.id,stub);return stub;},uninitialize:function(item){delete item.id;delete item._unsetAttrs;delete item._cachedMeta;delete item._backupData;delete item._writeLog;delete item.data;},destroy:function(){delete this.resolver;delete this.depMgr;delete this.engine;},_makeModifiable:function(item){},toString:function(){return "["+this.declaredClass+" - "+this.definition.scheme+"]";}});}if(!dojo._hasResource["com.ibm.query.XmlQueryRuleEngine"]){dojo._hasResource["com.ibm.query.XmlQueryRuleEngine"]=true;dojo.provide("com.ibm.query.XmlQueryRuleEngine");dojo.require("dojox.data.dom");dojo.declare("com.ibm.query.XmlQueryRuleEngine",[com.ibm.query.QueryRuleEngine,com.ibm.xml.SimpleXmlAccessor],{queryRules:{},getField:function(_223,_224,_225){var _226=this._mapField(_224),_227=_224?_224.substr(1):null,_228=_223;if(_226){_228=dojo.map(_225?_223:_223.slice(0,1),function(data){return this[_226](data,_227);},this);}if(!_225){_228=_228[0];}return _228;},setField:function(_229,_22a,_22b,_22c){var _22d=this._mapField(_22a),_22e=_22a?_22a.substr(1):null;if(!_22d){dojo.map(_229,function(data){this.replace(data,_22b);},this);}else{dojo.map(_229,function(data){this[_22d](data,_22e,_22b);},this);}return true;},unsetField:function(_22f,_230,_231){var _232=null,_233=_230.substr(1);switch(_231.charAt(0)){case "!":_232="remove";break;default:switch(_233.charAt(0)){case "$":_232="removeProp";break;case "@":_232="removeAttr";break;default:_232="remove";break;}}_22f[_232](_233);return true;},getByRule:function(data,rule,_234){var ret={found:false};var _235=this.evaluate(rule.selector,data,!_234);if(_235.length==0){return ret;}ret.found=true;var _236=this.getField(_235,rule.field,_234);if(_234){ret.value=dojo.map(_236,function(fRes){return this.toType(fRes,rule.type);},this);}else{ret.value=this.toType(_236,rule.type);}if(ret.value===undefined){ret.found=false;}return ret;},setByRule:function(data,rule,_237,_238){if(this.isReadOnly(rule)){return false;}if(_238){_237=dojo.map(_237,function(val){return this.fromType(val,rule.type);},this);}else{_237=this.fromType(_237,rule.type);}if((rule.deferSet||(_238&&rule.deferMultiValued))&&rule.setter){return rule.setter.call(this.context,data,rule,_237,_238);}var _239=this.evaluate(rule.selector,data,!_238);if(_239.length==0){if(rule.setter){return rule.setter.call(this.context,data,rule,_237,_238);}return false;}return this.setField(_239,rule.field,_237,_238);},unsetByRule:function(data,rule){if(this.isReadOnly(rule)){return false;}var _23a=this.select(rule.selector,data,true);if(_23a.length==0){return true;}return this.unsetField(_23a,rule.field,rule.unset);},_mapField:function(_23b){if(_23b){switch(_23b.charAt(0)){case "$":return "prop";case "@":return "attr";default:return null;}}else{return null;}}});}if(!dojo._hasResource["com.ibm.data.resolver.XmlPocHandler"]){dojo._hasResource["com.ibm.data.resolver.XmlPocHandler"]=true;dojo.provide("com.ibm.data.resolver.XmlPocHandler");dojo.declare("com.ibm.data.resolver.XmlPocHandler",[com.ibm.data.resolver.QueryRulePocHandler,com.ibm.data.TemplateInstantiator],{definition:{scheme:"",handleAs:"xml",features:{}},namespaces:{},queryEngineClass:"com.ibm.query.XmlQueryRuleEngine",constructor:function(){this.namespaces=dojo.mixin({},this.namespaces,this.resolver.getNamespaces());this.engine.namespaces=this.namespaces;this._createTemplates();},_createTemplates:function(){},syncNamespaces:function(node){var myNs=this.namespaces;dojo.forEach(node.ownerDocument.documentElement.attributes,function(_23c){var idx=_23c.nodeName.indexOf("xmlns:");if(idx==0){var _23d=_23c.nodeName.substr(6);if(myNs[_23d]!=_23c.nodeValue){myNs[_23d]=_23c.nodeValue;}}});},setValue:function(item,_23e,_23f){var res=this.inherited(arguments);if(res){this._logWrite(item,{attribute:_23e,value:_23f});}return res;},setValues:function(item,_240,_241){var res=this.inherited(arguments);if(res){this._logWrite(item,{attribute:_240,values:_241});}return res;},unsetAttribute:function(item,_242){var res=this.inherited(arguments);if(res){this._logWrite(item,{attribute:_242});}return res;},newItem:function(_243,_244){this.modifyNewItemArgs(_243,_244);return this.createItem(_243,_244);},createItem:function(_245,_246){var _247=_245._$seeded;delete _245._$seeded;var _248=null;if(_245.id){_248=this.resolver._fromCache(_245.id);if(_248&&_248.data){for(var p in _245){this[dojo.isArray(_245[p])?"setValues":"setValue"](_248,p,_245[p]);}return _248;}}var _249=this.getTemplate(_245,_246);_245=dojo.mixin({},_249.templateProps,_245);var _24a=this.instantiateTemplate(_249,_245,_246);var _24b=_248?_248:this.createStub(_245);_24b.data=_24a;_24b._logEnabled=!_247;return this.fillInProperties(_24b,_249,_245,_246);},fillInProperties:function(_24c,_24d,_24e,_24f){for(var p in _24e){if(!(p in _24d.templateProps)){this[dojo.isArray(_24e[p])?"setValues":"setValue"](_24c,p,_24e[p]);}}return _24c;},getTemplate:function(args,_250){return {templateString:"",templateProps:{}};},modifyNewItemArgs:function(args,_251){return args;},instantiateTemplate:function(_252,args,_253){return this.getTemplateInstance(_252.templateString,args);},backup:function(item){if(!item._backupData){item._backupData=item.data.cloneNode(true);this._makeModifiable(item);item._logEnabled=true;return true;}return false;},restore:function(item){if(item._backupData){delete item.data;item.data=item._backupData;delete item._backupData;item._writeLog.splice(0,item._writeLog.length);return true;}return false;},persist:function(item){this._writeLogToBackup(item);this.inherited(arguments);},processFetch:function(_254,_255){return this.inherited(arguments);},processSave:function(item){return this.inherited(arguments);},_logWrite:function(item,map){if(item._logEnabled){item._writeLog.push(map);}},_writeLogToBackup:function(item){if(item._backupData){item.data=item._backupData;item._logEnabled=false;for(var i=0;i<item._writeLog.length;i++){var op=item._writeLog[i];if(op.values){this.setValues(item,op.attribute,op.values);}else{if(op.value!==undefined){this.setValue(item,op.attribute,op.value);}else{this.unsetValue(item,op.attribute);}}}item._writeLog.splice(0,item._writeLog.length);}}});}if(!dojo._hasResource["com.ibm.query.rules.Atom"]){dojo._hasResource["com.ibm.query.rules.Atom"]=true;dojo.provide("com.ibm.query.rules.Atom");com.ibm.query.rules.Atom={namespaces:{"atom":"http://www.w3.org/2005/Atom","app":"http://www.w3.org/2007/app"},syndication:{mimeTypes:{atom:"application/atom+xml"},common:{title:{selector:"./atom:title",field:"$textContent",setter:function(data,rule,_256){this.createFromJson(data,{name:"atom:title",children:[_256]});return true;}},id:{selector:"./atom:id",field:"$textContent",setter:function(data,rule,_257){this.createFromJson(data,{name:"atom:id",children:[_257]});return true;}},updated:{selector:"./atom:updated",field:"$textContent",type:"Date"},category:{selector:"./atom:category",field:"@term"},categoryScheme:{selector:"./atom:category",field:"@scheme"},categoryLabel:{selector:"./atom:category",field:"@label"},contributer:{selector:"./atom:contributer",type:"Node"},author:{selector:"./atom:author",type:"Node"},summary:{selector:"./atom:summary",field:"$textContent",setter:function(data,rule,_258){this.createFromJson(data,{name:"atom:summary",children:[_258]});return true;}},source:{selector:"./atom:source",type:"Node",setter:function(data,rule,_259){data.appendChild(_259);return true;}},rights:{selector:"./atom:rights",field:"$textContent",setter:function(data,rule,_25a){this.createFromJson(data,{name:"atom:rights",children:[_25a]});return true;}},selfLink:{selector:"./atom:link[@rel='self']",field:"@href",setter:function(data,rule,_25b){this.createFromJson(data,{name:"atom:link",attributes:{"rel":"self","href":_25b}});return true;}},link:{selector:"./atom:link[@href]",field:"@href",setter:function(data,rule,_25c){this.createFromJson(data,{name:"atom:link",attributes:{"href":_25c}});return true;}},content:{selector:"./atom:content",type:"Node",setter:function(data,rule,_25d){data.appendChild(_25d);return true;}}},entry:{subtitle:{selector:"./atom:subtitle",field:"$textContent",setter:function(data,rule,_25e){this.createFromJson(data,{name:"atom:subtitle",children:[_25e]});return true;}},generator:{selector:"./atom:generator",field:"$textContent",setter:function(data,rule,_25f){this.createFromJson(data,{name:"atom:generator",children:[_25f]});return true;}},icon:{selector:"./atom:icon",field:"$textContent",setter:function(data,rule,_260){this.createFromJson(data,{name:"atom:icon",children:[_260]});return true;}},logo:{selector:"./atom:logo",field:"$textContent",setter:function(data,rule,_261){this.createFromJson(data,{name:"atom:logo",children:[_261]});return true;}}}},publishing:{mimeTypes:{service:"application/atomsvc+xml",contentTypeReg:"application/atomcat+xml"},serviceDoc:{workspace:{selector:"./app:workspace",type:"Node"},workspaceTitle:{selector:"./app:workspace/atom:title",field:"$textContent"}},categoriesDoc:{category:{selector:"./app:categories/atom:category",type:"Node"},categoryTerm:{selector:"./app:categories/atom:category",field:"@term"},categoryScheme:{selector:"../app:categories",field:"@scheme"},categoriesScheme:{selector:"./app:categories",field:"@scheme"},categoriesFixed:{selector:"./app:categories",field:"@fixed"},categoriesLink:{selector:"./app:categories",field:"@href"}},member:{selector:"./app:collection/app:member",type:"Node"}}};(function(){var _262=com.ibm.query.rules.Atom.syndication.common;var _263=function(_264,data,rule,_265,_266){var _267={name:"atom:category",attributes:{}};var _268=this.select(_267.name,data,_266);if(_266){var i=0;for(;i<_268.length&&i<_265.length;i++){this.attr(_268[i],_264,_265[i]);}if(i<_265.length){for(;i<_265.length;i++){_267.attributes[_264]=_265[i];this.createFromJson(data,_267);}}}else{if(_268.length>0){this.attr(_268[0],_264,_265);}else{_267.attributes[_264]=_265;this.createFromJson(data,_267);}}return true;};_262.category.setter=dojo.partial(_263,"term");_262.categoryScheme.setter=dojo.partial(_263,"scheme");_262.categoryLabel.setter=dojo.partial(_263,"label");})();if(!dojo.isIE){com.ibm.query.rules.Atom.namespaces["xml"]="http://www.w3.org/XML/1998/namespace";}}if(!dojo._hasResource["com.ibm.data.resolver.AtomPocHandler"]){dojo._hasResource["com.ibm.data.resolver.AtomPocHandler"]=true;dojo.provide("com.ibm.data.resolver.AtomPocHandler");dojo.declare("com.ibm.data.resolver.AtomPocHandler",com.ibm.data.resolver.XmlPocHandler,{queryRules:dojo.mixin({},com.ibm.query.rules.Atom.syndication.common,com.ibm.query.rules.Atom.syndication.entry),bodyQueryRules:dojo.mixin({},com.ibm.query.rules.Atom.syndication.common),namespaces:{"atom":"http://www.w3.org/2005/Atom"},mergeItems:function(_269,_26a){if(this.resolver.isDirty(_26a)){_26a._backupData=_269.data;}else{_26a.data=_269.data;}return _26a;},processEntryData:function(_26b){var _26c=this.dataToItem(_26b);var _26d=this.getIdentity(_26c);var _26e=this.resolver._fromCache(_26d);if(_26e){_26c=this.mergeItems(_26c,_26e);}return _26c;},parseFeed:function(_26f,_270){var _271=[],root=null,_272=this.engine.evaluate("/atom:feed",_270,true);if(_272.length==0){_272=this.engine.evaluate("/atom:entry",_270);if(_272.length==0){throw new Error(this.resolver.fmt("errorDataFormat"));}else{root=_272[0];_271.push(this.processEntryData(root));}}else{root=_272[0];_272=this.engine.evaluate("./atom:entry",root);dojo.forEach(_272,function(_273){_271.push(this.processEntryData(_273));},this);}return {items:_271,root:root};},processFetch:function(_274,_275){var _276=this.parseFeed(_275,_274),meta={root:_276.root,resultSize:_276.items.length};if(!this._nsSynced){this.syncNamespaces(_276.root);this._nsSynced=true;}dojo.forEach(_276.items,function(item){item._cachedMeta.requestMeta=meta;},this);return {items:_276.items,meta:meta};},processSave:function(item){this.inherited(arguments);var args={data:this._serializeSaveData(item),headers:{},handleAs:this.definition.handleAs};args.headers[this.resolver.headers.CONTENT_TYPE]="application/atom+xml";if(!this.resolver.isCreated(item)){args.load=dojo.hitch(this,function(_277,_278){var _279=this.engine.evaluate("//atom:entry",_277);var cid=this.getIdentity(item);if(_279&&_279.length>0){item.data=_279[0];item.cid=item.id;delete item.id;var _27a=this.getIdentity(item);}return _277;});}args.query=this.getSaveQuery(item);return args;},_serializeSaveData:function(item){return com.ibm.domUtilities.stringFromDoc(item.data);},getSaveQuery:function(item){var q={uri:this.getIdentity(item)};if(this.resolver.isCreated(item)){q.mode="merge";}return q;},getLabel:function(item){return this.getValue(item,"title");},getLabelAttributes:function(item){return ["title"];},getIdentity:function(item){if(!item.id){item.id=this.getValue(item,"id");}return item.id;},getIdentityAttributes:function(item){return ["id"];},instantiateTemplate:function(_27b,args,_27c){var _27d=this.inherited(arguments);var _27e=this.engine.evaluate("//atom:entry",_27d);if(_27e&&_27e.length>0){_27d=_27e[0];}return _27d;}});(function(){var prot=com.ibm.data.resolver.AtomPocHandler.prototype;prot.queryRules.selfLink=dojo.mixin({},prot.queryRules.selfLink,{type:"QueryURL"});})();}if(!dojo._hasResource["com.ibm.query.rules.OpenSearch"]){dojo._hasResource["com.ibm.query.rules.OpenSearch"]=true;dojo.provide("com.ibm.query.rules.OpenSearch");com.ibm.query.rules.OpenSearch={namespaces:dojo.mixin({},com.ibm.query.rules.Atom.namespaces,{"os":"http://a9.com/-/spec/opensearch/1.1/"}),common:{nextLink:{selector:"./atom:link[@rel='next']",field:"@href"},startIndex:{selector:"./os:startIndex",field:"$textContent",type:"Number"},itemsPerPage:{selector:"./os:itemsPerPage",field:"$textContent",type:"Number"},totalResults:{selector:"./os:totalResults",field:"$textContent",type:"Number"},query:{selector:"./os:Query",type:"Node"}}};}if(!dojo._hasResource["com.ibm.data.resolver.OpenSearchPocHandler"]){dojo._hasResource["com.ibm.data.resolver.OpenSearchPocHandler"]=true;dojo.provide("com.ibm.data.resolver.OpenSearchPocHandler");dojo.declare("com.ibm.data.resolver.OpenSearchPocHandler",com.ibm.data.resolver.AtomPocHandler,{bodyQueryRules:dojo.mixin({},com.ibm.data.resolver.AtomPocHandler.prototype.bodyQueryRules,com.ibm.query.rules.OpenSearch.common),namespaces:dojo.mixin({},com.ibm.data.resolver.AtomPocHandler.prototype.namespaces,com.ibm.query.rules.OpenSearch.namespaces),processFetch:function(_27f,_280){var _281=this.inherited(arguments);_281.meta.resultSize=this.engine.getByRule(_281.meta.root,this.bodyQueryRules["totalResults"]).value;_280.nextQuery=_281.meta.nextURL=this.engine.getByRule(_281.meta.root,this.bodyQueryRules["nextLink"]).value;_280.startIndex=_281.meta.startIndex=this.engine.getByRule(_281.meta.root,this.bodyQueryRules["startIndex"]).value;_280.itemsPerPage=_281.meta.itemsPerPage=this.engine.getByRule(_281.meta.root,this.bodyQueryRules["itemsPerPage"]).value;return _281;}});(function(){var prot=com.ibm.data.resolver.OpenSearchPocHandler.prototype;prot.bodyQueryRules.nextLink=dojo.mixin({},prot.bodyQueryRules.nextLink,{type:"QueryURL"});})();}if(!dojo._hasResource["com.ibm.data.resolver.ResolverQueryRules"]){dojo._hasResource["com.ibm.data.resolver.ResolverQueryRules"]=true;dojo.provide("com.ibm.data.resolver.ResolverQueryRules");com.ibm.data.resolver.ResolverQueryRules={namespaces:dojo.mixin({},com.ibm.query.rules.OpenSearch.namespaces,{"xsl":"http://www.w3.org/1999/XSL/Transform","thr":"http://purl.org/syndication/thread/1.0","xhtml":"http://www.w3.org/1999/xhtml","service":"http://www.ibm.com/xmlns/prod/sw/model/service/1.0","ac":"http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0","trc":"http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-tag-rate-comment","cp":"http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal","um":"http://www.ibm.com/xmlns/prod/websphere/um.xsd","xs":"http://www.w3.org/2001/XMLSchema-datatypes","stats":"http://www.ibm.com/xmlns/prod/websphere/portal/v7.0.5/statistics","asa":"http://www.ibm.com/xmlns/prod/websphere/portal/v8.0/site-analytics","cm":"http://coremetrics.com/dataapi","portal":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","xsi":"http://www.w3.org/2001/XMLSchema-instance"}),atom:{modelExt:{modelNodeType:{selector:"./atom:content/*",field:"$localName",readOnly:true}},uniqueNameExt:{uniqueName:{selector:"./atom:id",field:"@ext:uniquename",setter:function(data,rule,_282){this.createFromJson(data,{name:"atom:id",attributes:{"ext:uniquename":_282}});return true;}}},threadExt:{parent:{selector:"./thr:in-reply-to",field:"@ref",type:"Item"},parentId:{selector:"./thr:in-reply-to",field:"@ref"},parentURI:{selector:"./thr:in-reply-to",field:"@href",type:"QueryURL"}},treeExt:{childrenURI:{selector:"./atom:link[@rel='replies']",field:"@href",readOnly:true,type:"QueryURL"},next:{selector:"./atom:link[@rel='next']",field:"@ext:uri",type:"Item",unset:"!"},nextId:{selector:"./atom:link[@rel='next']",field:"@ext:uri",unset:"!"},nextURI:{selector:"./atom:link[@rel='next']",field:"@href",unset:"!",type:"QueryURL"}},L10nExt:{localizedTitle$:{selector:"./atom:content/*[model:title]/model:title/base:nls-string["+(dojo.isIE?"@xml:lang = '${0}'":"lang('${0}')")+"]",field:"$textContent",locale:"${0}"},localizedDescription$:{selector:"./atom:content/*[model:description]/model:description/base:nls-string["+(dojo.isIE?"@xml:lang = '${0}'":"lang('${0}')")+"]",field:"$textContent",locale:"${0}"}},acExt:{userOwned:{selector:"./atom:content/*/ac:allowed-access",field:"@ac:user-owned",readOnly:true},isPrivate:{selector:"./atom:content/*/ac:allowed-access",field:"@ac:private",readOnly:true},accessLevel:{selector:"./atom:content/*/ac:allowed-access/ac:access-level",field:"@ac:type"},accessLevel$:{selector:"./atom:content/*/ac:allowed-access/ac:access-level[@ac:type='${0}']",field:"@ac:type",acType:"${0}"}},operationsExt:{contextMenu:{selector:"./atom:link[@ext:rel='contextMenu']",field:"@ext:uri",readOnly:true},contextMenuURI:{selector:"./atom:link[@ext:rel='contextMenu']",field:"@href",readOnly:true}},contentExt:{layoutURI:{selector:"./atom:link[@ext:rel='layout']",field:"@href",type:"QueryURL[lm]$",readOnly:true},theme:{selector:"./atom:link[@ext:rel='theme']",field:"@ext:uri",setter:function(data,rule,_283){this.createFromJson(data,{name:"atom:link",attributes:{"ext:rel":"theme","ext:uri":_283,"href":_283}});return true;}}},cpExt:{cpScope:{selector:"./atom:id",field:"@cp:scope"},preferredLocale:{selector:"./atom:content/cp:tagspace/cp:preferredLocale",field:"$textContent"},preferredLocaleDir:{selector:"./atom:content/cp:tagspace/cp:preferredLocaleDir",field:"$textContent"},resource:{selector:"./atom:link[@portal:rel]",field:"@href",setter:null},uri:{selector:"./atom:link",field:"@portal:uri"},count:{selector:"./atom:link",field:"@thr:count"},isMine:{selector:"./atom:link",field:"@thr:isMine"},deleteLink:{selector:"./atom:link[@ext:rel='tagfeed']",field:"@href"},deleteAllLink:{selector:"./atom:link[@portal:rel='managerDelete']",field:"@href"}},metaExt:{metadata$:{selector:"./atom:content/*/model:metadata[@name='${0}']/base:value",field:"@value",mdname:"${0}",deferSet:true,setter:function(data,rule,_284,_285){var _286={name:"base:value",attributes:{"xsi:type":"base:String"}};var _287=this.select("./atom:content/*",data,true);var _288=_287.select("model:metadata[@name='"+rule.mdname+"']",true);if(_288.length==0){_287.createFromJson({name:"model:metadata",attributes:{"name":rule.mdname}});}_288=_287.select("model:metadata[@name='"+rule.mdname+"']",true);_288.select("*").destroy();if(_285){dojo.forEach(_284,function(val){_286.attributes.value=val;_288.createFromJson(_286);},this);}else{_286.attributes.value=_284;_288.createFromJson(_286);}return true;}}},arExt:{subTitle:{selector:"./atom:content/office:document-content/office:body/*/chart:chart/chart:subtitle",field:"$textContent",readOnly:true},mainTitle:{selector:"./atom:content/office:document-content/office:body/*/chart:chart/chart:title",field:"$textContent",readOnly:true},published:{selector:"./atom:published",field:"$textContent",readOnly:true},backendLink:{selector:"./atom:link",field:"@href",readOnly:true},multipleDataItemKey:{selector:"./atom:content/office:document-content/office:body/*/chart:chart/table:table/table:table-header-rows/*/table:table-cell",field:"$textContent",readOnly:true},multipleDataItemValue:{selector:"./atom:content/office:document-content/office:body/*/chart:chart/table:table/table:table-rows/*/table:table-cell",field:"$textContent",readOnly:true},singleDataItemKey:{selector:"./atom:content/stats:dataItem",field:"@key",readOnly:true},singleDataItemValue:{selector:"./atom:content/stats:dataItem",field:"@value",readOnly:true},reportApplicability:{selector:"./atom:category",field:"@term",readOnly:true},reportApplicabilityType:{selector:"./atom:category",field:"@scheme",readOnly:true},errorMessage:{selector:"./atom:content/cm:Response/cm:message",field:"$textContent",readOnly:true},errorCode:{selector:"./atom:content/cm:Response/*/cm:errorCode",field:"@errorCode",readOnly:true}},atExt:{tagValue:{selector:"./atom:content/*/base:value",field:"@value",readOnly:true},resourceUriLinks:{selector:"./atom:link",type:"Node",deferMultiValued:true}}}};(function(){var _289=com.ibm.data.resolver.ResolverQueryRules.atom;var _28a=function(data,rule,_28b,_28c){var _28d=this.select(rule.selector,data,false);if(_28d.length==0){this.createFromJson(data,{name:"thr:in-reply-to",attributes:{"ext:uri":_28b,"type":"application/atom+xml","ref":_28b,"href":_28b}});}else{_28d.attr("ext:uri",_28b).attr("ref",_28b).attr("href",_28b);}return true;};_289.threadExt.parent.setter=_28a;_289.threadExt.parentId.setter=_28a;_289.threadExt.parentURI.setter=_28a;_289.threadExt.parent.deferSet=true;_289.threadExt.parentId.deferSet=true;_289.threadExt.parentURI.deferSet=true;var _28e=function(data,rule,_28f){var _290={"ext:uri":_28f,"rel":"next","type":"application/atom+xml"};_290[rule.field.substr(1)]=_28f;this.createFromJson(data,{name:"atom:link",attributes:_290});return true;};_289.treeExt.next.setter=_28e;_289.treeExt.nextId.setter=_28e;_289.treeExt.nextURI.setter=_28e;var _291=function(_292,data,rule,_293){var _294=this.select("./atom:content/*",data,true);var _295=_294.select("model:title",true);var _296={name:"base:nls-string",attributes:{"xml:lang":rule.locale},children:[_293]};if(_295.length==0){_294.createFromJson({name:_292,children:[_296]});}else{_295.createFromJson(_296);}return true;};_289.L10nExt.localizedTitle$.setter=dojo.partial(_291,"model:title");_289.L10nExt.localizedDescription$.setter=dojo.partial(_291,"model:description");var _297=function(_298,data,rule,_299,_29a){var _29b={};_29b[rule.field.substr(1)]=_299;this.createFromJson(item.data,{name:_298,attributes:_29b});return true;};_289.cpExt.cpScope.setter=dojo.partial(_297,"atom:id");_289.cpExt.uri.setter=dojo.partial(_297,"atom:link");_289.cpExt.count.setter=dojo.partial(_297,"atom:link");_289.cpExt.isMine.setter=dojo.partial(_297,"atom:link");var _29c=function(_29d,data,rule,_29e,_29f){this.select(rule.selector,data,false).remove();var _2a0={"rel":"related","type":"application/atom+xml"};if(!_29f){_29e=[_29e];}dojo.forEach(_29e,function(val){_2a0["portal:uri"]=val;this.createFromJson(data,{name:_29d,attributes:_2a0});},this);return true;};_289.atExt.resourceUriLinks.setter=dojo.partial(_29c,"atom:link");}());}if(!dojo._hasResource["com.ibm.data.resolver.UMPocHandler"]){dojo._hasResource["com.ibm.data.resolver.UMPocHandler"]=true;dojo.provide("com.ibm.data.resolver.UMPocHandler");dojo.declare("com.ibm.data.resolver.UMPocHandler",[com.ibm.data.resolver.OpenSearchPocHandler],{namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),_secureRegx:null,constructor:function(){this._secureRegx=new RegExp(this.definition.scheme+":secure/");},_createTemplates:function(){var _2a1=[];for(var _2a2 in this.namespaces){_2a1.push("xmlns:",_2a2,"=\"",this.namespaces[_2a2],"\" ");}dojo.mixin(this,{userTemplate:{templateString:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+_2a1.join("")+">"+"<atom:author>"+"<atom:name>IBM WebSphere Portal/6.1</atom:name>"+"</atom:author>"+"<atom:title>IBM WebSphere Portal Model Feed</atom:title>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+"<atom:entry creation-context:private=\"${isPrivate}\">"+"<atom:title>${tagname}</atom:title>"+"<atom:id>${id}</atom:id>"+"<atom:link portal:uri=\"${resourceURI}\" rel=\"replies\" href=\"example.org\" />"+"</atom:entry>"+"</atom:feed>",templateProps:{id:"",tagname:"",title:"",resourceURI:""}},groupTemplate:{templateString:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+_2a1.join("")+">"+"<atom:author>"+"<atom:name>IBM WebSphere Portal/6.1</atom:name>"+"</atom:author>"+"<atom:title>IBM WebSphere Portal Model Feed</atom:title>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+"<atom:entry creation-context:private=\"${isPrivate}\">"+"<atom:title>${tagname}</atom:title>"+"<atom:id>${id}</atom:id>"+"<atom:link portal:uri=\"${resourceURI}\" rel=\"replies\" href=\"example.org\" />"+"</atom:entry>"+"</atom:feed>",templateProps:{id:"",tagname:"",title:"",resourceURI:""}}});},getTemplate:function(args,_2a3){return this.tagTemplate;},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.rep="empty";}else{q.uri=this._newTagURI;}return q;},modifyFetchQuery:function(_2a4,_2a5){var uri=_2a4.uri,_2a6=uri.match(this._secureRegx),sch=this.definition.scheme;if(_2a6!=null&&!this.resolver.isAuthenticated){_2a4.uri=sch+":"+uri.substr(_2a6[0].length);}else{if(_2a6==null&&this.resolver.isAuthenticated){_2a4.uri=sch+":secure/"+uri.substr(sch.length+1);}}return _2a4;}});(function(){var r=com.ibm.data.resolver;var _2a7=r.ResolverQueryRules.atom;var r=com.ibm.data.resolver,_2a8=r.UMPocHandler,prot=_2a8.prototype,def=prot.definition,_2a7=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"um"});prot.definition=def;var _2a9=function(data,name,type){var _2aa=this.engine.select("./atom:content/um:profile/um:attribute[@name='"+name+"']",data,true);if(_2aa.length>0){return _2aa;}else{var _2ab=this.engine.select("./atom:content/um:profile",data,true);if(_2ab.length>0){return _2ab.createFromJson({name:"um:attribute",attributes:{"name":name,"type":type?type:"xs:string","multivalued":"false"}}).select("./um:attribute[@name='"+name+"']",true);}else{return null;}}},_2ac=function(_2ad,_2ae){_2ad.createFromJson({name:"um:attributeValue",children:[_2ae]});};dojo.extend(_2a8,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,{umType:{selector:"./atom:content/um:profile",field:"@type",readOnly:true},umIdentifier:{selector:"./atom:content/um:profile",field:"@identifier",readOnly:true},groupMembershipURL:{selector:"./atom:link[@rel='related']",field:"@href",readOnly:true},umAttrIsMultivalued$:{selector:"./atom:content/um:profile/um:attribute[@name='${0}']",field:"@multiValued"},umAttrType$:{selector:"./atom:content/um:profile/um:attribute[@name='${0}']",field:"@type",attrName:"${0}",deferSet:true,setter:function(data,rule,_2af,_2b0){var _2b1=_2a9.call(this,data,rule.attrName,_2af);if(_2b1.length>0){_2b1.attr("type",_2af);return true;}else{return false;}}},umAttrValue$:{selector:"./atom:content/um:profile/um:attribute[@name='${0}']/um:attributeValue",field:"$textContent",attrName:"${0}",deferSet:true,setter:function(data,rule,_2b2,_2b3){var _2b4=_2a9.call(this,data,rule.attrName,_2b2);if(_2b4.length>0){_2b4.select("um:attributeValue").destroy();if(_2b3){dojo.forEach(_2b2,dojo.hitch(this,_2ac,_2b4));}else{_2ac.call(this,_2b4,_2b2);}return true;}else{return false;}}},umAttributes:{selector:"./atom:content/um:profile/um:attribute",field:"@name",readOnly:true}})});com.ibm.data.Resolver.register(def.scheme,_2a8);})();}if(!dojo._hasResource["com.ibm.data.resolver.PrivateAtomModelExt"]){dojo._hasResource["com.ibm.data.resolver.PrivateAtomModelExt"]=true;dojo.provide("com.ibm.data.resolver.PrivateAtomModelExt");dojo.declare("com.ibm.data.resolver.PrivateAtomModelExt",null,{_privacyNodeSelector:"./atom:content/*",modifyNewItemArgs:function(args,_2b5){this.inherited("modifyNewItemArgs",arguments);if(args.isPrivate!=null){if(dojo.isString(args.isPrivate)){args.isPrivate=args.isPrivate.toLowerCase();switch(args.isPrivate){case "true":case "yes":args.isPrivate="true";break;default:args.isPrivate="false";}}else{if(args.isPrivate==true){args.isPrivate="true";}else{args.isPrivate="false";}}}return args;},fillInProperties:function(_2b6,_2b7,_2b8,_2b9){this._initItemPrivacy(_2b6,_2b8);return this.inherited("fillInProperties",arguments);},_initItemPrivacy:function(item,_2ba){if(_2ba.isPrivate!=null){this.engine.select(this._privacyNodeSelector,item.data,true).attr("creationcontext:private",_2ba.isPrivate);}delete _2ba.isPrivate;}});}if(!dojo._hasResource["com.ibm.data.resolver.TMPocHandler"]){dojo._hasResource["com.ibm.data.resolver.TMPocHandler"]=true;dojo.provide("com.ibm.data.resolver.TMPocHandler");dojo.declare("com.ibm.data.resolver.TMPocHandler",[com.ibm.data.resolver.OpenSearchPocHandler,com.ibm.data.resolver.PrivateAtomModelExt],{_newTagURI:"tm:all",_newIdPrefix:"tm:name:",_privacyNodeSelector:".",namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),_createTemplates:function(){var _2bb=[];for(var _2bc in this.namespaces){_2bb.push("xmlns:",_2bc,"=\"",this.namespaces[_2bc],"\" ");}this._nsDeclString=_2bb.join("");dojo.mixin(this,{tagTemplate:{templateString:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+this._nsDeclString+">"+"<atom:author>"+"<atom:name>IBM WebSphere Portal/7.0</atom:name>"+"</atom:author>"+"<atom:title>IBM WebSphere Portal Model Feed</atom:title>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+"<atom:entry>"+"<atom:title xml:lang=\"${locale}\">${title}</atom:title>"+"<atom:id>${id}</atom:id>"+"<atom:link ext:uri=\"${resourceURI}\" rel=\"replies\" href=\"example.org\" />"+"</atom:entry>"+"</atom:feed>",templateProps:{id:"",title:"",resourceURI:"",locale:dojo.locale.replace(/-/g,"_")}}});},_serializeSaveData:function(item){return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+this._nsDeclString+">"+"<atom:author>"+"<atom:name>IBM WebSphere Portal/7.0</atom:name>"+"</atom:author>"+"<atom:title>WebSphere Portal Server TagSpace Feed</atom:title>"+"<atom:id>tm:ts:empty</atom:id>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+com.ibm.domUtilities.stringFromDoc(item.data)+"</atom:feed>";},getTemplate:function(args,_2bd){return this.tagTemplate;},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.rep="empty";}else{q.uri=this._newTagURI;}return q;}});(function(){var r=com.ibm.data.resolver;var _2be=r.ResolverQueryRules.atom;var r=com.ibm.data.resolver,_2bf=r.TMPocHandler,prot=_2bf.prototype,def=prot.definition,_2be=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"tm"});prot.definition=def;dojo.extend(_2bf,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_2be.uniqueNameExt,_2be.L10nExt,_2be.modelExt,_2be.cpExt,{tagScope:_2be.cpExt.cpScope})});com.ibm.data.Resolver.register(def.scheme,_2bf);})();}if(!dojo._hasResource["com.ibm.data.resolver.RTMPocHandler"]){dojo._hasResource["com.ibm.data.resolver.RTMPocHandler"]=true;dojo.provide("com.ibm.data.resolver.RTMPocHandler");dojo.declare("com.ibm.data.resolver.RTMPocHandler",[com.ibm.data.resolver.OpenSearchPocHandler,com.ibm.data.resolver.PrivateAtomModelExt],{_newRatingURI:"rtm:all",_privacyNodeSelector:".",namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),_createTemplates:function(){var _2c0=[];for(var _2c1 in this.namespaces){_2c0.push("xmlns:",_2c1,"=\"",this.namespaces[_2c1],"\" ");}this._nsDeclString=_2c0.join("");dojo.mixin(this,{ratingTemplate:{templateString:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+this._nsDeclString+">"+"<atom:author>"+"<atom:name>IBM WebSphere Portal/7.0</atom:name>"+"</atom:author>"+"<atom:title>IBM WebSphere Portal Model Feed</atom:title>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+"<atom:entry>"+"<atom:title>${rating}</atom:title>"+"<atom:id>${id}</atom:id>"+"<atom:link ext:uri=\"${resourceURI}\" rel=\"replies\" href=\"example.org\" />"+"</atom:entry>"+"</atom:feed>",templateProps:{id:"",rating:"",title:"",resourceURI:"",isPrivate:""}}});},_serializeSaveData:function(item){return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+this._nsDeclString+">"+"<atom:author>"+"<atom:name>IBM WebSphere Portal/7.0</atom:name>"+"</atom:author>"+"<atom:title>WebSphere Portal Server RatingSpace Feed</atom:title>"+"<atom:id>rtm:rs:empty</atom:id>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+com.ibm.domUtilities.stringFromDoc(item.data)+"</atom:feed>";},getTemplate:function(args,_2c2){return this.ratingTemplate;},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.rep="empty";}else{q.uri=this._newRatingURI;}return q;}});(function(){var r=com.ibm.data.resolver;var _2c3=r.ResolverQueryRules.atom;var r=com.ibm.data.resolver,_2c4=r.RTMPocHandler,prot=_2c4.prototype,def=prot.definition,_2c3=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"rtm"});prot.definition=def;dojo.extend(_2c4,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_2c3.uniqueNameExt,_2c3.L10nExt,_2c3.modelExt,_2c3.cpExt,{ratingScope:_2c3.cpExt.cpScope})});com.ibm.data.Resolver.register(def.scheme,_2c4);})();}if(!dojo._hasResource["com.ibm.data.resolver.ARPocHandler"]){dojo._hasResource["com.ibm.data.resolver.ARPocHandler"]=true;dojo.provide("com.ibm.data.resolver.ARPocHandler");dojo.declare("com.ibm.data.resolver.ARPocHandler",[com.ibm.data.resolver.PrivateAtomModelExt,com.ibm.data.resolver.OpenSearchPocHandler],{namespaces:dojo.mixin({},com.ibm.data.resolver.ResolverQueryRules.namespaces)});(function(){var r=com.ibm.data.resolver,_2c5=r.ARPocHandler,prot=_2c5.prototype,def=prot.definition,_2c6=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"ar"});prot.definition=def;dojo.extend(_2c5,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_2c6.uniqueNameExt,_2c6.L10nExt,_2c6.modelExt,_2c6.arExt)});com.ibm.data.Resolver.register(def.scheme,_2c5);})();}if(!dojo._hasResource["com.ibm.data.resolver.ATPocHandler"]){dojo._hasResource["com.ibm.data.resolver.ATPocHandler"]=true;dojo.provide("com.ibm.data.resolver.ATPocHandler");dojo.declare("com.ibm.data.resolver.ATPocHandler",[com.ibm.data.resolver.PrivateAtomModelExt,com.ibm.data.resolver.OpenSearchPocHandler],{_newAnalyticsTagURI:"at:all",_newIdPrefix:"at:name:",_privacyNodeSelector:".",namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),_createTemplates:function(){var _2c7=[];for(var _2c8 in this.namespaces){_2c7.push("xmlns:",_2c8,"=\"",this.namespaces[_2c8],"\" ");}this._nsDeclString=_2c7.join("");dojo.mixin(this,{analyticsTagTemplate:{templateString:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+this._nsDeclString+">"+"<atom:title>IBM WebSphere Portal Model Feed</atom:title>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+"<atom:entry>"+"<atom:title>${name}</atom:title>"+"<atom:id>${id}</atom:id>"+"<atom:content type=\"application/xml\">"+"<asa:analytics-tag name=\"${name}\">"+"<base:value xsi:type=\"base:String\" value=\"${value}\" />"+"</asa:analytics-tag>"+"</atom:content>"+"<atom:link portal:uri=\"${resourceURI}\" rel=\"related\" type=\"application/atom+xml\" />"+"</atom:entry>"+"</atom:feed>",templateProps:{id:"",title:"",name:"",value:"",resourceURI:""}}});},_serializeSaveData:function(item){return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+this._nsDeclString+">"+"<atom:title>WebSphere Portal Server Analytics Tag Feed</atom:title>"+"<atom:id>at:all</atom:id>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+com.ibm.domUtilities.stringFromDoc(item.data)+"</atom:feed>";},getTemplate:function(args,_2c9){return this.analyticsTagTemplate;},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.update="delete";q.rep="empty";}else{q.uri=this._newAnalyticsTagURI;}return q;}});(function(){var r=com.ibm.data.resolver,_2ca=r.ATPocHandler,prot=_2ca.prototype,def=prot.definition,_2cb=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"at"});prot.definition=def;dojo.extend(_2ca,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_2cb.uniqueNameExt,_2cb.L10nExt,_2cb.modelExt,_2cb.atExt)});com.ibm.data.Resolver.register(def.scheme,_2ca);})();}if(!dojo._hasResource["com.ibm.strategy.Strategy"]){dojo._hasResource["com.ibm.strategy.Strategy"]=true;dojo.provide("com.ibm.strategy.Strategy");dojo.require("dojox.lang.aspect");dojo.declare("com.ibm.strategy.Strategy",null,{extensions:[],extensionsMap:{},strategyInit:function(obj){},getStrategyContext:function(){return dojox.lang.aspect.getContext();},around:function(){var _2cc=this.getStrategyContext().joinPoint.targetName;if(this.extensionsMap[_2cc]){return this[this.extensionsMap[_2cc]].apply(this,arguments);}else{if(this[_2cc]){return this[_2cc].apply(this,arguments);}else{return this.proceed(arguments);}}},proceed:function(args){return dojox.lang.aspect.proceed.apply(null,args);}});com.ibm.strategy.Strategy.applyStrategy=function(obj,_2cd){_2cd.strategyInit(obj);var adv=dojox.lang.aspect.advise(obj,_2cd.extensions,_2cd);return adv;};com.ibm.strategy.Strategy.removeStrategy=function(adv){dojox.lang.aspect.unadvise(adv);};}if(!dojo._hasResource["com.ibm.data.resolver.strategy.PocHandlerStrategy"]){dojo._hasResource["com.ibm.data.resolver.strategy.PocHandlerStrategy"]=true;dojo.provide("com.ibm.data.resolver.strategy.PocHandlerStrategy");dojo.declare("com.ibm.data.resolver.strategy.PocHandlerStrategy",com.ibm.strategy.Strategy,{handler:null,around:function(){this.handler=this.getStrategyContext().instance;var ret=this.inherited(arguments);this.handler=this.getStrategyContext().instance;return ret;}});}if(!dojo._hasResource["com.ibm.data.resolver.strategy.UpdateStrategy"]){dojo._hasResource["com.ibm.data.resolver.strategy.UpdateStrategy"]=true;dojo.provide("com.ibm.data.resolver.strategy.UpdateStrategy");dojo.declare("com.ibm.data.resolver.strategy.UpdateStrategy",com.ibm.data.resolver.strategy.PocHandlerStrategy,{extensions:["setValue","setValues"],extensionsMap:{"setValue":"_setValue","setValues":"_setValue"},_setValue:function(item,_2ce,_2cf){return this.proceed(arguments);}});}if(!dojo._hasResource["com.ibm.data.resolver.tree.TreeModeledHandler"]){dojo._hasResource["com.ibm.data.resolver.tree.TreeModeledHandler"]=true;dojo.provide("com.ibm.data.resolver.tree.TreeModeledHandler");dojo.declare("com.ibm.data.resolver.tree.TreeModeledHandler",null,{parentMgmtStrategy:"com.ibm.data.resolver.tree.ParentDependencyStrategy",siblingMgmtStrategy:"com.ibm.data.resolver.tree.SiblingDependencyStrategy",cacheContext:"_cachedMeta",childrenCacheKey:"children",constructor:function(){this.customAttributes=dojo.mixin({},this.customAttributes,{mayHaveChildren:{get:function(item,_2d0){var _2d1=item[this.cacheContext][this.childrenCacheKey];if(_2d1&&_2d1.loaded){return _2d1.length>0;}if(item[this.cacheContext].mayHaveChildren==true){return true;}return this.getValue(item,"childrenURI")!=null;},set:function(item,_2d2,_2d3){if(_2d2===1){item[this.cacheContext].mayHaveChildren=true;}return false;}},children:{get:function(item,_2d4){if(!item._cachedMeta.childrenLoader){var _2d5=this.getChildrenQuery(item);item._cachedMeta.childrenLoader=new com.ibm.data.ItemsLoader({store:this.resolver,query:_2d5,fetchOnReload:true,cacheContext:item[this.cacheContext],cacheProperty:this.childrenCacheKey,filter:dojo.hitch(this,"filterChildren",item)});}return _2d4?[item._cachedMeta.childrenLoader]:item._cachedMeta.childrenLoader;},set:function(item,_2d6,_2d7){if(dojo.isArray(_2d6)&&_2d7&&_2d6.preloaded){item[this.cacheContext][this.childrenCacheKey]=_2d6.slice();}return false;}},treeModel:{get:function(item,_2d8){if(!item._cachedMeta.treeModel){item._cachedMeta.treeModel=new com.ibm.data.resolver.tree.PocTreeModel({root:item,handler:this,resolver:this.resolver});}return _2d8?[item._cachedMeta.treeModel]:item._cachedMeta.treeModel;},set:function(item,_2d9,_2da){return false;}}});com.ibm.strategy.Strategy.applyStrategy(this,new (dojo.getObject(this.parentMgmtStrategy))());com.ibm.strategy.Strategy.applyStrategy(this,new (dojo.getObject(this.siblingMgmtStrategy))());},updateReferences:function(item){this.inherited(arguments);var _2db=this.getValue(item,"parentId");if(_2db){var _2dc=this.resolver.byId(_2db);if(_2dc){this.setValue(item,"parentId",this.resolver.getIdentity(_2dc));}}},modifyChildren:function(_2dd){_2dd._lastModified=(new Date()).getTime();},getChildrenQuery:function(item){return this.getValue(item,"childrenURI",{uri:this.getIdentity(item),levels:2,mode:"download"});},filterChildren:function(_2de,_2df){var id=this.getIdentity(_2de);_2df=dojo.filter(_2df,function(item){return id==this.resolver.getValue(item,"parentId");},this);_2df.loaded=true;return _2df;}});dojo.declare("com.ibm.data.resolver.tree.ParentDependencyStrategy",com.ibm.data.resolver.strategy.UpdateStrategy,{extensions:com.ibm.data.resolver.strategy.UpdateStrategy.prototype.extensions.concat(["processFetch","newItem","createStub"]),extensionsMap:dojo.mixin({},com.ibm.data.resolver.strategy.UpdateStrategy.prototype.extensionsMap,{"newItem":"updateNewItem","createStub":"updateNewItem"}),_setValue:function(item,_2e0,_2e1){var _2e2=false;if(_2e0=="parent"||_2e0=="parentId"||_2e0=="parentURI"){var _2e3=this.getStrategyContext().joinPoint.targetName=="setValues";var _2e4=this.handler[_2e3?"getValues":"getValue"](item,_2e0),_2e5=_2e1;_2e2=this.proceed(arguments);if(_2e2){if(_2e3){_2e4=_2e4?_2e4[0]:null;_2e5=_2e5?_2e5[0]:null;}if(_2e0=="parent"){if(_2e4){_2e4=this.handler.getIdentity(_2e4);}if(_2e5){_2e5=this.handler.getIdentity(_2e5);}}this._changeDependencies(item,this.handler.getIdentity(item),_2e5,_2e4);}}else{_2e2=this.proceed(arguments);}return _2e2;},_checkAndUpdateDependencies:function(item){var pId=this.handler.getValue(item,"parentId");if(pId){this._changeDependencies(item,this.handler.getIdentity(item),pId);}},updateNewItem:function(){var item=this.proceed(arguments);this._checkAndUpdateDependencies(item);return item;},processFetch:function(){var map=this.proceed(arguments);dojo.forEach(map.items,function(item){this._checkAndUpdateDependencies(item);},this);return map;},_changeDependencies:function(_2e6,_2e7,_2e8,_2e9){if(_2e9==_2e8){return;}if(_2e9){this.handler.depMgr.removeDependency(_2e9,_2e7,com.ibm.data.DependencyManager.types["delete"]);this.handler.depMgr.removeDependency(_2e7,_2e9,com.ibm.data.DependencyManager.types["create"]);}if(_2e8){this.handler.depMgr.addDependency(_2e8,_2e7,com.ibm.data.DependencyManager.types["delete"]);this.handler.depMgr.addDependency(_2e7,_2e8,com.ibm.data.DependencyManager.types["create"]);}}});dojo.declare("com.ibm.data.resolver.tree.AtomParentDependencyStrategy",com.ibm.data.resolver.tree.ParentDependencyStrategy,{cdepType:com.ibm.data.DependencyManager.types["create"],_changeDependencies:function(_2ea,_2eb,_2ec,_2ed){this.inherited(arguments);var _2ee=this.handler.depMgr.getSourcesByType(_2ed,this.cdepType);var _2ef=this.handler.getValue(_2ea,"nextId")||null;dojo.forEach(_2ee,function(_2f0){if(this.handler.resolver._getHandlerByUri(_2f0)==this.handler){var item=this.handler.resolver.byId(_2f0);if(this.handler.getValue(item,"nextId")==_2eb){this.handler._setValue(item,"nextId",_2ef);}}},this);}});dojo.declare("com.ibm.data.resolver.tree.SiblingDependencyStrategy",com.ibm.data.resolver.strategy.UpdateStrategy,{extensions:com.ibm.data.resolver.strategy.UpdateStrategy.prototype.extensions.concat(["processSave","unsetAttribute"]),blocked:false,odepType:com.ibm.data.DependencyManager.types["order"],cdepType:com.ibm.data.DependencyManager.types["create"],processSave:function(item){this.blocked=true;this.handler.setValue(item,"nextId",this._getEffectiveNextId(item));this.blocked=false;return this.proceed(arguments);},_getEffectiveNextId:function(item){if(!item){return null;}var next=this.handler.getValue(item,"next");if(next){if(!this.handler.resolver.isCreated(next)||this._isPendingPosition(next)){return this._getEffectiveNextId(next);}else{return this.handler.getIdentity(next);}}else{return null;}},_isPendingPosition:function(item){return dojo.some(item._writeLog,function(op){switch(op.attribute){case "next":case "nextId":case "parent":case "parentId":return true;default:return false;}},this);},unsetAttribute:function(item,_2f1){var _2f2=this.handler.getValue(item,_2f1);if(_2f1=="next"){if(_2f2){_2f2=this.handler.getIdentity(_2f2);}}var _2f3=this.proceed(arguments);if(_2f3){this._changeDependencies(item,this.handler.getIdentity(item),null,_2f2);}},_setValue:function(item,_2f4,_2f5){var _2f6=false;if(!this.blocked&&(_2f4=="next"||_2f4=="nextId")){var _2f7=this.getStrategyContext().joinPoint.targetName=="setValues";var _2f8=this.handler[_2f7?"getValues":"getValue"](item,_2f4),_2f9=_2f5;_2f6=this.proceed(arguments);if(_2f6){if(_2f7){_2f8=_2f8?_2f8[0]:null;_2f9=_2f9?_2f9[0]:null;}if(_2f4=="next"){if(_2f8){_2f8=this.handler.getIdentity(_2f8);}if(_2f9){_2f9=this.handler.getIdentity(_2f9);}}this._changeDependencies(item,this.handler.getIdentity(item),_2f9,_2f8);}}else{_2f6=this.proceed(arguments);}return _2f6;},_changeDependencies:function(item,id,_2fa,_2fb){if(_2fb==_2fa){return;}this._remove(id);this._insert(id,_2fa);},_remove:function(id){var _2fc=this.handler.depMgr.getTargetsByType(id,this.odepType);var _2fd=this.handler.depMgr.getSourcesByType(id,this.odepType);dojo.forEach(_2fc,function(_2fe){dojo.forEach(_2fd,function(_2ff){this.handler.depMgr.addDependency(_2ff,_2fe,this.odepType);},this);this.handler.depMgr.removeDependency(id,_2fe,this.odepType);},this);dojo.forEach(_2fd,function(_300){this.handler.depMgr.removeDependency(_300,id,this.odepType);},this);},_insert:function(id,_301){if(!_301){var _302=this.handler.depMgr.getSourcesByType(this.handler.getValue(this.handler.resolver.byId(id),"parentId"),this.cdepType);dojo.forEach(_302,function(_303){if(_303!=id&&this.handler.resolver._getHandlerByUri(_303)==this.handler){var item=this.handler.resolver.byId(_303);if(!this.handler.getValue(item,"nextId")){this.handler.depMgr.addDependency(id,_303,this.odepType);}}},this);}else{var _304=this.handler.depMgr.getTargetsByType(_301,this.odepType);dojo.forEach(_304,function(_305){this.handler.depMgr.removeDependency(_301,_305,this.odepType);this.handler.depMgr.addDependency(id,_305,this.odepType);},this);this.handler.depMgr.addDependency(_301,id,this.odepType);}}});dojo.declare("com.ibm.data.resolver.tree.AtomSiblingDependencyStrategy",com.ibm.data.resolver.tree.SiblingDependencyStrategy,{_changeDependencies:function(item,id,_306,_307){this.inherited(arguments);this.blocked=true;_307=_307||null;var _308=this.handler.depMgr.getSourcesByType(this.handler.getValue(item,"parentId"),this.cdepType);dojo.forEach(_308,function(_309){if(this.handler.resolver._getHandlerByUri(_309)==this.handler){var item=this.handler.resolver.byId(_309);if(this.handler.getValue(item,"nextId")==id){this.handler._setValue(item,"nextId",_307);}}},this);this.blocked=false;}});dojo.declare("com.ibm.data.resolver.tree.AtomModelTreeStrategy",com.ibm.data.resolver.strategy.UpdateStrategy,{extensions:com.ibm.data.resolver.strategy.UpdateStrategy.prototype.extensions.concat(["processFetch","processSave"]),_setValue:function(item,_30a,_30b){var _30c=false;switch(_30a){case "next":case "nextId":if(!_30b){_30c=this.handler.unsetAttribute(item,_30a);}else{_30c=this.proceed(arguments);}if(_30c){var _30d=this.handler.getValue(item,"parentId");if(_30d){this.handler.setValue(item,"parentId",_30d);}}break;default:_30c=this.proceed(arguments);}return _30c;},processChildren:function(map,_30e,_30f){if(_30e>1||_30e=="all"){var _310={};dojo.forEach(map.items,function(item){var id=this.handler.getIdentity(item),_311;_310[id]={item:item};if(id!=_30f){_311=this.handler.getValue(item,"parentId");if(_310[_311]){_310[id].level=_310[_311].level+1;if(_310[_311].children){_310[_311].children.push(item);}}}else{_310[id].level=1;}if(_30e=="all"||_310[id].level<_30e){if(!item._cachedMeta.children){_310[id].children=item._cachedMeta.children=[];}item._cachedMeta.children.loaded=true;}},this);}},processFetch:function(_312,_313){var map=this.proceed(arguments);var _314=_313.query.levels;if(dojo.isString(_314)){_314=_314.toLowerCase();}this.processChildren(map,_314,_313.query.uri);return map;},processSave:function(item){var _315=dojo.some(item._writeLog,function(op){switch(op.attribute){case "next":case "nextId":case "parent":case "parentId":return true;default:return false;}},this);var ret=this.proceed(arguments);if(!_315){this.handler.engine.select(this.handler.queryRules.parentId.selector+" | "+this.handler.queryRules.nextId.selector,item.data).destroy();ret.data=this.handler._serializeSaveData(item);}return ret;}});}if(!dojo._hasResource["com.ibm.data.resolver.tree.PocTreeModel"]){dojo._hasResource["com.ibm.data.resolver.tree.PocTreeModel"]=true;dojo.provide("com.ibm.data.resolver.tree.PocTreeModel");dojo.declare("com.ibm.data.resolver.tree.PocTreeModel",null,{root:null,resolver:null,handler:null,deferWrites:true,listening:true,constructor:function(args){dojo.mixin(this,args);this._dirtyItems={};this._allItems={};this._ancLoaders={};if(this.root){this._allItems[this.getIdentity(this.root)]=this.root;}this._connections=[].concat([dojo.connect(this.resolver,"onNew",this,"_onNew"),dojo.connect(this.resolver,"onSet",this,"_onSet"),dojo.connect(this.resolver,"onDelete",this,"_onDelete")]);if(dojo.isIE){dojo.addOnWindowUnload(dojo.hitch(this,function(){this.destroy();}));}},assertRelevance:function(item){if(!this.inModel(item)){throw new Error(this.resolver.fmt("errorNotInModel"));}},destroy:function(){dojo.forEach(this._connections,dojo.disconnect);delete this._connections;delete this._allItems;delete this._dirtyItems;delete this._ancLoaders;delete this.root;},getRoot:function(_316,_317){if(this.store.isItemLoaded(this.root)){_316(this.root);}else{this.store.loadItem({item:this.root,onItem:_316,onError:_317});}},mayHaveChildren:function(item){return this.handler.getValue(item,"mayHaveChildren");},getChildren:function(_318,_319,_31a){this.handler.getValue(_318,"children").addOnLoad(dojo.hitch(this,function(_31b){dojo.forEach(_31b,function(item){this._allItems[this.getIdentity(item)]=item;},this);if(_319){_319(this.filterChildren(_318,_31b.slice()));}})).addOnError(dojo.hitch(this,function(_31c){if(_31a){_31a(_31c);}}));},filterChildren:function(_31d,_31e){return _31e;},getIdentity:function(item){return this.handler.getIdentity(item);},getLabel:function(item){return this.handler.getLabel(item);},getAncestors:function(item,_31f,_320){this.assertRelevance(item);var id=this.getIdentity(item);if(this._ancLoaders[id]){this._ancLoaders[id].addOnLoad(_31f).addOnError(_320);}else{var _321=null,_322=true,_323=[];while(this.resolver.isItemLoaded(item)){this._allItems[this.getIdentity(item)]=item;_323.push(item);_321=this.getParent(item);if(!_321){break;}item=_321;_322=false;}if(!_321&&_31f&&!_322){_31f(_323);}else{this._ancLoaders[id]=(new com.ibm.data.ItemsLoader({store:this.resolver,query:this.getAncestorQuery(item),filter:function(_324){return _323.concat(_324);}})).addOnResult(dojo.hitch(this,function(_325){delete this._ancLoaders[id];dojo.forEach(_325,function(item){this._allItems[this.getIdentity(item)]=item;},this);})).addOnLoad(_31f).addOnError(_320);}}},getAncestorQuery:function(item){return {uri:this.getIdentity(item),levels:"-all"};},getParent:function(item){return this.handler.getValue(item,"parent");},newItem:function(args,_326){var _327={parent:_326,attribute:"parent"};var item=this.store.newItem(args,_327);this.store.save({onComplete:args.onComplete,onError:args.onError,scope:args.scope});return item;},isCreated:function(item){return this.resolver.isCreated(item);},addOnCreate:function(item,_328){return this.resolver.addOnCreate(item,_328);},pasteItem:function(_329,_32a,_32b,_32c,pos){var chId=this.getIdentity(_329),_32d=this.getIdentity(_32a),_32e=this.getIdentity(_32b),_32f=this.listening;if(chId==_32e){return;}else{this._dirtyItems[chId]=_329;if(_32d!=_32e){this.listening=false;this.resolver.setValue(_329,"parentId",_32e);this.listening=_32f;}this.getChildren(_32b,dojo.hitch(this,function(_330){this.listening=false;var _331=null;if(pos!=null){if(typeof (pos)=="number"){if(_330.length<pos){_331=_330[pos+1];}}else{if(this.resolver.isItem(pos)){_331=pos;var _332=this.getIdentity(pos);pos=dojo.indexOf(_330,function(item){return this.getIdentity(item)==_332;},this);if(pos<0){pos=_330.length;}}else{pos=Infinity;}}if(_331){this.resolver.setValue(_329,"next",_331);}}else{this.resolver.unsetAttribute(_329,"next");}if(!this.deferWrites){this.save();}this._removeChildItem(_32a,_329);this._insertChildItem(_32b,_329,pos);this.listening=_32f;this.onTreeChange(_329,_32a,_32b,_331);if(_32b){this.getChildren(_32b,dojo.hitch(this,"onChildrenChange",_32b));}if(_32a){this.getChildren(_32a,dojo.hitch(this,"onChildrenChange",_32a));}}));}},save:function(args){var arr=[];for(var id in this._dirtyItems){arr.push(this._dirtyItems[id]);delete this._dirtyItems[id];}this.resolver.saveItems(arr,args);},_insertChildItem:function(_333,item,pos){var _334=_333._cachedMeta.children;if(!this.mayHaveChildren(_333)){if(!_334){_334=_333._cachedMeta.children=[];}_334.loaded=true;}if(!_334||!_334.loaded){return false;}if(pos==null||pos>=_334.length){_334.push(item);}else{_334.splice(pos,0,item);}this.handler.modifyChildren(_334);return true;},_removeChildItem:function(_335,item){var _336=_335._cachedMeta.children;if(!_336||!_336.loaded){return false;}var id=this.getIdentity(item);for(var i=0;i<_336.length;i++){if(this.getIdentity(_336[i])==id){_336.splice(i,1);break;}}this.handler.modifyChildren(_336);return true;},inModel:function(obj){return true;},loadedInModel:function(obj){if(!dojo.isString(obj)){obj=this.getIdentity(obj);}return !!this._allItems[obj];},_onNew:function(_337,_338){if(!this.listening||!_338||!_338.item){return;}if(this.handler!=this.resolver._getHandlerByItem(_337)){return;}var _339=_338.item;if(this.loadedInModel(_339)){this._dirtyItems[this.handler.getIdentity(_337)]=_337;var _33a=this.handler.getValue(_337,"next");this._insertChildItem(_339,_337,_33a);this.onTreeChange(_337,null,_339,_33a);this.getChildren(_339,dojo.hitch(this,"onChildrenChange",_339));}},_onDelete:function(_33b){if(!this.listening){return;}if(this.loadedInModel(_33b)){this._dirtyItems[this.handler.getIdentity(_33b)]=_33b;var _33c=this.getParent(_33b);this._removeChildItem(_33c,_33b);this.onTreeChange(_33b,_33c);this.onDelete(_33b);}},_onSet:function(item,_33d,_33e,_33f){if(!this.listening){return;}if(this.loadedInModel(item)){switch(_33d){case "parentId":_33f=this.resolver.byId(_33f);case "parent":this.pasteItem(item,this.handler.getValue("parent"),_33f,false,this.handler.getValue("next"));break;case "nextId":_33f=this.resolver.byId(_33f);case "next":var _340=this.handler.getValue("parent");this.pasteItem(item,_340,_340,false,_33f);break;default:this.onChange(item);}}},onDelete:function(item){},onChange:function(item){},onChildrenChange:function(_341,_342){},onTreeChange:function(_343,_344,_345,_346){},toString:function(){return "[PocTreeModel of {"+this.handler+"}]";}});}if(!dojo._hasResource["com.ibm.data.resolver.tree.PocGlobalTreeModel"]){dojo._hasResource["com.ibm.data.resolver.tree.PocGlobalTreeModel"]=true;dojo.provide("com.ibm.data.resolver.tree.PocGlobalTreeModel");dojo.declare("com.ibm.data.resolver.tree.PocGlobalTreeModel",com.ibm.data.resolver.tree.PocTreeModel,{scheme:"",refItem:null,getRoot:function(_347,_348){if(this.root){_347(this.root);}else{this.getAncestors(this.refItem,dojo.hitch(this,function(_349){if(!this.root){this.root=_349[_349.length-1];this._allItems[this.getIdentity(this.root)]=this.root;}if(_347){_347(this.root);}}),_348);}}});}if(!dojo._hasResource["com.ibm.data.resolver.NMPocHandler"]){dojo._hasResource["com.ibm.data.resolver.NMPocHandler"]=true;dojo.provide("com.ibm.data.resolver.NMPocHandler");dojo.declare("com.ibm.data.resolver.NMPocHandler",[com.ibm.data.resolver.OpenSearchPocHandler,com.ibm.data.resolver.tree.TreeModeledHandler],{category:"navigation",_globalTreeModel:null,parentMgmtStrategy:"com.ibm.data.resolver.tree.AtomParentDependencyStrategy",siblingMgmtStrategy:"com.ibm.data.resolver.tree.AtomSiblingDependencyStrategy",namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces),constructor:function(){this.customAttributes.treeModel.get=function(item,_34a){if(!this._globalTreeModel){this._globalTreeModel=new com.ibm.data.resolver.tree.PocGlobalTreeModel({refItem:item,handler:this,resolver:this.resolver,scheme:this.definition.scheme});}return _34a?[this._globalTreeModel]:this._globalTreeModel;};com.ibm.strategy.Strategy.applyStrategy(this,new com.ibm.data.resolver.tree.AtomModelTreeStrategy());},_createTemplates:function(){var _34b=[];for(var _34c in this.namespaces){_34b.push("xmlns:",_34c,"=\"",this.namespaces[_34c],"\" ");}dojo.mixin(this,{nodeTemplate:{templateString:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+_34b.join("")+">"+"<atom:author>"+"<atom:name>IBM WebSphere Portal/6.1</atom:name>"+"</atom:author>"+"<atom:title>IBM WebSphere Portal Model Feed</atom:title>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+"<atom:entry>"+"<atom:title>${title}</atom:title>"+"<atom:id>${id}</atom:id>"+"<atom:content type=\"application/xml\">"+"<model:navigation-node>"+"<model:title>"+"<base:nls-string xml:lang=\"${locale}\">${title}</base:nls-string>"+"</model:title>"+"</model:navigation-node>"+"</atom:content>"+"</atom:entry>"+"</atom:feed>",templateProps:{id:"",title:"",locale:dojo.local}}});},getSaveQuery:function(item){var q=this.inherited(arguments);if(this.resolver.isCreated(item)){q.rep="empty";}else{q.uri=this.getValue(item,"parentId");}return q;},fillInProperties:function(_34d,_34e,_34f,_350){if(_34f.metadata){for(var key in _34f.metadata){_34f["metadata["+key+"]$"]=_34f.metadata[key];}delete _34f.metadata;}if(_34f.friendlyName){_34f["metadata[com.ibm.portal.friendly.name]$"]=_34f.friendlyName;delete _34f.friendlyName;}return this.inherited(arguments);},getTemplate:function(args,_351){return this.nodeTemplate;},instantiateTemplate:function(_352,args,_353){var _354=this.inherited(arguments);if(!args.parentId){this.engine.select("./thr:in-reply-to",_354).destroy();}return _354;},_makeModifiable:function(item){this.engine.select("atom:content/*/* | thr:in-reply-to | atom:link",item.data).destroy();this.inherited(arguments);}});(function(){var r=com.ibm.data.resolver,_355=r.NMPocHandler,prot=_355.prototype,def=prot.definition,_356=r.ResolverQueryRules.atom;def=dojo.mixin({},def,{scheme:"nm"});def.features=dojo.mixin({},def.features,{"TreeModeled":true});prot.definition=def;dojo.extend(_355,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_356.threadExt,_356.treeExt,_356.uniqueNameExt,_356.L10nExt,_356.acExt,_356.modelExt,_356.operationsExt,_356.contentExt,_356.metaExt,{contentNode:{selector:"./atom:link[@ext:class='content-node']",field:"@ext:uri",type:"Item"},contentNodeId:{selector:"./atom:link[@ext:class='content-node']",field:"@ext:uri"},contentNodeType:{selector:"./atom:link[@ext:class='content-node']",field:"@ext:rel"}})});var _357=function(data,rule,_358){var _359={"ext:class":"content-node","type":"application/atom+xml"};_359[rule.field.substr(1)]=_358;this.createFromJson(data,{name:"atom:link",attributes:_359});return true;};prot.queryRules.contentNode.setter=_357;prot.queryRules.contentNodeId.setter=_357;prot.queryRules.contentNodeType.setter=_357;com.ibm.data.Resolver.register(def.scheme,_355);})();}if(!dojo._hasResource["com.ibm.data.resolver.strategy.AspectsStrategy"]){dojo._hasResource["com.ibm.data.resolver.strategy.AspectsStrategy"]=true;dojo.provide("com.ibm.data.resolver.strategy.AspectsStrategy");dojo.declare("com.ibm.data.resolver.strategy.AspectsStrategy",com.ibm.data.resolver.strategy.PocHandlerStrategy,{extensions:["modifyFetchQuery"],constructor:function(_35a){this._aspects=_35a||[];},modifyFetchQuery:function(_35b){if(!_35b.aspect){_35b.aspect=[];}_35b.aspect=_35b.aspect.concat(this._aspects);return this.proceed(arguments);}});}if(!dojo._hasResource["com.ibm.data.resolver.strategy.MetadataStrategy"]){dojo._hasResource["com.ibm.data.resolver.strategy.MetadataStrategy"]=true;dojo.provide("com.ibm.data.resolver.strategy.MetadataStrategy");dojo.declare("com.ibm.data.resolver.strategy.MetadataStrategy",com.ibm.data.resolver.strategy.PocHandlerStrategy,{extensions:["modifyFetchQuery"],constructor:function(keys){this._keys=keys||[];},modifyFetchQuery:function(_35c){if(!_35c.mdname){_35c.mdname=[];}else{if(!dojo.isArray(_35c.mdname)){_35c.mdname=[_35c.mdname];}}_35c.mdname=_35c.mdname.concat(this._keys);return this.proceed(arguments);}});}(function(){ibmPortalConfig.resolver=com.ibm.data.Resolver.getStore({url:ibmPortalConfig.contentHandlerURI,namespaces:{"ext":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model","creationcontext":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1.0/portal-creation-context","base":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base","model":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements"},tunnel:ibmConfig["tunnel.mode"],isAuthenticated:!ibmConfig.anonymousUser});})(); dojo.provide("portalclient.nls.tagging_rating_en");dojo.provide("com.ibm.widgets.nls.DoneCheckDialog");com.ibm.widgets.nls.DoneCheckDialog._built=true;dojo.provide("com.ibm.widgets.nls.DoneCheckDialog.en");com.ibm.widgets.nls.DoneCheckDialog.en={"text_want_to_close_without_saving":"Do you really want to exit without saving your changes?","button_yes":"Yes","text_are_you_sure":"Are you sure?","link_no":"No","title_click_to_close":"Click to close","title_close":"Close"};dojo.provide("com.ibm.widgets.nls.AddTag");com.ibm.widgets.nls.AddTag._built=true;dojo.provide("com.ibm.widgets.nls.AddTag.en");com.ibm.widgets.nls.AddTag.en={"text_community_tags_for_this_resource":"Public tags for this resource:","link_done":"Close","text_no_tags_on_this_resource":"There are no tags assigned to this resource.","title_input_tag_names":"Input field for tag names","text_error_tags_rejected":"Your actions failed: ${0} tags were rejected by the server, either because of a filter rule, due to insufficient permissions or invalid characters.","text_info_changes_lost":"All changes made in a different tab will be lost.","text_invalid_tag_name":"Invalid tag name","title_delete_all_tags_of_name":"Delete all tags assigned to this resource with the name \"${0}\"","title_your_tags":"Your tags","button_public":"Public","title_community_tags":"Public tags","text_info_length_of_tag_invalid":"The length of one of the entered tags is either too long or too short.","text_info_max_number_of_community_tags_reached":"The maximum number of allowed tags (set by your administrator) has been reached.","title_confirmation":"Confirmation","text_add_tags":"Add the following tag(s):","text_all_tags_deleted":"The selected public tags have been successfully deleted.","title_close_widget":"Close widget","button_private":"Private","text_error_renderMode_wsrp":"Please note that tagging is not fully supported in WSRP scenarios. Please contact your administrator for help.","text_tags_deleted":" tag(s) deleted","title_view_tags":"View tags","title_switch_to_priv_view":"Switch to private view","title_done_with_tagging":"Done with tagging (unsaved changes will be lost)","text_your_tags_for_this_resource":"Your tags for this resource:","title_submit_tags":"Submit tags","title_pub_tags":"Your public tags","title_error_message":"Error message","title_all_tags":"All tags","title_locale_picker":"The language your entries will be saved in: ","text_info_max_number_of_private_tags_reached":"You have reached the maximum number of private tags allowed for one user (${0} tags).","title_switch_to_community_view":"Switch to public view","text_tag":"Tag \"${0}\"","title_hide_tags":"Hide tags","text_loading":"Loading...","text_error_tag_already_assigned":"You have already assigned one or more of the entered tags to this resource.","title_open_widget":"Add tags","title_delete":"Delete \"${0}\"","title_priv_tags":"Your private tags","text_info_max_number_of_public_tags_reached":"You have reached the maximum number of public tags allowed for one user (${0} tags).","text_you_have_no_tags_on_this_resource":"You have no tags assigned to this resource.","text_tags_saved":" tag(s) created","text_success_changes_stored_successfully":"Your actions were successful: ","button_save":"Save"};dojo.provide("com.ibm.widgets.nls.AddRating");com.ibm.widgets.nls.AddRating._built=true;dojo.provide("com.ibm.widgets.nls.AddRating.en");com.ibm.widgets.nls.AddRating.en={"link_done":"Close","text_community_rating_for_this_resource":"Public rating for this resource:","text_stars_count":"${0} star(s)","text_info_changes_lost":"All changes made in a different tab will be lost.","text_rating_deleted":"Rating deleted.","button_public":"Public","title_rating_distribution":"Rated ${0} time(s) with ${1} star(s)","title_confirmation":"Confirmation","title_not_set":"No rating has been set, yet. ","title_click_to_add_ratings":"Click to add ratings.","title_your_rating":"Your rating","title_pub_rating":"Your public rating","title_close_widget":"Close widget","button_private":"Private","text_error_renderMode_wsrp":"Please note that rating is not fully supported in WSRP scenarios. Please contact your administrator for help.","title_hide_ratings":"Hide ratings","title_priv_rating":"Your private rating","title_switch_to_priv_view":"Switch to private view","title_community_rating":"Public rating","text_all_ratings_deleted":"All ratings have been successfully deleted.","title_switch_to_pub_view":"Switch to public view","title_all_rating":"All ratings","title_error_message":"Error message","title_community_rating_distribution":"Distribution of the public rating","title_delete_ratings_for_this_resource":"Delete all public ratings assigned to this resource","title_done_with_rating":"Done with rating (unsaved changes will be lost)","title_rating_percentage":"Rating: ${0} out of ${1}. ","title_open_widget":"Click to add ratings","text_rating_saved":"Rating saved.","title_info":"Information","title_delete_rating":"Delete rating","text_rate":"Rate \"${0}\"","link_delete":"Delete","title_submit_rating":"Submit rating","text_success_changes_stored_successfully":"Your actions were successful: ","text_your_rating_for_this_resource":"Your rating for this resource:","button_save":"Save","title_view_ratings":"View ratings"};dojo.provide("com.ibm.widgets.nls.TagCloud");com.ibm.widgets.nls.TagCloud._built=true;dojo.provide("com.ibm.widgets.nls.TagCloud.en");com.ibm.widgets.nls.TagCloud.en={"title_jump_to_page":"Type in a page number and press Enter to navigate to it","text_cloud":"cloud","title_pagepicker":"Click on a page number to navigate to it","text_list":"list","title_pageofpages":"Indicates which page is currently shown in the list","title_tagsshown":"Showing tags ${0} to ${1} of ${2}","text_all_tags":"All tags","text_error_insufficient_permissions":"You have insufficient permissions to view tags","title_community_tags":"Show other users public tags","alt_goto_page":"Go to page","title_slider":"Move slider to show fewer or more tags","text_personalprivate_tags":"My private tags","text_jump_to_page":"Jump to page","text_personalpublic_tags":"My public tags","title_loading_icon":"Loading...","text_latest_tags":"Latest tags","text_next":"Next","text_page":"Page ${0}","title_click_to_collapse":"Click to collapse the scope selector section","title_scope_add_btn":"Click to add this scope to the list of selected scopes","title_all_tags":"Show all tags","title_click_to_expand":"Click to expand the scope selector section","text_previous":"Previous","title_latest_tags":"Show latest tags","text_times":"${0} times","text_select_scope":"Select scope","text_federation_tags":"IBM Connections tags","title_next":"Click to show next page","text_error":"Error","text_community_tags":"Others tags","title_scope_selector":"Pick a scope that you want to add to the list of selected scopes","text_time":"${0} time","title_list_view":"Show tags in a list view","text_loading":"Loading tags","text_no_tags_found":"No tags found","title_tagged_times":"The tag '${0}' was used ${1} times","text_page_of_pages":"${0} - ${1} of ${2}","text_view_as":"View as","title_personalpublic_tags":"Show your public tags","text_information":"Information","title_personalprivate_tags":"Show your private tags","title_cloud_view":"Show tags in a cloud view","title_goto_page":"Go to page ${0}","title_previous":"Click to show previous page","title_federation_tags":"Show IBM Connections tags","text_tags":"Tags","text_ellipsis":"...","title_remove_scope":"Click to remove this scope from the list of selected scopes"};dojo.provide("com.ibm.widgets.nls.CPLauncher");com.ibm.widgets.nls.CPLauncher._built=true;dojo.provide("com.ibm.widgets.nls.CPLauncher.en");com.ibm.widgets.nls.CPLauncher.en={"tag":"Tag ","rate":"Rate "}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("portalclient.nls.tagging_rating",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.data.resolver.LanguageListPocHandler"]){dojo._hasResource["com.ibm.data.resolver.LanguageListPocHandler"]=true;dojo.provide("com.ibm.data.resolver.LanguageListPocHandler");dojo.declare("com.ibm.data.resolver.LanguageListPocHandler",[com.ibm.data.resolver.OpenSearchPocHandler],{namespaces:dojo.mixin({},com.ibm.data.resolver.OpenSearchPocHandler.prototype.namespaces,com.ibm.data.resolver.ResolverQueryRules.namespaces)});(function(){var r=com.ibm.data.resolver,_1=r.LanguageListPocHandler,_2=_1.prototype,_3=_2.definition,_4=r.ResolverQueryRules.atom;_3=dojo.mixin({},_3,{scheme:"ll"});_2.definition=_3;dojo.extend(_1,{queryRules:dojo.mixin({},r.OpenSearchPocHandler.prototype.queryRules,_4.L10nExt,_4.modelExt,{locale:{selector:"./atom:content/*[model:locale]/model:locale",field:"$textContent",readOnly:true},dir:{selector:"./atom:content/*[model:dir]/model:dir",field:"$textContent",readOnly:true}})});com.ibm.data.Resolver.register(_3.scheme,_1);})();}if(!dojo._hasResource["com.ibm.widgets.ConsoleWrapper"]){dojo._hasResource["com.ibm.widgets.ConsoleWrapper"]=true;dojo.provide("com.ibm.widgets.ConsoleWrapper");dojo.declare("com.ibm.widgets.ConsoleWrapper",[],{_hasLogMethod:false,_hasDebugMethod:false,_hasInfoMethod:false,_hasWarnMethod:false,_hasErrorMethod:false,constructor:function(){if(typeof console=="object"){this._hasLogMethod=(typeof console.log=="function");this._hasDebugMethod=(typeof console.debug=="function");this._hasInfoMethod=(typeof console.info=="function");this._hasWarnMethod=(typeof console.warn=="function");this._hasErrorMethod=(typeof console.error=="function");}else{this.log=function(){};this.debug=function(){};this.info=function(){};this.warn=function(){};this.error=function(){};}},debug:function(_5){if(this._hasDebugMethod){console.debug.apply(console,arguments);}else{this.log.apply(this,arguments);}},error:function(_6){if(this._hasErrorMethod){console.error.apply(console,arguments);}else{this.log.apply(this,arguments);}},info:function(_7){if(this._hasInfoMethod){console.info.apply(console,arguments);}else{this.log.apply(this,arguments);}},log:function(_8){if(this._hasLogMethod){console.log.apply(console,arguments);}},warning:function(_9){if(this._hasWarnMethod){console.warn.apply(console,arguments);}else{this.log.apply(this,arguments);}}});}if(!dojo._hasResource["com.ibm.widgets._Traceable"]){dojo._hasResource["com.ibm.widgets._Traceable"]=true;dojo.provide("com.ibm.widgets._Traceable");dojo.declare("com.ibm.widgets._Traceable",[],{LOGGER:null,LOG_LEVEL:null,LOG_LEVEL_ERROR:1000,LOG_LEVEL_INFO:800,LOG_LEVEL_TRACE:500,LOG_LEVEL_WARNING:900,_consoleWrapper:null,_traceChecker:null,_isSimpleLogging:false,_isLoggable:false,constructor:function(){if(dojo.exists("com.ibm.mashups.enabler.logging.Logger")){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this._isSimpleLoggingisSimpleLogging=false;this.LOG_LEVEL_TRACE=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.LOG_LEVEL_INFO=com.ibm.mashups.enabler.logging.LogLevel.INFO;this.LOG_LEVEL_WARNING=com.ibm.mashups.enabler.logging.LogLevel.WARNING;this.LOG_LEVEL_ERROR=com.ibm.mashups.enabler.logging.LogLevel.SEVERE;}else{if(typeof ibmCfg!="undefined"&&typeof ibmCfg.enablerConfig!="undefined"&&typeof ibmCfg.enablerConfig.traceConfig!="undefined"){this._initConfig(ibmCfg.enablerConfig.traceConfig);}this._isSimpleLogging=true;this._isLoggable=this.isLoggable();this._consoleWrapper=new com.ibm.widgets.ConsoleWrapper();}this.LOG_LEVEL=this.LOG_LEVEL_TRACE;},isTracing:function(){return this.isLogging(this.LOG_LEVEL);},error:function(_a,_b,_c){this.log(this.LOG_LEVEL_ERROR,_a,_b,_c);},info:function(_d,_e,_f){this.log(this.LOG_LEVEL_INFO,_d,_e,_f);},isLoggable:function(){var _10;if(typeof ibmCfg!="undefined"&&typeof ibmCfg.enablerConfig!="undefined"&&typeof ibmCfg.enablerConfig.isDebug!="undefined"){if(!ibmCfg.enablerConfig.isDebug){_10=false;}else{var _11=this._traceChecker;_10=_11&&_11.test(this.declaredClass);}}else{_10=false;}return _10;},isLogging:function(_12){if(this._isSimpleLogging){return this._isLoggable;}else{return this.LOGGER.isLoggable(_12);}},log:function(_13,_14,_15,_16){if(this._isSimpleLogging){this._logSimple(_13,_14,_15,_16);}else{this.LOGGER.log(_13,_14,msg,_16);}},trace:function(_17,_18,_19){var _1a=this.isTracing();if(_1a){var msg=_18;var _1b="";if(_19||(_19===0)||(_19===null)||(_19==="")){if(!dojo.isArray(_19)){_1b=_19;}else{if(_19&&_19.length>0){for(var arg in _19){if(_1b===""){_1b=_1b+_19[arg];}else{_1b=_1b+", "+_19[arg];}}}}msg=msg+" [ "+_1b+" ]";}if(this._isSimpleLogging){this._consoleWrapper.debug(this.declaredClass+" "+_17+" : "+msg);}else{this.LOGGER.log(this.LOG_LEVEL,_17,msg);}}},traceEntry:function(_1c,_1d){if(this._isSimpleLogging){if(this._isLoggable){var msg=" ENTRY";var _1e="";if(_1d||(_1d===0)||(_1d===null)||(_1d==="")){if(!dojo.isArray(_1d)){_1e=_1d;}else{if(_1d&&_1d.length>0){for(var arg in _1d){if(_1e===""){_1e=_1e+_1d[arg];}else{_1e=_1e+", "+_1d[arg];}}}}msg=msg+" [ "+_1e+" ]";}this._consoleWrapper.debug(this.declaredClass+" "+_1c+msg);}}else{var _1f=this.LOGGER.isLoggable(this.LOG_LEVEL_TRACE);if(_1f){this.LOGGER.entering(_1c,_1d);}}},traceExit:function(_20,_21){if(this._isSimpleLogging){if(this._isLoggable){if(_21||(_21===0)||(_21===null)||(_21==="")){this._consoleWrapper.debug(this.declaredClass+" "+_20+" EXIT [ "+_21+" ]");}else{this._consoleWrapper.debug(this.declaredClass+" "+_20+" EXIT");}}}else{var _22=this.LOGGER.isLoggable(this.LOG_LEVEL_TRACE);if(_22){if(typeof _21==="boolean"){_21=_21?"true":"false";}this.LOGGER.exiting(_20,_21);}}},warning:function(_23,_24,_25){this.log(this.LOG_LEVEL_WARNING,_23,_24,_25);},_initConfig:function(_26){if(_26&&_26.length>0){this._traceChecker=new RegExp(dojo.isArray(_26)?_26.join("|"):_26);}else{this._traceChecker=null;}},_logSimple:function(_27,_28,_29,_2a){if(this._isLoggable){if((_2a&&!dojo.isArray(_2a))||_2a===false){_2a=[_2a];}var _2b=_2a?dojo.string.substitute(_29,_2a):_29;if(_27==this.LOG_LEVEL_ERROR){this._consoleWrapper.error(this.declaredClass+" "+_28+" : "+_2b);}else{if(_27==this.LOG_LEVEL_WARNING){this._consoleWrapper.warning(this.declaredClass+" "+_28+" : "+_2b);}else{if(_27==this.LOG_LEVEL_INFO){this._consoleWrapper.info(this.declaredClass+" "+_28+" : "+_2b);}else{if(_27==this.LOG_LEVEL_TRACE){this._consoleWrapper.debug(this.declaredClass+" "+_28+" : "+_2b);}else{this._consoleWrapper.log(this.declaredClass+" "+_28+" : "+_2b);}}}}}}});}if(!dojo._hasResource["com.ibm.widgets.DoneCheckDialog"]){dojo._hasResource["com.ibm.widgets.DoneCheckDialog"]=true;dojo.provide("com.ibm.widgets.DoneCheckDialog");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.Dialog");dojo.declare("com.ibm.widgets.DoneCheckDialog",[dijit._Widget,dijit._Templated,dijit.Dialog,com.ibm.widgets._Traceable],{portal8ThemeUniqueName:"ibm.portal.80Theme",lotusui_id:"dijitDialog_lotusui30_container",lotusui_class:"lotusui30",bIsTracing:false,bundle:null,blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString(),parentWidget:null,callbackOnYes:null,templateString:null,templateString:"<div class=\"lotusDialogBorder lotusui\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\" dojoAttachPoint=\"dialogDiv\">\n <div class=\"lotusDialog\">\n <div class=\"lotusDialogHeader\" dojoAttachPoint=\"titleBar\">\n <h1 class=\"lotusHeading\" dojoAttachPoint=\"headerNode\">\n <span dojoAttachPoint=\"titleNode\">${bundle.text_are_you_sure}</span>\n </h1>\n <a dojoAttachPoint=\"closeButtonNode\" role=\"button\" aria-label=\"${bundle.title_click_to_close}\" href=\"javascript:void(0);\" class=\"lotusDialogClose\" title=\"${bundle.title_click_to_close}\">\n <img src=\"${blankImg}\" alt=\"\" role=\"presentation\"/>\n <span dojoAttachPoint=\"closeText\" class=\"lotusAltText\" title=\"${bundle.title_click_to_close}\">\n X\n </span>\n </a>\n </div>\n <form dojoAttachPoint=\"newPageForm\" action=\"javascript:;\">\n <div dojoAttachPoint=\"containerNode\" class=\"lotusDialogContent\">\n ${bundle.text_want_to_close_without_saving}\n </div>\n <div class=\"lotusDialogFooter\" dojoAttachPoint=\"dialogFooter\">\n <input value=\"${bundle.button_yes}\" class=\"lotusFormButton\" dojoAttachPoint=\"submitDialog\" type=\"submit\"/>\n <input dojoAttachPoint=\"dialogCancel\" class=\"lotusBtn\" type=\"button\" role=\"button\" id=\"cancelTags\" aria-label=\"${bundle.link_no}\" title=\"${bundle.link_no}\" value=\"${bundle.link_no}\" />\n </div>\n </form>\n </div>\n</div>\n",constructor:function(){this.inherited("constructor","com.ibm.widgets.DoneCheckDialog");},postMixInProperties:function(){this.bundle=dojo.i18n.getLocalization("com.ibm.widgets","DoneCheckDialog");},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}this.inherited(arguments);this.submitDialog.onclick=dojo.hitch(this,function(){this.submit();return false;});this.dialogCancel.onclick=dojo.hitch(this,function(){this.cancelDialog();return false;});this.closeButtonNode.onclick=dojo.hitch(this,function(){this.cancelDialog();return false;});dojo.connect(this.dialogCancel,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey"));dojo.connect(this.closeButtonNode,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey"));this._fixupMarkupForOneUI();if(this.bIsTracing){this.traceExit(m);}},setCloseCallback:function(_2c){var m="setCloseCallback(method)";if(this.bIsTracing){this.traceEntry(m);}this.callbackOnYes=_2c;if(this.bIsTracing){this.traceExit(m);}},setLoadDataCallback:function(_2d){var m="setLoadDataCallback(method)";if(this.bIsTracing){this.traceEntry(m);}this.callbackOnNo=_2d;if(this.bIsTracing){this.traceExit(m);}},submit:function(){var m="submit()";if(this.bIsTracing){this.traceEntry(m);}this.hide();this.destroy();if(this.callbackOnYes){this.callbackOnYes();}if(this.bIsTracing){this.traceExit(m);}},cancelDialog:function(){var m="cancelDialog()";if(this.bIsTracing){this.traceEntry(m);}this.hide();if(this.bIsTracing){this.traceExit(m);}},_findOrCreateLotusUIDIV:function(){var m="_findOrCreateLotusUIDIV()";if(this._isTracing){this.traceEntry(m);}var _2e=dojo.byId(this.lotusui_id);if(!_2e){_2e=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class},dojo.body());}if(this._isTracing){this.traceExit(m,_2e);}return _2e;},_fixupMarkupForOneUI:function(){var m="_fixupMarkupForOneUI()";if(this._isTracing){this.traceEntry(m);}var _2f="";var _30=true;if((typeof com_ibm_theme_capabilities!=="undefined")&&(typeof com_ibm_theme_capabilities.oneUI=="string")&&(com_ibm_theme_capabilities.oneUI.charAt(0)==="3")){_30=false;}if(_30===true){dojo.addClass(this.dialogDiv,"lotusui");dojo.place(this.closeButtonNode,this.headerNode,"first");dojo.removeClass(this.closeButtonNode,"lotusDialogClose");dojo.addClass(this.closeButtonNode,"lotusBtnImg lotusClose");}else{dojo.removeClass(this.dialogDiv,"lotusui");dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");}if(this._isTracing){this.traceExit(m);}},_triggerOnClickEvtForSpaceKey:function(_31){if(_31){var _32=_31.target;if(_32){var key=_31.charCode;var _33=dojo.keys;if(key===_33.SPACE){if(dojo.isFunction(_32.onclick)){_32.onclick();dojo.stopEvent(_31);}}}}},_getFocusItems:function(_34){var _35=this.containerNode;this.containerNode=_34;this.inherited(arguments);this.containerNode=_35;}});}if(!dojo._hasResource["com.ibm.widgets.TypeAheadComboBox"]){dojo._hasResource["com.ibm.widgets.TypeAheadComboBox"]=true;dojo.provide("com.ibm.widgets.TypeAheadComboBox");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.form.ComboBox");dojo.require("dojo.data.ItemFileWriteStore");dojo.require("dojo._base.xhr");dojo.declare("com.ibm.widgets.TypeAheadComboBox",[dijit._Widget,dijit._Templated,dijit.form.ComboBox,com.ibm.widgets._Traceable],{bIsTraceable:false,parentWidget:"",validationCallback:"",typeAheadFetchDelay:80,validationDelay:80,allowTypeAheadDataCaching:false,typeAheadFetchURL:"",separatorChars:[" ",","],prefix:"",maxResponses:32,_splitRegExp:null,_typeAheadTimerHandle:"",_typeAheadStore:null,_validateTimerHandle:"",_lastUnsuccessfulSearchTerm:"",_lastSuccessfulSearchTerm:"",_responseCache:[],constructor:function(){this.inherited("constructor","com.ibm.widgets.TypeAheadComboBox");this.bIsTracing=this.isTracing();this.hasDownArrow=false;this.autoComplete=false;this.highlightMatch="none";this._splitRegExp=new RegExp("[,| ]");},postMixInProperties:function(){this.inherited("postMixInProperties",arguments);},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}this.inherited("postCreate",arguments);dojo.connect(dojo.byId(this.domNode),"onkeyup",dojo.hitch(this,"onKeyupEvent"));dojo.attr(this.textbox,"title",dojo.attr(this.domNode,"title"));if(this.bIsTracing){this.traceExit(m);}},uninitialize:function(){this.inherited("uninitialize",arguments);clearTimeout(this._validateTimerHandle);clearTimeout(this._typeAheadTimerHandle);},onKeyupEvent:function(_36){var m="onKeyupEvent(evnt)";if(this.bIsTracing){this.traceEntry(m,_36);}var key=_36.keyCode;var _37=dojo.keys;if(this.bIsTracing){this.trace(m,"key",key);this.trace(m,"keys",_37);this.trace(m,"keys.DOWN_ARROW",_37.DOWN_ARROW);}switch(key){case _37.DOWN_ARROW:case _37.END:case _37.HOME:case _37.LEFT_ARROW:case _37.LEFT_WINDOW:case _37.PAGE_DOWN:case _37.PAGE_UP:case _37.RIGHT_ARROW:case _37.RIGHT_WINDOW:case _37.TAB:case _37.UP_ARROW:case _37.ENTER:case _37.ESCAPE:break;default:clearTimeout(this._validateTimerHandle);this._validateTimerHandle=setTimeout(dojo.hitch(this,"validate",true),this.validationDelay);clearTimeout(this._typeAheadTimerHandle);this._typeAheadTimerHandle=setTimeout(dojo.hitch(this,"_requestTypeAheadData"),this.typeAheadFetchDelay);break;}if(this.bIsTracing){this.traceExit(m);}},onTypeAheadDataLoad:function(_38,_39){var m="onTypeAheadDataLoad(response, ioArgs)";if(this.bIsTracing){this.traceEntry(m,[_38,_39]);}var _3a=this.removePrefix(_38[0]);if(_3a==this.attr("value")){if(_38[1].length===0){this._lastUnsuccessfulSearchTerm=_3a;}else{this._lastSuccessfulSearchTerm=_3a;this._pushResponseForSearchTerm(_38);}this._convertOpenSearchResponse(_38);}if(this.bIsTracing){this.traceExit(m);}},validator:function(_3b,_3c){var m="validator(value, constraints)";if(this.bIsTracing){this.traceEntry(m,[_3b,_3c]);}var _3d=true;var v=this.attr("value");if(v!==""){var _3e=v.split(this._splitRegExp);var _3f;for(var i=0;i<_3e.length;i++){if(_3e[i].length>0){_3f=_3e[i].match(this.regExp);if(_3f!==null&&_3f.length>0){if(_3f[0].length!=_3e[i].length){_3d=false;}}else{_3d=false;}}}if(this.bIsTracing){this.trace(m,"isValid",_3d);this.trace(m,"parent widget",this.parentWidget);}}if(_3d!==true){if(this.validationCallback!==""){this.validationCallback(false);}if(this.bIsTracing){this.traceExit(m,false);}return false;}else{if(this.validationCallback!==""){if(dojo.trim(this.attr("value")).length===0){this.validationCallback(false);}else{this.validationCallback(true);}}if(this.bIsTracing){this.traceExit(m,true);}return true;}},_getEmptyStore:function(){return new dojo.data.ItemFileWriteStore({data:{identifier:"name",items:[]}});},_replaceVariables:function(_40){return _40.replace("${searchTerm}",this.addPrefix(this.attr("value")));},_searchTermHasInvalidChars:function(_41){var m="_searchTermHasInvalidChars(searchTerm)";if(this.bIsTracing){this.traceEntry(m,_41);}for(var i=0;i<this.separatorChars.length;i++){if(_41.indexOf(this.separatorChars[i])>-1){if(this.bIsTracing){this.traceExit(m,true);}return true;}}if(this.bIsTracing){this.traceExit(m,false);}return false;},_searchTermCouldReturnResults:function(_42){var m="_searchTermCouldReturnResults(searchTerm)";if(this.bIsTracing){this.traceEntry(m,_42);}var _43=true;if((this._lastUnsuccessfulSearchTerm!=="")&&(_42.indexOf(this._lastUnsuccessfulSearchTerm)===0)){_43=false;}if(this.bIsTracing){this.traceExit(m,_43);}return _43;},_getResponseForSearchTerm:function(_44){var m="_getResponseForSearchTerm(searchTerm)";if(this.bIsTracing){this.traceEntry(m,_44);}for(var i=0;i<this._responseCache.length;i++){if(this._responseCache[i][0]==_44){if(this.bIsTracing){this.traceExit(this._responseCache[i]);}return this._responseCache[i];}}if(this.bIsTracing){this.traceExit(m,null);}return null;},_pushResponseForSearchTerm:function(_45){var m="_pushResponseForSearchTerm(response)";if(this.bIsTracing){this.traceEntry(m,_45);}if(this._responseCache.length>=this.maxResponses){this._responseCache.shift();}this._responseCache.push(_45);if(this.bIsTracing){this.traceExit(m);}},_requestTypeAheadData:function(){var m="_requestTypeAheadData()";if(this.bIsTracing){this.traceEntry(m);}var _46=this.attr("value");if(this.bIsTracing){this.trace(m,"searchTerm",_46);}if(_46.length>2){if((!this._searchTermHasInvalidChars(_46))&&(this._searchTermCouldReturnResults(_46))){var _47=this._getResponseForSearchTerm(_46);if(_47){this._convertOpenSearchResponse(_47);}else{var _48=true;if(this.allowTypeAheadDataCaching===true){_48=false;}if(this.bIsTracing){this.trace(m,"Sending xhrGet http request to portal");this.trace(m,"xhrGet URL",this._replaceVariables(this.typeAheadFetchURL));}this._fetchSearchTerm=_46;var _49=dojo.xhrGet({url:this._replaceVariables(this.typeAheadFetchURL),load:dojo.hitch(this,"onTypeAheadDataLoad"),handleAs:"json",preventCache:_48});}}}else{this._typeAheadStore=this._getEmptyStore();dojo.attr(this,"store",this._typeAheadStore);this._startSearchAll();}if(this.bIsTracing){this.traceExit(m);}},_convertOpenSearchResponse:function(_4a){var m="_convertOpenSearchResponse(response)";if(this.bIsTracing){this.traceEntry(m,_4a);}this._typeAheadStore=this._getEmptyStore();if(this.bIsTracing){this.trace(m,"Response Length",_4a[1].length);}for(var i=0;i<_4a[1].length;i++){var _4b=this.removePrefix(_4a[1][i]);if(this.bIsTracing){this.trace(m,"Response[1][i]",_4b);}this._typeAheadStore.newItem({name:_4b});}this._typeAheadStore.save();dojo.attr(this,"store",this._typeAheadStore);this._startSearchAll();if(this.bIsTracing){this.traceExit(m);}},setLocalization:function(_4c,dir){if(_4c!==null){dojo.attr(this.textbox,"lang",_4c);}if(dir!==null){dojo.attr(this.textbox,"dir",dir);}},addPrefix:function(_4d){var _4e=_4d;if(this.prefix!==""){_4e=this.prefix+_4d;}return _4e;},removePrefix:function(_4f){var _50=_4f;if(this.prefix!==""){_50=_4f.slice(this.prefix.length,_4f.length);}return _50;}});}if(!dojo._hasResource["com.ibm.widgets.AddTag"]){dojo._hasResource["com.ibm.widgets.AddTag"]=true;dojo.provide("com.ibm.widgets.AddTag");dojo.require("dojo.fx");dojo.require("dojo.i18n");dojo.require("dojo.string");dojo.declare("com.ibm.widgets.AddTag",[dijit.Dialog,dijit._Templated,com.ibm.widgets._Traceable],{portal8ThemeUniqueName:"ibm.portal.80Theme",lotusui_id:"dijitDialog_lotusui30_TagDlg_container",lotusui_class:"lotusui30",_lotusui_div:null,widgetsInTemplate:true,bIsTracing:false,resourceID:"",resourceTitle:"",resourceType:"",validationRegex:"",resourceCategories:null,resourcePrivate:false,maxCommunityTags:50,maxPersonalTags:50,orderMetric:"tag_space_count_reverse_name",order:"DESC",messageFadeOutDuration:1000,defaultView:"PUBLIC",deletingEnabled:true,countsEnabled:false,customLabelCommunityTags:"",customLabelPersonalPublicTags:"",customLabelPersonalPrivateTags:"",customLabelAddTags:"",privateTaggingEnabled:true,mineTaggingEnabled:true,displayTabs:true,localePickerEnabled:true,customMessageNoCommunityTags:"",customMessageNoPersonalTags:"",typeaheadSearchPattern:null,genericParameterMap:null,fetch_totalResults:30,tagName:"",resourceSchema:"",resource:null,tagsForResource:"",collaborativeTags:[],myTags:[],myPrivateTags:[],privateTagsToDelete:[],publicTagsToDelete:[],tagSpacesToDelete:[],collaborativeScope:["AUTHOR","COLLABORATIVE"],privateScope:["PRIVATE"],isAnonymous:false,numberOfTagsToAdd:0,numberOfTagsToDelete:0,numberOfRejectedTags:0,numberOfDuplicateTags:0,errorMsgDetails:"",isPreventCache:false,itemsToSave:[],_triggerRefresh:false,locale:ibmPortalConfig.locale,_tagSpacesDeleted:false,_deletedTagSpaceName:"",_checkDialog:null,maxPersonalPublicTagsReached:false,maxPersonalPrivateTagsReached:false,publicTagAlreadyAssigned:false,privateTagAlreadyAssigned:false,numberOfTagsAdded:0,isPrivate:false,prefix:"",LTR:"ltr",RTL:"rtl",bidi:null,tagStore:null,_tagData:null,tagsChangedEventID:"",tagsChangedEvent:"tagsChanged",_tagScope:"community",_dapTagsForResource:null,_dapMyTagsForResource:null,_dapPrivateTagsForResource:null,_dapDeleteTagNames:[],_dapDeleteTagSpaces:[],_dapDeletePrivateTagNames:{},_dapSuccessDiv:null,_dapLocalePickerButton:null,templateString:null,templateString:"<div class=\"lotusDialogBorder lotusui trc trcTagging\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\" dojoAttachPoint=\"addTagDiv\">\n <div class=\"lotusDialog trc trcTagging trcDialog trcDialogTagging\">\n <div class=\"lotusDialogHeader\" dojoAttachPoint=\"titleBar\">\n <h1 class=\"lotusHeading\" dojoAttachPoint=\"headerNode\">\n <span dojoAttachPoint=\"titleNode\" id=\"${id}_titleNode\"></span>\n </h1>\n <a dojoAttachPoint=\"closeButtonNode\" role=\"button\" aria-label=\"${bundle.title_close_widget}\" href=\"javascript:void(0);\" class=\"lotusDialogClose\" title=\"${bundle.title_close_widget}\">\n <img src=\"${blankImage}\" alt=\"\" role=\"presentation\" />\n <span dojoAttachPoint=\"closeText\" class=\"lotusAltText\" title=\"${bundle.title_close_widget}\">\n X\n </span>\n </a>\n </div>\n <div dojoAttachPoint=\"addTagForm\" id=\"addForm\" action=\"javascript:;\" class=\"lotusForm2\">\n <div dojoAttachPoint=\"containerNode\" class=\"lotusDialogContent\" style=\"max-height: none; padding-left: 20px; padding-right: 20px;\">\n <div dojoAttachPoint=\"errorDiv\" id=\"errorDiv\" title=\"${bundle.title_error_message}\" style=\"display:none;\" class=\"lotusMessage\">\n <img src=\"${blankImage}\" width=\"16\" height=\"16\" class=\"trcErrorIcon\" alt=\"${bundle.title_error_message}\" /> \n <span dojoAttachPoint=\"errorSpan\"></span>\n <div style=\"background-color: white;\" style=\"display:block;\">\n <span dojoAttachPoint=\"errorDetailsSpan\"></span>\n </div> \n </div>\n <div dojoAttachPoint=\"successMessageDiv\" id=\"successMessageDiv\"></div>\n <div dojoAttachPoint=\"informationDiv\" id=\"informationDiv\"></div>\n <div dojoAttachPoint=\"communitySection\" class=\"lotusFormField\">\n <span dojoAttachPoint=\"communityTagsLabel\" class=\"trcText\">${bundle.text_community_tags_for_this_resource}</span>\n <div dojoAttachPoint=\"loadingDiv\" class=\"trcLoading\">\n <span class=\"lotusLoading\"><img width=\"16\" height=\"16\" src=\"${blankImage}\"></span>&nbsp;<span>${bundle.text_loading}</span>\n </div>\n <div dojoAttachpoint=\"tagDiv\" title=\"${bundle.title_community_tags}\" id=\"tagDiv\"></div> \n </div>\n <div dojoAttachPoint=\"editSection\"> \n <table class=\"trcTabTable\" role=\"presentation\">\n <tr>\n <td>\n <div dojoAttachPoint=\"editTabs\" class=\"lotusTabContainer\">\n <ul class=\"lotusTabs\" >\n <li dojoAttachPoint=\"liTabPublic\" role=\"tab\" class=\"lotusSelected\"><div><a id=\"tabPublic\" dojoAttachPoint=\"tabPublic\" title=\"${bundle.title_switch_to_community_view}\" selected=\"true\" href=\"javascript:;\"><strong>${bundle.button_public}</strong></a></div></li>\n <li dojoAttachPoint=\"liTabPrivate\" role=\"tab\" ><div><a id=\"tabPrivate\" dojoAttachPoint=\"tabPrivate\" title=\"${bundle.title_switch_to_priv_view}\" href=\"javascript:;\">${bundle.button_private}</a></div></li>\n </ul>\n </div>\n <div dojoAttachPoint=\"tabContent\" role=\"tabpanel\" class=\"lotusTabContent\" aria-labelledby=\"tabPublic\" aria-hidden=\"false\">\n <div dojoAttachPoint=\"informationCell\"></div>\n <div class=\"lotusFormField trcFormFieldRow\" dojoAttachPoint=\"myOrPrivateTags\">\n <span dojoAttachPoint=\"myOrPrivateTagsLabel\" class=\"trcText\">${bundle.text_your_tags_for_this_resource}</span>\n <div class=\"trcLoading\" dojoAttachPoint=\"personalLoadingDiv\">\n <span class=\"lotusLoading\"><img width=\"16\" height=\"16\" src=\"${blankImage}\"></span>&nbsp;<span>${bundle.text_loading}</span>\n </div>\n <div dojoAttachpoint=\"myOrPrivateTagDiv\" title=\"${bundle.title_your_tags}\" id=\"myOrPrivateTagDiv\"></div> \n </div>\n <div class=\"lotusFormField trcFormFieldRow\" dojoAttachPoint=\"tagsInput\">\n <label for=\"tagNameInput\" dojoAttachPoint=\"tagsInputLabel\" class=\"trcText\">${bundle.text_add_tags}</label>\n <div><select class=\"lotusText\" hasDownArrow=\"false\" title=\"${bundle.title_input_tag_names}\" dojoAttachPoint=\"tagNameInput\" parentWidget=\"${parentWidget}\" name=\"tagNameInput\" class =\"lotusText\" id=\"tagNameInput\" dojoType=\"com.ibm.widgets.TypeAheadComboBox\" allowTypeAheadDataCaching=\"true\" invalidMessage=\"${bundle.text_invalid_tag_name}\"></select></div> \n </div>\n <div class=\"trcLocalePicker\" dojoAttachPoint=\"localePicker\" id=\"localePicker\"></div>\n </div>\n </td>\n </tr>\n </table>\n </div>\n </div>\n <div class=\"lotusDialogFooter\" dojoAttachPoint=\"dialogFooter\">\n <input type=\"submit\" dojoAttachPoint=\"submitDialog\" value=\"${bundle.button_save}\" role=\"button\" class=\"lotusFormButton\" title=\"${bundle.title_submit_tags}\" id=\"submitTags\" name=\"submitTags\" /> \n <input dojoAttachPoint=\"dialogCancel\" class=\"lotusFormButton\" type=\"button\" role=\"button\" id=\"cancelTags\" aria-label=\"${bundle.title_done_with_tagging}\" title=\"${bundle.title_done_with_tagging}\" value=\"${bundle.link_done}\" />\n </div>\n </div> \n </div>\n</div>\n",blankImage:dojo.moduleUrl("dojo","resources/blank.gif").toString(),getTagStore:function(){this.tagStore=ibmPortalConfig.resolver;return this.tagStore;},constructor:function(){this.bundle=dojo.i18n.getLocalization("com.ibm.widgets","AddTag");if(this.bidi===null){if(this.isLeftToRight()){this.bidi=this.LTR;}else{this.bidi=this.RTL;}}this.parentWidget=this;if(typeof this.id==="undefined"){this.id="addTags"+this.resourceID?"_"+this.resourceID:"Dlg";}this.isAnonymous=!ibmPortalConfig.currentUser;},postCreate:function(){var m="postCreate()";this.traceEntry(m);this.inherited(arguments);this.tagsChangedEventID=this.resourceID+this.tagsChangedEvent;this._initializeParameters();if(this.isAnonymous===true){this.displayTabs=false;this.privateTaggingEnabled=false;this.mineTaggingEnabled=false;}if(this.prefix!==""){this.displayTabs=false;this.privateTaggingEnabled=false;this.mineTaggingEnabled=false;}this._initializeWidget();if(this.genericParameterMap){if(this.genericParameterMap.renderMode===com.ibm.widgets.AddTag._parameterMap_Value_RenderMode_WSRP){dojo.destroy(this.communitySection);dojo.destroy(this.editSection);this.errorDisplay(null,this.bundle.text_error_renderMode_wsrp,null);}}this.tagNameInput.setLocalization(this.locale,this.bidi);this._fixupMarkupForOneUI();this.show();this.traceExit(m);},layout:function(){this._setContainerNodeMaxHeight();this.inherited(arguments);},initializeTracing:function(){this.bIsTracing=this.isTracing();},fetchTags:function(){var m="fetchTags()";this.traceEntry(m);this.trace(m,"retrieving URI: ",[com.ibm.widgets.AddTag._tagSpaceEmptyURI,this.resource,com.ibm.widgets.AddTag._tagScope_community,com.ibm.widgets.AddTag._tagScope_personal_public,this.maxCommunityTags,this.orderMetric,this.order,this.isPreventCache]);this._displayLoading();var _51={};if(this.isPreventCache){_51.preventCache=true;}var _52={uri:com.ibm.widgets.AddTag._tagSpaceEmptyURI,rmparam:this.resource,scope:com.ibm.widgets.AddTag._tagScope_community_plus_personal_public,"max-results":this.maxCommunityTags,"start-index":0,orderMetric:this.orderMetric,order:this.order};if(this.prefix!==""){_52.prefix=this.prefix;}this._tagData=this.getTagStore().fetch({query:_52,queryOptions:_51,onBegin:dojo.hitch(this,"_onFetchBegin"),onComplete:dojo.hitch(this,"displayCollaborativeTags"),onError:dojo.hitch(this,"errorDisplay")});this.isPreventCache=false;this.traceExit(m);},fetchMyTags:function(){var m="fetchMyTags()";this.traceEntry(m);this.trace(m,"retrieving URI: ",[com.ibm.widgets.AddTag._tagSpaceEmptyURI,this.resource,com.ibm.widgets.AddTag._tagScope_personal_public,this.maxPersonalTags,this.orderMetric,this.order]);this._displayLoading(com.ibm.widgets.AddTag._tagTypePersonal);var _53={};if(this.isPreventCache){_53.preventCache=true;}this._tagData=this.getTagStore().fetch({query:{uri:com.ibm.widgets.AddTag._tagSpaceEmptyURI,rmparam:this.resource,scope:com.ibm.widgets.AddTag._tagScope_personal_public,"max-results":this.maxPersonalTags,"start-index":0,orderMetric:this.orderMetric,order:this.order},queryOptions:_53,onComplete:dojo.hitch(this,"displayMyTags"),onError:dojo.hitch(this,"errorDisplay")});this.isPreventCache=false;this.traceExit(m);},fetchPrivateTags:function(){var m="fetchMyTags()";this.traceEntry(m);this.trace(m,"retrieving URI: ",[com.ibm.widgets.AddTag._tagSpaceEmptyURI,this.resource,com.ibm.widgets.AddTag._tagScope_personal_private,com.ibm.widgets.AddTag._tagScope_personal_public,this.maxPersonalTags,this.orderMetric,this.order]);this._displayLoading(com.ibm.widgets.AddTag._tagTypePersonal);var _54={};if(this.isPreventCache){_54.preventCache=true;}this._tagData=this.getTagStore().fetch({query:{uri:com.ibm.widgets.AddTag._tagSpaceEmptyURI,rmparam:this.resource,scope:com.ibm.widgets.AddTag._tagScope_personal_private,"max-results":this.maxPersonalTags,"start-index":0,orderMetric:this.orderMetric,order:this.order},queryOptions:_54,onComplete:dojo.hitch(this,"displayPrivateTags"),onError:dojo.hitch(this,"errorDisplay")});this.isPreventCache=false;this.traceExit(m);},_fixupMarkupForOneUI:function(){var m="_fixupMarkupForOneUI()";if(this._isTracing){this.traceEntry(m);}var _55="";var _56=true;if((typeof com_ibm_theme_capabilities!=="undefined")&&(typeof com_ibm_theme_capabilities.oneUI=="string")&&(com_ibm_theme_capabilities.oneUI.charAt(0)==="3")){_56=false;}if(_56===true){dojo.addClass(this.addTagDiv,"lotusui");dojo.place(this.closeButtonNode,this.headerNode,"first");dojo.removeClass(this.closeButtonNode,"lotusDialogClose");dojo.addClass(this.closeButtonNode,"lotusBtnImg lotusClose");}else{dojo.removeClass(this.addTagDiv,"lotusui");dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");}if(this._isTracing){this.traceExit(m);}},_onFetchBegin:function(_57,_58){var m="_onFetchBegin(totalResultSize, requestObject)";this.traceEntry(m);this.trace(m,"totalResultSize : ",[_57,_58]);this.fetch_totalResults=_57;this.traceExit(m);},displayCollaborativeTags:function(_59,_5a){var m="displayCollaborativeTags(items, request)";this.traceEntry(m);this.trace(m,"items.length : ",[_59.length]);this.collaborativeTags=[];if(this.isAnonymous){this.handleAnonymousCase();}if(this.customLabelCommunityTags!==null){dojo.attr(this.communityTagsLabel,"innerHTML",this.customLabelCommunityTags);dojo.attr(this.tagDiv,"title",this.customLabelCommunityTags);}else{dojo.attr(this.communityTagsLabel,"innerHTML",this.bundle.text_community_tags_for_this_resource);dojo.attr(this.tagDiv,"title",this.bundle.title_community_tags);}var _5b=this._dapTagsForResource;if(_5b){_5b.parentNode.removeChild(_5b);}this._displayTags();var div=dojo.create("div",{id:"tagsForResource"},this.tagDiv);dojo.addClass(div,"lotusTagCloud lotusui");this._dapTagsForResource=div;if(_59.length<1){if(this.customMessageNoPersonalTags){dojo.place(dojo.doc.createTextNode(this.customMessageNoCommunityTags),div,"last");}else{dojo.place(dojo.doc.createTextNode(this.bundle.text_no_tags_on_this_resource),div,"last");}}else{if(_59.length>this.maxCommunityTags||_59.length<this.fetch_totalResults){this.displayInfoMessage(this.bundle.text_info_max_number_of_community_tags_reached,null,this.informationDiv);}var ul=dojo.create("ul",{id:"collaborativeTagList"},div);dojo.forEach(_59,function(_5c){var _5d=this.getTagStore().getValue(_5c,com.ibm.widgets.AddTag._nameAttribute);var _5e=this.getTagStore().getValue(_5c,com.ibm.widgets.AddTag._preferredLocaleAttribute);var _5f=this.getTagStore().getValue(_5c,com.ibm.widgets.AddTag._preferredLocaleDirAttribute);var _60={};var _61=this.removePrefix(_5d);_60.name=_5d;var li=dojo.create("li",{title:_61},ul);var _62="";if(this.countsEnabled){_62=dojo.doc.createTextNode(_61+" ("+this.getTagStore().getValue(_5c,com.ibm.widgets.AddTag._countAttribute)+") ");}else{_62=dojo.doc.createTextNode(_61+" ");}var _63=dojo.create("span",null,li);dojo.addClass(_63,"lotusNowrap");dojo.attr(_63,"lang",_5e);dojo.attr(_63,"dir",_5f);if(ibmPortalCPConfig.operations.canDeleteOtherUsersTags){var _64=this.getTagStore().getValue(_5c,com.ibm.widgets.AddTag._deleteAllLinkAttribute);var _65=dojo.create("a",{href:"javascript:;",title:dojo.string.substitute(this.bundle.title_delete_all_tags_of_name,[_61]),role:"button"},_63);var img=dojo.create("img",{src:this.blankImage,alt:""},_65);img.style.width="10px";img.style.height="10px";dojo.addClass(_65,"trcDeleteIcon");_65.onclick=dojo.hitch(this,function(){this.markCommunityTagForDeletion(_5d,_64);return false;});var _66=dojo.create("span",null,_65,"first");_66.innerHTML="X";dojo.addClass(_66,"trcDeleteText");_66.onclick=dojo.hitch(this,function(){this.markCommunityTagForDeletion(_5d,_64);return false;});}dojo.place(_62,_63,"first");if(_59.length==1||_5c==_59[_59.length-1]){dojo.place(dojo.doc.createTextNode(" "),li,"last");}else{dojo.place(dojo.doc.createTextNode(", "),li,"last");}this.collaborativeTags.push(_60);this._dapDeleteTagSpaces[_5d]=li;},this);}this.layout();this.tagNameInput.focus();this.traceExit(m);},displayMyTags:function(_67,_68){var m="displayMyTags(items, request)";this.traceEntry(m);this.trace(m,"items.length : ",[_67.length]);this.myTags=[];this._tagScope=com.ibm.widgets.AddTag._tagScope_personal_public;if(this.customLabelPersonalPublicTags!==null){dojo.attr(this.myOrPrivateTagsLabel,"innerHTML",this.customLabelPersonalPublicTags);dojo.attr(this.myOrPrivateTagDiv,"title",this.customLabelPersonalPublicTags);}else{dojo.attr(this.myOrPrivateTagsLabel,"innerHTML",this.bundle.text_your_tags_for_this_resource);dojo.attr(this.myOrPrivateTagDiv,"title",this.bundle.title_your_tags);}if(this.customLabelAddTags!==null){dojo.attr(this.tagsInputLabel,"innerHTML",this.customLabelAddTags);dojo.attr(this.tagNameInput,"title",this.customLabelAddTags);}else{dojo.attr(this.tagsInputLabel,"innerHTML",this.bundle.text_add_tags);dojo.attr(this.tagNameInput,"title",this.bundle.title_input_tag_names);}var _69=this._dapMyTagsForResource;if(_69){_69.parentNode.removeChild(_69);}this._displayTags(com.ibm.widgets.AddTag._tagTypePersonal);var div=dojo.create("div",{id:"myTagsForResource"},this.myOrPrivateTagDiv);dojo.addClass(div,"lotusTagCloud lotusui");this._dapMyTagsForResource=div;if(_67.length<1){if(this.customMessageNoPersonalTags){dojo.place(dojo.doc.createTextNode(this.customMessageNoPersonalTags),div,"last");}else{dojo.place(dojo.doc.createTextNode(this.bundle.text_you_have_no_tags_on_this_resource),div,"last");}}else{var ul=dojo.create("ul",{id:"myCollaborativeTagList"},div);dojo.forEach(_67,function(_6a){var _6b=this.getTagStore().getValue(_6a,com.ibm.widgets.AddTag._nameAttribute);var _6c=this.getTagStore().getValue(_6a,com.ibm.widgets.AddTag._preferredLocaleAttribute);var _6d=this.getTagStore().getValue(_6a,com.ibm.widgets.AddTag._preferredLocaleDirAttribute);this.tagName=_6b;var li=dojo.create("li",{title:_6b},ul);var _6e=dojo.create("span",null,li);dojo.addClass(_6e,"lotusNowrap");dojo.attr(_6e,"lang",_6c);dojo.attr(_6e,"dir",_6d);var _6f=dojo.doc.createTextNode(_6b+" ");dojo.place(_6f,_6e,"first");var _70={};_70.name=_6b;if(this.deletingEnabled){var _71=this.getTagStore().getValue(_6a,com.ibm.widgets.AddTag._deleteLinkAttribute);_70.delLink=_71;var _72=dojo.create("a",{href:"javascript:;",title:dojo.string.substitute(this.bundle.title_delete,[_6b]),role:"button"},_6e);var img=dojo.create("img",{src:this.blankImage,alt:""},_72);img.style.width="10px";img.style.height="10px";dojo.addClass(_72,"trcDeleteIcon");_72.onclick=dojo.hitch(this,function(){this.markForDeletion(_6b);return false;});var _73=dojo.create("span",null,_72,"first");_73.innerHTML="X";dojo.addClass(_73,"trcDeleteText");_73.onclick=dojo.hitch(this,function(){this.markForDeletion(_6b);return false;});}else{this.trace(m,"The user is not allowed to delete his own tags, therefore no delete icon is displayed");}if(_67.length==1||_6a==_67[_67.length-1]){dojo.place(dojo.doc.createTextNode(" "),li,"last");}else{dojo.place(dojo.doc.createTextNode(", "),li,"last");}this.myTags.push(_70);dojo.parser.parse(li);this._dapDeleteTagNames[_6b]=li;},this);}this.layout();this.tagNameInput.focus();this.traceExit(m);},displayPrivateTags:function(_74,_75){var m="displayPrivateTags(items, request)";this.traceEntry(m);this.trace(m,"items.length : ",[_74.length]);this.myPrivateTags=[];this._tagScope=com.ibm.widgets.AddTag._tagScope_personal_private;if(this.customLabelPersonalPrivateTags!==null){dojo.attr(this.myOrPrivateTagsLabel,"innerHTML",this.customLabelPersonalPrivateTags);dojo.attr(this.myOrPrivateTagDiv,"title",this.customLabelPersonalPrivateTags);}else{dojo.attr(this.myOrPrivateTagsLabel,"innerHTML",this.bundle.text_your_tags_for_this_resource);dojo.attr(this.myOrPrivateTagDiv,"title",this.bundle.title_your_tags);}var _76=this._dapPrivateTagsForResource;if(_76){_76.parentNode.removeChild(_76);}this._displayTags(com.ibm.widgets.AddTag._tagTypePersonal);var div=dojo.create("div",{id:"privateTagsForResource"},this.myOrPrivateTagDiv);dojo.addClass(div,"lotusTagCloud lotusui");this._dapPrivateTagsForResource=div;if(_74.length<1){if(this.customMessageNoPersonalTags){dojo.place(dojo.doc.createTextNode(this.customMessageNoPersonalTags),div,"last");}else{dojo.place(dojo.doc.createTextNode(this.bundle.text_you_have_no_tags_on_this_resource),div,"last");}}else{var ul=dojo.create("ul",{id:"privateTagList"},div);dojo.forEach(_74,function(_77){var _78=this.getTagStore().getValue(_77,"tagScope");var _79=this.getTagStore().getValue(_77,com.ibm.widgets.AddTag._nameAttribute);var _7a=this.getTagStore().getValue(_77,com.ibm.widgets.AddTag._preferredLocaleAttribute);var _7b=this.getTagStore().getValue(_77,com.ibm.widgets.AddTag._preferredLocaleDirAttribute);var _7c={};_7c.name=_79;var li=dojo.create("li",{title:_79},ul);var _7d=dojo.doc.createTextNode(_79+" ");var _7e=dojo.create("span",null,li);dojo.addClass(_7e,"lotusNowrap");dojo.attr(_7e,"lang",_7a);dojo.attr(_7e,"dir",_7b);dojo.place(_7d,_7e,"first");if(this.deletingEnabled){var _7f=this.getTagStore().getValue(_77,com.ibm.widgets.AddTag._deleteLinkAttribute);_7c.delLink=_7f;var _80=dojo.create("a",{href:"javascript:;",title:dojo.string.substitute(this.bundle.title_delete_all_tags_of_name,[_79]),role:"button"},_7e);var img=dojo.create("img",{src:this.blankImage,alt:""},_80);img.style.width="10px";img.style.height="10px";dojo.addClass(_80,"trcDeleteIcon");_80.onclick=dojo.hitch(this,function(){this.markForDeletion(_79);return false;});var _81=dojo.create("span",null,_80,"first");_81.innerHTML="X";dojo.addClass(_81,"trcDeleteText");_81.onclick=dojo.hitch(this,function(){this.markForDeletion(_79);return false;});}else{this.trace(m,"The user is not allowed to delete tags, therefore no delete icon is displayed.");}if(_74.length==1||_77==_74[_74.length-1]){dojo.place(dojo.doc.createTextNode(" "),li,"last");}else{dojo.place(dojo.doc.createTextNode(", "),li,"last");}this.myPrivateTags.push(_7c);dojo.parser.parse(li);this._dapDeleteTagNames[_79]=li;},this);}this.layout();this.tagNameInput.focus();this.traceExit(m);},markForDeletion:function(_82){var m="markForDeletion(tagName)";this.traceEntry(m);this.trace(m,"tagName : ",[_82]);this.handleValidation(true);this._checkForMessages();var _83=this._dapDeleteTagNames[_82];_83.parentNode.removeChild(_83);var _84={};if(this._tagScope==com.ibm.widgets.AddTag._tagScope_personal_public){_84.name=_82;_84.delLink=this.findDeleteLinkForTagName(this.myTags,_82);this.publicTagsToDelete.push(_84);}else{_84.name=_82;_84.delLink=this.findDeleteLinkForTagName(this.myPrivateTags,_82);this.privateTagsToDelete.push(_84);}this.traceExit(m);},markCommunityTagForDeletion:function(_85,_86){var m="markCommunityTagForDeletion(tagName, deleteAllLink)";this.traceEntry(m);this.trace(m,"tagName : ",[_85]);this.trace(m,"manager delete link : ",[_86]);this.handleValidation(true);this._checkForMessages();var _87=this._dapDeleteTagSpaces[_85];_87.parentNode.removeChild(_87);var _88=this._dapDeleteTagNames[_85];if(_88){if(_88.parentNode){_88.parentNode.removeChild(_88);}}var _89={};_89.name=_85;_89.delAllLink=_86;this.tagSpacesToDelete.push(_89);this.traceExit(m);},findDeleteLinkForTagName:function(_8a,_8b){var m="findDeleteLinkForTagName(tagName, tagsArray)";this.traceEntry(m);this.trace(m,"tagName : ",[_8b]);this.trace(m,"tagsArray : ",[_8a]);var _8c="";for(var i=0;i<_8a.length;i++){if(_8a[i].name===_8b){_8c=_8a[i].delLink;this.trace(m,"tagsArray[i].delLink",_8a[i].delLink);break;}}this.trace(m,"deleteLink : ",[_8c]);this.traceExit(m);return _8c;},deleteTagByLink:function(_8d,_8e){var m="deleteTagByLink(tagDeleteLink, tagScope)";this.traceEntry(m);this.trace(m,"tagDeleteLink : ",[_8d]);this.trace(m,"tagScope : ",[_8e]);var st=this.getTagStore();var def=new dojo.Deferred();def.addCallback(dojo.hitch(this,function(_8f,_90){this.deleteTagsInStore(_8f,_90);}));callback=dojo.hitch(this,function(_91,_92){def.callback(_91,_92);});if(_8e==com.ibm.widgets.AddTag._tagScope_personal_private){st.fetch({query:st.urlToQuery(_8d+"&scope="+com.ibm.widgets.AddTag._tagScope_personal_private,"tm"),queryOptions:{preventCache:true,bypassBatch:true},onComplete:callback,onError:null,scope:this});}else{st.fetch({query:st.urlToQuery(_8d+"&scope="+com.ibm.widgets.AddTag._tagScope_personal_public,"tm"),queryOptions:{preventCache:true,bypassBatch:true},onComplete:callback,onError:null,scope:this});}this.traceExit(m,def);return def;},deleteTagsInStore:function(_93,_94){var m="deleteTagsInStore(tagitems, request)";this.traceEntry(m);this.trace(m,"tagitems.length : ",[_93.length]);var _95=[],st=this.getTagStore();dojo.forEach(_93,function(_96){this.trace(m,"tagitem : ",[_96]);_95.push(_96);st.deleteItem(_96);},this);this.traceExit(m);},destroyDialog:function(){var m="destroyDialog()";this.traceEntry(m);if(this._dapLocalePickerButton){this._dapLocalePickerButton.destroy();delete this._dapLocalePickerButton;}if(this._checkDialog){this._checkDialog.destroyRecursive();delete this._checkDialog;}this.destroy();this._removeLotusOneUIDiv();this.traceExit(m);},hideAndCancelTags:function(_97){var m="hideAndCancelTags(event)";this.traceEntry(m);setTimeout(dojo.hitch(this,"destroyDialog"),this.duration+10);this.traceExit(m);},cancelTags:function(_98){var m="cancelTags(event)";this.traceEntry(m);if(this.tagNameInput.attr("value")!==""||this.privateTagsToDelete.length>0||this.publicTagsToDelete.length>0||this.tagSpacesToDelete.length>0){if(!this._checkDialog){this._checkDialog=new com.ibm.widgets.DoneCheckDialog({id:"doneCheckDialog",parentWidget:this,callbackOnYes:function(){this.parentWidget.hideAndCancelTags();}});}this._checkDialog.show();}else{this.hideAndCancelTags();}this.traceExit(m);},handleCreatesAndDeletes:function(_99,_9a){var m="handleCreatesAndDeletes(event, input)";this.traceEntry(m);this.trace(m,"input : ",[_9a]);this._displayLoading(com.ibm.widgets.AddTag._tagTypePersonal);if(_99){dojo.stopEvent(_99);}var _9b="";this.itemsToSave=[];var _9c=[];var _9d=[];var _9e=[];var _9f=[];var _a0=[];var _a1=this._triggerRefresh;var _a2=this.tagSpacesToDelete;if(_9a||this.tagNameInput.attr("value")!==""){if(_9a){_9b=_9a;}else{if(this.tagNameInput.attr("value")!==""){_9b=this.tagNameInput.attr("value");}}var _a3=_9b.split(new RegExp("[,| ]"));var _a4=this._cleanArray(_a3);if(this.debug===true){dojo.forEach(this.myTags,function(_a5){this.trace(m,"myTag : ",[_a5.name]);});}_a4=this._cleanArrayFromDuplicates(_a4);var _a6=this.myTags;var _a7=this.myPrivateTags;var _a8=this._tagScope;var _a9=com.ibm.widgets.AddTag._tagScope_personal_public;var _aa=com.ibm.widgets.AddTag._tagScope_personal_private;var _ab=this.privateTagsToDelete;var _ac=this.publicTagsToDelete;if(this.privateTagsToDelete.length>0||this.publicTagsToDelete.length>0||this.tagSpacesToDelete.length>0){dojo.forEach(_a4,function(_ad){if(_a2.length>0&&dojo.every(_a2,function(_ae){return _ae.name!=_ad;})){_a0.push(_ad);}else{_a1=true;}if(_a8==_aa){if(_ab.length>0&&dojo.every(_ab,function(_af){return _af.name!=_ad;})){_a0.push(_ad);}else{_a1=true;}}else{if(_ac.length>0&&dojo.every(_ac,function(_b0){return _b0.name!=_ad;})){_a0.push(_ad);}else{_a1=true;}}});}else{_a0=_a4;}if(_a4.length>0){if(this._tagScope==com.ibm.widgets.AddTag._tagScope_personal_private){dojo.forEach(this.privateTagsToDelete,function(_b1){if(dojo.every(_a4,function(_b2){return _b2!=_b1.name;})){_9c.push(_b1);}else{_a1=true;}});}else{dojo.forEach(this.publicTagsToDelete,function(_b3){if(dojo.every(_a4,function(_b4){return _b4!=_b3.name;})){_9d.push(_b3);}else{_a1=true;}});}}else{_9c=this.privateTagsToDelete;_9d=this.publicTagsToDelete;}this.numberOfTagsToAdd=_a0.length;var me=this;dojo.forEach(_a0,function(_b5){if(this._tagScope==com.ibm.widgets.AddTag._tagScope_personal_private){this.isPrivate=true;me=this;if(dojo.some(this.myPrivateTags,function(_b6){return _b6.name==me.addPrefix(_b5);})){this.numberOfTagsToAdd--;if(!this.privateTagAlreadyAssigned){this.displayInfoMessage(this.bundle.text_error_tag_already_assigned,null,this.informationDiv);this.privateTagAlreadyAssigned=true;}if(_a0.length==1){this._displayTags(com.ibm.widgets.AddTag._tagTypePersonal);}}else{if(_b5.length>50||_b5.length<1){this.numberOfTagsToAdd--;this.displayInfoMessage(this.bundle.text_info_length_of_tag_invalid,null,this.informationDiv);_a1=true;}else{if((this.numberOfTagsAdded+this.myPrivateTags.length)>=this.maxPersonalTags){this.numberOfTagsToAdd--;if(!this.maxPersonalPrivateTagsReached){this.displayInfoMessage(dojo.string.substitute(this.bundle.text_info_max_number_of_private_tags_reached,[this.maxPersonalTags]),null,this.informationCell);this.maxPersonalPrivateTagsReached=true;}_a1=true;}else{this.numberOfTagsAdded++;this.storeTag(_b5,this.isPrivate,this.resource);}}}}else{this.isPrivate=false;var _b7=this.myTags;if(!this.mineTaggingEnabled&&this.myTags.length<1){_b7=this.collaborativeTags;}me=this;if(dojo.some(_b7,function(_b8){return _b8.name==me.addPrefix(_b5);})){this.numberOfTagsToAdd--;if(!this.publicTagAlreadyAssigned){this.displayInfoMessage(this.bundle.text_error_tag_already_assigned,null,this.informationDiv);this.publicTagAlreadyAssigned=true;}if(_a0.length==1){this._displayTags(com.ibm.widgets.AddTag._tagTypePersonal);}}else{if(_b5.length>50||_b5.length<1){this.numberOfTagsToAdd--;this.displayInfoMessage(this.bundle.text_info_length_of_tag_invalid,null,this.informationDiv);_a1=true;}else{if((this.numberOfTagsAdded+this.myTags.length)>=this.maxPersonalTags){this.numberOfTagsToAdd--;if(!this.maxPersonalPublicTagsReached){this.displayInfoMessage(dojo.string.substitute(this.bundle.text_info_max_number_of_public_tags_reached,[this.maxPersonalTags]),null,this.informationCell);this.maxPersonalPublicTagsReached=true;}_a1=true;}else{this.numberOfTagsAdded++;this.storeTag(_b5,this.isPrivate,this.resource);}}}}},this);dojo.attr(this.tagNameInput,"displayedValue","");}else{_9c=this.privateTagsToDelete;_9d=this.publicTagsToDelete;}if(_9c.length>0&&_a2.length>0){dojo.forEach(_9c,function(_b9){if(dojo.every(_a2,function(_ba){return _ba.name!=_b9.name;})){_9e.push(_b9);}else{_a1=true;}});}else{if(_9d.length>0&&_a2.length>0){dojo.forEach(_9d,function(_bb){if(dojo.every(_a2,function(_bc){return _bc.name!=_bb.name;})){_9f.push(_bb);}else{_a1=true;}});}else{_9e=_9c;_9f=_9d;}}var _bd;var _be=[];dojo.forEach(_a2,function(_bf){_be.push(this._deleteAllUsersTags(_bf.delAllLink,_bf.name));},this);if(_9e.length>0){if(this._tagScope==com.ibm.widgets.AddTag._tagScope_personal_private){dojo.forEach(_9e,function(_c0){_be.push(this.deleteTagByLink(_c0.delLink,com.ibm.widgets.AddTag._tagScope_personal_private));},this);this.numberOfTagsToDelete=_9e.length;}}else{if(_9f.length>0){if(this._tagScope==com.ibm.widgets.AddTag._tagScope_personal_public){dojo.forEach(_9f,function(_c1){_be.push(this.deleteTagByLink(_c1.delLink,com.ibm.widgets.AddTag._tagScope_personal_public));},this);this.numberOfTagsToDelete=_9f.length;}}}if(_be.length>0){_bd=new dojo.DeferredList(_be);_bd.addCallback(dojo.hitch(this,function(){var st=this.getTagStore();st.saveScheme("tm",{onError:this._onSaveErrors,onComplete:this._onSave,scope:this});}));}this._triggerRefresh=_a1;if(this._triggerRefresh){if(this._tagScope==com.ibm.widgets.AddTag._tagScope_personal_public){this.refreshCollaborativeTags();this.refreshMyTags();}else{this.refreshPrivateTags();}}if(this.itemsToSave.length>0){this.getTagStore().saveScheme("tm",{onError:this._onSaveErrors,onComplete:this._onSave,scope:this});}this.privateTagsToDelete=[];this.publicTagsToDelete=[];this.tagSpacesToDelete=[];this.maxPersonalPublicTagsReached=false;this.publicTagAlreadyAssigned=false;this.maxPersonalPrivateTagsReached=false;this.privateTagAlreadyAssigned=false;this.numberOfTagsAdded=0;this.traceExit(m);},storeTag:function(tag){var m="storeTag(tag)";this.traceEntry(m);this.trace(m,"tag : ",[tag]);this.trace(m,"parameters : ",[this.resource,this.resourceCategories]);var _c2;tag=this.addPrefix(tag);if(this.resourceCategories!==null){_c2=this.getTagStore().newItem({scheme:"tm",isPrivate:this.isPrivate,locale:this.locale,tagname:tag,title:tag,resourceURI:this.resource,category:this.resourceCategories});}else{_c2=this.getTagStore().newItem({scheme:"tm",isPrivate:this.isPrivate,locale:this.locale,tagname:tag,title:tag,resourceURI:this.resource});}this.itemsToSave.push(_c2);this.traceExit(m);},refreshCollaborativeTags:function(){var m="refreshCollaborativeTags()";this.traceEntry(m);this._tagData=null;this.isPreventCache=true;this.fetchTags();this._triggerRefresh=false;this.traceExit(m);},refreshMyTags:function(){var m="refreshMyTags()";this.traceEntry(m);this._tagData=null;this.isPreventCache=true;if(!this.isAnonymous){this.fetchMyTags();}this._triggerRefresh=false;this.traceExit(m);},refreshPrivateTags:function(){var m="refreshPrivateTags()";this.traceEntry(m);this._tagData=null;this.isPreventCache=true;if(!this.isAnonymous){this.fetchPrivateTags();}this._triggerRefresh=false;this.traceExit(m);},switchToPrivateView:function(_c3){var m="switchToPrivateView(event)";this.traceEntry(m);this._checkForMessages();if(this._tagScope==com.ibm.widgets.AddTag._tagScope_personal_public){this._tagScope=com.ibm.widgets.AddTag._tagScope_personal_private;if(this.customLabelPersonalPrivateTags!==null){dojo.attr(this.myOrPrivateTagsLabel,"innerHTML",this.customLabelPersonalPrivateTags);dojo.attr(this.myOrPrivateTagDiv,"title",this.customLabelPersonalPrivateTags);}if(ibmPortalCPConfig.operations.canCreatePrivateTags){dojo.style(this.tagsInputLabel,"display","block");dojo.style(this.tagsInput,"display","block");this._setComboboxProperties();if(!this._dapLocalePickerButton&&this.localePickerEnabled){this._createLanguageMenu();}}else{dojo.style(this.tagsInputLabel,"display","none");dojo.style(this.tagsInput,"display","none");if(this._dapLocalePickerButton){this._dapLocalePickerButton.destroy();this._dapLocalePickerButton=null;}}if(this.tagNameInput.attr("value")!==""||this.publicTagsToDelete.length>0){this.displayInfoMessage(this.bundle.text_info_changes_lost,null,this.informationCell);}if(this.tagNameInput){dojo.attr(this.tagNameInput,"displayedValue","");}this.publicTagsToDelete=[];this._dapMyTagsForResource.parentNode.removeChild(this._dapMyTagsForResource);this._dapMyTagsForResource=null;this.fetchPrivateTags();dojo.addClass(this.liTabPrivate,"lotusSelected");dojo.removeClass(this.liTabPublic,"lotusSelected");dojo.attr(this.tabPrivate,"selected","true");dojo.attr(this.tabContent,"aria-labelled-by","tabPrivate");this.tabPublic.removeAttribute("selected");}this.traceExit(m);},switchToPublicView:function(_c4){var m="switchToPublicView(event)";this.traceEntry(m);this._checkForMessages();if(this._tagScope==com.ibm.widgets.AddTag._tagScope_personal_private){this._tagScope=com.ibm.widgets.AddTag._tagScope_personal_public;if(this.customLabelPersonalPublicTags){dojo.attr(this.myOrPrivateTagsLabel,"innerHTML",this.customLabelPersonalPublicTags);dojo.attr(this.myOrPrivateTagDiv,"title",this.customLabelPersonalPublicTags);}if(ibmPortalCPConfig.operations.canCreatePublicTags){dojo.style(this.tagsInputLabel,"display","block");dojo.style(this.tagsInput,"display","block");this._setComboboxProperties();if(!this._dapLocalePickerButton&&this.localePickerEnabled){this._createLanguageMenu();}}else{dojo.style(this.tagsInputLabel,"display","none");dojo.style(this.tagsInput,"display","none");if(this._dapLocalePickerButton){this._dapLocalePickerButton.destroy();this._dapLocalePickerButton=null;}}if(this.tagNameInput.attr("value")!==""||this.privateTagsToDelete.length>0){this.displayInfoMessage(this.bundle.text_info_changes_lost,null,this.informationCell);}if(this.tagNameInput){dojo.attr(this.tagNameInput,"displayedValue","");}this.privateTagsToDelete=[];this._dapPrivateTagsForResource.parentNode.removeChild(this._dapPrivateTagsForResource);this._dapPrivateTagsForResource=null;this.fetchMyTags();dojo.addClass(this.liTabPublic,"lotusSelected");dojo.removeClass(this.liTabPrivate,"lotusSelected");dojo.attr(this.tabPublic,"selected","true");dojo.attr(this.tabContent,"aria-labelled-by","tabPublic");this.tabPrivate.removeAttribute("selected");}this.traceExit(m);},handleValidation:function(_c5){var m="handleValidation(isValid)";this.traceEntry(m);this.trace(m,"isValid: ",[_c5]);if((_c5===false)&&(this.privateTagsToDelete.length===0)&&(this.publicTagsToDelete.length===0)&&(this.tagSpacesToDelete.length===0)){this.submitDialog.disabled=true;this.submitDialog.className="lotusFormButton lotusBtnDisabled trcDisabledButton";}else{if((this.privateTagsToDelete.length>0)||(this.publicTagsToDelete.length>0)||(this.tagSpacesToDelete.length>0)||(_c5===true)){this.submitDialog.disabled=false;this.submitDialog.className="lotusFormButton";}}this.traceExit(m);},errorDisplay:function(err,_c6,_c7){var m="errorDisplay(err, errText, errDetails)";this.traceEntry(m);this.trace(m,"err: ",[err]);this.trace(m,"errText: ",[_c6]);this.trace(m,"errDetails: ",[_c7]);if((err!==null)&&(err.status==401)){top.location.href=document.location.href;}else{dojo.style(this.errorDiv,"display","block");if(_c6&&_c6!==""&&_c6!==null){dojo.attr(this.errorSpan,"innerHTML",_c6);}if(_c7&&_c7!==""&&_c7!==null){dojo.attr(this.errorDetailsSpan,"innerHTML",_c7);}}this.traceExit(m);},handleAnonymousCase:function(){var m="handleAnonymousCase()";this.traceEntry(m);if(!ibmPortalCPConfig.operations.canCreatePublicTags){dojo.destroy(this.editSection);}this.traceExit(m);},displayInfoMessage:function(_c8,_c9,dap){var m="displayInfoMessage(message, messageDetails, dap)";this.traceEntry(m);this.trace(m,"message: ",[_c8]);this.trace(m,"messageDetails: ",[_c9]);this.trace(m,"dap: ",[dap]);var _ca;var _cb;var _cc;if(!this._dapInfoDiv){_ca=dojo.create("div",{role:"status"},dap);dojo.addClass(_ca,"lotusMessage lotusInfo");this._dapInfoDiv=_ca;_cb=dojo.create("img",{src:this.blankImage,alt:this.bundle.title_info},_ca);_cb.style.width="16px";_cb.style.height="16px";dojo.addClass(_cb,"trcInformationIcon");_cc=dojo.create("span",{innerHTML:_c8},_ca);}else{if(this._dapInfoDiv.parentNode!=dap){_ca=dojo.create("div",{role:"status"},dap);dojo.addClass(_ca,"lotusMessage lotusInfo");this._dapInfoDiv=_ca;_cb=dojo.create("img",{src:this.blankImage,alt:this.bundle.title_info},_ca);_cb.style.width="16px";_cb.style.height="16px";dojo.addClass(_cb,"trcInformationIcon");_cc=dojo.create("span",{innerHTML:_c8},_ca);}else{var _cd=dojo.create("span",{innerHTML:_c8},this._dapInfoDiv,"last");}}this.traceExit(m);},_createLanguageMenu:function(){var m="_createLanguageMenu()";this.traceEntry(m);this._loadSupportedLanguages();this.traceExit(m);},_loadSupportedLanguages:function(){var m="_loadSupportedLanguages()";this.traceEntry(m);var _ce=this.getTagStore().fetch({query:{uri:"ll:all"},queryOptions:{preventCache:true},onComplete:dojo.hitch(this,"languagesLoaded"),onError:dojo.hitch(this,"errorDisplay")});this.traceExit(m);},languagesLoaded:function(_cf,_d0){var m="languagesLoaded()";this.traceEntry(m);var _d1="";var _d2=[];if(_cf.length>0){dojo.forEach(_cf,function(_d3){var _d4=this.getTagStore().getValue(_d3,com.ibm.widgets.AddTag._nameAttribute);var _d5=this.getTagStore().getValue(_d3,"locale");var dir=this.getTagStore().getValue(_d3,"dir");var _d6=[];_d6.title=_d4;_d6.locale=_d5;_d6.dir=dir;_d2.push(_d6);},this);}this.trace(m,"supportedLanguages: ",[_d2]);dojo.forEach(_d2,function(_d7){if(_d7.locale==ibmPortalConfig.locale){_d1=_d7.title;}},this);var _d8=new dijit.Menu({style:"display: none;"});var _d9=_d2;dojo.forEach(_d9,function(_da){var _db=new dijit.MenuItem({label:_da.title,name:_da.title,onClick:dojo.hitch(this,"changeLocale",_da.title,_da.locale,_da.dir)});if(_da.locale==ibmPortalConfig.locale){_db.focus();}_d8.addChild(_db);},this);this._dapLocalePickerButton=new dijit.form.DropDownButton({label:_d1,dropDown:_d8,id:"languageSelector"});dojo.attr(this._dapLocalePickerButton.domNode,"title",this.bundle.title_locale_picker+_d1);dojo.place(this._dapLocalePickerButton.domNode,this.localePicker,"last");this.traceExit(m);},changeLocale:function(_dc,_dd,dir){var m="changeLocale(title, locale)";this.traceEntry(m);this.trace(m,"title: ",[_dc]);this.trace(m,"locale: ",[_dd]);this.trace(m,"dir: ",[dir]);dojo.attr(this._dapLocalePickerButton,"label",_dc);dojo.attr(this._dapLocalePickerButton.domNode,"title",this.bundle.title_locale_picker+_dc);this.locale=_dd;this.tagNameInput.setLocalization(_dd,dir);this.traceExit(m);},_onSaveErrors:function(_de,_df){var m="_onSaveErrors(items, error)";this.traceEntry(m);this.trace(m,"items.length: ",[_de.length]);this.trace(m,"error: ",[_df]);if(_de){this.messageDetails="";dojo.forEach(this.itemsToSave,function(_e0){if(_de.hasItem(_e0)){var err=_de.getError(_e0);if(err){if((err.number&&err.number=="http:403")||(err.status&&err.status=="403")){this.numberOfRejectedTags++;if(err.responseText&&(err.responseText!=="")){this.messageDetails+=err.responseText;this.messageDetails+="<br/>";}else{if(err.message&&(err.message!=="")){this.messageDetails+=err.message;this.messageDetails+="<br/>";}}}else{if((err.number&&err.number=="http:409")||(err.status&&err.status=="409")){this.numberOfDuplicateTags++;}else{this.errorDisplay(err,err.message,err.responseText);}}this.numberOfTagsToAdd--;}}},this);}this._onSave([],null);this.itemsToSave=[];this.traceExit(m);},_onSave:function(_e1,_e2){var m="_onSave(items, request)";this.traceEntry(m);this.trace(m,"items.length: ",[_e1.length]);if(this.numberOfRejectedTags>0){this.displayInfoMessage(dojo.string.substitute(this.bundle.text_error_tags_rejected,[this.numberOfRejectedTags]),this.messageDetails,this.informationDiv);}if(this.numberOfDuplicateTags>0){this.displayInfoMessage(this.bundle.text_error_tag_already_assigned,null,this.informationDiv);}var msg;if(this.numberOfTagsToAdd!==0&&this.numberOfTagsToAdd&&this.numberOfTagsToDelete!==0&&this.numberOfTagsToDelete){msg=this.bundle.text_success_changes_stored_successfully+this.numberOfTagsToAdd+this.bundle.text_tags_saved+", "+this.numberOfTagsToDelete+this.bundle.text_tags_deleted;}else{if(this.numberOfTagsToAdd!==0&&this.numberOfTagsToAdd){msg=this.bundle.text_success_changes_stored_successfully+this.numberOfTagsToAdd+this.bundle.text_tags_saved;}else{if(this.numberOfTagsToDelete!==0&&this.numberOfTagsToDelete){msg=this.bundle.text_success_changes_stored_successfully+this.numberOfTagsToDelete+this.bundle.text_tags_deleted;}else{if(this._tagSpacesDeleted){msg=this.bundle.text_all_tags_deleted;}else{msg="";}}}}if(this._tagScope==com.ibm.widgets.AddTag._tagScope_personal_private){this.refreshPrivateTags();}else{this.refreshCollaborativeTags();this.refreshMyTags();}if(this._tagSpacesDeleted){this.refreshCollaborativeTags();}if((!this._dapSuccessDiv||!this._dapSuccessDiv)&&(msg!=="")){var _e3=dojo.create("div",{id:"successDiv",role:"status"},this.successMessageDiv);dojo.addClass(_e3,"lotusMessage lotusConfirm");this._dapSuccessDiv=_e3;var _e4=dojo.create("img",{src:this.blankImage,alt:this.bundle.title_confirmation},_e3);_e4.style.width="16px";_e4.style.height="16px";dojo.addClass(_e4,"trcConfirmationIcon");var _e5=dojo.create("span",{innerHTML:msg},_e3);}this.numberOfTagsToAdd=0;this.numberOfTagsToDelete=0;this.handleValidation(false);this.numberOfRejectedTags=0;this._tagSpacesDeleted=false;dojo.publish(this.tagsChangedEventID,[{scope:this._tagScope}]);this.itemsToSave=[];this.traceExit(m);},_cleanArray:function(_e6){var m="_cleanArray(originalTagNames)";this.traceEntry(m);this.trace(m,"originalTagNames: ",[_e6]);var _e7=[];dojo.forEach(_e6,function(_e8){if(_e8){dojo.string.trim(_e8);_e7.push(_e8);}},this);this.traceExit(m);return _e7;},_checkForMessages:function(){var m="_checkForMessages()";this.traceEntry(m);if(this.errorDiv.style.display=="block"){this.errorDiv.style.display="none";}if(this._dapSuccessDiv){dojo.fadeOut({node:this._dapSuccessDiv,duration:this.messageFadeOutDuration,onEnd:dojo.hitch(this,function(){dojo.destroy(this._dapSuccessDiv);this._dapSuccessDiv=null;})}).play();}if(this._dapInfoDiv){dojo.fadeOut({node:this._dapInfoDiv,duration:this.messageFadeOutDuration,onEnd:dojo.hitch(this,function(){dojo.destroy(this._dapInfoDiv);this._dapInfoDiv=null;})}).play();}this.traceExit(m);},_setComboboxProperties:function(){var m="_setComboboxProperties()";this.traceEntry(m);dojo.connect(this.tagNameInput,"onKeyDown",dojo.hitch(this,"_checkForMessages"));dojo.connect(this.tagNameInput,"onClick",dojo.hitch(this,"_checkForMessages"));dojo.connect(this.tagNameInput.domNode,"onkeyup",dojo.hitch(this,"_checkKeySubmit"));this.tagNameInput.parentWidget=this.parentWidget;this.tagNameInput.domNode.title=this.bundle.title_input_tag_names;dojo.attr(this.tagNameInput,"title",this.tagNameInput.domNode.title);this.tagNameInput.validationCallback=function(_e9){this.parentWidget.handleValidation(_e9);};this.tagNameInput.regExp=this.validationRegex;this.tagNameInput.prefix=this.prefix;this.tagNameInput.typeAheadFetchURL=ibmPortalConfig.contentHandlerURI+"?uri=tos:typeahead&term=${searchTerm}";if(this.prefix!==""){this.tagNameInput.typeAheadFetchURL+="&prefix="+this.prefix;}if(this.typeaheadSearchPattern!==null){this.tagNameInput.typeAheadFetchURL+="&pattern="+this.typeaheadSearchPattern;}this.traceExit(m);},_determineResourceType:function(){var m="_determineResourceType()";this.traceEntry(m);this.trace(m,"resourceType: ",[this.resourceType]);switch(this.resourceType){case com.ibm.widgets.AddTag._RESOURCE_TYPE_CONTENT_NODE:this.resourceSchema=com.ibm.widgets.AddTag._navigationModelSchema;this.resource=com.ibm.widgets.AddTag._resourceModelSchema+this.resourceSchema+this.resourceID;break;case com.ibm.widgets.AddTag._RESOURCE_TYPE_NAVIGATION_NODE:this.resourceSchema=com.ibm.widgets.AddTag._portletModelSchema;this.resource=com.ibm.widgets.AddTag._resourceModelSchema+this.resourceSchema+this.resourceID;break;default:this.resource=com.ibm.widgets.AddTag._resourceModelSchema+this.resourceID;break;}this.traceExit(m);},_checkKeySubmit:function(_ea){var m="_checkKeySubmit(event)";this.traceEntry(m);if(_ea.keyCode==dojo.keys.ENTER){if(!this.submitDialog.disabled){var _eb=this.tagNameInput.attr("value");this.handleCreatesAndDeletes(_ea,_eb);}}this.traceExit(m);},_cleanArrayFromDuplicates:function(_ec){var _ed={};return dojo.filter(_ec,function(_ee){if(!_ed[_ee]){_ed[_ee]=true;return true;}return false;}).sort();},_determineTabDisplay:function(){var m="_determineTabDisplay()";this.traceEntry(m);if(this.resourcePrivate){dojo.style(this.liTabPublic,"display","none");this.tabPrivate.title=this.bundle.button_private;dojo.style(this.tagsInputLabel,"display","block");dojo.style(this.tagsInput,"display","block");dojo.addClass(this.liTabPrivate,"lotusSelected");dojo.removeClass(this.liTabPublic,"lotusSelected");dojo.attr(this.tabPrivate,"selected","true");this.tabPublic.removeAttribute("selected");dojo.removeAttr(this.tabContent,"aria-labelledby");dojo.attr(this.tabContent,"aria-labelledby","tabPrivate");this._setComboboxProperties();if(this.localePickerEnabled){this._createLanguageMenu();}}else{if(ibmPortalCPConfig.operations.canCreatePublicTags){this._setComboboxProperties();if(this.localePickerEnabled){this._createLanguageMenu();}}else{dojo.style(this.tagsInputLabel,"display","none");dojo.style(this.tagsInput,"display","none");}}if(!this.privateTaggingEnabled){dojo.style(this.liTabPrivate,"display","none");}if(this.defaultView==com.ibm.widgets.AddTag._viewPrivate&&this.liTabPrivate.style.display!="none"){dojo.addClass(this.liTabPrivate,"lotusSelected");dojo.removeClass(this.liTabPublic,"lotusSelected");dojo.attr(this.tabPrivate,"selected","true");this.tabPublic.removeAttribute("selected");dojo.attr(this.tabContent,"aria-labelledby","tabPrivate");}else{if(this.defaultView==com.ibm.widgets.AddTag._viewPublic&&this.liTabPublic.style.display!="none"){dojo.addClass(this.liTabPublic,"lotusSelected");dojo.removeClass(this.liTabPrivate,"lotusSelected");dojo.attr(this.tabPublic,"selected","true");this.tabPrivate.removeAttribute("selected");dojo.attr(this.tabContent,"aria-labelledby","tabPublic");}}if(!this.displayTabs){dojo.style(this.liTabPublic,"display","none");dojo.style(this.liTabPrivate,"display","none");}if(!this.mineTaggingEnabled){dojo.style(this.myOrPrivateTags,"display","none");}this.traceExit(m);},_displayLoading:function(_ef){var m="_displayLoading(tagType)";this.traceEntry(m);this.trace(m,"tagType: ",[_ef]);if(_ef==com.ibm.widgets.AddTag._tagTypePersonal){dojo.style(this.personalLoadingDiv,"display","block");dojo.style(this.myOrPrivateTagDiv,"display","none");}else{dojo.style(this.loadingDiv,"display","block");dojo.style(this.tagDiv,"display","none");}this.traceExit(m);},_displayTags:function(_f0){var m="_displayTags(tagType)";this.traceEntry(m);this.trace(m,"tagType: ",[_f0]);if(_f0==com.ibm.widgets.AddTag._tagTypePersonal){dojo.style(this.personalLoadingDiv,"display","none");dojo.style(this.myOrPrivateTagDiv,"display","block");}else{dojo.style(this.loadingDiv,"display","none");dojo.style(this.tagDiv,"display","block");}this.traceExit(m);},_initializeEvents:function(){var m="_initializeEvents()";this.traceEntry(m);this.submitDialog.onclick=dojo.hitch(this,function(){this.handleCreatesAndDeletes();return false;});this.onCancel=this.closeButtonNode.onclick=this.dialogCancel.onclick=dojo.hitch(this,function(){this.cancelTags();return false;});this.tabPublic.onclick=dojo.hitch(this,function(){this.switchToPublicView();return false;});this.tabPrivate.onclick=dojo.hitch(this,function(){this.switchToPrivateView();return false;});this.traceExit(m);},_initializeWidget:function(){var m="_initializeEvents()";this.traceEntry(m);this._determineTabDisplay();this.handleValidation(false);this._initializeEvents();dojo.attr(this.titleNode,"innerHTML",dojo.string.substitute(this.bundle.text_tag,[com.ibm.domUtilities.encodeXML(this.resourceTitle)]));this._determineResourceType();this.fetchTags();if(!this.isAnonymous&&!this.resourcePrivate&&this.defaultView!=com.ibm.widgets.AddTag._viewPrivate){this.fetchMyTags();}else{if(this.resourcePrivate||this.defaultView==com.ibm.widgets.AddTag._viewPrivate){this.fetchPrivateTags();}}this.privateTagsToDelete=[];this.publicTagsToDelete=[];this.tagSpacesToDelete=[];this.traceExit(m);},_initializeParameters:function(){var m="_initializeParameters()";this.traceEntry(m);this.trace(m,"this.params",this.params);if(!("validationRegex" in this.params)){if(ibmPortalCPConfig.tagging.validation.validationRegex!==null&&typeof ibmPortalCPConfig.tagging.validation.validationRegex!=="undefined"){this.validationRegex=ibmPortalCPConfig.tagging.validation.validationRegex;}else{this.validationRegex=com.ibm.widgets.AddTag._validationRegex;}}if(!("orderMetric" in this.params)){if(ibmPortalCPConfig.tagging.dialog.orderMetric!==null&&typeof ibmPortalCPConfig.tagging.dialog.orderMetric!=="undefined"){this.orderMetric=ibmPortalCPConfig.tagging.dialog.orderMetric;}else{this.orderMetric=com.ibm.widgets.AddTag._orderMetric;}}if(!("order" in this.params)){if(ibmPortalCPConfig.tagging.dialog.order!==null&&typeof ibmPortalCPConfig.tagging.dialog.order!=="undefined"){this.order=ibmPortalCPConfig.tagging.dialog.order;}else{this.order=com.ibm.widgets.AddTag._order;}}if(!("messageFadeOutDuration" in this.params)){if(ibmPortalCPConfig.tagging.dialog.messageFadeOutDuration!==null&&typeof ibmPortalCPConfig.tagging.dialog.messageFadeOutDuration!=="undefined"){this.messageFadeOutDuration=ibmPortalCPConfig.tagging.dialog.messageFadeOutDuration;}else{this.messageFadeOutDuration=com.ibm.widgets.AddTag._messageFadeOutDuration;}}if(!("resolver" in this.params)){this.tagStore=ibmPortalConfig.resolver;}if(!("maxCommunityTags" in this.params)){if(ibmPortalCPConfig.tagging.dialog.maxCommunityTags!==null&&typeof ibmPortalCPConfig.tagging.dialog.maxCommunityTags!=="undefined"){this.maxCommunityTags=ibmPortalCPConfig.tagging.dialog.maxCommunityTags;}else{this.maxCommunityTags=com.ibm.widgets.AddTag._maxCommunityTags;}}if(!("maxPersonalTags" in this.params)){if(ibmPortalCPConfig.tagging.dialog.maxPersonalTags!==null&&typeof ibmPortalCPConfig.tagging.dialog.maxPersonalTags!=="undefined"){this.maxPersonalTags=ibmPortalCPConfig.tagging.dialog.maxPersonalTags;}else{this.maxPersonalTags=com.ibm.widgets.AddTag._maxPersonalTags;}}if(!("defaultView" in this.params)){if(ibmPortalCPConfig.tagging.dialog.defaultView!==null&&typeof ibmPortalCPConfig.tagging.dialog.defaultView!=="undefined"){this.defaultView=ibmPortalCPConfig.tagging.dialog.defaultView;}else{this.defaultView=com.ibm.widgets.AddTag._viewPublic;}}if(!("deletingEnabled" in this.params)){if(ibmPortalCPConfig.tagging.dialog.deletingEnabled!==null&&typeof ibmPortalCPConfig.tagging.dialog.deletingEnabled!=="undefined"){this.deletingEnabled=ibmPortalCPConfig.tagging.dialog.deletingEnabled;}else{this.deletingEnabled=com.ibm.widgets.AddTag._deletingEnabled;}}if(!("countsEnabled" in this.params)){if(ibmPortalCPConfig.tagging.dialog.countsEnabled!==null&&typeof ibmPortalCPConfig.tagging.dialog.countsEnabled!=="undefined"){this.countsEnabled=ibmPortalCPConfig.tagging.dialog.countsEnabled;}else{this.countsEnabled=com.ibm.widgets.AddTag._countsEnabled;}}if(!("customLabelCommunityTags" in this.params)){if(ibmPortalCPConfig.tagging.dialog.customLabelCommunityTags!==null&&typeof ibmPortalCPConfig.tagging.dialog.customLabelCommunityTags!=="undefined"){this.customLabelCommunityTags=ibmPortalCPConfig.tagging.dialog.customLabelCommunityTags;}else{this.customLabelCommunityTags=null;}}if(!("customLabelPersonalPublicTags" in this.params)){if(ibmPortalCPConfig.tagging.dialog.customLabelPersonalPublicTags!==null&&typeof ibmPortalCPConfig.tagging.dialog.customLabelPersonalPublicTags!=="undefined"){this.customLabelPersonalPublicTags=ibmPortalCPConfig.tagging.dialog.customLabelPersonalPublicTags;}else{this.customLabelPersonalPublicTags=null;}}if(!("customLabelPersonalPrivateTags" in this.params)){if(ibmPortalCPConfig.tagging.dialog.customLabelPersonalPrivateTags!==null&&typeof ibmPortalCPConfig.tagging.dialog.customLabelPersonalPrivateTags!=="undefined"){this.customLabelPersonalPrivateTags=ibmPortalCPConfig.tagging.dialog.customLabelPersonalPrivateTags;}else{this.customLabelPersonalPrivateTags=null;}}if(!("customLabelAddTags" in this.params)){if(ibmPortalCPConfig.tagging.dialog.customLabelAddTags!==null&&typeof ibmPortalCPConfig.tagging.dialog.customLabelAddTags!=="undefined"){this.customLabelAddTags=ibmPortalCPConfig.tagging.dialog.customLabelAddTags;}else{this.customLabelAddTags=null;}}if(!("privateTaggingEnabled" in this.params)){if(ibmPortalCPConfig.tagging.dialog.privateTaggingEnabled!==null&&ibmPortalCPConfig.tagging.dialog.privateTaggingEnabled!=="undefined"){this.privateTaggingEnabled=ibmPortalCPConfig.tagging.dialog.privateTaggingEnabled;}else{this.privateTaggingEnabled=com.ibm.widgets.AddTag._privateTaggingEnabled;}}if(!("displayTabs" in this.params)){if(ibmPortalCPConfig.tagging.dialog.displayTabs!==null&&ibmPortalCPConfig.tagging.dialog.displayTabs!=="undefined"){this.displayTabs=ibmPortalCPConfig.tagging.dialog.displayTabs;}else{this.displayTabs=com.ibm.widgets.AddTag._displayTabs;}}if(!("localePickerEnabled" in this.params)){if(ibmPortalCPConfig.tagging.dialog.localePickerEnabled!==null&&ibmPortalCPConfig.tagging.dialog.localePickerEnabled!=="undefined"){this.localePickerEnabled=ibmPortalCPConfig.tagging.dialog.localePickerEnabled;}else{this.localePickerEnabled=com.ibm.widgets.AddTag._localePickerEnabled;}}if(!("customMessageNoCommunityTags" in this.params)){if(ibmPortalCPConfig.tagging.dialog.customMessageNoCommunityTags!==null&&ibmPortalCPConfig.tagging.dialog.customMessageNoCommunityTags!=="undefined"){this.customMessageNoCommunityTags=ibmPortalCPConfig.tagging.dialog.customMessageNoCommunityTags;}else{this.customMessageNoCommunityTags=null;}}if(!("customMessageNoPersonalTags" in this.params)){if(ibmPortalCPConfig.tagging.dialog.customMessageNoPersonalTags!==null&&ibmPortalCPConfig.tagging.dialog.customMessageNoPersonalTags!=="undefined"){this.customMessageNoPersonalTags=ibmPortalCPConfig.tagging.dialog.customMessageNoPersonalTags;}else{this.customMessageNoPersonalTags=null;}}if(!("typeaheadSearchPattern" in this.params)){if(ibmPortalCPConfig.tagging.dialog.typeaheadSearchPattern!==null&&ibmPortalCPConfig.tagging.dialog.typeaheadSearchPattern!=="undefined"){this.typeaheadSearchPattern=ibmPortalCPConfig.tagging.dialog.typeaheadSearchPattern;}else{this.typeaheadSearchPattern=null;}}this.traceExit(m);},_deleteAllUsersTags:function(_f1,_f2){var m="_deleteAllUsersTags(deleteURL, tagName)";this.traceEntry(m);this.trace(m,"deleteURL: ",[_f1]);this.trace(m,"tagName: ",[_f2]);this._tagSpacesDeleted=true;this._deletedTagSpaceName=_f2;var def=new dojo.Deferred();def.addCallback(dojo.hitch(this,function(_f3,_f4){this.deleteTagsInStore(_f3,_f4);}));callback=dojo.hitch(this,function(_f5,_f6){def.callback(_f5,_f6);});this.tagStore.fetch({query:this.tagStore.urlToQuery(_f1,"tm"),queryOptions:{preventCache:true,bypassBatch:true},onComplete:callback,onError:null,scope:this});this.traceExit(m);return def;},_findOrCreateLotusUIDIV:function(){var m="_findOrCreateLotusUIDIV()";if(this._isTracing){this.traceEntry(m);}var _f7=dojo.byId(this.lotusui_id);if(!_f7){_f7=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class,"wairole":"region","role":"region"},dojo.body());}dijit.setWaiState(_f7,"labelledby",this.id+"_titleNode");this._lotusui_div=_f7;if(this._isTracing){this.traceExit(m,_f7);}return _f7;},_removeLotusOneUIDiv:function(){if(this._lotusui_div){var _f8=dojo.query("*",this._lotusui_div);if(_f8.length===0){dojo.destroy(this._lotusui_div);this._lotusui_div=null;}}},addPrefix:function(_f9){var _fa=_f9;if(this.prefix!==""){_fa=this.prefix+_f9;}return _fa;},removePrefix:function(_fb){var _fc=_fb;if(this.prefix!==""){_fc=_fb.slice(this.prefix.length,_fb.length);}return _fc;},_setContainerNodeMaxHeight:function(){var _fd=Math.round(dijit.getViewport().h*0.8);var _fe=dojo.marginBox(this.titleBar).h;var _ff=dojo.marginBox(this.dialogFooter).h;var _100=_fd-_fe-_ff-10;if(_100<150){_100=150;}dojo.style(this.containerNode,"maxHeight",_100+"px");},_getFocusItems:function(_101){var _102=this.containerNode;this.containerNode=_101;this.inherited(arguments);this.containerNode=_102;}});com.ibm.widgets.AddTag._nameAttribute="title";com.ibm.widgets.AddTag._preferredLocaleAttribute="preferredLocale";com.ibm.widgets.AddTag._preferredLocaleDirAttribute="preferredLocaleDir";com.ibm.widgets.AddTag._countAttribute="count";com.ibm.widgets.AddTag._deleteLinkAttribute="deleteLink";com.ibm.widgets.AddTag._deleteAllLinkAttribute="deleteAllLink";com.ibm.widgets.AddTag._resourceModelSchema="rm:";com.ibm.widgets.AddTag._portletModelSchema="pm:oid:";com.ibm.widgets.AddTag._navigationModelSchema="nm:oid:";com.ibm.widgets.AddTag._cpUserModelSchema="cpum:oid:";com.ibm.widgets.AddTag._tagSpaceEmptyURI="tm:ts:empty";com.ibm.widgets.AddTag._tagTypePersonal="personal";com.ibm.widgets.AddTag._viewPrivate="PRIVATE";com.ibm.widgets.AddTag._viewPublic="PUBLIC";com.ibm.widgets.AddTag._tagScope_community="community";com.ibm.widgets.AddTag._tagScope_personal_public="personal_public";com.ibm.widgets.AddTag._tagScope_personal_private="personal_private";com.ibm.widgets.AddTag._tagScope_community_plus_personal_public=["personal_public","community"];com.ibm.widgets.AddTag._validationRegex="[^<\\>()[]:]{1,255}";com.ibm.widgets.AddTag._orderMetric="tag_space_count_reverse_name";com.ibm.widgets.AddTag._order="DESC";com.ibm.widgets.AddTag._messageFadeOutDuration=1000;com.ibm.widgets.AddTag._maxCommunityTags=50;com.ibm.widgets.AddTag._maxPersonalTags=50;com.ibm.widgets.AddTag._deletingEnabled=true;com.ibm.widgets.AddTag._countsEnabled=false;com.ibm.widgets.AddTag._privateTaggingEnabled=true;com.ibm.widgets.AddTag._displayTabs=true;com.ibm.widgets.AddTag._localePickerEnabled=true;com.ibm.widgets.AddTag._parameterMap_Key_RenderMode="renderMode";com.ibm.widgets.AddTag._parameterMap_Value_RenderMode_WSRP="wsrp";com.ibm.widgets.AddTag._RESOURCE_TYPE_CONTENT_NODE="CONTENT_NODE";com.ibm.widgets.AddTag._RESOURCE_TYPE_NAVIGATION_NODE="NAVIGATION_NODE";}if(!dojo._hasResource["com.ibm.widgets.AddRatingChart"]){dojo._hasResource["com.ibm.widgets.AddRatingChart"]=true;dojo.provide("com.ibm.widgets.AddRatingChart");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.widgets.AddRatingChart",[dijit._Widget,dijit._Templated,com.ibm.widgets._Traceable],{blankImgUrl:dojo.moduleUrl("dojo","resources/blank.gif").toString(),bIsTracing:false,_starCount:5,values:[],max:0,sizes:[],txts:[],titles:[],hiddenImgs:[],bundle:null,LTR:"LTR",RTL:"RTL",bidi:null,fillSymbols:"++++++++++",emptySymbols:"----------",templateString:"<table class='lotusVertTable' border='0' summary='${bundle.title_community_rating_distribution}' id='ratingDistributionWidget' name='ratingDistributionWidget' dojoAttachPoint='ratingDistributionTable'>"+"<tbody id='ratingDistributionTableBody' dojoAttachPoint='ratingDistributionTableBody'></tbody></table>",constructor:function(){this.inherited("constructor","com.ibm.widgets.AddRatingChart");this.bIsTracing=this.isTracing();this.bundle=dojo.i18n.getLocalization("com.ibm.widgets","AddRating");if(this.bidi===null){if(this.isLeftToRight()){this.bidi=this.LTR;}else{this.bidi=this.RTL;}}this._starCount=ibmPortalCPConfig.rating.dialog.numStars;},initializeTable:function(){var m="initializeTable()";if(this.bIsTracing){this.traceEntry(m);}var tr;var th;var td;var span;var _103;var img;if(this.bIsTracing){this.trace(m,"this._starCount",this._starCount);}for(var i=this._starCount-1;i>=0;i--){tr=dojo.doc.createElement("tr");th=dojo.doc.createElement("th");dojo.attr(th,"scope","row");th.innerHTML=dojo.string.substitute(this.bundle.text_stars_count,[(i+1)]);dojo.place(th,tr,"last");td=dojo.doc.createElement("td");img=dojo.doc.createElement("img");dojo.attr(img,"src",this.blankImgUrl);dojo.place(img,td,"first");this.hiddenImgs[i]=img;span=dojo.doc.createElement("span");dojo.attr(span,"class","trcRatingDistributionEmptyBar");dojo.place(span,td,"last");this.titles[i]=span;_103=dojo.doc.createElement("span");dojo.attr(_103,"class","trcRatingDistributionEmptyFillBar");dojo.place(_103,span,"last");this.sizes[i]=_103;dojo.place(td,tr,"last");hcmSpan=dojo.doc.createElement("span");dojo.attr(hcmSpan,"class","trcRatingDistributionText");dojo.place(hcmSpan,_103,"last");td=dojo.doc.createElement("td");dojo.place(dojo.doc.createTextNode("("),td,"last");span=dojo.doc.createElement("span");this.txts[i]=span;dojo.place(span,td,"last");dojo.place(dojo.doc.createTextNode(")"),td,"last");dojo.place(td,tr,"last");dojo.place(tr,this.ratingDistributionTableBody,"last");}if(this.bIsTracing){this.traceExit(m);}},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}this.inherited(arguments);this.initializeTable();this.update();if(this.bIsTracing){this.traceExit(m);}},update:function(_104){var m="update(array)";if(this.bIsTracing){this.traceEntry(m,_104);}this.max=0;if(_104){this.values=_104;}var i;for(i=0;i<this._starCount;i++){if(this.max<this.values[i]){this.max=this.values[i];}}if(this.bIsTracing){this.trace(m,"this.max",this.max);}if(this.max===0){this.max=1;}if(this.bIsTracing){this.trace(m,"this.max",this.max);}for(i=0;i<this._starCount;i++){dojo.query(this.sizes[i]).forEach(function(node,_105,arr){var _106=this.values[i]/this.max*100;if(this.bIsTracing){this.trace(m,"currentRatingDistributionValue",_106);}dojo.style(node,"width",_106+"%");if(this.bidi==this.RTL){dojo.style(node,"float","right");}var _107=dojo.number.round(_106/10);if(this.bIsTracing){this.trace(m,"roundedCurrentRatingDistributionValue",_107);}node.childNodes[0].innerHTML=this.fillSymbols.substring(0,_107)+this.emptySymbols.substring(_107,10);},this);this.txts[i].innerHTML=this.values[i];dojo.attr(this.titles[i],"title",dojo.string.substitute(this.bundle.title_rating_distribution,[this.values[i],(i+1)]));dojo.attr(this.hiddenImgs[i],"alt",dojo.string.substitute(this.bundle.title_rating_distribution,[this.values[i],(i+1)]));}if(this.bIsTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.widgets.Rating"]){dojo._hasResource["com.ibm.widgets.Rating"]=true;dojo.provide("com.ibm.widgets.Rating");dojo.require("dojo.string");dojo.require("dojo.number");dojo.require("dijit.form._FormWidget");dojo.declare("com.ibm.widgets.Rating",[dijit.form._FormWidget],{templateString:null,LTR:"ltr",RTL:"rtl",numStars:5,value:0,bidi:null,hoverable:true,clickable:true,halfStarSupport:false,titleText:"",_MODE_HOVER:"HOVER",_MODE_CHECK:"CHECK",_mode:"HOVER",_dijitInline:"dijitInline",_focused:"Focused",_dijitFocused:"dijitFocused",_onChange:null,_ratingContainer:"trcRatingContainer",_ratingStar:"trcRatingStar",_ratingStarHovered:"trcRatingStarHover",_ratingStarChecked:"trcRatingStarChecked",_ratingStarLeftHalfChecked:"trcRatingStarLeftHalfChecked",_ratingStarRightHalfChecked:"trcRatingStarRightHalfChecked",_ratingStarWidth:15,_ratingStarHeight:15,_ratingStarText:"trcRatingStarText",_ratingStarText_Symbol:"o",_ratingStarText_HoveredSymbol:"x",_ratingStarText_CheckedSymbol:"*",_ratingNoValueTitleText:"",_ratingValueTitleTemplate:"",constructor:function(_108){dojo.mixin(this,_108);if(this.bidi===null){if(this.isLeftToRight()){this.bidi=this.LTR;}else{this.bidi=this.RTL;}}if(_108&&(typeof _108.ratingNoValueTitleText==="string")){this._ratingNoValueTitleText=_108.ratingNoValueTitleText;}if(_108&&(typeof _108.ratingValueTitleTemplate==="string")){this._ratingValueTitleTemplate=_108.ratingValueTitleTemplate;}if(_108&&(dojo.isFunction(_108.onChange))){this._onChange=_108.onChange;}var _109=this.numStars*this._ratingStarWidth;var _10a="<div class=\""+this._ratingContainer+" dijitInline dijitFocused Focused\" role=\"slider\" aria-disabled=\"${readonly}\" aria-valuenow=\"${value}\" aria-valuemin=\"0\" aria-valuemax=\"${numStars}\" aria-valuetext=\""+this._ratingNoValueTitleText+"\" dojoAttachPoint=\"focusNode\" widgetid=\"trcRatingWidget\"><ul style=\"width:"+_109+"px\">${stars}</ul></div>";var _10b="<li class=\""+this._ratingStar+" dijitInline\" dojoAttachEvent=\"onclick:onStarClick, onmouseover:_onMouseOver, onmouseout:_onMouseOut\" value=\"${value}\"><span class=\""+this._ratingStarText+"\" dojoAttachEvent=\"onclick:onStarClick, onmouseover:_onMouseOver, onmouseout:_onMouseOut\" value=\"${value}\">"+this._ratingStarText_Symbol+"</span></li>";var _10c="";for(var star=1;star<=this.numStars;star++){_10c+=dojo.string.substitute(_10b,{value:star});}this.templateString=dojo.string.substitute(_10a,{stars:_10c,value:this.value,numStars:this.numStars,readonly:!this.clickable});},postCreate:function(){this.inherited(arguments);this._updateStars(this.value,this._MODE_CHECK);},_onMouseOver:function(_10d){if(this.hoverable){var _10e=_10d.target;var _10f=_10e.getAttribute("value");this._updateStars(_10f,this._MODE_HOVER);}},_onMouseOut:function(_110){if(this.hoverable){dojo.query("."+this._ratingStarHovered,this.domNode).forEach(function(node,_111,arr){dojo.removeClass(node,this._ratingStarHovered);},this);this._updateStars(this.value,this._MODE_CHECK);}},onStarClick:function(_112){if(this.clickable){var _113=_112.target;var _114=_113.getAttribute("value");this.setAttribute("value",_114);}},setAttribute:function(key,_115){if(key=="value"){this.value=_115;this._updateStars(_115,this._MODE_CHECK);dijit.setWaiState(this.domNode,"valuenow",_115);if(_115===0){dijit.setWaiState(this.domNode,"valuetext",this._ratingNoValueTitleText);}else{dijit.setWaiState(this.domNode,"valuetext",dojo.string.substitute(this._ratingValueTitleTemplate,[(Math.round(_115*100)/100),this.numStars]));}if(this._onChange&&dojo.isFunction(this._onChange)){this._onChange(this,this.value);}}else{if(key=="bidi"){this.bidi=_115;this._updateStars(this.value,this._MODE_CHECK);}else{if(key=="hoverable"){this.hoverable=_115;}else{if(key=="clickable"){this.clickable=_115;}else{if(key=="halfStarSupport"){this.halfStarSupport=_115;this._updateStars(this.value,this._MODE_CHECK);}}}}}},_updateStars:function(_116,mode){var _117=this._roundStars(_116);var _118=null;if(mode==this._MODE_HOVER){_118=this._ratingStarHovered;}else{if(mode==this._MODE_CHECK){_118=this._ratingStarChecked;}}var _119=this._ratingStarText_Symbol;if(mode==this._MODE_HOVER){_119=this._ratingStarText_HoveredSymbol;}else{if(mode==this._MODE_CHECK){_119=this._ratingStarText_CheckedSymbol;}}dojo.query("."+this._ratingStar,this.domNode).forEach(function(node,_11a,arr){dojo.removeClass(node,this._ratingStarHovered);dojo.removeClass(node,this._ratingStarChecked);dojo.removeClass(node,this._ratingStarLeftHalfChecked);dojo.removeClass(node,this._ratingStarRightHalfChecked);node.childNodes[0].innerHTML=this._ratingStarText_Symbol;var _11b=node.value;if(_11b<=_117){dojo.addClass(node,_118);node.childNodes[0].innerHTML=_119;}else{if(this.halfStarSupport){if(_11b-_117==0.5){if(this.bidi==this.LTR){dojo.addClass(node,this._ratingStarLeftHalfChecked);}else{dojo.addClass(node,this._ratingStarRightHalfChecked);}node.childNodes[0].innerHTML=_119;}}}},this);},_roundStars:function(_11c){if(this.halfStarSupport){return dojo.number.round(_11c,0,5);}else{return dojo.number.round(_11c);}}});}if(!dojo._hasResource["com.ibm.widgets.AddRating"]){dojo._hasResource["com.ibm.widgets.AddRating"]=true;dojo.provide("com.ibm.widgets.AddRating");dojo.require("dojo.fx");dojo.require("dojo.i18n");dojo.require("dijit.Dialog");dojo.declare("com.ibm.widgets.AddRating",[dijit.Dialog,com.ibm.widgets._Traceable],{portal8ThemeUniqueName:"ibm.portal.80Theme",lotusui_id:"dijitDialog_lotusui30_RatingDlg_container",lotusui_class:"lotusui30",_lotusui_div:null,widgetsInTemplate:true,bIsTracing:false,resourceID:"",resourceTitle:"",resourceType:"",resourceCategories:null,resourcePrivate:false,messageFadeOutDuration:1000,numStars:5,defaultView:"PUBLIC",deletingEnabled:true,customLabelCommunityRatings:"",customLabelPersonalPublicRatings:"",customLabelPersonalPrivateRatings:"",privateRatingEnabled:true,mineRatingEnabled:true,displayTabs:true,genericParameterMap:null,resourceSchema:"",resource:null,ratingValue:"",currentIsMineRating:null,currentPrivateRating:null,newIsMineRating:null,newPrivateRating:null,currentAnonymousRating:null,newAnonymousRating:null,myChart:null,isAnonymous:false,isPreventCache:false,_checkDialog:null,isPrivate:false,ratingStore:null,ratingData:null,ratingsChangedEventID:"",ratingsChangedEvent:"ratingsChanged",_ratingScope:"community",_actionAddIsMineRating:false,_actionAddPrivateRating:false,_actionUpdateIsMineRating:false,_actionUpdatePrivateRating:false,_actionDeletePrivateRating:false,_actionDeleteIsMineRating:false,_actionAddAnonymousRating:false,_actionDeleteAllRatingsOfResource:false,_dapCollaborativeRatingDiv:null,_dapIsMineRatingDiv:null,_dapPrivateRatingDiv:null,_dapSuccessDiv:null,_dapInfoDiv:null,_dapChartDiv:null,_deleteAllLink:null,connectionHandlers:[],connectionHandlersPrivate:[],templateString:null,templateString:"<div class=\"lotusDialogBorder lotusui\" waistate=\"labelledby-${id}_titleNode\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}_titleNode\" dojoAttachPoint=\"addTagDiv\" style=\"max-width: none; max-height: none;\">\n <div class=\"lotusDialog trc trcRating trcDialog trcDialogRating\">\n <div class=\"lotusDialogHeader\" dojoAttachPoint=\"titleBar\">\n <h1 class=\"lotusHeading\" dojoAttachPoint=\"headerNode\">\n <span dojoAttachPoint=\"titleNode\" id=\"${id}_titleNode\"></span>\n </h1>\n \n <a dojoAttachPoint=\"closeButtonNode\" role=\"button\" aria-label=\"${bundle.title_close_widget}\" href=\"javascript:void(0);\" class=\"lotusDialogClose\" title=\"${bundle.title_close_widget}\">\n <img src=\"${blankImage}\" alt=\"\" role=\"presentation\" />\n <span dojoAttachPoint=\"closeText\" class=\"lotusAltText\" title=\"${bundle.title_close_widget}\">\n X\n </span>\n </a>\n </div>\n <div dojoAttachPoint=\"addRatingForm\" id=\"addForm\" class=\"lotusDialog\">\n <div dojoAttachPoint=\"containerNode\" class=\"lotusDialogContent trcDialogContent\" style=\"max-height: none;\">\n <div dojoAttachPoint=\"errorDiv\" id=\"errorDiv\" title=\"${bundle.title_error_message}\" style=\"display:none;\" class=\"lotusMessage\">\n <img src=\"${blankImage}\" width=\"16\" height=\"16\" class=\"trcErrorIcon\" alt=\"${bundle.title_error_message}\" /> \n <span dojoAttachPoint=\"errorSpan\"></span>\n <div style=\"background-color: white;\" style=\"display:block;\">\n <span dojoAttachPoint=\"errorDetailsSpan\"></span>\n </div> \n </div>\n <div dojoAttachPoint=\"successMessageDiv\" id=\"successMessageDiv\"></div>\n <div dojoAttachPoint=\"mainContentDiv\" class=\"trcFieldset\">\n <table class=\"lotusLayout\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" summary=\"\" role=\"presentation\">\n <tbody>\n <tr class=\"lotusFieldRow\">\n <td dojoAttachPoint=\"communityRatingsLabel\" colspan=\"2\" class=\"trcText\" title=\"${bundle.title_community_rating}\">${bundle.text_community_rating_for_this_resource}</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"loadingDiv\" >\n <span class=\"lotusLoading\"><img width=\"20\" height=\"20\" src=\"${blankImage}\"></span>\n </td>\n </tr>\n <tr class=\"lotusFieldRow\" dojoAttachPoint=\"communityRatingRow\">\n <td dojoAttachPoint=\"collaborativeRatingDiv\" class=\"trc75CellWidth\" title=\"${bundle.title_community_rating}\"></td>\n <td dojoAttachPoint=\"deleteAllLink\"><a href=\"javascript:;\" dojoAttachPoint=\"deleteAllLinkAnchor\" class=\"lotusAction trcRatingDelete\" role=\"button\" title=\"${bundle.title_delete_ratings_for_this_resource}\">${bundle.link_delete}</a></td>\n </tr>\n <tr class=\"lotusFieldRow\">\n <td colspan=\"2\" dojoAttachpoint=\"collaborativeRatingDistributionDiv\" title=\"${bundle.title_community_rating_distribution}\"></td>\n </tr> \n <tr class=\"lotusFieldRow\"> \n <td colspan=\"2\" dojoAttachPoint=\"editSection\">\n <div dojoAttachPoint=\"editTabs\" class=\"lotusTabContainer\">\n <ul class=\"lotusTabs\">\n <li dojoAttachPoint=\"liTabPublic\" role=\"tab\" class=\"lotusSelected\"><div><a id=\"tabPublic\" dojoAttachPoint=\"tabPublic\" title=\"${bundle.title_switch_to_pub_view}\" selected=\"true\" href=\"javascript:;\"><strong>${bundle.button_public}</strong></a></div></li>\n <li dojoAttachPoint=\"liTabPrivate\" role=\"tab\"><div><a id=\"tabPrivate\" dojoAttachPoint=\"tabPrivate\" title=\"${bundle.title_switch_to_priv_view}\" href=\"javascript:;\">${bundle.button_private}</a></div></li>\n </ul>\n </div>\n <div dojoAttachPoint=\"tabContent\" role=\"tabpanel\" class=\"lotusTabContent\" aria-labelledby=\"tabPublic\" aria-hidden=\"false\">\n <table class=\"trcTabTable\" role=\"presentation\">\n <tr>\n <td colspan=\"2\" dojoAttachPoint=\"informationCell\"></td>\n </tr>\n <tr class=\"lotusFieldRow\">\n <td dojoAttachpoint=\"isMineOrPrivateRatingLabel\" class=\"trcText trc75CellWidth\" title=\"${bundle.title_your_rating}\">${bundle.text_your_rating_for_this_resource}</td>\n <td>&nbsp;</td>\n </tr>\n <tr>\n <td dojoAttachPoint=\"personalLoadingDiv\" >\n <span class=\"lotusLoading\"><img width=\"20\" height=\"20\" src=\"${blankImage}\"></span>\n </td>\n </tr>\n <tr class=\"lotusFieldRow\" dojoAttachPoint=\"personalRatingRow\">\n <td dojoAttachpoint=\"isMineOrPrivateRatingDiv\"></td>\n <td dojoAttachPoint=\"deleteLink\"><a href=\"javascript:;\" dojoAttachPoint=\"deleteLinkAnchor\" class=\"lotusAction trcRatingDelete\" role=\"button\" title=\"${bundle.title_delete_rating}\">${bundle.link_delete}</a></td>\n </tr>\n </table>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"lotusDialogFooter\">\n <input dojoAttachPoint=\"submitDialog\" id=\"saveRatings\" name=\"save\" type=\"submit\" value=\"${bundle.button_save}\" class=\"lotusFormButton\" role=\"button\" title=\"${bundle.title_submit_rating}\"/> \n <input dojoAttachPoint=\"dialogCancel\" class=\"lotusFormButton\" type=\"button\" role=\"button\" id=\"cancelRatings\" aria-label=\"${bundle.title_done_with_rating}\" title=\"${bundle.title_done_with_rating}\" value=\"${bundle.link_done}\" />\n </div>\n </div> \n </div>\n</div>\n",blankImage:dojo.moduleUrl("dojo","resources/blank.gif").toString(),constructor:function(){this.inherited("constructor","com.ibm.widgets.AddRating");this.bIsTracing=this.isTracing();this.bundle=dojo.i18n.getLocalization("com.ibm.widgets","AddRating");if(typeof this.id==="undefined"){this.id="addRatings"+this.resourceID?"_"+this.resourceID:"Dlg";}this.isAnonymous=!ibmPortalConfig.currentUser;},getRatingStore:function(){this.ratingStore=ibmPortalConfig.resolver;return this.ratingStore;},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}this.inherited(arguments);this.ratingsChangedEventID=this.resourceID+this.ratingsChangedEvent;this._initializeParameters();if(this.isAnonymous===true){this.displayTabs=false;this.privateRatingEnabled=false;this.mineRatingEnabled=false;}this._initializeWidget();if(this.genericParameterMap){if(this.genericParameterMap.renderMode===com.ibm.widgets.AddRating._parameterMap_Value_RenderMode_WSRP){dojo.destroy(this.mainContentDiv);this.errorDisplay(null,this.bundle.text_error_renderMode_wsrp,null);}}this._fixupMarkupForOneUI();this.show();if(this.bIsTracing){this.traceExit(m);}},fetchCollaborativeRatings:function(){var m="fetchCollaborativeRatings()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"Retrieving URI",com.ibm.widgets.AddRating._ratingSpaceEmptyURI+"&rmparam="+com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID+"&scope="+com.ibm.widgets.AddRating._ratingScope_community+"&scope="+com.ibm.widgets.AddRating._ratingScope_personal_public);}this._displayLoading();var _11d={};if(this.isPreventCache){_11d.preventCache=true;}this.ratingData=null;this.ratingData=this.getRatingStore().fetch({query:{uri:com.ibm.widgets.AddRating._ratingSpaceEmptyURI,rmparam:com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID,scope:com.ibm.widgets.AddRating._ratingScope_community_plus_personal_public},queryOptions:_11d,onComplete:dojo.hitch(this,"displayCollaborativeRatings"),onError:dojo.hitch(this,"errorDisplay")});this.isPreventCache=false;if(this.bIsTracing){this.traceExit(m);}},fetchPrivateRatings:function(){var m="fetchPrivateRatings()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"Retrieving URI",com.ibm.widgets.AddRating._ratingSpaceEmptyURI+"&rmparam="+com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID+"&scope="+com.ibm.widgets.AddRating._ratingScope_personal_private);this.trace(m,"currentPrivateRating",this.currentPrivateRating);this.trace(m,"newPrivateRating",this.newPrivateRating);}this._displayLoading(com.ibm.widgets.AddRating._ratingTypePersonal);var _11e={};if(this.isPreventCache){_11e.preventCache=true;}this.ratingData=null;this.ratingData=this.getRatingStore().fetch({query:{uri:com.ibm.widgets.AddRating._ratingSpaceEmptyURI,rmparam:com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID,scope:com.ibm.widgets.AddRating._ratingScope_personal_private},queryOptions:_11e,onComplete:dojo.hitch(this,"displayPrivateRatings"),onError:dojo.hitch(this,"errorDisplay")});this.isPreventCache=false;if(this.bIsTracing){this.traceExit(m);}},fetchIsMineRatings:function(){var m="fetchIsMineRatings()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"Retrieving URI",com.ibm.widgets.AddRating._ratingSpaceEmptyURI+"&rmparam="+com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID+"&scope="+com.ibm.widgets.AddRating._ratingScope_personal_public);this.trace(m,"currentIsMineRating",this.currentIsMineRating);this.trace(m,"newIsMineRating",this.newIsMineRating);}this._displayLoading(com.ibm.widgets.AddRating._ratingTypePersonal);var _11f={};if(this.isPreventCache){_11f.preventCache=true;}this.ratingData=null;this.ratingData=this.getRatingStore().fetch({query:{uri:com.ibm.widgets.AddRating._ratingSpaceEmptyURI,rmparam:com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID,scope:com.ibm.widgets.AddRating._ratingScope_personal_public},queryOptions:_11f,onComplete:dojo.hitch(this,"displayIsMineRatings"),onError:dojo.hitch(this,"errorDisplay")});this.isPreventCache=false;if(this.bIsTracing){this.traceExit(m);}},displayCollaborativeRatings:function(_120,_121){var m="displayCollaborativeRatings(items, request)";if(this.bIsTracing){this.traceEntry(m,[_120,_121]);}var _122=false;var _123=this.bundle.title_community_rating;if(this.customLabelCommunityRatings!==null){_123=this.customLabelCommunityRatings;}this.communityRatingsLabel.innerHTML=_123;this.communityRatingsLabel.title=_123;this.collaborativeRatingDiv.title=_123;var _124=0;var _125=0;var _126=[];for(var k=0;k<this.numStars;k++){_126[k]=0;}this._displayRatings();dojo.forEach(_120,function(item){_122=true;var _127=parseInt(this.getRatingStore().getValue(item,com.ibm.widgets.AddRating._valueAttribute),10);if(this.bIsTracing){this.trace(m,"ratingValue",_127);}var _128=parseInt(this.getRatingStore().getValue(item,com.ibm.widgets.AddRating._countAttribute),10);if(this.bIsTracing){this.trace(m,"count",_128);}_126[_127-1]=_126[_127-1]+_128;_124=_124+_128;_125=_125+(_127*_128);if(ibmPortalCPConfig.operations.canResetRatingPerResource){this._deleteAllLink=this.getRatingStore().getValue(item,com.ibm.widgets.AddRating._deleteAllLinkAttribute);}},this);var _129=null;this._dapCollaborativeRatingDiv=dojo.create("div",null,this.collaborativeRatingDiv);if(dijit.byId(com.ibm.widgets.AddRating._collaborativeRatingWidgetID)){_129=dijit.byId(com.ibm.widgets.AddRating._collaborativeRatingWidgetID);}if(_122){if(this.bIsTracing){this.trace(m,"numberOfRatings",_124);this.trace(m,"totalRatingValue",_125);}var _12a=_125/_124;if(this.bIsTracing){this.trace(m,"averageRatingValue",_12a);}var _12b=Math.round(_12a);if(this.bIsTracing){this.trace(m,"roundedAverageRatingValue",_12b);}if(_129){_129.setAttribute("value",_12a);}else{_129=dijit.byId(this.resourceID+this.ratingScope+com.ibm.widgets.InlineRating.inlineRatingWidgetID);if(!this._dapRatingWidget){_129=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._collaborativeRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,value:_12a,hoverable:false,clickable:false,halfStarSupport:true},this._dapCollaborativeRatingDiv);dojo.attr(_129.domNode,"tabindex","0");}else{dojo.place(_129,this._dapCollaborativeRatingDiv,"last");}}this._setRatingWidgetTitleText(_129,dojo.string.substitute(this.bundle.title_rating_percentage,[(Math.round(_12a*100)/100),this.numStars]));dijit.setWaiState(_129.domNode,"label",_123);if(ibmPortalCPConfig.operations.canResetRatingPerResource){dojo.style(this.deleteAllLink,"display","inline");dojo.removeAttr(this.deleteAllLink,"style");this.deleteAllLinkAnchor.onclick=dojo.hitch(this,function(){this.markAllRatingsOfResourceForDeletion();return false;});}else{dojo.style(this.deleteAllLink,"display","none");}this.displayCollaborativeRatingDistribution(_126);}else{dojo.style(this.deleteAllLink,"display","none");if(_129){_129.setAttribute("value",0);}else{_129=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._collaborativeRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,value:0,hoverable:false,clickable:false,halfStarSupport:true},this._dapCollaborativeRatingDiv);dojo.attr(_129.domNode,"tabindex","0");}this._setRatingWidgetTitleText(_129,this.bundle.title_not_set);dijit.setWaiState(_129.domNode,"label",_123);if(this.myChart){this.myChart.destroy();this.myChart=null;}}if(this.bIsTracing){this.traceExit(m);}},displayCollaborativeRatingDistribution:function(_12c){var m="displayCollaborativeRatingDistribution(aNumberOfRatingValues)";if(this.bIsTracing){this.traceEntry(m,_12c);}if(this.myChart){this.myChart.update(_12c);}else{var div=dojo.create("div",null,this.collaborativeRatingDistributionDiv);this.myChart=new com.ibm.widgets.AddRatingChart({values:_12c},div);}this.myChart.startup();if(this.bIsTracing){this.traceExit(m);}},displayPrivateRatings:function(_12d,_12e){var m="displayPrivateRatings(items, request)";if(this.bIsTracing){this.traceEntry(m,[_12d,_12e]);}var _12f=false;var _130=null;this._ratingScope=com.ibm.widgets.AddRating._ratingScope_personal_private;var _131;if(this.customLabelPersonalPrivateRatings!==null){this.isMineOrPrivateRatingLabel.innerHTML=this.customLabelPersonalPrivateRatings;this.isMineOrPrivateRatingLabel.title=this.customLabelPersonalPrivateRatings;_131=this.customLabelPersonalPrivateRatings;}else{this.isMineOrPrivateRatingLabel.innerHTML=this.bundle.text_your_rating_for_this_resource;this.isMineOrPrivateRatingLabel.title=this.bundle.title_your_rating;_131=this.bundle.title_your_rating;}this._dapPrivateRatingDiv=dojo.create("div",{id:"privateRatingDiv"},this.isMineOrPrivateRatingDiv);if(dijit.byId(com.ibm.widgets.AddRating._privateRatingWidgetID)){_130=dijit.byId(com.ibm.widgets.AddRating._privateRatingWidgetID);}this._displayRatings(com.ibm.widgets.AddRating._ratingTypePersonal);if(_12d&&_12d.length!==0){if(this.deletingEnabled){dojo.style(this.deleteLink,"display","inline");dojo.removeAttr(this.deleteLink,"style");}else{dojo.style(this.deleteLink,"display","none");}dojo.forEach(_12d,function(item){_12f=true;var _132=parseInt(this.getRatingStore().getValue(item,com.ibm.widgets.AddRating._valueAttribute),10);if(this.bIsTracing){this.trace(m,"ratingValue",_132);}if(ibmPortalCPConfig.operations.canCreatePrivateRatings){if(_130){_130.setAttribute("value",_132);}else{_130=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._privateRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,onChange:dojo.hitch(this,"_onChangePrivateRating"),value:_132},this._dapPrivateRatingDiv);dojo.attr(_130.domNode,"tabindex","0");}this.connectionHandlersPrivate.push(dojo.connect(_130,"onStarClick",dojo.hitch(this,"updatePrivateRating")));this.connectionHandlersPrivate.push(dojo.connect(_130.domNode,"onkeypress",dojo.hitch(this,"keyChangePrivateRating","update")));dojo.connect(_130.domNode,"onkeyup",dojo.hitch(this,"_checkKeySubmit"));dojo.connect(_130,"onStarClick",dojo.hitch(this,"_checkForMessages"));dojo.connect(_130.domNode,"onkeypress",dojo.hitch(this,"_checkForMessages"));}else{if(_130){_130.setAttribute("value",_132);}else{_130=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._privateRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,value:_132,onChange:dojo.hitch(this,"_onChangePrivateRating"),hoverable:false,clickable:false},this._dapPrivateRatingDiv);dojo.attr(_130.domNode,"tabindex","0");}}this._setRatingWidgetTitleText(_130,dojo.string.substitute(this.bundle.title_rating_percentage,[_132,this.numStars]));dijit.setWaiState(_130.domNode,"label",_131);_130.focus();this.currentPrivateRating=_130.value;if(this.bIsTracing){this.trace(m,"currentPrivateRating",this.currentPrivateRating);}},this);}else{dojo.style(this.deleteLink,"display","none");var _133=0;if(this.newPrivateRating){_133=this.newPrivateRating;}else{if(this.currentPrivateRating){_133=this.currentPrivateRating;}}if(ibmPortalCPConfig.operations.canCreatePrivateRatings){if(_130){_130.setAttribute("value",_133);}else{_130=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._privateRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,onChange:dojo.hitch(this,"_onChangePrivateRating"),value:_133},this._dapPrivateRatingDiv);dojo.attr(_130.domNode,"tabindex","0");}if(this.currentPrivateRating&&this.currentPrivateRating!==0){this.connectionHandlersPrivate.push(dojo.connect(_130,"onStarClick",dojo.hitch(this,"updatePrivateRating")));this.connectionHandlersPrivate.push(dojo.connect(_130.domNode,"onkeypress",dojo.hitch(this,"keyChangePrivateRating","update")));}else{this.connectionHandlersPrivate.push(dojo.connect(_130,"onStarClick",dojo.hitch(this,"addPrivateRating")));this.connectionHandlersPrivate.push(dojo.connect(_130.domNode,"onkeypress",dojo.hitch(this,"keyChangePrivateRating","add")));}dojo.connect(_130.domNode,"onkeyup",dojo.hitch(this,"_checkKeySubmit"));dojo.connect(_130,"onStarClick",dojo.hitch(this,"_checkForMessages"));dojo.connect(_130.domNode,"onkeypress",dojo.hitch(this,"_checkForMessages"));}else{if(_130){_130.setAttribute("value",_133);}else{_130=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._privateRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,value:_133,onChange:dojo.hitch(this,"_onChangePrivateRating"),hoverable:false,clickable:false},this._dapPrivateRatingDiv);dojo.attr(_130.domNode,"tabindex","0");}}this._setRatingWidgetTitleText(_130,this.bundle.title_not_set);dijit.setWaiState(_130.domNode,"label",_131);_130.focus();}if(this.bIsTracing){this.traceExit(m);}},displayIsMineRatings:function(_134,_135){var m="displayIsMineRatings(items, request)";if(this.bIsTracing){this.traceEntry(m,[_134,_135]);}var _136=false;var _137=null;this._ratingScope=com.ibm.widgets.AddRating._ratingScope_personal_public;var _138;if(this.customLabelPersonalPublicRatings!==null){this.isMineOrPrivateRatingLabel.innerHTML=this.customLabelPersonalPublicRatings;this.isMineOrPrivateRatingLabel.title=this.customLabelPersonalPublicRatings;_138=this.customLabelPersonalPublicRatings;}else{this.isMineOrPrivateRatingLabel.innerHTML=this.bundle.text_your_rating_for_this_resource;this.isMineOrPrivateRatingLabel.title=this.bundle.title_your_rating;_138=this.bundle.title_your_rating;}this._dapIsMineRatingDiv=dojo.create("div",{id:"isMineRatingDiv"},this.isMineOrPrivateRatingDiv);if(dijit.byId(com.ibm.widgets.AddRating._isMineRatingWidgetID)){_137=dijit.byId(com.ibm.widgets.AddRating._isMineRatingWidgetID);}this._displayRatings(com.ibm.widgets.AddRating._ratingTypePersonal);if(_134&&_134.length!==0){if(this.deletingEnabled){dojo.style(this.deleteLink,"display","inline");dojo.removeAttr(this.deleteLink,"style");}else{dojo.style(this.deleteLink,"display","none");}dojo.forEach(_134,function(item){_136=true;var _139=parseInt(this.getRatingStore().getValue(item,com.ibm.widgets.AddRating._valueAttribute),10);if(this.bIsTracing){this.trace(m,"ratingValue",_139);}if(ibmPortalCPConfig.operations.canCreatePublicRatings){if(_137){_137.setAttribute("value",_139);}else{_137=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._isMineRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,onChange:dojo.hitch(this,"_onChangeIsMineRating"),value:_139},this._dapIsMineRatingDiv);dojo.attr(_137.domNode,"tabindex","0");_137.focus();}this.connectionHandlers.push(dojo.connect(_137,"onStarClick",dojo.hitch(this,"updateIsMineRating")));this.connectionHandlers.push(dojo.connect(_137.domNode,"onkeypress",dojo.hitch(this,"keyChangeIsMineRating","update")));dojo.connect(_137.domNode,"onkeyup",dojo.hitch(this,"_checkKeySubmit"));dojo.connect(_137,"onStarClick",dojo.hitch(this,"_checkForMessages"));dojo.connect(_137.domNode,"onkeypress",dojo.hitch(this,"_checkForMessages"));}else{if(_137){_137.setAttribute("value",_139);}else{_137=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._isMineRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,value:_139,onChange:dojo.hitch(this,"_onChangeIsMineRating"),hoverable:false,clickable:false},this._dapIsMineRatingDiv);dojo.attr(_137.domNode,"tabindex","0");}}this._setRatingWidgetTitleText(_137,dojo.string.substitute(this.bundle.title_rating_percentage,[_139,this.numStars]));dijit.setWaiState(_137.domNode,"label",_138);this.currentIsMineRating=_137.value;if(this.bIsTracing){this.trace(m,"currentIsMineRating",this.currentIsMineRating);}},this);}else{dojo.style(this.deleteLink,"display","none");var _13a=0;if(this.newIsMineRating){_13a=this.newIsMineRating;}else{if(this.currentIsMineRating){_13a=this.currentIsMineRating;}}if(ibmPortalCPConfig.operations.canCreatePublicRatings){if(_137){_137.setAttribute("value",_13a);}else{_137=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._isMineRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,onChange:dojo.hitch(this,"_onChangeIsMineRating"),value:0},this._dapIsMineRatingDiv);dojo.attr(_137.domNode,"tabindex","0");_137.focus();}if(this.currentIsMineRating&&this.currentIsMineRating!==0){this.connectionHandlers.push(dojo.connect(_137,"onStarClick",dojo.hitch(this,"updateIsMineRating")));this.connectionHandlers.push(dojo.connect(_137.domNode,"onkeypress",dojo.hitch(this,"keyChangeIsMineRating","update")));}else{this.connectionHandlers.push(dojo.connect(_137,"onStarClick",dojo.hitch(this,"addIsMineRating")));this.connectionHandlers.push(dojo.connect(_137.domNode,"onkeypress",dojo.hitch(this,"keyChangeIsMineRating","add")));}dojo.connect(_137.domNode,"onkeyup",dojo.hitch(this,"_checkKeySubmit"));dojo.connect(_137,"onStarClick",dojo.hitch(this,"_checkForMessages"));dojo.connect(_137.domNode,"onkeypress",dojo.hitch(this,"_checkForMessages"));}else{if(_137){_137.setAttribute("value",ratingValue);}else{_137=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._isMineRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,onChange:dojo.hitch(this,"_onChangeIsMineRating"),value:0,hoverable:false,clickable:false},this._dapIsMineRatingDiv);dojo.attr(_137.domNode,"tabindex","0");}}this._setRatingWidgetTitleText(_137,this.bundle.title_not_set);}if(this.bIsTracing){this.traceExit(m);}},addIsMineRating:function(_13b){var m="addIsMineRating(event)";if(this.bIsTracing){this.traceEntry(m,_13b);}var _13c=_13b.target;var _13d=0;if(_13c.tagName=="SPAN"){_13d=_13c.parentNode.getAttribute("value");}else{_13d=_13c.getAttribute("value");}if(_13d==this.newIsMineRating){this.newIsMineRating=null;this._actionAddIsMineRating=false;}else{this.newIsMineRating=_13d;this.currentIsMineRating=_13d;if(this.bIsTracing){this.trace(m,"newIsMineRating",this.newIsMineRating);}this._actionDeleteIsMineRating=false;this._actionAddPrivateRating=false;this._actionUpdatePrivateRating=false;this._actionDeletePrivateRating=false;this.activateSubmitDialog(true);this._actionAddIsMineRating=true;}if(this.bIsTracing){this.traceExit(m);}},addAnonymousRating:function(_13e){var m="addAnonymousRating(event)";if(this.bIsTracing){this.traceEntry(m,_13e);}var _13f=_13e.target;var _140=0;if(_13f.tagName=="SPAN"){_140=_13f.parentNode.getAttribute("value");}else{_140=_13f.getAttribute("value");}this.newAnonymousRating=_140;this.currentAnonymousRating=_140;if(this.bIsTracing){this.trace(m,"newAnonymousRating",this.newAnonymousRating);}this.activateSubmitDialog(true);this._actionAddAnonymousRating=true;if(this.bIsTracing){this.traceExit(m);}},addPrivateRating:function(_141){var m="addPrivateRating(event)";if(this.bIsTracing){this.traceEntry(m,_141);}var _142=_141.target;var _143=0;if(_142.tagName=="SPAN"){_143=_142.parentNode.getAttribute("value");}else{_143=_142.getAttribute("value");}if(_143==this.newPrivateRating){this.newPrivateRating=null;this._actionAddPrivateRating=false;}else{this.newPrivateRating=_143;this.currentPrivateRating=_143;if(this.bIsTracing){this.trace(m,"newPrivateRating",this.newPrivateRating);}this._actionDeletePrivateRating=false;this._actionAddIsMineRating=false;this._actionUpdateIsMineRating=false;this._actionDeleteIsMineRating=false;this.activateSubmitDialog(true);this._actionAddPrivateRating=true;}if(this.bIsTracing){this.traceExit(m);}},addRating:function(_144,_145,_146){var m="addRating(resource, isPrivateRating, newRatingValue)";if(this.bIsTracing){this.traceEntry(m,[_144,_145,_146]);this.trace(m,"resource",_144);this.trace(m,"isPrivateRating",_145);this.trace(m,"newRatingValue",_146);}this._displayLoading(com.ibm.widgets.AddRating._ratingTypePersonal);this.storeRatingStore(_144,_145,_146);if(this.bIsTracing){this.traceExit(m);}},storeRatingStore:function(_147,_148,_149){var m="storeRatingStore(resource, isPrivateRating, newRatingValue)";if(this.bIsTracing){this.traceEntry(m,[_147,_148,_149]);this.trace(m,"resource",_147);this.trace(m,"isPrivateRating",_148);this.trace(m,"newRatingValue",_149);}var item=null;if(this.resourceCategory){item=this.getRatingStore().newItem({scheme:"rtm",isPrivate:_148,rating:_149,resourceURI:_147,category:this.resourceCategory});}else{item=this.getRatingStore().newItem({scheme:"rtm",isPrivate:_148,rating:_149,resourceURI:_147});}this.ratingStore.saveScheme("rtm",{onError:this.errorDisplay,onComplete:this.onSave,scope:this});if(this.isAnonymous){this.currentAnonymousRating=_149;}if(this.bIsTracing){this.traceExit(m);}},updateIsMineRating:function(_14a){var m="updateIsMineRating(event)";if(this.bIsTracing){this.traceEntry(m,_14a);}var _14b=_14a.target;var _14c=0;if(_14b.tagName=="SPAN"){_14c=_14b.parentNode.getAttribute("value");}else{_14c=_14b.getAttribute("value");}if(_14c==this.currentIsMineRating||_14c==this.newIsMineRating){this.deleteIsMineOrPrivateRating(_14a);}else{this.newIsMineRating=_14c;this.currentIsMineRating=_14c;if(this.bIsTracing){this.trace(m,"newIsMineRating",this.newIsMineRating);}this._actionDeleteIsMineRating=false;this._actionAddPrivateRating=false;this._actionDeletePrivateRating=false;this._actionUpdatePrivateRating=false;this.activateSubmitDialog(true);this._actionUpdateIsMineRating=true;}if(this.bIsTracing){this.traceExit(m);}},keyChangeIsMineRating:function(mode,_14d){var m="keyChangeIsMineRating(mode, event)";if(this.bIsTracing){this.traceEntry(m,[mode,_14d]);}if(_14d.keyCode!=dojo.keys.TAB){this._actionDeleteIsMineRating=false;this._actionAddPrivateRating=false;this._actionDeletePrivateRating=false;this._actionUpdatePrivateRating=false;if(mode=="update"){this._actionUpdateIsMineRating=true;}else{if(!this.currentIsMineRating){this.currentIsMineRating=0;}this._actionAddIsMineRating=true;}this.newIsMineRating=this.currentIsMineRating;switch(_14d.keyCode){case dojo.keys.UP_ARROW:case dojo.keys.RIGHT_ARROW:this.currentIsMineRating+=1;this.newIsMineRating=this.currentIsMineRating;this.newIsMineRating=Math.min(this.newIsMineRating,this.numStars);this.currentIsMineRating=Math.min(this.newIsMineRating,this.numStars);dojo.stopEvent(_14d);break;case dojo.keys.DOWN_ARROW:case dojo.keys.LEFT_ARROW:this.currentIsMineRating-=1;this.newIsMineRating=this.currentIsMineRating;this.newIsMineRating=Math.max(this.newIsMineRating,1);this.currentIsMineRating=Math.max(this.newIsMineRating,1);dojo.stopEvent(_14d);break;case dojo.keys.HOME:this.currentIsMineRating=1;this.newIsMineRating=1;dojo.stopEvent(_14d);break;case dojo.keys.END:this.currentIsMineRating=this.numStars;this.newIsMineRating=this.numStars;dojo.stopEvent(_14d);break;default:break;}if(_14d.keyCode!=dojo.keys.TAB){this.activateSubmitDialog(true);}dijit.byId(com.ibm.widgets.AddRating._isMineRatingWidgetID).setAttribute("value",this.newIsMineRating);}if(this.bIsTracing){this.traceExit(m);}},updatePrivateRating:function(_14e){var m="updatePrivateRating(event)";if(this.bIsTracing){this.traceEntry(m,_14e);}var _14f=_14e.target;var _150=0;if(_14f.tagName=="SPAN"){_150=_14f.parentNode.getAttribute("value");}else{_150=_14f.getAttribute("value");}if(_150==this.currentPrivateRating||_150==this.newPrivateRating){this.deleteIsMineOrPrivateRating(_14e);}else{this.newPrivateRating=_150;this.currentPrivateRating=_150;if(this.bIsTracing){this.trace("newPrivateRating",this.newPrivateRating);}this._actionDeletePrivateRating=false;this._actionAddIsMineRating=false;this._actionDeleteIsMineRating=false;this._actionUpdateIsMineRating=false;this.activateSubmitDialog(true);this._actionUpdatePrivateRating=true;}if(this.bIsTracing){this.traceExit(m);}},keyChangePrivateRating:function(mode,_151){var m="keyChangePrivateRating(mode, event)";if(this.bIsTracing){this.traceEntry(m,[mode,_151]);}if(_151.keyCode!=dojo.keys.TAB){this._actionDeletePrivateRating=false;this._actionAddIsMineRating=false;this._actionDeleteIsMineRating=false;this._actionUpdateIsMineRating=false;if(mode=="update"){this._actionUpdatePrivateRating=true;}else{if(mode=="add"){if(!this.currentPrivateRating){this.currentPrivateRating=0;}this._actionAddPrivateRating=true;}}this.newPrivateRating=this.currentPrivateRating;switch(_151.keyCode){case dojo.keys.UP_ARROW:case dojo.keys.RIGHT_ARROW:this.currentPrivateRating+=1;this.newPrivateRating=this.currentPrivateRating;this.newPrivateRating=Math.min(this.newPrivateRating,this.numStars);this.currentPrivateRating=Math.min(this.newPrivateRating,this.numStars);dojo.stopEvent(_151);break;case dojo.keys.DOWN_ARROW:case dojo.keys.LEFT_ARROW:this.currentPrivateRating-=1;this.newPrivateRating=this.currentPrivateRating;this.newPrivateRating=Math.max(this.newPrivateRating,1);this.currentPrivateRating=Math.max(this.newPrivateRating,1);dojo.stopEvent(_151);break;case dojo.keys.HOME:this.currentPrivateRating=1;this.newPrivateRating=1;dojo.stopEvent(_151);break;case dojo.keys.END:this.currentPrivateRating=this.numStars;this.newPrivateRating=this.numStars;dojo.stopEvent(_151);break;default:break;}if(_151.keyCode!=dojo.keys.TAB){this.activateSubmitDialog(true);}dijit.byId(com.ibm.widgets.AddRating._privateRatingWidgetID).setAttribute("value",this.newPrivateRating);}if(this.bIsTracing){this.traceExit(m);}},keyChangeAnonymousRating:function(_152){var m="keyChangeAnonymousRating(event)";if(this.bIsTracing){this.traceEntry(m,_152);}if(_152.keyCode!=dojo.keys.TAB){if(!this.currentAnonymousRating){this.currentAnonymousRating=0;}this._actionAddAnonymousRating=true;this.newAnonymousRating=this.currentAnonymousRating;switch(_152.keyCode){case dojo.keys.UP_ARROW:case dojo.keys.RIGHT_ARROW:this.currentAnonymousRating+=1;this.newAnonymousRating=this.currentAnonymousRating;this.newAnonymousRating=Math.min(this.newAnonymousRating,this.numStars);this.currentAnonymousRating=Math.min(this.newAnonymousRating,this.numStars);dojo.stopEvent(_152);break;case dojo.keys.DOWN_ARROW:case dojo.keys.LEFT_ARROW:this.currentAnonymousRating-=1;this.newAnonymousRating=this.currentAnonymousRating;this.newAnonymousRating=Math.max(this.newAnonymousRating,1);this.currentAnonymousRating=Math.max(this.newAnonymousRating,1);dojo.stopEvent(_152);break;case dojo.keys.HOME:this.currentAnonymousRating=1;this.newAnonymousRating=1;dojo.stopEvent(_152);break;case dojo.keys.END:this.currentAnonymousRating=this.numStars;this.newAnonymousRating=this.numStars;dojo.stopEvent(_152);break;default:break;}if(_152.keyCode!=dojo.keys.TAB){this.activateSubmitDialog(true);}dijit.byId(com.ibm.widgets.AddRating._anonymousRatingWidgetID).setAttribute("value",this.newAnonymousRating);}if(this.bIsTracing){this.traceExit(m);}},updateRating:function(_153,_154,_155){var m="updateRating(resource, isPrivateRating, newRatingValue)";if(this.bIsTracing){this.traceEntry(m,[_153,_154,_155]);this.trace(m,"resource",_153);this.trace(m,"isPrivateRating",_154);this.trace(m,"newRatingValue",_155);}this._displayLoading(com.ibm.widgets.AddRating._ratingTypePersonal);this.updateRatingStore(_153,_154,_155);if(this.bIsTracing){this.traceExit(m);}},updateRatingStore:function(_156,_157,_158){var m="updateRatingStore(resource, isPrivateRating, newRatingValue)";if(this.bIsTracing){this.traceEntry(m,[_156,_157,_158]);this.trace(m,"Invoking URI",_158+"@"+_156+" in resourcexcategory: "+this.resourceCategory);this.trace(m,"resource",_156);this.trace(m,"isPrivateRating",_157);this.trace(m,"newRatingValue",_158);}var _159=this.getRatingStore();var _15a=null;var _15b=dojo.hitch(this,"onSave");var _15c=dojo.hitch(this,"errorDisplay");if(!_157){_15a=_159.fetch({query:{uri:com.ibm.widgets.AddRating._ratingEmptyURI,rmparam:com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID,scope:com.ibm.widgets.AddRating._ratingScope_personal_public},onComplete:function(_15d){dojo.forEach(_15d,function(_15e){if(!_159.isItemLoaded(_15e)){_159.loadItem({item:_15e,onItem:function(item){_159.setValue(item,com.ibm.widgets.AddRating._valueAttribute,_158);_159.saveScheme("rtm",{onError:_15c,onComplete:_15b,scope:this});}});}else{_159.setValue(_15e,com.ibm.widgets.AddRating._valueAttribute,_158);_159.saveScheme("rtm",{onError:_15c,onComplete:_15b,scope:this});}},this);},onError:dojo.hitch(this,"errorDisplay")},this);}else{_15a=_159.fetch({query:{uri:com.ibm.widgets.AddRating._ratingEmptyURI,rmparam:com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID,scope:com.ibm.widgets.AddRating._ratingScope_personal_private},onComplete:function(_15f){dojo.forEach(_15f,function(_160){if(!_159.isItemLoaded(_160)){_159.loadItem({item:_160,onItem:function(item){_159.setValue(item,com.ibm.widgets.AddRating._valueAttribute,_158);_159.saveScheme("rtm",{onError:_15c,onComplete:_15b,scope:this});}});}else{_159.setValue(_160,com.ibm.widgets.AddRating._valueAttribute,_158);_159.saveScheme("rtm",{onError:_15c,onComplete:_15b,scope:this});}},this);},onError:dojo.hitch(this,"errorDisplay")},this);}if(this.bIsTracing){this.traceExit(m);}},deleteIsMineOrPrivateRating:function(_161){var m="deleteIsMineOrPrivateRating(event)";if(this.bIsTracing){this.traceEntry(m,_161);}if(this._ratingScope==com.ibm.widgets.AddRating._ratingScope_personal_public){if(this.bIsTracing){this.trace(m,"Delete the isMine rating");}this._checkForMessages();this.currentIsMineRating=0;this.newIsMineRating=null;this._actionUpdateIsMineRating=false;this._actionAddIsMineRating=false;this.activateSubmitDialog(true);dijit.byId(com.ibm.widgets.AddRating._isMineRatingWidgetID).setAttribute("value",0);this._actionDeleteIsMineRating=true;}else{if(this._ratingScope==com.ibm.widgets.AddRating._ratingScope_personal_private){if(this.bIsTracing){this.trace(m,"Delete the private rating");}this._checkForMessages();this.currentPrivateRating=0;this.newPrivateRating=null;this._actionUpdatePrivateRating=false;this._actionAddPrivateRating=false;this.activateSubmitDialog(true);dijit.byId(com.ibm.widgets.AddRating._privateRatingWidgetID).setAttribute("value",0);this._actionDeletePrivateRating=true;}}if(this.bIsTracing){this.traceExit(m);}},markAllRatingsOfResourceForDeletion:function(_162){var m="markAllRatingsOfResourceForDeletion(event)";if(this.bIsTracing){this.traceEntry(m,_162);}this._checkForMessages();this.currentIsMineRating=0;this.newIsMineRating=null;dijit.byId(com.ibm.widgets.AddRating._collaborativeRatingWidgetID).setAttribute("value",0);this._actionUpdateIsMineRating=false;this._actionAddIsMineRating=false;this._actionDeleteIsMineRating=false;this.activateSubmitDialog(true);this._actionDeleteAllRatingsOfResource=true;if(this.bIsTracing){this.traceExit(m);}},deleteRating:function(_163){var m="deleteRating(isPrivateRating)";if(this.bIsTracing){this.traceEntry(m,_163);}this._displayLoading(com.ibm.widgets.AddRating._ratingTypePersonal);var _164=this.getRatingStore();var _165=null;var _166=dojo.hitch(this,"onSave");var _167=dojo.hitch(this,"errorDisplay");if(!_163){_165=_164.fetch({query:{uri:com.ibm.widgets.AddRating._ratingEmptyURI,rmparam:com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID,scope:com.ibm.widgets.AddRating._ratingScope_personal_public},onComplete:function(_168){dojo.forEach(_168,function(_169){_164.deleteItem(_169);_164.saveScheme("rtm",{onError:_167,onComplete:_166,scope:this});},this);},onError:dojo.hitch(this,"errorDisplay")},this);}else{_165=_164.fetch({query:{uri:com.ibm.widgets.AddRating._ratingEmptyURI,rmparam:com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID,scope:com.ibm.widgets.AddRating._ratingScope_personal_private},onComplete:function(_16a){dojo.forEach(_16a,function(_16b){_164.deleteItem(_16b);_164.saveScheme("rtm",{onError:_167,onComplete:_166,scope:this});},this);},onError:dojo.hitch(this,"errorDisplay")},this);}if(this.bIsTracing){this.traceExit(m);}},saveRatings:function(_16c){var m="saveRatings(event)";if(this.bIsTracing){this.traceEntry(m,_16c);}if(_16c){dojo.stopEvent(_16c);}var _16d=com.ibm.widgets.AddRating._resourceModelSchema+this.resourceSchema+this.resourceID;if(this._actionAddIsMineRating){if(this.bIsTracing){this.trace(m,"Adding isMine rating");}this.addRating(_16d,false,this.newIsMineRating);}if(this._actionAddPrivateRating){if(this.bIsTracing){this.trace(m,"Adding private rating");}this.addRating(_16d,true,this.newPrivateRating);}if(this._actionUpdateIsMineRating){if(this.bIsTracing){this.trace(m,"Updating isMine rating");}this.updateRating(_16d,false,this.newIsMineRating);}if(this._actionUpdatePrivateRating){if(this.bIsTracing){this.trace(m,"Updating private rating");}this.updateRating(_16d,true,this.newPrivateRating);}if(this._actionDeletePrivateRating){if(this.bIsTracing){this.trace(m,"Deleting private rating");}this.deleteRating(true);}if(this._actionDeleteIsMineRating){if(this.bIsTracing){this.trace(m,"Deleting isMine rating");}this.deleteRating(false);}if(this._actionAddAnonymousRating){if(this.bIsTracing){this.trace(m,"Adding isMine rating");}this.addRating(_16d,false,this.newAnonymousRating);}if(this._actionDeleteAllRatingsOfResource){if(this.bIsTracing){this.trace(m,"Deleting all ratings of this resource");}this._deleteAllRatingsOfResource(this._deleteAllLink);}if(this.bIsTracing){this.traceExit(m);}},destroyDialog:function(){var m="destroyDialog()";if(this.bIsTracing){this.traceEntry(m);}this.newIsMineRating=null;this.newPrivateRating=null;this._actionAddIsMineRating=false;this._actionAddPrivateRating=false;this._actionUpdateIsMineRating=false;this._actionUpdatePrivateRating=false;this._actionDeleteIsMineRating=false;this._actionDeletePrivateRating=false;this._actionAddAnonymousRating=false;if(this._checkDialog){this._checkDialog.destroyRecursive();this._checkDialog=null;}this.destroyRecursive();var _16e=dijit.byId(com.ibm.widgets.AddRating._collaborativeRatingWidgetID);if(_16e){_16e.destroy();}var _16f=dijit.byId(com.ibm.widgets.AddRating._isMineRatingWidgetID);if(_16f){_16f.destroy();}var _170=dijit.byId(com.ibm.widgets.AddRating._privateRatingWidgetID);if(_170){_170.destroy();}var _171=dijit.byId(com.ibm.widgets.AddRating._anonymousRatingWidgetID);if(_171){_171.destroy();}this._removeLotusOneUIDiv();if(this.bIsTracing){this.traceExit(m);}},hideAndCancelRatings:function(_172){var m="hideAndCancelRatings(event)";if(this.bIsTracing){this.traceEntry(m,_172);}setTimeout(dojo.hitch(this,"destroyDialog"),dijit.defaultDuration+10);if(this.bIsTracing){this.traceExit(m);}},cancelRatings:function(_173){var m="cancelRatings(event)";if(this.bIsTracing){this.traceEntry(m,_173);}if(this._actionAddPrivateRating||this._actionDeletePrivateRating||this._actionUpdatePrivateRating||this._actionAddIsMineRating||this._actionDeleteIsMineRating||this._actionUpdateIsMineRating||this._actionDeleteAllRatingsOfResource){if(!this._checkDialog){this._checkDialog=new com.ibm.widgets.DoneCheckDialog({id:"doneCheckDialog",parentWidget:this,callbackOnYes:function(){this.parentWidget.hide();this.parentWidget.destroyDialog();}});}this._checkDialog.show();}else{this.hide();this.destroyDialog();}if(this.bIsTracing){this.traceExit(m);}},switchToPrivateView:function(_174){var m="switchToPrivateView(event)";if(this.bIsTracing){this.traceEntry(m,_174);}if(this._ratingScope==com.ibm.widgets.AddRating._ratingScope_personal_public){if(this._actionAddIsMineRating||this._actionDeleteIsMineRating||this._actionUpdateIsMineRating){this.displayInfoMessage(this.bundle.text_info_changes_lost);this.activateSubmitDialog(false);}if(this.customLabelPersonalPrivateRatings!==null){this.isMineOrPrivateRatingLabel.innerHTML=this.customLabelPersonalPrivateRatings;this.isMineOrPrivateRatingLabel.title=this.customLabelPersonalPrivateRatings;}this._actionAddIsMineRating=false;this._actionUpdateIsMineRating=false;this._actionDeleteIsMineRating=false;this.newIsMineRating=null;this._ratingScope=com.ibm.widgets.AddRating._ratingScope_personal_private;dojo.addClass(this.liTabPrivate,"lotusSelected");dojo.removeClass(this.liTabPublic,"lotusSelected");dojo.attr(this.tabPrivate,"selected","true");this.tabPublic.removeAttribute("selected");dojo.attr(this.tabContent,"aria-labelledby","tabPrivate");var _175=dijit.byId(com.ibm.widgets.AddRating._privateRatingWidgetID);if(_175){_175.destroy();}this.isMineOrPrivateRatingDiv.innerHTML="";this.fetchPrivateRatings();}if(this.bIsTracing){this.traceExit(m);}},switchToPublicView:function(_176){var m="switchToPublicView(event)";if(this.bIsTracing){this.traceEntry(m,_176);}if(this._ratingScope==com.ibm.widgets.AddRating._ratingScope_personal_private){if(this._actionAddPrivateRating||this._actionDeletePrivateRating||this._actionUpdatePrivateRating){this.displayInfoMessage(this.bundle.text_info_changes_lost);this.activateSubmitDialog(false);}if(this.customLabelPersonalPublicRatings!==null){this.isMineOrPrivateRatingLabel.innerHTML=this.customLabelPersonalPublicRatings;this.isMineOrPrivateRatingLabel.title=this.customLabelPersonalPublicRatings;}this._actionAddPrivateRating=false;this._actionUpdatePrivateRating=false;this._actionDeletePrivateRating=false;this.newPrivateRating=null;this._ratingScope=com.ibm.widgets.AddRating._ratingScope_personal_public;dojo.addClass(this.liTabPublic,"lotusSelected");dojo.removeClass(this.liTabPrivate,"lotusSelected");dojo.attr(this.tabPublic,"selected","true");this.tabPrivate.removeAttribute("selected");dojo.attr(this.tabContent,"aria-labelledby","tabPublic");var _177=dijit.byId(com.ibm.widgets.AddRating._isMineRatingWidgetID);if(_177){_177.destroy();}this.isMineOrPrivateRatingDiv.innerHTML="";this.fetchIsMineRatings();}if(this.bIsTracing){this.traceExit(m);}},onSave:function(){var m="onSave()";if(this.bIsTracing){this.traceEntry(m);}this._displayRatings(com.ibm.widgets.AddRating._ratingTypePersonal);this._displayRatings();if((this.errorDiv&&this.errorDiv.style.display!="block")||!this.errorDiv){if(!this._dapSuccessDiv){var _178=dojo.create("div",{id:"successDiv2",role:"status"},this.successMessageDiv);dojo.addClass(_178,"lotusMessage lotusConfirm");this._dapSuccessDiv=_178;var _179=dojo.create("img",{src:this.blankImage,alt:this.bundle.title_confirmation},_178);_179.style.width="16px";_179.style.height="16px";dojo.addClass(_179,"trcConfirmationIcon");var _17a=dojo.create("span",null,_178);if(this._actionAddAnonymousRating||this._actionAddIsMineRating||this._actionAddPrivateRating||this._actionUpdateIsMineRating||this._actionUpdatePrivateRating){dojo.attr(_17a,"innerHTML",this.bundle.text_success_changes_stored_successfully+this.bundle.text_rating_saved);}else{if(this._actionDeleteIsMineRating||this._actionDeletePrivateRating){dojo.attr(_17a,"innerHTML",this.bundle.text_success_changes_stored_successfully+this.bundle.text_rating_deleted);}else{if(this._actionDeleteAllRatingsOfResource){dojo.attr(_17a,"innerHTML",this.bundle.text_all_ratings_deleted);}}}}if(this._ratingScope==com.ibm.widgets.AddRating._ratingScope_personal_private){this.refreshPrivateRatings();}else{this.refreshCollaborativeRatings();this.refreshIsMineRatings();}this.activateSubmitDialog(false);}else{if(this._ratingScope==com.ibm.widgets.AddRating._ratingScope_personal_private){this.refreshPrivateRatings();}else{this.refreshIsMineRatings();this.refreshCollaborativeRatings();}}dojo.publish(this.ratingsChangedEventID,[{scope:this._ratingScope}]);if(this.bIsTracing){this.traceExit(m);}},refreshCollaborativeRatings:function(){var m="refreshCollaborativeRatings()";if(this.bIsTracing){this.traceEntry(m);}this.isPreventCache=true;this._actionDeleteAllRatingsOfResource=false;this.fetchCollaborativeRatings();if(this.bIsTracing){this.traceExit(m);}},refreshIsMineRatings:function(){var m="refreshIsMineRatings()";if(this.bIsTracing){this.traceEntry(m);}this.newIsMineRating=null;this.newAnonymousRating=null;this._actionAddIsMineRating=false;this._actionUpdateIsMineRating=false;this._actionDeleteIsMineRating=false;this._actionAddAnonymousRating=false;this.isPreventCache=true;dojo.forEach(this.connectionHandlers,dojo.disconnect);if(!this.isAnonymous&&!this.resourcePrivate){this.fetchIsMineRatings();}else{if(this.isAnonymous){this.refreshAnonymousRating();}}if(this.bIsTracing){this.traceExit(m);}},refreshPrivateRatings:function(){var m="refreshPrivateRatings()";if(this.bIsTracing){this.traceEntry(m);}this.isPreventCache=true;this.newPrivateRating=null;this._actionAddPrivateRating=false;this._actionUpdatePrivateRating=false;this._actionDeletePrivateRating=false;dojo.forEach(this.connectionHandlersPrivate,dojo.disconnect);this.fetchPrivateRatings();if(this.bIsTracing){this.traceExit(m);}},refreshAnonymousRating:function(){var m="refreshAnonymousRating()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"new",this.newAnonymousRating);this.trace(m,"current",this.currentAnonymousRating);}var _17b=dijit.byId(com.ibm.widgets.AddRating._anonymousRatingWidgetID);_17b.setAttribute("value",this.currentAnonymousRating);this._setRatingWidgetTitleText(_17b,dojo.string.substitute(this.bundle.title_rating_percentage,[this.currentAnonymousRating,this.numStars]));if(this.bIsTracing){this.traceExit(m);}},errorDisplay:function(err,_17c,_17d){var m="errorDisplay(err, errText, errDetails)";if(this.bIsTracing){this.traceEntry(m,[err,_17c,_17d]);}this._displayRatings(com.ibm.widgets.AddRating._ratingTypePersonal);if((err!==null)&&(err.status==401)){top.location.href=document.location.href;}else{dojo.style(this.errorDiv,"display","block");if(_17c&&_17c!==""){this.errorSpan.innerHTML=_17c;}if(_17d&&_17d!==""){this.errorDetailsSpan.innerHTML=_17d;}}if(this.bIsTracing){this.traceExit(m);}},activateSubmitDialog:function(_17e){var m="activateSubmitDialog(activate)";if(this.bIsTracing){this.traceEntry(m,_17e);}if(_17e){this.submitDialog.disabled=false;this.submitDialog.className="lotusFormButton";}else{this.submitDialog.disabled=true;this.submitDialog.className="lotusFormButton lotusBtnDisabled trcDisabledButton";}if(this.bIsTracing){this.traceExit(m);}},handleAnonymousCase:function(){var m="handleAnonymousCase()";if(this.bIsTracing){this.traceEntry(m);}if(ibmPortalCPConfig.operations.canCreatePublicRatings){this._dapIsMineRatingDiv=dojo.create("div",{id:"isMineRatingDiv"},this.isMineOrPrivateRatingDiv);var _17f=null;if(this.currentAnonymousRating){_17f=dojo.string.substitute(this.bundle.title_rating_percentage,[this.currentAnonymousRating,this.numStars]);}else{_17f=this.bundle.title_not_set;}var _180=new com.ibm.widgets.Rating({id:com.ibm.widgets.AddRating._anonymousRatingWidgetID,ratingNoValueTitleText:this.bundle.title_not_set,ratingValueTitleTemplate:this.bundle.title_rating_percentage,numStars:this.numStars,onChange:dojo.hitch(this,"_onChangeAnonymousRating"),value:0},this._dapIsMineRatingDiv);this._setRatingWidgetTitleText(_180,_17f);dojo.connect(_180,"onStarClick",dojo.hitch(this,"addAnonymousRating"));dojo.connect(_180.domNode,"onkeypress",dojo.hitch(this,"keyChangeAnonymousRating"));dojo.attr(_180.domNode,"tabindex","0");this._displayRatings(com.ibm.widgets.AddRating._ratingTypePersonal);}else{dojo.destroy(this.editSection);}if(this.bIsTracing){this.traceExit(m);}},displayInfoMessage:function(_181){var m="displayInfoMessage(message)";if(this.bIsTracing){this.traceEntry(m,_181);}var _182=dojo.create("div",{role:"status"},this.informationCell);dojo.addClass(_182,"lotusMessage lotusInfo");this._dapInfoDiv=_182;var _183=dojo.create("img",{src:this.blankImage,alt:this.bundle.title_info},_182);_183.style.width="16px";_183.style.height="16px";dojo.addClass(_183,"trcInformationIcon");var _184=dojo.create("span",{innerHTML:_181},_182);if(this.bIsTracing){this.traceExit(m);}},_checkForMessages:function(){var m="_checkForMessages()";if(this.bIsTracing){this.traceEntry(m);}if(this.errorDiv.style.display=="block"){this.errorDiv.style.display="none";}if(this._dapSuccessDiv){dojo.fadeOut({node:this._dapSuccessDiv,duration:this.messageFadeOutDuration,onEnd:dojo.hitch(this,function(){dojo.destroy(this._dapSuccessDiv);this._dapSuccessDiv=null;})}).play();}if(this._dapInfoDiv){dojo.fadeOut({node:this._dapInfoDiv,duration:this.messageFadeOutDuration,onEnd:dojo.hitch(this,function(){dojo.destroy(this._dapInfoDiv);this._dapInfoDiv=null;})}).play();}if(this.bIsTracing){this.traceExit(m);}},_determineResourceType:function(){var m="_determineResourceType()";if(this.bIsTracing){this.traceEntry(m);}switch(this.resourceType){case com.ibm.widgets.AddRating._resourceType_contentnode:this.resourceSchema=com.ibm.widgets.AddRating._navigationModelSchema;break;case com.ibm.widgets.AddRating._resourceType_navigationnode:this.resourceSchema=com.ibm.widgets.AddRating._portletModelSchema;break;default:break;}if(this.bIsTracing){this.traceExit(m);}},_checkKeySubmit:function(_185){var m="_checkKeySubmit()";if(this.bIsTracing){this.traceEntry(m);}if(_185.keyCode==dojo.keys.ENTER){if(!this.submitDialog.disabled){this.saveRatings(_185);}}if(this.bIsTracing){this.traceExit(m);}},_findOrCreateLotusUIDIV:function(){var m="_findOrCreateLotusUIDIV()";if(this._isTracing){this.traceEntry(m);}var _186=dojo.byId(this.lotusui_id);if(!_186){_186=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class,"wairole":"region","role":"region"},dojo.body());}dijit.setWaiState(_186,"labelledby",this.id+"_titleNode");this._lotusui_div=_186;if(this._isTracing){this.traceExit(m,_186);}return _186;},_fixupMarkupForOneUI:function(){var m="_fixupMarkupForOneUI()";if(this._isTracing){this.traceEntry(m);}var _187="";var _188=true;if((typeof com_ibm_theme_capabilities!=="undefined")&&(typeof com_ibm_theme_capabilities.oneUI=="string")&&(com_ibm_theme_capabilities.oneUI.charAt(0)==="3")){_188=false;}if(_188===true){dojo.addClass(this.addTagDiv,"lotusui");dojo.place(this.closeButtonNode,this.headerNode,"first");dojo.removeClass(this.closeButtonNode,"lotusDialogClose");dojo.addClass(this.closeButtonNode,"lotusBtnImg lotusClose");}else{dojo.removeClass(this.addTagDiv,"lotusui");dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");}if(this._isTracing){this.traceExit(m);}},_initializeWidget:function(){var m="_initializeWidget()";if(this.bIsTracing){this.traceEntry(m);}this._determineTabDisplay();this._initializeEvents();this._determineResourceType();this.titleNode.innerHTML=dojo.string.substitute(this.bundle.text_rate,[com.ibm.domUtilities.encodeXML(this.resourceTitle)]);this.fetchCollaborativeRatings();if(!this.isAnonymous&&!this.resourcePrivate&&this.defaultView!=com.ibm.widgets.AddRating._viewPrivate){this.fetchIsMineRatings();}else{if(this.resourcePrivate||this.defaultView==com.ibm.widgets.AddRating._viewPrivate){this.fetchPrivateRatings();}}if(this.isAnonymous){this.handleAnonymousCase();}this.activateSubmitDialog(false);if(this.bIsTracing){this.traceExit(m);}},_initializeEvents:function(){var m="_initializeEvents()";if(this.bIsTracing){this.traceEntry(m);}this.submitDialog.onclick=dojo.hitch(this,function(){this.saveRatings();return false;});this.onCancel=this.closeButtonNode.onclick=this.dialogCancel.onclick=dojo.hitch(this,function(){this.cancelRatings();return false;});this.tabPublic.onclick=dojo.hitch(this,function(){this.switchToPublicView();return false;});this.tabPrivate.onclick=dojo.hitch(this,function(){this.switchToPrivateView();return false;});this.deleteLinkAnchor.onclick=dojo.hitch(this,function(){this.deleteIsMineOrPrivateRating();return false;});dojo.connect(this.closeButtonNode,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey"));dojo.connect(this.deleteLinkAnchor,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey"));dojo.connect(this.deleteAllLinkAnchor,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey"));dojo.connect(this.dialogCancel,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey"));if(this.bIsTracing){this.traceExit(m);}},_initializeParameters:function(){var m="_initializeEvents()";if(this.bIsTracing){this.traceEntry(m);}if(!("numStars" in this.params)){if(ibmPortalCPConfig.rating.dialog.numStars!==null&&typeof ibmPortalCPConfig.rating.dialog.numStars!=="undefined"){this.numStars=ibmPortalCPConfig.rating.dialog.numStars;}else{this.numStars=com.ibm.widgets.AddRating._numStars;}}if(!("defaultView" in this.params)){if(ibmPortalCPConfig.rating.dialog.defaultView!==null&&typeof ibmPortalCPConfig.rating.dialog.defaultView!=="undefined"){this.defaultView=ibmPortalCPConfig.rating.dialog.defaultView;}else{this.defaultView=com.ibm.widgets.AddRating._viewPublic;}}if(!("deletingEnabled" in this.params)){if(ibmPortalCPConfig.rating.dialog.deletingEnabled!==null&&typeof ibmPortalCPConfig.rating.dialog.deletingEnabled!=="undefined"){this.deletingEnabled=ibmPortalCPConfig.rating.dialog.deletingEnabled;}else{this.deletingEnabled=com.ibm.widgets.AddRating._deletingEnabled;}}if(!("customLabelCommunityRatings" in this.params)){if(ibmPortalCPConfig.rating.dialog.customLabelCommunityRatings!==null&&typeof ibmPortalCPConfig.rating.dialog.customLabelCommunityRatings!=="undefined"){this.customLabelCommunityRatings=ibmPortalCPConfig.rating.dialog.customLabelCommunityRatings;}else{this.customLabelCommunityRatings=null;}}if(!("customLabelPersonalPublicRatings" in this.params)){if(ibmPortalCPConfig.rating.dialog.customLabelPersonalPublicRatings!==null&&typeof ibmPortalCPConfig.rating.dialog.customLabelPersonalPublicRatings!=="undefined"){this.customLabelPersonalPublicRatings=ibmPortalCPConfig.rating.dialog.customLabelPersonalPublicRatings;}else{this.customLabelPersonalPublicRatings=null;}}if(!("customLabelPersonalPrivateRatings" in this.params)){if(ibmPortalCPConfig.rating.dialog.customLabelPersonalPrivateRatings!==null&&typeof ibmPortalCPConfig.rating.dialog.customLabelPersonalPrivateRatings!=="undefined"){this.customLabelPersonalPrivateRatings=ibmPortalCPConfig.rating.dialog.customLabelPersonalPrivateRatings;}else{this.customLabelPersonalPrivateRatings=null;}}if(!("privateRatingEnabled" in this.params)){if(ibmPortalCPConfig.rating.dialog.privateRatingEnabled!==null&&typeof ibmPortalCPConfig.rating.dialog.privateRatingEnabled!=="undefined"){this.privateRatingEnabled=ibmPortalCPConfig.rating.dialog.privateRatingEnabled;}else{this.privateRatingEnabled=com.ibm.widgets.AddRating._privateRatingEnabled;}}if(!("displayTabs" in this.params)){if(ibmPortalCPConfig.rating.dialog.displayTabs!==null&&typeof ibmPortalCPConfig.rating.dialog.displayTabs!=="undefined"){this.displayTabs=ibmPortalCPConfig.rating.dialog.displayTabs;}else{this.displayTabs=com.ibm.widgets.AddRating._displayTabs;}}if(!("messageFadeOutDuration" in this.params)){if(ibmPortalCPConfig.rating.dialog.messageFadeOutDuration!==null&&typeof ibmPortalCPConfig.rating.dialog.messageFadeOutDuration!=="undefined"){this.messageFadeOutDuration=ibmPortalCPConfig.rating.dialog.messageFadeOutDuration;}else{this.messageFadeOutDuration=com.ibm.widgets.AddRating._messageFadeOutDuration;}}if(!("resolver" in this.params)){this.ratingStore=ibmPortalConfig.resolver;}if(this.bIsTracing){this.traceExit(m);}},_determineTabDisplay:function(){var m="_determineTabDisplay()";if(this.bIsTracing){this.traceEntry(m);}if(this.resourcePrivate){dojo.style(this.liTabPublic,"display","none");this.tabPrivate.title=this.bundle.button_private;dojo.addClass(this.liTabPrivate,"lotusSelected");dojo.removeClass(this.liTabPublic,"lotusSelected");dojo.attr(this.tabPrivate,"selected","true");this.tabPublic.removeAttribute("selected");dojo.attr(this.tabContent,"aria-labelledby","tabPrivate");}if(!this.privateRatingEnabled){dojo.style(this.liTabPrivate,"display","none");}if(this.defaultView==com.ibm.widgets.AddRating._viewPrivate&&this.liTabPrivate.style.display!="none"){dojo.addClass(this.liTabPrivate,"lotusSelected");dojo.removeClass(this.liTabPublic,"lotusSelected");dojo.attr(this.tabPrivate,"selected","true");this.tabPublic.removeAttribute("selected");dojo.attr(this.tabContent,"aria-labelledby","tabPrivate");}else{if(this.defaultView==com.ibm.widgets.AddTag._viewPublic&&this.liTabPublic.style.display!="none"){dojo.addClass(this.liTabPublic,"lotusSelected");dojo.removeClass(this.liTabPrivate,"lotusSelected");dojo.attr(this.tabPublic,"selected","true");this.tabPrivate.removeAttribute("selected");dojo.attr(this.tabContent,"aria-labelledby","tabPublic");}}if(!this.displayTabs){dojo.style(this.liTabPublic,"display","none");dojo.style(this.liTabPrivate,"display","none");}if(!this.mineRatingEnabled){dojo.style(this.deleteLink,"display","none");}if(this.bIsTracing){this.traceExit(m);}},_displayLoading:function(_189){var m="_displayLoading(ratingType)";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"ratingType: ",[_189]);}if(_189==com.ibm.widgets.AddRating._ratingTypePersonal){dojo.attr(this.personalLoadingDiv,"style","");dojo.removeAttr(this.personalLoadingDiv,"style");dojo.style(this.personalRatingRow,"display","none");}else{dojo.attr(this.loadingDiv,"style","");dojo.removeAttr(this.loadingDiv,"style");dojo.style(this.communityRatingRow,"display","none");}this.traceExit(m);},_displayRatings:function(_18a){var m="_displayTags(ratingType)";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"ratingType: ",[_18a]);}if(_18a==com.ibm.widgets.AddRating._ratingTypePersonal){dojo.style(this.personalLoadingDiv,"display","none");dojo.attr(this.personalRatingRow,"style","");dojo.removeAttr(this.personalRatingRow,"style");}else{dojo.style(this.loadingDiv,"display","none");dojo.attr(this.communityRatingRow,"style","");dojo.removeAttr(this.communityRatingRow,"style");}this.traceExit(m);},_deleteAllRatingsOfResource:function(_18b){var m="_deleteAllRatingsOfResource";if(this.bIsTracing){this.traceEntry(m);}dojo.publish(com.ibm.data.Resolver.TOPICS.UpdateDigest);var _18c=dojo.xhrDelete({url:_18b,load:dojo.hitch(this,function(_18d,_18e){this.ratingStore._getDigestFromResponse(_18d,_18e);this.onSave();}),preventCache:true});this._actionDeleteAllRatingsOfResource=true;if(this.bIsTracing){this.traceExit(m);}},_onChangePrivateRating:function(_18f,_190){if(_190===0){this._setRatingWidgetTitleText(_18f,this.bundle.title_not_set);}else{this._setRatingWidgetTitleText(_18f,dojo.string.substitute(this.bundle.title_rating_percentage,[(Math.round(_190*100)/100),this.numStars]));}},_onChangeIsMineRating:function(_191,_192){if(_192===0){this._setRatingWidgetTitleText(_191,this.bundle.title_not_set);}else{this._setRatingWidgetTitleText(_191,dojo.string.substitute(this.bundle.title_rating_percentage,[(Math.round(_192*100)/100),this.numStars]));}},_onChangeAnonymousRating:function(_193,_194){if(_194===0){this._setRatingWidgetTitleText(_193,this.bundle.title_not_set);}else{this._setRatingWidgetTitleText(_193,dojo.string.substitute(this.bundle.title_rating_percentage,[(Math.round(_194*100)/100),this.numStars]));}},_removeLotusOneUIDiv:function(){if(this._lotusui_div){var _195=dojo.query("*",this._lotusui_div);if(_195.length===0){dojo.destroy(this._lotusui_div);this._lotusui_div=null;}}},_setRatingWidgetTitleText:function(_196,_197){if(typeof _196==="object"){if((typeof _196.domNode.parentNode!=="undefined")){dojo.attr(_196.domNode.parentNode,"title",_197);}dijit.setWaiState(_196.domNode,"valuetext",_197);}},_triggerOnClickEvtForSpaceKey:function(_198){if(_198){var _199=_198.target;if(_199){var key=_198.charCode;var keys=dojo.keys;if(key===keys.SPACE){if(dojo.isFunction(_199.onclick)){_199.onclick();dojo.stopEvent(_198);}}}}},_getFocusItems:function(_19a){var _19b=this.containerNode;this.containerNode=_19a;this.inherited(arguments);this.containerNode=_19b;}});com.ibm.widgets.AddRating._valueAttribute="title";com.ibm.widgets.AddRating._countAttribute="count";com.ibm.widgets.AddRating._scopeAttribute="ratingScope";com.ibm.widgets.AddRating._deleteAllLinkAttribute="deleteAllLink";com.ibm.widgets.AddRating._resourceModelSchema="rm:";com.ibm.widgets.AddRating._portletModelSchema="pm:oid:";com.ibm.widgets.AddRating._navigationModelSchema="nm:oid:";com.ibm.widgets.AddRating._cpUserModelSchema="cpum:oid:";com.ibm.widgets.AddRating._ratingSpaceEmptyURI="rtm:rs:empty";com.ibm.widgets.AddRating._ratingEmptyURI="rtm:empty";com.ibm.widgets.AddRating._widgetName="addRatings";com.ibm.widgets.AddRating._collaborativeRatingWidgetID="collaborativeRatingWidgetID";com.ibm.widgets.AddRating._isMineRatingWidgetID="isMineRatingWidgetID";com.ibm.widgets.AddRating._privateRatingWidgetID="privateRatingWidgetID";com.ibm.widgets.AddRating._anonymousRatingWidgetID="anonymousRatingWidgetID";com.ibm.widgets.AddRating._ratingTypePersonal="personal";com.ibm.widgets.AddRating._viewPrivate="PRIVATE";com.ibm.widgets.AddRating._viewPublic="PUBLIC";com.ibm.widgets.AddRating._numStars=5;com.ibm.widgets.AddRating._privateRatingEnabled=true;com.ibm.widgets.AddRating._deletingEnabled=true;com.ibm.widgets.AddRating._displayTabs=true;com.ibm.widgets.AddRating._messageFadeOutDuration=1000;com.ibm.widgets.AddRating._parameterMap_Key_RenderMode="renderMode";com.ibm.widgets.AddRating._parameterMap_Value_RenderMode_WSRP="wsrp";com.ibm.widgets.AddRating._ratingScope_community="community";com.ibm.widgets.AddRating._ratingScope_personal_public="personal_public";com.ibm.widgets.AddRating._ratingScope_personal_private="personal_private";com.ibm.widgets.AddRating._ratingScope_community_plus_personal_public=["personal_public","community"];com.ibm.widgets.AddRating._resourceType_contentnode="CONTENT_NODE";com.ibm.widgets.AddRating._resourceType_navigationnode="NAVIGATION_NODE";}if(!dojo._hasResource["com.ibm.widgets.InlineTag"]){dojo._hasResource["com.ibm.widgets.InlineTag"]=true;dojo.provide("com.ibm.widgets.InlineTag");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.widgets.InlineTag",[dijit._Widget,dijit._Templated,com.ibm.widgets._Traceable],{widgetsInTemplate:true,bIsTracing:false,resourceID:"",resourceTitle:"",resourceType:"",resourcePrivate:false,resourceCategories:null,tagScope:"COMMUNITY_PERSONAL_PUBLIC",orderMetric:"tag_space_count_reverse_name",order:"DESC",maxResults:5,showDialogLauncher:true,tagsClickable:true,tagClickActionMode:"TAG_CENTER",tagClickTransmitScopes:false,displayTwisty:"collapsed",tagsChangedEvent:"tagsChanged",customLabel:"",customMessageNoTags:"",countsEnabled:false,tagDialogWidgetParameters:null,genericParameterMap:null,prefix:"",LTR:"ltr",RTL:"rtl",bidi:null,_tagCenterAvailable:true,_fetchingScope:null,_fetchUserParam:null,_dapTags:null,_resourceSchema:"",_resource:null,_totalResults:0,defaultView:com.ibm.widgets.InlineTag._viewPublic,tagsChangedEventID:"",_isAnonymous:false,_isPreventCache:false,_tagStore:null,_tagData:null,_tagDlg:null,templateString:null,templateString:"<div dojoAttachPoint=\"inlineTagsDiv\" class=\"trc trcTagging trcInline trcInlineTagging\">\n\t<div dojoAttachPoint=\"sectionHeader\" class=\"trcInlineSection\">\n\t\t<span dojoAttachPoint=\"tagsTitle\" class=\"trcText\" title=\"${bundle.title_community_tags}\">${bundle.title_community_tags}</span>\n\t</div>\n\t<div dojoAttachPoint=\"sectionBody\" class=\"trcInlineSection\">\n\t\t<div dojoAttachPoint=\"loadingDiv\">\n\t\t\t<span class=\"lotusLoading\"><img width=\"20\" height=\"20\" src=\"${blankImage}\" alt=\"\"></span>\n\t\t</div>\n\t\t<div dojoAttachpoint=\"tagsList\"></div>\n\t</div>\n\t<div dojoAttachPoint=\"hiddenFormDiv\" name=\"hiddenFormDiv\" style=\"display:none\">\n\t <form dojoAttachPoint=\"hiddenForm\" name=\"hiddenForm\" action=\".\" method=\"GET\">\n\t \t<input dojoAttachPoint=\"hiddenFormQNameSelectedTag\" type=\"hidden\"/>\n\t \t<input dojoAttachPoint=\"hiddenFormQNameTagCloudRedirectView\" type=\"hidden\"/>\n\t \t<input dojoAttachPoint=\"hiddenFormQNameSelectedTagMode\" type=\"hidden\"/>\n\t\t \t<input dojoAttachPoint=\"hiddenFormUri\" type=\"hidden\" name=\"uri\" />\n\t\t</form>\n \t</div>\n\t<div style=\"clear:both;\"></div>\n</div>\n",blankImage:dojo.moduleUrl("dojo","resources/blank.gif").toString(),getTagStore:function(){this._tagStore=ibmPortalConfig.resolver;return this._tagStore;},constructor:function(){this.inherited("constructor","com.ibm.widgets.InlineTag");this.bIsTracing=this.isTracing();this.bundle=dojo.i18n.getLocalization("com.ibm.widgets","AddTag");if(this.bidi===null){if(this.isLeftToRight()){this.bidi=this.LTR;}else{this.bidi=this.RTL;}}this._isAnonymous=(ibmPortalConfig.currentUser)?false:true;},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}if(ibmPortalCPConfig.operations.canViewTags){this.tagsChangedEventID=this.resourceID+this.tagsChangedEvent;this._initializeParameters();this._determineResourceType();this._determineTagsType();this._determineSectionDisplay();var _19c=dojo.subscribe(this.tagsChangedEventID,this,function(args){this._updateTagsOnEvent(args);});}else{this.destroy();if(this.bIsTracing){this.trace(m,"The user does not have sufficient rights to view tags.");}}if(this.bIsTracing){this.traceExit(m);}},fetchTags:function(_19d){var m="fetchTags()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"retrieving URI: ",[com.ibm.widgets.InlineTag._tagSpaceEmptyURI,this._resource,this._fetchingScope,this.maxResults,this.orderMetric,this.order]);this.trace(m,"fetchUserParam URI: ",[this._fetchUserParam]);}this._displayLoading();var _19e;if(!_19d){_19e={uri:com.ibm.widgets.InlineTag._tagSpaceEmptyURI,rmparam:this._resource,scope:this._fetchingScope,"max-results":this.maxResults,"start-index":0,orderMetric:this.orderMetric,order:this.order};}else{_19e={uri:com.ibm.widgets.InlineTag._tagSpaceEmptyURI,rmparam:this._resource,scope:this._fetchingScope,orderMetric:this.orderMetric,order:this.order};}if(this._fetchUserParam){_19e.cpumparam=com.ibm.widgets.InlineTag._cpUserModelSchema+this._fetchUserParam;}if(this.prefix!==""){_19e.prefix=this.prefix;}this._tagData=this.getTagStore().fetch({query:_19e,queryOptions:{preventCache:true},onBegin:dojo.hitch(this,"onFetchBegin"),onComplete:dojo.hitch(this,"displayTags"),onError:dojo.hitch(this,"fetchError")});if(this.bIsTracing){this.traceExit(m);}},fetchError:function(err,_19f,_1a0){var m="fetchError(err, errText, errDetails)";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"errText: ",[_19f]);this.trace(m,"errDetails: ",[_1a0]);}if((err!==null)&&(err.status==401)){top.location.href=document.location.href;}else{if(this.bIsTracing){this.trace(m,"errText: ",[_19f]);}}if(this.bIsTracing){this.traceExit(m);}},displayTags:function(_1a1,_1a2){var m="displayTags(items, request)";if(this.bIsTracing){this.traceEntry(m);}dojo.empty(this.tagsList);var div=dojo.create("div",null,this.tagsList);dojo.addClass(div,"lotusTagCloud lotusui");this._dapTags=div;var img,link,span;this._displayTags();if(_1a1.length<1){if(this.customMessageNoTags!==null){dojo.place(dojo.doc.createTextNode(this.customMessageNoTags),div,"last");dojo.attr(div,"title",this.customMessageNoTags);}else{dojo.place(dojo.doc.createTextNode(this.bundle.text_no_tags_on_this_resource),div,"last");dojo.attr(div,"title",this.bundle.text_no_tags_on_this_resource);}if(this.showDialogLauncher&&(ibmPortalCPConfig.operations.canCreatePrivateTags||ibmPortalCPConfig.operations.canCreatePublicTags)){link=dojo.create("a",{href:"javascript:;",title:this.bundle.title_open_widget},div);img=dojo.create("img",{src:this.blankImage,alt:""},link);img.style.width="16px";img.style.height="16px";dojo.addClass(link,"trcInlineAddIcon");span=dojo.create("span",{innerHTML:this.bundle.title_open_widget},link);dojo.addClass(span,"lotusAltText");link.onclick=dojo.hitch(this,function(){this.openTagWidget();return false;});}}else{var ul=dojo.create("ul",null,div);dojo.forEach(_1a1,function(item){var _1a3=this.getTagStore().getValue(item,com.ibm.widgets.InlineTag._nameAttribute);var _1a4=this.getTagStore().getValue(item,com.ibm.widgets.InlineTag._preferredLocaleAttribute);var _1a5=this.getTagStore().getValue(item,com.ibm.widgets.InlineTag._preferredLocaleDirAttribute);var _1a6=this.removePrefix(_1a3);var li=dojo.create("li",null,ul);var tag=dojo.create("a",{title:_1a6,id:_1a6,lang:_1a4,dir:_1a5},li);if(this.tagsClickable){dojo.attr(tag,"href","javascript:;");tag.onclick=dojo.hitch(this,function(){this.selectTagRedirect(_1a3);return false;});if(this.countsEnabled){dojo.attr(tag,"innerHTML",_1a6+" ("+this.getTagStore().getValue(item,com.ibm.widgets.InlineTag._countAttribute)+")");}else{dojo.attr(tag,"innerHTML",_1a6);}}else{if(this.countsEnabled){dojo.attr(tag,"innerHTML",_1a6+" ("+this.getTagStore().getValue(item,com.ibm.widgets.InlineTag._countAttribute)+")");}else{dojo.attr(tag,"innerHTML",_1a6);}}if(_1a1.length==1||item==_1a1[_1a1.length-1]){dojo.place(dojo.doc.createTextNode(" "),ul,"last");}else{dojo.place(dojo.doc.createTextNode(", "),ul,"last");}},this);var _1a7=dojo.create("a",{title:this.bundle.title_open_widget,href:"javascript:;",innerHTML:"..."});_1a7.onclick=dojo.hitch(this,function(){if(!this._dapTags){dojo.attr(this.twistyLink,"title",this.bundle.title_hide_tags);dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistyLink,"alt","&#x25C4;");this.fetchTags(com.ibm.widgets.InlineTag._getAll);}else{dojo.attr(this.twistyLink,"alt","&#x25bc;");dojo.destroy(this._dapTags);this._dapTags=null;this.fetchTags(com.ibm.widgets.InlineTag._getAll);}return false;});if(this._totalResults>_1a1.length){dojo.place(_1a7,ul,"last");}if(this.showDialogLauncher&&(ibmPortalCPConfig.operations.canCreatePrivateTags||ibmPortalCPConfig.operations.canCreatePublicTags)){link=dojo.create("a",{href:"javascript:;",title:this.bundle.title_open_widget},ul);img=dojo.create("img",{src:this.blankImage,alt:""},link);img.style.width="16px";img.style.height="16px";dojo.addClass(link,"trcInlineAddIcon");span=dojo.create("span",{innerHTML:this.bundle.title_open_widget},link);dojo.addClass(span,"lotusAltText");link.onclick=dojo.hitch(this,function(){this.openTagWidget();return false;});}}if(this.bIsTracing){this.traceExit(m);}},_displayLoading:function(){var m="_displayLoading()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.loadingDiv,"display","block");dojo.style(this.tagsList,"display","none");if(this.bIsTracing){this.traceExit(m);}},_displayTags:function(){var m="_displayTags()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.loadingDiv,"display","none");dojo.style(this.tagsList,"display","block");this.traceExit(m);},_determineSectionDisplay:function(){var m="_determineSectionDisplay()";if(this.bIsTracing){this.traceEntry(m);}var _1a8=dojo.create("a",{title:this.bundle.title_view_tags,href:"javascript:;"});var _1a9=dojo.create("span",null,_1a8);dojo.addClass(_1a9,"lotusAltText");_1a8.onclick=dojo.hitch(this,function(){this.showWidget();return false;});this.twistyLink=_1a8;this.twistySpan=_1a9;if(!this.displayTwisty){this.displayTwisty=ibmPortalCPConfig.metaDataLine.displayTwisty;}switch(this.displayTwisty){case com.ibm.widgets.InlineTag._displayTwisty_hidden:this.showWidget();break;case com.ibm.widgets.InlineTag._displayTwisty_hidden.toUpperCase():this.showWidget();break;case com.ibm.widgets.InlineTag._displayTwisty_collapsed:dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyClosed");dojo.attr(this.twistySpan,"innerHTML","&#x25bc;");dojo.place(this.twistyLink,this.sectionHeader,"first");dojo.style(this.loadingDiv,"display","none");break;case com.ibm.widgets.InlineTag._displayTwisty_collapsed.toUpperCase():dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyClosed");dojo.attr(this.twistySpan,"innerHTML","&#x25bc;");dojo.place(this.twistyLink,this.sectionHeader,"first");dojo.style(this.loadingDiv,"display","none");break;case com.ibm.widgets.InlineTag._displayTwisty_expanded:dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistyLink,"title",this.bundle.title_hide_tags);dojo.attr(this.twistySpan,"innerHTML","&#x25C4;");dojo.place(this.twistyLink,this.sectionHeader,"first");this.showWidget();break;case com.ibm.widgets.InlineTag._displayTwisty_expanded.toUpperCase():dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistyLink,"title",this.bundle.title_hide_tags);dojo.attr(this.twistySpan,"innerHTML","&#x25C4;");dojo.place(this.twistyLink,this.sectionHeader,"first");this.showWidget();break;default:this.displayTwisty=com.ibm.widgets.InlineTag._displayTwisty_collapsed;dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyClosed");dojo.attr(this.twistySpan,"innerHTML","&#x25bc;");dojo.place(this.twistyLink,this.sectionHeader,"first");dojo.style(this.loadingDiv,"display","none");break;}if(this.bIsTracing){this.traceExit(m);}},showWidget:function(_1aa){var m="showWidget(event)";if(this.bIsTracing){this.traceEntry(m);}if(!this._dapTags){dojo.attr(this.twistyLink,"title",this.bundle.title_hide_tags);dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistySpan,"innerHTML","&#x25C4;");this.fetchTags();}else{dojo.attr(this.twistyLink,"title",this.bundle.title_view_tags);dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyClosed");dojo.attr(this.twistySpan,"innerHTML","&#x25bc;");dojo.destroy(this._dapTags);this._dapTags=null;}if(this.bIsTracing){this.traceExit(m);}},selectTagRedirect:function(_1ab){var m="selectTagRedirect(tagName)";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"tagName: ",[_1ab]);}if(this.prefix===""){this.hiddenFormQNameSelectedTag.name=com.ibm.widgets.InlineTag._qnameSelectedTagAll;this.hiddenFormQNameSelectedTag.value=_1ab;this.hiddenFormQNameTagCloudRedirectView.name=com.ibm.widgets.InlineTag._qnameTagCloudRedirectView;this.hiddenFormQNameTagCloudRedirectView.value=com.ibm.widgets.InlineTag._tagCloudView_all;this.hiddenFormQNameSelectedTagMode.name=com.ibm.widgets.InlineTag._qnameSelectedTagMode;this.hiddenFormQNameSelectedTagMode.value=com.ibm.widgets.InlineTag._tagCloudView_all;}else{if(this.prefix===com.ibm.widgets.InlineTag._prefixSuggestedLinks){this.hiddenFormQNameSelectedTag.name=com.ibm.widgets.InlineTag._qnameSuggestedLinks;this.hiddenFormQNameSelectedTag.value=_1ab;this.hiddenFormQNameTagCloudRedirectView.name=com.ibm.widgets.InlineTag._qnameTagCloudRedirectView;this.hiddenFormQNameTagCloudRedirectView.value=com.ibm.widgets.InlineTag._tagCloudView_suggestedLinks;this.hiddenFormQNameSelectedTagMode.name=com.ibm.widgets.InlineTag._qnameSelectedTagMode;this.hiddenFormQNameSelectedTagMode.value=com.ibm.widgets.InlineTag._tagCloudView_suggestedLinks;}else{if(this.prefix===com.ibm.widgets.InlineTag._prefixAnalytics){this.hiddenFormQNameSelectedTag.name=com.ibm.widgets.InlineTag._qnameAnalytics;this.hiddenFormQNameSelectedTag.value=_1ab;this.hiddenFormQNameTagCloudRedirectView.name=com.ibm.widgets.InlineTag._qnameTagCloudRedirectView;this.hiddenFormQNameTagCloudRedirectView.value=com.ibm.widgets.InlineTag._tagCloudView_analytics;this.hiddenFormQNameSelectedTagMode.name=com.ibm.widgets.InlineTag._qnameSelectedTagMode;this.hiddenFormQNameSelectedTagMode.value=com.ibm.widgets.InlineTag._tagCloudView_analytics;}}}if(this._tagCenterAvailable){if(this.tagClickActionMode==com.ibm.widgets.InlineTag._tagClickActionMode_tag_center){this.hiddenFormUri.value=com.ibm.widgets.InlineTag._uriTagCenter;}else{this.hiddenFormUri.value=com.ibm.widgets.InlineTag._uriPRP;}}if(this.tagClickTransmitScopes){if(this.resourceCategories&&this.resourceCategories!==""){dojo.forEach(this.resourceCategories,function(_1ac){var _1ad=dojo.create("input",{type:"hidden",name:com.ibm.widgets.InlineTag._qnameSelectedCategories,value:_1ac},this.hiddenForm);},this);}}this.hiddenForm.submit();if(this.bIsTracing){this.traceExit(m);}},_determineTagsType:function(){var m="_determineTagsType()";if(this.bIsTracing){this.traceEntry(m);}switch(this.tagScope){case com.ibm.widgets.InlineTag._tagScope_community:if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_community_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_community_tags);}this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_community.toUpperCase():if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_community_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_community_tags);}this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_personal:if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_your_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_your_tags);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_personal.toUpperCase():if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_your_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_your_tags);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_personal_public:if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_pub_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_pub_tags);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_personal_public.toUpperCase():if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_pub_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_pub_tags);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_personal_private:if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_priv_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_priv_tags);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_personal_private.toUpperCase():if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_priv_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_priv_tags);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_all:if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_all_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_all_tags);}this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_all.toUpperCase():if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_all_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_all_tags);}this._fetchingScope=this.tagScope;break;case com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public_name:if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_community_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_community_tags);}this._fetchingScope=com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public;break;case com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public_name.toLowerCase():if(this.customLabel!==null){this.tagsTitle.innerHTML=this.customLabel;dojo.attr(this.tagsTitle,"title",this.customLabel);}else{this.tagsTitle.innerHTML=this.bundle.title_community_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_community_tags);}this._fetchingScope=com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public;break;default:this._fetchingScope=com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public;this.tagsTitle.innerHTML=this.bundle.title_community_tags;dojo.attr(this.tagsTitle,"title",this.bundle.title_community_tags);this.tagScope=com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public_name;break;}if(this.bIsTracing){this.traceExit(m);}},openTagWidget:function(){var m="openTagWidget()";if(this.bIsTracing){this.traceEntry(m);}var _1ae={resourceID:this.resourceID,resourceType:this.resourceType,resourceTitle:this.resourceTitle,resourceCategories:this.resourceCategories,prefix:this.prefix};if(!this.tagDialogWidgetParameters){this.tagDialogWidgetParameters=_1ae;}else{this.tagDialogWidgetParameters.resourceID=this.resourceID;this.tagDialogWidgetParameters.resourceType=this.resourceType;this.tagDialogWidgetParameters.resourceTitle=this.resourceTitle;this.tagDialogWidgetParameters.resourceCategories=this.resourceCategories;this.tagDialogWidgetParameters.prefix=this.prefix;}if(this.tagScope.toLowerCase()==com.ibm.widgets.InlineTag._tagScope_personal_private){_1ae.defaultView=com.ibm.widgets.InlineTag._viewPrivate;}else{_1ae.defaultView=com.ibm.widgets.InlineTag._viewPublic;}if(this.genericParameterMap){this.tagDialogWidgetParameters.genericParameterMap=this.genericParameterMap;}var _1af=new com.ibm.widgets.AddTag(this.tagDialogWidgetParameters);this._tagDlg=_1af;if(this.bIsTracing){this.traceExit(m);}},_determineResourceType:function(){var m="_determineResourceType()";if(this.bIsTracing){this.traceEntry(m);}switch(this.resourceType){case com.ibm.widgets.InlineTag._resourceType_contentnode:this._resourceSchema=com.ibm.widgets.InlineTag._navigationModelSchema;this._setResource(com.ibm.widgets.InlineTag._resourceModelSchema+this._resourceSchema+this.resourceID);break;case com.ibm.widgets.InlineTag._resourceType_navigationnode:this._resourceSchema=com.ibm.widgets.InlineTag._portletModelSchema;this._setResource(com.ibm.widgets.InlineTag._resourceModelSchema+this._resourceSchema+this.resourceID);break;default:this._setResource(com.ibm.widgets.InlineTag._resourceModelSchema+this.resourceID);break;}if(this.bIsTracing){this.traceExit(m);}},_setResource:function(_1b0){var m="_setResource(resource)";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"resource: ",[_1b0]);}this._resource=_1b0;if(this.bIsTracing){this.traceExit(m);}},_updateTagsOnEvent:function(args){var m="_updateTagsOnEvent(args)";if(this.bIsTracing){this.traceEntry(m);}if((this.tagScope==com.ibm.widgets.InlineTag._tagScope_personal)||(this.tagScope==com.ibm.widgets.InlineTag._tagScope_all)||(this.tagScope==com.ibm.widgets.InlineTag._tagScope_all.toUpperCase())||(this.tagScope==com.ibm.widgets.InlineTag._tagScope_personal.toUpperCase())||(args.scope==com.ibm.widgets.InlineTag._tagScope_personal_public&&this.tagScope==com.ibm.widgets.InlineTag._tagScope_personal_public)||(args.scope==com.ibm.widgets.InlineTag._tagScope_personal_public&&this.tagScope==com.ibm.widgets.InlineTag._tagScope_personal_public.toUpperCase())||(args.scope==com.ibm.widgets.InlineTag._tagScope_personal_private&&this.tagScope==com.ibm.widgets.InlineTag._tagScope_personal_private)||(args.scope==com.ibm.widgets.InlineTag._tagScope_personal_private&&this.tagScope==com.ibm.widgets.InlineTag._tagScope_personal_private.toUpperCase())||(args.scope==com.ibm.widgets.InlineTag._tagScope_personal_public&&this.tagScope==com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public_name)||(args.scope==com.ibm.widgets.InlineTag._tagScope_personal_public&&this.tagScope==com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public_name.toLowerCase())){if(!this._dapTags){dojo.attr(this.twistyLink,"title",this.bundle.title_hide_tags);dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistyLink,"alt","&#x25C4;");this.fetchTags();}else{dojo.attr(this.twistyLink,"alt","&#x25bc;");dojo.destroy(this._dapTags);this._dapTags=null;this.fetchTags();}}if(this._tagDlg){this._tagDlg.refocus=false;}if(this.bIsTracing){this.traceExit(m);}},onFetchBegin:function(_1b1,_1b2){var m="onFetchBegin(totalResultSize, requestObject)";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"totalResultSize: ",[_1b1]);}this._totalResults=_1b1;if(this.bIsTracing){this.traceExit(m);}},_initializeParameters:function(){var m="_initializeParameters()";if(this.bIsTracing){this.traceEntry(m);}if(!("resolver" in this.params)){this.tagStore=ibmPortalConfig.resolver;}if(!("tagScope" in this.params)){if(ibmPortalCPConfig.tagging.inline.tagScope!==null&&typeof ibmPortalCPConfig.tagging.inline.tagScope!=="undefined"){this.tagScope=ibmPortalCPConfig.tagging.inline.tagScope;}else{this.tagScope=com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public;}}if(!("orderMetric" in this.params)){if(ibmPortalCPConfig.tagging.inline.orderMetric!==null&&typeof ibmPortalCPConfig.tagging.inline.orderMetric!=="undefined"){this.orderMetric=ibmPortalCPConfig.tagging.inline.orderMetric;}else{this.orderMetric=com.ibm.widgets.InlineTag._DEFAULT_ORDER_METRIC;}}if(!("order" in this.params)){if(ibmPortalCPConfig.tagging.inline.order!==null&&typeof ibmPortalCPConfig.tagging.inline.order!=="undefined"){this.order=ibmPortalCPConfig.tagging.inline.order;}else{this.order=com.ibm.widgets.InlineTag._DEFAULT_ORDER;}}if(!("maxResults" in this.params)){if(ibmPortalCPConfig.tagging.inline.maxResults!==null&&typeof ibmPortalCPConfig.tagging.inline.maxResults!=="undefined"){this.maxResults=ibmPortalCPConfig.tagging.inline.maxResults;}else{this.maxResults=com.ibm.widgets.InlineTag._maxResults;}}if(!("showDialogLauncher" in this.params)){if(ibmPortalCPConfig.tagging.inline.showDialogLauncher!==null&&typeof ibmPortalCPConfig.tagging.inline.showDialogLauncher!=="undefined"){this.showDialogLauncher=ibmPortalCPConfig.tagging.inline.showDialogLauncher;}else{this.showDialogLauncher=com.ibm.widgets.InlineTag._showDialogLauncher;}}if(!("tagsClickable" in this.params)){if(ibmPortalCPConfig.tagging.inline.tagsClickable!==null&&typeof ibmPortalCPConfig.tagging.inline.tagsClickable!=="undefined"){this.tagsClickable=ibmPortalCPConfig.tagging.inline.tagsClickable;}else{this.tagsClickable=com.ibm.widgets.InlineTag._tagsClickable;}}if(!("displayTwisty" in this.params)){if(ibmPortalCPConfig.tagging.inline.displayTwistyv!==null&&typeof ibmPortalCPConfig.tagging.inline.displayTwisty!=="undefined"){this.displayTwisty=ibmPortalCPConfig.tagging.inline.displayTwisty;}else{this.displayTwisty=com.ibm.widgets.InlineTag._displayTwisty;}}if(!("customLabel" in this.params)){if(ibmPortalCPConfig.tagging.inline.customLabel!==null&&typeof ibmPortalCPConfig.tagging.inline.customLabel!=="undefined"){this.customLabel=ibmPortalCPConfig.tagging.inline.customLabel;}else{this.customLabel=null;}}if(!("tagClickActionMode" in this.params)){if(ibmPortalCPConfig.tagging.inline.tagClickActionMode!==null&&typeof ibmPortalCPConfig.tagging.inline.tagClickActionMode!=="undefined"){this.tagClickActionMode=ibmPortalCPConfig.tagging.inline.tagClickActionMode;}else{this.tagClickActionMode=com.ibm.widgets.InlineTag._tagClickActionMode;}}if(!("tagClickTransmitScopes" in this.params)){if(ibmPortalCPConfig.tagging.inline.tagClickTransmitScopes!==null&&typeof ibmPortalCPConfig.tagging.inline.tagClickTransmitScopes!=="undefined"){this.tagClickTransmitScopes=ibmPortalCPConfig.tagging.inline.tagClickTransmitScopes;}else{this.tagClickTransmitScopes=com.ibm.widgets.InlineTag._tagClickTransmitScopes;}}if(!("tagsChangedEvent" in this.params)){if(ibmPortalCPConfig.tagging.inline.tagsChangedEvent!==null&&typeof ibmPortalCPConfig.tagging.inline.tagsChangedEvent!=="undefined"){this.tagsChangedEvent=ibmPortalCPConfig.tagging.inline.tagsChangedEvent;}else{this.tagsChangedEvent=com.ibm.widgets.InlineTag._DEFAULT_TAGSCHANGED_EVENT_NAME;}}if(!("customMessageNoTags" in this.params)){if(ibmPortalCPConfig.tagging.inline.customMessageNoTags!==null&&typeof ibmPortalCPConfig.tagging.inline.customMessageNoTags!=="undefined"){this.customMessageNoTags=ibmPortalCPConfig.tagging.inline.customMessageNoTags;}else{this.customMessageNoTags=null;}}if(!("countsEnabled" in this.params)){if(ibmPortalCPConfig.tagging.inline.countsEnabled!==null&&typeof ibmPortalCPConfig.tagging.inline.countsEnabled!=="undefined"){this.countsEnabled=ibmPortalCPConfig.tagging.inline.countsEnabled;}else{this.countsEnabled=com.ibm.widgets.InlineTag._countsEnabled;}}if(this.bIsTracing){this.traceExit(m);}},removePrefix:function(_1b3){var _1b4=_1b3;if(this.prefix!==""){_1b4=_1b3.slice(this.prefix.length,_1b3.length);}return _1b4;}});com.ibm.widgets.InlineTag._qnameSelectedTagAll="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_all";com.ibm.widgets.InlineTag._qnameSuggestedLinks="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_suggestedlinks";com.ibm.widgets.InlineTag._qnameAnalytics="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_analytics";com.ibm.widgets.InlineTag._qnameSelectedCategories="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}sc";com.ibm.widgets.InlineTag._qnameTagCloudRedirectView="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}tcrv";com.ibm.widgets.InlineTag._qnameSelectedTagMode="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stm";com.ibm.widgets.InlineTag._uriTagCenter="tm:tc";com.ibm.widgets.InlineTag._uriPRP="tm:prp";com.ibm.widgets.InlineTag._tagScope_all="all";com.ibm.widgets.InlineTag._tagScope_community="community";com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public=["personal_public","community"];com.ibm.widgets.InlineTag._tagScope_community_plus_personal_public_name="COMMUNITY_PERSONAL_PUBLIC";com.ibm.widgets.InlineTag._tagScope_personal="personal";com.ibm.widgets.InlineTag._tagScope_personal_public="personal_public";com.ibm.widgets.InlineTag._tagScope_personal_private="personal_private";com.ibm.widgets.InlineTag._getAll=true;com.ibm.widgets.InlineTag._viewPrivate="PRIVATE";com.ibm.widgets.InlineTag._viewPublic="PUBLIC";com.ibm.widgets.InlineTag._tagCloudView_all="all";com.ibm.widgets.InlineTag._tagCloudView_suggestedLinks="suggested_links";com.ibm.widgets.InlineTag._tagCloudView_analytics="analytics";com.ibm.widgets.InlineTag._tagClickActionMode_tag_center="TAG_CENTER";com.ibm.widgets.InlineTag._tagClickActionMode_public_render_parameter="PUBLIC_RENDER_PARAMETER";com.ibm.widgets.InlineTag._nameAttribute="title";com.ibm.widgets.InlineTag._preferredLocaleAttribute="preferredLocale";com.ibm.widgets.InlineTag._preferredLocaleDirAttribute="preferredLocaleDir";com.ibm.widgets.InlineTag._countAttribute="count";com.ibm.widgets.InlineTag._resourceModelSchema="rm:";com.ibm.widgets.InlineTag._portletModelSchema="pm:oid:";com.ibm.widgets.InlineTag._navigationModelSchema="nm:oid:";com.ibm.widgets.InlineTag._cpUserModelSchema="cpum:oid:";com.ibm.widgets.InlineTag._tagSpaceEmptyURI="tm:ts:empty";com.ibm.widgets.InlineTag._displayTwisty_collapsed="collapsed";com.ibm.widgets.InlineTag._displayTwisty_hidden="hidden";com.ibm.widgets.InlineTag._displayTwisty_expanded="expanded";com.ibm.widgets.InlineTag._resourceType_contentnode="CONTENT_NODE";com.ibm.widgets.InlineTag._resourceType_navigationnode="NAVIGATION_NODE";com.ibm.widgets.InlineTag._DEFAULT_ORDER_METRIC="tag_space_count_reverse_name";com.ibm.widgets.InlineTag._DEFAULT_ORDER="DESC";com.ibm.widgets.InlineTag._DEFAULT_DISPLAY_TWISTY_VALUE="collapsed";com.ibm.widgets.InlineTag._DEFAULT_TAGSCHANGED_EVENT_NAME="tagsChanged";com.ibm.widgets.InlineTag._maxResults=5;com.ibm.widgets.InlineTag._showDialogLauncher=true;com.ibm.widgets.InlineTag._tagsClickable=true;com.ibm.widgets.InlineTag._displayTwisty="collapsed";com.ibm.widgets.InlineTag._tagClickActionMode="TAG_CENTER";com.ibm.widgets.InlineTag._tagClickTransmitScopes=true;com.ibm.widgets.InlineTag._countsEnabled=false;com.ibm.widgets.InlineTag._prefixSuggestedLinks="com.ibm.portal.suggestedLinks.";com.ibm.widgets.InlineTag._prefixAnalytics="com.ibm.portal.asa.";}if(!dojo._hasResource["com.ibm.widgets.InlineRating"]){dojo._hasResource["com.ibm.widgets.InlineRating"]=true;dojo.provide("com.ibm.widgets.InlineRating");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.widgets.InlineRating",[com.ibm.widgets._Traceable,dijit._Widget,dijit._Templated],{widgetsInTemplate:true,bIsTraceable:false,resourceID:"",resourceTitle:"",resourceType:"",resourcePrivate:false,numStars:5,showDialogLauncher:true,onStarHoverShowRatingDistribution:true,onStarClickOpenDialog:true,ratingScope:"COMMUNITY_PERSONAL_PUBLIC",displayTwisty:"collapsed",customLabel:"",ratingDistributionPosition:[30,30],ratingsChangedEvent:"ratingsChanged",ratingDialogWidgetParameters:null,genericParameterMap:null,_resourceSchema:"",_resource:null,_myChart:null,_isAnonymous:false,_isPreventCache:false,_fetchingScope:null,_fetchUserParam:null,_dapRatings:null,_dapRatingWidget:null,_dapRatingDistDiv:null,_dapOpenWidgetLink:null,_connHandlers:[],defaultView:"PUBLIC",_ratingStore:null,_ratingData:null,_ratingDlg:null,ratingsChangedEventID:"",templateString:null,templateString:"<div dojoAttachPoint=\"inlineRatingsDiv\" class=\"trc trcRating trcInline trcInlineRating\">\n\t<div dojoAttachPoint=\"sectionHeader\" class=\"trcInlineSection\">\n\t\t<span dojoAttachPoint=\"ratingsTitle\" class=\"trcText\" title=\"${bundle.title_community_rating}\">${bundle.title_community_rating}</span>\n\t</div>\n\t<div dojoAttachPoint=\"sectionBody\" class=\"trcInlineSection trcRelative\">\n\t\t<div dojoAttachPoint=\"loadingDiv\">\n\t\t\t<span class=\"lotusLoading\"><img width=\"20\" height=\"20\" src=\"${blankImage}\" alt=\"\"></span>\n\t\t</div>\n\t\t<div dojoAttachpoint=\"ratingsDiv\"></div>\n\t\t<div dojoAttachPoint=\"popupRatingDistWrapper\" class=\"lotusHelp trcRatingDist\">\n\t\t\t<div class=\"lotusInfoBox\" dojoAttachPoint=\"popupRatingDist\"></div>\n\t\t</div>\n\t</div>\n\t<div style=\"clear:both;\"></div>\n</div>\n",blankImage:dojo.moduleUrl("dojo","resources/blank.gif").toString(),getRatingStore:function(){return this._ratingStore;},constructor:function(){dojo.forEach(this._connHandlers,dojo.disconnect);this.inherited("constructor","com.ibm.widgets.InlineRating");this.bIsTracing=this.isTracing();this.bundle=dojo.i18n.getLocalization("com.ibm.widgets","AddRating");this._isAnonymous=(ibmPortalConfig.currentUser)?false:true;if(!this.id){this.id="";}},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}if(ibmPortalCPConfig.operations.canViewRatings){if(this.bIsTracing){this.trace(m,"The user has sufficient rights to view ratings.");}this.ratingsChangedEventID=this.resourceID+this.ratingsChangedEvent;if(!this._ratingStore){this._ratingStore=ibmPortalConfig.resolver;}var _1b5=dojo.subscribe(this.ratingsChangedEventID,this,function(args){this._updateRatingsOnEvent(args);});this._initializeParameters();this._determineResourceType();this._determineRatingsType();this._determineSectionDisplay();}else{this.destroy();if(this.bIsTracing){this.trace(m,"The user does not have sufficient rights to view ratings.");}}if(this.bIsTracing){this.traceExit(m);}},fetchRatings:function(){var m="fetchRatings()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"fetchUserParam",this.fetchUserParam);}this._displayLoading();var _1b6={uri:com.ibm.widgets.InlineRating._ratingSpaceEmptyURI,rmparam:com.ibm.widgets.InlineRating._resourceModelSchema+this._resourceSchema+this.resourceID,scope:this._fetchingScope};if(this._fetchUserParam){_1b6.cpumparam=com.ibm.widgets.InlineRating._cpUserModelSchema+this._fetchUserParam;}this._ratingData=this.getRatingStore().fetch({query:_1b6,queryOptions:{preventCache:true},onComplete:dojo.hitch(this,"displayRatings"),onError:dojo.hitch(this,"fetchError")});if(this.bIsTracing){this.traceExit(m);}},fetchError:function(err,_1b7,_1b8){var m="fetchError(err, errText, errDetails)";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"errText: ",[_1b7]);this.trace(m,"errDetails: ",[_1b8]);}if((err!==null)&&(err.status==401)){top.location.href=document.location.href;}else{if(this.bIsTracing){this.trace(m,"errText: ",[_1b7]);}}if(this.bIsTracing){this.traceExit(m);}},displayRatings:function(_1b9,_1ba){var m="displayRatings(items, request)";if(this.bIsTracing){this.traceEntry(m,[_1b9,_1ba]);}if(!dojo.hasClass(this.twistyLink,"lotusTwistyOpen")){dojo.style(this.sectionBody,"float","left");dojo.attr(this.twistyLink,"title",this.bundle.title_hide_ratings);dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistyLink,"alt","&#x25C4;");}var _1bb=false;var _1bc=0;var _1bd=0;var _1be=[];for(var k=0;k<this.numStars;k++){_1be[k]=0;}var _1bf=0;var _1c0=0;var _1c1=0;var _1c2=0;var _1c3=0;dojo.forEach(_1b9,function(item){_1bb=true;var _1c4=parseInt(this.getRatingStore().getValue(item,com.ibm.widgets.InlineRating._valueAttribute),10);if(this.bIsTracing){this.trace(m,"ratingValue",_1c4);}var _1c5=parseInt(this.getRatingStore().getValue(item,com.ibm.widgets.InlineRating._countAttribute),10);if(this.bIsTracing){this.trace(m,"Count",_1c4);}if(this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_community||this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_all||this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public_name){_1be[_1c4-1]=_1be[_1c4-1]+_1c5;}switch(_1c4){case 1:_1bf=_1bf+_1c5;break;case 2:_1c0=_1c0+_1c5;break;case 3:_1c1=_1c1+_1c5;break;case 4:_1c2=_1c2+_1c5;break;case 5:_1c3=_1c3+_1c5;break;default:break;}_1bc=_1bc+_1c5;_1bd=_1bd+(_1c4*_1c5);},this);var div=null;var link=null;var img=null;var span=null;var _1c6;this._displayRatings();if(_1bb){if(this.bIsTracing){this.trace(m,"numberOfRatings",_1bc);this.trace(m,"totalRatingValue",_1bd);}var _1c7=_1bd/_1bc;if(this.bIsTracing){this.trace(m,"averageRatingValue",_1c7);}if(this._dapRatingWidget){dojo.attr(this._dapRatingWidget,"value",_1c7);dojo.parser.parse(this.ratingsDiv.parent);}else{div=dojo.create("div",{id:"dapRatings"},this.ratingsDiv);this._dapRatings=div;this._dapRatingWidget=dijit.byId(this.id+this.resourceID+this.ratingScope+com.ibm.widgets.InlineRating.inlineRatingWidgetID);if(this._dapRatingWidget){this._dapRatingWidget.destroy();}_1c6=dojo.string.substitute(this.bundle.title_rating_percentage,[(Math.round(_1c7*100)/100),this.numStars]);if(this.bundle.title_click_to_add_ratings){_1c6+=this.bundle.title_click_to_add_ratings;}this._dapRatingWidget=new com.ibm.widgets.Rating({id:this.id+this.resourceID+this.ratingScope+com.ibm.widgets.InlineRating.inlineRatingWidgetID,numStars:this.numStars,value:_1c7,hoverable:false,clickable:false,titleText:_1c6},this._dapRatings);dijit.setWaiRole(this.ratingsDiv,"link");if(this.showDialogLauncher&&(ibmPortalCPConfig.operations.canCreatePrivateRatings||ibmPortalCPConfig.operations.canCreatePublicRatings)){link=dojo.create("a",{href:"javascript:;",title:this.bundle.title_open_widget},this.ratingsDiv);img=dojo.create("img",{style:"padding: 3px",src:this.blankImage,alt:""},link);img.style.width="16px";img.style.height="16px";dojo.addClass(link,"trcInlineAddIcon");span=dojo.create("span",{innerHTML:"Open the rating widget"},link);dojo.addClass(span,"lotusAltText");link.onclick=dojo.hitch(this,function(){this.openRatingWidget();return false;});this._dapOpenWidgetLink=link;}if(this.onStarHoverShowRatingDistribution&&(this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_community||this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_all||this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public_name)){this.displayCollaborativeRatingDistribution(_1be);this._connHandlers.push(dojo.connect(this._dapRatingWidget.domNode,"onmouseover",dojo.hitch(this,"_showPopup")));this._connHandlers.push(dojo.connect(this._dapRatingWidget.domNode,"onmouseout",dojo.hitch(this,"_hidePopup")));}if(this.onStarClickOpenDialog){this._connHandlers.push(dojo.connect(this._dapRatingWidget.domNode,"onclick",dojo.hitch(this,"openRatingWidget")));this._connHandlers.push(dojo.connect(this._dapRatingWidget.domNode,"onkeyup",dojo.hitch(this,"_checkKeySubmit")));}if(this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_community||this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_all||this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public_name){this._dapRatingWidget.setAttribute("halfStarSupport","true");}}}else{div=dojo.create("div",{id:"dapRatings"},this.ratingsDiv);this._dapRatings=div;this._dapRatingWidget=dijit.byId(this.id+this.resourceID+this.ratingScope+com.ibm.widgets.InlineRating.inlineRatingWidgetID);if(this._dapRatingWidget){this._dapRatingWidget.destroy();}_1c6=this.bundle.title_not_set;if(this.bundle.title_click_to_add_ratings){_1c6+=this.bundle.title_click_to_add_ratings;}this._dapRatingWidget=new com.ibm.widgets.Rating({id:this.id+this.resourceID+this.ratingScope+com.ibm.widgets.InlineRating.inlineRatingWidgetID,numStars:this.numStars,value:0,hoverable:false,clickable:false,titleText:_1c6},this._dapRatings);dijit.setWaiRole(this.ratingsDiv,"link");if(this.onStarClickOpenDialog){this._connHandlers.push(dojo.connect(this._dapRatingWidget.domNode,"onclick",dojo.hitch(this,"openRatingWidget")));this._connHandlers.push(dojo.connect(this._dapRatingWidget.domNode,"onkeyup",dojo.hitch(this,"_checkKeySubmit")));}if(this.showDialogLauncher&&(ibmPortalCPConfig.operations.canCreatePrivateRatings||ibmPortalCPConfig.operations.canCreatePublicRatings)){link=dojo.create("a",{href:"javascript:;",title:this.bundle.title_open_widget},this.ratingsDiv);img=dojo.create("img",{src:this.blankImage,alt:""},link);img.style.width="16px";img.style.height="16px";dojo.addClass(link,"trcInlineAddIcon");span=dojo.create("span",{innerHTML:"Open the rating widget"},link);dojo.addClass(span,"lotusAltText");link.onclick=dojo.hitch(this,function(){this.openRatingWidget();return false;});this._dapOpenWidgetLink=link;}}if(this.bIsTracing){this.traceExit(m);}},_displayLoading:function(){var m="_displayLoading()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.loadingDiv,"display","block");dojo.style(this.ratingsDiv,"display","none");if(this.bIsTracing){this.traceExit(m);}},_displayRatings:function(){var m="_displayRatings()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.loadingDiv,"display","none");dojo.style(this.ratingsDiv,"display","block");if(this.bIsTracing){this.traceExit(m);}},_determineSectionDisplay:function(){var m="_determineSectionDisplay()";if(this.bIsTracing){this.traceEntry(m);}var _1c8=dojo.create("a",{href:"javascript:;",title:this.bundle.title_view_ratings});var _1c9=dojo.create("span",null,_1c8);dojo.addClass(_1c9,"lotusAltText");_1c8.onclick=dojo.hitch(this,function(){this.showWidget();return false;});this.twistyLink=_1c8;this.twistySpan=_1c9;switch(this.displayTwisty){case com.ibm.widgets.InlineRating._displayTwisty_hidden:this.showWidget();break;case com.ibm.widgets.InlineRating._displayTwisty_hidden.toUpperCase():this.showWidget();break;case com.ibm.widgets.InlineRating._displayTwisty_collapsed:dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyClosed");dojo.attr(this.twistySpan,"innerHTML","&#x25bc;");dojo.place(this.twistyLink,this.sectionHeader,"first");dojo.style(this.loadingDiv,"display","none");break;case com.ibm.widgets.InlineRating._displayTwisty_collapsed.toUpperCase():dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyClosed");dojo.attr(this.twistySpan,"innerHTML","&#x25bc;");dojo.place(this.twistyLink,this.sectionHeader,"first");dojo.style(this.loadingDiv,"display","none");break;case com.ibm.widgets.InlineRating._displayTwisty_expanded:dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistyLink,"title",this.bundle.title_hide_ratings);dojo.attr(this.twistySpan,"innerHTML","&#x25C4;");dojo.place(this.twistyLink,this.sectionHeader,"first");this.showWidget();break;case com.ibm.widgets.InlineRating._displayTwisty_expanded.toUpperCase():dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistyLink,"title",this.bundle.title_hide_ratings);dojo.attr(this.twistySpan,"innerHTML","&#x25C4;");dojo.place(this.twistyLink,this.sectionHeader,"first");this.showWidget();break;default:this.displayTwisty=com.ibm.widgets.InlineRating._displayTwisty_collapsed;dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyClosed");dojo.attr(this.twistySpan,"innerHTML","&#x25bc;");dojo.place(this.twistyLink,this.sectionHeader,"first");dojo.style(this.loadingDiv,"display","none");break;}if(this.bIsTracing){this.traceExit(m);}},showWidget:function(_1ca){var m="showWidget(event)";if(this.bIsTracing){this.traceEntry(m,_1ca);}if(!this._dapRatings){dojo.style(this.sectionBody,"float","left");dojo.attr(this.twistyLink,"title",this.bundle.title_hide_ratings);dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistySpan,"innerHTML","&#x25C4;");this.fetchRatings();}else{dojo.attr(this.twistyLink,"title",this.bundle.title_view_ratings);dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyClosed");dojo.attr(this.twistySpan,"innerHTML","&#x25bc;");var _1cb=this._dapRatingWidget.domNode;this._dapRatingWidget.destroy();dojo.destroy(_1cb);this._dapRatingWidget=null;dojo.destroy(this._dapRatings);this._dapRatings=null;dojo.destroy(this._dapOpenWidgetLink);this._dapOpenWidgetLink=null;if(this._myChart){this._myChart.destroy();this._myChart=null;}dojo.forEach(this._connHandlers,dojo.disconnect);}if(this.bIsTracing){this.traceExit(m);}},openRatingWidget:function(){var m="openRatingWidget()";if(this.bIsTracing){this.traceEntry(m);}var _1cc={resourceID:this.resourceID,resourceType:this.resourceType,resourceTitle:this.resourceTitle,resourceCategory:this.resourceCategory};if(this.bIsTracing){this.trace(m,"Rating dialog widget parameters",this.ratingDialogWidgetParameters);}if(!this.ratingDialogWidgetParameters){this.ratingDialogWidgetParameters=_1cc;}else{this.ratingDialogWidgetParameters.resourceID=this.resourceID;this.ratingDialogWidgetParameters.resourceType=this.resourceType;this.ratingDialogWidgetParameters.resourceTitle=this.resourceTitle;this.ratingDialogWidgetParameters.resourceCategories=this.resourceCategories;}if(this.ratingScope.toLowerCase()==com.ibm.widgets.InlineRating._ratingScope_personal_private){_1cc.defaultView=com.ibm.widgets.InlineRating._viewPrivate;}else{_1cc.defaultView=com.ibm.widgets.InlineRating._viewPublic;}if(this.bIsTracing){this.trace(m,"genericParameterMap",this.genericParameterMap);}if(this.genericParameterMap){this.ratingDialogWidgetParameters.genericParameterMap=this.genericParameterMap;}var _1cd=new com.ibm.widgets.AddRating(this.ratingDialogWidgetParameters);this._ratingDlg=_1cd;if(this.bIsTracing){this.traceExit(m);}},_determineRatingsType:function(){var m="_determineRatingsType()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"this.params",this.params);}switch(this.ratingScope){case com.ibm.widgets.InlineRating._ratingScope_community:if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_community_rating;dojo.attr(this.ratingsTitle,"title",this.title_community_rating);}this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_community.toUpperCase():if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_community_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_community_rating);}this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_personal:if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_your_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_your_rating);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_personal.toUpperCase():if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_your_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_your_rating);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_personal_private:if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_priv_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_priv_rating);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_personal_private.toUpperCase():if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_priv_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_priv_rating);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_personal_public:if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_pub_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_pub_rating);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_personal_public.toUpperCase():if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_pub_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_pub_rating);}this._fetchUserParam=ibmPortalConfig.currentUserOID;this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_all:if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_all_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_all_rating);}this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_all.toUpperCase():if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_all_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_all_rating);}this._fetchingScope=this.ratingScope;break;case com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public_name:if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_community_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_community_rating);}this._fetchingScope=com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public;break;case com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public_name.toLowerCase():if(this.customLabel!==null){this.ratingsTitle.innerHTML=this.customLabel;dojo.attr(this.ratingsTitle,"title",this.customLabel);}else{this.ratingsTitle.innerHTML=this.bundle.title_community_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_community_rating);}this._fetchingScope=com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public;break;default:this._fetchingScope=com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public;this.ratingsTitle.innerHTML=this.bundle.title_community_rating;dojo.attr(this.ratingsTitle,"title",this.bundle.title_community_rating);this.ratingScope=com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public_name;break;}if(this.bIsTracing){this.traceExit(m);}},_determineResourceType:function(){var m="_determineResourceType()";if(this.bIsTracing){this.traceEntry(m);}switch(this.resourceType){case "CONTENT_NODE":this._resourceSchema=com.ibm.widgets.InlineRating._navigationModelSchema;break;case "NAVIGATION_NODE":this._resourceSchema=com.ibm.widgets.InlineRating._portletModelSchema;break;default:break;}if(this.bIsTracing){this.traceExit(m);}},displayCollaborativeRatingDistribution:function(_1ce){var m="displayCollaborativeRatingDistribution(aNumberOfRatingValues)";if(this.bIsTracing){this.traceEntry(m,_1ce);}if(this._myChart){this._myChart.update(_1ce);}else{var div=dojo.create("div",null,this.popupRatingDist);this._myChart=new com.ibm.widgets.AddRatingChart({values:_1ce},div);}this._myChart.startup();if(this.bIsTracing){this.traceExit(m);}},_showPopup:function(){var m="_showPopup()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"ratingDistributionPosition",this.ratingDistributionPosition);}dojo.style(this.popupRatingDistWrapper,"display","block");dojo.style(this.popupRatingDistWrapper,"left",this.ratingDistributionPosition[0]+"px");dojo.style(this.popupRatingDistWrapper,"top",this.ratingDistributionPosition[1]+"px");if(this.bIsTracing){this.traceExit(m);}},_hidePopup:function(){var m="_hidePopup()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.popupRatingDistWrapper,"display","none");if(this.bIsTracing){this.traceExit(m);}},_updateRatingsOnEvent:function(args){var m="_updateRatingsOnEvent(args)";if(this.bIsTracing){this.traceEntry(m,args);}if((this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_personal)||(this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_all)||(this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_all.toUpperCase())||(this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_personal.toUpperCase())||(args.scope==com.ibm.widgets.InlineRating._ratingScope_personal_public&&this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_personal_public)||(args.scope==com.ibm.widgets.InlineRating._ratingScope_personal_public&&this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_personal_public.toUpperCase())||(args.scope==com.ibm.widgets.InlineRating._ratingScope_personal_private&&this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_personal_private)||(args.scope==com.ibm.widgets.InlineRating._ratingScope_personal_private&&this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_personal_private.toUpperCase())||(args.scope==com.ibm.widgets.InlineRating._ratingScope_personal_public&&this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public_name)||(args.scope==com.ibm.widgets.InlineRating._ratingScope_personal_public&&this.ratingScope==com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public_name.toLowerCase())){if(!this._dapRatings){dojo.style(this.sectionBody,"float","left");dojo.attr(this.twistyLink,"title",this.bundle.title_hide_ratings);dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyOpen trcFloatLeft");dojo.attr(this.twistyLink,"alt","&#x25C4;");this.fetchRatings();}else{dojo.attr(this.twistyLink,"title",this.bundle.title_view_ratings);dojo.attr(this.twistyLink,"class","lotusSprite lotusArrow lotusTwistyClosed");dojo.attr(this.twistyLink,"alt","&#x25bc;");var _1cf=this._dapRatingWidget.domNode;this._dapRatingWidget.destroy();dojo.destroy(_1cf);this._dapRatingWidget=null;dojo.destroy(this._dapRatings);this._dapRatings=null;dojo.destroy(this._dapOpenWidgetLink);this._dapOpenWidgetLink=null;if(this._myChart){this._myChart.destroy();this._myChart=null;}this.fetchRatings();}}if(this._ratingDlg){this._ratingDlg.refocus=false;}if(this.bIsTracing){this.traceExit(m);}},_checkKeySubmit:function(_1d0){var m="_checkKeySubmit(event)";if(this.bIsTracing){this.traceEntry(m,_1d0);}if(_1d0.keyCode==dojo.keys.ENTER){this.openRatingWidget();}if(this.bIsTracing){this.traceExit(m);}},_initializeParameters:function(){var m="_initializeParameters()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"this.params",this.params);}if(!("resolver" in this.params)){this.ratingStore=ibmPortalConfig.resolver;}if(!("numStars" in this.params)){if(ibmPortalCPConfig.rating.inline.numStars!==null&&typeof ibmPortalCPConfig.rating.inline.numStars!=="undefined"){this.numStars=ibmPortalCPConfig.rating.inline.numStars;}else{this.numStars=com.ibm.widgets.InlineRating._numStars;}}if(!("showDialogLauncher" in this.params)){if(ibmPortalCPConfig.rating.inline.showDialogLauncher!==null&&typeof ibmPortalCPConfig.rating.inline.showDialogLauncher!=="undefined"){this.showDialogLauncher=ibmPortalCPConfig.rating.inline.showDialogLauncher;}else{this.showDialogLauncher=com.ibm.widgets.InlineRating._showDialogLauncher;}}if(!("onStarHoverShowRatingDistribution" in this.params)){if(ibmPortalCPConfig.rating.inline.onStarHoverShowRatingDistribution!==null&&typeof ibmPortalCPConfig.rating.inline.onStarHoverShowRatingDistribution!=="undefined"){this.onStarHoverShowRatingDistribution=ibmPortalCPConfig.rating.inline.onStarHoverShowRatingDistribution;}else{this.onStarHoverShowRatingDistribution=com.ibm.widgets.InlineRating._onStarHoverShowRatingDistribution;}}if(!("onStarClickOpenDialog" in this.params)){if(ibmPortalCPConfig.rating.inline.onStarClickOpenDialog!==null&&typeof ibmPortalCPConfig.rating.inline.onStarClickOpenDialog!=="undefined"){this.onStarClickOpenDialog=ibmPortalCPConfig.rating.inline.onStarClickOpenDialog;}else{this.onStarClickOpenDialog=com.ibm.widgets.InlineRating._onStarClickOpenDialog;}}if(!("ratingScope" in this.params)){if(ibmPortalCPConfig.rating.inline.ratingScope!==null&&typeof ibmPortalCPConfig.rating.inline.ratingScope!=="undefined"){this.ratingScope=ibmPortalCPConfig.rating.inline.ratingScope;}else{this.ratingScope=com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public;}}if(!("displayTwisty" in this.params)){if(ibmPortalCPConfig.rating.inline.displayTwisty!==null&&typeof ibmPortalCPConfig.rating.inline.displayTwisty!=="undefined"){this.displayTwisty=ibmPortalCPConfig.rating.inline.displayTwisty;}else{this.displayTwisty=com.ibm.widgets.InlineRating._displayTwisty;}}if(!("customLabel" in this.params)){if(ibmPortalCPConfig.rating.inline.customLabel!==null&&typeof ibmPortalCPConfig.rating.inline.customLabel!=="undefined"){this.customLabel=ibmPortalCPConfig.rating.inline.customLabel;}else{this.customLabel=null;}}if(!("ratingDistributionPosition" in this.params)){if(ibmPortalCPConfig.rating.inline.ratingDistributionPosition!==null&&typeof ibmPortalCPConfig.rating.inline.ratingDistributionPosition!=="undefined"){this.ratingDistributionPosition=ibmPortalCPConfig.rating.inline.ratingDistributionPosition.split(/,/);}else{this.ratingDistributionPosition=com.ibm.widgets.InlineRating._ratingDistributionPosition;}}if(!("ratingsChangedEvent" in this.params)){if(ibmPortalCPConfig.rating.inline.ratingsChangedEvent!==null&&typeof ibmPortalCPConfig.rating.inline.ratingsChangedEvent!=="undefined"){this.ratingsChangedEvent=ibmPortalCPConfig.rating.inline.ratingsChangedEvent;}else{this.ratingsChangedEvent=com.ibm.widgets.InlineRating._ratingsChangedEvent;}}if(!this.id){this.id="";}if(this.bIsTracing){this.traceExit(m);}}});com.ibm.widgets.InlineRating._viewPrivate="PRIVATE";com.ibm.widgets.InlineRating._viewPublic="PUBLIC";com.ibm.widgets.InlineRating._valueAttribute="title";com.ibm.widgets.InlineRating._countAttribute="count";com.ibm.widgets.InlineRating._resourceModelSchema="rm:";com.ibm.widgets.InlineRating._portletModelSchema="pm:oid:";com.ibm.widgets.InlineRating._navigationModelSchema="nm:oid:";com.ibm.widgets.InlineRating._cpUserModelSchema="cpum:oid:";com.ibm.widgets.InlineRating._ratingSpaceEmptyURI="rtm:rs:empty";com.ibm.widgets.InlineRating._ratingScope_personal_private="personal_private";com.ibm.widgets.InlineRating._ratingScope_personal_public="personal_public";com.ibm.widgets.InlineRating._ratingScope_community="community";com.ibm.widgets.InlineRating._ratingScope_personal="personal";com.ibm.widgets.InlineRating._ratingScope_all="all";com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public=["personal_public","community"];com.ibm.widgets.InlineRating._ratingScope_community_plus_personal_public_name="COMMUNITY_PERSONAL_PUBLIC";com.ibm.widgets.InlineRating._displayTwisty_collapsed="collapsed";com.ibm.widgets.InlineRating._displayTwisty_hidden="hidden";com.ibm.widgets.InlineRating._displayTwisty_expanded="expanded";com.ibm.widgets.InlineRating.inlineRatingWidgetID="_inlineRatingWidgetID";com.ibm.widgets.InlineRating._numStars=5;com.ibm.widgets.InlineRating._showDialogLauncher=true;com.ibm.widgets.InlineRating._onStarHoverShowRatingDistribution=true;com.ibm.widgets.InlineRating._onStarClickOpenDialog=true;com.ibm.widgets.InlineRating._displayTwisty="collapsed";com.ibm.widgets.InlineRating._ratingDistributionPosition=[30,30];com.ibm.widgets.InlineRating._ratingsChangedEvent="ratingsChanged";}if(!dojo._hasResource["com.ibm.widgets.ReadOnlyComboBox"]){dojo._hasResource["com.ibm.widgets.ReadOnlyComboBox"]=true;dojo.provide("com.ibm.widgets.ReadOnlyComboBox");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.form.ComboBox");dojo.require("dojo.data.ItemFileWriteStore");dojo.require("dojo._base.xhr");dojo.declare("com.ibm.widgets.ReadOnlyComboBox",[dijit._Widget,dijit._Templated,dijit.form.ComboBox,com.ibm.widgets._Traceable],{bIsTracing:false,constructor:function(){this.inherited("constructor","com.ibm.widgets.ReadOnlyComboBox");this.bIsTracing=this.isTracing();this.autoComplete=false;},postMixInProperties:function(){this.inherited("postMixInProperties",arguments);},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}this.inherited("postCreate",arguments);dojo.connect(this.textbox,"onkeydown",dojo.hitch(this,"onKeydownEvent"));dojo.connect(this.textbox,"onmousedown",dojo.hitch(this,"onMousedownEvent"));if(this.bIsTracing){this.traceExit(m);}},uninitialize:function(){this.inherited("uninitialize",arguments);},setStore:function(_1d1){var m="setStore(aStore)";if(this.bIsTracing){this.traceEntry(m,_1d1);}dojo.attr(this,"store",_1d1);var _1d2=function(_1d3,_1d4){if(_1d3.length>0){this.textbox.value=this.store.getValue(_1d3[0],"name","");}};this.store.fetch({onComplete:dojo.hitch(this,_1d2)});if(this.bIsTracing){this.traceExit(m);}},_startSearchFromInput:function(){return;},onMousedownEvent:function(evnt){var m="onMousedownEvent(evnt)";if(this.bIsTracing){this.traceEntry(m,evnt);}this._startSearch("");dojo.stopEvent(evnt);if(this.bIsTracing){this.traceExit(m);}},onKeydownEvent:function(evnt){var m="onKeydownEvent(evnt)";if(this.bIsTracing){this.traceEntry(m,evnt);}var key=evnt.keyCode;var keys=dojo.keys;if(this.bIsTracing){this.trace(m,"key",key);this.trace(m,"keys",keys);this.trace(m,"keys.DOWN_ARROW",keys.DOWN_ARROW);}switch(key){case keys.DOWN_ARROW:case keys.END:case keys.HOME:case keys.LEFT_ARROW:case keys.LEFT_WINDOW:case keys.PAGE_DOWN:case keys.PAGE_UP:case keys.RIGHT_ARROW:case keys.RIGHT_WINDOW:case keys.TAB:case keys.UP_ARROW:break;default:dojo.stopEvent(evnt);break;}if(this.bIsTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.widgets.TagCloud"]){dojo._hasResource["com.ibm.widgets.TagCloud"]=true;dojo.provide("com.ibm.widgets.TagCloud");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.form.ComboBox");dojo.require("dijit.form.FilteringSelect");dojo.require("dijit.form.HorizontalSlider");dojo.require("dojo._base.event");dojo.require("dojo._base.xhr");dojo.require("dojo.data.ItemFileWriteStore");dojo.require("dojo.i18n");dojo.require("dojo.string");dojo.declare("com.ibm.widgets.TagCloud",[dijit._Widget,dijit._Templated,com.ibm.widgets._Traceable],{bIsTracing:false,blankImgUrl:dojo.moduleUrl("dojo","resources/blank.gif").toString(),_isFullyInitialized:false,baseURL:".",bundle:null,bundlePageCreator:null,isRTL:false,widgetParent:null,widgetsInTemplate:true,_dapTagsList:null,_dapTagNames:{},_dapSelectedScopes:{},_dapPagingHeaderContainerDiv:null,_dapPagingFooterContainerDiv:null,_dapJumpToPageInput:null,_dapSelectedScopesNode:null,selectableCategories:null,selectableTypeSchemas:null,preselectedCategories:null,preselectedTypeSchemas:null,hiddenCategories:null,hiddenTypeSchemas:null,showFederationInAllView:false,selectedFederationCategories:null,hasSelectedFederationCategories:null,unselectedFederationCategories:null,hasUnselectedFederationCategories:null,rmmode:null,isDecodeCategories:true,isDecodeTypeSchemas:true,preselectedTagNamesAll:null,preselectedTagNamesFederation:null,preselectedTagNamesCommunity:null,preselectedTagNamesPersonalPublic:null,preselectedTagNamesLatest:null,preselectedTagNamesPersonalPrivate:null,preselectedTagNamesSuggestedLinks:null,preselectedTagNamesAnalytics:null,fetchRelatedTagsMode:false,_defaultPagingPage:-1,paging_currentPage:1,paging_totalResults:30,paging_resultsPerPage:10,paging_numPages:1,paging_pageToFetch:1,paging_firstPageLink:"",paging_prevPageLink:"",paging_nextPageLink:"",paging_lastPageLink:"",paging_numResultPages:5,defaultViewMode:"cloud",redirectView:null,_availableCategories:null,_selectedCategories:null,_transmittedCategories:null,_scopeStore:new dojo.data.ItemFileWriteStore({data:{items:[]}}),allowCategoryTransmission:true,showTransmittedCategories:false,_availableTypeSchemaScopes:null,_selectedTypeSchemaScopes:null,_transmittedTypeSchemaScopes:null,allowTypeSchemaScopeTransmission:true,showTransmittedTypeSchemaScopes:false,scopeBy:"category",isScopingEnabled:false,selectableScopesMode:"sel_sc_none",preselectedScopesMode:"presel_sc_none",isScopeSelectorExpanded:true,showScopes:true,showView:true,showDisplay:true,views:[["All","all","hint"],["Federation","federation","hint"],["Community","community","hint"],["Personal","personal","hint"],["Latest","latest","hint"],["Private","private","hint"],["Suggested Links","suggested_links","hint"],["Analytics","analytics","hint"]],_idxViewAll:0,_idxViewFederation:1,_idxViewCommunity:2,_idxViewPersonal:3,_idxViewLatest:4,_idxViewPrivate:5,_idxViewSuggestedLinks:6,_idxViewAnalytics:7,_viewAvailable:[true,true,true,true,true,true,true,true],isAllViewAllowed:true,isFederationViewAllowed:true,isCommunityViewAllowed:true,isPersonalViewAllowed:true,isLatestViewAllowed:true,isPrivateViewAllowed:false,isSuggestedLinksViewAllowed:true,isAnalyticsViewAllowed:true,_leavingViewMode:"",_viewMode:"",displays:["cloud","list"],_displayNames:["cloud","list"],_displayMode:"",sharedRenderParameterMode:false,_discreteTags:50,minNumTags:1,maxNumTags:50,defaultSliderPosition:-1,_numTagsShown:0,_minTagsShown:1,_maxTagsShown:10,countsEnabled:true,isExtendedCountsDisplay:true,multiselectionEnabled:true,sliderEnabled:true,borderEnabled:false,borderColor:"#aab0bb",tagCountLevel1:1,tagCountLevel2:2,tagCountLevel3:3,tagCountLevel4:4,tagCountCssClasses:["lotusF1","lotusF2","lotusF3","lotusF4","lotusF5"],tagCloudWidth:250,tagCloudHeight:200,namespace:"",userID:"",userName:"",tagStore:null,tagData:null,widgetTitle:"",widgetName:"tagCloud",fetchURI:"",fetchRMParams:null,fetchCPUMParam:"",fetchOrderParam:"",fetchOrderDirection:"asc",templateString:null,templateString:"<div dojoAttachPoint=\"tagCloudContainer\" class=\"lotusui trc trcTagCloud\">\n <h1 dojoAttachPoint=\"title\" id=\"${namespace}tagCloudTitleDiv\" name=\"${namespace}tagCloudTitleDiv\"></h1>\n <div dojoAttachPoint=\"viewModeDiv\" id=\"${namespace}viewModeDiv\" name=\"${namespace}viewModeDiv\" style=\"display:none;\">\n </div>\n <div class=\"lotusSection lotusFirst\" dojoAttachPoint=\"scopeSelector\" id=\"${namespace}scopeSelector\" name=\"${namespace}scopeSelector\" style=\"display:none\">\n <h2 class=\"trcSection\"><a role=\"button\" dojoAttachPoint=\"scopeTwisty\" id=\"${namespace}scopeTwisty\" name=\"${namespace}scopeTwisty\" class=\"lotusSprite lotusArrow lotusTwistyOpen\" href=\"javascript:void(0);\" title=\"${bundle.title_click_to_collapse}\" tabIndex=\"0\"><span dojoAttachPoint=\"scopeSectionTwisty\" id=\"${namespace}scopeSectionTwisty\" name=\"${namespace}scopeSectionTwisty\" class=\"lotusAltText\">&#x25bc;</span></a><label dojoAttachPoint=\"scopeSectionHeader\" id=\"${namespace}scopeSectionHeader\" name=\"${namespace}scopeSectionHeader\" class=\"lotusLeft\" title=\"${bundle.title_click_to_collapse}\" tabIndex=\"0\" for=\"${namespace}categorySelect\">${bundle.text_select_scope}</label></h2>\n <div dojoAttachPoint=\"scopeSectionBody\" id=\"${namespace}scopeSectionBody\" name=\"${namespace}scopeSectionBody\" class=\"lotusSectionBody\">\n <div class=\"lotusChunk\">\n <div dojoAttachPoint=\"categoryDiv\" id=\"${namespace}categoryDiv\" name=\"${namespace}categoryDiv\" tabIndex=\"0\">\n <span dojoAttachPoint=\"categoryCaptionSpan\" id=\"${namespace}categoryCaptionSpan\" name=\"${namespace}categoryCaptionSpan\"></span>\n <form dojoAttachPoint=\"categoryForm\" id=\"${namespace}categoryForm\" name=\"${namespace}categoryForm\">\n <input type=\"select\" style=\"width: 70%;\" dojoType=\"com.ibm.widgets.ReadOnlyComboBox\" dojoAttachPoint=\"categorySelect\" id=\"${namespace}categorySelect\" name=\"${namespace}categorySelect\" value=\"\" title=\"${bundle.title_scope_selector}\" /><a dojoAttachPoint=\"selectCategoryBtn\" href=\"javascript:void(0);\" class=\"lotusBtnImg lotusAdd trcTopAlign\" title=\"${bundle.title_scope_add_btn}\" role=\"button\" name=\"${namespace}selectCategoryBtn\"><img src=\"${blankImgUrl}\" alt=\"${bundle.title_scope_add_btn}\" aria-label=\"add\"><span class=\"lotusAltText\">+</span></a>\n </form>\n <span dojoAttachPoint=\"selectedCategoriesCaptionSpan\" id=\"${namespace}selectedCategoriesCaptionSpan\" name=\"${namespace}selectedCategoriesCaptionSpan\"></span>\n <div dojoAttachPoint=\"categoryListDiv\" id=\"${namespace}categoryListDiv\" name=\"${namespace}categoryListDiv\" style=\"display: none;\">\n </div>\n </div>\n </div>\n </div>\n </div>\n <div tabIndex=\"0\" dojoType=\"dijit.form.HorizontalSlider\" title=\"${bundle.title_slider}\" class=\"sliderDiv\" id=\"${namespace}cloudSlider\" name=\"${namespace}cloudSlider\" dojoAttachPoint=\"cloudSliderDiv\" minimum=\"${minNumTags}\" maximum=\"${maxNumTags}\" showButtons=\"false\">\n </div>\n <div id=\"${namespace}progressDiv\" name=\"${namespace}progressDiv\" dojoAttachPoint=\"progressDiv\">\n <div class=\"trcLoading\">\n <span class=\"lotusLoading\"><img width=\"21\" height=\"21\" src=\"${blankImgUrl}\" alt=\"${bundle.title_loading_icon}\"></span>&nbsp;<span>${bundle.text_loading}</span>\n </div>\n </div>\n <div id=\"${namespace}noTagsDiv\" name=\"${namespace}noTagsDiv\" dojoAttachPoint=\"noTagsDiv\" style=\"display:none;\" title=\"${bundle.text_information}\">\n <div class=\"lotusMessage lotusInfo\" role=\"status\" title=\"${bundle.text_information}\">\n <img class=\"lotusSprite trcInformationIcon\" src=\"${blankImgUrl}\" width=\"16\" height=\"16\" alt=\"${bundle.text_information}\" title=\"${bundle.text_information}\"/><span class=\"lotusAltText\">${bundle.text_information}:</span>\n <span title=\"${bundle.text_information}\">${bundle.text_no_tags_found}</span>\n </div>\n </div>\n <div id=\"${namespace}pagingHeaderDiv\" name=\"${namespace}pagingHeaderDiv\" dojoAttachPoint=\"pagingHeader\" style=\"display:none;\" class=\"lotusPaging trcPagingHeaderLine\">\n </div>\n <div id=\"${namespace}tagListDiv\" name=\"${namespace}tagListDiv\" dojoAttachPoint=\"tagListContainer\">\n </div>\n <div id=\"${namespace}pagingFooterDiv\" name=\"${namespace}pagingFooterDiv\" dojoAttachPoint=\"pagingFooter\" style=\"display:none\" class=\"lotusPaging trcPagingFooterLine\">\n </div>\n <div dojoAttachPoint=\"errorDiv\" name=\"${namespace}errorDiv\" id=\"${namespace}errorDiv\" class=\"lotusMessage\" style=\"display:none;\">\n <img class=\"trcErrorIcon\" dojoAttachPoint=\"errorImg\" id=\"${namespace}errorImg\" name=\"${namespace}errorImg\" src=\"${blankImgUrl}\" width=\"16\" height=\"16\" alt=\"Error\" /><span class=\"lotusAltText\">${bundle.text_error}:</span>\n <span dojoAttachPoint=\"errorSpan\" id=\"${namespace}errorSpan\" name=\"${namespace}errorSpan\"></span>\n <div style=\"background-color: white;\" style=\"display:block;\">\n <span dojoAttachPoint=\"errorDetailsSpan\" id=\"${namespace}errorDetailsSpan\"></span>\n </div>\n </div>\n <div dojoAttachPoint=\"displayModeDiv\" id=\"${namespace}displayModeDiv\" name=\"${namespace}displayModeDiv\" style=\"display:none\">\n </div>\n <div dojoAttachPoint=\"hiddenFormDiv\" id=\"${namespace}hiddenFormDiv\" name=\"${namespace}hiddenFormDiv\" style=\"display:none\">\n <form dojoAttachPoint=\"hiddenForm\" id=\"${namespace}hiddenForm\" name=\"${namespace}hiddenForm\" action=\".\" method=\"GET\">\n </form>\n </div>\n</div>\n",selectedTags:null,uriTagCenter:"tm:prp",uriPRP:"tm:prp",serializedSettings:"empty",isPersistClientSideState:true,_isShowPrevLink:false,_isShowNextLink:false,isTagCenterAvailable:false,_sliderPositions:[-2,-2,-2,-2,-2,-2,-2,-2],_listPages:[-1,-1,-1,-1,-1,-1,-1,-1],_tagList:[],_visibleTagsList:[],_focusTagIdx:-1,tagsPageSize:5,_tagsKeyEvtHdls:[],isTransmittedTagsMode:false,_isTagCloudBridgeAvailable:false,_transmittedTagsStore:null,_numTagsShownMax:10,_ignoreTagCountSliderUpdates:0,arrayToString:function(arr){var _1d5="";for(var i=0,l=arr.length;i<l;i++){_1d5+=arr[i];if(i<l-1){_1d5+=", ";}}return _1d5;},initializeTracing:function(){this.bIsTracing=this.isTracing();},initializeNLS:function(){this.bundle=dojo.i18n.getLocalization("com.ibm.widgets","TagCloud");this.bundlePageCreator=dojo.i18n.getLocalization("com.ibm.bundles","PageCreatorDialog");this.views[this._idxViewAll][0]=this.bundle.text_all_tags;this.views[this._idxViewAll][2]=this.bundle.title_all_tags;this.views[this._idxViewFederation][0]=this.bundle.text_federation_tags;this.views[this._idxViewFederation][2]=this.bundle.title_federation_tags;this.views[this._idxViewCommunity][0]=this.bundle.text_community_tags;this.views[this._idxViewCommunity][2]=this.bundle.title_community_tags;this.views[this._idxViewPersonal][0]=this.bundle.text_personalpublic_tags;this.views[this._idxViewPersonal][2]=this.bundle.title_personalpublic_tags;this.views[this._idxViewLatest][0]=this.bundle.text_latest_tags;this.views[this._idxViewLatest][2]=this.bundle.title_latest_tags;this.views[this._idxViewPrivate][0]=this.bundle.text_personalprivate_tags;this.views[this._idxViewPrivate][2]=this.bundle.title_personalprivate_tags;this.views[this._idxViewSuggestedLinks][0]="Suggested Links";this.views[this._idxViewSuggestedLinks][2]="Suggested Links";this.views[this._idxViewAnalytics][0]="Analytics";this.views[this._idxViewAnalytics][2]="Analytics";this._displayNames[0]=this.bundle.text_cloud;this._displayNames[1]=this.bundle.text_list;},_saveClientSideState:function(){var m="_saveClientSideState()";if(this.bIsTracing){this.traceEntry(m);}if(this.isPersistClientSideState&&this._isFullyInitialized){if(this._isTracingLow){this.trace(m,"Persisting client side state");}var vm=this._displayMode;var dm=this._viewMode;var _1d6=dojo.hasClass(this.scopeTwisty,"lotusTwistyOpen");var spos=Math.max(this._numTagsShown,this._numTagsShownMax);var _1d7=this.paging_currentPage-1;if(this._leavingViewMode===""){this._leavingViewMode=this._viewMode;}if(this._leavingViewMode==this.views[this._idxViewAll][1]){this._sliderPositions[this._idxViewAll]=spos;this._listPages[this._idxViewAll]=_1d7;}else{if(this._leavingViewMode==this.views[this._idxViewFederation][1]){this._sliderPositions[this._idxViewFederation]=spos;this._listPages[this._idxViewFederation]=_1d7;}else{if(this._leavingViewMode==this.views[this._idxViewCommunity][1]){this._sliderPositions[this._idxViewCommunity]=spos;this._listPages[this._idxViewCommunity]=_1d7;}else{if(this._leavingViewMode==this.views[this._idxViewLatest][1]){this._sliderPositions[this._idxViewLatest]=spos;this._listPages[this._idxViewLatest]=_1d7;}else{if(this._leavingViewMode==this.views[this._idxViewPersonal][1]){this._sliderPositions[this._idxViewPersonal]=spos;this._listPages[this._idxViewPersonal]=_1d7;}else{if(this._leavingViewMode==this.views[this._idxViewPrivate][1]){this._sliderPositions[this._idxViewPrivate]=spos;this._listPages[this._idxViewPrivate]=_1d7;}else{if(this._leavingViewMode==this.views[this._idxViewSuggestedLinks][1]){this._sliderPositions[this._idxViewSuggestedLinks]=spos;this._listPages[this._idxViewSuggestedLinks]=_1d7;}else{if(this._leavingViewMode==this.views[this._idxViewAnalytics][1]){this._sliderPositions[this._idxViewAnalytics]=spos;this._listPages[this._idxViewAnalytics]=_1d7;}}}}}}}}var _1d8=0;var _1d9=0;if(vm=="cloud"){_1d8=this._maxTagsShown;}else{_1d9=this.paging_currentPage-1;}var _1da=this._sliderPositions.join("?");var _1db=this._listPages.join("?");var cval="spos="+_1da+"|"+"ntags="+_1d8+"|"+"vm="+vm+"|"+"dm="+dm+"|"+"page="+_1d9+"|"+"selexp="+_1d6+"|"+"lpages="+_1db;if(this.bIsTracing){this.trace(m,"Storing serialized settings",cval);}this.serializedSettings=cval;}if(this.bIsTracing){this.traceExit(m);}},_parseCookieProperties:function(_1dc){var m="_parseCookieProperties(aProperties)";if(this.bIsTracing){this.traceEntry(m,_1dc);}dojo.forEach(_1dc,dojo.hitch(this,function(val){if(this.bIsTracing){this.trace(m,"Parsing name/value pair",val);}var _1dd=val.split("=");if(_1dd.length>0){var _1de=dojo.string.trim(_1dd[0]);var _1df="";if(_1dd.length>1){_1df=dojo.string.trim(_1dd[1]);}if(_1de=="spos"){if(_1df!==""){var _1e0=_1df;this._sliderPositions=_1e0.split("?");}}else{if(_1de=="lpages"){var _1e1=_1df;this._listPages=_1e1.split("?");}else{if(_1de=="ntags"){var i;}else{if(_1de=="vm"){if(_1df!==""){this.defaultViewMode=_1df;if(this.bIsTracing){this.trace(m,"this.defaultViewMode",this.defaultViewMode);}}}else{if(_1de=="dm"){if(_1df!==""){this._viewMode=_1df;if(this.bIsTracing){this.trace(m,"this._viewMode",this._viewMode);}}}else{if(_1de=="page"){if(_1df!==""){this._defaultPagingPage=parseInt(_1df,10);if(this.bIsTracing){this.trace(m,"defaultPagingPage",this._defaultPagingPage);}}}else{if(_1de=="selexp"){if(_1df!==""){this.isScopeSelectorExpanded=(_1df=="true");if(this.bIsTracing){this.trace(m,"this.isScopeSelectorExpanded",this.isScopeSelectorExpanded);}}}}}}}}}}}));var _1e2=-2;var _1e3=-1;if(this._isViewModeAll()){_1e2=this._sliderPositions[this._idxViewAll];_1e3=this._listPages[this._idxViewAll];}else{if(this._isViewModeFederation()){_1e2=this._sliderPositions[this._idxViewFederation];_1e3=this._listPages[this._idxViewFederation];}else{if(this._isViewModeCommunity()){_1e2=this._sliderPositions[this._idxViewCommunity];_1e3=this._listPages[this._idxViewCommunity];}else{if(this._isViewModeLatest()){_1e2=this._sliderPositions[this._idxViewLatest];_1e3=this._listPages[this._idxViewLatest];}else{if(this._isViewModePersonal()){_1e2=this._sliderPositions[this._idxViewPersonal];_1e3=this._listPages[this._idxViewPersonal];}else{if(this._isViewModePrivate()){_1e2=this._sliderPositions[this._idxViewPrivate];_1e3=this._listPages[this._idxViewPrivate];}else{if(this._isViewModeSuggestedLinks()){_1e2=this._sliderPositions[this._idxViewSuggestedLinks];_1e3=this._listPages[this._idxViewSuggestedLinks];}else{if(this._isViewModeAnalytics()){_1e2=this._sliderPositions[this._idxViewAnalytics];_1e3=this._listPages[this._idxViewAnalytics];}}}}}}}}if(_1e2!=-2){this.defaultSliderPosition=_1e2;}this._defaultPagingPage=parseInt(_1e3,10);if(this.bIsTracing){this.trace(m,"this.defaultSliderPosition",this.defaultSliderPosition);this.traceExit(m);}},_loadClientSideState:function(){var m="_loadClientSideState()";if(this.bIsTracing){this.traceEntry(m);}if(this.isPersistClientSideState){if(this.serializedSettings!=com.ibm.widgets.TagCloud._EMPTY_TAG_CLOUD_SETTINGS){if(this.bIsTracing){this.trace(m,"Deserializing settings",this.serializedSettings);}var _1e4=this.serializedSettings.split("|");this._parseCookieProperties(_1e4);}}if(this.bIsTracing){this.traceExit(m);}},clearClientSideState:function(){this._deleteTagCloudCookie();},constructor:function(){this.inherited("constructor","com.ibm.widgets.TagCloud");var m="constructor()";_isFullyInitialized=false;this.initializeTracing();try{if(typeof TAGCLOUD_TAG_BRIDGE=="object"){if(this.bIsTracing){this.trace(m,"Global object TAGCLOUD_TAG_BRIDGE is available",TAGCLOUD_TAG_BRIDGE);}this._isTagCloudBridgeAvailable=true;}else{if(this.bIsTracing){this.trace(m,"Global object TAGCLOUD_TAG_BRIDGE is NOT DEFINED");}}}catch(e){}this._viewMode=this.views[this._idxViewAll][1];this._displayMode=this.displays[0];this.initializeNLS();this._initializeInternalVariables();},_initializeInternalVariables:function(){this.selectableCategories=[];this.selectableTypeSchemas=[];this.preselectedCategories=[];this.preselectedTypeSchemas=[];this.hiddenCategories=[];this.hiddenTypeSchemas=[];this._availableCategories=[];this._selectedCategories=[];this._transmittedCategories=[];this.preselectedTagNamesFederation=[];this.preselectedTagNamesCommunity=[];this.preselectedTagNamesPersonalPublic=[];this.preselectedTagNamesLatest=[];this.preselectedTagNamesPersonalPrivate=[];this.preselectedTagNamesSuggestedLinks=[];this.preselectedTagNamesAnalytics=[];this._availableTypeSchemaScopes=[];this._selectedTypeSchemaScopes=[];this._transmittedTypeSchemaScopes=[];this.selectedTags=[];this.fetchRMParams=[];this._ignoreTagCountSliderUpdates=0;},postMixInProperties:function(){var m="postMixInProperties()";if(this.bIsTracing){this.traceEntry(m);}this._discreteTags=this.maxNumTags-this.minNumTags+1;if(this._discreteTags<1){this._discreteTags=1;}if(this.bIsTracing){this.trace(m,"Slider _discreteTags",this._discreteTags);this.traceExit(m);}},setupTitles:function(){dojo.attr(this.tagCloudContainer,"title",this.titleHint);},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}if(this.widgetTitle===""){this.titleHint=this.bundle.text_tags;}else{this.titleHint=this.widgetTitle;}dojo.attr(this.title,"innerHTML",this.titleHint);dojo.attr(this.title,"title",this.titleHint);dojo.attr(this.categorySelect.focusNode,"title",this.bundle.title_scope_selector);if(this.isRTL&&this.bIsTracing){this.trace(m,"TagCloud is operating in RTL mode.");}else{this.trace(m,"TagCloud is operating in LTR (default) mode.");}this._loadClientSideState();if(this.borderEnabled){dojo.style(this.tagCloudContainer,"border","1px solid "+this.borderColor);}if(this.bIsTracing){this.trace(m,"DefaultViewMode",this.defaultViewMode);}if(this.defaultViewMode=="cloud"){this._displayMode=this.displays[0];}else{this._displayMode=this.displays[1];this._numTagsShown=this.defaultSliderPosition;this._numTagsShownMax=this._numTagsShown;}this.setupTitles();this.determineCurrentUser();this.initializeScoping();this.initializeTagCountSlider();this.initializeDisplayModes();if(!this.isTransmittedTagsMode){this.initializeViewModes();}else{dojo.style(this.viewModeDiv,"display","none");}this.initializeHiddenForm();this.initializeSelectedTags();dojo.attr(this.scopeSectionHeader,"innerHTML",this.bundle.text_select_scope);this.setFetchQueryParameters(this._viewMode);this.setFetchRMParameters();this.setDisplayMode(this._displayMode,true);this._isFullyInitialized=true;this.initializeTopicPublishAndSubscription();if((this.isTransmittedTagsMode)&&(this._isTagCloudBridgeAvailable)){if(this.bIsTracing){this.trace(m,"Registering this TagCloud instance at the TAGCLOUD_TAG_BRIDGE");}TAGCLOUD_TAG_BRIDGE.registerTagCloud(this);}if(this.bIsTracing){this.traceExit(m);}},determineWeightClass:function(_1e5){var m="determineWeightClass(tagCount)";if(this.bIsTracing){this.traceEntry(m,[_1e5]);}if(_1e5>=this.tagCountLevel4){weightClass=this.tagCountCssClasses[4];}else{if(_1e5>=this.tagCountLevel3){weightClass=this.tagCountCssClasses[3];}else{if(_1e5>=this.tagCountLevel2){weightClass=this.tagCountCssClasses[2];}else{if(_1e5>=this.tagCountLevel1){weightClass=this.tagCountCssClasses[1];}else{weightClass=this.tagCountCssClasses[0];}}}}if(this.bIsTracing){this.traceExit(m,weightClass);}return weightClass;},_buildTagNamesList:function(){var m="_buildTagNamesList()";if(this.bIsTracing){this.traceEntry(m);}var _1e6="tm:name:";var _1e7=[];for(var w=0,l=this.selectedTags.length;w<l;w++){_1e7.push(_1e6+this.selectedTags[w].name);}if(this.bIsTracing){this.traceExit(m,_1e7);}return _1e7;},fetchTags:function(){var m="fetchTags()";if(this.bIsTracing){this.traceEntry(m);}var _1e8=null;var _1e9=[];this.clearTags();if((this.isTransmittedTagsMode===true)&&((!this._isFullyInitialized)||(this._transmittedTagsStore===null))){dojo.style(this.progressDiv,"display","none");this._hideTagCloudSlider();if(this.bIsTracing){if(this._transmittedTagsStore===null){this.trace(m,"Transmitted tags only mode ON. No tags have been transmitted yet.");}else{this.trace(m,"Transmitted tags only mode ON. Omitting default fetch of persistet tags");}}return;}var _1ea=this.widgetName;var _1eb=0;var _1ec=this.maxNumTags;var _1ed=this.rmmode;if(this._isDisplayModeList()){if(this._defaultPagingPage!=-1){this.paging_pageToFetch=this._defaultPagingPage+1;this._defaultPagingPage=-1;}_1eb=(this.paging_pageToFetch-1)*this.paging_resultsPerPage;_1ec=this.paging_resultsPerPage;}else{_1eb=0;_1ec=this.maxNumTags;}if(this.bIsTracing){this.trace(m,"uri ",this.fetchURI);this.trace(m,"orderMetric ",this.fetchOrderParam);this.trace(m,"order ",this.fetchOrderDirection);this.trace(m,"start-index ",_1eb);this.trace(m,"max-results ",_1ec);this.trace(m,"rmmode ",_1ed);}_1e8={uri:this.fetchURI,orderMetric:this.fetchOrderParam,order:this.fetchOrderDirection,"start-index":_1eb,"max-results":_1ec};if(_1ed!==null){_1e8.rmmode=_1ed;}if((this._isDisplayModeCloud())&&(!this._isViewModeLatest())){_1e8.rsOrderMetric="name";_1e8.rsOrder="asc";if(this.bIsTracing){this.trace(m,"rsOrderMetric ","name");this.trace(m,"rsOrder ","asc");}}if(this._isViewModeAll()){_1e8.scope=com.ibm.widgets.TagCloud._allScope;}else{if(this._isViewModeFederation()){_1e8.scope=com.ibm.widgets.TagCloud._allScope;}else{if(this._isViewModeCommunity()){_1e8.scope=com.ibm.widgets.TagCloud._communityScope;}else{if(this._isViewModeLatest()){_1e8.scope=com.ibm.widgets.TagCloud._allScope;_1e8.latestMode=true;}else{if(this._isViewModePrivate()){_1e8.scope=com.ibm.widgets.TagCloud._privateScope;}else{if(this._isViewModePersonal()){_1e8.scope=com.ibm.widgets.TagCloud._personalScope;}else{if(this._isViewModeSuggestedLinks()){_1e8.scope=com.ibm.widgets.TagCloud._allScope;_1e8.prefix=com.ibm.widgets.TagCloud._prefixSuggestedLinks;}else{if(this._isViewModeAnalytics()){_1e8.scope=com.ibm.widgets.TagCloud._allScope;_1e8.prefix=com.ibm.widgets.TagCloud._prefixAnalytics;}else{_1e8.scope=com.ibm.widgets.TagCloud._allScope;}}}}}}}}if(this.bIsTracing){this.trace(m,"scope ",_1e8.scope);}if(this.fetchCPUMParam!==""){_1e8.cpumparam=this.fetchCPUMParam;this.trace(m,"fetchCPUMParam ",this.fetchCPUMParam);}if((this.fetchRelatedTagsMode)&&(this.selectedTags.length>0)){_1e9=this._buildTagNamesList();_1e8.tmparam=_1e9;if(this.bIsTracing){this.trace(m,"tmparam ",_1e9);}}else{if(this.fetchRMParams.length>0){_1e8.rmparam=this.fetchRMParams;if(this.bIsTracing){this.trace(m,"rmparam ",this.fetchRMParams);}}}if(this.bIsTracing){this.trace(m,"Query ",_1e8);}this.tagData=this.tagStore.fetch({query:_1e8,onComplete:dojo.hitch(this,"displayTags"),onError:dojo.hitch(this,"onFetchTagsError"),onBegin:dojo.hitch(this,"onFetchBegin")});if(this.bIsTracing){this.traceExit(m);}},clearTags:function(){var m="clearTags()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"_dapTagsList ",this._dapTagsList);}if(this._dapTagsList){var _1ee=this._dapTagsList;if(_1ee!==null){if(this._tagsKeyEvtHdls){dojo.forEach(this._tagsKeyEvtHdls,function(_1ef){dojo.disconnect(_1ef);});}dojo.destroy(_1ee);}}this._tagList=[];this._visibleTagsList=[];if(this._isDisplayModeList()){this._hidePagingHeaderAndFooter();}dojo.style(this.progressDiv,"display","inline");if(this.bIsTracing){this.traceExit(m);}},determineCurrentUser:function(){if(this.bIsTracing){var m="determineCurrentUser()";this.traceEntry(m);this.trace(m,"userID ",this.userID);this.trace(m,"userName ",this.userName);this.traceExit(m);}},isSliderVisibleInMode:function(dm){var m="isSliderVisibleInMode(dm)";if(this.bIsTracing){this.traceEntry(m,dm);}var _1f0=false;if(dm==this.displays[0]){_1f0=true;}else{_1f0=false;}if(this.bIsTracing){this.traceExit(m,_1f0);}return _1f0;},_setFocusOnTagWithIndex:function(_1f1){var node;var tl=this._visibleTagsList;var fIdx=this._focusTagIdx;if(tl.length>0){var idx=_1f1;if(idx<0){idx=0;}if(idx>tl.length-1){idx=tl.length-1;}if((fIdx>0)&&(fIdx<tl.length)){node=tl[fIdx].anchor;dojo.attr(node,"tabindex","-1");}this._focusTagIdx=idx;node=tl[idx].anchor;dojo.attr(node,"tabindex","0");dijit.focus(node);}},_showTagCloudSlider:function(){var m="_showTagCloudSlider()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.cloudSliderDiv.domNode,"display","block");if(this.bIsTracing){this.traceExit(m);}},_hideTagCloudSlider:function(){var m="_hideTagCloudSlider()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.cloudSliderDiv.domNode,"display","none");if(this.bIsTracing){this.traceExit(m);}},_showNoTagsWarning:function(){var m="_showNoTagsWarning()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.noTagsDiv,"display","block");if(this._dapTagsList){dojo.style(this._dapTagsList,"display","none");}if(this.bIsTracing){this.traceExit(m);}},_hideNoTagsWarning:function(){var m="_hideNoTagsWarning()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.noTagsDiv,"display","none");if(this._dapTagsList){dojo.style(this._dapTagsList,"display","inline");}if(this.bIsTracing){this.traceExit(m);}},setDisplayMode:function(dm,_1f2){var m="setDisplayMode(dm, force)";if(this.bIsTracing){this.traceEntry(m,[dm,_1f2]);}if((this._displayMode!=dm)||(_1f2)){if(this.isSliderVisibleInMode(dm)){this._showTagCloudSlider();}else{this._hideTagCloudSlider();}this._displayMode=dm;this.setFetchOrderParameter();this.setFetchQueryParameters(this._viewMode);this.fetchTags();this.initializeDisplayModes();}if(this.bIsTracing){this.traceExit(m);}},_isDisplayModeCloud:function(){return (this._displayMode==this.displays[0]);},_isDisplayModeList:function(){if(this._displayMode==this.displays[1]){return true;}else{return false;}},_isViewModeAll:function(){if(this._viewMode==this.views[this._idxViewAll][1]){return true;}else{return false;}},_isViewModeFederation:function(){if(this._viewMode==this.views[this._idxViewFederation][1]){return true;}else{return false;}},_isViewModeCommunity:function(){if(this._viewMode==this.views[this._idxViewCommunity][1]){return true;}else{return false;}},_isViewModePersonal:function(){if(this._viewMode==this.views[this._idxViewPersonal][1]){return true;}else{return false;}},_isViewModeLatest:function(){if(this._viewMode==this.views[this._idxViewLatest][1]){return true;}else{return false;}},_isViewModePrivate:function(){if(this._viewMode==this.views[this._idxViewPrivate][1]){return true;}else{return false;}},_isViewModeSuggestedLinks:function(){if(this._viewMode==this.views[this._idxViewSuggestedLinks][1]){return true;}else{return false;}},_isViewModeAnalytics:function(){if(this._viewMode==this.views[this._idxViewAnalytics][1]){return true;}else{return false;}},setFetchOrderParameter:function(){var m="setFetchOrderParameter()";if(this.bIsTracing){this.traceEntry(m);}if(this._isDisplayModeCloud()){if(this.bIsTracing){this.trace(m,"Cloud View");}if(this._viewMode==this.views[this._idxViewLatest][1]){if(this.bIsTracing){this.trace(m,"Cloud View : Latest Tags");}this.fetchOrderParam="TAG_SPACE_LAST_MODIFIED_DATE";this.fetchOrderDirection="desc";}else{if(this.bIsTracing){this.trace(m,"Cloud View : Others");}this.fetchOrderParam="TAG_SPACE_COUNT";this.fetchOrderDirection="desc";}}else{if(this.bIsTracing){this.trace(m,"List View");}if(this._viewMode==this.views[this._idxViewLatest][1]){if(this.bIsTracing){this.trace(m,"List View : Latest Tags");}this.fetchOrderParam="TAG_SPACE_LAST_MODIFIED_DATE";this.fetchOrderDirection="desc";}else{if(this.bIsTracing){this.trace(m,"List View : Others");}this.fetchOrderParam="TAG_SPACE_COUNT_REVERSE_NAME";this.fetchOrderDirection="desc";}}if(this.bIsTracing){this.trace(m,"fetchOrderParam ",this.fetchOrderParam);this.trace(m,"fetchOrderDirection ",this.fetchOrderDirection);this.traceExit(m);}},setFetchQueryParameters:function(vm){var m="setFetchQueryParameters(vm)";if(this.bIsTracing){this.traceEntry(m,[vm]);}if((this.userID==="")||((vm==this.views[this._idxViewAll][1])||(vm==this.views[this._idxViewCommunity][1])||(vm==this.views[this._idxViewLatest][1]))){if(this.bIsTracing){this.trace(m,"UserID empty, or 'All' or 'Community' or 'Latest' View selected");}var _1f3=[];var _1f4=[];if(this.scopeBy=="category"){if(this.bIsTracing){this.trace(m,"Scoping by categories "+this._selectedCategories);}_1f3=this._selectedCategories;_1f4=this._transmittedCategories;}else{if(this.bIsTracing){this.trace(m,"Scoping by type schemas");}_1f3=this._selectedTypeSchemaScopes;_1f4=this._transmittedTypeSchemaScopes;}if((this.fetchRelatedTagsMode)&&(this.selectedTags.length>0)){if(this.bIsTracing){this.trace(m,"Fetching related tags");}this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceRelatedURI;}else{if((_1f3.length<=0)&&(_1f4.length<=0)&&(vm!==this.views[this._idxViewCommunity][1])){this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceAllURI;}else{if(this.hasUnselectedFederationCategories&&(!(_1f3.length>0||_1f4.length>0))){this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceAllURI;this.rmmode="-";}else{if(this.hasSelectedFederationCategories&&(!(_1f3.length>0||_1f4.length>0))&&(vm==this.views[this._idxViewAll][1])||vm==this.views[this._idxViewFederation][1]){this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceEmptyURI;this.rmmode=null;}else{if(vm==this.views[this._idxViewCommunity][1]){this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceAllURI;}else{this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceEmptyURI;}}}}}this.fetchCPUMParam="";}else{if(vm==this.views[this._idxViewFederation][1]){if(this.bIsTracing){this.trace(m,"Federation View selected");}if(!this.hasSelectedFederationCategories&&!this.hasUnselectedFederationCategories){this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceEmptyURI;this.rmmode=null;}else{this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceEmptyURI;}}else{if((vm==this.views[this._idxViewSuggestedLinks][1])||(vm==this.views[this._idxViewAnalytics][1])){if(this.bIsTracing){this.trace(m,"Suggested Links or Analytics View selected (no categorization support)");}this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceAllURI;this.rmmode=null;}else{if(this.bIsTracing){this.trace(m,"User present and 'Personal' or 'Private' View selected");}if((this.fetchRelatedTagsMode)&&(this.selectedTags.length>0)){this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceRelatedURI;}else{this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceEmptyURI;}this.fetchCPUMParam=com.ibm.widgets.TagCloud._cpUserModelSchema+this.userID;}}}if(this.bIsTracing){this.trace(m,"fetchCPUMParam ",this.fetchCPUMParam);this.trace(m,"fetchURI ",this.fetchURI);this.traceExit(m);}},_arrayContains:function(arr,elem){for(var i in arr){if(arr[i]===elem){return true;}}return false;},setFetchRMParameters:function(){var m="setFetchRMParameters()";if(this.bIsTracing){this.traceEntry(m);}this.fetchRMParams=[];var _1f5=[];var _1f6=[];var _1f7=[];var _1f8="";var i,j,k,l;var _1f9="";if(this.scopeBy=="category"){if(this.bIsTracing){this.trace(m,"Scoping by categories");}_1f7=this._selectedCategories;_1f6=this._transmittedCategories;_1f8="rm:category:";}else{if(this.scopeBy=="typeSchema"){if(this.bIsTracing){this.trace(m,"Scoping by type schemas");}_1f7=this._selectedTypeSchemaScopes;_1f6=this._transmittedTypeSchemaScopes;_1f8="rm:type:";}}for(i=0,l=_1f7.length;i<l;i++){if(!this._arrayContains(_1f5,_1f7[i])){this.fetchRMParams.push(_1f8+_1f7[i]);this.trace(m,"Adding scope ",_1f7[i]);_1f5.push(_1f7[i]);}}for(j=0,k=_1f6.length;j<k;j++){if(!this._arrayContains(_1f5,_1f6[j])){this.fetchRMParams.push(_1f8+_1f6[j]);this.trace(m,"Adding transmitted scope ",_1f6[j]);_1f5.push(_1f6[j]);}}if((_1f7.length===0)&&(_1f6.length===0)&&(this._viewMode==this.views[this._idxViewAll][1])&&(this.hasUnselectedFederationCategories||!this.showFederationInAllView)){if(this.bIsTracing){this.trace(m,"Exclude of federation categories needed (showFederationInAllView="+this.showFederationInAllView+", hasSelectedFederationCategories="+this.hasSelectedFederationCategories+", hasUnselectedFederationCategories="+this.hasUnselectedFederationCategories+")");}this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceAllURI;this.rmmode="-";_1f8="rm:categories:";_1f9="";if(this.hasUnselectedFederationCategories){for(i=0,l=this.unselectedFederationCategories.length;i<l;i++){if(this.bIsTracing){this.trace(m,"Adding category: "+this.unselectedFederationCategories[i]);}_1f9+=this.unselectedFederationCategories[i];if(i<(l-1)){_1f9+=",";}}}if(!this.showFederationInAllView){if(this.bIsTracing){this.trace(m,"Not allowed to display federation tags in all view -> exclude all federation categories.");}if(this.hasSelectedFederationCategories){for(i=0,l=this.selectedFederationCategories.length;i<l;i++){if(this.bIsTracing){this.trace(m,"Adding category: "+this.selectedFederationCategories[i]);}if(i===0&&_1f9!=""){_1f9+=",";}_1f9+=this.selectedFederationCategories[i];if(i<(l-1)){_1f9+=",";}}}}this.fetchRMParams.push(_1f8+_1f9);}if((_1f7.length===0)&&(_1f6.length===0)&&(this._viewMode==this.views[this._idxViewFederation][1])&&(this.hasSelectedFederationCategories)){if(this.bIsTracing){this.trace(m,"Scoping by selected federation categories: "+this.selectedFederationCategories);}if(this.hasSelectedFederationCategories){this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceEmptyURI;this.rmmode=null;_1f8="rm:categories:";_1f9="";for(i=0,l=this.selectedFederationCategories.length;i<l;i++){if(this.bIsTracing){this.trace(m,"Adding category: "+this.selectedFederationCategories[i]);}_1f9+=this.selectedFederationCategories[i];if(i<(l-1)){_1f9+=",";}}this.fetchRMParams.push(_1f8+_1f9);}else{this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceEmptyURI;this.rmmode=null;}}if((this.fetchURI==com.ibm.widgets.TagCloud._tagSpaceAllURI)&&(_1f5.length>0)){this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceEmptyURI;this.rmmode=null;}else{if((this.fetchURI==com.ibm.widgets.TagCloud._tagSpaceEmptyURI)&&(_1f5.length<=0)&&(this._viewMode!==this.views[this._idxViewCommunity][1])){this.fetchURI=com.ibm.widgets.TagCloud._tagSpaceAllURI;}}if(this.bIsTracing){this.trace(m,"fetchRMParams ",this.arrayToString(this.fetchRMParams));this.trace(m,"fetchURI ",this.fetchURI);this.traceExit(m);}},setViewMode:function(vm,_1fa){var m="setViewMode(vm, force)";if(this.bIsTracing){this.traceEntry(m,[vm,_1fa]);this.trace(m,"ViewMode Name ",vm[0]);this.trace(m,"ViewMode Identifier ",vm[1]);}this._leavingViewMode=this._viewMode;this._viewMode=vm[1];this._buildAndSubmitHiddenForm(null,true);if(this.bIsTracing){this.traceExit(m);}},_buildAndSubmitHiddenForm:function(_1fb,_1fc){var m="_buildAndSubmitHiddenForm(tagName, noRedirect)";if(this.bIsTracing){this.traceEntry(m,[_1fb,_1fc]);}this.buildQNameFormFieldsForSelectedTags(_1fb);if(_1fc===true){if(this.bIsTracing){this.trace(m,"Setting the uri to "+this.uriPRP+" as no redirect to the TagCenter is required for changing the mode only");}dojo.byId(this.namespace+"uri").value=this.uriPRP;}this.hiddenForm.submit();if(this.bIsTracing){this.traceExit(m);}},_isSelectedTagNode:function(node){for(var i=0,l=this.selectedTags.length;i<l;i++){if(this.selectedTags[i].node==node){return true;}}return false;},_isSelectedTagName:function(_1fd){for(var i=0,l=this.selectedTags.length;i<l;i++){if(this.removePrefix(this.selectedTags[i].name)==_1fd){return true;}}return false;},_checkAddSelectedTagNode:function(_1fe,_1ff){var m="_checkAddSelectedTagNode(aNode, tagName)";if(this.bIsTracing){this.traceEntry(m,[_1fe,_1ff]);}var _200=false;if(!this._isSelectedTagNode(_1fe)){if(this.bIsTracing){this.trace(m,"Node not selected yet. Adding it to the list of selected nodes.");}_200=true;}if(this.bIsTracing){this.traceExit(m,_200);}return _200;},_removeSelectedTagNode:function(_201,_202){var m="_checkAddSelectedTagNode(aNode, tagName)";if(this.bIsTracing){this.traceEntry(m,[_201,_202]);}var i=0;for(i=0,l=this.selectedTags.length;i<l;i++){if(this.selectedTags[i].node==_201){if(this.bIsTracing){this.trace(m,"Found node. Removing it from the list of selected nodes.");}this.selectedTags.splice(i,1);break;}}var _203;if(this._viewMode==this.views[this._idxViewAll][1]){_203=this.preselectedTagNamesAll;}else{if(this._viewMode==this.views[this._idxViewFederation][1]){_203=this.preselectedTagNamesFederation;}else{if(this._viewMode==this.views[this._idxViewCommunity][1]){_203=this.preselectedTagNamesCommunity;}else{if(this._viewMode==this.views[this._idxViewPersonal][1]){_203=this.preselectedTagNamesPersonalPublic;}else{if(this._viewMode==this.views[this._idxViewLatest][1]){_203=this.preselectedTagNamesLatest;}else{if(this._viewMode==this.views[this._idxViewPrivate][1]){_203=this.preselectedTagNamesPersonalPrivate;}else{if(this._viewMode==this.views[this._idxViewSuggestedLinks][1]){_203=this.preselectedTagNamesSuggestedLinks;}else{if(this._viewMode==this.views[this._idxViewAnalytics][1]){_203=this.preselectedTagNamesAnalytics;}}}}}}}}for(i=0,k=_203.length;i<k;i++){if(this.removePrefix(_203[i])==_202){if(this.bIsTracing){this.trace(m,"Found tag. Removing it from the list of selected nodes.");}_203.splice(i,1);break;}}if(this.bIsTracing){this.traceExit(m);}},_visuallySelectTagNode:function(_204,_205){var m="_visuallySelectTagNode(aNode, anchor)";if(this.bIsTracing){this.traceEntry(m,[_204,_205]);}dojo.addClass(_204,"lotusSelected");dijit.setWaiState(_204,"selected","true");dijit.setWaiState(_205,"pressed","true");if(this.bIsTracing){this.traceExit(m);}},_visuallyDeselectTagNode:function(_206,_207){var m="_visuallyDeselectTagNode(aNode, anchor)";if(this.bIsTracing){this.traceEntry(m,[_206,_207]);}dojo.removeClass(_206,"lotusSelected");dijit.removeWaiState(_206,"selected");dijit.setWaiState(_207,"pressed","false");if(this.bIsTracing){this.traceExit(m);}},_deselectAllTagNodes:function(){var m="_deselectAllTagNodes()";if(this.bIsTracing){this.traceEntry(m);}for(var i=0,l=this.selectedTags.length;i<l;i++){this._visuallyDeselectTagNode(this.selectedTags[i].node);}this.selectedTags=[];if(this.bIsTracing){this.traceExit(m);}},onExpandCollapseCategorySection:function(){var m="onExpandCollapseCategorySection()";if(this.bIsTracing){this.traceEntry(m);}var _208=dojo.hasClass(this.scopeTwisty,"lotusTwistyOpen");if(this.bIsTracing){this.trace(m,"isSectionOpen ",_208);}if(_208){dojo.removeClass(this.scopeTwisty,"lotusTwistyOpen");dojo.addClass(this.scopeTwisty,"lotusTwistyClosed");dojo.style(this.scopeSectionBody,"display","none");dojo.attr(this.scopeSectionHeader,"title",this.bundle.title_click_to_expand);dojo.attr(this.scopeSectionTwisty,"title",this.bundle.title_click_to_expand);dojo.attr(this.scopeTwisty,"title",this.bundle.title_click_to_expand);if(this.isRTL){dojo.attr(this.scopeSectionTwisty,"innerHTML","&#x25C4;");}else{dojo.attr(this.scopeSectionTwisty,"innerHTML","&#x25BA;");}}else{dojo.removeClass(this.scopeTwisty,"lotusTwistyClosed");dojo.addClass(this.scopeTwisty,"lotusTwistyOpen");dojo.style(this.scopeSectionBody,"display","block");dojo.attr(this.scopeSectionHeader,"title",this.bundle.title_click_to_collapse);dojo.attr(this.scopeSectionTwisty,"title",this.bundle.title_click_to_collapse);dojo.attr(this.scopeTwisty,"title",this.bundle.title_click_to_collapse);dojo.attr(this.scopeSectionTwisty,"innerHTML","&#x25BC;");}if(this.bIsTracing){this.traceExit(m);}},onToggleTagSelection:function(_209,node,_20a){var m="onToggleTagSelection(tagName, node, anchor)";if(this.bIsTracing){this.traceEntry(m,[_209,node,_20a]);}if(node!==null){var _20b=this._isSelectedTagNode(node);if(_20b===true){this._visuallyDeselectTagNode(node,_20a);this._removeSelectedTagNode(node,_209);_209=null;}else{if(!this.multiselectionEnabled){this._deselectAllTagNodes();}this._visuallySelectTagNode(node,_20a);if(!this._checkAddSelectedTagNode(node,_209)){_209=null;}}this._buildAndSubmitHiddenForm(_209);}if(this.bIsTracing){this.traceExit(m);}},placeTag:function(_20c,_20d,_20e,_20f,_210,_211){var m="placeTag(tagName, tagCount, tagLink, parentTag)";if(this.bIsTracing){this.traceEntry(m,[_20c,_20d,_20e,_20f,_210,_211]);}var _212=(this._displayMode==this.displays[1]);var _213="";var li=dojo.create("li",{id:this.namespace+_20c+"_item",name:this.namespace+_20c+"_item",count:_20f},_211);this._dapTagNames[_20c+"_item"]=li;dijit.setWaiRole(li,"option");dojo.place(dojo.doc.createTextNode("\n"),_211,"last");if(_212){_213="lotusLeft lotusPerson";}else{_213=this.determineWeightClass(_20f);}if(this.bIsTracing){this.trace(m,"Weight class ",_213);}var _214=dojo.create("a",{href:"javascript:void(0);",id:this.namespace+_20c+"_link",name:this.namespace+_20c+"_link",innerHTML:_20c,title:_20c,"class":_213,lang:_20d,dir:_20e,tabindex:"-1"},li);dojo.connect(_214,"onclick",dojo.hitch(this,"onToggleTagSelection",_20c,li,_214));dijit.setWaiRole(_214,"button");dijit.setWaiState(_214,"pressed","false");var _215={"name":_20c,"item":li,"anchor":_214};this._tagList.push(_215);this._visibleTagsList.push(_215);if(this._isSelectedTagName(_20c)){this._updateSelectedTagNameWithNode(_20c,li);this._visuallySelectTagNode(li,_214);}if((this.countsEnabled)&&(_212)){var _216;if(this.isExtendedCountsDisplay){if(_20f>1){_216=dojo.string.substitute(this.bundle.text_times,[_20f]);}else{_216=dojo.string.substitute(this.bundle.text_time,[_20f]);}}else{_216=_20f;}var _217=dojo.doc.createTextNode("\n"+_216);dojo.attr(li,"title",dojo.string.substitute(this.bundle.title_tagged_times,[_20c,_20f]));dojo.place(_217,li,"last");}if(this.bIsTracing){this.traceExit(m);}},initializeHiddenForm:function(){var m="initializeHiddenForm()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"QnameAll ",com.ibm.widgets.TagCloud._qnameAll);this.trace(m,"QnameFederation ",com.ibm.widgets.TagCloud._qnameFederation);this.trace(m,"QnameCommunity ",com.ibm.widgets.TagCloud._qnameCommunity);this.trace(m,"QnamePersonalPublic ",com.ibm.widgets.TagCloud._qnamePersonalPublic);this.trace(m,"QnameLatest ",com.ibm.widgets.TagCloud._qnameLatest);this.trace(m,"QnamePersonalPrivate ",com.ibm.widgets.TagCloud._qnamePersonalPrivate);this.trace(m,"QnameSuggestedLinks ",com.ibm.widgets.TagCloud._qnameSuggestedLinks);this.trace(m,"QnameAnalytics ",com.ibm.widgets.TagCloud._qnameAnalytics);this.trace(m,"QnameSettings ",com.ibm.widgets.TagCloud._qnameSettings);}dojo.attr(this.hiddenForm,"action",this.baseURL);var _218;if(this.sharedRenderParameterMode||(!this.isTagCenterAvailable)){if(!this.isTagCenterAvailable){this.trace(m,"Tag Center is not available");}if(this.bIsTracing){this.trace(m,"Using Shared Render Parameter mode");}_218=this.uriPRP;}else{if(this.bIsTracing){this.trace(m,"Using redirect to Tag Center mode");}_218=this.uriTagCenter;}dojo.create("input",{type:"hidden",name:"uri",id:this.namespace+"uri",value:_218},this.hiddenForm);if(this.bIsTracing){this.traceExit(m);}},_updateSelectedTagNameWithNode:function(_219,_21a){var m="_updateSelectedTagNameWithNode(tagName, tagNode)";if(this.bIsTracing){this.traceEntry(m,[_219,_21a]);}for(var i=0,l=this.selectedTags.length;i<l;i++){if(this.removePrefix(this.selectedTags[i].name)==_219){if(this.bIsTracing){this.trace(m,"Tag found. Updating with node",_21a);}this.selectedTags[i].node=_21a;}}if(this.bIsTracing){this.traceExit(m);}},initializeSelectedTags:function(){var m="initializeSelectedTags()";if(this.bIsTracing){this.traceEntry(m);}this.selectedTags=[];var _21b;if(this._viewMode==this.views[this._idxViewAll][1]){_21b=this.preselectedTagNamesAll;}else{if(this._viewMode==this.views[this._idxViewFederation][1]){_21b=this.preselectedTagNamesFederation;}else{if(this._viewMode==this.views[this._idxViewCommunity][1]){_21b=this.preselectedTagNamesCommunity;}else{if(this._viewMode==this.views[this._idxViewPersonal][1]){_21b=this.preselectedTagNamesPersonalPublic;}else{if(this._viewMode==this.views[this._idxViewLatest][1]){_21b=this.preselectedTagNamesLatest;}else{if(this._viewMode==this.views[this._idxViewPrivate][1]){_21b=this.preselectedTagNamesPersonalPrivate;}else{if(this._viewMode==this.views[this._idxViewSuggestedLinks][1]){_21b=this.preselectedTagNamesSuggestedLinks;}else{if(this._viewMode==this.views[this._idxViewAnalytics][1]){_21b=this.preselectedTagNamesAnalytics;}}}}}}}}for(var i=0,l=_21b.length;i<l;i++){if(this.bIsTracing){this.trace(m,"Preselected Tag Name ",_21b[i]);}this.selectedTags.push({name:_21b[i],domNode:null});}if(this.bIsTracing){this.traceExit(m);}},_mergeArrays:function(_21c,_21d){var _21e=[];dojo.forEach(_21c,function(e){_21e.push(e);});dojo.forEach(_21d,function(e){var _21f=false;for(var i=0;i<_21c.length;++i){if(_21c[i]==e){_21f=true;break;}}if(!_21f){_21e.push(e);}});return _21e;},buildQNameFormFieldsForSelectedTags:function(_220){var m="buildQNameFormFieldsForSelectedTags(aTagName)";if(this.bIsTracing){this.traceEntry(m,_220);}var _221;if(this.bIsTracing){this.trace(m,"Number of selected all tags ",this.preselectedTagNamesAll);this.trace(m,"Number of selected federation tags ",this.preselectedTagNamesFederation);this.trace(m,"Number of selected community tags ",this.preselectedTagNamesCommunity);this.trace(m,"Number of selected personal public tags ",this.preselectedTagNamesPersonalPublic);this.trace(m,"Number of selected latest tags ",this.preselectedTagNamesLatest);this.trace(m,"Number of selected personal private tags ",this.preselectedTagNamesPersonalPrivate);this.trace(m,"Number of selected suggested links tags ",this.preselectedTagNamesSuggestedLinks);this.trace(m,"Number of selected analytics tags ",this.preselectedTagNamesAnalytics);}var i=0;var l=0;var _222;var _223=this.preselectedTagNamesAll;for(i=0,l=_223.length;i<l;i++){_222=_223[i];dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameAll,id:this.namespace+com.ibm.widgets.TagCloud._qnameAll+i,value:_222},this.hiddenForm);}_223=this.preselectedTagNamesFederation;for(i=0,l=_223.length;i<l;i++){_222=_223[i];dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameFederation,id:this.namespace+com.ibm.widgets.TagCloud._qnameFederation+i,value:_222},this.hiddenForm);}_223=this.preselectedTagNamesCommunity;for(i=0,l=_223.length;i<l;i++){_222=_223[i];dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameCommunity,id:this.namespace+com.ibm.widgets.TagCloud._qnameCommunity+i,value:_222},this.hiddenForm);}_223=this.preselectedTagNamesPersonalPublic;for(i=0,l=_223.length;i<l;i++){_222=_223[i];dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnamePersonalPublic,id:this.namespace+com.ibm.widgets.TagCloud._qnamePersonalPublic+i,value:_222},this.hiddenForm);}_223=this.preselectedTagNamesLatest;for(i=0,l=_223.length;i<l;i++){_222=_223[i];dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameLatest,id:this.namespace+com.ibm.widgets.TagCloud._qnameLatest+i,value:_222},this.hiddenForm);}_223=this.preselectedTagNamesPersonalPrivate;for(i=0,l=_223.length;i<l;i++){_222=_223[i];dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnamePersonalPrivate,id:this.namespace+com.ibm.widgets.TagCloud._qnamePersonalPrivate+i,value:_222},this.hiddenForm);}_223=this.preselectedTagNamesSuggestedLinks;for(i=0,l=_223.length;i<l;i++){_222=_223[i];dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameSuggestedLinks,id:this.namespace+com.ibm.widgets.TagCloud._qnameSuggestedLinks+i,value:_222},this.hiddenForm);}_223=this.preselectedTagNamesAnalytics;for(i=0,l=_223.length;i<l;i++){_222=_223[i];dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameAnalytics,id:this.namespace+com.ibm.widgets.TagCloud._qnameAnalytics+i,value:_222},this.hiddenForm);}if(_220===null){if((this._viewMode==this.views[this._idxViewAll][1])&&this.preselectedTagNamesAll.length===0){if(this.bIsTracing){this.trace(m,"Clearing all tag selection");}dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameAll,id:this.namespace+com.ibm.widgets.TagCloud._qnameAll+0,value:""},this.hiddenForm);}else{if((this._viewMode==this.views[this._idxViewFederation][1])&&this.preselectedTagNamesFederation.length===0){if(this.bIsTracing){this.trace(m,"Clearing federation tag selection");}dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameFederation,id:this.namespace+com.ibm.widgets.TagCloud._qnameFederation+0,value:""},this.hiddenForm);}else{if((this._viewMode==this.views[this._idxViewCommunity][1])&&this.preselectedTagNamesCommunity.length===0){if(this.bIsTracing){this.trace(m,"Clearing community tag selection");}dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameCommunity,id:this.namespace+com.ibm.widgets.TagCloud._qnameCommunity+0,value:""},this.hiddenForm);}else{if((this._viewMode==this.views[this._idxViewPersonal][1])&&this.preselectedTagNamesPersonalPublic.length===0){if(this.bIsTracing){this.trace(m,"Clearing personal public tag selection");}dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnamePersonalPublic,id:this.namespace+com.ibm.widgets.TagCloud._qnamePersonalPublic+0,value:""},this.hiddenForm);}else{if((this._viewMode==this.views[this._idxViewLatest][1])&&this.preselectedTagNamesLatest.length===0){if(this.bIsTracing){this.trace(m,"Clearing latest tag selection");}dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameLatest,id:this.namespace+com.ibm.widgets.TagCloud._qnameLatest+0,value:""},this.hiddenForm);}else{if((this._viewMode==this.views[this._idxViewPrivate][1])&&this.preselectedTagNamesPersonalPrivate.length===0){if(this.bIsTracing){this.trace(m,"Clearing personal private tag selection");}dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnamePersonalPrivate,id:this.namespace+com.ibm.widgets.TagCloud._qnamePersonalPrivate+0,value:""},this.hiddenForm);}else{if((this._viewMode==this.views[this._idxViewSuggestedLinks][1])&&this.preselectedTagNamesSuggestedLinks.length===0){if(this.bIsTracing){this.trace(m,"Clearing suggested links tag selection");}dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameSuggestedLinks,id:this.namespace+com.ibm.widgets.TagCloud._qnameSuggestedLinks+0,value:""},this.hiddenForm);}else{if((this._viewMode==this.views[this._idxViewAnalytics][1])&&this.preselectedTagNamesAnalytics.length===0){if(this.bIsTracing){this.trace(m,"Clearing analytics tag selection");}dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameAnalytics,id:this.namespace+com.ibm.widgets.TagCloud._qnameAnalytics+0,value:""},this.hiddenForm);}}}}}}}}}else{var _224=null;if(this._viewMode==this.views[this._idxViewAll][1]){_224=com.ibm.widgets.TagCloud._qnameAll;}else{if(this._viewMode==this.views[this._idxViewCommunity][1]){_224=com.ibm.widgets.TagCloud._qnameCommunity;}else{if(this._viewMode==this.views[this._idxViewFederation][1]){_224=com.ibm.widgets.TagCloud._qnameFederation;}else{if(this._viewMode==this.views[this._idxViewPersonal][1]){_224=com.ibm.widgets.TagCloud._qnamePersonalPublic;}else{if(this._viewMode==this.views[this._idxViewLatest][1]){_224=com.ibm.widgets.TagCloud._qnameLatest;}else{if(this._viewMode==this.views[this._idxViewPrivate][1]){_224=com.ibm.widgets.TagCloud._qnamePersonalPrivate;}else{if(this._viewMode==this.views[this._idxViewSuggestedLinks][1]){_224=com.ibm.widgets.TagCloud._qnameSuggestedLinks;}else{if(this._viewMode==this.views[this._idxViewAnalytics][1]){_224=com.ibm.widgets.TagCloud._qnameAnalytics;}}}}}}}}_220=this.addPrefix(_220);dojo.create("input",{type:"hidden",name:_224,id:this.namespace+_224+(_223.length+1),value:_220},this.hiddenForm);}var _225=this._viewMode;if(this._viewMode==this.views[this._idxViewAll][1]&&this.showFederationInAllView){_225="all_federation";}dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameMode,id:this.namespace+com.ibm.widgets.TagCloud._qnameMode,value:_225},this.hiddenForm);this._saveClientSideState();dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameSettings,id:this.namespace+com.ibm.widgets.TagCloud._qnameSettings,value:this.serializedSettings},this.hiddenForm);if(this.scopeBy=="category"){var _226=this._mergeArrays(this._selectedCategories,this._transmittedCategories);if(_226.length>0){dojo.forEach(_226,function(_227){_221=dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameSelectedCategories,value:_227},this.hiddenForm);},this);}else{_221=dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameSelectedCategories,value:""},this.hiddenForm);}}else{if(this.scopeBy=="typeSchema"){var _228=this._mergeArrays(this._selectedTypeSchemaScopes,this._transmittedTypeSchemaScopes);if(_228.length>0){dojo.forEach(_228,function(_229){_221=dojo.create("input",{type:"hidden",name:com.ibm.widgets.TagCloud._qnameSelectedSchemas,value:_229},this.hiddenForm);},this);}}}if(this.bIsTracing){this.traceExit(m);}},initializeDisplayModes:function(){var m="initializeDisplayModes()";if(this.bIsTracing){this.traceEntry(m);this.trace(m,"Show display section ",this.showDisplay);}if(this.showDisplay){var _22a=this.displayModeDiv;if(_22a&&_22a.firstChild){dojo.destroy(_22a.firstChild);}var ul=dojo.create("ul",{"class":"lotusInlinelist",id:this.namespace+"display_mode_list",name:this.namespace+"display_mode_list"},_22a);var _22b=dojo.create("li",{innerHTML:this.bundle.text_view_as,title:this.bundle.text_view_as,id:this.namespace+"view_as_node",name:this.namespace+"view_as_node","class":"lotusFirst"},ul);if(this.bIsTracing){this.trace(m,"Number of display modes ",this.displays.length);}for(var i=0,l=this.displays.length;i<l;i++){var dm=this.displays[i];var _22c=this._displayNames[i];if(this.bIsTracing){this.trace(m,"DisplayMode initializing ",dm);}var _22d=_22c;var li=dojo.create("li",{id:this.namespace+"display_node_"+i,name:this.namespace+"display_node_"+i},ul);if(i===0){dojo.addClass(li,"lotusFirst");}var _22e=this.bundle.title_cloud_view;if(i==1){_22e=this.bundle.title_list_view;}if(this._displayMode!=dm){var a=dojo.create("a",{innerHTML:_22d,title:_22e,id:this.namespace+dm,name:this.namespace+dm,"class":"lotusAction",href:"javascript:void(0);"},li);dijit.setWaiRole(a,"button");dijit.setWaiState(a,"pressed","false");dojo.connect(a,"onclick",dojo.hitch(this,"setDisplayMode",dm,false));}else{var span=dojo.create("span",{innerHTML:"<strong>"+_22d+"</strong>",title:_22e,id:this.namespace+dm,name:this.namespace+dm},li);}}dojo.style(this.displayModeDiv,"display","inline");}if(this.bIsTracing){this.traceExit(m);}},initializeViewModes:function(){var m="initializeViewModes()";if(this.bIsTracing){this.traceEntry(m);}var ml=0;if(this.redirectView){ml=this.views.length;for(var k=0;k<ml;k++){if(this.redirectView==this.views[k][1]){this._viewMode=this.views[k][1];}}}this._viewAvailable[this._idxViewAll]=this.isAllViewAllowed;this._viewAvailable[this._idxViewFederation]=this.isFederationViewAllowed;this._viewAvailable[this._idxViewCommunity]=this.isCommunityViewAllowed;this._viewAvailable[this._idxViewPersonal]=this.isPersonalViewAllowed&&(this.userName!=="");this._viewAvailable[this._idxViewLatest]=this.isLatestViewAllowed;this._viewAvailable[this._idxViewPrivate]=this.isPrivateViewAllowed&&(this.userName!=="");this._viewAvailable[this._idxViewSuggestedLinks]=this.isSuggestedLinksViewAllowed;this._viewAvailable[this._idxViewAnalytics]=this.isAnalyticsViewAllowed;var _22f=false;var runs=0;do{_22f=false;ml=this.views.length;for(var j=0;j<ml;j++){if((_22f)&&(this._viewAvailable[j])){this._viewMode=this.views[j][1];if(this.bIsTracing){this.trace(m,"Default view mode is unavailable, changing to ",this._viewMode);}break;}else{if(this._viewMode==this.views[j][1]){if(!this._viewAvailable[j]){_22f=true;}}}}runs++;}while((_22f)&&(runs<2));if(this.bIsTracing){this.trace(m,"Show view section ",this.showView);}if(this.showView){var _230=this.viewModeDiv;if(_230&&_230.firstChild){dojo.destroy(_230.firstChild);}var ul=dojo.create("ul",{"class":"lotusInlinelist",id:this.namespace+"view_mode_list",name:this.namespace+"view_mode_list"},_230);if(this.bIsTracing){this.trace(m,"Number of view modes ",this.views.length);}var _231=true;for(var i=0,l=this.views.length;i<l;i++){if(this._viewAvailable[i]){var vm=this.views[i][0];if(this.bIsTracing){this.trace(m,"ViewMode initializing ",vm);}var _232=vm;var li=dojo.create("li",{id:this.namespace+"view_node_"+i,name:this.namespace+"view_node_"+i},ul);if(_231===true){dojo.addClass(li,"lotusFirst");_231=false;}if(this._viewMode!=this.views[i][1]){var a=dojo.create("a",{title:this.views[i][2],id:this.namespace+vm,name:this.namespace+vm,"class":"lotusAction",innerHTML:vm,href:"javascript:void(0);"},li);dijit.setWaiRole(a,"button");dijit.setWaiState(a,"pressed","false");dojo.connect(a,"onclick",dojo.hitch(this,"setViewMode",this.views[i],false));}else{var span=dojo.create("span",{innerHTML:"<strong>"+vm+"</strong>",title:this.views[i][2],id:this.namespace+vm,name:this.namespace+vm},li);}}}dojo.style(this.viewModeDiv,"display","inline");}if(this.bIsTracing){this.traceExit(m);}},getAvailableScopeIndex:function(_233){var m="getAvailableScopeIndex(scopeName)";if(this.bIsTracing){this.traceEntry(m);}var _234=null;if(this.scopeBy=="category"){_234=this._availableCategories;}else{_234=this._availableTypeSchemaScopes;}var _235=-1;for(var i=0,l=_234.length;i<l;i++){if(_234[i]==_233){_235=i;break;}}if(this.bIsTracing){this.traceExit(m,_235);}return _235;},_encodePartialHTML:function(_236){var m="_encodePartialHTML(htmlFragment)";if(this.bIsTracing){this.traceEntry(m,[_236]);}var _237=_236;_237=_237.replace(/\u0022/g,"&#34;");_237=_237.replace(/\u0027/g,"&#39;");_237=_237.replace(/\u003c/g,"&#60;");_237=_237.replace(/\u003e/g,"&#62;");if(this.bIsTracing){this.traceExit(m,_237);}return _237;},selectScope:function(_238,_239){var m="selectScope(scopeName, reloadTags)";if(this.bIsTracing){this.traceEntry(m,[_238,_239]);}var _23a=null;var _23b=null;if(this.scopeBy=="category"){_23a=this._availableCategories;_23b=this._selectedCategories;}else{_23a=this._availableTypeSchemaScopes;_23b=this._selectedTypeSchemaScopes;}var _23c=false;for(var i=0,l=_23a.length;i<l;i++){if(_23a[i]==_238){_23c=true;break;}}if(_23c){var _23d=false;for(var j=0,k=_23b.length;j<k;j++){if(_23b[j]==_238){_23d=true;break;}}if(!_23d){_23b.push(_238);var _23e=this.getAvailableScopeIndex(_238);var _23f=this._encodePartialHTML(_23a[_23e]);var ul=this._dapSelectedScopesNode;if(this.bIsTracing){this.trace(m,"Adding selected scope ",_238);}var _240;if(this.isRTL){aInnerHTML="<span class=\"lotusClose\">X</span> "+_23f;}else{aInnerHTML=_23f+" <span class=\"lotusClose\">X</span>";}var a=dojo.create("a",{"class":"lotusFilter lotusNowrap",id:this.namespace+"scope_"+_23f,name:this.namespace+"scope_"+_23f,title:this.bundle.title_remove_scope,href:"javascript:void(0);",innerHTML:aInnerHTML},ul);dijit.setWaiRole(a,"button");dijit.setWaiState(a,"pressed","false");var _241="remove_scope_"+_23f;dojo.connect(a,"onclick",dojo.hitch(this,"removeSelectedScope",_23e+","+_241,false));this._dapSelectedScopes[_241]=a;dojo.place(dojo.doc.createTextNode(" "),ul,"last");this.setFetchRMParameters();if((_239)&&(this._isFullyInitialized)){this.fetchTags();}}else{if(this.bIsTracing){this.trace(m,"Selected scope already selected ",_238);}}}else{if(this.bIsTracing){this.trace(m,"Selected scope not in list of available scopes ",_238);}}if(this.bIsTracing){this.traceExit(m);}},transmitTypeSchema:function(_242,_243){var m="transmitTypeSchema(typeSchemaName, isSelected)";if(this.bIsTracing){this.traceEntry(m,[_242,_243]);}var _244=(this.scopeBy=="typeSchema");if(this.allowTypeSchemaScopeTransmission){var _245=false;var _246=null;if((this.showTransmittedTypeSchemaScopes)&&_244){_246=this._availableCategories;}else{_246=this._transmittedCategories;}if(this._arrayContains(_246,_242)){_245=true;}if(!_245){if((this.showTransmittedTypeSchemaScopes)&&_244){if(this.bIsTracing){this.trace(m,"Adding type schema to list of available type schemas",_242);}this._availableTypeSchemaScopes.push(_242);var item=this._scopeStore.newItem({name:_242});this._scopeStore.save();this.categorySelect.setStore(this._scopeStore);}else{if(this.bIsTracing){this.trace(m,"Adding type schema to list of transmitted type schemas",_242);}this._transmittedTypeSchemaScopes.push(_242);}}if((_243)&&(this.showTransmittedTypeSchemaScopes)&&_244){this.selectScope(_242,true);}}if(this.bIsTracing){this.traceExit(m);}},transmitCategory:function(_247,_248){var m="transmitCategory(categoryName, isSelected)";if(this.bIsTracing){this.traceEntry(m,[_247,_248]);}var _249=(this.scopeBy=="category");if(this.allowCategoryTransmission){var _24a=false;var _24b=null;if((this.showTransmittedCategories)&&_249){_24b=this._availableCategories;}else{_24b=this._transmittedCategories;}for(var i=0,l=_24b.length;i<l;i++){if(_24b[i]==_247){_24a=true;break;}}if(!_24a){if((this.showTransmittedCategories)&&_249){if(this.bIsTracing){this.trace(m,"Adding category to list of available categories",_247);}this._availableCategories.push(_247);var item=this._scopeStore.newItem({name:_247});this._scopeStore.save();this.categorySelect.setStore(this._scopeStore);}else{if(this.bIsTracing){this.trace(m,"Adding category to list of transmitted categories",_247);}this._transmittedCategories.push(_247);}}if((_248)&&(this.showTransmittedCategories)&&_249){this.selectScope(_247,true);}}if(this.bIsTracing){this.traceExit(m);}},removeSelectedScope:function(_24c){var m="removeSelectedScope(scopeParams)";if(this.bIsTracing){this.traceEntry(m,[_24c]);}var _24d=_24c.split(",");var _24e=[];var _24f=[];if(this.scopeBy=="category"){_24e=this._selectedCategories;_24f=this._availableCategories;}else{_24e=this._selectedTypeSchemaScopes;_24f=this._availableTypeSchemaScopes;}var _250=_24f[_24d[0]];var _251=this._dapSelectedScopes[_24d[1]];for(var i=0;i<_24e.length;i++){if(_24e[i]==_250){_24e.splice(i,1);if(_251){dojo.destroy(_251);}break;}}this.setFetchRMParameters();this.setFetchQueryParameters(this._viewMode);this.fetchTags();if(this.bIsTracing){this.traceExit(m);}},onClickSelectScopeBtn:function(){var m="onClickSelectScopeBtn()";if(this.bIsTracing){this.traceEntry(m);}var _252=this.categorySelect.attr("value");this.selectScope(_252,true);if(this.bIsTracing){this.traceExit(m);}},initializeScoping:function(){var m="initializeScoping()";if(this.bIsTracing){this.traceEntry(m);}if(this._viewMode==this.views[this._idxViewFederation][1]){if(this.bIsTracing){this.trace(m,"Scoping dialog is disabled in federation view");}}else{if(this.showScopes&&(((this.scopeBy=="category")&&(this.selectableCategories.length>0))||((this.scopeBy=="typeSchema")&&(this.selectableTypeSchemas.length>0)))){dojo.style(this.scopeSelector,"display","block");}if(this.scopeBy=="category"){this.initializeCategories();}else{this.initializeTypeSchemas();}if(!this.isScopeSelectorExpanded){if(dojo.hasClass(this.scopeTwisty,"lotusTwistyOpen")){this.onExpandCollapseCategorySection();}}}if(this.bIsTracing){this.traceExit(m);}},initializeCategories:function(){var m="initializeCategories()";if(this.bIsTracing){this.traceEntry(m);}var _253="";var _254="";this._availableCategories=[];for(var k=0,l=this.selectableCategories.length;k<l;k++){_253=this.selectableCategories[k];if(this.isDecodeCategories===true){if(this.bIsTracing){this.trace(m,"Decoding and adding category",_253);}_254=decodeURIComponent(_253);if(this.bIsTracing){this.trace(m,"Decoded category",_254);}if(this._arrayContains(this._availableCategories,_254)){if(this.bIsTracing){this.trace(m,"Duplicate category found",_254);}}else{this._availableCategories.push(_254);}}else{if(this.bIsTracing){this.trace(m,"Adding category as-is",_253);}if(this._arrayContains(this._availableCategories,_253)){if(this.bIsTracing){this.trace(m,"Duplicate category found",_253);}}else{this._availableCategories.push(_253);}}}this._transmittedCategories=[];for(var i=0,ml=this.hiddenCategories.length;i<ml;i++){_253=this.hiddenCategories[i];if(this.isDecodeCategories===true){if(this.bIsTracing){this.trace(m,"Decoding and adding transmitted category",_253);}_254=decodeURIComponent(_253);if(this.bIsTracing){this.trace(m,"Decoded category",_254);}if(this._arrayContains(this._transmittedCategories,_254)){if(this.bIsTracing){this.trace(m,"Duplicate category found",_254);}}else{this._transmittedCategories.push(_254);}}else{if(this.bIsTracing){this.trace(m,"Adding transmitted category as-is",_253);}if(this._arrayContains(this._transmittedCategories,_253)){if(this.bIsTracing){this.trace(m,"Duplicate category found",_253);}}else{this._transmittedCategories.push(_253);}}}this._scopeStore=new dojo.data.ItemFileWriteStore({data:{identifier:"name",items:[]}});for(i=0,mk=this._availableCategories.length;i<mk;i++){var item=this._scopeStore.newItem({name:this._availableCategories[i]});}this._scopeStore.save();this.categorySelect.setStore(this._scopeStore);if((this.showScopes)&&(this.scopeBy=="category")){this._dapSelectedScopesNode=dojo.create("div",{"class":"lotusFilters",id:this.namespace+"category_list",name:this.namespace+"category_list"},this.categoryListDiv);for(var j=0,n=this.preselectedCategories.length;j<n;j++){var sc="";if(this.isDecodeCategories===true){sc=decodeURIComponent(this.preselectedCategories[j]);}else{sc=this.preselectedCategories[j];}this.selectScope(sc,false);}dojo.style(this.categoryListDiv,"display","block");dojo.connect(this.selectCategoryBtn,"onclick",dojo.hitch(this,"onClickSelectScopeBtn"));dojo.connect(this.scopeTwisty,"onclick",dojo.hitch(this,"onExpandCollapseCategorySection"));dojo.connect(this.scopeSectionHeader,"onclick",dojo.hitch(this,"onExpandCollapseCategorySection"));}else{dojo.style(this.categoryListDiv,"display","none");}this.setFetchRMParameters();if(this.bIsTracing){this.traceExit(m);}},initializeTypeSchemas:function(){var m="initializeTypeSchemas()";if(this.bIsTracing){this.traceEntry(m);}var _255="";var _256="";this._availableTypeSchemaScopes=[];for(var k=0,l=this.selectableTypeSchemas.length;k<l;k++){_255=this.selectableTypeSchemas[k];if(this.isDecodeTypeSchemas===true){if(this.bIsTracing){this.trace(m,"Decoding and adding type schema",_255);}_256=decodeURIComponent(_255);if(this.bIsTracing){this.trace(m,"Decoded type schema",_256);}if(this._arrayContains(this._availableTypeSchemaScopes,_256)){if(this.bIsTracing){this.trace(m,"Duplicate type schema found",_256);}}else{this._availableTypeSchemaScopes.push(_256);}}else{if(this.bIsTracing){this.trace(m,"Adding type schema as-is",_255);}if(this._arrayContains(this._availableTypeSchemaScopes,_255)){if(this.bIsTracing){this.trace(m,"Duplicate type schema found",_255);}}else{this._availableTypeSchemaScopes.push(_255);}}}this._transmittedTypeSchemaScopes=[];for(var i=0,ml=this.hiddenTypeSchemas.length;i<ml;i++){_255=this.hiddenTypeSchemas[i];if(this.isDecodeTypeSchemas===true){if(this.bIsTracing){this.trace(m,"Decoding and adding transmitted type schema",_255);}_256=decodeURIComponent(_255);if(this.bIsTracing){this.trace(m,"Decoded type schema",_256);}if(this._arrayContains(this._transmittedTypeSchemaScopes,_256)){if(this.bIsTracing){this.trace(m,"Duplicate type schema found",_256);}}else{this._transmittedTypeSchemaScopes.push(_256);}}else{if(this.bIsTracing){this.trace(m,"Adding transmitted type schema as-is",_255);}if(this._arrayContains(this._transmittedTypeSchemaScopes,_255)){if(this.bIsTracing){this.trace(m,"Duplicate type schema found",_255);}}else{this._transmittedTypeSchemaScopes.push(_255);}}}this._scopeStore=new dojo.data.ItemFileWriteStore({data:{identifier:"name",items:[]}});for(i=0,mk=this._availableTypeSchemaScopes.length;i<mk;i++){var item=this._scopeStore.newItem({name:this._availableTypeSchemaScopes[i]});}this._scopeStore.save();this.categorySelect.setStore(this._scopeStore);if((this.showScopes)&&(this.scopeBy=="typeSchema")){this._dapSelectedScopesNode=dojo.create("div",{"class":"lotusFilters",id:this.namespace+"typeSchema_list",name:this.namespace+"typeSchema_list"},this.categoryListDiv);for(var j=0,n=this.preselectedTypeSchemas.length;j<n;j++){var sc="";if(this.isDecodeTypeSchemas===true){sc=decodeURIComponent(this.preselectedTypeSchemas[j]);}else{sc=this.preselectedTypeSchemas[j];}this.selectScope(sc,false);}dojo.style(this.categoryListDiv,"display","block");dojo.connect(this.selectCategoryBtn,"onclick",dojo.hitch(this,"onClickSelectScopeBtn"));dojo.connect(this.scopeTwisty,"onclick",dojo.hitch(this,"onExpandCollapseCategorySection"));dojo.connect(this.scopeSectionHeader,"onclick",dojo.hitch(this,"onExpandCollapseCategorySection"));}else{dojo.style(this.categoryListDiv,"display","none");}this.setFetchRMParameters();if(this.bIsTracing){this.traceExit(m);}},_showPagingHeaderAndFooter:function(){var m="_showPagingHeaderAndFooter()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.pagingHeader,"display","block");if(_isShowPrevLink||_isShowNextLink){dojo.style(this.pagingFooter,"display","block");}if(this.bIsTracing){this.traceExit(m);}},_hidePagingHeaderAndFooter:function(){var m="_hidePagingHeaderAndFooter()";if(this.bIsTracing){this.traceEntry(m);}dojo.style(this.pagingHeader,"display","none");dojo.style(this.pagingFooter,"display","none");if(this.bIsTracing){this.traceExit(m);}},loadPreviousPage:function(){var m="loadPreviousPage()";if(this.bIsTracing){this.traceEntry(m);}this.paging_pageToFetch=this.paging_currentPage-1;this.fetchTags();if(this.bIsTracing){this.traceExit(m);}},loadNextPage:function(){var m="loadNextPage()";if(this.bIsTracing){this.traceEntry(m);}this.paging_pageToFetch=this.paging_currentPage+1;this.fetchTags();if(this.bIsTracing){this.traceExit(m);}},fetchSpecificPage:function(_257){var m="fetchSpecificPage(pageToLoad)";if(this.bIsTracing){this.traceEntry(m,_257);}this.paging_pageToFetch=_257;this.fetchTags();if(this.bIsTracing){this.traceExit(m);}},initializePagingHeader:function(){var m="initializePagingHeader()";if(this.bIsTracing){this.traceEntry(m);}if(this._dapPagingHeaderContainerDiv){dojo.destroy(this._dapPagingHeaderContainerDiv);}this._dapPagingHeaderContainerDiv=dojo.create("div",{id:this.namespace+"pagingHeaderContainerDiv"},this.pagingHeader);var _258=(((this.paging_currentPage-1)*this.paging_resultsPerPage)+1);var _259=_258+this.paging_resultsPerPage-1;if(_259>this.paging_totalResults){_259=this.paging_totalResults;}var _25a=this.bundle.text_page_of_pages;dojo.create("span",{"class":"lotusLeft trcPagingSpan",id:this.namespace+"countSpan",name:this.namespace+"countSpan",title:dojo.string.substitute(this.bundle.title_tagsshown,[_258,_259,this.paging_totalResults]),innerHTML:dojo.string.substitute(_25a,[_258,_259,this.paging_totalResults])},this._dapPagingHeaderContainerDiv);var _25b=dojo.create("span",{"class":"lotusRight",id:this.namespace+"pagesSpan",name:this.namespace+"pagesSpan"},this._dapPagingHeaderContainerDiv);var _25c=dojo.create("span",{id:this.namespace+"pageTitleSpan",name:this.namespace+"pageTitleSpan",title:this.bundle.title_pagepicker},_25b);var _25d=dojo.create("ul",{"class":"lotusInlinelist",id:this.namespace+"pagesList",name:this.namespace+"pagesList",title:this.bundle.title_pagepicker},_25c);var _25e=Math.ceil(this.paging_totalResults/this.paging_resultsPerPage);var _25f=this.paging_numResultPages-2;var _260=Math.floor((_25f-1)/2);var _261=this.paging_currentPage-_260;var _262=this.paging_currentPage+_260;if(_261<=1){_261=1;_262=_25f+1;}if(_262>=_25e){_262=_25e;_261=_25e-_25f;}var li=null;for(var i=0;i<_25e;i++){if((i===0)||(i>=(_25e-1))||((i>=(_261-2))&&(i<=(_262)))){var _263=(((i==_261-2)||(i==_262))&&(i!==0)&&(i!=_25e-1));li=dojo.create("li",{"class":"trcPagingLine",id:this.namespace+"page_item_"+i,name:this.namespace+"page_item_"+i},_25d);if(i===0){dojo.addClass(li,"lotusFirst");}if(i!=this.paging_currentPage-1){if(_263){dojo.attr(li,"innerHTML",this.bundle.text_ellipsis);}else{if(i===0){dojo.attr(li,"innerHTML",dojo.string.substitute(this.bundle.text_page,[""]));}var a=dojo.create("a",{title:dojo.string.substitute(this.bundle.title_goto_page,[(i+1)]),id:this.namespace+"page_link_"+i,name:this.namespace+"page_link_"+i,innerHTML:i+1,href:"javascript:void(0);"},li);dojo.connect(a,"onclick",dojo.hitch(this,"fetchSpecificPage",i+1));var img;if(this.isRTL===true){img=dojo.create("img",{src:this.blankImgUrl,"alt":" "+this.bundle.alt_goto_page},a);}else{img=dojo.create("img",{src:this.blankImgUrl,"alt":this.bundle.alt_goto_page+" "},a,"first");}}}else{if(i===0){dojo.attr(li,"innerHTML",dojo.string.substitute(this.bundle.text_page,["1"]));}else{dojo.attr(li,"innerHTML",i+1);}}}}if(this.bIsTracing){this.traceExit(m);}},jumpToPage:function(_264){var m="jumpToPage(event)";if(this.bIsTracing){this.traceEntry(m,[_264]);}var key=_264.keyCode;var keys=dojo.keys;if(key==keys.ENTER){var page=this._dapJumpToPageInput.value;var _265=parseInt(page,10);var mPos=page.match("[0-9]*");if((isNaN(_265))||(mPos!=page)){if(this.bIsTracing){this.traceExit(m,page);}return false;}else{var _266=Math.ceil(this.paging_totalResults/this.paging_resultsPerPage);if(_265<1){_265=1;}if(_265>_266){_265=_266;}this.fetchSpecificPage(_265);}}if(this.bIsTracing){this.traceExit(m);}return true;},initializePagingFooter:function(){var m="initializePagingFooter()";if(this.bIsTracing){this.traceEntry(m);}if(this._dapPagingFooterContainerDiv){dojo.destroy(this._dapPagingFooterContainerDiv);}this._dapPagingFooterContainerDiv=dojo.create("div",{},this.pagingFooter);var _267=dojo.create("div",{id:this.namespace+"jumpToPageSpan",name:this.namespace+"jumpToPageSpan",title:this.bundle.title_jump_to_page,"class":"lotusLeft"},this._dapPagingFooterContainerDiv);var _268=dojo.create("label",{innerHTML:this.bundle.text_jump_to_page+"&nbsp;"},_267);this._dapJumpToPageInput=dojo.create("input",{value:"",title:this.bundle.title_jump_to_page},_267);dojo.connect(this._dapJumpToPageInput,"onkeyup",dojo.hitch(this,"jumpToPage"));var _269=dojo.create("div",{id:this.namespace+"prevNextSpan",name:this.namespace+"prevNextSpan","class":"lotusRight"},this._dapPagingFooterContainerDiv);_isShowPrevLink=this.paging_currentPage>1;_isShowNextLink=(this.paging_currentPage*this.paging_resultsPerPage)<this.paging_totalResults;var ul=dojo.create("ul",{"class":"lotusInlinelist",id:this.namespace+"prevNextSpanList",name:this.namespace+"prevNextSpanList"},_269);var li;var a;var span;li=dojo.create("li",{"class":"lotusFirst",id:this.namespace+"prevLinkItem",name:this.namespace+"prevLinkItem"},ul);if(_isShowPrevLink){a=dojo.create("a",{id:this.namespace+"prevLink",name:this.namespace+"prevLink",onclick:dojo.hitch(this,"loadPreviousPage"),innerHTML:this.bundle.text_previous,title:this.bundle.title_previous,href:"javascript:void(0);"},li);}else{span=dojo.create("span",{id:this.namespace+"prevSpan",name:this.namespace+"prevSpan",innerHTML:this.bundle.text_previous,title:this.bundle.title_previous},li);}li=dojo.create("li",{id:this.namespace+"nextLinkItem",name:this.namespace+"nextLinkItem"},ul);if(_isShowNextLink){a=dojo.create("a",{id:this.namespace+"nextLink",name:this.namespace+"nextLink",onclick:dojo.hitch(this,"loadNextPage"),innerHTML:this.bundle.text_next,title:this.bundle.title_next,href:"javascript:void(0);"},li);}else{span=dojo.create("span",{id:this.namespace+"nextSpan",name:this.namespace+"nextSpan",innerHTML:this.bundle.text_next,title:this.bundle.title_next},li);}if(this.bIsTracing){this.traceExit(m);}},initializeTagCountSlider:function(){var m="initializeTagCountSlider()";if(this.bIsTracing){this.traceEntry(m);}var _26a=this.cloudSliderDiv;if(this.sliderEnabled){_26a.attr("minimum",this.minNumTags);_26a.attr("maximum",this.maxNumTags);var _26b=this.minNumTags+((this.maxNumTags-this.minNumTags)/2)+1;_26a.attr("value",_26b);_26a.attr("discreteValues",this._discreteTags);_26a.attr("intermediateChanges",true);_26a.attr("showButtons",false);_26a.onChange=dojo.hitch(this,this.onTagCountSliderChanged);if(this.bIsTracing){this.trace(m,"Slider Minimum Value ",_26a.minimum);this.trace(m,"Slider Maximum Value ",_26a.maximum);this.trace(m,"Slider Value ",_26a.value);this.trace(m,"Slider Discrete Tags ",_26a.discreteValues);this.trace(m,"Slider OnChange ",_26a.onChange);}}else{if(this.bIsTracing){this.trace(m,"Hiding slider");}this._hideTagCloudSlider();}if(this.bIsTracing){this.traceExit(m);}},resetSliderTo50Percent:function(){var m="resetSliderTo50Percent()";if(this.bIsTracing){this.traceEntry(m);}var _26c=this._maxTagsShown;var _26d=this._minTagsShown;this.cloudSliderDiv.attr("maximum",_26c);this.cloudSliderDiv.attr("minimum",_26d);if(this.bIsTracing){this.trace(m,"maxValue ",_26c);this.trace(m,"minValue ",_26d);this.trace(m,"defaultSliderPosition ",this.defaultSliderPosition);}var _26e=0;if(_26d<_26c){this._showTagCloudSlider();if(this.defaultSliderPosition==-1){_26e=_26d+((_26c-_26d)/2)+1;if(_26e>_26c){_26e=_26c;}}else{_26e=this.defaultSliderPosition;this._numTagsShownMax=this.defaultSliderPosition;if(_26e<_26d){_26e=_26d;}if(_26e>_26c){_26e=_26c;}}this._ignoreTagCountSliderUpdates++;this.cloudSliderDiv.attr("value",[_26e]);this._numTagsShown=_26e;this.updateTags();}else{this._hideTagCloudSlider();if(_26c===0){this._numTagsShown=0;}else{this._numTagsShown=_26c;this._numTagsShownMax=Math.max(_26c,this._numTagsShownMax);this.updateTags();}}if(this.bIsTracing){this.traceExit(m);}},onTagCountSliderChanged:function(pos){var m="onTagCountSliderChanged(pos)";if(this.bIsTracing){this.traceEntry(m,[pos]);}this._numTagsShown=this.cloudSliderDiv.attr("value");if(this._ignoreTagCountSliderUpdates===0){this._numTagsShownMax=this._numTagsShown;}this.updateTags();if(this._ignoreTagCountSliderUpdates>0){this._ignoreTagCountSliderUpdates--;}else{this.ignoreTagCountSliderUpdate=0;}if(this.bIsTracing){this.traceExit(m);}},onTagListKeyPressed:function(_26f){var m="onTagListKeyPressed(p_evt)";if(this._isTracing){this.traceEntry(m,[_26f]);}if(_26f.keyCode){var node=_26f.target;var dk=dojo.keys;switch(_26f.keyCode){case dk.UP_ARROW:case dk.LEFT_ARROW:dojo.stopEvent(_26f);this._setFocusOnTagWithIndex(this._focusTagIdx-1);break;case dk.DOWN_ARROW:case dk.RIGHT_ARROW:dojo.stopEvent(_26f);this._setFocusOnTagWithIndex(this._focusTagIdx+1);break;case dk.PAGE_UP:dojo.stopEvent(_26f);this._setFocusOnTagWithIndex(this._focusTagIdx-this.tagsPageSize);break;case dk.PAGE_DOWN:dojo.stopEvent(_26f);this._setFocusOnTagWithIndex(this._focusTagIdx+this.tagsPageSize);break;case dk.HOME:dojo.stopEvent(_26f);this._setFocusOnTagWithIndex(0);break;case dk.END:dojo.stopEvent(_26f);this._setFocusOnTagWithIndex(this._tagList.length-1);break;case dk.SPACE:var tag=this._tagList[this._focusTagIdx];this.onToggleTagSelection(tag.name,tag.item,tag.anchor);break;default:break;}}if(this._isTracing){this.traceExit(m,false);}},onFetchTagsError:function(err,_270,_271){var m="onFetchTagsError(err, errText, errDetails)";if(this.bIsTracing){this.traceEntry(m,[err,_270,_271]);}if(err.status==401){top.location.href=document.location.href;}else{if(err.status==403){dojo.attr(this.errorSpan,"innerHTML",this.bundle.text_error_insufficient_permissions);}else{dojo.attr(this.errorSpan,"innerHTML",_270);}dojo.style(this.errorDiv,"display","block");dojo.style(this.progressDiv,"display","none");if(_271&&_271!==""){dojo.attr(this.errorDetailsSpan,"innerHTML",_271);}}if(this.bIsTracing){this.traceExit(m);}},putTagsAsList:function(ul,_272,_273){var m="putTagsAsList(ul, items, request)";if(this.bIsTracing){this.traceEntry(m,[ul,_272,_273]);}var _274=this.tagStore;var _275=_272.length;dojo.forEach(_272,function(item){var _276=this.removePrefix(_274.getValue(item,com.ibm.widgets.TagCloud._nameAttribute));var _277=_274.getValue(item,com.ibm.widgets.TagCloud._preferredLocaleAttribute);var _278=_274.getValue(item,com.ibm.widgets.TagCloud._preferredLocaleDirAttribute);var _279=_274.getValue(item,com.ibm.widgets.TagCloud._countAttribute);var _27a=_274.getValue(item,com.ibm.widgets.TagCloud._isMineAttribute);var uri=_274.getValue(item,com.ibm.widgets.TagCloud._hrefAttribute);this.placeTag(_276,_277,_278,_279,uri,ul);},this);if(this.bIsTracing){this.traceExit(m);}},putTagsAsCloud:function(ul,_27b,_27c){var m="putTagsAsCloud(ul, items, request)";if(this.bIsTracing){this.traceEntry(m,[ul,_27b,_27c]);}var _27d=_27b.length;var _27e=this.tagStore;dojo.forEach(_27b,function(item){var _27f=this.removePrefix(_27e.getValue(item,com.ibm.widgets.TagCloud._nameAttribute));var _280=_27e.getValue(item,com.ibm.widgets.TagCloud._preferredLocaleAttribute);var _281=_27e.getValue(item,com.ibm.widgets.TagCloud._preferredLocaleDirAttribute);var _282=_27e.getValue(item,com.ibm.widgets.TagCloud._countAttribute);var _283=_27e.getValue(item,com.ibm.widgets.TagCloud._isMineAttribute);var uri=_27e.getValue(item,com.ibm.widgets.TagCloud._hrefAttribute);this.placeTag(_27f,_280,_281,_282,uri,ul);},this);this._maxTagsShown=_27b.length;this._minTagsShown=this.minNumTags;if(_27b.length>0){this._hideNoTagsWarning();}else{this._showNoTagsWarning();}this.resetSliderTo50Percent();if(this.bIsTracing){this.traceExit(m);}},onFetchBegin:function(_284,_285){var m="onFetchBegin(totalResultSize, requestObject)";if(this.bIsTracing){this.traceEntry(m,[_284,_285]);}this.paging_totalResults=_284;if(this.bIsTracing){this.traceExit(m,_284);}},displayTags:function(_286,_287){var m="displayTags(items, request)";if(this.bIsTracing){this.traceEntry(m,[_286,_287]);}var _288=(this._displayMode==this.displays[1]);dojo.style(this.errorDiv,"display","none");dojo.style(this.progressDiv,"display","none");var div=this.tagListContainer;var ul=dojo.create("ul",{id:this.namespace+"tagsList",name:this.namespace+"tagsList"},div);this._dapTagsList=ul;if(_288){dojo.addClass(ul,"lotusList lotusEditable lotusMeta");}else{dojo.addClass(ul,"lotusTagCloud lotusList");}dijit.setWaiRole(ul,"listbox");dijit.setWaiState(ul,"multiselectable","true");this._tagsKeyEvtHdls=[];this._tagsKeyEvtHdls.push(dojo.connect(ul,"onkeypress",dojo.hitch(this,"onTagListKeyPressed")));this._focusTagIdx=-1;this._tagList=[];this._visibleTagsList=[];if(_288){if((_286.length===0)&&(this.paging_totalResults>0)){this.paging_pageToFetch=Math.ceil(this.paging_totalResults/this.paging_resultsPerPage);this.fetchTags();}else{this._hidePagingHeaderAndFooter();this.putTagsAsList(ul,_286,_287);this.paging_currentPage=this.paging_pageToFetch;this.initializePagingHeader();this.initializePagingFooter();if(_286.length>0){this._hideNoTagsWarning();this._showPagingHeaderAndFooter();}else{this._hidePagingHeaderAndFooter();this._showNoTagsWarning();}}}else{this._hidePagingHeaderAndFooter();this.putTagsAsCloud(ul,_286,_287);}this._setFocusOnTagWithIndex(0);if(this.bIsTracing){this.traceExit(m);}},updateTags:function(){var m="updateTags()";if(this.bIsTracing){this.traceEntry(m);}var _289=(this._displayMode==this.displays[1]);var _28a=this.tagListContainer;var _28b=_28a.getElementsByTagName("li");var _28c=Math.round(this._numTagsShown);var _28d=[];var j;var l;if(this.bIsTracing){this.trace(m,"Number of tags in list",_28b.length);}var _28e=0;for(j=0,l=_28b.length;j<l;j++){if(this._isSelectedTagNode(_28b[j])){_28e++;}_28d.push(_28b[j]);}if(!this._isViewModeLatest()){_28d.sort(function(a,b){return (b.getAttribute("count")-a.getAttribute("count"));});}_28d=_28d.slice(0,_28c);if(this.bIsTracing){this.trace(m,"Number of tags in filteredTagsArray after slice",_28d.length,_28c);}var _28f=0;for(var z=0,ml=_28d.length;z<ml;z++){if(this._isSelectedTagNode(_28d[z])){_28f++;}}var _290=(_28d.length-(_28e-_28f));if(this.bIsTracing){this.trace(m,"New size of filteredTagsArray, based on calculation",_290);}if(_290<0){_290=0;}_28d=_28d.slice(0,_290);this._visibleTagsList=[];var _291;for(var x=0,n=_28b.length;x<n;x++){var _292=_28b[x];if((!this._arrayContains(_28d,_292))&&(!this._isSelectedTagNode(_292))){dojo.style(_292,"display","none");}else{if(_289){dojo.style(_292,"display",null);}else{dojo.style(_292,"display","inline");}_291=this._tagList[x];this._visibleTagsList.push(_291);if(this._visibleTagsList.length==1){dojo.attr(_291.anchor,"tabindex","0");}else{dojo.attr(_291.anchor,"tabindex","-1");}}}if(this.bIsTracing){this.traceExit(m);}},refresh:function(){var m="refresh()";if(this.bIsTracing){this.traceEntry(m);}this.tagData=null;this.fetchTags();dojo.parser.parse(this.tagDiv);if(this.bIsTracing){this.traceExit(m);}},initializeTopicPublishAndSubscription:function(){var m="initializeTopicPublishAndSubscription()";if(this.bIsTracing){this.traceEntry(m);}dojo.subscribe("com/ibm/widgets/TagCloud",this,this.topicListener);dojo.publish("com/ibm/widgets/TagCloud",[{action:"TAGCLOUD_READY"}]);if(this.bIsTracing){this.traceExit(m);}},topicListener:function(args){var m="topicListener(args)";if(this.bIsTracing){this.traceEntry(m,args);}if(args!==null){var _293=args.action;if(this.bIsTracing){this.trace(m,"Transmitted args",args);}if(_293!==null){if(_293=="TAGCLOUD_READY"){if(this.bIsTracing){this.trace(m,"Received an event stating the TagCloud is ready");}}else{if(_293=="SENDER_READY"){if(this.bIsTracing){this.trace(m,"Received an event stating the a component able to transmit scopes is ready");}var _294=args.categories;var _295=args.typeSchemas;if((_294!==null)||(_295!==null)){if(this.bIsTracing){this.trace(m,"Transmitted categories ",_294);this.trace(m,"Transmitted typeSchemas",_295);this.trace(m,"isScopingEnabled",this.isScopingEnabled);this.trace(m,"scopeBy",this.scopeBy);this.trace(m,"selectableScopesMode",this.selectableScopesMode);this.trace(m,"preselectedScopesMode",this.preselectedScopesMode);}if(this.isScopingEnabled){if(this.bIsTracing){this.trace(m,"Scoping enabled");}if(this.scopeBy=="category"){if(this.bIsTracing){this.trace(m,"Scoping by",this.scopeBy);}if(this.selectableScopesMode=="sel_sc_manual"){if(this.bIsTracing){this.trace(m,"Only manual scopes selectable");}if((this.preselectedScopesMode=="presel_sc_trans")||(this.preselectedScopesMode=="presel_sc_both")){if(this.bIsTracing){this.trace(m,"Transmitted scopes preselected (hidden)");}this.hiddenCategories=this.hiddenCategories.concat(_294);if(this.bIsTracing){this.trace(m,"hiddenCategories",this.hiddenCategories);}}}else{if((this.selectableScopesMode=="sel_sc_trans")||(this.selectableScopesMode=="sel_sc_both")){if(this.bIsTracing){this.trace(m,"Transmitted scopes selectable");}this.selectableCategories=this.selectableCategories.concat(_294);if(this.bIsTracing){this.trace(m,"selectableCategories",this.selectableCategories);}if((this.preselectedScopesMode=="presel_sc_trans")||(this.preselectedScopesMode=="presel_sc_both")){if(this.bIsTracing){this.trace(m,"Transmitted scopes preselected");}this.preselectedCategories=this.preselectedCategories.concat(_294);if(this.bIsTracing){this.trace(m,"preselectedCategories",this.preselectedCategories);}}}}}else{if(this.bIsTracing){this.trace(m,"Scoping by",this.scopeBy);}if(this.selectableScopesMode=="sel_sc_manual"){if(this.bIsTracing){this.trace(m,"Only manual scopes selectable");}if((this.preselectedScopesMode=="presel_sc_trans")||(this.preselectedScopesMode=="presel_sc_both")){if(this.bIsTracing){this.trace(m,"Transmitted scopes preselected (hidden)");}this.hiddenTypeSchemas=this.hiddenTypeSchemas.concat(_295);if(this.bIsTracing){this.trace(m,"hiddenTypeSchemas",this.hiddenTypeSchemas);}}}else{if((this.selectableScopesMode=="sel_sc_trans")||(this.selectableScopesMode=="sel_sc_both")){if(this.bIsTracing){this.trace(m,"Transmitted scopes selectable");}this.selectableTypeSchemas=this.selectableTypeSchemas.concat(_295);if(this.bIsTracing){this.trace(m,"selectableTypeSchemas",this.selectableTypeSchemas);}if((this.preselectedScopesMode=="presel_sc_trans")||(this.preselectedScopesMode=="presel_sc_both")){if(this.bIsTracing){this.trace(m,"Transmitted scopes preselected");}this.preselectedTypeSchemas=this.preselectedTypeSchemas.concat(_295);if(this.bIsTracing){this.trace(m,"preselectedTypeSchemas",this.preselectedTypeSchemas);}}}}}}this.initializeScoping();}if(this.bIsTracing){this.trace(m,"Sending an event stating the the TagCloud is ready.");}dojo.publish("com/ibm/widgets/TagCloud",[{action:"TAGCLOUD_READY"}]);}}}}if(this.bIsTracing){this.traceExit(m);}},addPrefix:function(_296){var _297=_296;if(this._viewMode===this.views[this._idxViewSuggestedLinks][1]){_297=com.ibm.widgets.TagCloud._prefixSuggestedLinks+_296;}else{if(this._viewMode===this.views[this._idxViewAnalytics][1]){_297=com.ibm.widgets.TagCloud._prefixAnalytics+_296;}}return _297;},removePrefix:function(_298){var _299=_298;if(this._viewMode===this.views[this._idxViewSuggestedLinks][1]){_299=_298.slice(com.ibm.widgets.TagCloud._prefixSuggestedLinks.length,_298.length);}else{if(this._viewMode===this.views[this._idxViewAnalytics][1]){_299=_298.slice(com.ibm.widgets.TagCloud._prefixAnalytics.length,_298.length);}}return _299;},transmitTags:function(tags){var m="transmitTags(tags)";if(this.bIsTracing){this.traceEntry(m,[tags]);}if(!this.isTransmittedTagsMode){if(this.bIsTracing){this.traceExit(m,"Cannot handle tags. Transmitted Tags Mode is OFF.");}return;}this._setupTransmittedTagsStore(tags);if(this._isFullyInitialized){if(this.bIsTracing){this.trace(m,"Refreshing TagCloud");}this.setDisplayMode(this._displayMode,true);}if(this.bIsTracing){this.traceExit(m);}},_setupTransmittedTagsStore:function(tags){this.tagStore=this._transmittedTagsStore={_tags:tags,_activeTags:[],tagCloud:this,fetch:function(args){var _29a=10;var _29b=0;var _29c=null;var _29d=null;var _29e=null;if(args){if(args.query){_29a=args.query["max-results"];_29b=args.query["start-index"];}_29c=args.onComplete;_29d=args.onError;_29e=args.onBegin;}if(_29e&&(typeof _29e==="function")){_29e(this._tags.length,{});}if(_29c&&(typeof _29c==="function")){if(this.tagCloud._displayMode==this.tagCloud.displays[0]){this._tags.sort(function(a,b){return b[0]<a[0];});}else{this._tags.sort(function(a,b){var _29f=parseInt(a[1],10);var _2a0=parseInt(b[1],10);if(isNaN(_29f)){_29f=1;}if(isNaN(_2a0)){_2a0=1;}return _2a0>_29f;});}this._activeTags=[];if(_29b>=this._tags.length){}else{var _2a1=_29b;var _2a2=Math.min(_29b+_29a,this._tags.length);for(var i=_2a1;i<_2a2;i++){this._activeTags.push({index:i});}}_29c(this._activeTags,{});}},getValue:function(item,attr){if(attr=="title"){return this._tags[item.index][0];}if(attr=="count"){return this._tags[item.index][1];}return "";}};}});com.ibm.widgets.TagCloud._allScope=["all"];com.ibm.widgets.TagCloud._communityScope=["community"];com.ibm.widgets.TagCloud._personalScope=["personal_public"];com.ibm.widgets.TagCloud._privateScope=["personal_private"];com.ibm.widgets.TagCloud._prefixSuggestedLinks="com.ibm.portal.suggestedLinks.";com.ibm.widgets.TagCloud._prefixAnalytics="com.ibm.portal.asa.";com.ibm.widgets.TagCloud._nameAttribute="title";com.ibm.widgets.TagCloud._preferredLocaleAttribute="preferredLocale";com.ibm.widgets.TagCloud._preferredLocaleDirAttribute="preferredLocaleDir";com.ibm.widgets.TagCloud._isMineAttribute="isMine";com.ibm.widgets.TagCloud._countAttribute="count";com.ibm.widgets.TagCloud._hrefAttribute="href";com.ibm.widgets.TagCloud._cpUserModelSchema="cpum:oid:";com.ibm.widgets.TagCloud._tagSpaceEmptyURI="tm:ts:empty";com.ibm.widgets.TagCloud._tagSpaceAllURI="tm:ts:all";com.ibm.widgets.TagCloud._tagSpaceRelatedURI="tm:ts:related";com.ibm.widgets.TagCloud._EMPTY_TAG_CLOUD_SETTINGS="empty";com.ibm.widgets.TagCloud._qnameAll="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_all";com.ibm.widgets.TagCloud._qnameFederation="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_federation";com.ibm.widgets.TagCloud._qnameCommunity="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_community";com.ibm.widgets.TagCloud._qnamePersonalPublic="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_personalpublic";com.ibm.widgets.TagCloud._qnameLatest="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_latest";com.ibm.widgets.TagCloud._qnamePersonalPrivate="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_personalprivate";com.ibm.widgets.TagCloud._qnameSuggestedLinks="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_suggestedlinks";com.ibm.widgets.TagCloud._qnameAnalytics="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stv_analytics";com.ibm.widgets.TagCloud._qnameMode="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}stm";com.ibm.widgets.TagCloud._qnameSettings="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}tcs";com.ibm.widgets.TagCloud._qnameSelectedCategories="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}sc";com.ibm.widgets.TagCloud._qnameSelectedSchemas="{http://www.ibm.com/xmlns/prod/websphere/portal/v7.0/portal-contextual-portal}sty";}if(!dojo._hasResource["com.ibm.cp.EnablerDeferred"]){dojo._hasResource["com.ibm.cp.EnablerDeferred"]=true;dojo.provide("com.ibm.cp.EnablerDeferred");dojo.declare("com.ibm.cp.EnablerDeferred",[com.ibm.mashups.enabler.Deferred],{constructor:function(_2a3,_2a4,_2a5){this.context=_2a3;this.startfn=_2a4;this.params=_2a5;},setFinishedCallback:function(_2a6,_2a7){this.finishedCallback2=_2a6;this.finishedCallbackParameters2=_2a7;return this;},start:function(sync){var mode=(sync||typeof (sync)=="undefined")?true:false;return dojo.hitch(this.context,this.startfn)(this,mode,this.params);},finish:function(res,_2a8){var _2a9=this.getFinishedCallback(),_2aa=this.getFinishedCallbackParameters();if(_2a9&&!this._finished){this._finished=true;_2a9(res,_2a8,_2aa);}},getFinishedCallback:function(){return this.finishedCallback2;},getFinishedCallbackParameters:function(){return this.finishedCallbackParameters2;}});}if(!dojo._hasResource["com.ibm.widgets.CPLauncher"]){dojo._hasResource["com.ibm.widgets.CPLauncher"]=true;dojo.provide("com.ibm.widgets.CPLauncher");dojo.require("dijit.Dialog");dojo.declare("com.ibm.widgets.CPLauncher",null,{init:function(){},constructor:function(){},launchTagWidget:function(_2ab){var _2ac=dijit.byId("addTags_"+_2ab.rId);if(_2ac!==null&&_2ac){_2ac.hideAndCancelTags();}var _2ad=dojo.isString(_2ab.resolver)?dojo.getObject(_2ab.resolver):_2ab.resolver;_2ac=new com.ibm.widgets.AddTag(_2ab);_2ac.show();console.debug("CPLauncher.launchTagWidget");},launchRatingWidget:function(_2ae){var _2af=dijit.byId("addRatings_"+_2ae.rId);if(_2af!==null&&tagWidget){_2af.hideAndCancelRatings();}var _2b0=dojo.isString(_2ae.resolver)?dojo.getObject(_2ae.resolver):_2ae.resolver;_2af=new com.ibm.widgets.AddRating(_2ae);_2af.show();console.debug("CPLauncher.launchRatingWidget");}});com.ibm.widgets.CP_LAUNCHER=new com.ibm.widgets.CPLauncher();}if(!dojo._hasResource["com.ibm.cp.DojoLocalized"]){dojo._hasResource["com.ibm.cp.DojoLocalized"]=true;dojo.provide("com.ibm.cp.DojoLocalized");dojo.require("dojo.i18n");dojo.declare("com.ibm.cp.DojoLocalized",[com.ibm.mashups.enabler.Localized],{bundlePackage:"",bundleName:"",bundleKey:"",constructor:function(_2b1){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.bundlePackage=_2b1.bundlePackage;this.bundleName=_2b1.bundleName;this.bundleKey=_2b1.bundleKey;this._locales=[dojo.locale];var _2b2=dojo.config&&dojo.config.extraLocale;if(_2b2){this._locales.push.apply(this._locales,_2b2);}dojo["require"+"Localization"](this.bundlePackage,this.bundleName);},_getBundle:function(_2b3){var _2b4="_getBundle",ret={};try{ret=dojo.i18n.getLocalization(this.bundlePackage,this.bundleName,_2b3);this.LOGGER.trace(_2b4,"Found bundle for locale ${0}",[_2b3]);}catch(err){this.LOGGER.warning("_getBundle","Bundle not found for locale ${0}",[_2b3]);}return ret;},getLocales:function(){var _2b5="getLocales";this.LOGGER.entering(_2b5,[]);if(!this._locales.filtered){this.LOGGER.trace(_2b5,"Filtering locales",[]);this._locales=dojo.filter(this._locales,function(_2b6){var _2b7=this._getBundle(_2b6);var ret=_2b7[this.bundleKey]||_2b7[this.bundleKey+"_title"]||_2b7[this.bundleKey+"_description"];this.LOGGER.trace(_2b5,"Does title or description exist for locale ${0}? ${1}",[_2b6,ret]);return ret;},this);this._locales.filtered=true;}this.LOGGER.exiting(_2b5,[this._locales]);return this._locales;},getTitle:function(_2b8){var _2b9="getTitle";this.LOGGER.entering(_2b9,[_2b8]);var _2ba=this._getBundle(_2b8);var ret=_2ba[this.bundleKey+"_title"]||_2ba[this.bundleKey];this.LOGGER.exiting(_2b9,[_2b8]);return ret;},getDescription:function(_2bb){var _2bc="getDescription";this.LOGGER.entering(_2bc,[_2bb]);var ret=this._getBundle(_2bb)[this.bundleKey+"_description"];this.LOGGER.exiting(_2bc,[_2bb]);return ret;}});}if(!dojo._hasResource["com.ibm.cp.TRContextMenuLoader"]){dojo._hasResource["com.ibm.cp.TRContextMenuLoader"]=true;dojo.provide("com.ibm.cp.TRContextMenuLoader");dojo.declare("com.ibm.cp.TRContextMenuLoader",com.ibm.mashups.builder.model.ContextMenuLoader,{actions:[{bundlePackage:"com.ibm.bundles",bundleName:"Theme",bundleKey:"rate",ordinal:80,enabled:true,cpLaunchMethod:"launchRatingWidget",visibility:{configCheck:ibmPortalCPConfig?ibmPortalCPConfig.operations.canViewRatings&&ibmPortalCPConfig.isRatingEnabled:null,pageConfigCheck:ibmPortalCPConfig?ibmPortalCPConfig.contextMenu.isRatingEnabled:null,portletConfigCheck:ibmPortalCPConfig?ibmPortalCPConfig.portletContextMenu.isRatingEnabled:null,metadataName:"com.ibm.portal.cp.rating.isRatingDisabled"},id:"CP:rate"},{bundlePackage:"com.ibm.bundles",bundleName:"Theme",bundleKey:"tag",ordinal:100,enabled:true,cpLaunchMethod:"launchTagWidget",visibility:{configCheck:ibmPortalCPConfig?ibmPortalCPConfig.operations.canViewTags&&ibmPortalCPConfig.isTaggingEnabled:null,pageConfigCheck:ibmPortalCPConfig?ibmPortalCPConfig.contextMenu.isTaggingEnabled:null,portletConfigCheck:ibmPortalCPConfig?ibmPortalCPConfig.portletContextMenu.isTaggingEnabled:null,metadataName:"com.ibm.portal.cp.tagging.isTaggingDisabled"},id:"CP:tag"},{bundlePackage:"com.ibm.bundles",bundleName:"Theme",bundleKey:"browseTags",ordinal:110,enabled:true,actionFn:"browseTags",visibility:{configCheck:ibmPortalCPConfig?ibmPortalCPConfig.operations.canBrowseTags&&ibmPortalCPConfig.isTaggingEnabled:null,pageConfigCheck:ibmPortalCPConfig?ibmPortalCPConfig.contextMenu.isTaggingEnabled:null,portletConfigCheck:ibmPortalCPConfig?ibmPortalCPConfig.portletContextMenu.isTaggingEnabled:null,metadataName:"com.ibm.portal.cp.tagging.isTaggingDisabled"},id:"CP:browseTags"}],navStateModelFactory:com.ibm.mashups.enabler.model.state.NavigationStateModelFactory,accessorFactory:com.ibm.mashups.enabler.model.state.AccessorFactory,rtSkinConstants:com.ibm.mashups.enabler.runtime.skin.Constants,runtimeModel:com.ibm.mashups.builder.model.Factory.getRuntimeModel(),includeHeader:true,constructor:function(_2bd){if(_2bd!==undefined){this.includeHeader=_2bd;}this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.rtSkinModel=com.ibm.mashups.enabler.runtime.skin.Factory.getRuntimeSkinModel();this.lclCtx=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();},getItems:function(_2be,_2bf,_2c0,_2c1){var _2c2="getItems",lgr=this.LOGGER,me=this;lgr.entering(_2c2,arguments);dfd=new com.ibm.cp.EnablerDeferred(this,function(_2c3,sync,_2c4){var res=me._initItems(_2be,_2bf,_2c0,_2c1);_2c3.finish(res,200);return res;});lgr.exiting(_2c2,arguments);return dfd;},_initItems:function(_2c5,_2c6,_2c7,_2c8){var _2c9="_initItems",lgr=this.LOGGER,me=this;lgr.entering(_2c9,arguments);var ret=[];dojo.forEach(this.actions,function(_2ca){if(this.isVisible(_2c6,_2c7,_2ca)){var _2cb=new com.ibm.cp.DojoLocalized({bundlePackage:_2ca.bundlePackage,bundleName:_2ca.bundleName,bundleKey:_2ca.bundleKey});ret.push({localized:_2cb,ordinal:_2ca.ordinal,enabled:_2ca.enabled,id:_2ca.id,actionCallBackFunction:this.getActionFn(_2c6,_2c7,_2c8,_2ca)});}},this);if(ret.length>0&&this.includeHeader){ret.splice(0,0,{isSeparator:true,actionCallBackFunction:function(){},ordinal:60,itemClass:"menuSectionHeader",id:"CP:headSeparator"},{actionCallBackFunction:function(){},localized:new com.ibm.cp.DojoLocalized({bundlePackage:"com.ibm.bundles",bundleName:"Theme",bundleKey:"tagAndRate"}),itemClass:"menuSectionHeader",ordinal:70,enabled:true,id:"CP:header"});}lgr.exiting(_2c9,[ret]);return ret;},getActionFn:function(_2cc,_2cd,_2ce,_2cf){var me=this;if(_2cf.cpLaunchMethod){return function(){me.cpLaunchFunc(_2cf.cpLaunchMethod,{resourceId:_2cc,resourceType:_2cd});};}else{var _2d0=_2cf.actionFn;return function(){if(dojo.isString(_2d0)){_2d0=me[_2d0];}return _2d0.apply(me,[_2cc,_2cd,_2ce]);};}},cpLaunchFunc:function(_2d1,_2d2){var _2d3="cpLaunchFunc",lgr=this.LOGGER,me=this;lgr.entering(_2d3,arguments);var _2d4="",_2d5=null,_2d6=this.runtimeModel.getCurrentPage().getID()||_2d2.navID,_2d7=this.navModel.find(_2d6).start();if(_2d2.resourceType==="com.ibm.mashups.enabler.navigation.NavigationNode"){var _2d8=_2d7.getNavigationElementType();if(_2d8===com.ibm.mashups.enabler.navigation.Constants.NAVIGATION_PAGE){var _2d9=_2d7.getContent().start();var _2da=_2d9.getID();var xml=_2d9.getXml(),expr="./atom:content/*/ac:allowed-access[@ac:private='true']",_2db=com.ibm.portal.xpath.evaluateXPath(expr,xml,com.ibm.data.resolver.ResolverQueryRules.namespaces),_2dc=_2db!==null?_2db.length>0:false;}else{var _2da=_2d7.getID();var xml=_2d7.getXml(),expr="./atom:content/*/ac:allowed-access[@ac:private='true']",_2db=com.ibm.portal.xpath.evaluateXPath(expr,xml,com.ibm.data.resolver.ResolverQueryRules.namespaces),_2dc=_2db!==null?_2db.length>0:false;}_2d4=this.lclCtx.getTitle(_2d7);_2d5="CONTENT_NODE";}else{if(_2d2.resourceType==="com.ibm.mashups.iwidget.widget.IWidgetDefinition"){var _2da=_2d2.resourceId;if(this.navModel.hasLayoutModel(_2d6)){var _2dd=this.navModel.getLayoutModel(_2d6);var _2de=_2dd.find(_2da).start();var xml=_2de.getXml(),expr="./atom:content/*/ac:allowed-access[@ac:private='true']",_2db=com.ibm.portal.xpath.evaluateXPath(expr,xml,com.ibm.data.resolver.ResolverQueryRules.namespaces),_2dc=_2db!==null?_2db.length>0:false;var _2df=this.lclCtx.getPreferredLocale();_2d4=_2de.getTitle(_2df);_2d5="NAVIGATION_NODE";}else{lgr.warn("Could not find a layout model.");return;}}else{lgr.warn("resourceType ${0} is not a valid CP resource type",[_2d2.resourceType]);return;}}try{lgr.trace(_2d3,"Launching CP widget ${0} ${1} ${2} ${3} ${4}",[_2d2.resourceId,_2d4,_2d5,_2dc,ibmPortalConfig.resolver]);var _2e0=null;if(_2d1=="launchTagWidget"){_2e0=new com.ibm.widgets.AddTag({resourceID:_2da,resourceTitle:_2d4,resourceType:_2d5,resourcePrivate:_2dc,resolver:ibmPortalConfig.resolver});}else{if(_2d1=="launchRatingWidget"){_2e0=new com.ibm.widgets.AddRating({resourceID:_2da,resourceTitle:_2d4,resourceType:_2d5,resourcePrivate:_2dc,resolver:ibmPortalConfig.resolver});}}}catch(err){lgr.severe(_2d3,err,[err]);throw err;}lgr.exiting(_2d3,arguments);},isVisible:function(_2e1,_2e2,_2e3){var vbl=_2e3.visibility,ret=true;if(vbl){if("configCheck" in vbl&&"pageConfigCheck" in vbl&&"portletConfigCheck" in vbl&&"metadataName" in vbl){ret=this.confirmCPAction(_2e1,_2e2,vbl.configCheck,vbl.pageConfigCheck,vbl.portletConfigCheck,vbl.metadataName);}else{if(vbl.resourceType&&vbl.resourceType!=_2e2){ret=false;}}}this.LOGGER.trace("isVisible","Action ${0} is visible? ${1}",[_2e3,ret]);return ret;},confirmCPAction:function(_2e4,_2e5,_2e6,_2e7,_2e8,_2e9){var _2ea="confirmCPAction",lgr=this.LOGGER,me=this;lgr.entering(_2ea,arguments);var ret=false,node;if(_2e6){if(_2e5==="com.ibm.mashups.enabler.navigation.NavigationNode"){if(_2e7){node=this.navModel.find(_2e4).start();}else{return false;}}else{if(_2e5==="com.ibm.mashups.iwidget.widget.IWidgetDefinition"){if(_2e8){var nsm=this.navStateModelFactory.getNavigationStateModel();var _2eb=this.accessorFactory.getSpaceAccessor(nsm).getSpaceID();var _2ec=this.accessorFactory.getPageAccessor(nsm,_2eb);var _2ed=_2ec.getPageID();var _2ee=this.navModel.find(_2ed).start();var _2ef=this.navModel.getLayoutModel(_2ee);node=_2ef.find(_2e4).start();}else{return false;}}else{lgr.warn("resourceType ${0} is not valid for a CP action",[_2e5]);lgr.exiting(_2ea,[false]);return false;}}var _2f0=node.getMetaData(_2e9);ret=_2f0!=="true";}lgr.exiting(_2ea,[ret]);return ret;},browseTags:function(_2f1,_2f2,_2f3,_2f4){var _2f5={};_2f5.uri="tm:browsetags";_2f5.rmparam="rm:oid:"+_2f1;var url=com.ibm.pb.contextMenu.sharedActions.createURL(_2f1,_2f5);com.ibm.pb.contextMenu.sharedActions.savePageChecker(function(){top.location.href=url;});}});}(function(){var _2f6=new com.ibm.cp.TRContextMenuLoader({});com.ibm.cp.operations={tagPage:function(args){_2f6.cpLaunchFunc("launchTagWidget",{navID:args.metadata.navID,resourceId:args.metadata.navID,resourceType:"com.ibm.mashups.enabler.navigation.NavigationNode"});},ratePage:function(args){_2f6.cpLaunchFunc("launchRatingWidget",{navID:args.metadata.navID,resourceId:args.metadata.navID,resourceType:"com.ibm.mashups.enabler.navigation.NavigationNode"});},tagPortlet:function(args){_2f6.cpLaunchFunc("launchTagWidget",{navID:args.metadata.navID,resourceId:args.metadata.windowID,resourceType:"com.ibm.mashups.iwidget.widget.IWidgetDefinition"});},ratePortlet:function(args){_2f6.cpLaunchFunc("launchRatingWidget",{navID:args.metadata.navID,resourceId:args.metadata.windowID,resourceType:"com.ibm.mashups.iwidget.widget.IWidgetDefinition"});}};})(); /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ if(!dojo._hasResource["com.ibm.data.ProxyHelper"]){dojo._hasResource["com.ibm.data.ProxyHelper"]=true;dojo.provide("com.ibm.data.ProxyHelper");dojo.require("com.ibm.utilities");dojo.declare("com.ibm.data.ProxyHelper",null,{proxyURI:"",urlThroughProxy:function(_1){return com.ibm.utilities.urlToProxyUrl(_1?_1:"",this.proxyURI);}});}if(!dojo._hasResource["com.ibm.data.CatalogMixin"]){dojo._hasResource["com.ibm.data.CatalogMixin"]=true;dojo.provide("com.ibm.data.CatalogMixin");dojo.declare("com.ibm.data.CatalogMixin",null,{searchable:true,mapItem:function(_2){var _3={};_3["label"]=this.getEPResolvedValue(_2,"label","untitled");_3["description"]=this.getEPResolvedValue(_2,"description",null);_3["tags"]=this.getEPResolvedValue(_2,"tags",null);_3["rating"]=this.getEPResolvedValue(_2,"rating","0.0");_3["url"]=this.getEPResolvedValue(_2,"url",null);_3["id"]=this.getEPResolvedValue(_2,"id",null);_3["thumbnail"]=this.getEPResolvedValue(_2,"thumbnail",null);return _3;},prepareQuery:function(_4){return _4;},validateSelf:function(){return true;},getSourceLabel:function(){return false;}});}if(!dojo._hasResource["com.ibm.data.JsonStore"]){dojo._hasResource["com.ibm.data.JsonStore"]=true;dojo.provide("com.ibm.data.JsonStore");dojo.require("dojo.data.ItemFileReadStore");dojo.require("dojo.data.util.filter");dojo.require("dojo.i18n");dojo.declare("com.ibm.data.JsonStore",[dojo.data.ItemFileReadStore,com.ibm.data.ProxyHelper,com.ibm.data.CatalogMixin],{nlsBundle:null,constructor:function(_5){this.contributions=_5.contributions||[];this.inherited("constructor",arguments);},_getItemsFromLoadedData:function(_6){this.inherited("_getItemsFromLoadedData",arguments);this.shelfBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");var _7=_6.localizationPackageName;var _8=_6.localizationBundleName;if(_7&&_8){this.nlsBundle=dojo.i18n.getLocalization(_7,_8);dojo.forEach(this._arrayOfAllItems,dojo.hitch(this,function(_9){if(_9.label){_9.label[0]=(this.nlsBundle&&this.nlsBundle[_9.label[0]])?this.nlsBundle[_9.label[0]]:_9.label[0];}else{_9.label=[];}if(!_9.label[0]){_9.label[0]=this.shelfBundle.add_content_untitled;}if(_9.description){_9.description[0]=(this.nlsBundle&&this.nlsBundle[_9.description[0]])?this.nlsBundle[_9.description[0]]:_9.description[0];}if(_9.help){_9.help[0]=(this.nlsBundle&&this.nlsBundle[_9.help[0]])?this.nlsBundle[_9.help[0]]:_9.help[0];}}));}},mapItem:function(_a){var _b={};_b.label=this.getValue(_a,"label",null);_b.description=this.getValue(_a,"description",null);_b.url=this.getValue(_a,"url",null);_b.id=this.getValue(_a,"id",null);_b.thumbnail=this.getValue(_a,"thumbnail",null);_b.help=this.getValue(_a,"help",null);_b.takeoverFcn=this.getValue(_a,"takeover",null);return _b;},_fetchItems:function(_c,_d,_e){var _f=this;var _10=function(_11,_12){var _13=[];var i=0;if(_11.query){var _14=_11.query.keywords;var _15=_11.queryOptions?_11.queryOptions.ignoreCase:false;var _16={};var _17=null;for(i=0;i<_14.length;i++){_17=_14[i];if(typeof _17==="string"){_16[_17]=dojo.data.util.filter.patternToRegExp("*"+_17+"*",_15);}}for(i=0;i<_12.length;++i){var _18=true;var _19=_12[i];if(_19===null){_18=false;}else{for(var j=0;j<_14.length;j++){_17=_14[j];if(!_f._containsValue(_19,"label",_17,_16[_17])&&!_f._containsValue(_19,"description",_17,_16[_17])){_18=false;}}}if(_18){_13.push(_19);}}_d(_13,_11);}else{for(i=0;i<_12.length;++i){var _1a=_12[i];if(_1a!==null){_13.push(_1a);}}_d(_13,_11);}};if(this._loadFinished){_10(_c,this._getItemsArray(_c.queryOptions));}else{if(this._jsonFileUrl){if(this._loadInProgress){this._queuedFetches.push({args:_c,filter:_10});}else{this._loadInProgress=true;var _1b={url:_f._jsonFileUrl,handleAs:"json-comment-optional"};var _1c=dojo.xhrGet(_1b);_1c.addCallback(function(_1d){var _1e=function(_1f){try{_f._getItemsFromLoadedData(_1f);_f._loadFinished=true;_f._loadInProgress=false;_10(_c,_f._getItemsArray(_c.queryOptions));_f._handleQueuedFetches();}catch(e){_f._loadFinished=true;_f._loadInProgress=false;_e(e,_c);}};var _20=0;var _21=_f.contributions.length;if(_21==0){_1e(_1d);}for(var i=0;i<_21;i++){contribGetArgs={url:_f.contributions[i].indexOf("/")==0?_f.contributions[i]:ibmCfg.themeConfig.themeRootURI+"/"+_f.contributions[i],handleAs:"json-comment-optional"};var _22=dojo.xhrGet(contribGetArgs);_22.addCallback(function(_23){var _24=null;if(_23.localizationPackageName&&_23.localizationBundleName){_24=dojo.i18n.getLocalization(_23.localizationPackageName,_23.localizationBundleName);}if(_24!=null){for(var cdi=0,len=_23.items.length;cdi<len;cdi++){var _25=_23.items[cdi].label;_23.items[cdi].label=_24[_25]?_24[_25]:_25;}}_1d.items=_23.items.concat(_1d.items);_20++;if(_20==_21){_1e(_1d);}});_22.addErrback(function(_26){_1e(_1d);});}});_1c.addErrback(function(_27){_f._loadInProgress=false;_e(_27,_c);});}}else{if(this._jsonData){try{this._loadFinished=true;this._getItemsFromLoadedData(this._jsonData);this._jsonData=null;_10(_c,this._getItemsArray(_c.queryOptions));}catch(e){_e(e,_c);}}else{_e(new Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),_c);}}}}});}if(!dojo._hasResource["com.ibm.portal.xpath"]){dojo._hasResource["com.ibm.portal.xpath"]=true;dojo.provide("com.ibm.portal.xpath");com.ibm.portal.xpath.evaluateXPath=function(_28,doc,_29){if(typeof ActiveXObject!="undefined"){return com.ibm.portal.xpath.ie.evaluateXPath(_28,doc,_29);}else{return com.ibm.portal.xpath.gecko.evaluateXPath(_28,doc,_29);}};dojo.provide("com.ibm.portal.xpath.ie");com.ibm.portal.xpath.ie.evaluateXPath=function(_2a,doc,_2b){if(_2b){var ns="";for(var _2c in _2b){ns+="xmlns:"+_2c+"='"+_2b[_2c]+"' ";}if(doc.ownerDocument){doc.ownerDocument.setProperty("SelectionNamespaces",ns);}else{doc.setProperty("SelectionNamespaces",ns);}}var _2d=doc.selectNodes(_2a);var _2e;var _2f=[];var len=0;for(var i=0;i<_2d.length;i++){_2e=_2d[i];if(_2e){_2f[len]=_2e;len++;}}return _2f;};dojo.provide("com.ibm.portal.xpath.gecko");com.ibm.portal.xpath.gecko.evaluateXPath=function(_30,doc,_31){var _32;try{var _33=doc;if(!_33.evaluate){_33=doc.ownerDocument;}_32=_33.evaluate(_30,doc,function(_34){return _31[_34]||null;},XPathResult.ANY_TYPE,null);}catch(exc){throw new Error("Error with xpath expression"+exc);}var _35;var _36=[];var len=0;do{_35=_32.iterateNext();if(_35){_36[len]=_35;len++;}}while(_35);return _36;};}if(!dojo._hasResource["com.ibm.data.XpathHelper"]){dojo._hasResource["com.ibm.data.XpathHelper"]=true;dojo.provide("com.ibm.data.XpathHelper");dojo.require("com.ibm.portal.xpath");dojo.require("com.ibm.portal.xslt");dojo.require("com.ibm.domUtilities");dojo.declare("com.ibm.data.XpathHelper",null,{namespaces:{},_getNodesByXpath:function(_37,_38,_39){var _3a=com.ibm.portal.xpath.evaluateXPath(_38,_37,this.namespaces);var _3b=_3a&&_3a.length>0;if(_39){var _3c=_3a;_3a=[];for(var i=0;i<_3c.length;i++){_3a[i]=this._getNodeProp(_3c[i],_39);}}return {found:_3b,value:_3a};},_getNodeByXpath:function(_3d,_3e,_3f){var _40=this._getNodesByXpath(_3d,_3e);var _41=_40.found;if(!_41){return {found:_41};}var _42=_40.value;if(_42.length>0){if(_3f){return {found:true,value:this._getNodeProp(_42[0],_3f)};}else{return {found:true,value:_42[0]};}}return {found:false};},_getNodeProp:function(_43,_44){switch(_44){case "textContent":return dojox.data.dom.textContent(_43);default:return this.handleConstructs(_43,_44);}},handleConstructs:function(_45,_46){return _45[_46];},_setNodeProp:function(_47,_48,_49){switch(_48){case "textContent":dojox.data.dom.textContent(_47,_49);break;default:_47[_48]=_49;}},_getAttrsByXpath:function(_4a,_4b,_4c){var _4d=this._getNodesByXpath(_4a,_4b);var _4e=_4d.found;if(!_4e){return {found:_4e};}var _4f=_4d.value;var _50=[];for(var i=0;i<_4f.length;i++){_50[i]=this._getAttribute(_4f[i],_4c);}return {found:_4e,value:_50};},_getAttrByXpath:function(_51,_52,_53){var _54=this._getNodeByXpath(_51,_52);var _55=_54.found;if(!_55){return {found:_55};}var _56=_54.value;return {found:_55,value:this._getAttribute(_56,_53)};},_extractNSInfo:function(str){return com.ibm.domUtilities.nsInfo(str,this.namespaces);},_getAttribute:function(_57,_58){return com.ibm.domUtilities.getAttribute(_57,_58,this.namespaces);},_setAttribute:function(_59,_5a,_5b){if(_5b){com.ibm.domUtilities.setAttribute(_59,_5a,_5b,this.namespaces);}else{com.ibm.domUtilities.removeAttribute(_59,_5a,this.namespaces);}},_setNodesByXpath:function(_5c,_5d,_5e,_5f){return false;},_setNodeByXpath:function(_60,_61,_62,_63){var _64=this._getNodeByXpath(_60,_61);var _65=_64.found;if(!_65){return false;}var _66=_64.value;if(_62){this._setNodeProp(_66,_62,_63);}else{dojo.place(_63,_66,"before");_66.parentNode.removeChild(_66);delete _66;}return true;},_setAttrsByXpath:function(_67,_68,_69,_6a){return false;},_setAttrByXpath:function(_6b,_6c,_6d,_6e){var _6f=this._getNodeByXpath(_6b,_6c);var _70=_6f.found;if(!_70){return false;}var _71=_6f.value;this._setAttribute(_71,_6d,_6e);return true;},_createNSElement:function(doc,_72,_73){return com.ibm.domUtilities.createElement(doc,_72,this.namespaces,_73);},__getClassName:function(){var cls=this.declaredClass;if(!cls){return "Object";}var idx=cls.lastIndexOf(".");if(idx>-1&&(idx<cls.length-1)){cls=cls.substring(idx+1);}return cls;}});dojo.declare("com.ibm.data._XmlConstruct",com.ibm.data.XpathHelper,{isConstruct:true,toString:function(){return "<"+this.__getClassName()+">";}});}if(!dojo._hasResource["com.ibm.data.AtomFeedStore"]){dojo._hasResource["com.ibm.data.AtomFeedStore"]=true;dojo.provide("com.ibm.data.AtomFeedStore");dojo.require("com.ibm.data.XpathHelper");dojo.require("dojo.date.stamp");dojo.declare("com.ibm.data.AtomFeedStore",com.ibm.data.XpathHelper,{namespaces:{"atom":"http://www.w3.org/2005/Atom"},_features:{"dojo.data.api.Read":true,"dojo.data.api.Write":false,"dojo.data.api.Identity":false,"dojo.data.api.Notification":false},attrMappings:{title:{xpath:"./atom:title",targetName:"textContent",type:"node",setter:function(_74,_75,_76){var _77=this._createNSElement(_74.element.ownerDocument,"atom:title");this._setNodeProp(_77,_75.targetName,_76);_74.element.appendChild(_77);return true;}},id:{xpath:"./atom:id",targetName:"textContent",type:"node",setter:function(_78,_79,_7a){var _7b=this._createNSElement(_78.element.ownerDocument,"atom:id");this._setNodeProp(_7b,_79.targetName,_7a);_78.element.appendChild(_7b);return true;}},updated:{xpath:"./atom:updated",targetName:"AtomDateConstruct",type:"node"},category:{xpath:"./atom:category",targetName:"term",type:"attr",setter:function(_7c,_7d,_7e){var _7f=this._createNSElement(_7c.element.ownerDocument,"atom:category");this._setAttribute(_7f,_7d.targetName,_7e);_7c.element.appendChild(_7f);return true;}},categoryScheme:{xpath:"./atom:category",targetName:"scheme",type:"attr",setter:function(_80,_81,_82){var _83=this._createNSElement(_80.element.ownerDocument,"atom:category");this._setAttribute(_83,_81.targetName,_82);_80.element.appendChild(_83);return true;}},categoryLabel:{xpath:"./atom:category",targetName:"label",type:"attr",setter:function(_84,_85,_86){var _87=this._createNSElement(_84.element.ownerDocument,"atom:category");this._setAttribute(_87,_85.targetName,_86);_84.element.appendChild(_87);return true;}},contributer:{xpath:"./atom:contributer",targetName:"AtomPersonConstruct",type:"node"},author:{xpath:"./atom:author",targetName:"AtomPersonConstruct",type:"node"},summary:{xpath:"./atom:summary",targetName:"textContent",type:"node",setter:function(_88,_89,_8a){var _8b=this._createNSElement(_88.element.ownerDocument,"atom:summary");this._setNodeProp(_8b,_89.targetName,_8a);_88.element.appendChild(_8b);return true;}},source:{xpath:"./atom:source",type:"node",setter:function(_8c,_8d,_8e){_8c.element.appendChild(_8e);return true;}},rights:{xpath:"./atom:rights",targetName:"textContent",type:"node",setter:function(_8f,_90,_91){var _92=this._createNSElement(_8f.element.ownerDocument,"atom:rights");this._setNodeProp(_92,_90.targetName,_91);_8f.element.appendChild(_92);return true;}},selfLink:{xpath:"./atom:link[@rel='self']",targetName:"href",type:"attr",setter:function(_93,_94,_95){var _96=this._createNSElement(_93.element.ownerDocument,"atom:link");this._setAttribute(_96,"rel","self");this._setAttribute(_96,_94.targetName,_95);_93.element.appendChild(_96);return true;}},link:{xpath:"./atom:link[@href]",targetName:"href",type:"attr",setter:function(_97,_98,_99){var _9a=this._createNSElement(_97.element.ownerDocument,"atom:link");this._setAttribute(_9a,_98.targetName,_99);_97.element.appendChild(_9a);return true;}},content:{xpath:"./atom:content",type:"node",setter:function(_9b,_9c,_9d){_9b.element.appendChild(_9d);return true;}}},timeout:null,itemClass:"com.ibm.data.AtomEntryItem",constructor:function(_9e){dojo.mixin(this,_9e);this._dirtyItems=[];this._deletedItems=[];this._newItems=[];},toString:function(){return "<"+this.__getClassName()+": "+this.url+">";},handleConstructs:function(_9f,_a0){switch(_a0){case "AtomPersonConstruct":return new com.ibm.data.AtomPersonConstruct(_9f);case "AtomDateConstruct":return new com.ibm.data.AtomDateConstruct(_9f);default:return this.inherited(arguments);}},_assertIsItem:function(_a1){if(!this.isItem(_a1)){throw new Error(_a1+" is not an item in this store");}return true;},_assertIsString:function(_a2){if(!dojo.isString(_a2)){throw new Error(_a2+" is not a string");}return true;},_getItem:function(_a3){var cls=this.itemClass;if(dojo.isString(cls)){cls=dojo.getObject(this.itemClass);}return new cls({store:this,element:_a3.element,loaded:true});},getFeedValue:function(_a4,_a5){var ret=_a5;this._assertIsString(_a4);var _a6=this.getMapRule(_a4,this.attrMappings);if(_a6){ret=this.getValueByMapping(null,_a6,_a5);}return ret;},getFeedValues:function(_a7){var ret=[];this._assertIsString(_a7);var _a8=this.getMapRule(_a7,this.attrMappings);if(_a8){ret=this.getValuesByMapping(null,_a8);}return ret;},extractEmptyFeed:function(){var _a9=this._getNodeByXpath(this._feed,"//atom:feed").value;var _aa=_a9.cloneNode(false);var _ab=this._getNodesByXpath(_a9,"/atom:feed/*");var _ac=_ab.value;for(var i=0;i<_ac.length;i++){if(_ac[i].nodeName!="atom:entry"){_aa.appendChild(_ac[i].cloneNode(true));}}return _aa;},extractSingleEntryFeed:function(_ad){var ret=this.extractEmptyFeed();ret.appendChild(_ad.element.cloneNode(true));return ret;},extractMultipleEntryFeed:function(_ae){var ret=this.extractEmptyFeed();dojo.forEach(_ae,function(_af){ret.appendChild(_af.element.cloneNode(true));});return ret;},getEPResolvedValue:function(_b0,_b1,_b2){var ret=null;if(this.hasAttribute(_b0,_b1)){var _b3=this.getMapRule(_b1,_b0.attrMappings);if(!_b3){return ret;}ret=this.getValueByMapping(_b0,_b3,_b2);}if(!ret){ret=_b2;}ret=com.ibm.mashups.enabler.utils.EndpointHelper.resolve(ret);return ret;},getIdentity:function(_b4){if(_b4._id){return _b4._id;}var _b5=this.getIdentityAttributes(_b4);var id="";dojo.forEach(_b5,function(_b6){id+=this.getEPResolvedValue(_b4,_b6,"");},this);_b4._id=id;return id;},getIdentityAttributes:function(_b7){return ["id"];},fetchItemByIdentity:function(_b8){return false;},getValue:function(_b9,_ba,_bb){var ret=null;if(this.hasAttribute(_b9,_ba)){var _bc=this.getMapRule(_ba,_b9.attrMappings);if(!_bc){return ret;}ret=this.getValueByMapping(_b9,_bc,_bb);}if(!ret){ret=_bb;}return ret;},getValues:function(_bd,_be){if(this.hasAttribute(_bd,_be)){var _bf=this.getMapRule(_be,_bd.attrMappings);if(!_bf){return [];}return this.getValuesByMapping(_bd,_bf);}return [];},_extractParameterizedMapKey:function(_c0){if(_c0.charAt(_c0.length-1)=="$"){var _c1=_c0.indexOf("[");var end=_c0.lastIndexOf("]");if(_c1>-1&&end>_c1){var _c2=_c0.substring(0,_c1)+"$";var _c3=_c0.substring(_c1+1,end).split(",");return {key:_c2,parameters:_c3};}}return {key:_c0,parameters:null};},getMapRule:function(_c4,map,_c5){var obj=this._extractParameterizedMapKey(_c4);var _c6=map[obj.key];if(!_c6){return _c6;}if(!obj.parameters){_c6._ruleKey=obj.key;return _c6;}var _c7={};for(var _c8 in _c6){if(dojo.isString(_c6[_c8])){_c7[_c8]=dojo.string.substitute(_c6[_c8],obj.parameters,function(_c9){return dojo.string.trim(_c9);});}else{_c7[_c8]=_c6[_c8];}}_c7._parameters=obj.parameters;_c7._ruleKey=obj.key;_c7.multiValued=!!_c5;return _c7;},getValuesByMapping:function(_ca,_cb){var ret=null;var _cc=_cb.xpath;var _cd=_cb.type;var _ce=_cb.targetName;var _cf=this._feed;if(_ca){this._assertIsItem(_ca);_cf=_ca.element;}if(_cd=="attr"){ret=this._getAttrsByXpath(_cf,_cc,_ce);}else{ret=this._getNodesByXpath(_cf,_cc,_ce);}if(!ret.found&&_ca._backup){_cf=_ca._backup;if(_cd=="attr"){ret=this._getAttrsByXpath(_cf,_cc,_ce);}else{ret=this._getNodesByXpath(_cf,_cc,_ce);}if(!ret.found){ret.value=[];}}return ret.value;},getValueByMapping:function(_d0,_d1,_d2){var ret=null;var _d3=_d1.xpath;var _d4=_d1.type;var _d5=_d1.targetName;var _d6=this._feed;if(_d0){this._assertIsItem(_d0);_d6=_d0.element;}if(_d4=="attr"){ret=this._getAttrByXpath(_d6,_d3,_d5);}else{ret=this._getNodeByXpath(_d6,_d3,_d5);}if(!ret.found&&_d0&&_d0._backup){_d6=_d0._backup;if(_d4=="attr"){ret=this._getAttrByXpath(_d6,_d3,_d5);}else{ret=this._getNodeByXpath(_d6,_d3,_d5);}if(!ret.found&&_d2){ret.value=_d2;}}if(_d4=="attr"&&ret.value&&ret.value.length===0){ret.value=null;}return ret.value;},setValueByMapping:function(_d7,_d8,_d9){var _da=_d8.xpath;var _db=_d8.type;var _dc=_d8.targetName;var _dd=this._feed;var ret=false;if(_d7){this._assertIsItem(_d7);_dd=_d7.element;}if(_db=="attr"){ret=this._setAttrByXpath(_dd,_da,_dc,_d9);}else{ret=this._setNodeByXpath(_dd,_da,_dc,_d9);}if(!ret&&_d8.setter){return _d8.setter.apply(this,arguments);}return ret;},setValuesByMapping:function(_de,_df,_e0){var _e1=_df.xpath;var _e2=_df.type;var _e3=_df.targetName;var _e4=this._feed;var ret=false;if(_de){this._assertIsItem(_de);_e4=_de.element;}if(_e2=="attr"){ret=this._setAttrsByXpath(_e4,_e1,_e3,value);}else{ret=this._setNodesByXpath(_e4,_e1,_e3,value);}if(!ret&&_df.setter){return _df.setter.apply(this,arguments);}return ret;},getAttributes:function(_e5){var _e6=[];var x=null;if(_e5){this._assertIsItem(_e5);for(x in _e5.attrMappings){_e6.push(x);}}else{for(x in this.attrMappings){_e6.push(x);}}return _e6;},hasAttribute:function(_e7,_e8){this._assertIsItem(_e7);this._assertIsString(_e8);if(_e8.charAt(_e8.length-1)=="$"){return true;}if(_e7.attrMappings[_e8]){return true;}else{return false;}},containsValue:function(_e9,_ea,_eb){var _ec=this.getValues(_e9,_ea);for(var i=0;i<_ec.length;i++){if(_ec[i]==_eb){return true;}}return false;},isItem:function(_ed){return _ed.store==this&&_ed.element&&!_ed._isDeleted;},isItemLoaded:function(_ee){return this.isItem(_ee)&&_ee.loaded;},loadItem:function(_ef){},getResultSize:function(doc,_f0,_f1){return _f1.length;},processFetchedItems:function(_f2,_f3){return _f2;},processResponse:function(_f4,_f5){if(_f5.aborted){return;}var _f6=this._parseFeed(_f5,_f4);var _f7=_f6.items;this._feed=_f6.root;_f7=this.processFetchedItems(_f7,_f5);if(_f5.onBegin){_f5.onBegin.call(_f5.scope,this.getResultSize(_f6.root,_f5,_f7),_f5);}if(_f5.onItem){for(var i=0;i<_f7.length;i++){if(_f5.aborted){return;}_f5.onItem.call(_f5.scope,_f7[i],_f5);}}if(_f5.onComplete){if(_f5.aborted){return;}if(!_f5.onItem){_f5.onComplete.call(_f5.scope,_f7,_f5);}else{_f5.onComplete.call(_f5.scope,null,_f5);}}},fetch:function(_f8){if(!_f8){_f8={};}var me=this;_f8.aborted=false;if(!_f8.scope){_f8.scope=dojo.global;}var url=this._buildUrl(_f8,this.url);_f8.url=url;var _f9=function(_fa,_fb){if(_f8.aborted){return;}if(dojo.isIE){_fa=com.ibm.domUtilities.docFromString(_fa);}me.doc=_fa;me.processResponse(_fa,_f8);};var _fc=function(_fd,_fe){if(_f8.onError){_f8.onError.call(_f8.scope,_fd,_f8);}};var _ff=false;if(_f8.queryOptions&&_f8.queryOptions.preventCache){_ff=true;}var args={preventCache:_ff,content:{},url:url,handleAs:"xml"};if(_f8.queryOptions&&_f8.queryOptions.timeout){args.timeout=_f8.queryOptions.timeout;}else{if(this.timeout){args.timeout=this.timeout;}}if(dojo.isIE){args.handleAs="text";args.content["ibm.web2.contentType"]="text/xml";}var _100=null;_f8.abort=function(){_f8.aborted=true;_100.cancel();};args=this.modifyRequestArgs(args,_f8);_100=dojo.xhrGet(args);_100.addCallback(_f9);_100.addErrback(_fc);this._lastRequest=_f8;return _f8;},modifyRequestArgs:function(_101,_102){return _101;},_queryUrlToObject:function(_103){if(!_103||_103.length===0){return {};}var _104=_103.indexOf("?");var str=_103;if(_104>-1&&(_104<str.length-1)){str=_103.substring(_104+1);}return dojo.queryToObject(str);},_prepareQuery:function(_105){var _106=_105.query;if(!_106){_105.query={};}else{if(dojo.isString(_106)){_105.query=this._queryUrlToObject(_106);}}return this.prepareQuery(_105);},prepareQuery:function(_107){return _107;},_buildUrl:function(_108,_109){var ret="";var _108=this._prepareQuery(_108);var _10a=dojo.objectToQuery(_108.query);if(_109.indexOf("?")>-1){ret=_109+"&"+_10a;}else{ret=_109+"?"+_10a;}return (this.modifyUrl(_108,ret));},modifyUrl:function(_10b,url){return url;},_parseFeed:function(_10c,_10d){var _10e=[];var root=null;var _10f=this._getNodeByXpath(_10d,"/atom:feed");if(!_10f.found){_10f=this._getNodeByXpath(_10d,"/atom:entry");if(!_10f.found){throw new Error("Illegal atom feed format: the root element is not an ATOM feed or entry element.");}else{root=_10f.value;var _110=this._queryUrlToObject(_10c.url);_10e.push(this._getItem({element:root,query:_110}));}}else{root=_10f.value;var _110=this._queryUrlToObject(_10c.url);_10f=this._getNodesByXpath(root?root:_10d,"./atom:entry");if(_10f.found){var _111=_10f.value;for(var i=0;i<_111.length;i++){_10e.push(this._getItem({element:_111[i],query:_110}));}}}return {items:_10e,root:root};},getFeatures:function(){return this._features;},close:function(_112){if(_112&&_112.abort){_112.abort();}},getLabel:function(item){return this.getEPResolvedValue(item,"title");},getLabelAttributes:function(item){return ["title"];},newItem:function(_113,_114){return null;},deleteItem:function(item){if(!this._deletedItems){this._deletedItems=[];}item.backup();this._deletedItems.push(item);item.id=this.getIdentity(item);item._isDeleted=true;return true;},setValue:function(item,_115,_116){var ret=false;var _117=null;if(this.hasAttribute(item,_115)){var _118=this.getMapRule(_115,item.attrMappings);if(_118){item.backup();_117=this.getValueByMapping(item,_118);ret=this.setValueByMapping(item,_118,_116);if(ret){this._addDirtyItem(item);item.logWrite({attribute:_115,value:_116});}}}else{throw new Error(_115+" is not an attribute of any item in this store");}return {success:ret,oldValue:_117,newValue:_116};},setValues:function(item,_119,_11a){var ret=false;var _11b=null;if(this.hasAttribute(item,_119)){var _11c=this.getMapRule(_119,item.attrMappings,true);if(_11c){item.backup();_11b=this.getValueByMapping(item,_11c);ret=this.setValuesByMapping(item,_11c,_11a);if(ret){this._addDirtyItem(item);item.logWrite({attribute:_119,values:_11a});}}}else{throw new Error(_119+" is not an attribute of any item in this store");}return {success:ret,oldValue:_11b,newValue:_11a};},unsetAttribute:function(item,_11d){var ret=false;var _11e=null;var _11f=null;if(this.hasAttribute(item,_11d)){var _120=this.getMapRule(_11d,item.attrMappings);if(_120){item.backup();_11e=this.getValueByMapping(item,_120);if(_120.type=="attr"){ret=this.setValueByMapping(item,_120,"");_11f="";}else{if(_120.targetName){ret=this.setValueByMapping(item,_120,null);}else{if(_11e){_11e.parentNode.removeChild(_11e);ret=true;}}}if(ret){this._addDirtyItem(item);item.logWrite({attribute:_11d,value:_11f});}}}return {success:ret,oldValue:_11e,newValue:_11f};},save:function(_121){var it=null;for(var d=0;d<this._deletedItems.length;d++){it=this._deletedItems[d];it.persist();delete it.element;}for(var i=0;i<this._dirtyItems.length;i++){this._dirtyItems[i].persist();}for(var i=0;i<this._newItems.length;i++){this._newItems[i].persist();}this._newItems.splice(0,this._newItems.length);this._dirtyItems.splice(0,this._dirtyItems.length);this._deletedItems.splice(0,this._deletedItems.length);},_addDirtyItem:function(item){if(item._isDirty){return;}item._isDirty=true;for(var i=0;i<this._dirtyItems.length;i++){if(this._dirtyItems[i]==item){return;}}this._dirtyItems.push(item);},revert:function(){var it=null;for(var d=0;d<this._deletedItems.length;d++){it=this._deletedItems[d];it.restore();delete item._isDeleted;}for(var i=0;i<this._dirtyItems.length;i++){this._dirtyItems[i].restore();}this._dirtyItems=[];this._deletedItems=[];},isDirty:function(item){if(item&&this._assertIsItem(item)){return item._isDirty;}else{var _122=this._dirtyItems.concat(this._deletedItems).concat(this._newItems);if(!_122||_122.length===0){return false;}else{return _122;}}}});dojo.declare("com.ibm.data.AtomEntryItem",com.ibm.data.XpathHelper,{namespaces:dojo.mixin({},com.ibm.data.AtomFeedStore.prototype.namespaces),attrMappings:dojo.mixin({},com.ibm.data.AtomFeedStore.prototype.attrMappings,{subtitle:{xpath:"./atom:subtitle",targetName:"textContent",type:"node",setter:function(item,rule,_123){var elem=this._createNSElement(item.element.ownerDocument,"atom:subtitle");this._setNodeProp(elem,rule.targetName,_123);item.element.appendChild(elem);return true;}},generator:{xpath:"./atom:generator",targetName:"textContent",type:"node",setter:function(item,rule,_124){var elem=this._createNSElement(item.element.ownerDocument,"atom:generator");this._setNodeProp(elem,rule.targetName,_124);item.element.appendChild(elem);return true;}},icon:{xpath:"./atom:icon",targetName:"textContent",type:"node",setter:function(item,rule,_125){var elem=this._createNSElement(item.element.ownerDocument,"atom:icon");this._setNodeProp(elem,rule.targetName,_125);item.element.appendChild(elem);return true;}},logo:{xpath:"./atom:logo",targetName:"textContent",type:"node",setter:function(item,rule,_126){var elem=this._createNSElement(item.element.ownerDocument,"atom:logo");this._setNodeProp(elem,rule.targetName,_126);item.element.appendChild(elem);return true;}}}),constructor:function(args){dojo.mixin(this,args);this._writeLog=[];},toString:function(){return "<"+this.__getClassName()+">";},_onCreate:function(){this.onCreate();},onCreate:function(){},_makeModifiable:function(){},backup:function(){if(!this._backup){this._backup=this.element.cloneNode(true);this._makeModifiable();this._logEnabled=true;return true;}return false;},restore:function(){if(!this._backup){dojo.place(this._backup,this.element,"before");this.element.parentNode.removeChild(this.element);delete this.element;this.element=this._backup;this.backup=null;this._writeLog.splice(0,this._writeLog.length);return true;}return false;},persist:function(){this._writeLogToBackup();this._isDirty=false;delete this._backup;},logWrite:function(map){if(this._logEnabled){this._writeLog.push(map);}},_writeLogToBackup:function(){if(this._backup){this.element=this._backup;this._logEnabled=false;for(var i=0;i<this._writeLog.length;i++){var op=this._writeLog[i];if(op.values){this.store.setValues(this,op.attribute,op.values);}else{this.store.setValue(this,op.attribute,op.value);}}this._writeLog.splice(0,this._writeLog.length);}}});dojo.declare("com.ibm.data.AtomPersonConstruct",com.ibm.data._XmlConstruct,{namespaces:dojo.mixin({},com.ibm.data.AtomFeedStore.prototype.namespaces),constructor:function(root){this.root=root;},getName:function(){var _127=this._getNodeByXpath(this.root,"./atom:name","textContent");if(!_127.found){_127.value="";}return _127.value;},getEmail:function(){var _128=this._getNodeByXpath(this.root,"./atom:email","textContent");if(!_128.found){_128.value="";}return _128.value;},getURI:function(){var _129=this._getNodeByXpath(this.root,"./atom:uri","textContent");if(!_129.found){_129.value="";}return _129.value;},toString:function(){return this.getName();}});dojo.declare("com.ibm.data.AtomDateConstruct",com.ibm.data._XmlConstruct,{namespaces:dojo.mixin({},com.ibm.data.AtomFeedStore.prototype.namespaces),constructor:function(root){this.root=root;},getDate:function(){if(this.date){return this.date;}var d=this._getNodeProp(this.root,"textContent");if(!d){return null;}this.date=dojo.date.stamp.fromISOString(d);return this.date;},getTime:function(){this.getDate();if(this.date){return this.date.getTime();}return null;},toString:function(){this.getDate();if(this.date){return this.date.toString();}return "";}});}if(!dojo._hasResource["com.ibm.data.OpenSearchFeedStore"]){dojo._hasResource["com.ibm.data.OpenSearchFeedStore"]=true;dojo.provide("com.ibm.data.OpenSearchFeedStore");dojo.require("com.ibm.data.AtomFeedStore");dojo.require("dojox.data.dom");dojo.declare("com.ibm.data.OpenSearchFeedStore",com.ibm.data.AtomFeedStore,{namespaces:dojo.mixin({},com.ibm.data.AtomFeedStore.prototype.namespaces,{"xhtml":"http://www.w3.org/1999/xhtml","os":"http://a9.com/-/spec/opensearch/1.1/"}),attrMappings:dojo.mixin({},com.ibm.data.AtomFeedStore.prototype.attrMappings,{nextLink:{xpath:"./atom:link[@rel='next']",targetName:"href",type:"attr"},startIndex:{xpath:"./os:startIndex",targetName:"textContent",type:"node"},itemsPerPage:{xpath:"./os:itemsPerPage",targetName:"textContent",type:"node"},totalResults:{xpath:"./os:totalResults",targetName:"textContent",type:"node"},query:{xpath:"./os:Query",type:"OpenSearchQueryConstruct"}}),itemClass:"com.ibm.data.OpenSearchFeedItem",constructor:function(args){this._features["dojo.data.api.Identity"]=true;},handleConstructs:function(node,prop){switch(prop){case "OpenSearchQueryConstruct":return new com.ibm.data.OpenSearchQueryConstruct(node);default:return this.inherited(arguments);}},getResultSize:function(doc,_12a,_12b){var rule=this.attrMappings.totalResults;var ret=null;if(rule.type=="attr"){ret=this._getAttrByXpath(doc,rule.xpath,rule.targetName);}else{ret=this._getNodeByXpath(doc,rule.xpath,rule.targetName);}if(ret.found){return ret.value-0;}else{return -1;}},fetchItemByIdentity:function(_12c){return false;}});dojo.declare("com.ibm.data.OpenSearchFeedItem",com.ibm.data.AtomEntryItem,{namespaces:dojo.mixin({},com.ibm.data.OpenSearchFeedStore.prototype.namespaces)});dojo.declare("com.ibm.data.OpenSearchQueryConstruct",com.ibm.data._XmlConstruct,{namespaces:dojo.mixin({},com.ibm.data.OpenSearchFeedStore.prototype.namespaces),constructor:function(root){this.root=root;},getRole:function(){return this._getAttribute(this.root,"role");},getTitle:function(){return this._getAttribute(this.root,"title");},getTotalResults:function(){return this._getAttribute(this.root,"totalResults");},getSearchTerms:function(){return this._getAttribute(this.root,"searchTerms");},getCount:function(){return this._getAttribute(this.root,"count");},getStartIndex:function(){return this._getAttribute(this.root,"startIndex");},getStartPage:function(){return this._getAttribute(this.root,"startPage");},getLanguage:function(){return this._getAttribute(this.root,"language");},getInputEncoding:function(){return this._getAttribute(this.root,"inputEncoding");},getOutputEncoding:function(){return this._getAttribute(this.root,"outputEncoding");},toString:function(){return com.ibm.domUtilities.stringFromDoc(this.root);}});}if(!dojo._hasResource["com.ibm.data.MashupHubStore"]){dojo._hasResource["com.ibm.data.MashupHubStore"]=true;dojo.provide("com.ibm.data.MashupHubStore");dojo.require("com.ibm.data.ProxyHelper");dojo.declare("com.ibm.data.MashupHubStore",[com.ibm.data.OpenSearchFeedStore,com.ibm.data.ProxyHelper],{namespaces:null,itemClass:"com.ibm.data.MashupHubItem",constructor:function(args){this._features["dojo.data.api.Identity"]=true;var _12d=new com.ibm.mm.enabler.utils.HttpUrl(this.url);this.url=_12d.toProxifiedString();this.bundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");if(args&&args.namespace=="widget"){this.namespaces=dojo.delegate(com.ibm.data.OpenSearchFeedStore.prototype.namespaces,{catalog:"http://www.ibm.com/xmlns/atom/opensearch/widget/1.0/"});}else{if(args&&args.namespace=="feed"){this.namespaces=dojo.delegate(com.ibm.data.OpenSearchFeedStore.prototype.namespaces,{catalog:"http://www.ibm.com/xmlns/atom/opensearch/feed/1.0/"});}else{this.namespaces=dojo.delegate(com.ibm.data.OpenSearchFeedStore.prototype.namespaces,{catalog:"http://www.ibm.com/opensearch/1.0"});}}},handleConstructs:function(node,prop){switch(prop){case "OpenSearchQueryConstruct":return new com.ibm.data.MashupHubQueryConstruct(node);default:return this.inherited(arguments);}},fetchItemByIdentity:function(_12e){var id=_12e.identity;if(id.indexOf(":")>-1){id=id.substring(id.lastIndexOf(":")+1);}var _12f=_12e.scope?_12e.scope:dojo.global;var args={query:{id:id,collection:"ui.all"},onComplete:dojo.hitch(this,function(_130){if(_130.length==0&&_12e.onError){_12e.onError.call(_12f,"No items returned matching identity "+id);}else{_12e.onItem.call(_12f,_130[0]);}})};if(_12e.onError){args.onError=dojo.hitch(_12f,_12e.onError);}return this.fetch(args);}});dojo.declare("com.ibm.data.MashupHubItem",com.ibm.data.OpenSearchFeedItem,{namespaces:dojo.mixin({},com.ibm.data.MashupHubStore.prototype.namespaces),attrMappings:dojo.mixin({},com.ibm.data.OpenSearchFeedItem.prototype.attrMappings,{editLink:{xpath:"./atom:link[@rel='self']",targetName:"href",type:"attr"},category:{xpath:"./atom:category",targetName:"term",type:"attr"},catalogVersion:{xpath:"./atom:content/catalog:*/catalog:version",targetName:"textContent",type:"node"},catalogName:{xpath:"./atom:content/catalog:*/catalog:name",targetName:"textContent",type:"node"},catalogAuthor:{xpath:"./atom:content/catalog:*/catalog:author",targetName:"textContent",type:"node"},catalogDescription:{xpath:"./atom:content/catalog:*/catalog:description",targetName:"textContent",type:"node"},catalogRating:{xpath:"./atom:content/catalog:*/catalog:rating",targetName:"textContent",type:"node"},catalogUseCount:{xpath:"./atom:content/catalog:*/catalog:useCount",targetName:"textContent",type:"node"},catalogDateModified:{xpath:"./atom:content/catalog:*/catalog:dateModified",targetName:"textContent",type:"node"},catalogNumComments:{xpath:"./atom:content/catalog:*/catalog:numComments",targetName:"textContent",type:"node"},catalogTags:{xpath:"./atom:content/catalog:*/catalog:tags/catalog:tags",targetName:"textContent",type:"node"},catalogCategories:{xpath:"./atom:content/catalog:*/catalog:categories",targetName:"textContent",type:"node"},catalogDocumentationURL:{xpath:"./atom:content/catalog:*/catalog:documentationURL",targetName:"textContent",type:"node"},catalogDownloadURL:{xpath:"./atom:content/catalog:*/catalog:downloadURL",targetName:"textContent",type:"node"},catalogIcon:{xpath:"./atom:content/catalog:*/catalog:objectmeta/catalog:metadata[@name='icon']",targetName:"value",type:"attr"},catalogWidgetParam:{xpath:"./atom:content/catalog:*/catalog:objectmeta/catalog:metadata[@name='widget.metadata.widgetParam']",targetName:"value",type:"attr"},catalogOnNewWire:{xpath:"./atom:content/catalog:*/catalog:objectmeta/catalog:metadata[@name='widget.metadata.onNewWire']",targetName:"value",type:"attr"},catalogAutoWire:{xpath:"./atom:content/catalog:*/catalog:objectmeta/catalog:metadata[@name='widget.metadata.com.ibm.mashups.builder.autoWiringEnabled']",targetName:"value",type:"attr"},catalogPermission:{xpath:"./atom:content/catalog:*/catalog:permission",targetName:"textContent",type:"node"},catalogDefinitionURL:{xpath:"./atom:content/catalog:*/catalog:definitionURL",targetName:"textContent",type:"node"},catalogTitles:{xpath:"./atom:content/catalog:*/catalog:l10n/catalog:title",targetName:null,type:"node"},catalogSandboxUser:{xpath:"./atom:content/catalog:*/catalog:objectmeta/catalog:metadata[@name='sandbox_user']",targetName:"value",type:"attr"},catalogSandboxUserDefinition:{xpath:"./atom:content/catalog:*/catalog:objectmeta/catalog:metadata[@name='widget.metadata.sandbox_definition']",targetName:"value",type:"attr"},catalogWidgetType:{xpath:"./atom:content/catalog:*/catalog:objectmeta/catalog:metadata[@name='widget.metadata.widgetType']",targetName:"value",type:"attr"}})});dojo.declare("com.ibm.data.MashupHubQueryConstruct",com.ibm.data.OpenSearchQueryConstruct,{namespaces:dojo.mixin({},com.ibm.data.MashupHubStore.prototype.namespaces),getSearchType:function(){return this._getAttribute(this.root,"catalog:searchType");},getCollection:function(){return this._getAttribute(this.root,"catalog:collection");}});}if(!dojo._hasResource["com.ibm.data.MashupFileDataStore"]){dojo._hasResource["com.ibm.data.MashupFileDataStore"]=true;dojo.provide("com.ibm.data.MashupFileDataStore");dojo.require("com.ibm.data.CatalogMixin");dojo.declare("com.ibm.data.MashupFileDataStore",[com.ibm.data.MashupHubStore,com.ibm.data.CatalogMixin],{mapItem:function(item){var map={};map.id=this.getEPResolvedValue(item,"id",null);map.label=this.getEPResolvedValue(item,"catalogName",this.bundle["shelf_untitled"]);map.description=this.getEPResolvedValue(item,"catalogDescription","");map.tags=this.getEPResolvedValue(item,"catalogTags","");map.rating=this.getEPResolvedValue(item,"catalogRating",0);map.url=this.getEPResolvedValue(item,"catalogDownloadURL","");map.type=this.getEPResolvedValue(item,"category","");map.thumbnail=this.getValue(item,"catalogIcon","");map.widgetParam=this.getEPResolvedValue(item,"catalogWidgetParam","");map.onNewWire=this.getEPResolvedValue(item,"catalogOnNewWire","");map.onAutoWire=this.getEPResolvedValue(item,"catalogAutoWire","");map.permission=this.getEPResolvedValue(item,"catalogPermission","");map.definitionURL=this.getValue(item,"catalogDefinitionURL","");map.sandbox_user=this.getEPResolvedValue(item,"catalogSandboxUser","false");map.sandbox_definition=this.getEPResolvedValue(item,"catalogSandboxUserDefinition","false");map.icon=this.getValue(item,"catalogIcon","false");map.widgetType=this.getEPResolvedValue(item,"catalogWidgetType","");if(map.widgetType==="mm_OSGadget"){map.titles=this.getValue(item,"catalogTitles",null);}map.hubURL=this.url;map.isTrusted=map.sandbox_user=="true"?false:true;if(map.widgetParam.length>0){map.prefsMapFcn=this.prefsMapFcn;}if(!map.thumbnail&&builderConfig.builderPath){if(item.store.namespace=="widget"){map["thumbnail"]=builderConfig.builderPath+"/images/generic_widget_icon.png";}else{map["thumbnail"]=builderConfig.builderPath+"/images/gray_generic_feed_icon.png";}}return map;},prefsMapFcn:function(map){var pars=dojo.fromJson(map.widgetParam);var ret={};for(var i in pars){ret[pars[i].itemName]=pars[i].itemValue;}return ret;},prepareQuery:function(_131){if(_131.query.keywords){_131.query.searchTerms=_131.query.keywords.join(" ");_131.query.searchType="";delete _131.query.keywords;}else{if(_131.query.tags&&_131.query.tags.length>0){_131.query.searchTerms=_131.query.tags[0];_131.query.searchType="tag";delete _131.query.tags;}else{_131.query.searchTerms="*";_131.query.searchType="";}}if(_131.sort&&_131.sort.length>0){switch(_131.sort[0].attribute){case "date":_131.query.sortBy="updated";break;default:_131.query.sortBy=_131.sort[0].attribute;}_131.query.sortOrder="asc";if(_131.sort[0].descending==true){_131.query.sortOrder="desc";}}if(_131.count){_131.query.count=_131.count;if(_131.start==null){_131.start=0;}_131.query.startIndex=_131.start;}if(!_131.queryOptions){_131.queryOptions={};}_131.queryOptions.preventCache=true;return _131;},validateSelf:function(){var _132=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _133=_132.getValue(com.ibm.mashups.enabler.services.ConfigConstants.HUB_URL);if(dojo.trim(ibmConfig["com.ibm.mashups.builder.contentShelf.mode"])!="mashups"&&_133&&this.url.indexOf("undefined")<0){return true;}else{return false;}}});}if(!dojo._hasResource["com.ibm.pb.data.InstalledPortletStore"]){dojo._hasResource["com.ibm.pb.data.InstalledPortletStore"]=true;dojo.provide("com.ibm.pb.data.InstalledPortletStore");dojo.require("dojo.data.util.simpleFetch");dojo.require("com.ibm.data.AtomFeedStore");dojo.require("com.ibm.data.CatalogMixin");dojo.declare("com.ibm.pb.data.InstalledPortletStore",[com.ibm.data.AtomFeedStore,com.ibm.data.CatalogMixin],{itemClass:"com.ibm.pb.data.InstalledPortletItem",_loadFinished:false,_items:[],noIcons:true,idPrefix:"",constructor:function(args){},mapItem:function(item){var map={};var id=this.getEPResolvedValue(item,"id","");map.id=id.indexOf(this.idPrefix)==0?id.substring(this.idPrefix.length):id;map.label=this.getEPResolvedValue(item,"title","untitled");map.description=this.getEPResolvedValue(item,"summary","");return map;},_fetchItems:function(_134,_135,_136){var me=this;var _137=function(_138,_139){var _13a=[];if(_138.query){var _13b=_138.query.keywords;var _13c=_138.queryOptions?_138.queryOptions.ignoreCase:false;var _13d=[];for(var i=0;i<_13b.length;i++){if(_13b[i].length<=0){continue;}var _13e=(_13c)?_13b[i].toLowerCase():_13b[i];_13d.push(_13e);}for(var i=0;i<_139.length;++i){var _13f=true;if(_139[i]===null){_13f=false;}else{for(var j=0;j<_13d.length;j++){var _140=me.getValue(_139[i],"title","");if(_13c){_140=_140.toLowerCase();}var _141=me.getValue(_139[i],"summary","");if(_13c){_141=_141.toLowerCase();}if(_140.indexOf(_13d[j])==-1&&_141.indexOf(_13d[j])==-1){_13f=false;break;}}}if(_13f){_13a.push(_139[i]);}}_135(_13a,_138);}else{_135(_139,_138);}};if(this._loadFinished){_137(_134,this._items);}else{var args=arguments;var _142=arguments[0].onComplete;args[0].onComplete=function(_143){args[0].onComplete=_142;me._loadFinished=true;me._items=_143;_137(_134,_143);};com.ibm.data.AtomFeedStore.prototype.fetch.apply(this,args);}}});dojo.extend(com.ibm.pb.data.InstalledPortletStore,dojo.data.util.simpleFetch);dojo.declare("com.ibm.pb.data.InstalledPortletItem",com.ibm.data.AtomEntryItem,{});}if(!dojo._hasResource["com.ibm.pb.data.LayoutTemplateModelStore"]){dojo._hasResource["com.ibm.pb.data.LayoutTemplateModelStore"]=true;dojo.provide("com.ibm.pb.data.LayoutTemplateModelStore");dojo.require("com.ibm.data.CatalogMixin");dojo.declare("com.ibm.pb.data.LayoutTemplateModelStore",[com.ibm.data.CatalogMixin],{constructor:function(){this.model=com.ibm.mashups.enabler.layouttemplate.Factory.getTemplateModel();this.localizedContext=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();},searchable:true,mapItem:function(item){var map={};map.label="untitled3";var _144=this.getLabel(item);if(_144){if(typeof _144=="string"){map.label=_144;}else{_144.setFinishedCallback(function(_145){map.label=_145?_145:"untitled2";});_144.start();}}map["description"]=null;var url=this.getValue(item,"URL","");map["url"]="dav:"+url.substring(url.indexOf("dav")+4,url.lastIndexOf("/"));map["id"]=this.getValue(item,"ID",null);map.thumbnail="";var _146=com.ibm.mm.enabler.remote.WebDavUrlFactory.createUrl();var _147=item.getMetaData("thumbnailPath");if(_147){if(typeof _147==="string"){map.thumbnail=_146+_147;}else{_147.setFinishedCallback(function(path){map.thumbnail=_146+path;});_147.start();}}return map;},getIdentity:function(item){return this.getValue("ID");},getIdentityAttributes:function(item){return ["ID"];},fetchItemByIdentity:function(_148){_148.path=_148.identity.toString();return this.fetch(_148);},getFeatures:function(){return {"dojo.data.api.Read":true,"dojo.data.api.Identity":true};},getValue:function(item,_149,_14a){var _14b=_14a;var _14c=_149.toLowerCase();switch(_14c){case "title":_14b=this.localizedContext.getTitle(item);break;case "description":_14b=this.localizedContext.getDescription(item);break;case "id":_14b=item.remoteFile.getName();break;default:if(this.hasAttribute(item,_149)){_14b=item["get"+_149]();}}return _14b;},getValues:function(item,_14d){var _14e=[];var _14f=this.getValue(item,_14d,undefined);if(_14f!==undefined){_14e.push(_14f);}return _14e;},getAttributes:function(item){var attr=[];for(var prop in item){if(Object.prototype.hasOwnProperty.call(item,prop)&&prop.indexOf("get")===0){attr.push(prop.substring(3));}}return attr;},hasAttribute:function(item,_150){var _151=false;if(item["get"+_150]!==undefined){_151=true;}return _151;},containsValue:function(item,_152,_153){var _154=false;var _155=this.getValues(item,_152);if(_155.length>0){var l=_155.length;var i=0;var _156=false;while(!_156&&i<l){_156=(_155[i]===_153);i++;}}return _154;},isItem:function(_157){return _157!==undefined&&_157.declaredClass==="com.ibm.mm.enabler.layouttemplate.LayoutTemplate";},isItemLoaded:function(_158){return this.isItem(_158)&&_158.remoteFile!==undefined;},loadItem:function(_159){},getLabel:function(item){return this.localizedContext.getTitle(item);},getLabelAttributes:function(item){return ["Title","Description"];},fetch:function(_15a){if(_15a===undefined||_15a===null){_15a={};}var _15b=_15a.query;var _15c=_15b?_15b.keywords:undefined;var _15d=_15a.onBegin;var _15e=_15a.onItem;var _15f=_15a.onComplete;var _160=_15a.onError;var _161=_15a.scope?_15a.scope:dojo.global;var _162=_15a.start?_15a.start:0;var _163=_15a.count?_15a.count:Number.POSITIVE_INFINITY;var sort=_15a.sort?_15a.sort:undefined;var _164=_15a.queryOptions?_15a.queryOptions.ignoreCase:undefined;var _165;var _166;if(sort){_165=sort.attribute;_166=sort.descending;}else{_165="id";}var _167=_15a;_167.abort=function(){this.aborted=true;};var _168=_15d?function(size){if(!_167.aborted){_15d.call(_161,size,_167);}}:function(){};var me=this;var _169=function(item){var _16a=!_167.aborted;if(_15c&&_15c.length>0){var id=me.mapItem(item).label;if(_164){id=id.toUpperCase();}var len=_15c.length;var _16b;for(var i=0;i<len;i++){_16b=_15c[i];if(_164){_16b=_16b.toUpperCase();}if(id.indexOf(_16b)<0){return false;}}}return _16a;};var _16c=_15e?function(item){_15e.call(_161,item,_167);}:function(){};var me=this;var _16d=_15f?function(_16e){if(!_167.aborted){if(_15e){_15f.call(_161,null,_167);}else{if(_165){var _16f=_165.toLowerCase();var _170=_166?1:-1;var _171=_166?-1:1;var _172=0;var _173=_16e.sort(function(a,b){var _174=undefined;var _175=me.mapItem(a);var _176=me.mapItem(b);var _177=_175[_16f];var _178=_176[_16f];if(!_177&&_178){_174=_171;}else{if(!_177&&!_178){_174=_172;}else{if(_177&&!_178){_174=_170;}else{if(_177===_178){_174=_172;}else{if(_177>_178){_174=_171;}else{if(_177<_178){_174=_170;}else{_174=_172;}}}}}}return _174;});if(_173!==null&&_173.length===_16e.length){_16e=_173.splice(_162,_163);}}_15f.call(_161,_16e,_167);}}}:function(){};var _168=_15d?function(size){if(!_167.aborted){_15d.call(_161,size,_167);}}:function(){};var path=_15b?_15b.path:_15b;this._loadItems(path,_162,_163,_169,_168,_16c,_16d);return _167;},_loadItems:function(path,_179,_17a,_17b,_17c,_17d,_17e){if(path===undefined||path===null||path==="*"){var me=this;var it=this.model.iterator();it.setFinishedCallback(function(){var size=it.size();size.setFinishedCallback(function(_17f){var _180=[];var _181=0;returnedCount=0;var _182=[];var _183=2;while(it.hasNext()){var item=it.next();item.setFinishedCallback(function(_184){if(_184&&_17b(_184)){_180.push(_184);var _185=me.localizedContext.getLocale(_184);if(_185){var d=_184.getTitle(_185);d.setFinishedCallback(function(){var d2=_184.getMetaData("");d2.setFinishedCallback(function(){_181--;_17d(_184);returnedCount++;if(_181<_183&&_182.length>0){_181++;_182.pop().start();}if(returnedCount==_17f){_17c(_180.length);_17e(_180);}});d2.start();});d.start();}else{_181--;_17d(_184);}}else{returnedCount++;_181--;if(_181<_183&&_182.length>0){_181++;_182.pop().start();}if(returnedCount==_17f){_17c(_180.length);_17e(_180);}}});if(_181>=_183){_182.push(item);}else{_181++;item.start();}}});size.start();});it.start();}else{var _186=this.model.find(path);_186.setFinishedCallback(function(_187){_17c(1);_17d(_187);_17e(_187);});_186.start();}}});}if(!dojo._hasResource["com.ibm.pb.data.TaggedItemStore"]){dojo._hasResource["com.ibm.pb.data.TaggedItemStore"]=true;dojo.provide("com.ibm.pb.data.TaggedItemStore");dojo.declare("com.ibm.pb.data.TaggedItemStore",[com.ibm.data.OpenSearchFeedStore,com.ibm.data.CatalogMixin],{itemClass:"com.ibm.data.TaggedItem",searchable:false,noIcons:true,prefix:"rm:pdl:oid:",roleLevel:null,namespaces:dojo.mixin({},com.ibm.data.OpenSearchFeedStore.prototype.namespaces,{"model":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements","base":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base","thr":"http://purl.org/syndication/thread/1.0","xhtml":"http://www.w3.org/1999/xhtml","xsi":"http://www.w3.org/2001/XMLSchema-instance","portal":"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model"}),mapItem:function(item){var map={};map.id=this.getEPResolvedValue(item,"id",null);if(map.id){map.id=map.id.substring(this.prefix.length);}map.label=this.getEPResolvedValue(item,"title","untitled");map.description=this.getEPResolvedValue(item,"summary","");return map;},prepareQuery:function(_188){if(!_188.query){_188.query={};}if(_188.count){_188.query["max-results"]=_188.count;delete _188.count;}if(_188.start>=0){_188.query["start-index"]=_188.start;delete _188.start;}return _188;},validateSelf:function(){if(!this.roleLevel){return true;}var _189=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel(),_18a=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID(),page=_189.find(_18a).start();return page.hasRole(this.roleLevel);},getSourceLabel:function(){if(!this.category){return false;}var _18b=this._getCategories();for(var i=0;i<_18b.length;i++){var _18c=_18b[i];var id=_18c.getID();if(id.indexOf(this.category)==0){return com.ibm.mm.builder.utils.htmlUtil.escapeString(_18c.getTitle(dojo.locale||ibmConfig["default.locale"]));}}return false;},_getCategories:function(){if(this.catalogEntries){return this.catalogEntries;}this.catalogEntries=[];var cm=com.ibm.mashups.enabler.model.Factory.getCatalogCategoryModel(),_18d=cm.getRoot().start(),iter=cm.getChildren(_18d);while(iter.hasNext()){this.catalogEntries.push(iter.next());}return this.catalogEntries;}});dojo.declare("com.ibm.data.TaggedItem",com.ibm.data.OpenSearchFeedItem,{namespaces:dojo.mixin({},com.ibm.pb.data.TaggedItemStore.prototype.namespaces)});}if(!dojo._hasResource["com.ibm.pb.data.WcmStore"]){dojo._hasResource["com.ibm.pb.data.WcmStore"]=true;dojo.provide("com.ibm.pb.data.WcmStore");dojo.declare("com.ibm.pb.data.WcmStore",[com.ibm.pb.data.InstalledPortletStore],{validateSelf:function(){if(com.ibm.pb.customize.enabler.AddContentController._pageHasContentMapping()){return true;}var _18e=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel(),_18f=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID(),page=_18e.find(_18f).start();return page.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);}});} /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ if(!dojo._hasResource["com.ibm.dnd.PageAvatar"]){dojo._hasResource["com.ibm.dnd.PageAvatar"]=true;dojo.provide("com.ibm.dnd.PageAvatar");dojo.declare("com.ibm.dnd.PageAvatar",dojo.dnd.Avatar,{construct:function(){var _1=dojo.doc.createElement("div");_1.style.position="absolute";_1.style.zIndex=1999;_1.style.margin="0px";var _2=this.manager.source,_3;_3=_2._normalizedCreator(_2.getItem(this.manager.nodes[0].id).data,"avatar").node;_3.id="";_1.appendChild(_3);this.node=_1;}});}if(!dojo._hasResource["com.ibm.dnd.PageCreator"]){dojo._hasResource["com.ibm.dnd.PageCreator"]=true;dojo.provide("com.ibm.dnd.PageCreator");dojo.declare("com.ibm.dnd.PageCreator",null,{creator:function(_4,_5){var _6=document.createElement("div");if(_5=="avatar"){_6.className="ibmPortalDndPageAvatar";var _7=document.createTextNode(_4);_6.appendChild(_7);}return {node:_6,data:_4,type:["cmNode"]};}});com.ibm.dnd.PAGE_CREATOR=new com.ibm.dnd.PageCreator();}if(!dojo._hasResource["com.ibm.pb.control.DNDController"]){dojo._hasResource["com.ibm.pb.control.DNDController"]=true;dojo.provide("com.ibm.pb.control.DNDController");dojo.declare("com.ibm.pb.control.DNDController",com.ibm.pb.logging.Loggable,{DND_TYPE:"lm",SHELF_TYPE:"sm",CONTROL_CLASS:"component-control",CONTAINER_CLASS:"component-container",DND_HANDLE_CLASS:"component-control-draghandle",DND_ORIENTATION:{vertical:"vertical",horizontal:"horizontal",freeform:"freeform"},dndSources:{},isDndLoaded:false,ghostHeight:0,ghostAddedHeight:false,currentNode:null,layoutParser:com.ibm.pb.layout.LayoutParser,nm:null,constructor:function(){var _8=this.LOGGER,_9="constructor";_8.entering(_9,arguments);com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService").subscribeEvent("com.ibm.mashups.builder.changePageMode",this,this.onPageModeChanged);this.sourceDefinitions=ibmCfg.themeConfig.dndSourceDefinitions;this.nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();_8.exiting(_9,arguments);},init:function(){var _a=this.LOGGER,_b="init";_a.entering(_b,arguments);this.getContainers().forEach(function(_c){dojo.query("."+this.CONTROL_CLASS,_c).forEach(function(_d){dojo.addClass(_d,"dojoDndItem");dojo.attr(_d,"dndType",this.DND_TYPE);},this);var _e=null;var _f=null;var _10=null;dojo.forEach(this.sourceDefinitions,function(_11){if(dojo.hasClass(_c,_11.id)){_f=_11.object;_10=_11.orientation;_e=dojo.getObject(_f);if(!_e){dojo["require"](_f);_e=dojo.getObject(_f);if(!_e){console.error("%o not found",_f);return;}}}},this);if(_e){this.dndSources[this.layoutParser.extractID(_c)]=new _e(_c,{horizontal:(this.DND_ORIENTATION.horizontal==_10),creator:dojo.getObject(_f+".creator"),accept:[this.DND_TYPE,this.SHELF_TYPE],withHandles:dojo.getObject(_f+".withHandles")?true:false,singular:true,skipForm:true});}},this);this.isDndLoaded=true;_a.exiting(_b,arguments);},getContainers:function(){if(!this.containers){this.containers=dojo.query("."+this.CONTAINER_CLASS);}return this.containers;},destroySources:function(){for(var _12 in this.dndSources){if(_12){this.dndSources[_12].destroy();}}this.dndSources={};},reset:function(){this.destroySources();this.isDndLoaded=false;delete this.containers;},onPageModeChanged:function(_13){var lgr=this.LOGGER,_14="onPageModeChanged";lgr.entering(_14,arguments);if(_13=="edit"){if(!this.isDndLoaded){this.init();}else{for(var i in this.dndSources){if(this.dndSources[i]!=null){this.dndSources[i].isSource=true;}}}}else{if(this.isDndLoaded){for(var i in this.dndSources){if(this.dndSources[i]!=null){this.dndSources[i].isSource=false;}}}}lgr.exiting(_14,arguments);}});(function(){var _15=null;com.ibm.pb.control.DNDController.getController=function(){if(!_15){_15=new com.ibm.pb.control.DNDController();}return _15;};})();}if(!dojo._hasResource["com.ibm.dnd.CustomManagerSource"]){dojo._hasResource["com.ibm.dnd.CustomManagerSource"]=true;dojo.provide("com.ibm.dnd.CustomManagerSource");dojo.require("dojo.dnd.Source");com.ibm.dnd.CustomManagerMixin={managerOverrides:{},_partialMixin:function(tgt,src,map){for(var p in map){tgt[p]=src[p];}return tgt;},_changeManager:function(){if(!this._mgr){this.mgrProps={};this._mgr=dojo.dnd.manager();this._partialMixin(this.mgrProps,this._mgr,this.managerOverrides);dojo.mixin(this._mgr,this.managerOverrides);this._mgrFixConn=dojo.connect(dojo.doc,"onmouseup",this,"_fixManager");}},_fixManager:function(){if(this._mgrFixConn){dojo.disconnect(this._mgrFixConn);this._mgrFixConn=null;}if(this._mgr){dojo.mixin(this._mgr,this.mgrProps);this.mgrProps={};}this._mgr=null;},onMouseDown:function(e){this._changeManager();this.inherited(arguments);},destroy:function(){if(this._mgrFixConn){dojo.disconnect(this._mgrFixConn);}this._mgrFixConn=null;this.inherited(arguments);}};dojo.declare("com.ibm.dnd.CustomManagerSource",dojo.dnd.Source,com.ibm.dnd.CustomManagerMixin);dojo.declare("com.ibm.dnd.CustomManagerAutoSource",dojo.dnd.AutoSource,com.ibm.dnd.CustomManagerMixin);}if(!dojo._hasResource["com.ibm.dnd.TunedLayoutSource"]){dojo._hasResource["com.ibm.dnd.TunedLayoutSource"]=true;dojo.provide("com.ibm.dnd.TunedLayoutSource");dojo.declare("com.ibm.dnd.TunedLayoutSource",com.ibm.dnd.CustomManagerSource,{managerOverrides:{OFFSET_X:1,OFFSET_Y:1,stopDrag:function(){if(!dojo.isIE){dojo.removeClass(dojo.body(),"dojoDndCopy");dojo.removeClass(dojo.body(),"dojoDndMove");}dojo.forEach(this.events,dojo.disconnect);this.events=[];this.avatar.destroy();this.avatar=null;this.source=this.target=null;this.nodes=[];}},_changeState:function(_16,_17){var _18="dojoDnd"+_16;var _19=_16.toLowerCase()+"State";if(this[_19]!=_17){var toR=_18+this[_19];var toA=_18+_17;var cls=" "+this.node["className"]+" ";cls=cls.replace(" "+toR+" "," ");if(toA&&cls.indexOf(" "+toA+" ")<0){cls+=toA+" ";}this.node["className"]=dojo.string.trim(cls);this[_19]=_17;}}});}if(!dojo._hasResource["com.ibm.pb.dnd.layout.LayoutControlAvatar"]){dojo._hasResource["com.ibm.pb.dnd.layout.LayoutControlAvatar"]=true;dojo.provide("com.ibm.pb.dnd.layout.LayoutControlAvatar");dojo.declare("com.ibm.pb.dnd.layout.LayoutControlAvatar",dojo.dnd.Avatar,{construct:function(){var div=dojo.doc.createElement("div");div.style.position="absolute";div.style.zIndex=1999;div.style.margin="0px";var _1a=this.manager.source,_1b;_temp=_1a._normalizedCreator(_1a.getItem(this.manager.nodes[0].id).data,"avatar");_1b=_temp.node;_1b.id="";dojo.style(div,"opacity",0.5);div.appendChild(_1b);this.node=div;},update:function(){if(this.isA11y){var _1c=dojo.byId("a11yIcon");var _1d="+";if(this.manager.canDropFlag&&!this.manager.copy){_1d="< ";}else{if(!this.manager.canDropFlag&&!this.manager.copy){_1d="o";}else{if(!this.manager.canDropFlag){_1d="x";}}}_1c.innerHTML=_1d;}dojo.query(("tr.dojoDndAvatarHeader td span"+(this.isA11y?" span":"")),this.node).forEach(function(_1e){_1e.innerHTML=this._generateText();},this);}});}if(!dojo._hasResource["com.ibm.pb.dnd.layout.LayoutSource"]){dojo._hasResource["com.ibm.pb.dnd.layout.LayoutSource"]=true;dojo.provide("com.ibm.pb.dnd.layout.LayoutSource");dojo.declare("com.ibm.pb.dnd.layout.LayoutSource",[com.ibm.dnd.TunedLayoutSource,com.ibm.pb.logging.Loggable],{isDragging:false,currentNode:null,currentMargin:0,currentTarget:null,emptyContainer:null,delaySave:true,movedItems:[],layoutParser:com.ibm.pb.layout.LayoutParser,constructor:function(){this.evtSvc=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");this.moveWidget=this.evtSvc.subscribeEvent("com.ibm.mashups.builder.widgetMoved",this,"_widgetMoved");this.applyDefaultSizing=this.evtSvc.subscribeEvent("com.ibm.mashups.builder.addNewWidget",this,"_widgetDefaultSizingApplied");},managerOverrides:{OFFSET_X:1,OFFSET_Y:1,makeAvatar:function(){return new com.ibm.pb.dnd.layout.LayoutControlAvatar(this);},startDrag:function(_1f,_20,_21){this.source=_1f;this.nodes=_20;this.copy=Boolean(_21);this.avatar=this.makeAvatar();dojo.body().appendChild(this.avatar.node);dojo.publish("/dnd/start",[_1f,_20,this.copy]);this.events=[dojo.connect(dojo.doc,"onmousemove",this,"onMouseMove"),dojo.connect(dojo.doc,"onmouseup",this,"onMouseUp"),dojo.connect(dojo.doc,"onkeydown",this,"onKeyDown"),dojo.connect(dojo.doc,"onkeyup",this,"onKeyUp"),dojo.connect(dojo.doc,"ondragstart",dojo.stopEvent),dojo.connect(dojo.body(),"onselectstart",dojo.stopEvent)];dojo.addClass(dojo.body(),"dojoDndMove");}},copyState:function(){return false;},onDndStart:function(_22,_23,_24){this.inherited(arguments);if(_22!==this){return;}this.isDragging=true;this.currentNode=dojo.byId(_23[0].id);ibmCfg.controllers.dnd.currentNode=this.currentNode;ibmCfg.controllers.dnd.currentNode._isCanceled=false;if(ibmCfg.controllers.dnd.ghostHeight==0){if(dojo.isIE){ibmCfg.controllers.dnd.ghostHeight=200;}else{ibmCfg.controllers.dnd.ghostHeight=this.currentNode.offsetHeight;}}var _25=_22.getItem(this.currentNode.id);if(_25&&(_25.type!=ibmCfg.controllers.dnd.SHELF_TYPE)){if(!dojo.isIE){dojo.style(this.currentNode,{display:"none"});}}},onDrop:function(_26,_27,_28){this.LOGGER.entering("onDrop",[_26,_27,_28]);if(!this.current&&!this.emptyContainer){this.onDndCancel();return;}var _29=dojo.byId(_27[0].id);var _2a=_26.getItem(_29.id);var _2b=_2a?_2a.type:null;if(_2b&&(_2b==ibmCfg.controllers.dnd.SHELF_TYPE)){this.onDropFromShelf(_26,_27,_28);}else{if(this!=_26){this.onDropExternal(_26,_27,_28);}else{this.onDropInternal(_27,_28);}}var _2c=null;if(this.current){_2c=this.current.parentNode;}else{_2c=this.emptyContainer;}this._calculateDropTarget(_29,_2c,_2b);this._processDrop(_29,_2c,_26,_27,_28);this.isDragging=false;this.LOGGER.exiting("onDrop",[_26,_27,_28]);},onDndCancel:function(){this.inherited(arguments);if(ibmCfg.controllers.dnd.currentNode&&!ibmCfg.controllers.dnd.currentNode._isCanceled){if(!dojo.isIE){dojo.style(ibmCfg.controllers.dnd.currentNode,{display:""});}this.isDragging=false;ibmCfg.controllers.dnd.currentNode._isCanceled=true;}},onDropFromShelf:function(_2d,_2e,_2f){var _30=this._normalizedCreator;if(this.creator){this._normalizedCreator=function(_31,_32){return _30.call(this,_2d.getItem(_31.id).data,_32);};}else{if(_2f){this._normalizedCreator=function(_33,_34){var t=_2d.getItem(_33.id);var n=_33.cloneNode(true);n.id=dojo.dnd.getUniqueId();return {node:n,data:t.data,type:t.type};};}else{this._normalizedCreator=function(_35,_36){var t=_2d.getItem(_35.id);_2d.delItem(_35.id);return {node:_35,data:t.data,type:t.type};};}}this.selectNone();if(!_2f&&!this.creator){_2d.selectNone();}if(!_2f&&this.creator){_2d.deleteSelectedNodes();}this._normalizedCreator=_30;},_calculateDropTarget:function(_37,_38,_39){if(this.current&&(this.current!=_37)&&!this.emptyContainer){if(this.before!=true){var _3a=dojo.query("."+ibmCfg.controllers.dnd.CONTROL_CLASS,_38);for(var i=0;i<_3a.length;i++){if(_3a[i]==this.current){var _3b=(_39=="sm")?i+1:i+2;if(_3b<_3a.length){this.current=_3a[_3b];break;}else{this.current=null;break;}}}}}else{if(this.emptyContainer){_38=this.emptyContainer;this.current=null;}else{this.onDndCancel();return;}}},_processDrop:function(_3c,_3d,_3e,_3f,_40){var _41=_3e.getItem(_3c.id);if(_41&&(_41.type==ibmCfg.controllers.dnd.SHELF_TYPE)){var _42=dijit.byId(_3f[0].id);var _43=this.current?this.layoutParser.extractID(this.current):null;_42.apply(this.layoutParser.extractID(_3d),_43);}else{var _44=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var lm=ibmCfg.controllers.dnd.nm.getLayoutModel(_44);var _45=lm.find(this.layoutParser.extractID(_3d));if(_45){_45.setFinishedCallback(dojo.hitch(this,"_insert"),{layoutModel:lm,controls:{target:this.current,current:_3c}});_45.start(false);}else{this.LOGGER.severe("onDrop","Cannot find container in the layout model");}}this.evtSvc.broadcastEvent("com.ibm.mashups.builder.widgetMoved",this.layoutParser.extractID(_3c));},_insert:function(_46,_47,x){this.LOGGER.entering("_insert",[_46,_47,x]);if(_47!=200){this.LOGGER.severe("_insert","Could not find container in the layout model. Cannot move control.",[_46,_47,x]);return;}if(_46 instanceof com.ibm.mashups.enabler.layout.LayoutContainer){var _48=x.layoutModel.find(this.layoutParser.extractID(x.controls.current)).start();if(!_48){this.LOGGER.severe("_insert","Cannot find current dragging node in the layout model",[x.controls.current]);}var _49=null;if(x.controls.target){_49=x.layoutModel.find(this.layoutParser.extractID(x.controls.target)).start();if(!_49){this.LOGGER.severe("_insert","Cannot find target node in the layout model",[x.controls.target]);}}if(x.layoutModel.confirmInsert(_48,_46,_49)){if(_49&&_48.getID()==_49.getID()){_49=null;}x.layoutModel.insert(_48,_46,_49);}if(typeof ibmc!=="undefined"){ibmc.publish("my.setDirtyPage",[true]);}com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);if(typeof i$!="undefined"){i$.fireEvent("wptheme/contextMenu/invalidate/all");}if(!this.delaySave){ibmCfg.controllers.dnd.nm.commit().start();}}else{this.LOGGER.severe("_insert","Container is not an instance of com.ibm.mashups.enabler.layout.LayoutContainer",[_46,_47,x]);}this.LOGGER.exiting("_insert",[_46,_47,x]);},_widgetMoved:function(_4a){this.syncSourcesMap(_4a);},_widgetDefaultSizingApplied:function(_4b){com.ibm.mm.builder.utils.skinUtil.updateDefaultSize(_4b);},syncSourcesMap:function(id){var _4c=dojo.query(".id-"+id,this.node);if(_4c[0]&&_4c[0].id){var nid=_4c[0].id;var _4d=ibmCfg.controllers.dnd.dndSources;for(i in _4d){if(i){if(_4d[i].getItem(nid)){if(_4d[i]!=this){this.setItem(nid,_4d[i].getItem(nid));_4d[i].setItem(nid,null);_4d[i].delItem(nid);}}}}}},destroy:function(){this.evtSvc.unsubscribeEvent(this.moveWidget);this.evtSvc.unsubscribeEvent(this.applyDefaultSizing);this.moveWidget=null;this.applyDefaultSizing=null;}});}if(!dojo._hasResource["com.ibm.pb.dnd.layout.LayoutColumnSource"]){dojo._hasResource["com.ibm.pb.dnd.layout.LayoutColumnSource"]=true;dojo.provide("com.ibm.pb.dnd.layout.LayoutColumnSource");dojo.declare("com.ibm.pb.dnd.layout.LayoutColumnSource",[com.ibm.pb.dnd.layout.LayoutSource],{ghostClass:"ibmDndGhost",onDndCancel:function(){if(this.isDragging){this.inherited(arguments);this.removeGhost();ibmCfg.controllers.dnd.ghostHeight=0;}},onOverEvent:function(){this.inherited(arguments);this.active=true;if(this.isDragging&&dojo.dnd.manager().target){var _4e=dojo.dnd.manager().target.node;var _4f=dojo.query("."+ibmCfg.controllers.dnd.CONTROL_CLASS,_4e);if(_4f.length==0){this.emptyContainer=_4e;if(dojo.query("."+this.ghostClass).length==0){this.emptyContainer.appendChild(this.createGhostMarkup(ibmCfg.controllers.dnd.ghostHeight));}}else{this.emptyContainer=null;}}},onOutEvent:function(){this.inherited(arguments);this.active=false;if(dojo.query("."+this.ghostClass).length>0){this.removeGhost();}},_addItemClass:function(_50,_51){if(this.current==_50&&this.before==_51){return;}if(this.isDragging){this.createGhost(_50,_51);}},_removeItemClass:function(_52,_53){if(this.isDragging){this.removeGhost();}},createGhost:function(_54,_55){if(_55=="Before"){_54.insertBefore(this.createGhostMarkup(ibmCfg.controllers.dnd.ghostHeight),_54.childNodes[0]);}else{if(_55=="After"){_54.appendChild(this.createGhostMarkup(ibmCfg.controllers.dnd.ghostHeight));if(this.hasHeight(_54)){var _56=dojo.style(_54,"height");if(_56>0){ibmCfg.controllers.dnd.ghostAddedHeight=true;dojo.style(_54,"height",_56+ibmCfg.controllers.dnd.ghostHeight+"px");}}}}},removeGhost:function(){var _57=dojo.byId(this.ghostClass);if(_57){var _58=_57.parentNode;_58.removeChild(_57);var _59=dojo.style(_58,"height");if(ibmCfg.controllers.dnd.ghostAddedHeight){ibmCfg.controllers.dnd.ghostAddedHeight=false;dojo.style(_58,"height",_59-ibmCfg.controllers.dnd.ghostHeight+"px");}}},createGhostMarkup:function(_5a){var _5b=document.createElement("div");_5b.className=this.ghostClass;_5b.id=this.ghostClass;dojo.style(_5b,{height:_5a+"px"});return _5b;},hasHeight:function(_5c){var _5d=dojo.attr(_5c,"style");if(!_5d){return false;}else{if(_5d.toString().toLowerCase().indexOf("height")>=0){return true;}else{if(_5d.height){return true;}else{return false;}}}}});com.ibm.pb.dnd.layout.LayoutColumnSource.creator=function(_5e,_5f){if(_5f=="avatar"){var _60=dojo.doc.createElement("div");if(dojo.dnd.manager().source.current){_60.innerHTML=String(_5e);var _61=dojo.byId(dojo.dnd.manager().source.current.id);dojo.style(_60,{width:_61.offsetWidth+"px",opacity:0.5});}return {node:_60,data:_5e,type:[ibmCfg.controllers.dnd.DND_TYPE]};}else{var _60=dojo.query("[id~="+ibmCfg.controllers.dnd.currentNode.id+"]")[0];if(_60){var _62=ibmCfg.controllers.dnd.dndSources[com.ibm.pb.layout.LayoutParser.extractID(_60.parentNode)];if(_62){var t=_62.getItem(_60.id);_62.delItem(_60.id);_62.selection={};return {node:_60,data:t.data,type:t.type};}}return {node:dojo.create("div"),data:_5e,type:ibmCfg.controllers.dnd.DND_TYPE};}};com.ibm.pb.dnd.layout.LayoutColumnSource.withHandles=true;}if(!dojo._hasResource["com.ibm.pb.dnd.layout.LayoutRowSource"]){dojo._hasResource["com.ibm.pb.dnd.layout.LayoutRowSource"]=true;dojo.provide("com.ibm.pb.dnd.layout.LayoutRowSource");dojo.declare("com.ibm.pb.dnd.layout.LayoutRowSource",[com.ibm.pb.dnd.layout.LayoutSource],{ghostClass:"ibmDndHorizontalGhost",currentHolder:null,onDrop:function(_63,_64,_65){this.LOGGER.entering("onDrop",[_63,_64,_65]);if(!this.current&&this.currentHolder&&!this.emptyContainer){this.current=this.currentHolder;this.before=true;}var _66=dojo.byId(_64[0].id);var _67=_63.getItem(_66.id);var _68=_67?_67.type:null;if(_67&&(_68==ibmCfg.controllers.dnd.SHELF_TYPE)){this.onDropFromShelf(_63,_64,_65);}else{if(this!=_63){this.onDropExternal(_63,_64,_65);}else{this.onDropInternal(_64,_65);}}var _69=null;if(this.current){_69=this.current.parentNode;}else{_69=this.emptyContainer;}if(!_69){_69=dojo.dnd.manager().target.node;}if(!_69){_69=_66.parentNode;}this._calculateDropTarget(_66,_69,_68);this._processDrop(_66,_69,_63,_64,_65);dojo.style(_66,{cursor:"default",opacity:1,display:""});this.LOGGER.exiting("onDrop",[_63,_64,_65]);},onDndCancel:function(){if(this.isDragging){this.inherited(arguments);this.removeGhost();}},onOverEvent:function(){this.inherited(arguments);this.active=true;if(this.isDragging&&dojo.dnd.manager().target){var _6a=dojo.dnd.manager().target.node;var _6b=dojo.query("."+ibmCfg.controllers.dnd.CONTROL_CLASS,_6a);this.emptyContainer=_6a;if(dojo.query("."+this.ghostClass).length==0){this.emptyContainer.appendChild(this.createEmptyContainerGhostMarkup());}if(_6b.length!=0){this.emptyContainer=null;}}},onOutEvent:function(){this.inherited(arguments);this.active=false;if((dojo.query("."+this.ghostClass).length>0)&&!this.current){this.removeGhost();}},_markTargetAnchor:function(_6c){if(this.current==this.targetAnchor&&this.before==_6c){return;}if((this.targetAnchor!=this.current)&&!this.targetSelected){this.currentHolder=null;this.removeGhost(this.targetAnchor);}if(this.current==null&&this.targetAnchor!=null){this.current=this.targetAnchor;}else{if(this.targetAnchor==null&&this.current!=null){this.targetAnchor=this.current;}else{this.targetAnchor=this.current;}}this.targetBox=null;this.before=_6c;if(this.targetAnchor){this.currentHolder=this.current;this.createGhost(this.targetAnchor,this.before?"Before":"After");if(this.before){this.firstInsert=true;}}else{this.firstInsert=false;}},_unmarkTargetAnchor:function(){if(!this.targetAnchor&&!this.targetSelected){return;}this.removeGhost(this.targetAnchor);this.currentHolder=null;this.targetAnchor=null;this.targetBox=null;this.before=true;},_addItemClass:function(_6d,_6e){if(this.current==_6d&&this.before==_6e){return;}if(this.isDragging){this.createGhost(_6d,_6e);}},_removeItemClass:function(_6f,_70){if(this.isDragging){this.removeGhost();}},createGhost:function(_71,_72){if(_72=="Before"){var _73=_71.parentNode;_73.insertBefore(this.createGhostMarkup(),_71);}else{if(_72=="After"){var _73=_71.parentNode;_73.insertBefore(this.createGhostMarkup(),_71.nextSibling);}}},removeGhost:function(){var _74=dojo.byId(this.ghostClass);if(_74){var _75=_74.parentNode;_75.removeChild(_74);}},createGhostMarkup:function(){this.removeGhost();var _76=document.createElement("div");dojo.attr(_76,{className:this.ghostClass,id:this.ghostClass,onmouseover:dojo.hitch(this,function(e){if(!e){var e=window.event;}if(dojo.isIE){this.targetSelected=e.srcElement;}else{this.targetSelected=e.currentTarget;}}),onmouseout:dojo.hitch(this,function(){this.targetSelected=null;})});return _76;},createEmptyContainerGhostMarkup:function(){var _77=document.createElement("div");_77.className=this.ghostClass;_77.id=this.ghostClass;return _77;}});com.ibm.pb.dnd.layout.LayoutRowSource.creator=function(_78,_79){if(_79=="avatar"){var _7a=dojo.doc.createElement("div");if(dojo.dnd.manager().source.current){_7a.innerHTML=String(_78);var _7b=dojo.byId(dojo.dnd.manager().source.current.id);dojo.style(_7a,{width:_7b.offsetWidth+"px",opacity:0.5});}return {node:_7a,data:_78,type:[ibmCfg.controllers.dnd.DND_TYPE]};}else{if(dojo.isOpera){var _7a=dojo.byId(ibmCfg.controllers.dnd.currentNode.id).parentNode;}else{var _7a=dojo.query("[id~="+ibmCfg.controllers.dnd.currentNode.id+"]")[0];}if(_7a){var _7c=ibmCfg.controllers.dnd.dndSources[com.ibm.pb.layout.LayoutParser.extractID(_7a.parentNode)];if(_7c){var t=_7c.getItem(_7a.id);_7c.delItem(_7a.id);_7c.selection={};return {node:_7a,data:t.data,type:t.type};}}return {node:dojo.create("div"),data:_78,type:ibmCfg.controllers.dnd.DND_TYPE};}};com.ibm.pb.dnd.layout.LayoutRowSource.withHandles=true;}if(!dojo._hasResource["com.ibm.pb.dnd.layout.ShelfSource"]){dojo._hasResource["com.ibm.pb.dnd.layout.ShelfSource"]=true;dojo.provide("com.ibm.pb.dnd.layout.ShelfSource");dojo.declare("com.ibm.pb.dnd.layout.ShelfSource",[com.ibm.pb.dnd.layout.LayoutSource],{_markTargetAnchor:function(_7d){return false;},_unmarkTargetAnchor:function(){return false;}});com.ibm.pb.dnd.layout.ShelfSource.creator=function(_7e,_7f){var _80=dojo.create("div");if(_7f=="avatar"){var _81=dojo.create("div",{className:"utb lotusui30",style:{borderTop:0}});dojo.attr(_80,{innerHTML:String(_7e),style:{width:dojo.byId(dojo.dnd.manager().source.current.id).offsetWidth+"px"},className:"wpthemeDndAvatar lotusPaletteWidget dojoDndItem dojoDndHandle dojoDndItemAnchor",role:"gridcell"});_81.appendChild(_80);return {node:_81,data:_7e,type:[ibmCfg.controllers.dnd.SHELF_TYPE]};}else{return {node:_80,data:_7e,type:[ibmCfg.controllers.dnd.SHELF_TYPE]};}};}if(!dojo._hasResource["com.ibm.dnd.ModeledSource"]){dojo._hasResource["com.ibm.dnd.ModeledSource"]=true;dojo.provide("com.ibm.dnd.ModeledSource");if(!dojo.isCopyKey){dojo.isCopyKey=dojo.dnd.getCopyKeyState;}dojo.declare("com.ibm.dnd.ModeledSource",com.ibm.dnd.TunedLayoutSource,{managerOverrides:{OFFSET_X:1,OFFSET_Y:1,makeAvatar:function(){return new com.ibm.dnd.PageAvatar(this);}},model:null,item:null,isBidi:false,constructor:function(_82,_83){if(this.withHandles){dojo.addClass(_82,"dndHasHandles");}if(typeof (ibmCfg)!="undefined"&&ibmCfg.themeConfig){this.isBidi=ibmCfg.themeConfig.isRTL;}else{if(typeof (ibmConfig)!="undefined"){this.isBidi=ibmConfig.isBidi;}else{if(typeof (ibmPortalConfig)!="undefined"){this.isBidi=ibmPortalConfig.isRTL;}}}},onDrop:function(_84,_85,_86){var _87=dijit.getEnclosingWidget(this.current),_88=null,_89=null;if(dojo.hasClass(this.current,"dojoDndItemChild")){_89=_87.item;}else{_89=_87.getParent().item;if(this.current){var _8a=(this.isBidi&&this.horizontal)?"dojoDndItemBefore":"dojoDndItemAfter";if(dojo.hasClass(this.current,_8a)){_87=_87.getNextSibling();while(_87&&dojo.hasClass(_87.domNode,"dojoDndItemAnchor")){_87=_87.getNextSibling();}}if(_87){_88=_87.item;}}}setTimeout(dojo.hitch(this,function(){dojo.forEach(_85,function(_8b){var _8c=dijit.getEnclosingWidget(_8b),_8d=_8c.item,_8e=_8c.getParent().item;if(this.checkModelAcceptance(_8d,_89)){this.model.pasteItem(_8d,_8e,_89,_86,_88);}},this);}),50);},checkModelAcceptance:function(_8f,_90){return true;},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}dojo.dnd.Source.superclass.onMouseMove.call(this,e);var m=dojo.dnd.manager();if(this.isDragging){dojo.forEach(this.draggingItems,function(_91){if(_91.popup.isShowingNow){dijit.popup.close(_91.popup);this._removeItemClass(this.current,"Over");dojo.removeClass(this.current,"dijitMenuItemHover");}},this);var _92=false;if(this.current){if(!this.targetBox||this.targetAnchor!=this.current){this.targetBox={xy:dojo.coords(this.current,true),w:this.current.offsetWidth,h:this.current.offsetHeight};}if(this.horizontal){if((e.pageX-this.targetBox.xy.x)<(this.targetBox.w*0.25)){_92="Before";}else{if((e.pageX-this.targetBox.xy.x)>(this.targetBox.w*0.75)){_92="After";}else{_92="Child";}}}else{if((e.pageY-this.targetBox.xy.y)<(this.targetBox.h*0.25)){_92="Before";}else{if((e.pageY-this.targetBox.xy.y)>(this.targetBox.h*0.75)){_92="After";}else{_92="Child";}}}}if(this.current!=this.targetAnchor||_92!=this.before){this._markTargetAnchor(_92);m.canDrop(!this.current||m.source!=this||!(this.current.id in this.selection));}}else{if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>this.delay||Math.abs(e.pageY-this._lastY)>this.delay)){var _93=this.getSelectedNodes();if(_93.length){m.startDrag(this,_93,this.copyState(dojo.isCopyKey(e),true));}}}},_markTargetAnchor:function(_94){if(this.current==this.targetAnchor&&this.before==_94){return;}if(this.targetAnchor){this._removeItemClass(this.targetAnchor,this.before);}this.targetAnchor=this.current;this.targetBox=null;this.before=_94;if(this.targetAnchor){this._addItemClass(this.targetAnchor,this.before);}},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor,this.before);this.targetAnchor=null;this.targetBox=null;this.before=true;},onDndStart:function(_95,_96,_97){this.draggingItems=[];dojo.forEach(_96,function(_98){var _99=dijit.getEnclosingWidget(_98);if(_99&&_99.popup){this.draggingItems.push(_99);this._removeItemClass(_99.popup,"Over");dijit.popup.close(_99.popup);}},this);this.inherited(arguments);dojo.addClass(this.node,"isDragging");},onDndCancel:function(){this.inherited(arguments);dojo.removeClass(this.node,"isDragging");},destroy:function(){this.inherited(arguments);this.model=this.node=this.current=this.item=null;}});}if(!dojo._hasResource["com.ibm.pb.dnd.ControlledModeledSource"]){dojo._hasResource["com.ibm.pb.dnd.ControlledModeledSource"]=true;dojo.provide("com.ibm.pb.dnd.ControlledModeledSource");dojo.declare("com.ibm.pb.dnd.ControlledModeledSource",com.ibm.dnd.ModeledSource,{constructor:function(_9a,_9b){this.inherited(arguments);},onDrop:function(_9c,_9d,_9e){this.inherited(arguments);},checkModelAcceptance:function(_9f,_a0){if(typeof (ibmCfg.portalConfig)=="undefined"){return true;}var _a1=ibmCfg.controllers.navigation.getTreeModel(),_a2=this._isPrivate(_9f),_a3=this._isPrivate(_a0),_a4=dojo.i18n.getLocalization("com.ibm.bundles","NavWidget");if(_a2&&_a3){return true;}else{if(!_a2&&_a3){var _a5=new com.ibm.widgets.StatusMessage("error",_a4["nav_invalid_drop_error"],dojo.i18n.getLocalization("com.ibm.bundles","Theme")["private_public_modelError"]);dojo.publish("/portal/status",[{message:_a5,uid:"ibmStatusBox"}]);return false;}else{var _a6=_a0.hasRole("Privileged User");var _a7=_a0.hasRole("Manager");var _a8=_a0.hasRole("Editor");if((_a2&&!_a6)||(!_a2&&(!_a7||!_a8))){var _a5=new com.ibm.widgets.StatusMessage("error",_a4["nav_invalid_drop_error"],nlsBundle=_a4["nav_invalid_drop_msg"]);dojo.publish("/portal/status",[{message:_a5,uid:"ibmStatusBox"}]);return false;}else{return true;}}}},_isPrivate:function(_a9){var _aa=false;if(_a9){var xml=_a9.getXml(),_ab="./atom:content/*/ac:allowed-access[@ac:private='true']";_aa=com.ibm.mashups.enabler.xml.XPath.evaluateBoolean(_ab,xml,{app:"http://www.w3.org/2007/app",atom:"http://www.w3.org/2005/Atom",ac:"http://www.ibm.com/xmlns/prod/lotus/access-control/v1.0"});}return _aa;}});} com.ibm.pb.io.RESOURCE_CACHE.set("/sabc/mccbuilder.v3001/widget-catalog/displayHelper.xml", "<!-- ***************************************************************** -->\n<!-- -->\n<!-- Licensed Materials - Property of IBM -->\n<!-- -->\n<!-- 5724-U69 -->\n<!-- -->\n<!-- Copyright IBM Corp. 2012 All Rights Reserved. -->\n<!-- -->\n<!-- US Government Users Restricted Rights - Use, duplication or -->\n<!-- disclosure restricted by GSA ADP Schedule Contract with -->\n<!-- IBM Corp. -->\n<!-- -->\n<!-- ***************************************************************** -->\n\n<iw:iwidget name=\"displayHelper\" xmlns:iw=\"http://www.ibm.com/xmlns/prod/iWidget\" iScope=\"com.ibm.mm.builder.systemwidget.displayHelper\" allowInstanceContent=\"true\" supportedModes=\"view edit\" mode=\"view\" lang=\"en\">\n\n<!--iw:resource uri=\"../css/customDialog.css\"/>\n<iw:resource uri=\"../css/customDialog_rtl.css\"/>\n<iw:resource uri=\"../css/confirmDialog.css\"/>\n<iw:resource uri=\"../css/confirmDialog_rtl.css\"/>\n<iw:resource uri=\"../css/wiringGraph.css\"/>\n<iw:resource uri=\"../css/wiringGraph_rtl.css\"/-->\n\n<iw:itemSet id=\"attributes\" >\n <iw:item id=\"version\" value=\"1.0.0.0.0\"/>\n</iw:itemSet>\n\t\n<iw:event id=\"com.ibm.mashups.builder.displayInMashupDialog\" handled=\"true\" onEvent=\"handleDisplayInDialog\" eventDescName=\"desc_displayInDialog\"/>\n<iw:eventDescription id=\"desc_displayInDialog\" payloadType=\"JSON\" title=\"Widget and Event\" description=\"Receives a widget ID, iEvent Name and payload for that event from another widget and displays the widget in a model dialog\" lang=\"en\">\n\t<!--@displayHelper.ondisplayHelperDisplay@-->\n</iw:eventDescription>\n\n<iw:event id=\"com.ibm.mashups.builder.closeMashupDialog\" handled=\"true\" onEvent=\"onCloseDialog\" eventDescName=\"desc_closeDialog\"/>\n<iw:eventDescription id=\"desc_closeDialog\" payloadType=\"text\" description=\"\" lang=\"en\">\n\t<iw:alt discription=\"\" lang=\"de\"/>\n\t<iw:alt discription=\"\" lang=\"cn\"/>\n</iw:eventDescription>\n\n<iw:resource uri=\"displayHelper.js\" skipLoad=\"dojo.getObject(\u0027com.ibm.mm.builder.systemwidget.displayHelper\u0027) != null\" />\n\n<iw:content mode=\"view\">\n\t<![CDATA[\n\t]]>\n</iw:content>\n</iw:iwidget>\n"); dojo.declare("com.ibm.mm.builder.systemwidget.displayHelper",null,{dialogContent:null,uniDialog:null,widgetDialogMap:null,idMap:null,onLoad:function(){ this.widgetDialogMap={}; this.idMap=this.iContext.getiWidgetAttributes(); this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.systemwidget.displayHelper"); },onCloseDialog:function(_1){ var _2=_1.payload; if(_2){ this.closeDialog(_2); } },closeDialog:function(_3){ if(this.widgetDialogMap[_3]){ this.widgetDialogMap[_3].hide(); } },displayWidgetInDialog:function(_4,_5,_6,_7,_8,_9,_a){ if(_4===null){ return; } var _b=false; var _c=this.idMap.getItemValue(_4); if(!_c){ if(typeof _a!="undefined"&&_a==null){ this.LOGGER.severe("displayWidgetInDialog","Can not find the widget in theme to display"); } return; } if(!this.widgetDialogMap[_c]){ var _d=document.createElement("div"); _d.appendChild(dojo.byId(_c)); var _e=null; if(_7!==null){ if(!_7.id){ _7.id=_c+"_uniDialog"; } _e=new com.ibm.mm.builder.widget.CustomDialog(_7,_d); }else{ _e=new com.ibm.mm.builder.widget.CustomDialog({id:_c+"_uniDialog"},_d); } dojo.removeClass(dojo.byId(_c),"mumHiddenWidget"); if(dojo.isIE&&dojo.isIE==6){ dojo.byId(_c).style.display=""; } this.widgetDialogMap[_c]=_e; _b=true; }else{ if(_8===true){ if(_7.title){ this.widgetDialogMap[_c].setTitle(_7.title); } } } var _f=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_c); var cb=function(_10,_11,_12,id,_13,_14){ var _15=_11.widgetDialogMap[id]; _10.iScope.iContext.dialogContainer=_15; if(_13){ if(_9){ var _16={hubWidgetPayload:_14}; com.ibm.mashups.services.ServiceManager.getService("eventService").fireEvent(id,_13,_16); }else{ com.ibm.mashups.services.ServiceManager.getService("eventService").fireEvent(id,_13,_14); } } com.ibm.mm.builder.utils.htmlUtil.truncateAllChildNodesText(dojo.byId(_12)); if(_b&&_10.iScope.onDialogResize){ dojo.connect(_15,"onResize",_10.iScope,"onDialogResize"); } try{ _11.widgetDialogMap[id].show(); } catch(e){ } }; if(_f.isLoaded()===false){ var me=this; com.ibm.mashups.services.ServiceManager.getService("eventService").subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_c,null,dojo.partial(cb,_f,me,_4,_c,_5,_6)); }else{ cb(_f,this,_4,_c,_5,_6); } },handleDisplayInDialog:function(_17){ var _18=_17.payload; var _19=_18.widgetTypeId; var _1a=_18.eventName; var _1b=_18.eventPayload; var _1c=_18.dialogParam; var _1d=_18.requestRefresh; var _1e=_18.isHubWidget; var _1f=_18.allowMultiple; this.displayWidgetInDialog(_19,_1a,_1b,_1c,_1d,_1e,_1f); }}); com.ibm.pb.io.RESOURCE_CACHE.set("/sabc/mccbuilder.v3001/widget-catalog/accessControl.xml", "<!-- ***************************************************************** -->\n<!-- -->\n<!-- Licensed Materials - Property of IBM -->\n<!-- -->\n<!-- 5724-U69 -->\n<!-- -->\n<!-- Copyright IBM Corp. 2012 All Rights Reserved. -->\n<!-- -->\n<!-- US Government Users Restricted Rights - Use, duplication or -->\n<!-- disclosure restricted by GSA ADP Schedule Contract with -->\n<!-- IBM Corp. -->\n<!-- -->\n<!-- ***************************************************************** -->\n\n<!--author: Marshall (shiwcsdl@cn.ibm.com); iWidget spec v1 -->\r\n<iw:iwidget name=\"accessControl\" xmlns:iw=\"http://www.ibm.com/xmlns/prod/iWidget\" iScope=\"com.ibm.mm.builder.accessControl\" supportedModes=\"view\" mode=\"view\">\r\n\t<iw:resource uri=\"accessControl.js\"/>\r\n\t<!--iw:resource uri=\"../css/accessControl.css\"/>\r\n\t<iw:resource uri=\"../css/accessControl_rtl.css\"/-->\r\n <iw:itemSet id=\"attributes\">\r\n <iw:item id=\"version\" value=\"1.0.0.0.0\"/>\r\n </iw:itemSet>\t\r\n \r\n\t<iw:event id=\"com.ibm.mashups.builder.pageSwitched\" handled=\"true\" onEvent=\"onSwitchPage\" eventDescName=\"desc_switchPage\"/>\r\n\t<iw:eventDescription id=\"desc_switchPage\" payloadType=\"text\" description=\"switch to given page\" lang=\"en\" />\r\n\t\r\n\t<iw:event id=\"com.ibm.mashups.builder.sharePage\" handled=\"true\" onEvent=\"handleSharePage\" eventDescName=\"desc_onSharePage\"/>\r\n\t<iw:eventDescription id=\"desc_onSharePage\" payloadType=\"text\" title=\"Page ID\" description=\"Receives a page ID, generate the share page UI\" lang=\"en\">\r\n\t\t<!--@sharePageInterface.com.ibm.mashups.builder.sharePage@-->\r\n\t</iw:eventDescription>\r\n\t<iw:event id=\"com.ibm.mashups.builder.shareSpace\" handled=\"true\" onEvent=\"handleShareSpace\" eventDescName=\"desc_onShareSpace\"/>\r\n\t<iw:eventDescription id=\"desc_onShareSpace\" payloadType=\"text\" title=\"Space ID\" description=\"Receives a space ID, generate the share space UI\" lang=\"en\">\r\n\t</iw:eventDescription>\r\n\t\r\n\t<iw:content mode=\"view\">\r\n\t<![CDATA[\r\n\t<div class=\"accessControlRootDiv\">\r\n\t <div class=\"accessControlBottomDiv\" id=\"_IWID_bottomDiv\">\r\n\t\t\t<div>\r\n\t\t <div style=\"float:right;display:none;\">\r\n\t\t <div class=\"accessControlApplyOptionsDiv\" style=\"display:none;position:absolute;\"></div>\r\n\t\t <input type=\"text\" size=\"30\" id=\"_IWID_apply\" readonly=\"true\" value=\"Apply to all descentdent pages\" title=\"ApplyInput\" class=\"ApplyInput\" align=\"left\"/><input class=\"lotusFormButtonShort\" type=\"button\" value=\"Apply\" onclick=\"iContext.iScope().applyACL()\" accesskey=\"A\"/>\r\n\t\t </div>\r\n\t\t <div class=\"accessControlDesp\"> </div>\r\n\t\t <div class=\"accessControlSearchBtnDiv\">\r\n\t\t <table cellspacing=\"2\" role=\"presentation\">\r\n\t\t <tr>\r\n\t\t <td style=\"cursor:pointer\">\r\n\t\t <input role=\"button\" aria-haspopup=\"true\" class=\"accessSearch\" type=\"image\" id=\"_IWID_showSearchScope\" title=\"/images/search_scope_control_gray.png\"/>\r\n\t\t </td>\r\n\t\t <td>\r\n\t\t <input role=\"search\" type=\"text\" size=\"25\" name=\"User Search\" id=\"_IWID_search\" value=\"Search User\" class=\"initACLSearchInput\"/>\r\n\t\t </td>\r\n\t\t <td style=\"cursor:pointer\">\r\n\t\t <input role=\"button\" class=\"accessSearch\" type=\"image\" id=\"_IWID_showResultImg\" title=\"/images/search_button_gray.png\" onclick=\"JavaScript:iContext.iScope().showSearchResult();\"/>\r\n\t\t </td>\r\n\t\t </tr>\r\n\t\t </table>\r\n\t\t </div>\r\n\t\t\t</div>\r\n\t\t\t<div id=\"_IWID_messageBox\"></div>\r\n\t\t\t<div class=\"accessControlShadowBox\">\r\n\t\t\t\t<div class=\"accessControlContent\">\r\n\t\t\t <div class=\"accessControlListDiv\">\r\n\t\t\t <div class=\"accessControlSearchListDiv\">\r\n\t\t\t <div class=\"searchResultHeaderMiddle\"></div>\r\n\t\t\t <!--id acl_search_list_div is required by SVT automation test-->\r\n\t\t\t <div id=\"acl_search_list_div\" role=\"region\" aria-label=\"search list\" class=\"searchList\" onBlur=\"javascript:dojo.addClass(this,\u0027overList\u0027);\" onfocus=\"javascript:dojo.addClass(this,\u0027overList\u0027);\" onmouseover=\"javascript:dojo.addClass(this,\u0027overList\u0027);\" onmouseout=\"javascript:dojo.removeClass(this,\u0027overList\u0027);\">\r\n\t\t\t <div class=\"accessControlSearchListUpDiv\">\r\n\t\t\t <div class=\"accessControlPageUpDiv\" onclick=\"JavaScript:iContext.iScope().pageUp(\u0027search\u0027);\"></div>\r\n\t\t\t <div class=\"accessControlJumpUpDiv\" onclick=\"JavaScript:iContext.iScope().jumpUp(\u0027search\u0027);\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t\t\t\t\t\t<div class=\"searchIndicatorContainer\">\r\n\t\t\t\t\t\t\t\t\t<div class=\"searchIndicatorImg\"></div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"searchIndicatorText\"></div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<div class=\"accessControlNoResultMsg\" id=\"_IWID_search_msg\"></div>\r\n\t\t\t <div class=\"accessControlSearchList\">\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t <div class=\"accessControlSearchListDownDiv\">\r\n\t\t\t <div class=\"accessControlPageDownDiv\" onclick=\"JavaScript:iContext.iScope().pageDown(\u0027search\u0027);\"></div>\r\n\t\t\t <div class=\"accessControlJumpDownDiv\" onclick=\"JavaScript:iContext.iScope().jumpDown(\u0027search\u0027);\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t </div>\r\n\t\t\t </div>\r\n\t\t\t <div class=\"accessControlViewListDiv\">\r\n\t\t\t <div onclick=\"JavaScript:iContext.iScope().addToView();\" role=\"button\" aria-labelledby=\"_IWID_addToViewLabel\" class=\"addToView\" onkeypress=\"JavaScript:iContext.iScope().addToViewClick(event); \" tabindex=0>\r\n\t\t\t <div class=\"addBtnA11y\" style=\"display:none\">\r\n\t\t\t <input class=\"addToViewBtnA11y_button\" type=\"button\" tabindex=-1/> </div>\r\n\t\t\t <div role=\"button\" class=\"addToViewBtnMiddle\" id=\"_IWID_addToViewLabel\"></div>\r\n\t\t\t </div>\r\n\t\t\t <!--id acl_view_list_div is required by SVT automation test-->\r\n\t\t\t <div id=\"acl_view_list_div\" class=\"viewList\" role=\"region\" aria-label=\"view list\" onBlur=\"javascript:dojo.removeClass(this,\u0027overList\u0027);\" onfocus=\"javascript:dojo.addClass(this,\u0027overList\u0027);\" onmouseover=\"javascript:dojo.addClass(this,\u0027overList\u0027);\" onmouseout=\"javascript:dojo.removeClass(this,\u0027overList\u0027);\">\r\n\t\t\t <div class=\"accessControlViewListUpDiv\">\r\n\t\t\t <div class=\"accessControlPageUpDiv\" onclick=\"JavaScript:iContext.iScope().pageUp(\u0027view\u0027);\"></div>\r\n\t\t\t <div class=\"accessControlJumpUpDiv\" onclick=\"JavaScript:iContext.iScope().jumpUp(\u0027view\u0027);\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t <div class=\"accessControlViewList\"></div>\r\n\t\t\t <div class=\"accessControlViewListDownDiv\">\r\n\t\t\t <div class=\"accessControlPageDownDiv\" onclick=\"JavaScript:iContext.iScope().pageDown(\u0027view\u0027);\"></div>\r\n\t\t\t <div class=\"accessControlJumpDownDiv\" onclick=\"JavaScript:iContext.iScope().jumpDown(\u0027view\u0027);\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t </div>\r\n\t\t\t </div>\r\n\t\t\t <div class=\"accessControlPersonalizeListDiv\" style=\"display:none\">\r\n\t\t\t <div onclick=\"JavaScript:iContext.iScope().addToPersonalize();\" class=\"addToPersonalize\">\r\n\t\t\t <div class=\"addToPersonalizeBtnLeft\"></div>\r\n\t\t\t <div class=\"addToPersonalizeBtnMiddle\"></div>\r\n\t\t\t <div class=\"addToPersonalizeBtnRight\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t <!--id acl_personalize_list_div is required by SVT automation test-->\r\n\t\t\t <div id=\"acl_personalize_list_div\" role=\"region\" aria-label=\"personalize list\" class=\"personalizeList\" onBlur=\"javascript:dojo.removeClass(this,\u0027overList\u0027);\" onfocus=\"javascript:dojo.addClass(this,\u0027overList\u0027);\" onmouseover=\"javascript:dojo.addClass(this,\u0027overList\u0027);\" onmouseout=\"javascript:dojo.removeClass(this,\u0027overList\u0027);\">\r\n\t\t\t <div class=\"accessControlPersonalizeListUpDiv\">\r\n\t\t\t <div class=\"accessControlPageUpDiv\" onclick=\"JavaScript:iContext.iScope().pageUp(\u0027personalize\u0027);\"></div>\r\n\t\t\t <div class=\"accessControlJumpUpDiv\" onclick=\"JavaScript:iContext.iScope().jumpUp(\u0027personalize\u0027);\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t <div class=\"accessControlPersonalizeList\" align=\"left\"></div>\r\n\t\t\t <div class=\"accessControlPersonalizeListDownDiv\">\r\n\t\t\t <div class=\"accessControlPageDownDiv\" onclick=\"JavaScript:iContext.iScope().pageDown(\u0027personalize\u0027);\"></div>\r\n\t\t\t <div class=\"accessControlJumpDownDiv\" onclick=\"JavaScript:iContext.iScope().jumpDown(\u0027personalize\u0027);\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t </div>\r\n\t\t\t </div>\r\n\t\t\t <div class=\"accessControlEditListDiv\">\r\n\t\t\t <div onclick=\"JavaScript:iContext.iScope().addToEdit();\" role=\"button\" aria-labelledby=\"_IWID_addToEditLabel\" class=\"addToEdit\" onkeypress=\"JavaScript:iContext.iScope().addToEditClick(event);\" tabindex=0>\r\n\t\t\t <div class=\"addBtnA11y\">\r\n\t\t\t <input class=\"addToEditBtnA11y_button\" type=\"button\" tabindex=-1/> </div>\r\n\t\t\t <div class=\"addToEditBtnMiddle\" role=\"button\" id=\"_IWID_addToEditLabel\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t <!--id acl_edit_list_div is required by SVT automation test-->\r\n\t\t\t <div id=\"acl_edit_list_div\" role=\"region\" aria-label=\"edit list\" class=\"editList\" onBlur=\"javascript:dojo.removeClass(this,\u0027overList\u0027);\" onfocus=\"javascript:dojo.addClass(this,\u0027overList\u0027);\" onmouseover=\"javascript:dojo.addClass(this,\u0027overList\u0027);\" onmouseout=\"javascript:dojo.removeClass(this,\u0027overList\u0027);\">\r\n\t\t\t <div class=\"accessControlEditListUpDiv\">\r\n\t\t\t <div class=\"accessControlPageUpDiv\" onclick=\"JavaScript:iContext.iScope().pageUp(\u0027edit\u0027);\"></div>\r\n\t\t\t <div class=\"accessControlJumpUpDiv\" onclick=\"JavaScript:iContext.iScope().jumpUp(\u0027edit\u0027);\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t <div class=\"accessControlEditList\"></div>\r\n\t\t\t <div class=\"accessControlEditListDownDiv\">\r\n\t\t\t <div class=\"accessControlPageDownDiv\" onclick=\"JavaScript:iContext.iScope().pageDown(\u0027edit\u0027);\"></div>\r\n\t\t\t <div class=\"accessControlJumpDownDiv\" onclick=\"JavaScript:iContext.iScope().jumpDown(\u0027edit\u0027);\"></div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t </div>\r\n\t\t\t </div>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t <div class=\"accessControlRemoveBtnDiv\">\r\n\t\t\t <input class=\"lotusFormButtonLong accessControlRemove\" style=\"font-weight:normal;font-size:13px;margin:0px;\" type=\"button\" onclick=\"iContext.iScope().removeAllSelectedEntries()\" onfocus=\"javascript:dojo.addClass(this,\u0027lotusFormButtonLongHover\u0027);\" onmouseover=\"javascript:dojo.addClass(this,\u0027lotusFormButtonLongHover\u0027);\" onmouseout=\"javascript:dojo.removeClass(this,\u0027lotusFormButtonLongHover\u0027);\" onBlur=\"javascript:dojo.removeClass(this,\u0027lotusFormButtonLongHover\u0027);\" accesskey=\"R\"/>\r\n\t\t\t <div class=\"clear\"></div>\r\n\t\t\t </div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!--shadow-->\r\n\t\t\t\t<div class=\"accessControlShadow insetTopLeftCorner filterImg\"></div>\r\n\t\t <div class=\"accessControlShadow insetTopMiddle filterImg\"></div>\r\n\t\t <div class=\"accessControlShadow insetTopRightCorner filterImg\"></div>\r\n\t\t <div class=\"accessControlShadow insetLeftMiddle filterImg\"></div>\r\n\t\t <div class=\"accessControlShadow insetRightMiddle filterImg\"></div>\r\n\t\t <div class=\"accessControlShadow insetLeftBottomCorner filterImg\"></div>\r\n\t\t <div class=\"accessControlShadow insetBottomMiddle filterImg\"></div>\r\n\t\t <div class=\"accessControlShadow insetRightBottomCorner filterImg\"></div>\r\n\t\t\t</div>\r\n\t </div>\r\n\t <div dojoType=\"com.ibm.mm.builder.dialog.DialogFooter\" IWID=\"_IWID_\" saveAccessKey=\"S\" saveClass=\"lotusFormButton common_save accessControlSave\" onSave=\"iContext.iScope().saveACL(); return false;\" onCancel=\"iContext.iScope().cancelACL(); return false;\"/><!--\r\n\t <div class=\"accessControlBottomBtnDiv\">\r\n\t <a class=\"common_cancel\" onclick=\"iContext.iScope().cancelACL()\" href=\"javascript:void(0)\"></a>\r\n\t <input class=\"lotusFormButton accessControlSave\" type=\"button\" onkeypress=\"iContext.iScope().saveACL()\" onclick=\"iContext.iScope().saveACL()\" accesskey=\"S\"/>\r\n\t </div>\r\n\t -->\r\n\t</div>\r\n\t]]>\r\n\t</iw:content>\r\n</iw:iwidget>\r\n"); dojo.require("com.ibm.mashups.enabler.model.Factory"); dojo.require("com.ibm.mm.builder.utils.acModelUtil"); dojo.require("com.ibm.mm.builder.dnd.ACLSource"); dojo.require("com.ibm.mm.builder.dialog.ACLReassignDialog"); dojo.require("com.ibm.mm.builder.widget.OpenSearchDropdownMenu"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("com.ibm.mm.builder.dialog.DialogFooter"); dojo.declare("com.ibm.mm.builder.accessControl",null,{iconImageUrl:builderConfig.builderPath+"/images/sharepage/share_heading_icon.png",pageUpImageUrl:builderConfig.builderPath+"/images/sharepage/page_up_control.png",pageDownImageUrl:builderConfig.builderPath+"/images/sharepage/page_down_control.png",jumpUpImageUrl:builderConfig.builderPath+"/images/sharepage/jump_to_top_control.png",jumpDownImageUrl:builderConfig.builderPath+"/images/sharepage/jump_to_bottom_control.png",disabledPageUpImageUrl:builderConfig.builderPath+"/images/sharepage/page_up_control_disabled.png",disabledPageDownImageUrl:builderConfig.builderPath+"/images/sharepage/page_down_control_disabled.png",disabledJumpUpImageUrl:builderConfig.builderPath+"/images/sharepage/jump_to_top_control_disabled.png",disabledJumpDownImageUrl:builderConfig.builderPath+"/images/sharepage/jump_to_bottom_control_disabled.png",userModel:null,accessLevel:null,bottomDivId:null,searchInputId:null,filterInputId:null,viewList:null,personalizeList:null,editList:null,searchUsers:null,searchSource:null,highlightedColor:"#FFFFFF",selectedColor:"#0f4c9b",itemColor:"#252525",searchOption:"user",isOddOptionCick:false,searchOptionDiv:null,pageId:null,spaceId:null,searchDropDownMenu:null,searchType:com.ibm.mm.builder.ACLopenSearchType,tMenu:null,initialKeyword:"",_inPersonalSpace:true,_viewBlockCheckbox:null,_editBlockCheckbox:null,_pageSwitched:true,_currentContentPageID:null,_shareType:null,_shareTypeId:null,SHARE_PAGE:1,SHARE_SPACE:2,MAX_LEN:160,messageBox:null,cws:com.ibm.mm.builder.coreWidgetsStrings,constructor:function(){ this.acModelUtil=com.ibm.mm.builder.utils.acModelUtil; this.searchUsers=[]; dojo.subscribe(com.ibm.mm.builder.eventTopics.UpdateViewPageControl,this,"updateViewPageControl"); dojo.subscribe(com.ibm.mm.builder.eventTopics.UpdateEditPageControl,this,"updateEditPageControl"); dojo.subscribe(com.ibm.mm.builder.eventTopics.UpdateSearchPageControl,this,"updateSearchPageControl"); dojo.subscribe(com.ibm.mm.builder.eventTopics.UpdateAllPageControl,this,"updateAllPageControl"); dojo.subscribe(com.ibm.mm.builder.eventTopics.AclDialogHide,this,"onACLDialogHide"); this._connects=[]; this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.accessControl"); },onACLDialogHide:function(){ },handleSharePage:function(_1){ var _2=_1.payload; if(!_2){ return; } this.pageId=_2; this._shareType=this.SHARE_PAGE; this._shareTypeId=_2; this._currentContentPageID=_2; this._inPersonalSpace=!com.ibm.mm.builder.utils.spaceUtil.getSpaceIdByPageId(_2); this._pageSwitched=false; this.initContent(_2); },handleShareSpace:function(_3){ var _4=_3.payload; if(_4){ this._shareType=this.SHARE_SPACE; this._shareTypeId=_4; this.spaceId=_4; this.initContent(_4); } },onSwitchPage:function(_5){ var _6=_5.payload; if(!_6){ return; } this._pageSwitched=(this._currentContentPageID!=_6); var _7=com.ibm.mm.builder.utils.htmlUtil; if(this.viewListNode){ _7[((!this._pageSwitched)?"show":"hide")+"Nodes"](this.viewListNode.childNodes); } if(this.editListNode){ _7[((!this._pageSwitched)?"show":"hide")+"Nodes"](this.editListNode.childNodes); } },initContent:function(){ if(this.viewListNode){ this.viewListNode.innerHTML=""; } if(this.editListNode){ this.editListNode.innerHTML=""; } var ac=this; var _8=this.iContext.getRootElement(); this._hideMessage(); this._hideMessageBox(); if(this.searchType!="user"){ this.searchType="user"; com.ibm.mm.builder.ACLopenSearchType="user"; for(var i=0,_9=this.tMenu.entrys.length;i<_9;i++){ var _a=this.tMenu.entrys[i]; if(com.ibm.mm.builder.ACLopenSearchType==_a.type){ this.tMenu.setCurrentSearchType(_a.domNode); this._currentSearchType=_a; } } } var _b=dojo.byId(this.searchInputId); if(dojo.hasClass(_b,"ACLSearchInput")){ dojo.removeClass(_b,"ACLSearchInput"); dojo.addClass(_b,"initACLSearchInput"); } _b.value=com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_USER; dojo.attr(_b,"aria-label",com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_TEXT); var _c=dojo.byId(this.bottomDivId); var _d=dojo.query(".aclNoSearchDiv",_c); if(builderConfig.isBidi&&dojo.isIE===6){ _d[0].style.width="500px"; } var _e=dojo.query(".accessControlSearchList",_c); _e[0].innerHTML=""; this.searchSource=this._createSource(this.searchSource,[_e[0],["none"],this,"aclSearch",15,0]); dojo.publish(com.ibm.mm.builder.eventTopics.UpdateSearchPageControl); this.viewList=[]; this.personalizeList=[]; this.editList=[]; this.initACLData(); var _f=dojo.query(".accessControlViewList",_c)[0]; this.viewListNode=_f; _f.innerHTML=""; var _10=15; if(this._shareType==this.SHARE_PAGE&&!this._inPersonalSpace){ _10=_10-2; } com.ibm.mm.builder.dnd.viewSource=this._createSource(com.ibm.mm.builder.dnd.viewSource,[_f,["acluser"],this,"aclView",_10,0]); this._addItem(com.ibm.mm.builder.dnd.viewSource,_f,this.viewList,"aclView"); var _11=dojo.query(".accessControlEditList",_c)[0]; this.editListNode=_11; _11.innerHTML=""; com.ibm.mm.builder.dnd.editSource=this._createSource(com.ibm.mm.builder.dnd.editSource,[_11,["acluser"],this,"aclEdit",_10,0]); this._addItem(com.ibm.mm.builder.dnd.editSource,_11,this.editList,"aclEdit"); if(this._shareType==this.SHARE_PAGE&&!this._inPersonalSpace){ if(this._viewBlockCheckbox&&this._editBlockCheckbox){ this._viewBlockCheckbox.domNode.style.display=""; this._editBlockCheckbox.domNode.style.display=""; }else{ this._viewBlockCheckbox=new com.ibm.mm.builder.widget.includeBox({type:"view",includeContent:com.ibm.mm.builder.coreWidgetsStrings.I_ACL_INCLUDE_VIEWER}); var _12=dojo.query(".accessControlViewListDiv",_c)[0]; var _13=dojo.query(".viewList",_12)[0]; _12.insertBefore(this._viewBlockCheckbox.domNode,_13); this._editBlockCheckbox=new com.ibm.mm.builder.widget.includeBox({type:"edit",includeContent:com.ibm.mm.builder.coreWidgetsStrings.I_ACL_INCLUDE_EDITOR}); var _14=dojo.query(".accessControlEditListDiv",_c)[0]; var _15=dojo.query(".editList",_14)[0]; _14.insertBefore(this._editBlockCheckbox.domNode,_15); } this._viewBlockCheckbox.setCheck(!this.acModel.isInheritanceBlock(com.ibm.mashups.enabler.ac.RoleType.USER)); this._editBlockCheckbox.setCheck(!this.acModel.isInheritanceBlock(com.ibm.mashups.enabler.ac.RoleType.EDITOR)); }else{ if(this._viewBlockCheckbox){ this._viewBlockCheckbox.domNode.style.display="none"; } if(this._editBlockCheckbox){ this._editBlockCheckbox.domNode.style.display="none"; } } setTimeout(dojo.hitch(this,function(){ dojo.forEach([{id:"acl_search_list_div",className:".accessControlSearchList"},{id:"acl_view_list_div",className:".accessControlViewList"},{id:"acl_edit_list_div",className:".accessControlEditList"}],function(obj){ var _16=dojo.byId(obj.id); this.setListHeight(_16); this.setListHeight(dojo.query(obj.className,_16)[0]); },this); }),50); com.ibm.mm.builder.utils.htmlUtil.truncateAllChildNodesText(_8); dojo.publish(com.ibm.mm.builder.eventTopics.UpdateViewPageControl); dojo.publish(com.ibm.mm.builder.eventTopics.UpdateEditPageControl); },setListHeight:function(_17,_18){ if(!_18){ _18=0; } var _19=_17.previousSibling; var h=0; while(_19){ if(_19.nodeType===1&&(dojo.style(_19,"display")!="none")){ h+=dojo.marginBox(_19).h; } _19=_19.previousSibling; } var _1a=dojo.marginBox(_17.parentNode).h-h-_18-dojo.style(_17,"marginTop")-dojo.style(_17,"marginBottom"); dojo.style(_17,"height",_1a+"px"); return _1a; },onLoad:function(){ var _1b=this.iContext.getRootElement(); dojo.parser.parse(_1b); this.wid="_"+this.iContext.widgetId+"_"; var _1c=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME); var _1d=_1c.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_BUILDER); var _1e=dojo.query("input.accessSearch",_1b); for(var i=0;i<_1e.length;i++){ _1e[i].src=_1d+_1e[i].title; } dojo.query(".accessControlDesp",_1b)[0].innerHTML=com.ibm.mm.builder.coreWidgetsStrings.I_ACL_DIALOG_DESC; this._addTip(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_ADD_TO_VIEW,dojo.query(".addToViewBtnMiddle",_1b)[0]); this._addTip(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_ADD_TO_EDIT,dojo.query(".addToEditBtnMiddle",_1b)[0]); this._addTip(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_SEARCH_RESULT,dojo.query(".searchResultHeaderMiddle",_1b)[0]); this._addTipForInput(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_REMOVE,dojo.query(".accessControlRemove",_1b)[0]); this._addTipForInput(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_ADD_TO_VIEW,dojo.query(".addToViewBtnA11y_button",_1b)[0],this.MAX_LEN); this._addTipForInput(com.ibm.mm.builder.coreWidgetsStrings.I_ACL_ADD_TO_EDIT,dojo.query(".addToEditBtnA11y_button",_1b)[0],this.MAX_LEN); dojo.query(".initACLSearchInput",_1b)[0].value=com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_USER; this.bottomDivId=this.wid+"bottomDiv"; this.searchInputId=this.wid+"search"; this.filterInputId=this.wid+"filter"; com.ibm.mm.builder.utils.htmlUtil.setNodeTitle((this.cws.I_SEARCH_INDICATE||"Searching..."),dojo.query(".searchIndicatorText",_1b)[0],170); this.searchType="user"; com.ibm.mm.builder.ACLopenSearchType="user"; if(!this.searchDropDownMenu){ this.searchDropDownMenu=dojo.byId(this.wid+"showSearchScope"); this.renderMenu(this.searchDropDownMenu); dojo.subscribe("com.ibm.mm.catalog.Topics.SearchType_Change",this,"changeSearchType"); } this._searchHint={"user":com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_USER,"group":com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_GROUP}; var _1f=dojo.byId(this.searchInputId); var _20=function(){ if(dojo.hasClass(_1f,"initACLSearchInput")){ dojo.removeClass(_1f,"initACLSearchInput"); dojo.addClass(_1f,"ACLSearchInput"); _1f.value=""; } }; var _21=dojo.hitch(this,function(){ var _22=dojo.byId(this.searchInputId); var _23=_22.value; if(_23==""){ if(dojo.hasClass(_22,"ACLSearchInput")){ dojo.removeClass(_22,"ACLSearchInput"); } dojo.addClass(_22,"initACLSearchInput"); _22.value=this._getSearchHint(); } }); var _24=dojo.hitch(this,function(evt){ evt=evt||window.event; if(evt&&evt.keyCode==13){ this.showSearchResult(); } }); this._connects.push(dojo.connect(_1f,"onfocus",null,_20)); this._connects.push(dojo.connect(_1f,"onblur",null,_21)); this._connects.push(dojo.connect(_1f,"onkeydown",null,_24)); var _25=dojo.byId(this.wid+"showSearchScope"); dojo.attr(_25,"alt",com.ibm.mm.builder.coreWidgetsStrings.I_ACL_SEARCHSCOPE); dojo.attr(_25,"title",com.ibm.mm.builder.coreWidgetsStrings.I_ACL_SEARCHSCOPE); var _26=dojo.byId(this.wid+"showResultImg"); dojo.attr(_26,"alt",com.ibm.mm.builder.coreWidgetsStrings.I_ACL_SEARCH_RESULT); dojo.attr(_26,"title",com.ibm.mm.builder.coreWidgetsStrings.I_ACL_SEARCH_RESULT); dojo.attr(dojo.byId(this.wid+"search"),"title",com.ibm.mm.builder.coreWidgetsStrings.I_ACL_SEARCHINPUT); if(builderConfig.isBidi){ dojo.attr(_26,"src",builderConfig.builderPath+"/images/search_button_gray_rtl.png"); } },addHoverClass:function(_27){ dojo.forEach(dojo.query("."+_27,this.iContext.getRootElement()),function(div){ this._connects.push(dojo.connect(div,"onmouseover",div,function(){ dojo.addClass(this,"hover"); },true)); this._connects.push(dojo.connect(div,"onmouseout",div,function(){ dojo.removeClass(this,"hover"); },true)); },this); },_createSource:function(_28,_29){ if(_28){ _28.destroy(); _28=null; } return com.ibm.mm.builder.dnd.ACLSource.createSource(_29[0],_29[1],_29[2],_29[3],_29[4],_29[5]); },_addTip:function(_2a,_2b){ var _2c=_2b; dojo.attr(_2b,"title",_2a); _2c.innerHTML=_2a; },_addTipForInput:function(_2d,_2e,_2f){ var _30=_2e; dojo.attr(_2e,"title",_2d); _30.value=_2f?com.ibm.mm.builder.utils.htmlUtil.getStrWithLimit(_2d,_30,_2f):_2d; },initModels:function(){ if(!this.userModel){ this.userModel=com.ibm.mashups.enabler.user.Factory.getUserModel(); } if(this._shareType==this.SHARE_PAGE){ this.acModel=this.acModelUtil.getPageAC(this._shareTypeId); }else{ this.acModel=this.acModelUtil.getSpaceAC(this._shareTypeId); } },initACLData:function(){ this.initModels(); this.viewList=this.acModelUtil.getViewers(this.acModel); this.editList=this.acModelUtil.getEditors(this.acModel); },onview:function(){ this.addHoverClass("addToViewBtnMiddle"); this.addHoverClass("addToView"); this.addHoverClass("addToEdit"); this.addHoverClass("addToEditBtnMiddle"); this.addHoverClass("input.accessSearch"); },_addItem:function(_31,_32,_33,_34){ var _35=com.ibm.mm.builder.utils.userUtil.getCurrentUserID(); var _36=this; for(var i=0;i<_33.length;i++){ var _37=_33[i]; if(!!_37&&_37.getID()!=_35&&!!_37.getDisplayName()){ var _38=_36._shareTypeId+_34+_37.getEntityType()+_37.getID(); var _39=new com.ibm.mm.builder.aclUserItem({displayName:_37.getDisplayName(),entityType:_37.getEntityType(),type:_34,id:_38,userId:_37.getID()}); _31.container.push(_39); _31.allStayedUsers[_36._shareTypeId+_37.getID()]=_37.getEntityType(); _32.appendChild(_39.domNode); if(i>=_31.listLengthPerPage){ _39.domNode.style.display="none"; } } } var _3a=_31.node.childNodes.length/_31.listLengthPerPage; _3a=Math.ceil(_3a); _31.totalPage=(_3a===0?1:_3a); },transferNode:function(_3b,_3c,_3d,_3e,_3f){ this._hideMessageBox(); for(var i=0,len=_3b.container.length;i<len;i++){ var _40=_3b.container[i]; if(_40.domNode.id===_3d){ if(this.isAnonymousUserByUserId(_40.userId)&&_3c.name=="aclEdit"){ this._showShareErrorMessage(dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.I_SHARE_PAGE_CAN_NOT_GIVE_PERMISSION_0,[_40.displayName]),"info"); return; } var _41=_3d.replace(_3b.name,_3c.name); var _42=new com.ibm.mm.builder.aclUserItem({displayName:_40.displayName,entityType:_40.entityType,type:_3c.name,id:_41,userId:_40.userId}); _3c.container.push(_42); _3c.allStayedUsers[_41.replace(_3c.name,"").replace(_40.entityType,"")]=_40.entityType; _3c.node.insertBefore(_42.domNode,_3e); if(!_3f){ _3b.container.splice(i,1); delete _3b.allStayedUsers[_3d.replace(_3b.name,"").replace(_40.entityType,"")]; _40.destroy(); } return; } } },isAnonymousUserByUserId:function(id){ if(!this.searchItems){ return false; } var _43; for(var i=0,len=this.searchItems.length;i<len;i++){ _43=this.searchItems[i]; if(_43==null){ continue; } if(_43.getID()===id&&_43.isVirtual()&&_43.getVirtualType()===com.ibm.mashups.enabler.user.VirtualType.ANONYMOUS_USER){ return true; } } return false; },isAnonymousUserByNodeId:function(_44,_45){ var _46=false; dojo.forEach(_44.container,function(_47){ if(_47.domNode.id==_45){ _46=this.isAnonymousUserByUserId(_47.userId); return; } },this); return _46; },checkDraggedNode:function(_48,_49,_4a){ var _4b=[]; var _4c=[]; var _4d=this; this._hideMessageBox(); dojo.forEach(_4a,function(_4e,_4f){ var _50=false; var id=_4e.id.replace(_48.name,""); var _51=null; switch(_49.name){ case com.ibm.mm.builder.dnd.viewSource.name: _51=_4d.getSpeceficNode(com.ibm.mm.builder.dnd.editSource,id)||_4d.getSpeceficNode(com.ibm.mm.builder.dnd.personalizeSource,id); break; case com.ibm.mm.builder.dnd.editSource.name: if(_4d.isAnonymousUserByNodeId(_48,_4e.id)){ var _52=_4d.getSpeceficNode(_4d.searchSource,id); _4d._showShareErrorMessage(dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.I_SHARE_PAGE_CAN_NOT_GIVE_PERMISSION_0,[_52.name]),"info"); _51=null; _50=true; break; } _51=_4d.getSpeceficNode(com.ibm.mm.builder.dnd.viewSource,id)||_4d.getSpeceficNode(com.ibm.mm.builder.dnd.personalizeSource,id); break; case com.ibm.mm.builder.dnd.personalizeSource.name: _51=_4d.getSpeceficNode(com.ibm.mm.builder.dnd.viewSource,id)||_4d.getSpeceficNode(com.ibm.mm.builder.dnd.editSource,id); break; } if(_51){ _4c.push(_51); }else{ if(!_50&&!(_4d.getSpeceficNode(_49,id,_4e.id))){ _4b.push(_4e); } } }); if(_4c.length){ if(!this.ACLReassignDialog){ this.ACLReassignDialog=new com.ibm.mm.builder.dialog.ACLReassignDialog(); } this.ACLReassignDialog.show(_4d,_49,_4c); } return _4b; },getSpeceficNode:function(_53,_54){ if(!_53){ return null; } var _55=_53.container; for(var i=0,len=_55.length;i<len;i++){ var _56=_55[i]; if((_56.id).replace(_53.name,"")===_54){ return {id:_56.id,name:_56.displayName,perm:_56.type}; } } return null; },changeSearchType:function(_57){ this.searchType=_57; com.ibm.mm.builder.ACLOpenSearchType=_57; var _58=dojo.byId(this.searchInputId); if(dojo.hasClass(_58,"initACLSearchInput")){ _58.value=this._getSearchHint(); } },_getSearchHint:function(){ return this._searchHint[this.searchType]||"Search"; },renderMenu:function(_59){ this.tMenu=new com.ibm.mm.builder.widget.OpenSearchDropdownMenu({targetNodeIds:[_59],leftClickToOpen:true}); var _5a=new com.ibm.mm.builder.widget.OpenSearchDropdownMenuItem({type:"user",label:com.ibm.mm.builder.coreWidgetsStrings.I_ACL_USER_SEARCH,onClick:dojo.hitch(this,this._onMenuItemClick,"user")}); this.tMenu.addChild(_5a); this.tMenu.entrys.push(_5a); var _5b=new com.ibm.mm.builder.widget.OpenSearchDropdownMenuItem({type:"group",label:com.ibm.mm.builder.coreWidgetsStrings.I_ACL_GROUP_SEARCH,onClick:dojo.hitch(this,this._onMenuItemClick,"group")}); this.tMenu.addChild(_5b); this.tMenu.entrys.push(_5b); this.tMenu.startup(); for(var i=0;i<this.tMenu.entrys.length;i++){ var _5c=this.tMenu.entrys[i]; if(com.ibm.mm.builder.ACLopenSearchType==_5c.type){ this.tMenu.setCurrentSearchType(_5c.domNode); this._currentSearchType=_5c; } } },_onMenuItemClick:function(_5d){ dojo.publish("com.ibm.mm.catalog.Topics.SearchType_Change",[_5d]); },onOverActions:function(e){ var _5e=e.target||e.srcElement; if(_5e.tagName=="TD"){ _5e=_5e.parentNode; dojo.addClass(_5e,"searchOption_item_highlighted"); dojo.removeClass(_5e.firstChild,"modeSelector_check"); _5e.style.color=this.highlightedColor; } if(dojo.isIE){ this._mouseOverSearchOptions(); } },onOutActions:function(e){ var _5f=e.target||e.srcElement; if(_5f.tagName=="TD"){ _5f=_5f.parentNode; dojo.removeClass(_5f,"searchOption_item_highlighted"); dojo.addClass(_5f.firstChild,"modeSelector_check"); if(dojo.hasClass(_5f.firstChild,"check")){ _5f.style.color=this.selectedColor; }else{ _5f.style.color=this.itemColor; } } if(dojo.isIE){ this._mouseOutSearchOptions(); } },setUserSearch:function(){ var _60=dojo.query(".initACLSearchInput",this.iContext.getRootElement())[0]; if(_60&&(_60.value==com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_GROUP||dojo.trim(_60.value)=="")){ _60.value=com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_USER; } },setGroupSearch:function(){ var _61=dojo.query(".initACLSearchInput",this.iContext.getRootElement())[0]; if(_61&&(_61.value==com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_USER||dojo.trim(_61.value)=="")){ _61.value=com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_GROUP; } },_getSearchOptionDiv:function(){ if(!this.searchOptionDiv){ var _62=dojo.query(".accessControl_searchOptions",dojo.byId(this.bottomDivId)); this.searchOptionDiv=_62[0]; } return this.searchOptionDiv; },_mouseOutSearchOptions:function(){ var _63=this._getSearchOptionDiv(); if(_63&&_63.style.display=="block"){ dojo.byId(this.wid+"showResultImg").focus(); } },_mouseOverSearchOptions:function(){ var _64=this._getSearchOptionDiv(); if(_64&&_64.style.display=="block"){ _64.focus(); } },_displaySearchOptions:function(_65){ var _66=dojo.query(".accessControl_searchOptions",dojo.byId(this.bottomDivId)); var _67=this._getSearchOptionDiv(); if(_65){ if(_67.style.display=="block"){ _67.style.display="none"; }else{ _67.style.display="block"; _67.focus(); } }else{ _67.style.display="none"; } },_onBlur:function(e){ var _68=this._getSearchOptionDiv(); if(_68.style.display=="none"){ return; } window.setTimeout(dojo.hitch(this,function(){ this._displaySearchOptions(false); }),300); },showSearchResult:function(){ this._hideMessage(); this._hideMessageBox(); var _69=dojo.query(".accessControlSearchListDiv",dojo.byId(this.bottomDivId)); var _6a=dojo.query(".accessControlSearchList",dojo.byId(this.bottomDivId)); _6a[0].style.display=""; var _6b=dojo.byId(this.searchInputId); var _6c=dojo.query(".searchIndicatorContainer",dojo.byId(this.bottomDivId))[0]; if(_6b&&_6b.value!=""){ _6c.style.display="block"; _6a[0].innerHTML=""; if(dojo.hasClass(_6b,"initACLSearchInput")){ this.searchItems=this.searchOutUsers("*"); }else{ this.searchItems=this.searchOutUsers(_6b.value); } _6c.style.display="none"; } if(this.searchItems&&this.searchItems.length>0&&!(this.searchItems.length==1&&this.searchItems[0].getID()==com.ibm.mm.builder.utils.userUtil.getCurrentUserID())){ try{ this.searchSource=this._createSource(this.searchSource,[_6a[0],["none"],this,"aclSearch",15,0]); this._addItem(this.searchSource,_6a[0],this.searchItems,"aclSearch"); dojo.publish(com.ibm.mm.builder.eventTopics.UpdateSearchPageControl); } catch(e){ this.LOGGER.severe("showSearchResult",dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_COLUMN_DND_1,[e.message])); } _69[0].style.display="none"; dojo.fx.wipeIn({node:_69[0],duration:1000}).play(); }else{ _6a[0].style.display="none"; var msg=null; if(this.searchType=="user"){ msg=com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_NO_RESULT_TEXT_USER||"No user found, try another search item"; }else{ msg=com.ibm.mm.builder.coreWidgetsStrings.I_SEARCH_NO_RESULT_TEXT_GROUP||"No group found, try another search item"; } this._showMessage(msg,"info","search_msg"); } com.ibm.mm.builder.utils.htmlUtil.truncateAllChildNodesText(_6a[0]); },searchOutUsers:function(_6d){ var _6e=[]; var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME); var _6f=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.AUTO_WILDCARD_DISABLED); if(_6d!=""){ if(_6d!="*"){ _6d=_6d.replace(/(^\**)|(\**$)/g,""); if((_6f!==true)&&(_6f!="true")){ _6d="*"+_6d+"*"; } } var i=0; var _70=null; if(this.searchType=="user"){ var _71=this.userModel.getVirtualUsers().start(); for(i=0;i<_71.length;i++){ this.searchUsers.push(_71[i]); _6e.push(_71[i]); } var _72=""; var dfr=this.userModel.findUsersByAttribute(cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CLIENT_USER_ID_KEY),_6d); dfr.setFinishedCallback(function(ctx){ if(ctx.request&&ctx.request.statusCode>=400&&ctx.request.responseText){ _72=ctx.request.responseText; } },null,true); _70=dfr.start(true); if(_70!=null){ for(i=0;i<_70.length;i++){ this.searchUsers.push(_70[i]); _6e.push(_70[i]); } }else{ this._showShareErrorMessage(dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_USER_SEARCH_ERROR_1,[_72]),"error"); } }else{ var _73=this.userModel.getVirtualGroups().start(); for(i=0;i<_73.length;i++){ this.searchUsers.push(_73[i]); _6e.push(_73[i]); } _70=this.userModel.findGroupsByAttribute(cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CLIENT_GROUP_CN_KEY),_6d).start(); if(_70!=null){ for(i=0;i<_70.length;i++){ this.searchUsers.push(_70[i]); _6e.push(_70[i]); } }else{ this._showShareErrorMessage(dojo.string.substitute(com.ibm.mm.builder.coreWidgetsMessages.E_USER_SEARCH_ERROR_1,[""]),"error"); } } } return _6e; },applyACL:function(){ },addToView:function(){ this.collectNodes(com.ibm.mm.builder.dnd.personalizeSource,com.ibm.mm.builder.dnd.viewSource,false); this.collectNodes(com.ibm.mm.builder.dnd.editSource,com.ibm.mm.builder.dnd.viewSource,false); this.collectNodes(this.searchSource,com.ibm.mm.builder.dnd.viewSource,true); dojo.publish(com.ibm.mm.builder.eventTopics.UpdateAllPageControl); },collectNodes:function(_74,_75,_76){ if(!_74||!_75){ return; } var _77=com.ibm.mm.builder.utils.htmlUtil.getAllCheckedNodes(_74.node); _77=_76?(this.checkDraggedNode(_74,_75,_77)):_77; var _78=this; dojo.forEach(_77,function(_79){ _78.transferNode(_74,_75,_79.id,null,(_74.name==="aclSearch")); }); com.ibm.mm.builder.utils.htmlUtil.uncheckAll(_74.node.childNodes); },addToViewClick:function(_7a){ _7a=dojo.fixEvent(_7a); if(_7a.keyCode===dojo.keys.ENTER){ this.addToView(); } },addToPersonalize:function(){ this.collectNodes(com.ibm.mm.builder.dnd.viewSource,com.ibm.mm.builder.dnd.personalizeSource,false); this.collectNodes(com.ibm.mm.builder.dnd.editSource,com.ibm.mm.builder.dnd.personalizeSource,false); this.collectNodes(this.searchSource,com.ibm.mm.builder.dnd.personalizeSource,true); dojo.publish(com.ibm.mm.builder.eventTopics.UpdateAllPageControl); },addToEdit:function(){ this.collectNodes(com.ibm.mm.builder.dnd.viewSource,com.ibm.mm.builder.dnd.editSource,false); this.collectNodes(com.ibm.mm.builder.dnd.personalizeSource,com.ibm.mm.builder.dnd.editSource,false); this.collectNodes(this.searchSource,com.ibm.mm.builder.dnd.editSource,true); dojo.publish(com.ibm.mm.builder.eventTopics.UpdateAllPageControl); },addToEditClick:function(_7b){ _7b=dojo.fixEvent(_7b); if(_7b.keyCode===dojo.keys.ENTER){ this.addToEdit(); } },removeAllSelectedEntries:function(){ this.removeSelectedNodes(com.ibm.mm.builder.dnd.viewSource); this.removeSelectedNodes(com.ibm.mm.builder.dnd.editSource); this.removeSelectedNodes(com.ibm.mm.builder.dnd.personalizeSource); dojo.publish(com.ibm.mm.builder.eventTopics.UpdateAllPageControl); },removeSelectedNodes:function(_7c){ if(!_7c){ return; } var _7d=false; var _7e=com.ibm.mm.builder.utils.htmlUtil.getAllCheckedNodes(_7c.node); dojo.forEach(_7e,function(_7f){ for(var i=0,len=_7c.container.length;i<len;i++){ var _80=_7c.container[i]; if(_80.id===_7f.id){ delete _7c.allStayedUsers[_7f.id.replace(_7c.name,"").replace(_80.entityType,"")]; _80.destroy(); _7c.container.splice(i,1); _7d=true; break; } } }); },showApplyOptions:function(){ },saveACL:function(){ var _81=com.ibm.mm.builder.dnd.viewSource.allStayedUsers; var _82=com.ibm.mm.builder.dnd.editSource.allStayedUsers; var _83=false; if(!this._inPersonalSpace&&this._shareType==this.SHARE_PAGE){ if(this._viewBlockCheckbox.isChecked()==this.acModel.isInheritanceBlock(com.ibm.mashups.enabler.ac.RoleType.USER)){ this.acModel.setInheritanceBlock(com.ibm.mashups.enabler.ac.RoleType.USER,!this._viewBlockCheckbox.isChecked()); _83=true; } if(this._editBlockCheckbox.isChecked()==this.acModel.isInheritanceBlock(com.ibm.mashups.enabler.ac.RoleType.EDITOR)){ this.acModel.setInheritanceBlock(com.ibm.mashups.enabler.ac.RoleType.EDITOR,!this._editBlockCheckbox.isChecked()); _83=true; } } var _84=this.getUserIdList(_81); var _85=this.getUserIdList(_82); var _86=this.getRemoveIdList(_84,this.viewList); var _87=this.getRemoveIdList(_85,this.editList); var _88=this.getInsertIdList(_84,this.viewList); var _89=this.getInsertIdList(_85,this.editList); this.acModelUtil.removeViewers(this.acModel,_86); this.acModelUtil.removeEditors(this.acModel,_87); this.acModelUtil.addViewers(this.acModel,_88); this.acModelUtil.addEditors(this.acModel,_89); _83=(_83||_86||_87||_88||_89); if(!_83){ com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.closeMashupDialog",this.iContext.widgetId); return; } var _8a=this.acModel.commit(); _8a.setOperationCallback(dojo.hitch(this,function(_8b){ if(_8b){ com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.closeMashupDialog",this.iContext.widgetId); }else{ this._showShareErrorMessage(com.ibm.mm.builder.coreWidgetsMessages.E_SHARE_PAGE_NO_PERMISSION_0,"error"); } })); _8a.start(); },cancelACL:function(){ com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.closeMashupDialog",this.iContext.widgetId); },getRemoveIdList:function(_8c,_8d){ var _8e={}; var _8f=false; dojo.forEach(_8d,function(_90){ var id=_90.getID(); var _91=_8c[id]; if(!_91||(_91&&(_91!=_90.getEntityType()))){ _8e[id]=_90.getEntityType(); _8f=true; } }); return (_8f?_8e:null); },getInsertIdList:function(_92,_93){ var _94={}; var _95=false; for(var id in _92){ if(Object.prototype.hasOwnProperty.call(_92,id)){ var _96=false; for(var i=0,len=_93.length;i<len;i++){ var _97=_93[i]; if((id==_97.getID())&&(_92[id]==_97.getEntityType())){ _96=true; break; } } if(!_96){ _94[id]=_92[id]; _95=true; } } } return (_95?_94:null); },getUserIdList:function(_98){ var _99={}; for(var _9a in _98){ if(Object.prototype.hasOwnProperty.call(_98,_9a)){ _99[_9a.replace(this._shareTypeId,"")]=_98[_9a]; } } return _99; },adjustUserList:function(_9b){ var _9c=_9b.node.childNodes.length/_9b.listLengthPerPage; _9c=Math.ceil(_9c)===0?1:Math.ceil(_9c); _9b.totalPage=_9c; if(_9b.currentPage>_9c){ _9b.currentPage=_9c; } if(_9b.currentPage<1){ _9b.currentPage=1; } var i=0; for(;i<_9b.listLengthPerPage*(_9b.currentPage-1);i++){ _9b.node.childNodes[i].style.display="none"; } for(;i<_9b.listLengthPerPage*_9b.currentPage&&i<_9b.node.childNodes.length;i++){ _9b.node.childNodes[i].style.display=""; } for(;i<_9b.node.childNodes.length;i++){ _9b.node.childNodes[i].style.display="none"; } },getProperSource:function(_9d){ var _9e; switch(_9d){ case "search": return this.searchSource; case "view": return com.ibm.mm.builder.dnd.viewSource; case "personalize": return com.ibm.mm.builder.dnd.personalizeSource; case "edit": return com.ibm.mm.builder.dnd.editSource; } return null; },updateProperControl:function(_9f){ switch(_9f){ case "search": this.updateSearchPageControl(); break; case "view": this.updateViewPageControl(); break; case "personalize": this.updatePersonalizePageControl(); break; case "edit": this.updateEditPageControl(); break; } },pageDown:function(_a0){ var _a1=this.getProperSource(_a0); if(_a1){ _a1.currentPage++; this.updateProperControl(_a0); } },pageUp:function(_a2){ var _a3=this.getProperSource(_a2); if(_a3){ if(_a3.currentPage==1){ return; } _a3.currentPage--; this.updateProperControl(_a2); } },jumpDown:function(_a4){ var _a5=this.getProperSource(_a4); if(_a5){ if(_a5.currentPage!=_a5.totalPage){ _a5.currentPage=_a5.totalPage; this.updateProperControl(_a4); } } },jumpUp:function(_a6){ var _a7=this.getProperSource(_a6); if(_a7){ if(_a7.currentPage!=1){ _a7.currentPage=1; this.updateProperControl(_a6); } } },_disableUpPageControls:function(_a8){ if(_a8){ var _a9=dojo.query(".accessControlPageUpDiv",_a8); _a9[0].innerHTML="<img src="+this.disabledPageUpImageUrl+" alt=''>"; dojo.removeAttr(_a9[0],"role"); var _aa=dojo.query(".accessControlJumpUpDiv",_a8); _aa[0].innerHTML="<img src="+this.disabledJumpUpImageUrl+" alt=''>"; dojo.removeAttr(_aa[0],"role"); } },_disableDownPageControls:function(_ab){ if(_ab){ var _ac=dojo.query(".accessControlPageDownDiv",_ab); _ac[0].innerHTML="<img src="+this.disabledPageDownImageUrl+" alt=''>"; dojo.removeAttr(_ac[0],"role"); var _ad=dojo.query(".accessControlJumpDownDiv",_ab); _ad[0].innerHTML="<img src="+this.disabledJumpDownImageUrl+" alt=''>"; dojo.removeAttr(_ad[0],"role"); } },_enableUpPageControls:function(_ae){ if(_ae){ var _af=dojo.query(".accessControlPageUpDiv",_ae); _af[0].innerHTML="<img src="+this.pageUpImageUrl+" alt=''>"; dojo.attr(_af[0],"role","link"); var _b0=dojo.query(".accessControlJumpUpDiv",_ae); _b0[0].innerHTML="<img src="+this.jumpUpImageUrl+" alt=''>"; dojo.attr(_b0[0],"role","link"); } },_enableDownPageControls:function(_b1){ if(_b1){ var _b2=dojo.query(".accessControlPageDownDiv",_b1); _b2[0].innerHTML="<img src="+this.pageDownImageUrl+" alt=''>"; dojo.attr(_b2[0],"role","link"); var _b3=dojo.query(".accessControlJumpDownDiv",_b1); _b3[0].innerHTML="<img src="+this.jumpDownImageUrl+" alt=''>"; dojo.attr(_b3[0],"role","link"); } },_hidePageControls:function(_b4){ if(_b4){ _b4.style.display="none"; } },_showPageControls:function(_b5){ if(_b5){ _b5.style.display="block"; } },updateAllPageControl:function(){ this.updateViewPageControl(); this.updateEditPageControl(); },updateViewPageControl:function(){ this.updageSpecificPageControl(com.ibm.mm.builder.dnd.viewSource); },updatePersonalizePageControl:function(){ this.updageSpecificPageControl(com.ibm.mm.builder.dnd.personalizeSource); },updateEditPageControl:function(){ this.updageSpecificPageControl(com.ibm.mm.builder.dnd.editSource); },updageSpecificPageControl:function(_b6){ this.adjustUserList(_b6); var _b7=!this._inPersonalSpace&&this._shareType!=this.SHARE_SPACE?{h:"350px",hWithArrow:"300px"}:{h:"393px",hWithArrow:"347px"}; var _b8=_b6.name.replace("acl",""); var _b9=dojo.query(".accessControl"+_b8+"ListUpDiv",dojo.byId(this.bottomDivId))[0]; var _ba=dojo.query(".accessControl"+_b8+"ListDownDiv",dojo.byId(this.bottomDivId))[0]; this._updateControl(_b9,_ba,_b6); },updateSearchPageControl:function(){ this.adjustUserList(this.searchSource); var _bb=dojo.query(".accessControlSearchListUpDiv",dojo.byId(this.bottomDivId))[0]; var _bc=dojo.query(".accessControlSearchListDownDiv",dojo.byId(this.bottomDivId))[0]; this._updateControl(_bb,_bc,this.searchSource); },_updateControl:function(_bd,_be,_bf){ if(_bf.totalPage==1){ this._hidePageControls(_bd); this._hidePageControls(_be); this._disableUpPageControls(_bd); this._disableDownPageControls(_be); }else{ this._showPageControls(_bd); this._showPageControls(_be); if(_bf.currentPage>1){ this._enableUpPageControls(_bd); }else{ this._disableUpPageControls(_bd); } if(_bf.currentPage<_bf.totalPage){ this._enableDownPageControls(_be); }else{ this._disableDownPageControls(_be); } this.setListHeight(_bf.node,23); } },_showMessage:function(_c0,_c1,_c2){ if(!this.messageControl){ dojo.registerModulePath("com.ibm.lotus.oneui.v100.messages",this.iContext.io.rewriteURI("../dijit-library/oneUI.versionized/messages")); dojo.require("com.ibm.lotus.oneui.v100.messages.Message"); var wid="_"+this.iContext.widgetId+"_"; var _c3=dojo.byId(wid+_c2); this.messageControl=new com.ibm.lotus.oneui.v100.messages.Message({messageType:_c1},_c3); } this.messageControl.attr({"message":_c0,"messageType":_c1||"error"}); this.messageControl.show(); },_hideMessage:function(){ if(this.messageControl){ this.messageControl.hide(); var _c4=dojo.query(".accessControlSearchList",dojo.byId(this.bottomDivId)); _c4[0].style.display=""; } },_showShareErrorMessage:function(_c5,_c6){ if(!this.messageBox){ dojo.registerModulePath("com.ibm.lotus.oneui.v100.messages",this.iContext.io.rewriteURI("../dijit-library/oneUI.versionized/messages")); dojo.require("com.ibm.lotus.oneui.v100.messages.Message"); var wid="_"+this.iContext.widgetId+"_"; var _c7=dojo.byId(wid+"messageBox"); this.messageBox=new com.ibm.lotus.oneui.v100.messages.Message({messageType:_c6},_c7); } this.messageBox.attr({"message":_c5,"messageType":_c6||"error"}); this.messageBox.show(); dojo.removeClass(dojo.byId(this.bottomDivId),"accessControlBottomDiv"); dojo.addClass(dojo.byId(this.bottomDivId),"accessControlBottomDivWithError"); },_hideMessageBox:function(){ if(dojo.hasClass(dojo.byId(this.bottomDivId),"accessControlBottomDivWithError")){ dojo.removeClass(dojo.byId(this.bottomDivId),"accessControlBottomDivWithError"); dojo.addClass(dojo.byId(this.bottomDivId),"accessControlBottomDiv"); } if(this.messageBox){ this.messageBox.hide(); } },onUnload:function(){ if(this.searchSource){ this.searchSource.destroy(); this.searchSource=null; } if(com.ibm.mm.builder.dnd.viewSource){ com.ibm.mm.builder.dnd.viewSource.destroy(); com.ibm.mm.builder.dnd.viewSource=null; } if(com.ibm.mm.builder.dnd.personalizeSource){ com.ibm.mm.builder.dnd.personalizeSource.destroy(); com.ibm.mm.builder.dnd.personalizeSource=null; } if(com.ibm.mm.builder.dnd.editSource){ com.ibm.mm.builder.dnd.editSource.destroy(); com.ibm.mm.builder.dnd.editSource=null; } dojo.forEach(this._connects,dojo.disconnect,dojo); }}); dojo.declare("com.ibm.mm.builder.aclUserItem",[dijit._Widget,dijit._Templated],{displayName:null,entityType:null,type:null,id:null,userId:null,templateString:"<div class='aclUserItem dojoDndItem' style='white-space: nowrap;' dojoAttachEvent='onmouseover:_onHover,onmouseout:_onUnHover,onmousedown:_onMouseDown,onmouseup:_onMouseUp,keydown:_onKeyDown'>"+"<div class='aclUserItemFloater'>"+"\t<input dojoAttachPoint='itemCheckBox' type='checkbox' name='itemCheck' role='checkbox' id='${id}_itemCheck'></input>"+"</div>"+"<div>"+"\t<label class='aclUserItemContent truncatedLabel' widthlimit='160' dojoAttachPoint='aclUserItemContent' for='${id}_itemCheck'></label>"+"</div>"+"</div>",postCreate:function(){ if(this.entityType=="group"){ this.aclUserItemContent.style.fontWeight="bold"; } if((this.displayName!==null)&&(this.displayName!="")){ this.aclUserItemContent.innerHTML=this.displayName; } this.itemCheckBox.setAttribute("value",this.id); dojo.connect(this.itemCheckBox,"onclick",this,"_checkBoxClick"); this.domNode.id=this.id; },_checkBoxClick:function(evt){ dojo.stopEvent(evt); },setItemID:function(_c8){ this.id=_c8; this.domNode.id=_c8; this.itemCheckBox.setAttribute("value",this.id); },_onHover:function(){ dojo.addClass(this.domNode,this.type+"ItemHover"); },_onUnHover:function(){ dojo.removeClass(this.domNode,this.type+"ItemHover"); },_onMouseDown:function(evt){ this.setChecked=!this.itemCheckBox.checked; if(!this.itemCheckBox.checked){ this.itemCheckBox.checked=true; } dijit.setWaiState(this.itemCheckBox,"checked",this.itemCheckBox.checked); },_onMouseUp:function(){ if(this.itemCheckBox.checked&&(!this.setChecked)){ this.itemCheckBox.checked=false; } dijit.setWaiState(this.itemCheckBox,"checked",this.itemCheckBox.checked); },_onKeyDown:function(evt){ if(evt.keyCode==32){ this.setChecked=!this.itemCheckBox.checked; if(!this.itemCheckBox.checked){ this.itemCheckBox.checked=true; }else{ if(this.itemCheckBox.checked&&(!this.setChecked)){ this.itemCheckBox.checked=false; } } } dijit.setWaiState(this.itemCheckBox,"checked",this.itemCheckBox.checked); }}); dojo.declare("com.ibm.mm.builder.widget.includeBox",[dijit._Widget,dijit._Templated],{templateString:"<div class='includeBox'>"+"<div class='includeInside'>"+"<input type='checkbox' dojoAttachPoint = 'blockCheckbox' />"+"<label dojoAttachPoint = 'includeContentNode' class='includeContent'>${includeContent}</label>"+"</div>"+"</div>",type:null,includeContent:null,checked:true,setCheck:function(_c9){ this.blockCheckbox.checked=_c9; },isChecked:function(){ return this.blockCheckbox.checked; },getType:function(){ return this.type; },postCreate:function(){ dojo.addClass(this.domNode,this.type+"IncludeBox"); this.blockCheckbox.checked=this.checked; dojo.attr(this.blockCheckbox,"id",this.type+"CheckBox"); dojo.attr(this.includeContentNode,"id",this.type+"CheckBoxLabel"); dojo.attr(this.includeContentNode,"for",this.blockCheckbox.id); dojo.attr(this.blockCheckbox,"aria-labelledby",this.type+"CheckBoxLabel"); }}); com.ibm.mm.builder.dnd.viewSource=null; com.ibm.mm.builder.dnd.personalizeSource=null; com.ibm.mm.builder.dnd.editSource=null; i$.toPath("com.ibm.mm.builder.sharePages.action", function(menuitem) { // we need to refresh the page once the user selects SAVE on the dialog // this is a two step process. First we register a handler on closeMashupDialog to listen on when the dialog is closed // second we register a handler on the SaveButton. Please note that this is internal to Mashups so that we cannot rely on that // in case that function is not found the refresh will also happen for CANCEL var save = false; var widgetId = null; var link1, link2; var doRefresh = function() { if (widgetId == "sharePage" && save) { // by doing a timeout we postpone processing of the event, hence giving other JS code the option to // finish rendering before the page is reloaded window.setTimeout(function() { document.location.reload(); }, 0); } // this is a fail-safe for when the cancel button was pressed. In this case doRefresh gets called once without link2 being disconnected window.setTimeout(function() { if (link2) { dojo.disconnect(link2); } }, 500); }; link1 = com.ibm.mashups.services.ServiceManager.getService("eventService").subscribeEvent("com.ibm.mashups.builder.closeMashupDialog", this, function(_widgetId) { com.ibm.mashups.services.ServiceManager.getService("eventService").unsubscribeEvent(link1); link1 = null; widgetId = _widgetId; doRefresh(); }); var gwm = com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel(); var widget = gwm.find("sharePage"); if (widget && widget.iScope && widget.iScope.saveACL) { link2 = dojo.connect(widget.iScope, "saveACL", this, function() { dojo.disconnect(link2); link2 = null; save = true; doRefresh(); },true); } else { save = true; } com.ibm.pb.contextMenu.sharedActions.sharePage(ibmCfg.portalConfig.currentPageOID); }); i$.toPath("com.ibm.mm.builder.assignPagePermissions.action", function(menuitem) { var curElement = document.activeElement; var link1; link1 = com.ibm.mashups.services.ServiceManager.getService("eventService").subscribeEvent("com.ibm.mashups.builder.closeMashupDialog", this, function() { com.ibm.mashups.services.ServiceManager.getService("eventService").unsubscribeEvent(link1); link1 = null; if (curElement != null) curElement.focus(); }); com.ibm.pb.contextMenu.sharedActions.assignPagePermissions(ibmCfg.portalConfig.currentPageOID); }); i$.toPath("com.ibm.mm.builder.assignPagePermissions.visibility", function(menuitem) { return com.ibm.pb.contextMenu.sharedActions.confirmAssignPermissions(ibmCfg.portalConfig.currentPageOID, null, { jsonContext: { contentNode: ibmCfg.portalConfig.currentPageOID }, operation: "com.ibm.mashups.enabler.ac.operation.AssignRoles" }); }); /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ if(!dojo._hasResource["ibm.toolbar.ModalDialog"]){dojo._hasResource["ibm.toolbar.ModalDialog"]=true;dojo.provide("ibm.toolbar.ModalDialog");dojo.declare("ibm.toolbar.ModalDialog",null,{constructor:function(){if(!ibm.toolbar.ModalDialog.dialogModalSINGLETON){dojo.xhrGet({"url":ibmToolbarConfig.dialogJavascriptURL,"handleAs":"javascript","sync":true,error:function(_1,_2){if(_2.xhr.status==401){top.location.reload();}console.debug("Cannot load modal dialog script: "+_1);}});ibm.toolbar.ModalDialog.dialogModalSINGLETON=dialogModal;}if(!ibm.toolbar.ModalDialog.dialogModalUtilsSINGLETON){dojo.xhrGet({"url":ibmToolbarConfig.dialogUtilsJavascriptURL,"handleAs":"javascript","sync":true,error:function(_3,_4){if(_4.xhr.status==401){top.location.reload();}console.debug("Cannot load modal dialog script: "+_3);}});ibm.toolbar.ModalDialog.dialogModalUtilsSINGLETON=dialogModalUtils;}dojo.mixin(this,dialogModal);}});ibm.toolbar.ModalDialog.dialogModalSINGLETON=null;ibm.toolbar.ModalDialog.dialogModalUtilsSINGLETON=null;} dojo.provide("portalclient.nls.ui_utils_en");dojo.provide("com.ibm.widgets.nls.GenericDialog");com.ibm.widgets.nls.GenericDialog._built=true;dojo.provide("com.ibm.widgets.nls.GenericDialog.en");com.ibm.widgets.nls.GenericDialog.en={"genDialog":{"okButtonTitle":"OK","cancelLinkText":"Cancel","cancelLinkTitle":"Cancel","okButtonCaption":"OK"}}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("portalclient.nls.ui_utils",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.widgets.ConsoleWrapper"]){dojo._hasResource["com.ibm.widgets.ConsoleWrapper"]=true;dojo.provide("com.ibm.widgets.ConsoleWrapper");dojo.declare("com.ibm.widgets.ConsoleWrapper",[],{_hasLogMethod:false,_hasDebugMethod:false,_hasInfoMethod:false,_hasWarnMethod:false,_hasErrorMethod:false,constructor:function(){if(typeof console=="object"){this._hasLogMethod=(typeof console.log=="function");this._hasDebugMethod=(typeof console.debug=="function");this._hasInfoMethod=(typeof console.info=="function");this._hasWarnMethod=(typeof console.warn=="function");this._hasErrorMethod=(typeof console.error=="function");}else{this.log=function(){};this.debug=function(){};this.info=function(){};this.warn=function(){};this.error=function(){};}},debug:function(_1){if(this._hasDebugMethod){console.debug.apply(console,arguments);}else{this.log.apply(this,arguments);}},error:function(_2){if(this._hasErrorMethod){console.error.apply(console,arguments);}else{this.log.apply(this,arguments);}},info:function(_3){if(this._hasInfoMethod){console.info.apply(console,arguments);}else{this.log.apply(this,arguments);}},log:function(_4){if(this._hasLogMethod){console.log.apply(console,arguments);}},warning:function(_5){if(this._hasWarnMethod){console.warn.apply(console,arguments);}else{this.log.apply(this,arguments);}}});}if(!dojo._hasResource["com.ibm.widgets._Traceable"]){dojo._hasResource["com.ibm.widgets._Traceable"]=true;dojo.provide("com.ibm.widgets._Traceable");dojo.declare("com.ibm.widgets._Traceable",[],{LOGGER:null,LOG_LEVEL:null,LOG_LEVEL_ERROR:1000,LOG_LEVEL_INFO:800,LOG_LEVEL_TRACE:500,LOG_LEVEL_WARNING:900,_consoleWrapper:null,_traceChecker:null,_isSimpleLogging:false,_isLoggable:false,constructor:function(){if(dojo.exists("com.ibm.mashups.enabler.logging.Logger")){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this._isSimpleLoggingisSimpleLogging=false;this.LOG_LEVEL_TRACE=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.LOG_LEVEL_INFO=com.ibm.mashups.enabler.logging.LogLevel.INFO;this.LOG_LEVEL_WARNING=com.ibm.mashups.enabler.logging.LogLevel.WARNING;this.LOG_LEVEL_ERROR=com.ibm.mashups.enabler.logging.LogLevel.SEVERE;}else{if(typeof ibmCfg!="undefined"&&typeof ibmCfg.enablerConfig!="undefined"&&typeof ibmCfg.enablerConfig.traceConfig!="undefined"){this._initConfig(ibmCfg.enablerConfig.traceConfig);}this._isSimpleLogging=true;this._isLoggable=this.isLoggable();this._consoleWrapper=new com.ibm.widgets.ConsoleWrapper();}this.LOG_LEVEL=this.LOG_LEVEL_TRACE;},isTracing:function(){return this.isLogging(this.LOG_LEVEL);},error:function(_6,_7,_8){this.log(this.LOG_LEVEL_ERROR,_6,_7,_8);},info:function(_9,_a,_b){this.log(this.LOG_LEVEL_INFO,_9,_a,_b);},isLoggable:function(){var _c;if(typeof ibmCfg!="undefined"&&typeof ibmCfg.enablerConfig!="undefined"&&typeof ibmCfg.enablerConfig.isDebug!="undefined"){if(!ibmCfg.enablerConfig.isDebug){_c=false;}else{var _d=this._traceChecker;_c=_d&&_d.test(this.declaredClass);}}else{_c=false;}return _c;},isLogging:function(_e){if(this._isSimpleLogging){return this._isLoggable;}else{return this.LOGGER.isLoggable(_e);}},log:function(_f,_10,_11,_12){if(this._isSimpleLogging){this._logSimple(_f,_10,_11,_12);}else{this.LOGGER.log(_f,_10,msg,_12);}},trace:function(_13,_14,_15){var _16=this.isTracing();if(_16){var msg=_14;var _17="";if(_15||(_15===0)||(_15===null)||(_15==="")){if(!dojo.isArray(_15)){_17=_15;}else{if(_15&&_15.length>0){for(var arg in _15){if(_17===""){_17=_17+_15[arg];}else{_17=_17+", "+_15[arg];}}}}msg=msg+" [ "+_17+" ]";}if(this._isSimpleLogging){this._consoleWrapper.debug(this.declaredClass+" "+_13+" : "+msg);}else{this.LOGGER.log(this.LOG_LEVEL,_13,msg);}}},traceEntry:function(_18,_19){if(this._isSimpleLogging){if(this._isLoggable){var msg=" ENTRY";var _1a="";if(_19||(_19===0)||(_19===null)||(_19==="")){if(!dojo.isArray(_19)){_1a=_19;}else{if(_19&&_19.length>0){for(var arg in _19){if(_1a===""){_1a=_1a+_19[arg];}else{_1a=_1a+", "+_19[arg];}}}}msg=msg+" [ "+_1a+" ]";}this._consoleWrapper.debug(this.declaredClass+" "+_18+msg);}}else{var _1b=this.LOGGER.isLoggable(this.LOG_LEVEL_TRACE);if(_1b){this.LOGGER.entering(_18,_19);}}},traceExit:function(_1c,_1d){if(this._isSimpleLogging){if(this._isLoggable){if(_1d||(_1d===0)||(_1d===null)||(_1d==="")){this._consoleWrapper.debug(this.declaredClass+" "+_1c+" EXIT [ "+_1d+" ]");}else{this._consoleWrapper.debug(this.declaredClass+" "+_1c+" EXIT");}}}else{var _1e=this.LOGGER.isLoggable(this.LOG_LEVEL_TRACE);if(_1e){if(typeof _1d==="boolean"){_1d=_1d?"true":"false";}this.LOGGER.exiting(_1c,_1d);}}},warning:function(_1f,_20,_21){this.log(this.LOG_LEVEL_WARNING,_1f,_20,_21);},_initConfig:function(_22){if(_22&&_22.length>0){this._traceChecker=new RegExp(dojo.isArray(_22)?_22.join("|"):_22);}else{this._traceChecker=null;}},_logSimple:function(_23,_24,_25,_26){if(this._isLoggable){if((_26&&!dojo.isArray(_26))||_26===false){_26=[_26];}var _27=_26?dojo.string.substitute(_25,_26):_25;if(_23==this.LOG_LEVEL_ERROR){this._consoleWrapper.error(this.declaredClass+" "+_24+" : "+_27);}else{if(_23==this.LOG_LEVEL_WARNING){this._consoleWrapper.warning(this.declaredClass+" "+_24+" : "+_27);}else{if(_23==this.LOG_LEVEL_INFO){this._consoleWrapper.info(this.declaredClass+" "+_24+" : "+_27);}else{if(_23==this.LOG_LEVEL_TRACE){this._consoleWrapper.debug(this.declaredClass+" "+_24+" : "+_27);}else{this._consoleWrapper.log(this.declaredClass+" "+_24+" : "+_27);}}}}}}});}if(!dojo._hasResource["com.ibm.widgets.GenericDialog"]){dojo._hasResource["com.ibm.widgets.GenericDialog"]=true;dojo.provide("com.ibm.widgets.GenericDialog");dojo.registerModulePath("com.ibm.widgets","../com/ibm/widgets");dojo.require("dijit.Dialog");dojo.require("dijit._Templated");dojo.require("dojo.i18n");dojo.require("dojox.layout.ResizeHandle");dojo.declare("com.ibm.widgets.GenericDialog",[dijit.Dialog,dijit._Templated,com.ibm.widgets._Traceable],{autoClose:true,autofocus:true,blankImgUrl:dojo.moduleUrl("dojo","resources/blank.gif").toString(),duration:200,extractContent:false,isResizable:true,isResized:false,minHeight:400,minWidth:400,namespace:"genDlg",title:"",parseOnLoad:true,preload:true,templateString:null,templateString:"<div dojoAttachPoint=\"GenericDialogDiv\"\n class=\"lotusDialogBorder lotusui dijitContentPane\"\n waistate=\"labelledby-${namespace}GenericDialogTitleSpan_id\" wairole=\"dialog\" role=\"dialog\"\n tabindex=\"-1\" aria-labelledby=\"${namespace}GenericDialogTitleSpan_id\">\n\n <div id=\"${namespace}GenericDialogContentDiv_id\" name=\"${namespace}GenericDialogContentDiv\" class=\"lotusDialog\">\n <h1 dojoAttachPoint=\"titleBar\" id=\"${namespace}GenericDialogTitleBar_id\" name=\"${namespace}GenericDialogTitleBar\">\n <a dojoAttachPoint=\"dialogClose\" href=\"javascript:void(0);\" class=\"lotusBtnImg lotusClose\" title=\"${_nlsUserInterface.genDialog.cancelLinkTitle}\" id=\"${namespace}buttonCancel_id\" name=\"${namespace}buttonCancel\"> \n <img src=\"${blankImgUrl}\" alt=\"${_nlsUserInterface.genDialog.cancelLinkTitle}\" aria-label=\"${_nlsUserInterface.genDialog.cancelLinkTitle}\" />\n <span dojoAttachPoint=\"closeText\" id=\"${namespace}buttonCancelSpan_id\" name=\"${namespace}buttonCancelSpan\" class=\"lotusAltText\" title=\"${_nlsUserInterface.genDialog.cancelLinkTitle}\">X</span> \n </a>\n <span dojoAttachPoint=\"titleNode\" id=\"${namespace}GenericDialogTitleSpan_id\" name=\"${namespace}GenericDialogTitleSpan\">${title}</span>\n </h1>\n \n <div dojoAttachPoint=\"containerNode\" class=\"lotusDialogContent\"><div dojoAttachPoint=\"widgetNode\"></div></div>\n \n <div dojoAttachPoint=\"dialogFooter\" class=\"lotusDialogFooter\">\n <input dojoAttachPoint=\"dialogConfirm\" class=\"lotusFormButton\" type=\"submit\" value=\"${_nlsUserInterface.genDialog.okButtonCaption}\" role=\"button\" title=\"${_nlsUserInterface.genDialog.okButtonTitle}\" id=\"${namespace}submitDialogSelection_id\" name=\"${namespace}submitDialogSelection\" />\n <a dojoAttachPoint=\"dialogCancel\" class=\"lotusAction\" href=\"javascript:;\" role=\"link\" id=\"${namespace}cancelDialogSelection_id\" name=\"${namespace}cancelDialogSelection\" title=\"${_nlsUserInterface.genDialog.cancelLinkTitle}\">${_nlsUserInterface.genDialog.cancelLinkText}</a>\n </div>\n </div>\n</div>\n",_eventHandles:[],_resizeEventHandle:null,_isTracing:false,_lotusui_div:null,_nlsMessages:{},_nlsUserInterface:{},_onCancelCallbackFn:null,_onConfirmCallbackFn:null,_resizeHandler:null,_widget:null,buildRendering:function(){var m="buildRendering()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._widget){this._widget.placeAt(this.widgetNode);this.title=this._widget.getDialogTitle();}if(this._isTracing){this.traceExit(m);}},constructor:function(_28){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_28);if(_28){this.trace(m,"p_params.onCancelCallbackFn:",_28.onCancelCallbackFn);this.trace(m,"p_params.onConfirmCallbackFn:",_28.onConfirmCallbackFn);this.trace(m,"p_params.widgetInstance:",_28.widgetInstance);}}if(typeof _28.onConfirmCallbackFn=="function"){this._onConfirmCallbackFn=_28.onConfirmCallbackFn;}if(typeof _28.onCancelCallbackFn=="function"){this._onCancelCallbackFn=_28.onCancelCallbackFn;}if(_28.widgetInstance&&typeof _28.widgetInstance=="object"){this._widget=_28.widgetInstance;}this._initNLS();if(this._isTracing){this.traceExit(m);}},destroyDialog:function(){var m="destroyDialog()";if(this._isTracing){this.traceEntry(m);}this.destroyRecursive();var _29=dijit.byId("dojoxGlobalResizeHelper");if(_29){_29.destroy();}else{if(this._resizeHandler&&this._resizeHandler._resizeHelper){this._resizeHandler._resizeHelper.destroy();}}if(this._resizeHandler){this._resizeHandler.destroy();this._resizeHandler=null;}this._removeLotusOneUIDiv();if(this._isTracing){this.traceExit(m);}},getNlsMessages:function(){var m="getNlsMessages()";if(this._isTracing){this.traceEntry(m);}var _2a=this._nlsMessages;if(this._isTracing){this.traceExit(m,dojo.toJson(_2a));}return _2a;},getNlsUserInterface:function(){var m="getNlsUserInterface()";if(this._isTracing){this.traceEntry(m);}var _2b=this._nlsUserInterface;if(this._isTracing){this.traceExit(m,dojo.toJson(_2b));}return _2b;},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._initEventHandles();this._recreateResizeHandler();if(this._isTracing){this.traceExit(m);}},postMixInProperties:function(){var m="postMixInProperties()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._addResizeHandleStyles();if(this._isTracing){this.traceExit(m);}},show:function(){var m="show()";if(this._isTracing){this.traceEntry(m);}this.startup();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this._clearEventHandles();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},_addResizeHandleStyles:function(){var m="_addStyles()";if(this._isTracing){this.traceEntry(m);}if(!dojo.byId(com.ibm.widgets.GenericDialog.resizeHandleCssId)){if(this._isTracing){this.trace(m,"Resize handle styles have not been loaded yet, adding element to DOM");}var _2c=document.getElementsByTagName("head");var _2d=false;if(_2c){_2c=_2c[0];}else{_2c=document;_2d=true;}var _2e=document.createElement("link");dojo.attr(_2e,"type","text/css");dojo.attr(_2e,"rel","stylesheet");dojo.attr(_2e,"href",dojo.moduleUrl("dojox.layout","resources/ResizeHandle.css").toString());dojo.attr(_2e,"id",com.ibm.widgets.GenericDialog.resizeHandleCssId);if(_2d){var _2f=(_2c.childNodes&&_2c.childNodes[0])?_2c.childNodes[0]:null;_2c.insertBefore(_2e,_2f);}else{_2c.appendChild(_2e);}}else{if(this._isTracing){this.trace(m,"Resize handle styles have already been loaded, not adding link element to DOM again");}}if(this._isTracing){this.traceExit(m);}},_clearEventHandles:function(){var m="_clearEventHandles()";if(this._isTracing){this.traceEntry(m);}dojo.forEach(this._eventHandles,dojo.disconnect);dojo.disconnect(this._resizeEventHandle);this._eventHandles=[];if(this._isTracing){this.traceExit(m);}},_getFocusItems:function(_30){var _31=this.containerNode;this.containerNode=_30;this.inherited(arguments);this.containerNode=_31;},_initEventHandles:function(){var m="_initEventHandles()";if(this._isTracing){this.traceEntry(m);}this._eventHandles.push(dojo.connect(this.dialogClose,"onclick",this,"onCancel"));this._eventHandles.push(dojo.connect(this.dialogCancel,"onclick",this,"onCancel"));this._eventHandles.push(dojo.connect(this,"onCancel",this,"_onCancel"));if(this._isTracing){this.traceExit(m);}},_initNLS:function(){var m="_initNLS()";if(this._isTracing){this.traceEntry(m);}this._nlsUserInterface=dojo.i18n.getLocalization("com.ibm.widgets","GenericDialog");if(this._isTracing){this.trace(m,"Initialized NLS object for user interface elements:",dojo.toJson(this._nlsUserInterface));this.trace(m,"Initialized NLS object for messages:",dojo.toJson(this._nlsMessages));this.traceExit(m);}},_onCancel:function(){var m="_onCancel()";if(this._isTracing){this.traceEntry(m);}var _32={};if(this._widget&&(typeof this._widget.doCancel=="function")){_32=this._widget.doCancel();}if(this._onCancelCallbackFn){if(this._isTracing){this.trace(m,"Dispatching to callback function passing the return values from the widget:",[this._onCancelCallbackFn,_32]);}this._onCancelCallbackFn(_32);}if(this.autoClose){setTimeout(dojo.hitch(this,"destroyDialog"),this.duration);}if(this._isTracing){this.traceExit(m);}},_onConfirm:function(){var m="_onConfirm()";if(this._isTracing){this.traceEntry(m);}var _33={};if(this._widget&&(typeof this._widget.doConfirm=="function")){_33=this._widget.doConfirm();}if(this._isTracing){this.trace(m,"Return values from widget:",_33);}if(this._onConfirmCallbackFn){if(this._isTracing){this.trace(m,"Dispatching to callback function passing the return values from the widget:",[this._onConfirmCallbackFn,_33]);}this._onConfirmCallbackFn(_33);}if(this.autoClose){this.hide();setTimeout(dojo.hitch(this,"destroyDialog"),this.duration);}if(this._isTracing){this.traceExit(m);}},_onResize:function(){this.isResized=true;this.layout();},_recreateResizeHandler:function(){var m="_recreateResizeHandler()";if(this._isTracing){this.traceEntry(m);}if(this.isResizable){if(this._resizeHandler){this._resizeHandler.destroy();}this._resizeHandler=new dojox.layout.ResizeHandle({"targetId":this.id,"intermediateChanges":false,"activeResize":false,"animateSizing":true,"minHeight":this.minHeight,"minWidth":this.minWidth}).placeAt(this.id);this._resizeEventHandle=dojo.connect(this._resizeHandler,"onResize",this,"_onResize");}},_removeLotusOneUIDiv:function(){if(this._lotusui_div){var _34=dojo.query("*",this._lotusui_div);if(_34.length===0){dojo.destroy(this._lotusui_div);this._lotusui_div=null;}}}});com.ibm.widgets.GenericDialog.resizeHandleCssId="com_ibm_widgets_GenericDialog_resizeHandleCssId";}if(!dojo._hasResource["com.ibm.widgets.GenericDialogWidget"]){dojo._hasResource["com.ibm.widgets.GenericDialogWidget"]=true;dojo.provide("com.ibm.widgets.GenericDialogWidget");dojo.registerModulePath("com.ibm.widgets","../com/ibm/widgets");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.widgets.GenericDialogWidget",[dijit._Widget,dijit._Templated,com.ibm.widgets._Traceable],{namespace:"someNamespace",templateString:null,_isTracing:false,_nlsMessages:{},_nlsUserInterface:{},constructor:function(_35){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_35);if(_35){this.trace(m,"p_params.nlsMessages:",dojo.toJson(_35.nlsMessages));this.trace(m,"p_params.nlsUserInterface:",dojo.toJson(_35.nlsUserInterface));}}if(_35){if(_35.nlsMessages&&dojo.isObject(_35.nlsMessages)){this._nlsMessages=_35.nlsMessages;}if(_35.nlsUserInterface&&dojo.isObject(_35.nlsUserInterface)){this._nlsUserInterface=_35.nlsUserInterface;}}if(this._isTracing){this.traceExit(m);}},doCancel:function(){var m="doCancel()";if(this._isTracing){this.traceEntry(m);}var _36={"returnCode":-1};if(this._isTracing){this.traceExit(m,_36);}return _36;},doConfirm:function(){var m="doConfirm()";if(this._isTracing){this.traceEntry(m);}var _37={"returnCode":0};if(this._isTracing){this.traceExit(m,_37);}return _37;},getDialogTitle:function(){var m="getDialogTitle()";if(this._isTracing){this.traceEntry(m);}var _38="Generic Dialog Widget's Title";if(this._isTracing){this.traceExit(m,_38);}return _38;},getNlsMessages:function(){var m="getNlsMessages()";if(this._isTracing){this.traceEntry(m);}var _39=this._nlsMessages;if(this._isTracing){this.traceExit(m,dojo.toJson(_39));}return _39;},getNlsUserInterface:function(){var m="getNlsUserInterface()";if(this._isTracing){this.traceEntry(m);}var _3a=this._nlsUserInterface;if(this._isTracing){this.traceExit(m,dojo.toJson(_3a));}return _3a;},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},postMixInProperties:function(){var m="postMixInProperties()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.cp.DojoLocalized"]){dojo._hasResource["com.ibm.cp.DojoLocalized"]=true;dojo.provide("com.ibm.cp.DojoLocalized");dojo.require("dojo.i18n");dojo.declare("com.ibm.cp.DojoLocalized",[com.ibm.mashups.enabler.Localized],{bundlePackage:"",bundleName:"",bundleKey:"",constructor:function(_3b){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.bundlePackage=_3b.bundlePackage;this.bundleName=_3b.bundleName;this.bundleKey=_3b.bundleKey;this._locales=[dojo.locale];var _3c=dojo.config&&dojo.config.extraLocale;if(_3c){this._locales.push.apply(this._locales,_3c);}dojo["require"+"Localization"](this.bundlePackage,this.bundleName);},_getBundle:function(_3d){var _3e="_getBundle",ret={};try{ret=dojo.i18n.getLocalization(this.bundlePackage,this.bundleName,_3d);this.LOGGER.trace(_3e,"Found bundle for locale ${0}",[_3d]);}catch(err){this.LOGGER.warning("_getBundle","Bundle not found for locale ${0}",[_3d]);}return ret;},getLocales:function(){var _3f="getLocales";this.LOGGER.entering(_3f,[]);if(!this._locales.filtered){this.LOGGER.trace(_3f,"Filtering locales",[]);this._locales=dojo.filter(this._locales,function(_40){var _41=this._getBundle(_40);var ret=_41[this.bundleKey]||_41[this.bundleKey+"_title"]||_41[this.bundleKey+"_description"];this.LOGGER.trace(_3f,"Does title or description exist for locale ${0}? ${1}",[_40,ret]);return ret;},this);this._locales.filtered=true;}this.LOGGER.exiting(_3f,[this._locales]);return this._locales;},getTitle:function(_42){var _43="getTitle";this.LOGGER.entering(_43,[_42]);var _44=this._getBundle(_42);var ret=_44[this.bundleKey+"_title"]||_44[this.bundleKey];this.LOGGER.exiting(_43,[_42]);return ret;},getDescription:function(_45){var _46="getDescription";this.LOGGER.entering(_46,[_45]);var ret=this._getBundle(_45)[this.bundleKey+"_description"];this.LOGGER.exiting(_46,[_45]);return ret;}});} dojo.provide("contentmapping.nls.contentmapping_picker_layer_en");dojo.provide("com.ibm.wps.contentmapping.nls.ContentMappingPickerUserInterface");com.ibm.wps.contentmapping.nls.ContentMappingPickerUserInterface._built=true;dojo.provide("com.ibm.wps.contentmapping.nls.ContentMappingPickerUserInterface.en");com.ibm.wps.contentmapping.nls.ContentMappingPickerUserInterface.en={"EDIT_CONTENTMAPPINGS":"Edit Associations...","CMEntityPickerDialog":{"warningResultsTruncatedMsg":"Showing only the first ${0} of ${1} total results"},"CMPickerDialog":{"dialogTooltip":"<h3>Associations</h3>Associations connect portal pages to web content and communities.<p/>For web content, associations connect a page with the site structure in the IBM Web Content Manager system. You can define a default association and multiple other associations, which are used for dynamic page resolution. When a page contains a web content association, web content viewers added to the page can automatically render the content specified by the association. In addition, a web content page template containing an association can create copies of content when you create a page with the template.<p/>","errorImgAlt":"Error","okButtonTitle":"OK","errorDivTitle":"Error","cancelLinkText":"Cancel","dialogTooltip_2":"For communities, associations connect a page with a community in IBM Connections. If a page is associated to a community, all community portlets on this page will focus on the associated IBM Connections community. Furthermore this page will dynamically be selected to render community content that is contained in the associated community. If multiple pages are associated to the same community, the community that's closest to the portal root page will be selected.","cancelLinkTitle":"Cancel","okButtonCaption":"OK"},"CMPickerPageWidget":{"strClickToDelete":"Click to delete","useParentButtonDefault":"Use default community from parent page","table_summary":"Table to display the associations of the current page","defaultBtnTooltip":"The default association identifies the web content that is rendered when you add an unconfigured web content viewer to the page. When creating a page from a template, the default association also indicates the site area to be copied when creating the page.","acDelegateBtnTooltip":"Select this option to delegate access control of displayed content to the page. Users who are authorized to view the page are also automatically assumed to have view access for all content under the associated site area. This setting can improve rendering performance and simplify security administration.","useParentButton":"Use ","altDeleteImg":"Delete","strClickToSelect":"Click to select"},"CMProviderLabels":{"ibm.connections.provider":{"title":"Community","thACDelegation":"","labelPublicPrivate":"Moderated","labelCopyToAllChildPages":"Copy updated community association to all ${0} child pages","header":"Associate the page \"${0}\" with an IBM Connections community","labelCopyToChildPagesUpToLevel":"Copy updated association to all ${0} child pages (up to ${1} levels beneath this one)","pickerButtonTooltip":"Click to select a community","labelPrivate":"Restricted","enableMembershipIntegrationTooltip":"Select this option to automatically grant access to this page to members of the associated community in IBM Connections. This access will be in addition to any access that is explicitly granted to this page. If you check this, \"User\" access to the parent page will not automatically grant access to this page, you will need to be added to this page explicitly or be a member of the community.","labelLaunchItemManageUITooltip":"Opens the Connections Web Interface of the Connections server in a separate window. You can create, edit and browse communities there, which can afterwards be selected in this dialog.","thDelete":"","labelCopyToAllDirectChildren":"Copy updated association to all ${0} direct child pages","pickerButton":"Select a community","useParentButtonNoMappingTooltip":"No association exists on the parent page","labelEnableMembershipIntegration":"Limit access to this page to only community members","propagateToChildrenTooltip":"Select this option to associate the selected community not only to this page but also to the child pages of this page.<br/><br/><b>Remark</b>: The value of the <i>Limit access to this page to only community members</i> check mark will not be copied down to child pages, since access control inheritance will automatically allow the members of the mapped community to view the subpages.","pickerButtonReplace":"Change community","thIsDefault":"","useParentButtonTooltip":"Use default community \"${0}\" from parent page","legend":"Community associations","noMappings":"No community association","labelLaunchItemManageUI":"Manage communities with IBM Connections","thMappingName":"Community"},"ibm.wcm.provider":{"thACDelegation":"Use Portal Page Security","pickerButton":"Add web content","legend":"Web Content Associations","title":"Web Content","thDelete":"","thIsDefault":"Default","pickerButtonTooltip":"Click to add web content","thMappingName":"Web Content","header":"Associate the page \"${0}\" with web content","isSystemText":"WCM Managed Page","noMappings":"No web content associations","thIsSystem":"Is-System"}},"CMPickerConfirmationDlgBundle":{"DialogMessageLabel":"Saving page associations now, persists them immediately. You will not be able to cancel your changes by clicking <b>Cancel</b> in the <b>Edit Page Properties</b> portlet.<br/><br/>Are you sure you want to save your changes?","CloseTitle":"Close Dialog","DialogTitle":"Saving Page Associations","ButtonSubmitTitle":"Yes","ButtonCancelTitle":"No"},"CMEntityPickerDialogTitles":{"ibm.connections.provider":{"title":"Select a community","searchlabel":"Find community:","searchTooltip":"You can search for communities, by typing in a partial or full title of a community here. The search term is case insensitive and the following wildcards are supported: <p/><p><b>?</b> matches any single character<br/><b>*</b> matches any number of characters</p><p>To run a prefix search, use <b>term*</b><br/>To run a suffix search, use <b>*term</b><br/>To run a contains search, use <b>*term*</b><br/></p>","noResults":"No communities found matching your search terms"},"ibm.wcm.provider":{"title":"Select a web content item"}},"CMPickerDialogWidget":{"loadingLabel":"Loading...","title":"Associations for \"${0}\""}};dojo.provide("com.ibm.wps.contentmapping.nls.ContentMappingPickerMessages");com.ibm.wps.contentmapping.nls.ContentMappingPickerMessages._built=true;dojo.provide("com.ibm.wps.contentmapping.nls.ContentMappingPickerMessages.en");com.ibm.wps.contentmapping.nls.ContentMappingPickerMessages.en={"pickerPageWidget":{"errorDuplicateMapping":"The association you were trying to add already exists.","errorJSONDataInvalid":"The server returned invalid data. The dialog cannot be initialized."},"utils":{"errorResolverNotAvail":"Resolver not available. Unable to lookup page title.","noTitleAvailableTitle":"A title for this resource is not available","errorPageNotFound":"The page with ID ${0} could not be found.","noTitleAvailableLabel":"No title available","noTitleLabel":"No title"},"srvCommunication":{"errorHttp410":"The requested resource is no longer available. (HTTP Status Code 410)","errorHttp411":"The request is invalid: Length Required. (HTTP Status Code 411)","errorHttp412":"The request is invalid: Precondition Failed. (HTTP Status Code 412)","errorHttp413":"The request is invalid: Request Entity Too Large. (HTTP Status Code 413)","errorFetchingData":"Fetching data from backend failed. If the problem persists, contact your system administrator.","errorHttp414":"The request is invalid: Request-URI Too Long. (HTTP Status Code 414)","errorHttp415":"The request is invalid: Unsupported Media Type. (HTTP Status Code 415)","errorHttp416":"The request is invalid: Requested Range Not Satisfiable. (HTTP Status Code 416)","errorHttp417":"The request is invalid: Expectation Failed. (HTTP Status Code 417)","errorDetailsHttp403":"Check the Ajax Proxy configuration.","errorHttp400":"The URL is not valid and could not be processed. (HTTP Status Code 400)","errorDetailsHttps401":"Check the security setup for HTTPS communication.","errorHttp401":"The request is not authorized and requires user authentication. (HTTP Status Code 401)","errorDetailsHttps403":"Check the Ajax Proxy configuration and the security setup for HTTPS communication.","errorHttp403":"The request is forbidden. (HTTP Status Code 403)","errorHttp404":"The requested URL was not found. (HTTP Status Code 404)","errorHttp405":"The request method is not allowed. (HTTP Status Code 405)","errorHttp406":"The request is not acceptable. (HTTP Status Code 406)","errorHttp407":"The request requires proxy authentication. (HTTP Status Code 407)","errorHttp408":"The request timed out. (HTTP Status Code 408)","errorHttp409":"The request could not be completed due to a conflict. (HTTP Status Code 409)","errorHttp500":"The server encountered an internal server error. (HTTP Status Code 500)","errorHttpGeneric":"An unknown error occurred. If the problem persists, contact your system administrator.","errorHttp501":"The server does not implement the functionality to fulfill this request. (HTTP Status Code 501)","errorHttp502":"The server - acting as a gateway - received an invalid response. (HTTP Status Code 502)","errorHttp503":"The server is currently unable to handle the request. (HTTP Status Code 503)","errorHttp504":"The server - acting as a gateway - did not receive a timely response. (HTTP Status Code 504)","errorHttp505":"The server does not support this HTTP version. (HTTP Status Code 505)","errorNoDefaultMapping":"No default association for parent page found."},"EDIT_CONTENTMAPPINGS":"Edit Content Mappings..."}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("contentmapping.nls.contentmapping_picker_layer",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.wps.contentmapping.menucontribution.CMContextMenuLoadDeferred"]){dojo._hasResource["com.ibm.wps.contentmapping.menucontribution.CMContextMenuLoadDeferred"]=true;dojo.provide("com.ibm.wps.contentmapping.menucontribution.CMContextMenuLoadDeferred");dojo.registerModulePath("com.ibm.wps.contentmapping.menucontribution","../com/ibm/wps/contentmapping/menucontribution");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.wps.contentmapping.menucontribution.CMContextMenuLoadDeferred",[com.ibm.mashups.enabler.Deferred,com.ibm.widgets._Traceable],{constructor:function(_1,_2,_3){this._isTracing=this.isTracing();this.context=_1;this.startfn=_2;this.params=_3;},setFinishedCallback:function(_4,_5){var m="setFinishedCallback(callback, parameters)";if(this._isTracing){this.traceEntry(m,[_4,_5]);}this.callbackFn=_4;this.callbackParams=_5;if(this._isTracing){this.traceExit(m,this);}return this;},start:function(_6){var m="start(sync)";if(this._isTracing){this.traceEntry(m,_6);}var _7=(_6||typeof (_6)=="undefined")?true:false;var _8=dojo.hitch(this.context,this.startfn)(this,_7,this.params);if(this._isTracing){this.traceExit(m,_8);}return _8;},finish:function(_9,_a){var m="finish(res, status)";if(this._isTracing){this.traceEntry(m,[_9,_a]);}var _b=this.getFinishedCallback(),_c=this.getFinishedCallbackParameters();if(_b&&!this._finished){this._finished=true;_b(_9,_a,_c);}if(this._isTracing){this.traceExit(m);}},getFinishedCallback:function(){return this.callbackFn;},getFinishedCallbackParameters:function(){return this.callbackParams;}});}if(!dojo._hasResource["com.ibm.wps.contentmapping.utils.CMPickerConfig"]){dojo._hasResource["com.ibm.wps.contentmapping.utils.CMPickerConfig"]=true;dojo.provide("com.ibm.wps.contentmapping.utils.CMPickerConfig");dojo.registerModulePath("com.ibm.wps.contentmapping.utils.","../com/ibm/wps/contentmapping/utils");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.wps.contentmapping.utils.CMPickerConfig",[com.ibm.widgets._Traceable],{_navModel:null,_pageIDOverride:null,constructor:function(_d){this._isTracing=this.isTracing();var m="constructor()";if(this._isTracing){this.traceEntry(m,dojo.toJson(_d));}if(_d){this._pageIDOverride=_d.pageID;}this._navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();if(this._isTracing){this.traceExit(m);}},getMyContentHandlerBaseUrl:function(){var m="getMyContentHandlerBaseUrl()";if(this._isTracing){this.traceEntry(m);}var _e="";if(location&&location.protocol&&location.host&&ibmPortalConfig&&ibmPortalConfig.contentHandlerURI){_e=(location.protocol+"//"+location.host+ibmPortalConfig.contentHandlerURI);}if(this._isTracing){this.traceExit(m,_e);}return _e;},getCMAtomDataSourceBaseUrl:function(){var m="getCMAtomDataSourceBaseUrl()";if(this._isTracing){this.traceEntry(m);}var _f=this.addParamToURL(this.getMyContentHandlerBaseUrl(),"uri",com.ibm.wps.contentmapping.utils.CMPickerConfig.CONTENTMAPPING_ATOM_DATASOURCE_PREFIX);if(this._isTracing){this.traceExit(m,_f);}return _f;},addParamToURL:function(url,_10,_11){if(url&&_10){var _12=null;var _13=url.lastIndexOf("#");var _14=null;if(_13>-1){_14=url.substring(_13);_12=url.substring(0,_13);}else{_12=url;}var _15=null;var _16=_12.indexOf("?");if(_16!=-1){var _17=_12.lastIndexOf(";",_16);if(_17!=-1){_15=_12.substring(_17);_12=_12.substring(0,_17);}if(_12.length-1>_16){_12=_12+"&";}}else{_12=_12+"?";}if(_11){if(_11 instanceof Array){for(i=0;i<_11.length;i++){_12=_12+encodeURIComponent(_10)+"="+encodeURIComponent(_11[i]);if(i+1<_11.length){_12=_12+"&";}}}else{_12=_12+encodeURIComponent(_10)+"="+encodeURIComponent(_11);}}else{_12=_12+encodeURIComponent(_10)+"=";}if(_15){_12=_12+_15;}if(_14){_12=_12+_14;}return _12;}else{return url;}},getCurrentPage:function(){var m="getCurrentPage()";if(this._isTracing){this.traceEntry(m);}var _18="";if(this._navModel){_18=this._navModel.find(this.getCurrentPageID()).start();}if(this._isTracing){this.traceExit(m,_18);}return _18;},getCurrentResourceID:function(){var m="getCurrentResourceID()";if(this._isTracing){this.traceEntry(m);}var _19="";var _1a=this.getCurrentPage();if(_1a){var _1b=_1a.getContent().start();_19=_1b.getID();}if(this._isTracing){this.traceExit(m,_19);}return _19;},hasPageEditorRights:function(){var m="hasPageEditorRights()";if(this._isTracing){this.traceEntry(m);}var _1c;var _1d=this.getCurrentPage();if(_1d){_1c=_1d.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);}if(this._isTracing){this.traceExit(m,_1c);}return _1c;},getCurrentPageID:function(){var m="getCurrentPageID()";if(this._isTracing){this.traceEntry(m);}var _1e="";if(this._pageIDOverride){_1e=this._pageIDOverride;}else{if(ibmPortalConfig){_1e=ibmPortalConfig.currentPageOID;}}if(this._isTracing){this.traceExit(m,_1e);}return _1e;}});com.ibm.wps.contentmapping.utils.CMPickerConfig.COMMUNITY_DATASOURCE_URL="iccmty/all";com.ibm.wps.contentmapping.utils.CMPickerConfig.CONTENTMAPPING_ATOM_DATASOURCE_PREFIX="contentmapping:oid:";com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_WCM="ibm.wcm.provider";com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_CONNECTIONS="ibm.connections.provider";com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDERS={"ibm.wcm.provider":{feedQueryUrl:"",schemaPrefix:"",scopeProvider:"ibm.wcm.provider",getEntries:"",feedQueryUrlTemplate:"",feedSupportsSearch:false,feedSearchParam:"",showTruncationMessage:false},"ibm.connections.provider":{feedQueryUrl:"iccmty/all",schemaPrefix:"",scopeProvider:"ibm.connections.provider",getEntries:function(_1f){if(_1f&&_1f.communities){return _1f.communities;}else{return [];}},feedQueryUrlTemplate:"iccmty/all?search=${searchTerm}",feedSupportsSearch:true,feedSearchParam:"searchTerm",showTruncationMessage:true}};}if(!dojo._hasResource["com.ibm.wps.contentmapping.menucontribution.CMContextMenuLoader"]){dojo._hasResource["com.ibm.wps.contentmapping.menucontribution.CMContextMenuLoader"]=true;dojo.provide("com.ibm.wps.contentmapping.menucontribution.CMContextMenuLoader");dojo.registerModulePath("com.ibm.wps.contentmapping.menucontribution","../com/ibm/wps/contentmapping/menucontribution");dojo.require("com.ibm.cp.DojoLocalized");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.wps.contentmapping.menucontribution.CMContextMenuLoader",[com.ibm.mashups.builder.model.ContextMenuLoader,com.ibm.widgets._Traceable],{constructor:function(){this._isTracing=this.isTracing();this._config=new com.ibm.wps.contentmapping.utils.CMPickerConfig();},actions:[{bundlePackage:"com.ibm.wps.contentmapping",bundleName:"ContentMappingPickerUserInterface",bundleKey:"EDIT_CONTENTMAPPINGS",ordinal:80,enabled:true,actionMethod:"launchContentMappingPickerDialog",id:"CM:edit"}],getItems:function(_20,_21,_22,_23){var m="getItems(contextMenuId, targetResourceId, targetResourceType, someObject)";if(this._isTracing){this.traceEntry(m,[_20,_21,_22,_23]);}var me=this;var dfd=new com.ibm.wps.contentmapping.menucontribution.CMContextMenuLoadDeferred(this,function(_24,_25,_26){var res=me._initItems(_20,_21,_22,_23);_24.finish(res,200);return res;});if(this._isTracing){this.traceExit(m,dfd);}return dfd;},onChange:function(){},_initItems:function(_27,_28,_29,_2a){var m="_initItems(contextMenuId, targetResourceId, targetResourceType, someObject)";if(this._isTracing){this.traceEntry(m,[_27,_28,_29,_2a]);}var ret=[];var _2b=this._config.hasPageEditorRights();dojo.forEach(this.actions,function(_2c){if(_2b){var _2d=new com.ibm.cp.DojoLocalized({bundlePackage:_2c.bundlePackage,bundleName:_2c.bundleName,bundleKey:_2c.bundleKey});ret.push({localized:_2d,ordinal:_2c.ordinal,enabled:_2c.enabled,id:_2c.id,actionCallBackFunction:this[_2c.actionMethod]});}},this);if(this._isTracing){this.traceExit(m,ret);}return ret;},launchContentMappingPickerDialog:function(){var m="launchContentMappingPickerDialog()";if(this._isTracing){this.traceEntry(m);}dojo["require"]("com.ibm.wps.contentmapping.widget.CMPickerDialogWidget");dojo["require"]("com.ibm.wps.contentmapping.dialog.ContentMappingPickerDialog");var _2e=new com.ibm.wps.contentmapping.widget.CMPickerDialogWidget();var _2f=new com.ibm.wps.contentmapping.dialog.ContentMappingPickerDialog({"widgetInstance":_2e});_2f.show();var _30=window.setTimeout(function(){if(_2f.domNode&&_2f.domNode.style.display!="none"){_2f.layout();}window.clearTimeout(_30);},1);if(this._isTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.wps.contentmapping.dialog.EntitySelectDialog"]){dojo._hasResource["com.ibm.wps.contentmapping.dialog.EntitySelectDialog"]=true;dojo.provide("com.ibm.wps.contentmapping.dialog.EntitySelectDialog");dojo.require("dojo.i18n");dojo.require("com.ibm.widgets.ResourceSelectDialog");dojo.require("dojox.atom.io.model");dojo.require("dojox.atom.io.Connection");dojo.declare("com.ibm.wps.contentmapping.dialog.EntitySelectDialog",[com.ibm.widgets.ResourceSelectDialog],{_CMInterfaceMessagesBundle:null,_scopeProviderSettings:{},_maxTooltipWidth:"550px",constructor:function(_31){this._scopeProviderSettings=_31;if(_31&&_31.selectedResourceId){this.selectedResourceId=_31.selectedResourceId;}},postMixInProperties:function(){this.inherited(arguments);this._CMInterfaceMessagesBundle=dojo.i18n.getLocalization("com.ibm.wps.contentmapping","ContentMappingPickerUserInterface");this.nlsResourceSelectTitle=this._CMInterfaceMessagesBundle.CMEntityPickerDialogTitles[this._scopeProviderSettings.scopeProvider].title;this.nlsPersonLabel=this.dialogBundle.template_dialog_owned_by;this.nlsNoUser=this.dialogBundle.template_dialog_no_owner;this.nlsResourceTableSummary=this.dialogBundle.template_dialog_table_summary;this.nlsSearchResourcesLabel=this._CMInterfaceMessagesBundle.CMEntityPickerDialogTitles[this._scopeProviderSettings.scopeProvider].searchlabel;this.nlsNoResults=this._CMInterfaceMessagesBundle.CMEntityPickerDialogTitles[this._scopeProviderSettings.scopeProvider].noResults;this.nlsTypeLabels={"PRIVATE":this._CMInterfaceMessagesBundle.CMProviderLabels[this._scopeProviderSettings.scopeProvider].labelPrivate,"PUBLIC_INVITE_ONLY":this._CMInterfaceMessagesBundle.CMProviderLabels[this._scopeProviderSettings.scopeProvider].labelPublicPrivate,"PUBLIC":""};this.nlsSearchTooltip="<div style=\"max-width: "+this._maxTooltipWidth+";\"/>"+this._CMInterfaceMessagesBundle.CMEntityPickerDialogTitles[this._scopeProviderSettings.scopeProvider].searchTooltip+"</div>";this.searchCssClass="CMPickerHelpIcon";this.feedQueryUrl=this._scopeProviderSettings.feedQueryUrl;},_populateResourceSelector:function(){var _32=this.resourceSelector;this.selectorWidget=new com.ibm.widgets.ResourceSelector({feedQueryUrl:this.feedQueryUrl,atomFeed:false,entryStartIndex:1,_processEntryResultsBeforeStoring:dojo.partial(this._processEntryResultsBeforeStoring,this._scopeProviderSettings),_getEntriesFromJsonFeed:dojo.partial(this._getEntriesFromJsonFeed,this._scopeProviderSettings),getAvailableResourcesCount:this.getAvailableResourcesCount,getMaxResourcesCount:this.getMaxResourcesCount,feedQueryUrlTemplate:this._scopeProviderSettings.feedQueryUrlTemplate,feedSupportsSearch:this._scopeProviderSettings.feedSupportsSearch,feedSearchParam:this._scopeProviderSettings.feedSearchParam,warningIconClass:"CMPickerWarningIcon",showTruncationMessage:this._scopeProviderSettings.showTruncationMessage,nlsTruncationMsg:this._CMInterfaceMessagesBundle.CMEntityPickerDialog.warningResultsTruncatedMsg,nlsSearchTooltip:this.nlsSearchTooltip,searchCssClass:this.searchCssClass,nlsPersonLabel:this.nlsPersonLabel,nlsNoUser:this.nlsNoUser,nlsResourceTableSummary:this.nlsResourceTableSummary,nlsSearchResourcesLabel:this.nlsSearchResourcesLabel,nlsNoResources:this.nlsNoResults,nlsTypeLabels:this.nlsTypeLabels,selectedResourceId:this.selectedResourceId},_32);},getAvailableResourcesCount:function(_33){if(_33&&_33.itemsListed){if(dojo.isString(_33.itemsListed)){return parseInt(_33.itemsListed,10);}else{return _33.itemsListed;}}else{return 0;}},getMaxResourcesCount:function(_34){if(_34&&_34.totalResults){if(dojo.isString(_34.totalResults)){return parseInt(_34.totalResults,10);}else{return _34.totalResults;}}else{return 0;}},_getEntriesFromJsonFeed:function(_35,_36){var _37=this.resourceData;var me=this;var _38=null;var _39=dojo.xhrGet({url:_36,sync:true,handleAs:"json",preventCache:true,load:function(_3a){_38=_3a;},error:function(_3b){console.debug("ResourceSelector _getEntriesFromJsonFeed ERROR");console.debug(_3b);}});if(_38){var _3c=_38;var _3d=this.getAvailableResourcesCount(_38);var _3e=this.getMaxResourcesCount(_38);if(_3e>_3d){this._showTruncationMsgDiv(_3d,_3e);}else{this._hideTruncationMsgDiv();}if(dojo.isFunction(_35.getEntries)){_3c=_35.getEntries(_38);}if(_3c){var _3f=this.resourceData;var _40=this.selectedResourceId;dojo.forEach(_3c,function(_41){var ctr=_37.length;var _42=_41.id;var _43=false;if(_40&&_40.length>0){_43=(_40===_42);}else{if(ctr===0){_43=true;}}var _44=_41.title;var _45=_41.description;if(_45===null){_45="";}var _46=_41.owner;var _47=_41.ownerId;var _48=_41.type;var _49={id:_42,title:_44,description:_45,user:_46,ownerId:_47,selected:_43,type:_48};var _4a=dojo.hitch(me,me._processEntryResultsBeforeStoring);_49=_4a(_49);_37[ctr]=_49;});}}},_processEntryResultsBeforeStoring:function(_4b,_4c){if(_4c){var _4d=_4c.id;if(_4b&&_4b.schemaPrefix&&dojo.isString(_4b.schemaPrefix)){_4c.id=this._stripOffPrefix(_4d,_4b.schemaPrefix);}var _4e=this.selectedResourceId;var _4f=false;if(_4e&&_4e.length>0&&(_4e===_4d)){_4c.selected=true;}}return _4c;}});}if(!dojo._hasResource["com.ibm.wps.contentmapping.utils.CMDialogLauncher"]){dojo._hasResource["com.ibm.wps.contentmapping.utils.CMDialogLauncher"]=true;dojo.provide("com.ibm.wps.contentmapping.utils.CMDialogLauncher");dojo.registerModulePath("com.ibm.wps.contentmapping.utils.","../com/ibm/wps/contentmapping/utils");dojo.require("com.ibm.widgets._Traceable");dojo.require("ibm.toolbar.ModalDialog");dojo.declare("com.ibm.wps.contentmapping.utils.CMDialogLauncher",[com.ibm.widgets._Traceable],{_CMInterfaceMessagesBundle:null,_WCMDialogTitle:"",_entitySelectDlgDeferredList:null,_pickerConfig:null,constructor:function(){this._isTracing=this.isTracing();var m="constructor()";if(this._isTracing){this.traceEntry(m);}this._CMInterfaceMessagesBundle=dojo.i18n.getLocalization("com.ibm.wps.contentmapping","ContentMappingPickerUserInterface");this._pickerConfig=new com.ibm.wps.contentmapping.utils.CMPickerConfig();this._WCMDialogTitle=this._CMInterfaceMessagesBundle.CMEntityPickerDialogTitles[com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_WCM].title;if(this._isTracing){this.traceExit(m);}},launchEntitySelectDialog:function(_50){var m="launchEntitySelectDialog(p_params)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_50));}var _51=com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDERS[_50.scopeProvider];_51.selectedResourceId=_50.selectedResourceId;if(_51&&_51.feedQueryUrl&&_51.scopeProvider&&dojo.isFunction(_51.getEntries)){var dlg=new com.ibm.wps.contentmapping.dialog.EntitySelectDialog(_51);var _52=[];if(_50.onComplete&&dojo.isFunction(_50.onComplete)){var _53=new dojo.Deferred();dojo.connect(dlg,"onChange",null,dojo.hitch(this,dojo.partial(function(_54,_55,_56){if(_56){_56.scopeProvider=_54;}_55.callback(_56);},_51.scopeProvider,_53)));_52.push(_53);var _57=new dojo.Deferred();dojo.connect(dlg,"onSubmit",null,dojo.hitch(this,dojo.partial(function(_58,_59){_58.callback(_59);},_57)));_52.push(_57);this._entitySelectDlgDeferredList=new dojo.DeferredList(_52);this._entitySelectDlgDeferredList.addCallback(dojo.hitch(this,function(_5a){_50.onComplete(_5a[0][1]);}));}if(_50.onCancel&&dojo.isFunction(_50.onCancel)){dojo.connect(dlg,"cancel",null,_50.onCancel);}if(dlg.focus){dlg.focus();}else{dlg.show();}}else{if(_51&&_51.scopeProvider){if(_51.scopeProvider==com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_WCM){this._launchWCMPickerDialog(_50);}}}if(this._isTracing){this.traceExit(m);}},_launchWCMPickerDialog:function(_5b){var m="_launchWCMPickerDialog(p_params)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_5b));}var _5c="?uri=dialog:wcm&view=folder";var _5d=new ibm.toolbar.ModalDialog();_5d.open(_5c,dojo.hitch(this,function(_5e,_5f){if(_5f===null){if(_5b.onCancel&&dojo.isFunction(_5b.onCancel)){_5b.onCancel();}}else{if(_5b.onComplete&&dojo.isFunction(_5b.onComplete)){if(_5f&&dojo.isArrayLike(_5f)){if(_5f.length>0){var _60=_5f[0].selectedId;var _61=this._getAdditionalInfoForContentItem(_60);_61.addCallback(dojo.partial(dojo.hitch(this,function(_62,_63){var _64={"resourceValue":_62.selectedId,"resourceName":_63.title,"resourceDescription":_63.desc,"resourcePath":_62.displayTitle,"scopeProvider":com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_WCM};_5b.onComplete(_64);}),_5f[0]));_61.addErrback(dojo.partial(dojo.hitch(this,function(_65,_66){var _67={"resourceValue":_65.selectedId,"resourcePath":_65.displayTitle,"scopeProvider":com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_WCM};_5b.onComplete(_67);}),_5f[0]));}}}}}),this._WCMDialogTitle);if(this._isTracing){this.traceExit(m);}},_getAdditionalInfoForContentItem:function(_68){var m="_getAdditionalInfoForContentItem(p_contentItemID)";if(this._isTracing){this.traceEntry(m,_68);}var _69=new dojo.Deferred();var _6a=this._pickerConfig.addParamToURL(this._pickerConfig.getMyContentHandlerBaseUrl(),"uri","wcm:oid:"+_68);_6a=this._pickerConfig.addParamToURL(_6a,"mode","download");_6a=this._pickerConfig.addParamToURL(_6a,"view","summary");_6a=this._pickerConfig.addParamToURL(_6a,"prop","desc");_6a=this._pickerConfig.addParamToURL(_6a,"prop","title");var _6b={url:_6a,handleAs:"json",load:function(_6c,_6d){_69.callback(_6c,_6d);},error:function(_6e,_6f){_69.errback(_6e,_6f);}};dojo.xhrGet(_6b);if(this._isTracing){this.traceExit(m,_69);}return _69;}});}if(!dojo._hasResource["com.ibm.wps.contentmapping.widget.CMPickerPageWidget"]){dojo._hasResource["com.ibm.wps.contentmapping.widget.CMPickerPageWidget"]=true;dojo.provide("com.ibm.wps.contentmapping.widget.CMPickerPageWidget");dojo.registerModulePath("com.ibm.wps.contentmapping.widget.","../com/ibm/wps/contentmapping/widget");dojo.require("dojo.string");dojo.require("dijit.layout.ContentPane");dojo.require("dijit.Tooltip");dojo.require("dijit._Templated");dojo.require("com.ibm.widgets._Traceable");dojo.require("dijit.form.Button");dojo.require("dijit.form.CheckBox");dojo.declare("com.ibm.wps.contentmapping.widget.CMPickerPageWidget",[dijit.layout.ContentPane,dijit._Templated,com.ibm.widgets._Traceable],{namespace:"CMPickerPageWidget",templateString:"<div dojoAttachPoint=\"CMPickerPageWidgetDiv\" class=\"CMPickerPageWidgetDiv\">\n <div dojoAttachPoint=\"containerNode\">\n <form class=\"lotusDialog lotusForm2 CMPickerPageWidgetForm\" aria-labelledby=\"${id}_header_id\" \n role=\"form\" dojoAttachPoint=\"CMPickerPageWidgetForm\" action=\"javascript:;\">\n <div class=\"CMPickerPageWidgetFormContent\" dojoAttachPoint=\"CMPickerPageWidgetFormContent\">\n <p class=\"CMPHeader\">\n <span id=\"${id}_header_id\" role=\"heading\" class=\"CMPHeader\">\n ${nlsHeader}\n </span>\n </p>\n <p>\n <button class=\"lotusBtn\" href=\"javascript:void(0);\" dojoattachpoint=\"pickerButton\" \n title=\"${nlsPickerButtonTooltip}\">${nlsPickerButton}</button>&nbsp;&nbsp;\n <button class=\"lotusBtn lotusBtnDisabled\" href=\"javascript:void(0);\" dojoattachpoint=\"useParentButton\" style=\"display:none;\" \n disabled=\"disabled\">${nlsUseParentButton}</button>\n <a class=\"manageUrl\" href=\"javascript:void(0);\" dojoAttachPoint=\"launchManageUrl\" style=\"display:none;\">${nlsLaunchItemManageUI}</a>\n </p>\n <p></p>\n <fieldset style=\"float:none;\">\n <legend style=\"display:none;\">\n ${nlsLegend}\n </legend>\n <table dojoAttachPoint=\"CMPickerPageWidgetTable\" class=\"lotusTable lotusClear\" border=\"0\" \n cellSpacing=\"0\" cellPadding=\"0\" summary=\"${nlsTableSummary}\">\n <tbody dojoAttachPoint=\"CMPickerPageWidgetTableBody\">\n <tr>\n <td class=\"lotusFirstCell noMappingsCell CMPCell\" tabindex=\"0\" aria-describedby=\"${id}_noMappingSpan\">\n <span class=\"CMPMappingLabel\" id=\"${id}_noMappingSpan\">\n ${nlsNoMappings}\n </span>\n </td>\n </tr>\n </tbody>\n </table>\n <p></p>\n <div dojoAttachPoint=\"membershipIntegrationDIV\" class=\"CMPickerMembershipIntgCheckBox lotusHidden\">\n </div>\n <div dojoAttachPoint=\"propagateToChildrenDIV\" class=\"CMPickerTopologyCheckBox greenBkgr lotusHidden\">\n </div>\n </fieldset>\n </div>\n </form>\n </div>\n</div>\n",placeForVerticalScrollbar:0,placeForHorizontalScrollbar:0,membershipIntegrationEnabled:false,widgetsInTemplate:true,blankImgUrl:dojo.moduleUrl("dojo","resources/blank.gif").toString(),_acDelegateTableHeaderColumn:null,_acHelpIcon:null,_defaultHelpIcon:null,_membershipHelpIcon:null,_defaultTableHeaderColumn:null,_errorState:false,_propagationCheckbox:null,_membershipIntgCheckbox:null,_scopeprovider:null,_selectedRow:null,_selectedDescription:null,_nlsMessages:{},_nlsUserInterface:{},_initialMinSize:{"w":100,"h":50},_eventHandlers:[],_managedMappings:[],_mappingToUIMap:{},_maxTooltipWidth:"550px",_initializedWidgets:[],_providerlabels:null,constructor:function(_70){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m);if(_70){this.trace(m,"p_params.scopeprovider:",dojo.toJson(_70.scopeprovider));this.trace(m,"p_params.pageName:",_70.pageName);}}this._acDelegateTableHeaderColumn=null;this._defaultTableHeaderColumn=null;this._propagationCheckbox=null;this._membershipIntgCheckbox=null;this._scopeprovider=_70.scopeprovider;this._nlsMessages=_70.nlsMessages;this._nlsUserInterface=_70.nlsUserInterface;this._managedMappings=this._managedMappings.concat(dojo.filter(_70.scopeprovider.contentmappings,function(_71){return _71.isSystem===true;})).concat(dojo.filter(_70.scopeprovider.contentmappings,function(_72){return _72.isSystem!==true;}));if(this._nlsUserInterface){this.nlsTableSummary=this._nlsUserInterface[this.namespace].table_summary;this.nlsClickToSelect=this._nlsUserInterface[this.namespace].strClickToSelect;this.nlsClickToDelete=this._nlsUserInterface[this.namespace].strClickToDelete;this.nlsUseParentButton=this._nlsUserInterface[this.namespace].useParentButtonDefault;var _73=_70.pageName;if(this._scopeprovider&&this._scopeprovider.name){this._providerlabels=this._nlsUserInterface.CMProviderLabels[this._scopeprovider.name];this.title=this._providerlabels.title;this.nlsNoMappings=this._providerlabels.noMappings;this.nlsLegend=this._providerlabels.legend;this.nlsHeader=dojo.string.substitute(this._providerlabels.header,[_73]);this.nlsPickerButton=this._providerlabels.pickerButton;this.nlsLaunchItemManageUI=this._providerlabels.labelLaunchItemManageUI||"";this.nlsPickerButtonTooltip=this._providerlabels.pickerButtonTooltip;if(!this._scopeprovider.supportsMultipleMappings&&this._scopeprovider.contentmappings&&this._scopeprovider.contentmappings.length>0){this.nlsPickerButton=this._providerlabels.pickerButtonReplace;}}else{if(this._isTracing){this.error(m,"Scopeprovider not set or name not available");}}}else{if(this._isTracing){this.error(m,"NLS data not available");}}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this._createUseParentButton();if(this._scopeprovider.manageItemsURL){this._enableManageItemsLink();}var _74=this._managedMappings;if(_74&&_74.length>0){var _75=this.CMPickerPageWidgetTableBody;this._removeAllChildNodes(_75);this._createTableHeaders();this._preProcessSystemDefaultMappings(_74);dojo.forEach(_74,function(_76,i){this._createTableEntry(_76,i);},this);}this._createMembershipIntegrationCheckbox();this._initEventHandlers();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},startup:function(){this._createTopologyPropagationCheckbox(this._scopeprovider.childPropagationCount,this._scopeprovider.pagePropagationLevels);this._createHelpTooltips();},changeSize:function(_77,_78,_79){var m="changeSize()";if(this._isTracing){this.traceEntry(m,dojo.toJson(_77));}dojo.marginBox(this.domNode,{"w":_77.w,"h":_77.h});this.placeForHorizontalScrollbar=_78;this.placeForVerticalScrollbar=_79;this.layout();if(this._isTracing){this.traceExit(m);}},layout:function(){var m="layout()";if(this._isTracing){this.traceEntry(m);}var _7a=Math.max(dojo.marginBox(this.domNode).w,this._initialMinSize.w);var _7b=Math.max(dojo.marginBox(this.domNode).h,this._initialMinSize.h);if(this._isTracing){this.trace(m,"widthToSet:",_7a);this.trace(m,"heightToSet:",_7b);}dojo.marginBox(this.containerNode,{"w":_7a-this.placeForVerticalScrollbar,"h":_7b-this.placeForHorizontalScrollbar});dojo.style(this.CMPickerPageWidgetFormContent,"height","100%");dojo.style(this.CMPickerPageWidgetTable,"width","100%");if(!dojo.isIE){if(this.placeForVerticalScrollbar>0){dojo.style(this.CMPickerPageWidgetDiv,{"overflow-y":"auto","overflowY":"auto"});}else{dojo.style(this.CMPickerPageWidgetDiv,{"overflow-y":"hidden","overflowY":"hidden"});}if(this.placeForHorizontalScrollbar>0){dojo.style(this.CMPickerPageWidgetDiv,{"overflow-x":"auto","overflowX":"auto"});}else{dojo.style(this.CMPickerPageWidgetDiv,{"overflow-x":"hidden","overflowX":"hidden"});}}if(this._isTracing){this.traceExit(m);}},getMinSize:function(){var m="getMinSize()";if(this._isTracing){this.traceEntry(m);}dojo.marginBox(this.containerNode,{"w":1000,"h":800});dojo.style(this.CMPickerPageWidgetTable,"width","auto");var _7c=Math.max(dojo.marginBox(this.CMPickerPageWidgetTable).w,600);dojo.marginBox(this.containerNode,{"w":_7c,"h":800});dojo.style(this.CMPickerPageWidgetFormContent,"height","auto");var _7d=Math.max(dojo.marginBox(this.CMPickerPageWidgetFormContent).h,200);dojo.style(this.CMPickerPageWidgetFormContent,"height","100%");dojo.style(this.CMPickerPageWidgetTable,"width","100%");var _7e={"w":_7c,"h":_7d};if(this._isTracing){this.traceExit(m,dojo.toJson(_7e));}return _7e;},getManagedMappings:function(){var m="getManagedMappings()";if(this._isTracing){this.traceEntry(m);this.traceExit(m,dojo.toJson(this._managedMappings));}return this._managedMappings;},getScopeProviderName:function(){var m="getScopeProviderName()";if(this._isTracing){this.traceEntry(m);}var _7f=this._scopeprovider.name;if(this._isTracing){this.traceExit(m,_7f);}return _7f;},isMappingPropagationEnabled:function(){var m="isMappingPropagationEnabled()";if(this._isTracing){this.traceEntry(m);}var _80;if(this._scopeprovider.supportsTopologyOperations){if(this._propagationCheckbox){_80=this._propagationCheckbox.attr("checked")?true:false;}else{_80=false;}}else{_80=false;}if(this._isTracing){this.traceExit(m,_80);}return _80;},hasMembershipIntegrationEnabled:function(){var _81=(this.membershipIntegrationEnabled&&(this.membershipIntegrationEnabled!==this._scopeprovider.membershipIntegrationEnabled));if(this._isTracing){this.traceExit("hasMembershipIntegrationEnabled");}return _81;},hasMembershipIntegrationDisabled:function(){var _82=(!this.membershipIntegrationEnabled&&(this.membershipIntegrationEnabled!==this._scopeprovider.membershipIntegrationEnabled));if(this._isTracing){this.traceExit("hasMembershipIntegrationDisabled");}return _82;},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this._destroyHelpTooltips();this._clearEventHandlers();dojo.forEach(this._initializedWidgets,function(_83){if(dojo.exists("destroyRecursive",_83)){_83.destroyRecursive();}});this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},onChange:function(){},onLayoutChange:function(){},onErrorStateChanged:function(_84,_85,_86,_87){},_createTableHeaders:function(){var m="_createTableHeaders()";if(this._isTracing){this.traceEntry(m);}if(this._scopeprovider&&this._scopeprovider.name){if(this._scopeprovider.supportsAccessControlDelegation||this._scopeprovider.supportsMultipleMappings){var _88=this.CMPickerPageWidgetTableBody;var tr=dojo.create("tr",{className:"lotusFirst lotusSort"},_88);if(this._scopeprovider.supportsMultipleMappings){var th1=this._defaultTableHeaderColumn=dojo.create("th",{id:this._scopeprovider.name+"_columnheader_default",className:"lotusFirstCell CMPFirstCell CMPTableHeaderLabel CMPControlHeaderCell",innerHTML:this._providerlabels.thIsDefault,scope:"col"},tr);}var th3=dojo.create("th",{id:this._scopeprovider.name+"_columnheader_mapping",className:"CMPTableHeaderLabel",innerHTML:this._providerlabels.thMappingName,scope:"col"},tr);if(this._scopeprovider.supportsAccessControlDelegation){var th5=this._acDelegateTableHeaderColumn=dojo.create("th",{id:this._scopeprovider.name+"_columnheader_acdelegate",className:"CMPTableHeaderLabel CMPControlHeaderCell",innerHTML:this._providerlabels.thACDelegation,scope:"col"},tr);}var th6=dojo.create("th",{id:this._scopeprovider.name+"_columnheader_delete",className:"lotusLastCell CMPLastCell CMPTableHeaderLabel CMPControlHeaderCell",innerHTML:this._providerlabels.thDelete,scope:"col"},tr);}}else{if(this._isTracing){this.error(m,"Scopeprovider not set or name not available");}return;}if(this._isTracing){this.traceExit(m);}},_createTableEntry:function(_89,idx){var m="_createTableEntry()";if(this._isTracing){this.traceEntry(m,dojo.toJson(_89),idx);}var _8a=this.CMPickerPageWidgetTableBody;var id=_89.id;var _8b=(_89.rtl?"rtl":"ltr");var _8c=this._nlsMessages.utils.noTitleLabel;var _8d=_89.id;var _8e=true;if(dojo.isString(_89.title)){_8c=_89.title;_8d=_8c;_8e=false;}var _8f;if((typeof _89.warning)!=="undefined"){_8f=false;_8d=_89.id;_8e=true;}else{_8f=true;}var _90=4;var _91;var _92;var _93;var tr1=dojo.create("tr",{id:"tr1_"+id},_8a);var td1=dojo.create("td",{className:"lotusFirstCell CMPFirstCell CMPControlCell"},tr1);if(this._scopeprovider.supportsMultipleMappings){var _94=dojo.create("div",null,td1);_91=new dijit.form.RadioButton({name:"isDefault",title:this._providerlabels.thIsDefault,value:id,checked:((typeof _89.isDefault)=="undefined"?false:_89.isDefault),id:id+"_default_association_"+idx,className:"lotusCheckbox",onChange:dojo.hitch(this,this._changeMapping,id,_89.scope,"isDefault")},_94);this._initializedWidgets.push(_91);}var td3=dojo.create("td",{tabindex:"0",className:"CMPCell","aria-describedby":id+"_label_"+idx},tr1);var _95=dojo.create("span",{className:"CMPCell"},td3);var _96=this._nlsMessages.utils.noTitleAvailableTitle;if(_8f===false){_8c=this._nlsMessages.utils.noTitleAvailableLabel;}if(_8e){if(dojo.isString(_89.warning)&&(_89.warning!=="")){_96=_89.warning;}var _97=dojo.create("span",{id:id+"_warning_span_"+idx,className:"CMPickerWarningIcon",title:_96},_95);dojo.create("img",{id:id+"_warning_img_"+idx,className:" CMPickerIcon24",src:this.blankImgUrl,alt:_96},_97);}var _98=dojo.create("span",{lang:_89.locale,dir:_8b,id:id+"_label_"+idx,className:"CMPMappingLabel CMPCell"+(_89.isSystem?" CMPSystemMappingCell":""),innerHTML:_8c,title:_8d,"aria-label":_8c},_95);if(_89.type&&_89.type!=="PUBLIC"){dojo.create("span",{className:"lotusType",innerHTML:(_89.type==="PRIVATE"?this._providerlabels.labelPrivate:this._providerlabels.labelPublicPrivate)},_98);}if(this._scopeprovider.supportsAccessControlDelegation){_90++;var td5=dojo.create("td",{className:"CMPControlCell"},tr1);var _99=dojo.create("div",null,td5);_93=new dijit.form.CheckBox({name:"isDelegating",value:id,title:this._providerlabels.thACDelegation,checked:_89.isDelegating?_89.isDelegating:false,id:id+"_association_delegates_"+idx,className:"CMPCell lotusCheckbox",onChange:dojo.hitch(this,this._changeMapping,id,_89.scope,"isDelegating")},_99);this._initializedWidgets.push(_93);}var td6=dojo.create("td",{className:"lotusLastCell CMPLastCell CMPControlCell"},tr1);if(!_89.isSystem){var _9a=dojo.create("td",null,td6);_92=new dijit.form.Button({baseClass:"dijitButton deleteButton CMPCellBtnCell",showLabel:false,tooltip:this.nlsClickToDelete,title:this.nlsClickToDelete,alt:this._nlsUserInterface[this.namespace].altDeleteImg,iconClass:"deleteIcon"},_9a);this._initializedWidgets.push(_92);this._eventHandlers.push(dojo.connect(_92,"onClick",this,function(){this._deleteMapping(id,_89.scope);}));}if(this._scopeprovider.name===com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_WCM){dojo.style(td3,"paddingBottom","0px");var tr2=dojo.create("tr",{id:"tr2_"+id,className:"lotusDetails"},_8a);var _9b=dojo.create("td",{className:"lotusFirstCell CMPFirstCell CMPDetailsCell",innerHTML:"&nbsp;"},tr2);var _9c=dojo.create("td",{className:"lotusLastCell CMPDetailsCell",colSpan:(_90-2).toString()},tr2);var _9d=_89.titlePath&&_89.titlePath!=="";if(_89.isSystem){var _9e=dojo.create("span",{className:"isSystemText lotusLeft",innerHTML:this._providerlabels.isSystemText,dir:((((typeof ibmCfg)!=="undefined")&&((typeof ibmCfg.themeConfig)!=="undefined")&&ibmCfg.themeConfig.isRTL)?"rtl":"ltr")},_9c);if(_9d){var _9f=dojo.create("span",{className:"detailsText divider lotusLeft",innerHTML:" | "},_9c);}}var _a0;if(!_9d){_a0=dojo.create("span",{className:"detailsText lotusLeft ",innerHTML:"&nbsp"},_9c);}else{var _a1=_89.titlePath.split("/");_a0=dojo.create("span",{className:"detailsText lotusLeft path",dir:"ltr"},_9c);dojo.forEach(_a1,function(_a2,idx){if(_a2&&_a2.length>0){dojo.create("span",{lang:_89.locale,dir:_8b,innerHTML:_a2},_a0);if(idx<(_a1.length-1)){dojo.create("span",{dir:_8b,innerHTML:"&nbsp;/&nbsp;"},_a0);}}});}}var _a3=_89.description;if(!_a3||_a3===""){_a3="&nbsp";}dojo.style(td3,"paddingBottom","0px");var tr3=dojo.create("tr",{id:"tr3_"+id,className:"lotusDetails"},_8a);var _a4=dojo.create("td",{className:"lotusFirstCell CMPFirstCell CMPCell",innerHTML:"&nbsp;"},tr3);var _a5=dojo.create("td",{className:"lotusLastCell CMPLastCell CMPCell",colSpan:(_90-2).toString()},tr3);var _a6=dojo.create("div",{lang:_89.locale,dir:_8b,className:"descriptionText",innerHTML:_a3},_a5);if(dojo.isIE){dojo.style(_a5,"width","auto");}if(_91){dojo.attr(_91.focusNode,"role","checkbox");dojo.attr(_91.focusNode,"aria-describedby",id+"_label_"+idx);}if(_93){dojo.attr(_93.focusNode,"role","checkbox");dojo.attr(_93.focusNode,"aria-describedby",id+"_label_"+idx);}if(_92){dojo.attr(_92.focusNode,"aria-describedby",id+"_label_"+idx);dojo.attr(_92.focusNode,"aria-label",this._nlsUserInterface[this.namespace].altDeleteImg);}dojo.setObject(_89.id+".ui.row",tr1,this._mappingToUIMap);dojo.setObject(_89.id+".ui.defaultRadioButton",_91,this._mappingToUIMap);if(!this._scopeprovider.supportsMultipleMappings||_89.isDefault){this._setSelectedRowBackgroundColor(tr1);}if(this._isTracing){this.traceExit(m);}},_createTopologyPropagationCheckbox:function(_a7,_a8){var m="_createTopologyPropagationCheckbox(p_numChildPages, p_numLevels)";if(this._isTracing){this.traceEntry(m,[_a7,_a8]);}var _a9=false;if(this._scopeprovider.supportsTopologyOperations&&_a7>0){var _aa="<span class=\"CMPickerChildCount\">${0}</span>";var _ab="<span class=\"CMPickerLevelCount\">${0}</span>";var _ac=this._providerlabels.labelCopyToAllDirectChildren;var _ad=null;var _ae;if(_a8==="1"){_ac=this._providerlabels.labelCopyToAllDirectChildren;if(_ac){_ae=dojo.string.substitute(_aa,[_a7]);_ad=dojo.string.substitute(_ac,[_ae]);}}else{if(_a8==="0"){_ac=this._providerlabels.labelCopyToAllChildPages;if(_ac){_ae=dojo.string.substitute(_aa,[_a7]);_ad=dojo.string.substitute(_ac,[_ae]);}}else{_ac=this._providerlabels.labelCopyToChildPagesUpToLevel;if(_ac){_ae=dojo.string.substitute(_aa,[_a7]);var _af=dojo.string.substitute(_ab,[_a8]);_ad=dojo.string.substitute(_ac,[_ae,_af]);}}}if(!_ad){_a9=false;}else{this._removeAllChildNodes(this.propagateToChildrenDIV);var _b0=this._managedMappings&&this._managedMappings.length>0;var _b1=dojo.create("div",null,this.propagateToChildrenDIV);var _b2=dojo.create("span",{"id":this.namespace+"_"+this._scopeprovider.name+"_propagationCheckboxLabel","innerHTML":_ad},this.propagateToChildrenDIV);this._propagationCheckbox=new dijit.form.CheckBox({"name":this.namespace+"_"+this._scopeprovider.name+"_propagationCheckbox","id":this.namespace+"_"+this._scopeprovider.name+"_propagationCheckboxID","checked":false,"showLabel":true,"disabled":!_b0,"tabIndex":"0"},_b1);dojo.removeClass(this.propagateToChildrenDIV,"lotusHidden");if(this._propagationCheckbox){dojo.attr(this._propagationCheckbox.focusNode,"role","button");dojo.attr(this._propagationCheckbox.focusNode,"aria-describedby",this.namespace+"_"+this._scopeprovider.name+"_propagationCheckboxLabel");}this._initializedWidgets.push(this._propagationCheckbox);_a9=true;}}if(this._isTracing){this.traceExit(m,_a9);}},_createMembershipIntegrationCheckbox:function(){var m="_createMembershipIntegrationCheckbox()";if(this._isTracing){this.traceEntry(m);}var _b3=false;if(this._scopeprovider.supportsMembershipIntegration){this.membershipIntegrationEnabled=this._scopeprovider.membershipIntegrationEnabled;var _b4=this._providerlabels.labelEnableMembershipIntegration;if(!_b4){_b3=false;}else{this._removeAllChildNodes(this.membershipIntegrationDIV);var _b5=this._managedMappings&&this._managedMappings.length>0;var _b6=dojo.create("div",null,this.membershipIntegrationDIV);var _b7=dojo.create("span",{"id":this.namespace+"_"+this._scopeprovider.name+"_membershipIntgCheckboxLabel","innerHTML":_b4,"style":{color:(!this._scopeprovider.allowedToChangeMembershipIntegration||!_b5)?"gray":"black"}},this.membershipIntegrationDIV);this._membershipIntgCheckbox=new dijit.form.CheckBox({"name":this.namespace+"_"+this._scopeprovider.name+"_membershipIntgCheckbox","id":this.namespace+"_"+this._scopeprovider.name+"_membershipIntgCheckboxID","checked":this._scopeprovider.membershipIntegrationEnabled,"showLabel":true,"disabled":!this._scopeprovider.allowedToChangeMembershipIntegration||!_b5,"tabIndex":"0","onChange":dojo.hitch(this,this._callbackMembershipIntegrationCheckboxClick)},_b6);dojo.removeClass(this.membershipIntegrationDIV,"lotusHidden");if(this._membershipIntgCheckbox){dojo.attr(this._membershipIntgCheckbox.focusNode,"role","button");dojo.attr(this._membershipIntgCheckbox.focusNode,"aria-describedby",this.namespace+"_"+this._scopeprovider.name+"_membershipIntgCheckboxLabel");}this._initializedWidgets.push(this._membershipIntgCheckbox);_b3=true;}}if(this._isTracing){this.traceExit(m,_b3);}},_createUseParentButton:function(){var m="_createUseParentButton()";if(this._isTracing){this.traceEntry(m);}if(this._scopeprovider.supportsTopologyOperations){dojo.attr(this.useParentButton,"title",this._providerlabels.useParentButtonNoMappingTooltip);this.useParentButton.style.display="";var _b8=this._scopeprovider.parentcontentmappings;if(_b8){var _b9=dojo.filter(_b8,function(_ba){return (_ba.isDefault&&_ba.isDefault===true&&_ba.scope===this._scopeprovider.primaryScope);},this);if(_b9&&_b9.length>0){dojo.attr(this.useParentButton,"disabled",false);dojo.removeClass(this.useParentButton,"lotusBtnDisabled");if(_b9[0].title){dojo.attr(this.useParentButton,"title",dojo.string.substitute(this._providerlabels.useParentButtonTooltip,[_b9[0].title]));var _bb=_b9[0].title.length>25?_b9[0].title.substr(0,25).concat("..."):_b9[0].title;dojo.empty(this.useParentButton);dojo.create("span",{innerHTML:this._nlsUserInterface[this.namespace].useParentButton},this.useParentButton);dojo.create("span",{lang:_b9[0].locale,dir:_b9[0].rtl?"rtl":"ltr",innerHTML:"\""+_bb+"\""},this.useParentButton);}else{dojo.attr(this.useParentButton,"title",this.nlsUseParentButton);}}}}if(this._isTracing){this.traceExit(m);}},_addMapping:function(_bc,_bd){var m="_addMapping()";if(this._isTracing){this.traceEntry(m,_bc);}var _be=false;var _bf=this._managedMappings&&this._managedMappings.length>0;if(_bc.resourceValue&&_bc.resourceValue.length>0){if(dojo.some(this._managedMappings,function(_c0){return ((_c0.id===_bc.resourceValue)&&(_c0.scope===_bc.resourceScope));})){this._showError(this._nlsMessages.pickerPageWidget.errorDuplicateMapping);}else{if(this._scopeprovider.supportsMultipleMappings){this._managedMappings.push({id:_bc.resourceValue,title:_bc.resourceName,locale:_bc.locale,rtl:_bc.rtl,description:_bc.resourceDescription,scope:this._scopeprovider.primaryScope,titlePath:_bc.resourcePath,isDefault:(!_bf||_bc.isDefault),isSystem:_bc.isSystem,isDelegating:_bc.isDelegating,warning:_bc.warning,type:_bc.type});_be=true;}else{this._managedMappings=[{id:_bc.resourceValue,title:_bc.resourceName,locale:_bc.locale,rtl:_bc.rtl,description:_bc.resourceDescription,scope:this._scopeprovider.primaryScope,titlePath:_bc.resourcePath,isDefault:true,isSystem:_bc.isSystem,isDelegating:_bc.isDelegating,warning:_bc.warning,type:_bc.type}];_be=true;}}}if(_be){if(!_bf||!this._scopeprovider.supportsMultipleMappings){var _c1=this.CMPickerPageWidgetTableBody;this._acDelegateTableHeaderColumn=null;this._defaultTableHeaderColumn=null;this._removeAllChildNodes(_c1);this._createTableHeaders();this._createHelpTooltips();if(this._propagationCheckbox){this._propagationCheckbox.set("disabled",false);}}if(this._membershipIntgCheckbox&&this._scopeprovider.allowedToChangeMembershipIntegration){dojo.byId(this.namespace+"_"+this._scopeprovider.name+"_membershipIntgCheckboxLabel").style.color="black";this._membershipIntgCheckbox.set("disabled",false);if(_bd&&_bc.type==="PRIVATE"){this._membershipIntgCheckbox.set("checked",true);dojo.addClass(this._membershipIntgCheckbox.domNode.parentNode,"greenBkgr");this.membershipIntegrationEnabled=true;}else{dojo.removeClass(this._membershipIntgCheckbox.domNode.parentNode,"greenBkgr");this._membershipIntgCheckbox.set("checked",false);this.membershipIntegrationEnabled=false;}}this._createTableEntry(this._managedMappings[this._managedMappings.length-1],this._managedMappings.length-1);this.onChange();this.onLayoutChange();}if(this._isTracing){if(_be){this.trace(m,"Updated _managedMappings:",dojo.toJson(this._managedMappings));}else{this.trace(m,"Duplicate mapping not added: ",dojo.toJson(_bc));}this.traceExit(m);}},_changeMapping:function(_c2,_c3,_c4,_c5){var m="_changeMapping()";if(this._isTracing){this.traceEntry(m,[_c2,_c3,_c4,_c5]);}this._property={};dojo.setObject("_property."+_c4,_c5,this);if(this._managedMappings&&this._managedMappings.length>0){dojo.forEach(this._managedMappings,function(_c6,i){if(_c6.id===_c2&&(!_c3||_c6.scope===_c3)){var _c7=_c6.isDefault;dojo.mixin(_c6,this._property);var _c8=_c6.isDefault;if((_c8!=_c7)&&(_c8===true)){var _c9=dojo.getObject(_c6.id+".ui.row",false,this._mappingToUIMap);this._setSelectedRowBackgroundColor(_c9);}}},this);this.onChange();}if(this._isTracing){this.trace(m,"Updated _managedMappings:",dojo.toJson(this._managedMappings));this.traceExit(m);}},_deleteMapping:function(_ca,_cb){var m="_deleteMapping()";if(this._isTracing){this.traceEntry(m,[_ca,_cb]);}if(this._managedMappings&&this._managedMappings.length>0){this._managedMappings=dojo.filter(this._managedMappings,function(_cc){return (_cc.id!==_ca||(_cc.scope!==_cb));});}dojo.setObject(_ca,{},this._mappingToUIMap);var _cd=dojo.byId("tr1_"+_ca);var _ce=dojo.byId("tr2_"+_ca);var _cf=dojo.byId("tr3_"+_ca);if(_cd){dojo.destroy(_cd);}if(_ce){dojo.destroy(_ce);}if(_cf){dojo.destroy(_cf);}dojo.forEach(this._initializedWidgets,function(_d0){if(_d0.id&&_d0.id.indexOf(_ca)>-1){_d0.destroyRecursive();}});if(this._managedMappings&&this._managedMappings.length<1){this._acDelegateTableHeaderColumn=null;this._defaultTableHeaderColumn=null;var _d1=this.CMPickerPageWidgetTableBody;this._removeAllChildNodes(_d1);var _d2=dojo.create("tr",null,this.CMPickerPageWidgetTableBody);var _d3=dojo.create("td",{tabindex:"0",className:"lotusFirstCell noMappingsCell CMPCell","aria-describedby":this.id+"_noMappingSpan"},_d2);var _d4=dojo.create("span",{className:"CMPMappingLabel",id:this.id+"_noMappingSpan",innerHTML:this.nlsNoMappings},_d3);if(this._propagationCheckbox){this._propagationCheckbox.set("disabled",true);}if(this._membershipIntgCheckbox){dojo.byId(this.namespace+"_"+this._scopeprovider.name+"_membershipIntgCheckboxLabel").style.color="gray";this._membershipIntgCheckbox.set("disabled",true);this._membershipIntgCheckbox.set("checked",false);dojo.removeClass(this._membershipIntgCheckbox.domNode.parentNode,"greenBkgr");this.membershipIntegrationEnabled=false;}}if(this._scopeprovider.supportsMultipleMappings){this._autoSelectDefaultMapping();}this.onChange();this.onLayoutChange();if(this._isTracing){this.trace(m,"Updated _managedMappings:",dojo.toJson(this._managedMappings));this.traceExit(m);}},_autoSelectDefaultMapping:function(){var m="_autoSelectDefaultMapping()";if(this._isTracing){this.traceEntry(m);}var _d5=dojo.some(this._managedMappings,function(_d6){return (_d6.isDefault===true);});if(!_d5){if(this._managedMappings.length>0){var _d7=this._managedMappings[0];var _d8=dojo.getObject(_d7.id+".ui.row",false,this._mappingToUIMap);var _d9=dojo.getObject(_d7.id+".ui.defaultRadioButton",false,this._mappingToUIMap);_d7.isDefault=true;this._setSelectedRowBackgroundColor(_d8);if(_d9){_d9.attr("checked",true);}}}if(this._isTracing){this.traceExit(m);}},_createHelpTooltips:function(){var m="_createHelpTooltips()";if(this._isTracing){this.traceEntry(m);}if(this._defaultTableHeaderColumn){this._defaultHelpIcon=this._createHelpIcon(this._defaultTableHeaderColumn,this._scopeprovider.name+"_columnheader_default_helpIcon",this._nlsUserInterface.CMPickerPageWidget.defaultBtnTooltip);}if(this._acDelegateTableHeaderColumn){this._acHelpIcon=this._createHelpIcon(this._acDelegateTableHeaderColumn,this._scopeprovider.name+"_columnheader_acdelegate_helpIcon",this._nlsUserInterface.CMPickerPageWidget.acDelegateBtnTooltip);}if(this._membershipIntgCheckbox&&!dojo.byId(this._scopeprovider.name+"_membershipIntg_helpIcon")){this._membershipHelpIcon=this._createHelpIcon(this.membershipIntegrationDIV,this._scopeprovider.name+"_membershipIntg_helpIcon",this._providerlabels.enableMembershipIntegrationTooltip);}if(this._propagationCheckbox&&!dojo.byId(this._scopeprovider.name+"_propagateToChildren_helpIcon")){this._propagateToChildrenHelpIcon=this._createHelpIcon(this.propagateToChildrenDIV,this._scopeprovider.name+"_propagateToChildren_helpIcon",this._providerlabels.propagateToChildrenTooltip);}if(this._isTracing){this.traceExit(m);}},_destroyHelpTooltips:function(){var m="_destroyHelpTooltips()";if(this._isTracing){this.traceEntry(m);}if(this._defaultHelpIcon){this._defaultHelpIcon.destroy();delete this._defaultHelpIcon;}if(this._acHelpIcon){this._acHelpIcon.destroy();delete this._acHelpIcon;}if(this._membershipHelpIcon){this._membershipHelpIcon.destroy();delete this._membershipHelpIcon;}if(this._isTracing){this.traceExit(m);}},_createHelpIcon:function(_da,_db,_dc){var m="_createHelpIcon(p_parentNode, p_id, p_helpString)";if(this._isTracing){this.traceEntry(m,[_da,_db,_dc]);}var _dd=dojo.create("a",{"id":_db,"role":"button","href":"javascript:void(0);","class":"CMPickerHelpIcon"},_da);var _de=dojo.create("img",{"src":this.blankImgUrl,"alt":"","role":"presentation","width":"16","height":"16"},_dd);var _df=dojo.create("span",{"class":"lotusAltText","innerHTML":"?"},_dd);var ttp=new dijit.Tooltip({connectId:[_db],label:"<div style=\"max-width: "+this._maxTooltipWidth+";\"/>"+_dc+"</div>",position:["below"]});if(this._isTracing){this.traceExit(m,ttp);}return ttp;},_enableManageItemsLink:function(){var m="_enableManageItemsLink()";if(this._isTracing){this.traceEntry(m);}dojo.style(this.launchManageUrl,"display","inline-block");this._eventHandlers.push(dojo.connect(this.launchManageUrl,"onclick",null,dojo.partial(this._openManageItemsUrl,this._scopeprovider.manageItemsURL)));if(this._providerlabels.labelLaunchItemManageUITooltip){var _e0=new dijit.Tooltip({connectId:[this.launchManageUrl],label:"<div style=\"max-width: "+this._maxTooltipWidth+";\"/>"+this._providerlabels.labelLaunchItemManageUITooltip+"</div>",position:["below"]});if(_e0){this._initializedWidgets.push(_e0);}}if(this._isTracing){this.traceExit(m);}},_setSelectedRowBackgroundColor:function(row){if(this._selectedRow){dojo.removeClass(this._selectedRow,"CMPSelectedRow");}if(this._selectedDetails){dojo.removeClass(this._selectedDetails,"CMPSelectedRow");}if(this._selectedDescription){dojo.removeClass(this._selectedDescription,"CMPSelectedRow");}dojo.addClass(row,"CMPSelectedRow");this._selectedRow=row;var _e1=row.nextSibling;if(this._scopeprovider.name===com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_WCM){if(_e1&&dojo.attr(_e1,"class")==="lotusDetails"){dojo.addClass(_e1,"CMPSelectedRow");this._selectedDetails=_e1;row=_e1;}else{this._selectedDetails=null;}}var _e2=row.nextSibling;if(_e2&&dojo.attr(_e2,"class")==="lotusDetails"){dojo.addClass(_e2,"CMPSelectedRow");this._selectedDescription=_e2;}else{this._selectedDescription=null;}},_preProcessSystemDefaultMappings:function(_e3){var m="_preProcessSystemDefaultMappings(p_node)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_e3));}var _e4=null;var _e5=null;dojo.forEach(_e3,dojo.hitch(this,function(_e6){if((_e6.isSystem===true)&&(!_e4)){_e4=_e6;}if(_e6.isDefault===true){_e5=_e6;}}));if((_e5===null)&&(_e4!==null)){if(this._isTracing){this.trace(m,"Setting the following system mapping as the new default: ",dojo.toJson(_e4));}_e4.isDefault=true;}if(this._isTracing){this.traceExit(m);}},_removeAllChildNodes:function(_e7){var m="_removeAllChildNodes(p_node)";if(this._isTracing){this.traceEntry(m,[_e7]);}if(_e7){var _e8=dojo.query("*",_e7);if(_e8){_e8.orphan();}}if(this._isTracing){this.traceExit(m);}},_showError:function(_e9,_ea){var m="_showError(p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_e9,_ea]);}this._errorState=true;this.onErrorStateChanged(this,true,_e9,_ea);if(this._isTracing){this.traceExit(m);}},_clearError:function(){var m="_clearError()";if(this._isTracing){this.traceEntry(m);}this._errorState=false;this.onErrorStateChanged(this,false);if(this._isTracing){this.traceExit(m);}},_initEventHandlers:function(){var m="_initEventHandlers()";if(this._isTracing){this.traceEntry(m);}if(this.pickerButton){this._eventHandlers.push(dojo.connect(this.pickerButton,"onclick",this,"_callbackPickerButtonClick"));}if(this.useParentButton){this._eventHandlers.push(dojo.connect(this.useParentButton,"onclick",this,"_callbackUseParentButtonClick"));}if(this._isTracing){this.traceExit(m);}},_clearEventHandlers:function(){var m="_clearEventHandlers()";if(this._isTracing){this.traceEntry(m);}dojo.forEach(this._eventHandlers,dojo.disconnect);this._eventHandlers=[];if(this._isTracing){this.traceExit(m);}},_callbackPickerButtonClick:function(){var m="_callbackPickerButtonClick()";if(this._isTracing){this.traceEntry(m);}var _eb=new com.ibm.wps.contentmapping.utils.CMDialogLauncher();var _ec=dojo.filter(this._managedMappings,function(_ed){return (_ed.isDefault&&_ed.isDefault===true);});_eb.launchEntitySelectDialog({scopeProvider:this._scopeprovider.name,selectedResourceId:(_ec&&_ec[0])?_ec[0].id:"undefined",onComplete:dojo.hitch(this,function(_ee){this._addMapping(_ee,true);}),onCancel:dojo.hitch(this,function(){this.onLayoutChange();})});this._initializedWidgets.push(_eb);if(this._isTracing){this.traceExit(m);}},_callbackUseParentButtonClick:function(){var m="_callbackUseParentButtonClick()";if(this._isTracing){this.traceEntry(m);}var _ef=this._scopeprovider.parentcontentmappings;if(_ef){var _f0=dojo.filter(_ef,function(_f1){return (_f1.isDefault&&_f1.isDefault===true&&_f1.scope===this._scopeprovider.primaryScope);},this);if(_f0&&_f0.length>0){this._addMapping({resourceValue:_f0[0].id,resourceName:_f0[0].title,resourceDescription:_f0[0].description,resourcePath:_f0[0].titlePath,resourceScope:_f0[0].scope,locale:_f0[0].locale,rtl:_f0[0].rtl,isDefault:_f0[0].isDefault,isSystem:_f0[0].isSystem,isDelegating:_f0[0].isDelegating,warning:_f0[0].warning,type:_f0[0].type},false);}}if(this._isTracing){this.traceExit(m);}},_callbackMembershipIntegrationCheckboxClick:function(_f2){var m="_createMembershipIntegrationCheckbox()";if(this._isTracing){this.traceEntry(m);}this.membershipIntegrationEnabled=_f2===true?true:false;if(this._isTracing){this.trace(m,"Setting membershipIntegrationEnabled to ",this.membershipIntegrationEnabled);this.traceExit(m);}},_openManageItemsUrl:function(_f3){var m="_openManageItemsUrl(p_url)";if(this._isTracing){this.traceEntry(m,_f3);}window.open(_f3);if(this._isTracing){this.traceExit(m);}}});com.ibm.wps.contentmapping.widget.CMPickerPageWidget.SELECTED_ROW_COLOR="#f2f9ff";}if(!dojo._hasResource["com.ibm.wps.contentmapping.utils.CMRESTServiceHelper"]){dojo._hasResource["com.ibm.wps.contentmapping.utils.CMRESTServiceHelper"]=true;dojo.provide("com.ibm.wps.contentmapping.utils.CMRESTServiceHelper");dojo.registerModulePath("com.ibm.wps.contentmapping.utils.","../com/ibm/wps/contentmapping/utils");dojo.require("dojo.string");dojo.require("com.ibm.data.Resolver");dojo.require("com.ibm.data.resolver.NMPocHandler");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.wps.contentmapping.utils.CMRESTServiceHelper",[com.ibm.widgets._Traceable],{_nlsMessages:{},_pickerConfig:null,_resolverStore:null,constructor:function(_f4){var m="constructor(p_params)";this._isTracing=this.isTracing();if(this._isTracing){this.traceEntry(m,_f4);}if(_f4&&_f4.nlsMessages){this._nlsMessages=_f4.nlsMessages;}this._pickerConfig=new com.ibm.wps.contentmapping.utils.CMPickerConfig();this._resolverStore=this._getResolverStore();if(this._isTracing){this.traceExit(m);}},deleteContentMappingsForPage:function(_f5){var i;var _f6=_f5.mappingsToDelete;var _f7=new dojo.Deferred();var _f8=_f7;for(i=_f6.length-1;i>=0;i--){var _f9=new dojo.Deferred();var _fa=_f6[i];var _fb=dojo.partial(function(_fc,_fd,_fe,_ff,_100){this._deleteContentMappingForPage({"pageID":_fc,"mappingToDelete":_fd},_fe);},_f5.pageID,_fa,_f8);_f9.addCallback(dojo.hitch(this,_fb));_f9.addErrback(dojo.hitch(this,function(_101,_102){_f7.errback(_101,_102);}));_f8=_f9;}_f8.callback();return _f7;},getContentMappingsForPageAsJSON:function(_103,_104,_105){var m="getContentMappingsForPageAsJSON(p_pageID, p_scopeProvider, p_errorCallback)";if(this._isTracing){this.traceEntry(m,[_103,_104,_105]);}var _106=this._loadContentMappingsForPageAsJSON(_103,_104,_105);if(this._isTracing){this.traceExit(m,_106);}return _106;},getPageTitle:function(_107,_108){var m="getPageTitle(p_pageID)";if(this._isTracing){this.traceEntry(m,_107);}var _109="";var _10a=new dojo.Deferred();if(_108===true){_10a.addCallback(dojo.hitch(this,function(_10b){_109=_10b;}));_10a.addErrback(dojo.hitch(this,function(_10c){_109=this._nlsMessages.utils.noTitleLabel;}));}if(!this._resolverStore){deferredToResult.errback(this._nlsMessages.utils.errorResolverNotAvail);}else{var _10d={uri:"nm:oid:"+_107};this._resolverStore.fetch({"query":_10d,"onComplete":dojo.hitch(this,function(_10e,_10f){if(_10e.length<=0){_10a.errback(dojo.string.substitute(this._nlsMessages.utils.errorPageNotFound,[_107]));}else{var item=_10e[0];var _110=this._resolverStore.getValue(item,"title","");_10a.callback(_110);}}),"sync":_108,"scope":this});}if(_108!==true){_109=_10a;}if(this._isTracing){this.traceExit(m,_109);}return _109;},updateContentMappingsForPage:function(_111,_112,_113){var m="updateContentMappingForPage(p_params, p_updateMode, p_errorCallback)";if(this._isTracing){this.traceEntry(m,[dojo.toJson(_111,_112,_113)]);}var _114=new dojo.Deferred();var _115=this._getUpdateXmlDocument(_111.pageID,_111.mappingsToUpdate);var _116="replace";if(_112&&dojo.isString(_112)){if(_112=="merge"){_116=_112;}}var _117=null;if(_111.enablePropagation){_117=_111.enablePropagation;}var _118=null;if(_111.disableMembershipIntegration&&_111.disableMembershipIntegration.length>0){_118=_111.disableMembershipIntegration;}var _119=null;if(_111.enableMembershipIntegration&&_111.enableMembershipIntegration.length>0){_119=_111.enableMembershipIntegration;}var _11a=this._pickerConfig.getCMAtomDataSourceBaseUrl()+_111.pageID;_11a=this._addSingleValueQueryParam(_11a,"update",_116);_11a=this._addMultiValueQueryParam(_11a,"enablePropagation",_117);_11a=this._addMultiValueQueryParam(_11a,"disableMembershipIntegration",_118);_11a=this._addMultiValueQueryParam(_11a,"enableMembershipIntegration",_119);var _11b={url:_11a,postData:_115,handleAs:"text",headers:{"Content-Type":"application/atom+xml"},load:function(data,_11c){_114.callback(data,_11c);},error:function(_11d,_11e){if(_113&&dojo.isFunction(_113)){_113(_11d,_11e);}}};dojo.xhrPut(_11b);if(this._isTracing){this.traceExit(m,dojo.toJson(_114));}return _114;},_addSingleValueQueryParam:function(_11f,_120,_121){var m="_addSingleValueQueryParam(p_url, p_key, p_value)";if(this._isTracing){this.traceEntry(m,[_11f,_120,_121]);}var _122=_11f;if(dojo.isString(_11f)&&dojo.isString(_121)){_122=_122.concat("&".concat(_120).concat("=").concat(_121));}if(this._isTracing){this.traceExit(m,_122);}return _122;},_addMultiValueQueryParam:function(_123,_124,_125){var m="_addMultiValueQueryParam(p_url, p_queryKey, p_queryValues)";if(this._isTracing){this.traceEntry(m,[_123,_124,dojo.toJson(_125)]);}var _126=_123;if(_125){if(dojo.isArrayLike(_125)){dojo.forEach(_125,function(_127){_126=this._addSingleValueQueryParam(_126,_124,_127);},this);}else{if(dojo.isString(_125)){_126=this._addSingleValueQueryParam(_126,_124,_125);}}}if(this._isTracing){this.traceExit(m,_126);}return _126;},_deleteContentMappingForPage:function(_128,_129){var m="_deleteContentMappingForPage(p_params)";if(this._isTracing){this.traceEntry(m,[dojo.toJson(_128),dojo.toJson(_129)]);}var _12a={url:this._pickerConfig.getCMAtomDataSourceBaseUrl()+_128.pageID+"&content="+_128.mappingToDelete,headers:{"Content-Type":"application/atom+xml"},sync:false,load:function(data){if(_129&&dojo.isFunction(_129.callback)){_129.callback(data);}},error:function(_12b){if(_129&&dojo.isFunction(_129.errback)){_129.errback(_12b);}}};dojo.xhrDelete(_12a);if(this._isTracing){this.traceExit(m);}},_loadContentMappingsForPageAsJSON:function(_12c,_12d,_12e){var m="_loadContentMappingsForPageAsJSON(p_pageID, p_scopeProvider, p_errorCallback)";if(this._isTracing){this.traceEntry(m,[_12c,_12d,_12e]);}var _12f=new dojo.Deferred();var _130=this._pickerConfig.getCMAtomDataSourceBaseUrl()+_12c+"&mime-type=application/json&nocache="+(new Date()).getTime();if(_12d&&dojo.isString(_12d)){_130+="&scope-provider="+encodeURIComponent(_12d);}var _131={url:_130,sync:false,handleAs:"json",load:function(data,_132){_12f.callback(data,_132);},error:function(_133,_134){if(_12e&&dojo.isFunction(_12e)){_12e(_133,_134);}}};dojo.xhrGet(_131);if(this._isTracing){this.traceExit(m,_12f);}return _12f;},_getUpdateXmlDocument:function(_135,_136){var m="_getUpdateXmlDocument(p_pageID, p_mappingsToUpdate)";if(this._isTracing){this.traceEntry(m,[_135,dojo.toJson(_136)]);}var _137=this._getUpdateAtomTemplate({"pageID":_135});var _138=[];dojo.forEach(_136,dojo.hitch(this,function(_139){_138.push(this._getUpdateXmlEntry(_139));}));var _13a=dojo.string.substitute(_137,[_138.join("")]);if(this._isTracing){this.traceExit(m,_13a);}return _13a;},_getUpdateAtomTemplate:function(_13b){var m="_getUpdateAtomTemplate(p_params)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_13b));}var _13c="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+"<atom:feed "+this._getNameSpaceString()+">"+"<atom:author>"+"<atom:name>IBM WebSphere Portal/8.0</atom:name>"+"</atom:author>"+"<atom:title>IBM WebSphere Portal Model Feed</atom:title>"+"<atom:link href=\".\" rel=\"self\" type=\"application/atom+xml\"/>"+"<atom:entry>"+"<atom:id>${pageID}</atom:id>"+"<atom:content type=\"application/xml\">"+"<contentmapping:content-mapping-info id=\"${pageID}\">";var _13d="</contentmapping:content-mapping-info>"+"</atom:content>"+"</atom:entry>"+"</atom:feed>";var _13e=dojo.string.substitute(_13c,_13b,com.ibm.domUtilities.encodeXML)+"${0}"+_13d;if(this._isTracing){this.traceExit(m,_13e);}return _13e;},_getUpdateXmlEntry:function(_13f){var m="_getUpdateXmlEntry(p_mappingToUpdate)";if(this._isTracing){this.traceEntry(m,_13f);}if(typeof _13f.id=="undefined"){_13f.id="";}if(typeof _13f.isDefault=="undefined"){_13f.isDefault=false;}var _140="<contentmapping:content-mapping content-id=\"${id}\" default=\"${isDefault}\" ";var _141=dojo.string.substitute(_140,_13f,com.ibm.domUtilities.encodeXML);var _142="";if(_13f.isDelegating===true){_142+=com.ibm.wps.contentmapping.utils.CMRESTServiceHelper._AC_DELEGATION_ATTR+"=\"User\" ";}if(_13f.isSystem===true){_142+=com.ibm.wps.contentmapping.utils.CMRESTServiceHelper._IS_SYSTEM_ATTR+"=\"true\" ";}if(_13f.scope&&dojo.isString(_13f.scope)){_142+=com.ibm.wps.contentmapping.utils.CMRESTServiceHelper._SCOPE_ATTR+"=\""+com.ibm.domUtilities.encodeXML(_13f.scope)+"\" ";}result=_141+_142+"/>";if(this._isTracing){this.traceExit(m,result);}return result;},_getNameSpaceString:function(){var m="_getNameSpaceString()";if(this._isTracing){this.traceEntry(m);}var _143=[];_143.push("xmlns:","atom","=\"","http://www.w3.org/2005/Atom","\" ");_143.push("xmlns:","contentmapping","=\"","http://www.ibm.com/xmlns/prod/content-mappings/v1.0","\" ");var _144=_143.join("");if(this._isTracing){this.traceExit(m,_144);}return _144;},_getResolverStore:function(){return ibmPortalConfig.resolver;}});com.ibm.wps.contentmapping.utils.CMRESTServiceHelper._AC_DELEGATION_ATTR="delegated-role-type";com.ibm.wps.contentmapping.utils.CMRESTServiceHelper._IS_SYSTEM_ATTR="system";com.ibm.wps.contentmapping.utils.CMRESTServiceHelper._SCOPE_ATTR="scope";}if(!dojo._hasResource["com.ibm.wps.contentmapping.utils.CMErrorMsgUtils"]){dojo._hasResource["com.ibm.wps.contentmapping.utils.CMErrorMsgUtils"]=true;dojo.provide("com.ibm.wps.contentmapping.utils.CMErrorMsgUtils");dojo.registerModulePath("com.ibm.wps.contentmapping.utils","../com/ibm/wps/contentmapping/utils");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.wps.contentmapping.utils.CMErrorMsgUtils",[com.ibm.widgets._Traceable],{_maxErrorChars:500,_isTracing:false,constructor:function(_145){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_145));}if(_145){if(_145.maxErrorChars){this._maxErrorChars=_145.maxErrorChars;}}if(this._isTracing){this.traceExit(m);}},getErrorMessageForXHR:function(_146,_147){var m="getErrorMessageForXHR(p_ioArgs, p_nlsMessages)";if(this._isTracing){this.traceEntry(m,[_146,_147]);}var _148={};var _149=200;if(_146&&_146.xhr){var _14a=_146.url;var _14b=false;if(_14a&&dojo.isString(_14a)){_14b=(_14a.substring(0,6).toLowerCase()==="https:");}if(_146.xhr.status>=400){var _14c="errorHttp"+dojo.string.trim(_146.xhr.status+"");var _14d="errorDetailsHttp"+dojo.string.trim(_146.xhr.status+"");var _14e="errorDetailsHttps"+dojo.string.trim(_146.xhr.status+"");var _14f="";if(dojo.isString(_146.xhr.response)){_14f=_146.xhr.response;}else{if(_146.xhr.responseText&&dojo.isString(_146.xhr.responseText)){_14f=_146.xhr.responseText;}}if(_14f.length>this._maxErrorChars){_14f=_14f.substring(0,this._maxErrorChars-1);}_149=_146.xhr.status;if((_14f.length>0)&&((_149==400)||(_149==500))){_148[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_MESSAGE]=_14f;}else{if(_147[_14c]){_148[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_MESSAGE]=_147[_14c];if((_14b)&&(_147[_14e])){_148[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_DETAILS]=_147[_14e];}else{if(_147[_14d]){_148[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_DETAILS]=_147[_14d];}else{_148[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_DETAILS]=_14f;}}}else{_148[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_MESSAGE]=_147.errorFetchingData;}}}}else{_148[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_MESSAGE]=_147.errorFetchingData;if(dojo.isString(_146)){_148[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_DETAILS]=_146;}}if(this._isTracing){this.traceExit(m,_148);}return _148;}});com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_MESSAGE="errorMessage";com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_DETAILS="errorDetails";}if(!dojo._hasResource["com.ibm.wps.contentmapping.widget.CMPickerDialogWidget"]){dojo._hasResource["com.ibm.wps.contentmapping.widget.CMPickerDialogWidget"]=true;dojo.provide("com.ibm.wps.contentmapping.widget.CMPickerDialogWidget");dojo.registerModulePath("com.ibm.wps.contentmapping.widget.","../com/ibm/wps/contentmapping/widget");dojo.require("com.ibm.widgets.GenericDialogWidget");dojo.require("dijit.layout.TabContainer");dojo.declare("com.ibm.wps.contentmapping.widget.CMPickerDialogWidget",[com.ibm.widgets.GenericDialogWidget],{blankImgUrl:dojo.moduleUrl("dojo","resources/blank.gif").toString(),namespace:"CMPickerDialogWidget",templateString:"<div dojoAttachPoint=\"CMPickerDialogWidgetDiv\" class=\"CMPickerDialogWidgetDiv\">\n <div id=\"${namespace}loadingDiv\" name=\"${namespace}loadingDiv\" dojoAttachPoint=\"loadingDiv\">\n <div>\n <span class=\"lotusLoading\"><img width=\"21\" height=\"21\" src=\"${blankImgUrl}\" role=\"presentation\"></span>&nbsp;<span>${_nlsUserInterface.CMPickerDialogWidget.loadingLabel}</span>\n </div>\n </div>\n <div dojoAttachPoint=\"containerNode\" class=\"CMPContainer\">\n <div dojoAttachPoint=\"CMPickerDialogWidgetTabContainer\" class=\"CMPTabContainer\">\n </div>\n </div>\n</div>\n",_tabContainer:null,widgetsInTemplate:true,_errorState:false,_resizedMarginBox:{"w":0,"h":0},_pageName:null,_eventHandlers:[],_initialMinSize:{"w":100,"h":100},_restService:null,_config:null,_errorMsgUtils:null,_initialSelectedProvider:null,_providers:null,placeForVerticalScrollbar:0,placeForHorizontalScrollbar:0,_selectChildHandle:null,constructor:function(_150){this._isTracing=this.isTracing();var m="constructor(p_params)";var _151="";if(this._isTracing){this.traceEntry(m,_150);}this._initNLS();this._restService=new com.ibm.wps.contentmapping.utils.CMRESTServiceHelper({"nlsMessages":this._nlsMessages});this._config=new com.ibm.wps.contentmapping.utils.CMPickerConfig(_150);_151=this._restService.getPageTitle(this._config.getCurrentPageID(),true);this._pageName=_151?this._escapeXml(_151):_151;this._errorMsgUtils=new com.ibm.wps.contentmapping.utils.CMErrorMsgUtils();if(_150){this._initialSelectedProvider=_150.scopeprovidername;}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}var _152=this._config.getCurrentResourceID();var _153=this._restService.getContentMappingsForPageAsJSON(_152,null,dojo.hitch(this,function(_154,_155){this._hideLoadingDiv();this._handleSessionExpiration(_155);this._initEventHandlers();this.onLayoutChange();var _156=this._errorMsgUtils.getErrorMessageForXHR(_155,this._nlsMessages.srvCommunication);this._showError(_156[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_MESSAGE],_156[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_DETAILS]);if(this._isTracing){this.error(m,"Error loading the scopeproviders");}return _154;}));_153.addCallback(dojo.hitch(this,function(_157,_158){this._hideLoadingDiv();if(this._isTracing){this.trace(m,"getContentMappingsForPageAsJSON -> result: ",dojo.toJson(_157));}if(this._validateJSONData(_157)){this._providers=_157.scopeproviders;if(this._providers&&this._providers.length>0){this._tabContainer=new dijit.layout.TabContainer({doLayout:false,useMenu:false},this.CMPickerDialogWidgetTabContainer);this._eventHandlers.push(dojo.connect(this._tabContainer.tablist,"onAddChild",this._tabContainer.tablist,function(page,idx){var tab=this.getChildren()[idx];dojo.attr(tab.tabContent,"aria-controls",page.id);dojo.attr(tab.tabContent,"aria-describedby",page.id+"_header_id");}));dojo.forEach(this._providers,function(_159){var cp;if(this._initialSelectedProvider){if(_159.name===this._initialSelectedProvider){cp=new com.ibm.wps.contentmapping.widget.CMPickerPageWidget({scopeprovider:_159,nlsUserInterface:this._nlsUserInterface,nlsMessages:this._nlsMessages,pageName:this._pageName});this._tabContainer.addChild(cp);}}else{cp=new com.ibm.wps.contentmapping.widget.CMPickerPageWidget({scopeprovider:_159,nlsUserInterface:this._nlsUserInterface,nlsMessages:this._nlsMessages,pageName:this._pageName});if(_159.name===com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_WCM){this._tabContainer.addChild(cp,0);}else{this._tabContainer.addChild(cp);}}},this);this._tabContainer.startup();dojo.attr(this._getFirstElementChild(this._tabContainer.tablist._leftBtn.tabContent),"alt","");dojo.attr(this._getFirstElementChild(this._tabContainer.tablist._menuBtn.tabContent),"alt","");dojo.attr(this._getFirstElementChild(this._tabContainer.tablist._rightBtn.tabContent),"alt","");this._initEventHandlers();this.onChange();this.onLayoutChange();}}return _157;}));this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},startup:function(){var m="startup()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this._clearEventHandlers();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},resize:function(_15a){var m="resize()";if(this._isTracing){this.traceEntry(m);}if(_15a){if(this._isTracing){this.trace(m,dojo.toJson(_15a));}dojo.marginBox(this.domNode,{"w":_15a.w,"h":_15a.h});this._resizedMarginBox=dojo.marginBox(this.domNode);}this.layout();if(this._isTracing){this.traceExit(m);}},layout:function(){var m="layout()";if(this._isTracing){this.traceEntry(m);}var _15b=Math.max(this._initialMinSize.w,this._resizedMarginBox.w);var _15c=Math.max(this._initialMinSize.h,this._resizedMarginBox.h);if(this._isTracing){this.trace(m,"this._initialMinSize:",dojo.toJson(this._initialMinSize));this.trace(m,"_resizedMarginBox:",dojo.toJson(this._resizedMarginBox));this.trace(m,"widthToSet:",_15b);this.trace(m,"heightToSet:",_15c);}dojo.marginBox(this.containerNode,{"w":_15b,"h":_15c});if(this._tabContainer){this._tabContainer.layout();this._tabContainer.selectedChildWidget.layout();dojo.style(this._tabContainer.domNode,"height","100%");this._tabContainer.selectedChildWidget.changeSize({"w":_15b,"h":_15c-this._tabContainer.tablist._contentBox.h},this.placeForHorizontalScrollbar,this.placeForVerticalScrollbar);}if(this._isTracing){this.traceExit(m);}},getMinSize:function(){var m="getMinSize()";if(this._isTracing){this.traceEntry(m);}var _15d={"w":100,"h":50};if(this._tabContainer){var _15e=this._tabContainer.selectedChildWidget.getMinSize();var _15f=_15e.w;var _160=this._tabContainer.tablist._contentBox.h+_15e.h;_15d={"w":_15f,"h":_160};}if(this._isTracing){this.traceExit(m,dojo.toJson(_15d));}return _15d;},doCancel:function(){var m="doCancel()";if(this._isTracing){this.traceEntry(m);}this._uninitializeAllPages();result=this.inherited(arguments);if(this._isTracing){this.traceExit(m,result);}return result;},doConfirm:function(){var m="doConfirm()";if(this._isTracing){this.traceEntry(m);}if(this._tabContainer){var _161=this._config.getCurrentResourceID();var _162=[];var _163=[];var _164=[];var _165=[];dojo.forEach(this._tabContainer.getChildren(),function(_166){var _167=_166.getManagedMappings();this._postProcessSystemDefaultMappings(_167);_162=_162.concat(_167);if(_166.isMappingPropagationEnabled()){_163.push(_166.getScopeProviderName());}if(_166.hasMembershipIntegrationDisabled()){_164.push(_166.getScopeProviderName());}if(_166.hasMembershipIntegrationEnabled()){_165.push(_166.getScopeProviderName());}},this);if(this._initialSelectedProvider){dojo.forEach(this._providers,function(_168){if(_168.name!==this._initialSelectedProvider){_162=_162.concat(_168.contentmappings);}},this);}var _169=dojo.hitch(this,function(_16a,_16b){var _16c=this._errorMsgUtils.getErrorMessageForXHR(_16b,this._nlsMessages.srvCommunication);this._showError(_16c[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_MESSAGE],_16c[com.ibm.wps.contentmapping.utils.CMErrorMsgUtils.ERROR_DETAILS]);return _16a;});var _16d=this._restService.updateContentMappingsForPage({"pageID":_161,"mappingsToUpdate":_162,"enablePropagation":_163,"disableMembershipIntegration":_164,"enableMembershipIntegration":_165},"replace",_169);_16d.addCallback(dojo.hitch(this,function(_16e){if(this._isTracing){this.trace(m,"updateContentMappingsForPage -> result: ",dojo.toJson(_16e));}this._uninitializeAllPages();this.onClose();return _16e;}));result=_16d;}else{result=this.inherited(arguments);}if(this._isTracing){this.traceExit(m,result);}return result;},getDialogTitle:function(){var m="getDialogTitle()";if(this._isTracing){this.traceEntry(m);}var _16f=dojo.string.substitute(this.getNlsUserInterface()[this.namespace].title,[this._pageName]);if(!_16f){_16f=this.inherited(arguments);}if(this._isTracing){this.traceExit(m,_16f);}return _16f;},onSelectChild:function(_170){var m="onSelectChild()";if(this._isTracing){this.traceEntry(m);}this._clearError();if(this._isTracing){this.traceExit(m);}},onChange:function(){this._clearError();},onLayoutChange:function(){},onClose:function(){},onErrorStateChanged:function(_171,_172,_173,_174){},_clearError:function(){var m="_clearError()";if(this._isTracing){this.traceEntry(m);}this._errorState=false;this.onErrorStateChanged(this,false);if(this._isTracing){this.traceExit(m);}},_clearEventHandlers:function(){var m="_clearEventHandlers()";if(this._isTracing){this.traceEntry(m);}dojo.forEach(this._eventHandlers,dojo.disconnect);this._eventHandlers=[];if(this._tabContainer){dojo.unsubscribe(this._selectChildHandle);}if(this._isTracing){this.traceExit(m);}},_escapeXml:function(_175){if(_175){return _175.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");}else{return _175;}},_getFirstElementChild:function(_176){var m="_getFirstElementChild(p_domNode)";if(this._isTracing){this.traceEntry(m,_176);}var _177={};if(_176){if(_176.firstElementChild){_177=_176.firstElementChild;}else{if(_176.children&&(_176.children.length>0)){_177=_176.children[0];}else{_177={};}}}else{_177={};}if(this._isTracing){this.traceExit(m,_177);}return _177;},_handleSessionExpiration:function(_178){var m="_handleSessionExpiration()";if(this._isTracing){this.traceEntry(m,_178);}if(dojo.isObject(_178)&&_178.xhr&&_178.xhr.status){if(_178.xhr.status===401){top.location.href=document.location.href;}}else{if(dojo.isString(_178)){}}if(this._isTracing){this.traceExit(m);}},_hideLoadingDiv:function(){var m="_hideLoadingDiv()";if(this._isTracing){this.traceEntry(m);}if(this.loadingDiv){dojo.style(this.loadingDiv,"display","none");}if(this._isTracing){this.traceExit(m);}},_initEventHandlers:function(){var m="_initEventHandlers()";if(this._isTracing){this.traceEntry(m);}if(this._tabContainer){dojo.forEach(this._tabContainer.getChildren(),function(_179){this._eventHandlers.push(dojo.connect(_179,"onChange",this,"onChange"));this._eventHandlers.push(dojo.connect(_179,"onLayoutChange",this,"onLayoutChange"));this._eventHandlers.push(dojo.connect(_179,"onErrorStateChanged",this,"onErrorStateChanged"));},this);this._selectChildHandle=dojo.subscribe(this._tabContainer.id+"-selectChild",dojo.hitch(this,function(_17a){this.onSelectChild(_17a);}));}if(this._isTracing){this.traceExit(m);}},_initNLS:function(){var m="_initNLS()";if(this._isTracing){this.traceEntry(m);}this._nlsUserInterface=dojo.i18n.getLocalization("com.ibm.wps.contentmapping","ContentMappingPickerUserInterface");this._nlsMessages=dojo.i18n.getLocalization("com.ibm.wps.contentmapping","ContentMappingPickerMessages");if(this._isTracing){this.trace(m,"Initialized NLS object for user interface elements:",dojo.toJson(this._nlsUserInterface));this.trace(m,"Initialized NLS object for messages:",dojo.toJson(this._nlsMessages));this.traceExit(m);}},_postProcessSystemDefaultMappings:function(_17b){var m="_postProcessSystemDefaultMappings(p_node)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_17b));}dojo.forEach(_17b,dojo.hitch(this,function(_17c){if((_17c.isSystem===true)&&(_17c.isDefault===true)){_17c.isDefault=false;}}));if(this._isTracing){this.traceExit(m);}},_showError:function(_17d,_17e){var m="_showError(p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_17d,_17e]);}this._errorState=true;this.onErrorStateChanged(this,true,_17d,_17e);if(this._isTracing){this.traceExit(m);}},_uninitializeAllPages:function(){var m="_uninitializeAllPages()";if(this._isTracing){this.traceEntry(m);}if(this._tabContainer){dojo.forEach(this._tabContainer.getChildren(),function(_17f){_17f.uninitialize();},this);}if(this._isTracing){this.traceExit(m);}},_validateJSONData:function(_180){var m="_validateJSONData(p_jsonData)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_180));}var _181;if(_180){if(_180.scopeproviders){var _182=_180.scopeproviders;if(dojo.isArrayLike(_182)&&(_182.length>0)){_181=dojo.every(_182,function(_183){return this._validateScopeProvider(_183);},this);}else{_181=false;}}else{_181=false;}}else{_181=false;}if(!_181){this._showError(this._nlsMessages.pickerPageWidget.errorJSONDataInvalid);}if(this._isTracing){this.traceExit(m,_181);}return _181;},_validateScopeProvider:function(_184){var m="_validateScopeProvider(p_scopeProvider)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_184));}var _185;if(_184){if(_184.name){var _186=_184.contentmappings;if(_186&&dojo.isArrayLike(_186)){_185=dojo.every(_186,function(_187){return this._validateContentMapping(_187);},this);}else{_185=true;}}else{_185=false;}}else{_185=false;}if(this._isTracing){this.traceExit(m,_185);}return _185;},_validateContentMapping:function(_188){var m="_validateContentMapping(p_contentMapping)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_188));}var _189;if(_188){if(_188.id){if(typeof _188.isDefault!="undefined"){if(typeof _188.isSystem!="undefined"){_189=true;}else{_189=false;}}else{}}else{_189=false;}}else{_189=false;}if(this._isTracing){this.traceExit(m,_189);}return _189;}});}if(!dojo._hasResource["com.ibm.wps.contentmapping.dialog.CustomMessageDialog"]){dojo._hasResource["com.ibm.wps.contentmapping.dialog.CustomMessageDialog"]=true;dojo.provide("com.ibm.wps.contentmapping.dialog.CustomMessageDialog");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.Dialog");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.wps.contentmapping.dialog.CustomMessageDialog",[dijit._Widget,dijit._Templated,dijit.Dialog,com.ibm.widgets._Traceable],{lotusui_id:"dijitDialog_lotusui30_CstmMsgDlg_container",lotusui_class:"lotusui30",_eventHandles:[],autoClose:true,bIsTracing:false,blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString(),id:"",nlsTitleClose:"",nlsDialogTitle:"",nlsDialogMessage:"",nlsTitleButtonYes:"",nlsTitleButtonNo:"",templateString:null,templateString:"<div class=\"lotusDialogBorder\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\" dojoAttachPoint=\"dialogDiv\">\n <div class=\"lotusDialog\">\n <div class=\"lotusDialogHeader\" dojoAttachPoint=\"titleBar\">\n <h1 class=\"lotusHeading\">\n <span dojoAttachPoint=\"titleNode\" id=\"${id}_title\">${nlsDialogTitle}</span>\n </h1>\n <a href=\"javascript:void(0);\" dojoAttachPoint=\"closeButtonNode\" class=\"lotusDialogClose\" title=\"${nlsTitleClose}\" role=\"button\">\n <img src=\"${blankImg}\" alt=\"\" aria-label=\"${nlsTitleClose}\" />\n <span class=\"lotusAltText\">X</span>\n </a>\n </div>\n <form dojoAttachPoint=\"newPageForm\" action=\"javascript:;\">\n <div dojoAttachPoint=\"containerNode\" class=\"lotusDialogContent\">\n ${nlsDialogMessage}\n </div>\n <div class=\"lotusDialogFooter\" dojoAttachPoint=\"dialogFooter\">\n <input value=\"${nlsTitleButtonYes}\" class=\"lotusBtn\" dojoAttachPoint=\"submitDialog\" type=\"submit\"/>\n <input value=\"${nlsTitleButtonNo}\" class=\"lotusBtn\" dojoAttachPoint=\"dialogCancel\" type=\"button\"/>\n </div>\n </form>\n </div>\n</div>\n",constructor:function(_18a){this.nlsTitleClose=_18a.bundle.CloseTitle;this.nlsDialogTitle=_18a.bundle.DialogTitle;this.nlsDialogMessage=_18a.bundle.DialogMessageLabel;this.nlsTitleButtonYes=_18a.bundle.ButtonSubmitTitle;this.nlsTitleButtonNo=_18a.bundle.ButtonCancelTitle;this._eventHandles=[];this.cssStateNodes={};},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}this.inherited(arguments);this.submitDialog.onclick=dojo.hitch(this,function(){this.hide();this.submit();return false;});this.dialogCancel.onclick=dojo.hitch(this,function(){this.hide();this.cancelDialog();return false;});this.closeButtonNode.onclick=dojo.hitch(this,function(){this.hide();this.closeDialog();return false;});this._eventHandles.push(dojo.connect(this.dialogCancel,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey")));this._eventHandles.push(dojo.connect(this.closeButtonNode,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey")));this._eventHandles.push(dojo.connect(this,"onCancel",this,"closeDialog"));dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");if(this.bIsTracing){this.traceExit(m);}},onCloseDialog:function(){},onSubmitDialog:function(){},onCancelDialog:function(){},submit:function(){var m="submit()";if(this.bIsTracing){this.traceEntry(m);}this.onSubmitDialog();if(this.autoClose){setTimeout(dojo.hitch(this,"destroyRecursive"),this.duration+200);}if(this.bIsTracing){this.traceExit(m);}},uninitialize:function(){dojo.forEach(this._eventHandles,dojo.disconnect);this._eventHandles=[];},cancelDialog:function(){var m="cancelDialog()";if(this.bIsTracing){this.traceEntry(m);}this.onCancelDialog();if(this.autoClose){setTimeout(dojo.hitch(this,"destroyRecursive"),this.duration+200);}if(this.bIsTracing){this.traceExit(m);}},closeDialog:function(){var m="closeDialog()";if(this.bIsTracing){this.traceEntry(m);}this.onCloseDialog();if(this.autoClose){setTimeout(dojo.hitch(this,"destroyRecursive"),this.duration+200);}if(this.bIsTracing){this.traceExit(m);}},_findOrCreateLotusUIDIV:function(){var m="_findOrCreateLotusUIDIV()";if(this._isTracing){this.traceEntry(m);}var _18b=dojo.byId(this.lotusui_id);if(!_18b){_18b=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class,"wairole":"region","role":"region"},dojo.body());}dijit.setWaiState(_18b,"labelledby",this.id+"_title");if(this._isTracing){this.traceExit(m,_18b);}return _18b;},_triggerOnClickEvtForSpaceKey:function(_18c){if(_18c){var _18d=_18c.target;if(_18d){var key=_18c.charCode;var keys=dojo.keys;if(key===keys.SPACE){if(dojo.isFunction(_18d.onclick)){_18d.onclick();dojo.stopEvent(_18c);}}}}},_getFocusItems:function(_18e){var _18f=this.containerNode;this.containerNode=_18e;this.inherited(arguments);this.containerNode=_18f;}});}if(!dojo._hasResource["com.ibm.wps.contentmapping.dialog.ContentMappingPickerDialog"]){dojo._hasResource["com.ibm.wps.contentmapping.dialog.ContentMappingPickerDialog"]=true;dojo.provide("com.ibm.wps.contentmapping.dialog.ContentMappingPickerDialog");dojo.registerModulePath("com.ibm.wps.contentmapping.dialog","../com/ibm/wps/contentmapping/dialog");dojo.require("dijit.Tooltip");dojo.require("com.ibm.widgets.GenericDialog");dojo.declare("com.ibm.wps.contentmapping.dialog.ContentMappingPickerDialog",[com.ibm.widgets.GenericDialog],{namespace:"CMPickerDlg",templateString:dojo.cache("com.ibm.wps.contentmapping.dialog","templates/ContentMappingPickerDialog.html","<div dojoAttachPoint=\"GenericDialogDiv\" class=\"lotusDialogBorder\" \n waistate=\"labelledby-${namespace}GenericDialogTitleSpan_id\" wairole=\"dialog\" \n role=\"dialog\" tabindex=\"-1\" aria-labelledby=\"${namespace}GenericDialogTitleSpan_id\" \n style=\"max-width: none; max-height: none;\">\n \n <div id=\"${namespace}GenericDialogContentDiv_id\" name=\"${namespace}GenericDialogContentDiv\" \n dojoAttachPoint=\"CMPickerDialogWidgetContentDiv\" class=\"cmpDlg lotusDialog\">\n <div class=\"lotusDialogHeader\" dojoAttachPoint=\"titleBar\">\n <h1 id=\"${namespace}GenericDialogTitleBar_id\" \n name=\"${namespace}GenericDialogTitleBar\" class=\"lotusHeading CMPickerHeader\">\n <span dojoAttachPoint=\"titleNode\" tabindex=\"0\" role=\"main\" \n id=\"${namespace}GenericDialogTitleSpan_id\" \n name=\"${namespace}GenericDialogTitleSpan\"\n aria-labelledby=\"${namespace}GenericDialogTitleSpan_id\">\n ${title}\n </span>\n <a dojoAttachPoint=\"dialogHelp\" role=\"button\"\n href=\"javascript:void(0);\" class=\"lotusRight CMPickerBannerHelpIcon\"\n id=\"${namespace}GenericDialogTitleBarHelpIcon_id\"\n title=\"\">\n <img src=\"${blankImgUrl}\" alt=\"\" role=\"presentation\" width=\"16px\" height=\"16px\" title=\"\"/>\n <span dojoAttachPoint=\"helpText\" class=\"lotusAltText\">\n ?\n </span>\n </a>\n </h1>\n <a dojoAttachPoint=\"dialogClose\" role=\"button\" \n aria-label=\"${_nlsUserInterface.CMPickerDialog.cancelLinkTitle}\" \n href=\"javascript:void(0);\" class=\"lotusDialogClose\" \n title=\"${_nlsUserInterface.CMPickerDialog.cancelLinkTitle}\" \n id=\"${namespace}buttonCancel_id\" name=\"${namespace}buttonCancel\" tabindex=\"0\">\n <img src=\"${blankImgUrl}\" alt=\"\" role=\"presentation\" />\n <span dojoAttachPoint=\"closeText\" id=\"${namespace}buttonCancelSpan_id\" \n name=\"${namespace}buttonCancelSpan\" class=\"lotusAltText\" \n title=\"${_nlsUserInterface.CMPickerDialog.cancelLinkTitle}\">\n X\n </span>\n </a>\n </div>\n \n <div dojoAttachPoint=\"containerNode\" class=\"CMPContainerNode lotusDialogContent\">\n <div waiRole=\"alert\" role=\"alert\" aria-hidden=\"true\" \n dojoAttachPoint=\"CMPickerDialogErrorDiv\" id=\"${namespace}CMPickerDialogErrorDiv_id\" \n name=\"${namespace}CMPickerDialogErrorDiv\" \n title=\"${_nlsUserInterface.CMPickerDialog.errorDivTitle}\" \n style=\"display:none; overflow: hidden; word-wrap: break-word;\" \n class=\"lotusMessage CMPickerTopSpaceSmall\">\n <img role=\"img\" src=\"${blankImgUrl}\" width=\"16\" height=\"16\" \n class=\"CMPickerErrorIcon\" alt=\"${_nlsUserInterface.CMPickerDialog.errorImgAlt}\" />\n <span dojoAttachPoint=\"CMPickerDialogErrorSpan\" \n name=\"${namespace}CMPickerDialogErrorSpan\" \n id=\"${namespace}CMPickerDialogErrorSpan_id\">\n </span>\n <div aria-hidden=\"true\" dojoAttachPoint=\"CMPickerDialogErrorDetailsDiv\" \n name=\"${namespace}CMPickerDialogErrorDetailsDiv\" id=\"${namespace}CMPickerDialogErrorDetailsDiv_id\" \n style=\"display: none;\">\n <span dojoAttachPoint=\"CMPickerDialogErrorDetailsSpan\" \n name=\"${namespace}CMPickerDialogErrorDetailsSpan\" \n id=\"${namespace}CMPickerDialogErrorDetailsSpan_id\">\n </span>\n </div>\n </div>\n <div dojoAttachPoint=\"widgetNode\">\n </div>\n </div>\n <div dojoAttachPoint=\"dialogFooter\" class=\"lotusDialogFooter\">\n <input dojoAttachPoint=\"dialogConfirm\" class=\"lotusBtn\" type=\"submit\" \n value=\"${_nlsUserInterface.CMPickerDialog.okButtonCaption}\" role=\"button\"\n title=\"${_nlsUserInterface.CMPickerDialog.okButtonTitle}\" id=\"${namespace}submitDialogSelection_id\" \n name=\"${namespace}submitDialogSelection\" />\n <input dojoAttachPoint=\"dialogCancel\" tabindex=\"0\" class=\"lotusBtn\" type=\"button\" role=\"button\" \n id=\"${namespace}cancelDialogSelection_id\" name=\"${namespace}cancelDialogSelection\" \n aria-label=\"${_nlsUserInterface.CMPickerDialog.cancelLinkTitle}\" title=\"${_nlsUserInterface.CMPickerDialog.cancelLinkTitle}\" \n value=\"${_nlsUserInterface.CMPickerDialog.cancelLinkText}\" />\n </div>\n </div>\n</div>\n"),lotusui_id:"dijitDialog_lotusui30_CmpDlg_container",lotusui_class:"lotusui30",widgetsInTemplate:true,_dialogBorderWidth:6,_errorState:false,_maxErrorChars:768,minHeight:200,minWidth:600,_eventHandlers:[],_maxTooltipWidth:"550px",_showPersistenceWarning:false,constructor:function(_190){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_190);}this.cssStateNodes={};if(_190&&(typeof _190.showPersistenceWarning!="undefined")){this._showPersistenceWarning=_190.showPersistenceWarning?true:false;}if(this._isTracing){this.traceExit(m);}},show:function(){var m="show()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);setTimeout(dojo.hitch(this,function(){dijit.focus(this.titleNode);}),30);if(this._isTracing){this.traceExit(m);}},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);dojo.attr(this.GenericDialogDiv,"lang",ibmPortalConfig.locale.replace(/_/,"-").replace(/iw/,"he"));dojo.attr(this.GenericDialogDiv,"dir",(ibmCfg.themeConfig.isRTL?"rtl":"ltr"));this._initEventHandlers();this._dlgTooltip=new dijit.Tooltip({connectId:[this.namespace+"GenericDialogTitleBarHelpIcon_id"],label:"<div style=\"max-width: "+this._maxTooltipWidth+";\"/>"+this._nlsUserInterface.CMPickerDialog.dialogTooltip+this._nlsUserInterface.CMPickerDialog.dialogTooltip_2+"</div>",position:["below"]});dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");if(this._isTracing){this.traceExit(m);}},startup:function(){var m="startup()";if(this._isTracing){this.traceEntry(m);}if(this._widget){this._widget.startup();}this.inherited(arguments);this.layout();if(this._isTracing){this.traceExit(m);}},layout:function(){var m="layout()";if(this._isTracing){this.traceEntry(m);}var _191={"w":Math.round(dijit.getViewport().w*0.9),"h":Math.round(dijit.getViewport().h*0.9)};var _192=dojo.marginBox(this.titleBar).h;var _193=dojo.marginBox(this.dialogFooter).h;var _194={"w":100,"h":50};var _195=dojo.marginBox(this.containerNode).w-dojo.contentBox(this.containerNode).w;var _196=dojo.marginBox(this.containerNode).h-dojo.contentBox(this.containerNode).h;var _197=0;if(this._errorState){_197=dojo.marginBox(this.CMPickerDialogErrorDiv).h;}if(this._widget){this._widget.layout();_194=this._widget.getMinSize();}var _198={"w":Math.max(this.minWidth,_194.w+_195),"h":Math.max(this.minHeight,_192+_197+_194.h+_193+_196)};var _199={"w":this._dialogBorderWidth+Math.min(_191.w,_198.w),"h":this._dialogBorderWidth+Math.min(_191.h,_198.h)};if(this.isResized===true){var _19a={"w":Math.max(this.minWidth,dojo.marginBox(this.domNode).w),"h":Math.max(this.minHeight,dojo.marginBox(this.domNode).h)};_199={"w":Math.min(_191.w,_19a.w),"h":Math.min(_191.h,_19a.h)};}else{_199={"w":Math.max(dojo.marginBox(this.domNode).w,_199.w),"h":Math.max(dojo.marginBox(this.domNode).h,_199.h)};}if(_199.h<_198.h){if(this.isResized===false&&this._widget&&this._widget.placeForVerticalScrollbar===0){if(this._isTracing){this.trace(m,"Increasing for vertical scrollbar");}_199.w=_199.w+25;}if(this._widget){this._widget.placeForVerticalScrollbar=25;}}if(_199.w<_198.w){if(this.isResized===false&&this._widget&&this._widget.placeForHorizontalScrollbar===0){if(this._isTracing){this.trace(m,"Increasing for horizontal scrollbar");}_199.h=_199.h+25;}if(this._widget){this._widget.placeForHorizontalScrollbar=25;}}dojo.marginBox(this.domNode,_199);this.inherited(arguments);var _19b={"w":_199.w-this._dialogBorderWidth-_195,"h":_199.h-this._dialogBorderWidth-_192-_197-_193-_196};if(this._widget&&(typeof this._widget.resize=="function")){this._widget.resize(_19b);}if(this._isTracing){this.trace(m,"headerHeight: ",_192);this.trace(m,"footerHeight: ",_193);this.trace(m,"dialogMaxSize: ",dojo.toJson(_191));this.trace(m,"containerNodeMarginsW:",_195);this.trace(m,"containerNodeMarginsH:",_196);this.trace(m,"widgetMinSize:",dojo.toJson(_194));this.trace(m,"dialogMaxSize:",dojo.toJson(_191));this.trace(m,"dialogMinSize:",dojo.toJson(_198));this.trace(m,"dialogSizeToSet:",dojo.toJson(_199));this.trace(m,"wigetSizeToSet:",dojo.toJson(_19b));this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}if(this._dlgTooltip){this._dlgTooltip.destroy();delete this._dlgTooltip;}this._clearEventHandlers();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},postMixInProperties:function(){var m="postMixInProperties()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},close:function(){var m="close()";if(this._isTracing){this.traceEntry(m);}if(this.autoClose){this.hide();setTimeout(dojo.hitch(this,"destroyDialog"),this.duration);}if(this._isTracing){this.traceExit(m);}},_clearError:function(){var m="_clearError()";if(this._isTracing){this.traceEntry(m);}this._errorState=false;dojo.style(this.CMPickerDialogErrorDetailsDiv,"display","none");dojo.style(this.CMPickerDialogErrorDiv,"display","none");dijit.setWaiState(this.CMPickerDialogErrorDiv,"hidden",true);dijit.setWaiState(this.CMPickerDialogErrorDetailsDiv,"hidden",true);this.layout();if(this._isTracing){this.traceExit(m);}},_onConfirm:function(){var m="_onConfirm()";if(this._isTracing){this.traceEntry(m);}var _19c={};var _19d=function(me){var _19e="_onConfirm.confirmActionFn()";if(!me){me=this;}if(me._isTracing){me.traceEntry(_19e);}if(me._widget&&(typeof me._widget.doConfirm=="function")){_19c=me._widget.doConfirm();}if(me._isTracing){me.trace(_19e,"Return values from widget:",_19c);}if(me._onConfirmCallbackFn){if(me._isTracing){me.trace(_19e,"Dispatching to callback function passing the return values from the widget:",[me._onConfirmCallbackFn,_19c]);}if(dojo.isFunction(_19c.addCallback)){_19c.addCallback(dojo.hitch(me,me._onConfirmCallbackFn));}else{me._onConfirmCallbackFn(_19c);}}if(me._isTracing){me.traceExit(_19e);}};if(this._showPersistenceWarning){var _19f=new com.ibm.wps.contentmapping.dialog.CustomMessageDialog({"id":"ContentMappingPickerDialog_ConfirmationDialog_id","bundle":this._nlsUserInterface.CMPickerConfirmationDlgBundle});dojo.connect(_19f,"onSubmitDialog",this,dojo.hitch(this,_19d));_19f.show();}else{_19d(this);}if(this._isTracing){this.traceExit(m);}},_onErrorStateChanged:function(_1a0,_1a1,_1a2,_1a3){var m="_onErrorStateChanged(p_sender, p_errorState, p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_1a0,_1a1,_1a2,_1a3]);}if(_1a1===true){this._showError(_1a2,_1a3);}else{if(_1a1===false){this._clearError();}else{}}if(this._isTracing){this.traceExit(m);}},_clearEventHandlers:function(){var m="_clearEventHandlers()";if(this._isTracing){this.traceEntry(m);}dojo.forEach(this._eventHandlers,dojo.disconnect);this._eventHandlers=[];if(this._isTracing){this.traceExit(m);}},_initEventHandlers:function(){var m="_initEventHandlers()";if(this._isTracing){this.traceEntry(m);}this._eventHandlers.push(dojo.connect(this.dialogConfirm,"onclick",this,"_onConfirm"));if(this._widget&&(typeof this._widget.onSelectChild=="function")){this._eventHandlers.push(dojo.connect(this._widget,"onSelectChild",this,"layout"));this._eventHandlers.push(dojo.connect(this._widget,"onLayoutChange",this,"_fixResizeHelper"));this._eventHandlers.push(dojo.connect(this._widget,"onLayoutChange",this,"layout"));this._eventHandlers.push(dojo.connect(this._widget,"onClose",this,"close"));this._eventHandlers.push(dojo.connect(this._widget,"onErrorStateChanged",this,"_onErrorStateChanged"));}if(this._isTracing){this.traceExit(m);}},_fixResizeHelper:function(){var m="_fixResizeHelper()";if(this._isTracing){this.traceEntry(m);}this._recreateResizeHandler();if(this._isTracing){this.traceExit(m);}},_initNLS:function(){var m="_initNLS()";if(this._isTracing){this.traceEntry(m);}this._nlsUserInterface=dojo.i18n.getLocalization("com.ibm.wps.contentmapping","ContentMappingPickerUserInterface");this._nlsMessages=dojo.i18n.getLocalization("com.ibm.wps.contentmapping","ContentMappingPickerMessages");if(this._isTracing){this.trace(m,"Initialized NLS object for user interface elements:",dojo.toJson(this._nlsUserInterface));this.trace(m,"Initialized NLS object for messages:",dojo.toJson(this._nlsMessages));this.traceExit(m);}},_findOrCreateLotusUIDIV:function(){var m="_findOrCreateLotusUIDIV()";if(this._isTracing){this.traceEntry(m);}var _1a4=dojo.byId(this.lotusui_id);if(!_1a4){_1a4=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class,"wairole":"region","role":"region"},dojo.body());}dijit.setWaiState(_1a4,"labelledby",this.namespace+"GenericDialogTitleSpan_id");this._lotusui_div=_1a4;if(this._isTracing){this.traceExit(m,_1a4);}return _1a4;},_showError:function(_1a5,_1a6){var m="_showError(p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_1a5,_1a6]);}var _1a7="";if(_1a5){if(dojo.isString(_1a5)){_1a7=_1a5;}else{if(_1a5.responseText&&dojo.isString(_1a5.responseText)){_1a7=_1a5.responseText;}else{if(_1a5.message&&dojo.isString(_1a5.message)){_1a7=_1a5.message;}}}}if(_1a7){var _1a8=_1a7.substring(0,Math.min(this._maxErrorChars,_1a7.length));dojo.attr(this.CMPickerDialogErrorSpan,"innerHTML",_1a8);dojo.style(this.CMPickerDialogErrorDiv,"opacity","1");dojo.style(this.CMPickerDialogErrorDiv,"display","block");dijit.setWaiState(this.CMPickerDialogErrorDiv,"hidden",false);if(_1a6&&dojo.isString(_1a6)){var _1a9=_1a6.substring(0,Math.min(this._maxErrorChars,_1a6.length));dojo.attr(this.CMPickerDialogErrorDetailsSpan,"innerHTML",_1a9);dojo.style(this.CMPickerDialogErrorDetailsDiv,"display","block");dijit.setWaiState(this.CMPickerDialogErrorDetailsDiv,"hidden",false);}}else{this.trace(m,"_showError was called with an undefined error message.");}this._errorState=true;this.layout();if(this._isTracing){this.traceExit(m);}}});} /* (C) Copyright IBM Corp. 2007 All Rights Reserved. */ /** * This is the JS file for the common semantic tagging service */ var SemTagSvcPortalGlobal = { debug: false, trace: false, lang: "en", bidi: "ltr", service: "", ifConnUrlExists: "false", connUrl: "null", isconnServerNew:false, contextUrl: "/sabc/semanticTag", wpsBaseURL: "/sabc", ptTimeout: 1500, preferredImIds: ["X-imn","email","uid","fn"], externalServiceEntries:'', // for c2a c2a_click_for_actions:"Click for Actions", // for semtagmenu "hover_label_menu": "Click for options", "a11y_hover": "more information", "a11y_photo": "photo", "a11y_close": "close", "ally_expandImage" : "Click to hide information", "ally_collapsedImage" : "Click to display more information", "ally_showMore" : "Show More", "ally_showLess" : "Show Less", "ally_buisnessCardLabel" : "Business Card", "ally_moreAction": "More Actions", // For Person card "start_chat": "Chat", "add_to_contact": "Add as Sametime Contact", "send_email": "Send Mail", "view_person": "Profile", "hover_label_person": "Click here for Person Card", "work_location": "person.adr.locality+', '+person.adr.region+' '+person.adr.countryname", "specify_email_if_connection": "When Portal is integrated with Connections, Connection Business Card appears only if email is specified", // this is for buffering html for atttributes for businesscard expandedItems : "ibm-primaryEmail,street,stateOrProvinceName,postalCode,countryName", collapsedItems : "ibm-jobTitle,telephoneNumber", showDetailsFlag : true, isDynamicLoading : false, isC2AHandlerRequired : true, isPersonCardHandlerRequired : true, isActionHandlerRequired : true, isParsingRequired : true, getPersonResolverUrl: function(){ return "?uri=personrecord%3ATOBEREPLACED&amp;locale=en&amp;locale=en-US"; }, basePumaResolvedUrl: SemTagSvcPortalGlobalDynamic.basePumaResolvedUrl, availAttribUrl: SemTagSvcPortalGlobalDynamic.availAttribUrl }; SemTagSvcPortalGlobal.service={"entries":[{"id":"com.ibm.portal.action","test":"(globalTestNode.className.match(SemTagSvcPortal.actionRE))","js":"","classnames":[".com\\.ibm\\.portal\\.action"]},{"id":"hcard","test":"(globalTestNode.className.match(SemTagSvcPortal.hcardRE))","js":"/javascript/semanticTagPerson.js","classnames":[".vcard"]},{"id":"sametime","test":"id:hcard","js":"/javascript/semanticTagAwareness.js","classnames":[]},{"id":"c2a","test":"(globalTestNode.className.match(/(^|\\s)c2a:(source|target)(\\s|$)/)) ","js":"/javascript/semanticTagC2A.js","classnames":[".c2a\\:source",".c2a\\:target"]}]}; var externalEntries; try{ if(SemTagSvcPortalGlobal.externalServiceEntries!=null&&SemTagSvcPortalGlobal.externalServiceEntries.length>0){ externalEntries=eval(" ("+SemTagSvcPortalGlobal.externalServiceEntries+")"); if(SemTagSvcPortalGlobal.debug){ console.log("Object got is:"+externalEntries); } if(SemTagSvcPortalGlobal.debug){ console.log("SemTagSvcPortalGlobal.service.entries is:"+SemTagSvcPortalGlobal.service.entries+": before merge"+":"+externalEntries+":"+SemTagSvcPortalGlobal.externalServiceEntries+":"); } SemTagSvcPortalGlobal.service.entries=SemTagSvcPortalGlobal.service.entries.concat(externalEntries); if(SemTagSvcPortalGlobal.debug){ console.log("SemTagSvcPortalGlobal.service.entries is:"+SemTagSvcPortalGlobal.service.entries+": after merge"); } }else{ if(SemTagSvcPortalGlobal.debug){ console.log("No external service entry exists hence no change"+SemTagSvcPortalGlobal.service.entries); } } } catch(e){ if(SemTagSvcPortalGlobal.debug){ console.error("Error occured doing eval on:"+SemTagSvcPortalGlobal.externalServiceEntries+":"+e); } } var SemTagSvcPortal={debug:SemTagSvcPortalGlobal.debug,trace:SemTagSvcPortalGlobal.trace,version:"1.0",lang:SemTagSvcPortalGlobal.lang,bidi:SemTagSvcPortalGlobal.bidi,tagScope:["*"],service:SemTagSvcPortalGlobal.service,scripts:new Array(),actionRegistry:null,refcntAttr:"semtag_refcnt",hoverIdPrefix:"semtag_hover_",hoverIdx:0,liveElemPrefix:"semtag_live_",reMap:new Array(),actionRE:new RegExp("(^|\\s)com.ibm.portal.action(\\s|$)"),hcardRE:new RegExp("(^|\\s)vcard(\\s|$)"),specialMenuProviders:new Array(),parseElem:null,availAttribStr:"",ifConnUrlExists:SemTagSvcPortalGlobal.ifConnUrlExists,connUrl:SemTagSvcPortalGlobal.connUrl,isconnServerNew:SemTagSvcPortalGlobal.isconnServerNew,sametimeSTProxy:(typeof stproxy!=="undefined"),sametimeSTLinks:((typeof stproxy==="undefined")&&(typeof prepareSametimeLink!=="undefined")),sametimeNotIntegrated:((typeof stproxy==="undefined")&&(typeof prepareSametimeLink==="undefined")),isEnablerObjectAvailable:(typeof com!=="undefined")&&(typeof com.ibm!=="undefined")&&(typeof com.ibm.mashups!=="undefined"),svcEntryPersonCard:null,isSizzleAvailable:typeof i$.query==="function",DELAY:10,init:function(_1){ var _2=SemTagSvcPortal.DELAY; if(SemTagSvcPortal.debug){ console.log("inside init of SemtagSvc:"); } if(SemTagSvcPortalGlobal.isParsingRequired===false){ SemTagSvcPortal.svcEntryPersonCard=SemTagSvcPortal.service.entries[1]; if(SemTagSvcPortal.debug){ console.log("SemTagSvcPortal.svcEntryPersonCard.nodes is:"+SemTagSvcPortal.svcEntryPersonCard.nodes); } if(!SemTagSvcPortal.svcEntryPersonCard.nodes){ SemTagSvcPortal.svcEntryPersonCard.nodes=[]; } if(SemTagSvcPortal.debug){ console.log("After SemTagSvcPortal.svcEntryPersonCard.nodes is:"+SemTagSvcPortal.svcEntryPersonCard.nodes); } } var _3=SemTagSvcPortal.isEnablerObjectAvailable; SemTagSvcPortal.isSizzleAvailable=(typeof i$.query==="function"); if(SemTagSvcPortal.debug){ console.log("Enabler object got is:"+_3+" And isSizzleAvailable is "+SemTagSvcPortal.isSizzleAvailable); } if(SemTagSvcPortal.isSizzleAvailable===true||_3===false){ if(SemTagSvcPortal.debug){ console.log("inside init of SemtagSvc for non csa2.theme since either sizzler is available and enabler is not"); } SemTagSvcPortal.parseElem=SemTagSvcPortal.getElementFromEvent(_1); window.setTimeout(SemTagSvcPortal.parseDom,SemTagSvcPortal.DELAY); }else{ if(SemTagSvcPortal.debug){ console.log("inside init of SemtagSvc for csa2.theme as Sizzle is not available while enabler is"); } var _4=SemTagSvcPortal.service.entries; if(SemTagSvcPortal.debug){ console.log("In case of csa2.theme"+(_4?_4.length:0)); } if(SemTagSvcPortalGlobal.isDynamicLoading){ for(var k=0;k<_4.length;k++){ var _5=_4[k]; if(SemTagSvcPortal.debug){ console.log("Calling SemTagSvcPortal.loadScript for:"+_5.js+":"+_5.id); } if(_5.id==="hcard"){ SemTagSvcPortal.loadScript("/javascript/attributes.js"); SemTagSvcPortal.loadScript("/javascript/semanticTagMenu.js"); } SemTagSvcPortal.loadScript(_5.js); } } } if(SemTagSvcPortalGlobal.isActionHandlerRequired){ SemTagSvcPortal.setCallback("com.ibm.portal.action",SemTagSvcPortal.processActions); } if(!SemTagSvcPortalGlobal.isDynamicLoading&&SemTagSvcPortalGlobal.isPersonCardHandlerRequired){ window.setTimeout(SemTagMenu.init,_2); } },loadConnScript:function(){ var _6=document.createElement("script"); var _7=SemTagSvcPortal.connUrl; var _8=_7; _8=_7+"/profiles/portalJS/portalBizCard.js"; _8+=(_8.indexOf("?")==-1)?"?":"&"; _8+="lang="+SemTagSvcPortal.lang; _6.src=_8; try{ document.body.insertBefore(_6,document.body.firstChild); } catch(e){ alert("Svc.loadConnScript caught: "+e); } },watchEvent:function(_9,_a,_b,_c){ try{ if(_9.addEventListener){ _9.addEventListener(_a,_b,_c); }else{ if(_9.attachEvent){ _9.attachEvent("on"+_a,_b); } } } catch(e){ if(SemTagSvcPortal.debug){ alert("Svc.watchEvent caught: "+e); } } },clearEventWatch:function(_d,_e,_f,_10){ try{ if(_d.removeEventListener){ _d.removeEventListener(_e,_f,_10); }else{ if(_d.detachEvent){ _d.detachEvent("on"+_e,_f); } } } catch(e){ if(SemTagSvcPortal.debug){ alert("Svc.clearEventWatch caught: "+e); } } },parseDomUsingMashupHandlerSingleNode:function(_11,_12){ if(SemTagSvcPortal.debug){ console.log("Inside parseDomUsingMashupHandlerSingleNode :"+_11+":"+_12); } if(SemTagSvcPortal.isSizzleAvailable===true){ if(SemTagSvcPortal.debug){ console.log("Inside parseDomUsingMashupHandlerSingleNode returning because Sizzle is available:"+SemTagSvcPortal.isSizzleAvailable); } return false; } if(SemTagSvcPortalGlobal.isParsingRequired===false){ if(SemTagSvcPortal.debug){ console.log("Inside parseDomUsingMashupHandlerSingleNode returning because SemTagSvcPortalGlobal.isParsingRequired is:"+SemTagSvcPortalGlobal.isParsingRequired); } return false; } var _13=SemTagSvcPortal.getService(_12); if(!_13.nodes){ _13.nodes=[]; }else{ for(var k=0;k<_13.nodes.length;k++){ _13.nodes.pop(); } } _13.nodes.push(_11); if(SemTagSvcPortal.debug){ console.log("parseDomUsingMashupHandlerSingleNode entry.callback got is:"+_13.callback+":"+_13.id+":"+_13.nodes.length+":"+(_13.id=="hcard")); } if(_13.callback){ _13.callback.call(this); } if(_13.id==="hcard"){ var _14=SemTagSvcPortal.getService("sametime"); if(SemTagSvcPortal.debug){ console.log("Entry for sametime got is:"+_14); } _14.callback.call(this); } },parseDomUsingMashupHandler:function(_15,_16){ if(SemTagSvcPortal.debug){ console.log("Inside parseDomUsingMashupHandler :"+_15+":"+_16); } if(SemTagSvcPortal.isSizzleAvailable===true){ if(SemTagSvcPortal.debug){ console.log("Commneted Inside parseDomUsingMashupHandler returning because Sizzle is available:"+SemTagSvcPortal.isSizzleAvailable); } } if(SemTagSvcPortalGlobal.isParsingRequired===false){ if(SemTagSvcPortal.debug){ console.log("Inside parseDomUsingMashupHandler returning because SemTagSvcPortalGlobal.isParsingRequired is:"+SemTagSvcPortalGlobal.isParsingRequired); } return false; } var _17=SemTagSvcPortal.getService(_16); if(_16==="com.ibm.portal.action"){ SemTagSvcPortal.setCallback(_16,SemTagSvcPortal.processActions); } if(!_17.nodes){ _17.nodes=[]; } for(var len=0;len<_15.length;len++){ _17.nodes.push(_15[len]); } if(SemTagSvcPortal.debug){ console.log("parseDomUsingMashupHandler entry.callback got is:"+_17.callback+":"+_17.id+":"+_17.nodes.length+":"+(_17.id=="hcard")); } if(_17.callback){ _17.callback.call(this); } SemTagSvcPortal.loadScript(_17.js); try{ var _18=SemTagSvcPortal.service.entries; for(var k=0;k<_18.length;k++){ var _19=_18[k]; if(SemTagSvcPortal.debug){ console.log("entryTemp.callback got is:"+_19.id+":"+_19.nodes+":"+_19.js+":And original entry id is:"+_17.id); } var _1a=false; if(_19.id===_17.id){ continue; } if(_19.test&&_19.test.match(/^id:/)){ var _1b=_19.test.substr(3); if(_1b!=_17.id){ continue; } if(SemTagSvcPortal.debug){ console.log("svcName got is:"+_1b); } var _15=SemTagSvcPortal.getNodes(_1b); if(SemTagSvcPortal.debug){ console.log("nodes for "+_1b+" got is:"+_15+":"+_15.length); } if(_15&&0<_15.length){ _1a=true; } } if(_1a){ if(SemTagSvcPortalGlobal.isDynamicLoading){ SemTagSvcPortal.loadScript(_19.js); } } if(_19.callback){ _19.callback.call(this); } } } catch(e){ if(SemTagSvcPortal.debug){ console.error("Exception occured while doing match of services in SemTagSvcPortal.parseDonMashup"+e); } } },parseDom:function(_1c,_1d){ if(SemTagSvcPortal.debug){ console.log("inside parseDom of SemtagSvc"); } if(SemTagSvcPortalGlobal.isParsingRequired===false){ if(SemTagSvcPortal.debug){ console.log("Inside parseDom returning because SemTagSvcPortalGlobal.isParsingRequired is:"+SemTagSvcPortalGlobal.isParsingRequired); } return false; } if(SemTagSvcPortal.trace){ SemTagUtil.log("parseDom("+_1c+","+_1d+")"); } if(!_1d&&_1c){ _1d=SemTagSvcPortal.getElementFromEvent(_1c); } if(!_1d&&SemTagSvcPortal.parseElem){ _1d=SemTagSvcPortal.parseElem; }else{ if(!_1d){ _1d=document; }else{ if(typeof _1d=="string"){ _1d=document.getElementById(_1d); } } } var _1e=SemTagSvcPortal.service.entries; for(var j=0;j<_1e.length;j++){ var _1f=_1e[j]; if(!_1f.nodes){ _1f.nodes=[]; }else{ if(_1d==document){ while(0<_1f.nodes.length){ _1f.nodes.pop(); } } } } var _20=new Date().getTime(); if(SemTagSvcPortal.isSizzleAvailable===false){ SemTagSvcPortal.traverseNodes(_1d); var _21=new Date().getTime(); }else{ _20=new Date().getTime(); for(var k=0;k<_1e.length;k++){ var _1f=_1e[k]; if(_1f.classnames==null||_1f.classnames==="undefined"||_1f.classnames.length<1){ if(SemTagSvcPortal.trace){ console.info("For service entry:"+_1f.id+": selector not defined to skipping"); } continue; } if(SemTagSvcPortal.trace){ console.log("Type of classnames is:"+typeof _1f.classnames); } if(typeof _1f.classnames==="string"){ if(SemTagSvcPortal.trace){ console.info("For service entry:"+_1f.id+": selector defined is string so skipping"+typeof _1f.classnames); } continue; } if(SemTagSvcPortal.trace){ console.info(" For service entry:"+_1f.id+":"+_1f.classnames.join(",")); } var _22; _22=i$.query(_1f.classnames.join(","),_1d,_1f.nodes); if(_1f.nodes.length!=_22.length){ if(SemTagSvcPortal.trace){ console.info("How is this possible"); } } if(SemTagSvcPortal.trace){ console.log("Length are "+_1f.nodes.length+":"+_22.length); } } _21=new Date().getTime(); if(SemTagSvcPortal.trace){ console.info("Sizzle parse&test: "+(_21-_20)); } } for(var k=0;k<_1e.length;k++){ var _1f=_1e[k]; var _23=false; if(0<_1f.nodes.length){ _23=true; }else{ if(_1f.test&&_1f.test.match(/^id:/)){ var _24=_1f.test.substr(3); var _25=SemTagSvcPortal.getNodes(_24); if(_25&&0<_25.length){ _23=true; } } } if(_23){ if(SemTagSvcPortalGlobal.isDynamicLoading){ if(_1f.id=="hcard"){ SemTagSvcPortal.loadScript("/javascript/attributes.js"); SemTagSvcPortal.loadScript("/javascript/semanticTagMenu.js"); } if(SemTagSvcPortal.trace){ console.log("Type of entry.js is :"+typeof _1f.js); } if(typeof _1f.js==="string"){ SemTagSvcPortal.loadScript(_1f.js); } } } if(SemTagSvcPortal.debug){ console.log("entry.callback got is:"+_1f.id+":"+_1f.nodes); } if(_1f.callback){ _1f.callback.call(_1f.nodes); } } SemTagSvcPortal.parseElem=null; },traverseNodes:function(_26){ SemTagSvcPortal.traverse_children(_26); },traverse_tagscope:function(_27){ var _28=SemTagSvcPortal.service.entries; var _29=_27.getElementsByTagName(SemTagSvcPortal.tagScope); for(var i=0;i<_29.length;i++){ var _27=_29[i]; for(var j=0;j<_28.length;j++){ var _2a=_28[j]; if(!_2a.nodes){ _2a.nodes=new Array(); } if(eval(_2a.test)){ _2a.nodes.push(_27); } } } },traverse_children:function(_2b){ SemTagSvcPortal.testNode(_2b); var _2c=(_2b&&_2b.childNodes)?_2b.childNodes:null; if(SemTagSvcPortalGlobal.isPersonCardHandlerRequired&&_2b&&_2b.tagName&&_2b.tagName=="IFRAME"){ try{ if(typeof ActiveXObject!="undefined"){ var _2d=document.frames[_2b.id].document; if(_2d){ _2c=_2d.childNodes; } }else{ if(_2b.contentDocument&&_2b.contentDocument.childNodes){ _2c=_2b.contentDocument.childNodes; } } } catch(e){ _2c=null; } if(SemTagSvcPortal.trace){ SemTagUtil.log("IFRAME(id="+_2b.id+",children="+(_2c?_2c.length:"is null")+")"); } if(_2c&&0<_2c.length){ var _2e=SemTagMenu.includeCSS(_2c[0].parentNode); if(_2e){ SemTagSvcPortal.watchEvent(_2b,"load",SemTagSvcPortal.parseDom,false); SemTagMenu.registerMenuEventHandlers(_2c[0].parentNode); } } } if(_2c==null||_2c=="undefined"){ return; } for(var i=0;i<_2c.length;i++){ SemTagSvcPortal.traverse_children(_2c[i]); } },testNode:function(_2f){ globalTestNode=_2f; if(_2f==null||_2f.className==null||_2f.className=="undefined"||_2f.tagName==null||_2f.tagName=="undefined"){ return; } var _30=SemTagSvcPortal.service.entries; for(var j=0;j<_30.length;j++){ var _31=_30[j]; if(_31.test&&!_31.test.match(/^id:/)&&eval(_31.test)){ if(!_2f.alreadyadded){ _2f.alreadyadded=true; _31.nodes.push(_2f); } } } },getService:function(_32){ var _33=SemTagSvcPortal.service.entries; for(var i=0;i<_33.length;i++){ var _34=_33[i]; if(_34.id==_32){ return _34; } } },setSemanticTagValue:function(_35,_36,_37){ if(!_36.semTagValues){ _36.semTagValues={}; } _36.semTagValues[_35]=_37; },getSemanticTagValues:function(_38){ return _38.semTagValues; },getNodes:function(_39){ var _3a=SemTagSvcPortal.getService(_39); if(SemTagSvcPortal.debug){ console.log("Inside SemTagSvcPortal.getNodes for:"+_39); } if(_3a&&_3a.test&&_3a.test.match(/^id:/)){ _3a=SemTagSvcPortal.getService(_3a.test.substr(3)); } if(SemTagSvcPortal.debug){ console.log("Inside SemTagSvcPortal.getNodes for:"+_39+"and service is:"+_3a); } if(_3a){ if(SemTagSvcPortal.debug){ console.log("Inside SemTagSvcPortal.getNodes for:"+_39+"and service.nodes is:"+_3a.nodes); } } return _3a?_3a.nodes:null; },setCallback:function(_3b,_3c){ var _3d=SemTagSvcPortal.getService(_3b); if(_3d){ _3d.callback=_3c; if(SemTagSvcPortal.debug){ console.log("Callback setting for :"+_3b); } if(SemTagSvcPortal.debug){ console.log("Callback set for :"+_3d.id); } }else{ if(SemTagSvcPortal.debug){ console.log("Did not get service for :"+_3b); } } },loadScript:function(_3e,_3f){ if(!_3e||_3e==""){ return; } if(_3f=="undefined"||_3f==null){ _3f=false; } if(!SemTagSvcPortal.scripts[_3e]){ SemTagSvcPortal.scripts[_3e]=true; var _40=document.createElement("script"); var url=_3e.match(/^http/)?_3e:SemTagSvcPortalGlobal.contextUrl+_3e; url+=(url.indexOf("?")==-1)?"?":"&"; url+="language="+SemTagSvcPortal.lang; _40.src=url; if(SemTagSvcPortal.debug){ console.log("URL in LOADSCRIPT GOT IS :"+url); } if(SemTagSvcPortalGlobal.isDynamicLoading||_3f){ document.body.insertBefore(_40,document.body.firstChild); } } },setSpecialMenuProvider:function(_41){ SemTagSvcPortal.specialMenuProviders.push(_41); },getElementsByClassName:function(_42,_43,_44,_45){ if(!_43){ _43=document.body; } if(!_44){ limit=0; } if(!_45){ _45=["*"]; } var _46=SemTagSvcPortal.getRegExp(_42); if(_43&&_43.className&&_43.className.match(_46)){ return new Array(_43); } var _47=new Array(); for(var t=0;t<_45.length;t++){ var _48=_43.getElementsByTagName(_45[t]); for(var i=0;i<_48.length;i++){ var _49=_48[i]; if(_49.className&&_49.className.match(_46)){ _47.push(_49); } if(0<_44&&_44==_47.length){ break; } } } return _47; },getParentByClassName:function(_4a,_4b){ if(!_4b){ return null; } var _4c=SemTagSvcPortal.getRegExp(_4a); if(_4b.className&&_4b.className.match(_4c)){ return _4b; } while(_4b.parentNode){ _4b=_4b.parentNode; if(_4b.className&&_4b.className.match(_4c)){ return _4b; } } return null; },addHover:function(_4d,_4e,_4f,_50){ while(typeof SemTagMenu==undefined){ alert("waiting..."); } var _51=_4d.getAttribute(SemTagSvcPortal.refcntAttr); if(SemTagSvcPortal.debug){ console.log("Refcount got is:"+_51+":"+SemTagMenu.staticHover+":"+(_4e!==null)+":"+_4f); } if(_51){ _4d.setAttribute(SemTagSvcPortal.refcntAttr,parseInt(Number(_51)+1)); if(SemTagMenu.staticHover){ var img=SemTagMenu.findHoverFromLiveElement(_4d); if(img){ SemTagSvcPortal.watchEvent(img,"click",_4f,false); img.setAttribute("href","javascript:SemTagMenu.a11y()"); }else{ if(SemTagSvcPortal.debug){ alert("couldn't find the hover for this element!"); } } }else{ SemTagSvcPortal.watchEvent(_4d,"mouseover",_4e,false); } }else{ _4d.setAttribute(SemTagSvcPortal.refcntAttr,"1"); SemTagSvcPortal.hoverIdx++; _4d.setAttribute(SemTagSvcPortal.liveElemPrefix+"id",SemTagSvcPortal.hoverIdx); if(SemTagMenu.staticHover){ var img=SemTagSvcPortal.createHoverImage(_50); SemTagSvcPortal.watchEvent(img,"click",_4f,false); SemTagSvcPortal.watchEvent(img,"keydown",SemTagMenu.a11y,false); img.setAttribute("href","javascript:void()"); var _52=_4d.nextSibling; if(_52){ _52.parentNode.insertBefore(img,_52); }else{ _4d.parentNode.appendChild(img); } _4d.setAttribute(SemTagSvcPortal.hoverIdPrefix+"idx",parseInt(SemTagSvcPortal.hoverIdx)); _4d.id=SemTagSvcPortal.liveElemPrefix+SemTagSvcPortal.hoverIdx; }else{ var _53=SemTagUtil.getNodeClassValue(_4d); if(_53&&0<_53.length){ _53+=" hasHover"; }else{ _53="hasHover"; } SemTagUtil.setNodeClassValue(_4d,_53); SemTagSvcPortal.watchEvent(_4d,"mouseover",_4e,false); _4d.setAttribute("tabIndex","0"); SemTagSvcPortal.watchEvent(_4d,"focus",_4e,false); SemTagSvcPortal.watchEvent(_4d,"blur",SemTagMenu.mouseout,false); } } },removeHover:function(_54,_55,_56){ var _57=_54.getAttribute(SemTagSvcPortal.refcntAttr); if(_57){ var _58=Number(_57)-1; if(_58<0&&SemTagSvcPortal.debug){ alert("SemTagSvcPortal.removeHover called on an element with refcnt="+_57); } if(SemTagMenu.staticHover){ var _59=SemTagSvcPortal.getHoverElement(_54); SemTagSvcPortal.clearEventWatch(_59,"click",_56,false); if(_58==0){ _59.parentNode.removeChild(_59); } }else{ SemTagSvcPortal.clearEventWatch(_54,"mouseover",_55,false); SemTagSvcPortal.clearEventWatch(_54,"focus",_55,false); _54.setAttribute(SemTagSvcPortal.refcntAttr,_58); if(_58==0){ var _5a=SemTagUtil.getNodeClassValue(_54); var _5b=_5a.replace(/hasHover/,""); SemTagUtil.setNodeClassValue(_54,_5b); _54.removeAttribute(SemTagSvcPortal.refcntAttr); _54.removeAttribute("tabIndex"); } } } },createHoverImage:function(_5c){ var img=document.createElement("img"); img.id=SemTagSvcPortal.hoverIdPrefix+SemTagSvcPortal.hoverIdx; img.className=SemTagMenu.iconName; img.setAttribute("src",SemTagSvcPortalGlobal.contextUrl+"/ui/menu_selected.gif"); img.setAttribute("border","0"); img.setAttribute("alt",_5c); var _5d=document.createElement("a"); SemTagSvcPortal.watchEvent(_5d,"mouseover",SemTagMenu.activateHover,false); SemTagSvcPortal.watchEvent(_5d,"mouseout",SemTagMenu.deactivateHover,false); _5d.appendChild(img); return _5d; },getHoverElement:function(_5e){ if(!_5e){ return null; } if(SemTagMenu.staticHover){ var idx=_5e.getAttribute(SemTagSvcPortal.hoverIdPrefix+"idx"); var img=document.getElementById(SemTagSvcPortal.hoverIdPrefix+idx); if(img){ return img.parentNode; } }else{ var _5f=SemTagUtil.getNodeClassValue(_5e); if(_5f.match(/hasHover/)){ return _5e; } } return null; },showHover:function(_60,_61,_62){ SemTagMenu.showHover(_60,_61,_62); },setMenuData:function(_63,_64,_65,_66,_67){ SemTagMenu.setMenuData(_63,_64,_65,_66,_67); },getMenuItemJson:function(_68,_69,_6a,_6b){ var o=_6a?_6a:0; var i=_6b?_6b:""; return {"label":_68,"href":_69,"order":o,"icon":i}; },getMenuHeaderJson:function(_6c,_6d,_6e){ if(_6d!="text/html"){ return null; } if(_6c&&0<_6c.length){ return {"markup":_6c,"order":_6e}; }else{ null; } },getMenuFooterJson:function(_6f,_70,_71){ if(_70!="text/html"){ return null; } if(_6f&&0<_6f.length){ return {"markup":_6f,"order":_71}; }else{ null; } },getElementFromEvent:function(_72){ var _73=_72.target?_72.target:_72.srcElement; if(_73==window){ _73=_73.document; } return _73; },getLiveElementFromEvent:function(_74){ return SemTagMenu.findLiveElementFromEventSource(SemTagSvcPortal.getElementFromEvent(_74)); },getEventAbsoluteX:function(e){ var x=0; if(e.pageX){ x=e.pageX; }else{ if(e.clientX){ if(document.body.scrollLeft>document.documentElement.scrollLeft){ x=e.clientX+document.body.scrollLeft; }else{ x=e.clientX+document.documentElement.scrollLeft; } } } return x; },getEventAbsoluteY:function(e){ var y=0; if(e.pageY){ y=e.pageY; }else{ if(e.clientY){ if(document.body.scrollTop>document.documentElement.scrollTop){ y=e.clientY+document.body.scrollTop; }else{ y=e.clientY+document.documentElement.scrollTop; } } } return y; },findPosition:function(obj,_75){ var _76=0,_77=0,_78=0; var _79=obj.offsetWidth; if(obj.offsetParent){ if(_75){ _77+=(SemTagSvcPortal.bidi=="rtl")?0:_79; } _78+=obj.offsetHeight; while(obj!=null){ _77+=obj.offsetLeft; _78+=obj.offsetTop; obj=obj.offsetParent; _76++; } return [_77+(SemTagSvcPortal.bidi=="rtl"?_79:0),_78]; }else{ return [obj.x+(SemTagSvcPortal.bidi=="rtl"?_79:0),obj.y]; } },createGroupJson:function(ctx,_7a){ return {"context":ctx,"extenders":_7a}; },createActionJson:function(id,js,ctx,_7b,_7c,_7d,url,_7e){ var i=(id&&0<id.length)?id[0].innerHTML:null; var j=(js&&0<js.length)?js[0].innerHTML:null; var c=(ctx&&0<ctx.length)?ctx[0].innerHTML:null; var l=(_7b&&0<_7b.length)?_7b[0].innerHTML:null; var d=(_7c&&0<_7c.length)?_7c[0].innerHTML:null; var s=(_7d&&0<_7d.length)?_7d[0].innerHTML:null; var u=(url&&0<url.length)?url[0].innerHTML:null; var o=(_7e&&0<_7e.length)?parseInt(_7e[0].innerHTML):0; return {"id":i,"impl":j,"context":c,"label":l,"description":d,"showif":s,"url":u,"order":o}; },parseOrder:function(_7f){ if(_7f==null||_7f.length==0){ return 0; } if(_7f.charAt(0)=="-"){ return parseInt(_7f.substr(1))*-1; }else{ return parseInt(_7f); } },getActions:function(_80){ if(!SemTagSvcPortal.actionRegistry){ SemTagSvcPortal.processActions(); } for(var i=0;i<SemTagSvcPortal.actionRegistry.length;i++){ if(SemTagSvcPortal.actionRegistry[i].context==_80){ return SemTagSvcPortal.actionRegistry[i].extenders; } } return SemTagSvcPortal.actionRegistry[0].extenders; },processActions:function(){ if(SemTagSvcPortal.debug){ console.log("inside processActions of SemtagSvcPortal"); } if(!SemTagSvcPortal.actionRegistry){ SemTagSvcPortal.actionRegistry=new Array(); SemTagSvcPortal.actionRegistry[0]=SemTagSvcPortal.createGroupJson("dummy",new Array()); } var i; var _81=SemTagSvcPortal.getNodes("com.ibm.portal.action"); if(SemTagSvcPortal.debug){ console.log("Nodes got for com.ibm.portal.action is:"+_81); } while(_81&&0<_81.length){ if(SemTagSvcPortal.debug){ console.log("Inside while loop of actions"); } var _82=_81.pop(); var id=SemTagSvcPortal.getElementsByClassName("action-id",_82); var _83=SemTagSvcPortal.getElementsByClassName("action-impl",_82); var ctx=SemTagSvcPortal.getElementsByClassName("action-context",_82); var _84=SemTagSvcPortal.getElementsByClassName("action-label",_82); var _85=SemTagSvcPortal.getElementsByClassName("action-description",_82); var _86=SemTagSvcPortal.getElementsByClassName("action-showif",_82); var url=SemTagSvcPortal.getElementsByClassName("action-url",_82); var _87=SemTagSvcPortal.getElementsByClassName("action-order",_82); var _88=SemTagSvcPortal.createActionJson(id,_83,ctx,_84,_85,_86,url,_87); for(i=1;i<SemTagSvcPortal.actionRegistry.length;i++){ if(SemTagSvcPortal.actionRegistry[i].context==_88.context){ var cnt=SemTagSvcPortal.actionRegistry[i].extenders.length; for(var j=0;j<cnt;j++){ if(_88.id==SemTagSvcPortal.actionRegistry[i].extenders[j].id){ break; } } if(j==cnt){ SemTagSvcPortal.actionRegistry[i].extenders.push(_88); } break; } } if(i==SemTagSvcPortal.actionRegistry.length){ SemTagSvcPortal.actionRegistry[i]=SemTagSvcPortal.createGroupJson(ctx[0].innerHTML,new Array()); SemTagSvcPortal.actionRegistry[i].extenders.push(_88); } if(SemTagSvcPortal.debug){ console.log("Action.impl got is:"+_88.impl); } if(_88.impl){ SemTagSvcPortal.loadScript(_88.impl,true); } } for(i=0;i<SemTagSvcPortal.actionRegistry.length;i++){ SemTagSvcPortal.actionRegistry[i].extenders.sort(SemTagSvcPortal.sortByOrder); } },sortByOrder:function(a,b){ if(a.order>b.order){ return 1; }else{ if(a.order<b.order){ return -1; }else{ return 0; } } },getTextValue:function(_89){ if(!_89){ return ""; } return _89.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,""); },getTypedValue:function(_8a,_8b){ if(!_8b){ _8b="def"; } var _8c=new Array(); var _8d=SemTagSvcPortal.getElementsByClassName("type",_8a); var _8e=SemTagSvcPortal.getElementsByClassName("value",_8a); var _8f=""; if(_8e.length<1){ _8f=SemTagSvcPortal.getTextValue(_8a); } for(var i=0;i<_8e.length;i++){ _8f+=SemTagSvcPortal.getTextValue(_8e[i]); } if(_8d.length<1){ _8c[_8b]=_8f; }else{ for(var j=0;j<_8d.length;j++){ var _90=_8d[j]; var _91=_90.tagName.match(/^abbr$/i)?_90.getAttribute("title"):SemTagSvcPortal.getTextValue(_90); _8c[_91.toLowerCase()]=_8f; } } return _8c; },findNameElementInHcard:function(_92){ if(_92.className!="vcard"){ _92=SemTagSvcPortal.getParentByClassName("vcard",_92); } var _93=SemTagSvcPortal.getElementsByClassName("fn",_92)[0]; if(!_93){ _93=SemTagSvcPortal.getElementsByClassName("n",_92)[0]; } return _93; },getEmailFromHcard:function(_94){ if(!_94){ return ""; } if(_94.className!="vcard"){ _94=SemTagSvcPortal.getParentByClassName("vcard",_94); } var _95=""; if(_94){ var _96=SemTagSvcPortal.getElementsByClassName("email",_94)[0]; var _97=SemTagSvcPortal.getTypedValue(_96,"internet"); _95=_97.internet; } return _95; },findElementByNameInHcard:function(_98,_99){ if(_98.className!="vcard"){ _98=SemTagSvcPortal.getParentByClassName("vcard",_98); } return SemTagSvcPortal.getElementsByClassName(_99,_98)[0]; },getRegExp:function(str){ var _9a=SemTagSvcPortal.reMap[str]; if(!_9a){ _9a=new RegExp("(^|\\s)"+str+"(\\s|$)"); SemTagSvcPortal.reMap[str]=_9a; } return _9a; },addElementToHandler:function(_9b,_9c,_9d){ if(SemTagSvcPortalGlobal.isParsingRequired===true){ if(SemTagSvcPortal.debug){ console.log("Since parser is on returning to avoid duplicacy"); } return false; } if(_9b==null||_9b==="undefined"){ return false; } var _9e=SemTagSvcPortal.service.entries; if(SemTagSvcPortal.debug){ console.log("Service entries got is:"+_9e); } var _9f=null; for(var k=0;k<_9e.length;k++){ var _a0=_9e[k]; if(_a0.id===_9d){ _9f=_a0; if(SemTagSvcPortal.debug){ console.log("Service entry got is:"+_9f.id+":"+_9f); } break; } } if(_9f==null){ if(SemTagSvcPortal.debug){ console.log("Since no Service entry got so returning"); } return false; } var _a1; if(_9b.nodeName==="A"||_9d==="c2a"){ _a1=_9b.parentNode; }else{ _a1=_9b; } if(SemTagSvcPortal.debug){ console.log("Node is :"+_a1+":"+_a1.nodeName+":"+_a1.innerHTML); } if(_a1.getAttribute("alreadyAdded")==null){ if(_9f.nodes==null||_9f.nodes==="undefined"||typeof _9f.nodes!=="array"){ _9f.nodes=[]; } _9f.nodes.push(_a1); _a1.setAttribute("alreadyAdded",true); if(_9d==="c2a"){ var _a2=document.getElementsByClassName("c2a:target"); for(var i=0;i<_a2.length;i++){ _9f.nodes.push(_a2.item(i)); } } } if(SemTagSvcPortal.debug){ console.log("Before calling Service "+_9d+" handler callback"); } _9f.callback.call(_9f.nodes); if(SemTagSvcPortal.debug){ console.log("After calling Service "+_9d+" handler callback"); } if(SemTagSvcPortal.debug){ console.log("event object is :"+_9c+":"+_9c.type+":"+_9c.target); } if(_9d==="hcard"){ if(SemTagSvcPortalGlobal.ifConnUrlExists==="false"){ SemTagPerson.showHover(_9c); } SemTagSvcPortal.sametimeNotIntegrated=((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)==="undefined")); if(SemTagSvcPortal.debug){ console.log("parsing required is:"+SemTagSvcPortalGlobal.isParsingRequired+": and sametimeintegrated is"+SemTagSvcPortal.sametimeNotIntegrated); } if(SemTagSvcPortalGlobal.isParsingRequired===false&&SemTagSvcPortal.sametimeNotIntegrated===false){ if(SemTagSvcPortal.debug){ console.log("Calling SemTagAwrns.processHcards in addElementToHandler"); } SemTagAwrns.processHcards([_a1]); } } if(_9d==="c2a"){ SemTagC2A.showHover(_9c); } _9f.nodes=[]; return true; },addElementToPersonCardHandler:function(_a3,_a4){ if(SemTagSvcPortalGlobal.isParsingRequired===true){ if(SemTagSvcPortal.debug){ console.log("Since parser is on returning to avoid duplicacy"); } return false; } if(_a3==null||_a3==="undefined"){ return false; } var _a5; if(_a3.nodeName==="A"){ _a5=_a3.parentNode; }else{ _a5=_a3; } if(SemTagSvcPortal.debug){ console.log("Node is :"+_a5+":"+_a5.nodeName+":"+_a5.innerHTML); } if(_a5.getAttribute("alreadyAdded")==null){ SemTagSvcPortal.svcEntryPersonCard.nodes.push(_a5); _a5.setAttribute("alreadyAdded",true); } if(SemTagSvcPortal.debug){ console.log("Before calling Person Card hanlder callback"); } SemTagSvcPortal.svcEntryPersonCard.callback.call(SemTagSvcPortal.svcEntryPersonCard.nodes); if(SemTagSvcPortal.debug){ console.log("After calling Person Card hanlder callback"); } if(SemTagSvcPortal.debug){ console.log("event object is :"+_a4+":"+_a4.type+":"+_a4.target); } if(SemTagSvcPortalGlobal.ifConnUrlExists==="false"){ SemTagPerson.showHover(_a4); } SemTagSvcPortal.sametimeNotIntegrated=((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)==="undefined")); if(SemTagSvcPortal.debug){ console.log("parsing required is:"+SemTagSvcPortalGlobal.isParsingRequired+": and sametimeintegrated is"+SemTagSvcPortal.sametimeNotIntegrated); } if(SemTagSvcPortalGlobal.isParsingRequired===false&&SemTagSvcPortal.sametimeNotIntegrated===false){ if(SemTagSvcPortal.debug){ console.log("Calling SemTagAwrns.processHcards in addElementToPersonCardHandler"); } SemTagAwrns.processHcards([_a5]); } SemTagSvcPortal.svcEntryPersonCard.nodes.pop(); return true; },registerService:function(_a6){ var _a7=SemTagSvcPortal.service.entries; _a7[_a7.length]=_a6; }}; var SemTagSvcConfig=null; if((SemTagSvcPortal.ifConnUrlExists=="true")&&(SemTagSvcPortal.isconnServerNew===true)){ SemTagSvcConfig={isPortal:true,baseUrl:SemTagSvcPortal.connUrl+"/profiles",loadCssFiles:true,isBidiRTL:false}; } SemTagSvcPortal.watchEvent(window,"load",SemTagSvcPortal.init,false); var SemTagSvc=SemTagSvcPortal; var SemTagUtil={isGecko:(document.all?false:true),getNodeClassValue:function(_1){ var rv; if(SemTagUtil.isGecko){ rv=(typeof (_1.getAttribute)!="undefined")?_1.getAttribute("class"):""; }else{ rv=_1.className; } return (typeof (rv)!="undefined"&&rv!=null)?rv:""; },setNodeClassValue:function(_2,_3){ if(SemTagUtil.isGecko){ _2.setAttribute("class",_3); }else{ _2.className=_3; } },fireEvent:function(_4,_5){ try{ if(_4.fireEvent){ _4.fireEvent(_5); }else{ if(_4.dispatchEvent){ _4.dispatchEvent(_5); } } } catch(e){ if(SemTagSvcPortal.debug){ alert("Svc.fireEvent caught: "+e); } } },getOwnerDocument:function(_6){ if(!_6){ return null; } if(SemTagUtil.isGecko){ return _6.ownerDocument; }else{ var _7=_6; while(_7.parentNode){ _7=_7.parentNode; } return _7; } },getFrameElement:function(_8){ if(SemTagUtil.isGecko){ var oD=_8.ownerDocument; return oD.defaultView.frameElement; }else{ var _9=_8; while(_9.parentNode){ _9=_9.parentNode; } return _9.parentWindow.frameElement; } },getHcardAttributeValue:function(_a,_b){ switch(_a){ case ("email"): return SemTagUtil.getHcardTypedAttribute(_b,_a,"internet"); case ("tel"): return SemTagUtil.getHcardTypedAttribute(_b,_a,"voice"); case ("adr"): return SemTagUtil.getHcardTypedAttribute(_b,_a,"intl"); } var _c=SemTagSvcPortal.getParentByClassName("vcard",_b); var _d=SemTagSvcPortal.getElementsByClassName(_a,_c,1); if(_d.length>0&&_d[0].tagName.match(/^abbr$/i)){ return _d[0].getAttribute("title"); } switch(_a){ case ("X-person-display-inline"): if(_d.length>0){ return true; }else{ return false; } case ("fn"): var fn=SemTagUtil.getSinglePropertyValue(_d[0]); if(fn){ return fn; }else{ return SemTagUtil.getHcardAttributeValue("n",_b); } break; case ("X-person-header-only"): case ("X-person-inside-inline"): return (_d&&0<_d.length); case ("X-sametime-resolve"): var _e=_d[0]; return (typeof (_e)!="undefined"&&_e!=null); case ("n"): if(_d.length>0){ var _f=_d[0]; var _10=""; var _11=["honorific-prefix","given-name","additional-name","family-name","honorific-suffix"]; for(var i=0;i<5;i++){ var n=SemTagUtil.getSinglePropertyValue(SemTagSvcPortal.getElementsByClassName(_11[i],_f,1)[0]); if(n){ _10+=n+" "; } } return _10; } return ""; break; case ("photo"): var _12=_d[0]; if(_12){ return _12.getAttribute("src"); }else{ return; } break; case ("X-sametime-status"): var _13=_d[0]; if(!_13){ return ""; } var _14=_13.getAttribute("value"); if(_14){ return _14; }else{ return SemTagUtil.getSinglePropertyValue(_13); } break; case ("street-address"): case ("post-office-box"): case ("extended-address"): case ("locality"): case ("region"): case ("postal-code"): case ("country-name"): case ("title"): case ("role"): case ("org"): default: return SemTagUtil.getSinglePropertyValue(_d[0]); break; } },getHcardTypedAttribute:function(_15,_16,_17){ var _18=new Object(); var _19=SemTagSvcPortal.getParentByClassName("vcard",_15); var _1a=SemTagSvcPortal.getElementsByClassName(_16,_19); for(var i=0;i<_1a.length;i++){ var _1b=_1a[i]; if(_16=="email"&&_1b.nodeName.toLowerCase()=="a"&&_1b.href.match(/^mailto:/)){ var _1c=_1b.href.indexOf("?"); if(_1c>-1){ _18[_17]=_1b.href.slice(7,_1c); }else{ _18[_17]=_1b.href.slice(7); } continue; } _18=SemTagSvcPortal.getTypedValue(_1b,_17); } return _18; },getSinglePropertyValue:function(_1d){ if(!_1d){ return false; } var _1e=_1d.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,""); return _1e; },crossDomainRequest:function(){ var _1f=new Array(); var _20=new Array(); var _21=this; createTimeoutFunction=function(_22){ return function(){ _21.cancelRequest(_22); }; }; this.getScriptId=function(id){ return "_JVLN_"+id; }; this.getScriptObject=function(id){ var _23=SemTagUtil.isGecko?this.getScriptId(id):this.$_getScriptId(id); return document.getElementById(_23); }; this.request=function(url,_24,_25,_26,_27){ var _28=this.getScriptId(_27); if(_25){ _1f[_27]=_25; } if(_26){ _20[_27]=_26; } var _29=document.createElement("script"); _29.id=_28; try{ _29.src=url; } catch(e){ if(SemTagSvcPortal.debug){ alert("crossDomainRequest.request: "+e); } return false; } document.body.insertBefore(_29,document.body.firstChild); if(_24){ var _2a=this; window.setTimeout(createTimeoutFunction(_27),_24); } }; this.cancelRequest=function(id){ if(SemTagSvcPortal.debug){ window.status="crossDomainRequest.cancelRequest"; } var _2b=_1f[id]; _1f[id]=null; var _2c=_20[id]; _20[id]=null; if(_2b){ try{ if(_2b){ var evt={"target":_2c}; _2b.call(this,false,null,evt); } var _2d=this.getScriptObject(id); if(_2d){ document.body.removeChild(_2d); } } catch(e){ if(SemTagSvcPortal.trace){ SemTagUtil.log("crossDomainRequest.cancelRequest caught: "+e+"(callback="+_2b+")"); } } } }; this.dispatch=function(id,_2e){ if(!id){ return; } try{ var _2f=_1f[id]; if(SemTagSvcPortal.debug&&!_2f){ alert("dispatch got null callback for: "+id); } if(_2f){ var evt={"target":_20[id]}; _2f.call(this,true,_2e,evt); _1f[id]=null; _20[id]=null; var _30=this.getScriptObject(id); if(_30){ document.body.removeChild(_30); } } } catch(e){ if(SemTagSvcPortal.trace){ SemTagUtil.log("crossDomainRequest.dispatch caught: "+e); } } }; },log:function(msg){ var _31=document.getElementById("javlin.logger"); if(_31){ var txt=document.createTextNode(msg+"..... "); _31.appendChild(txt); } }}; var availAttrib={availAttribUrl:SemTagSvcPortalGlobal.availAttribUrl,req:"",userAttributesRetrieved:false,retrieveAttribute:function(){ if(availAttrib.userAttributesRetrieved){ return; } if(SemTagSvcPortal.availAttribStr!=""){ return; } availAttrib.req=ibm.portal.xml.getXmlHttpRequest(); availAttrib.req.onreadystatechange=availAttrib.processStateChange; try{ availAttrib.req.open("GET",availAttrib.availAttribUrl,true); } catch(e){ alert(e); } availAttrib.req.send(null); availAttrib.userAttributesRetrieved=true; },getAttributesFromTags:function(_1,_2,_3){ if(typeof ActiveXObject!="undefined"){ return _1.getElementsByTagName(_3+":"+_2); } return _1.getElementsByTagNameNS("*",_2); },processStateChange:function(){ if(availAttrib.req.readyState==4){ if(availAttrib.req.status==200){ var _4=availAttrib.req.responseText; if(_4.length>1){ var _5=ibm.portal.xml.loadXmlString(_4); var _6=availAttrib.getAttributesFromTags(_5.documentElement,"title","atom"); var i; for(i=1;i<_6.length;i++){ if((SemTagSvcPortal.availAttribStr=="")){ if((_6[i].firstChild.nodeValue!=null)){ SemTagSvcPortal.availAttribStr=_6[i].firstChild.nodeValue; } }else{ if((_6[i].firstChild.nodeValue!=null)){ SemTagSvcPortal.availAttribStr=_6[i].firstChild.nodeValue+","+SemTagSvcPortal.availAttribStr; } } } } }else{ if(SemTagSvcPortal.debug){ console.log(availAttrib.req.statusText); } } } }}; var mytest=null; var liveNameElementId=null; var SemTagMenu={needCss:true,staticHover:false,id:"semtagmenu",hideDelay:SemTagSvcPortalGlobal.ptTimeout,timeouts:[],iconName:"menu_drop_icon",showing:false,currentElem:null,currentHoverLabel:null,refCount:-1,a11yMode:false,svcHandlers:[],items:[],headers:[],footers:[],moreActionImgUrl:SemTagSvcPortalGlobal.contextUrl+"/ui/ShowActions.gif",verticalRulerUrl:SemTagSvcPortalGlobal.contextUrl+"/ui/Line_Tree.gif",hoverIdRE:new RegExp(SemTagSvcPortal.hoverIdPrefix),iconNameRE:new RegExp("(^|\\s)menu_drop_icon(\\s|$)"),sftflag:false,init:function(){ SemTagMenu.includeCSS(document); },includeCSS:function(_1){ var _2=false; if(typeof (_1._JAVLIN_STYLE_)=="undefined"){ _2=true; if(SemTagMenu.needCss){ var _3=_1.createElement("link"); _3.rel="stylesheet"; _3.href=SemTagSvcPortalGlobal.contextUrl+"/ui/"+(SemTagSvcPortal.bidi=="rtl"?"styles_rtl.css":"styles.css"); _3.type="text/css"; var _4=_1.getElementsByTagName("head"); if((_4&&_4[0])){ _4[0].appendChild(_3); } } _1._JAVLIN_STYLE_="loaded"; } return _2; },registerMenuEventHandlers:function(_5){ SemTagSvcPortal.watchEvent(_5,"click",SemTagMenu.click,false); SemTagSvcPortal.watchEvent(_5,"keydown",SemTagMenu.catchEscape,false); SemTagSvcPortal.watchEvent(_5,"keyup",SemTagMenu.catchKeyup,false); },unregisterMenuEventHandlers:function(_6){ SemTagSvcPortal.clearEventWatch(_6,"click",SemTagMenu.click,false); SemTagSvcPortal.clearEventWatch(_6,"keydown",SemTagMenu.catchEscape,false); SemTagSvcPortal.clearEventWatch(_6,"keyup",SemTagMenu.catchKeyup,false); },nls:{"hover_label":SemTagSvcPortalGlobal.hover_label_menu,"a11y_hover":SemTagSvcPortalGlobal.a11y_hover,"a11y_photo":SemTagSvcPortalGlobal.a11y_photo,"a11y_close":SemTagSvcPortalGlobal.a11y_close,"ally_expandImage":SemTagSvcPortalGlobal.ally_expandImage,"ally_collapsedImage":SemTagSvcPortalGlobal.ally_collapsedImage,"ally_showMore":SemTagSvcPortalGlobal.ally_showMore,"ally_showLess":SemTagSvcPortalGlobal.ally_showLess,"ally_buisnessCardLabel":SemTagSvcPortalGlobal.ally_buisnessCardLabel,"ally_moreAction":SemTagSvcPortalGlobal.ally_moreAction},hoverDimension:[14,14],hoverOffset:[15,-1],menuOffset:[15,-1],writeHover:function(_7,_8,_9){ _7.write("<div class='"+SemTagMenu.iconName+"' style='cursor:pointer;'>"+_9+"</div>"); },startMenu:function(_a,_b){ _a.write("<div class='personMenu' id='personMenuID'><ul role='region' aria-label='listitem' style='padding:0px;margin:0px;list-style-type:none;float:left;'title='Person card dialog' alt='Person card dialog'><li role='region' aria-label='listitem' tabindex=0 onkeydown=\"SemTagMenu.catchEscape();\" onkeyup=\"SemTagMenu.catchKeyup();\"></li></ul>"); },writeHeader:function(_c,_d,_e){ _c.write("<div class='semtag_header'>"+_d.markup+"</div>"); },startActionSection:function(_f,_10,_11,_12){ if(!_11){ _11="personMenuActions"; } _f.write("<div id='lessItem' style='display:block'><table role='presentation' class='personMenuActions' id='menuItemID' dir='"+_10+"'><tr >"); if(0<SemTagMenu.items.length){ tempitem=SemTagMenu.items.shift(); _f.write("<td style='width:10'><a role='region' aria-label='actionItem' href='"+tempitem.href+"' style='color:#105ec1;padding-top:5px;padding-bottom:5px;font-size:1.0em;'><img style='display:none' src='' alt=''> "+tempitem.label+"</img></a></td>"); } if(_12.length>=1){ _f.write("<td style='width:1'><img src= '"+SemTagMenu.verticalRulerUrl+"' alt=''/> </td> "); _f.write("<td ><a role='region' aria-label='moreaction' href='#' style='color:#105ec1;padding-top:5px;padding-bottom:5px;font-size:1.0em;width:90;'onClick=\"SemTagMenu.shtest();return false;\" onKeydown=\" if (event.keyCode==13){SemTagMenu.shtest();return false; }\"><img style='display:none' src='' alt=''><label id='actionMore'>"+SemTagMenu.nls.ally_moreAction+"</img></label><span style='position: absolute; top: -9000px;'>Press Enter for more actions items and tab to move the focus on items</span><img style='border:none;' src='"+SemTagMenu.moreActionImgUrl+"' title='"+SemTagMenu.nls.ally_collapsedImage+" ' alt='"+SemTagMenu.nls.ally_collapsedImage+" ' /></a></td>"); } _f.write("</tr></table></div>"); _f.write("<div id='moreItem' style='display:none'><table role='presentation' id='moreActionItems' class='"+_11+"' dir='"+_10+"'>"); while(0<SemTagMenu.items.length){ _12=SemTagMenu.items.shift(); if(_12.href&&(_12.href.indexOf("mailto:")>-1||_12.href.indexOf("http:")>-1)){ _f.write("<tr ><td><a href='"+_12.href+"'>"+_12.label+"</a></td></tr>"); }else{ _f.write("<tr ><td><a onclick='"+_12.href+";return false;"+"' href='javascript;'>"+_12.label+"</a></td></tr>"); } } _f.write("</table></div>"); },writeFooter:function(out,_13,_14){ out.write("<div class='semtag_footer'>"+_13.markup+"</div>"); },endMenu:function(out,_15){ out.write("<a role='region' aria-label='exitlink' style='width:0px; height:0px;' onblur=\"SemTagMenu.exitCard();\" onclick='return false;' href='exit from person card' title='exit from person card'><img style='display:none' src='' alt='' /></a></div>"); },out:function(){ this.buffer=""; this.write=function(str){ this.buffer+=str; }; },activateHover:function(_16){ var _17=SemTagSvcPortal.getElementFromEvent(_16); if(_17){ _17.src=SemTagSvcPortalGlobal.contextUrl+"/ui/menu_selected_hover.gif"; } SemTagMenu.setCurrentElement(SemTagMenu.findLiveElementFromEventSource(_17)); },deactivateHover:function(_18){ var _19=SemTagSvcPortal.getElementFromEvent(_18); if(_19){ _19.src=SemTagSvcPortalGlobal.contextUrl+"/ui/menu_selected.gif"; } },showHover:function(_1a,_1b,_1c){ if(SemTagMenu.staticHover){ return; } var tag=SemTagMenu.getMenuTag(); if(SemTagMenu.showing&&tag.style.display!="none"){ return; } if(SemTagSvcPortal.trace){ SemTagUtil.log("Menu.showHover"); } var _1d=SemTagSvcPortal.getElementFromEvent(_1a); if(SemTagSvcPortal.trace){ SemTagUtil.log("currentElem="+SemTagMenu.currentElem); } var _1e=0; if(_1d&&_1d!=SemTagMenu.currentElem){ SemTagMenu.clearAllSvcHandlers(tag); _1e=_1d.getAttribute(SemTagSvcPortal.refcntAttr); if(SemTagSvcPortal.trace){ SemTagUtil.log("refcnt="+_1e); } if(_1e){ SemTagMenu.setCurrentElement(_1d); }else{ if(SemTagSvcPortal.debug){ alert("SemTagMenu.showHover called for a DOM element with no refcnt attribute!"); } SemTagMenu.setCurrentElement(null); return; } } SemTagMenu.addSvcHandler(tag,_1b); if(_1c&&0<_1c.length){ SemTagMenu.currentHoverLabel=_1c; } SemTagMenu.refCount--; if(0<SemTagMenu.refCount){ return; } SemTagMenu.setRefCount((0<_1e)?_1e:Number(_1d.getAttribute(SemTagSvcPortal.refcntAttr))); SemTagMenu.showing=false; if(_1a.type=="focus"){ SemTagMenu.a11yMode=true; SemTagSvcPortal.watchEvent(_1d,"keydown",SemTagMenu.a11y,false); } var out=new SemTagMenu.out(); var _1c=SemTagMenu.currentHoverLabel?SemTagMenu.currentHoverLabel:SemTagMenu.nls.hover_label; SemTagMenu.writeHover(out,SemTagSvcPortal.bidi,_1c); if(SemTagSvcPortalGlobal.isPersonCardHandlerRequired){ availAttrib.retrieveAttribute(); } SemTagMenu.offScreen(tag); tag.innerHTML=out.buffer; var pos=SemTagSvcPortal.findPosition(SemTagMenu.currentElem,false); var _1f=(SemTagSvcPortal.bidi=="rtl")?0-SemTagMenu.hoverOffset[0]:SemTagMenu.hoverOffset[0]; SemTagMenu.show(SemTagMenu.id,_1a,pos[0]+_1f,pos[1]+SemTagMenu.hoverOffset[1],tag.offsetWidth,tag.offsetHeight); },addSvcHandler:function(tag,_20){ SemTagMenu.svcHandlers.push(_20); SemTagSvcPortal.watchEvent(tag,"click",_20,false); },clearAllSvcHandlers:function(tag){ while(0<SemTagMenu.svcHandlers.length){ var _21=SemTagMenu.svcHandlers.pop(); if(_21){ SemTagSvcPortal.clearEventWatch(tag,"click",_21,false); } } },setCurrentElement:function(_22){ SemTagMenu.currentElem=_22; SemTagMenu.setRefCount(_22?Number(_22.getAttribute(SemTagSvcPortal.refcntAttr)):0); SemTagMenu.currentHoverLabel=null; while(0<SemTagMenu.headers.length){ SemTagMenu.headers.pop(); } while(0<SemTagMenu.items.length){ SemTagMenu.items.pop(); } while(0<SemTagMenu.footers.length){ SemTagMenu.footers.pop(); } },setRefCount:function(cnt){ SemTagMenu.refCount=cnt; },setMenuData:function(_23,_24,_25,_26,_27){ if(SemTagSvcPortal.debug){ window.status="Menu.setMenuData: items.length="+(_24?_24.length:0); } if(!SemTagMenu.staticHover&&SemTagMenu.refCount<0){ if(SemTagSvcPortal.debug){ alert("setMenuData called when refCount="+SemTagMenu.refCount); } return; } var _28=SemTagMenu.findLiveElementFromEventSource(SemTagSvcPortal.getElementFromEvent(_23)); if(!_28){ if(SemTagSvcPortal.debug){ alert("setMenuData called on a null live element"); } return; } if(SemTagMenu.staticHover&&(_28!=SemTagMenu.currentElem||SemTagMenu.showing)){ SemTagMenu.setCurrentElement(_28); } if(_24){ for(var i=0;i<_24.length;i++){ SemTagMenu.items.push(_24[i]); } } if(_25){ SemTagMenu.currentMenuCss=_25; } if(_26){ SemTagMenu.headers.push(_26); } if(_27){ SemTagMenu.footers.push(_27); } SemTagMenu.refCount--; if(0<SemTagMenu.refCount){ return; } SemTagMenu.stopEvent(_23); for(var j=0;j<SemTagSvcPortal.specialMenuProviders.length;j++){ var _29=SemTagSvcPortal.specialMenuProviders[j]; var _2a=_29.call(_23,SemTagMenu.currentElem); if(_2a&&0<_2a.length){ for(var k=0;k<_2a.length;k++){ SemTagMenu.items.push(_2a[k]); } } } SemTagMenu.showMenu(_23); },getCurrentElement:function(){ return SemTagMenu.currentElem; },showMenu:function(_2b){ if(0==SemTagMenu.headers.length+SemTagMenu.items.length+SemTagMenu.footers.length){ SemTagMenu.hide(); return; } if(SemTagSvcPortal.trace){ SemTagUtil.log("Menu.showMenu"); } SemTagMenu.items.sort(SemTagSvcPortal.sortByOrder); if(1<SemTagMenu.headers.length){ SemTagMenu.headers.sort(SemTagSvcPortal.sortByOrder); } if(1<SemTagMenu.footers.length){ SemTagMenu.footers.sort(SemTagSvcPortal.sortByOrder); } var out=new SemTagMenu.out(); SemTagMenu.startMenu(out,SemTagSvcPortal.bidi); if(0<SemTagMenu.headers.length){ SemTagMenu.writeHeader(out,SemTagMenu.headers[0],SemTagSvcPortal.bidi); } SemTagMenu.startActionSection(out,SemTagSvcPortal.bidi,SemTagMenu.currentMenuCss,SemTagMenu.items); if(0<SemTagMenu.footers.length){ SemTagMenu.writeFooter(out,SemTagMenu.footers[0],SemTagSvcPortal.bidi); } SemTagMenu.endMenu(out,SemTagSvcPortal.bidi); var tag=SemTagMenu.getMenuTag(); SemTagMenu.clearAllSvcHandlers(tag); SemTagMenu.offScreen(tag); tag.innerHTML=out.buffer; SemTagMenu.showing=true; SemTagMenu.defaultCursor(); if(SemTagMenu.a11yMode){ if(SemTagUtil.isGecko){ var _2c=tag.getElementsByTagName("li"); if(0<_2c.length){ _2c[0].focus(); } }else{ tag.focus(); } } SemTagMenu.registerMenuEventHandlers(document); var pos=SemTagSvcPortal.findPosition(SemTagMenu.currentElem,false); var _2d=(SemTagSvcPortal.bidi=="rtl")?0-SemTagMenu.menuOffset[0]:SemTagMenu.menuOffset[0]; SemTagMenu.show(SemTagMenu.id,_2b,pos[0]+_2d,pos[1]+SemTagMenu.menuOffset[1],tag.offsetWidth,tag.offsetHeight); },getMenuTag:function(){ var tag=document.getElementById(SemTagMenu.id); if(!tag){ tag=document.createElement("div"); tag.setAttribute("id",SemTagMenu.id); tag.style.position="absolute"; tag.style.display="none"; tag.style.zIndex="99999"; SemTagSvcPortal.watchEvent(tag,"mouseout",SemTagMenu.mouseout,false); SemTagSvcPortal.watchEvent(tag,"mouseover",SemTagMenu.mouseover,false); document.body.insertBefore(tag,document.body.firstChild); } return tag; },show:function(_2e,e,_2f,_30,_31,_32){ if(SemTagSvcPortal.trace){ SemTagUtil.log("SemTagUtil.show"); } var _33; var _34; SemTagMenu.clearTimeouts(); var _35=document.getElementById(_2e); if(_31==null){ _31=0; } if(_32==null){ _32=0; } var top,_36; if(_2f!=null&&_30!=null){ var top=_30; var _36=_2f-(SemTagSvcPortal.bidi=="rtl"?_31:0); }else{ var top=SemTagSvcPortal.getEventAbsoluteY(e); var _36=SemTagSvcPortal.getEventAbsoluteX(e); } var _37=SemTagMenu.currentElem; mytest=_37.parentNode; var _38,_39,d=document; if(typeof window.innerWidth!="undefined"){ _38=window.innerWidth; _39=window.innerHeight; }else{ if(d.documentElement&&typeof d.documentElement.clientWidth!="undefined"&&d.documentElement.clientWidth!=0){ _38=d.documentElement.clientWidth; _39=d.documentElement.clientHeight; }else{ if(d.body&&typeof d.body.clientWidth!="undefined"){ _38=d.body.clientWidth; _39=d.body.clientHeight; } } } var _3a=(document.body.scrollLeft>document.documentElement.scrollLeft)?document.body.scrollLeft:document.documentElement.scrollLeft; if((_36+_31)>(_38+_3a)){ var _3b=(_36+_31)-_38-_3a; _36-=_3b; } var _3c=(document.body.scrollTop>document.documentElement.scrollTop)?document.body.scrollTop:document.documentElement.scrollTop; if((top+_32)>(_39+_3c)){ var _3b=(top+_32)-_39-_3c; top-=_3b; } if(SemTagSvcPortal.bidi=="rtl"&&_36<0){ _36=0; } var od=SemTagUtil.getOwnerDocument(_37); if(od.location!=document.location){ var f=SemTagUtil.getFrameElement(_37); if(f){ var el=f.offsetParent; var x=0,y=0; while(el){ x+=el.offsetLeft; y+=el.offsetTop; el=el.offsetParent; } var lof=_37.offsetParent; var xx=0,yy=0; while(lof){ xx+=lof.offsetLeft; yy+=lof.offsetTop; lof=lof.offsetParent; } if(f.id=="wpsFLY_flyoutIFrame"){ top=y+yy+_37.offsetHeight; _36=x+xx+_37.offsetWidth; }else{ top+=f.offsetTop; _36+=f.offsetLeft; } if(SemTagUtil.isGecko&&f.id=="wpsFLY_flyoutIFrame"){ _34=f.contentWindow.pageXOffset; _33=f.contentWindow.pageYOffset; } if(!SemTagUtil.isGecko&&f.id=="wpsFLY_flyoutIFrame"){ _34=f.contentWindow.document.body.parentNode.scrollLeft; _33=f.contentWindow.document.body.parentNode.scrollTop; } top-=_33; _36-=_34; } } _35.style.top=top+"px"; _35.style.left=_36+"px"; _35.style.display="block"; SemTagMenu.startHideTimer(_2e); },hide:function(_3d,e){ SemTagMenu.unregisterMenuEventHandlers(document); var tag=SemTagMenu.getMenuTag(); if(!tag){ return false; } if(SemTagSvcPortal.trace){ SemTagUtil.log("Menu.hide"); } if(tag.style.display!="block"){ return false; } tag.style.display="none"; SemTagMenu.showing=false; try{ var _3e=SemTagMenu.getNextEle(mytest); } catch(e){ } SemTagMenu.setCurrentElement(null); SemTagMenu.currentHoverLabel=null; SemTagMenu.clearAllSvcHandlers(tag); SemTagMenu.a11yMode=false; SemTagMenu.defaultCursor(); return true; },getNextEle:function(ele){ var par=ele.parentNode; while(true){ if(par==null||par=="undefined"){ return false; }else{ if(par.nodeName=="BODY"){ return par; }else{ var _3f=par.nextSibling; if(_3f!=null){ return _3f; } par=par.parentNode; } } } return false; },offScreen:function(_40){ _40.style.top="-1000px"; _40.style.left="-1000px"; _40.style.display="block"; },findLiveElementFromEventSource:function(_41){ if(SemTagMenu.staticHover){ var id=_41.id; if(!id.match(SemTagMenu.hoverIdRE)){ var _42=_41.getElementsByTagName("img"); for(var i=0;i<_42.length;i++){ if(_42[i].id&&_42[i].id.match(SemTagMenu.hoverIdRE)){ id=_42[i].id; break; } } } if(id&&0<id.length){ var idx=id.substr(SemTagSvcPortal.hoverIdPrefix.length); return document.getElementById(SemTagSvcPortal.liveElemPrefix+idx); }else{ return _41; } }else{ var _43=SemTagMenu.getCurrentElement(); return _43?_43:_41; } },findHoverFromLiveElement:function(_44){ var idx=_44.getAttribute(SemTagSvcPortal.hoverIdPrefix+"idx"); return document.getElementById(SemTagSvcPortal.hoverIdPrefix+idx); },inMenu:function(_45,_46,_47,_48){ if(!_45){ return false; } if(!SemTagMenu.showing){ return false; } if(!_47){ _47=0; } if(!_48){ _48=0; } var _49=SemTagSvcPortal.getEventAbsoluteX(_46); var _4a=SemTagSvcPortal.getEventAbsoluteY(_46); var _4b=_45.style.left.replace(/px$/,""); var _4c=_45.style.top.replace(/px$/,""); var _4d=parseInt(_4b)+parseInt(_45.clientWidth); var _4e=parseInt(_4c)+parseInt(_45.clientHeight); if((_49-1<=(_4b-_47))||(_4a-1<=(_4c-_48))||(_49>=(_4d+_47))||(_4a>=(_4e+_48))){ return false; }else{ return true; } },mouseout:function(_4f){ if(SemTagSvcPortal.trace){ SemTagUtil.log("Menu.mouseout"); } if(_4f.type=="blur"){ var _50=SemTagSvcPortal.getElementFromEvent(_4f); if(SemTagMenu.currentElem){ if(SemTagSvcPortal.trace){ SemTagUtil.log("clearEventWatch"); } SemTagSvcPortal.clearEventWatch(SemTagMenu.currentElem,"keydown",SemTagMenu.a11y,false); } if(!SemTagMenu.showing){ if(SemTagSvcPortal.trace){ SemTagUtil.log("dismissing hover"); } if(!_50.className.match(SemTagMenu.iconNameRE)){ SemTagMenu.hide(); } } }else{ var _51=SemTagMenu.id; menuElem=document.getElementById(_51); if(SemTagMenu.inMenu(menuElem,_4f)){ }else{ SemTagMenu.startHideTimer(_51); } } },mouseover:function(_52){ SemTagMenu.clearTimeouts(); },click:function(_53){ if(!_53){ return; } var _54=SemTagSvcPortal.getElementFromEvent(_53); var _55=SemTagSvcPortal.getParentByClassName("semtag_header",_54); var _56=SemTagSvcPortal.getParentByClassName("personMenuActions",_54); if(!_55&&!_56){ SemTagMenu.hide(SemTagMenu.id); } },catchKeyup:function(_57){ var _58; var _59=false; if(_57){ if(_57.which){ _58=_57.which; }else{ _58=_57.keyCode; } } if(SemTagSvcPortal.trace){ SemTagUtil.log("Menu.catchKeyup:key="+_58); } var _5a=document.activeElement.className; if(_5a.indexOf("lotusui")>-1){ _59=true; } if(_58==16&&_59&&SemTagMenu.sftflag){ SemTagMenu.exitCard(); } SemTagMenu.sftflag=false; },catchEscape:function(_5b){ var key; if(_5b){ if(_5b.which){ key=_5b.which; }else{ key=_5b.keyCode; } } if(SemTagSvcPortal.trace){ SemTagUtil.log("Menu.catchEscape:key="+key); } if(key==16){ SemTagMenu.sftflag=true; } if(key==27){ var _5c=null; if(SemTagMenu.showing){ var _5d=SemTagMenu.getCurrentElement(); if(_5d){ _5c=SemTagSvcPortal.getHoverElement(_5d); } } SemTagMenu.hide(); if(_5c){ _5c.focus(); } } },a11y:function(_5e){ if(_5e){ var key; if(_5e.which){ key=_5e.which; }else{ key=_5e.keyCode; } if(SemTagSvcPortal.trace){ SemTagUtil.log("Menu.a11y:key="+key); } if(key==13){ var _5f=SemTagSvcPortal.getElementFromEvent(_5e); if(_5f){ SemTagMenu.a11yMode=true; var _60=(SemTagMenu.staticHover?_5f:SemTagMenu.getMenuTag()); if(SemTagUtil.isGecko){ var evt=document.createEvent("MouseEvents"); evt.initEvent("click",true,true); SemTagUtil.fireEvent(_60,evt); }else{ _60.click(); } SemTagMenu.stopEvent(_5e); } } }else{ var _5f=SemTagMenu.currentElem; if(_5f){ SemTagMenu.a11yMode=true; var _60=(SemTagMenu.staticHover?_5f:SemTagMenu.getMenuTag()); if(SemTagUtil.isGecko){ var _61=document.createEvent("MouseEvents"); _61.initEvent("click",true,true); SemTagUtil.fireEvent(_60,_61); }else{ _60.click(); } SemTagMenu.stopEvent(evt); } } return true; },stopEvent:function(_62){ if(!_62){ return; } if(SemTagUtil.isGecko){ try{ _62.preventDefault(); _62.stopPropagation(); } catch(e){ } }else{ try{ _62.returnValue=false; _62.cancelBubble=true; } catch(e){ if(SemTagSvcPortal.trace){ SemTagUtil.log("stopEvent caught "+e); } } } },startHideTimer:function(_63){ if(0<SemTagMenu.hideDelay&&!SemTagMenu.a11yMode&&!SemTagSvcPortal.debug){ SemTagMenu.timeouts.push(window.setTimeout("SemTagMenu.endHideTimer(\""+_63+"\")",SemTagMenu.hideDelay)); } },endHideTimer:function(_64){ if(SemTagSvcPortal.trace){ SemTagUtil.log("Menu.endHideTimer"); } SemTagMenu.hide(_64); },clearTimeouts:function(){ var tos=SemTagMenu.timeouts; for(i=0;i<tos.length;i++){ window.clearTimeout(tos[i]); } },defaultCursor:function(){ document.body.style.cursor="default"; },waitCursor:function(){ document.body.style.cursor="progress"; },shtest:function(){ var _65=document.getElementById("lessItem"); var _66=document.getElementById("moreItem"); _65.style.display="none"; _66.style.display="block"; },exitCard:function(){ var _67=null; if(SemTagMenu.showing){ var _68=SemTagMenu.getCurrentElement(); if(_68){ _67=SemTagSvcPortal.getHoverElement(_68); } } SemTagMenu.hide(); if(_67){ _67.focus(); } }}; if(SemTagSvcPortalGlobal.isDynamicLoading&&SemTagSvcPortalGlobal.isPersonCardHandlerRequired){ window.setTimeout(SemTagMenu.init,SemTagSvcPortal.DELAY); } var SemTagPerson={INLINE:"X-person-display-inline",activeElems:new Array(),requestor:new SemTagUtil.crossDomainRequest(),basePumaResolvedUrl:SemTagSvcPortalGlobal.basePumaResolvedUrl,reqMethod:eval("callUserProfileServlet"),collapsedImgUrl:SemTagSvcPortalGlobal.contextUrl+"/ui/imgcollapsed.gif",expandedImgUrl:SemTagSvcPortalGlobal.contextUrl+"/ui/imgexpanded.gif",moreActionImgUrl:SemTagSvcPortalGlobal.contextUrl+"/ui/ShowActions.gif",verticalRulerUrl:SemTagSvcPortalGlobal.contextUrl+"/ui/Line_Tree.gif",profileImageUrl:SemTagSvcPortalGlobal.contextUrl+"/ui/Properties.gif",noPhotoPersonUrl:SemTagSvcPortalGlobal.contextUrl+"/ui/NoPhotoPerson.gif",pumaUrl:"um/secure/users/profiles",init:function(){ if(SemTagSvcPortal.trace){ console.log("Inside init of SemTagPerson.init()"); } if(SemTagSvcPortal.ifConnUrlExists=="true"&&SemTagSvcPortal.isconnServerNew==false){ if(eval("document.body != null")==false){ SemTagPerson.processUntilAvailable(SemTagPerson.init,"(document.body != null)",null,null,null,null); return; }else{ SemTagPerson.loadScript(); } } if(SemTagSvcPortal.ifConnUrlExists=="true"&&SemTagSvcPortal.isconnServerNew==true){ if(eval("document.body != null")==false){ SemTagPerson.processUntilAvailable(SemTagPerson.init,"(document.body != null)",null,null,null,null); return; }else{ SemTagSvcPortal.loadConnScript(); } } SemTagSvcPortal.setCallback("hcard",SemTagPerson.hcardsAdded); SemTagSvcPortal.setCallback("mailto",SemTagPerson.mailtosAdded); SemTagPerson.processHcards(SemTagSvcPortal.getNodes("hcard")); SemTagPerson.processMailtos(SemTagSvcPortal.getNodes("mailto")); SemTagSvcPortal.watchEvent(window,"load",SemTagPerson.clearInternalData,false); },loadScript:function(){ var _1=document.createElement("script"); var _2=SemTagSvcPortal.connUrl; _2+=(_2.indexOf("?")==-1)?"?":"&"; _2+="lang="+SemTagSvcPortal.lang; _1.src=_2; document.body.insertBefore(_1,document.body.firstChild); },clearInternalData:function(){ var _3=SemTagPerson.activeElems; while(_3!=="undefined"&&_3!=null&&0<_3.length){ _3.pop(); } _3=SemTagAwrns.activeElems; while(_3!=="undefined"&&_3!=null&&0<_3.length){ _3.pop(); } },nls:{"start_chat":SemTagSvcPortalGlobal.start_chat,"add_to_contact":SemTagSvcPortalGlobal.add_to_contact,"send_email":SemTagSvcPortalGlobal.send_email,"view_person":SemTagSvcPortalGlobal.view_person,"hover_label":SemTagSvcPortalGlobal.hover_label_person,"work_location":SemTagSvcPortalGlobal.work_location,"specify_email_if_connection":SemTagSvcPortalGlobal.specify_email_if_connection},getPersonResolverUrl:SemTagSvcPortalGlobal.getPersonResolverUrl,getMarkup:function(_4,_5,_6,_7,_8,_9){ var _a=""; var _b=(typeof (_4.email)!="undefined"&&_4.email.internet)?_4.email.internet:null; if(!(SemTagSvcPortal.ifConnUrlExists=="true"&&_b!=null)){ if(_4._profileinplace){ var _c=_4.uid.replace(/\\/g,"&perc5C"); _a="javascript:SemTagPerson.executeJSTargetInFrame(\"javascript:doShowProfile(\\\""+_c+"\\\")\")"; }else{ _a="javascript:SemTagPerson.openPersonRecord()"; } _6.push(SemTagSvcPortal.getMenuItemJson(SemTagPerson.nls.view_person,_a,-100)); } if(_b){ _6.push(SemTagSvcPortal.getMenuItemJson(SemTagPerson.nls.send_email,"mailto:"+_b,-90)); } if(SemTagSvcPortal.debug){ console.log("ST Status got in person1.jsp is:"+typeof (SemTagAwrns)!="undefined"&&typeof (_4.X.ststatus)!="undefined"); } if(SemTagSvcPortal.debug){ console.log(_4.X.ststatus+":"+(_4.X.ststatus=="online"||_4.X.ststatus=="away")); } if(SemTagSvcPortal.sametimeSTProxy){ var _d="javascript:SemTagAwrns.openAddToContacts(\""+_4.X.imn+"\")"; _6.push(SemTagSvcPortal.getMenuItemJson(stproxy.uiControl.i18nStrings.contextMenuAddToContacts,_d,-40)); } if(typeof (SemTagAwrns)!="undefined"&&typeof (_4.X.ststatus)!="undefined"&&(_4.X.ststatus=="online"||_4.X.ststatus=="away")){ var _e="javascript:SemTagAwrns.openChat(\""+_4.X.imn+"\")"; _6.push(SemTagSvcPortal.getMenuItemJson(SemTagPerson.nls.start_chat,_e,-80)); if(SemTagSvcPortal.sametimeSTProxy){ var _f="javascript:SemTagAwrns.openCall(\""+_4.X.imn+"\")"; var _10="javascript:SemTagAwrns.openInstantMeeting(\""+_4.X.imn+"\")"; var _11="javascript:SemTagAwrns.openSendAnnouncement(\""+_4.X.imn+"\")"; _6.push(SemTagSvcPortal.getMenuItemJson(stproxy.uiControl.i18nStrings.contextMenuCall,_f,-70)); _6.push(SemTagSvcPortal.getMenuItemJson(stproxy.uiControl.i18nStrings.contextMenuInstantMeeting,_10,-60)); _6.push(SemTagSvcPortal.getMenuItemJson(stproxy.uiControl.i18nStrings.contextMenuSendAnnouncement,_11,-50)); } if(SemTagSvcPortal.sametimeSTLinks){ _6.push(SemTagSvcPortal.getMenuItemJson(SemTagPerson.nls.add_to_contact,"javascript:SemTagPerson.addToSametimeList()",-11)); } } var _12=SemTagSvcPortal.getActions("person"); if(_12){ for(i=0;i<_12.length;i++){ var _13=_12[i].showif; var _14=true; if(_13){ try{ var _15=eval(_13); _14=_15.call(null,SemTagPerson.currentPerson); } catch(e){ try{ var _15=eval(_13); _14=_15.call(null,SemTagPerson.currentPerson); } catch(e2){ _14=false; } } } if(_14){ var _16=_12[i].label; if(_16.match(/nls\.[a-z]/)){ _16=eval(_16); } if(!(_16.indexOf("Send Instant")>-1)){ var _17=_12[i].url.replace(/@@@ARGS@@@/g,"SemTagPerson.currentPerson"); _6.push(SemTagSvcPortal.getMenuItemJson(_16,_17,_12[i].order)); } } } } if(!_4._inline){ if(SemTagSvcPortal.ifConnUrlExists=="true"&&(SemTagSvcPortal.isconnServerNew==false)&&(_b!=null)){ _8.write("<div class='popupPersonCard' id='businessCard'>"); _8.write("</div>"); }else{ var _18=""; if(typeof (SemTagAwrns)!="undefined"&&typeof (_4.X.ststatus)!="undefined"&&(_4.X.ststatus=="online"||_4.X.ststatus=="away")){ _18=_4.X.ststatus; } var _19=null; if(_4.photo!=null&&_4.photo!=="undefined"&&_4.photo.length>0){ _19=_4.photo; }else{ _19=SemTagPerson.noPhotoPersonUrl; } _8.write("<div class ='businessCardMenu'>"); _8.write("<span class='photoCard' id ='imageSpan'><div id='imageDiv' style='height:90px; width:90px' >"); _8.write("<img id='personImg' tabindex=0 style='border:1px solid rgb(192,192,192);float:right;padding:10px ; height:50px; width:50px; background-color:white;margin-right:6px' src='"+_19+"' onMouseover='SemTagPerson.imgHoverIn();return false;' alt='"+_4.fn+" "+SemTagMenu.nls.a11y_photo+"' title='"+_4.fn+" "+SemTagMenu.nls.a11y_photo+"' role='region' aria-label='UserImage' / >"); _8.write(" <img id='personImg1' tabindex=0 style='display:none;border:1px solid rgb(192,192,192);float:right;padding:10px ; height:82px; width:82px; background-color:white;margin-right:6px' src='"+_19+"' onMouseout='SemTagPerson.imgHoverOut();return false;' alt='"+_4.fn+" "+SemTagMenu.nls.a11y_photo+"' title='"+_4.fn+" "+SemTagMenu.nls.a11y_photo+"' role='region' aria-label='UserImage'/></div></span>"); _8.write("<div class='businessCard'><ul role='region' aria-label='listitem'dir='"+_5+"'>"); _8.write("<li class='cardName' onkeydown=\"SemTagMenu.catchEscape();\" onkeyup=\"SemTagMenu.catchKeyup();\" role='region' aria-label='listitem'><a href='#' style='text-Decoration:none;color:black'>"+_4.fn+"</a></li>"); if(typeof (SemTagAwrns)!="undefined"&&typeof (_4.X.ststatus)!="undefined"&&(_4.X.ststatus=="online"||_4.X.ststatus=="away")){ _8.write("<span id='statusIcon' style='vertical-align:text-top'><a href='#' style='text-Decoration:none;color:black'>"+SemTagAwrns.st+_18+"</a></span>"); } if(SemTagSvcPortalGlobal.debug){ console.log("person got in getMarkUp method is:"+_4); } if(SemTagSvcPortalGlobal.collapsedItems!=null){ _8.write(SemTagPerson.getItemsAsHtml(SemTagSvcPortalGlobal.collapsedItems,"collapsed")); } _8.write("</ul></div>"); if(SemTagSvcPortalGlobal.showDetailsFlag){ _8.write("<div class='showMoreDiv'>"); _8.write("<span><img tabIndex=0 id='expCollapImg' src='"+SemTagPerson.collapsedImgUrl+"' alt ='"+SemTagMenu.nls.ally_collapsedImage+" ' title='"+SemTagMenu.nls.ally_collapsedImage+" ' onClick='SemTagPerson.imgClicked();' onKeydown='SemTagPerson.imgClicked();' role='region' aria-label='showMore'/><label id='toggleLabel' class='showMoreLabel'>"+SemTagMenu.nls.ally_showMore+"</label></font></span>"); _8.write("</div>"); } _8.write("<div class='businessCardExtended' id='expandedSection' style='display:none'><ul role='region' aria-label='listItem' style='padding-top:5px;align:left;' dir='"+_5+"'>"); if(SemTagSvcPortalGlobal.expandedItems!=null){ _8.write(SemTagPerson.getItemsAsHtml(SemTagSvcPortalGlobal.expandedItems,"expanded")); } _8.write("<li></li></ul></div>"); _8.write("</div>"); } } },getItemsAsHtml:function(_1a,_1b){ var _1c=new String(""); if(_1a!=null){ var _1d=_1a.split(","); var i=0; if(SemTagSvcPortal.debug){ console.log("Length of card items got is:"+_1d.length); } while(i<_1d.length){ var _1e=_1d[i].replace(/^\s+|\s+$/g,""); var _1f=new String(""); if(_1e.match("businessCategory")){ _1f=".category"; }else{ if(_1e.match("carLicense")){ _1f=".X.carlicense"; }else{ if(_1e.match("cn")&&_1e.length==2){ _1f=".fn"; }else{ if(_1e.match("countryName")){ _1f=".adr.countryname"; }else{ if(_1e.match("departmentNumber")){ _1f=".X.departmentnumber"; }else{ if(_1e.match("description")){ _1f=".note"; }else{ if(_1e.match("displayName")){ _1f=".fn"; }else{ if(_1e.match("employeeNumber")){ _1f=".X.employeenumber"; }else{ if(_1e.match("employeeType")){ _1f=".X.employeetype"; }else{ if(_1e.match("facsimileTelephoneNumber")){ _1f=".tel.fax"; }else{ if(_1e.match("givenName")){ _1f=".n.givenname"; }else{ if(_1e.match("homePostalAddress")){ _1f=".X.homeaddress"; }else{ if(_1e.match("ibm-gender")){ _1f=".X.gender"; }else{ if(_1e.match("ibm-generationQualifier")){ _1f=".n.honorificsuffix"; }else{ if(_1e.match("ibm-hobby")){ _1f=".X.hobby"; }else{ if(_1e.match("ibm-jobTitle")){ _1f=".title"; }else{ if(_1e.match("ibm-middleName")){ _1f=".n.additionalname"; }else{ if(_1e.match("ibm-otherEmail")){ _1f=".email.X_notes"; }else{ if(_1e.match("ibm-personalTitle")){ _1f=".n.honorificprefix"; }else{ if(_1e.match("ibm-primaryEmail")){ _1f=".email.internet"; }else{ if(_1e.match("mail")&&_1e.length==4){ _1f=".email.internet"; }else{ if(_1e.match("ibm-regionalLocale")){ _1f=".X.locale"; }else{ if(_1e.match("ibm-timeZone")){ _1f=".tz"; }else{ if(_1e.match("initials")){ _1f=".X.initials"; }else{ if(_1e.match("localityName")){ _1f=".adr.locality"; }else{ if(_1e.match("manager")){ _1f=".X.manager"; }else{ if(_1e.match("mobile")){ _1f=".tel.cell"; }else{ if(_1e.match("o")&&_1e.length==1){ _1f=".org.name"; }else{ if(_1e.match("ou")&&_1e.length==2){ _1f=".org.unit"; }else{ if(_1e.match("pager")){ _1f=".tel.pager"; }else{ if(_1e.match("postalAddress")){ _1f=".X.fulladdress"; }else{ if(_1e.match("postalCode")){ _1f=".adr.postalcode"; }else{ if(_1e.match("preferredLanguage")){ _1f=".X.language"; }else{ if(_1e.match("roomNumber")){ _1f=".adr.extendedaddress"; }else{ if(_1e.match("secretary")){ _1f=".X.secretary"; }else{ if(_1e.match("seeAlso")){ _1f=".url"; }else{ if(_1e.match("sn")&&_1e.length==2){ _1f=".n.familyname"; }else{ if(_1e.match("stateOrProvinceName")){ _1f=".adr.region"; }else{ if(_1e.match("street")){ _1f=".adr.streetaddress"; }else{ if(_1e.match("telephoneNumber")){ _1f=".tel.voice"; }else{ if(_1e.match("uid")&&_1e.length==3){ _1f=".uid"; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } if(0<_1f.length){ var _20=new String(""); var pos=_1f.indexOf(".",1); while(pos!=-1){ if(0<_20.length){ _20+=" && "; } _20+="SemTagPerson.currentPerson"+_1f.substring(0,pos); pos=_1f.indexOf(".",pos+1); } if(0<_20.length){ _20+=" && "; } _20+="SemTagPerson.currentPerson"+_1f; var _21=0; if(_1b.match("expanded")){ _21=0; } if(_1b.match("collapsed")){ _21=1; } if(SemTagSvcPortal.debug){ console.log(_20.toString()); } if(SemTagSvcPortal.debug){ console.log(eval(_20.toString())); } var _22="<li +tabindex="+_21+" style='padding-bottom:3px'> "+eval(_20.toString())+"</li>"; if(_1e.indexOf("mail")!=-1){ _22="<li><a href='mailto: "+eval(_20.toString())+"'> "+eval(_20.toString())+"</a></li>"; } if(eval(_20.toString())){ _1c+=_22; } } i++; } } return _1c; },imgClicked:function(){ var _23=document.getElementById("expCollapImg"); var _24=document.getElementById("toggleLabel"); var _25=document.getElementById("expandedSection"); var _26=navigator.appName; if(_26=="Netscape"){ _25.style.width="240"; }else{ _25.style.width="378"; } if(_23.src.indexOf(SemTagPerson.expandedImgUrl)>1){ _23.src=SemTagPerson.collapsedImgUrl; _23.title=SemTagMenu.nls.ally_collapsedImage; _24.innerHTML=SemTagMenu.nls.ally_showMore; }else{ _23.src=SemTagPerson.expandedImgUrl; _23.title=SemTagMenu.nls.ally_expandImage; _24.innerHTML=SemTagMenu.nls.ally_showLess; } var _27=document.getElementById("expandedSection"); _27.style.display=(_27.style.display!="none"?"none":""); },imgHoverIn:function(){ var _28=document.getElementById("personImg"); var _29=document.getElementById("personImg1"); _28.style.display="none"; _29.style.display=""; },imgHoverOut:function(){ var _2a=document.getElementById("personImg"); var _2b=document.getElementById("personImg1"); _2a.style.display=""; _2b.style.display="none"; },getInlineMarkup:function(_2c,_2d,_2e){ var _2f=_2c.email.internet; _2e.write("<div class='personMenu'>"); _2e.write("<div class='photoCard'><img src='"+_2c.photo+"' alt=''/></div>"); _2e.write("<div class='businessCard' dir='"+_2d+"'>"); var _30=(_2c._headeronly?"class='vcard X-person-inside-inline'":""); _2e.write("<ul "+_30+" dir='"+_2d+"'>"); _2e.write("<li class='cardName'><span class='fn'>"+_2c.fn+"</span></li>"); _2e.write("<li class='email'><span class'type' style='display:none;'>internet</span><span class='value'>"+_2f+"</span></li>"); if(_2c.title){ _2e.write("<li>"+_2c.title+"</li>"); } if(_2c.tel&&_2c.tel.voice){ _2e.write("<li>"+_2c.tel.voice+"</li>"); } _2e.write("</ul>"); _2e.write("</div>"); if(_2c._headeronly){ _2e.write("<div style='clear:both;'>"); }else{ _2e.write("<div class='personMenuActions' dir='"+_2d+"' style='clear:both;'>"); _2e.write("<ul>"); _2e.write("<li><a href='NEEDSWORK"+"'>"+SemTagPerson.nls.view_person+"</a></li>"); _2e.write("<li><a href='mailto:"+_2f+"'>"+SemTagPerson.nls.send_email+"</a></li>"); _2e.write("<li><a href='NEEDSWORK"+"'>"+SemTagPerson.nls.add_to_contact+"</a></li>"); _2e.write("</ul>"); } _2e.write("</div>"); _2e.write("</div>"); },openPersonRecord:function(){ var _31=SemTagPerson.currentPerson; var _32=null; if(_31&&_31.uid&&_31.uid.length>0){ _32=_31.uid; }else{ if((typeof (_31.email)!="undefined"&&typeof (_31.email.internet)!="undefined"&&0<_31.email.internet.length)){ _32=_31.email; } } var _33=encodeURIComponent(_32); var _34=encodeURIComponent(_33); if(SemTagSvcPortal.debug){ console.log("userId3is :"+_34+":"+SemTagPerson.currentPerson.fn+":"+SemTagPerson.getPersonResolverUrl()+":"); } if(SemTagSvcPortal.debug){ console.log("NEWReplaced string is:"+SemTagPerson.getPersonResolverUrl().replace("TOBEREPLACED",_34)); } window.open(SemTagPerson.getPersonResolverUrl().replace("TOBEREPLACED",_34),null,"height=640,width=512,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no"); },addToSametimeList:function(){ var _35=SemTagPerson.currentPerson.email.internet; var fn_=encodeURIComponent(SemTagPerson.currentPerson.fn); var fn=encodeURIComponent(fn_); window.open(SemTagPerson.getPersonResolverUrl().replace("TOBEREPLACED",_35+"/"+fn),null,"height=640,width=512,resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no"); },out:function(){ this.buffer=""; this.write=function(str){ this.buffer+=str; }; },processHcards:function(_36){ if(SemTagSvcPortal.trace){ console.log("Inside processHcards of SemTagSerson and length of hcards is:"+(_36?_36.length:0)); } if(!_36||_36.length==0){ return; } for(var i=0;i<_36.length;i++){ var _37=_36[i]; var _38=SemTagPerson.getNameElement(_37); if(!_38){ continue; } var _39=_38.getAttribute(SemTagSvcPortal.liveElemPrefix+"id"); if(_39&&SemTagSvcPortal.ifConnUrlExists=="false"){ if(SemTagPerson.activeElems[_39]){ continue; }else{ if(SemTagSvcPortal.trace){ SemTagUtil.log("Person.leid="+_39+" being processed again!"); } continue; } } var _3a=SemTagSvcPortal.getElementsByClassName("email",_37); _3a=_3a||null; if((_3a==null||_3a.length==0)&&SemTagSvcPortal.ifConnUrlExists=="true"){ console.info(SemTagPerson.nls.specify_email_if_connection+"Email is for user:"+uid); } if(SemTagSvcPortal.ifConnUrlExists=="true"&&SemTagSvcPortal.isconnServerNew){ if(SemTagSvcPortal.debug){ console.log("Beofore calling lconn.profiles.bizCard.bizCard.processTag for email:"+(_3b+":"+(_3b?_3b.internet:"Not defined"))); } try{ if(eval("window.lconn != null")==false||(lconn.profiles==null||lconn.profiles=="undefined")){ SemTagPerson.processUntilAvailable(SemTagPerson.processHcards,"window.lconn != null && !(lconn.profiles == null || lconn.profiles == 'undefined')",null,null,null,_36); }else{ lconn.profiles.bizCard.bizCard.processTag(_38); } } catch(e){ console.log("Connection server is probably down please check following resource is up:"+SemTagSvcPortalGlobal.connUrl+"/profiles/portalJS/portalBizCard.js"); console.log("Actual Error occured is:"+e); return; } } var _3c=SemTagSvcPortal.getElementsByClassName("userObjectId",_37); if(SemTagSvcPortal.debug){ console.log("userObjectid element got is:"+_3c); } var _3b=SemTagUtil.getHcardAttributeValue("email",_37); if(!_3c){ if(!_3b.internet){ var uid=SemTagUtil.getHcardAttributeValue("uid",_37); if(!uid){ continue; } } } if(SemTagPerson.isInline(_37)){ var _3d={"target":_38}; SemTagPerson.requestPersonInfo(_3d); }else{ var _3e=SemTagSvcPortal.getTextValue(_38); var _3f=_3e.indexOf("click"); var _40=_3e.substring(0,_3f)+SemTagPerson.nls.hover_label+" "+SemTagMenu.nls.a11y_hover; if(SemTagSvcPortal.ifConnUrlExists=="false"||(SemTagSvcPortal.ifConnUrlExists=="true"&&SemTagSvcPortal.isconnServerNew==false)){ if(SemTagSvcPortal.debug){ console.log("Adding hover for old business card case or no business card"); } SemTagSvcPortal.addHover(_38,SemTagPerson.showHover,SemTagPerson.showMenu,_40); }else{ if(SemTagSvcPortal.debug){ console.log("Inside ifConnURLExistsnew"+SemTagSvcPortal.ifConnUrlExists+":"+SemTagSvcPortal.isconnServerNew); } var _41=_38.getAttribute(SemTagSvcPortal.refcntAttr); if(_41){ _38.setAttribute(SemTagSvcPortal.refcntAttr,parseInt(Number(_41)+1)); }else{ _38.setAttribute(SemTagSvcPortal.refcntAttr,"1"); SemTagSvcPortal.hoverIdx++; _38.setAttribute(SemTagSvcPortal.liveElemPrefix+"id",SemTagSvcPortal.hoverIdx); } } _39=_38.getAttribute(SemTagSvcPortal.liveElemPrefix+"id"); if(SemTagSvcPortal.debug){ console.log("in semtagperson leid got is:"+_39); } if(_39){ SemTagPerson.activeElems[_39]=true; } } } },processUntilAvailable:function(_42,_43,_44,_45,_46,_47){ if(typeof (_42)!="function"){ return; } var _48=500; var _49=20; var _4a=true; if(typeof (_45)=="number"){ _48=_45; } if(typeof (_46)=="number"){ _49=_46; } if(typeof (_44)=="boolean"){ _4a=_44; } var _4b=""; var _4c=0; console.log("eval(test) is :"+eval(_43)); var _4d=Array.prototype.slice.call(arguments); var _4e=_4d.shift(); var _4f=_4d.shift(); var _50=_4d.shift(); var _51=_4d.shift(); var _52=_4d.shift(); if(SemTagSvcPortal.trace){ console.log("shifted args length is:"+_4d.length+":"+_4d); } if(eval(_43)){ if(_47!=null){ _42.apply(null,Array.prototype.slice.call(_4d)); }else{ _42(); } return; } if(SemTagSvcPortal.trace){ console.log("inside processUntilAvailable for time :"+_4c+":"+eval(_43)+":"+"clearing intervalid:"+_4b); } _4b=window.setInterval(function(){ _4c++; if(SemTagSvcPortal.trace){ console.log("inside processUntilAvailable for time :"+_4c+":"+eval(_43)+":"+"clearing intervalid:"+_4b); } if(eval(_43)){ window.clearInterval(_4b); if(_47!=null){ _42.apply(null,Array.prototype.slice.call(_4d)); }else{ _42(); } }else{ if(_4c>=_49){ window.clearInterval(_4b); if(_4a){ throw new Error("processUntilAvailable: test was never met: "+_43); } } } },_48); },isInline:function(_53){ return SemTagUtil.getHcardAttributeValue(SemTagPerson.INLINE,_53); },processMailtos:function(_54){ if(!_54||_54.length==0){ return; } while(_54.length>0){ var _55=_54.pop(); SemTagSvcPortal.watchEvent(_55,"mouseover",SemTagPerson.tagMouseover,false); } },hcardsAdded:function(_56){ if(SemTagSvcPortal.trace){ SemTagUtil.log("hcardsAdded"); } if(SemTagSvcPortal.trace){ console.log("INside hcardsAdded length of nodes got it:"+SemTagSvcPortal.getNodes("hcard").length+":"+_56); } if(_56&&_56.length>0){ SemTagPerson.processHcards(_56); }else{ SemTagPerson.processHcards(SemTagSvcPortal.getNodes("hcard")); } },hcardsAdded:function(){ if(SemTagSvcPortal.trace){ SemTagUtil.log("hcardsAdded"); } if(SemTagSvcPortal.trace){ console.log("INside hcardsAdded length of nodes got it:"+SemTagSvcPortal.getNodes("hcard").length); } SemTagPerson.processHcards(SemTagSvcPortal.getNodes("hcard")); },mailtosAdded:function(){ SemTagPerson.processMailtos(SemTagSvcPortal.getNodes("mailto")); },showHover:function(_57){ if(SemTagSvcPortal.trace){ SemTagUtil.log("Person.showHover"); } var _58=SemTagUtil.getHcardAttributeValue("X-person-inside-inline",SemTagSvcPortal.getLiveElementFromEvent(_57)); var _59=_58?null:SemTagPerson.nls.hover_label; SemTagSvcPortal.showHover(_57,SemTagPerson.showMenu,_59); return false; },showMenu:function(_5a){ if(SemTagSvcPortal.trace){ SemTagUtil.log("Person.showMenu"); } SemTagMenu.waitCursor(); SemTagMenu.stopEvent(_5a); SemTagPerson.requestPersonInfo(_5a); return false; },renderCard:function(_5b){ var _5c=new BusinessCard.out(); BusinessCard.getMenuData(_5b,null,null,null,_5c); if(SemTagSvcPortal.trace){ console.log("Inside renderCard"+_5c.buffer+":"+document.getElementById("businessCard")); } document.getElementById("businessCard").innerHTML=_5c.buffer; },requestPersonInfo:function(_5d){ SemTagPerson.reqMethod.call(SemTagPerson,_5d); },dispatch:function(_5e){ var _5f=(_5e.email&&_5e.email.internet)?_5e.email.internet:null; if(_5f){ SemTagPerson.requestor.dispatch(_5f.toLowerCase(),_5e); } },requestReturn:function(_60,_61,_62){ if(SemTagSvcPortal.trace){ SemTagUtil.log("Person.requestReturn: "+_61+" ("+(_60?"success":"fail")+")"); } var _63=_60?_61:SemTagPerson.emptyPerson(); if(_63){ var _64=SemTagSvcPortal.getLiveElementFromEvent(_62); SemTagPerson.fillPersonJsonMoreFromDom(_63,_64); SemTagPerson.update(_63,_64,_62); }else{ SemTagMenu.defaultCursor(); } },appendObjectIdToUrl:function(_65){ if(SemTagSvcPortal.trace){ console.log("entering appendObjectIdToUrl:"+_65); } if(SemTagSvcPortal.trace){ console.log("staring with SemTagPerson.basePumaResolvedUrl:"+SemTagPerson.basePumaResolvedUrl); } var _66=SemTagPerson.basePumaResolvedUrl.indexOf(SemTagPerson.pumaUrl); var _67=""; if(_66>-1){ _67=SemTagPerson.basePumaResolvedUrl.substr(0,_66)+SemTagPerson.pumaUrl+"/"+_65+SemTagPerson.basePumaResolvedUrl.substr(_66+SemTagPerson.pumaUrl.length); } if(SemTagSvcPortal.trace){ console.log("Returning updated url:"+_67); } return _67; },fillPersonJsonMoreFromDom:function(_68,_69){ if(SemTagSvcPortal.debug){ window.status="Person.fillPersonJsonMoreFromDom"; } var _6a=SemTagSvcPortal.findNameElementInHcard(_69); if(_6a){ var _6b=SemTagSvcPortal.getTextValue(_6a); var _6c=_6b.indexOf("click"); if(_6c>0){ _68.fn=_6b.substring(0,_6c); }else{ _68.fn=SemTagSvcPortal.getTextValue(_6a); } } var _6d=SemTagPerson.getElementEmail(_69); if(_6d){ _68.email={"internet":_6d}; } var uid=SemTagUtil.getHcardAttributeValue("uid",_69); if(uid){ _68.uid=uid; } if(_68.userObjectID){ var _6e=_68.userObjectID.split("/"); if(_6e&&_6e.length>0){ _68.userObjectID=_6e[_6e.length-1]; } } if(SemTagSvcPortal.debug&&_68){ console.log("person.photo got is:"+_68.photoURL+(_68.photo&&_68.photo.length>0?"not null":"is not available")); } if(_68&&_68.photo&&_68.photo.length>0){ if(_68.userObjectID&&_68.userObjectID.length>0){ var _6f=SemTagPerson.appendObjectIdToUrl(_68.userObjectID+"/jpegPhoto"); _68.photo=_6f+"&index=0"; }else{ _68.photo=_68.photoURL; } } if(!_68.tel||!_68.tel.voice){ var _70=SemTagSvcPortal.findElementByNameInHcard(_69,"tel"); if(_70){ var _71=SemTagSvcPortal.getTypedValue(_70,"voice"); _68.tel={"voice":_71["voice"]}; } } var _72=SemTagSvcPortal.findElementByNameInHcard(_69,"adr"); var _73={}; if(_72){ _73=SemTagPerson.getAddressJson(_72); _68.adr=_73; } if(typeof (_68.adr)!="undefined"&&(_68.adr.locality||_68.adr.countryname||_68.adr.region)){ if(!_68.X){ _68.X={}; } var _74=_68.adr.locality+", "+_68.adr.region+" "+_68.adr.countryname; _68.X.worklocation=_74.replace(/undefined/g,""); } if(typeof (SemTagAwrns)!="undefined"){ if(!_68.X){ _68.X={}; } _68.X.imn=SemTagAwrns.getSametimeId(_69); _68.X.ststatus=_6a.getAttribute("semtag_ststatus"); } },emptyPerson:function(){ return {"fn":"","email":{"internet":""}}; },update:function(_75,_76,_77){ if(SemTagSvcPortal.trace){ SemTagUtil.log("Person.update"); } SemTagPerson.currentPerson=_75; var _78=SemTagSvcPortal.getParentByClassName("vcard",_76); var _79=SemTagUtil.getHcardAttributeValue("X-person-header-only",_78); if(_79){ _75._headeronly=true; } SemTagPerson.readHcardContext(_78,_75); SemTagSvcPortal.setSemanticTagValue("hcard",_76,_75); if(SemTagPerson.isInline(_78)){ var out=new SemTagPerson.out(); SemTagPerson.getInlineMarkup(_75,SemTagSvcPortal.bidi,out); _78.innerHTML=out.buffer; var _7a=SemTagUtil.getNodeClassValue(_78); SemTagUtil.setNodeClassValue(_78,_7a.replace(/vcard/,"vcard-done")); if(_79){ var _7b=SemTagSvcPortal.getElementsByClassName("vcard",_78,1); if(_7b){ SemTagPerson.processHcards(_7b); } } }else{ var _7c=new Array(); var _7d="personMenuActions"; var _7e=new SemTagPerson.out(); var _7f=new SemTagPerson.out(); SemTagPerson.getMarkup(_75,SemTagSvcPortal.bidi,_7c,_7d,_7e,_7f); var _80=(typeof (_75.email)!="undefined"&&_75.email.internet)?_75.email.internet:null; SemTagSvcPortal.setMenuData(_77,_7c,_7d,SemTagSvcPortal.getMenuHeaderJson(_7e.buffer,"text/html",-100),SemTagSvcPortal.getMenuFooterJson(_7f.buffer,"text/html",-100)); if(SemTagSvcPortal.trace){ console.log("values are in update of semtagperson:"+SemTagSvcPortal.ifConnUrlExists+":"+(SemTagSvcPortal.isconnServerNew===false)); } if(SemTagSvcPortal.ifConnUrlExists=="true"&&(SemTagSvcPortal.isconnServerNew===false)&&_80!=null){ if(eval("window.BusinessCard != null")==false){ SemTagPerson.processUntilAvailable(BusinessCard.getProfileInfo,"(window.BusinessCard != null)",null,null,null,true,"SemTagPerson.renderCard",_80); }else{ BusinessCard.getProfileInfo(true,"SemTagPerson.renderCard",_80); } } } },readHcardContext:function(_81,_82){ var _83=SemTagUtil.getHcardAttributeValue("X-person-inside-inline",_81); if(_83){ _82._inline=true; } var _84=SemTagUtil.getHcardAttributeValue("X-person-inside-profile",_81); if(_84){ _82._inprofile=true; } var _85=SemTagUtil.getHcardAttributeValue("X-person-profile-inplace",_81); if(_85){ _82._profileinplace=true; } },getElementEmail:function(_86){ if(!_86){ alert("getElementEmail called with: "+_86); } var _87; var _88=SemTagSvcPortal.getParentByClassName("vcard",_86); if(_88){ _87=SemTagUtil.getHcardAttributeValue("email",_88); _87=_87.internet; }else{ if(_86.tagName=="A"&&_86.href.match(/^mailto:/)){ _87=_86.href.replace(/^mailto:/,""); } } return _87; },getNameElement:function(_89){ try{ if(_89.className!="vcard"){ _89=SemTagSvcPortal.getParentByClassName("vcard",_89); } var _8a=SemTagSvcPortal.getElementsByClassName("fn",_89,1)[0]; if(!_8a){ _8a=SemTagSvcPortal.getElementsByClassName("n",_89,1)[0]; } return _8a; } catch(e){ if(SemTagSvcPortal.debug){ alert(e); } } return null; },getAddressJson:function(_8b){ var _8c={"postofficebox":"","streetaddress":"","locality":"","region":"","postalcode":"","countryname":""}; var _8d=_8b; if(_8d.className!="adr"){ _8d=SemTagSvcPortal.getParentByClassName("adr",_8b); } if(_8d){ var _8e=_8d.childNodes; for(var i=0;i<_8e.length;i++){ SemTagPerson.readAddressInfo(_8e[i],_8c); } }else{ _8c.streetaddress="5 Technology Park Drive"; _8c.locality="Westford"; _8c.region="MA"; _8c.postalcode="01886"; _8c.countryname="USA"; } return _8c; },readAddressInfo:function(_8f,_90){ var _91=_8f.childNodes; if(_91){ for(var i=0;i<_91.length;i++){ SemTagPerson.readAddressInfo(_91[i],_90); } } if(_8f.className!=null){ var cn=_8f.className; if(cn.match(/(^|\s)post-office-box(\s|$)/i)){ _90.postofficebox=SemTagSvcPortal.getTextValue(_8f); }else{ if(cn.match(/(^|\s)extenodeed-address(\s|$)/i)){ _90.extenodeedaddress=SemTagSvcPortal.getTextValue(_8f); }else{ if(cn.match(/(^|\s)street-address(\s|$)/i)){ _90.streetaddress=SemTagSvcPortal.getTextValue(_8f); }else{ if(cn.match(/(^|\s)locality(\s|$)/i)){ _90.locality=SemTagSvcPortal.getTextValue(_8f); }else{ if(cn.match(/(^|\s)region(\s|$)/i)){ _90.region=SemTagSvcPortal.getTextValue(_8f); }else{ if(cn.match(/(^|\s)postal-code(\s|$)/i)){ _90.postalcode=SemTagSvcPortal.getTextValue(_8f); }else{ if(cn.match(/(^|\s)country-name(\s|$)/i)){ _90.countryname=SemTagSvcPortal.getTextValue(_8f); } } } } } } } } },existsInObject:function(_92,_93){ var _94=_93.split("."); var _95=_92; var _96=true; for(var i=0;i<_94.length;i++){ var _97; if(_94[i].indexOf("(")>-1){ _97=_94[i].substr(0,_94[i].indexOf("(")); }else{ _97=_94[i]; } if(_95[_97]){ _95=_95[_97]; }else{ _96=false; break; } } return _96; },executeJSTargetInFrame:function(_98){ if(_98.indexOf("javascript:")>-1){ var _99=_98.substr(("javascript:".length)); var _9a=window; if(!SemTagPerson.existsInObject(window,_99)){ for(var i=0;i<parent.frames.length;i++){ if(SemTagPerson.existsInObject(parent.frames[i],_99)){ _9a=parent.frames[i]; break; } } }else{ } _9a.eval(_98); }else{ } }}; function getTagFromServer(_9b){ var _9c=SemTagSvcPortal.getLiveElementFromEvent(_9b); var _9d=SemTagPerson.getElementEmail(_9c); if(_9d){ _9d=_9d.toLowerCase(); var src=SemTagPerson.servletUrl.replace(/@@@EMAIL@@@/,_9d); if(SemTagSvcPortal.debug){ window.status="Person.getTagFromServer sending request for: "+_9d+")"; } SemTagPerson.requestor.request(src,6000,SemTagPerson.requestReturn,_9c,_9d); }else{ if(SemTagSvcPortal.debug){ alert("getTagFromServer couldn't find the e-mail"); } var evt={"target":_9c}; SemTagPerson.requestReturn(false,null,evt); } }; function callUserProfileServlet(_9e){ if(SemTagSvcPortal.trace){ SemTagUtil.log("callUserProfileServlet"); } var _9f=""; var _a0=SemTagSvcPortal.getLiveElementFromEvent(_9e); var _a1=""; var _a2=SemTagPerson.getElementEmail(_a0); if(_a2){ _a1="ibm-primaryEmail="+_a2; } var uid=SemTagUtil.getHcardAttributeValue("uid",_a0); if(uid){ _a1="identifier="+uid; } _9f=SemTagUtil.getHcardAttributeValue("userObjectId",_a0); var xml=null; try{ if(_9f&&_9f.length>0){ var _a3=SemTagPerson.appendObjectIdToUrl(_9f)+"&expandRefs=true&includeAttributes=@@@AVAILATTRIBUTES@@@"; _a3=_a3.replace("@@@AVAILATTRIBUTES@@@",SemTagSvcPortal.availAttribStr); if(SemTagSvcPortal.trace){ console.log("SemTagPerson.servletUrlForObjectId is :"+_a3.replace("@@@AVAILATTRIBUTES@@@",SemTagSvcPortal.availAttribStr)); } xml=ibm.portal.xml.loadXml(_a3.replace("@@@AVAILATTRIBUTES@@@",SemTagSvcPortal.availAttribStr)); }else{ if(uid&&uid.length>0){ var _a3=SemTagPerson.basePumaResolvedUrl+"&@@@QUERY@@@&includeAttributes=@@@AVAILATTRIBUTES@@@"; _a3=_a3.replace("@@@AVAILATTRIBUTES@@@",SemTagSvcPortal.availAttribStr); try{ xml=ibm.portal.xml.loadXml(_a3.replace("@@@QUERY@@@",_a1)); } catch(er){ if(SemTagSvcPortal.debug){ console.info("Person.callUserProfileServlet Error caught is: "+er); } if(uid.indexOf("uid=")==0){ _a1=uid; }else{ _a1="uid="+uid; } var _a4=SemTagPerson.basePumaResolvedUrl+"&expandRefs=true&includeAttributes=@@@AVAILATTRIBUTES@@@&searchAttributes=@@@QUERY@@@"; _a4=_a4.replace("@@@AVAILATTRIBUTES@@@",SemTagSvcPortal.availAttribStr); xml=ibm.portal.xml.loadXml(_a4.replace(/@@@QUERY@@@/,_a1)); } }else{ var _a3=SemTagPerson.basePumaResolvedUrl+"&expandRefs=true&includeAttributes=@@@AVAILATTRIBUTES@@@&searchAttributes=@@@QUERY@@@"; _a3=_a3.replace("@@@AVAILATTRIBUTES@@@",SemTagSvcPortal.availAttribStr); xml=ibm.portal.xml.loadXml(_a3.replace(/@@@QUERY@@@/,_a1)); } } } catch(e){ if(SemTagSvcPortal.debug){ console.info("Person.callUserProfileServlet caught: "+e); } } if(xml){ if(0<_9f.length){ var xsl=ibm.portal.xml.loadXsl(SemTagSvcPortalGlobal.contextUrl+"/xsl/UserAtomByIdToPersonJson.xsl"); }else{ var xsl=ibm.portal.xml.loadXsl(SemTagSvcPortalGlobal.contextUrl+"/xsl/UserAtomToPersonJson.xsl"); } var _a5=ibm.portal.xml.transform(xml,xsl,null,null,true); if(SemTagSvcPortal.trace){ SemTagUtil.log(_a5); } var _a6=eval(_a5)[0]; if(SemTagSvcPortal.trace){ console.log("Person got is:"+_a6); } if(!_a6&&!_a6.fn){ _a6=SemTagPerson.emptyPerson(); } if(SemTagSvcPortal.trace){ console.log("person.photo is:"+_a6.photo); } SemTagPerson.fillPersonJsonMoreFromDom(_a6,_a0); SemTagPerson.update(_a6,_a0,_9e); return; }else{ if(SemTagSvcPortal.trace){ SemTagUtil.log("bad XML"); } } var evt={"target":_a0}; SemTagPerson.requestReturn(false,null,evt); }; SemTagPerson.init(); var SemTagAwrns={SVCNAME:"sametime",hcards:new Array(),activeElems:[],hasApplet:false,imIds:SemTagSvcPortalGlobal.preferredImIds,st:"",samtimeIconRequired:false,init:function(){ SemTagSvcPortal.setCallback(SemTagAwrns.SVCNAME,SemTagAwrns.hcardsAdded); SemTagAwrns.processHcards(SemTagSvcPortal.getNodes(SemTagAwrns.SVCNAME)); },hcardsAdded:function(){ SemTagAwrns.processHcards(SemTagSvcPortal.getNodes(SemTagAwrns.SVCNAME)); },processHcards:function(_1){ _1=_1||null; if(SemTagSvcPortal.debug){ console.log("in processHcards hcards got is"+_1); } if(_1==null){ return; } SemTagSvcPortal.sametimeSTProxy=(typeof (stproxy)!=="undefined"); SemTagSvcPortal.sametimeSTLinks=((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)!=="undefined")); SemTagSvcPortal.sametimeNotIntegrated=((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)==="undefined")); if(SemTagSvcPortal.debug){ console.log("Inside processHCards SemTagSvcPortal.sametimeSTProxy:"+SemTagSvcPortal.sametimeSTProxy+":"+SemTagSvcPortal.sametimeNotIntegrated+":"+SemTagSvcPortal.sametimeSTLinks); } if(SemTagSvcPortal.debug){ console.log("Inside processHCards SemTagSvcPortal.sametimeSTProxy:"+(typeof (stproxy)!=="undefined")+":"+((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)!=="undefined"))+":"+((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)==="undefined"))); } if(!SemTagSvcPortal.sametimeSTProxy&&!SemTagSvcPortal.sametimeSTLinks){ if(SemTagSvcPortal.debug){ console.info("stproxy and stlinks both are not available,person awareness will not be available"); } return; }else{ if(SemTagSvcPortal.debug){ console.info("Sametime is connected to Portal"); } } SemTagAwrns.hcards=[]; SemTagAwrns.hcards=_1; if(SemTagSvcPortal.sametimeSTProxy){ stproxy.addOnLoad(function(){ var _2=SemTagAwrns.hcards; if(SemTagSvcPortal.debug){ console.log("Hcards got is:"+_2); } for(var i=0;i<_2.length;i++){ var _3=_2[i]; if(SemTagAwrns.disabled(_3)){ continue; } var _4=SemTagSvcPortal.findNameElementInHcard(_3); if(SemTagSvcPortal.debug){ console.log("fnElem got is:"+_4); } if(!_4){ continue; } var _5=_4.getAttribute(SemTagSvcPortal.liveElemPrefix+"id"); if(SemTagSvcPortal.debug){ console.log("leid got is:"+_5+":"+SemTagAwrns.activeElems[_5]); } if(_5==null){ continue; } if(_5&&SemTagAwrns.activeElems[_5]){ continue; } var _6=SemTagAwrns.getSametimeId(_3); var _7=SemTagUtil.getHcardAttributeValue("X-sametime-resolve",_3); if(!_7){ if(SemTagSvcPortal.debug){ console.log("resolve is "+_7+" so continuing"); } continue; } var _8=document.createElement("span"); var _9=SemTagUtil.getHcardAttributeValue("x-sametime-no-icon",_3); SemTagAwrns.samtimeIconRequired=false; if(_9){ SemTagAwrns.samtimeIconRequired=true; } var _a=stproxy.getLiveNameModel(_6,{"isInBuddyList":false,"forceWatchlist":true}); _a.portalId=_6; if(SemTagSvcPortal.debug){ console.log("Model got for id:"+_6+": is :"+_a); } var _b=SemTagAwrns.getStatus(_a.status); if(_4){ _4.setAttribute("semtag_ststatus",_b); } if(SemTagSvcPortal.debug){ console.log("semtag_ststatus variable set to :"+_b); } if(!(SemTagAwrns.samtimeIconRequired)){ var _c=document.createElement("img"); _c.id=i; _c.imgId=_a.id; SemTagAwrns.setSametimeIconSrc(_a,_c,stproxy); _8.appendChild(_c); _8.setAttribute("class","sametimeawarenessicon"); _8.className+=" sametimeawarenessicon"; _4.parentNode.insertBefore(_8,_4); } if(stproxy.hitch&&stproxy.hitch.connect){ if(SemTagSvcPortal.debug){ console.log("Inside stproxy.hitch way:"); } stproxy.hitch.connect(_a,"onUpdate",SemTagAwrns.updateSTProxy); }else{ if(SemTagSvcPortal.debug){ console.log("Inside non stproxy.hitch way:"); } _a.onUpdate=SemTagAwrns.updateSTProxy; } if(_5){ SemTagAwrns.activeElems[_5]=true; } } }); } if(SemTagSvcPortal.sametimeSTLinks){ if(SemTagSvcPortal.debug){ console.log("Hcards got is:"+_1); } for(var i=0;i<_1.length;i++){ var _d=_1[i]; if(SemTagAwrns.disabled(_d)){ continue; } SemTagAwrns.hcards=[]; SemTagAwrns.hcards.push(_d); var _e=SemTagSvcPortal.findNameElementInHcard(_d); if(SemTagSvcPortal.debug){ console.log("fnElem got is:"+_e); } if(!_e){ continue; } var _f=_e.getAttribute(SemTagSvcPortal.liveElemPrefix+"id"); if(SemTagSvcPortal.debug){ console.log("leid got is:"+_f+":"+SemTagAwrns.activeElems[_f]); } if(_f==null){ continue; } if(_f&&SemTagAwrns.activeElems[_f]){ continue; } var _10=SemTagAwrns.getSametimeId(_d); var _11=SemTagUtil.getHcardAttributeValue("X-sametime-resolve",_d); if(_11){ var _12=document.createElement("span"); } if(SemTagSvcPortal.sametimeSTLinks&&_11){ var od=SemTagUtil.getOwnerDocument(_d); if(od.location!=document.location){ var f=SemTagUtil.getFrameElement(_d); if(f){ if(f.id=="wpsFLY_flyoutIFrame"){ continue; } } } _12.style.verticalAlign="text-top"; } if(SemTagSvcPortal.sametimeSTLinks&&_11){ st=prepareSametimeLink(_10,"",_11,"text:no;"); if(SemTagSvcPortal.debug){ console.log("ST got is:"+st); } _12.innerHTML=st; _e.parentNode.insertBefore(_12,_e); } if(_f){ SemTagAwrns.activeElems[_f]=true; } } } },setSametimeIconSrc:function(_13,_14,_15){ if(_13.status>=_15.awareness.OFFLINE&&_13.status<=_15.awareness.IN_MEETING_MOBILE){ switch(_13.status){ case 0: _14.src=_15.uiControl.iconPaths.iconOffline; break; case 1: _14.src=_15.uiControl.iconPaths.iconAvailable; _14.onclick=function(){ SemTagAwrns.openChat(_14.imgId,_13); }; break; case 4: case 2: _14.src=_15.uiControl.iconPaths.iconAway; _14.onclick=function(){ SemTagAwrns.openChat(_14.imgId,_13); }; break; case 3: _14.src=_15.uiControl.iconPaths.iconDnd; break; case 5: _14.src=_15.uiControl.iconPaths.iconInMeeting; _14.onclick=function(){ SemTagAwrns.openChat(_14.imgId,_13); }; break; case 6: _14.src=_15.uiControl.iconPaths.iconAvailableMobile; _14.onclick=function(){ SemTagAwrns.openChat(_14.imgId,_13); }; break; case 7: _14.src=_15.uiControl.iconPaths.iconAwayMobile; _14.onclick=function(){ SemTagAwrns.openChat(_14.imgId,_13); }; break; case 8: _14.src=_15.uiControl.iconPaths.iconDndMobile; break; case 9: _14.src=_15.uiControl.iconPaths.iconAwayMobile; _14.onclick=function(){ SemTagAwrns.openChat(_14.imgId,_13); }; break; case 10: _14.src=_15.uiControl.iconPaths.iconInMeetingMobile; _14.onclick=function(){ SemTagAwrns.openChat(_14.imgId,_13); }; break; default: _14.src=_15.NOT_USING; break; } _14.title=_13.statusMessage; _14.alt=_13.statusMessage; } },disabled:function(_16){ return SemTagUtil.getHcardAttributeValue("X-no-awareness",_16); },getSametimeId:function(_17){ var _18=null; for(var i=0;i<SemTagAwrns.imIds.length;i++){ var _19=SemTagSvcPortal.findElementByNameInHcard(_17,SemTagAwrns.imIds[i]); if(_19){ _18=SemTagSvcPortal.getTextValue(_19); if(0<_18.length){ break; } } } return _18; },updateST:function(_1a){ var _1b=_1a.split(";"); var _1c=_1b[0]; var _1d=_1b[1]; if(SemTagSvcPortal.debug){ console.log("INside updateST"+_1a); } for(var i=0;i<SemTagAwrns.hcards.length;i++){ var vc=SemTagAwrns.hcards[i]; var _1e=SemTagAwrns.getSametimeId(vc); if(_1e==_1c){ var _1f=SemTagSvcPortal.findNameElementInHcard(vc); if(_1f){ _1f.setAttribute("semtag_ststatus",_1d); } } } },updateSTProxy:function(){ if(SemTagSvcPortal.debug){ console.log("Update getting called for :stid"+this.id+":portalid:"+this.portalId+":status:"+this.status); } var _20=SemTagAwrns.getStatus(this.status); for(var i=0;i<SemTagAwrns.hcards.length;i++){ var vc=SemTagAwrns.hcards[i]; var _21=SemTagAwrns.getSametimeId(vc); if(_21.toLowerCase()==this.portalId.toLowerCase()){ if(SemTagSvcPortal.debug){ console.log("Doing Update for :stid"+this.id+":portalid:"+this.portalId+":status:"+this.status); } var _22=SemTagSvcPortal.findNameElementInHcard(vc); if(_22){ _22.setAttribute("semtag_ststatus",_20); } var _23=SemTagUtil.getHcardAttributeValue("x-sametime-no-icon",vc); SemTagAwrns.samtimeIconRequired=false; if(_23){ SemTagAwrns.samtimeIconRequired=true; } if(!(SemTagAwrns.samtimeIconRequired)){ var _24=SemTagSvcPortal.getElementsByClassName("sametimeawarenessicon",vc); var _25=_24!=null||_24.length>0?_24[0]:null; if(_25){ icon=_25.firstChild; SemTagAwrns.setSametimeIconSrc(this,icon,stproxy); }else{ if(SemTagSvcPortal.debug){ console.log("Awareness span does not exist should not be possible"+vc+":"+this.id); } } } } } },getStatus:function(_26){ var val=""; switch(_26){ case 0: val="offline"; break; case 1: val="online"; break; case 2: val="away"; break; case 3: val="donotdisturb"; break; case 4: val="away"; break; case 5: val="meeting"; break; default: val="offline"; break; } return val; },openCall:function(_27){ if(stproxy.policies.get(stproxy.policies.TCSPI)){ stproxy.call.byId(_27); } },openInstantMeeting:function(_28){ if(stproxy.policies.get(stproxy.policies.DISABLE_MEETING_INVITATION)){ stproxy.createMeeting(_28); } },openSendAnnouncement:function(_29){ if(stproxy.policies.get(stproxy.policies.ALLOW_ANNOUNCEMENT)){ stproxy.createAnnouncement(_29); } },openAddToContacts:function(_2a){ stproxy.createAdder(_2a); },openChat:function(_2b,_2c){ if(SemTagSvcPortal.debug){ console.info("Opening chat with: "+_2b+":"+SemTagSvcPortal.sametimeSTLinks+":"+SemTagSvcPortal.sametimeSTProxy); } if(SemTagSvcPortal.sametimeSTLinks){ STLinksCreateIM(_2b); } if(SemTagSvcPortal.sametimeSTProxy){ if(SemTagSvcPortal.debug){ console.info("Opening chat with: imId,modelid"+_2b+":"+_2c.id); } stproxy.openChat(_2c.id); } }}; if(typeof wps_userStatusFuncs=="undefined"){ wps_userStatusFuncs=new Object(); } wps_userStatusFuncs["STLinksUserStatusChanged_SA"]=0; if(typeof wps_loggedInFuncs=="undefined"){ wps_loggedInFuncs=new Object(); } wps_loggedInFuncs["STLinksLoggedIn_SA"]=0; if(typeof wps_appletStartedFuncs=="undefined"){ wps_appletStartedFuncs=new Object(); } wps_appletStartedFuncs["STLinksAppletStarted_SA"]=0; function STLinksUserStatusChanged_SA(_2d,_2e,_2f,_30,_31){ var val=""; if(SemTagSvcPortal.debug){ console.log("STLinksUserStatusChanged_SA status got is : "+_2d+";"+_2f+":"+(typeof _2f)); } switch(_2f){ case 32: val="online"; break; case 64: val="away"; break; case 554: val="online"; break; case 96: val="away"; break; case 608: val="away"; break; case 128: val="donotdisturb"; break; default: val="offline"; break; } var arg=_2d+";"+val; if(SemTagSvcPortal.debug){ console.log("STLinksUserStatusChanged_SA status got is Final : "+arg); } if(SemTagSvcPortal.sametimeSTLinks){ SemTagAwrns.updateST(arg); } }; function STLinksAppletStarted_SA(){ if(SemTagSvcPortal.debug){ alert("Applet Started!"); } SemTagAwrns.hasApplet=true; }; function STLinksLoggedIn_SA(id,_32){ if(SemTagSvcPortal.debug){ alert("Logged In: "+id+", "+_32); } }; window.setTimeout(SemTagAwrns.init,SemTagSvcPortal.DELAY); var SemTagC2A={serviceId:"c2a",sourceTagName:"c2a:source",typeNameTagName:"c2a:typename",valueTagName:"c2a:value",displayTagName:"c2a:display",anchorTagName:"c2a:anchor",targetTagName:"c2a:target",menulabelTagName:"c2a:action-label",paramTagName:"c2a:action-param",defaultNameSpaceStr:"IBM_C2A_DEFAULT_NAMESPACE",namespaceSep:"#",liveObjectNamespace:"http://www.ibm.com/xmlns/prod/websphere/portal/v6.1/livetext",targetsAvail:null,targetNodeIDs:new Object(),sourceNodeIDs:new Object(),currentValue:"",currentValArray:null,IDctr:0,c2aIdBaseStr:"IBMC2ASRVC_",c2aSourceIdBase:"IBMC2ASRVC_Source_",c2aTargetIdBase:"IBMC2ASRVC_Target_",nls:{"c2a_click_for_actions":SemTagSvcPortalGlobal.c2a_click_for_actions},init:function(){ if(!window.ibm){ window.ibm=new Object(); } if(!window.ibm.portal){ window.ibm.portal=new Object(); } window.ibm.portal.c2a=new Object(); for(var i=0;i<parent.frames.length;i++){ if(SemTagC2A.canAccessFrameContent(parent.frames[i])){ if(!parent.frames[i].ibm){ parent.frames[i].ibm=new Object(); } if(!parent.frames[i].ibm.portal){ parent.frames[i].ibm.portal=new Object(); } parent.frames[i].ibm.portal.c2a=new Object(); } } SemTagC2A.defineRegExpressions(); SemTagSvcPortal.setCallback(SemTagC2A.serviceId,SemTagC2A.parseDOM); SemTagSvcPortal.setSpecialMenuProvider(SemTagC2A.getSpecialC2AMenuItems); SemTagC2A.parseDOM(); },getSpecialC2AMenuItems:function(_1){ var _2=null; try{ var _3=_1; var _4=_1.parentNode; var _5=SemTagSvcPortal.getSemanticTagValues(_1); for(var _6 in _5){ var _7=_5[_6]; if(!_7){ continue; } _2=SemTagC2A.getTargetMenuItems(SemTagC2A.getSpecialC2ASourceInfo(_6,_7)); } } catch(e){ if(SemTagSvcPortal.trace){ SemTagUtil.log("error getting special c2a menu items, exception is "+e); } } return _2; },showHover:function(_8){ SemTagSvcPortal.showHover(_8,SemTagC2A.handleClick,SemTagC2A.nls.c2a_click_for_actions); },canAccessFrameContent:function(_9){ var _a=false; try{ if(window.location.host==_9.location.host&&window.location.protocol==_9.location.protocol){ _a=true; } } catch(err){ } return _a; },findElementInWindowScope:function(_b){ var _c; _c=document.getElementById(_b); if(_c==null){ for(var i=0;i<parent.frames.length;i++){ if(SemTagC2A.canAccessFrameContent(parent.frames[i])){ _c=frames[i].document.getElementById(_b); if(_c!=null){ break; } } } } return _c; },handleClick:function(_d){ if(!window.ibm){ window.ibm=new Object(); } if(!window.ibm.portal){ window.ibm.portal=new Object(); } window.ibm.portal.c2a=new Object(); for(var i=0;i<parent.frames.length;i++){ if(SemTagC2A.canAccessFrameContent(parent.frames[i])){ if(!parent.frames[i].ibm){ parent.frames[i].ibm=new Object(); } if(!parent.frames[i].ibm.portal){ parent.frames[i].ibm.portal=new Object(); } parent.frames[i].ibm.portal.c2a=new Object(); } } var _e=SemTagSvcPortal.getLiveElementFromEvent(_d); if(!SemTagC2A.isSource(_e)){ var _f=SemTagSvcPortal.getParentByClassName(SemTagC2A.sourceTagName,_e); } SemTagC2A.generateMenuContents(_d,_f); },parseDOM:function(){ SemTagC2A.processDomNodes(SemTagSvcPortal.getNodes(SemTagC2A.serviceId)); SemTagC2A.processSources(SemTagC2A.sourceNodeIDs); },processDomNodes:function(_10){ for(var _11 in SemTagC2A.sourceNodeIDs){ if(!SemTagC2A.findElementInWindowScope(_11)){ delete SemTagC2A.sourceNodeIDs[_11]; } } for(var _11 in SemTagC2A.targetNodeIDs){ if(!SemTagC2A.findElementInWindowScope(_11)){ delete SemTagC2A.targetNodeIDs[_11]; } } while(_10&&_10.length>0){ var _12=_10.pop(); var _13=_12.id; if(_13!=null&&(SemTagC2A.exists(SemTagC2A.sourceNodeIDs,_13)||SemTagC2A.exists(SemTagC2A.targetNodeIDs,_13))){ continue; } if(SemTagC2A.isSource(_12)){ if(_12.id==null||_12.id==""){ _12.id=SemTagC2A.c2aSourceIdBase+SemTagC2A.IDctr; SemTagC2A.IDctr++; } SemTagC2A.sourceNodeIDs[_12.id]="true"; }else{ if(SemTagC2A.isTarget(_12)){ if(_12.id==null||_12.id==""){ _12.id=SemTagC2A.c2aTargetIdBase+SemTagC2A.IDctr; SemTagC2A.IDctr++; } SemTagC2A.targetNodeIDs[_12.id]="true"; } } } SemTagC2A.updateAvailableTargets(); },exists:function(_14,_15){ if(_14[_15]&&_14[_15]=="true"){ return true; } return false; },processSources:function(_16){ for(var _17 in _16){ var _18=SemTagC2A.findElementInWindowScope(_17); var _19=SemTagC2A.getSourceInfo(_18); var _1a=SemTagC2A.isTargetDefined(_19); if(_19.value==null||_19.value==""){ if(SemTagSvcPortal.trace){ SemTagUtil.log("Click-to-Action error: Missing c2a:value tag"); } break; } var _1b=_19.anchorNode.getAttribute("hasHover"); if(_1a||_19.display!=""){ if(_1b==null||_1b=="false"){ SemTagSvcPortal.addHover(_19.anchorNode,SemTagC2A.showHover,SemTagC2A.handleClick); _19.anchorNode.setAttribute("hasHover","true"); } }else{ if(_1b=="true"){ SemTagSvcPortal.removeHover(_19.anchorNode,SemTagC2A.showHover,SemTagC2A.handleClick); } _19.anchorNode.setAttribute("hasHover","false"); } } },defineRegExpressions:function(){ SemTagC2A.sourceRegExp=new RegExp("(^|\\s)"+SemTagC2A.sourceTagName+"(\\s|$)"); SemTagC2A.typeNameRegExp=new RegExp("(^|\\s)"+SemTagC2A.typeNameTagName+"(\\s|$)"); SemTagC2A.valueRegExp=new RegExp("(^|\\s)"+SemTagC2A.valueTagName+"(\\s|$)"); SemTagC2A.displayRegExp=new RegExp("(^|\\s)"+SemTagC2A.displayTagName+"(\\s|$)"); SemTagC2A.anchorRegExp=new RegExp("(^|\\s)"+SemTagC2A.anchorTagName+"(\\s|$)"); SemTagC2A.targetRegExp=new RegExp("(^|\\s)"+SemTagC2A.targetTagName+"(\\s|$)"),SemTagC2A.menulabelRegExp=new RegExp("(^|\\s)"+SemTagC2A.menulabelTagName+"(\\s|$)"); SemTagC2A.paramRegExp=new RegExp("(^|\\s)"+SemTagC2A.paramTagName+"(\\s|$)"); },isTarget:function(_1c){ if(_1c.tagName=="FORM"){ return (SemTagUtil.getNodeClassValue(_1c).match(SemTagC2A.targetRegExp)); }else{ return false; } },isSource:function(_1d){ if(_1d.tagName=="SPAN"||_1d.tagName=="DIV"){ return (SemTagUtil.getNodeClassValue(_1d).match(SemTagC2A.sourceRegExp)); }else{ return false; } },updateAvailableTargets:function(){ SemTagC2A.targetsAvail=null; SemTagC2A.targetsAvail=new Array(); for(var _1e in SemTagC2A.targetNodeIDs){ var _1f=SemTagC2A.findElementInWindowScope(_1e); var _20=_1f.childNodes; var _21=null; var _22=null; for(var i=0;i<_20.length;i++){ var _23=_20[i]; var _24=SemTagUtil.getNodeClassValue(_23); if(_24==""){ continue; } if(_24.match(SemTagC2A.typeNameRegExp)){ var _25=SemTagC2A.getElementValue(_23); var _26=SemTagC2A.parseTypeName(_25); _21=_26.namespace; _22=_26.type; if(_22!=null){ if(_21==null){ _21=SemTagC2A.defaultNameSpaceStr; } if(typeof (SemTagC2A.targetsAvail[_21])=="undefined"){ SemTagC2A.targetsAvail[_21]=new Array(); } SemTagC2A.targetsAvail[_21][_22]=true; } } } } },parseTypeName:function(_27){ var _28=null; var _29=null; var _2a=_27.indexOf(SemTagC2A.namespaceSep); if(_2a<0){ _28=SemTagC2A.defaultNameSpaceStr; _29=_27; }else{ _28=_27.substring(0,_2a); _29=_27.substring(_2a+1); } if(_28==SemTagC2A.liveObjectNamespace){ var _2b=_29.indexOf("."); if(_2b>0){ var _2c=_29.substring(_2b+1); _29=_29.substring(0,_2b); return {"namespace":_28,"type":_29,"selector":_2c}; } } return {"namespace":_28,"type":_29}; },isTargetDefined:function(_2d){ var _2e=false; for(var i=0;i<_2d.typenames.length;i++){ if(!_2d.typenames[i].namespace||_2d.typenames[i].namespace==""){ _2d.typenames[i].namespace=SemTagC2A.defaultNameSpaceStr; } if(typeof (SemTagC2A.targetsAvail[_2d.typenames[i].namespace])!="undefined"){ var _2f=SemTagC2A.targetsAvail[_2d.typenames[i].namespace][_2d.typenames[i].type]; _2e=(typeof (_2f)!="undefined"&&_2f?true:false); } if(_2e==true){ return _2e; } } return false; },isTargetSourceMatch:function(_30,_31){ var _32; var _33; for(var i=0;i<_30.typenames.length;i++){ _32=_30.typenames[i]; for(var j=0;j<_31.typenames.length;j++){ _33=_31.typenames[j]; if(_32.namespace==_33.namespace){ if(_32.namespace==SemTagC2A.liveObjectNamespace){ var _34; if(_33.selector){ _34=SemTagC2A.selectSubField(_30.value,_31.selector); }else{ _34=_30.value; } if(_34&&_34!=null&&_34!=""){ return true; } }else{ if(_32.type==_33.type){ return true; } } } } } return false; },getElementValue:function(_35){ var _36; if(SemTagUtil.getNodeClassValue(_35).match(SemTagC2A.displayRegExp)){ _36=_35.innerHTML; }else{ _36=_35.firstChild.nodeValue; } return (_36==null?"":_36.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1")); },fillC2AInfo:function(_37,_38){ var _39=_37.childNodes; for(var i=0;i<_39.length;i++){ var _3a=_39[i]; var _3b=SemTagUtil.getNodeClassValue(_3a); if(_3b==null||_3b==""){ if(_3a.childNodes.length>0){ SemTagC2A.fillC2AInfo(_3a,_38); } }else{ if(_3b.match(SemTagC2A.typeNameRegExp)){ var _3c=SemTagC2A.getElementValue(_3a); var _3d=SemTagC2A.parseTypeName(_3c); _38.typenames.push({namespace:_3d.namespace,type:_3d.type}); if(_3d.selector){ _38.selector=_3d.selector; } }else{ if(_3b.match(SemTagC2A.valueRegExp)&&_38.value==""){ _38.value=SemTagC2A.getElementValue(_3a); if(!_38.anchorNode||_38.anchorNode==""){ _38.anchorNode=_3a; } }else{ if(_3b.match(SemTagC2A.displayRegExp)&&_38.display==""){ _38.display=SemTagC2A.getElementValue(_3a); }else{ if(_3b.match(SemTagC2A.menulabelRegExp)&&_38.menuLabel==""){ _38.menuLabel=SemTagC2A.getElementValue(_3a); }else{ if(_3b.match(SemTagC2A.anchorRegExp)){ _38.anchorNode=_3a; }else{ if(!_3b.match(SemTagC2A.sourceRegExp)&&!_3b.match(SemTagC2A.targetRegExp)){ if(_3a.childNodes.length>0){ SemTagC2A.fillC2AInfo(_3a,_38); } } } } } } } } } },getSpecialC2ASourceInfo:function(_3e,_3f){ var _40={"typenames":new Array(),"value":_3f,"display":"","anchorNode":""}; _40.typenames.push({namespace:SemTagC2A.liveObjectNamespace,type:_3e}); return _40; },getSourceInfo:function(_41){ var _42={"typenames":new Array(),"value":"","display":"","anchorNode":""}; SemTagC2A.fillC2AInfo(_41,_42); return _42; },getTargetInfo:function(_43){ var _44={"typenames":new Array(),"menuLabel":""}; SemTagC2A.fillC2AInfo(_43,_44); return _44; },generateMenuContents:function(_45,_46){ var _47=null; var _48=null; var _49=SemTagC2A.getSourceInfo(_46); if(SemTagC2A.isTargetDefined(_49)==true){ _47=SemTagC2A.getTargetMenuItems(_49); } if(_49.display!=""){ _48=SemTagSvcPortal.getMenuHeaderJson(_49.display,"text/html",-100); } if(_47!=null||_49.display!=""){ SemTagSvcPortal.setMenuData(_45,_47,"",_48,""); } },getTargetMenuItems:function(_4a){ var _4b=new Array(); var _4c=new Array(); for(var _4d in SemTagC2A.targetNodeIDs){ var _4e=SemTagC2A.findElementInWindowScope(_4d); var _4f=SemTagC2A.getTargetInfo(_4e); var _50=_4f.menuLabel; var _51=_4c[_50]; if(_51!=null){ _4c[_50]=_51++; }else{ _4c[_50]=1; _51=1; } if(_51>1){ _50+=" ("+_51+")"; } if(SemTagC2A.isTargetSourceMatch(_4a,_4f)==true){ _4b.push(SemTagSvcPortal.getMenuItemJson(_50,"javascript:SemTagC2A.executeMenuAction(\""+_4d+"\");")); } } if(_4b.length>0){ SemTagC2A.currentValue=_4a.value; } return _4b; },executeMenuAction:function(_52){ var _53={}; var _54=SemTagC2A.findElementInWindowScope(_52); if(_54&&_54.tagName=="FORM"){ var _55=SemTagC2A.currentValue; var _56=SemTagC2A.getTargetInfo(_54); if(_56.selector){ _55=SemTagC2A.selectSubField(_55,_56.selector); } var _57=SemTagSvcPortal.getElementsByClassName(SemTagC2A.paramTagName,_54,0,["INPUT"]); for(var j=0;j<_57.length;j++){ _57[j].value=SemTagC2A.getStringValue(_55); } window.ibm.portal.c2a.event={value:_55}; for(var i=0;i<parent.frames.length;i++){ if(SemTagC2A.canAccessFrameContent(parent.frames[i])){ if(!parent.frames[i].ibm){ parent.frames[i].ibm=new Object(); } if(!parent.frames[i].ibm.portal){ parent.frames[i].ibm.portal=new Object(); } parent.frames[i].ibm.portal.c2a=new Object(); parent.frames[i].ibm.portal.c2a.event={value:_55}; } } if(_54.onsubmit){ if(SemTagUtil.isGecko){ var _58=new Object(); _54.onsubmit(_58); }else{ _54.fireEvent("onsubmit"); } } _54.submit(); }else{ if(SemTagSvcPortal.trace){ SemTagUtil.log("no target node can be found for id "+_52); } } },selectSubField:function(obj,_59){ var _5a=_59.split("."); var x=obj; for(var i=0;i<_5a.length;i++){ if(typeof (x)=="object"&&x[_5a[i]]){ x=x[_5a[i]]; }else{ if(SemTagSvcPortal.trace){ SemTagUtil.log("cannot select "+_59+" from "+obj); } x=null; break; } } return x; },getStringValue:function(x){ if(typeof x=="string"){ return x; }else{ return SemTagC2A.getJSON(x); } },getJSON:function(x){ if(x==null){ return "null"; } switch(typeof x){ case "string": return "\""+x+"\""; case "number": case "boolean": return String(x); case "object": if(x instanceof Array){ return SemTagC2A.getArrayJSON(x); }else{ if(x){ return SemTagC2A.getObjectJSON(x); } } } },getObjectJSON:function(o){ var a=[]; for(k in o){ if(o.hasOwnProperty(k)){ a.push("\""+k+"\":"+SemTagC2A.getJSON(o[k])); } } return "{"+a.join(",")+"}"; },getArrayJSON:function(o){ var a=[]; for(var k=0;k<o.length;k++){ a.push(SemTagC2A.getJSON(o[k])); } return "["+a.join(",")+"]"; },triggerCSRAction:function(_5b){ var _5c=SemTagC2A.findElementInWindowScope(_5b); var _5d=SemTagC2A.getC2ATargetPageID(_5c); var _5e=SemTagC2A.getC2ATargetPortletWindowID(_5c); var _5f=SemTagC2A.getC2ACommTargetName(_5c); var _60=SemTagC2A.currentValue; var _61=SemTagC2A.getTargetActionParams(_5c); },triggerCSREvent:function(_62){ var _63=SemTagC2A.findElementInWindowScope(_62); var _64=SemTagC2A.getC2ATargetPageID(_63); var _65=SemTagC2A.getC2ATargetPortletWindowID(_63); var _66=SemTagC2A.getC2ACommTargetQName(_63); var _67=SemTagC2A.currentValue; var _68=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.EventService.SERVICE_NAME); _68.fireEvent(_65,_66,_67,"{http://www.w3.org/2001/XMLSchema}string"); },getC2ATargetPageID:function(_69){ var _6a=dojo.query("input[name=\"com.ibm.wps.propertybroker.standard.c2a.pageid\"]",_69); var _6b=(_6a!=null&&_6a.length==1)?_6a[0].value:"undefined"; return _6b; },getC2ATargetPortletWindowID:function(_6c){ var _6d=dojo.query("input[name=\"com.ibm.wps.propertybroker.standard.c2a.portletwindowid\"]",_6c); var _6e=(_6d!=null&&_6d.length==1)?_6d[0].value:"undefined"; return _6e; },getC2ACommTargetName:function(_6f){ var _70=dojo.query("input[name=\"com.ibm.wps.propertybroker.standard.c2a.commtargetname\"]",_6f); var _71=(_70!=null&&_70.length==1)?_70[0].value:"undefined"; return _71; },getC2ACommTargetQName:function(_72){ var _73=dojo.query("input[name=\"com.ibm.wps.propertybroker.standard.c2a.commtargetqname\"]",_72); var _74=(_73!=null&&_73.length==1)?_73[0].value:"undefined"; return _74; },getC2ATargetActionParams:function(_75){ var _76=dojo.query("input[type=\"text\"]",_75); dojo.forEach(_76,function(_77){ }); }}; SemTagC2A.init(); // end of jspscriptlet if(typeof (ibm)=="undefined"){ ibm={}; } if(typeof (ibm.portal)=="undefined"){ ibm.portal={}; } if(typeof (ibm.portal.xml)=="undefined"){ ibm.portal.xml={}; } if(typeof (ibm.portal.xml)=="undefined"){ ibm.portal.xml={}; } ibm.portal.util={}; ibm.portal.util.cloneObject=function(_1){ var _2={}; for(i in _1){ _2[i]=_1[i]; } return _2; }; ibm.portal.resource={}; ibm.portal.resource.str={}; ibm.portal.resource.getString=function(_3,_4){ s=_3[_4]; s=(s==null)?_4:s; if(arguments.length>=2){ i=1; do{ s=s.replace("%"+i,arguments[i]); i=i+1; }while(i<arguments.length); } return s; }; if(typeof (ibm.portal.xml)=="undefined"){ ibm.portal.xml={}; } ibm.portal.xml.ie={}; ibm.portal.xml.gecko={}; ibm.portal.xml.getXmlHttpRequest=function(){ var _5=null; if(typeof ActiveXObject!="undefined"){ _5=new ActiveXObject("Microsoft.XMLHTTP"); }else{ _5=new XMLHttpRequest(); } return _5; }; ibm.portal.xml.loadXml=function(_6){ if(typeof ActiveXObject!="undefined"){ return ibm.portal.xml.ie.loadXml(_6); }else{ return ibm.portal.xml.gecko.loadXml(_6); } }; ibm.portal.xml.loadXmlString=function(_7){ if(typeof ActiveXObject!="undefined"){ return ibm.portal.xml.ie.loadXmlString(_7); }else{ return ibm.portal.xml.gecko.loadXmlString(_7); } }; ibm.portal.xml.loadXsl=function(_8){ if(typeof ActiveXObject!="undefined"){ return ibm.portal.xml.ie.loadXsl(_8); }else{ return ibm.portal.xml.gecko.loadXsl(_8); } }; ibm.portal.xml.transform=function(_9,_a,_b,_c,_d){ if(typeof ActiveXObject!="undefined"){ return ibm.portal.xml.ie.transform(_9,_a,_b,_c,_d); }else{ return ibm.portal.xml.gecko.transform(_9,_a,_b,_c,_d); } }; ibm.portal.xml.update=function(_e,_f,xsl,_10,_11){ if(typeof ActiveXObject!="undefined"){ var _12=ibm.portal.xml.ie.transform(_f,xsl,_10,_11,true); ibm.portal.debug.text("XSLT result: "+_12); _e.innerHTML+=_12; }else{ _12=ibm.portal.xml.gecko.transform(_f,xsl,_10,_11,false); _e.appendChild(_12.documentElement); } }; ibm.portal.xml.ie.loadXml=function(_13){ var _14=new ActiveXObject("MSXML2.DOMDocument"); _14.async=0; _14.resolveExternals=0; if(!_14.load(_13)){ throw new Error("Error loading xml file "+_13); } return _14; }; ibm.portal.xml.ie.loadXmlString=function(_15){ var _16=new ActiveXObject("MSXML2.DOMDocument"); _16.async=0; _16.resolveExternals=0; if(!_16.loadXML(_15)){ throw new Error("Error loading xml string "+_15); } return _16; }; ibm.portal.xml.ie.loadXsl=function(_17){ var _18=new ActiveXObject("MSXML2.FreeThreadedDOMDocument"); _18.async=0; _18.resolveExternals=0; if(!_18.load(_17)){ throw new Error("Error loading xsl file "+_17); } return _18; }; ibm.portal.xml.ie.transform=function(_19,xsl,_1a,_1b,_1c){ var _1d=_19; var _1e=xsl; try{ if(!_1e.documentElement){ _1e=this.loadXsl(xsl); } } catch(e){ var _1f=e.message; throw new Error(""+_1f,""+_1f); } var _20=new ActiveXObject("Msxml2.XSLTemplate"); _20.stylesheet=_1e; var _21=_20.createProcessor(); _21.input=_1d; if(_1b){ for(var p in _1b){ _21.addParameter(p,_1b[p]); } } if(_1a){ _21.addParameter("mode",_1a); } if(_1c){ if(!_21.transform()){ throw new Error("Error transforming xml doc "+_1d); } return _21.output; }else{ var _22=new ActiveXObject("MSXML2.DOMDocument"); _22.async=0; _22.validateOnParse=1; _1d.transformNodeToObject(_1e,_22); return _22; } }; ibm.portal.xml.gecko.loadXml=function(_23){ var _24=document.implementation.createDocument("","",null); var xhr=new XMLHttpRequest(); xhr.open("GET",_23,false); xhr.send(null); if(xhr.status==200){ _24=xhr.responseXML; } return _24; }; ibm.portal.xml.gecko.loadXmlString=function(_25){ var _26=new DOMParser(); try{ oXmlDoc=_26.parseFromString(_25,"text/xml"); } catch(exc){ throw new Error("Error loading xml string "+_25); } return oXmlDoc; }; ibm.portal.xml.gecko.loadXsl=function(_27){ var _28=document.implementation.createDocument("","",null); var xhr=new XMLHttpRequest(); xhr.open("GET",_27,false); xhr.send(null); if(xhr.status==200){ _28=xhr.responseXML; } return _28; }; ibm.portal.xml.gecko.transform=function(_29,xsl,_2a,_2b,_2c){ try{ var _2d=xsl; if(!_2d.documentElement){ alert("xslDoc is not a Document, loading it..."); _2d=this.loadXsl(xsl); } var _2e=new XSLTProcessor(); _2e.importStylesheet(_2d); if(_2b){ for(var p in _2b){ _2e.setParameter(null,p,_2b[p]); } } if(_2a){ _2e.setParameter(null,"mode",_2a); } var _2f=_2e.transformToDocument(_29); if(!_2c){ return _2f; } resultStr=_2f.documentElement.textContent; } catch(exc){ throw new Error("Error transforming xml doc "+exc); } return resultStr; }; ibm.portal.xml.setLayerContentByXml=function(_30,xml,xsl,_31,_32){ var _33=ibm.portal.xml.transform(xml,xsl,null,_31,_32); if(_30.innerHTML){ _30.innerHTML=_33; }else{ var obj=document.getElementById(_30); obj.innerHTML=_33; } }; ibm.portal.io={}; ibm.portal.io.sAcceptLanguage=""; ibm.portal.io.getResponseHeader=function(_34,_35){ var _36; try{ _36=_34.getResponseHeader(_35); } catch(exc){ _36=null; } return _36; }; ibm.portal.io.checkForError=function(_37){ var _38=null; var _39=ibm.portal.io.getResponseHeader(_37,"X-IBM-REST-Error"); if(_39){ var _38="",_3a=ibm.portal.io.getResponseHeader(_37,"X-IBM-REST-MsgArg1"); if(_3a){ _38=ibm.portal.resource.getString(_39,window.decodeURIComponent(_3a)); }else{ _38=ibm.portal.resource.getString(_39); } } return _38; }; ibm.portal.io.asyncRequest=function(_3b,_3c,_3d,_3e){ try{ ibm.portal.io.setAsync(_3b,_3c,_3d,_3e,true); } catch(e){ ibm.portal.io.setAsync(_3b,_3c,_3d,_3e,false); } }; ibm.portal.io.setAsync=function(_3f,_40,_41,_42,_43){ var _44=ibm.portal.xml.getXmlHttpRequest(); _44.open(_3f,_40,true); if(!_43){ _44.setRequestHeader("Accept-language","*"); } try{ _44.onreadystatechange=function(){ if(_44.readyState==4){ _42.startUpdate(); sError=ibm.portal.io.checkForError(_44); if(sError){ _42.handleError(""+ibm.portal.resource.getString(sError)); }else{ var _45=_44.responseText; _42.handleData(_45); } } }; _44.send(_41); } catch(e){ throw new Error("",""); } }; try{ } catch(e){ console.error(e); } com.ibm.pb.io.RESOURCE_CACHE.set("/sabc/mccbuilder.v3001/widget-catalog/reorderPageWidget.xml", "<!-- ***************************************************************** -->\n<!-- -->\n<!-- Licensed Materials - Property of IBM -->\n<!-- -->\n<!-- 5724-U69 -->\n<!-- -->\n<!-- Copyright IBM Corp. 2012 All Rights Reserved. -->\n<!-- -->\n<!-- US Government Users Restricted Rights - Use, duplication or -->\n<!-- disclosure restricted by GSA ADP Schedule Contract with -->\n<!-- IBM Corp. -->\n<!-- -->\n<!-- ***************************************************************** -->\n\n<!--author: Marshall (shiwcsdl@cn.ibm.com); iWidget spec v1 -->\n<iw:iwidget name=\"reorderPage\" xmlns:iw=\"http://www.ibm.com/xmlns/prod/iWidget\" iScope=\"com.ibm.mm.builder.reorderPage\" supportedModes=\"view\" mode=\"view\">\n <iw:resource uri=\"reorderPage.js\" />\n\t<!--iw:resource uri=\"../css/reorderPage.css\"/>\n\t<iw:resource uri=\"../css/reorderPage_rtl.css\"/-->\n <iw:itemSet id=\"attributes\">\n <iw:item id=\"version\" value=\"1.0.0.0.0\"/>\n </iw:itemSet>\n\n <iw:event id=\"com.ibm.mashups.builder.reorderPage\" handled=\"true\" onEvent=\"onReorderPage\" eventDescName=\"desc_onOrderPage\"/>\n <iw:eventDescription id=\"desc_onReorderPage\" payloadType=\"json\" title=\"Page and space ID\" description=\"Receives a page and space ID and reorder the page\" lang=\"en\">\n <!--@reorderPage.com.ibm.mashups.builder.reorderPage@-->\n </iw:eventDescription>\n \n <iw:content mode=\"view\">\n <![CDATA[\n <div id=\"_IWID_root\"></div>\n ]]>\n </iw:content>\n</iw:iwidget>\n"); dojo.require("com.ibm.mm.builder.dialog.ReorderingPageDialog"); dojo.declare("com.ibm.mm.builder.reorderPage",null,{reorderPageDlg:null,onLoad:function(){ var _1=this.iContext.widgetId; var _2=dojo.byId("_"+_1+"_root"); this.reorderPageDlg=new com.ibm.mm.builder.dialog.ReorderingPageDialog({root:_2,widgetId:_1},_2); },onReorderPage:function(_3){ var _4=_3.payload; this.reorderPageDlg.setPageId(_4.pageId,_4.spaceId); this.reorderPageDlg.refresh(); }}); i$.toPath("com.ibm.mm.builder.movePage.action", function(menuitem) { var curElement = document.activeElement; var link1; link1 = com.ibm.mashups.services.ServiceManager.getService("eventService").subscribeEvent("com.ibm.mashups.builder.closeMashupDialog", this, function() { com.ibm.mashups.services.ServiceManager.getService("eventService").unsubscribeEvent(link1); link1 = null; if (curElement != null) curElement.focus(); }); com.ibm.pb.contextMenu.sharedActions.movePage(ibmCfg.portalConfig.currentPageOID); }); i$.toPath("com.ibm.mm.builder.movePage.action.visibility", function(menuitem) { return menuitem.visibility !== false && i$.hasClass(document.getElementsByTagName("body")[0],"edit-mode"); }); /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ if(!dojo._hasResource["com.ibm.pb.screen.position"]){dojo._hasResource["com.ibm.pb.screen.position"]=true;dojo.provide("com.ibm.pb.screen.position");(function(){var _1=["x","y"],_2={x:"w",y:"h"},_3=function(a){if(!dojo.isArray(a)){a=[a];}return a;},_4=function(a){return (dojo.style(a,"display")||"").toLowerCase()=="none";};scrPos=com.ibm.pb.screen.position={findByDirection:function(_5,_6,_7,_8){var p=dojo.position(_5),_9="beforeDelta",_a,_b=[],_c=[],_d;switch(_7){case "left":_a="x";break;case "right":_9="afterDelta";_a="x";break;case "up":_a="y";break;case "down":default:_9="afterDelta";_a="y";}var _e=null;for(var i=0;i<_6.length;i++){_d=_6[i];if(!_4(_d)){_e=dojo.position(_d);_b.push({pos:_e,delta:scrPos[_9](_e,p,_a),node:_d});}}_b=_b.sort(this._sortByDelta);for(var k=_b.length-1;k>=0;k--){if(_b[k].delta<0){_b.splice(0,k+1);break;}if(!_8||scrPos.inAxis(p,_b[k].pos,_a)){_c.unshift(_b[k].node);}}return _c;},inAxis:function(p1,p2,_f){var a=_f==="x"?"y":"x";return !((p1[a]>(p2[a]+p2[_2[a]]))||((p1[a]+p1[_2[a]])<p2[a]));},_sortByDelta:function(p1,p2){return p1.delta-p2.delta;},isContainedIn:function(p1,p2){return (p1.x>=p2.x&&(p1.x+p1.w<=p2.x+p2.w))&&(p1.y>=p2.y&&(p1.y+p1.h<=p2.y+p2.h));},contains:function(p1,p2){return (p1.x<=p2.x&&(p1.x+p1.w>=p2.x+p2.w))&&(p1.y<=p2.y&&(p1.y+p1.h>=p2.y+p2.h));},beforeDelta:function(p1,p2,_10){return scrPos.afterDelta.call(this,p2,p1,_10);},afterDelta:function(p1,p2,_11){return p1[_11]-(p2[_11]+p2[_2[_11]]);},isBefore:function(p1,p2,_12){return scrPos.beforeDelta.call(this,p1,p2,_12)>=0;},isAfter:function(p1,p2,_13){return scrPos.afterDelta.call(this,p1,p2,_13)>=0;},boundingBox:function(_14){var b={x:null,y:null,w:0,h:0};_14=_3(_14);dojo.forEach(_14,function(n){if(!_4(node)){var p=dojo.position(n);dojo.forEach(_1,function(a){if(p[a]<b[a]||b[a]===null){b[a]=p[a];}var _15=(p[a]+p[_2[a]])-(b[a]+b[_2[a]]);if(_15>0){b[_2[a]]+=_15;}});}});return b;},extreme:function(_16,_17){_16=_3(_16);var b=scrPos.boundingBox(_16);var ret={low:[],high:[]},v=0;}};})();}if(!dojo._hasResource["com.ibm.pb.layout.MoveControls"]){dojo._hasResource["com.ibm.pb.layout.MoveControls"]=true;dojo.provide("com.ibm.pb.layout.MoveControls");(function(){var _18=com.ibm.pb.layout.LayoutParser,_19=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService"),_1a=com.ibm.mashups.builder.model.Factory,_1b=_1a.getRuntimeModel(),_1c=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel(),_1d=function(wid,dir){var _1e=_18.findById(wid),_1f,_20;if(_1e){var _1f=_21(_1e,dir),_20=null;if(!_1f){_20=_22(_1e,dir);}if(_1f||_20){var _23=_24(_1e);var ret={source:_1e,parent:_1f?_23:_20,sibling:_1f,dir:dir};return ret;}}},_25=com.ibm.pb.screen.position,_26=function(_27,_28){var idx=_29(_27),_2a=_29(_28);return idx<_2a;},_29=function(_2b){return dojo.indexOf(_2b.parentNode.childNodes,_2b);},_2c=function(_2d){var _2e=_2d&&_2d.nextSibling;if(!_2e){return null;}else{if(_2e.nodeType!=1){return _2c(_2e);}else{return _2e;}}},_24=function(_2f){return _2f.parentNode;},_30=function(_31){return dojo.query("> .component-control",_31);},_32=function(){return dojo.query(".component-container:not(.hiddenWidgetsContainer)");},_21=function(_33,_34){var _35=_30(_24(_33)).filter(function(c){return c!=_33;}),_36=_25.findByDirection(_33,_35,_34);return _36[0];},_22=function(_37,_38){var _39=_24(_37),_3a=_32().filter(function(c){return c!=_39;}),_3b=_25.findByDirection(_37,_3a,_38);return _3b[0];},_3c=function(_3d){if(_3d._moveInfo){return _3d._moveInfo;}var _3e=_1d(_3d.metadata.wid,_3d.metadata.direction);if(_3e){var _3f=_3e.source,_40=_3e.sibling,_41=_3e.parent,pos="last",_42,_43,me=this,_44;if(_40&&_40.parentNode==_41){var _45=_40;if(_26(_3f,_40)){_40=_2c(_40);}pos="before";_44=_40;if(_44==null){_44=_45;pos="after";}}else{_44=_41;}var _46=_18.extractID(_3f),_47=_18.extractID(_41),_48=(_40&&_18.extractID(_40))||null,_49=_1a.getRuntimeModel().getCurrentPage().getID(),lm=_4a(_49),_4b=lm.find(_46).start(),_4c=lm.find(_47).start(),_4d=_48?lm.find(_48).start():null;if(lm.confirmInsert(_4b,_4c,_4d)){_3d._moveInfo={modelInfo:{lm:lm,lmNode:_4b,lmParentNode:_4c,lmNextNode:_4d},domInfo:{node:_3f,pos:pos,refNode:_44}};return _3d._moveInfo;}}},_4e=function(){return _1b.getCurrentPage().getPageMode()=="edit";},_4a=function(_4f){var _50=_1c.find(_4f).start();return _1c.getLayoutModel(_50);},_51=function(){var dom=dojo.query(".hiddenWidgetsContainer",_18.getRootNode());if(dom&&dom[0]){return _18.extractID(dom[0]);}return null;},_52=function(){var _53=_4a(_1b.getCurrentPage().getID()),_54=_53.getRoot().start(),_55=_53.getChildren(_54);while(_55.hasNext()){var _56=_55.next();if(_56.getMetaData("com.ibm.portal.layoutnode.localname")=="ibmHiddenWidgets"){return _56;}}return null;},_57=function(wid){if(typeof ibmc!=="undefined"){ibmc.publish("my.setDirtyPage",[true]);}_1b.getCurrentPage().setDirty(true);_19.broadcastEvent("com.ibm.mashups.builder.widgetMoved",wid);i$.fireEvent("wptheme/contextMenu/invalidate/all");},_58=function(){var nm=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var pid=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _59=nm.find(pid).start();var _5a=_59.getContent().start();return _5a.hasRole("Privileged User")||_5a.hasRole("Editor")||_5a.hasRole("Administrator");},_5b=function(wid){var _5c=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _5d=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_5c,wid);if(_5d.getWindowState()==_5d.MAX){return true;}else{return false;}};dojo.mixin(com.ibm.pb.layout,{CanMoveControl:function(_5e){var val=_4e()&&_3c(_5e)!=null&&_58()&&!_5b(_5e.metadata.wid);return i$.promise.resolved(val);},MoveControl:function(_5f){var _60=_3c(_5f),p=new i$.Promise();if(_60){var _61=_60.modelInfo,_62=_60.domInfo;dojo.place(_62.node,_62.refNode,_62.pos);_61.lm.insert(_61.lmNode,_61.lmParentNode,_61.lmNextNode);_57(_5f.metadata.wid);p.resolve(true);}else{p.resolve(false);}return p;},CanHideControl:function(_63){var val=false;if(_4e()){var _64=_51();if(!_64){val=false;}else{var _65=_4a(_1b.getCurrentPage().getID()),_66=_65.find(_63.metadata.wid).start();if(!_66){val=false;}else{var _67=_65.getParent(_66).start();if(_67.getID()==_64){return false;}var _68=_52();val=_65.confirmInsert(_66,_68)&&_58()&&!_5b(_63.metadata.wid);}}}return i$.promise.resolved(val);},HideControl:function(_69){var _6a=_4a(_1b.getCurrentPage().getID()),_6b=_52(),_6c=_18.findById(_6b.getID()),_6d=_6a.find(_69.metadata.wid).start(),_6e=_18.findById(_6d.getID());_6a.insert(_6d,_6b);_6c.appendChild(_6e);_57(_69.metadata.wid);if(i$.fromPath("com.ibm.pb.control.DNDController")){var _6f=com.ibm.pb.control.DNDController.getController().dndSources;if(_6f[_6b.getID()]){_6f[_6b.getID()].sync();}}return i$.promise.resolved(true);}});})();} dojo.provide("pagebuilder.nls.pb_shelf_base_en");dojo.provide("com.ibm.bundles.nls.Shelf");com.ibm.bundles.nls.Shelf._built=true;dojo.provide("com.ibm.bundles.nls.Shelf.en");com.ibm.bundles.nls.Shelf.en={"mashups_hub_gadgets_label":"Gadgets","change_style_light":"Light","change_layout_restoreLayout":"Restore previous layout","add_content_data_viewer":"Data Viewer","add_content_legacyError2":"Content cannot be added to pages with legacy layouts. Assign a layout template before continuing.","menu_unselected_text":"press enter to browse this category","utb_style":"Style","shelf_session_timeout":"Your session has timed out. Log in to continue.","change_layout_label":"Layouts","add_content_cancel":"Cancel","utb_projectmenu_manageprojectdesc":"Manage the selected project","change_style_light_blue":"Light Blue","utb_live_edit":"Live Edit Mode","change_style_greyStyle":"Grey Stripes","utb_save_errors":"There were errors saving the page","change_style_lightGreyStyle":"Light Grey","change_layout_2RowDesc":"This layout has two rows stacking the portlets in a grid.","utb_projectmenu_nofavoriteprojects":"No favorite projects available","utb_overview_more_mappings":"[${0} more]","change_layout_col3CenterDesc":"This layout has two side bars with the main content between them.","change_style_black":"Black","mashup_hub_category_label":"Mashups","change_style_lightGreenStyle":"Light Green","utb_cannot_submit_page_desc":"The page cannot be submitted because the service to do so was not available in the page feed contents.","new_categoryLabel":"New","add_content_launchLabel2":"Content","add_content_feedReader":"Feed Reader","utb_projectmenu_editmode":"Edit","utb_analytics":"Analytics","utb_layout_noChange":"The layout cannot be changed when an item is maximized","add_content_launchLabel":"Add Content","utb_project_mode_desc":"Content changes are added into this project","shelf_saving":"Your changes are being saved...","utb_default_project_template":"Default project template","utb_projectmenu_approveprojectdesc":"Approve the selected project","new_wcm_addWiki":"Add wiki to page","new_wcm_wcmNotCopied":"A WCM library is not finished being copied.","add_content_legacyError":"Content cannot be added to pages with legacy layouts. Assign a layout, and save your changes to use this feature.","shelf_badDatastoreError":"${0} cannot be loaded because the datastore for this content source is undefined.","add_content_close":"close","shelf_bundleUndefined":"The resource bundle ${0} could not be found","utb_projectmenu_approve_with_comments_headline":"Approve Project:","utb_projectmenu_allprojects":"All Projects","shelf_submitSearch":"submit search","change_style_blueStyle":"Blue Lights","utb_projectmenu_projectactionsdesc":"Actions that can be applied to the selected project","utb_projectmenu_editmodepublishedsitedesc":"Launch the published site in edit mode","utb_projectmenu_withdrawprojects":"Withdraw from Review","utb_overview_community":"Community:","change_style_mojo":"Mojo","menu_selected_text":"currently selected category","shelf_saveAndExit":"Save & Exit","change_layout_col3Center":"3 column center","add_content_rss":"RSS","utb_no_edit_page_permission":"You don't have permission to edit this page.","change_layout_col2Left":"2 column left","add_content_widgetActions":"Component options","change_style_gold":"Gold","add_content_feedspace":"Feedspace","utb_projectmenu_submitproject":"Submit for Review","utb_projectmenu_publishedsite":"Published Site","shelf_closeDialog":"Close dialog","change_layout_maximizedError2":"The layout cannot be changed while there is an item maximized.","change_style_launchLabel":"Change Style","new_feed_enterUrl":"Specify a valid URL.","utb_preview":"Preview","add_content_restrictedContentError":"${0} is not allowed on this page","add_content_chart":"Chart","utb_overview_link_manage":"Manage","change_layout_launchLabel":"Change Layout","utb_projectmenu_viewmodepublishedsitedesc":"Launch the published site in view mode","new_generic_add":"Add ${0} to page","utb_create_new_project":"Create a new project:","utb_overview_no_items":"No items to display.","utb_approve":"Approve","new_wcm_wcmNameTaken":"This name is already being used. Try a different name.","change_layout_templateSyncError":"Error with layout template sync.","shelf_socialCategory":"Social Content","new_wcm_blogLibraryDescription":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","shelf_searchSocial":"Search Social","utb_project_action_failed":"Cannot execute project action","utb_project_mode":"Project Edit:","add_content_addToPage":"Add to page","add_content_add":"Add","shelf_unspecified":"Unspecified","add_content_untitled":"Untitled","add_content_tags":"tags: ${0}","change_style_defaultStyle":"Default","change_layout_col2Right":"2 column right","utb_overview_workflow_stage":"Workflow Stage:","change_style_twilight":"Twilight","shelf_feedError":"${0} cannot be loaded. Check the internet connection and proxy settings.","utb_approve_project":"Approve Project","add_content_desc":"Object Palette - Drag and Drop Portlets, Widgets, and Content to the page","utb_projectmenu_reject_with_comments":"Project Rejection","utb_overview_name":"Name:","mashup_hub_components_label":"Components","utb_cannot_reject_page":"Cannot reject the page.","utb_result_error":"Error loading item","category_web_content":"Web Content","utb_projectmenu_allprojectsdesc":"Select from all projects","change_layout_1Row2ColDesc":"This layout has two rows. The second row contains two unequal columns.","utb_public_page":"Public Page","utb_projectmenu_norecentprojects":"No recent projects available","add_content_notLoaded":"This item has not yet loaded.","add_content_ok":"OK","shelf_searchToolsCategory":"Search Tools","utb_save_draft":"Save Draft","change_style_carbon":"Carbon","shelf_searchAll":"Search All","utb_content":"Content","change_style_orangeStyle":"Orange","utb_save_changes":"Save changes","detail_dialog_instruction_text":"press enter to see details dialog","utb_projectmenu_approvalcomments_required":"Required","utb_projectmenu_favoriteprojects":"Favorite Projects:","utb_undo":"Undo","shelf_menu":"Menu","shelf_searchNew":"Search New","new_wcm_blogLibraryDesc":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","add_content_maximizedError2":"Content cannot be added to the page while there is an item maximized.","change_style_launchLabel2":"Style","utb_manage_project":"Manage Project","utb_reject_project":"Reject Project","utb_no":"No","utb_layout_noChange_desc":"Please minimize or restore the maximized content before proceeding to change the layout of the page.","utb_projectmenu_viewmodedesc":"Launch the project in view mode","change_layout_col2Equal":"2 column equal","shelf_configError":"Error reading configuration file or processing its content.","utb_nm_error":"Cannot save the navigation model","change_layout_save_warning":"The layout is not applied until you save the page.","change_style_pinkStyle":"Pink","utb_page_rejected":"The page has been rejected.","add_content_nested_data_viewer":"Nested Data Viewer","change_style_contemporary":"Contemporary","utb_projectmenu_manageproject":"Manage","utb_show_min_toolbar":"Show minimized toolbar","change_style_dark":"Dark","utb_projectmenu_loading":"Loading projects...","utb_projectmenu_approveproject":"Approve","change_layout_custom":"Custom Layout","shelf_jumpTo":"Jump to page","new_feed_enterTitle":"Specify a title.","change_layout_1Row3Col":"1 grid 3 column equal","utb_edit_page_condition":"To edit this page, you must","utb_content_noAdd2":"Content cannot be added to legacy pages","add_content_details":"Details","shelf_searchFeeds":"Search Feeds","new_wcm_addBlog":"Add blog to page","add_content_selectRenderer":"Select how to display the content","utb_page_not_in_draft_state":"You cannot edit this page because the page is no longer in a draft state.","utb_toggle_toolbar":"toggle the toolbar","utb_projectmenu_newproject":"New Project","utb_more":"More","utb_revert":"Revert","utb_project_action_success":"Your action was successfully executed.","utb_workflow":"Workflow","add_content_noPreviewSaved1":"To display this item,","change_style_desc":"Style Palette - Click a style to apply it to the page","add_content_noPreviewSaved2":"save","add_content_noPreviewSaved3":"the page.","utb_save_message":"There are unsaved changes on this page. What do you want to do?","utb_open_project_menu":"launch the project menu","new_blog_copyWcmLibrary":"Your blog is being created...","utb_overview_web_content":"Web Content:","utb_must_be_in_project":"To edit this page, you must be in a project.","mashup_hub_iwidgets_label":"Widgets","utb_end_preview":"Stop Previewing","utb_next_stage":"Next Stage","change_layout_col2RightDesc":"This layout has one side bar on the left with the main content on the right.","add_content_maximizedError":"Content cannot be added to the page while there is a portlet in maximized mode.","utb_customizing_your_page":"You are customizing your page. Changes are only visible to you.","new_wcm_wiki":"Wiki","utb_preview_as_unauthenticated_user":"Preview as unauthenticated user","utb_overview_text_tomorrow":"Tomorrow","add_content_missingRendererError":"Could not find the specified renderer.","change_layout_TopCol3ColDesc":"This layout has two stacked columns. The bottom column contains three unequal columns.","utb_overview_link_view_all":"View all","utb_projectmenu_withdrawprojectdesc":"Withdraw the selected project from review","no_web_content_mapping_desc":"The current page does not have a page content mapping. Please edit the page properties and set a default content mapping.","shelf_hideHiddenContainers":"Hide content","add_content_portlets":"Portlets","change_style_brown":"Brown","shelf_bundleKeyUndefined":"The key ${0} was undefined in the resource bundle ${1}","utb_overview_edit_title":"Edit \"${0}\"","add_content_closeDialog":"Close this dialog","change_layout_maximizedError":"The layout cannot be changed while there is a portlet in maximized mode.","change_layout_col3Equal":"3 column equal","add_content_feed_reader":"Feed Reader","new_wcm_createWcm":"Create WCM Library","utb_open_toolbar":"Open the toolbar","shelf_searchAdminCategory":"Search Administration","utb_discard_project":"Discard Project Draft","utb_projectmenu_noprojectsavailable":"None","shelf_previous":"Previous","new_wcm_feedDescription":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","utb_preview_as_user":"Preview as User","shelf_loading":"Loading...","shelf_page":"Page ${0} of ${1}","utb_project_add_to_favorites":"Add to favorites","change_layout_1Row2Col":"1 grid 2 column unequal","new_feed_title":"Title","change_layout_col2EqualDesc":"This layout has two columns each taking up 50% of the width.","utb_workflow_state_draft":"Draft","new_feed_addFeed":"Add feed to page","change_layout_customDesc":"This layout is a customized T-shaped layout.","utb_new_project_from_template":"New project from:","utb_workflow_state_pending_publish":"Pending publish","utb_edit":"edit","change_layout_desc":"Layout Palette - Click a layout and apply it by saving the page","utb_projectmenu_editmodedesc":"Launch the project in edit mode","change_layout_templateSyncConfirm":"Are you sure you want to sync the layout for this page? All personalizations will be lost.","new_feed_url":"URL","shelf_searchCollabCategory":"Search Collaboration","utb_publish":"Publish","shelf_search":"Search ${0}","change_layout_2Row":"2 grid","change_style_green":"Green","shelf_next":"Next","utb_customizing_this_page":"You are customizing this page. Changes are only visible to you.","utb_yes":"Yes","no_web_content_mapping":"Web Content cannot be added to the page","utb_submit_page_review":"Submit Page for Review","utb_launch_selector":"launch project selector","utb_end_results":"No more results","change_style_blue":"Blue","add_content_all":"All","shelf_communicationsCategory":"Communications","add_content_noPreview":"This item does not support preview","utb_live_edit_desc":"These changes affect everybody","utb_cannot_create_draft":"Cannot create a draft version of the page.","utb_discard_changes":"Discard changes","utb_partClose_toolbar":"Close the statusbar","utb_submit_project":"Submit Project for Review","change_layout_templateSyncLong":"Update the layout of this page by syncing with the template from which it was based. Note that personalizations made to this page will be lost.","utb_projectmenu_projectactions":"Project Actions","utb_projectmenu_projects":"Projects:","shelf_searchWidgets":"Search Widgets","utb_cannot_load_page":"An unexpected error occurred loading the page. The page may be corrupted. Contact your administrator to attempt a resynchronization.","shelf_toolsCategory":"Tools","new_wcm_blogDesc":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_projectment_no_comment_provided":"This project requires a comment.","shelf_saveChanges":"Save","utb_close_toolbar":"Close the toolbar","utb_projectmenu_rejectproject":"Reject","change_layout_templateSync":"Sync assigned layout","utb_cannot_publish_page":"Cannot publish the page for review","shelf_close":"close shelf","utb_layout_noChange2":"The layout cannot be changed on legacy pages","add_content_label":"Content","change_style_greenStyle":"Green Waves","new_wcm_createGeneric":"Create ${0}","utb_overview_loading_content":"Loading content...","new_blog_library_copyWcmLibrary":"Your blog library is being created...","change_style_metal":"Metal","utb_projectmenu_rejectcomments":"Rejection Comments","add_content_noPreviewSaved":"To display this item, save the page.","new_createCategory":"Create","utb_information_message":"Information","shelf_serverError":"Internal server error.","utb_min_toolbar":"Minimize the toolbar","utb_wm_error":"Cannot save the widget model","utb_projectmenu_recentprojects":"Recent Projects:","utb_projectmenu_reject_with_comments_headline":"Reject Project:","new_wcm_blog":"Blog","utb_overview_text_yesterday":"Yesterday","utb_project":"Project","new_portalCategory":"Portal","utb_reject":"Reject","utb_page_actions":"Page Actions","new_portletsCategoryLabel":"Portlets","utb_overview_dots":"...","utb_create_draft":"create a draft","shelf_all":"All","add_content_browseContent":"Browse Content","change_layout_TopCol3Col":"Top column 3 column center","menu_back":"back","generic_browse":"Browse ${0}","new_wcm_addBlogLibrary":"Add blog library to page","utb_show_hidden":"Show Hidden Content","utb_hide_hidden":"Hide Hidden Content","change_style_missingStyleError":"The specified style does not exist","shelf_untitled":"Untitled","shelf_searchPortlets":"Search Portlets","change_style_silver":"Silver","utb_page_submit_wait":"Please wait while your page is being submitted...","utb_cannot_submit_page":"Cannot submit the page for review","shelf_showHiddenContainers":"Show hidden content","utb_partOpen_toolbar":"Open the statusbar","selection_instructions":"press enter to select","new_wcm_wikiDescription":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_layout":"Layout","add_content_rating":"rating: ${0}","change_style_visionary":"Visionary","new_wcm_blogLibrary":"Blog Library","change_style_red":"Red","new_wiki_copyWcmLibrary":"Your wiki is being created...","project_expired":"The current project is no longer available. Click OK to be redirected.","utb_wcm_auth":"Web Content Authoring","add_content_lastMod":"Last modified: ${0}","change_style_browseStyles":"Browse Styles","utb_overview_project_content":"Project Content","shelf_searchCommunications":"Search Communications","utb_close_project_menu":"close the project menu","add_content_addContentError":"Error adding content to the page.","utb_overview_link_read":"Read","change_style_natural":"Natural","change_style_modern":"Modern","add_content_noRating":"no rating","utb_projectmenu_rejectprojectdesc":"Reject the selected project","utb_project_action_wait":"Please wait while your action is being executed...","shelf_noResults":"No results","shelf_searchGadgets":"Search Gadgets","change_layout_TopCol2ColDesc":"This layout has two stacked columns. The bottom column contains two unequal columns.","utb_projectmenu_approve_with_comments":"Project Approval","utb_projectmenu_approvalcomments_optional":"Optional","utb_toggle_statusbar":"toggle the status bar","utb_projectmenu_noprojects":"No projects available","change_style_orchid":"Orchid","shelf_adminCategory":"Administration","mashup_hub_feeds_label":"Feeds","change_style_restoreStyle":"Restore previous style","new_wcm_nameInvalid":"Name must contain at least one alphanumeric (a-zA-Z0-9) character. Try a different name.","utb_last_project":"Open last project:","shelf_unsavedChanges":"The customization shelf has unsaved changes.","change_style_label":"Styles","add_content_addSearch":"Add search results to page","utb_submit_review":"Submit for Review","new_wcm_blogDescription":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_project_add_to_favorites_desc":"Add the new project to the list of favorite projects","change_layout_launchLabel2":"Layout","utb_overview_link_goto":"Go to","utb_projectmenu_approvalcomments":"Approval Comments","change_layout_browseLayouts":"Browse Layouts","change_style_white":"White","change_style_purpleStyle":"Purple","new_creatableCategory":"Creatable","utb_overview_none":"None","utb_overview":"Overview","utb_projectmenu_publishproject":"Publish","utb_workflow_state_published":"Published","utb_end_preview_as":"Stop Previewing as","utb_projectmenu_projectactionsfor":"Actions for","utb_project_publish_failed":"Project failed to publish. Open the manage project view for more details.","utb_private_page":"Private Page","change_layout_col1Desc":"This layout has one column taking up 100% of the available space.","new_wcm_feed":"Feed","change_layout_TopCol2Col":"Top column 2 column unequal","new_feed_feedDesc":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","change_layout_col1":"1 column","shelf_searchCreate":"Search Create","new_wcm_wikiDesc":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_cannot_approve_page":"Cannot approve the page.","utb_projectmenu_viewmode":"View","utb_create_draft_wait":"Please wait while your draft version of the page is being created.","change_style_yellow":"Yellow","utb_overview_text_today":"Today","create":"Create","utb_projectmenu_newprojectdesc":"Create a new project","utb_page_approved":"The page has been approved.","utb_projectmenu_publishprojectdesc":"Publish the selected project","change_layout_col2LeftDesc":"This layout has one side bar on the right with the main content on the left.","utb_content_noAdd_desc":"Please minimize or restore the maximized content before proceeding to add more items to the page.","utb_proceed_discard":"This will reverse all changes made since you last saved. Proceed?","new_wcm_name":"Name","shelf_customize":"Customize","change_style_slate":"Slate","utb_overview_friendly_name":"Friendly Url:","change_layout_1Row3ColDesc":"This layout has two rows. The second row contains three equal columns.","utb_content_noAdd":"Content cannot be added when an item is maximized","shelf_collabCategory":"Collaboration","utb_information":"information","utb_project_create_wait":"Please wait while your project is being created...","utb_overview_page_properties":"Page Properties","utb_unsaved_changes_prompt":"There are unsaved changes on this page. Click OK to save your changes. Click Cancel to discard your changes.","new_wcm_wcmNameInvalid":"Names may contain only alphanumeric (a-zA-Z0-9) characters, spaces, or any of the following characters: \" $ - _ . ! ( ) ,.","utb_overview_link_edit":"Edit","shelf_hiddenContainers":"Hidden Content","utb_more_actions":"More Actions","utb_projectmenu_submitprojectdesc":"Submit the selected project for review","add_content_submit":"Submit","change_layout_col3EqualDesc":"This layout has three columns each taking up 33% of the width."};dojo.provide("com.ibm.bundles.nls.Theme");com.ibm.bundles.nls.Theme._built=true;dojo.provide("com.ibm.bundles.nls.Theme.en");com.ibm.bundles.nls.Theme.en={"theme_choose_skin":"Choose Skin","page_goTo_csa":"Switch to Client-Side Mode","theme_hiddenContentDesc":"Place content into the area below to prevent it from displaying when the page is viewed.","space_description":"Space","edit_wires_title":"Edit Wires","page_force_ssa_link":"Use server side mode.","exportSpace_title":"Export Space","layout_renderingError":"An error occurred rendering the assigned layout.","tagAndRate_description":"Tagging and Rating","site_promotion_title":"Site Promotions...","rate_title":"Rate...","theme_edit_wiring":"Edit Wiring...","theme_maximize":"Maximize","close_analytics_title":"Close Analytics Reports","theme_go_to_edit":"Go to Edit mode","dnd_not_instantiated":"Drag and drop could not be instantiated","theme_config_control":"Configure...","skin_show_titlebar":"Show title bar","catalog_title":"Catalog","theme_wire_widget":"Wire Widget","dnd_disabled":"Drag and drop is disabled","createFeed_title":"Create New Feed...","statusbar_messages_available":"${0} messages are available for review","page_title":"Page","move_left":"Move Left","layout_error_contactAdmin":"If the problem persists, contact your administrator.","page_analytics_reports_description":"Analytics Reports for Pages","embedPage_description":"Display on a Web Page","browseTags_description":"Browse Tags","close_analytics_description":"Close Analytics Reports","theme_actions_menu":"Actions Button","theme_close_shelf_help":"Button will close customize shelf","createSpace_title":"Create a New Space","editPageLayout_description":"Edit Page Layout","theme_sign_up":"Sign Up","page_goTo_ssa":"Switch to Server-Side Mode","theme_restore":"Restore","statusbar_items_available":"${0} items are available for review","other_description":"Other","theme_move":"Move...","layout_missingError":"The assigned layout does not exist.","statusbar_show_details":"Show Details","analytics_description":"Analytics","a11y_skip_portlet":"Skip to next portlet","dnd_copy_failed":"An error occurred copying the resource.","layout_resizer":"Layout Resizer","theme_move_page":"Move Page","dnd_locked_container":"Cannot move a resource to a locked container.","advanced_description":"Advanced","shareSpace_title":"Share Space","statusbar_warning":"Warning","context_portlet_menu_renderingError":"An error occurred rendering the portlet menu.","editPage_description":"Edit Page","exportSpace_description":"Export Space","removePage_title":"Remove Page","theme_remove_page":"Are you sure you want to remove this page and all of its children?","move_down":"Move Down","viewSource_title":"View Source","create_child_page_link":"Click here to create a child page.","layout_error_explanation":"This could be a result of an error during the page creation process, manual changes made to the page layout, or the actions of an Administrator.","theme_global_page_closing_non_active":"You are trying to close a global page that is not currently open.","theme_hide_portlet":"Hide Portlet","publishPage_description":"Publish Page","sharePage_title":"Share Page...","theme_more_pages":"More Pages","theme_display_shelf_help":"Button will display customize shelf below","theme_refresh_page":"Refresh Page","io_insufficient_permissionsError":"There are insufficient permissions to perform the requested operation.","editPageLayout_title":"Edit Page Layout","a11y_skip_widget":"Skip to next widget","move_up":"Move Up","theme_add_pages_shared":"Add Pages Shared with Me","theme_help":"Help","deleteSpace_title":"Delete Space","theme_complementary_content":"Complementary Content","theme_login":"Log In","theme_global_page_active":"The global page is currently active. Close the global page before continuing.","theme_hiddenControl":"hidden","removeFromFav_title":"Remove form Favorites","page_description":"Page","theme_additional_actions":"Additional Actions","theme_refresh_description":"Refresh the page to show the most recent information.","page_save_operation_not_complete":"A save operation to the server has not yet completed.","theme_remove_page_name":"Are you sure you want to remove the page ${0} and all of its children?","space_title":"Space","removeSharedPages_title":"Remove Page","statusbar_multiple":"Multiple Messages","sharing_description":"Share","statusbar_hide_details":"Hide Details","tagAndRate_title":"Tagging and Rating","deleteSpace_description":"Delete Space","sharing_title":"Share","page_initError":"An error occurred initializing the page.","theme_menu":"Menu","assignPagePermissions_description":"Assign Page Permissions","statusbar_clear":"Clear","theme_more_actions":"More Actions","newSiblingPage_title":"New Sibling Page...","widgetBuilder_title":"Create a New Widget...","currently_selected":"currently selected","theme_edit_settings_portal":"Edit Shared Settings...","createFeed_description":"Create New Feed","assignPagePermissions_title":"Assign Page Permissions","statusbar_error":"Error","site_promotion_description":"Add this Page to a Site Promotion","createSpace_description":"Create a New Space","theme_global_page_cannot_close":"The global page cannot be closed.","browseTags_title":"Browse Tags","ally_display_actions_menu":"Display actions menu","theme_delete":"Delete","theme_confirm_leave_edit":"Your changes have not been saved. Are you sure you want to leave Edit mode?","dnd_move_failed":"An error occurred moving the resource.","deletePage_title":"Delete Page","theme_share":"Share","movePage_description":"Move Page","aria_edit_mode":"Going to Edit mode. Options will be displayed below in the toolbar.","theme_logout":"Log Out","theme_customize":"Customize","generic_tag_description":"Add this Page to an Analytics Tag","deletePage_description":"Delete Page","openCatalog_title":"Open Catalog as a New Page","theme_edit_my_profile":"Edit My Profile","newSiblingPage_description":"New Sibling Page","edit_wires_description":"Add, modify, or remove wires.","theme_go_to_view":"Go to View mode","private_public_modelError":"Cannot place a public resource under a private resource.","statusbar_info":"Information","theme_edit_settings":"Edit Settings...","theme_view_wiring":"View Wiring Graph","a11y_focus_titlebar":"Focus will be moved to the title bar.","shareSpace_description":"Share Space","aria_view_mode":"Going to view mode.","openCatalogInDlg_description":"Open Catalog in a Dialog Box","setAsHomeSpace_title":"Set As Home Space","theme_global_page_already_opened":"The global page is already opened.","theme_accountSetting":"Settings","widgetBuilder_description":"Create a New Widget","edit_description":"Edit","theme_delete_page":"Are you sure you want to delete this page and all of its children?","theme_actions":"Actions","layout_error_mismatch":"The assigned layout does not match the actual page layout.","removePage_description":"Remove Page","theme_share_this_page":"Share this Page","a11y_skip_region":"Skip to next region","theme_viewWireGraph":"View Wiring Graph","context_page_menu_renderingError":"An error occurred rendering the page menu.","skin_hide_titlebar":"Hide title bar","theme_delete_page_name":"Are you sure you want to delete the page ${0} and all of its children?","editSpace_description":"Edit Space Settings","createDataMashup_title":"Create Data Mashup...","openCatalog_description":"Open Catalog as a New Page","addSharedPages_description":"Add Shared Pages","removeSharedPages_description":"Remove Page","theme_impersonation":"Impersonate","theme_hide":"Hide","advanced_title":"Advanced","portlet_analytics_reports":"Portlet Reports","embedPage_title":"Display on a Web Page...","other_title":"Other","layout_error_symptoms":"Until this problem is fixed, attempts to customize this page by adding content or changing the layout may not work properly.","theme_hide_widget":"Hide Widget","editPage_title":"Edit Page","a11y_layout_resized_pixels":"The left container is set to ${0} pixels and the right container is set to ${1} pixels.","io_serverError":"Internal server error.","theme_minimize":"Minimize","no_content_node":"This page does not support content.","theme_display":"Display","sharePage_description":"Share Page","page_analytics_reports":"Page Reports","statusbar_status_error":"A runtime error occurred","theme_menu_cannot_render":"Menu cannot be rendered.","createDataMashup_description":"Create Data Mashup","layout_error_heading":"Error with the Page Layout","layout_error_tryRecreate":"Try deleting the page and creating it again.","generic_tag_title":"Analytics Tags...","portlet_analytics_reports_description":"Analytics Reports for Portlets","tag_title":"Tag...","theme_rename":"Rename...","a11y_display_menu":"Display menu","theme_personalize_control":"Personalize...","catalog_description":"Catalog","io_missingResource":"The requested resource does not exist.","openCatalogInDlg_title":"Open Catalog in a Dialog Box","move_right":"Move Right","theme_websphere_portal":"IBM WebSphere Portal","publishPage_title":"Publish Page...","tag_description":"Tag","theme_back":"Back","theme_resize":"Resize...","a11y_show_focus_titlebar":"Show title bar. Focus will be moved to the title bar.","page_force_ssa_msg":"This page contains one or more portlets that do not support client-side mode.","theme_share_page":"Share Page","theme_refresh":"Refresh","rate_description":"Rate","editPageProperties_title":"Edit Page Properties...","theme_global_page_not_opened":"The global page is not open.","editPageProperties_description":"Edit Page Properties","statusbar_print":"Print","newChildPage_title":"New Child Page...","setAsHomeSpace_description":"Set As Home Space","a11y_layout_resized":"The left container is set to ${0} and the right container is set to ${1}.","io_networkError":"An error occurred communicating with the server.","addSharedPages_title":"Add Shared Pages...","viewSource_description":"View Source","analytics_title":"Analytics","editSpace_title":"Edit Space","a11y_skip_content":" link using access key S.","duplicateSpace_description":"Duplicate Space","newChildPage_description":"New Child Page","duplicateSpace_title":"Duplicate Space","a11y_layout_resizer":"Use the arrow keys to resize the layout containers","a11y_display_user_menu":"Display user menu","removeFromFav_description":"Remove form Favorites","theme_edit_control":"Edit","movePage_title":"Move Page...","edit_title":"Edit"}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("pagebuilder.nls.pb_shelf_base",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.data.CatalogFeedStore"]){dojo._hasResource["com.ibm.data.CatalogFeedStore"]=true;dojo.provide("com.ibm.data.CatalogFeedStore");dojo.declare("com.ibm.data.CatalogFeedStore",[com.ibm.data.CatalogMixin],{searchable:false,items:[],attributes:["id","label","description","thumbnail","definition"],features:{"dojo.data.api.Read":true},label:"",category:"",pageSize:30,valid:true,constructor:function(_1){this.items=[];this.category=_1.category;var _2=com.ibm.mashups.enabler.model.Factory.getCatalogCategoryModel();_2.setStrategy(new com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy(this.pageSize));var _3=_2.find(this.category).start();if(!_3){this.valid=false;return;}var _4=com.ibm.mashups.enabler.context.Factory.getLocalizedContext().getLocale()||"en";this.label=_3.getTitle(_4);var _5=_2.getCatalogEntryModel(_3).iterator();while(_5.hasNext()){var _6=_5.next();this.items.push({"id":_6.getID(),"label":_6.getTitle(_4),"description":_6.getDescription(_4),"thumbnail":_6.getIconURL(),"url":_6.getDefinitionURL()});}},getValue:function(_7,_8,_9){return _7[_8]||_9;},getValues:function(_a,_b){var _c=this.getValue(_a,_b,null);return _c?[_c]:[];},getAttributes:function(_d){return this.isItem(_d)?this.attributes:[];},hasAttribute:function(_e,_f){return _e[_f]?true:false;},containsValue:function(_10,_11,_12){var _13=this.getValues(_10,_11);for(var i in _13){if(_13[i]==_12){return true;}}return false;},isItem:function(_14){for(var i in this.items){if(this.items[i].id==_14.id){return true;}}return false;},isItemLoaded:function(_15){return this.isItem(_15);},loadItem:function(_16){},fetch:function(_17){try{var _18=_17.scope||dojo.global,_19=[],_1a=_17.count,_1b=_17.start;if(!_1b){_1b=0;}if(_17.onBegin){_17.onBegin.call(_18,this.items.length,_17);}if(_1b<this.items.length){if(_1a&&_1a+_1b<=this.items.length){_19=this.items.slice(_1b,_1a);}else{_19=this.items.slice(_1b);}}if(_17.onItem){dojo.forEach(_19,function(_1c){_17.onItem.call(_18,_1c,_17);});}var _1d=_17.onItem?null:_19;if(_17.onComplete){_17.onComplete.call(_18,_1d,_17);}return dojo.mixin(_17,{abort:function(){}});}catch(e){if(_17.onError){_17.onError.call(_18,e,_17);}}},getFeatures:function(){return this.features;},close:function(_1e){},getLabel:function(_1f){if(this.isItem(_1f)){return _1f["label"];}else{return null;}},getLabelAttributes:function(_20){return ["label"];},getSourceLabel:function(){return this.label;},validateSelf:function(){return this.valid;}});}if(!dojo._hasResource["com.ibm.customize.ResultsList"]){dojo._hasResource["com.ibm.customize.ResultsList"]=true;dojo.provide("com.ibm.customize.ResultsList");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dojo.i18n");dojo.declare("com.ibm.customize.ResultsList",[dijit._Widget,dijit._Templated],{source:null,parent:null,searchTerms:[],currRequest:null,size:9,start:0,totalItemCount:0,draggable:false,dndType:"ibmPortalShelfItem",cssClass:"",events:[],secondCssClass:"lotusPaletteWidgetContainer",listHtmlType:"div",templateString:"<div dojoAttachPoint=\"focusNode\" class=\"${cssClass}\">"+"<div class=\"${secondCssClass}\">"+"<${listHtmlType} dojoAttachPoint=\"table\"></${listHtmlType}>"+"</div>"+"<div class=\"lotusPaging\">"+"<div class=\"lotusLeft\" dojoAttachPoint=\"pagingStatus\"></div>"+"<div dojoAttachPoint=\"jumpToLink\" class=\"ibmJumpToLink\"></div>"+"<ul class=\"lotusRight lotusInlinelist\">"+"<li class=\"lotusFirst\" dojoAttachPoint=\"prevLink\"></li>"+"<li dojoAttachPoint=\"nextLink\"></li>"+"</ul>"+"</div>"+"</div>",constructor:function(){this.shelfBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.newCell=function(){};},postMixInProperties:function(){if(!this.parent){this.parent={id:this.id,createLotusMsgNode:function(_21,_22){var err=dojo.create("div",{className:"lotusMessage lotus"+_22,style:{marginRight:"15px"}});var img=dojo.create("img",{src:this.imagePath+"/icon"+_22+".gif",alt:_21});var msg=dojo.create("span",{innerHTML:_21});err.appendChild(img);err.appendChild(msg);return err;},newCell:this.newCell};}},postCreate:function(){this.events.push(dojo.subscribe("/epc/customize/search"+this.parent.id,this,this.changeSearchTerms));this.events.push(dojo.subscribe("/epc/customize/changeSource"+this.parent.id,this,this.changeSource));if(this.source){this.changeSource(this.source);}if(this.draggable){this.setUpDndSource();}},setUpDndSource:function(){var cls=dojo.getObject(ibmPortalConfig.portletDndSource||"com.ibm.pb.dnd.layout.ShelfSource");if(!cls){return;}this.dndSource=new cls(this.table,{creator:ibmPortalConfig.portletDndSource?this.creator:cls.creator,accept:[],singular:true,skipForm:true,copyOnly:true,selfAccept:false,selfCopy:false,copyState:function(){return true;}});this.events.push(dojo.subscribe("/dnd/drop",this,"onDrop"));},makeCellDraggable:function(_23){dojo.addClass(_23,"dojoDndItem dojoDndHandle");var _24=dojo.query(".lotusInner",_23)[0];dojo.addClass(_24,"ibmPortalControl");dojo.attr(_23,"dndType",this.dndType);},creator:function(_25,_26){if(_26=="avatar"){var _27=dojo.dnd.manager().nodes[0];var _28=dijit.byId(_27.id);var _29=(_28)?_28.truncTitleText:"";var _27=dojo.create("div",{className:"ibmPortalShelfAvatar",innerHTML:_29});return {node:_27,data:_25,type:[this.dndType]};}},onDrop:function(_2a,_2b,_2c){if(typeof com.ibm.portal.dnd!="undefined"&&typeof com.ibm.portal.dnd.PORTLET_MEDIATOR!="undefined"){if(com.ibm.portal.dnd.PORTLET_MEDIATOR.currentType==this.dndType){com.ibm.portal.dnd.PORTLET_MEDIATOR.fromShelf=true;var _2d=dijit.byId(_2b[0].id);_2d.apply();}}},changeSearchTerms:function(_2e){this.searchTerms=_2e;this.start=0;this._search();},changeSource:function(_2f){if(!_2f.hub.fetch){this.clear();return;}if(this.currRequest){this.currRequest.abort();}this.source=_2f;this.searchTerms=[];this.start=0;if(_2f.hub.noIcons){dojo.addClass(this.domNode.parentNode,"lotusPlain");}else{dojo.removeClass(this.domNode.parentNode,"lotusPlain");}this._search();},_search:function(){if(this.source.hub==null){this.addMessage("Error",dojo.string.substitute(this.shelfBundle["shelf_badDatastoreError"],[this.source.label]));return;}else{this.setLoading();}this.currRequest=this.source.hub.fetch({queryOptions:{ignoreCase:true},query:{keywords:this.searchTerms},count:this.parent.smallWidget?this.size:null,start:this.start,onComplete:dojo.hitch(this,function(_30){if(this.parent.filterAdd){filterFcn=dojo.hitch(this,function(_31){return this.parent.filterAdd(this.source.hub.mapItem(_31));});_30=dojo.filter(_30,filterFcn);}if(_30.length==0){this.addMessage("Warning",this.shelfBundle["shelf_noResults"]);}else{this.fill(_30);}}),onError:dojo.hitch(this,function(_32,_33){console.error("error loading this category: "+_32);if(_32.status==401){ibm.portal.debug.text("Basic auth 401 found, trigger reload");var _34=dojo.getObject("com.ibm.ajax.auth");if(_34){com.ibm.ajax.auth.authenticationHandler();}else{window.location.reload();}return;}this.clear();this.addMessage("Error",dojo.string.substitute(this.shelfBundle["shelf_feedError"],[this.source.label]));}),onBegin:dojo.hitch(this,function(_35){this.totalItemCount=_35;})});},setLoading:function(){this.clear();this.table.appendChild(document.createTextNode(this.shelfBundle["shelf_loading"]));},addMessage:function(_36,msg){this.clear();var _37=this.parent.createLotusMsgNode(msg,_36);this.table.appendChild(_37);this.start=0;this.totalItemCount=0;},clear:function(){var _38=dojo.query(".lotusPaletteWidget",this.table);dojo.forEach(_38,dojo.hitch(this,function(_39){dijit.byId(_39.id).destroy();}));this.table.innerHTML="";this.pagingStatus.innerHTML="";this.jumpToLink.innerHTML="";this.prevLink.innerHTML="";this.nextLink.innerHTML="";},fill:function(_3a){this.clear();dojo.forEach(_3a,dojo.hitch(this,function(_3b){var _3c=this.parent.newCell(this.source,_3b);if(this.draggable){this.makeCellDraggable(_3c);}this.table.appendChild(_3c);}));this.adjustPagingBar();if(this.draggable&&this.dndSource){this.dndSource.sync();}},prev:function(){this.start=this.start-this.size;this._search();},next:function(){this.start=this.start+this.size;this._search();},jumpTo:function(e){e=dojo.fixEvent(e,e.target);var key=e.keyCode;if(key==dojo.keys.ENTER){var _3d=this.jumpToInput.value;if(_3d.toString().search(/^[0-9]+$/)!=0){return;}if(_3d<1){_3d=1;}var _3e=(_3d-1)*this.size;var _3f=(Math.ceil(this.totalItemCount/this.size)-1)*this.size;this.start=(_3e<_3f)?_3e:_3f;this._search();}},adjustPagingBar:function(){var _40=(this.totalItemCount==0)?0:this.start+1;var _41=this.start+this.size;_41=(this.totalItemCount>_41)?_41:this.totalItemCount;var _42=Math.ceil(_40/this.size);var _43=Math.ceil(this.totalItemCount/this.size);this.pagingStatus.innerHTML=dojo.string.substitute(this.shelfBundle["shelf_page"],[_42,_43]);this.createPrevNode(_40);this.createNextNode(_41);if(this.totalItemCount>this.size){this.createJumpTo(_40);}},createPrevNode:function(_44){if(_44>1){var _45=dojo.create("a",{href:"javascript:void(0)",innerHTML:this.shelfBundle["shelf_previous"]});_45.onclick=this._createPrevNodeEventHandlers().onclick;this.prevLink.appendChild(_45);}else{this.prevLink.appendChild(document.createTextNode(this.shelfBundle["shelf_previous"]));}},_createPrevNodeEventHandlers:function(){return {onclick:dojo.hitch(this,function(){this.prev();return false;})};},createNextNode:function(_46){if(this.totalItemCount>_46){var _47=dojo.create("a",{href:"javascript:void(0)",innerHTML:this.shelfBundle["shelf_next"]});_47.onclick=this._createNextNodeEventHandlers().onclick;this.nextLink.appendChild(_47);}else{this.nextLink.appendChild(document.createTextNode(this.shelfBundle["shelf_next"]));}},_createNextNodeEventHandlers:function(){return {onclick:dojo.hitch(this,function(){this.next();return false;})};},createJumpTo:function(_48){this.jumpToInput=dojo.create("input",{type:"text",value:Math.ceil(_48/this.size),className:"lotusText","id":this.parent.id+"_jumpTo",onfocus:"this.select()"});dojo.connect(this.jumpToInput,"onkeydown",this,this.jumpTo);this.jumpToLink.appendChild(dojo.create("label",{"innerHTML":this.shelfBundle["shelf_jumpTo"],"for":this.parent.id+"_jumpTo"}));this.jumpToLink.appendChild(this.jumpToInput);},destroy:function(){dojo.forEach(this.events,dojo.unsubscribe);this.events=null;this.clear();this.inherited(arguments);}});}if(!dojo._hasResource["com.ibm.customize.SearchBar"]){dojo._hasResource["com.ibm.customize.SearchBar"]=true;dojo.provide("com.ibm.customize.SearchBar");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dojo.i18n");dojo.declare("com.ibm.customize.SearchBar",[dijit._Widget,dijit._Templated],{imagePath:".",searchId:"",searchFieldText:"",searching:true,events:[],publishKeyword:"/epc/customize/search",templateString:"<div dojoAttachPoint=\"focusNode\" class=\"lotusChunk lotusSearch\">"+"<form role=\"search\" aria-labelledby=\"${searchBoxId}\" action=\"\" onsubmit=\"return false\">"+"<label for=\"${searchBoxId}\" class=\"ibmPortalHiddenText ibmHiddenText wpthemeAccess\" dojoAttachPoint=\"searchFieldLabel\">${searchFieldText}</label>"+"<input id=\"${searchBoxId}\" dojoAttachEvent=\"onkeydown:newSearch\" class=\"lotusText\" type=\"text\" value=\"${searchFieldText}\" onfocus=\"this.value='';\" dojoAttachPoint=\"searchField\"/>"+"<span class=\"lotusBtnImg\" title=\"${submitSearchText}\">"+"<input dojoAttachEvent=\"onclick:searchButton\" class=\"lotusSearchButton\" type=\"image\" alt=\"${submitSearchText}\" src=\"${imagePath}/blank.gif\"/>"+"<span class=\"lotusAltText\">${submitSearchText}</span>"+"</span>"+"</form>"+"</div>",constructor:function(){this.bundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.submitSearchText=this.bundle["shelf_submitSearch"];},postMixInProperties:function(){this.searchBoxId=this.searchId+"_search";},postCreate:function(){this.events.push(dojo.subscribe("/epc/customize/changeSource"+this.searchId,this,this.changeInputValue));},enableSearch:function(){if(!this.searching){this.searching=true;dojo.style(this.searchField,"backgroundColor","#FFFFFF");dojo.style(this.searchField,"borderColor","#FFFFFF");this.searchField.removeAttribute("disabled");}},disableSearch:function(){if(this.searching){this.searching=false;dojo.style(this.searchField,"backgroundColor","#CCCCCC");dojo.style(this.searchField,"borderColor","#CCCCCC");dojo.attr(this.searchField,"disabled",true);}},changeInputValue:function(_49){if(_49.hub.searchable){this.enableSearch();}else{this.disableSearch();}if(_49.searchStr){this.searchFieldText=_49.hub.searchable?_49.searchStr:"";}else{this.searchFieldText=_49.hub.searchable?dojo.string.substitute(this.bundle["shelf_search"],[_49.label]):"";}this.searchField.value=this.searchFieldLabel.innerHTML=this.searchFieldText;},newSearch:function(e){e=dojo.fixEvent(e,e.target);var key=e.keyCode;if(dojo.isIE&&key==dojo.keys.ENTER){this.searchButton();}},searchButton:function(){if(this.searching){var _4a=(this.searchField.value==this.searchFieldText)?"":this.searchField.value;var _4b=_4a.split(" ");dojo.publish(this.publishKeyword+this.searchId,[_4b]);}},destroy:function(){dojo.forEach(this.events,dojo.unsubscribe);this.events=null;this.inherited(arguments);}});}if(!dojo._hasResource["com.ibm.customize.Menu"]){dojo._hasResource["com.ibm.customize.Menu"]=true;dojo.provide("com.ibm.customize.Menu");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dojox.fx.easing");dojo.require("dojo.i18n");dojo.declare("com.ibm.customize.Menu",[dijit._Widget,dijit._Templated],{sources:[],choices:{},searchId:"",menuTitle:"Menu",current:null,blankImg:"",selectedText:"currently selected category",unselectedText:"press enter to browse this category",publishKeyword:"/epc/customize/changeSource",templateString:"<div dojoAttachPoint=\"focusNode\">"+"<div role=\"menu\" dojoAttachPoint=\"menuContainer\" class=\"lotusMenu\">"+"<ul dojoAttachPoint=\"list\"></ul>"+"</div>"+"</div>",constructor:function(){this.bundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.menuTitle=this.bundle["shelf_menu"];this.selectedText=" "+this.bundle["menu_selected_text"];this.unselectedText=" "+this.bundle["menu_unselected_text"];},postCreate:function(){this.processSources(this.sources);},processSources:function(_4c){dojo.empty(this.list);if(this.sources.length>0){dojo.forEach(_4c,dojo.hitch(this,function(_4d){this.addLi(_4d);}));if(!_4c[0].categories){this.select(_4c[0]);}else{dojo.publish(this.publishKeyword+this.searchId,[{hub:{searchable:false},label:_4c[0].label}]);}}},addLi:function(_4e){var li=dojo.create("li",{"role":"menuitem","id":this.searchId+"_"+_4e.id});if(_4e.categories){dojo.addClass(li,"lotusMore");}var _4f=this._createLiEventHandlers(_4e);var _50=dojo.create("a",{href:"javascript:void(0)",innerHTML:_4e.label});_50.onclick=_4f.anchorOnclick;li.appendChild(_50);var _51=dojo.create("span",{innerHTML:this.unselectedText,className:"",className:"ibmPortalHiddenText ibmHiddenText wpthemeAccess"});_50.appendChild(_51);dojo.connect(li,"onclick",_4f.liOnclick);this.list.appendChild(li);this.choices[_4e.url]={li:li,span:_51};},_createLiEventHandlers:function(_52){return {anchorOnclick:function(){return false;},liOnclick:dojo.hitch(this,function(){this.select(_52);})};},select:function(_53){if(_53.categories){this.processSources(_53.categories);}else{dojo.publish(this.publishKeyword+this.searchId,[_53]);this.changeHighlighting(_53);}},backOneLevel:function(){this.processSources(this.sources);},changeHighlighting:function(_54){if(_54.categories){return;}if(this.current){dojo.removeClass(this.choices[this.current].li,"lotusSelected");this.choices[this.current].span.innerHTML=this.unselectedText;}dojo.addClass(this.choices[_54.url].li,"lotusSelected");this.choices[_54.url].span.innerHTML=this.selectedText;this.current=_54.url;}});}if(!dojo._hasResource["com.ibm.pb.customize.LotusPaletteContainer"]){dojo._hasResource["com.ibm.pb.customize.LotusPaletteContainer"]=true;dojo.provide("com.ibm.pb.customize.LotusPaletteContainer");dojo.require("dijit.Dialog");dojo.require("dojo.i18n");dojo.declare("com.ibm.pb.customize.LotusPaletteContainer",[dijit._Widget,dijit._Templated],{jsonFile:null,dialog:null,maxLabelLength:16,smallWidget:false,numRows:4,itemLimit:9,label:"",selectedClass:"lotusSelected",imagePath:".",draggable:false,size:null,dndType:"ibmPortalShelfItem",templateString:"<div class=\"lotusui\">"+"<div class=\"lotusPaletteBody\">"+"<div dojoAttachPoint=\"left\" class=\"lotusPaletteNav\"></div>"+"<div dojoAttachPoint=\"center\" class=\"lotusPaletteContent lotusui\"></div>"+"</div>"+"</div>",constructor:function(){this.nlsBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");},postMixInProperties:function(){if(this.smallWidget){this.dialog=new com.ibm.pb.customize.LotusDialog({blankImg:(this.blankImg)?this.blankImg:this.imagePath+"/blank.gif"});this.dialog.closeButtonNode.onclick=this.dialog.closeLinkNode.onclick=dojo.hitch(this,function(){this.dialog.cancel();return false;});}},postCreate:function(){if(this.draggable){dojo.attr(this.domNode,"draggable",null);}},processChange:function(_55){},getSize:function(){if(this.size){return this.size;}var _56=dojo.create("div",{className:"lotusPaletteWidget"});document.body.appendChild(_56);if(_56.currentStyle){marginL=_56.currentStyle["marginLeft"].match(/^\d+/);marginR=_56.currentStyle["marginRight"].match(/^\d+/);}else{if(window.getComputedStyle){marginL=document.defaultView.getComputedStyle(_56,null).getPropertyValue("margin-left").match(/^\d+/);marginR=document.defaultView.getComputedStyle(_56,null).getPropertyValue("margin-right").match(/^\d+/);}}var _57=_56.offsetWidth+marginL*1+marginR*1;this.left.innerHTML=".";var _58=this.center.offsetWidth;this.left.innerHTML="";var _59=Math.floor(_58/_57);dojo.destroy(_56);this.size=_59*this.numRows;return this.size||this.itemLimit;},destroyChildWidgets:function(){if(this.resultsList){this.resultsList.destroy();this.resultsList=null;}if(this.searchBar){this.searchBar.destroy();this.searchBar=null;}if(this.menu){this.menu.destroy();this.menu=null;}this.started=false;this.inherited(arguments);},destroy:function(){this.destroyChildWidgets();this.inherited(arguments);},setupUI:function(){this.processJSON(dojo.hitch(this,this.setupUICallback));},setupUICallback:function(_5a){this.resultsList=new com.ibm.customize.ResultsList({parent:this,size:this.getSize(),draggable:this.draggable,dndType:this.dndType});this.center.appendChild(this.resultsList.domNode);this.searchBar=new com.ibm.customize.SearchBar({searchId:this.id,imagePath:this.imagePath});this.left.appendChild(this.searchBar.domNode);this.menu=new com.ibm.customize.Menu({sources:_5a,searchId:this.id,menuTitle:this.label,blankImg:(this.blankImg)?this.blankImg:this.imagePath+"/blank.gif"});this.left.appendChild(this.menu.domNode);},processJSON:function(_5b){dojo.xhrGet({url:this.jsonFile,handleAs:"json",load:dojo.hitch(this,function(_5c){if(_5c.localizationPackageName&&_5c.localizationBundleName){this.nlsJsonBundle=dojo.i18n.getLocalization(_5c.localizationPackageName,_5c.localizationBundleName);}else{this.nlsJsonBundle=null;}var _5d=_5c.categories;var _5e=[];for(var i=0,l=_5d.length;i<l;i++){if(_5d[i].categories){var _5f=[];var _60=_5d[i].categories;for(var j=0,l2=_60.length;j<l2;j++){var _61=this.processCategory(_60[j]);if(_61){_5f.push(_61);}}if(_5f.length>0){var _62=this.getNlsString(_5d[i].label,this.nlsBundle["add_content_untitled"]);_5e.push({label:_62,categories:_5f});}}else{var _61=this.processCategory(_5d[i]);if(_61){_5e.push(_61);}}}if(this.smallWidget){var _63=function(){if(_5b){_5b(_5e);}};var _64=ibmCfg.themeConfig.categorySources?ibmCfg.themeConfig.categorySources.length:0;if(_64==0){_63();}var _65=0;var me=this;for(var j=0;j<_64;j++){var _66=ibmCfg.themeConfig.categorySources[j];var _67=_66.indexOf(",label:"),_68=_66,_69=null;if(_67>0){_68=_66.substring(0,_67);_69=_66.substring(_67+7);}contribGetArgs={};var _6a=dojo.xhrGet({url:_68.indexOf("/")==0?_68:ibmCfg.themeConfig.themeRootURI+"/"+_68,handleAs:"json-comment-optional",ordinal:_69,load:function(_6b,_6c){var _6d=null;if(_6b.localizationPackageName&&_6b.localizationBundleName){_6d=dojo.i18n.getLocalization(_6b.localizationPackageName,_6b.localizationBundleName);}var _6e=_6b.categories;for(var k=0,l3=_6e.length;k<l3;k++){var _6f=me.processCategory(_6e[k],_6d);if(_6f){var _70=false;if(_6c.args.ordinal){for(var m=0,l4=_5e.length;m<l4;m++){if(_6c.args.ordinal==_5e[m].id){_70=true;_5e.splice(m,0,_6f);break;}}}else{if(!_70){_5e.push(_6f);}}}}_65++;if(_65==_64){_63();}},error:function(_71){console.error(_71);_63();}});}}else{if(_5b){_5b(_5e);}}}),error:dojo.hitch(this,function(_72,_73){console.error("error loading categories: "+_72);if(_73.xhr.status==401){window.location.reload();}var _74=this.createLotusMsgNode(this.nlsBundle["shelf_configError"],"Error");dojo.style(_74,"margin","20px");this.domNode.innerHTML="";this.domNode.appendChild(_74);})});},processCategory:function(_75,_76){var map=dojo.mixin({},_75);if(map.url&&this.createProxyURI){map.url=this.createProxyURI(map.url);}delete map.datastore;delete map.renderers;delete map.label;var hub=new (dojo.getObject(_75.datastore))(map);if(!hub.validateSelf()){return null;}if(_75&&_75.visibilityFn){var _77=dojo.getObject(_75.visibilityFn);if(_77&&dojo.isFunction(_77)&&!_77()){return null;}}if(hub.getSourceLabel()){var _78=hub.getSourceLabel();}else{var _78=this.getNlsString(_75.label,this.nlsBundle["add_content_untitled"],_76);}var _79=this.getNlsString(_75.searchStr,null);return {label:_78,hub:hub,renderers:_75.renderers,url:_75.url,searchStr:_79,id:_75.label};},getNlsString:function(key,_7a,_7b){var _7c=_7b&&_7b[key]?_7b[key]:null;if(!_7c){_7c=this.nlsJsonBundle&&this.nlsJsonBundle[key]?this.nlsJsonBundle[key]:key;}if(_7c&&_7c.length==0){_7c=_7a;}return _7c;},newCell:function(_7d,_7e){var map=_7d.hub.mapItem(_7e);var _7f=(map.label.length>this.maxLabelLength)?map.label.substring(0,this.maxLabelLength)+"...":map.label;if(this.smallWidget){var _80=dojo.hitch(this,function(cID,sID){this.processIntermediateDialogs(map,_7d,_7e,cID,sID);});showDetails=dojo.hitch(this,function(){this.showDetailsDialog(map,_80);return false;});var _81={hub:_7d.hub,item:_7e,map:map,truncTitleText:_7f,imagePath:this.imagePath,apply:_80,showDetails:showDetails};if(_7d.hub.noIcons){var _82=new com.ibm.pb.customize.noIconSmallWidget(_81);}else{var _82=new com.ibm.pb.customize.smallWidget(_81);}}else{var _80=dojo.hitch(this,function(){this.processChange(dojo.mixin(map,{hub:_7d.hub,item:_7e}));});var _82=new com.ibm.pb.customize.largeWidget({map:map,truncTitleText:_7f,imagePath:this.imagePath,apply:_80,current:map.id==this.current});}return _82.domNode;},createLotusMsgNode:function(_83,_84){var err=dojo.create("div",{className:"lotusMessage lotus"+_84,style:{marginRight:"15px"},role:"alert"});var msg=dojo.create("span",{innerHTML:_83});err.appendChild(msg);return err;},changeSelected:function(_85){var _86=dojo.query(".lotusPaletteWidget",this.center),_87=null;dojo.forEach(_86,dojo.hitch(this,function(_88){_87=dijit.byId(_88.id);if(_87){_87.deselect();}}));_87=dijit.byId(_85);if(_87){_87.select();}},processIntermediateDialogs:function(map,_89,_8a,cID,sID){if(_89.renderers.length==0){var _8b=map.takeoverFcn?{submit:dojo.hitch(this,this.processChange),getInfo:dojo.hitch(this,this.getValuesFromDialog),showInfo:dojo.hitch(this,this.showWaitMsgInDialog),submitObj:{hub:_89.hub,item:_8a,sID:sID,cID:cID}}:{};var _8c=dojo.mixin(map,{takeoverObject:_8b,sID:sID,cID:cID,hub:_89.hub,item:_8a});this.processChange(_8c);}else{if(_89.renderers.length==1){var _8d=map.label;var _8c=dojo.mixin(dojo.mixin(map,_89.renderers[0]),{label:_8d,prefsMapFcn:_89.renderers[0].fcn,sID:sID,cID:cID,hub:_89.hub,item:_8a});this.processChange(_8c);}else{var _8e=dojo.create("div");var _8f=dojo.create("h4");var _90=dojo.create("label",{"for":"widgetRendererSelect",innerHTML:this.nlsBundle["add_content_selectRenderer"]});_8f.appendChild(_90);_8e.appendChild(_8f);var _91=dojo.create("select",{id:"widgetRendererSelect"});_8e.appendChild(_91);for(var i=0;i<_89.renderers.length;i++){var _92=dojo.create("option",{innerHTML:this.nlsJsonBundle&&this.nlsJsonBundle[_89.renderers[i].label]?this.nlsJsonBundle[_89.renderers[i].label]:_89.renderers[i].label,value:i});_91.appendChild(_92);}var _93=dojo.hitch(this,function(){this.dialog.cancel();var _94=_89.renderers[_91.value];var _95=map.label;var _96=dojo.mixin(dojo.mixin(map,_94),{label:_95,prefsMapFcn:_94.fcn,sID:sID,cID:cID,hub:_89.hub,item:_8a});this.processChange(_96);});this.dialog.setContent(_8e,this.nlsBundle["add_content_addToPage"],this.nlsBundle["add_content_add"],_93);}}},showDetailsDialog:function(_97,_98){var _99=dojo.create("div");var _9a=dojo.create("h4",{innerHTML:(_97.label)?_97.label:this.nlsBundle["add_content_untitled"]});_99.appendChild(_9a);if(_97.updated){var _9b=dojo.create("p",{innerHTML:dojo.string.substitute(this.nlsBundle["add_content_lastMod"],[_97.updated])});_99.appendChild(_9b);}if(_97.description){var _9c=dojo.create("p",{innerHTML:_97.description});_99.appendChild(_9c);}if(_97.tags&&_97.tags.length>0){var _9d=dojo.create("p",{innerHTML:dojo.string.substitute(this.nlsBundle["add_content_tags"],[_97.tags.join(", ")])});_99.appendChild(_9d);}var _9e=dojo.hitch(this,function(){_98();});this.dialog.setContent(_99,this.nlsBundle["add_content_details"],this.nlsBundle["add_content_addToPage"],_9e);},showWaitMsgInDialog:function(_9f){if(!this.waitingDialog){this.waitingDialog=new com.ibm.pb.customize.LotusWaitingDialog({spinner:builderConfig.builderPath+"/images/loading.gif",message:_9f});}try{this.waitingDialog.show();}catch(e){}return dojo.hitch(this,function(){this.waitingDialog.hide();});},getValuesFromDialog:function(_a0,_a1,_a2,_a3,_a4){var _a5=document.createElement("div");for(var i=0;i<_a0.length;i++){var _a6=dojo.create("h4");var _a7=dojo.create("label",{innerHTML:_a0[i].label,"for":_a0[i].id});var _a8=dojo.create("div",{className:"lotusFormError"});_a0[i].errorDiv=_a8;var _a9="";if(_a0[i].ltr){_a9=" lotusLTR";}var _aa=dojo.create("input",{type:"text",id:_a0[i].id,className:"lotusText"+_a9,value:_a0[i].value});_a0[i].input=_aa;_a6.appendChild(_a7);_a5.appendChild(_a8);_a5.appendChild(_a6);_a5.appendChild(_aa);}if(_a3){_a0[0].errorDiv.innerHTML=_a3;}var _ab=dojo.hitch(this,function(){var _ac=false;var _ad={};for(var i=0;i<_a0.length;i++){if(!_a0[i].input.value.match(_a0[i].regex)){_ac=true;_a0[i].errorDiv.innerHTML=_a0[i].error;}else{_ad[_a0[i].id]=_a0[i].input.value;_a0[i].errorDiv.innerHTML="";}}if(!_ac){this.dialog.cancel();_a4(_ad);}});this.dialog.setContent(_a5,_a1,_a2,dojo.hitch(this,function(){_ab();}));}});dojo.provide("com.ibm.pb.customize.smallWidget");dojo.declare("com.ibm.pb.customize.smallWidget",[dijit._Widget,dijit._Templated],{truncTitleText:"",imagePath:".",map:{},detailDialogInstruction:"press enter to see details dialog",templateString:"<div class=\"lotusPaletteWidget\" dojoAttachPoint=\"lotusPaletteWidget\">"+"<div class=\"lotusInner\">"+"<div class=\"lotusIcon\">"+"<span>"+"<img alt=\"${truncTitleText}\" src=\"${map.thumbnail}\"/>"+"</span>"+"</div>"+"<div class=\"lotusTitle\">"+"<a href=\"javascript:void(0);\" title=\"${map.label}\" dojoAttachPoint=\"titleAnchor\">"+"${truncTitleText}"+"<span class=\"ibmPortalHiddenText ibmHiddenText wpthemeAccess\">${detailDialogInstruction}</span>"+"</a>"+"</div>"+"<a class=\"lotusIcon\" href=\"javascript:void(0)\" title=\"${addToPage}\" role=\"button\" dojoAttachPoint=\"addButton\">"+"<img width=\"16\" height=\"16\" src=\"${blankPath}\" alt=\"${addToPage}\"/>"+"<span class=\"lotusAltText\">+</span>"+"</a>"+"</div>"+"</div>",postMixInProperties:function(){var _ae=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.addToPage=_ae["add_content_addToPage"];this.detailDialogInstruction=_ae["detail_dialog_instruction_text"]||this.detailDialogInstruction;if(!this.map.thumbnail){this.map.thumbnail=builderConfig.builderPath+"/images/generic_widget_icon.gif";}else{this.map.thumbnail=com.ibm.mashups.enabler.utils.EndpointHelper.resolve(this.map.thumbnail);}this.blankPath=this.imagePath+"/blank.gif";},postCreate:function(){this.titleAnchor.onclick=dojo.hitch(this,function(){this.showDetails();return false;});this.addButton.onclick=dojo.hitch(this,function(){this.apply();return false;});},apply:function(){},showDetails:function(){},select:function(){},deselect:function(){},destroy:function(){this.titleAnchor.onclick=null;this.addButton.onclick=null;this.inherited(arguments);}});dojo.provide("com.ibm.pb.customize.noIconSmallWidget");dojo.declare("com.ibm.pb.customize.noIconSmallWidget",[com.ibm.pb.customize.smallWidget],{templateString:"<div class=\"lotusPaletteWidget\">"+"<div class=\"lotusInner\">"+"<div class=\"lotusIcon\"></div>"+"<div class=\"lotusTitle\">"+"<a href=\"javascript:void(0);\" title=\"${map.label}\" dojoAttachPoint=\"titleAnchor\">${truncTitleText}</a>"+"</div>"+"<a class=\"lotusIcon\" href=\"javascript:void(0)\" title=\"${addToPage}\" role=\"button\" dojoAttachPoint=\"addButton\">"+"<img width=\"16\" height=\"16\" src=\"${blankPath}\" alt=\"\"/>"+"<span class=\"lotusAltText\">+</span>"+"</a>"+"</div>"+"</div>"});dojo.provide("com.ibm.pb.customize.largeWidget");dojo.declare("com.ibm.pb.customize.largeWidget",[dijit._Widget,dijit._Templated],{truncTitleText:"",imagePath:".",map:{},current:false,selectedClass:"lotusSelected",hiddenSelectedText:"currently selected for the page",hiddenUnselectedText:"press enter to select",templateString:"<div class=\"lotusPaletteWidget\" dojoAttachPoint=\"addButton\" >"+"<div class=\"lotusInner\">"+"<div class=\"lotusIcon\">"+"<span>"+"<img alt=\"${truncTitleText}\" src=\"${map.thumbnail}\"/>"+"</span>"+"</div>"+"<div class=\"lotusTitle\">"+"<a href=\"javascript:void(0);\" title=\"${map.label}\">"+"${truncTitleText}"+"<span class=\"ibmPortalHiddenText ibmHiddenText wpthemeAccess\" dojoAttachPoint=\"hiddenSelectedTextNode\">${hiddenUnselectedText}</span>"+"</a>"+"</div>"+"</div>"+"</div>",postMixInProperties:function(){if(!this.map.thumbnail){this.map.thumbnail=builderConfig.builderPath+"/images/generic_widget_icon.gif";}else{this.map.thumbnail=com.ibm.mashups.enabler.utils.EndpointHelper.resolve(this.map.thumbnail);}this.hiddenSelectedText=dojo.i18n.getLocalization("com.ibm.bundles","Theme")["currently_selected"]||this.hiddenSelectedText;this.hiddenUnselectedText=dojo.i18n.getLocalization("com.ibm.bundles","Shelf")["selection_instructions"]||this.hiddenUnselectedText;this.id=this.map.id;},postCreate:function(){if(this.current){this.select();}this.addButton.onclick=dojo.hitch(this,function(){this.apply();return false;});},apply:function(){},select:function(){this.current=true;dojo.addClass(this.domNode,this.selectedClass);this.hiddenSelectedTextNode.innerHTML=this.hiddenSelectedText;},deselect:function(){this.current=false;dojo.removeClass(this.domNode,this.selectedClass);this.hiddenSelectedTextNode.innerHTML=this.hiddenUnselectedText;},destroy:function(){this.addButton.onclick=null;this.inherited(arguments);}});} dojo.provide("asa.nls.asa_layer_en");dojo.provide("com.ibm.widgets.nls.DoneCheckDialog");com.ibm.widgets.nls.DoneCheckDialog._built=true;dojo.provide("com.ibm.widgets.nls.DoneCheckDialog.en");com.ibm.widgets.nls.DoneCheckDialog.en={"text_want_to_close_without_saving":"Do you really want to exit without saving your changes?","button_yes":"Yes","text_are_you_sure":"Are you sure?","link_no":"No","title_click_to_close":"Click to close","title_close":"Close"};dojo.provide("com.ibm.portal.analytics.widgets.nls.AnalyticsTagDialog");com.ibm.portal.analytics.widgets.nls.AnalyticsTagDialog._built=true;dojo.provide("com.ibm.portal.analytics.widgets.nls.AnalyticsTagDialog.en");com.ibm.portal.analytics.widgets.nls.AnalyticsTagDialog.en={"label_site_promotion_list":"Site promotions associated with \"${0}\":","title_button_done":"Done with ${0}","label_table_value":"Value","button_done":"Done","label_analytics_tag":"Analytics Tag","button_add":"Add","label_table_name":"Name","title_delete_at_icon":"Delete ${0}(${1})","msg_at_already_exists":"Analytics tag already exists.","title_button_add":"Add this association","table_sum_sp":"List of site promotions.","title_delete_sp_icon":"Delete ${0}","text_sp_pl":"site promotions","label_analytics_tag_list":"Analytics tags associated with \"${0}\":","title_analytics_tag":"analytics tag","table_sum_at":"List of analytics tags.","text_sp_in_project":"You are currently working in a project. Site promotions are not project-aware but will be assigned straight away when clicking 'Done'","label_invalid_illegal_details":"Invalid value: you used illegal characters.","text_sp":"site promotion","title_dialog":"Add \"${0}\" to ${1}","title_name_input_field":"Analytics tag name input field","title_close_button":"Close this dialog","label_site_promotion_plural":"Site Promotions","text_at":"analytics tag","label_invalid_long_details":"Invalid value: you used too many characters.","text_at_pl":"analytics tags","label_analytics_tag_value_input_field":"Analytics tag value:","label_no_at_there_yet":"No analytics tags associated with \"${0}\".","title_value_input_field":"Analytics tag value input field","title_site_promotion_input_field":"Site promotion value input field","label_no_sp_there_yet":"No site promotions associated with \"${0}\".","text_at_in_project":"You are currently working in a project. Analytics tags are not project-aware but will be assigned straight away when clicking 'Done'","label_site_promotion_name_input_field":"Site promotion name:","msg_sp_already_exists":"Site promotion already exists.","label_site_promotion":"Site Promotion","label_analytics_tag_plural":"Analytics Tags","label_analytics_tag_name_input_field":"Analytics tag name:","msg_already_exists":"The ${0} already exists."};dojo.provide("com.ibm.portal.analytics.widgets.nls.AsaOverlay");com.ibm.portal.analytics.widgets.nls.AsaOverlay._built=true;dojo.provide("com.ibm.portal.analytics.widgets.nls.AsaOverlay.en");com.ibm.portal.analytics.widgets.nls.AsaOverlay.en={"msg_no_data_available":"There is no data available for these report parameters.","title_close_report":"Close all analytics reports","msg_wrong_config":"The analytics backend is not properly configured. ","title_more_details":"See more details about this report","msg_wrong_params":"The specified report parameters are incorrect. ","report_type_site":"Site Report","link_more":"more","report_type_portlet":"Portlet Report","msg_loading":"Loading report... ","report_type_page":"Page Report","msg_error":"Error: ","msg_possible_cause":"Possible cause: ","link_details":"Details","title_view_as_table":"View table display","msg_cm_error":"Message from Coremetrics backend: ","msg_no_report_data":"The report you requested could not be retrieved. ","label_close":"Close all","msg_no_data_for_time_frame":"There is no analytics data for the selected timeframe. ","link_less":"less","title_view_as_chart":"View chart display","label_close_report":"Close all analytics reports"}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("asa.nls.asa_layer",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.widgets.ConsoleWrapper"]){dojo._hasResource["com.ibm.widgets.ConsoleWrapper"]=true;dojo.provide("com.ibm.widgets.ConsoleWrapper");dojo.declare("com.ibm.widgets.ConsoleWrapper",[],{_hasLogMethod:false,_hasDebugMethod:false,_hasInfoMethod:false,_hasWarnMethod:false,_hasErrorMethod:false,constructor:function(){if(typeof console=="object"){this._hasLogMethod=(typeof console.log=="function");this._hasDebugMethod=(typeof console.debug=="function");this._hasInfoMethod=(typeof console.info=="function");this._hasWarnMethod=(typeof console.warn=="function");this._hasErrorMethod=(typeof console.error=="function");}else{this.log=function(){};this.debug=function(){};this.info=function(){};this.warn=function(){};this.error=function(){};}},debug:function(_1){if(this._hasDebugMethod){console.debug.apply(console,arguments);}else{this.log.apply(this,arguments);}},error:function(_2){if(this._hasErrorMethod){console.error.apply(console,arguments);}else{this.log.apply(this,arguments);}},info:function(_3){if(this._hasInfoMethod){console.info.apply(console,arguments);}else{this.log.apply(this,arguments);}},log:function(_4){if(this._hasLogMethod){console.log.apply(console,arguments);}},warning:function(_5){if(this._hasWarnMethod){console.warn.apply(console,arguments);}else{this.log.apply(this,arguments);}}});}if(!dojo._hasResource["com.ibm.widgets._Traceable"]){dojo._hasResource["com.ibm.widgets._Traceable"]=true;dojo.provide("com.ibm.widgets._Traceable");dojo.declare("com.ibm.widgets._Traceable",[],{LOGGER:null,LOG_LEVEL:null,LOG_LEVEL_ERROR:1000,LOG_LEVEL_INFO:800,LOG_LEVEL_TRACE:500,LOG_LEVEL_WARNING:900,_consoleWrapper:null,_traceChecker:null,_isSimpleLogging:false,_isLoggable:false,constructor:function(){if(dojo.exists("com.ibm.mashups.enabler.logging.Logger")){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this._isSimpleLoggingisSimpleLogging=false;this.LOG_LEVEL_TRACE=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.LOG_LEVEL_INFO=com.ibm.mashups.enabler.logging.LogLevel.INFO;this.LOG_LEVEL_WARNING=com.ibm.mashups.enabler.logging.LogLevel.WARNING;this.LOG_LEVEL_ERROR=com.ibm.mashups.enabler.logging.LogLevel.SEVERE;}else{if(typeof ibmCfg!="undefined"&&typeof ibmCfg.enablerConfig!="undefined"&&typeof ibmCfg.enablerConfig.traceConfig!="undefined"){this._initConfig(ibmCfg.enablerConfig.traceConfig);}this._isSimpleLogging=true;this._isLoggable=this.isLoggable();this._consoleWrapper=new com.ibm.widgets.ConsoleWrapper();}this.LOG_LEVEL=this.LOG_LEVEL_TRACE;},isTracing:function(){return this.isLogging(this.LOG_LEVEL);},error:function(_6,_7,_8){this.log(this.LOG_LEVEL_ERROR,_6,_7,_8);},info:function(_9,_a,_b){this.log(this.LOG_LEVEL_INFO,_9,_a,_b);},isLoggable:function(){var _c;if(typeof ibmCfg!="undefined"&&typeof ibmCfg.enablerConfig!="undefined"&&typeof ibmCfg.enablerConfig.isDebug!="undefined"){if(!ibmCfg.enablerConfig.isDebug){_c=false;}else{var _d=this._traceChecker;_c=_d&&_d.test(this.declaredClass);}}else{_c=false;}return _c;},isLogging:function(_e){if(this._isSimpleLogging){return this._isLoggable;}else{return this.LOGGER.isLoggable(_e);}},log:function(_f,_10,_11,_12){if(this._isSimpleLogging){this._logSimple(_f,_10,_11,_12);}else{this.LOGGER.log(_f,_10,msg,_12);}},trace:function(_13,_14,_15){var _16=this.isTracing();if(_16){var msg=_14;var _17="";if(_15||(_15===0)||(_15===null)||(_15==="")){if(!dojo.isArray(_15)){_17=_15;}else{if(_15&&_15.length>0){for(var arg in _15){if(_17===""){_17=_17+_15[arg];}else{_17=_17+", "+_15[arg];}}}}msg=msg+" [ "+_17+" ]";}if(this._isSimpleLogging){this._consoleWrapper.debug(this.declaredClass+" "+_13+" : "+msg);}else{this.LOGGER.log(this.LOG_LEVEL,_13,msg);}}},traceEntry:function(_18,_19){if(this._isSimpleLogging){if(this._isLoggable){var msg=" ENTRY";var _1a="";if(_19||(_19===0)||(_19===null)||(_19==="")){if(!dojo.isArray(_19)){_1a=_19;}else{if(_19&&_19.length>0){for(var arg in _19){if(_1a===""){_1a=_1a+_19[arg];}else{_1a=_1a+", "+_19[arg];}}}}msg=msg+" [ "+_1a+" ]";}this._consoleWrapper.debug(this.declaredClass+" "+_18+msg);}}else{var _1b=this.LOGGER.isLoggable(this.LOG_LEVEL_TRACE);if(_1b){this.LOGGER.entering(_18,_19);}}},traceExit:function(_1c,_1d){if(this._isSimpleLogging){if(this._isLoggable){if(_1d||(_1d===0)||(_1d===null)||(_1d==="")){this._consoleWrapper.debug(this.declaredClass+" "+_1c+" EXIT [ "+_1d+" ]");}else{this._consoleWrapper.debug(this.declaredClass+" "+_1c+" EXIT");}}}else{var _1e=this.LOGGER.isLoggable(this.LOG_LEVEL_TRACE);if(_1e){if(typeof _1d==="boolean"){_1d=_1d?"true":"false";}this.LOGGER.exiting(_1c,_1d);}}},warning:function(_1f,_20,_21){this.log(this.LOG_LEVEL_WARNING,_1f,_20,_21);},_initConfig:function(_22){if(_22&&_22.length>0){this._traceChecker=new RegExp(dojo.isArray(_22)?_22.join("|"):_22);}else{this._traceChecker=null;}},_logSimple:function(_23,_24,_25,_26){if(this._isLoggable){if((_26&&!dojo.isArray(_26))||_26===false){_26=[_26];}var _27=_26?dojo.string.substitute(_25,_26):_25;if(_23==this.LOG_LEVEL_ERROR){this._consoleWrapper.error(this.declaredClass+" "+_24+" : "+_27);}else{if(_23==this.LOG_LEVEL_WARNING){this._consoleWrapper.warning(this.declaredClass+" "+_24+" : "+_27);}else{if(_23==this.LOG_LEVEL_INFO){this._consoleWrapper.info(this.declaredClass+" "+_24+" : "+_27);}else{if(_23==this.LOG_LEVEL_TRACE){this._consoleWrapper.debug(this.declaredClass+" "+_24+" : "+_27);}else{this._consoleWrapper.log(this.declaredClass+" "+_24+" : "+_27);}}}}}}});}if(!dojo._hasResource["com.ibm.widgets.TypeAheadComboBox"]){dojo._hasResource["com.ibm.widgets.TypeAheadComboBox"]=true;dojo.provide("com.ibm.widgets.TypeAheadComboBox");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.form.ComboBox");dojo.require("dojo.data.ItemFileWriteStore");dojo.require("dojo._base.xhr");dojo.declare("com.ibm.widgets.TypeAheadComboBox",[dijit._Widget,dijit._Templated,dijit.form.ComboBox,com.ibm.widgets._Traceable],{bIsTraceable:false,parentWidget:"",validationCallback:"",typeAheadFetchDelay:80,validationDelay:80,allowTypeAheadDataCaching:false,typeAheadFetchURL:"",separatorChars:[" ",","],prefix:"",maxResponses:32,_splitRegExp:null,_typeAheadTimerHandle:"",_typeAheadStore:null,_validateTimerHandle:"",_lastUnsuccessfulSearchTerm:"",_lastSuccessfulSearchTerm:"",_responseCache:[],constructor:function(){this.inherited("constructor","com.ibm.widgets.TypeAheadComboBox");this.bIsTracing=this.isTracing();this.hasDownArrow=false;this.autoComplete=false;this.highlightMatch="none";this._splitRegExp=new RegExp("[,| ]");},postMixInProperties:function(){this.inherited("postMixInProperties",arguments);},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}this.inherited("postCreate",arguments);dojo.connect(dojo.byId(this.domNode),"onkeyup",dojo.hitch(this,"onKeyupEvent"));dojo.attr(this.textbox,"title",dojo.attr(this.domNode,"title"));if(this.bIsTracing){this.traceExit(m);}},uninitialize:function(){this.inherited("uninitialize",arguments);clearTimeout(this._validateTimerHandle);clearTimeout(this._typeAheadTimerHandle);},onKeyupEvent:function(_28){var m="onKeyupEvent(evnt)";if(this.bIsTracing){this.traceEntry(m,_28);}var key=_28.keyCode;var _29=dojo.keys;if(this.bIsTracing){this.trace(m,"key",key);this.trace(m,"keys",_29);this.trace(m,"keys.DOWN_ARROW",_29.DOWN_ARROW);}switch(key){case _29.DOWN_ARROW:case _29.END:case _29.HOME:case _29.LEFT_ARROW:case _29.LEFT_WINDOW:case _29.PAGE_DOWN:case _29.PAGE_UP:case _29.RIGHT_ARROW:case _29.RIGHT_WINDOW:case _29.TAB:case _29.UP_ARROW:case _29.ENTER:case _29.ESCAPE:break;default:clearTimeout(this._validateTimerHandle);this._validateTimerHandle=setTimeout(dojo.hitch(this,"validate",true),this.validationDelay);clearTimeout(this._typeAheadTimerHandle);this._typeAheadTimerHandle=setTimeout(dojo.hitch(this,"_requestTypeAheadData"),this.typeAheadFetchDelay);break;}if(this.bIsTracing){this.traceExit(m);}},onTypeAheadDataLoad:function(_2a,_2b){var m="onTypeAheadDataLoad(response, ioArgs)";if(this.bIsTracing){this.traceEntry(m,[_2a,_2b]);}var _2c=this.removePrefix(_2a[0]);if(_2c==this.attr("value")){if(_2a[1].length===0){this._lastUnsuccessfulSearchTerm=_2c;}else{this._lastSuccessfulSearchTerm=_2c;this._pushResponseForSearchTerm(_2a);}this._convertOpenSearchResponse(_2a);}if(this.bIsTracing){this.traceExit(m);}},validator:function(_2d,_2e){var m="validator(value, constraints)";if(this.bIsTracing){this.traceEntry(m,[_2d,_2e]);}var _2f=true;var v=this.attr("value");if(v!==""){var _30=v.split(this._splitRegExp);var _31;for(var i=0;i<_30.length;i++){if(_30[i].length>0){_31=_30[i].match(this.regExp);if(_31!==null&&_31.length>0){if(_31[0].length!=_30[i].length){_2f=false;}}else{_2f=false;}}}if(this.bIsTracing){this.trace(m,"isValid",_2f);this.trace(m,"parent widget",this.parentWidget);}}if(_2f!==true){if(this.validationCallback!==""){this.validationCallback(false);}if(this.bIsTracing){this.traceExit(m,false);}return false;}else{if(this.validationCallback!==""){if(dojo.trim(this.attr("value")).length===0){this.validationCallback(false);}else{this.validationCallback(true);}}if(this.bIsTracing){this.traceExit(m,true);}return true;}},_getEmptyStore:function(){return new dojo.data.ItemFileWriteStore({data:{identifier:"name",items:[]}});},_replaceVariables:function(_32){return _32.replace("${searchTerm}",this.addPrefix(this.attr("value")));},_searchTermHasInvalidChars:function(_33){var m="_searchTermHasInvalidChars(searchTerm)";if(this.bIsTracing){this.traceEntry(m,_33);}for(var i=0;i<this.separatorChars.length;i++){if(_33.indexOf(this.separatorChars[i])>-1){if(this.bIsTracing){this.traceExit(m,true);}return true;}}if(this.bIsTracing){this.traceExit(m,false);}return false;},_searchTermCouldReturnResults:function(_34){var m="_searchTermCouldReturnResults(searchTerm)";if(this.bIsTracing){this.traceEntry(m,_34);}var _35=true;if((this._lastUnsuccessfulSearchTerm!=="")&&(_34.indexOf(this._lastUnsuccessfulSearchTerm)===0)){_35=false;}if(this.bIsTracing){this.traceExit(m,_35);}return _35;},_getResponseForSearchTerm:function(_36){var m="_getResponseForSearchTerm(searchTerm)";if(this.bIsTracing){this.traceEntry(m,_36);}for(var i=0;i<this._responseCache.length;i++){if(this._responseCache[i][0]==_36){if(this.bIsTracing){this.traceExit(this._responseCache[i]);}return this._responseCache[i];}}if(this.bIsTracing){this.traceExit(m,null);}return null;},_pushResponseForSearchTerm:function(_37){var m="_pushResponseForSearchTerm(response)";if(this.bIsTracing){this.traceEntry(m,_37);}if(this._responseCache.length>=this.maxResponses){this._responseCache.shift();}this._responseCache.push(_37);if(this.bIsTracing){this.traceExit(m);}},_requestTypeAheadData:function(){var m="_requestTypeAheadData()";if(this.bIsTracing){this.traceEntry(m);}var _38=this.attr("value");if(this.bIsTracing){this.trace(m,"searchTerm",_38);}if(_38.length>2){if((!this._searchTermHasInvalidChars(_38))&&(this._searchTermCouldReturnResults(_38))){var _39=this._getResponseForSearchTerm(_38);if(_39){this._convertOpenSearchResponse(_39);}else{var _3a=true;if(this.allowTypeAheadDataCaching===true){_3a=false;}if(this.bIsTracing){this.trace(m,"Sending xhrGet http request to portal");this.trace(m,"xhrGet URL",this._replaceVariables(this.typeAheadFetchURL));}this._fetchSearchTerm=_38;var _3b=dojo.xhrGet({url:this._replaceVariables(this.typeAheadFetchURL),load:dojo.hitch(this,"onTypeAheadDataLoad"),handleAs:"json",preventCache:_3a});}}}else{this._typeAheadStore=this._getEmptyStore();dojo.attr(this,"store",this._typeAheadStore);this._startSearchAll();}if(this.bIsTracing){this.traceExit(m);}},_convertOpenSearchResponse:function(_3c){var m="_convertOpenSearchResponse(response)";if(this.bIsTracing){this.traceEntry(m,_3c);}this._typeAheadStore=this._getEmptyStore();if(this.bIsTracing){this.trace(m,"Response Length",_3c[1].length);}for(var i=0;i<_3c[1].length;i++){var _3d=this.removePrefix(_3c[1][i]);if(this.bIsTracing){this.trace(m,"Response[1][i]",_3d);}this._typeAheadStore.newItem({name:_3d});}this._typeAheadStore.save();dojo.attr(this,"store",this._typeAheadStore);this._startSearchAll();if(this.bIsTracing){this.traceExit(m);}},setLocalization:function(_3e,dir){if(_3e!==null){dojo.attr(this.textbox,"lang",_3e);}if(dir!==null){dojo.attr(this.textbox,"dir",dir);}},addPrefix:function(_3f){var _40=_3f;if(this.prefix!==""){_40=this.prefix+_3f;}return _40;},removePrefix:function(_41){var _42=_41;if(this.prefix!==""){_42=_41.slice(this.prefix.length,_41.length);}return _42;}});}if(!dojo._hasResource["com.ibm.portal.analytics.widgets.AsaTypeAheadComboBox"]){dojo._hasResource["com.ibm.portal.analytics.widgets.AsaTypeAheadComboBox"]=true;dojo.provide("com.ibm.portal.analytics.widgets.AsaTypeAheadComboBox");dojo.declare("com.ibm.portal.analytics.widgets.AsaTypeAheadComboBox",[com.ibm.widgets.TypeAheadComboBox],{isNameToBeIncluded:null,_requestTypeAheadData:function(){var _43=this.attr("value");if(_43.length>2){if(this._searchTermCouldReturnResults(_43)){var _44=true;this._fetchSearchTerm=_43;var _45=dojo.xhrGet({url:this._replaceVariables(this.typeAheadFetchURL),load:dojo.hitch(this,"onTypeAheadDataLoad"),handleAs:"json",preventCache:_44});}}else{this._typeAheadStore=this._getEmptyStore();dojo.attr(this,"store",this._typeAheadStore);this._startSearchAll();}},validator:function(_46,_47){var m="validator(value, constraints)";var _48=true;var v=this.attr("value");if(v!==""){var _49=v.match(this.regExp);if(_49!==null&&_49.length>0){if(_49[0].length!=v.length){_48=false;}}else{_48=false;}}if(_48!==true){if(this.validationCallback!==""){this.validationCallback(false,this);}return false;}else{if(this.validationCallback!==""){if(dojo.trim(this.attr("value")).length===0){this.validationCallback(false);}else{this.validationCallback(true);}}return true;}},_replaceVariables:function(_4a){return _4a.replace("${searchTerm}",encodeURIComponent(this.attr("value")));},_convertOpenSearchResponse:function(_4b){this._typeAheadStore=this._getEmptyStore();for(var i=0;i<_4b[1].length;i++){if(this.isNameToBeIncluded(_4b[1][i],this.id)){this._typeAheadStore.newItem({name:_4b[1][i]});}}this._typeAheadStore.save();dojo.attr(this,"store",this._typeAheadStore);this._startSearchAll();}});}if(!dojo._hasResource["com.ibm.widgets.DoneCheckDialog"]){dojo._hasResource["com.ibm.widgets.DoneCheckDialog"]=true;dojo.provide("com.ibm.widgets.DoneCheckDialog");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.Dialog");dojo.declare("com.ibm.widgets.DoneCheckDialog",[dijit._Widget,dijit._Templated,dijit.Dialog,com.ibm.widgets._Traceable],{portal8ThemeUniqueName:"ibm.portal.80Theme",lotusui_id:"dijitDialog_lotusui30_container",lotusui_class:"lotusui30",bIsTracing:false,bundle:null,blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString(),parentWidget:null,callbackOnYes:null,templateString:null,templateString:"<div class=\"lotusDialogBorder lotusui\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\" dojoAttachPoint=\"dialogDiv\">\n <div class=\"lotusDialog\">\n <div class=\"lotusDialogHeader\" dojoAttachPoint=\"titleBar\">\n <h1 class=\"lotusHeading\" dojoAttachPoint=\"headerNode\">\n <span dojoAttachPoint=\"titleNode\">${bundle.text_are_you_sure}</span>\n </h1>\n <a dojoAttachPoint=\"closeButtonNode\" role=\"button\" aria-label=\"${bundle.title_click_to_close}\" href=\"javascript:void(0);\" class=\"lotusDialogClose\" title=\"${bundle.title_click_to_close}\">\n <img src=\"${blankImg}\" alt=\"\" role=\"presentation\"/>\n <span dojoAttachPoint=\"closeText\" class=\"lotusAltText\" title=\"${bundle.title_click_to_close}\">\n X\n </span>\n </a>\n </div>\n <form dojoAttachPoint=\"newPageForm\" action=\"javascript:;\">\n <div dojoAttachPoint=\"containerNode\" class=\"lotusDialogContent\">\n ${bundle.text_want_to_close_without_saving}\n </div>\n <div class=\"lotusDialogFooter\" dojoAttachPoint=\"dialogFooter\">\n <input value=\"${bundle.button_yes}\" class=\"lotusFormButton\" dojoAttachPoint=\"submitDialog\" type=\"submit\"/>\n <input dojoAttachPoint=\"dialogCancel\" class=\"lotusBtn\" type=\"button\" role=\"button\" id=\"cancelTags\" aria-label=\"${bundle.link_no}\" title=\"${bundle.link_no}\" value=\"${bundle.link_no}\" />\n </div>\n </form>\n </div>\n</div>\n",constructor:function(){this.inherited("constructor","com.ibm.widgets.DoneCheckDialog");},postMixInProperties:function(){this.bundle=dojo.i18n.getLocalization("com.ibm.widgets","DoneCheckDialog");},postCreate:function(){var m="postCreate()";if(this.bIsTracing){this.traceEntry(m);}this.inherited(arguments);this.submitDialog.onclick=dojo.hitch(this,function(){this.submit();return false;});this.dialogCancel.onclick=dojo.hitch(this,function(){this.cancelDialog();return false;});this.closeButtonNode.onclick=dojo.hitch(this,function(){this.cancelDialog();return false;});dojo.connect(this.dialogCancel,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey"));dojo.connect(this.closeButtonNode,"onkeypress",dojo.hitch(this,"_triggerOnClickEvtForSpaceKey"));this._fixupMarkupForOneUI();if(this.bIsTracing){this.traceExit(m);}},setCloseCallback:function(_4c){var m="setCloseCallback(method)";if(this.bIsTracing){this.traceEntry(m);}this.callbackOnYes=_4c;if(this.bIsTracing){this.traceExit(m);}},setLoadDataCallback:function(_4d){var m="setLoadDataCallback(method)";if(this.bIsTracing){this.traceEntry(m);}this.callbackOnNo=_4d;if(this.bIsTracing){this.traceExit(m);}},submit:function(){var m="submit()";if(this.bIsTracing){this.traceEntry(m);}this.hide();this.destroy();if(this.callbackOnYes){this.callbackOnYes();}if(this.bIsTracing){this.traceExit(m);}},cancelDialog:function(){var m="cancelDialog()";if(this.bIsTracing){this.traceEntry(m);}this.hide();if(this.bIsTracing){this.traceExit(m);}},_findOrCreateLotusUIDIV:function(){var m="_findOrCreateLotusUIDIV()";if(this._isTracing){this.traceEntry(m);}var _4e=dojo.byId(this.lotusui_id);if(!_4e){_4e=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class},dojo.body());}if(this._isTracing){this.traceExit(m,_4e);}return _4e;},_fixupMarkupForOneUI:function(){var m="_fixupMarkupForOneUI()";if(this._isTracing){this.traceEntry(m);}var _4f="";var _50=true;if((typeof com_ibm_theme_capabilities!=="undefined")&&(typeof com_ibm_theme_capabilities.oneUI=="string")&&(com_ibm_theme_capabilities.oneUI.charAt(0)==="3")){_50=false;}if(_50===true){dojo.addClass(this.dialogDiv,"lotusui");dojo.place(this.closeButtonNode,this.headerNode,"first");dojo.removeClass(this.closeButtonNode,"lotusDialogClose");dojo.addClass(this.closeButtonNode,"lotusBtnImg lotusClose");}else{dojo.removeClass(this.dialogDiv,"lotusui");dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");}if(this._isTracing){this.traceExit(m);}},_triggerOnClickEvtForSpaceKey:function(_51){if(_51){var _52=_51.target;if(_52){var key=_51.charCode;var _53=dojo.keys;if(key===_53.SPACE){if(dojo.isFunction(_52.onclick)){_52.onclick();dojo.stopEvent(_51);}}}}},_getFocusItems:function(_54){var _55=this.containerNode;this.containerNode=_54;this.inherited(arguments);this.containerNode=_55;}});}if(!dojo._hasResource["com.ibm.portal.analytics.widgets.AnalyticsTagDialog"]){dojo._hasResource["com.ibm.portal.analytics.widgets.AnalyticsTagDialog"]=true;dojo.provide("com.ibm.portal.analytics.widgets.AnalyticsTagDialog");dojo.require("dijit.Dialog");dojo.require("dojo.i18n");dojo.require("dojo.string");dojo.declare("com.ibm.portal.analytics.widgets.AnalyticsTagDialog",[dijit.Dialog,dijit._Templated],{resourceID:null,resourceType:null,resourceTitle:null,blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString(),regex:"[^\\<\\>\\(\\)\\[\\]\\#\"\\':]{1,100}",widgetsInTemplate:true,analyticsTags:[],resolver:null,dialogMode:"",resourceURI:"",itemToSave:null,saveErrors:false,_checkDialog:null,_isATDialog:false,_tagsListHasChanged:false,_lotusui_id:"asa_dialog_oneui_wrapper",resourceTypeScheme:"",templateString:"<div class=\"lotusDialogBorder asaTagDialog\" id=\"${resourceID}_analyticsTag\" waistate=\"labelledby-${resourceID}_label\" aria-labelledby=\"${resourceID}_label\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" dojoAttachPoint=\"dialogDiv\">"+"<div dojoAttachPoint=\"analyticsTagForm,containerNode\" class=\"lotusDialog lotusForm2\" action=\"javascript:;\">"+"<div class=\"lotusDialogHeader\">"+"<h1 id=\"${resourceID}_label\" dojoAttachPoint=\"titleNode\" class=\"lotusHeading\" id=\"titleNode\"></h1>"+"<a href=\"javascript:void(0);\" dojoAttachPoint=\"closeButtonNode\" class=\"lotusDialogClose\" aria-label=\"${titleCloseButton}\" title=\"${titleCloseButton}\">"+"<img src=\"${blankImg}\" alt=\"${titleCloseButton}\" aria-label=\"${titleCloseButton}\" />"+"<span aria-label=\"${titleCloseButton}\" title=\"${titleCloseButton}\" class=\"lotusAltText\">X</span>"+"</a>"+"</div>"+"<div class=\"lotusDialogContent\">"+"<div>"+"<div dojoAttachPoint=\"errorDiv\" class=\"lotusMessage2 lotusHidden\" role=\"alert\">"+"<img dojoAttachPoint=\"msgIcon\" alt=\"\" class=\"lotusIcon lotusIconMsgError\" height=\"16\" width=\"16\" src=\"${blankImg}\"/>"+"<span class=\"lotusAltText\" dojoAttachPoint=\"errorSpan\"></span>"+"<div class=\"lotusMessageBody\" dojoAttachPoint=\"analyticsTagError\"></div>"+"</div>"+"<div class=\"lotusFormField\">"+"<label dojoAttachPoint=\"analyticsTagNameInputLabel\" for=\"analyticsTagNameInput\">${atName}</label>"+"<div><select class=\"lotusText\" hasDownArrow=\"false\" role=\"textbox\" required=\"true\" aria-required=\"true\" dojoAttachPoint=\"analyticsTagNameInput, analyticsTagNameInputFocusNode\" name=\"analyticsTagNameInputLabel\" class =\"lotusText\" id=\"analyticsTagNameInput\" dojoType=\"com.ibm.portal.analytics.widgets.AsaTypeAheadComboBox\" invalidMessage=\"\"></select></div>"+"</div>"+"<div class=\"lotusFormField\">"+"<label dojoAttachPoint=\"analyticsTagValueInputLabel\" for=\"analyticsTagValueInput\">${atValue}</label>"+"<div><select class=\"lotusText\" hasDownArrow=\"false\" role=\"textbox\" required=\"true\" aria-required=\"true\" dojoAttachPoint=\"analyticsTagValueInput, analyticsTagValueInputFocusNode\" name=\"analyticsTagValueInput\" class =\"lotusText\" id=\"analyticsTagValueInput\" dojoType=\"com.ibm.portal.analytics.widgets.AsaTypeAheadComboBox\" invalidMessage=\"\"></select></div>"+"</div>"+"<div dojoAttachPoint=\"divAnalyticsTags\" class=\"lotusFormField\">"+"<label id=\"analyticsTagListLabel\" dojoAttachPoint=\"analyticsTagListLabel\"></label>"+"<div dojoAttachPoint=\"analyticsTagList\" aria-labelledby=\"analyticsTagListLabel\" id=\"analyticsTagList\"></div>"+"</div>"+"</div>"+"</div>"+"<div class=\"lotusDialogFooter\" dojoAttachPoint=\"dialogFooter\">"+"<input value=\"${buttonAdd}\" class=\"lotusFormButton\" role=\"button\" title=\"${buttonAdd}\" dojoAttachPoint=\"submitDialog\" type=\"submit\"/> "+"<input value=\"${buttonDone}\" class=\"lotusFormButton\" role=\"button\" dojoAttachPoint=\"dialogCancel\" type=\"button\"/> "+"</div>"+"</div>"+"</div>",postMixInProperties:function(){this.stringSitePromotion=this.bundle.label_site_promotion;this.stringSitePromotions=this.bundle.label_site_promotion_plural;this.stringAnalyticsTag=this.bundle.label_analytics_tag;this.stringAnalyticsTags=this.bundle.label_analytics_tag_plural;this.buttonAdd=this.bundle.button_add;this.buttonDone=this.bundle.button_done;this.titleCloseButton=this.bundle.title_close_button;this.titleDialog=this.bundle.title_dialog;this.nameInputField=this.bundle.title_name_input_field;this.valueInputField=this.bundle.title_value_input_field;this.sitePromotionInputField=this.bundle.title_site_promotion_input_field;this.deleteAT=this.bundle.title_delete_at_icon;this.deleteSP=this.bundle.title_delete_sp_icon;this.doneAssoc=this.bundle.title_button_done;this.atList=this.bundle.label_analytics_tag_list;this.spList=this.bundle.label_site_promotion_list;this.spName=this.bundle.label_site_promotion_name_input_field;this.atValue=this.bundle.label_analytics_tag_value_input_field;this.atName=this.bundle.label_analytics_tag_name_input_field;this.noAT=this.bundle.label_no_at_there_yet;this.noSP=this.bundle.label_no_sp_there_yet;this.invIllegal=this.bundle.label_invalid_illegal_details;this.invLong=this.bundle.label_invalid_long_details;this.tableName=this.bundle.label_table_name;this.tableValue=this.bundle.label_table_value;this.tableSP=this.bundle.table_sum_sp;this.tableAT=this.bundle.table_sum_at;this.spAlreadyExists=this.bundle.msg_sp_already_exists;this.atAlreadyExists=this.bundle.msg_at_already_exists;this.atInProject=this.bundle.text_at_in_project;this.spInProject=this.bundle.text_sp_in_project;},constructor:function(){this.bundle=dojo.i18n.getLocalization("com.ibm.portal.analytics.widgets","AnalyticsTagDialog");this.resolver=ibmPortalConfig.resolver;this._analyticsMediator=com.ibm.portal.analytics.SiteAnalyticsMediator;var _56="com.ibm.portal.analytics.widgets.AnalyticsTagDialog";this._logger=com.ibm.mashups.enabler.logging.Logger.getLogger(_56);this._logLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;},postCreate:function(){this.inherited(arguments);this._determineDialogMode(this.dialogMode);this._checkForProject();this._setOneUIDiv();this._tagsListHasChanged=false;this._setTitles();this._determineTextBoxDisplay();this._setEventConnectors();this._analyticsTags=[];this.handleValidation(false,null);this.fetchExistingAnalyticsTags(this.resourceID,this.resourceType);},setGeneralTextBoxProperties:function(_57,_58,_59){var _5a=this._isLoggable();var _5b="setGeneralTextBoxProperties(textBoxNode, isAT, isValue)";if(_5a){this._logEntry(_5b,[_57,_58,_59]);}_57.parentWidget=this.parentWidget;_57.regExp=this.regex;_57.validationCallback=function(_5c,_5d){this.parentWidget.handleValidation(_5c,_5d);};_57.isNameToBeIncluded=function(_5e,id){return this.parentWidget.isNameToBeIncluded(_5e,id);};if(_58&&!_59){_57.typeAheadFetchURL=ibmPortalConfig.contentHandlerURI+com.ibm.portal.analytics.widgets.AnalyticsTagDialog.TYPEAHEAD_NAME_URL;}else{if(!_58&&_59){_57.typeAheadFetchURL=ibmPortalConfig.contentHandlerURI+com.ibm.portal.analytics.widgets.AnalyticsTagDialog.TYPEAHEAD_SP_URL;}else{if(dojo.string.trim(this.analyticsTagNameInput.attr("value"))!==""){_57.typeAheadFetchURL=ibmPortalConfig.contentHandlerURI+"?uri=at:name:"+dojo.string.trim(this.analyticsTagNameInput.attr("value"))+"&value=${searchTerm}&search=contains&mime-type=application%2Fx-suggestions%2Bjson";}}}if(_5a){this._logExit(_5b);}},fetchExistingAnalyticsTags:function(_5f,_60){var _61=this._isLoggable();var _62="fetchExistingAnalyticsTags(resourceID, resourceType)";if(_61){this._logEntry(_62,[_5f,_60]);}this.resourceURI=this.retrieveResourceURI(_5f,_60);var _63="";if(!this.isAnalyticsTagDialog()){_63=this.retrievePrefixedURI();}else{_63=this.retrieveAnalyticsTagURI();}var _64=this.resolver.fetch({query:{uri:_63,rm:this.resourceURI},queryOptions:{preventCache:true},onComplete:dojo.hitch(this,"listAnalyticsTags"),onError:dojo.hitch(this,"displayMessage","error",this.analyticsTagError)});if(_61){this._logExit(_62);}},retrieveResourceURI:function(_65,_66){var _67=this._isLoggable();var _68="retrieveResourceURI(resourceID, resourceType)";if(_67){this._logEntry(_68,[_65,_66]);}switch(_66){case com.ibm.portal.analytics.widgets.AnalyticsTagDialog.CONTENT_NODE:this.resourceTypeScheme=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.NM;break;case com.ibm.portal.analytics.widgets.AnalyticsTagDialog.NAVIGATION_NODE:this.resourceTypeScheme=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.PM;break;default:this.resourceTypeScheme=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.NM;break;}var _69=this.resourceTypeScheme+com.ibm.portal.analytics.widgets.AnalyticsTagDialog.COLON+com.ibm.portal.analytics.widgets.AnalyticsTagDialog.OID+_65;if(_67){this._logExit(_68,_69);}return _69;},retrievePrefixedURI:function(){var _6a=this._isLoggable();var _6b="retrievePrefixedURI()";if(_6a){this._logEntry(_6b);}var _6c=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_NAME+(com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_SITE_PROMOTION);if(_6a){this._logExit(_6b,_6c);}return _6c;},retrieveAnalyticsTagURI:function(){var _6d=this._isLoggable();var _6e="retrieveAnalyticsTagURI()";if(_6d){this._logEntry(_6e);}var _6f=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_ALL;if(_6d){this._logExit(_6e,_6f);}return _6f;},listAnalyticsTags:function(_70){var _71=this._isLoggable();var _72="listAnalyticsTags(analyticsTags)";if(_71){this._logEntry(_72,_70);}if(_70.length>0){dojo.forEach(_70,function(_73){var _74=this.resolver.getValue(_73,com.ibm.portal.analytics.widgets.AnalyticsTagDialog.RES_NAME_ATTR);var _75=this.resolver.getValue(_73,com.ibm.portal.analytics.widgets.AnalyticsTagDialog.RES_VALUE_ATTR);this.displayAnalyticsTag(_74,_75);},this);}else{this.analyticsTagList.innerHTML=dojo.string.substitute(this._isATDialog?this.noAT:this.noSP,[this.resourceTitle]);}if(_71){this._logExit(_72);}},assignAnalyticsTag:function(){var _76=this._isLoggable();var _77="assignAnalyticsTag()";if(_76){this._logEntry(_77);}var _78=this._retrieveValueFromField(this.analyticsTagNameInput,this.analyticsTagNameInputFocusNode);var _79=this._retrieveValueFromField(this.analyticsTagValueInput,this.analyticsTagValueInputFocusNode);if(this.analyticsTags.length>0&&(dojo.some(this.analyticsTags,function(_7a){return ((_7a.name===_78)&&(_7a.value===_79));}))){this.displayMessage(this._isATDialog?this.atAlreadyExists:this.spAlreadyExists,"info",this.analyticsTagError);}else{this.processNewAnalyticsTag(_78,_79);}this._clearTextFields();if(_76){this._logExit(_77);}},processNewAnalyticsTag:function(_7b,_7c){var _7d=this._isLoggable();var _7e="processNewAnalyticsTag(analyticsTagName, analyticsTagValue)";if(_7d){this._logEntry(_7e,[_7b,_7c]);}this.saveAnalyticsTag(_7b,_7c);if(_7d){this._logExit(_7e);}},displayMessage:function(_7f,_80){var _81=this._isLoggable();var _82="displayMessage(message, type)";if(_81){this._logEntry(_82,[_7f,_80]);}this.analyticsTagError.innerHTML=_7f;this._changeClassOnNode(this.errorDiv,"lotusMessage asaBlock");this._changeClassOnNode(this.analyticsTagError,"asaBlock");switch(_80){case "info":dojo.addClass(this.analyticsTagError,"lotusInfo");dojo.addClass(this.errorDiv,"lotusInfo");dojo.addClass(this.msgIcon,"lotusIconMsgInfo");break;case "error":dojo.addClass(this.analyticsTagError,"lotusError");break;case "warning":dojo.addClass(this.analyticsTagError,"lotusWarning");dojo.addClass(this.errorDiv,"lotusWarning");dojo.addClass(this.msgIcon,"lotusIconMsgWarning");break;default:dojo.addClass(this.analyticsTagError,"lotusInfo");dojo.addClass(this.errorDiv,"lotusInfo");dojo.addClass(this.msgIcon,"lotusIconMsgInfo");break;}if(_81){this._logExit(_82);}},saveAnalyticsTag:function(_83,_84){var _85=this._isLoggable();var _86="saveAnalyticsTag(analyticsTagName, analyticsTagValue)";if(_85){this._logEntry(_86,[_83,_84]);}if(_83===null){_83=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_SITE_PROMOTION;}var _87=this.resolver.newItem({scheme:com.ibm.portal.analytics.widgets.AnalyticsTagDialog.AT_SCHEME,name:_83,value:_84,resourceURI:this.resourceURI});this.itemToSave=_87;this.item={name:_83,value:_84};this.resolver.saveScheme(com.ibm.portal.analytics.widgets.AnalyticsTagDialog.AT_SCHEME,{onError:this._onSaveErrors,onComplete:this._onSuccess,scope:this});if(_85){this._logExit(_86);}},retrieveAndDeleteAnalyticsTagMapping:function(_88,_89,_8a){var _8b=this._isLoggable();var _8c="retrieveAndDeleteAnalyticsTagMapping(analyticsTagName, analyticsTagValue, resourceURI)";if(_8b){this._logEntry(_8c,[_88,_89,_8a]);}var _8d=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_AT_ONLY+encodeURIComponent(com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_NAME_ONLY+_88);var _8e=this.resolver.fetch({query:{uri:_8d,value:_89},onComplete:dojo.hitch(this,function(_8f){dojo.forEach(_8f,function(_90){if(!this.resolver.isItemLoaded(_90)){resolver.loadItem({item:_90,onItem:function(_91){this.resolver.setValues(_91,com.ibm.portal.analytics.widgets.AnalyticsTagDialog.RESOURCE_LINKS_PARAM,[_8a]);this.resolver.saveScheme(com.ibm.portal.analytics.widgets.AnalyticsTagDialog.AT_SCHEME,{scope:this});}});}else{this.resolver.setValues(_90,com.ibm.portal.analytics.widgets.AnalyticsTagDialog.RESOURCE_LINKS_PARAM,[_8a]);this.resolver.saveScheme(com.ibm.portal.analytics.widgets.AnalyticsTagDialog.AT_SCHEME,{scope:this});}},this);})});if(_8b){this._logExit(_8c);}},addTagToMarkup:function(_92,_93){var _94=this._isLoggable();var _95="addTagToMarkup(analyticsTagName, analyticsTagValue)";if(_94){this._logEntry(_95,[_92,_93]);}if(this.resourceTypeScheme===com.ibm.portal.analytics.widgets.AnalyticsTagDialog.NM){var _96=this._getPageTagNode();if(_96){this.createMarkupTag(_92,_93,_96);}}else{var _97=this._getPortletTagNode();if(_97){this.createMarkupTag(_92,_93,_97);}}if(_94){this._logExit(_95);}},createMarkupTag:function(_98,_99,_9a){var _9b=this._isLoggable();var _9c="createMarkupTag(analyticsTagName, analyticsTagValue, node)";if(_9b){this._logEntry(_9c,[_98,_99,_9a]);}if(_98){dojo.create("span",{className:com.ibm.portal.analytics.widgets.AnalyticsTagDialog.ASA+_98,innerHTML:_99},_9a,"last");}else{dojo.create("span",{className:com.ibm.portal.analytics.widgets.AnalyticsTagDialog.ASA+com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_SITE_PROMOTION,innerHTML:_99},_9a,"last");}if(_9b){this._logExit(_9c);}},displayAnalyticsTag:function(_9d,_9e){var _9f=this._isLoggable();var _a0="displayAnalyticsTag(analyticsTagName, analyticsTagValue)";if(_9f){this._logEntry(_a0,[_9d,_9e]);}this.createAnalyticsTagTable(_9d,_9e);if(_9f){this._logExit(_a0);}},createTagCacheEntry:function(_a1,_a2,_a3){var _a4=this._isLoggable();var _a5="createTagCacheEntry(tableRow, analyticsTagName, analyticsTagValue)";if(_a4){this._logEntry(_a5,[_a1,_a2,_a3]);}var _a6={};_a6.combination=this.createTagCombinationForTagCache(_a2,_a3);if(!_a2){_a2=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_SITE_PROMOTION;}_a6.name=_a2;_a6.value=_a3;_a6.node=_a1;this.analyticsTags.push(_a6);if(_a4){this._logExit(_a5);}},createAnalyticsTagTable:function(_a7,_a8){var _a9=this._isLoggable();var _aa="createAnalyticsTagTable(analyticsTagName, analyticsTagValue)";if(_a9){this._logEntry(_aa,[_a7,_a8]);}var _ab;var _ac;if(!this.analyticsTagTable&&this.isAnalyticsTagDialog()){this.analyticsTagTable=dojo.create("table",{className:"lotusVertTable",role:"presentation",summary:this.tableAT},this.analyticsTagList);this.analyticsTbody=dojo.create("tbody",null,this.analyticsTagTable);_ab=dojo.create("tr",null,this.analyticsTbody,"last");var _ad=dojo.create("th",{scope:"col"},_ab,"last");dojo.create("div",{className:"lotusTableHeader"},_ad);dojo.create("h2",{className:"asaTableHeader lotusHeading ",innerHTML:this.tableName,title:this.tableName},_ad);var _ae=dojo.create("th",{scope:"col"},_ab,"last");dojo.create("div",{className:"lotusTableHeader"},_ae);dojo.create("h2",{className:"asaTableHeader lotusHeading",innerHTML:this.tableValue,title:this.tableValue},_ae);}else{if(!this.analyticsTagTable&&!this.isAnalyticsTagDialog()){this.analyticsTagTable=dojo.create("table",{className:"lotusVertTable",summary:this.tableSP},this.analyticsTagList);this.analyticsTbody=dojo.create("tbody",null,this.analyticsTagTable);}}_ac=dojo.create("tr",null,this.analyticsTbody,"last");if(this.isAnalyticsTagDialog()){dojo.create("th",{innerHTML:_a7,title:_a7,tabindex:"0"},_ac,"last");dojo.create("td",{innerHTML:_a8,title:_a8,tabindex:"0"},_ac,"last");}else{dojo.create("th",{innerHTML:_a8,title:_a8,tabindex:"0"},_ac,"last");}if(ibmCfg.portalConfig.asaConfig.canDeleteAsaSitePromotions==="true"){this.createDeleteLinkForTable(_ac,_a7,_a8);}this.createTagCacheEntry(_ac,_a7,_a8);if(_a9){this._logExit(_aa);}},createDeleteLinkForTable:function(_af,_b0,_b1){var _b2=this._isLoggable();var _b3="createDeleteLinkForTable(tableRow, analyticsTagName, analyticsTagValue)";if(_b2){this._logEntry(_b3,[_af,_b0,_b1]);}var me=this;var _b4=this.createTagCombinationForTagCache(_b0,_b1);var _b5=dojo.create("td",null,_af,"last");var _b6;if(this.isAnalyticsTagDialog()){_b6=dojo.create("a",{className:"lotusDelete",tabindex:"0",title:dojo.string.substitute(this.deleteAT,[_b0,_b1])},_b5,"last");}else{_b6=dojo.create("a",{className:"lotusDelete",tabindex:"0",title:dojo.string.substitute(this.deleteSP,[_b1])},_b5,"last");}var _b7=dojo.create("img",{src:this.blankImg,alt:"X",id:"delete_"+_b4},_b6,"last");var _b8=dojo.create("span",{className:"lotusAltText",innerHTML:"X"},_b6,"last");this.connect(_b6,"onclick",dojo.hitch(this,function(){this.deleteAnalyticsTagAssignment(_b4);return false;}));this.connect(_b6,"onkeydown",function(e){if(e.keyCode==13){me.deleteAnalyticsTagAssignment(_b4);return false;}});if(_b2){this._logExit(_b3);}},createTagCombinationForTagCache:function(_b9,_ba){var _bb=this._isLoggable();var _bc="createTagCombinationForTagCache(analyticsTagName, analyticsTagValue)";if(_bb){this._logEntry(_bc,_b9,_ba);}var ret;if(!this.isAnalyticsTagDialog()){ret=_ba;}else{if(_b9){ret=_b9+com.ibm.portal.analytics.widgets.AnalyticsTagDialog.COLON+_ba;}else{ret=_ba;}}if(_bb){this._logExit(_bc,ret);}return ret;},deleteAnalyticsTagAssignment:function(_bd){var _be=this._isLoggable();var _bf="deleteAnalyticsTagAssignment(analyticsTagCombination)";if(_be){this._logEntry(_bf,_bd);}for(var i=0;i<this.analyticsTags.length;i++){if(this.analyticsTags[i].combination==_bd){if(this.analyticsTags[i].name===null){this.analyticsTags[i].name=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_SITE_PROMOTION;}var _c0=dojo.query("*[class~=asa.tag."+this.analyticsTags[i].name+"]");dojo.forEach(_c0,function(_c1){if(_c1.innerHTML===this.analyticsTags[i].value){dojo.destroy(_c1);delete _c1;}},this);this.retrieveAndDeleteAnalyticsTagMapping(this.analyticsTags[i].name,this.analyticsTags[i].value,this.resourceURI);dojo.destroy(this.analyticsTags[i].node);delete this.analyticsTags[i].node;this.analyticsTags.splice(i,1);if(this.analyticsTags.length===0){dojo.destroy(this.analyticsTagTable);delete this.analyticsTagTable;}break;}}if(this.analyticsTags.length===0){this.analyticsTagList.innerHTML=dojo.string.substitute(this._isATDialog?this.noAT:this.noSP,[this.resourceTitle]);}this._tagsListHasChanged=true;if(_be){this._logExit(_bf);}},checkForUnsavedChangesAndDestroy:function(){var _c2=this._isLoggable();var _c3="checkForUnsavedChangesAndDestroy()";if(_c2){this._logEntry(_c3);}if(this._tagsListHasChanged){this.notifyAnalyticsMediator(this.resourceTypeScheme);}if(dojo.string.trim(this.analyticsTagValueInput.attr("value"))!==""||(this.analyticsTagNameInput.domNode&&dojo.string.trim(this.analyticsTagNameInput.attr("value"))!=="")){if(!this._checkDialog){this._checkDialog=new com.ibm.widgets.DoneCheckDialog({parentWidget:this.parentWidget,callbackOnYes:function(){this._currentAnalyticsTagList=[];this.parentWidget.cancel();}});}this._checkDialog.show();}else{this._currentAnalyticsTagList=[];this.cancel();}if(_c2){this._logExit(_c3);}},notifyAnalyticsMediator:function(_c4){var _c5=this._isLoggable();var _c6="notifyAnalyticsMediator(typeScheme)";if(_c5){this._logEntry(_c6,_c4);}if(_c4===com.ibm.portal.analytics.widgets.AnalyticsTagDialog.PM){var _c7=this._getPortletTagNode();if(_c7){this._analyticsMediator.notify([_c7]);}}else{var _c8=this._getPageTagNode();if(_c8){this._analyticsMediator.notify([_c8]);}}if(_c5){this._logExit(_c6);}},cancel:function(){this._tagsListHasChanged=false;this.analyticsTags=[];this.destroyRecursive();},handleValidation:function(_c9,_ca){var _cb=this._isLoggable();var _cc="handleValidation(isValid)";if(_cb){this._logEntry(_cc,_c9);}if(_ca){var _cd=_ca.attr("value");}if(_c9===false){this.submitDialog.disabled=true;dojo.addClass(this.submitDialog,"lotusBtnDisabled");if(_cd&&_cd.length>1&&_cd.length>50){_ca.invalidMessage=this.invLong;}else{if(_cd&&_cd.length>1){_ca.invalidMessage=this.invIllegal;}}}else{if(this.isAnalyticsTagDialog()){if(this.isOneOfTheTextBoxesInvalid()){this.submitDialog.disabled=true;dojo.addClass(this.submitDialog,"lotusBtnDisabled");}else{this.submitDialog.disabled=false;dojo.removeClass(this.submitDialog,"lotusBtnDisabled");}}else{this.submitDialog.disabled=false;dojo.removeClass(this.submitDialog,"lotusBtnDisabled");}}if(_cb){this._logExit(_cc);}},isNameToBeIncluded:function(_ce,id){var _cf=this._isLoggable();var _d0="isNameToBeIncluded(tagNameOrValue, id)";if(_cf){this._logEntry(_d0,[_ce,id]);}var _d1;var _d2=false;if(id===this.analyticsTagNameInput.id){_d2=true;}else{if(this.analyticsTagNameInput.domNode&&this.analyticsTagValueInput&&id===this.analyticsTagValueInput.id){if(dojo.some(this.analyticsTags,function(_d3){return ((this.analyticsTagNameInput.attr("value")===_d3.name)&&(_d3.value===_ce));},this)){_d2=false;}else{_d2=true;}}else{if((!this.analyticsTagNameInput.domNode)&&this.analyticsTagValueInput&&id===this.analyticsTagValueInput.id){if(dojo.some(this.analyticsTags,function(_d4){return ((com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_SITE_PROMOTION===_d4.name)&&(_d4.value===_ce));},this)){_d2=false;}else{_d2=true;}}}}if(_cf){this._logExit(_d0,_d2);}return _d2;},isOneOfTheTextBoxesInvalid:function(){var _d5=this._isLoggable();var _d6="isOneOfTheTextBoxesInvalid()";if(_d5){this._logEntry(_d6);}var ret=false;if(dojo.string.trim(this.analyticsTagNameInput.attr("value"))===""||dojo.string.trim(this.analyticsTagValueInput.attr("value"))===""){ret=true;}else{if(this.isInvalid(this.analyticsTagNameInput)||this.isInvalid(this.analyticsTagValueInput)){ret=true;}else{ret=false;}}if(_d5){this._logExit(_d6,ret);}return ret;},isInvalid:function(_d7){var _d8=this._isLoggable();var _d9="isInvalid(textBox)";if(_d8){this._logEntry(_d9,_d7);}var _da=_d7.attr("value");var ret=false;if((_da).match(this.regex)===null||(_da.match(this.regex)!==null&&_da.length!==(_da.match(this.regex)[0]).length)){ret=true;}else{ret=false;}if(_d8){this._logExit(_d9,ret);}return ret;},destroy:function(){var _db=this._isLoggable();var _dc="destroy()";if(_db){this._logEntry(_dc);}this.inherited(arguments);if(_db){this._logExit(_dc);}},isAnalyticsTagDialog:function(){if(this.dialogMode===""){return true;}else{return false;}},layout:function(){if(this.domNode.style.display!="none"){this._size();}return this.inherited(arguments);},_onSuccess:function(){if(this.analyticsTags.length===0){dojo.empty(this.analyticsTagList);this.analyticsTagUl=null;}this.displayAnalyticsTag(this.item.name,this.item.value);this.addTagToMarkup(this.item.name,this.item.value);this._tagsListHasChanged=true;},_onSaveErrors:function(_dd){this.saveErrors=true;if(_dd.hasItem(this.itemToSave)){var err=_dd.getError(this.itemToSave);if(err&&err.responseText){this.displayMessage(err.responseText,"error");}else{this.displayMessage(_dd.getErrors()[0],"error");}}this.itemToSave=null;},_determineDialogMode:function(_de){if(_de!==com.ibm.portal.analytics.widgets.AnalyticsTagDialog.MODE_SITE_PROM){this._isATDialog=true;}},_setEventConnectors:function(){var _df=this._isLoggable();var _e0="setEventConnectors()";if(_df){this._logEntry(_e0);}this.connect(this.submitDialog,"onclick",dojo.hitch(this,function(){this.assignAnalyticsTag();return false;}));this.onCancel=this.closeButtonNode.onclick=this.dialogCancel.onclick=dojo.hitch(this,function(){this.checkForUnsavedChangesAndDestroy();return false;});this._connectNodeToMethod(this.analyticsTagValueInput.domNode,"onkeyup","_checkKeyHit",this.analyticsTagValueInput);this._connectNodeToMethod(this.analyticsTagValueInput,"onKeyDown","_checkForMessages",null);this._connectNodeToMethod(this.analyticsTagValueInput,"onClick","_checkForMessages",null);if(_df){this._logExit(_e0);}},_determineTextBoxDisplay:function(){var _e1=this._isLoggable();var _e2="determineTextBoxDisplay()";if(_e1){this._logEntry(_e2);}if(ibmCfg.portalConfig.asaConfig.canCreateAsaSitePromotions==="false"){this._removeTextBoxAndLabel(this.analyticsTagNameInput,this.analyticsTagNameInputLabel);this._removeTextBoxAndLabel(this.analyticsTagValueInput,this.analyticsTagValueInputLabel);}else{this.parentWidget=this;if(!this.isAnalyticsTagDialog()){this._removeTextBoxAndLabel(this.analyticsTagNameInput,this.analyticsTagNameInputLabel);this._setSPPropertiesOnDialog(this.analyticsTagValueInputLabel,this.analyticsTagListLabel,this.analyticsTagValueInput);}else{this._setATPropertiesOnDialog(this.analyticsTagListLabel,this.analyticsTagNameInput,this.analyticsTagValueInput);}}if(_e1){this._logExit(_e2);}},_setOneUIDiv:function(){var _e3=dojo.byId(this.lotusui_id);if(!_e3){_e3=dojo.create("div",{"id":this.lotusui_id,"class":"lotusui30"},dojo.body());}dojo.place(this.domNode,_e3);},_setSPPropertiesOnDialog:function(_e4,_e5,_e6){_e4.innerHTML=this.spName;_e5.innerHTML=dojo.string.substitute(this.spList,[this.resourceTitle]);_e6.domNode.title=this.sitePromotionInputField;this.setGeneralTextBoxProperties(_e6,this.isAnalyticsTagDialog(),true);},_setATPropertiesOnDialog:function(_e7,_e8,_e9){_e7.innerHTML=dojo.string.substitute(this.atList,[this.resourceTitle]);_e8.title=this.nameInputField;_e9.title=this.valueInputField;_e8.domNode.title=this.nameInputField;_e9.domNode.title=this.valueInputField;this.setGeneralTextBoxProperties(_e8,this.isAnalyticsTagDialog(),false);this.setGeneralTextBoxProperties(_e9,this.isAnalyticsTagDialog(),true);this._connectNodeToMethod(_e8,"onClick","_checkForMessages",null);this._connectNodeToMethod(_e8,"onKeyDown","_checkForMessages",null);this._connectNodeToMethod(_e8.domNode,"onkeyup","_checkKeyHit",this.analyticsTagNameInput);},_connectNodeToMethod:function(_ea,_eb,_ec,_ed){if(_ed){this.connect(_ea,_eb,dojo.hitch(this,_ec,_ed));}else{this.connect(_ea,_eb,dojo.hitch(this,_ec));}},_removeTextBoxAndLabel:function(_ee,_ef){_ee.destroy();dojo.addClass(_ef,"lotusHidden");dojo.destroy(_ef);_ee=null;},_setTitles:function(){this.titleNode.innerHTML=dojo.string.substitute(this.titleDialog,[this.resourceTitle,this._isATDialog?this.stringAnalyticsTag:this.stringSitePromotion]);this.dialogCancel.title=dojo.string.substitute(this.doneAssoc,[this._isATDialog?this.stringAnalyticsTags:this.stringSitePromotions]);},_retrieveValueFromField:function(_f0,_f1){var _f2=this._isLoggable();var _f3="_retrieveValueFromField(textField, focusNode)";if(_f2){this._logEntry(_f3,[_f0,_f1]);}var ret=null;if(_f0.domNode){ret=dojo.string.trim(_f0.attr("value"));_f1.focus();}else{ret=com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_SITE_PROMOTION;}if(_f2){this._logExit(_f3,ret);}return ret;},_clearTextFields:function(){var _f4=this._isLoggable();var _f5="_clearTextFields()";if(_f4){this._logEntry(_f5);}if(this.analyticsTagNameInput.domNode){dojo.attr(this.analyticsTagNameInput,"displayedValue","");}dojo.attr(this.analyticsTagValueInput,"displayedValue","");if(_f4){this._logExit(_f5);}},_checkForMessages:function(){if(!dojo.hasClass(this.analyticsTagError,"lotusHidden")){dojo.addClass(this.analyticsTagError,"lotusHidden");}if(!dojo.hasClass(this.errorDiv,"lotusHidden")){dojo.addClass(this.errorDiv,"lotusHidden");}},_getPageTagNode:function(){var _f6=this._isLoggable();var _f7="getPageTagNode()";if(_f6){this._logEntry(_f7);}var _f8=null;var _f9=dojo.query("*[class~=asa.page.tags]");if(_f9&&_f9.length>0){_f8=_f9[0];}if(_f6){this._logExit(_f7,_f8);}return _f8;},_getPortletTagNode:function(){var _fa=this._isLoggable();var _fb="getPortletTagNode()";if(_fa){this._logEntry(_fb);}var _fc=null;var _fd=dojo.query("*[class~=asa.portlet.id]");if(_fd.length>0){dojo.forEach(_fd,function(_fe){if(_fe.innerHTML===this.resourceID){var _ff=dojo.query("*[class~=asa.portlet.tags]",_fe.parentNode);if(_ff&&_ff.length>0){_fc=_ff[0];}}},this);}if(_fa){this._logExit(_fb,_fc);}return _fc;},_changeClassOnNode:function(node,_100){dojo.attr(node,"class",_100);},_checkForProject:function(){if(ibmToolbarConfig.projectUUID){this.displayMessage(this._isATDialog?this.atInProject:this.spInProject,"info",this.analyticsTagError);}},_checkKeyHit:function(node,_101){if(node===this.analyticsTagValueInput&&this.isAnalyticsTagDialog()&&(dojo.string.trim(this.analyticsTagNameInput.attr("value"))!=="")){node.typeAheadFetchURL=ibmPortalConfig.contentHandlerURI+com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_ONLY+com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_AT_ONLY+encodeURIComponent(com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_NAME_ONLY)+encodeURIComponent(encodeURIComponent(dojo.string.trim(this.analyticsTagNameInput.attr("value"))))+com.ibm.portal.analytics.widgets.AnalyticsTagDialog.TYPEAHEAD_VALUE_URL;}if(_101.keyCode==dojo.keys.ENTER){if(!this.submitDialog.disabled){this.assignAnalyticsTag();}}else{if(_101.keyCode==dojo.keys.ESCAPE){this.checkForUnsavedChangesAndDestroy();}}},_isLoggable:function(){return this._logger.isLoggable(this._logLevel);},_logEntry:function(name,args){this._logger.entering(name,args);},_log:function(name,msg,args){this._logger.log(this._logLevel,name,msg,args);},_logExit:function(name,_102){this._logger.exiting(name,_102);}});com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_ALL="at:all";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_NAME="at:name:";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_AT_ONLY="at:";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_NAME_ONLY="name:";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_ONLY="?uri=";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.URI_SITE_PROMOTION="SitePromotion";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.MODE_SITE_PROM="SP";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.RES_NAME_ATTR="title";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.RES_VALUE_ATTR="tagValue";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.OID="oid:";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.AT="@";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.NM="nm";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.PM="pm";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.COLON=":";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.ASA="asa.tag.";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.AT_SCHEME="at";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.CONTENT_NODE="CONTENT_NODE";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.NAVIGATION_NODE="NAVIGATION_NODE";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.RESOURCE_LINKS_PARAM="resourceUriLinks";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.TYPEAHEAD_NAME_URL="?uri=at:collection&name=${searchTerm}&search=contains&mime-type=application%2Fx-suggestions%2Bjson";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.TYPEAHEAD_VALUE_URL="&value=${searchTerm}&search=contains&mime-type=application%2Fx-suggestions%2Bjson";com.ibm.portal.analytics.widgets.AnalyticsTagDialog.TYPEAHEAD_SP_URL="?uri=at:name:SitePromotion&value=${searchTerm}&search=contains&mime-type=application%2Fx-suggestions%2Bjson";}if(!dojo._hasResource["com.ibm.portal.analytics.AsaContextMenuLoader"]){dojo._hasResource["com.ibm.portal.analytics.AsaContextMenuLoader"]=true;dojo.provide("com.ibm.portal.analytics.AsaContextMenuLoader");dojo.declare("com.ibm.portal.analytics.AsaContextMenuLoader",com.ibm.mashups.builder.model.ContextMenuLoader,{includeHeader:true,runtimeModel:com.ibm.mashups.builder.model.Factory.getRuntimeModel(),constructor:function(_103){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.rtSkinModel=com.ibm.mashups.enabler.runtime.skin.Factory.getRuntimeSkinModel();this.lclCtx=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();},confirmshowPortletAnalytics:function(_104){var _105="confirmshowPortletAnalytics",lgr=this.LOGGER;lgr.entering(_105,arguments);if(typeof ibmCfg!="undefined"&&dojo.string.trim(ibmCfg.portalConfig.asaConfig.canViewAsaReports)==="true"&&_104!=="com.ibm.mashups.iwidget.widget.IWidgetDefinition"&&!this.runtimeModel.getCurrentPage().isDirty()&&this._areTherePortletsOnPage()){if(dojo.some(ibmPortalConfig.asaConfig.reportConfig.scopes,function(_106){return _106==="PORTLET";},this)){return false;}else{return true;}}else{return false;}},confirmshowPageAnalytics:function(_107){var _108="confirmshowPageAnalytics",lgr=this.LOGGER;lgr.entering(_108,arguments);if(typeof ibmCfg!="undefined"&&dojo.string.trim(ibmCfg.portalConfig.asaConfig.canViewAsaReports)==="true"&&_107!=="com.ibm.mashups.iwidget.widget.IWidgetDefinition"&&!this.runtimeModel.getCurrentPage().isDirty()){if(dojo.some(ibmPortalConfig.asaConfig.reportConfig.scopes,function(_109){return _109==="PAGE";},this)){return false;}else{return true;}}else{return false;}},confirmcloseAnalytics:function(){var _10a="confirmcloseAnalytics",lgr=this.LOGGER;lgr.entering(_10a,arguments);return (ibmPortalConfig.asaConfig.reportConfig.scopes[0]===undefined)?false:true;},confirmassignSitePromotion:function(_10b){var _10c="confirmassignSitePromotion",lgr=this.LOGGER,me=this;lgr.entering(_10c,arguments);if(typeof ibmCfg!="undefined"&&dojo.string.trim(ibmCfg.portalConfig.asaConfig.canViewAsaSitePromotions)==="true"){return true;}else{return false;}},assignSitePromotion:function(_10d,_10e){var _10f="assignSitePromotion",lgr=this.LOGGER,me=this;lgr.entering(_10f,arguments);var _110=this._getResourceProps(_10d,_10e);var _111=new com.ibm.portal.analytics.widgets.AnalyticsTagDialog({id:"_analyticsTag",resourceID:_10d,resourceType:_110.type,resourceTitle:_110.title,dialogMode:"SP"});_111.show();},confirmassignGenericTag:function(_112){var _113="confirmassignGenericTag",lgr=this.LOGGER,me=this;lgr.entering(_113,arguments);if(typeof ibmCfg!="undefined"&&dojo.string.trim(ibmCfg.portalConfig.asaConfig.canViewAsaSitePromotions)==="true"){return true;}else{return false;}},assignGenericTag:function(_114,_115){var _116="assignGenericTag",lgr=this.LOGGER,me=this;lgr.entering(_116,arguments);var _117=this._getResourceProps(_114,_115);var _118=new com.ibm.portal.analytics.widgets.AnalyticsTagDialog({id:"_analyticsTag",resourceID:_114,resourceType:_117.type,resourceTitle:_117.title});_118.show();},_getResourceProps:function(_119,_11a){var _11b="",_11c=null,_11d=null;if(_11a==="com.ibm.mashups.enabler.navigation.NavigationNode"){var _11e=this.navModel.find(_119).start();_11b=this.lclCtx.getTitle(_11e);_11c="CONTENT_NODE";_11d=_119;}else{if(_11a==="com.ibm.mashups.iwidget.widget.IWidgetDefinition"){var _11f=this.rtSkinModel.find(_119);_11b=_11f.getDynamicContent(com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE);_11c="NAVIGATION_NODE";_11d=_119;}}var _120={type:_11c,title:_11b,id:_11d};return _120;},_areTherePortletsOnPage:function(){if(dojo.query("*[class~=asa.portlet.id]").length!=0){return true;}else{return false;}}});}(function(){var _121=new com.ibm.portal.analytics.AsaContextMenuLoader(true);com.ibm.portal.analytics.operations={confirmPortletReports:function(){return _121.confirmshowPortletAnalytics("com.ibm.mashups.enabler.navigation.NavigationNode");},confirmPageReports:function(){return _121.confirmshowPageAnalytics("com.ibm.mashups.enabler.navigation.NavigationNode");},confirmCloseReports:function(){return _121.confirmcloseAnalytics();},confirmAddPromotion:function(){return _121.confirmassignSitePromotion("com.ibm.mashups.enabler.navigation.NavigationNode");},addPromotion:function(args){_121.assignSitePromotion(args.metadata.navID,"com.ibm.mashups.enabler.navigation.NavigationNode");},confirmAddTag:function(){return _121.confirmassignGenericTag("com.ibm.mashups.enabler.navigation.NavigationNode");},addTag:function(args){_121.assignGenericTag(args.metadata.navID,"com.ibm.mashups.enabler.navigation.NavigationNode");},confirmAddPortletPromotion:function(){return _121.confirmassignSitePromotion("com.ibm.mashups.iwidget.widget.IWidgetDefinition");},addPortletPromotion:function(args){_121.assignSitePromotion(args.metadata.windowID,"com.ibm.mashups.iwidget.widget.IWidgetDefinition");},confirmAddPortletTag:function(){return _121.confirmassignGenericTag("com.ibm.mashups.iwidget.widget.IWidgetDefinition");},addPortletTag:function(args){_121.assignGenericTag(args.metadata.windowID,"com.ibm.mashups.iwidget.widget.IWidgetDefinition");}};})();if(!dojo._hasResource["com.ibm.portal.analytics.widgets.AsaOverlay"]){dojo._hasResource["com.ibm.portal.analytics.widgets.AsaOverlay"]=true;dojo.provide("com.ibm.portal.analytics.widgets.AsaOverlay");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dojo.i18n");dojo.require("dojo.string");dojo.require("com.ibm.mashups.enabler.logging.Logger");dojo.declare("com.ibm.portal.analytics.widgets.AsaOverlay",[dijit._Widget,dijit._Templated],{resourceID:"",resourceType:"",locale:"en-US",reportProperties:null,textMode:false,isPageReport:false,colors:["#61fcff","#cca800","#e371e8","#9e72ff","#3a6fff","#30c771","#46f537","#76c600","#f3ff1a","#fd8c26","#d33d00","#ec524a","#c91b08","#d86683","#bc194d","#fb46b6","#8d088f"],blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString(),displayedMetrics:[],chart:null,closeLinkTag:null,detailsLinkTag:null,activeLegends:[],_minReportWidth:350,reportObject:null,mode:"chart",templatePath:null,templateString:"<div class=\"lotusui30\">"+"<div dojoAttachPoint=\"overlayAnchor\" class=\"overlayAnchor\">"+"<div dojoAttachPoint=\"popupAsaOverlay\" class=\"asaPopupOverlay asaPortlet\" >"+"<div class=\"lotusDialogBorder contentBox\" id=\"asaOverlay${resourceID}\" dojoAttachPoint=\"asaOverlay\" >"+"<div class=\"lotusClear asaLinkContainer\" dojoAttachPoint=\"asaOverlayLinkContainer\">"+"<a class=\"asaOverlayLink asaToggleLink lotusHidden\" role=\"link\" dojoAttachPoint=\"asaOverlayDisplayToggle\" tabindex=\"0\">${toggleText}</a>"+"<div id=\"asaCloseLink${resourceID}\" class=\"asaOverlayLink lotusRight asaCloseLink\" dojoAttachPoint=\"asaOverlayCloseLinkDiv\"></div>"+"<div id=\"asaLinkToBackend${resourceID}\" class=\"lotusAlignRight lotusRight asaOverlayLink\" dojoAttachPoint=\"asaOverlayLinkToBackendDiv\"></div>"+"</div>"+"<div dojoAttachPoint=\"topLoadingDiv\" class=\"asaLoading asaOverlayLoadingDiv lotusHidden\">"+"<div class=\"asaLoadingMsgPosition\">"+"<span class=\"lotusLoading\"><img width=\"16\" height=\"16\" src=\"${blankImg}\"></span>&nbsp;<span>${bundle.msg_loading}</span>"+"</div>"+"</div>"+"<div dojoAttachPoint=\"loadingDiv\" class=\"asaLoading\">"+"<span class=\"lotusLoading\"><img width=\"16\" height=\"16\" src=\"${blankImg}\"></span>&nbsp;<span>${bundle.msg_loading}</span>"+"</div>"+"<div dojoAttachpoint=\"asaGraph\">"+"<div>"+"<div id=\"asaOverlayNoDataMsgGraphMode${resourceID}\" class=\"asaOverlayNoDataMsgGraphMode lotusHidden\" dojoAttachPoint=\"asaOverlayNoDataMsgGraphMode\">"+"<span class=\"\" dojoAttachPoint=\"asaOverlayNoDataMsgGraphModeSpan\">${bundle.msg_no_data_for_time_frame}</span>"+"</div>"+"<div id=\"asaOverlayGraph${resourceID}\" role=\"img\" class=\"asaOverlayGraph lotusHidden\" aria-describedby=\"graphDesc${resourceID}\" tabindex=\"0\" dojoAttachPoint=\"asaOverlayGraph\"></div>"+"<div dojoAttachPoint=\"graphDesc\" id=\"graphDesc${resourceID}\" aria-hidden=\"true\" class=\"lotusHidden\"></div>"+"</div>"+"<div dojoAttachPoint=\"asaLegend\" class=\"asaLegend lotusHidden\">"+"<div id=\"asaOverlayGraphLegend${resourceID}\">"+"<div dojoAttachPoint=\"legendColumn1\"></div>"+"<div dojoAttachPoint=\"legendColumn2\"></div>"+"</div>"+"</div>"+"</div>"+"<div dojoAttachpoint=\"asaTable\" class=\"asaTable lotusHidden\">"+"<div class=\"asaTableBlock\">"+"<table class=\"asaTable\" cellspacing=\"0\" >"+"<tbody dojoAttachPoint=\"asaDataTable\"></tbody>"+"</table>"+"</div>"+"</div>"+"</div>"+"<div class=\"minWidthHack\"></div>"+"</div>"+"<div dojoAttachPoint=\"textDiv\" class=\"lotusDialogBorder contentBox lotusHidden textDiv\">"+"<div class=\"lotusRight asaLinkContainer\" dojoAttachPoint=\"asaOverlayLinkContainerTextMode\">"+"<div id=\"asaCloseLinkTextMode${resourceID}\" class=\"asaOverlayLink lotusRight asaCloseLink\" dojoAttachPoint=\"asaOverlayCloseLinkDivTextMode\"></div>"+"<div id=\"asaLinkToBackendTextMode${resourceID}\" class=\"lotusAlignRight asaOverlayLink\" dojoAttachPoint=\"asaOverlayLinkToBackendDivTextMode\"></div>"+"</div>"+"<div id=\"asaOverlayNoDataMsgTextMode${resourceID}\" class=\"asaOverlayNoDataMsgTextMode lotusHidden\" dojoAttachPoint=\"asaOverlayNoDataMsgTextMode\">"+"<span class=\"\">${bundle.msg_no_data_for_time_frame}</span>"+"</div>"+"<div dojoAttachPoint=\"textloadingDiv\" class=\"asaLoading\">"+"<span class=\"lotusLoading\"><img width=\"16\" height=\"16\" src=\"${blankImg}\"></span>&nbsp;<span>${bundle.msg_loading}</span>"+"</div>"+"</div>"+"</div>"+"</div>",constructor:function(){var _122="com.ibm.portal.analytics.widgets.AsaOverlay";this._logger=com.ibm.mashups.enabler.logging.Logger.getLogger(_122);this._logLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.displayedMetrics=[];this.activeLegends=[];this.bundle=dojo.i18n.getLocalization("com.ibm.portal.analytics.widgets","AsaOverlay");if(this.mode=="chart"){this.toggleText=this.bundle.title_view_as_table;}else{this.toggleText=this.bundle.title_view_as_chart;}},postCreate:function(){this.reportApplicability=this.reportProperties;this.resourceType=this.getResourceType(this.reportApplicability);this._prepareIE7MinWidthFix();this.styleReport(this.textMode,this.isPageReport);this.resourceIDParam=this.retrieveResourceIDParam(this.resourceType);this.triggerReportRetrieval();},uninitialize:function(){this.inherited(arguments);},styleReport:function(_123,_124){if(this.textMode){dojo.addClass(this.popupAsaOverlay,"lotusHidden");}if(this.isPageReport){dojo.addClass(this.popupAsaOverlay,"asaPage");dojo.removeClass(this.popupAsaOverlay,"asaPortlet");}},getResourceType:function(_125){var _126=this._isLoggable();var _127="getResourceType(reportApplicability)";if(_126){this._logEntry(_127,_125);}var _128;switch(_125){case com.ibm.portal.analytics.widgets.AsaOverlay.PAGE:_128=com.ibm.portal.analytics.widgets.AsaOverlay.NM;break;case com.ibm.portal.analytics.widgets.AsaOverlay.PORTLET:_128=com.ibm.portal.analytics.widgets.AsaOverlay.PM;break;default:_128=com.ibm.portal.analytics.widgets.AsaOverlay.PM;break;}if(_126){this._logExit(_127,this.resourceAbbr);}return _128;},retrieveResourceIDParam:function(_129){var _12a=this._isLoggable();var _12b="retrieveResourceIDParam(resourceType)";if(_12a){this._logEntry(_12b,[_129]);}var _12c=null;var page=com.ibm.mm.enabler.utils.Model.getCurrentPageDeferred().start();this.pageID=page.getID();if(this.isPageReport){_12c=this.pageID;}else{_12c=this.resourceID;}if(_12a){this._logExit(_12b,titleToReturn);}return _12c;},triggerReportRetrieval:function(){var _12d=this._isLoggable();var _12e="triggerReportRetrieval()";if(_12d){this._logEntry(_12e);}var uri=this.getUriFromReportType(com.ibm.portal.analytics.widgets.AsaOverlay.TREND_URI);this.fetchReportData(uri);if(_12d){this._logExit(_12e);}},fetchReportData:function(_12f,_130){var _131=this._isLoggable();var _132="fetchReportData(fetchUri)";if(_131){this._logEntry(_132,_12f);}var me=this;var _133=this._createUrl(_12f.uri,_12f.params);this._displayLoading(true,this.textMode,_130);dojo.xhrGet({url:_133,handleAs:"text",load:function(_134){if(me._isJson(_134)){me.processData(dojo.fromJson(_134),_130);}else{me.showMessage(_134,"info");}},error:function(err){me.handleError(err);}});if(_131){this._logExit(_132);}},handleError:function(_135){if(_135.status&&this._isWarning(_135.status)){this.showMessage(_135.responseText?_135.responseText:_135,com.ibm.portal.analytics.widgets.AsaOverlay.MSG_WARN);}else{this.showMessage(_135.responseText?_135.responseText:_135,com.ibm.portal.analytics.widgets.AsaOverlay.MSG_ERROR);}},showMessage:function(_136,type){var _137=null;if(!this.messageDom){if(this.textMode){_137=this.createMessageDiv(this.textDiv);this.createCloseLink(this.textDiv);dojo.attr(this.closeLinkTag,"class","lotusRight asaOverlayLink");}else{_137=this.createMessageDiv(this.asaOverlay);this.createCloseLink(this.asaOverlay);dojo.attr(this.closeLinkTag,"class","lotusRight asaOverlayLink");}}else{_137=this.messageDom;}dojo.removeClass(_137.div,"lotusHidden");dojo.addClass(this.popupAsaOverlay,"asaMessage");switch(type){case com.ibm.portal.analytics.widgets.AsaOverlay.MSG_ERROR:break;case com.ibm.portal.analytics.widgets.AsaOverlay.MSG_INFO:dojo.addClass(_137.div,"lotusInfo");dojo.removeClass(_137.img,"lotusIconMsgError");dojo.addClass(_137.img,"lotusIconMsgInfo");break;case com.ibm.portal.analytics.widgets.AsaOverlay.MSG_WARN:dojo.addClass(_137.div,"lotusWarning");dojo.removeClass(_137.img,"errorIcon");dojo.addClass(_137.img,"lotusIconMsgWarning");break;default:break;}this._displayLoading(false,this.textMode);dojo.addClass(this.asaOverlayGraph,"lotusHidden");_137.body.innerHTML=_136;},hideMessage:function(){var _138=this.messageDom;if(_138){dojo.addClass(_138.div,"lotusHidden");dojo.removeClass(this.popupAsaOverlay,"asaMessage");}},createMessageDiv:function(node){var _139=this._isLoggable();var _13a="createMessageDiv(node)";if(_139){this._logEntry(_13a,[node]);}var _13b=dojo.create("div",{className:"lotusMessage2 asaMessageDiv lotusHidden",dojoAttachPoint:"messageDiv",role:"alert"},node,"first");var _13c=dojo.create("img",{dojoAttachPoint:"messageImg",className:"lotusIcon lotusIconMsgError",height:"16",width:"16",src:this.blankImg,alt:this.bundle.msg_error},_13b,"last");var _13d=dojo.create("span",{className:"lotusAltText",innerHTML:this.bundle.msg_error},_13b,"last");var _13e=dojo.create("div",{className:"lotusMessageBody",dojoAttachPoint:"messageBody"},_13b,"last");this.messageDom={};this.messageDom.div=_13b;this.messageDom.img=_13c;this.messageDom.body=_13e;if(_139){this._logExit(_13a);}return this.messageDom;},getUriFromReportType:function(_13f,_140){var _141=this._isLoggable();var _142="getUriFromReportType(uriType)";if(_141){this._logEntry(_142,[reportType,resourceTitleParam]);}var _143=[];var _144=this.resourceType+com.ibm.portal.analytics.widgets.AsaOverlay.COLON+com.ibm.portal.analytics.widgets.AsaOverlay.OID+this.resourceIDParam;var uri=_13f+com.ibm.portal.analytics.widgets.AsaOverlay.COLON;if(!this.isPageReport){_144+=com.ibm.portal.analytics.widgets.AsaOverlay.AT+com.ibm.portal.analytics.widgets.AsaOverlay.OID+this.pageID;uri+=com.ibm.portal.analytics.widgets.AsaOverlay.URI_PORTLET;}else{uri+=com.ibm.portal.analytics.widgets.AsaOverlay.URI_PAGE;}_143.uri=uri;_143.params=[];if(_140){dojo.forEach(_140,function(_145){_143.params.push(_145);},this);}_143.params.push({name:"rm",value:_144});if(_141){this._logExit(_142,_143);}return _143;},processData:function(_146,_147){var _148=this._isLoggable();var _149="processData()";if(_148){this._logEntry(_149);}var me=this,_14a=[];this.period=this._getPeriodType(_146);this.metrics=this._retrieveMetricNames(_146);if(this.metrics){if(this.textMode){if(this.processCompareData(_146)){_14a=this.processCompareData(_146);this.createTextualReport("asaTextual"+this.resourceIDParam,_14a,this.period);this.loadLinkToBackend(this.asaOverlayLinkToBackendDivTextMode);this.createCloseLink(this.asaOverlayCloseLinkDivTextMode);}else{this._displayLoading(false,this.textMode);this._displayNoDataMsg(true,true,this.bundle.msg_no_data_for_time_frame);}}else{if(this.processTrendData(_146)){_14a=this.processTrendData(_146);this.create2DChart("asaOverlayGraph"+this.resourceIDParam,"asaOverlayGraphLegend"+this.resourceIDParam,_14a,_147);this.loadLinkToBackend(this.asaOverlayLinkToBackendDiv);this.createCloseLink(this.asaOverlayCloseLinkDiv);dojo.removeClass(this.asaOverlayDisplayToggle,"lotusHidden");dojo.connect(this.asaOverlayDisplayToggle,"onclick",dojo.hitch(this,"toggleDisplay"));dojo.connect(this.asaOverlayDisplayToggle,"onkeydown",function(e){if(e.keyCode==13){me.toggleDisplay();return false;}});}else{this._clearChart(this.bundle.msg_no_data_for_time_frame);}}}else{if(this.textMode){this._displayLoading(false,this.textMode);this._displayNoDataMsg(true,true,this.bundle.msg_no_data_for_time_frame);}else{if(_146.message){this.showMessage(_146.message+": "+_146.ErrorCodes[0].errorCode,com.ibm.portal.analytics.widgets.AsaOverlay.MSG_WARN);}else{this._clearChart(this.bundle.msg_no_data_for_time_frame);}}}if(_148){this._logExit(_149);}},toggleDisplay:function(){if(this.asaOverlayDisplayToggle.innerHTML==this.bundle.title_view_as_chart){dojo.removeClass(this.asaGraph,"lotusHidden");dojo.addClass(this.asaTable,"lotusHidden");this.asaOverlayDisplayToggle.innerHTML=this.bundle.title_view_as_table;this.create2DChart("asaOverlayGraph"+this.resourceIDParam,"asaOverlayGraphLegend"+this.resourceIDParam,this.reportObject,true);}else{dojo.removeClass(this.asaTable,"lotusHidden");dojo.addClass(this.asaGraph,"lotusHidden");this.asaOverlayDisplayToggle.innerHTML=this.bundle.title_view_as_chart;this.createTable(this.reportObject,true);}},createTable:function(_14b,_14c){this.mode="table";var me=this;dojo.empty(this.asaDataTable);this.createDateTableHeader(_14b);var _14d=true;dojo.forEach(_14b,function(_14e){tr=dojo.create("tr",null,me.asaDataTable,"last");tdMetric=dojo.create("td",{innerHTML:_14e.metric,tabindex:"0"},tr);for(var i=0;i<_14e.series.length;i++){if(!_14d){td=dojo.create("td",{innerHTML:_14e.series[i],className:"asaTableCell asaTableLeftLightCell",tabindex:"0"},tr);}else{td=dojo.create("td",{innerHTML:_14e.series[i],className:"asaTableCell asaTableLeftDarkCell",tabindex:"0"},tr);}}if(!_14d){dojo.addClass(tr,"asaTableRow asaTableDarkRow");dojo.addClass(tdMetric,"asaTableCell asaTableLeftLightCell");_14d=true;}else{dojo.addClass(tr,"asaTableRow asaTableLightRow");dojo.addClass(tdMetric,"asaTableCell asaTableLeftDarkCell");_14d=false;}});},createDateTableHeader:function(_14f){tr=dojo.create("tr",{className:"asaTableHeader asaTableRow"},this.asaDataTable,"last");dojo.create("th",{className:"asaTableHeaderCell",tabindex:"0"},tr);dojo.forEach(_14f[0].labels,function(date){dojo.create("th",{innerHTML:date.text,className:"asaTableHeaderCell",tabindex:"0"},tr);});},processTrendData:function(_150){var me=this;var _151=this._retrieveMetricNames(_150);if(this._isEmpty(_151)){return null;}else{var _152=this._getMetricParams(_150);return this._getReportObject(_150,_152);}},processCompareData:function(_153){var me=this;var _154;var _155=this._retrieveMetricNames(_153);if(this._isEmpty(_155)){return null;}else{var _156=this._getMetricParams(_153);_154=this._getTrendObject(_153,_156);}return _154;},createTextualReport:function(_157,_158,_159){var _15a=this._isLoggable();var _15b="createTextualReport(nodeID, reportObject)";if(_15a){this._logEntry(_15b,[_157,_158]);}this._displayLoading(false,true);var _15c=dojo.create("div",{className:"lotusLeft asaTrendGranularity",tabindex:"0",title:_159.toLowerCase(),innerHTML:_159.toLowerCase()},this.textDiv,"last");var _15d=dojo.create("div",{id:_157,className:"asaTrend"},this.textDiv,"last");var _15e=0;dojo.forEach(_158,function(_15f){var _160="asaTrendIcon ";if(typeof _15f.up=="string"){_160+="asaTrendIconFlat";}else{_160+=_15f.up?"asaTrendIconUp":"asaTrendIconDown";}var div=null;if(_15e===0){div=dojo.create("div",{className:"lotusLeft asaTrendText"},_15d,"last");}else{div=dojo.create("div",{className:"lotusLeft asaTrendText asaTrendNext"},_15d,"last");}var div2=dojo.create("div",{className:"lotusLeft"},div,"last");dojo.create("span",{innerHTML:_15f.series,tabindex:"0",title:_15f.series,className:"asaTrendNumber"},div2,"last");var div3=dojo.create("div",{},div,"last");var div4=dojo.create("div",{},div3,"last");dojo.create("span",{innerHTML:_15f.metric,tabindex:"0",title:_15f.metric,className:"asaTrendMetric"},div4,"last");var div5=dojo.create("div",{},div3,"last");dojo.create("img",{className:_160,height:"16",width:"16",src:this.blankImg},div5,"last");dojo.create("span",{innerHTML:_15f.percent,tabindex:"0",title:_15f.percent,className:"asaTrendMetric"},div5,"last");_15e++;},this);if(_15a){this._logExit(_15b);}},loadLinkToBackend:function(node){var _161=this._isLoggable();var _162="loadLinkToBackend(node)";if(_161){this._logEntry(_162,[link,node]);}var uri=this.getUriFromReportType(com.ibm.portal.analytics.widgets.AsaOverlay.CAP_URI);var _163=this._createUrl(uri.uri,uri.params);if(!this.detailsLinkTag){var me=this;dojo.xhrGet({url:_163,handleAs:"text",load:function(_164){if(me._isJson(_164)){me.addLinkToChart(dojo.fromJson(_164).link,node);}else{me.addLinkToChart(com.ibm.portal.analytics.widgets.AsaOverlay.CM_WELCOME_LINK,node);}},error:function(err){me.handleError(err);}});}if(_161){this._logExit(_162);}},addLinkToChart:function(link,node){var _165=this._isLoggable();var _166="addLinkToChart(link, node)";if(_165){this._logEntry(_166,[link,node]);}this.detailsLinkTag=dojo.create("a",{innerHTML:this.bundle.link_details,href:link,role:"link",tabindex:"0",title:this.bundle.title_more_details,target:"_blank",tabindex:0});dojo.place(this.detailsLinkTag,node,"last");},createCloseLink:function(node){var _167=this._isLoggable();var _168="createCloseLink(node)";if(_167){this._logEntry(_168,[node]);}if(!this.closeLinkTag){this.closeLinkTag=dojo.create("a",{innerHTML:this.bundle.label_close,role:"link",tabindex:"0",href:"javascript:void(0);",title:this.bundle.title_close_report,tabindex:0},node,"last");this.connect(this.closeLinkTag,"onclick",dojo.hitch(this,function(){this.closeReports();return false;}));}if(_167){this._logExit(_168);}},closeReports:function(){var _169=this._isLoggable();var _16a="closeReports()";if(_169){this._logEntry(_16a,[]);}top.location.href="?uri=op:ibm.portal.operations.closeAnalyticsReports()";if(_169){this._logExit(_16a);}},_clearChart:function(_16b){this._displayLoading(false,this.textMode);this._renderEmptyChart();this._displayNoDataMsg(true,false,_16b);},renderChart:function(_16c,_16d,_16e,_16f){this._displayLoading(false,this.textMode,_16f);if(this.chart){this.chart.destroy();delete this.chart;}if(this.isPageReport){dojo.removeClass(this.popupAsaOverlay,"asaPortlet");dojo.addClass(this.popupAsaOverlay,"asaPage");}dojo.removeClass(this.popupAsaOverlay,"asaOverlayPageBox");dojo.addClass(this.popupAsaOverlay,"asaOverlayPortletBox");this.chart=new dojox.charting.Chart2D(_16c);this.chart.setTheme(com.ibm.portal.analytics.widgets.ChartTheme);if(_16e[0].labels.length<=2){this.createColumnChart(this.chart,_16e);this._addAltTextToChart(_16e);}else{this.createLineChart(this.chart,_16e);this._addAltTextToChart(_16e);}this.chart.render();this._applyIE7MinWidthFix();},createColumnChart:function(_170,_171){_170.addAxis("y",{minorTicks:false,vertical:true,includeZero:true,htmlLabels:false});_170.addAxis("x",{minorTicks:false,labels:_171[0].labels,htmlLabels:false});_170.addPlot("default",{type:"ClusteredColumns",vAxis:"y",gap:this._getRightGapValue(_171)});for(var i=0;i<=1;i++){var _172=this._getColorToUse(_171[i],i);if(i===0||i==1){_170.addSeries(_171[i].metric,_171[i].series,{stroke:{color:_172},fill:_172});}var ttp=new dojox.charting.action2d.Tooltip(_170,"default");this._addLegend(_171[i].metric,i);}},updateChart:function(_173){this.hideMessage();if(_173.length<=0){this._clearChart(this.bundle.msg_no_data_available);}else{var _174={name:"metrics",value:_173.join()};var _175=[_174];var uri=this.getUriFromReportType(com.ibm.portal.analytics.widgets.AsaOverlay.TREND_URI,_175);this.fetchReportData(uri,true);}},createLineChart:function(_176,_177){_176.addAxis("x",{majorTicks:false,minorTicks:false,labels:_177[0].labels,htmlLabels:false});var o=0;dojo.forEach(_177,function(_178){var _179=this._getColorToUse(_178,o);if(o==1){_176.addAxis("y"+o,{majorTicks:false,minorTicks:false,fontColor:_179,vertical:true,includeZero:true,leftBottom:false,htmlLabels:false});_176.addPlot("plot"+o,{type:"Lines",markers:false,gap:30,vAxis:"y"+o});_176.addSeries(_178.metric,_178.series,{plot:"plot"+o,stroke:{color:_179},fill:_179});var ttp1=new dojox.charting.action2d.Tooltip(_176,"plot"+o);}else{if(o===0){_176.addAxis("y",{majorTicks:false,minorTicks:false,fontColor:_179,includeZero:true,vertical:true,htmlLabels:false});_176.addPlot("plot"+o,{type:"Lines",markers:false,gap:30});_176.addSeries(_178.metric,_178.series,{plot:"plot"+o,stroke:{color:_179},fill:_179});var ttp2=new dojox.charting.action2d.Tooltip(_176,"plot"+o);}}this._addLegend(_178.metric,o);o++;},this);},create2DChart:function(_17a,_17b,_17c,_17d){var _17e=this._isLoggable();var _17f="create2DChart(graphNodeID, reportObject)";if(_17e){this._logEntry(_17f,[_17a,_17c]);}if(_17c[0].labels.length===0){this._clearChart(this.bundle.msg_no_data_for_time_frame);}else{this._pullInDojoxCharting();dojo.addOnLoad(dojo.hitch(this,function(){this.renderChart(_17a,_17b,_17c,_17d);}));}if(_17e){this._logExit(_17f);}},_isWarning:function(_180){return _180.toString().charAt(0)=="4"?true:false;},_pullInDojoxCharting:function(){dojo["require"]("dojox.charting.Chart2D");dojo["require"]("dojox.charting.widget.SelectableLegend");dojo["require"]("dojox.charting.action2d.Highlight");dojo["require"]("dojox.charting.action2d.Tooltip");dojo["require"]("dojox.charting.plot2d.ClusteredColumns");dojo["require"]("dojox.charting.plot2d.Lines");dojo["require"]("dojox.charting.Theme");dojo["require"]("com.ibm.portal.analytics.widgets.ChartTheme");},_addAltTextToChart:function(_181){var _182=[];dojo.forEach(this.metrics,function(_183){_182.push(_183.columnName);},this);_182.push(this.period);dojo.attr(this.asaOverlayGraph,"alt",_182);dojo.attr(this.asaOverlayGraph,"title",_182);var _184="";var c=0;dojo.forEach(_181,function(_185){if(c>0){_184+=", ";}_184+=_185.metric+": ";var _186=0;dojo.forEach(_185.labels,function(_187){if(_186>0){_184+=", ";}_184+=_187.text+"-"+_185.series[_186];_186++;},this);c++;},this);dojo.attr(this.graphDesc,"innerHTML",_184);},_renderEmptyChart:function(){this._displayLoading(false,this.textMode);dojo.removeClass(this.asaOverlayGraph,"lotusHidden");if(this.chart){this.chart.destroy();delete this.chart;}if(this.isPageReport){dojo.removeClass(this.popupAsaOverlay,"asaPortlet");dojo.addClass(this.popupAsaOverlay,"asaPage");}dojo.removeClass(this.popupAsaOverlay,"asaOverlayPageBox");dojo.addClass(this.popupAsaOverlay,"asaOverlayPortletBox");this.chart=new dojox.charting.Chart2D("asaOverlayGraph"+this.resourceIDParam,"asaOverlayGraphLegend"+this.resourceIDParam);this.chart.setTheme(com.ibm.portal.analytics.widgets.ChartTheme);this.chart.addAxis("y",{minorTicks:false,vertical:true,includeZero:true,htmlLabels:false});this.chart.addAxis("x",{minorTicks:false,labels:[],htmlLabels:false});this.chart.addPlot("default",{type:"ClusteredColumns",vAxis:"y",gap:5});this.chart.render();this._applyIE7MinWidthFix();},_setDisplayedMetrics:function(_188){if(!dojo.some(this.displayedMetrics,function(_189){return (_189==_188);},this)){this.displayedMetrics.push(_188);}},_addLegend:function(_18a,_18b){if(!dojo.some(this.activeLegends,function(_18c){return (_18c.name==_18a);},this)){this._createLegend(_18a,this.colors[_18b],_18b>1?false:true);}},_getColorToUse:function(_18d,_18e){colorToUse=null;dojo.forEach(this.activeLegends,function(_18f){if(_18f.name==_18d.metric){colorToUse=_18f.color;}},this);if(!colorToUse){colorToUse=this.colors[_18e];}return colorToUse;},_getRightGapValue:function(_190){var _191=90;if(_190[0].labels.length==2){_191=40;}return _191;},_getPeriodType:function(_192){if(_192.Header){return _192.Header.PeriodType;}else{if(_192.message){this.showMessage(_192.message+": "+_192.ErrorCodes[0].errorCode,com.ibm.portal.analytics.widgets.AsaOverlay.MSG_INFO);}return null;}},_isJson:function(_193){try{JSON.parse(_193);}catch(e){return false;}return true;},_getMetricParams:function(_194){var _195=0,_196=[];for(var o=0;o<=(_194.data.length)-1;o++){if(_194.data[o].Rows[0].values&&!this._isEmpty(_194.data[o].Rows[0].values)){var _197=_194.data[o].Rows[0].values;for(var j in _197){_196[_195]=j;_195++;}break;}}return _196;},_getReportObject:function(_198,_199){var _19a=[],c=1,me=this;if(_199.length!==0){for(var i=0;i<=(_199.length)-1;i++){var _19b=[],data=[];dojo.forEach(_198.data,function(_19c){if(_19c.Rows[0].values){var _19d=_19c.Rows[0].values;_19b.push(me._createLabelObject(c,_19c.startDate));_19d[_199[i]]?data.push(parseInt(_19d[_199[i]],10)):data.push(0);c++;}},this);var _19e="";dojo.forEach(this.metrics,function(_19f){if(_19f.columnId==_199[i]){_19e=_19f.columnName;}},this);_19a.push({metric:_19e,series:data,labels:_19b});}}else{dojo.forEach(this.metrics,function(_1a0){var _1a1=[],data=[];dojo.forEach(_198.data,function(_1a2){var _1a3=_1a2.Rows[0].values;_1a1.push(me._createLabelObject(c,_1a2.startDate));data.push(0);c++;},this);_19a.push({metric:_1a0.columnName,series:data,labels:_1a1});},this);}this.reportObject=_19a;return _19a;},_getTrendObject:function(_1a4,_1a5){var _1a6=[],c=1,up=false,me=this;var _1a7=this._getFirstDataSetOfReport(_1a4);var _1a8=this._getFilledDataSets(_1a4);if(_1a5.length!==0){for(var i=0;i<=(_1a5.length)-1;i++){var _1a9=this._isEmpty.firstSet?parseInt(_1a7[0].Rows[0].values[_1a5[i]],10):0;var _1aa=parseInt(_1a8[(_1a8.length)-1].Rows[0].values[_1a5[i]],10);var _1ab=_1a9-_1aa;if(_1ab<0){up=true;}if(_1a9!==0){var _1ac=100/_1a9*Math.abs(_1ab);}else{if(_1a9===0&&_1aa===0){_1ac=0;}else{_1ac=100;}}if(_1ac===0){up="flat";}var _1ad=Math.round(_1ac*10)/10+" %";var _1ae=this._getMetricNameForParam(_1a5,i);_1a6.push({metric:_1ae,series:_1aa,up:up,percent:_1ad});}}else{dojo.forEach(this.metrics,function(_1af){_1a6.push({metric:_1af.columnName,series:0,up:"flat",percent:"0%"});},this);}return _1a6;},_getFirstDataSetOfReport:function(_1b0){return (_1b0.data[0]).Rows[0].values;},_getFilledDataSets:function(_1b1){var _1b2=[];for(var j=0;j<=(_1b1.data.length)-1;j++){if((_1b1.data[j]).Rows[0].values&&!this._isEmpty(_1b1.data[j].Rows[0].values)){_1b2.push(_1b1.data[j]);}}return _1b2;},_getMetricNameForParam:function(_1b3,_1b4){var _1b5="";dojo.forEach(this.metrics,function(_1b6){if(_1b6.columnId==_1b3[_1b4]){_1b5=_1b6.columnName;}},this);return _1b5;},_createLegend:function(_1b7,_1b8,_1b9){var me=this;var _1ba=dojo.create("div",null,this.legendColumn1,"last");var _1bb=dojo.create("input",{type:"checkbox",name:"legendCheck"+_1b7,title:_1b7,dojoType:"dijit.form.CheckBox",className:"lotusLeft"},_1ba,"last");_1bb.checked=_1b9;this.connect(_1bb,"onclick",dojo.hitch(this,function(e){me._toggleCheckbox(_1bb,_1b7);},_1bb,_1b7));this.activeLegends.push({name:_1b7,value:_1b9,color:_1b8,node:_1bb});_1bb.checked?this._setDisplayedMetrics(_1b7):function(){};if(!this._isIE()){var _1bc=dojo.create("div",{className:"lotusLeft legendColorBox",style:"background-color: "+_1b8+";"},_1ba,"last");}var _1bd=dojo.create("span",{innerHTML:_1b7,title:_1b7,className:"legendText",tabindex:"0"},_1ba,"last");if(this._isIE()){dojo.style(_1bd,"color",_1b8);}dojo.create("div",{className:"lotusClear"},_1ba,"last");},_isIE:function(){return navigator.appName=="Microsoft Internet Explorer"?true:false;},_toggleCheckbox:function(_1be,_1bf){var _1c0=this.displayedMetrics;if(!_1be.checked){dojo.forEach(_1c0,function(_1c1){if(_1c1==_1bf){var _1c2=dojo.indexOf(_1c0,_1bf);_1c0.splice(_1c2,1);this._inactivateLegendInList(_1bf);}},this);}else{_1c0.push(_1bf);if(_1c0.length>2){this._inactivateLegendInList(_1c0[0]);_1c0.splice(0,1);}}this.displayedMetrics=_1c0;var _1c3=this._getMetricIDs(_1c0);this.updateChart(_1c3);},_inactivateLegendInList:function(_1c4){dojo.forEach(this.activeLegends,function(_1c5){if(_1c5.name==_1c4){_1c5.value=false;_1c5.node.checked=false;}},this);},_getMetricIDs:function(_1c6){var _1c7=[];dojo.forEach(this.basicMetrics,function(_1c8){dojo.forEach(_1c6,function(_1c9){if(_1c8.columnName==_1c9){_1c7.push(_1c8.columnId);}},this);},this);return _1c7;},_createUrl:function(_1ca,_1cb){var _1cc=null;var uri=this._createPocUri(_1ca);dojo.forEach(_1cb,function(_1cd){uri+=this._createParamForUrl(_1cd);},this);return uri;},_retrieveMetricNames:function(_1ce){if(_1ce.Header){if(!this.basicMetrics){this.basicMetrics=_1ce.Header.Metrics;}return _1ce.Header.Metrics;}else{if(_1ce.message){this.showMessage(_1ce.message+": "+_1ce.ErrorCodes[0].errorCode,com.ibm.portal.analytics.widgets.AsaOverlay.MSG_INFO);}return null;}},_getTextItems:function(_1cf){var _1d0=[];dojo.forEach(_1cf,function(_1d1){_1d0.push({metric:_1d1.metric,previous:_1d1.series[0],current:_1d1.series[_1d1.series.length-1]});});return _1d0;},_createPocUri:function(uri){return ibmCfg.portalConfig.contentHandlerURI+"?uri="+uri;},_createParamForUrl:function(_1d2){return "&"+_1d2.name+"="+_1d2.value;},_disableCheckboxes:function(){dojo.query("input",this.asaLegent).forEach(function(node,_1d3,arr){dojo.attr(node,"disabled",true);});},_enableCheckboxes:function(){dojo.query("input",this.asaLegent).forEach(function(node,_1d4,arr){dojo.removeAttr(node,"disabled");});},_displayNoDataMsg:function(show,_1d5,msg){if(show){if(_1d5){dojo.removeClass(this.asaOverlayNoDataMsgTextMode,"lotusHidden");}else{if(msg&&dojo.isString(msg)){dojo.attr(this.asaOverlayNoDataMsgGraphModeSpan,"innerHTML",msg);dojo.removeClass(this.asaOverlayNoDataMsgGraphMode,"lotusHidden");}}}else{if(_1d5){dojo.addClass(this.asaOverlayNoDataMsgTextMode,"lotusHidden");}else{dojo.addClass(this.asaOverlayNoDataMsgGraphMode,"lotusHidden");}}},_displayLoading:function(show,_1d6,_1d7){if(!_1d6){if(show){dojo.removeClass(_1d7?this.topLoadingDiv:this.loadingDiv,"lotusHidden");this._disableCheckboxes();}else{dojo.removeClass(this.asaLegend,"lotusHidden");dojo.removeClass(this.asaOverlayGraph,"lotusHidden");dojo.removeClass(this.asaOverlayLinkContainer,"lotusHidden");this._enableCheckboxes();dojo.addClass(_1d7?this.topLoadingDiv:this.loadingDiv,"lotusHidden");this._displayNoDataMsg(false,false);}}else{if(show){dojo.removeClass(this.textDiv,"lotusHidden");dojo.removeClass(this.textloadingDiv,"lotusHidden");}else{dojo.removeClass(this.textDiv,"lotusHidden");dojo.addClass(this.textloadingDiv,"lotusHidden");this._displayNoDataMsg(false,true);}}},_createLabelObject:function(_1d8,_1d9){var _1da={value:_1d8,text:_1d9};return _1da;},_isEmpty:function(obj){for(var prop in obj){if(obj.hasOwnProperty(prop)){return false;}}return true;},_createListItem:function(node){var li=dojo.create("li",null);return li;},_prepareIE7MinWidthFix:function(){if(dojo.isIE==7){dojo.contentBox(this.popupAsaOverlay,{w:this._minReportWidth});}},_applyIE7MinWidthFix:function(){if(dojo.isIE==7){var _1db=dojo.marginBox(this.asaOverlay);if(_1db.w>this._minReportWidth){dojo.contentBox(this.popupAsaOverlay,{w:_1db.w});}}},_isCSARenderMode:function(){var _1dc=false;if(ibmCfg&&ibmCfg.themeConfig){_1dc=ibmCfg.themeConfig.isPageRenderModeCSA;}return _1dc;},_isLoggable:function(){return this._logger.isLoggable(this._logLevel);},_logEntry:function(name,args){this._logger.entering(name,args);},_log:function(name,msg,args){this._logger.log(this._logLevel,name,msg,args);},_logExit:function(name,_1dd){this._logger.exiting(name,_1dd);}});com.ibm.portal.analytics.widgets.AsaOverlay.TREND_URI="ar:trends";com.ibm.portal.analytics.widgets.AsaOverlay.DATA_URI="ar:data";com.ibm.portal.analytics.widgets.AsaOverlay.CAP_URI="ar:cap";com.ibm.portal.analytics.widgets.AsaOverlay.URI_PAGE="page";com.ibm.portal.analytics.widgets.AsaOverlay.URI_PORTLET="portlet";com.ibm.portal.analytics.widgets.AsaOverlay.URI_SITE="site";com.ibm.portal.analytics.widgets.AsaOverlay.OID="oid:";com.ibm.portal.analytics.widgets.AsaOverlay.AT="@";com.ibm.portal.analytics.widgets.AsaOverlay.PM="pm";com.ibm.portal.analytics.widgets.AsaOverlay.NM="nm";com.ibm.portal.analytics.widgets.AsaOverlay.COLON=":";com.ibm.portal.analytics.widgets.AsaOverlay.PAGE="PAGE";com.ibm.portal.analytics.widgets.AsaOverlay.PORTLET="PORTLET";com.ibm.portal.analytics.widgets.AsaOverlay.MSG_ERROR="error";com.ibm.portal.analytics.widgets.AsaOverlay.MSG_INFO="info";com.ibm.portal.analytics.widgets.AsaOverlay.MSG_WARN="warning";com.ibm.portal.analytics.widgets.AsaOverlay.CM_WELCOME_LINK="http://welcome.coremetrics.com/";}if(!dojo._hasResource["com.ibm.wps.analytics.OverlayWidgetController"]){dojo._hasResource["com.ibm.wps.analytics.OverlayWidgetController"]=true;dojo.provide("com.ibm.wps.analytics.OverlayWidgetController");dojo.require("com.ibm.mashups.enabler.logging.Logger");dojo.declare("com.ibm.wps.analytics.OverlayWidgetController",null,{overlayWidgets:[],constructor:function(){var _1de="com.ibm.wps.analytics.OverlayWidgetController";this._logger=com.ibm.mashups.enabler.logging.Logger.getLogger(_1de);this._logLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.navStateModel=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();this.publicRenderParamAccessor=com.ibm.mashups.enabler.model.state.AccessorFactory.getShareableParameterSetAccessor(this.navStateModel,"public-render-parameters","global");dojo.subscribe(com.ibm.wps.analytics.OverlayWidgetController.openReports,this,function(args){this.initializeOverlayWidgets(args);});dojo.subscribe(com.ibm.wps.analytics.OverlayWidgetController.closeReports,this,function(args){this.closeOverlayWidgets();});},initializeOverlayWidgets:function(args){var _1df=this._isLoggable();var _1e0="initializeOverlayWidgets(args)";if(_1df){this._logEntry(_1e0,args);}dojo.forEach(args.isEnabled,function(_1e1){if(_1e1==="PORTLET"){var _1e2=this._getPortletNodes();if(_1e2.length>0){dojo.forEach(_1e2,function(_1e3){var _1e4=this._getPortletContentNode(_1e3);var _1e5=this._getAsaNode(_1e3);if(_1e5&&_1e4){if(dojo.query("*",_1e5).length===0){if(_1e4.offsetHeight<190||_1e4.offsetWidth<260){this.createAsaOverlay(_1e1,_1e3,false,true,_1e5);}else{this.createAsaOverlay(_1e1,_1e3,false,false,_1e5);}}}},this);}}else{if(_1e1==="PAGE"){var _1e6=this._getAsaPageNode();if(_1e6){var _1e7=dojo.byId("analytics.page.overlay");if(!_1e7){_1e7=dojo.create("div",{id:"analytics.page.overlay",className:"analytics.page.overlay lotusClear",style:"position:relative"},_1e6,"first");}if(dojo.query("*",_1e7).length===0){var _1e8=dojo.query("*[class~=asa.page.id]")[0];this.createAsaOverlay(_1e1,_1e8,true,false,_1e7);}}}else{if(_1e1==="SITE"){this._log(_1e0,"There is no report defined, yet.",_1e1);}else{this._log(_1e0,"The report is not defined",_1e1);}}}},this);if(_1df){this._logExit(_1e0);}},createAsaOverlay:function(_1e9,_1ea,_1eb,_1ec,_1ed){var _1ee=new com.ibm.portal.analytics.widgets.AsaOverlay({resourceID:_1ea.innerHTML,reportProperties:_1e9,isPageReport:_1eb,textMode:_1ec});_1ed.appendChild(_1ee.domNode);this.overlayWidgets.push(_1ee);},closeOverlayWidgets:function(){var _1ef=this._isLoggable();var _1f0="closeOverlayWidgets()";if(_1ef){this._logEntry(_1f0);}dojo.forEach(this.overlayWidgets,function(_1f1){_1f1.destroyRecursive();});if(_1ef){this._logExit(_1f0);}},_getPortletContentNode:function(_1f2){return dojo.query(".component-control.id-"+_1f2.innerHTML)[0];},_getAsaNode:function(_1f3){return dojo.query("*[class~=analytics.overlay]",(_1f3.parentNode).parentNode)[0];},_getPortletNodes:function(){return dojo.query("*[class~=asa.portlet.id]");},_isApplicableFor:function(_1f4){if(_1f4&&_1f4.isEnabled){return _1f4.isEnabled[0];}else{return null;}},_getAsaPageNode:function(){return dojo.query("*[class~=wpthemeMainContent]")[0];},_isEmpty:function(obj){for(var prop in obj){if(obj.hasOwnProperty(prop)){return false;}}return true;},_isLoggable:function(){return this._logger.isLoggable(this._logLevel);},_logEntry:function(name,args){this._logger.entering(name,args);},_log:function(name,msg,args){this._logger.log(this._logLevel,name,msg,args);},_logExit:function(name,_1f5){this._logger.exiting(name,_1f5);}});com.ibm.wps.analytics.OverlayWidgetController.openReports="openReports";com.ibm.wps.analytics.OverlayWidgetController.closeReports="closeReports";overlayWidgetCtrl=new com.ibm.wps.analytics.OverlayWidgetController();}if(!dojo._hasResource["com.ibm.portal.analytics.OverlayController"]){dojo._hasResource["com.ibm.portal.analytics.OverlayController"]=true;dojo.provide("com.ibm.portal.analytics.OverlayController");dojo.require("com.ibm.mashups.enabler.logging.Logger");dojo.declare("com.ibm.portal.analytics.OverlayController",null,{constructor:function(){var _1f6="com.ibm.portal.analytics.OverlayController";this._logger=com.ibm.mashups.enabler.logging.Logger.getLogger(_1f6);this._logLevel=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _1f7=com.ibm.mashups.services.ServiceManager;this._eventService=_1f7.getService(com.ibm.mashups.iwidget.services.EventService.SERVICE_NAME);var _1f8=com.ibm.mashups.builder.iEvents.LAYOUT_REFRESHED;this._eventService.subscribeEvent(_1f8,null,dojo.hitch(this,this.handlePageSwitchEvent));this.handleOverlayMode(this.isOverlayModeEnabled());},isOverlayModeEnabled:function(){var _1f9=this._isLoggable();var _1fa="isOverlayModeEnabled()";if(_1f9){this._logEntry(_1fa);}var _1fb=null;if(ibmPortalConfig.asaConfig&&ibmPortalConfig.asaConfig.reportConfig&&ibmPortalConfig.asaConfig.reportConfig.scopes){_1fb=ibmPortalConfig.asaConfig.reportConfig.scopes;}if(_1f9){this._logExit(_1fa,_1fb);}return _1fb;},handleOverlayMode:function(e){var _1fc=this._isLoggable();var _1fd="handleOverlayModeEvent(e)";if(_1fc){this._logEntry(_1fd,eenabled);}if(!this._isEmpty(e)){dojo.publish(com.ibm.portal.analytics.OverlayController.openReports,[{isEnabled:e,source:"OverlayController"}]);}else{dojo.publish(com.ibm.portal.analytics.OverlayController.closeReports,[{isEnabled:e,source:"OverlayController"}]);}if(_1fc){this._logExit(_1fd);}},_isEmpty:function(obj){for(var prop in obj){if(obj.hasOwnProperty(prop)){return false;}}return true;},_isLoggable:function(){return this._logger.isLoggable(this._logLevel);},_logEntry:function(name,args){this._logger.entering(name,args);},_log:function(name,msg,args){this._logger.log(this._logLevel,name,msg,args);},_logExit:function(name,_1fe){this._logger.exiting(name,_1fe);}});com.ibm.portal.analytics.OverlayController.overlayModeChanged="overlayMode";com.ibm.portal.analytics.OverlayController.openReports="openReports";com.ibm.portal.analytics.OverlayController.closeReports="closeReports";com.ibm.portal.analytics.OverlayController.reportProperties="reportProperties";com.ibm.portal.analytics.OverlayController.listenerReady="listenerReady";com.ibm.portal.analytics.OverlayController._qnameReportProperties="{http://www.ibm.com/xmlns/prod/websphere/portal/publicparams/analytics}"+com.ibm.portal.analytics.OverlayController.reportProperties;dojo.addOnLoad(function(){if(typeof (overlayCtrl)=="undefined"){overlayCtrl=new com.ibm.portal.analytics.OverlayController();}});}dojo.require("com.ibm.pb.customize.LotusPaletteContainer");dojo.declare("ibm.toolbar.AnalyticsContainer",[dijit._Widget,dijit._Templated,com.ibm.pb.customize.LotusPaletteContainer],{templateString:"<div class=\"lotusui30 utb-analytics\">"+"<div class=\"utb-column-first\">"+"<div class=\"utb-header\">Settings</div>"+"<table class=\"utb-settings-table\">"+"<tr>"+"<td>"+"<div id=\"utb-label\">Reports:</div>"+"</td>"+"<td class=\"lotusViewControl\">"+"<div>"+"<a id=\"viewAsListToggleLink\" class=\"lotusSprite lotusView lotusSummaryOff utb-analytics-toggle\" role=\"button\" aria-pressed=\"false\" aria-label=\"Summary of all entries\" title=\"Summary of all entries\" href=\"javascript:;\">On"+"<span class=\"lotusAltText\">Summary</span>"+"</a>"+"<a id=\"viewAsDetailToggleLink\" class=\"lotusSprite lotusView lotusDetailsOn lotusSelected\" role=\"button\" aria-pressed=\"true\" aria-label=\"Details for all entries\" title=\"Details for all entries\" href=\"javascript:;\">Off "+"<span class=\"lotusAltText\">Details</span>"+"</a>"+"</div>"+"</td>"+"</tr>"+"<tr>"+"<td>"+"<div>Show for:</div>"+"</td>"+"<td>"+"<div class=\"lotusLeft utb-analytics-checkbox\">"+"<input type=\"checkbox\" id=\"check1\" name=\"check1\" class=\"lotusCheckbox\" checked=\"checked\" value=\"false\" />"+"<label class=\"lotusCheckbox\" for=\"check1\">Portlets</label>"+"</div>"+"<div class=\"utb-analytics-checkbox\">"+"<input type=\"checkbox\" id=\"check2\" name=\"check2\" class=\"lotusCheckbox\" value=\"true\" />"+"<label class=\"lotusCheckbox\" for=\"check2\">Pages</label>"+"</div>"+"</td>"+"</tr>"+"<tr>"+"<td>"+"<div>Show Metric:</div>"+"</td>"+"<td>"+"<select id=\"chooser\" name=\"chooser\">"+"<option value=\"1\">Metric 1</option>"+"<option value=\"2\">Metric 2</option>"+"<option value=\"3\">Metric 3</option>"+"</select>"+"</td>"+"</tr>"+"<tr>"+"<td colspan=\"2\">"+"<div class=\"lotusBtnContainer\">"+"<button dojoAttachPoint=\"analyticsRefreshButton\" class=\"lotusBtn\">Refresh</button>"+"</div>"+"</td>"+"</tr>"+"</table>"+"</div>"+"<div class=\"utb-column utb-last\">"+"<div class=\"utb-header\">Page Reports</div>"+"<div dojoAttachPoint=\"firstCell\" style=\"height:150px;\"></div>"+"</div>"+"</div>",constructor:function(){},postCreate:function(){var args={isEnabled:{reportApplicability:"PAGE"}};this.pageId=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();console.debug("pageId: ",this.pageId);this.handlePageReports(args);dojo.subscribe("openReports",this,function(args){this.handlePageReports(args);});},setupUI:function(){dojo["require"]("com.ibm.wps.contentmapping.utils.CMPickerConfig");var _1ff=new com.ibm.wps.contentmapping.utils.CMPickerConfig();this._hasPageAssocRights=_1ff.hasPageEditorRights();this.currentProjectID=this._getCurrentProjectID();this.pageId=this.runtimeModel.getCurrentPage().getID();this.loadPropertiesHeaderData();this.loadPageAssociations(this.pageId);this.fillPageProperties();if(this._isManagedPagesEnabled()){this.loadProjectContent(this.currentProjectID);}},handlePageReports:function(args){overlayWidgetCtrl.openPageReports(args,this.pageId,this.firstCell);},_isApplicableFor:function(_200){if(_200&&_200.isEnabled){return _200.isEnabled.reportApplicability;}else{return null;}},_isEmpty:function(obj){for(var prop in obj){if(obj.hasOwnProperty(prop)){return false;}}return true;},closePageReports:function(){},undo:function(args){this.inherited(arguments);},makeDirty:function(_201){this.dirty=_201;},processChange:function(args){this.apply(args);},apply:function(args){},beforeSubmit:function(args){var dfd=new dojo.Deferred();dfd.callback();return dfd;},submit:function(args){if(this.dirty){this.makeDirty(false);}if(args.onComplete){args.onComplete();}}});if(!dojo._hasResource["com.ibm.portal.analytics.widgets.ChartTheme"]){dojo._hasResource["com.ibm.portal.analytics.widgets.ChartTheme"]=true;dojo.provide("com.ibm.portal.analytics.widgets.ChartTheme");dojo.require("dojox.charting.Theme");(function(){var dc=dojox.charting,_202=dc.themes,_203=dc.Theme;com.ibm.portal.analytics.widgets.ChartTheme=new dc.Theme({plotarea:{fill:"#151515"},chart:{fill:"#333",pageStyle:{backgroundColor:"#000",color:"#fff"}},axis:{stroke:{color:"#fff",width:1},tick:{color:"#fff",position:"center",font:"normal normal normal 7pt Helvetica, Arial, sans-serif",fontColor:"#fff"}},series:{outline:null,font:"normal normal normal 8pt Helvetica, Arial, sans-serif",fontColor:"#fff"},marker:{stroke:{width:1.25,color:"#fff"},outline:{width:1.25,color:"#fff"},font:"normal normal normal 8pt Helvetica, Arial, sans-serif",fontColor:"#fff"}});})();} i$.toPath("com.ibm.mm.builder.deleteControl.action", function(menuitem) { com.ibm.pb.contextMenu.sharedActions.deleteControl(menuitem.metadata.wid); }); i$.toPath("com.ibm.mm.builder.deleteControl.visibility", function(menuitem) { return menuitem.visibility !== false && i$.hasClass(document.getElementsByTagName("body")[0],"edit-mode"); });i$.toPath("com.ibm.mm.builder.deletePage.action", function(menuitem) { var enabler = com.ibm.mashups.enabler, navModel = enabler.navigation.Factory.getNavigationModel(), localizedContext = enabler.context.Factory.getLocalizedContext(); var bundle = dojo.i18n.getLocalization("com.ibm.bundles", "Theme"); var pageNode = navModel.find(ibmCfg.portalConfig.currentPageOID).start(); if (confirm(dojo.string.substitute(bundle["theme_delete_page_name"], [localizedContext.getTitle(pageNode)]))) { window.onbeforeunload = null; return i$.promise.resolved(menuitem.actionUrl); } }); i$.toPath("com.ibm.mm.builder.deletePage.visibility", function(menuitem) { return menuitem.visibility !== false && i$.hasClass(document.getElementsByTagName("body")[0],"edit-mode"); });(function(){ var _1=i$.fromPath("wptheme",true); var _2=_1.getPortletState; i$.mash(_1,{getPortletState:function(_3){ if(wptheme.widget.isWidget(_3)){ return {portletMode:wptheme.widget.mapWidget2PortletMode(com.ibm.pb.contextMenu.sharedActions.getWidgetAccessor(_3).getWidgetMode()),windowState:wptheme.widget.mapWidget2PortletState(com.ibm.pb.contextMenu.sharedActions.getWidgetAccessor(_3).getWindowState())}; }else{ return _2(_3); } }}); i$.toPath("wptheme.widget",{mapWidget2PortletMode:function(_4){ if(!_4){ return "view"; } var _5={view:"view",edit:"edit_defaults",personalize:"edit",config:"config",help:"help"}; return _5[_4]?_5[_4]:_4; },mapPortlet2WidgetMode:function(_6){ if(!_6){ return "view"; } var _7={view:"view",edit_defaults:"edit",edit:"personalize",config:"config",help:"help"}; return _7[_6]?_7[_6]:_6; },mapWidget2PortletState:function(_8){ if(!_8){ return "normal"; } var _9={normal:"normal",minimize:"minimized",maximize:"maximized"}; return _9[_8]?_9[_8]:_8; },isWidget:function(_a){ var _b=i$.byId(_a); if(!_b){ return false; } return i$.hasClass(_b,"iw-iWidget"); }}); i$.toPath("wptheme.widget.operation",{changeWidgetMode:function(_c){ if(wptheme.widget.isWidget(_c.metadata.wid)){ com.ibm.pb.contextMenu.sharedActions.changeWidgetMode(_c.metadata.wid,null,{mode:wptheme.widget.mapPortlet2WidgetMode(_c.metadata.portletMode),event:com.ibm.mashups.iwidget.Constants.CHANGE_WIDGETMODE}); }else{ return i$.promise.resolved(_c.actionUrl); } }}); })(); dojo.provide("pagebuilder.nls.managedPagesSupport_en");dojo.provide("com.ibm.bundles.nls.Shelf");com.ibm.bundles.nls.Shelf._built=true;dojo.provide("com.ibm.bundles.nls.Shelf.en");com.ibm.bundles.nls.Shelf.en={"mashups_hub_gadgets_label":"Gadgets","change_style_light":"Light","change_layout_restoreLayout":"Restore previous layout","add_content_data_viewer":"Data Viewer","add_content_legacyError2":"Content cannot be added to pages with legacy layouts. Assign a layout template before continuing.","menu_unselected_text":"press enter to browse this category","utb_style":"Style","shelf_session_timeout":"Your session has timed out. Log in to continue.","change_layout_label":"Layouts","add_content_cancel":"Cancel","utb_projectmenu_manageprojectdesc":"Manage the selected project","change_style_light_blue":"Light Blue","utb_live_edit":"Live Edit Mode","change_style_greyStyle":"Grey Stripes","utb_save_errors":"There were errors saving the page","change_style_lightGreyStyle":"Light Grey","change_layout_2RowDesc":"This layout has two rows stacking the portlets in a grid.","utb_projectmenu_nofavoriteprojects":"No favorite projects available","utb_overview_more_mappings":"[${0} more]","change_layout_col3CenterDesc":"This layout has two side bars with the main content between them.","change_style_black":"Black","mashup_hub_category_label":"Mashups","change_style_lightGreenStyle":"Light Green","utb_cannot_submit_page_desc":"The page cannot be submitted because the service to do so was not available in the page feed contents.","new_categoryLabel":"New","add_content_launchLabel2":"Content","add_content_feedReader":"Feed Reader","utb_projectmenu_editmode":"Edit","utb_analytics":"Analytics","utb_layout_noChange":"The layout cannot be changed when an item is maximized","add_content_launchLabel":"Add Content","utb_project_mode_desc":"Content changes are added into this project","shelf_saving":"Your changes are being saved...","utb_default_project_template":"Default project template","utb_projectmenu_approveprojectdesc":"Approve the selected project","new_wcm_addWiki":"Add wiki to page","new_wcm_wcmNotCopied":"A WCM library is not finished being copied.","add_content_legacyError":"Content cannot be added to pages with legacy layouts. Assign a layout, and save your changes to use this feature.","shelf_badDatastoreError":"${0} cannot be loaded because the datastore for this content source is undefined.","add_content_close":"close","shelf_bundleUndefined":"The resource bundle ${0} could not be found","utb_projectmenu_approve_with_comments_headline":"Approve Project:","utb_projectmenu_allprojects":"All Projects","shelf_submitSearch":"submit search","change_style_blueStyle":"Blue Lights","utb_projectmenu_projectactionsdesc":"Actions that can be applied to the selected project","utb_projectmenu_editmodepublishedsitedesc":"Launch the published site in edit mode","utb_projectmenu_withdrawprojects":"Withdraw from Review","utb_overview_community":"Community:","change_style_mojo":"Mojo","menu_selected_text":"currently selected category","shelf_saveAndExit":"Save & Exit","change_layout_col3Center":"3 column center","add_content_rss":"RSS","utb_no_edit_page_permission":"You don't have permission to edit this page.","change_layout_col2Left":"2 column left","add_content_widgetActions":"Component options","change_style_gold":"Gold","add_content_feedspace":"Feedspace","utb_projectmenu_submitproject":"Submit for Review","utb_projectmenu_publishedsite":"Published Site","shelf_closeDialog":"Close dialog","change_layout_maximizedError2":"The layout cannot be changed while there is an item maximized.","change_style_launchLabel":"Change Style","new_feed_enterUrl":"Specify a valid URL.","utb_preview":"Preview","add_content_restrictedContentError":"${0} is not allowed on this page","add_content_chart":"Chart","utb_overview_link_manage":"Manage","change_layout_launchLabel":"Change Layout","utb_projectmenu_viewmodepublishedsitedesc":"Launch the published site in view mode","new_generic_add":"Add ${0} to page","utb_create_new_project":"Create a new project:","utb_overview_no_items":"No items to display.","utb_approve":"Approve","new_wcm_wcmNameTaken":"This name is already being used. Try a different name.","change_layout_templateSyncError":"Error with layout template sync.","shelf_socialCategory":"Social Content","new_wcm_blogLibraryDescription":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","shelf_searchSocial":"Search Social","utb_project_action_failed":"Cannot execute project action","utb_project_mode":"Project Edit:","add_content_addToPage":"Add to page","add_content_add":"Add","shelf_unspecified":"Unspecified","add_content_untitled":"Untitled","add_content_tags":"tags: ${0}","change_style_defaultStyle":"Default","change_layout_col2Right":"2 column right","utb_overview_workflow_stage":"Workflow Stage:","change_style_twilight":"Twilight","shelf_feedError":"${0} cannot be loaded. Check the internet connection and proxy settings.","utb_approve_project":"Approve Project","add_content_desc":"Object Palette - Drag and Drop Portlets, Widgets, and Content to the page","utb_projectmenu_reject_with_comments":"Project Rejection","utb_overview_name":"Name:","mashup_hub_components_label":"Components","utb_cannot_reject_page":"Cannot reject the page.","utb_result_error":"Error loading item","category_web_content":"Web Content","utb_projectmenu_allprojectsdesc":"Select from all projects","change_layout_1Row2ColDesc":"This layout has two rows. The second row contains two unequal columns.","utb_public_page":"Public Page","utb_projectmenu_norecentprojects":"No recent projects available","add_content_notLoaded":"This item has not yet loaded.","add_content_ok":"OK","shelf_searchToolsCategory":"Search Tools","utb_save_draft":"Save Draft","change_style_carbon":"Carbon","shelf_searchAll":"Search All","utb_content":"Content","change_style_orangeStyle":"Orange","utb_save_changes":"Save changes","detail_dialog_instruction_text":"press enter to see details dialog","utb_projectmenu_approvalcomments_required":"Required","utb_projectmenu_favoriteprojects":"Favorite Projects:","utb_undo":"Undo","shelf_menu":"Menu","shelf_searchNew":"Search New","new_wcm_blogLibraryDesc":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","add_content_maximizedError2":"Content cannot be added to the page while there is an item maximized.","change_style_launchLabel2":"Style","utb_manage_project":"Manage Project","utb_reject_project":"Reject Project","utb_no":"No","utb_layout_noChange_desc":"Please minimize or restore the maximized content before proceeding to change the layout of the page.","utb_projectmenu_viewmodedesc":"Launch the project in view mode","change_layout_col2Equal":"2 column equal","shelf_configError":"Error reading configuration file or processing its content.","utb_nm_error":"Cannot save the navigation model","change_layout_save_warning":"The layout is not applied until you save the page.","change_style_pinkStyle":"Pink","utb_page_rejected":"The page has been rejected.","add_content_nested_data_viewer":"Nested Data Viewer","change_style_contemporary":"Contemporary","utb_projectmenu_manageproject":"Manage","utb_show_min_toolbar":"Show minimized toolbar","change_style_dark":"Dark","utb_projectmenu_loading":"Loading projects...","utb_projectmenu_approveproject":"Approve","change_layout_custom":"Custom Layout","shelf_jumpTo":"Jump to page","new_feed_enterTitle":"Specify a title.","change_layout_1Row3Col":"1 grid 3 column equal","utb_edit_page_condition":"To edit this page, you must","utb_content_noAdd2":"Content cannot be added to legacy pages","add_content_details":"Details","shelf_searchFeeds":"Search Feeds","new_wcm_addBlog":"Add blog to page","add_content_selectRenderer":"Select how to display the content","utb_page_not_in_draft_state":"You cannot edit this page because the page is no longer in a draft state.","utb_toggle_toolbar":"toggle the toolbar","utb_projectmenu_newproject":"New Project","utb_more":"More","utb_revert":"Revert","utb_project_action_success":"Your action was successfully executed.","utb_workflow":"Workflow","add_content_noPreviewSaved1":"To display this item,","change_style_desc":"Style Palette - Click a style to apply it to the page","add_content_noPreviewSaved2":"save","add_content_noPreviewSaved3":"the page.","utb_save_message":"There are unsaved changes on this page. What do you want to do?","utb_open_project_menu":"launch the project menu","new_blog_copyWcmLibrary":"Your blog is being created...","utb_overview_web_content":"Web Content:","utb_must_be_in_project":"To edit this page, you must be in a project.","mashup_hub_iwidgets_label":"Widgets","utb_end_preview":"Stop Previewing","utb_next_stage":"Next Stage","change_layout_col2RightDesc":"This layout has one side bar on the left with the main content on the right.","add_content_maximizedError":"Content cannot be added to the page while there is a portlet in maximized mode.","utb_customizing_your_page":"You are customizing your page. Changes are only visible to you.","new_wcm_wiki":"Wiki","utb_preview_as_unauthenticated_user":"Preview as unauthenticated user","utb_overview_text_tomorrow":"Tomorrow","add_content_missingRendererError":"Could not find the specified renderer.","change_layout_TopCol3ColDesc":"This layout has two stacked columns. The bottom column contains three unequal columns.","utb_overview_link_view_all":"View all","utb_projectmenu_withdrawprojectdesc":"Withdraw the selected project from review","no_web_content_mapping_desc":"The current page does not have a page content mapping. Please edit the page properties and set a default content mapping.","shelf_hideHiddenContainers":"Hide content","add_content_portlets":"Portlets","change_style_brown":"Brown","shelf_bundleKeyUndefined":"The key ${0} was undefined in the resource bundle ${1}","utb_overview_edit_title":"Edit \"${0}\"","add_content_closeDialog":"Close this dialog","change_layout_maximizedError":"The layout cannot be changed while there is a portlet in maximized mode.","change_layout_col3Equal":"3 column equal","add_content_feed_reader":"Feed Reader","new_wcm_createWcm":"Create WCM Library","utb_open_toolbar":"Open the toolbar","shelf_searchAdminCategory":"Search Administration","utb_discard_project":"Discard Project Draft","utb_projectmenu_noprojectsavailable":"None","shelf_previous":"Previous","new_wcm_feedDescription":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","utb_preview_as_user":"Preview as User","shelf_loading":"Loading...","shelf_page":"Page ${0} of ${1}","utb_project_add_to_favorites":"Add to favorites","change_layout_1Row2Col":"1 grid 2 column unequal","new_feed_title":"Title","change_layout_col2EqualDesc":"This layout has two columns each taking up 50% of the width.","utb_workflow_state_draft":"Draft","new_feed_addFeed":"Add feed to page","change_layout_customDesc":"This layout is a customized T-shaped layout.","utb_new_project_from_template":"New project from:","utb_workflow_state_pending_publish":"Pending publish","utb_edit":"edit","change_layout_desc":"Layout Palette - Click a layout and apply it by saving the page","utb_projectmenu_editmodedesc":"Launch the project in edit mode","change_layout_templateSyncConfirm":"Are you sure you want to sync the layout for this page? All personalizations will be lost.","new_feed_url":"URL","shelf_searchCollabCategory":"Search Collaboration","utb_publish":"Publish","shelf_search":"Search ${0}","change_layout_2Row":"2 grid","change_style_green":"Green","shelf_next":"Next","utb_customizing_this_page":"You are customizing this page. Changes are only visible to you.","utb_yes":"Yes","no_web_content_mapping":"Web Content cannot be added to the page","utb_submit_page_review":"Submit Page for Review","utb_launch_selector":"launch project selector","utb_end_results":"No more results","change_style_blue":"Blue","add_content_all":"All","shelf_communicationsCategory":"Communications","add_content_noPreview":"This item does not support preview","utb_live_edit_desc":"These changes affect everybody","utb_cannot_create_draft":"Cannot create a draft version of the page.","utb_discard_changes":"Discard changes","utb_partClose_toolbar":"Close the statusbar","utb_submit_project":"Submit Project for Review","change_layout_templateSyncLong":"Update the layout of this page by syncing with the template from which it was based. Note that personalizations made to this page will be lost.","utb_projectmenu_projectactions":"Project Actions","utb_projectmenu_projects":"Projects:","shelf_searchWidgets":"Search Widgets","utb_cannot_load_page":"An unexpected error occurred loading the page. The page may be corrupted. Contact your administrator to attempt a resynchronization.","shelf_toolsCategory":"Tools","new_wcm_blogDesc":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_projectment_no_comment_provided":"This project requires a comment.","shelf_saveChanges":"Save","utb_close_toolbar":"Close the toolbar","utb_projectmenu_rejectproject":"Reject","change_layout_templateSync":"Sync assigned layout","utb_cannot_publish_page":"Cannot publish the page for review","shelf_close":"close shelf","utb_layout_noChange2":"The layout cannot be changed on legacy pages","add_content_label":"Content","change_style_greenStyle":"Green Waves","new_wcm_createGeneric":"Create ${0}","utb_overview_loading_content":"Loading content...","new_blog_library_copyWcmLibrary":"Your blog library is being created...","change_style_metal":"Metal","utb_projectmenu_rejectcomments":"Rejection Comments","add_content_noPreviewSaved":"To display this item, save the page.","new_createCategory":"Create","utb_information_message":"Information","shelf_serverError":"Internal server error.","utb_min_toolbar":"Minimize the toolbar","utb_wm_error":"Cannot save the widget model","utb_projectmenu_recentprojects":"Recent Projects:","utb_projectmenu_reject_with_comments_headline":"Reject Project:","new_wcm_blog":"Blog","utb_overview_text_yesterday":"Yesterday","utb_project":"Project","new_portalCategory":"Portal","utb_reject":"Reject","utb_page_actions":"Page Actions","new_portletsCategoryLabel":"Portlets","utb_overview_dots":"...","utb_create_draft":"create a draft","shelf_all":"All","add_content_browseContent":"Browse Content","change_layout_TopCol3Col":"Top column 3 column center","menu_back":"back","generic_browse":"Browse ${0}","new_wcm_addBlogLibrary":"Add blog library to page","utb_show_hidden":"Show Hidden Content","utb_hide_hidden":"Hide Hidden Content","change_style_missingStyleError":"The specified style does not exist","shelf_untitled":"Untitled","shelf_searchPortlets":"Search Portlets","change_style_silver":"Silver","utb_page_submit_wait":"Please wait while your page is being submitted...","utb_cannot_submit_page":"Cannot submit the page for review","shelf_showHiddenContainers":"Show hidden content","utb_partOpen_toolbar":"Open the statusbar","selection_instructions":"press enter to select","new_wcm_wikiDescription":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_layout":"Layout","add_content_rating":"rating: ${0}","change_style_visionary":"Visionary","new_wcm_blogLibrary":"Blog Library","change_style_red":"Red","new_wiki_copyWcmLibrary":"Your wiki is being created...","project_expired":"The current project is no longer available. Click OK to be redirected.","utb_wcm_auth":"Web Content Authoring","add_content_lastMod":"Last modified: ${0}","change_style_browseStyles":"Browse Styles","utb_overview_project_content":"Project Content","shelf_searchCommunications":"Search Communications","utb_close_project_menu":"close the project menu","add_content_addContentError":"Error adding content to the page.","utb_overview_link_read":"Read","change_style_natural":"Natural","change_style_modern":"Modern","add_content_noRating":"no rating","utb_projectmenu_rejectprojectdesc":"Reject the selected project","utb_project_action_wait":"Please wait while your action is being executed...","shelf_noResults":"No results","shelf_searchGadgets":"Search Gadgets","change_layout_TopCol2ColDesc":"This layout has two stacked columns. The bottom column contains two unequal columns.","utb_projectmenu_approve_with_comments":"Project Approval","utb_projectmenu_approvalcomments_optional":"Optional","utb_toggle_statusbar":"toggle the status bar","utb_projectmenu_noprojects":"No projects available","change_style_orchid":"Orchid","shelf_adminCategory":"Administration","mashup_hub_feeds_label":"Feeds","change_style_restoreStyle":"Restore previous style","new_wcm_nameInvalid":"Name must contain at least one alphanumeric (a-zA-Z0-9) character. Try a different name.","utb_last_project":"Open last project:","shelf_unsavedChanges":"The customization shelf has unsaved changes.","change_style_label":"Styles","add_content_addSearch":"Add search results to page","utb_submit_review":"Submit for Review","new_wcm_blogDescription":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_project_add_to_favorites_desc":"Add the new project to the list of favorite projects","change_layout_launchLabel2":"Layout","utb_overview_link_goto":"Go to","utb_projectmenu_approvalcomments":"Approval Comments","change_layout_browseLayouts":"Browse Layouts","change_style_white":"White","change_style_purpleStyle":"Purple","new_creatableCategory":"Creatable","utb_overview_none":"None","utb_overview":"Overview","utb_projectmenu_publishproject":"Publish","utb_workflow_state_published":"Published","utb_end_preview_as":"Stop Previewing as","utb_projectmenu_projectactionsfor":"Actions for","utb_project_publish_failed":"Project failed to publish. Open the manage project view for more details.","utb_private_page":"Private Page","change_layout_col1Desc":"This layout has one column taking up 100% of the available space.","new_wcm_feed":"Feed","change_layout_TopCol2Col":"Top column 2 column unequal","new_feed_feedDesc":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","change_layout_col1":"1 column","shelf_searchCreate":"Search Create","new_wcm_wikiDesc":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_cannot_approve_page":"Cannot approve the page.","utb_projectmenu_viewmode":"View","utb_create_draft_wait":"Please wait while your draft version of the page is being created.","change_style_yellow":"Yellow","utb_overview_text_today":"Today","create":"Create","utb_projectmenu_newprojectdesc":"Create a new project","utb_page_approved":"The page has been approved.","utb_projectmenu_publishprojectdesc":"Publish the selected project","change_layout_col2LeftDesc":"This layout has one side bar on the right with the main content on the left.","utb_content_noAdd_desc":"Please minimize or restore the maximized content before proceeding to add more items to the page.","utb_proceed_discard":"This will reverse all changes made since you last saved. Proceed?","new_wcm_name":"Name","shelf_customize":"Customize","change_style_slate":"Slate","utb_overview_friendly_name":"Friendly Url:","change_layout_1Row3ColDesc":"This layout has two rows. The second row contains three equal columns.","utb_content_noAdd":"Content cannot be added when an item is maximized","shelf_collabCategory":"Collaboration","utb_information":"information","utb_project_create_wait":"Please wait while your project is being created...","utb_overview_page_properties":"Page Properties","utb_unsaved_changes_prompt":"There are unsaved changes on this page. Click OK to save your changes. Click Cancel to discard your changes.","new_wcm_wcmNameInvalid":"Names may contain only alphanumeric (a-zA-Z0-9) characters, spaces, or any of the following characters: \" $ - _ . ! ( ) ,.","utb_overview_link_edit":"Edit","shelf_hiddenContainers":"Hidden Content","utb_more_actions":"More Actions","utb_projectmenu_submitprojectdesc":"Submit the selected project for review","add_content_submit":"Submit","change_layout_col3EqualDesc":"This layout has three columns each taking up 33% of the width."}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("pagebuilder.nls.managedPagesSupport",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.widgets.CommentDialog"]){dojo._hasResource["com.ibm.widgets.CommentDialog"]=true;dojo.provide("com.ibm.widgets.CommentDialog");dojo.require("dijit.Dialog");dojo.require("dojo.i18n");dojo.declare("com.ibm.widgets.CommentDialog",[dijit.Dialog],{shelfBundle:null,blankImg:"",autofocus:false,draggable:true,value:{},templateString:"<div id=\"comment-dialog\" class=\"commentDialog lotusDialogWrapper\" style=\"display:none;\" role=\"dialog\" aria-labelledby=\"dialogHeader\">"+"<div class=\"lotusDialogBorder lotusui lotusui30\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\" dojoAttachPoint=\"dialogDiv\">"+"<form class=\"lotusDialog lotusForm2\" dojoAttachPoint=\"commentForm,containerNode\" action=\"javascript:;\" method=\"post\" aria-live=\"assertive\">"+"<header class=\"lotusDialogHeader\">"+"<h1 id=\"dialogHeader\" class=\"lotusHeading\" dojoAttachPoint=\"titleBar\">${titleText}</h1>"+"<a role=\"button\" href=\"javascript:void(0);\" dojoAttachPoint=\"closeButtonNode\" class=\"lotusDialogClose\" title=\"${closeText}\">"+"<img src=\"${_blankGif}\" alt=\"\" aria-label=\"${closeText}\" />"+"<span class=\"lotusAltText\">X</span>"+"</a>"+"</header>"+"<div class=\"lotusDialogContent\">"+"<h2 class=\"commentHeadline\" >${commentHeadlineText}</h2>"+"<h2 class=\"projectName\">${projectName}</h2>"+"<div class=\"lotusMessage\" dojoAttachPoint=\"commentError\" style=\"display: none\" role=\"alert\">"+"<span>${noCommentProvided}</span>"+"</div>"+"<label class=\"dialogText\" for=\"${id}_comment\">${commentDialogText} - <span class=\"commentOptional\">${commentOptionalRequiredText}</span></label>"+"<div>"+"<textarea class=\"commentText\" id=\"${id}_comment\" name=\"comment\" dojoAttachPoint=\"typingNode, focusNode\"></textarea>"+"</div>"+"</div>"+"<div class=\"lotusDialogFooter\" dojoAttachPoint=\"dialogFooter\">"+"<input value=\"${okText}\" class=\"lotusFormButton\" dojoAttachPoint=\"submitDialog\" type=\"submit\"/> "+"<input value=\"${cancelText}\" style=\"margin-right: 0pt\" class=\"lotusFormButton\" dojoAttachPoint=\"dialogCancel\" type=\"submit\"/>"+"</div>"+"</form>"+"</div>"+"</div>",constructor:function(_1){this.approve=_1.approve||true;this.required=_1.required||false;this.projectName=_1.projectName||"";this.submitCallback=_1.submitCallback;this.cancelCallback=_1.cancelCallback;},postMixInProperties:function(){delete this.content;if(this.params){delete this.params.content;}if(this.cssStateNodes){delete this.cssStateNodes.closeButtonNode;}this.shelfBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.cancelText=this.shelfBundle.add_content_cancel;this.closeText=this.shelfBundle.add_content_close;this.okText=(this.approve?this.shelfBundle.utb_projectmenu_approveproject:this.shelfBundle.utb_projectmenu_rejectproject);this.commentDialogText=(this.approve?this.shelfBundle.utb_projectmenu_approvalcomments:this.shelfBundle.utb_projectmenu_rejectcomments);this.commentOptionalRequiredText=(this.required?this.shelfBundle.utb_projectmenu_approvalcomments_required:this.shelfBundle.utb_projectmenu_approvalcomments_optional);this.titleText=(this.approve?this.shelfBundle.utb_projectmenu_approve_with_comments:this.shelfBundle.utb_projectmenu_reject_with_comments);this.commentHeadlineText=(this.approve?this.shelfBundle.utb_projectmenu_approve_with_comments_headline:this.shelfBundle.utb_projectmenu_reject_with_comments_headline);this.noCommentProvided=this.shelfBundle.utb_projectment_no_comment_provided;this.inherited(arguments);},postCreate:function(){this.inherited(arguments);dojo.connect(this.submitDialog,"onclick",this,this.submit);dojo.connect(this.closeButtonNode,"onclick",this,this.cancel);dojo.connect(this.dialogCancel,"onclick",this,this.cancel);},submit:function(){var _2=this.typingNode.value.replace(/<(?:\/?).+?>/g,"");var _2=dojo.trim(_2);this.typingNode.value=_2;if(this.required&&!_2){this.commentError.style.display="block";return;}dojo.attr(this.submitDialog,"disabled","disabled");this.hide();this.onSubmit();},cancel:function(){if(!this._beingDestroyed){this.hide();}if(this.cancelCallback){this.cancelCallback();}},onChange:function(_3){},onComplete:function(){},beforeSubmit:function(){},onSubmit:function(){this.value=dojo.formToObject(this.commentForm);this.value.onComplete=this.onComplete;this.onChange(this.value);if(this.submitCallback){this.submitCallback(this.value.comment);}},layout:function(){if(this.domNode.style.display!="none"){this._size();}return this.inherited(arguments);},focus:function(){this.commentError.style.display="none";this.typingNode.value="";this.submitDialog.removeAttribute("disabled");this.show();this.focusNode.focus();},destroy:function(){this.submitDialog.onclick=null;this.closeButtonNode.onclick=null;this.inherited(arguments);}});}if(!dojo._hasResource["ibm.toolbar.ProjectSupport"]){dojo._hasResource["ibm.toolbar.ProjectSupport"]=true;dojo.provide("ibm.toolbar.ProjectSupport");ibm.toolbar.ProjectSupport={projectCache:{},recentProjectIDsCache:[],favoriteProjectIDsCache:[],lastUpdatedProjectIDCache:[],pageCache:{},pageUUIDCache:{},newProjectURL:"?uri=dialog:wcm&wcmHiddenPortlet=true&type=com.ibm.workplace.wcm.api.WCM_Project&action=new",viewProjectURLPrefix:"?uri=dialog:wcm&wcmHiddenPortlet=true&action=read&docid=com.ibm.workplace.wcm.api.WCM_Project/",createProjectTemplate:"<entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:wcm=\"wcm/namespace\"><title>$title$</title><wcm:name>$name$</wcm:name><category scheme=\"wcmrest:favorite\" term=\"$isFavorite$\" lang=\"en\"></category></entry>",activeProjectStates:["ACTIVE","PENDING","SYNDICATING","PUBLISHED_FAILED","REVIEW"],defaultProjectLoadFactor:5,confirmSaveOrDiscard:function(){var _4=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().isDirty();var _5=false;if(_4){var _6=this.getBundle();var _5=confirm(_6.utb_unsaved_changes_prompt);if(_5){com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.savePage");}else{com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(false);}}return {wasDirty:_4,okSelected:_5};},confirmManagedPages:function(){return ibmToolbarConfig.inManagedPages;},getCurrentProjectUUID:function(){var id=ibmToolbarConfig.projectUUID;return id==""?null:id;},getProjectName:function(id){var _7=id||this.getCurrentProjectUUID();var _8=null;if(_7){if(_7==this.getCurrentProjectUUID()){var _9=i$.byId("utb-project-name");if(_9){_8=_9.getAttribute("title");}}if(!_8){var _a=this.getProject(_7);if(_a){_8=_a.title;}}}return _8;},getPageUUID:function(id,_b,_c){if(ibmCfg.portalConfig&&ibmToolbarConfig.draftPageUUID){return ibmToolbarConfig.draftPageUUID;}return null;},getEditPageURL:function(_d,_e){return this._getPageURL("edit",_d,_e);},getCreateDraftPageURL:function(_f,_10){return this._getPageURL("create-draft",_f,_10);},canCreateDraft:function(_11){var _12=_11||this.getPageUUID();return (this.getCreateDraftPageURL(_12)!==null);},_getPageURL:function(_13,_14,_15){var _16=null;var _17=_14||this.getPageUUID();var _18=this.getPortalPage(_17);if(!_18){return null;}var _19=_18.link;for(var i=0,l=_19.length;i<l;i++){var _1a=_19[i];if(_1a.rel==_13){_16=_1a.href;break;}}if(_15){_15(_16);}else{return _16;}},getSubmitPageURL:function(_1b,_1c){return this._getPageURL("publish",_1b,_1c);},getNextStagePageURL:function(_1d,_1e){return this._getPageURL("next-stage",_1d,_1e);},getApprovePageURL:function(_1f,_20){return this._getPageURL("approve",_1f,_20);},getRejectPageURL:function(_21,_22){return this._getPageURL("reject",_21,_22);},_getProjectURL:function(_23,_24,_25){var _26=null;var _27=_24||this.getCurrentProjectUUID();var _28=this.getProject(_27);var _29=_28.link;for(var i=0,l=_29.length;i<l;i++){var _2a=_29[i];if(_2a.rel==_23){_26=_2a.href;break;}}if(_25){_25(_26);}else{return _26;}},getPublishProjectURL:function(_2b,_2c){return this._getProjectURL("publish",_2b,_2c);},getSubmitProjectURL:function(_2d,_2e){return this._getProjectURL("submit-for-review",_2d,_2e);},getApproveProjectURL:function(_2f,_30){return this._getProjectURL("approve",_2f,_30);},getRejectProjectURL:function(_31,_32){return this._getProjectURL("reject",_31,_32);},getWithdrawProjectURL:function(_33,_34){return this._getProjectURL("withdraw-from-review",_33,_34);},getPortalPage:function(_35,_36){var _37=this.pageCache[_35];if(_37){if(_36){_36(_37);}else{return _37;}}else{if(_35==""||!_35||_35=="null"){if(_36){_36(null);}else{return null;}}else{var me=this;var _38=!_36;dojo.xhrGet({url:me._newGetPortalPageURL(_35),handleAs:"json",headers:{"X-IBM-XHR":"true"},sync:_38,load:function(_39){_37=_39.entry;var _3a=me._decodeWcmID(_37.id);_37.id=_3a;me.pageCache[_3a]=_37;if(_36){_36(_37);}},error:function(_3b,_3c){me.handleTimeout(_3c);var _3d=me.getBundle();var msg=_3d.utb_cannot_load_page||"An unexpected error occurred loading the page. The page may be corrupted. Contact your administrator to attempt a resynchronization.";me.showErrorMsg(msg,_3b);if(_36){_36(null);}}});return _37;}}},createProject:function(_3e,_3f,_40,_41){var me=this;var _42=me.confirmSaveOrDiscard();if(_42.okSelected===true){return;}var _43=this.getBundle();var _44=new Date().getTime();var _45=_40||me._generateProjectTitle();var _46=_41?"true":"false";var _47=me.createProjectTemplate.replace(/\$name\$/g,_44).replace(/\$title\$/g,_45).replace(/\$isFavorite\$/g,_46);var _48=me.showWaitDialog(_43.utb_project_create_wait);dojo.rawXhrPost({url:me._newCreateProjectURL(),handleAs:"json",postData:_47,headers:{"Content-Type":"application/atom+xml","X-IBM-XHR":"true"},load:function(_49){if(_49&&_49.entry){var _4a=_49.entry;var _4b=me._getProjectID(_4a);_4a.id=_4b;me.projectCache[_4b]=_4a;_3e(_4b);_48.hide();}},error:function(_4c,_4d){me.handleTimeout(_4d);_48.hide();me.showErrorMsg(_4c.responseText||_4c,"");}});},_generateProjectTitle:function(){var _4e=ibmCfg.themeConfig.isRTL;var _4f=[];var _50=ibmCfg.userName||ibmCfg.portalConfig.currentUser;_4f.push(_50);_4f.push(" - ");var _51=ibm.toolbar.DateUtil.getLocalizedDate(new Date());if(_4e){_4f.push("‫");}else{_4f.push("‪");}_4f.push(_51);_4f.push("‬");return _4f.join("");},getRecentProjects:function(_52,_53){_53=_53||this.defaultProjectLoadFactor;var _54=this._newGetRecentProjectsURL(_53,this.activeProjectStates);return this.getProjects(_54,null,_52,_53);},getLastUpdatedProjects:function(_55,_56){_56=_56||this.defaultProjectLoadFactor;var _57=this._newGetLastUpdatedProjectsURL(_56,this.activeProjectStates);return this.getProjects(_57,this.lastUpdatedProjectIDCache,_55,_56);},getFavoriteProjects:function(_58,_59){_59=_59||this.defaultProjectLoadFactor;var _5a=this._newGetFavoriteProjectsURL(_59,this.activeProjectStates);return this.getProjects(_5a,null,_58,_59);},getProjects:function(_5b,_5c,_5d,_5e){if(_5c&&_5c.length>0){var _5f=[];var _60=(_5c.length>=_5e)?_5e:_5c.length;for(var i=0;i<_60;++i){var id=_5c[i];var _61=this.getProject(id);_5f.push(_61);}if(_5d){_5d(_5f);}else{return _5f;}}else{if(_5c){_5c.splice(0,_5c.length);}return this.loadProjects(_5b,_5c,_5d);}},loadProjects:function(_62,_63,_64){var me=this;var _65=!_64;dojo.xhrGet({url:_62,handleAs:"json",headers:{"X-IBM-XHR":"true"},sync:_65,load:function(_66){var _67=[];if(_66.feed&&_66.feed.entry){_67=_66.feed.entry;}if(_67&&_67.length>0){for(var i=0;i<_67.length;++i){var _68=_67[i];var _69=me._getProjectID(_68);_68.id=_69;if(_63){_63.push(_69);me.projectCache[_69]=_68;}}}if(_64){_64(_67);}else{return _67;}},error:function(_6a,_6b){me.handleTimeout(_6b);me.showErrorMsg(_6a,"");var _6c=[];if(_64){_64(_6c);}else{return _6c;}}});},getProject:function(id,_6d,_6e){var _6f=false;var _70=null;if(id=="null"||!id||id==""){if(_6d){_6d(null);}else{return null;}}if(!_6e&&this.projectCache){for(var _71 in this.projectCache){if(_71==id){_70=this.projectCache[_71];if(_6d){_6f=true;_6d(_70);}else{return _70;}}}}var me=this;if(!_6f){var _72=!_6d;dojo.xhrGet({url:me._newGetProjectURL(id),handleAs:"json",headers:{"X-IBM-XHR":"true"},sync:_72,load:function(_73){_70=_73.entry;var _74=me._getProjectID(_70);_70.id=_74;me.projectCache[_74]=_70;if(_6d){_6d(_70);}},error:function(_75,_76){me.handleTimeout(_76);me.showErrorMsg(_75,"");if(_6d){_6d(null);}}});}return _70;},_newCreateDraftPageURL:function(_77){var _78=_77||this.getPageUUID();var url=[];var _79=ibmCfg.portalConfig.contentHandlerURI;url.push(_79);if(this._urlHasParams(_79)){url.push("&");}else{url.push("?");}url.push("uri=wcmrest:item/");url.push(_78);url.push("/create-draft");return url.join("");},_newGetProjectURL:function(id){var url=[];var _7a=ibmCfg.portalConfig.contentHandlerURI;url.push(_7a);if(this._urlHasParams(_7a)){url.push("&");}else{url.push("?");}url.push("uri=wcmrest:project/");url.push(id);url.push("&mime-type=application/json");return url.join("");},_newGetRecentProjectsURL:function(_7b,_7c){var url=[];var _7d=ibmCfg.portalConfig.contentHandlerURI;url.push(_7d);if(this._urlHasParams(_7d)){url.push("&uri=wcmrest:recent-items&type=Project&mime-type=application/json&sort=accessed_descending&pagesize=");}else{url.push("wcmrest/recent-items?type=Project&mime-type=application/json&sort=accessed_descending&pagesize=");}url.push(_7b);if(_7c){for(var i=_7c.length-1;i>=0;--i){url.push("&projectstate=");url.push(_7c[i]);}}return url.join("");},_newGetLastUpdatedProjectsURL:function(_7e,_7f){var url=[];var _80=ibmCfg.portalConfig.contentHandlerURI;url.push(_80);if(this._urlHasParams(_80)){url.push("&uri=wcmrest:definedquery/projects&pagesize=");}else{url.push("wcmrest/definedquery/projects?pagesize=");}url.push(_7e);url.push("&sort=modified_descending&mime-type=application/json");if(_7f){for(var i=_7f.length-1;i>=0;--i){url.push("&projectstate=");url.push(_7f[i]);}}return url.join("");},_newGetFavoriteProjectsURL:function(_81,_82){var url=[];var _83=ibmCfg.portalConfig.contentHandlerURI;url.push(_83);if(this._urlHasParams(_83)){url.push("&uri=wcmrest:favorite-items&type=Project&mime-type=application/json&sort=accessed_descending&pagesize=");}else{url.push("wcmrest/favorite-items?type=Project&mime-type=application/json&sort=accessed_descending&pagesize=");}url.push(_81);if(_82){for(var i=_82.length-1;i>=0;--i){url.push("&projectstate=");url.push(_82[i]);}}return url.join("");},_newCreateProjectURL:function(){var url=[];var _84=ibmCfg.portalConfig.contentHandlerURI;url.push(_84);if(this._urlHasParams(_84)){url.push("&uri=wcmrest:Project&mime-type=application/json");}else{url.push("wcmrest/Project?mime-type=application/json");}return url.join("");},_newGetPortalPageURL:function(_85){var url=[];var _86=ibmCfg.portalConfig.contentHandlerURI;url.push(_86);if(this._urlHasParams(_86)){url.push("&");}else{url.push("?");}url.push("uri=wcmrest:PortalPage/");url.push(_85);url.push("&mime-type=application/json");return url.join("");},_urlHasParams:function(uri){if(uri.charAt(uri.length-1)=="/"){return false;}else{return true;}},_getProjectID:function(_87){return this._decodeWcmID(_87.id);},_decodeWcmID:function(uri){var _88=uri.indexOf("wcmrest:");if(_88>=0){var idx=_88+"wcmrest:".length;return uri.substring(idx);}return uri;},canGoToNextStage:function(){if(ibmToolbarConfig.nextStageURL===null){return false;}else{if(ibmToolbarConfig.nextStageURL!=null){return true;}else{return ibm.toolbar.ProjectSupport.getNextStagePageURL()!=null;}}},goToNextStage:function(_89){var me=ibm.toolbar.ProjectSupport;var _8a=me.confirmSaveOrDiscard();if(_8a.okSelected===true){return;}var id=id||me.getPageUUID(),_8b=ibmToolbarConfig.nextStageURL||me.getNextStagePageURL(id),_8c=me.getBundle();if(!id){return;}var _8d=me.showWaitDialog(_8c.utb_page_submit_wait);dojo.xhrPost({url:_8b,headers:{"Content-Type":"text/plain","X-IBM-XHR":"true"},load:function(){if(!me.isProjectActive(ibmToolbarConfig.projectUUID)){var msg=_8c.utb_publish_page_async||"Pages that are published may not show up immediately in the current navigation.";me.showInfoMsg(msg);me.enterProject(null,"utb:closed");}else{me.load();}},error:function(_8e,_8f){me.handleTimeout(_8f);_8d.hide();me.showErrorMsg(_8c.utb_cannot_submit_page,_8e);}});},canPublishPage:function(){if(ibmToolbarConfig.publishPageURL===null){return false;}else{if(ibmToolbarConfig.publishPageURL!=null){return true;}else{return ibm.toolbar.ProjectSupport.getSubmitPageURL()!=null;}}},publishPage:function(_90){var me=ibm.toolbar.ProjectSupport;var _91=me.confirmSaveOrDiscard();if(_91.okSelected===true){return;}var id=id||me.getPageUUID(),_92=ibmToolbarConfig.publishPageURL||me.getSubmitPageURL(id),_93=me.getBundle();if(!id){return;}var _94=me.showWaitDialog(_93.utb_page_submit_wait);dojo.xhrPost({url:_92,headers:{"Content-Type":"text/plain","X-IBM-XHR":"true"},load:function(){if(!me.isProjectActive(ibmToolbarConfig.projectUUID)){var msg=_93.utb_publish_page_async||"Pages that are published may not show up immediately in the current navigation.";me.showInfoMsg(msg);me.enterProject(null,"utb:closed");}else{me.load();}},error:function(_95,_96){me.handleTimeout(_96);_94.hide();me.showErrorMsg(_93.utb_cannot_publish_page,_95);}});},isProjectActive:function(id,_97){if(!_97){id=id||this.getCurrentProjectUUID();_97=this.getProject(id,null,true);}var _98=false;if(_97){var _99=_97.category;for(var i=0,c=_99.length;i<c;i++){var _9a=_99[i];if(_9a.scheme=="wcmrest:projectState"){if(_9a.term=="ACTIVE"||_9a.term=="PENDING"||_9a.term=="SYNDICATING"||_9a.term=="PUBLISHED_FAILED"||_9a.term=="REVIEW"){_98=true;}break;}}}return _98;},isProjectPublishedFailed:function(id){id=id||this.getCurrentProjectUUID();var _9b=this.getProject(id,null,false);var _9c=false;if(_9b){var _9d=_9b.category;for(var i=0,c=_9d.length;i<c;i++){var _9e=_9d[i];if(_9e.scheme=="wcmrest:projectState"){if(_9e.term=="PUBLISHED_FAILED"){_9c=true;}break;}}}return _9c;},getProjectState:function(id){id=id||this.getCurrentProjectUUID();var _9f=this.getProject(id,null,false);var _a0="";if(_9f){var _a1=_9f.category;for(var i=0,c=_a1.length;i<c;i++){var _a2=_a1[i];if(_a2.scheme=="wcmrest:projectState"){_a0=_a2.label;break;}}}return _a0;},isProjectNotPublished:function(id){id=id||this.getCurrentProjectUUID();var _a3=this.getProject(id,null,false);var _a4=false;if(_a3){var _a5=_a3.category;for(var i=0,c=_a5.length;i<c;i++){var _a6=_a5[i];if(_a6.scheme=="wcmrest:projectState"){if(_a6.term!="PUBLISHED"){_a4=true;}break;}}}return _a4;},canApprovePage:function(){if(ibmToolbarConfig.approvePageURL===null){return false;}else{if(ibmToolbarConfig.approvePageURL!=null){return true;}else{return ibm.toolbar.ProjectSupport.getApprovePageURL()!=null;}}},approvePage:function(_a7){var me=ibm.toolbar.ProjectSupport;var _a8=me.confirmSaveOrDiscard();if(_a8.okSelected===true){return;}var id=id||me.getPageUUID(),_a9=ibmToolbarConfig.approvePageURL||me.getApprovePageURL(id),_aa=me.getBundle();if(!id){return;}dojo.xhrPost({url:_a9,headers:{"Content-Type":"text/plain","X-IBM-XHR":"true"},load:function(){me.showInfoMsg(_aa.utb_page_approved);me.load();},error:function(_ab,_ac){me.handleTimeout(_ac);me.showErrorMsg(_aa.utb_cannot_approve_page,_ab);}});},canRejectPage:function(){if(ibmToolbarConfig.rejectPageURL===null){return false;}else{if(ibmToolbarConfig.rejectPageURL!=null){return true;}else{return ibm.toolbar.ProjectSupport.getRejectPageURL()!=null;}}},rejectPage:function(_ad){var me=ibm.toolbar.ProjectSupport;var _ae=me.confirmSaveOrDiscard();if(_ae.okSelected===true){return;}var id=id||me.getPageUUID(),_af=ibmToolbarConfig.rejectPageURL||me.getRejectPageURL(id),_b0=me.getBundle();if(!id){return;}dojo.xhrPost({url:_af,headers:{"Content-Type":"text/plain","X-IBM-XHR":"true"},load:function(){me.showInfoMsg(_b0.utb_page_rejected);me.load();},error:function(_b1,_b2){me.handleTimeout(_b2);me.showErrorMsg(_b0.utb_cannot_reject_page,_b1);}});},workflowActionPublishProject:function(_b3,_b4){var me=ibm.toolbar.ProjectSupport;var _b5=me.getBundle();me.workflowActionProject(_b3,_b4,function(_b6){if(!me.isProjectActive(ibmToolbarConfig.projectUUID,_b6.entry)){me.showInfoMsg(_b5.utb_project_action_success);me.enterProject(null,"utb:closed");}else{if(me.isProjectNotPublished(ibmToolbarConfig.projectUUID)){me.showToolbarErrorMsg(_b5.utb_project_publish_failed);}else{me.showInfoMsg(_b5.utb_project_action_success);}me.loadTop();}});},workflowActionProject:function(_b7,_b8,_b9){var me=ibm.toolbar.ProjectSupport;var _ba=me.getBundle();var _bb=me.confirmSaveOrDiscard();if(_bb.okSelected===true){return;}if(!_b7){return;}_b7+=_b7.indexOf("?")<0?"?":"&";_b7+="mime-type=application/json";var _bc=me.showWaitDialog(_ba.utb_project_action_wait);dojo.xhrPost({url:_b7,handleAs:"json",headers:{"Content-Type":"text/plain","X-IBM-XHR":"true"},postData:_b8,load:(_b9?_b9:function(_bd){me.showInfoMsg(_ba.utb_project_action_success);me.loadTop();}),error:function(_be,_bf){me.handleTimeout(_bf);_bc.hide();me.showErrorMsg(_ba.utb_project_action_failed,_be);}});},workflowActionWithCommentProject:function(_c0,_c1,_c2){var me=ibm.toolbar.ProjectSupport;var _c3=me.confirmSaveOrDiscard();if(_c3.okSelected===true){return;}params={};params.projectName=this.getProjectName(_c0);params.required=(this.getProject(_c0).content.project.commentOnReview=="ALWAYS");params.approve=_c2;params.submitCallback=function(_c4){me.workflowActionProject(_c1,_c4);};var _c5=new com.ibm.widgets.CommentDialog(params);_c5.show();},isDraftPage:function(_c6){var _c7=_c6||this.getPageUUID();var _c8=this.getPortalPage(_c7);if(!_c8){return false;}var _c9=_c8.category,ret=false;for(var i=0,c=_c9.length;i<c;i++){var _ca=_c9[i];if(_ca.scheme=="wcmrest:workflowState"){if(_ca.term=="DRAFT"){ret=true;}break;}}return ret;},createDraftPage:function(_cb){var me=this;var _cc=me.getBundle();var _cd=me.confirmSaveOrDiscard();if(_cd.okSelected===true){return;}var _ce=this._newCreateDraftPageURL(_cb);var _cf=me.showWaitDialog(_cc.utb_create_draft_wait);dojo.xhrPost({url:_ce,headers:{"X-IBM-XHR":"true"},load:function(){me.load();},error:function(_d0,_d1){me.handleTimeout(_d1);_cf.hide();me.showErrorMsg(_cc.utb_cannot_create_draft,_d0);}});},enterProject:function(id,uri){this.loadTop(this._createProjectURL(id,uri));},exitProject:function(){this.enterProject(null);},_createProjectURL:function(id,uri){var url=[];var _d2=this._getBaseURL();if(!id){var _d3="$project/";var _d4=_d2.indexOf(_d3);if(_d4>=0){url.push(_d2.substr(0,_d4));var _d5=_d2.indexOf("/",_d4+_d3.length);if(_d5>=0){url.push(_d2.substr(_d5+1));}}else{url.push(_d2);}}else{url.push(_d2);}if(_d2.indexOf("?")>=0){url.push("&");}else{url.push("?");}if(uri){url.push("uri=");url.push(uri);url.push("&");}if(id){url.push("uri=");url.push("project:");url.push("oid:");url.push(id);}var _d6=url.join("");return _d6;},_getBaseURL:function(){var _d7=top.location.href;var _d8=top.document.getElementsByTagName("base");if(_d8&&_d8.length>0){var _d9=_d8[0].getAttribute("href");if(_d9){_d7=_d9;}}var _da=_d7.indexOf("#");if(_da>=0){_d7=_d7.substring(0,_da);}return _d7;},launchProjectSelector:function(uri){var _db=this.confirmSaveOrDiscard();if(_db.okSelected===true){return;}if(!this.projectSelectionDialog){var _dc=this.getBundle();var _dd=this.showWaitDialog(_dc.utb_projectmenu_loading);var _de=this.getCurrentProjectUUID();this.projectSelectionDialog=new com.ibm.widgets.ProjectSelectDialog({selectedResourceId:_de});this.projectSelectionDialog.setCancelHandler(function(){if(_db.wasDirty===true){com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);}});this.projectSelectionDialog.startup();dojo.connect(this.projectSelectionDialog,"onChange",this,function(_df){var _e0=_df?_df.resourceValue:null;if(_e0&&_e0!==_de){this.enterProject(_e0,uri);}else{if(_db.wasDirty===true){com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);}}});_dd.hide();}this.projectSelectionDialog.focus();},launchNewProjectDialog:function(_e1,_e2){var _e3=this.confirmSaveOrDiscard();if(_e3.okSelected===true){return;}var me=this;var _e4=new ibm.toolbar.ModalDialog();_e4.open(me.newProjectURL,function(_e5,_e6){var _e7=false;if(_e6&&_e6.result=="project_created"&&_e6.resultInfo){var _e8=_e6.resultInfo.uuid;if(_e8){if(_e2){_e2(_e8);}else{me.enterProject(_e8,"utb:open");}_e7=true;}}if(_e7===false&&_e3.wasDirty===true){com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);}},_e1,null,null,null,true,{w:900});},launchViewProjectDialog:function(_e9,_ea){var _eb=this.confirmSaveOrDiscard();if(_eb.okSelected===true){return;}var me=this;var _ec=me.viewProjectURLPrefix+_e9;var _ed=me._createProjectURL(null,"utb:closed");var _ee=new ibm.toolbar.ModalDialog();var _ef;_ee.open(_ec,function(_f0,_f1){_ef=me._onDialogClose(_f1,_e9,_ed);},_ea,null,null,null,true,{w:900});if(_ef===false&&_eb.wasDirty===true){com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);}},_onDialogClose:function(_f2,_f3,_f4){var me=ibm.toolbar.ProjectSupport;var _f5=_f3;var _f6=false;if(_f2){var _f7=_f2.result;if(_f7=="project_deleted"||_f7=="project_published"){me.loadTop(_f4);_f6=true;}else{me.loadTop();_f6=true;}}else{me.loadTop();_f6=true;}return _f6;},showErrorMsg:function(msg,_f8){var _f9=new com.ibm.widgets.StatusMessage("error",msg,_f8);i$.fireEvent("/message/status",[{message:_f9,uid:"ibmStatusBox"}]);},showToolbarErrorMsg:function(msg){if("localStorage" in window&&window["localStorage"]!==null){localStorage["com.ibm.wp.toolbar.msg.type"]="error";localStorage["com.ibm.wp.toolbar.msg.msg"]=msg;}},showInfoMsg:function(msg){if("localStorage" in window&&window["localStorage"]!==null){localStorage["com.ibm.wp.toolbar.msg.type"]="info";localStorage["com.ibm.wp.toolbar.msg.msg"]=msg;}},showWaitDialog:function(msg){var _fa=new com.ibm.pb.customize.LotusWaitingDialog({message:msg,spinner:ibmCfg.themeConfig.themeRootURI+"/css/images/loading.gif"});_fa.show();return _fa;},handleTimeout:function(_fb){var _fc=_fb.xhr.getResponseHeader("Content-Type")||"";if((_fc.indexOf("text/html")==0)||(_fb.xhr.status==401)||(_fb.xhr.status==403)){window.setTimeout(function(){var _fd=document.location.href;if(_fd.charAt(_fd.length-1)!=="/"){_fd+="/";}document.location.assign(_fd+"?uri=utb:closed");},0);}},getBundle:function(){return dojo.i18n.getLocalization("com.ibm.bundles","Shelf");},isRTL:function(_fe){return ("iw"==_fe||"ar"==_fe||"fa"==_fe||"ur"==_fe||"he"==_fe);},load:function(url){com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(false);dojo.cookie("modified.id",new Date().getTime(),{path:ibmPortalConfig.portalContext});if(url){window.location.href=url;}else{window.location.href=window.location.href;}},loadTop:function(url){com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(false);dojo.cookie("modified.id",new Date().getTime(),{path:ibmPortalConfig.portalContext});if(url){top.location.href=url;}else{top.location.href=top.location.href;}},getHiddenNode:function(){var c=dojo.query(".hiddenWidgetsContainer","layoutContainers");if(c.length<1){return null;}else{return c[0];}},toggleContent:function(_ff){var n=ibm.toolbar.ProjectSupport.getHiddenNode();if(n){dojo.style(n,"display",_ff.metadata.style);i$.fireEvent("wptheme/contextMenu/invalidate/all");}},canShowContent:function(){var n=ibm.toolbar.ProjectSupport.getHiddenNode();return n&&dojo.style(n,"display")=="none";},canHideContent:function(){var n=ibm.toolbar.ProjectSupport.getHiddenNode();return n&&dojo.style(n,"display")!="none";}};}if(!dojo._hasResource["ibm.toolbar.PreviewSupport"]){dojo._hasResource["ibm.toolbar.PreviewSupport"]=true;dojo.provide("ibm.toolbar.PreviewSupport");ibm.toolbar.PreviewSupport={launchPreviewURL:"?uri=op:ibm.portal.operations.showPreviewScreen()&returnURI=dialog:CloseModalDialog",launchPreviewDialog:function(){var _100=dojo.i18n.getLocalization("com.ibm.bundles","Shelf"),_101=_100["utb_preview_as_user"]||"Preview as User";var _102=new ibm.toolbar.ModalDialog();_102.open(ibm.toolbar.PreviewSupport.launchPreviewURL,function(_103,_104){if(_103==="ok"&&_104&&_104.userID){var url=top.location.href;url=url.replace(_104.path.value[0],_104.path.value[0]+_104.userID.value[0]);url+=url.indexOf("?")<0?"?":"&";url+="uri=utb:closed";top.location.href=url;}},_101);},canAnonymousUserAccessPage:function(){return ibmToolbarConfig.canAnonymousUserAccessPage;}};} dojo.provide("pagebuilder.nls.projectMenu_en");dojo.provide("com.ibm.bundles.nls.Shelf");com.ibm.bundles.nls.Shelf._built=true;dojo.provide("com.ibm.bundles.nls.Shelf.en");com.ibm.bundles.nls.Shelf.en={"mashups_hub_gadgets_label":"Gadgets","change_style_light":"Light","change_layout_restoreLayout":"Restore previous layout","add_content_data_viewer":"Data Viewer","add_content_legacyError2":"Content cannot be added to pages with legacy layouts. Assign a layout template before continuing.","menu_unselected_text":"press enter to browse this category","utb_style":"Style","shelf_session_timeout":"Your session has timed out. Log in to continue.","change_layout_label":"Layouts","add_content_cancel":"Cancel","utb_projectmenu_manageprojectdesc":"Manage the selected project","change_style_light_blue":"Light Blue","utb_live_edit":"Live Edit Mode","change_style_greyStyle":"Grey Stripes","utb_save_errors":"There were errors saving the page","change_style_lightGreyStyle":"Light Grey","change_layout_2RowDesc":"This layout has two rows stacking the portlets in a grid.","utb_projectmenu_nofavoriteprojects":"No favorite projects available","utb_overview_more_mappings":"[${0} more]","change_layout_col3CenterDesc":"This layout has two side bars with the main content between them.","change_style_black":"Black","mashup_hub_category_label":"Mashups","change_style_lightGreenStyle":"Light Green","utb_cannot_submit_page_desc":"The page cannot be submitted because the service to do so was not available in the page feed contents.","new_categoryLabel":"New","add_content_launchLabel2":"Content","add_content_feedReader":"Feed Reader","utb_projectmenu_editmode":"Edit","utb_analytics":"Analytics","utb_layout_noChange":"The layout cannot be changed when an item is maximized","add_content_launchLabel":"Add Content","utb_project_mode_desc":"Content changes are added into this project","shelf_saving":"Your changes are being saved...","utb_default_project_template":"Default project template","utb_projectmenu_approveprojectdesc":"Approve the selected project","new_wcm_addWiki":"Add wiki to page","new_wcm_wcmNotCopied":"A WCM library is not finished being copied.","add_content_legacyError":"Content cannot be added to pages with legacy layouts. Assign a layout, and save your changes to use this feature.","shelf_badDatastoreError":"${0} cannot be loaded because the datastore for this content source is undefined.","add_content_close":"close","shelf_bundleUndefined":"The resource bundle ${0} could not be found","utb_projectmenu_approve_with_comments_headline":"Approve Project:","utb_projectmenu_allprojects":"All Projects","shelf_submitSearch":"submit search","change_style_blueStyle":"Blue Lights","utb_projectmenu_projectactionsdesc":"Actions that can be applied to the selected project","utb_projectmenu_editmodepublishedsitedesc":"Launch the published site in edit mode","utb_projectmenu_withdrawprojects":"Withdraw from Review","utb_overview_community":"Community:","change_style_mojo":"Mojo","menu_selected_text":"currently selected category","shelf_saveAndExit":"Save & Exit","change_layout_col3Center":"3 column center","add_content_rss":"RSS","utb_no_edit_page_permission":"You don't have permission to edit this page.","change_layout_col2Left":"2 column left","add_content_widgetActions":"Component options","change_style_gold":"Gold","add_content_feedspace":"Feedspace","utb_projectmenu_submitproject":"Submit for Review","utb_projectmenu_publishedsite":"Published Site","shelf_closeDialog":"Close dialog","change_layout_maximizedError2":"The layout cannot be changed while there is an item maximized.","change_style_launchLabel":"Change Style","new_feed_enterUrl":"Specify a valid URL.","utb_preview":"Preview","add_content_restrictedContentError":"${0} is not allowed on this page","add_content_chart":"Chart","utb_overview_link_manage":"Manage","change_layout_launchLabel":"Change Layout","utb_projectmenu_viewmodepublishedsitedesc":"Launch the published site in view mode","new_generic_add":"Add ${0} to page","utb_create_new_project":"Create a new project:","utb_overview_no_items":"No items to display.","utb_approve":"Approve","new_wcm_wcmNameTaken":"This name is already being used. Try a different name.","change_layout_templateSyncError":"Error with layout template sync.","shelf_socialCategory":"Social Content","new_wcm_blogLibraryDescription":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","shelf_searchSocial":"Search Social","utb_project_action_failed":"Cannot execute project action","utb_project_mode":"Project Edit:","add_content_addToPage":"Add to page","add_content_add":"Add","shelf_unspecified":"Unspecified","add_content_untitled":"Untitled","add_content_tags":"tags: ${0}","change_style_defaultStyle":"Default","change_layout_col2Right":"2 column right","utb_overview_workflow_stage":"Workflow Stage:","change_style_twilight":"Twilight","shelf_feedError":"${0} cannot be loaded. Check the internet connection and proxy settings.","utb_approve_project":"Approve Project","add_content_desc":"Object Palette - Drag and Drop Portlets, Widgets, and Content to the page","utb_projectmenu_reject_with_comments":"Project Rejection","utb_overview_name":"Name:","mashup_hub_components_label":"Components","utb_cannot_reject_page":"Cannot reject the page.","utb_result_error":"Error loading item","category_web_content":"Web Content","utb_projectmenu_allprojectsdesc":"Select from all projects","change_layout_1Row2ColDesc":"This layout has two rows. The second row contains two unequal columns.","utb_public_page":"Public Page","utb_projectmenu_norecentprojects":"No recent projects available","add_content_notLoaded":"This item has not yet loaded.","add_content_ok":"OK","shelf_searchToolsCategory":"Search Tools","utb_save_draft":"Save Draft","change_style_carbon":"Carbon","shelf_searchAll":"Search All","utb_content":"Content","change_style_orangeStyle":"Orange","utb_save_changes":"Save changes","detail_dialog_instruction_text":"press enter to see details dialog","utb_projectmenu_approvalcomments_required":"Required","utb_projectmenu_favoriteprojects":"Favorite Projects:","utb_undo":"Undo","shelf_menu":"Menu","shelf_searchNew":"Search New","new_wcm_blogLibraryDesc":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","add_content_maximizedError2":"Content cannot be added to the page while there is an item maximized.","change_style_launchLabel2":"Style","utb_manage_project":"Manage Project","utb_reject_project":"Reject Project","utb_no":"No","utb_layout_noChange_desc":"Please minimize or restore the maximized content before proceeding to change the layout of the page.","utb_projectmenu_viewmodedesc":"Launch the project in view mode","change_layout_col2Equal":"2 column equal","shelf_configError":"Error reading configuration file or processing its content.","utb_nm_error":"Cannot save the navigation model","change_layout_save_warning":"The layout is not applied until you save the page.","change_style_pinkStyle":"Pink","utb_page_rejected":"The page has been rejected.","add_content_nested_data_viewer":"Nested Data Viewer","change_style_contemporary":"Contemporary","utb_projectmenu_manageproject":"Manage","utb_show_min_toolbar":"Show minimized toolbar","change_style_dark":"Dark","utb_projectmenu_loading":"Loading projects...","utb_projectmenu_approveproject":"Approve","change_layout_custom":"Custom Layout","shelf_jumpTo":"Jump to page","new_feed_enterTitle":"Specify a title.","change_layout_1Row3Col":"1 grid 3 column equal","utb_edit_page_condition":"To edit this page, you must","utb_content_noAdd2":"Content cannot be added to legacy pages","add_content_details":"Details","shelf_searchFeeds":"Search Feeds","new_wcm_addBlog":"Add blog to page","add_content_selectRenderer":"Select how to display the content","utb_page_not_in_draft_state":"You cannot edit this page because the page is no longer in a draft state.","utb_toggle_toolbar":"toggle the toolbar","utb_projectmenu_newproject":"New Project","utb_more":"More","utb_revert":"Revert","utb_project_action_success":"Your action was successfully executed.","utb_workflow":"Workflow","add_content_noPreviewSaved1":"To display this item,","change_style_desc":"Style Palette - Click a style to apply it to the page","add_content_noPreviewSaved2":"save","add_content_noPreviewSaved3":"the page.","utb_save_message":"There are unsaved changes on this page. What do you want to do?","utb_open_project_menu":"launch the project menu","new_blog_copyWcmLibrary":"Your blog is being created...","utb_overview_web_content":"Web Content:","utb_must_be_in_project":"To edit this page, you must be in a project.","mashup_hub_iwidgets_label":"Widgets","utb_end_preview":"Stop Previewing","utb_next_stage":"Next Stage","change_layout_col2RightDesc":"This layout has one side bar on the left with the main content on the right.","add_content_maximizedError":"Content cannot be added to the page while there is a portlet in maximized mode.","utb_customizing_your_page":"You are customizing your page. Changes are only visible to you.","new_wcm_wiki":"Wiki","utb_preview_as_unauthenticated_user":"Preview as unauthenticated user","utb_overview_text_tomorrow":"Tomorrow","add_content_missingRendererError":"Could not find the specified renderer.","change_layout_TopCol3ColDesc":"This layout has two stacked columns. The bottom column contains three unequal columns.","utb_overview_link_view_all":"View all","utb_projectmenu_withdrawprojectdesc":"Withdraw the selected project from review","no_web_content_mapping_desc":"The current page does not have a page content mapping. Please edit the page properties and set a default content mapping.","shelf_hideHiddenContainers":"Hide content","add_content_portlets":"Portlets","change_style_brown":"Brown","shelf_bundleKeyUndefined":"The key ${0} was undefined in the resource bundle ${1}","utb_overview_edit_title":"Edit \"${0}\"","add_content_closeDialog":"Close this dialog","change_layout_maximizedError":"The layout cannot be changed while there is a portlet in maximized mode.","change_layout_col3Equal":"3 column equal","add_content_feed_reader":"Feed Reader","new_wcm_createWcm":"Create WCM Library","utb_open_toolbar":"Open the toolbar","shelf_searchAdminCategory":"Search Administration","utb_discard_project":"Discard Project Draft","utb_projectmenu_noprojectsavailable":"None","shelf_previous":"Previous","new_wcm_feedDescription":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","utb_preview_as_user":"Preview as User","shelf_loading":"Loading...","shelf_page":"Page ${0} of ${1}","utb_project_add_to_favorites":"Add to favorites","change_layout_1Row2Col":"1 grid 2 column unequal","new_feed_title":"Title","change_layout_col2EqualDesc":"This layout has two columns each taking up 50% of the width.","utb_workflow_state_draft":"Draft","new_feed_addFeed":"Add feed to page","change_layout_customDesc":"This layout is a customized T-shaped layout.","utb_new_project_from_template":"New project from:","utb_workflow_state_pending_publish":"Pending publish","utb_edit":"edit","change_layout_desc":"Layout Palette - Click a layout and apply it by saving the page","utb_projectmenu_editmodedesc":"Launch the project in edit mode","change_layout_templateSyncConfirm":"Are you sure you want to sync the layout for this page? All personalizations will be lost.","new_feed_url":"URL","shelf_searchCollabCategory":"Search Collaboration","utb_publish":"Publish","shelf_search":"Search ${0}","change_layout_2Row":"2 grid","change_style_green":"Green","shelf_next":"Next","utb_customizing_this_page":"You are customizing this page. Changes are only visible to you.","utb_yes":"Yes","no_web_content_mapping":"Web Content cannot be added to the page","utb_submit_page_review":"Submit Page for Review","utb_launch_selector":"launch project selector","utb_end_results":"No more results","change_style_blue":"Blue","add_content_all":"All","shelf_communicationsCategory":"Communications","add_content_noPreview":"This item does not support preview","utb_live_edit_desc":"These changes affect everybody","utb_cannot_create_draft":"Cannot create a draft version of the page.","utb_discard_changes":"Discard changes","utb_partClose_toolbar":"Close the statusbar","utb_submit_project":"Submit Project for Review","change_layout_templateSyncLong":"Update the layout of this page by syncing with the template from which it was based. Note that personalizations made to this page will be lost.","utb_projectmenu_projectactions":"Project Actions","utb_projectmenu_projects":"Projects:","shelf_searchWidgets":"Search Widgets","utb_cannot_load_page":"An unexpected error occurred loading the page. The page may be corrupted. Contact your administrator to attempt a resynchronization.","shelf_toolsCategory":"Tools","new_wcm_blogDesc":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_projectment_no_comment_provided":"This project requires a comment.","shelf_saveChanges":"Save","utb_close_toolbar":"Close the toolbar","utb_projectmenu_rejectproject":"Reject","change_layout_templateSync":"Sync assigned layout","utb_cannot_publish_page":"Cannot publish the page for review","shelf_close":"close shelf","utb_layout_noChange2":"The layout cannot be changed on legacy pages","add_content_label":"Content","change_style_greenStyle":"Green Waves","new_wcm_createGeneric":"Create ${0}","utb_overview_loading_content":"Loading content...","new_blog_library_copyWcmLibrary":"Your blog library is being created...","change_style_metal":"Metal","utb_projectmenu_rejectcomments":"Rejection Comments","add_content_noPreviewSaved":"To display this item, save the page.","new_createCategory":"Create","utb_information_message":"Information","shelf_serverError":"Internal server error.","utb_min_toolbar":"Minimize the toolbar","utb_wm_error":"Cannot save the widget model","utb_projectmenu_recentprojects":"Recent Projects:","utb_projectmenu_reject_with_comments_headline":"Reject Project:","new_wcm_blog":"Blog","utb_overview_text_yesterday":"Yesterday","utb_project":"Project","new_portalCategory":"Portal","utb_reject":"Reject","utb_page_actions":"Page Actions","new_portletsCategoryLabel":"Portlets","utb_overview_dots":"...","utb_create_draft":"create a draft","shelf_all":"All","add_content_browseContent":"Browse Content","change_layout_TopCol3Col":"Top column 3 column center","menu_back":"back","generic_browse":"Browse ${0}","new_wcm_addBlogLibrary":"Add blog library to page","utb_show_hidden":"Show Hidden Content","utb_hide_hidden":"Hide Hidden Content","change_style_missingStyleError":"The specified style does not exist","shelf_untitled":"Untitled","shelf_searchPortlets":"Search Portlets","change_style_silver":"Silver","utb_page_submit_wait":"Please wait while your page is being submitted...","utb_cannot_submit_page":"Cannot submit the page for review","shelf_showHiddenContainers":"Show hidden content","utb_partOpen_toolbar":"Open the statusbar","selection_instructions":"press enter to select","new_wcm_wikiDescription":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_layout":"Layout","add_content_rating":"rating: ${0}","change_style_visionary":"Visionary","new_wcm_blogLibrary":"Blog Library","change_style_red":"Red","new_wiki_copyWcmLibrary":"Your wiki is being created...","project_expired":"The current project is no longer available. Click OK to be redirected.","utb_wcm_auth":"Web Content Authoring","add_content_lastMod":"Last modified: ${0}","change_style_browseStyles":"Browse Styles","utb_overview_project_content":"Project Content","shelf_searchCommunications":"Search Communications","utb_close_project_menu":"close the project menu","add_content_addContentError":"Error adding content to the page.","utb_overview_link_read":"Read","change_style_natural":"Natural","change_style_modern":"Modern","add_content_noRating":"no rating","utb_projectmenu_rejectprojectdesc":"Reject the selected project","utb_project_action_wait":"Please wait while your action is being executed...","shelf_noResults":"No results","shelf_searchGadgets":"Search Gadgets","change_layout_TopCol2ColDesc":"This layout has two stacked columns. The bottom column contains two unequal columns.","utb_projectmenu_approve_with_comments":"Project Approval","utb_projectmenu_approvalcomments_optional":"Optional","utb_toggle_statusbar":"toggle the status bar","utb_projectmenu_noprojects":"No projects available","change_style_orchid":"Orchid","shelf_adminCategory":"Administration","mashup_hub_feeds_label":"Feeds","change_style_restoreStyle":"Restore previous style","new_wcm_nameInvalid":"Name must contain at least one alphanumeric (a-zA-Z0-9) character. Try a different name.","utb_last_project":"Open last project:","shelf_unsavedChanges":"The customization shelf has unsaved changes.","change_style_label":"Styles","add_content_addSearch":"Add search results to page","utb_submit_review":"Submit for Review","new_wcm_blogDescription":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_project_add_to_favorites_desc":"Add the new project to the list of favorite projects","change_layout_launchLabel2":"Layout","utb_overview_link_goto":"Go to","utb_projectmenu_approvalcomments":"Approval Comments","change_layout_browseLayouts":"Browse Layouts","change_style_white":"White","change_style_purpleStyle":"Purple","new_creatableCategory":"Creatable","utb_overview_none":"None","utb_overview":"Overview","utb_projectmenu_publishproject":"Publish","utb_workflow_state_published":"Published","utb_end_preview_as":"Stop Previewing as","utb_projectmenu_projectactionsfor":"Actions for","utb_project_publish_failed":"Project failed to publish. Open the manage project view for more details.","utb_private_page":"Private Page","change_layout_col1Desc":"This layout has one column taking up 100% of the available space.","new_wcm_feed":"Feed","change_layout_TopCol2Col":"Top column 2 column unequal","new_feed_feedDesc":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","change_layout_col1":"1 column","shelf_searchCreate":"Search Create","new_wcm_wikiDesc":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_cannot_approve_page":"Cannot approve the page.","utb_projectmenu_viewmode":"View","utb_create_draft_wait":"Please wait while your draft version of the page is being created.","change_style_yellow":"Yellow","utb_overview_text_today":"Today","create":"Create","utb_projectmenu_newprojectdesc":"Create a new project","utb_page_approved":"The page has been approved.","utb_projectmenu_publishprojectdesc":"Publish the selected project","change_layout_col2LeftDesc":"This layout has one side bar on the right with the main content on the left.","utb_content_noAdd_desc":"Please minimize or restore the maximized content before proceeding to add more items to the page.","utb_proceed_discard":"This will reverse all changes made since you last saved. Proceed?","new_wcm_name":"Name","shelf_customize":"Customize","change_style_slate":"Slate","utb_overview_friendly_name":"Friendly Url:","change_layout_1Row3ColDesc":"This layout has two rows. The second row contains three equal columns.","utb_content_noAdd":"Content cannot be added when an item is maximized","shelf_collabCategory":"Collaboration","utb_information":"information","utb_project_create_wait":"Please wait while your project is being created...","utb_overview_page_properties":"Page Properties","utb_unsaved_changes_prompt":"There are unsaved changes on this page. Click OK to save your changes. Click Cancel to discard your changes.","new_wcm_wcmNameInvalid":"Names may contain only alphanumeric (a-zA-Z0-9) characters, spaces, or any of the following characters: \" $ - _ . ! ( ) ,.","utb_overview_link_edit":"Edit","shelf_hiddenContainers":"Hidden Content","utb_more_actions":"More Actions","utb_projectmenu_submitprojectdesc":"Submit the selected project for review","add_content_submit":"Submit","change_layout_col3EqualDesc":"This layout has three columns each taking up 33% of the width."};dojo.provide("com.ibm.bundles.nls.PageCreatorDialog");com.ibm.bundles.nls.PageCreatorDialog._built=true;dojo.provide("com.ibm.bundles.nls.PageCreatorDialog.en");com.ibm.bundles.nls.PageCreatorDialog.en={"wcm_content_scope_label":"Content Scope:","page_dialog_go":"Go","hide_details":"Hide Details","resource_selector_search_resources":"Search Resources","template_dialog_sort_by":"Sort by:","page_dialog_fewer_options":"Fewer Options","template_dialog_table_summary":"Table to display all the available content templates used for page creation","cancel":"Cancel","remember_defaults":"Remember as Default Selection","display_details":"Display details view","page_dialog_page_name":"Page Name:","link_internal":"Link to Portal Page","aggregation_mode":"Aggregation Rendering Mode","page_dialog_more_options":"More Options","page_dialog_share_desc":"Share it with others.","public_tags":"Public tags","wcm_use_page_acl":"Use the access control settings of this page for Web Content","project_dialog_author":"Author:","page_dialog_no_templates_found":"No page templates found.","select":"Select","search_templates_label":"Search Templates:","all":"All","all_templates":"All Templates","page_dialog_page_type":"Page type:","page_dialog_properties_desc":"Edit properties for more advanced properties.","page_dialog_display_actions_option":"Do not show this again","created_by":"Created by ${0}","sort_by":"Sort by:","page_dialog_default":"Default","page_dialog_make_private":"Make this my private page","done":"Done","page_dialog_error_creating_page":"Error creating page.","wcm_site_section_label":"Site Section:","display_summary":"Display summary view","template_dialog_click_to_sort":"Click to sort","page_dialog_customize_page":"Customize Page","tags":"Tags:","page_dialog_friendly_url_modified_warning":"The friendly URL name value has been modified to remove characters that are not allowed.","page_dialog_create_link":"Create Link","page":"Page","resource_selector_no_resources":"No resources have been successfully loaded.","resource_selector_updated_by":"Last updated by","page_dialog_view_properties_now":"View properties now","next":"Next","template_select":"Select Template","template_dialog_search_templates":"Search Templates:","page_template":"Page From Template","page_dialog_no_template":"No template","project_dialog_no_projects":"No projects exist.","show_details":"Show Details","default_text":"Default","aggregation_mode_csa":"Client-Side Aggregation Rendering","page_dialog_friendly_url_required_error":"A friendly URL name is required when using the selected page template.","page_blank":"Blank Page","template_dialog_no_owner":"No owner","template_dialog_click_to_select":"Click to select","page_dialog_link_name":"Link Name:","most_recommendations":"Most Recommendations","jump_to_page_of":"Jump to page ${0} of ${1}","page_dialog_find_template":"Find a template:","page_dialog_close":"Close","page_dialog_select_template":"Select a template","page_dialog_page_template":"Page Template:","select_page_label":"Select page:","page_dialog_type_template":"Choose a template","page_dialog_link_type":"Link Name:","page_dialog_type_blank":"Blank","link_external":"Link to URL","project_dialog_search_projects":"Find project","display_label":"Display:","page_dialog_share_now":"Share now","page_dialog_change":"Change","project_dialog_table_summary":"A table of projects the user can select","page_dialog_customize_desc":"Add content, or change the style and layout.","page_dialog_share_page":"Share Page","page_dialog_blank_page_intro":"Your page is blank. You can:","wcm_create_wcm_page":"Create a Web Content Page","recent_templates":"Recent Templates","url":"URL:","search":"Search","list":"list","create_new_label":"Create New:","template_dialog_title":"Select a Template","template_dialog_search_no_matches":"No matches for the value entered.","page_dialog_page_being_created":"Your page is being created...","resource_selector_table_summary":"Table to display the portal resources that can be selected","page_upload":"Upload Page","create":"Create","title":"Title","resource_select_dialog_select":"Select","template_label":"Template:","page_dialog_create_page":"Create Page","cloud":"cloud","page_dialog_label_name":"Label Name:","project_dialog_title":"Select a project","label":"Label","page_dialog_create_label":"Create Label","resource_select_dialog_title":"Select a Resource","link":"Link","templates":"Templates","page_dialog_friendly_url_name":"Friendly URL Name:","show_label":"Show:","previous":"Previous","template_dialog_owned_by":"Owned by","page_dialog_edit_page_properties":"Edit Page Properties","page_dialog_customize_now":"Customize now","project_dialog_no_author":"No author","page_dialog_page_template_label":"The new page will be based on the following page template:","view_as":"View as","used_in_section_templates":"Templates used by Pages in this section","aggregation_mode_ssa":"Server-Side Aggregation Rendering"}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("pagebuilder.nls.projectMenu",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["ibm.toolbar.ProjectMenuItem"]){dojo._hasResource["ibm.toolbar.ProjectMenuItem"]=true;dojo.provide("ibm.toolbar.ProjectMenuItem");dojo.declare("ibm.toolbar.ProjectMenuItem",[dijit._Widget,dijit._Templated],{templateString:"<li dojoattachpoint=\"menuItem\" class=\"utb-menuItem\" role=\"menuitem\">"+"<a dojoattachpoint=\"mainLink\" title=\"${hoverTitle}\" href=\"javascript:;\"><div class=\"utb-ellipsis\">${title}</div></a>"+"<div>"+"<ul class=\"lotusInlinelist\">"+"<li class=\"lotusFirst\"><a dojoattachpoint=\"viewModeLink\" href=\"javascript:;\" title=\"${viewModeDesc}\">${viewModeLabel}</a></li>"+"<li><a dojoattachpoint=\"editModeLink\" href=\"javascript:;\" title=\"${editModeDesc}\">${editModeLabel}</a></li>"+"</ul>"+"</div>"+"</li>",connections:[],constructor:function(_1){this.bundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.projectSupport=ibm.toolbar.ProjectSupport;this.project=_1.project;this.isSelected=_1.isSelected;this.onMenuItemSelected=_1.onMenuItemSelected;this.domAttributes=_1.domAttributes;},postCreate:function(){if(this.isSelected){dojo.addClass(this.menuItem,"utb-selectedMenuItem");}var _2=this;this._connect(this.menuItem,function(){_2.selectProject();});this._connect(this.viewModeLink,function(){_2.selectProject("view");});this._connect(this.editModeLink,function(){_2.selectProject("edit");});if(this.project){dojo.addClass(this.mainLink,"utb-projectLink");var _3=this.project.summary.lang;if(_3){dojo.attr(this.mainLink,"lang",_3);var _4=this.projectSupport.isRTL(_3)?"RTL":"LTR";dojo.attr(this.mainLink,"dir",_4);}}else{dojo.addClass(this.mainLink,"utb-publishedSiteLink");dojo.removeClass(this.mainLink.firstChild,"utb-ellipsis");}var _5=this.domAttributes;if(_5){for(var _6 in _5){dojo.attr(this.menuItem,_6,_5[_6]);}}},postMixInProperties:function(){var _7=this.project;this.viewModeLabel=this.bundle.utb_projectmenu_viewmode;this.editModeLabel=this.bundle.utb_projectmenu_editmode;this.publishedSiteLabel=this.bundle.utb_projectmenu_publishedsite;if(_7){this.viewModeDesc=this.bundle.utb_projectmenu_viewmodedesc;this.editModeDesc=this.bundle.utb_projectmenu_editmodedesc;}else{this.viewModeDesc=this.bundle.utb_projectmenu_viewmodepublishedsitedesc;this.editModeDesc=this.bundle.utb_projectmenu_editmodepublishedsitedesc;}var _8=this.publishedSiteLabel;var _9=_8;if(_7){_8=_7.title?_7.title.value:_7.name;_8=this._escapeHTML(_8);_9=_7.title?_7.title.value+" ("+_7.name+")":_7.name;}this.title=_8;this.hoverTitle=_9;},destroy:function(){dojo.forEach(this.connections,dojo.disconnect);},onSelectMenuItem:function(_a){if(this.onMenuItemSelected){this.onMenuItemSelected(_a);}else{_a();}},selectProject:function(_b){var _c=this.project?this.project.id:null;var _d=null;if(_b=="view"){_d="utb:closed";}else{if(_b=="edit"){_d="utb:open";}}this.projectSupport.enterProject(_c,_d);return false;},_connect:function(_e,_f){var _10=this;var _11=function(e){e.stopPropagation();_10.onSelectMenuItem(dojo.hitch(_10,_f));};_10.connections.push(dojo.connect(_e,"onclick",_10,_11));},_escapeHTML:function(str){if(str){return (str.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;"));}else{return str;}}});}if(!dojo._hasResource["ibm.toolbar.ProjectMenu"]){dojo._hasResource["ibm.toolbar.ProjectMenu"]=true;dojo.provide("ibm.toolbar.ProjectMenu");dojo.declare("ibm.toolbar.ProjectMenu",[dijit._Widget,dijit._Templated],{templateString:"<div dojoattachpoint=\"projectMenu\" class=\"utb-projectMenu lotusNavMenu utb-hidden\">"+"<div class=\"utb-hoverConnector\" dojoattachpoint=\"hoverConnector\"><div dojoattachpoint=\"menuNotch\" class=\"lotusNavMenuConnector\"></div></div>"+"<div dojoattachpoint=\"projectActions\" class=\"utb-projectLinks lotusBorderTop\" style=\"display: none;\">"+"<ul class=\"lotusInlinelist\">"+"<li class=\"lotusFirst\" dojoattachpoint=\"manageProjectLink\" id=\"${id}_manageProject\"><a href=\"javascript:;\" title=\"${manageProjectDesc}\">${manageProjectLabel}</a></li>"+"<li dojoattachpoint=\"loadingProjectActions\"><span style=\"padding: 0 16px;\"></span></li>"+"<li style=\"display: none;\" dojoattachpoint=\"publishProjectLink\" id=\"${id}_publishProject\"><a href=\"javascript:;\" title=\"${publishProjectDesc}\">${publishProjectLabel}</a></li>"+"<li style=\"display: none;\" dojoattachpoint=\"submitProjectLink\" id=\"${id}_submitProject\"><a href=\"javascript:;\" title=\"${submitProjectDesc}\">${submitProjectLabel}</a></li>"+"<li style=\"display: none;\" dojoattachpoint=\"withdrawProjectLink\" id=\"${id}_withdrawProject\"><a href=\"javascript:;\" title=\"${withdrawProjectDesc}\">${withdrawProjectLabel}</a></li>"+"<li style=\"display: none;\" dojoattachpoint=\"approveProjectLink\" id=\"${id}_approveProject\"><a href=\"javascript:;\" title=\"${approveProjectDesc}\">${approveProjectLabel}</a></li>"+"<li style=\"display: none;\" dojoattachpoint=\"declineProjectLink\" id=\"${id}_declineProject\"><a href=\"javascript:;\" title=\"${declineProjectDesc}\">${declineProjectLabel}</a></li>"+"</ul>"+"</div>"+"<div class=\"utb-publishedSite lotusBorderTop\">"+"<ul dojoattachpoint=\"publishedSite\" class=\"utb-menu\" role=\"menu\">"+"</ul>"+"</div>"+"<div class=\"lotusBorderTop\"></div>"+"<ul dojoattachpoint=\"recentProjectsMenu\" class=\"utb-menu utb-recentProjects utb-left\" role=\"menu\">"+"<li class=\"utb-labelMenuItem utb-headerMenuItem pagebuilderSprite\">"+"<span>${recentProjectsLabel}</span>"+"</li>"+"<li dojoattachpoint=\"loadingRecentProjects\" class=\"utb-labelMenuItem lotusInactive\" role=\"menuitem\" tabindex=\"0\">"+"<span>${loadingProjectsLabel}</span>"+"</li>"+"<li dojoattachpoint=\"noRecentProjects\" class=\"utb-labelMenuItem lotusInactive\" style=\"display: none;\" role=\"menuitem\" tabindex=\"0\">"+"<span>${noProjectsLabel}</span>"+"</li>"+"</ul>"+"<ul dojoattachpoint=\"favoriteProjectsMenu\" class=\"utb-menu utb-favoriteProjects\" role=\"menu\">"+"<li class=\"utb-labelMenuItem utb-headerMenuItem pagebuilderSprite\">"+"<span>${favoriteProjectsLabel}</span>"+"</li>"+"<li dojoattachpoint=\"loadingFavoriteProjects\" class=\"utb-labelMenuItem lotusInactive\" role=\"menuitem\" tabindex=\"0\">"+"<span>${loadingProjectsLabel}</span>"+"</li>"+"<li dojoattachpoint=\"noFavoriteProjects\" class=\"utb-labelMenuItem lotusInactive\" style=\"display: none;\" role=\"menuitem\" tabindex=\"0\">"+"<span>${noProjectsLabel}</span>"+"</li>"+"</ul>"+"<div class=\"utb-projectLinks lotusBorderTop utb-clearing\">"+"<ul class=\"lotusInlinelist\">"+"<li dojoattachpoint=\"allProjectsLink\" id=\"${id}_allProjects\" class=\"lotusFirst\"><a href=\"javascript:;\" title=\"${allProjectsDesc}\">${allProjectsLabel}</a></li>"+"<li dojoattachpoint=\"newProjectLink\" id=\"${id}_newProject\"><a href=\"javascript:;\" title=\"${newProjectDesc}\">${newProjectLabel}</a></li>"+"</ul>"+"</div>"+"</div>",connections:[],constructor:function(_12){this.bundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.projectSupport=ibm.toolbar.ProjectSupport;this.projectID=this.projectSupport.getCurrentProjectUUID();this.maxProjects=_12.maxProjects||5;this.left=_12.left;this.right=_12.right;this.top=_12.top;this.width=_12.width||ibm.toolbar.ProjectMenu.MENU_WIDTH;this.columnWidth=(parseInt(this.width,10)/2-46)+"px";this.connectorWidth=ibm.toolbar.ProjectMenu.CONNECTOR_WIDTH;if(_12.connector){this.connectorLeft=_12.connector.left;this.connectorRight=_12.connector.right;this.connectorTop=_12.connector.top;this.connectorWidth=_12.connector.width;}this.onMenuItemSelected=_12.onMenuItemSelected;this.isUserLoggedIn=ibmPortalConfig.isUserLoggedIn;this.isPUser=ibmToolbarConfig.isPrivilegedUser;},postCreate:function(){this._connect(this.newProjectLink,this.newProject);this._connect(this.allProjectsLink,this.selectFromAllProjects);this._connect(this.manageProjectLink,this.manageProject);if(this.projectID){this._showItem(this.projectActions);}if(!this.isUserLoggedIn){this._hideItem(this.projectActions);this._hideItem(this.newProjectLink);}if(this.top){dojo.style(this.projectMenu,"top",this.top);}if(this.left){dojo.style(this.projectMenu,"left",this.left);}if(this.right){dojo.style(this.projectMenu,"right",this.right);}if(this.width){dojo.style(this.projectMenu,"width",this.width);}if(this.connectorLeft){dojo.style(this.hoverConnector,"left",this.connectorLeft);}if(this.connectorRight){dojo.style(this.hoverConnector,"right",this.connectorRight);}if(this.connectorTop){dojo.style(this.hoverConnector,"top",this.connectorTop);}if(this.connectorWidth){dojo.style(this.hoverConnector,"width",this.connectorWidth);dojo.style(this.menuNotch,"left",parseInt(this.connectorWidth,10)/2+"px");}var _13=this._createProjectMenuItem(null);dojo.place(_13,this.publishedSite,"first");},postMixInProperties:function(){this.recentProjectsLabel=this.bundle.utb_projectmenu_recentprojects;this.favoriteProjectsLabel=this.bundle.utb_projectmenu_favoriteprojects;this.noProjectsLabel=this.bundle.utb_projectmenu_noprojectsavailable;this.allProjectsLabel=this.bundle.utb_projectmenu_allprojects;this.allProjectsDesc=this.bundle.utb_projectmenu_allprojectsdesc;this.newProjectLabel=this.bundle.utb_projectmenu_newproject;this.newProjectDesc=this.bundle.utb_projectmenu_newprojectdesc;this.manageProjectLabel=this.bundle.utb_projectmenu_manageproject;this.manageProjectDesc=this.bundle.utb_projectmenu_manageprojectdesc;this.loadingProjectsLabel=this.bundle.utb_projectmenu_loading;this.publishProjectLabel=this.bundle.utb_projectmenu_publishproject;this.publishProjectDesc=this.bundle.utb_projectmenu_publishprojectdesc;this.submitProjectLabel=this.bundle.utb_projectmenu_submitproject;this.submitProjectDesc=this.bundle.utb_projectmenu_submitprojectdesc;this.withdrawProjectLabel=this.bundle.utb_projectmenu_withdrawprojects;this.withdrawProjectDesc=this.bundle.utb_projectmenu_withdrawprojectdesc;this.approveProjectLabel=this.bundle.utb_projectmenu_approveproject;this.approveProjectDesc=this.bundle.utb_projectmenu_approveprojectdesc;this.declineProjectLabel=this.bundle.utb_projectmenu_rejectproject;this.declineProjectDesc=this.bundle.utb_projectmenu_rejectprojectdesc;this.projectActionsLabel=this.bundle.utb_projectmenu_projectactions;this.projectActionsDesc=this.bundle.utb_projectmenu_projectactionsdesc;this.blankImg=dojo.moduleUrl("dojo","resources/blank.gif").toString();},destroy:function(){dojo.forEach(this.connections,dojo.disconnect);},setupUI:function(){var _14=this;_14.loadRecentProjects(function(_15){if(_14.projectID){_14.loadActions();}_14._displayRecentProjects(_15);},_14.maxProjects);_14.loadFavoriteProjects(function(_16){_14._displayFavoriteProjects(_16);},_14.maxProjects);},show:function(){i$.fireEvent("wptheme/contextMenu/close/all");dojo.removeClass(this.projectMenu,"utb-hidden");i$.addListener("wptheme/contextMenu/close/all",dojo.hitch(this,function(){this.hide();}));},hide:function(){dojo.addClass(this.projectMenu,"utb-hidden");},onSelectMenuItem:function(_17){if(this.onMenuItemSelected){this.onMenuItemSelected(_17);}else{_17();}},loadRecentProjects:function(_18,_19){var _1a=this;_1a.projectSupport.getRecentProjects(function(_1b){if(!_1a.projectID){_18(_1b);}else{if(_1b&&_1b.length>0){var _1c=_1b;var l=_1c.length;var _1d=false;for(var i=0;i<l;++i){var _1e=_1c[i];if(_1e.id==_1a.projectID){_1d=true;break;}}if(_1d){_18(_1c);}else{_1a.projectSupport.getProject(_1a.projectID,function(_1f){if(_1c.length>=5){_1c.pop();}_1c.unshift(_1f);_18(_1c);});}}else{_1a.projectSupport.getProject(_1a.projectID,function(_20){_18([_20]);});}}},_19);},loadFavoriteProjects:function(_21,_22){this.projectSupport.getFavoriteProjects(_21,_22);},loadActions:function(){var _23=this;_23.projectSupport.getPublishProjectURL(_23.projectID,function(url){_23.displayAction(_23.publishProjectLink,url,true);});_23.projectSupport.getSubmitProjectURL(_23.projectID,function(url){_23.displayAction(_23.submitProjectLink,url);});_23.projectSupport.getWithdrawProjectURL(_23.projectID,function(url){_23.displayAction(_23.withdrawProjectLink,url);});_23.projectSupport.getApproveProjectURL(_23.projectID,function(url){_23.displayActionWithComment(_23.approveProjectLink,url,true);});_23.projectSupport.getRejectProjectURL(_23.projectID,function(url){_23.displayActionWithComment(_23.declineProjectLink,url,false);});},displayAction:function(_24,_25,_26){if(_25){this._showItem(_24);var _27=this.projectSupport;this._connect(_24,(_26?function(){_27.workflowActionPublishProject(_25);}:function(){_27.workflowActionProject(_25);}));}this._hideItem(this.loadingProjectActions);},displayActionWithComment:function(_28,_29,_2a){if(_29){this._showItem(_28);var _2b=this;var _2c=this.projectSupport;this._connect(_28,function(){_2c.workflowActionWithCommentProject(_2b.projectID,_29,_2a);});}},_displayRecentProjects:function(_2d){this._displayProjects(_2d,{projectMenu:this.recentProjectsMenu,loadingMenuItem:this.loadingRecentProjects,noProjectsMenuItem:this.noRecentProjects});},_displayFavoriteProjects:function(_2e){this._displayProjects(_2e,{projectMenu:this.favoriteProjectsMenu,loadingMenuItem:this.loadingFavoriteProjects,noProjectsMenuItem:this.noFavoriteProjects});},_displayProjects:function(_2f,_30){var _31=this;var _32=_30.loadingMenuItem;if(_2f&&_2f.length>0){_31._hideItem(_32);var _33=_30.projectMenu;var _34={"style":"width: "+_31.columnWidth+";"};dojo.forEach(_2f,function(_35){var _36=_31._createProjectMenuItem(_35,_34);dojo.place(_36,_33,"last");});}else{_31._hideItem(_32);_31._showItem(_30.noProjectsMenuItem);}},_createProjectMenuItem:function(_37,_38){var _39={};_39.project=_37;_39.isSelected=(!this.projectID&&!_37)||(_37&&this.projectID===_37.id);_39.onMenuItemSelected=this.onMenuItemSelected;_39.domAttributes=_38;var _3a=new ibm.toolbar.ProjectMenuItem(_39);return _3a.domNode;},_connect:function(_3b,_3c){var _3d=this;var _3e=function(e){e.stopPropagation();_3d.onSelectMenuItem(dojo.hitch(_3d,_3c));};_3d.connections.push(dojo.connect(_3b,"onclick",_3d,_3e));},_hideItem:function(_3f){if(_3f){dojo.style(_3f,"display","none");}},_showItem:function(_40){if(_40){dojo.style(_40,"display","");}},selectFromAllProjects:function(){this.projectSupport.launchProjectSelector();},newProject:function(){this.projectSupport.launchNewProjectDialog(this.newProjectLabel);},manageProject:function(){this.projectSupport.launchViewProjectDialog(this.projectID,this.manageProjectLabel);}});ibm.toolbar.ProjectMenu.MENU_WIDTH=430;ibm.toolbar.ProjectMenu.CONNECTOR_WIDTH=250;}i$.addOnLoad(function(){var _41=ibm.toolbar.ProjectSupport;var _42=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");var _43=dojo.byId("utb-project-info");var _44=dojo.byId("utb-project-menu-container");var _45=dojo.byId("utb-project-btn");var _46=null;var _47=null;var _48=null;var _49=null;ibmToolbarConfig.openProjectMenu=function(){if(_47){clearTimeout(_47);}if(!_46){dojo["require"]("ibm.toolbar.ProjectMenu");var _4a=ibmCfg.themeConfig.isRTL;var _4b={};var _4c=_43.offsetWidth;var _4d=_43.offsetHeight;var _4e=ibm.toolbar.ProjectMenu.MENU_WIDTH;_4b.width=_4e+"px";var _4f=_4c+40;var _50=dojo.isIE==7?"16px":_4d/2+"px";_4b.top=_50;var _51=(_4c-_4e)/1.2;if(_4a){_4b.right=_51+"px";}else{_4b.left=_51+"px";}_4b.connector={};var _52=Math.abs(_51)-13-(_4f-_4c)/2;if(_4a){_4b.connector.right=_52+"px";}else{_4b.connector.left=_52+"px";}_4b.connector.width=_4f+"px";_4b.onMenuItemSelected=function(_53){closeProjectMenu();_53();};_46=new ibm.toolbar.ProjectMenu(_4b);_46.setupUI();_44.appendChild(_46.domNode);}if(!_48){_48=dojo.connect(_43,"onmouseenter",ibmToolbarConfig,"openProjectMenu");}if(_49){dojo.disconnect(_49);}_49=dojo.connect(_43,"onclick",closeProjectMenu);_45.title=_42["utb_close_project_menu"];_46.show();};closeProjectMenu=function(){_47=setTimeout(function(){if(_46){_46.hide();}if(_48){dojo.disconnect(_48);_48=null;}if(_49){dojo.disconnect(_49);}_49=dojo.connect(_43,"onclick",ibmToolbarConfig,"openProjectMenu");_45.title=_42["utb_open_project_menu"];},500);};if(ibmToolbarConfig.inManagedPages&&!(com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getPageMode()==="edit"&&ibmToolbarConfig.isPrivilegedUser)){if(_45){_49=dojo.connect(_43,"onclick",ibmToolbarConfig,"openProjectMenu");dojo.connect(_43,"onkeydown",function(e){if(e.keyCode==13){ibmToolbarConfig.openProjectMenu();}});dojo.connect(_43,"onmouseleave",closeProjectMenu);}}});if(!dojo._hasResource["com.ibm.widgets.ResourceSelector"]){dojo._hasResource["com.ibm.widgets.ResourceSelector"]=true;dojo.provide("com.ibm.widgets.ResourceSelector");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("dijit.Tooltip");dojo.require("dojo.i18n");dojo.require("dijit.form.FilteringSelect");dojo.require("dijit.form.TextBox");dojo.declare("com.ibm.widgets.ResourceSelector",[dijit._Widget,dijit._Templated],{shelfBundle:null,dialogBundle:null,blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString(),autofocus:false,baseUrl:null,feedQueryUrl:null,feedQueryUrlTemplate:null,feedSupportsSearch:false,feedSearchParam:"",atomFeed:true,resourceData:null,filteredResourceData:null,selectedResourceId:null,selectedRow1:null,selectedRow2:null,sortResultMult:1,entryStartIndex:0,value:{},searchResults:null,wasLastKeyEnter:false,outerDivClass:"lotusDialog",showTruncationMessage:false,connections:[],_lastUsedFeedQueryUrl:null,templateString:"<form class=\"lotusForm2 utb-resource-selector\" dojoAttachPoint=\"resourceSelectForm,containerNode\" action=\"javascript:;\">"+"<div class=\"lotusFormField\">"+"<div><label id=\"${id}_search_title\" for=\"${id}_search\">${nlsSearchResourcesLabel}</label></div>"+"<table class=\"lotusLayout\" cellspacing=\"0\" role=\"presentation\"><tr>"+"<td id=\"${id}_search_cell\"><span id=\"${id}_search\" dojoAttachPoint=\"searchSelect\"></span></td>"+"<td class=\"lotusSearch lotusHidden\" dojoAttachPoint=\"searchIconCell\">"+"<span class=\"lotusBtnImg\" title=\"${nlsSubmitSearch}\" >"+"<input class=\"lotusSearchButton\" dojoAttachPoint=\"searchIconInput\" type=\"image\" alt=\"${nlsSubmitSearch}\" src=\"${blankImg}\" />"+"<a href=\"javascript:;\" class=\"lotusAltText\" dojoAttachPoint=\"searchIconAltLink\">${nlsSubmitSearch}</a>"+"</span>"+"</td>"+"</tr>"+"</table>"+"</div>"+"<div class=\"lotusHidden lotusMessage2 lotusWarning\" role=\"alert\" dojoAttachPoint=\"truncationMsgDIV\">"+"<img class=\"lotusIcon lotusIconMsgWarning\" width=\"21\" height=\"21\" src=\"${blankImg}\" alt=\"Warning\" dojoAttachPoint=\"truncationMsgIcon\"/>"+"&nbsp;"+"<span role=\"alert\" class=\"lotusMessageBody\" dojoAttachPoint=\"truncationMsgText\"></span>"+"</div>"+"<div class=\"lotusSort\">"+"<ul class=\"lotusInlinelist\">"+"<li class=\"lotusFirst\">${nlsSortLabel}</li>"+"<li class=\"lotusLast\"><a dojoAttachPoint=\"sortLink\" dojoAttachEvent=\"onclick:_toggleSort\" role=\"button\" title=\"${nlsClickToSort}\" class=\"lotusActiveSort lotusAscending\" tabindex=\"0\" href=\"javascript:;\">${nlsTitle}<span dojoAttachPoint=\"sortLinkIndicator\" class=\"lotusAltText\">&#x2191;</span></a></li>"+"</ul>"+"</div>"+"<div class=\"utb-selector-table\">"+"<fieldset style=\"float:none;\">"+"<legend style=\"display:none;\">"+"${nlsResourceTableSummary}"+"</legend>"+"<table id=\"resourceSelectorTable\" class=\"lotusTable lotusClear\" border=\"0\" cellSpacing=\"0\" cellPadding=\"0\" summary=\"${nlsResourceTableSummary}\">"+"<tbody dojoAttachPoint=\"resourceTableBody\">"+"</tbody>"+"</table>"+"</fieldset>"+"</div>"+"<div role=\"alert\" dojoAttachPoint=\"noResourcesDIV\">${nlsNoResources}</div>"+"<div class=\"lotusHidden\" id=\"resourceSelectorProgressID\" name=\"resourceSelectorProgress\" dojoAttachPoint=\"progressDIV\">"+"<div>"+"<span class=\"lotusLoading\"><img width=\"21\" height=\"21\" src=\"${blankImg}\" alt=\"${nlsLoading}\" role=\"presentation\"></span>&nbsp;<span role=\"alert\">${nlsLoading}</span>"+"</div>"+"</div>"+"</form>",constructor:function(){this.shelfBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.dialogBundle=dojo.i18n.getLocalization("com.ibm.bundles","PageCreatorDialog");this.nlsSubmitSearch=this.shelfBundle["shelf_submitSearch"];this.nlsSortLabel=this.dialogBundle["template_dialog_sort_by"];this.nlsClickToSort=this.dialogBundle["template_dialog_click_to_sort"];this.nlsClickToSelect=this.dialogBundle["template_dialog_click_to_select"];this.nlsPersonLabel=this.dialogBundle["resource_selector_updated_by"];this.nlsNoUser="";this.nlsTitle=this.dialogBundle["title"];this.nlsResourceTableSummary=this.dialogBundle["resource_selector_table_summary"];this.nlsNoResources=this.dialogBundle["resource_selector_no_resources"];this.nlsLoading=this.shelfBundle["shelf_loading"];this.nlsSearchResourcesLabel=this.dialogBundle["resource_selector_search_resources"];this.nlsSearchNoMatches=this.dialogBundle["template_dialog_search_no_matches"];this.baseUrl=location.protocol+"//"+location.host+ibmPortalConfig.contentHandlerURI;},postCreate:function(){this.inherited(arguments);this._lastUsedFeedQueryUrl=this.feedQueryUrl;if(this.feedSupportsSearch===true){this._loadSearchResults("");this._populateSearchSelect();this._initializeSearchIcon();}else{this._loadResourceData();this._populateSearchSelect();}},getAvailableResourcesCount:function(_54){return 0;},getMaxResourcesCount:function(_55){return 0;},_buildFeedQueryUrlFromSearchTerm:function(_56){if(_56===null){_56="";}if(_56!==""){if((typeof this.feedQueryUrlTemplate=="string")&&(this.feedQueryUrlTemplate!=="")){if((typeof this.feedSearchParam=="string")&&(this.feedSearchParam!=="")){var _57={};_57[this.feedSearchParam]=_56;this._lastUsedFeedQueryUrl=dojo.string.substitute(this.feedQueryUrlTemplate,_57);}else{this._lastUsedFeedQueryUrl=this.feedQueryUrlTemplate;}}else{this._lastUsedFeedQueryUrl=this.feedQueryUrl;}}else{this._lastUsedFeedQueryUrl=this.feedQueryUrl;}},_hideLoadingDiv:function(){dojo.addClass(this.progressDIV,"lotusHidden");},_hideTruncationMsgDiv:function(){dojo.addClass(this.truncationMsgDIV,"lotusHidden");},_initializeSearchIcon:function(){dojo.removeClass(this.searchIconCell,"lotusHidden");this.connections.push(dojo.connect(this.searchIconInput,"onclick",this,"_runSearch"));this.connections.push(dojo.connect(this.searchIconAltLink,"onclick",this,"_runSearch"));},_escapeHTML:function(str){return str.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;");},_createHelpIcon:function(_58,_59,_5a){var _5b=dojo.create("a",{"id":_59,"role":"button","href":"javascript:void(0);","class":this.searchCssClass},_58);var _5c=dojo.create("img",{"src":this.blankImg,"alt":"","role":"presentation","width":"16","height":"16"},_5b);var _5d=dojo.create("span",{"class":"lotusAltText","innerHTML":"?"},_5b);var ttp=new dijit.Tooltip({connectId:[_59],label:_5a,position:["below"]});return ttp;},_populateSearchSelect:function(){var _5e=this.searchSelect;var _5f;if(!this.feedSupportsSearch){_5f=dojo.create("option",{innerHTML:""},_5e);_5f.setAttribute("value","");if(this.resourceData!==null){var _60=this;dojo.forEach(this.resourceData,function(_61,i){var _62=dojo.create("option",{innerHTML:_60._escapeHTML(_61.title)},_5e);_62.setAttribute("value",_61.id);});}_5e=new dijit.form.FilteringSelect({name:_5e.name,displayedValue:"",onChange:dojo.hitch(this,this._search_onChange),isValid:dojo.hitch(this,this._search_isValid),queryExpr:"*${0}*",highlightMatch:"all",invalidMessage:this.nlsSearchNoMatches,autoComplete:false,required:false},_5e);this.connections.push(dojo.connect(_5e,"_openResultList",this,"_search_openResultList"));this.connections.push(dojo.connect(_5e,"_handleOnChange",this,"_search_handleOnChange"));}else{while(_5e.hasChildNodes()){_5e.removeChild(_5e.firstChild);}_5e=new dijit.form.TextBox({name:_5e.name,displayedValue:""},_5e);if(this.nlsSearchTooltip&&this.searchCssClass){this._createHelpIcon(dojo.byId(this.id+"_search_title"),this.id+"_search_tooltip",this.nlsSearchTooltip);}}this.connections.push(dojo.connect(dojo.byId(_5e.id),"onkeypress",this,"_search_onKeypress"));},_runSearch:function(){var _63=dijit.byId(this.searchSelect.id);this._loadSearchResults(_63.displayedValue);},_search_onChange:function(_64){var _65=this.resourceData;if(_65!==null){this._updateSelectedId();if(_64){var _66=dojo.filter(_65,function(_67){return (_67.id===_64);});if(_66.length>0){this.isViewFiltered=true;this.filteredResourceData=_66;this._displayChoices(_66);}}else{if(this.isViewFiltered&&dojo.byId(this.searchSelect.id).value.length===0){this.isViewFiltered=false;this.filteredResourceData=null;this._displayChoices(_65);this.searchResults=null;}}}},_search_isValid:function(){var rv=true;if(this.wasLastKeyEnter&&this.searchResults&&this.searchResults.length===0){rv=false;}return rv;},_search_openResultList:function(_68,_69){this.searchResults=_68;},_search_onKeypress:function(e){if(e&&e.type&&e.keyCode&&e.keyCode===dojo.keys.ENTER){if(this.feedSupportsSearch){this._runSearch();}else{if(this.searchResults&&this.searchResults.length>0&&this.resourceData!==null){this._updateSelectedId();var _6a=this.resourceData;var _6b=this.searchResults;var _6c=[];var ctr=0;dojo.forEach(_6b,function(_6d){var _6e=_6d.value;var _6f=dojo.filter(_6a,function(_70){return (_70.id===_6e);});if(_6f&&_6f.length>0){_6c[ctr++]=_6f[0];}});if(_6c.length===_6a.length){this.isViewFiltered=false;this.filteredResourceData=null;this._displayChoices();}else{if(_6c.length>0){this.isViewFiltered=true;this.filteredResourceData=_6c;this._displayChoices(_6c);}}}this.wasLastKeyEnter=false;if(e&&e.type&&e.keyCode&&e.keyCode===dojo.keys.ENTER){this.wasLastKeyEnter=true;var _71=dijit.byId(this.searchSelect.id);_71.validate(true);}}}},_search_handleOnChange:function(_72,_73){this.inherited(arguments);if(dojo.byId(this.searchSelect.id).value===""&&this.isViewFiltered){this._search_onChange(null);}},_showLoadingDiv:function(){dojo.removeClass(this.progressDIV,"lotusHidden");dijit.setWaiState(this.resourceTableBody,"live","polite");dijit.setWaiState(this.resourceTableBody,"busy","true");},_showTruncationMsgDiv:function(_74,_75){if(this.nlsTruncationMsg&&(this.showTruncationMessage===true)){var msg=dojo.string.substitute(this.nlsTruncationMsg,[_74,_75]);dojo.attr(this.truncationMsgText,"innerHTML",this._escapeHTML(msg));if(this.warningIconClass){dojo.addClass(this.truncationMsgIcon,this.warningIconClass);}dojo.removeClass(this.truncationMsgDIV,"lotusHidden");}},_loadResourceData:function(_76,_77,_78){if(this.resourceData===null){this.resourceData=[];this._showLoadingDiv();this._hideTruncationMsgDiv();var _79=this.baseUrl;var _7a="";var idx=this.baseUrl.indexOf("?");if(idx>-1){_7a=this.baseUrl.substring(idx+1,this.baseUrl.length);_79=this.baseUrl.substring(0,idx);}var _7b=_79+this._lastUsedFeedQueryUrl;if(_7a.length>0){if(_7b.indexOf("?")>-1){_7b=_7b+"&"+_7a;}else{_7b=_7b+"?"+_7a;}}if(this.atomFeed){this._getEntriesFromAtomFeed(_7b);}else{this._getEntriesFromJsonFeed(_7b);}this._hideLoadingDiv();this._loadComplete();}},_loadSearchResults:function(_7c){this._buildFeedQueryUrlFromSearchTerm(_7c);this._clearResultList(this.resourceTableBody);this._clearResourceData();this._loadResourceData();},_getHref:function(_7d,_7e,_7f){var rv=null;if(_7d.links!==null&&_7d.links.length>0){var _80="related";if(_7f){_80=_7f;}for(var x in _7d.links){var _81=_7d.links[x];if(_81.rel&&_81.rel==_80&&_81.href&&_81.href.indexOf(_7e)>-1){rv=_81.href;break;}}}return rv;},_getUserDataForEntry:function(_82,_83){return null;},_getEntriesFromAtomFeed:function(_84){var _85=this.resourceData;var me=this;var _86=this.entryStartIndex;var _87=new dojox.atom.io.Connection(true,true);_87.getFeed(_84,function(_88){var _89=_88.entries;if(_89){var ctr=0;var _8a=false;for(var i=_86;i<_89.length;i++){var _8b=_89[i];var _8c=_8b.title.value;var _8d="";if(_8b.summary){_8d=_8b.summary.value;}var _8e=_8b.id;var _8f=this.selectedResourceId;var _90=false;if(_8f&&_8f.length>0){_90=(_8f===_8e);if(_90){_8a=true;}}var _91=dojo.hitch(me,me._getUserDataForEntry);var _92=_91(_87,_8b);var _93={id:_8e,title:_8c,description:_8d,user:_92,selected:_90};var _94=dojo.hitch(me,me._processEntryResultsBeforeStoring);_93=_94(_93);if(!_8a&&_93.selected){_8a=true;}_85[ctr++]=_93;}if(!_8a&&_85.length>0){_85[0].selected=true;}}},function(_95,_96){if(_96.xhr.responseText.indexOf("EJQHL0004E")>=0){alert(me.shelfBundle["project_expired"]||"The current project is no longer available. Click OK to be redirected.");top.location.reload();}});},_getEntriesFromJsonFeed:function(_97){var _98=this.resourceData;var me=this;var _99=null;var _9a=dojo.xhrGet({url:_97,sync:true,handleAs:"json",preventCache:true,load:function(_9b){_99=_9b;},error:function(_9c){console.debug("ResourceSelector _getEntriesFromJsonFeed ERROR");console.debug(_9c);}});var _9d=this.getAvailableResourcesCount(_99);var _9e=this.getMaxResourcesCount(_99);if(_9e>_9d){this._showTruncationMsgDiv(_9d,_9e);}else{this._hideTruncationMsgDiv();}if(_99&&_99.feed){var _9f=this.resourceData;var _a0=this.selectedResourceId;dojo.forEach(this._getEntriesAsJSON(_99.feed),function(_a1){var ctr=_98.length;var _a2=_a1.id;var _a3=false;if(_a0&&_a0.length>0){_a3=(_a0===_a2);}else{if(ctr===0){_a3=true;}}var _a4=_a1.title.value;var _a5="";if(_a1.summary){_a5=_a1.summary.value;}var dn=null;dojo.forEach(_a1.author,function(_a6){if(_a6.distinguishedName){dn=_a6.distinguishedName;}});var _a7=_a1.type;var _a8={id:_a2,title:_a4,description:_a5,user:dn,selected:_a3,type:_a7};var _a9=dojo.hitch(me,me._processEntryResultsBeforeStoring);_a8=_a9(_a8);_98[ctr]=_a8;});}},_getEntriesAsJSON:function(_aa){return _aa.entry;},_processEntryResultsBeforeStoring:function(_ab){return _ab;},_stripOffPrefix:function(str,_ac){var rv=str;if(str&&_ac){var pos=str.indexOf(_ac);if(pos>-1){rv=str.substring(pos+_ac.length);}}return rv;},_clearResourceData:function(){this.resourceData=null;},_clearResultList:function(_ad){while(_ad.hasChildNodes()){_ad.removeChild(_ad.firstChild);}dojo.addClass(this.noResourcesDIV,"lotusHidden");},_createRadioButton:function(_ae,_af){if(dojo.isIE&&dojo.isIE<8){var doc=dojo.doc;if(_af){_af=dojo.byId(_af);doc=_af.ownerDocument;}tag=doc.createElement("<input type='radio' name='resourceValue' />");if(_ae){dojo.attr(tag,_ae);}if(_af){dojo.place(tag,_af);}return tag;}else{return dojo.create("input",_ae,_af);}},_loadComplete:function(){this._displayChoices();},_displayChoices:function(_b0){var _b1=ibmCfg.themeConfig.isRTL;var _b2,_b3;if(_b0){_b2=_b0;}else{_b2=this.resourceData;}if(_b2===null||_b2.length===0){if(this.feedSupportsSearch===true){dijit.removeWaiState(this.resourceTableBody,"live");dijit.removeWaiState(this.resourceTableBody,"busy");dojo.removeClass(this.noResourcesDIV,"lotusHidden");}return;}var _b4=this.resourceTableBody;this._clearResultList(_b4);var _b5=-1*this.sortResultMult;var _b6=this.sortResultMult;_b2.sort(function(a,b){var _b7=a.title.toLowerCase(),_b8=b.title.toLowerCase();if(_b7<_b8){return _b5;}if(_b7>_b8){return _b6;}return 0;});var _b9=this.nlsClickToSelect;var _ba=this.nlsPersonLabel;var _bb=this.nlsNoUser;var _bc=false;var _bd=dojo.hitch(this,"_setSelectedRowBackgroundColor");var _be=this.selectedResourceId&&this.selectedRow1;var _bf=this.selectedResourceId;var _c0=this._createRadioButton;var _c1=this.nlsTypeLabels;var _c2=10;var _c3=dojo.create("tr",{style:{display:"none"}},_b4);var th1=dojo.create("th",{innerHTML:this.nlsClickToSelect,scope:"col"},_c3);var th2=dojo.create("th",{innerHTML:"&nbsp;",scope:"col"},_c3);var th3=dojo.create("th",{innerHTML:this.nlsTitle,scope:"col"},_c3);var _c4=this;dojo.forEach(_b2,function(_c5,i){var div;var id=_c5.id;var _c6=_c5.title;var _c7=_c5.user;var tr1=dojo.create("tr",null,_b4);var td1=dojo.create("td",{className:"lotusFirstCell",style:{width:"16px",paddingLeft:"2px"}},tr1);var _c8=_c0({type:"radio",title:_b9,name:"resourceValue",value:id,id:id+"_resource_"+i,className:"lotusCheckbox"},td1);_c4.connections.push(dojo.connect(_c8,"onclick",_c4,function(evt){_bd(tr1);}));var td2=dojo.create("td",{style:{width:"1px",paddingLeft:"0px",paddingRight:"0px",innerHTML:"&nbsp;"}},tr1);var td3=dojo.create("td",null,tr1);var _c9=dojo.create("label",{style:{margin:"1px"}},td3);dojo.attr(_c9,"for",id+"_resource_"+i);var h4=dojo.create("h4",{"id":id+"_header"},_c9);dojo.create("span",{dir:_b1?"RTL":"LTR",innerHTML:_c4._escapeHTML(_c6)},h4);if(_c5.type&&_c1&&_c1[_c5.type]){var pos=_b1?"first":"last";dojo.create("span",{className:"lotusType",innerHTML:_c4._escapeHTML(_c1[_c5.type])},h4,pos);}if(_c7){div=dojo.create("div",{className:"lotusMeta",innerHTML:_c4._escapeHTML(_ba)+"&nbsp;"},td3);var _ca="";var _cb="";var _cc="";if(dojo.isString(_c7)){_ca=_c7;if(_c7.indexOf("uid=")===0){var _cd=_c7.indexOf(",");if(_cd>4){_ca=_c7.substring(4,_cd);}}_cc=_c7;_cb=_c5.ownerId?_c5.ownerId:"";}else{if(dojo.isObject(_c7)&&_c7.getDisplayName){_ca=_c7.getDisplayName();_cb=_c7.getID();_cc=_c7.dn;}}var _ce=dojo.create("span",{className:"vcard X-sametime-resolve"},div);var _cf=dojo.create("a",{className:"fn lotusPerson hasHover",innerHTML:_c4._escapeHTML(_ca),onClick:"javascript:SemTagMenu.a11y(event);",href:"javascript:void(0);"},_ce);_cf.onmouseover=dojo.hitch(_cf,function(_d0){if(!_d0){_d0=window.event;}var _d1=_d0.target?_d0.target:_d0.srcElement;if(_d1){var _d2=_d1.getBoundingClientRect();var _d3=_d2.height?_d2.height:_d2.bottom-_d2.top;var _d4=window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop;this._ts_y=Math.floor(_d2.top+_d3+_d4);}});_cf.onfocus=_cf.onmouseover;var _d5=dojo.create("span",{className:"userObjectId",style:{display:"none"},innerHTML:_c4._escapeHTML(_cb)},_ce);var _d6=dojo.create("span",{className:"uid",style:{display:"none"},innerHTML:_c4._escapeHTML(_cc)},_ce);_bc=true;}else{div=dojo.create("div",{className:"lotusMeta",innerHTML:_c4._escapeHTML(_bb)},td3);}var _d7=_c5.description;if(_d7&&_d7!==""){dojo.style(td3,"paddingBottom","0px");var tr2=dojo.create("tr",{className:"lotusDetails"},_b4);var td4=dojo.create("td",{className:"lotusFirstCell",innerHTML:"&nbsp;"},tr2);var td5=dojo.create("td",{innerHTML:"&nbsp;"},tr2);var td6=dojo.create("td",{className:"lotusLastCell",colSpan:"2",headers:id+"_header"},tr2);var _d8=dojo.create("p",{innerHTML:_c4._escapeHTML(_d7)},td6);}var _d9=_c5.selected;if(_be){if(_bf===_c5.id){_d9=true;}else{_d9=false;}}if(_d9){if(dojo.isIE==7){dojo.attr(_c8,"defaultChecked","true");}dojo.attr(_c8,"checked","true");_bd(tr1);}});if(_bc){var _da=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.livetext.ServiceModel.SERVICE_NAME);dojo.publish(_da.tagChanged,[_b4]);if(typeof SemTagSvcPortal!="undefined"&&SemTagSvcPortal&&!SemTagSvcPortal.oldFindPosition){SemTagSvcPortal.oldFindPosition=SemTagSvcPortal.findPosition;SemTagSvcPortal.findPosition=function(obj,_db){var pos=SemTagSvcPortal.oldFindPosition(obj,_db);if(obj._ts_y){pos[1]=obj._ts_y;}return pos;};}}dijit.removeWaiState(this.resourceTableBody,"busy");},_toggleSort:function(){var _dc=this.sortLink.className.split(" ");if(this.sortResultMult>0){this.sortResultMult=-1;dojo.html.set(this.sortLinkIndicator,"&#x2193;");_dc[1]="lotusDescending";}else{this.sortResultMult=1;dojo.html.set(this.sortLinkIndicator,"&#x2191;");_dc[1]="lotusAscending";}this.sortLink.className=_dc[0]+" "+_dc[1];this._updateSelectedId();var _dd=null;if(this.isViewFiltered){_dd=this.filteredResourceData;}this._displayChoices(_dd);},_updateSelectedId:function(){if(this.resourceData){var _de=dojo.formToObject(this.resourceSelectForm).resourceValue;if(_de){this.selectedResourceId=_de;}}},_setSelectedRowBackgroundColor:function(_df){if(this.selectedRow1){dojo.style(this.selectedRow1,"backgroundColor","transparent");}if(this.selectedRow2){dojo.style(this.selectedRow2,"backgroundColor","transparent");}dojo.style(_df,"backgroundColor",com.ibm.widgets.ResourceSelector.SELECTED_ROW_COLOR);this.selectedRow1=_df;var _e0=_df.nextSibling;if(_e0&&dojo.attr(_e0,"class")==="lotusDetails"){dojo.style(_e0,"backgroundColor",com.ibm.widgets.ResourceSelector.SELECTED_ROW_COLOR);this.selectedRow2=_e0;}else{this.selectedRow2=null;}},submit:function(){dojo.attr(this.submitDialog,"disabled","disabled");this.hide();this.beforeSubmit();this.onSubmit();},cancel:function(){this.hide();},onChange:function(arg){},onComplete:function(){},beforeSubmit:function(){},getSelection:function(){this.value=dojo.formToObject(this.resourceSelectForm);var _e1="";var _e2="";var _e3="";var _e4=this.value.resourceValue;if(this.resourceData&&_e4){dojo.forEach(this.resourceData,function(_e5,i){if(_e5.id===_e4){if(_e5.title){_e1=_e5.title;}if(_e5.description){_e2=_e5.description;}if(_e5.type){_e3=_e5.type;}}});}this.value.resourceName=_e1;this.value.resourceDescription=_e2;this.value.type=_e3;return this.value;},layout:function(){if(this.domNode.style.display!="none"){this._size();}return this.inherited(arguments);},focus:function(){var _e6,_e7=null;dojo.query("input",this.domNode).forEach(function(_e8,_e9,arr){if(_e8.checked){_e7=_e8;}});if(!_e7){_e6=dijit.byId(this.searchSelect.id);if(_e6){if(_e6.focusNode){_e7=_e6.focusNode;}}}if(_e7){dijit.focus(_e7);}},destroy:function(){this.resourceData=null;dojo.forEach(this.connections,dojo.disconnect);this.inherited(arguments);}});com.ibm.widgets.ResourceSelector.SELECTED_ROW_COLOR="#f2f9ff";}if(!dojo._hasResource["com.ibm.widgets.ResourceSelectDialog"]){dojo._hasResource["com.ibm.widgets.ResourceSelectDialog"]=true;dojo.provide("com.ibm.widgets.ResourceSelectDialog");dojo.require("dijit.Dialog");dojo.require("dojo.i18n");dojo.declare("com.ibm.widgets.ResourceSelectDialog",[dijit.Dialog],{lotusui_id:"dijitDialog_lotusui30_ResSlctDlg_container",lotusui_class:"lotusui30",shelfBundle:null,dialogBundle:null,blankImg:"",autofocus:false,resourceData:null,selectedResourceId:null,sortResultMult:1,value:{},cancelHandler:null,templateString:"<div class=\"lotusDialogBorder\" waistate=\"labelledby-${id}\" wairole=\"dialog\" role=\"dialog\" index=\"-1\" aria-labelledby=\"${id}\" dojoAttachPoint=\"dialogDiv\">"+"<div class=\"lotusDialog\" style=\"min-width: 400px;\">"+"<div class=\"lotusDialogHeader\">"+"<h1 class=\"lotusHeading\">"+"<span dojoAttachPoint=\"titleNode,titleBar\" id=\"${id}ResourceSelectDialogTitleSpan_id\">${nlsResourceSelectTitle}</span>"+"</h1>"+"<a role=\"button\" href=\"javascript:void(0);\" dojoAttachPoint=\"closeButtonNode\" dojoAttachEvent=\"onclick:cancel\" class=\"lotusDialogClose\" title=\"${closeText}\">"+"<img src=\"${_blankGif}\" alt=\"\" aria-label=\"${closeText}\" />"+"<span class=\"lotusAltText\">X</span>"+"</a>"+"</div>"+"<div dojoAttachPoint=\"containerNode\" class=\"lotusDialogContent\" style=\"max-height:1000px\">"+"<div class=\"lotusMessage\" dojoAttachPoint=\"resourceSelectError\" style=\"display: none\" role=\"alert\">"+"<span>${nlsTitleError}</span>"+"</div>"+"<div id=\"${id}_selector\" dojoAttachPoint=\"resourceSelector\"></div>"+"</div>"+"<div class=\"lotusDialogFooter\" dojoAttachPoint=\"dialogFooter\">"+"<input value=\"${okText}\" class=\"lotusBtn\" dojoAttachPoint=\"submitDialog\" dojoAttachEvent=\"onclick:submit\" type=\"submit\"/> "+"<input dojoAttachPoint=\"dialogCancel\" dojoAttachEvent=\"onclick:cancel\" class=\"lotusBtn\" type=\"button\" role=\"button\" title=\"${cancelText}\" value=\"${cancelText}\" />"+"</div>"+"</div>"+"</div>",postMixInProperties:function(){this.shelfBundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.dialogBundle=dojo.i18n.getLocalization("com.ibm.bundles","PageCreatorDialog");this.cancelText=this.shelfBundle["add_content_cancel"];this.closeText=this.shelfBundle["add_content_close"];this.okText=this.dialogBundle["resource_select_dialog_select"]||"Select";this.nlsTitleError=this.shelfBundle["new_feed_enterTitle"];this.nlsResourceSelectTitle=this.dialogBundle["resource_select_dialog_title"];},postCreate:function(){this.inherited(arguments);this._populateResourceSelector();dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");var _ea=window.setTimeout(dojo.hitch(this,function(){if(this.domNode&&this.domNode.style.display!="none"){this.layout();}window.clearTimeout(_ea);}),this.duration+50);},_findOrCreateLotusUIDIV:function(){var _eb=dojo.byId(this.lotusui_id);if(!_eb){_eb=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class,"wairole":"region","role":"region"},dojo.body());}dijit.setWaiState(_eb,"labelledby",this.id+"ResourceSelectDialogTitleSpan_id");return _eb;},_populateResourceSelector:function(){var _ec=this.resourceSelector;this.selectorWidget=new com.ibm.widgets.ResourceSelector({feedQueryUrl:this.feedQueryUrl},_ec);},submit:function(){dojo.attr(this.submitDialog,"disabled","disabled");this.hide();this.beforeSubmit();this.onSubmit();},setCancelHandler:function(_ed){this.cancelHandler=_ed;},cancel:function(){if(this.cancelHandler&&this.cancelHandler!=null){this.cancelHandler();}this.hide();},onChange:function(arg){},onComplete:function(){},beforeSubmit:function(){},onSubmit:function(){this.value=this.selectorWidget.getSelection();this.onChange(this.value);},layout:function(){if(this.domNode.style.display!="none"){this._size();}return this.inherited(arguments);},focus:function(){this.resourceSelectError.style.display="none";this.submitDialog.removeAttribute("disabled");this.show();},show:function(){this.inherited(arguments);setTimeout(dojo.hitch(this.selectorWidget,"focus"),30);},destroy:function(){this.inherited(arguments);},_getFocusItems:function(_ee){var _ef=this.containerNode;this.containerNode=_ee;this.inherited(arguments);this.containerNode=_ef;}});}if(!dojo._hasResource["com.ibm.widgets.ProjectSelectDialog"]){dojo._hasResource["com.ibm.widgets.ProjectSelectDialog"]=true;dojo.provide("com.ibm.widgets.ProjectSelectDialog");dojo.require("dojo.i18n");dojo.declare("com.ibm.widgets.ProjectSelectDialog",[com.ibm.widgets.ResourceSelectDialog],{postMixInProperties:function(){this.inherited(arguments);this.nlsResourceSelectTitle=this.dialogBundle["project_dialog_title"];this.nlsPersonLabel=this.dialogBundle["project_dialog_author"];this.nlsNoUser=this.dialogBundle["project_dialog_no_author"];this.nlsResourceTableSummary=this.dialogBundle["project_dialog_table_summary"];this.nlsNoResources=this.dialogBundle["project_dialog_no_projects"];this.nlsSearchResourcesLabel=this.dialogBundle["project_dialog_search_projects"];this.feedQueryUrl="wcmrest/definedquery/projects?projectstate=ACTIVE&projectstate=PENDING&projectstate=SYNDICATING&projectstate=PUBLISHED_FAILED&projectstate=REVIEW&pagesize=100&mime-type=application/json";},_populateResourceSelector:function(){var _f0=this.resourceSelector;this.selectorWidget=new com.ibm.widgets.ResourceSelector({feedQueryUrl:this.feedQueryUrl,atomFeed:false,_processEntryResultsBeforeStoring:this._processEntryResultsBeforeStoring,nlsPersonLabel:this.nlsPersonLabel,nlsNoUser:this.nlsNoUser,nlsResourceTableSummary:this.nlsResourceTableSummary,nlsNoResources:this.nlsNoResources,nlsSearchResourcesLabel:this.nlsSearchResourcesLabel},_f0);},_processEntryResultsBeforeStoring:function(_f1){if(_f1){var _f2=_f1.id;_f1.id=this._stripOffPrefix(_f2,com.ibm.widgets.ProjectSelectDialog.UUID_SCHEMA);var _f3=ibmToolbarConfig.projectUUID;if(_f3&&_f3.length>0&&(_f3===_f1.id)){_f1.selected=true;}}return _f1;}});com.ibm.widgets.ProjectSelectDialog.UUID_SCHEMA="wcmrest:";} dojo.provide("federation.nls.FederatedDocumentsPickerLayer_en");dojo.provide("com.ibm.workplace.wcm.ecm.picker.nls.FederatedDocumentsPickerUserInterface");com.ibm.workplace.wcm.ecm.picker.nls.FederatedDocumentsPickerUserInterface._built=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.nls.FederatedDocumentsPickerUserInterface.en");com.ibm.workplace.wcm.ecm.picker.nls.FederatedDocumentsPickerUserInterface.en={"docPickerPage":{"docFilterToggleBtnOnTitle":"Hide filter field. Any filtering in effect is deactivated.","fedDocLibTreeHeaderText":"Folders","libFilterTextBoxLabel":"Filter:","docFilterTextBoxTitle":"Enter filter text. Filtering is not case sensitive and affects only expanded folders.","connectingToServerDivText":"Connecting to server...","fedDocTreeHeaderText":"Documents","previewOnLabel":"Preview: On","stepDescriptionWCM":"Select a document.","stepDescriptionPZN":"Select a folder.","pickerSelectedItemLabel":"Selected item:","pickerAuthTypeInfoMsgLabel":"Authentication:","docFilterToggleBtnLabel":"Filter displayed documents","libFilterToggleBtnLabel":"Filter displayed folders","previewOffLabel":"Preview: Off","pickerServerUrlLabel":"Server:","libFilterToggleBtnOffTitle":"Filter displayed folders","fedDocNoItemsInfoTitle":"Information","libFilterTextBoxTitle":"Enter filter text. Filtering is not case sensitive and affects only expanded folders.","previewOnTitle":"Hide documents","fedDocNoItemsInfoImgAlt":"Information","docFilterToggleBtnOffTitle":"Filter displayed documents","connectingToServerImgAlt":"Connecting to server","nothingSelectedText":"Nothing selected","docFilterTextBoxLabel":"Filter:","libFilterToggleBtnOnTitle":"Hide filter field. Any filtering in effect is deactivated.","previewOffTitle":"Display documents in the selected folder","stepLabel":"Step 2 of 2"},"srvConnPage":{"customUrlTextBoxLabel":"Example: http://www.example.com/cmis","authInfoMsgCurrentUser":"Current user","customUrlTextBoxTitle":"URL for the server","authInfoMsgUserPwd":"User name and password","stepDescription":"Select a server and the authentication method.","serverSelectionHeading":"Select a server","presetServerRadioButtonLabel":"Select a predefined server:","stepLabel":"Step 1 of 2","authWidgetSectionTitle":"Change authentication method","altTextInformation":"Information","fedDocPickerAuthTypeInfoMsgLabel":"Authentication:","authInfoMsgNoAuth":"No authentication","customServerRadioButtonLabel":"Enter the URL for the server:","authInfoMsgUnknown":"Unknown authentication method","authInfoMsgVault":"Credential vault (${0})"},"docPickerDialog":{"cancelLinkText":"Cancel","backButtonCaption":"Back","titlePZN":"Select a Folder","wizardErrorDivTitle":"Error","cancelLinkTitle":"Cancel","nextButtonCaption":"Next","detectingFeedTypeImgAlt":"Detecting feed type","finishButtonCaption":"Finish","nextButtonTitle":"Go to next page","gettingVaultDivText":"Getting vault slot...","titleWCM":"Select a Document","gettingVaultImgAlt":"Getting vault slot","detectingFeedTypeDivText":"Detecting feed type...","errorImgAlt":"Error","finishButtonTitle":"Finish","backButtonTitle":"Go to previous page"},"quickrLaunchPage":{"stepDescriptionWCM":"Select a document","stepDetailedInfoText":"To select a folder from a document services server, such as IBM DB2 Content Manager, IBM FileNet or IBM Lotus Quickr, click the <b>Select</b> button to connect to the server and select the folder using the <b>Select a Folder</b> window.","stepDescription":"Select a folder","stepDetailedInfoTextWCM":"To select a document from a document services server, such as IBM DB2 Content Manager, IBM FileNet or IBM Lotus Quickr, click the <b>Select</b> button to connect to the server and select the document using the <b>Select a Document</b> window.","selectedDocumentLabel":"Selected document:","stepLabel":"Step 2 of 2","selectedFolderLabel":"Selected folder:","selectedFolderTitle":"The link to the selected document or folder","selectButtonLabel":"Select...","selectButtonTitle":"Click here to open the Quickr Picker Dialog to select a document or folder"},"authWidget":{"title":"Change authentication method","vaultRadioButtonLabel":"Use credential vault:","noAuthRadioButtonLabel":"No authentication","vaultDropDownListLabel":"Vault Slot:","currentUserRadioButtonLabel":"Use current user","simpleAuthUserLabel":"User name:","simpleAuthPwdLabel":"Password:","userPwdRadioButtonLabel":"Use user name and password:"},"expSectionWidget":{"sectionLinkCollapseTitle":"Click to collapse","sectionLinkExpandTitle":"Click to expand"}};dojo.provide("com.ibm.workplace.wcm.ecm.picker.nls.FederatedDocumentsPickerMessages");com.ibm.workplace.wcm.ecm.picker.nls.FederatedDocumentsPickerMessages._built=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.nls.FederatedDocumentsPickerMessages.en");com.ibm.workplace.wcm.ecm.picker.nls.FederatedDocumentsPickerMessages.en={"docPickerPage":{"noItemsMessage":"No items found in this folder."},"srvConnPage":{"noServersMessage":"No predefined servers found.","errorVaultSlotMissing":"The configured Credential Vault Slot ID for the selected server is \"${0}\", which does not exist in the system."},"docPickerDialog":{"errorCouldNotGetVault":"An attempt to get the vault slot for the provided authentication information failed.","errorNotAllWidgetsDefined":"One or more page widgets of the Federated Documents Dialog could not be created.","errorQDSNotEnabled":"The selected server uses the document services feed type, but the support of this type of feed is currently disabled. If access to the selected server is required, contact your system administrator.","errorGenericException":"An unknown javascript exception occurred.","errorCouldNotDetectFeedType":"An attempt to detect the feed type for the provided URL failed.","errorUnknownFeedType":"The feed type for the provided URL is unknown."},"srvCommunication":{"attributeNotStringable":"The attribute \"${0}\" of function \"${1}\" cannot be interpreted as a string value.","errorHttp410":"The requested resource is no longer available. (HTTP Status Code 410)","errorHttp411":"The request is invalid: Length Required. (HTTP Status Code 411)","errorHttp412":"The request is invalid: Precondition Failed. (HTTP Status Code 412)","errorHttp413":"The request is invalid: Request Entity Too Large. (HTTP Status Code 413)","errorFetchingData":"Fetching data from backend failed. If the problem persists, contact your system administrator.","errorHttp414":"The request is invalid: Request-URI Too Long. (HTTP Status Code 414)","errorHttp415":"The request is invalid: Unsupported Media Type. (HTTP Status Code 415)","errorHttp416":"The request is invalid: Requested Range Not Satisfiable. (HTTP Status Code 416)","errorHttp417":"The request is invalid: Expectation Failed. (HTTP Status Code 417)","errorDetailsHttp403":"Check the Ajax Proxy configuration.","errorHttp400":"The URL is not valid and could not be processed. (HTTP Status Code 400)","errorDetailsHttps401":"Check the security setup for HTTPS communication.","errorHttp401":"The request is not authorized and requires user authentication. (HTTP Status Code 401)","errorDetailsHttps403":"Check the Ajax Proxy configuration and the security setup for HTTPS communication.","errorHttp403":"The request is forbidden. (HTTP Status Code 403)","errorHttp404":"The requested URL was not found. (HTTP Status Code 404)","errorHttp405":"The request method is not allowed. (HTTP Status Code 405)","errorHttp406":"The request is not acceptable. (HTTP Status Code 406)","errorHttp407":"The request requires proxy authentication. (HTTP Status Code 407)","errorHttp408":"The request timed out. (HTTP Status Code 408)","errorHttp409":"The request could not be completed due to a conflict. (HTTP Status Code 409)","errorHttp500":"The server encountered an internal server error. (HTTP Status Code 500)","errorHttpGeneric":"An unknown error occurred. If the problem persists, contact your system administrator.","errorHttp501":"The server does not implement the functionality to fulfill this request. (HTTP Status Code 501)","errorHttp502":"The server - acting as a gateway - received an invalid response. (HTTP Status Code 502)","errorHttp503":"The server is currently unable to handle the request. (HTTP Status Code 503)","errorHttp504":"The server - acting as a gateway - did not receive a timely response. (HTTP Status Code 504)","errorHttp505":"The server does not support this HTTP version. (HTTP Status Code 505)"},"authWidget":{"errorVaultSlotNotAvailable":"The configured credential Vault slot is not available for selection."}};dojo.provide("com.ibm.workplace.wcm.ecm.quickr.picker.launcher.nls.DocPickerLauncher");com.ibm.workplace.wcm.ecm.quickr.picker.launcher.nls.DocPickerLauncher._built=true;dojo.provide("com.ibm.workplace.wcm.ecm.quickr.picker.launcher.nls.DocPickerLauncher.en");com.ibm.workplace.wcm.ecm.quickr.picker.launcher.nls.DocPickerLauncher.en={"buttonOk":"OK","menuItemViewLink":"Summary Page","menuInsertLink":"Insert Link","menuItemDownloadLink":"Download File","dialogTitleSelectFolder":"Select a Folder","dialogTitleSelectDocument":"Select a Document","dialogTitleDefault":"リンクの挿入","dialogTitleFeedUrl":"フィード URL の挿入"}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("federation.nls.FederatedDocumentsPickerLayer",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsServiceBean"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsServiceBean"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsServiceBean");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsServiceBean",[com.ibm.widgets._Traceable],{_customServiceSelectionEnabled:true,_federatedDocumentsServices:[],_feedBaseURL:"",_feedTypeBaseURL:"",_isTracing:false,_portalContextPath:"/wps",_qdsSupportEnabled:true,_serviceDocBaseURL:"",_vaultMgmtDataSinkUrl:"",_vaultSelectionEnabledForPZN:true,_vaultSelectionEnabledForWCM:true,_vaultSlots:[],constructor:function(_1){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_1));}if(_1&&typeof _1=="object"){if(_1.federatedDocumentsServices&&typeof _1.federatedDocumentsServices=="object"){this._federatedDocumentsServices=_1.federatedDocumentsServices;}if(typeof _1.customServiceSelectionEnabled=="boolean"){this._customServiceSelectionEnabled=_1.customServiceSelectionEnabled;}if(typeof _1.feedBaseURL=="string"){this._feedBaseURL=_1.feedBaseURL;}if(typeof _1.feedTypeBaseURL=="string"){this._feedTypeBaseURL=_1.feedTypeBaseURL;}if(typeof _1.portalContextPath=="string"){this._portalContextPath=_1.portalContextPath;}if(typeof _1.qdsSupportEnabled=="boolean"){this._qdsSupportEnabled=_1.qdsSupportEnabled;}if(typeof _1.serviceDocBaseURL=="string"){this._serviceDocBaseURL=_1.serviceDocBaseURL;}if(typeof _1.vaultMgmtDataSinkUrl=="string"){this._vaultMgmtDataSinkUrl=_1.vaultMgmtDataSinkUrl;}if(typeof _1.vaultSelectionEnabledForPZN=="boolean"){this._vaultSelectionEnabledForPZN=_1.vaultSelectionEnabledForPZN;}if(typeof _1.vaultSelectionEnabledForWCM=="boolean"){this._vaultSelectionEnabledForWCM=_1.vaultSelectionEnabledForWCM;}if(_1.vaultSlots&&typeof _1.vaultSlots=="object"){this._vaultSlots=_1.vaultSlots;}}if(this._isTracing){this.traceExit(m);}},getFederatedDocumentsServices:function(){return this._federatedDocumentsServices;},getFeedBaseURL:function(){return this._feedBaseURL;},getFeedTypeBaseURL:function(){return this._feedTypeBaseURL;},getPortalContextPath:function(){return this._portalContextPath;},getServiceDocumentBaseURL:function(){return this._serviceDocBaseURL;},getVaultMgmtDataSinkUrl:function(){return this._vaultMgmtDataSinkUrl;},getVaultSlots:function(){return this._vaultSlots;},isCustomServiceSelectionEnabled:function(){return this._customServiceSelectionEnabled;},isQDSSupportEnabled:function(){return this._qdsSupportEnabled;},isVaultSelectionEnabledForPZN:function(){return this._vaultSelectionEnabledForPZN;},isVaultSelectionEnabledForWCM:function(){return this._vaultSelectionEnabledForWCM;}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions");dojo.declare("com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions",null,{});com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._atom="atom";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions.resEnvTypeCMIS="CMIS";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions.resEnvTypeQDS="DocumentServices";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions.resEnvTypeATOM="ATOM";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._cmis="cmis";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._proxyVaultSlotParamName="hpaa.slotid";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._pzn="pzn";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._qds="qds";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._qdsentry="qdsentry";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._servicedoc="servicedoc";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._unknown="unknown";com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm="wcm";}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget");dojo.registerModulePath("com.ibm.workplace.wcm.ecm.picker.widget","../com/ibm/workplace/wcm/ecm/picker/widget");dojo.require("dijit.form.RadioButton");dojo.require("dijit.form.ComboBox");dojo.require("com.ibm.widgets.GenericDialogWidget");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget",[com.ibm.widgets.GenericDialogWidget],{namespace:"authWdgt_",templateString:"<div dojoAttachPoint=\"authenticationWidgetDiv\">\n <form name=\"${namespace}authenticationWidgetForm\"\n class=\"lotusForm2 lotusFormTable formBkgr\"\n id=\"${namespace}authenticationWidgetForm\">\n <div style=\"display: none;\">\n <label id=\"${namespace}authSelectionRadioGroupHeading_id\">${_nlsUserInterface.authWidget.title}</label>\n </div>\n <div role=\"radiogroup\" aria-labelledby=\"${namespace}authSelectionRadioGroupHeading_id\">\n <div dojoAttachPoint=\"currentUserDIV\">\n <input dojoAttachPoint=\"currentUserRadioButton\" dojoType=\"dijit.form.RadioButton\" class=\"lotusCheckbox\" id=\"${namespace}currentUserRadioButton_id\"\n type=\"radio\" role=\"radio\" value=\"current\" name=\"feddoc_auth_type\"\n aria-labelledby=\"${namespace}auth_type_current.lbl\" aria-checked=\"true\" checked/>\n <label id=\"${namespace}auth_type_current.lbl\" class=\"lotusCheckbox\" for=\"${namespace}currentUserRadioButton_id\" aria-label=\"${_nlsUserInterface.authWidget.currentUserRadioButtonLabel}\">\n <span dojoAttachPoint=\"currentUserRadioButtonLabel\">${_nlsUserInterface.authWidget.currentUserRadioButtonLabel}</span>\n </label>\n </div>\n <div class=\"feddocTopSpaceSmall\" dojoAttachPoint=\"credentialVaultDIV\">\n <input dojoAttachPoint=\"vaultRadioButton\" dojoType=\"dijit.form.RadioButton\" class=\"lotusCheckbox\" id=\"${namespace}vaultRadioButton_id\"\n type=\"radio\" role=\"radio\" value=\"vault\" name=\"feddoc_auth_type\"\n aria-labelledby=\"${namespace}auth_type_vault.lbl\" aria-checked=\"false\"/>\n <label id=\"${namespace}auth_type_vault.lbl\" class=\"lotusCheckbox\" for=\"${namespace}vaultRadioButton_id\" aria-label=\"${_nlsUserInterface.authWidget.vaultRadioButtonLabel}\">\n <span dojoAttachPoint=\"vaultRadioButtonLabel\">${_nlsUserInterface.authWidget.vaultRadioButtonLabel}</span>\n </label><br/>\n <div class=\"feddocTopSpaceSmall\" style=\"margin-left: 20px;\">\n\t <label id=\"${namespace}vaultDropDownList.lbl\" for=\"${namespace}vaultDropDownList_id\" aria-label=\"${_nlsUserInterface.authWidget.vaultDropDownListLabel}\">\n\t <span dojoAttachPoint=\"vaultDropDownListLabel\" class=\"lotusInactive\">${_nlsUserInterface.authWidget.vaultDropDownListLabel}</span>\n\t </label>\n\t <div>\n\t <input type=\"select\" dojoAttachPoint=\"vaultDropDownList\" dojoType=\"dijit.form.ComboBox\" class=\"lotusSelect\" id=\"${namespace}vaultDropDownList_id\" name=\"${namespace}vaultDropDownList\" size=\"8\" aria-labelledBy=\"${namespace}vaultDropDownList.lbl\" disabled=\"true\"/>\n\t </div>\n </div>\n </div>\n <div class=\"feddocTopSpaceSmall\" dojoAttachPoint=\"usernamePasswordDIV\">\n <input dojoAttachPoint=\"userPwdRadioButton\" dojoType=\"dijit.form.RadioButton\" class=\"lotusCheckbox\" id=\"${namespace}userPwdRadioButton_id\"\n type=\"radio\" role=\"radio\" value=\"userPwd\" name=\"feddoc_auth_type\"\n aria-labelledby=\"${namespace}auth_type_userPwd.lbl\" aria-checked=\"false\"/>\n <label id=\"${namespace}auth_type_userPwd.lbl\" class=\"lotusCheckbox\" for=\"${namespace}userPwdRadioButton_id\" aria-label=\"${_nlsUserInterface.authWidget.userPwdRadioButtonLabel}\">\n <span dojoAttachPoint=\"userPwdRadioButtonLabel\">${_nlsUserInterface.authWidget.userPwdRadioButtonLabel}</span>\n </label>\n <div style=\"margin-left: 20px;\">\n\t <div class=\"feddocTopSpaceSmall\">\n\t <label id=\"${namespace}auth_type_simpleAuthUser.lbl\" for=\"${namespace}simpleAuthUser_id\" aria-label=\"${_nlsUserInterface.authWidget.simpleAuthUserLabel}\">\n\t <span dojoAttachPoint=\"simpleAuthUserLabel\" class=\"lotusInactive\">${_nlsUserInterface.authWidget.simpleAuthUserLabel}</span>\n\t </label>\n\t <input dojoType=\"dijit.form.TextBox\" type=\"text\" role=\"textbox\" aria-labelledby=\"${namespace}auth_type_simpleAuthUser.lbl\" dojoAttachPoint=\"simpleAuthUser\" id=\"${namespace}simpleAuthUser_id\" name=\"${namespace}simpleAuthUser\" disabled=\"true\"/>\n\t </div> \n\t <div class=\"feddocTopSpaceSmall\">\n\t <label id=\"${namespace}auth_type_simpleAuthPwd.lbl\" for=\"${namespace}simpleAuthPwd_id\" aria-label=\"${_nlsUserInterface.authWidget.simpleAuthPwdLabel}\">\n\t <span dojoAttachPoint=\"simpleAuthPwdLabel\" class=\"lotusInactive\">${_nlsUserInterface.authWidget.simpleAuthPwdLabel}</span>\n\t </label>\n\t <input dojoType=\"dijit.form.TextBox\" type=\"password\" role=\"textbox\" aria-labelledby=\"${namespace}auth_type_simpleAuthPwd.lbl\" dojoAttachPoint=\"simpleAuthPwd\" id=\"${namespace}simpleAuthPwd_id\" name=\"${namespace}simpleAuthPwd\" disabled=\"true\"/>\n\t </div>\n\t </div> \n </div> \n </div> \n </form>\n</div>\n\n",widgetsInTemplate:true,_allAuthTypes:[],_authProperties:null,_authTypeAvailable:{"authNone":false,"authUserPwd":false,"authSSO":false,"authVault":false},_defaultSlotValue:"",_errorState:false,_eventHandles:[],_isTracing:false,_onChangeAuthenticationMode:null,_onErrorStateChanged:null,_vaultSlots:[],_vaultSlotStore:null,buildRendering:function(){var m="buildRendering()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._setUpVaultDropDownList();this._showHideAuthTypeSections();if(this._isTracing){this.traceExit(m);}},changeAuthType:function(_2){var m="changeAuthType(p_authType)";if(this._isTracing){this.traceEntry(m,_2);}if(_2){if(_2!=this._authProperties.authType){this._authProperties.authType=_2;this._selectPresetAuthType();this._callbackAuthenticationChangedEvent();this._clearError();}}if(this._isTracing){this.traceExit(m);}},changeVaultSlotID:function(_3){var m="changeVaultSlotID(p_vaultSlotID)";if(this._isTracing){this.traceEntry(m,_3);}if(_3){this.vaultDropDownList.attr("value",_3);var _4=this._vaultSlotStore.fetchItemByIdentity(_3);if(_4&&(_4.length===1)){this._clearError();}else{if(this._onErrorStateChanged&&dojo.isFunction(this._onErrorStateChanged)){this._onErrorStateChanged(this,true,this._nlsMessages.authWidget.errorVaultSlotNotAvailable);}}}if(this._isTracing){this.traceExit(m);}},constructor:function(_5){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_5);if(_5){this.trace(m,"p_params.authProperties:",dojo.toJson(_5.authProperties));this.trace(m,"p_params.availableAuthTypes:",dojo.toJson(_5.availableAuthTypes));this.trace(m,"p_params.namespace:",_5.namespace);this.trace(m,"p_params.onChangeAuthenticationMode:",_5.onChangeAuthenticationMode);this.trace(m,"p_params.onErrorStateChanged:",_5.onErrorStateChanged);this.trace(m,"p_params.vaultSlots:",dojo.toJson(_5.vaultSlots));}}if(typeof _5.namespace=="string"){this.namespace=_5.namespace;}this._allAuthTypes.push(com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd);this._allAuthTypes.push(com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser);this._allAuthTypes.push(com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault);if(_5){if((_5.vaultSlots)&&(dojo.isArray(_5.vaultSlots))){this._vaultSlots=_5.vaultSlots;}if(_5.availableAuthTypes&&dojo.isArray(_5.availableAuthTypes)){this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd]=false;this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser]=false;this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault]=false;for(var i=0;i<_5.availableAuthTypes.length;i++){var _6=_5.availableAuthTypes[i];if(_6==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd){this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd]=true;}if(_6==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser){this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser]=true;}if(_6==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault){this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault]=(this._vaultSlots.length>0);}}}if(_5.authProperties){this._authProperties=dojo.clone(_5.authProperties);}else{this._authProperties={"authType":com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser};}if(typeof _5.onChangeAuthenticationMode=="function"){this._onChangeAuthenticationMode=_5.onChangeAuthenticationMode;}if((_5.onErrorStateChanged)&&dojo.isFunction(_5.onErrorStateChanged)){this._onErrorStateChanged=_5.onErrorStateChanged;}}if(this._isTracing){this.traceExit(m);}},destroy:function(){var m="destroy()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},doCancel:function(){var m="doCancel()";if(this._isTracing){this.traceEntry(m);}var _7={"returnCode":-1};if(this._isTracing){this.traceExit(m,_7);}return _7;},doConfirm:function(){var m="doConfirm()";if(this._isTracing){this.traceEntry(m);}var _8={"returnCode":0};if(this._isTracing){this.traceExit(m,_8);}return _8;},getAuthenticationProperties:function(){var m="getAuthenticationProperties()";if(this._isTracing){this.traceEntry(m);}this._getAuthPropertiesFromUI();var _9=dojo.clone(this._authProperties);if(this._isTracing){this.traceExit(m,dojo.toJson(_9));}return _9;},getDialogTitle:function(){var m="getDialogTitle()";if(this._isTracing){this.traceEntry(m);}var _a=this._nlsUserInterface.authWidget.title;if(this._isTracing){this.traceExit(m,_a);}return _a;},isAuthTypeAvailable:function(_b){var m="isAuthTypeAvailable(p_authType)";if(this._isTracing){this.traceEntry(m,_b);}var _c=(this._authTypeAvailable[_b]===true);if(this._isTracing){this.traceExit(m,_c);}return _c;},isVaultSlotAvailable:function(_d){var m="_isVaultSlotAvailable(p_vaultSlotId)";if(this._isTracing){this.traceEntry(m,[_d]);}var _e=dojo.some(this._vaultSlots,function(_f){if(_f){if(_f.slotid){return (_f.slotid===_d);}else{return false;}}else{return false;}});if(this._isTracing){this.traceExit(m,_e);}return _e;},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._initEventHandles();if(this._isTracing){this.traceExit(m);}},setAuthenticationProperties:function(_10){var m="setAuthenticationProperties(p_params)";if(this._isTracing){this.traceEntry(m,_10);if(_10){this.trace(m,"p_params.authProperties:",dojo.toJson(_10.authProperties));}}if(_10.authProperties){var _11=this._authProperties.vaultSlotID;this._authProperties=dojo.clone(_10.authProperties);if((_11)&&(!this._authProperties.vaultSlotID)&&(this._vaultSlots.length>0)){this._authProperties.vaultSlotID=_11;}}this._setAuthPropertiesToUI();this._callbackAuthenticationChangedEvent();if(this._isTracing){this.traceExit(m);}},startup:function(){var m="startup()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this.vaultDropDownList.attr("value",this._defaultSlotValue);if(this._isTracing){this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this._clearEventHandles();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},_callbackAuthenticationChangedEvent:function(){var m="_callbackAuthenticationChangedEvent()";if(this._isTracing){this.traceEntry(m);}if(this._onChangeAuthenticationMode&&(typeof this._onChangeAuthenticationMode=="function")){if(this._isTracing){this.trace(m,"Dispatching to callback function passing the authentication settings:",[this._onCancelCallbackFn,dojo.toJson(this._authProperties)]);}this._onChangeAuthenticationMode(this._authProperties);this._clearError();}if(this._isTracing){this.traceExit(m);}},_clearError:function(){var m="_clearError()";if(this._isTracing){this.traceEntry(m);}this._errorState=false;if(this._onErrorStateChanged){this._onErrorStateChanged(this,false);}if(this._isTracing){this.traceExit(m);}},_clearEventHandles:function(){var m="_clearEventHandles()";if(this._isTracing){this.traceEntry(m);}dojo.forEach(this._eventHandles,dojo.disconnect);this._eventHandles=[];if(this._isTracing){this.traceExit(m);}},_correctPresetAuthType:function(){var m="_correctPresetAuthType()";if(this._isTracing){this.traceEntry(m);}if(!this.isAuthTypeAvailable(this._authProperties.authType)){for(var i=0;i<this._allAuthTypes.length;i++){var _12=this._allAuthTypes[i];if(_12!=this._authProperties.authType){if(this.isAuthTypeAvailable(_12)){this._authProperties.authType=_12;if(this._isTracing){this.traceExit(m);}return;}}}}if(this._isTracing){this.traceExit(m);}},_disableVaultSlotPicker:function(){var m="_disableVaultSlotPicker()";if(this._isTracing){this.traceEntry(m);}this.vaultDropDownList.attr("disabled",true);dojo.addClass(this.vaultDropDownListLabel,"lotusInactive");if(this._isTracing){this.traceExit(m);}},_disableUnamePwInputFields:function(){var m="_disableUnamePwInputFields()";if(this._isTracing){this.traceEntry(m);}this.simpleAuthUser.attr("disabled",true);dojo.addClass(this.simpleAuthUserLabel,"lotusInactive");this.simpleAuthPwd.attr("disabled",true);dojo.addClass(this.simpleAuthPwdLabel,"lotusInactive");if(this._isTracing){this.traceExit(m);}},_enableVaultSlotPicker:function(){var m="_enableVaultSlotPicker()";if(this._isTracing){this.traceEntry(m);}this.vaultDropDownList.attr("disabled",false);dojo.removeClass(this.vaultDropDownListLabel,"lotusInactive");if(this._isTracing){this.traceExit(m);}},_enableUnamePwInputFields:function(){var m="_enableUnamePwInputFields()";if(this._isTracing){this.traceEntry(m);}this.simpleAuthUser.attr("disabled",false);dojo.removeClass(this.simpleAuthUserLabel,"lotusInactive");this.simpleAuthPwd.attr("disabled",false);dojo.removeClass(this.simpleAuthPwdLabel,"lotusInactive");if(this._isTracing){this.traceExit(m);}},_getAuthPropertiesFromUI:function(){var m="_getAuthPropertiesFromUI()";if(this._isTracing){this.traceEntry(m);}this._authProperties={authType:this._authProperties.authType,username:dojo.attr(this.simpleAuthUser,"value"),password:dojo.attr(this.simpleAuthPwd,"value"),vaultSlotID:this.vaultDropDownList.getValue(),vaultSlotTitle:dojo.attr(this.vaultDropDownList,"title")};if(this._isTracing){this.trace(m,"New authentication settings:",dojo.toJson(this._authProperties));}if(this._isTracing){this.traceExit(m);}},_initEventHandles:function(){var m="_initEventHandles()";if(this._isTracing){this.traceEntry(m);}this._eventHandles.push(dojo.connect(this.currentUserRadioButton.focusNode,"onclick",dojo.hitch(this,"_onSelectAuthType")));this._eventHandles.push(dojo.connect(this.vaultRadioButton.focusNode,"onclick",dojo.hitch(this,"_onSelectAuthType")));this._eventHandles.push(dojo.connect(this.userPwdRadioButton.focusNode,"onclick",dojo.hitch(this,"_onSelectAuthType")));this._eventHandles.push(dojo.connect(this.vaultDropDownList,"onChange",dojo.hitch(this,"_onSelectVaultSlot")));if(this._isTracing){this.traceExit(m);}},_onSelectAuthType:function(_13){var m="_onSelectAuthType(p_evt)";if(this._isTracing){this.traceEntry(m,_13);}if(_13){if(_13.target){if(_13.target==this.currentUserRadioButton.focusNode){this._authProperties.authType=com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser;this._disableVaultSlotPicker();this._disableUnamePwInputFields();this._callbackAuthenticationChangedEvent();}else{if(_13.target==this.vaultRadioButton.focusNode){this._authProperties.authType=com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault;this._enableVaultSlotPicker();this._disableUnamePwInputFields();this._callbackAuthenticationChangedEvent();}else{if(_13.target==this.userPwdRadioButton.focusNode){this._authProperties.authType=com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd;this._disableVaultSlotPicker();this._enableUnamePwInputFields();this._callbackAuthenticationChangedEvent();}}}}}if(this._isTracing){this.traceExit(m);}},_onSelectVaultSlot:function(){var m="_onSelectVaultSlot()";if(this._isTracing){this.traceEntry(m);}this._authProperties.vaultSlotID=this.vaultDropDownList.getValue();if(this._isTracing){this.trace(m,"New credential vault slot ID:",this._authProperties.vaultSlotID);}this._callbackAuthenticationChangedEvent();if(this._isTracing){this.traceExit(m);}},_selectPresetAuthType:function(){var m="_selectPresetAuthType()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Preset authentication type:",this._authProperties.authType);}if(this._authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser){this.currentUserRadioButton.setChecked(true);this._disableVaultSlotPicker();this._disableUnamePwInputFields();}else{if(this._authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd){this.userPwdRadioButton.setChecked(true);this._disableVaultSlotPicker();this._enableUnamePwInputFields();}else{if(this._authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault){this._disableUnamePwInputFields();if(this._vaultSlots.length<=0){this.warning(m,"There are no credential vault slots configured in this instance of Portal");}else{this.vaultRadioButton.setChecked(true);this._enableVaultSlotPicker();}}}}if(this._isTracing){this.traceExit(m);}},_setAuthPropertiesToUI:function(){var m="_setAuthPropertiesToUI()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Authentication settings:",dojo.toJson(this._authProperties));}this._correctPresetAuthType();this._selectPresetAuthType();if(this._authProperties){if(this._authProperties.username){dojo.attr(this.simpleAuthUser,"value",this._authProperties.username);}if(this._authProperties.password){dojo.attr(this.simpleAuthPwd,"value",this._authProperties.password);}if(this._authProperties.vaultSlotID){this.vaultDropDownList.setValue(this._authProperties.vaultSlotID);}}else{dojo.attr(this.simpleAuthUser,"value","");dojo.attr(this.simpleAuthPwd,"value","");}if(this._isTracing){this.traceExit(m);}},_showHideAuthTypeSections:function(){var m="_showHideAuthTypeSections()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Available authentication types:",dojo.toJson(this._authTypeAvailable));}if(this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser]===false){this.currentUserRadioButton.set("disabled",true);dojo.style(this.currentUserDIV,"display","none");dijit.setWaiState(this.currentUserDIV,"hidden",true);}if(this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd]===false){this.userPwdRadioButton.set("disabled",true);dojo.style(this.usernamePasswordDIV,"display","none");dijit.setWaiState(this.usernamePasswordDIV,"hidden",true);}if(this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault]===false){this.vaultRadioButton.set("disabled",true);dojo.style(this.credentialVaultDIV,"display","none");dijit.setWaiState(this.credentialVaultDIV,"hidden",true);}if(this._isTracing){this.traceExit(m);}},_setUpVaultDropDownList:function(){var m="_setUpVaultDropDownList()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Available credential vault slots:",dojo.toJson(this._vaultSlots));}if(this._authTypeAvailable[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault]){for(var i=0;i<this._vaultSlots.length;i++){this._vaultSlots[i].name=decodeURIComponent(this._vaultSlots[i].slotid);if(this._defaultSlotValue===""){this._defaultSlotValue=this._vaultSlots[i].name;}}}this._vaultSlotStore=new dojo.data.ItemFileReadStore({data:{"label":"name","identifier":"name","items":this._vaultSlots}});this.vaultDropDownList.attr("store",this._vaultSlotStore);if((!this._authProperties.vaultSlotID)&&(this._vaultSlots.length>0)){this._authProperties.vaultSlotID=this.vaultDropDownList.getValue();if(this._isTracing){this.trace(m,"Set default credential vault slot ID:",this._authProperties.vaultSlotID);}}if(this._isTracing){this.traceExit(m);}}});com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeNoAuth="authNone";com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd="authUserPwd";com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser="authSSO";com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault="authVault";}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.ExpandableSectionWidget"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.ExpandableSectionWidget"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.ExpandableSectionWidget");dojo.registerModulePath("com.ibm.workplace.wcm.ecm.picker.widget","../com/ibm/workplace/wcm/ecm/picker/widget");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.ExpandableSectionWidget",[dijit._Widget,dijit._Templated,com.ibm.widgets._Traceable],{blankImgUrl:dojo.moduleUrl("dojo","resources/blank.gif").toString(),namespace:"expSctWdgt_",parseOnLoad:true,templateString:"<div role=\"region\" aria-hidden=\"true\" aria-expanded=\"false\" aria-labelledby=\"${namespace}sectionLink_id\" class=\"lotusFirst\" dojoAttachPoint=\"SectionDIV\" id=\"${namespace}SectionDIV\" name=\"${namespace}SectionDIV\" style=\"display: none;\">\n <a dojoAttachPoint=\"sectionTwisty\" id=\"${namespace}sectionTwisty_id\" \n name=\"${namespace}sectionTwisty\" class=\"lotusSprite lotusArrow lotusTwistyClosed\" \n href=\"javascript:void(0);\" title=\"${sectionLinkTitle}\" tabIndex=\"0\" role=\"button\" aria-label=\"${sectionLinkTitle}\"><span dojoAttachPoint=\"sectionTwistySpan\" id=\"${namespace}sectionTwistySpan_id\" name=\"${namespace}sectionTwistySpan\" class=\"lotusAltText\">&#x25bc;</span></a>\n <a dojoAttachPoint=\"sectionLink\" href=\"javascript:void(0);\" role=\"button\" tabindex=\"0\" \n id=\"${namespace}sectionLink_id\" name=\"${namespace}sectionLink\" \n title=\"${_sectionTitleText}\" class=\"lotusAction\" aria-label=\"${_sectionTitleText}\">${_sectionTitleText}</a>\n <div role=\"region\" aria-labelledby=\"${namespace}sectionLink_id\" dojoAttachPoint=\"sectionBody\" id=\"${namespace}sectionBody_id\" name=\"${namespace}sectionBody\" class=\"lotusSectionBody\">\n <div class=\"lotusChunk\">\n <div aria-hidden=\"true\" class=\"lotusFormField\" dojoAttachPoint=\"sectionWidgetDIV\" id=\"${namespace}sectionWidgetDIV\" style=\"display: none; height: 0px; width: 300px; overflow: hidden;\">\n <div dojoAttachPoint=\"widgetNode, containerNode\"></div>\n </div>\n </div>\n </div>\n</div>\n",_eventHandles:[],_isTracing:false,_nlsMessages:{},_nlsUserInterface:{},_onCollapsed:null,_onExpanded:null,_openHeight:5.5,_openWidth:6.25,_sectionID:"",_sectionTitleText:"",_visible:false,_widget:null,buildRendering:function(){var m="buildRendering()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._widget){this._widget.placeAt(this.widgetNode);}if((this._visible)&&(this._visible===true)){this.showSection();}else{this.hideSection();}if(this._isTracing){this.traceExit(m);}},constructor:function(_14){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_14);if(_14){this.traceEntry(m,"p_params.namespace:",_14.namespace);this.traceEntry(m,"p_params.nlsMessages:",dojo.toJson(_14.nlsMessages));this.traceEntry(m,"p_params.nlsUserInterface:",dojo.toJson(_14.nlsUserInterface));this.traceEntry(m,"p_params.onCollapsed:",_14.onCollapsed);this.traceEntry(m,"p_params.onExpanded:",_14.onExpanded);this.traceEntry(m,"p_params.openHeight:",_14.openHeight);this.traceEntry(m,"p_params.openWidth:",_14.openWidth);this.traceEntry(m,"p_params.sectionID:",_14.sectionID);this.traceEntry(m,"p_params.sectionTitleText:",_14.sectionTitleText);this.traceEntry(m,"p_params.visible:",_14.visible);this.traceEntry(m,"p_params.widgetInstance:",_14.widgetInstance);}}if(typeof _14.namespace=="string"){this.namespace=_14.namespace;}if(_14.nlsMessages&&typeof _14.nlsMessages=="object"){this._nlsMessages=_14.nlsMessages;}if(_14.nlsUserInterface&&typeof _14.nlsUserInterface=="object"){this._nlsUserInterface=_14.nlsUserInterface;}if(_14.widgetInstance&&typeof _14.widgetInstance=="object"){this._widget=_14.widgetInstance;}if(typeof _14.openWidth=="number"){this._openWidth=_14.openWidth;}if(typeof _14.openHeight=="number"){this._openHeight=_14.openHeight;}if(typeof _14.sectionTitleText=="string"){this._sectionTitleText=_14.sectionTitleText;}if(typeof _14.sectionID=="string"){this._sectionID=_14.sectionID;}if(typeof _14.visible=="boolean"){this._visible=_14.visible;}if(typeof _14.onExpanded=="function"){this._onExpanded=_14.onExpanded;}if(typeof _14.onCollapsed=="function"){this._onCollapsed=_14.onCollapsed;}if(this._isTracing){this.traceExit(m);}},hideSection:function(){var m="hideSection()";if(this._isTracing){this.traceEntry(m);}this._visible=false;dojo.style(this.SectionDIV,"display","none");dijit.setWaiState(this.SectionDIV,"hidden",true);if(this._isTracing){this.traceExit(m);}},isSectionCollapsed:function(){var m="isSectionCollapsed()";if(this._isTracing){this.traceEntry(m);}var _15=dojo.hasClass(this.sectionTwisty,"lotusTwistyClosed");if(this._isTracing){this.traceExit(m,_15);}return _15;},isSectionExpanded:function(){var m="isSectionExpanded()";if(this._isTracing){this.traceEntry(m);}var _16=dojo.hasClass(this.sectionTwisty,"lotusTwistyOpen");if(this._isTracing){this.traceExit(m,_16);}return _16;},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._initEventHandles();this._setSectionClosed();if(this._isTracing){this.traceExit(m);}},postMixInProperties:function(){var m="postMixInProperties()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if((this._sectionID)&&(this.namespace)){this.namespace=this.namespace+this._sectionID;}this.sectionLinkTitle=this._nlsUserInterface.expSectionWidget.sectionLinkExpandTitle;if(this._isTracing){this.traceExit(m);}},showSection:function(){var m="showSection()";if(this._isTracing){this.traceEntry(m);}this._visible=true;dojo.style(this.SectionDIV,"display","block");dijit.setWaiState(this.SectionDIV,"hidden",false);if(this._isTracing){this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this._clearEventHandles();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},_clearEventHandles:function(){var m="_clearEventHandles()";if(this._isTracing){this.traceEntry(m);}dojo.forEach(this._eventHandles,dojo.disconnect);this._eventHandles=[];if(this._isTracing){this.traceExit(m);}},_closeSection:function(){var m="_closeSection()";if(this._isTracing){this.traceEntry(m);}dojo.animateProperty({"node":dojo.byId(this.namespace+"sectionWidgetDIV"),"duration":500,"properties":{"height":{"end":0,"units":"px"}},"onEnd":dojo.hitch(this,function(){this._setSectionClosed();dojo.style(dojo.byId(this.namespace+"sectionWidgetDIV"),"display","none");if((this._onCollapsed)&&(typeof this._onCollapsed=="function")){this._onCollapsed();}})}).play();if(this._isTracing){this.traceExit(m);}},_initEventHandles:function(){var m="_initEventHandles()";if(this._isTracing){this.traceEntry(m);}this._eventHandles.push(dojo.connect(this.sectionTwisty,"onclick",dojo.hitch(this,"_onOpenCloseSection")));this._eventHandles.push(dojo.connect(this.sectionLink,"onclick",dojo.hitch(this,"_onOpenCloseSection")));if(this._isTracing){this.traceExit(m);}},_onOpenCloseSection:function(){var m="_onOpenCloseSection()";if(this._isTracing){this.traceEntry(m);}var _17=dojo.hasClass(this.sectionTwisty,"lotusTwistyOpen");if(this._isTracing){this.trace(m,"Is section open:",_17);}if(_17){this._closeSection();}else{this._openSection();}if(this._isTracing){this.traceExit(m);}},_openSection:function(){var m="_openSection()";if(this._isTracing){this.traceEntry(m);}this.sectionLinkTitle=this._nlsUserInterface.expSectionWidget.sectionLinkCollapseTitle;var _18=dojo.byId(this.namespace+"sectionWidgetDIV");dojo.style(_18,"display","block");dojo.marginBox(_18,{h:"0ex",w:"0em"});dojo.style(_18,"height","0ex");dojo.style(_18,"width","0em");dojo.animateProperty({"node":_18,"duration":500,"properties":{"width":{"end":this._openWidth,"units":"em"},"height":{"end":this._openHeight,"units":"ex"}},"onEnd":dojo.hitch(this,function(){dojo.removeClass(this.sectionTwisty,"lotusTwistyClosed");dojo.addClass(this.sectionTwisty,"lotusTwistyOpen");dojo.attr(this.sectionTwisty,"title",this.sectionLinkTitle);dojo.attr(this.sectionLink,"title",this._sectionTitleText);dijit.setWaiState(this.sectionTwisty,"label",this.sectionLinkTitle);dijit.setWaiState(this.sectionLink,"label",this._sectionTitleText);dijit.setWaiState(this.SectionDIV,"expanded",true);dijit.setWaiState(this.sectionWidgetDIV,"hidden",false);dojo.attr(this.sectionTwistySpan,"innerHTML","&#x25BC;");dojo.style(_18,"height","auto");if((this._onExpanded)&&(typeof this._onExpanded=="function")){this._onExpanded();}})}).play();if(this._isTracing){this.traceExit(m);}},_setSectionClosed:function(){var m="_setSectionClosed()";if(this._isTracing){this.traceEntry(m);}this.sectionLinkTitle=this._nlsUserInterface.expSectionWidget.sectionLinkExpandTitle;dojo.removeClass(this.sectionTwisty,"lotusTwistyOpen");dojo.addClass(this.sectionTwisty,"lotusTwistyClosed");dojo.attr(this.sectionTwisty,"title",this.sectionLinkTitle);dojo.attr(this.sectionLink,"title",this._sectionTitleText);dijit.setWaiState(this.sectionTwisty,"label",this.sectionLinkTitle);dijit.setWaiState(this.sectionLink,"label",this._sectionTitleText);dijit.setWaiState(this.SectionDIV,"expanded",false);dijit.setWaiState(this.sectionWidgetDIV,"hidden",true);if(this.isRTL){dojo.attr(this.sectionTwistySpan,"innerHTML","&#x25C4;");}else{dojo.attr(this.sectionTwistySpan,"innerHTML","&#x25BA;");}if(this._isTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.GenericWizardPageWidget"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.GenericWizardPageWidget"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.GenericWizardPageWidget");dojo.registerModulePath("com.ibm.workplace.wcm.ecm.picker.widget","../com/ibm/workplace/wcm/ecm/picker/widget");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.GenericWizardPageWidget",[dijit._Widget,dijit._Templated,com.ibm.widgets._Traceable],{namespace:"genWzrdPgWdgt_",virtualContainerNodeHeight:null,_dialogTitle:null,_errorState:false,_isTracing:false,_onErrorStateChanged:null,_nlsMessages:{},_nlsUserInterface:{},_onDefaultAction:null,_onLayoutChanged:null,_onReadyStateChanged:null,_pickerManager:null,_ready:false,_stepDescription:"",_stepLabel:"",constructor:function(_19){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_19);if(_19){this.trace(m,"p_params.namespace:",_19.namespace);this.trace(m,"p_params.nlsMessages:",dojo.toJson(_19.nlsMessages));this.trace(m,"p_params.nlsUserInterface:",dojo.toJson(_19.nlsUserInterface));this.trace(m,"p_params.onDefaultAction:",_19.onDefaultAction);this.trace(m,"p_params.onErrorStateChanged",_19.onErrorStateChanged);this.trace(m,"p_params.onLayoutChanged:",_19.onLayoutChanged);this.trace(m,"p_params.onReadyStateChanged:",_19.onReadyStateChanged);this.trace(m,"p_params.pickerManager",_19.pickerManager);}}if(typeof _19.namespace=="string"){this.namespace=_19.namespace;}if(_19.nlsMessages&&dojo.isObject(_19.nlsMessages)){this._nlsMessages=_19.nlsMessages;}if(_19.nlsUserInterface&&dojo.isObject(_19.nlsUserInterface)){this._nlsUserInterface=_19.nlsUserInterface;}if((_19.onDefaultAction)&&dojo.isFunction(_19.onDefaultAction)){this._onDefaultAction=_19.onDefaultAction;}if((_19.onErrorStateChanged)&&dojo.isFunction(_19.onErrorStateChanged)){this._onErrorStateChanged=_19.onErrorStateChanged;}if((_19.onLayoutChanged)&&dojo.isFunction(_19.onLayoutChanged)){this._onLayoutChanged=_19.onLayoutChanged;}if((_19.onReadyStateChanged)&&dojo.isFunction(_19.onReadyStateChanged)){this._onReadyStateChanged=_19.onReadyStateChanged;}if((_19.pickerManager)&&dojo.isObject(_19.pickerManager)){this._pickerManager=_19.pickerManager;}if(this._isTracing){this.traceExit(m);}},getDialogTitle:function(){var m="getDialogTitle()";if(this._isTracing){this.traceEntry(m);}var _1a=this._dialogTitle;if(this._isTracing){this.traceExit(m,_1a);}return _1a;},getNlsMessages:function(){var m="getNlsMessages()";if(this._isTracing){this.traceEntry(m);}var _1b=this._nlsMessages;if(this._isTracing){this.traceExit(m,dojo.toJson(_1b));}return _1b;},getNlsUserInterface:function(){var m="getNlsUserInterface()";if(this._isTracing){this.traceEntry(m);}var _1c=this._nlsUserInterface;if(this._isTracing){this.traceExit(m,dojo.toJson(_1c));}return _1c;},getStepLabel:function(){var m="getStepLabel()";if(this._isTracing){this.traceEntry(m);}var _1d=this._stepLabel;if(this._isTracing){this.traceExit(m,_1d);}return _1d;},getStepDescription:function(){var m="getStepDescription()";if(this._isTracing){this.traceEntry(m);}var _1e=this._stepDescription;if(this._isTracing){this.traceExit(m,_1e);}return _1e;},initializePage:function(_1f){var m="initializePage()";if(this._isTracing){this.traceEntry(m);}if(this._isTracing){this.traceExit(m);}},isReady:function(){var m="isReady()";if(this._isTracing){this.traceEntry(m);}var _20=this._ready;if(this._isTracing){this.traceExit(m,_20);}return _20;},layout:function(){},setFocus:function(){var m="setFocus()";if(this._isTracing){this.traceEntry(m);}var _21=dijit.getFirstInTabbingOrder(this.domNode);if(_21){dijit.focus(_21);}if(this._isTracing){this.traceExit(m);}},_clearError:function(){var m="_clearError()";if(this._isTracing){this.traceEntry(m);}if(this._errorState===true){this._errorState=false;if(this._onErrorStateChanged){this._onErrorStateChanged(this,false);}}if(this._isTracing){this.traceExit(m);}},_layoutChanged:function(){var m="_layoutChanged()";if(this._isTracing){this.traceEntry(m);}if((this._onLayoutChanged)&&dojo.isFunction(this._onLayoutChanged)){if(this._isTracing){this.trace(m,"Dispatching to callback function:",this._onLayoutChanged);}this._onLayoutChanged();}if(this._isTracing){this.traceExit(m);}},_setReadyValue:function(_22){var m="_setReadyValue(p_isReady)";if(this._isTracing){this.traceEntry(m,_22);this.trace(m,"Current ready state:",this._ready);}if(this._ready!=_22){this._ready=_22;if((this._onReadyStateChanged)&&(dojo.isFunction(this._onReadyStateChanged))){if(this._isTracing){this.trace(m,"Dispatching to callback function passing the new ready state:",[this._onReadyStateChanged,this._ready]);}this._onReadyStateChanged(this._ready,this);}}if(this._isTracing){this.traceExit(m);}},_showError:function(_23,_24){var m="_showError(p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_23,_24]);}this._errorState=true;if(this._onErrorStateChanged){this._onErrorStateChanged(this,true,_23,_24);}if(this._isTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.URLUtils"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.URLUtils"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.util.URLUtils");dojo.declare("com.ibm.workplace.wcm.ecm.picker.util.URLUtils",[com.ibm.widgets._Traceable],{downloadAjaxProxyContext:"/cmis_proxy",getProtocol:function(_25){var m="getProtocol(p_url)";if(this._isTracing){this.traceEntry(m,[_25]);}var _26=null;if(_25&&_25.length>0){var pos=_25.indexOf("://");if(pos>0){_26=_25.substring(0,pos);}}if(this._isTracing){this.traceExit(m,_26);}return _26;},getAuthority:function(_27){var m="getAuthority(p_url)";if(this._isTracing){this.traceEntry(m,[_27]);}var _28=null;if(_27&&_27.length>0){var _29=_27.indexOf("//");if(_29>=0){_29=_29+2;var end=_27.indexOf("/",_29);if(end>=_29){_28=_27.substring(_29,end);}else{_28=_27.substring(_29);}}}if(this._isTracing){this.traceExit(m,_28);}return _28;},getHost:function(_2a){var m="getHost(p_url)";if(this._isTracing){this.traceEntry(m,[_2a]);}var _2b=null;var _2c=this.getAuthority(_2a);if(_2c&&_2c.length>0){var end=_2c.indexOf(":");if(end>=0){_2b=_2c.substring(0,end);}else{_2b=_2c;}}if(this._isTracing){this.traceExit(m,_2b);}return _2b;},getPort:function(_2d){var m="getPort(p_url)";if(this._isTracing){this.traceEntry(m,[_2d]);}var _2e=null;var _2f=this.getAuthority(_2d);if(_2f&&_2f.length>0){var _30=_2f.indexOf(":");if(_30>0&&_2f.length>_30+1){_2e=_2f.substring(_30+1);}}if(this._isTracing){this.traceExit(m,_2e);}return _2e;},getFile:function(_31){var m="getFile(p_url)";if(this._isTracing){this.traceEntry(m,[_31]);}var _32=null;if(_31&&_31.length>0){var _33=_31.indexOf("//");if(_33>=0){_33=_33+2;var _34=_31.indexOf("/",_33);if(_34>0){_32=_31.substring(_34);}}else{_32=_31;}}if(this._isTracing){this.traceExit(m,_32);}return _32;},addQueryParameter:function(_35,_36,_37){var m="addQueryParameter(p_url, p_name, p_value)";if(this._isTracing){this.traceEntry(m,[_35,_36,_37]);}var _38=null;if(_35&&_36){var _39=_35.lastIndexOf("#");var _3a=null;if(_39>-1){_3a=_35.substring(_39);_38=_35.substring(0,_39);}else{_38=_35;}var _3b=null;var _3c=_38.indexOf("?");if(_3c!=-1){var _3d=_38.lastIndexOf(";",_3c);if(_3d!=-1){_3b=_38.substring(_3d);_38=_38.substring(0,_3d);}if(_38.length-1>_3c){_38=_38+"&";}}else{_38=_38+"?";}if(_37){if(_37 instanceof Array){for(i=0;i<_37.length;i++){_38=_38+encodeURIComponent(_36)+"="+encodeURIComponent(_37[i]);if(i+1<_37.length){_38=_38+"&";}}}else{_38=_38+encodeURIComponent(_36)+"="+encodeURIComponent(_37);}}else{_38=_38+encodeURIComponent(_36)+"=";}if(_3b){_38=_38+_3b;}if(_3a){_38=_38+_3a;}}else{_38=_35;}if(this._isTracing){this.traceExit(m,_38);}return _38;},appendPath:function(_3e,_3f){var m="appendPath(p_url, p_path)";if(this._isTracing){this.traceEntry(m,[_3e,_3f]);}var _40;if(_3f.length>0){if(_3e.length>0){var _41=_3e.length-1;var _42;if(_3e.charAt(_41)=="/"){_42=_3e.substring(0,_41);}else{_42=_3e;}if(_3f.charAt(0)=="/"){_40=_42+_3f;}else{_40=_42+"/"+_3f;}}else{_40=_3f;}}else{_40=_3e;}if(this._isTracing){this.traceExit(m,_40);}return _40;},generateProxiedUrl:function(_43,_44){var m="generateProxiedUrl(p_url, p_wpsContext)";if(this._isTracing){this.traceEntry(m,[_43,_44]);}var _45=_43;if(_44.length>0){var _46=null;if(_44.charAt(0)=="/"){_46=_44;}else{_46="/"+_44;}_46=_46+this.downloadAjaxProxyContext+"/";var _47=this.getProtocol(_43);if(_47&&_47.length>0){_46=_46+_47+"/";var _48=this.getHost(_43);if(_48&&_48.length>0){_46=_46+_48;var _49=this.getPort(_43);if(_49&&_49.length>0){_46=_46+"%3A"+_49;}var _4a=this.getFile(_43);if(_4a&&_4a.length>0){_46=_46+_4a;}_45=_46;}}}if(this._isTracing){this.traceExit(m,_45);}return _45;},normalizePlaceholders:function(_4b){var m="normalizePlaceholders(p_url)";if(this._isTracing){this.traceEntry(m,_4b);}var _4c=_4b.replace(/%7b/g,"%7B").replace(/%7d/g,"%7D");if(this._isTracing){this.traceExit(m,_4c);}return _4c;}});com.ibm.workplace.wcm.ecm.picker.util.URLUtils._INSTANCE=new com.ibm.workplace.wcm.ecm.picker.util.URLUtils();}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.ServerConnectionPageWidget"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.ServerConnectionPageWidget"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.ServerConnectionPageWidget");dojo.registerModulePath("com.ibm.workplace.wcm.ecm.picker.widget","../com/ibm/workplace/wcm/ecm/picker/widget");dojo.require("dijit.form.TextBox");dojo.require("dojo.string");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.ServerConnectionPageWidget",[com.ibm.workplace.wcm.ecm.picker.widget.GenericWizardPageWidget],{blankImgUrl:dojo.moduleUrl("dojo","resources/blank.gif").toString(),namespace:"srvConnPgWdgt_",templateString:"<div dojoAttachPoint=\"serverConnectionPageDiv, containerNode\" id=\"${namespace}serverConnectionPageDiv_id\" name=\"${namespace}serverConnectionPageDiv\">\n <form dojoAttachPoint=\"serverConnectionPageForm\"\n name=\"${namespace}serverConnectionForm\"\n class=\"lotusForm2 lotusFormTable formBkgr\"\n id=\"${namespace}serverConnectionForm_id\">\n\n <div style=\"display: none;\">\n <label id=\"${namespace}serverSelectionRadioGroupHeader_id\">${_nlsUserInterface.srvConnPage.serverSelectionHeading}</label>\n </div>\n <div role=\"radiogroup\" aria-labelledby=\"${namespace}serverSelectionRadioGroupHeader_id\">\n <div class=\"feddocTopSpace\" dojoAttachPoint=\"presetServerDiv\" name=\"${namespace}presetServerDiv\" id=\"${namespace}presetServerDiv_id\">\n <input dojoAttachPoint=\"presetServerRadioButton\" dojoType=\"dijit.form.RadioButton\" class=\"lotusCheckbox\" id=\"${namespace}presetServerRadioButton_id\"\n type=\"radio\" role=\"radio\" value=\"preset\" name=\"serverType\"\n aria-labelledby=\"${namespace}presetServerRadioButton.lbl\" checked aria-checked=\"true\"/>\n <label id=\"${namespace}presetServerRadioButton.lbl\" class=\"lotusCheckbox\" for=\"${namespace}presetServerRadioButton_id\">\n <span dojoAttachPoint=\"presetServerRadioButtonLabel\">${_nlsUserInterface.srvConnPage.presetServerRadioButtonLabel}</span>\n </label>\n <div role=\"region\" aria-labelledby=\"${namespace}presetServerRadioButton.lbl\" aria-expanded=\"true\" class=\"feddocTopSpaceSmall\" dojoAttachPoint=\"presetServerSection\" name=\"${namespace}presetServerSection\" id=\"${namespace}presetServerSection_id\" style=\"margin-left: 10px; overflow: hidden;\">\n <div dojoAttachPoint=\"fedDocNoServersInfoDiv\" id=\"${namespace}fedDocNoServersInfoDiv_id\" name=\"${namespace}fedDocNoServersInfoDiv\" title=\"${_nlsUserInterface.srvConnPage.altTextInformation}\" style=\"display:none;\" class=\"lotusMessage lotusInfo feddocTopSpaceSmall feddocNoServersInfoBox\">\n <img src=\"${blankImgUrl}\" width=\"16\" height=\"16\" class=\"feddocInfoIcon\" alt=\"${_nlsUserInterface.srvConnPage.altTextInformation}\" />\n <span>${_nlsMessages.srvConnPage.noServersMessage}</span>\n </div>\n <div dojoAttachPoint=\"presetServersListDiv\" class=\"feddocServerSelection\" tabindex=\"-1\">\n <ul dojoAttachPoint=\"presetServersList\" name=\"${namespace}presetServersList\" id=\"${namespace}presetServersList_id\" class=\"lotusList lotusMeta\" tabindex=\"-1\" style=\"float: left; min-width: 100%;\">\n </ul>\n </div>\n </div>\n </div>\n <div class=\"feddocTopSpaceSmall\" dojoAttachPoint=\"customServerDiv\" name=\"${namespace}customServerDiv\" id=\"${namespace}customServerDiv_id\">\n <input dojoAttachPoint=\"customServerRadioButton\" dojoType=\"dijit.form.RadioButton\" class=\"lotusCheckbox\" id=\"${namespace}customServerRadioButton_id\"\n type=\"radio\" role=\"radio\" value=\"custom\" name=\"serverType\"\n aria-labelledby=\"${namespace}customServerRadioButton.lbl\" aria-checked=\"false\"/>\n <label id=\"${namespace}customServerRadioButton.lbl\" class=\"lotusCheckbox\" for=\"${namespace}customServerRadioButton_id\">\n <span dojoAttachPoint=\"customServerRadioButtonLabel\">${_nlsUserInterface.srvConnPage.customServerRadioButtonLabel}</span>\n </label>\n <!-- by using two separate 'style' attributes on the following DIV element, we can avoid the\n crop-at-the-top bug in Opera -->\n <div style=\"padding-top: 1px; margin-left: 10px;\" role=\"region\" aria-labelledby=\"${namespace}customServerRadioButton.lbl\" aria-expanded=\"true\" dojoAttachPoint=\"customServerSection\" name=\"${namespace}customServerSection\" id=\"${namespace}customServerSection_id\" class=\"feddocTopSpaceSmall\" style=\"overflow: hidden;\">\n <input role=\"textbox\" aria-labelledby=\"${namespace}customServerRadioButton.lbl\" dojoAttachPoint=\"customUrlTextBox\" dojoType=\"dijit.form.TextBox\" type=\"text\"\n name=\"${namespace}customUrlTextBox\" id=\"${namespace}customUrlTextBox_id\" class=\"lotusText feddocCustomUrlTextBox\"\n title=\"${_nlsUserInterface.srvConnPage.customUrlTextBoxTitle}\" intermediateChanges=\"true\"/>\n <label id=\"${namespace}customUrlTextBox.lbl\" class=\"lotusInactive feddocSampleText\" for=\"${namespace}customUrlTextBox_id\" aria-label=\"${_nlsUserInterface.srvConnPage.customUrlTextBoxLabel}\">\n <span dojoAttachPoint=\"customUrlTextBoxLabel\" class=\"feddocCustomUrlTextBox\">${_nlsUserInterface.srvConnPage.customUrlTextBoxLabel}</span>\n </label><br/>\n </div>\n </div>\n </div>\n </form>\n <div class=\"feddocTopSpace\">\n <h4 class=\"feddocHeader4\">\n <label id=\"${namespace}fedDocPickerAuthTypeInfoMsg.lbl\" aria-label=\"${_nlsUserInterface.srvConnPage.fedDocPickerAuthTypeInfoMsgLabel}\">\n <span dojoAttachPoint=\"fedDocPickerAuthTypeInfoMsgLabel\"><b>${_nlsUserInterface.srvConnPage.fedDocPickerAuthTypeInfoMsgLabel}</b></span>\n </label>\n </h4>\n <div>\n <span dojoAttachPoint=\"fedDocPickerAuthInfo\" id=\"${namespace}fedDocPickerAuthTypeInfoMsg_id\" name=\"${namespace}fedDocPickerAuthTypeInfoMsg\" aria-labelledby=\"${namespace}fedDocPickerAuthTypeInfoMsg.lbl\">\n <!-- being filled with informative text dynamically by the widget -->\n </span>\n </div>\n <!-- Authentication selection section BEGIN -->\n <div dojoAttachPoint=\"authSelectionSection\" id=\"${namespace}authSelectionSection\" name=\"${namespace}authSelectionSection\"></div>\n <!-- Authentication selection section END -->\n </div>\n</div>\n",widgetsInTemplate:true,_allOverrideAuthenticationDisabled:false,_authenticationInfoMsg:"",_authProperties:null,_authWidget:null,_authWidgetSection:null,_authWidgetSectionArguments:null,_availableAuthTypes:[],_callingEnvironment:com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm,_customServerSectionHeight:0,_customServiceSelectionEnabled:true,_documentsServices:[],_eventHandles:[],_feedType:String,_isTracing:false,_isAuthWidgetInitialized:false,_presetServerSectionHeight:0,_selectedUrl:"",_selPresetServerIndex:-1,_selPresetServerPageSize:5,_selPresetType:com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._cmis,_selPresetURL:"",_startUpWasCalled:false,_urlChangesDelay:250,_urlSelectionMode:"preset",_urlStore:null,_urlTextChangedTimerHandle:null,_vaultSelectionEnabled:true,_vaultSlotsAvailable:false,buildRendering:function(){var m="buildRendering()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},constructor:function(_4d){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_4d);if(_4d){this.trace(m,"p_params.authProperties:",dojo.toJson(_4d.authProperties));this.trace(m,"p_params.availableAuthTypes:",dojo.toJson(_4d.availableAuthTypes));this.trace(m,"p_params.callingEnvironment:",_4d.callingEnvironment);this.trace(m,"p_params.customServiceSelectionEnabled:",_4d.customServiceSelectionEnabled);this.trace(m,"p_params.documentsServices:",dojo.toJson(_4d.documentsServices));this.trace(m,"p_params.namespace:",_4d.namespace);this.trace(m,"p_params.vaultSelectionEnabled:",_4d.vaultSelectionEnabled);this.trace(m,"p_params.vaultSelectionEnabledForPZN:",_4d.vaultSelectionEnabledForPZN);this.trace(m,"p_params.vaultSelectionEnabledForWCM:",_4d.vaultSelectionEnabledForWCM);this.trace(m,"p_params.vaultSlots:",dojo.toJson(_4d.vaultSlots));}}this._eventHandles=[];if(typeof _4d.callingEnvironment=="string"){this._callingEnvironment=_4d.callingEnvironment;}if(typeof _4d.customServiceSelectionEnabled=="boolean"){this._customServiceSelectionEnabled=_4d.customServiceSelectionEnabled;}if(typeof _4d.namespace=="string"){this.namespace=_4d.namespace;}this._vaultSlotsAvailable=(_4d.vaultSlots)&&(_4d.vaultSlots.length>0);if(typeof _4d.vaultSelectionEnabled=="boolean"){this._vaultSelectionEnabled=_4d.vaultSelectionEnabled;}else{if(this._isCalledFromWCM()){var _4e=true;if(typeof _4d.vaultSelectionEnabledForWCM=="boolean"){_4e=_4d.vaultSelectionEnabledForWCM;}this._vaultSelectionEnabled=this._vaultSelectionEnabledForWCM;}else{if(this._isCalledFromPZN()){var _4f=true;if(typeof _4d.vaultSelectionEnabledForPZN=="boolean"){_4f=_4d.vaultSelectionEnabledForPZN;}this._vaultSelectionEnabled=_4f;}else{this._vaultSelectionEnabled=false;}}}if(this._isTracing){this.trace(m,"Determined credential vault selection support setting:",this._vaultSelectionEnabled);}this._authProperties={"authType":com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser};if(_4d.documentsServices&&dojo.isArray(_4d.documentsServices)){this._documentsServices=_4d.documentsServices;this._allOverrideAuthenticationDisabled=(this._documentsServices.length>0);for(var i=0;i<this._documentsServices.length;i++){if(this._allOverrideAuthenticationDisabled){if(this._documentsServices[i].vaultslot){this._allOverrideAuthenticationDisabled=!this._documentsServices[i].overrideAuthentication;}else{this._allOverrideAuthenticationDisabled=false;}}this._documentsServices[i].decodedurl=decodeURIComponent(this._documentsServices[i].url);this._documentsServices[i].decodedvaultslot=decodeURIComponent(this._documentsServices[i].vaultslot);this._documentsServices[i].decodedtype=this._mapResEnvTypeToJsType(this._documentsServices[i].type);var _50;if(this._documentsServices[i].title){this._documentsServices[i].decodedTitle=decodeURIComponent(this._documentsServices[i].title);this._documentsServices[i].tooltip=this._documentsServices[i].decodedurl;}else{this._documentsServices[i].decodedTitle=this._documentsServices[i].decodedurl;this._documentsServices[i].tooltip=this._documentsServices[i].decodedurl;}}}this._availableAuthTypes=[];if(_4d.availableAuthTypes){this._availableAuthTypes=_4d.availableAuthTypes;}else{this._availableAuthTypes=[com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser];if(this._isCalledFromWCM()){this._availableAuthTypes.push(com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd);}if(this._vaultSelectionEnabled){this._availableAuthTypes.push(com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault);}}var _51={"authProperties":this._authProperties,"availableAuthTypes":this._availableAuthTypes,"namespace":this.namespace,"nlsMessages":this._nlsMessages,"nlsUserInterface":this._nlsUserInterface,"onChangeAuthenticationMode":dojo.hitch(this,"_onAuthenticationChange"),"onErrorStateChanged":dojo.hitch(this,"_onAuthWidgetErrorStateChanged"),"vaultSlots":_4d.vaultSlots};this._authWidget=new com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget(_51);this._isAuthWidgetInitialized=false;var _52=this._calculateAuthSectionHeight();this._authWidgetSectionArguments={"namespace":this.namespace,"nlsMessages":this._nlsMessages,"nlsUserInterface":this._nlsUserInterface,"onCollapsed":dojo.hitch(this,"_onAuthenticationSectionCollapsed"),"onExpanded":dojo.hitch(this,"_onAuthenticationSectionExpanded"),"openHeight":_52,"openWidth":20,"sectionID":"auth","sectionTitleText":this._nlsUserInterface.srvConnPage.authWidgetSectionTitle,"visible":true,"widgetInstance":this._authWidget};var _53=this._nlsUserInterface.srvConnPage;this._stepLabel=_53.stepLabel;this._stepDescription=_53.stepDescription;this._startUpWasCalled=false;if(this._isTracing){this.traceExit(m);}},destroy:function(){var m="destroy()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},getSettings:function(){var m="getSettings()";if(this._isTracing){this.traceEntry(m);}var _54=this._authWidget.getAuthenticationProperties();var _55={"authProperties":_54,"authInfoMsg":this._authenticationInfoMsg,"feedType":this._feedType,"serverUrl":this._getUrl(),"serverType":this._determineServerType()};if(this._isTracing){this.traceExit(m,_55);}return _55;},layout:function(){var m="layout()";if(this._isTracing){this.traceEntry(m);}var _56=dijit.byId(this.namespace+"customUrlTextBox_id").domNode;var _57=dojo.contentBox(this.customServerSection).w-10;if(_57>=0){dojo.style(_56,"width",_57+"px");}if(this._isTracing){this.traceExit(m);}},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._authWidgetSection=new com.ibm.workplace.wcm.ecm.picker.widget.ExpandableSectionWidget(this._authWidgetSectionArguments);if(this._authWidgetSection&&(this._customServiceSelectionEnabled||!this._allOverrideAuthenticationDisabled)){this._authWidgetSection.placeAt(this.authSelectionSection);}this._presetServerSectionHeight=17.5;this._customServerSectionHeight=7;this._setPresetServerSectionVisible(true,false);if(this._customServiceSelectionEnabled){this._setCustomServerSectionVisible(false,false);}else{this._setCustomServerDivVisible(false);}this._buildPresetServerList();if(this._availableAuthTypes.length===0){dojo.style(this.authSelectionSection,"display","none");dijit.setWaiState(this.authSelectionSection,"hidden",true);}this._initEventHandles();if(this._isTracing){this.traceExit(m);}},setFeedType:function(_58){var m="setFeedType(p_feedType)";if(this._isTracing){this.traceEntry(m,_58);}this._feedType=_58;if(this._isTracing){this.traceExit(m);}},startup:function(){var m="startup()";if(this._isTracing){this.traceEntry(m);}if(!this._startUpWasCalled){this._authWidget.startup();this._authWidgetSection.startup();this._onAuthenticationChange(this._authProperties);if(this._documentsServices.length>0){this._selectPresetServerListIndex(0);}this._startUpWasCalled=true;}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this._clearEventHandles();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},_animateCloseSection:function(_59){var m="_animateCloseSection(p_domNode)";if(this._isTracing){this.traceEntry(m,_59);}if(!dojo.hasClass(_59,"lotusHidden")){dojo.style(_59,"overflow","hidden");dojo.animateProperty({"node":_59,"duration":800,"properties":{"height":{"end":0,"units":"px"}},"onEnd":dojo.hitch(this,function(){dojo.addClass(_59,"lotusHidden");dijit.setWaiState(_59,"hidden",true);dijit.removeWaiState(_59,"expanded");})}).play();}if(this._isTracing){this.traceExit(m);}},_animateOpenSection:function(_5a,_5b){var m="_animateOpenSection(p_domNode, p_targetHeight)";if(this._isTracing){this.traceEntry(m,[_5a,_5b]);}if(dojo.hasClass(_5a,"lotusHidden")){dojo.style(_5a,"overflow","hidden");dojo.marginBox(_5a,{h:"0ex"});dojo.style(_5a,"height","0ex");dojo.removeClass(_5a,"lotusHidden");dijit.setWaiState(_5a,"hidden",false);dijit.setWaiState(_5a,"expanded",true);dojo.animateProperty({"node":_5a,"duration":800,"properties":{"height":{"end":_5b,"units":"ex"}},"onEnd":dojo.hitch(this,function(){dojo.marginBox(_5a,{h:_5b+"ex"});})}).play();}if(this._isTracing){this.traceExit(m);}},_buildAuthenticationInfoMsg:function(_5c){var m="_buildAuthenticationInfoMsg(p_authProps)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_5c));}if(_5c){if(_5c.authType){switch(_5c.authType){case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault:this._authenticationInfoMsg=dojo.string.substitute(this._nlsUserInterface.srvConnPage.authInfoMsgVault,[_5c.vaultSlotID]);break;case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd:this._authenticationInfoMsg=this._nlsUserInterface.srvConnPage.authInfoMsgUserPwd;break;case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser:this._authenticationInfoMsg=this._nlsUserInterface.srvConnPage.authInfoMsgCurrentUser;break;default:this._authenticationInfoMsg=this._nlsUserInterface.srvConnPage.authInfoMsgUnknown;break;}}else{this._authenticationInfoMsg="";}}else{this._authenticationInfoMsg="";}if(this._isTracing){this.trace(m,"New authentication information message:",this._authenticationInfoMsg);this.traceExit(m);}},_buildPresetServerList:function(){var m="_buildPresetServerList()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Preset document services:",this._documentsServices);}if(this._documentsServices){for(var i=0;i<this._documentsServices.length;i++){var li=dojo.create("li",{"id":this.namespace+"_presetServer_"+i+"_item_id","name":this.namespace+"_presetServer_"+i+"_item","title":this._documentsServices[i].tooltip},this.presetServersList);var _5d=dojo.create("span",{"id":this.namespace+"_presetServer_"+i+"_item_text_id","name":this.namespace+"_presetServer_"+i+"_item_text","innerHTML":this._documentsServices[i].decodedTitle,"tabindex":(i===0)?"0":"-1"},li);dijit.setWaiState(_5d,"label",this._documentsServices[i].decodedTitle);dojo.place(li,this.presetServersList,"last");dojo.place(_5d,li,"last");dijit.setWaiRole(_5d,"option");dijit.setWaiState(_5d,"selected",false);dijit.setWaiState(_5d,"posinset",(i+1));dijit.setWaiState(_5d,"setsize",this._documentsServices.length);this._documentsServices[i].domNode=li;this._documentsServices[i].focusNode=_5d;this._eventHandles.push(dojo.connect(li,"onclick",dojo.hitch(this,function(i){this._deselectPresetServerItem();this._selectPresetServerItem(i);},i)));this._eventHandles.push(dojo.connect(li,"onmouseover",dojo.hitch(this,function(i){this._setHoverHighlightItem(i,true);},i)));this._eventHandles.push(dojo.connect(li,"onmouseout",dojo.hitch(this,function(i){this._setHoverHighlightItem(i,false);},i)));}}if(!this._documentsServices||(this._documentsServices.length===0)){this._presetServerSectionHeight=8;this._showNoServersMessage();}else{dijit.setWaiRole(this.presetServersList,"listbox");}if(this._isTracing){this.traceExit(m);}},_calculateAuthSectionHeight:function(){var m="_calculateAuthSectionHeight()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Available authentication types:",this._availableAuthTypes);}var hv=0;for(var i=0;i<this._availableAuthTypes.length;i++){switch(this._availableAuthTypes[i]){case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault:if(this._vaultSlotsAvailable){hv+=12;}break;case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd:hv+=19;break;case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser:hv+=3.5;break;default:break;}}if(this._isTracing){this.traceExit(m,hv);}return hv;},_clearEventHandles:function(){var m="_clearEventHandles()";if(this._isTracing){this.traceEntry(m);}dojo.forEach(this._eventHandles,dojo.disconnect);this._eventHandles=[];if(this._isTracing){this.traceExit(m);}},_deselectPresetServerItem:function(){var m="_deselectPresetServerItem()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Preset document services:",this._documentsServices);}if(this._documentsServices){for(var i=0;i<this._documentsServices.length;i++){var ds=this._documentsServices[i];if(ds.domNode){if(dojo.hasClass(ds.domNode,"lotusSelected")){dojo.removeClass(ds.domNode,"lotusSelected");dijit.setWaiState(ds.focusNode,"selected",false);this._selPresetURL="";this._selPresetType=null;dojo.attr(ds.focusNode,"tabindex","-1");this._selPresetServerIndex=-1;break;}}}}if(this._isTracing){this.traceExit(m);}},_determineReadyState:function(){var m="_determineReadyState()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Current authentication settings:",this._authProperties);}var _5e=false;var _5f=this._authWidget.getAuthenticationProperties();if(_5f){if(_5f.authType){switch(_5f.authType){case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault:_5e=(_5f.vaultSlotID!=="");break;case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeNoAuth:_5e=true;break;case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd:_5e=true;break;case com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser:_5e=true;break;default:_5e=false;break;}}}if(this._isTracing){this.trace(m,"New authentication ready state:",_5e);this.trace(m,"Selected URL",this._getUrl());}this._setReadyValue((this._getUrl()!=="")&&_5e);if(this._isTracing){this.traceExit(m);}},_determineServerType:function(){var m="_determineServerType()";if(this._isTracing){this.traceEntry(m);}var _60;if(this._feedType!==null){_60=this._feedType;}else{if(this._urlSelectionMode=="preset"){_60=this._selPresetType;}else{_60=null;}}if(this._isTracing){this.traceExit(m,_60);}return _60;},_enableAuthSection:function(_61){var m="_enableAuthSection()";if(this._isTracing){this.traceEntry(m,_61);}if(_61){dojo.style(this.authSelectionSection,"display","block");dojo.removeClass(this.fedDocPickerAuthInfo,"lotusInactive");}else{dojo.style(this.authSelectionSection,"display","none");dojo.addClass(this.fedDocPickerAuthInfo,"lotusInactive");}if(this._isTracing){this.traceExit(m);}},_getConfiguredDocumentsService:function(_62){var m="_getConfiguredDocumentsService(p_url)";if(this._isTracing){this.traceEntry(m,_62);this.trace(m,"Preset document services:",this._documentsServices);}var _63=-1;for(var i=0;i<this._documentsServices.length;i++){if(_62==this._documentsServices[i].decodedurl){_63=i;}}if(this._isTracing){this.traceExit(m,_63);}return _63;},_getUrl:function(){var m="_getUrl()";if(this._isTracing){this.traceEntry(m);}var _64;if(this._urlSelectionMode=="preset"){_64=this._selPresetURL;}else{_64=this.customUrlTextBox.attr("value");}if(this._isTracing){this.trace(m,"Currently selected URL:",_64);}var url;var _65=_64.match("https?://.*");if(_65&&_65.length>0){url=dojo.trim(_65[0]);}else{url=dojo.trim(_64);}if(this._isTracing){this.traceExit(m,url);}return url;},_initEventHandles:function(){var m="_initEventHandles()";if(this._isTracing){this.traceEntry(m);}this._eventHandles.push(dojo.connect(this.presetServersList,"onkeypress",dojo.hitch(this,"_onPresetServerKeyPressed")));this._eventHandles.push(dojo.connect(this.customUrlTextBox,"onChange",dojo.hitch(this,"_onUrlTextBoxChanged")));this._eventHandles.push(dojo.connect(this.presetServerRadioButton,"onClick",dojo.hitch(this,"_onClickPresetServerButton")));this._eventHandles.push(dojo.connect(this.customServerRadioButton,"onClick",dojo.hitch(this,"_onClickCustomServerButton")));this._eventHandles.push(dojo.connect(this.serverConnectionPageForm,"onsubmit",dojo.hitch(this,"_onSubmit")));if(this._isTracing){this.traceExit(m);}},_isCalledFromPZN:function(){var m="_isCalledFromPZN()";if(this._isTracing){this.traceEntry(m);}var _66=this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._pzn;if(this._isTracing){this.traceExit(m,_66);}return _66;},_isCalledFromWCM:function(){var m="_isCalledFromWCM()";if(this._isTracing){this.traceEntry(m);}var _67=this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm;if(this._isTracing){this.traceExit(m,_67);}return _67;},_mapResEnvTypeToJsType:function(_68){var m="_mapResEnvTypeToJsType(p_serverType)";if(this._isTracing){this.traceEntry(m,_68);}var _69="";if(typeof _68=="string"){switch(_68){case com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions.resEnvTypeCMIS:_69=com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._cmis;break;case com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions.resEnvTypeQDS:_69=com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._qds;break;default:_69=com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._cmis;break;}}else{_69=com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._cmis;}if(this._isTracing){this.traceExit(m,_69);}return _69;},_selectPresetServerListIndex:function(_6a){var m="_selectPresetServerListIndex(p_newIndex)";if(this._isTracing){this.traceEntry(m,_6a);}var _6b=_6a;if(_6b<0){_6b=0;}if(_6b>this._documentsServices.length-1){_6b=this._documentsServices.length-1;}this._deselectPresetServerItem();this._selectPresetServerItem(_6b);if(this._isTracing){this.traceExit(m);}},_onAuthWidgetErrorStateChanged:function(_6c,_6d,_6e,_6f){var m="_onAuthWidgetErrorStateChanged(p_sender, p_errorState, p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_6c,_6d,_6e,_6f]);}if(_6d===true){this._showError(_6e,_6f);}else{if(_6d===false){this._clearError();}else{}}if(this._isTracing){this.traceExit(m);}},_onPresetServerKeyPressed:function(_70){var m="_onPresetServerKeyPressed(p_evt)";if(this._isTracing){this.traceEntry(m,[_70]);}if(_70.keyCode){var _71=_70.target;switch(_70.keyCode){case dojo.keys.UP_ARROW:dojo.stopEvent(_70);this._selectPresetServerListIndex(this._selPresetServerIndex-1);break;case dojo.keys.DOWN_ARROW:dojo.stopEvent(_70);this._selectPresetServerListIndex(this._selPresetServerIndex+1);break;case dojo.keys.PAGE_UP:dojo.stopEvent(_70);this._selectPresetServerListIndex(this._selPresetServerIndex-this._selPresetServerPageSize);break;case dojo.keys.PAGE_DOWN:dojo.stopEvent(_70);this._selectPresetServerListIndex(this._selPresetServerIndex+this._selPresetServerPageSize);break;case dojo.keys.HOME:dojo.stopEvent(_70);this._selectPresetServerListIndex(0);break;case dojo.keys.END:dojo.stopEvent(_70);this._selectPresetServerListIndex(this._documentsServices.length-1);break;case dojo.keys.ENTER:this._onSubmit(_70);break;default:break;}}if(this._isTracing){this.traceExit(m,false);}},_onSubmit:function(_72){var m="_onSubmit(p_evt)";if(this._isTracing){this.traceEntry(m,[_72]);}dojo.stopEvent(_72);if(this._onDefaultAction&&dojo.isFunction(this._onDefaultAction)){this._onDefaultAction();}if(this._isTracing){this.traceExit(m,false);}return false;},_setAuthTypeForPresetServer:function(){var m="_setAuthTypeForPresetServer()";if(this._isTracing){this.traceEntry(m);}var url=this._getUrl();var _73=false;var _74="";var _75=false;var _76=true;var i=this._getConfiguredDocumentsService(url);if(i>=0){_74=this._documentsServices[i].decodedvaultslot;_75=this._authWidget.isVaultSlotAvailable(_74);_76=this._documentsServices[i].overrideAuthentication.toLowerCase()!="false";}if((_74)&&(_74!="undefined")&&(_74!=="")){if(_75){this._authWidget.changeAuthType(com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault);this._clearError();_73=!_76;}else{this._authWidget.changeAuthType(com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser);this._showError(dojo.string.substitute(this._nlsMessages.srvConnPage.errorVaultSlotMissing,[_74]));}}else{this._authWidget.changeAuthType(com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser);this._clearError();}if(((_74)&&(_74!=this._authProperties.vaultSlotID))&&(_75)){this._authProperties.vaultSlotID=_74;this._authWidget.setAuthenticationProperties({authProperties:this._authProperties});}if(_73){this._enableAuthSection(false);}else{this._enableAuthSection(true);}this._determineReadyState();if(this._isTracing){this.traceExit(m);}},_setHoverHighlightItem:function(_77,_78){var m="_setHoverHighlightItem(p_dsIndex, p_isHover)";if(this._isTracing){this.traceEntry(m,[_77,_78]);this.trace(m,"Preset document services:",this._documentsServices);}if(this._documentsServices){var ds=this._documentsServices[_77];if(ds){if(ds.domNode){if(_78){if(!dojo.hasClass(ds.domNode,"lotusSelected")){dojo.addClass(ds.domNode,"feddocServerItemHover");}}else{dojo.removeClass(ds.domNode,"feddocServerItemHover");}}}}if(this._isTracing){this.traceExit(m);}},_selectPresetServerItem:function(_79){var m="_selectPresetServerItem(p_dsIndex)";if(this._isTracing){this.traceEntry(m,[_79]);this.trace(m,"Preset document services:",this._documentsServices);}if(this._documentsServices){var ds=this._documentsServices[_79];if(ds){if(ds.domNode){dojo.addClass(ds.domNode,"lotusSelected");dijit.setWaiState(ds.focusNode,"selected",true);dojo.removeClass(ds.domNode,"feddocServerItemHover");dojo.attr(ds.focusNode,"tabindex","0");dijit.focus(ds.focusNode);this._selPresetURL=ds.decodedurl;this._selPresetServerIndex=_79;if(ds.decodedtype){if((ds.decodedtype==com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._cmis)||(ds.decodedtype==com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._qds)){this._selPresetType=ds.decodedtype;}else{this._selPresetType=com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._cmis;}}else{this._selPresetType=com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._cmis;}this._setAuthTypeForPresetServer();}}}if(this._isTracing){this.traceExit(m);}},_onAuthenticationChange:function(_7a){var m="_onAuthenticationChange(p_authProps)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_7a));}this._authProperties=dojo.clone(_7a);this._buildAuthenticationInfoMsg(_7a);this._updateAuthenticationInfoMsg();this._determineReadyState();if(this._isTracing){this.traceExit(m);}},_onAuthenticationSectionCollapsed:function(){var m="_onAuthenticationSectionCollapsed()";if(this._isTracing){this.traceEntry(m);}this._layoutChanged();if(this._isTracing){this.traceExit(m);}},_onAuthenticationSectionExpanded:function(){var m="_onAuthenticationSectionExpanded()";if(this._isTracing){this.traceEntry(m);}if(!this._isAuthWidgetInitialized){this._authWidget.setAuthenticationProperties({"authProperties":this._authProperties});this._isAuthWidgetInitialized=true;}this._layoutChanged();if(this._isTracing){this.traceExit(m);}},_onAuthPropertiesChanged:function(_7b){var m="_onAuthPropertiesChanged(p_authProperties)";if(this._isTracing){this.traceEntry(m,dojo.toJson(_7b));}if(_7b){if(_7b.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault){this._authProperties.vaultSlotID=_7b.vaultSlotID;}}if(this._isTracing){this.traceEntry(m,"New credential vault slot ID:",this._authProperties.vaultSlotID);this.traceExit(m);}},_onClickCustomServerButton:function(){var m="_onClickCustomServerButton()";if(this._isTracing){this.traceEntry(m);}this._setPresetServerSectionVisible(false,true);this._setCustomServerSectionVisible(true,true);this._urlSelectionMode="custom";this._enableAuthSection(true);this._authWidget.changeAuthType(com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeCurrentUser);this._clearError();this._determineReadyState();if(this._isTracing){this.traceExit(m);}},_onClickPresetServerButton:function(){var m="_onClickPresetServerButton()";if(this._isTracing){this.traceEntry(m);}this._setPresetServerSectionVisible(true,true);this._setCustomServerSectionVisible(false,true);this._urlSelectionMode="preset";this._setAuthTypeForPresetServer();this.presetServerRadioButton.focus();if(this._isTracing){this.traceExit(m);}},_onUrlTextBoxChanged:function(){var m="_onUrlTextBoxChanged()";if(this._isTracing){this.traceEntry(m);}this._clearError();clearTimeout(this._urlTextChangedTimerHandle);this._urlTextChangedTimerHandle=setTimeout(dojo.hitch(this,"_determineReadyState"),this._urlChangesDelay);if(this._isTracing){this.traceExit(m);}},_setCustomServerDivVisible:function(_7c){var m="_setCustomServerDivVisible(p_isVisible)";if(this._isTracing){this.traceEntry(m,_7c);}this._setSectionVisible(this.customServerDiv,_7c,false,0);if(this._isTracing){this.traceExit(m);}},_setCustomServerSectionVisible:function(_7d,_7e){var m="_setCustomServerSectionVisible(p_isVisible, p_animate)";if(this._isTracing){this.traceEntry(m,[_7d,_7e]);}this._setSectionVisible(this.customServerSection,_7d,_7e,this._customServerSectionHeight);if(this._isTracing){this.traceExit(m);}},_setPresetServerSectionVisible:function(_7f,_80){var m="_setPresetServerSectionVisible(p_isVisible, p_animate)";if(this._isTracing){this.traceEntry(m,[_7f,_80]);}this._setSectionVisible(this.presetServerSection,_7f,_80,this._presetServerSectionHeight);if(this._isTracing){this.traceExit(m);}},_setSectionVisible:function(_81,_82,_83,_84){var m="_setSectionVisible(p_sectionDomNode, p_isVisible, p_animate, p_targetHeight)";if(this._isTracing){this.traceEntry(m,[_81,_82,_83,_84]);}if((_83)&&(_83===true)){if(_82===true){this._animateOpenSection(_81,_84);}else{this._animateCloseSection(_81);}}else{this._setVisible(_81,_82);}if(this._isTracing){this.traceExit(m);}},_setVisible:function(_85,_86){var m="_setVisible(p_domNode, p_isVisible)";if(this._isTracing){this.traceEntry(m,[_85,_86]);}if(_86===true){if(dojo.hasClass(_85,"lotusHidden")){dojo.removeClass(_85,"lotusHidden");}dijit.setWaiState(_85,"hidden",false);dijit.setWaiState(_85,"expanded",true);}else{if(!dojo.hasClass(_85,"lotusHidden")){dojo.addClass(_85,"lotusHidden");}dijit.setWaiState(_85,"hidden",true);dijit.removeWaiState(_85,"expanded");}if(this._isTracing){this.traceExit(m);}},_showNoServersMessage:function(){var m="_showNoServersMessage()";if(this._isTracing){this.traceEntry(m);}dojo.style(this.presetServersListDiv,"display","none");dojo.style(this.fedDocNoServersInfoDiv,"display","block");if(this._isTracing){this.traceExit(m);}},_updateAuthenticationInfoMsg:function(){var m="_updateAuthenticationInfoMsg()";if(this._isTracing){this.traceEntry(m);}dojo.attr(this.fedDocPickerAuthInfo,"innerHTML",this._authenticationInfoMsg);if(this._isTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.filter._TreeItemFilter"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.filter._TreeItemFilter"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.filter._TreeItemFilter");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.filter._TreeItemFilter",[com.ibm.widgets._Traceable],{_isTracing:false,_itemFilter:null,constructor:function(_87){},isItemAcceptable:function(_88,_89){}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.filter.LibFolderTreeItemFilter"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.filter.LibFolderTreeItemFilter"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.filter.LibFolderTreeItemFilter");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.filter.LibFolderTreeItemFilter",[com.ibm.workplace.wcm.ecm.picker.widget.filter._TreeItemFilter],{constructor:function(_8a){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_8a);if(_8a){this.trace(m,"p_params.itemFilter:",_8a.itemFilter);}}if(_8a&&(typeof _8a==="object")){if(_8a.itemFilter&&(typeof _8a.itemFilter=="object")){this._itemFilter=_8a.itemFilter;}}if(this._isTracing){this.traceExit(m);}},isItemAcceptable:function(_8b,_8c){var m="isItemAcceptable(p_item, p_store)";if(this._isTracing){this.traceEntry(m,[_8b,_8c]);}var _8d=(_8c.isFolderItem(_8b)||_8c.isRepositoryItem(_8b));if(_8d&&this._itemFilter){_8d=_8d&&this._itemFilter.isItemAcceptable(_8b,_8c);}if(this._isTracing){this.traceExit(m,_8d);}return _8d;}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.filter.QuickSearchTreeItemFilter"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.filter.QuickSearchTreeItemFilter"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.filter.QuickSearchTreeItemFilter");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.filter.QuickSearchTreeItemFilter",[com.ibm.workplace.wcm.ecm.picker.widget.filter._TreeItemFilter],{_labelContains:"",_labelEndsWith:"",_labelStartsWith:"",changeLabelContains:function(_8e){var m="changeLabelContains(p_labelContains)";if(this._isTracing){this.traceEntry(m,[_8e]);}if(typeof _8e=="string"&&_8e!==""){this._labelContains=_8e.toLowerCase();var _8f=this._labelContains.indexOf("*");if(_8f>-1){if(_8f>0){this.changeLabelStartsWith(this._labelContains.substr(0,_8f));}else{this.changeLabelStartsWith("");}if(_8f<this._labelContains.length){this.changeLabelEndsWith(this._labelContains.substr(_8f+1));}else{this.changeLabelEndsWith("");}}else{this.changeLabelStartsWith("");this.changeLabelEndsWith("");}}else{this._labelContains=_8e;}if(this._labelContains===""){this.changeLabelStartsWith("");this.changeLabelEndsWith("");}if(this._isTracing){this.traceExit(m);}},changeLabelEndsWith:function(_90){var m="changeLabelEndsWith(p_labelEndsWith)";if(this._isTracing){this.traceEntry(m,[_90]);}if(typeof _90=="string"&&_90!==""){this._labelEndsWith=_90.toLowerCase();}else{this._labelEndsWith=_90;}if(this._isTracing){this.traceExit(m);}},changeLabelStartsWith:function(_91){var m="changeLabelStartsWith(p_labelStartsWith)";if(this._isTracing){this.traceEntry(m,[_91]);}if(typeof _91=="string"&&_91!==""){this._labelStartsWith=_91.toLowerCase();}else{this._labelStartsWith=_91;}if(this._isTracing){this.traceExit(m);}},constructor:function(_92){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_92);if(_92){this.trace(m,"p_params.itemFilter:",_92.itemFilter);this.trace(m,"p_params.labelStartsWith:",_92.labelStartsWith);this.trace(m,"p_params.labelEndsWith:",_92.labelEndsWith);this.trace(m,"p_params.labelContains:",_92.labelContains);}}if(_92&&typeof _92=="object"){if(_92.itemFilter&&typeof _92.itemFilter=="object"){this._itemFilter=_92.itemFilter;}if(typeof _92.labelStartsWith=="string"){this.changeLabelStartsWith(_92.labelStartsWith);}if(typeof _92.labelEndsWith=="string"){this.changeLabelEndsWith(_92.labelEndsWith);}if(typeof _92.labelContains=="string"){this.changeLabelContains(_92.labelContains);}}if(this._isTracing){this.traceExit(m);}},isItemAcceptable:function(_93,_94){var m="isItemAcceptable(p_item, p_store)";if(this._isTracing){this.traceEntry(m,[_93,_94]);}var _95=this._itemMatchesConditions(_93,_94);if(_95&&this._itemFilter){_95=_95&&this._itemFilter.isItemAcceptable(_93,_94);}if(this._isTracing){this.traceExit(m,_95);}return _95;},_itemMatchesConditions:function(_96,_97){var m="_itemMatchesConditions(p_item, p_store)";if(this._isTracing){this.traceEntry(m,[_96,_97]);}var _98=true;var _99="";var _9a="";var _9b=false;var _9c=false;if((this._labelStartsWith)&&(this._labelStartsWith!=="")){_9b=true;}if((this._labelEndsWith)&&(this._labelEndsWith!=="")){_9c=true;}if((!_9b)&&(!_9c)){this.trace(m,"Running 'contains' check");if((this._labelContains)&&(this._labelContains!=="")){if(this._labelContains=="*"){_98=true;}else{_99=_97.getLabel(_96);if(_99&&(_99!=="")){_9a=_99.toLowerCase();this.trace(m,"Item label (lowercase): ",_9a);_98=_98&&(_9a.indexOf(this._labelContains)>=0);}else{_98=false;}}}}else{var _9d=false;var _9e=false;if(_9b===true){_99=_97.getLabel(_96);if(_99&&(_99!=="")){this.trace(m,"Running 'startsWith' check");_9a=_99.toLowerCase();this.trace(m,"Item label (lowercase): ",_9a);_9d=(_9a.indexOf(this._labelStartsWith)===0);}}if(_9c===true){_99=_97.getLabel(_96);if(_99&&(_99!=="")){this.trace(m,"Running 'endsWith' check");_9a=_99.toLowerCase();this.trace(m,"Item label (lowercase): ",_9a);var idx=_9a.lastIndexOf(this._labelEndsWith);_9e=((idx>-1)&&(idx===(_9a.length-this._labelEndsWith.length)));}}if((_9b===true)&&(_9c===true)){_98=_98&&_9d&&_9e;}else{_98=_98&&(_9d||_9e);}}if(this._isTracing){this.traceExit(m,_98);}return _98;}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.model.FedDocTreeModel"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.model.FedDocTreeModel"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.model.FedDocTreeModel");dojo.require("dojo.string");dojo.require("dijit.tree.ForestStoreModel");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.model.FedDocTreeModel",[dijit.tree.ForestStoreModel,com.ibm.widgets._Traceable],{_allowSubItems:true,_isTracing:false,_itemFilter:null,constructor:function(_9f){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_9f);if(_9f){this.trace(m,"p_params.itemFilter:",_9f.itemFilter);this.trace(m,"p_params.allowSubItems:",_9f.allowSubItems);}}if(_9f&&typeof _9f=="object"){if(_9f.itemFilter&&typeof _9f.itemFilter=="object"){this._itemFilter=_9f.itemFilter;}if(typeof _9f.allowSubItems!="undefined"){this._allowSubItems=_9f.allowSubItems;}}if(this._isTracing){this.traceExit(m);}},filterTreeItems:function(_a0){var m="filterTreeItems(parentItem)";if(this._isTracing){this.traceEntry(m,_a0);}var _a1=[];var _a2=dojo.hitch(this,function(_a3){dojo.forEach(_a3,function(_a4){if(this._itemFilter){var _a5=false;if(this._allowSubItems&&(this.store.isFolderItem(_a4)||this.store.isRepositoryItem(_a4))&&(this.store.isItemLoaded(_a4))&&(this.store.isItemExpanded(_a4))){_a5=this.filterTreeItems(_a4);}else{_a5=false;}if((this._itemFilter.isItemAcceptable(_a4,this.store))||(_a5)){_a1.push(_a4);}}else{_a1.push(_a4);}},this);if((this.onChildrenChange)&&(dojo.isFunction(this.onChildrenChange))){this.onChildrenChange(_a0,_a1);}});this.getChildren(_a0,_a2,null,true);_a1=(_a1.length>0);if(this._isTracing){this.traceExit(m,_a1);}return _a1;},getChildren:function(_a6,_a7,_a8,_a9){var m="getChildren(parentItem, onComplete, onError, useOriginal)";if(this._isTracing){this.traceEntry(m,[_a6,_a7,_a8,_a9]);}var _aa=[];var _ab=_a7;var _ac=dojo.hitch(this,function(_ad){dojo.forEach(_ad,function(_ae){if(this._itemFilter){if(this._itemFilter.isItemAcceptable(_ae,this.store)){_aa.push(_ae);}}else{_aa.push(_ae);}},this);if((_ab)&&(dojo.isFunction(_ab))){_ab(_aa);}});var _af=((!_a9)||(_a9&&(_a9===false)));if(this._isTracing){this.trace(m,"Use advanced logic:",_af);}if(_af){var _b0=arguments;if(_b0[1]){_b0[1]=_ac;}this.inherited(_b0);}else{this.inherited(arguments);}if(this._isTracing){this.traceExit(m);}},mayHaveChildren:function(_b1){var m="mayHaveChildren(p_item)";if(this._isTracing){this.traceEntry(m,_b1);}var _b2=this._allowSubItems&&(this.store.isFolderItem(_b1)||this.store.isRepositoryItem(_b1)||this.inherited(arguments));if(this._isTracing){this.traceExit(m,_b2);}return _b2;}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils",[com.ibm.widgets._Traceable],{getErrorMessage:function(_b3,_b4,_b5){var m="getErrorMessage(ioargs, nlsMessages, httpsSpecialMsg)";if(this._isTracing){this.traceEntry(m,[_b3,_b4,_b5]);}var _b6=[];if(_b3.xhr.status>=400){var _b7="errorHttp"+dojo.string.trim(_b3.xhr.status+"");var _b8="errorDetailsHttp"+dojo.string.trim(_b3.xhr.status+"");var _b9="errorDetailsHttps"+dojo.string.trim(_b3.xhr.status+"");if(_b4[_b7]){if(_b3.xhr.status==500){var _ba="";if(typeof _b3.xhr.response=="string"){_ba=_b3.xhr.response;}else{if(typeof _b3.xhr.responseText=="string"){_ba=_b3.xhr.responseText;}}_b6[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorMessage]=_b4[_b7];if(_ba.length>500){_ba=_ba.substring(0,499);}_b6[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorDetails]=_ba;}else{_b6[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorMessage]=_b4[_b7];if((_b5)&&(_b4[_b9])){_b6[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorDetails]=_b4[_b9];}else{if(_b4[_b8]){_b6[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorDetails]=_b4[_b8];}}}}else{_b6[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorMessage]=_b4.errorFetchingData;}}if(this._isTracing){this.traceExit(m,_b6);}return _b6;}});com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils._INSTANCE=new com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils();com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorMessage="ErrorMessage";com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorDetails="ErrorDetails";}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore");dojo.require("dojo.string");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore",[com.ibm.widgets._Traceable],{_credentialVaultParamValue:null,_feedBaseURL:"",_feedSvcDocBaseURL:"",_isTracing:false,_items:{},_nlsMessages:{},_nodeTypes:[],_onErrorStateChanged:null,_onRootNodeChanged:null,_typeFilter:"all",_url:null,addNodeTypes:function(_bb){var m="addNodeTypes(p_nodeTypes)";if(this._isTracing){this.traceEntry(m,_bb);}if(dojo.isArray(_bb)){dojo.forEach(_bb,dojo.hitch(this,function(_bc){if(dojo.indexOf(this._nodeTypes,_bc)==-1){this._nodeTypes.push(_bc);}}));this._computeTypeFilter();this._forceItemsReload();}if(this._isTracing){this.traceExit(m);}},close:function(_bd){var m="close(request)";if(this._isTracing){this.traceEntry(m,_bd);}this._items={};if(this._isTracing){this.traceExit(m);}return;},constructor:function(_be){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_be);if(_be){this.trace(m,"p_params.url:",_be.url);this.trace(m,"p_params.feedBaseURL:",_be.feedBaseURL);this.trace(m,"p_params.feedSvcDocBaseURL",_be.feedSvcDocBaseURL);this.trace(m,"p_params.nodeTypes:",dojo.toJson(_be.nodeTypes));this.trace(m,"p_params.nlsMessages",_be.nlsMessages);this.trace(m,"p_params.credentialVaultParamValue:",_be.credentialVaultParamValue);}}if(_be&&typeof _be=="object"){if(typeof _be.url=="string"){this._url=_be.url;}if(typeof _be.feedBaseURL=="string"){this._feedBaseURL=_be.feedBaseURL;}if(typeof _be.feedSvcDocBaseURL=="string"){this._feedSvcDocBaseURL=_be.feedSvcDocBaseURL;}if(_be.nodeTypes&&typeof _be.nodeTypes=="object"){this._nodeTypes=_be.nodeTypes;}if(typeof _be.credentialVaultParamValue=="string"){this._credentialVaultParamValue=_be.credentialVaultParamValue;}if((_be.onErrorStateChanged)&&dojo.isFunction(_be.onErrorStateChanged)){this._onErrorStateChanged=_be.onErrorStateChanged;}if((_be.onRootNodeChanged)&&dojo.isFunction(_be.onRootNodeChanged)){this._onRootNodeChanged=_be.onRootNodeChanged;}if((_be.nlsMessages)&&typeof _be.nlsMessages=="object"){this._nlsMessages=_be.nlsMessages;}}this._computeTypeFilter();if(this._isTracing){this.traceExit(m);}},containsValue:function(_bf,_c0,_c1){var m="containsValue(p_item, p_attribute, p_value)";if(this._isTracing){this.traceEntry(m,[_bf,_c0,_c1]);}var _c2=false;if(this.hasAttribute(_bf,_c0)){_c2=dojo.some(this.getValues(_bf,_c0),function(val){return val==_c1;},this);}if(this._isTracing){this.traceExit(m,_c2);}return _c2;},fetch:function(_c3){var m="fetch(p_params)";if(this._isTracing){this.traceEntry(m,_c3);this.trace(m,"Scope:",_c3.scope);this.trace(m,"Scope:",_c3.scope);this.trace(m,"Scope:",_c3.scope);}var _c4=dojo.global;if(_c3.scope){_c4=_c3.scope;}if(_c3.item){if(this._isTracing){this.trace(m,"Remote fetching of items");}this._asyncLoadItemsRemote(_c3.item,_c3.onComplete);}else{if(!_c3.query||(typeof _c3.query=="string"&&_c3.query.match(/^toplevelitems$/i))){if(this._isTracing){this.trace(m,"Remote fetching of items");}this._asyncLoadItemsRemote(null,_c3.onComplete);}else{if(typeof _c3.query=="string"&&(_c3.query.match("^itemID=")=="itemID=")){var ID=_c3.query.substring(7,_c3.query.length);if(this._isTracing){this.trace(m,"Item identity from query:",ID);}if(ID!==""){var _c5=this.fetchItemByIdentity({"identity":ID});if(this._isTracing){this.trace(m,"Item fetched by identity:",_c5);}if(_c5){var _c6=this.isItemLoaded(_c5);if(this._isTracing){this.trace(m,"Is item already loaded:",_c6);}if(_c6){this._clearError();if((_c3.onComplete)&&(dojo.isFunction(_c3.onComplete))){_c3.onComplete(this.getValues(_c5,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._childrenAttr));}}else{this.loadItem({"item":_c5,"onItem":_c3.onComplete,"topLevelCallback":true});}}else{this.error(m,dojo.string.substitute("Item with ID ${0} was not found in the store.",[ID]));}}}}}if(this._isTracing){this.traceExit(m);}},fetchItemByIdentity:function(_c7){var m="fetchItemByIdentity(p_params)";if(this._isTracing){this.traceEntry(m,_c7);this.trace(m,"Identity:",_c7.identity);this.trace(m,"Scope:",_c7.scope);this.trace(m,"onItem callback:",_c7.onItem);}var id=_c7.identity;if(typeof id!="string"){if(!dojo.isFunction(id.toString)){throw new Error(dojo.string.substitute(this._nlsMessages.srvCommunication.attributeNotStringable,["id","fetchItemByIdentity"]));}id=id.toString();}var _c8=this._items[id];if(typeof _c8=="undefined"){_c8=null;}var _c9=dojo.global;if(_c7.scope){_c9=_c7.scope;}if(dojo.isFunction(_c7.onItem)){_c7.onItem.call(_c9,_c8);}if(this._isTracing){this.traceExit(m,_c8);}return _c8;},getAttributes:function(_ca){var m="getAttributes(p_item)";if(this._isTracing){this.traceEntry(m,_ca);}var _cb=[];var i=0;for(var _cc in _ca){if((typeof (_ca[_cc])!="undefined")&&(typeof (_ca[_cc])!="function")){_cb[i++]=_cc;}}if(this._isTracing){this.traceExit(m,dojo.toJson(_cb));}return _cb;},getDownloadURL:function(_cd){var m="getDownloadURL(p_item)";if(this._isTracing){this.traceEntry(m,_cd);}var _ce=this.getValue(_cd,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._downloadURLAttr,"");if(this._isTracing){this.traceExit(m,_ce);}return _ce;},getFeatures:function(){var m="getFeatures()";if(this._isTracing){this.traceEntry(m);}var _cf={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};if(this._isTracing){this.traceExit(m,_cf);}return _cf;},getIdentity:function(_d0){var m="getIdentity(p_item)";if(this._isTracing){this.traceEntry(m,_d0);}var _d1=this.getValue(_d0,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr);if(this._isTracing){this.traceExit(m,_d1);}return _d1;},getIdentityAttributes:function(_d2){var m="getIdentityAttributes(p_item)";if(this._isTracing){this.traceEntry(m,_d2);}result=[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr];if(this._isTracing){this.traceExit(m,result);}return result;},getLabel:function(_d3){var m="getLabel(p_item)";if(this._isTracing){this.traceEntry(m,_d3);}var _d4=this.getValue(_d3,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._labelAttr);if(this._isTracing){this.traceExit(m,_d4);}return _d4;},getLabelAttributes:function(_d5){var m="getLabelAttributes(p_item)";if(this._isTracing){this.traceEntry(m,_d5);}var _d6=[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._labelAttr];if(this._isTracing){this.traceExit(m,_d6);}return _d6;},getValue:function(_d7,_d8,_d9){var m="getValue(p_item, p_attribute, p_defaultValue)";if(this._isTracing){this.traceEntry(m,[_d7,_d8,_d9]);}var _da=_d9;if(typeof _d8!="string"){throw new Error(dojo.string.substitute(this._nlsMessages.srvCommunication.attributeNotStringable,["p_attribute","getValue"]));}if(_d8==this.PATH){_da=this.getPath(_d7);}else{if(!this.hasAttribute(_d7,_d8)){_da=_d9;}else{_da=_d7[_d8];}}if(this._isTracing){this.traceExit(m,_da);}return _da;},getValues:function(_db,_dc){var m="getValues(p_item, p_attribute)";if(this._isTracing){this.traceEntry(m,[_db,_dc]);}if(typeof _dc!="string"){throw new Error(dojo.string.substitute(this._nlsMessages.srvCommunication.attributeNotStringable,["p_attribute","getValues"]));}var _dd=this._dereferenceItem(_db);var _de=[];if(_dc==com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._childrenAttr){var tmp;if(_dd[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._childrenAttr]){tmp=[];if(_dd[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr]===true){tmp=_dd[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._childrenAttr];}}if(typeof tmp!="undefined"){_de=tmp;}}else{var ret=this.getValue(_dd,_dc);if(typeof ret!="undefined"){_de=[ret];}}if(this._isTracing){this.traceExit(m,_de);}return _de;},getViewURL:function(_df){var m="getViewURL(p_item)";if(this._isTracing){this.traceEntry(m,_df);}var _e0=this.getValue(_df,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._viewURLAttr,"");if(this._isTracing){this.traceExit(m,_e0);}return _e0;},hasAttribute:function(_e1,_e2){var m="hasAttribute(p_item, p_attribute)";if(this._isTracing){this.traceEntry(m,[_e1,_e2]);}if(typeof _e2!="string"){throw new Error(dojo.string.substitute(this._nlsMessages.srvCommunication.attributeNotStringable,["p_attribute","hasAttribute"]));}var _e3=(typeof _e1[_e2]!="undefined");if(this._isTracing){this.traceExit(m,_e3);}return _e3;},isRepositoryItem:function(_e4){var m="isRepositoryItem(p_item)";if(this._isTracing){this.traceEntry(m,_e4);}var _e5=(this.getValue(_e4,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._baseTypeAttr,"document")=="repository");if(this._isTracing){this.traceExit(m,_e5);}return _e5;},isFolderItem:function(_e6){var m="isFolderItem(p_item)";if(this._isTracing){this.traceEntry(m,_e6);}var _e7=(this.getValue(_e6,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._baseTypeAttr,"document")=="folder");if(this._isTracing){this.traceExit(m,_e7);}return _e7;},isItem:function(_e8){var m="isItem(p_obj)";if(this._isTracing){this.traceEntry(m,_e8);}var ret=false;if(_e8&&typeof _e8!="undefined"){ret=typeof _e8[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr]=="string";if(ret){var id=_e8[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr];ret=(typeof this._items[id]!="undefined");}else{throw new Error(dojo.string.substitute(this._nlsMessages.srvCommunication.attributeNotStringable,["p_obj._idAttr","isItem"]));}}if(this._isTracing){this.traceExit(m,ret);}return ret;},isItemExpanded:function(_e9){var m="isItemExpanded(p_item)";if(this._isTracing){this.traceEntry(m,_e9);}var _ea=this._dereferenceItem(_e9);if(this.isItem(_ea)){result=(this.getValue(_ea,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._expandedAttr,false)===true);}else{result=false;}if(this._isTracing){this.traceExit(m,result);}return result;},isItemLoaded:function(_eb){var m="isItemLoaded(p_item)";if(this._isTracing){this.traceEntry(m,_eb);}var _ec=this._dereferenceItem(_eb);var _ed=this.isItem(_ec)&&(this.getValue(_ec,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr)===true);if(this._isTracing){this.traceExit(m,_ed);}return _ed;},loadItem:function(_ee){var m="loadItem(p_params)";if(this._isTracing){this.traceEntry(m,_ee);this.trace(m,"Top level callback:",_ee.topLevelCallback);this.trace(m,"Item:",_ee.item);this.trace(m,"onItem callback:",_ee.onItem);}var _ef=false;if(_ee.topLevelCallback){_ef=_ee.topLevelCallback;}if(this._isTracing){this.trace(m,"Remote fetching of items");}this._asyncLoadItemsRemote(_ee.item,_ee.onItem,_ef);if(this._isTracing){this.traceExit(m);}},removeNodeTypes:function(_f0){var m="removeNodeTypes(p_nodeTypes)";if(this._isTracing){this.traceEntry(m,_f0);}if(dojo.isArray(_f0)){var _f1=[];dojo.forEach(this._nodeTypes,dojo.hitch(this,function(_f2){if(dojo.indexOf(_f0,_f2)==-1){_f1.push(_f2);}}));this._nodeTypes=_f1;this._computeTypeFilter();this._forceItemsReload();}if(this._isTracing){this.traceExit(m);}},setItemExpanded:function(_f3,_f4){var m="setItemExpanded(p_item, p_isExpanded)";if(this._isTracing){this.traceEntry(m,[_f3,_f4]);}var _f5=this._dereferenceItem(_f3);if(this.isItem(_f5)){_f5[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._expandedAttr]=_f4;}if(this._isTracing){this.traceExit(m);}},_asyncLoadItemsRemote:function(_f6,_f7,_f8){var m="_asyncLoadItemsRemote(p_parentItem, p_callback, p_topLevelCallback)";if(this._isTracing){this.traceEntry(m,[_f6,_f7,_f8]);}this._clearError();var _f9;if(_f6===null){_f9=this._generateTargetURL(this._url,true);}else{var url=_f6[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._viewURLAttr];_f9=this._generateTargetURL(url);}var cb=dojo.hitch(this,function(_fa,_fb,_fc){if(_fc.xhr.status==200){if(this._isTracing){this.trace(m,"XHR callback - response:",_fb);}var _fd;if(_fb.length>2){_fd=dojo.fromJson(_fb);}else{_fd=null;}if(this._isTracing){this.trace(m,"XHR callback - backend data:",dojo.toJson(_fd));}var _fe;if(_fd!==null){_fe=_fd.children;}else{_fe=[];}if(_f6!==null){_f6[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._childrenAttr]=_fe;this._processLoadedItems(_f6,_fa,_fe,null,_f8);}else{if(_fd.root){if(!_fd.root[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._viewURLAttr]){_fd.root[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._viewURLAttr]=this._url;}this._processLoadedItems(null,_fa,_fe,null,_f8);var _ff=_fd.root;_ff.baseType="folder";this._items[_ff[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr]]=_ff;_ff[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._childrenAttr]=_fe;this._processLoadedItems(_ff,null,_fe,null,_f8);if(this._onRootNodeChanged&&dojo.isFunction(this._onRootNodeChanged)){this._onRootNodeChanged(_ff);}}else{if(this._onRootNodeChanged&&dojo.isFunction(this._onRootNodeChanged)){this._onRootNodeChanged(null);}this._processLoadedItems(_f6,_fa,_fe,null,_f8);}}}else{var _100=com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils._INSTANCE.getErrorMessage(_fc,this._nlsMessages.srvCommunication,(this._url.substring(0,6).toLowerCase()==="https:"));this._showError(_100[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorMessage],_100[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorDetails]);if(this._isTracing){this.error(m,"Could not setup data backend store.",[_fc.xhr.status]);}}},_f7);if(this._isTracing){this.trace(m,"Initiating XHR using target URL:",_f9);}dojo.xhrGet({"url":_f9,"handle":cb,"sync":false});if(this._isTracing){this.traceExit(m);}},_clearError:function(){this._errorState=false;if(this._onErrorStateChanged){this._onErrorStateChanged(this,false);}},_computeTypeFilter:function(){var m="_computeTypeFilter()";if(this._isTracing){this.traceEntry(m);}var _101=(dojo.indexOf(this._nodeTypes,"document")!=-1);if(_101===true){this._typeFilter="all";}else{this._typeFilter="folder";}if(this._isTracing){this.trace(m,"New type filer:",this._typeFilter);this.traceExit(m);}},_dereferenceItem:function(_102){var m="_dereferenceItem(p_item)";if(this._isTracing){this.traceEntry(m,_102);}var _103=null;if(this.isItem(_102)){var id=_102[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr];_103=this._items[id];}if(this._isTracing){this.traceExit(m,_103);}return _103;},_findItemForURL:function(_104){var m="_findItemForURL(p_url)";if(this._isTracing){this.traceEntry(m,_104);}var _105=null;for(var id in this._items){var item=this._items[id];var url=this.getValue(item,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._viewURLAttr,null);if(url==_104){_105=item;break;}}if(this._isTracing){this.traceExit(m,_105);}return _105;},_forceItemsReload:function(){var m="forceItemsReload()";if(this._isTracing){this.traceEntry(m);}for(var id in this._items){var item=this._items[id];if(this.getValue(item,com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr)===true){item[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr]=false;}}if(this._isTracing){this.traceExit(m);}},_generateTargetURL:function(_106,_107){var m="_generateTargetURL(p_url, p_useSvcDocUrl)";if(this._isTracing){this.traceEntry(m,[_106,_107]);}var _108=encodeURIComponent(this._encodeUrlIfNeeded(_106));var _109;if(_107===true){_109=this._feedSvcDocBaseURL;}else{_109=this._feedBaseURL;}var _10a;if(typeof this._credentialVaultParamValue=="string"){_10a=encodeURIComponent(this._credentialVaultParamValue);}else{_10a="";}var _10b=_109.replace("%7BtypeFilter%7D",this._typeFilter).replace("%7BfeedUrl%7D",_108).replace("%7BmimeType%7D","application%2Fjson").replace("%7BvaultSlotId%7D",_10a);if(this._isTracing){this.traceExit(m,_10b);}return _10b;},_encodeUrlIfNeeded:function(_10c){var m="_encodeUrlIfNeeded(p_url)";if(this._isTracing){this.traceEntry(m,_10c);}var _10d=_10c;if(_10c&&typeof _10c=="string"&&_10c.indexOf("%")==-1){_10d=encodeURI(_10c);}if(this._isTracing){this.traceExit(m,_10d);}return _10d;},_processLoadedItems:function(_10e,_10f,_110,_111,_112){var m="_processLoadedItems(p_parentItem, p_callback, p_items, p_request, p_topLevelCallback)";if(this._isTracing){this.traceEntry(m,[_10e,_10f,_110,_111,_112]);}var _113=[];var _114=false;if(_10e&&this.isItem(_10e)){_10e[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr]=true;dojo.forEach(_10e[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._childrenAttr],function(_115){var _116=false;if((typeof _115[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._baseTypeAttr]!="undefined")&&((_115[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._baseTypeAttr]=="folder")||(_115[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._baseTypeAttr]=="repository"))){_116=true;}if(_116){_115[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr]=false;}else{_115[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr]=true;}_113.push(this._items[_115[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr]]=_115);},this);this._items[_10e[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr]]=_10e;_114=true;}else{dojo.forEach(_110,function(_117){var _118=false;if((typeof _117[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._baseTypeAttr]!="undefined")&&((_117[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._baseTypeAttr]=="folder")||(_117[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._baseTypeAttr]=="repository"))){_118=true;}if(_118){_117[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr]=false;}else{_117[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr]=true;}_113.push(this._items[_117[com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr]]=_117);},this);}if(_10f&&dojo.isFunction(_10f)){if((_114===true)&&(_112===false)){if(this._isTracing){this.trace(m,"Dispatching to callback function passing parent item:",_10e);}_10f(_10e);}else{if(this._isTracing){this.trace(m,"Dispatching to callback function passing processed items and request:",[_10e,_111]);}_10f(_113,_111);}}if(this._isTracing){this.traceExit(m);}},_showError:function(_119,_11a){this._errorState=true;if(this._onErrorStateChanged){this._onErrorStateChanged(this,true,_119,_11a);}}});com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._labelAttr="title";com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._childrenAttr="children";com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._idAttr="id";com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._baseTypeAttr="baseType";com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._expandedAttr="isExpanded";com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._loadAttr="isLoaded";com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._viewURLAttr="contentLink";com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore._downloadURLAttr="contentLink";}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.CmisDocumentPickerPageWidget"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.CmisDocumentPickerPageWidget"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.CmisDocumentPickerPageWidget");dojo.registerModulePath("com.ibm.workplace.wcm.ecm.picker.widget","../com/ibm/workplace/wcm/ecm/picker/widget");dojo.require("dijit.form.ToggleButton");dojo.require("dijit.layout.BorderContainer");dojo.require("dijit.layout.ContentPane");dojo.require("dijit.Tree");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.CmisDocumentPickerPageWidget",[com.ibm.workplace.wcm.ecm.picker.widget.GenericWizardPageWidget],{blankImgUrl:dojo.moduleUrl("dojo","resources/blank.gif").toString(),minTreePaneWidth:100,namespace:"cmisDocPckrPgWdgt_",templateString:"<div dojoAttachPoint=\"pickerPageDiv, containerNode\" id=\"${namespace}pickerPageDiv_id\" name=\"${namespace}pickerPageDiv\" style=\"width: 100%;\">\n <div class=\"feddocTopSpace\" dojoAttachPoint=\"pickerServerSectionDiv\">\n <h4 class=\"feddocHeader4\">\n <label id=\"${namespace}pickerServerUrl.lbl\">\n <span dojoAttachPoint=\"pickerServerUrlLabel\"><b>${_nlsUserInterface.docPickerPage.pickerServerUrlLabel}</b></span>\n </label>\n </h4>\n <div dojoAttachPoint=\"pickerServerInfoDiv\" name=\"${namespace}pickerServerInfoDiv\" id=\"${namespace}pickerServerInfoDiv_id\">\n <span dojoAttachPoint=\"pickerServerUrl\" id=\"${namespace}pickerServerUrl_id\" name=\"${namespace}pickerServerUrl\" aria-labelledby=\"${namespace}pickerServerUrl.lbl\">\n <!-- being filled with informative text dynamically by the widget -->\n </span>\n </div>\n </div>\n <div class=\"feddocTopSpaceSmall\" dojoAttachPoint=\"pickerAuthenticationSectionDiv\">\n <h4 class=\"feddocHeader4\">\n <label id=\"${namespace}pickerAuthTypeInfoMsg.lbl\">\n <span dojoAttachPoint=\"pickerAuthTypeInfoMsgLabel\"><b>${_nlsUserInterface.docPickerPage.pickerAuthTypeInfoMsgLabel}</b></span>\n </label>\n </h4>\n <div dojoAttachPoint=\"pickerAuthInfoDiv\" name=\"${namespace}pickerAuthInfoDiv\" id=\"${namespace}pickerAuthInfoDiv_id\">\n <span dojoAttachPoint=\"pickerAuthInfo\" id=\"${namespace}pickerAuthTypeInfoMsg_id\" name=\"${namespace}pickerAuthTypeInfoMsg\" aria-labelledby=\"${namespace}pickerAuthTypeInfoMsg.lbl\">\n <!-- being filled with informative text dynamically by the widget -->\n </span>\n </div>\n </div>\n <div dojoAttachPoint=\"fedDocPickerConnectingDiv\" class=\"feddocConnectingBox\">\n <span class=\"lotusLoading\"><img width=\"21\" height=\"21\" src=\"${blankImgUrl}\" role=\"presentation\" aria-labelledby=\"${namespace}connectingToServerDivText_id\" alt=\"${_nlsUserInterface.docPickerPage.connectingToServerImgAlt}\">\n </span>&nbsp;<span><span dojoAttachPoint=\"connectingToServerDivText\" id=\"${namespace}connectingToServerDivText_id\">${_nlsUserInterface.docPickerPage.connectingToServerDivText}</span>\n </span>\n </div>\n <form dojoAttachPoint=\"feddocResponseForm\">\n <div role=\"grid\" class=\"feddocTopSpace\" dojoAttachPoint=\"fedDocPickerResponseContainer\" style=\"height: 300px; min-height: 300px; overflow: auto;\">\n <div role=\"row\" dojoType=\"dijit.layout.BorderContainer\" dojoAttachPoint=\"fedDocPickerBorderContainer\" name=\"${namespace}fedDocPickerBorderContainer\" id=\"${namespace}fedDocPickerBorderContainer_id\" design=\"sidebar\" gutters=\"false\" style=\"width: 100%; height: 100%;\" tabindex=\"0\">\n <div style=\"display: none;\" role=\"rowheader\"></div>\n <div _role_=\"gridcell\" dojoAttachPoint=\"fedDocLibTreePane\" name=\"${namespace}fedDocLibTreePane\" id=\"${namespace}fedDocLibTreePane_id\" class=\"dijitTreeContainerDIV feddocHiddenOverflow\" dojoType=\"dijit.layout.ContentPane\" region=\"center\" style=\"padding: 0px;\">\n <div role=\"columnheader\" class=\"feddocViewControl\" dojoAttachPoint=\"fedDocLibTreeHeader\" id=\"${namespace}fedDocLibTreeHeader_id\" name=\"${namespace}fedDocLibTreeHeader\" style=\"white-space:nowrap;\">\n <span dojoAttachPoint=\"fedDocLibTreeHeaderText\" style=\"position: absolute; left: 4px; top: 4px;\">${_nlsUserInterface.docPickerPage.fedDocLibTreeHeaderText}</span>\n <span dojoAttachPoint=\"fedDocLibTreeHeaderButtons\" style=\"position: absolute; right: 4px; top: 4px;\">\n <span aria-hidden=\"true\" dojoAttachPoint=\"fedDocPreviewLinkSpan\" id=\"${namespace}fedDocPreviewLinkSpan_id\" name=\"${namespace}fedDocPreviewLinkSpan\" style=\"display: none; white-space:nowrap;\">\n <button type=\"button\" dojoAttachPoint=\"fedDocPreviewLink\" dojoType=\"dijit.form.ToggleButton\" label=\"${_nlsUserInterface.docPickerPage.previewOffLabel}\" showLabel=\"false\" iconClass=\"feddocShowPreviewIcon icon16\" style=\"margin-top: -1px; margin-right: -1px;\"></button>\n </span>\n <button type=\"button\" dojoAttachPoint=\"fedDocLibQuickFilterToggleButton\" dojoType=\"dijit.form.ToggleButton\" label=\"${_nlsUserInterface.docPickerPage.libFilterToggleBtnLabel}\" showLabel=\"false\" iconClass=\"feddocQuickSearchIcon icon16\" style=\"margin-top: -1px; margin-right: -1px;\"></button>\n </span>\n </div>\n <div role=\"gridcell\" dojoAttachPoint=\"fedDocLibTreeFilterDiv\" id=\"${namespace}fedDocLibTreeFilterDiv_id\" name=\"${namespace}fedDocLibTreeFilterDiv\" class=\"feddocFilterBox\" style=\"white-space:nowrap;\">\n <label dojoAttachPoint=\"fedDocLibTreeFilterLabel\" id=\"${namespace}fedDocLibTreeFilter.lbl\" for=\"${namespace}fedDocLibTreeFilterTextBox_id\" aria-label=\"${_nlsUserInterface.docPickerPage.libFilterTextBoxLabel}\" style=\"float: left; white-space:nowrap;\">\n ${_nlsUserInterface.docPickerPage.libFilterTextBoxLabel}&nbsp;\n </label>\n <input role=\"textbox\" aria-labelledby=\"${namespace}fedDocLibTreeFilter.lbl\" dojoAttachPoint=\"fedDocLibTreeFilterTextBox\" dojoType=\"dijit.form.TextBox\" type=\"text\"\n name=\"${namespace}fedDocLibTreeFilterTextBox\" id=\"${namespace}fedDocLibTreeFilterTextBox_id\"\n title=\"${_nlsUserInterface.docPickerPage.libFilterTextBoxTitle}\" intermediateChanges=\"true\" style=\"width: auto; float: left; white-space:nowrap;\"/>\n </div>\n <div dojoAttachPoint=\"fedDocLibTreeContainer\" id=\"${namespace}fedDocLibTreeContainer_id\" style=\"height: 85%; overflow: auto; white-space:nowrap;\">\n </div>\n </div>\n <div _role_=\"gridcell\" dojoAttachPoint=\"fedDocTreePane\" name=\"${namespace}fedDocTreePane\" id=\"${namespace}fedDocTreePane_id\" class=\"dijitTreeContainerDIV feddocHiddenOverflow\" dojoType=\"dijit.layout.ContentPane\" splitter=\"true\" region=\"trailing\" style=\"width: 255px; padding: 0px;\" minSize=\"150\">\n <div role=\"columnheader\" class=\"feddocViewControl\" dojoAttachPoint=\"fedDocTreeHeader\" id=\"${namespace}fedDocTreeHeader_id\" name=\"${namespace}fedDocTreeHeader\">\n <span dojoAttachPoint=\"fedDocTreeHeaderText\" style=\"position: absolute; left: 4px; top: 4px;\">${_nlsUserInterface.docPickerPage.fedDocTreeHeaderText}</span>\n <span dojoAttachPoint=\"fedDocTreeHeaderButtons\" style=\"position: absolute; right: 4px; top: 4px;\">\n <button type=\"button\" dojoAttachPoint=\"fedDocQuickFilterToggleButton\" dojoType=\"dijit.form.ToggleButton\" label=\"${_nlsUserInterface.docPickerPage.docFilterToggleBtnLabel}\" showLabel=\"false\" iconClass=\"feddocQuickSearchIcon icon16\" style=\"margin-top: -1px; margin-right: -1px;\"></button>\n </span>\n </div>\n <div role=\"gridcell\" dojoAttachPoint=\"fedDocTreeFilterDiv\" id=\"${namespace}fedDocTreeFilterDiv_id\" name=\"${namespace}fedDocTreeFilterDiv\" class=\"feddocFilterBox\">\n <label dojoAttachPoint=\"fedDocTreeFilterLabel\" id=\"${namespace}fedDocTreeFilter.lbl\" for=\"${namespace}fedDocTreeFilterTextBox_id\" aria-label=\"${_nlsUserInterface.docPickerPage.docFilterTextBoxLabel}\" style=\"float: left;\">\n ${_nlsUserInterface.docPickerPage.docFilterTextBoxLabel}&nbsp;</label><input role=\"textbox\" aria-labelledby=\"${namespace}fedDocTreeFilter.lbl\" dojoAttachPoint=\"fedDocTreeFilterTextBox\" dojoType=\"dijit.form.TextBox\" type=\"text\"\n name=\"${namespace}fedDocTreeFilterTextBox\" id=\"${namespace}fedDocTreeFilterTextBox_id\"\n title=\"${_nlsUserInterface.docPickerPage.docFilterTextBoxTitle}\" intermediateChanges=\"true\" style=\"width:auto; float: left;\"/>\n </div>\n <div dojoAttachPoint=\"fedDocTreeContainer\" id=\"${namespace}fedDocTreeContainerId\" style=\"height: 85%; overflow: auto;\">\n <div aria-hidden=\"true\" dojoAttachPoint=\"fedDocNoItemsInfoDiv\" id=\"${namespace}fedDocNoItemsInfoDiv_id\" name=\"${namespace}fedDocNoItemsInfoDiv\" title=\"${_nlsUserInterface.docPickerPage.fedDocNoItemsInfoTitle}\" style=\"display:none; overflow: hidden; margin: 4px 4px 4px 4px;\" class=\"lotusMessage lotusInfo feddocTopSpaceSmall\">\n <img role=\"presentation\" src=\"${blankImgUrl}\" width=\"16\" height=\"16\" class=\"feddocInfoIcon\" alt=\"${_nlsUserInterface.docPickerPage.fedDocNoItemsInfoImgAlt}\" />\n <span>${_nlsMessages.docPickerPage.noItemsMessage}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"feddocTopSpaceSmall\" dojoAttachPoint=\"pickerSelectedItemDiv\" name=\"${namespace}pickerSelectedItemDiv\" id=\"${namespace}pickerSelectedItemDiv_id\">\n <h4 class=\"feddocHeader4\">\n <label id=\"${namespace}pickerSelectedItem.lbl\">\n <span dojoAttachPoint=\"pickerSelectedItemLabel\"><b>${_nlsUserInterface.docPickerPage.pickerSelectedItemLabel}</b></span>\n </label>\n </h4>\n <div dojoAttachPoint=\"pickerSelectedItemFullPath\" id=\"${namespace}pickerSelectedItemFullPath_id\" role=\"status\" aria-labelledby=\"${namespace}pickerSelectedItem.lbl\" style=\"width: 100%\">\n <span class=\"feddocItemPath\" dojoAttachPoint=\"pickerSelectedItemPath\" id=\"${namespace}pickerSelectedItemPath_id\" name=\"${namespace}pickerSelectedItemPath\">\n <!-- being filled with informative text dynamically by the widget -->\n </span>\n <span dojoAttachPoint=\"pickerSelectedItem\" id=\"${namespace}pickerSelectedItem_id\" name=\"${namespace}pickerSelectedItem\">\n <!-- being filled with informative text dynamically by the widget -->\n </span>\n </div>\n </div>\n </form>\n</div>\n",widgetsInTemplate:true,_authenticationInfoMsg:"",_authProperties:null,_callingEnvironment:com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm,_containerWidthAtLastAutoTreeResize:-1,_docTreeSelectedItem:null,_docTree:null,_eventHandles:[],_feedBaseURL:null,_feedType:String,_isA11yMode:false,_isFolderPreviewOn:false,_isRTLMode:false,_isTracing:false,_libFolderItemFilter:null,_libTree:null,_libTreeModel:null,_libTreeSelectedItem:null,_nodeTypes:["document","folder"],_quickFilterDoc:null,_quickFilterLib:null,_selectedItem:null,_serverUrl:"",_serviceDocBaseURL:"",_store:null,_treeModel:null,buildRendering:function(){var m="buildRendering()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},constructor:function(_11b){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_11b);if(_11b){this.trace(m,"p_params.namespace:",_11b.namespace);this.trace(m,"p_params.nodeTypes:",dojo.toJson(_11b.nodeTypes));this.trace(m,"p_params.feedBaseURL:",_11b.feedBaseURL);this.trace(m,"p_params.callingEnvironment:",_11b.callingEnvironment);}}if(typeof _11b.namespace=="string"){this.namespace=_11b.namespace;}this._eventHandles=[];this._nodeTypes=["document","folder"];if(dojo.isObject(_11b.nodeTypes)){this._nodeTypes=_11b.nodeTypes;}if(typeof _11b.feedBaseURL=="string"){this._feedBaseURL=_11b.feedBaseURL;}else{if(this._isTracing){this.error(m,"Parameter 'feedBaseURL' parameter missing on constructor arguments");}}if(typeof _11b.serviceDocBaseURL=="string"){this._serviceDocBaseURL=_11b.serviceDocBaseURL;}else{if(this._isTracing){this.error(m,"Parameter 'serviceDocBaseURL' parameter missing on constructor arguments");}}if(_11b.callingEnvironment){this._callingEnvironment=_11b.callingEnvironment;}if(this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm){this._isFolderPreviewOn=true;}var _11c=this._nlsUserInterface.docPickerPage;this._stepLabel=_11c.stepLabel;if(this._isCalledFromPZN()){this._stepDescription=_11c.stepDescriptionPZN;}else{this._stepDescription=_11c.stepDescriptionWCM;}if(this._isTracing){this.traceExit(m);}},destroyRecursive:function(){if(!this._isFolderPreviewOn){this.fedDocPickerBorderContainer.addChild(this.fedDocTreePane);}this.inherited(arguments);},destroy:function(){var m="destroy()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},getSelectedItem:function(){var m="getSelectedItem()";if(this._isTracing){this.traceEntry(m);}if(this._isTracing){this.traceExit(m,this._selectedItem);}return this._selectedItem;},getSelectedItemJSON:function(){var m="getSelectedItemJSON()";if(this._isTracing){this.traceEntry(m);}var _11d={"title":this._store.getLabel(this._selectedItem),"url":this._store.getViewURL(this._selectedItem)};if(this._isTracing){this.traceExit(m,_11d);}return _11d;},initializePage:function(_11e){var m="initializePage(p_params)";if(this._isTracing){this.traceEntry(m,_11e);if(_11e){this.trace(m,"p_params.authProperties: ",dojo.toJson(_11e.authProperties));this.trace(m,"p_params.authInfoMsg: ",_11e.authInfoMsg);this.trace(m,"p_params.feedType: ",_11e.feedType);this.trace(m,"p_params.serverUrl: ",_11e.serverUrl);}}var _11f=dojo.query("body")[0];if(dojo.hasClass(_11f,"dijit_a11y")){this._isA11yMode=true;}else{this._isA11yMode=false;}if(dojo.hasClass(_11f,"lotus_rtl")){this._isRTLMode=true;}else{this._isRTLMode=false;}if(this._isTracing){this.trace(m,"dijit_a11y mode: ",this._isA11yMode);this.trace(m,"lotus_rtl mode: ",this._isRTLMode);}if(this._isRTLMode){dojo.style(this.fedDocLibTreeFilterLabel,"float","right");dojo.style(this.fedDocTreeFilterLabel,"float","right");}this._clearSelectedItem();if(_11e){if(_11e.authProperties){this._authProperties=_11e.authProperties;}if(_11e.authInfoMsg){this._authInfoMsg=_11e.authInfoMsg;dojo.attr(this.pickerAuthInfo,"innerHTML",this._authInfoMsg);}else{dojo.attr(this.pickerAuthInfo,"innerHTML","");}if(_11e.serverUrl){this._serverUrl=_11e.serverUrl;dojo.attr(this.pickerServerUrl,"innerHTML",this._serverUrl);}else{dojo.attr(this.pickerServerUrl,"innerHTML","");}if(_11e.feedType){this._feedType=_11e.feedType;}else{this._feedType=null;}this._connectToServer();}if(this._isTracing){this.traceExit(m);}},layout:function(){var m="layout()";if(this._isTracing){this.traceEntry(m);}if(this.fedDocTreePane&&(this._isFolderPreviewOn===true)){var _120=dojo.contentBox(this.fedDocPickerBorderContainer.domNode).w;if(_120!==this._containerWidthAtLastAutoTreeResize){this._containerWidthAtLastAutoTreeResize=_120;dojo.marginBox(this.fedDocTreePane.domNode,{"w":(_120*0.5)});this.fedDocPickerBorderContainer.resize();this.fedDocPickerBorderContainer.layout();}}if(this.virtualContainerNodeHeight){var _121=dojo.marginBox(this.pickerServerSectionDiv).h+dojo.marginBox(this.pickerAuthenticationSectionDiv).h+dojo.marginBox(this.pickerSelectedItemDiv).h+30;var _122=this.virtualContainerNodeHeight;var _123=dojo.style(this.fedDocPickerResponseContainer,"min-height");var _124=Math.max(_123,_122-_121);dojo.style(this.fedDocPickerResponseContainer,"height",_124+"px");}this._updateTreeLayout();if(this._isTracing){this.traceExit(m);}},onShow:function(){var m="onShow()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this.fedDocPickerBorderContainer.resize();if(this._isTracing){this.traceExit(m);}},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._setFilterSectionVisible(this.fedDocLibTreeFilterDiv,null,false,false);this._setFilterSectionVisible(this.fedDocTreeFilterDiv,null,false,false);this._initEventHandles();this._quickFilterDoc=new com.ibm.workplace.wcm.ecm.picker.widget.filter.QuickSearchTreeItemFilter({});this._quickFilterLib=new com.ibm.workplace.wcm.ecm.picker.widget.filter.QuickSearchTreeItemFilter({});this._libFolderItemFilter=new com.ibm.workplace.wcm.ecm.picker.widget.filter.LibFolderTreeItemFilter({"itemFilter":this._quickFilterLib});if(this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._pzn){dojo.style(this.fedDocPreviewLinkSpan,"display","inline");dijit.setWaiState(this.fedDocPreviewLinkSpan,"hidden",false);if(!this._isFolderPreviewOn){this._hideDocTreePane();}}this._changeNodeTitleText(this.fedDocQuickFilterToggleButton,this._nlsUserInterface.docPickerPage.docFilterToggleBtnOffTitle);this._changeNodeTitleText(this.fedDocLibQuickFilterToggleButton,this._nlsUserInterface.docPickerPage.libFilterToggleBtnOffTitle);this._changeNodeTitleText(this.fedDocPreviewLink,this._nlsUserInterface.docPickerPage.previewOffTitle);if(this._isTracing){this.traceExit(m);}},startup:function(){var m="startup()";if(this._isTracing){this.traceEntry(m);}this.fedDocPickerBorderContainer.startup();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this._clearEventHandles();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},_adjustTreePaneHeight:function(_125,_126,_127){var m="_adjustTreePaneHeight(p_domNode, p_otherDomNode, p_otherDomNodesHeight)";if(this._isTracing){this.traceEntry(m,[_125,_126,_127]);}if(_126&&(typeof _126=="object")){if(_125.parentNode){var _128=_125.parentNode;if(_125.parentNode.domNode){_128=_125.parentNode.domNode;}var _129=dojo.marginBox(_125.parentNode).h;var _12a=dojo.marginBox(_125).h;if(dojo.contentBox(_125).h===0){_12a=0;}if(_127){dojo.marginBox(_126,{"h":_129-_12a-_127});}else{dojo.marginBox(_126,{"h":_129-_12a});}}}if(this._isTracing){this.traceExit(m);}},_animateCloseFilterSection:function(_12b,_12c,_12d){var m="_animateCloseFilterSection(p_domNode, p_otherDomNode, p_otherDomNodesHeight)";if(this._isTracing){this.traceEntry(m,[_12b,_12c,_12d]);}if(!dojo.hasClass(_12b,"lotusHidden")){dojo.style(_12b,"overflow","hidden");dojo.animateProperty({"node":_12b,"duration":500,"properties":{"height":{"end":0,"units":"px"}},"onEnd":dojo.hitch(this,function(){dojo.addClass(_12b,"lotusHidden");dijit.setWaiState(_12b,"hidden",true);dijit.removeWaiState(_12b,"expanded");if(_12c&&(typeof _12c=="object")){this._adjustTreePaneHeight(_12b,_12c,_12d);}})}).play();}if(this._isTracing){this.traceExit(m);}},_animateOpenFilterSection:function(_12e,_12f,_130,_131){var m="_animateOpenFilterSection(p_domNode, p_otherDomNode, p_targetHeight, p_otherDomNodesHeight)";if(this._isTracing){this.traceEntry(m,[_12e,_12f,_130,_131]);}if(dojo.hasClass(_12e,"lotusHidden")){dojo.style(_12e,"overflow","hidden");dojo.style(_12e,"height","0ex");dojo.removeClass(_12e,"lotusHidden");dojo.marginBox(_12e,{h:0});dijit.setWaiState(_12e,"hidden",false);dijit.setWaiState(_12e,"expanded",true);dojo.animateProperty({"node":_12e,"duration":500,"properties":{"height":{"end":_130,"units":"ex"}},"onEnd":dojo.hitch(this,function(){dojo.marginBox(_12e,{h:_130});dojo.style(_12e,"height",_130+"ex");if(_12f&&(typeof _12f=="object")){this._adjustTreePaneHeight(_12e,_12f,_131);}this._updateFilterLayout();})}).play();}if(this._isTracing){this.traceExit(m);}},_autoResizeLabelAndInput:function(_132,_133,_134,_135){var m="_autoResizeLabelAndInput(p_newContainerSize, p_labelNode, p_inputNode, p_minInputWidth)";if(this._isTracing){this.traceEntry(m,[_132,_133,_134,_135]);}if(_132&&_132.w){var _136=Math.max(0,_132.w);var _137=Math.max(_133.scrollWidth,_133.offsetWidth);var _138=dojo.marginBox(_133).w;var _139=dojo.marginBox(_134).w;var _13a=16;if(_136<_137+_135+_13a){var _13b=Math.max(0,_136-_135-_13a);if(_13b>=0){dojo.style(_133,"width",_13b+"px");}dojo.style(_133,"overflow","hidden");if(_136<_135+_13a){if(_136>=0){dojo.style(_134,"width",_136+"px");}dojo.style(_134,"overflow","hidden");}else{dojo.style(_134,"width",_135+"px");dojo.style(_134,"overflow","none");}}else{dojo.style(_133,"width","auto");dojo.style(_133,"overflow","visible");var _13c=_136-_137-_13a;if(_13c>=0){dojo.style(_134,"width",_13c+"px");}dojo.style(_134,"overflow","visible");}}},_autoResizeTextAndControl:function(_13d,_13e,_13f){var m="_autoResizeTextAndControl(p_newContainerSize, p_textNode, p_controlNode)";if(this._isTracing){this.traceEntry(m,[_13d,_13e,_13f]);}if(_13d&&_13d.w){var _140=Math.max(0,_13d.w);var _141=Math.max(_13e.scrollWidth,_13e.offsetWidth);var _142=Math.max(_13f.scrollWidth,_13f.offsetWidth);var _143=dojo.marginBox(_13e).w;var _144=dojo.marginBox(_13f).w;var _145=10;if(_140<_141+_142+_145){var _146=Math.max(0,_140-_142-_145);if(_146>=0){dojo.style(_13e,"width",_146+"px");}dojo.style(_13e,"overflow","hidden");}else{dojo.style(_13e,"width","auto");dojo.style(_13e,"overflow","visible");}}},_buildLibTreePath:function(){var m="_buildLibTreePath()";if(this._isTracing){this.traceEntry(m);}var _147=this._libTree.attr("path");var path="";var file="";var _148="";var _149="";var _14a=0;var _14b=this._libTree.rootNode;if(_14b&&_14b.item&&(_14b.item.root===true)){_14a=1;}for(var i=_14a;i<_147.length;i++){var _14c=this._store.getLabel(_147[i]);if(this._isTracing){this.trace(m,i+". item on path:",_14c);}file=_14c;_148+=_14c;if(i<_147.length-1){_148+=" / ";}if(i<_147.length-1){path+=_14c;path+=" / ";}}_149={"path":path,"file":file,"fullpath":_148};if(this._isTracing){this.traceExit(m,_149);}return _149;},_buildPathForSelectedItem:function(){var m="_buildPathForSelectedItem()";if(this._isTracing){this.traceEntry(m);}var _14d=null;if(this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._pzn){_14d=this._buildLibTreePath();}else{if(this._isTracing){this.trace(m,"Selected item from library tree:",this._libTreeSelectedItem);this.trace(m,"Selected item from document tree:",this._docTreeSelectedItem);this.trace(m,"Currently selected item:",this._selectedItem);}var _14e=this._buildLibTreePath();if(this._docTreeSelectedItem==this._selectedItem){_14d={"path":_14e.fullpath+" / ","file":this._store.getLabel(this._docTreeSelectedItem),"fullpath":_14e.fullpath+" / "+this._store.getLabel(this._docTreeSelectedItem)};}else{_14d=_14e;}}if(this._isTracing){this.traceExit(m,_14d);}return _14d;},_calcDomNodesHeight:function(_14f){var m="_calcDomNodesHeight(p_domNodes)";if(this._isTracing){this.traceEntry(m,_14f);}var _150=0;if(_14f&&dojo.isArray(_14f)){dojo.forEach(_14f,function(_151){if(_151){if(_151.domNode){_150+=dojo.marginBox(_151.domNode).h;}else{_150+=dojo.marginBox(_151).h;}}});}if(this._isTracing){this.traceExit(m,_150);}return _150;},_changeNodeTitleText:function(_152,_153){var m="_changeNodeTitleText(p_domNode, p_newTitleText)";if(this._isTracing){this.traceEntry(m,[_152,_153]);}dojo.attr(_152,"title",_153);if(this._isTracing){this.traceExit(m);}},_clearEventHandles:function(){var m="_clearEventHandles()";if(this._isTracing){this.traceEntry(m);}dojo.forEach(this._eventHandles,dojo.disconnect);this._eventHandles=[];if(this._isTracing){this.traceExit(m);}},_clearSelectedItem:function(){var m="_clearSelectedItem()";if(this._isTracing){this.traceEntry(m);}this._selectedItem=null;this._docTreeSelectedItem=null;this._libTreeSelectedItem=null;var _154=this._nlsUserInterface.docPickerPage.nothingSelectedText;dojo.addClass(this.pickerSelectedItem,"feddocNoSelection");dojo.attr(this.pickerSelectedItem,"innerHTML",_154);dojo.attr(this.pickerSelectedItem,"title",_154);dojo.attr(this.pickerSelectedItemPath,"innerHTML","");dojo.attr(this.pickerSelectedItemPath,"title","");if(this._isTracing){this.traceExit(m);}},_clearTree:function(){var m="_clearTree()";if(this._isTracing){this.traceEntry(m);}var _155=this.id+"_docTree";var tree=dijit.byId(_155);if(tree){tree.destroyRecursive(false);}if(this._isTracing){this.traceExit(m);}},_connectToServer:function(){var m="_connectToServer()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Server URL:",this._serverUrl);this.trace(m,"Authentication settings:",dojo.toJson(this._authProperties));}this._setupLibTree(this._serverUrl);if(this._isTracing){this.traceExit(m);}},_getLibTreeIconClass:function(_156,_157){var m="_getLibTreeIconClass(p_item, p_opened)";if(this._isTracing){this.traceEntry(m,[_156,_157]);}var _158="";if(_156){if(this._store.isRepositoryItem(_156)){_158=_157?"dijitRepositoryOpened":"dijitRepositoryClosed";}else{_158=_157?"dijitFolderOpened":"dijitFolderClosed";}}if(this._isTracing){this.traceExit(m,_158);}return _158;},_getDocTreeIconClass:function(_159,_15a){var m="_getDocTreeIconClass(p_item, p_opened)";if(this._isTracing){this.traceEntry(m,[_159,_15a]);}var _15b="";if(_159){if(this._store.isFolderItem(_159)){_15b=_15a?"dijitFolderOpened":"dijitFolderClosed";}else{_15b="dijitLeaf";}}if(this._isTracing){this.traceExit(m,_15b);}return _15b;},_hideConnectingBox:function(){var m="_hideConnectingBox()";if(this._isTracing){this.traceEntry(m);}dojo.style(this.fedDocPickerConnectingDiv,"display","none");dijit.setWaiState(this.fedDocPickerConnectingDiv,"hidden",true);dijit.setWaiState(this.fedDocPickerResponseContainer,"busy",false);if(this._isTracing){this.traceExit(m);}},_hideDocTreePane:function(){var m="_hideDocTreePane()";if(this._isTracing){this.traceEntry(m);}this.fedDocPickerBorderContainer.removeChild(this.fedDocTreePane);this.fedDocPickerBorderContainer.layout();if(this._isTracing){this.traceExit(m);}},_hideNoItemsInfo:function(){var m="_hideNoItemsInfo()";if(this._isTracing){this.traceEntry(m);}dojo.style(this.fedDocNoItemsInfoDiv,"display","none");dijit.setWaiState(this.fedDocNoItemsInfoDiv,"hidden",true);if(this._isTracing){this.traceExit(m);}},_initEventHandles:function(){var m="_initEventHandles()";if(this._isTracing){this.traceEntry(m);}this._eventHandles.push(dojo.connect(this.fedDocQuickFilterToggleButton,"onChange",dojo.hitch(this,"_onQuickFilterDocToggle")));this._eventHandles.push(dojo.connect(this.fedDocLibQuickFilterToggleButton,"onChange",dojo.hitch(this,"_onQuickFilterLibToggle")));this._eventHandles.push(dojo.connect(this.fedDocTreeFilterTextBox,"onChange",dojo.hitch(this,"_onQuickFilterDocTextChanged")));this._eventHandles.push(dojo.connect(this.fedDocLibTreeFilterTextBox,"onChange",dojo.hitch(this,"_onQuickFilterLibTextChanged")));this._eventHandles.push(dojo.connect(this.fedDocPreviewLink,"onChange",dojo.hitch(this,"_onPreviewLinkClicked")));this._eventHandles.push(dojo.connect(this.feddocResponseForm,"onsubmit",dojo.hitch(this,"_onSubmit")));this._eventHandles.push(dojo.connect(this.fedDocLibTreePane,"resize",dojo.hitch(this,"_onLibTreePaneResized")));this._eventHandles.push(dojo.connect(this.fedDocTreePane,"resize",dojo.hitch(this,"_onTreePaneResized")));if(this._isTracing){this.traceExit(m);}},_isCalledFromPZN:function(){var m="_isCalledFromPZN()";if(this._isTracing){this.traceEntry(m);}var _15c=this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._pzn;if(this._isTracing){this.traceExit(m,_15c);}return _15c;},_isCalledFromWCM:function(){var m="_isCalledFromWCM()";if(this._isTracing){this.traceEntry(m);}var _15d=this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm;if(this._isTracing){this.traceExit(m,_15d);}return _15d;},_onCmisPageErrorStateChanged:function(_15e,_15f,_160,_161){var m="_onCmisPageErrorStateChanged(p_sender, p_errorState, p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_15e,_15f,_160,_161]);}if(_15f===true){this._showError(_160,_161);}else{if(_15f===false){this._clearError();}else{}}if(this._isTracing){this.traceExit(m);}},_onLibTreeFocused:function(){var m="_onLibTreeFocused()";if(this._isTracing){this.traceEntry(m,[]);}dijit.setWaiState(this.fedDocPickerBorderContainer.domNode,"activedescendant",this._libTree.get("id"));if(this._isTracing){this.traceExit(m);}},_onLibTreeLoaded:function(){var m="_onLibTreeLoaded()";if(this._isTracing){this.traceEntry(m,[p_item,p_node]);}this._hideConnectingBox();dijit.focus(dijit.getFirstInTabbingOrder(this._libTree.domNode));if(this._isTracing){this.traceExit(m);}},_onLibTreeNodeClick:function(_162,_163){var m="_onLibTreeNodeClick(p_item, p_node)";if(this._isTracing){this.traceEntry(m,[_162,_163]);}this._hideConnectingBox();if(this._store.isFolderItem(_162)||this._store.isRepositoryItem(_162)){this._setSelectedItem(_162);this._libTreeSelectedItem=_162;if(this._isFolderPreviewOn){this._setupTree(this._store.getIdentity(_162));}}else{this._clearSelectedItem();}if(this._isTracing){this.traceExit(m);}},_onLibTreeNodeClose:function(_164,_165){var m="_onLibTreeNodeClose(p_item, p_node)";if(this._isTracing){this.traceEntry(m,[_164,_165]);}this._hideConnectingBox();if(this._store.isFolderItem(_164)||this._store.isRepositoryItem(_164)){this._store.setItemExpanded(_164,false);}this._onLibTreeNodeClick(_164,_165);if(this._isTracing){this.traceExit(m);}},_onLibTreeNodeOpen:function(_166,_167){var m="_onLibTreeNodeOpen(p_item, p_node)";if(this._isTracing){this.traceEntry(m,[_166,_167]);}this._hideConnectingBox();if(this._store.isFolderItem(_166)||this._store.isRepositoryItem(_166)){var _168=this._libTree.attr("selectedItem");if(_168===_166){this._setSelectedItem(_166);this._libTreeSelectedItem=_166;this._setupTree(this._store.getIdentity(_166));}this._store.setItemExpanded(_166,true);}if(this._isTracing){this.traceExit(m);}},_onLibTreePaneResized:function(_169,_16a){var m="_onLibTreePaneResized(p_changeSize, p_resultSize)";if(this._isTracing){this.traceEntry(m,[_169,_16a]);}var _16b=dojo.marginBox(this.fedDocLibTreePane.domNode);if(_16a&&_16a.w){_16a.h=_16b.h;_16a.w=_16b.w;}else{_16a={w:_16b.w,h:_16b.h};}this._autoResizeTextAndControl(_16a,this.fedDocLibTreeHeaderText,this.fedDocLibTreeHeaderButtons);this._autoResizeLabelAndInput(_16a,this.fedDocLibTreeFilterLabel,this.fedDocLibTreeFilterTextBox.domNode,40);if(this._isTracing){this.traceExit(m);}},_onQuickFilterDocTextChanged:function(){var m="_onQuickFilterDocTextChanged()";if(this._isTracing){this.traceEntry(m);}this._onQuickFilterTextChanged(this._docTree,this._treeModel,this._quickFilterDoc,this.fedDocTreeFilterTextBox.attr("value"));if(this._isTracing){this.traceExit(m);}},_onQuickFilterDocToggle:function(_16c){var m="_onQuickFilterDocToggle(p_newValue)";if(this._isTracing){this.traceEntry(m,_16c);}if(_16c===true){var _16d=4;this._setFilterSectionVisible(this.fedDocTreeFilterDiv,this.fedDocTreeContainer,true,true,_16d,this._calcDomNodesHeight([this.fedDocTreeHeader])+2);this._onQuickFilterTextChanged(this._docTree,this._treeModel,this._quickFilterDoc,this.fedDocTreeFilterTextBox.attr("value"));this._changeNodeTitleText(this.fedDocQuickFilterToggleButton,this._nlsUserInterface.docPickerPage.docFilterToggleBtnOnTitle);}else{this._setFilterSectionVisible(this.fedDocTreeFilterDiv,this.fedDocTreeContainer,false,true,0,this._calcDomNodesHeight([this.fedDocTreeHeader])+2);this._onQuickFilterTextChanged(this._docTree,this._treeModel,this._quickFilterDoc,"");this._changeNodeTitleText(this.fedDocQuickFilterToggleButton,this._nlsUserInterface.docPickerPage.docFilterToggleBtnOffTitle);}if(this._isTracing){this.traceExit(m);}},_onQuickFilterLibTextChanged:function(){var m="_onQuickFilterLibTextChanged()";if(this._isTracing){this.traceEntry(m);}this._onQuickFilterTextChanged(this._libTree,this._libTreeModel,this._quickFilterLib,this.fedDocLibTreeFilterTextBox.attr("value"));if(this._isTracing){this.traceExit(m);}},_onQuickFilterLibToggle:function(_16e){var m="_onQuickFilterLibToggle(p_newValue)";if(this._isTracing){this.traceEntry(m,_16e);}var _16f=4;if(_16e===true){this._setFilterSectionVisible(this.fedDocLibTreeFilterDiv,this.fedDocLibTreeContainer,true,true,_16f,this._calcDomNodesHeight([this.fedDocLibTreeHeader])+2);this._onQuickFilterTextChanged(this._libTree,this._libTreeModel,this._quickFilterLib,this.fedDocLibTreeFilterTextBox.attr("value"));this._changeNodeTitleText(this.fedDocLibQuickFilterToggleButton,this._nlsUserInterface.docPickerPage.libFilterToggleBtnOnTitle);}else{this._setFilterSectionVisible(this.fedDocLibTreeFilterDiv,this.fedDocLibTreeContainer,false,true,0,this._calcDomNodesHeight([this.fedDocLibTreeHeader])+2);this._onQuickFilterTextChanged(this._libTree,this._libTreeModel,this._quickFilterLib,"");this._changeNodeTitleText(this.fedDocLibQuickFilterToggleButton,this._nlsUserInterface.docPickerPage.libFilterToggleBtnOffTitle);}if(this._isTracing){this.traceExit(m);}},_onQuickFilterTextChanged:function(_170,_171,_172,_173){var m="_onQuickFilterTextChanged(p_tree, p_model, p_filter, p_searchTerm)";if(this._isTracing){this.traceEntry(m,[_170,_171,_172,_173]);}_172.changeLabelContains(_173);if(_170){var _174=_170.lastFocused;if(_170.lastFocused!==null){_170.lastFocused.setSelected(false);}_170.lastFocused=null;_171.filterTreeItems(_171.root);if(_174){if(_174.domNode){if(_174.domNode.parentNode!==null){_170.lastFocused.setSelected(false);_174.setSelected(true);_170.lastFocused=_174;}else{}}}}if(this._isTracing){this.traceExit(m);}},_onPreviewLinkClicked:function(_175){var m="_onPreviewLinkClicked()";if(this._isTracing){this.traceEntry(m);}if((this._isFolderPreviewOn===true)&&(_175===false)){this._hideDocTreePane();this._store.removeNodeTypes(["document"]);this._changeNodeTitleText(this.fedDocPreviewLink,this._nlsUserInterface.docPickerPage.previewOffTitle);this._isFolderPreviewOn=false;this._clearTree();}else{if((this._isFolderPreviewOn===false)&&(_175===true)){this._showDocTreePane();this._store.addNodeTypes(["document"]);this._changeNodeTitleText(this.fedDocPreviewLink,this._nlsUserInterface.docPickerPage.previewOnTitle);this._isFolderPreviewOn=true;var _176=this._libTreeSelectedItem;if(_176){this._setupTree(this._store.getIdentity(_176));}}}if(this._isTracing){this.traceExit(m);}},_onRootNodeChanged:function(_177){var m="_onRootNodeChanged(p_item)";if(this._isTracing){this.traceEntry(m,_177);}if(_177&&_177.title){this._libTree.showRoot=true;this._libTree.rootNode.attr("label",_177.title);this._libTree.rootNode.attr("item",_177);}else{this._libTree.showRoot=false;this._libTree.resize();dojo.style(this._libTree.rootNode.rowNode,"display","none");}if(this._isTracing){this.traceExit(m);}},_onSubmit:function(_178){dojo.stopEvent(_178);if(this._onDefaultAction&&dojo.isFunction(this._onDefaultAction)){this._onDefaultAction();}return false;},_onTreeFocused:function(){var m="_onTreeFocused()";if(this._isTracing){this.traceEntry(m,[]);}dijit.setWaiState(this.fedDocPickerBorderContainer.domNode,"activedescendant",this._docTree.get("id"));if(this._isTracing){this.traceExit(m);}},_onTreeLoaded:function(){var m="_onTreeLoaded()";if(this._isTracing){this.traceEntry(m);}this._hideConnectingBox();this._treeModel.getChildren(this._libTreeSelectedItem,dojo.hitch(this,function(_179){if(_179&&_179.length<=0){this._showNoItemsInfo();}else{this._hideNoItemsInfo();}}));if(this._isTracing){this.traceExit(m);}},_onTreeNodeClick:function(_17a,_17b){var m="_onTreeNodeClick(p_item, p_node)";if(this._isTracing){this.traceEntry(m,[_17a,_17b]);}this._hideConnectingBox();if(this._isCalledFromWCM()){if(this._isTracing){this.trace(m,"Setting selected item and document tree selected item to the same value");}this._docTreeSelectedItem=_17a;this._setSelectedItem(_17a);}if(this._isTracing){this.traceExit(m);}},_onTreePaneResized:function(_17c,_17d){var m="_onTreePaneResized(p_changeSize, p_resultSize)";if(this._isTracing){this.traceEntry(m,[_17c,_17d]);}var _17e=dojo.marginBox(this.fedDocTreePane.domNode);if(_17d&&_17d.w){_17d.h=_17e.h;_17d.w=_17e.w;}else{_17d={w:_17e.w,h:_17e.h};}this._autoResizeTextAndControl(_17d,this.fedDocTreeHeaderText,this.fedDocTreeHeaderButtons);this._autoResizeLabelAndInput(_17d,this.fedDocTreeFilterLabel,this.fedDocTreeFilterTextBox.domNode,40);if(this._isTracing){this.traceExit(m);}},_setFilterSectionVisible:function(_17f,_180,_181,_182,_183,_184){var m="_setFilterSectionVisible(p_sectionDomNode, p_otherDomNode, p_isVisible, p_animate, p_targetHeight)";if(this._isTracing){this.traceEntry(m,[_17f,_180,_181,_182,_183]);}if((_182)&&(_182===true)){if(_181===true){this._animateOpenFilterSection(_17f,_180,_183,_184);}else{this._animateCloseFilterSection(_17f,_180,_184);}}else{this._setVisible(_17f,_181);if(_180&&(typeof _180=="object")){if(_17f.parentNode){var _185=_17f.parentNode;if(_17f.parentNode.domNode){_185=_17f.parentNode.domNode;}var _186=dojo.marginBox(_17f.parentNode).h;var _187=dojo.marginBox(_17f).h;if(dojo.contentBox(p_domNode).h===0){_187=0;}if(_184){dojo.marginBox(_180,{"h":_186-_187-_184});}else{dojo.marginBox(_180,{"h":_186-_187});}}}}if(this._isTracing){this.traceExit(m);}},_setSelectedItem:function(_188){var m="_setSelectedItem(p_item)";if(this._isTracing){this.traceEntry(m,_188);}if((_188)&&(typeof _188!="undefined")&&((!_188.root)||(_188.root===false))){this._selectedItem=_188;var _189=this._buildPathForSelectedItem();dojo.removeClass(this.pickerSelectedItem,"feddocNoSelection");dojo.attr(this.pickerSelectedItemPath,"innerHTML",_189.path);dojo.attr(this.pickerSelectedItemPath,"title",_189.fullpath);dojo.attr(this.pickerSelectedItem,"innerHTML",_189.file);dojo.attr(this.pickerSelectedItem,"title",_189.fullpath);if(this._isCalledFromWCM()){this._setReadyValue(!(this._store.isFolderItem(this._selectedItem)||this._store.isRepositoryItem(this._selectedItem)));}else{this._setReadyValue(true);}}if(this._isTracing){this.traceExit(m);}},_setupLibTree:function(_18a){var m="_setupLibTree(p_url)";if(this._isTracing){this.traceEntry(m,_18a);}var _18b=this.id+"_libTree";var _18c=dijit.byId(_18b);if(_18c){_18c.destroyRecursive(false);}this._clearTree();this._showConnectingBox();var _18d=dojo.clone(this.nodeTypes);_18d.push("document");var _18e=this._feedBaseURL;var _18f=this._feedBaseURL;if(this._feedType&&this._feedType===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._servicedoc){_18f=this._serviceDocBaseURL;}var _190={"url":_18a,"feedBaseURL":_18e,"feedSvcDocBaseURL":_18f,"nlsMessages":this._nlsMessages,"nodeTypes":_18d,"onErrorStateChanged":dojo.hitch(this,"_onCmisPageErrorStateChanged"),"onRootNodeChanged":dojo.hitch(this,"_onRootNodeChanged")};if(this._authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault||this._authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd){_190.credentialVaultParamValue=this._authProperties.vaultSlotID;}this._store=new com.ibm.workplace.wcm.ecm.picker.widget.store.FedDocAtomStore(_190);if(!this._isFolderPreviewOn){this._store.removeNodeTypes(["document"]);}var _191={"store":this._store,"deferItemLoadingUntilExpand":true,"itemFilter":this._libFolderItemFilter,"rootLabel":"Folders"};this._libTreeModel=new com.ibm.workplace.wcm.ecm.picker.widget.model.FedDocTreeModel(_191);var _192={"id":_18b,"model":this._libTreeModel,"showRoot":true,"filteredNodes":[],"adjustFirstNodeForIE":this.adjustFirstNodeForIE,"dir":this._isRTLMode?"rtl":"ltr","persist":false,"onClick":dojo.hitch(this,"_onLibTreeNodeClick"),"onOpen":dojo.hitch(this,"_onLibTreeNodeOpen"),"onClose":dojo.hitch(this,"_onLibTreeNodeClose"),"onLoad":dojo.hitch(this,"_onLibTreeLoaded"),"onFocus":dojo.hitch(this,"_onLibTreeFocused"),"getIconClass":dojo.hitch(this,"_getLibTreeIconClass")};this._libTree=new dijit.Tree(_192);dojo.style(this._libTree.domNode,"overflow","visible");dojo.place(this._libTree.domNode,this.fedDocLibTreeContainer,"last");if(this._isTracing){this.traceExit(m);}},_setupTree:function(p_id){var m="_setupTree(p_id)";if(this._isTracing){this.traceEntry(m,p_id);}this._clearTree();var _193=this.id+"_docTree";var _194={store:this._store,query:"itemID="+p_id,deferItemLoadingUntilExpand:true,itemFilter:this._quickFilterDoc,allowSubItems:false};this._treeModel=new com.ibm.workplace.wcm.ecm.picker.widget.model.FedDocTreeModel(_194);var _195={"id":_193,"model":this._treeModel,"showRoot":false,"filteredNodes":[],"adjustFirstNodeForIE":this.adjustFirstNodeForIE,"dir":this._isRTLMode?"rtl":"ltr","persist":false,"onClick":dojo.hitch(this,"_onTreeNodeClick"),"onOpen":dojo.hitch(this,"_onTreeNodeClick"),"onClose":dojo.hitch(this,"_onTreeNodeClick"),"onFocus":dojo.hitch(this,"_onTreeFocused"),"onLoad":dojo.hitch(this,"_onTreeLoaded"),"getIconClass":dojo.hitch(this,"_getDocTreeIconClass")};if(this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._pzn){dojo.addClass(this.fedDocTreeContainer,"disabledTree");dijit.setWaiState(this.fedDocTreeContainer,"disabled",true);}this._docTree=new dijit.Tree(_195);dojo.style(this._docTree.domNode,"overflow","visible");dojo.place(this._docTree.domNode,this.fedDocTreeContainer,"last");this._updateTreeLayout();if(this._isTracing){this.traceExit(m);}},_setVisible:function(_196,_197){var m="_setVisible(p_domNode, p_isVisible)";if(this._isTracing){this.traceEntry(m,[_196,_197]);}if(_197===true){if(dojo.hasClass(_196,"lotusHidden")){dojo.removeClass(_196,"lotusHidden");}dijit.setWaiState(_196,"hidden",false);dijit.setWaiState(_196,"expanded",true);}else{if(!dojo.hasClass(_196,"lotusHidden")){dojo.addClass(_196,"lotusHidden");}dijit.setWaiState(_196,"hidden",true);dijit.removeWaiState(_196,"expanded");}if(this._isTracing){this.traceExit(m);}},_showConnectingBox:function(){var m="_showConnectingBox()";if(this._isTracing){this.traceEntry(m);}if(dojo.style(this.fedDocPickerConnectingDiv,"display")!="block"){dojo.style(this.fedDocPickerConnectingDiv,"display","block");}dijit.setWaiState(this.fedDocPickerConnectingDiv,"hidden",false);dijit.setWaiState(this.fedDocPickerResponseContainer,"busy",true);if(this._isTracing){this.traceExit(m);}},_showDocTreePane:function(){var m="_showDocTreePane()";if(this._isTracing){this.traceEntry(m);}this.fedDocPickerBorderContainer.addChild(this.fedDocTreePane);this.fedDocPickerBorderContainer.layout();if(this._isTracing){this.traceExit(m);}},_showError:function(_198,_199){var m="_showError(p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_198,_199]);}this._hideConnectingBox();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},_showNoItemsInfo:function(){var m="_showNoItemsInfo()";if(this._isTracing){this.traceEntry(m);}dojo.style(this.fedDocNoItemsInfoDiv,"display","block");dijit.setWaiState(this.fedDocNoItemsInfoDiv,"hidden",false);if(this._isTracing){this.traceExit(m);}},_updateAuthenticationInfoMsg:function(){var m="_updateAuthenticationInfoMsg()";if(this._isTracing){this.traceEntry(m,p_id);}dojo.attr(this.fedDocPickerAuthInfo,"innerHTML",this._authenticationInfoMsg);if(this._isTracing){this.traceExit(m);}},_updateFilterLayout:function(){var m="_updateFilterLayout()";if(this._isTracing){this.traceEntry(m);}if(!dojo.hasClass(this.fedDocLibTreeFilterDiv,"lotusHidden")){var _19a=dojo.marginBox(this.fedDocLibTreePane.domNode).w;this._onLibTreePaneResized(null,{w:_19a});}if(!dojo.hasClass(this.fedDocTreeFilterDiv,"lotusHidden")){var _19b=dojo.marginBox(this.fedDocTreePane.domNode).w;this._onTreePaneResized(null,{w:_19b});}if(this._isTracing){this.traceExit(m);}},_updateTreeLayout:function(){var m="_updateTreeLayout()";if(this._isTracing){this.traceEntry(m);}this.fedDocPickerBorderContainer.resize();if(this._libTree){this._adjustTreePaneHeight(this.fedDocLibTreeFilterDiv,this.fedDocLibTreeContainer,this._calcDomNodesHeight([this.fedDocLibTreeHeader])+2);}if(this._docTree){this._adjustTreePaneHeight(this.fedDocTreeFilterDiv,this.fedDocTreeContainer,this._calcDomNodesHeight([this.fedDocTreeHeader])+2);}this._updateFilterLayout();if(this._isTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.QuickrDocumentPickerPageWidget"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.widget.QuickrDocumentPickerPageWidget"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.widget.QuickrDocumentPickerPageWidget");dojo.registerModulePath("com.ibm.workplace.wcm.ecm.picker.widget","../com/ibm/workplace/wcm/ecm/picker/widget");dojo.declare("com.ibm.workplace.wcm.ecm.picker.widget.QuickrDocumentPickerPageWidget",[com.ibm.workplace.wcm.ecm.picker.widget.GenericWizardPageWidget],{namespace:"qckrDocPckrPgWdgt_",templateString:"<div dojoAttachPoint=\"quickrPickerLaunchPageDiv\" id=\"${namespace}quickrPickerLaunchPageDiv_id\" name=\"${namespace}quickrPickerLaunchPageDiv\">\n <div dojoAttachPoint=\"quickrPickerInfoMsgDiv\" name=\"${namespace}quickrPickerInfoMsgDiv\" id=\"${namespace}quickrPickerInfoMsgDiv_id\" style=\"margin-top: 15px; margin-bottom: 15px; width: 480px;\">\n ${_nlsUserInterface.quickrLaunchPage.stepDetailedInfoText}\n </div>\n <div dojoAttachPoint=\"quickrPickerUrlDiv\" name=\"${namespace}quickrPickerUrlDiv\" id=\"${namespace}quickrPickerUrlDiv_id\" style=\"margin-top: 15px; margin-bottom: 15px;\">\n <h4 class=\"feddocHeader4\">\n <label id=\"${namespace}quickrPickerUrl.lbl\"\n for=\"${namespace}quickrUrlTextBox_id\"\n dojoAttachPoint=\"quickrPickerUrlLabel\"\n aria-label=\"${_nlsUserInterface.quickrLaunchPage.selectedFolderLabel}\">${_nlsUserInterface.quickrLaunchPage.selectedFolderLabel}</label><p/>\n </h4>\n <input type=\"text\" role=\"textbox\" aria-readonly=\"true\" dojoType=\"dijit.form.TextBox\" dojoAttachPoint=\"quickrUrlTextBox\" name=\"${namespace}quickrUrlTextBox\" id=\"${namespace}quickrUrlTextBox_id\" title=\"${_nlsUserInterface.quickrLaunchPage.selectedFolderTitle}\" intermediateChanges=\"false\" readOnly style=\"width: 300px;\" tabIndex=\"-1\"/>\n <span class=\"lotusBtn lotusBtnAction\" role=\"button\" aria-label=\"${_nlsUserInterface.quickrLaunchPage.selectButtonTitle}\">\n <a dojoAttachPoint=\"quickrPickerLaunchBtn\" href=\"javascript:void(0);\" title=\"${_nlsUserInterface.quickrLaunchPage.selectButtonTitle}\" id=\"${namespace}quickrPickerLaunchBtn\" name=\"${namespace}quickrPickerLaunchBtn\" tabIndex=\"0\">${_nlsUserInterface.quickrLaunchPage.selectButtonLabel}</a>\n </span>\n </div>\n</div>\n",widgetsInTemplate:true,_authenticationInfoMsg:"",_authProperties:null,_callingEnvId:com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm,_dsPickerArgs:{},_eventHandles:[],_fedDocsPickerArgs:{},_federatedDocumentsServiceBean:null,_isTracing:false,_selectedUrl:null,_serverUrl:"",_portalContextPath:"/wps",constructor:function(_19c){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_19c);if(_19c){this.trace(m,"p_params.callingEnvId:",_19c.callingEnvironment);this.trace(m,"p_params.namespace:",_19c.namespace);this.trace(m,"p_params.portalContextPath:",_19c.portalContextPath);}}if(typeof _19c.callingEnvironment=="string"){this._callingEnvId=_19c.callingEnvironment;}if(typeof _19c.namespace=="string"){this.namespace=_19c.namespace;}var _19d=this._nlsUserInterface.quickrLaunchPage;this._stepLabel=_19d.stepLabel;if(this._callingEnvId===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm){this._stepDescription=_19d.stepDescriptionWCM;}else{this._stepDescription=_19d.stepDescription;}this._portalContextPath=_19c.portalContextPath;if(this._isTracing){this.traceExit(m);}},getSelectedItemJSON:function(){var m="getSelectedItemJSON()";if(this._isTracing){this.traceEntry(m);}var _19e={"title":"","url":this._selectedUrl};if(this._isTracing){this.traceExit(m,_19e);}return _19e;},initializePage:function(_19f){var m="initializePage(p_params)";if(this._isTracing){this.traceEntry(m,_19f);if(_19f){this.trace(m,"p_params.serverUrl:",_19f.serverUrl);}}this._selectedUrl=null;this._showSelectedUrl("");if(_19f){if(_19f.serverUrl){this._serverUrl=_19f.serverUrl;}else{this._serverUrl="";}}if(this._callingEnvId===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm){dojo.attr(this.quickrPickerInfoMsgDiv,"innerHTML",this._nlsUserInterface.quickrLaunchPage.stepDetailedInfoTextWCM);dojo.attr(this.quickrPickerUrlLabel,"innerHTML","<b>"+this._nlsUserInterface.quickrLaunchPage.selectedDocumentLabel+"</b>");}else{dojo.attr(this.quickrPickerInfoMsgDiv,"innerHTML",this._nlsUserInterface.quickrLaunchPage.stepDetailedInfoText);dojo.attr(this.quickrPickerUrlLabel,"innerHTML","<b>"+this._nlsUserInterface.quickrLaunchPage.selectedFolderLabel+"</b>");}if(this._isTracing){this.traceExit(m);}},layout:function(){var m="layout()";if(this._isTracing){this.traceEntry(m);}var _1a0=dojo.marginBox(this.domNode).w;var _1a1=_1a0-30;dojo.marginBox(this.quickrPickerInfoMsgDiv,{w:_1a1});var _1a2=dojo.marginBox(this.quickrPickerLaunchBtn).w;var _1a3=_1a0-_1a2-30;if(_1a3>=0){dojo.style(this.quickrUrlTextBox.domNode,"width",_1a3+"px");}if(this._isTracing){this.traceExit(m);}},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._initEventHandles();if(this._isTracing){this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this._clearEventHandles();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},_clearEventHandles:function(){var m="_clearEventHandles()";if(this._isTracing){this.traceEntry(m);}dojo.forEach(this._eventHandles,dojo.disconnect);this._eventHandles=[];if(this._isTracing){this.traceExit(m);}},_fixUpDlgUnderlay:function(){var m="_fixUpDlgUnderlay()";if(this._isTracing){this.traceEntry(m);}if(dijit._underlay){var zIdx=dojo.style(dijit._underlay.domNode,"zIndex");if(zIdx){dojo.style(dijit._underlay.domNode,"zIndex",zIdx-2);}dojo.style(dijit._underlay.domNode,"display","block");}if(this._isTracing){this.traceExit(m);}},_initEventHandles:function(){var m="_initEventHandles()";if(this._isTracing){this.traceEntry(m);}this._eventHandles.push(dojo.connect(this.quickrPickerLaunchBtn,"onclick",dojo.hitch(this,"_onLaunchButtonClicked")));if(this._isTracing){this.traceExit(m);}},_onConfirmQuickrPicker:function(_1a4,_1a5,_1a6){var m="_onConfirmQuickrPicker(p_title, p_url)";if(this._isTracing){this.traceEntry(m,[_1a4,_1a5]);}if(this._callingEnvId===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm&&_1a6!="view"){this._selectedUrl=com.ibm.workplace.wcm.ecm.picker.util.URLUtils._INSTANCE.generateProxiedUrl(_1a5,this._portalContextPath);}else{this._selectedUrl=_1a5;}this._showSelectedUrl(this._selectedUrl);if(this._isTracing){this.traceExit(m);}},_onLaunchButtonClicked:function(){var m="_onLaunchButtonClicked()";if(this._isTracing){this.traceEntry(m);}if(this._pickerManager&&dojo.isFunction(this._pickerManager.launchDocumentServicesPickerDialog)){var _1a7=dojo.hitch(this,"_onConfirmQuickrPicker");var _1a8=dojo.hitch(this,"_fixUpDlgUnderlay");var _1a9=this._serverUrl;if(_1a9&&_1a9.charAt(_1a9.length-1)=="/"){_1a9=_1a9.substring(0,_1a9.length-1);}this._pickerManager.launchDocumentServicesPickerDialog(_1a9,_1a7,_1a8);}if(this._isTracing){this.traceExit(m);}},_showSelectedUrl:function(_1aa){var m="_showSelectedUrl(p_url)";if(this._isTracing){this.traceEntry(m,_1aa);}if(((typeof _1aa)=="undefined")||(_1aa===null)){_1aa="";}this.quickrUrlTextBox.attr("value",_1aa);if(_1aa!==""){this._setReadyValue(true);}if(this._isTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.dialog.FederatedDocumentsPickerDialog"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.dialog.FederatedDocumentsPickerDialog"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.dialog.FederatedDocumentsPickerDialog");dojo.registerModulePath("com.ibm.workplace.wcm.ecm.picker.dialog","../com/ibm/workplace/wcm/ecm/picker/dialog");dojo.require("dijit.layout.ContentPane");dojo.require("dijit.layout.StackContainer");dojo.require("com.ibm.widgets.GenericDialog");dojo.declare("com.ibm.workplace.wcm.ecm.picker.dialog.FederatedDocumentsPickerDialog",[com.ibm.widgets.GenericDialog],{lotusui_id:"dijitDialog_lotusui30_fedDocDlg_container",lotusui_class:"lotusui30",namespace:"fedDocsPckrDlg_",templateString:dojo.cache("com.ibm.workplace.wcm.ecm.picker.dialog","template/FederatedDocumentsPickerDialog.html","<div dojoAttachPoint=\"GenericDialogDiv\"\n class=\"lotusDialogBorder com_ibm_workplace_wcm_ecm_picker_dialog\"\n waistate=\"labelledby-${namespace}GenericDialogTitleSpan_id\" wairole=\"dialog\" role=\"dialog\"\n tabindex=\"-1\" aria-labelledby=\"${namespace}GenericDialogTitleSpan_id\" style=\"max-width: none; max-height: none;\">\n\n <div id=\"${namespace}GenericDialogContentDiv_id\" name=\"${namespace}GenericDialogContentDiv\" class=\"lotusDialog\">\n <div class=\"lotusDialogHeader\" dojoAttachPoint=\"titleBar\">\n <h1 class=\"lotusHeading\" id=\"${namespace}GenericDialogTitleBar_id\" name=\"${namespace}GenericDialogTitleBar\">\n <span dojoAttachPoint=\"titleNode\" id=\"${namespace}GenericDialogTitleSpan_id\" name=\"${namespace}GenericDialogTitleSpan\">${title}</span>\n </h1>\n <a role=\"button\" aria-label=\"${_nlsUserInterface.docPickerDialog.cancelLinkTitle}\" dojoAttachPoint=\"dialogClose\" href=\"javascript:void(0);\" class=\"lotusDialogClose\" title=\"${_nlsUserInterface.docPickerDialog.cancelLinkTitle}\" id=\"${namespace}buttonCancel_id\" name=\"${namespace}buttonCancel\">\n <img src=\"${blankImgUrl}\" alt=\"\" role=\"presentation\" />\n <span dojoAttachPoint=\"closeText\" id=\"${namespace}buttonCancelSpan_id\" name=\"${namespace}buttonCancelSpan\" class=\"lotusAltText\" title=\"${_nlsUserInterface.docPickerDialog.cancelLinkTitle}\">X</span>\n </a>\n </div>\n\n <div dojoAttachPoint=\"containerNode\" class=\"lotusDialogContent\" id=\"${namespace}containerNode_id\" name=\"${namespace}containerNode\">\n <div dojoAttachPoint=\"wizardErrorDiv\" waiRole=\"alert\" role=\"alert\" aria-hidden=\"true\" id=\"${namespace}wizardErrorDiv_id\" name=\"${namespace}wizardErrorDiv\"\n title=\"${_nlsUserInterface.docPickerDialog.wizardErrorDivTitle}\" style=\"display:none; max-height: 200px; overflow: auto;\"\n class=\"lotusMessage feddocTopSpaceSmall\">\n <img class=\"feddocErrorIcon\" src=\"${blankImgUrl}\" width=\"16\" height=\"16\" alt=\"${_nlsUserInterface.docPickerDialog.errorImgAlt}\" role=\"img\" />\n <span dojoAttachPoint=\"wizardErrorSpan\" name=\"${namespace}wizardErrorSpan\" id=\"${namespace}wizardErrorSpan_id\"></span>\n <div aria-hidden=\"true\" dojoAttachPoint=\"wizardErrorDetailsDiv\" name=\"${namespace}wizardErrorDetailsDiv\" id=\"${namespace}wizardErrorDetailsDiv_id\" style=\"display: none;\"> <!-- style=\"background-color: white;\" -->\n <span dojoAttachPoint=\"wizardErrorDetailsSpan\" name=\"${namespace}wizardErrorDetailsSpan\" id=\"${namespace}wizardErrorDetailsSpan_id\"></span>\n </div>\n </div>\n <div dojoAttachPoint=\"wizardStepHeader\" id=\"${namespace}wizardStepHeader_id\" name=\"${namespace}wizardStepHeader\">\n <h4 class=\"feddocHeader4\"><span dojoAttachPoint=\"wizardStepLabel\" id=\"${namespace}wizardStepLabel_id\"><!-- dynamically set --></span></h4>\n <div><span dojoAttachPoint=\"wizardStepDescription\" id=\"${namespace}wizardStepDescr_id\"><!-- dynamically set --></span></div>\n </div>\n <div dojoAttachPoint=\"fedDocPickerDetectingDiv\" class=\"feddocConnectingBox\">\n <span class=\"lotusLoading\"><img width=\"21\" height=\"21\" src=\"${blankImgUrl}\" role=\"presentation\" aria-labelledby=\"${namespace}detectingFeedTypeDivText_id\" alt=\"${_nlsUserInterface.docPickerDialog.detectingFeedTypeImgAlt}\">\n </span>&nbsp;<span><span dojoAttachPoint=\"detectingFeedTypeDivText\" id=\"${namespace}detectingFeedTypeDivText_id\">${_nlsUserInterface.docPickerDialog.detectingFeedTypeDivText}</span>\n </span>\n </div>\n <div dojoAttachPoint=\"fedDocPickerGettingVaultDiv\" class=\"feddocConnectingBox\">\n <span class=\"lotusLoading\"><img width=\"21\" height=\"21\" src=\"${blankImgUrl}\" role=\"presentation\" aria-labelledby=\"${namespace}gettingVaultDivText_id\" alt=\"${_nlsUserInterface.docPickerDialog.gettingVaultImgAlt}\">\n </span>&nbsp;<span><span dojoAttachPoint=\"gettingVaultDivText\" id=\"${namespace}gettingVaultDivText_id\">${_nlsUserInterface.docPickerDialog.gettingVaultDivText}</span>\n </span>\n </div>\n <div role=\"region\" aria-describedby=\"${namespace}wizardStepDescr_id\" aria-labelledby=\"${namespace}wizardStepLabel_id\" dojoAttachPoint=\"wizardPageContainer\" dojoType=\"dijit.layout.StackContainer\" id=\"${namespace}wizardPageContainer_id\" name=\"${namespace}wizardPageContainer\" doLayout=\"false\" style=\"min-width: 540px;\">\n </div>\n </div>\n\n <div dojoAttachPoint=\"dialogFooter\" class=\"lotusDialogFooter\" id=\"${namespace}dialogFooter_id\" name=\"${namespace}dialogFooter\">\n <form dojoAttachPoint=\"dialogFooterForm\">\n <input dojoAttachPoint=\"dialogPrevious\" class=\"lotusFormButton\" type=\"submit\" value=\"${_nlsUserInterface.docPickerDialog.backButtonCaption}\" role=\"button\" title=\"${_nlsUserInterface.docPickerDialog.backButtonTitle}\" id=\"${namespace}dialogGotoPreviousPage_id\" name=\"${namespace}dialogGotoPreviousPage\" />\n <input dojoAttachPoint=\"dialogNext\" class=\"lotusFormButton\" type=\"submit\" value=\"${_nlsUserInterface.docPickerDialog.nextButtonCaption}\" role=\"button\" title=\"${_nlsUserInterface.docPickerDialog.nextButtonTitle}\" id=\"${namespace}dialogGotoNextPage_id\" name=\"${namespace}dialogGotoNextPage\" />\n <input dojoAttachPoint=\"dialogConfirm\" class=\"lotusFormButton feddocButtonLargeDistance\" type=\"submit\" value=\"${_nlsUserInterface.docPickerDialog.finishButtonCaption}\" role=\"button\" title=\"${_nlsUserInterface.docPickerDialog.finishButtonTitle}\" id=\"${namespace}submitDialogSelection_id\" name=\"${namespace}submitDialogSelection\" />\n <input dojoAttachPoint=\"dialogCancel\" class=\"lotusBtn\" type=\"button\" role=\"button\" \n id=\"${namespace}cancelDialogSelection_id\" name=\"${namespace}cancelDialogSelection\" \n aria-label=\"${_nlsUserInterface.docPickerDialog.cancelLinkTitle}\" title=\"${_nlsUserInterface.docPickerDialog.cancelLinkTitle}\" \n value=\"${_nlsUserInterface.docPickerDialog.cancelLinkText}\" />\n </form>\n </div>\n </div>\n</div>\n"),widgetsInTemplate:true,_callingEnvironment:com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm,_currentPage:-1,_defaultButton:null,_dialogBorderWidth:2,_errorState:false,_nlsMessages:{},_nlsUserInterface:{},_maxErrorChars:768,_pageParams:{},_pages:[],_qdsSupportEnabled:true,_serverTypeMap:{},_transientSlotId:String,_vaultMgmtDataSinkUrl:String,_widgets:[],buildRendering:function(){var m="buildRendering()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);var _1ab;if(this._isCalledFromPZN()){_1ab=this._nlsUserInterface.docPickerDialog.titlePZN;}else{_1ab=this._nlsUserInterface.docPickerDialog.titleWCM;}this.title=_1ab;this._hideDetectingBox();this._hideGettingVaultBox();if(this._isTracing){this.traceExit(m);}},constructor:function(_1ac){this._isTracing=this.isTracing();var m="constructor";if(this._isTracing){this.traceEntry(m,_1ac);if(_1ac){this.trace(m,"p_params.availableAuthTypes",_1ac.availableAuthTypes);this.trace(m,"p_params.callingEnvironment",_1ac.callingEnvironment);this.trace(m,"p_params.customServiceSelectionEnabled",_1ac.customServiceSelectionEnabled);this.trace(m,"p_params.documentsServices",_1ac.documentsServices);this.trace(m,"p_params.feedBaseURL",_1ac.feedBaseURL);this.trace(m,"p_params.feedType",_1ac.feedType);this.trace(m,"p_params.feedTypeBaseURL",_1ac.feedTypeBaseURL);this.trace(m,"p_params.namespace",_1ac.namespace);this.trace(m,"p_params.nodeTypes",dojo.toJson(_1ac.nodeTypes));this.trace(m,"p_params.pickerManager",_1ac.pickerManager);this.trace(m,"p_params.portalContextPath",_1ac.portalContextPath);this.trace(m,"p_params.qdsSupportEnabled",_1ac.qdsSupportEnabled);this.trace(m,"p_params.serviceDocBaseURL",_1ac.serviceDocBaseURL);this.trace(m,"p_params.vaultSelectionEnabled",_1ac.vaultSelectionEnabled);this.trace(m,"p_params.vaultSelectionEnabledForPZN",_1ac.vaultSelectionEnabledForPZN);this.trace(m,"p_params.vaultSelectionEnabledForWCM",_1ac.vaultSelectionEnabledForWCM);this.trace(m,"p_params.vaultSlots",_1ac.vaultSlots);}}this._eventHandles=[];this._widgets=[];this._pages=[];this._serverTypeMap={};this._defaultButton=null;this._transientSlotId=null;if(typeof _1ac.callingEnvironment=="string"){this._callingEnvironment=_1ac.callingEnvironment;}if(typeof _1ac.namespace=="string"){this.namespace=_1ac.namespace;}if(typeof _1ac.qdsSupportEnabled=="boolean"){this._qdsSupportEnabled=_1ac.qdsSupportEnabled;}if(typeof _1ac.vaultMgmtDataSinkUrl=="string"){this._vaultMgmtDataSinkUrl=_1ac.vaultMgmtDataSinkUrl;}var _1ad=com.ibm.workplace.wcm.ecm.picker.util.URLUtils._INSTANCE.normalizePlaceholders(_1ac.feedBaseURL);var _1ae=com.ibm.workplace.wcm.ecm.picker.util.URLUtils._INSTANCE.normalizePlaceholders(_1ac.feedTypeBaseURL);var _1af=com.ibm.workplace.wcm.ecm.picker.util.URLUtils._INSTANCE.normalizePlaceholders(_1ac.serviceDocBaseURL);this._pageParams={"availableAuthTypes":_1ac.availableAuthTypes,"callingEnvironment":_1ac.callingEnvironment,"customServiceSelectionEnabled":_1ac.customServiceSelectionEnabled,"documentsServices":_1ac.documentsServices,"feedBaseURL":_1ad,"feedType":null,"feedTypeBaseURL":_1ae,"namespace":this.namespace,"nlsMessages":this._nlsMessages,"nlsUserInterface":this._nlsUserInterface,"nodeTypes":_1ac.nodeTypes,"onDefaultAction":dojo.hitch(this,"_onDefaultAction"),"onErrorStateChanged":dojo.hitch(this,"_onErrorStateChanged"),"onLayoutChanged":dojo.hitch(this,"layout"),"onReadyStateChanged":dojo.hitch(this,"_onReadyStateChanged"),"pickerManager":_1ac.pickerManager,"portalContextPath":_1ac.portalContextPath,"serviceDocBaseURL":_1af,"vaultSelectionEnabled":_1ac.vaultSelectionEnabled,"vaultSelectionEnabledForPZN":_1ac.vaultSelectionEnabledForPZN,"vaultSelectionEnabledForWCM":_1ac.vaultSelectionEnabledForWCM,"vaultSlots":_1ac.vaultSlots};this.cssStateNodes={};if(this._isTracing){this.traceExit(m);}},getSelectedItemJSON:function(){var m="getSelectedItemJSON()";if(this._isTracing){this.traceEntry(m);}var _1b0=null;if(this._currentPage==1){_1b0=this._widgets[1].getSelectedItemJSON();}else{if(this._currentPage==2){_1b0=this._widgets[2].getSelectedItemJSON();}}if(this._isTracing){this.traceExit(m,_1b0);}return _1b0;},layout:function(){var m="layout()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);var _1b1=Math.round(dijit.getViewport().h*0.9);var _1b2=Math.round(dijit.getViewport().w*0.9);var _1b3=dojo.marginBox(this.titleBar).h;var _1b4=dojo.marginBox(this.dialogFooter).h;if(this._isTracing){this.trace(m,"headerHeight: ",_1b3);this.trace(m,"footerHeight: ",_1b4);this.trace(m,"maxAllowedHeight: ",_1b1);this.trace(m,"maxAllowedWidth: ",_1b2);}if(this.isResized===true){this._layoutManualResize(_1b3,_1b4,_1b1,_1b2);}else{this._layoutAutoResize(_1b3,_1b4,_1b1,_1b2);}var _1b5=dojo.marginBox(this.wizardErrorDiv).w-dojo.contentBox(this.wizardErrorDiv).w;var _1b6=dojo.contentBox(this.containerNode).w-_1b5;if(_1b6>=0){dojo.style(this.wizardErrorDiv,"width",_1b6+"px");}var _1b7=dojo.marginBox(this.wizardErrorDiv).h+dojo.marginBox(this.wizardStepHeader).h+20;var _1b8=dojo.marginBox(this.containerNode).h;if(this.wizardPageContainer){this.wizardPageContainer.layout();}if((this._currentPage>-1)&&(this._currentPage<this._widgets.length)){this._widgets[this._currentPage].virtualContainerNodeHeight=Math.max(_1b8-_1b7,300);this._widgets[this._currentPage].layout();}if(this._isTracing){this.traceExit(m);}},postCreate:function(){var m="postCreate()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._initializePages(this._pageParams);if(this._widgets.length<3){throw new Error(this._nlsMessages.docPickerDialog.errorNotAllWidgetsDefined);}else{for(var i=0;i<3;i++){this._addPageForWidget(i);}}dojo.place(this.domNode,this._findOrCreateLotusUIDIV(),"last");if(this._isTracing){this.traceExit(m);}},postMixInProperties:function(){var m="postMixInProperties()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},show:function(){var m="show()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);setTimeout(dojo.hitch(this,"_onFocusFirstItem"),this.duration+30);if(this._isTracing){this.traceExit(m);}},startup:function(){var m="startup()";if(this._isTracing){this.traceEntry(m);}if(this.wizardPageContainer){this.wizardPageContainer.startup();this._currentPage=-1;this._widgets[0].setFeedType(null);this._switchToPage(0);}this.layout();this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},uninitialize:function(){var m="uninitialize()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);if(this._isTracing){this.traceExit(m);}},_addPageForWidget:function(_1b9){var m="_addPageForWidget(p_widgetIndex)";if(this._isTracing){this.traceEntry(m,_1b9);}var _1ba=this._widgets[_1b9];if(this._isTracing){this.trace(m,"Widget for index:",_1ba);}if(_1ba){page=new dijit.layout.ContentPane();page.onShow=dojo.hitch(this,function(){_1ba.onShow();});this._pages.push(page);this.wizardPageContainer.addChild(page);_1ba.placeAt(page.domNode);}if(this._isTracing){this.traceExit(m);}},_clearError:function(){var m="_clearError()";if(this._isTracing){this.traceEntry(m);}this._errorState=false;dojo.style(this.wizardErrorDetailsDiv,"display","none");dojo.style(this.wizardErrorDiv,"display","none");dijit.setWaiState(this.wizardErrorDiv,"hidden",true);dijit.setWaiState(this.wizardErrorDetailsDiv,"hidden",true);this._enableDisableButtons();this.layout();if(this._isTracing){this.traceExit(m);}},_deleteTransientSlot:function(){var m="_deleteTransientSlot()";if(this._isTracing){this.traceEntry(m);}if(this._transientSlotId!==null){postData="slotid="+this._encodePostDataItem(this._transientSlotId);var _1bb={"Content-Type":"text/plain","Accept":"text/plain"};dojo.xhrPost({"url":this._vaultMgmtDataSinkUrl,"postData":postData,"handleAs":"text","headers":_1bb,"sync":false});}if(this._isTracing){this.traceExit(m);}},_enableDisableButtons:function(){var m="_enableDisableButtons()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Current page:",this._currentPage);}if(this._currentPage===0){this._setBackBtnEnabled(false);this._setFinishBtnEnabled(false);if(this._isCurrentPageReady()&&(!this._errorState)){this._setNextBtnEnabled(true);}else{this._setNextBtnEnabled(false);}}else{this._setBackBtnEnabled(true);if(this._isCurrentPageReady()&&(!this._errorState)){this._setNextBtnEnabled(false);this._setFinishBtnEnabled(true);}else{this._setNextBtnEnabled(false);this._setFinishBtnEnabled(false);}}if(this._isTracing){this.traceExit(m);}},_encodePostDataItem:function(_1bc){var m="_encodePostDataItem(string)";if(this._isTracing){this.traceEntry(m,_1bc);}var ret=encodeURIComponent(_1bc);if(this._isTracing){this.traceExit(m,ret);}return ret;},_encodeUrlIfNeeded:function(_1bd){var m="_encodeUrlIfNeeded(p_url)";if(this._isTracing){this.traceEntry(m,_1bd);}var _1be=_1bd;if(_1bd&&typeof _1bd=="string"&&_1bd.indexOf("%")==-1){_1be=encodeURI(_1bd);}if(this._isTracing){this.traceExit(m,_1be);}return _1be;},_fetchServerType:function(_1bf){var m="_fetchServerType(p_url)";if(this._isTracing){this.traceEntry(m,_1bf);}var _1c0=this._generateDetectionURL(_1bf);this._showDetectingBox();try{dojo.xhrGet({"url":_1c0,"handleAs":"json","sync":false,"load":dojo.hitch(this,function(_1c1){this._fetchServerTypeLoadCallback(_1bf,_1c1);}),"error":dojo.hitch(this,function(_1c2,_1c3){this._fetchServerTypeErrorCallback(_1bf,_1c2,_1c3);})});}catch(e){if(e.name&&e.message){this._showError(e.name,e.message);}else{this._showError(this._nlsMessages.docPickerDialog.errorGenericException,e);}}if(this._isTracing){this.traceExit(m);}},_fetchServerTypeErrorCallback:function(_1c4,_1c5,_1c6){var m="_fetchServerTypeErrorCallback(p_url, p_error, p_ioargs)";if(this._isTracing){this.traceEntry(m,[_1c4,_1c5,_1c6]);}this._hideDetectingBox();if(_1c6.xhr.status==404){if(_1c4.indexOf("/dm/atom/libraries/feed")==-1){var _1c7=com.ibm.workplace.wcm.ecm.picker.util.URLUtils._INSTANCE.appendPath(_1c4,"/dm/atom/libraries/feed");this._fetchServerType(_1c7);}else{this._showErrorForXHRRequest(_1c6);}}else{this._showErrorForXHRRequest(_1c6);}if(this._isTracing){this.traceExit(m);}},_fetchServerTypeLoadCallback:function(_1c8,_1c9){var m="_fetchServerTypeLoadCallback(p_url, p_data)";if(this._isTracing){this.traceEntry(m,[_1c8,_1c9]);}this._hideDetectingBox();var _1ca=_1c9.feedType;if(_1ca){if(_1ca===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._unknown){if(_1c8.indexOf("/dm/atom/libraries/feed")==-1){var _1cb=com.ibm.workplace.wcm.ecm.picker.util.URLUtils._INSTANCE.appendPath(_1c8,"/dm/atom/libraries/feed");this._fetchServerType(_1cb);}else{this._showError(this._nlsMessages.docPickerDialog.errorUnknownFeedType,_1ca);}}else{this._serverTypeMap[_1c8]=_1ca;this._widgets[0].setFeedType(_1ca);if(this._isQuickrFeedType(_1ca)){this._switchToQuickrPage();}else{this.isResized=false;this._switchToPage(1);}}}else{this._showError(this._nlsMessages.docPickerDialog.errorCouldNotDetectFeedType,"");}if(this._isTracing){this.traceExit(m);}},_findOrCreateLotusUIDIV:function(){var m="_findOrCreateLotusUIDIV()";if(this._isTracing){this.traceEntry(m);}var _1cc=dojo.byId(this.lotusui_id);if(!_1cc){_1cc=dojo.create("div",{"id":this.lotusui_id,"class":this.lotusui_class,"wairole":"region","role":"region"},dojo.body());}dijit.setWaiState(_1cc,"labelledby",this.namespace+"GenericDialogTitleSpan_id");this._lotusui_div=_1cc;if(this._isTracing){this.traceExit(m,_1cc);}return _1cc;},_generateDetectionURL:function(_1cd){var m="_generateDetectionURL(p_url)";if(this._isTracing){this.traceEntry(m,_1cd);}var url=_1cd;url=encodeURIComponent(this._encodeUrlIfNeeded(url));var _1ce;var _1cf=this._widgets[0].getSettings();if((_1cf.authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault)&&(_1cf.authProperties.vaultSlotID)){_1ce=encodeURIComponent(_1cf.authProperties.vaultSlotID);}else{if((_1cf.authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd)&&(this._transientSlotId)){_1ce=encodeURIComponent(this._transientSlotId);}else{_1ce="";}}var _1d0=this._pageParams.feedTypeBaseURL.replace("%7BtypeFilter%7D","all").replace("%7BfeedUrl%7D",url).replace("%7BmimeType%7D","application%2Fjson").replace("%7BvaultSlotId%7D",_1ce);if(this._isTracing){this.traceExit(m,_1d0);}return _1d0;},_getDefaultButton:function(){var m="_getDefaultButton()";if(this._isTracing){this.traceEntry(m);}var _1d1=dojo.hasClass(this.dialogConfirm,"lotusBtnDisabled");var _1d2=dojo.hasClass(this.dialogNext,"lotusBtnDisabled");if(_1d1&&_1d2){this._defaultButton=null;}else{if(_1d2){this._defaultButton=this.dialogConfirm;}else{this._defaultButton=this.dialogNext;}}if(this._isTracing){this.traceExit(m,this._defaultButton);}return this._defaultButton;},_getTransientSlot:function(_1d3,_1d4){var m="_getTransientSlot(userid, password)";if(this._isTracing){this.traceEntry(m,_1d3,_1d4);}var _1d5="name="+this._encodePostDataItem(_1d3);if(_1d4!==null){_1d5=_1d5+"&pw="+this._encodePostDataItem(_1d4);}if(this._transientSlotId!==null){_1d5=_1d5+"&slotid="+this._encodePostDataItem(this._transientSlotId);}var _1d6={"Content-Type":"text/plain","Accept":"text/plain"};this._showGettingVaultBox();dojo.xhrPost({"url":this._vaultMgmtDataSinkUrl,"postData":_1d5,"handleAs":"text","headers":_1d6,"sync":false,"load":dojo.hitch(this,function(_1d7){this._hideGettingVaultBox();this._transientSlotId=_1d7;this._onGoFwd();}),"error":dojo.hitch(this,function(_1d8){this._hideGettingVaultBox();this._showError(this._nlsMessages.docPickerDialog.errorCouldNotGetVault,_1d8);})});if(this._isTracing){this.traceExit(m);}},_hideDetectingBox:function(){var m="_hideDetectingBox()";if(this._isTracing){this.traceEntry(m);}dojo.style(this.fedDocPickerDetectingDiv,"display","none");dijit.setWaiState(this.fedDocPickerDetectingDiv,"hidden",true);dijit.setWaiState(this.wizardPageContainer,"busy",false);if(this._isTracing){this.traceExit(m);}},_hideGettingVaultBox:function(){var m="_hideGettingVaultBox()";if(this._isTracing){this.traceEntry(m);}dojo.style(this.fedDocPickerGettingVaultDiv,"display","none");dijit.setWaiState(this.fedDocPickerGettingVaultDiv,"hidden",true);dijit.setWaiState(this.wizardPageContainer,"busy",false);if(this._isTracing){this.traceExit(m);}},_initEventHandles:function(){var m="_initEventHandles()";if(this._isTracing){this.traceEntry(m);}this.inherited(arguments);this._eventHandles.push(dojo.connect(this.dialogPrevious,"onclick",this,"_onGoBack"));this._eventHandles.push(dojo.connect(this.dialogFooterForm,"onsubmit",this,"_onSubmit"));if(this._isTracing){this.traceExit(m);}},_initializePages:function(_1d9){var m="_initializePages(p_params)";if(this._isTracing){this.traceEntry(m,_1d9);if(_1d9){this.trace(m,"p_params.authProperties:",dojo.toJson(_1d9.authProperties));this.trace(m,"p_params.availableAuthTypes:",dojo.toJson(_1d9.availableAuthTypes));this.trace(m,"p_params.callingEnvironment:",_1d9.callingEnvironment);this.trace(m,"p_params.customServiceSelectionEnabled:",_1d9.customServiceSelectionEnabled);this.trace(m,"p_params.documentsServices:",dojo.toJson(_1d9.documentsServices));this.trace(m,"p_params.feedBaseURL:",_1d9.feedBaseURL);this.trace(m,"p_params.feedTypeBaseURL:",_1d9.feedTypeBaseURL);this.trace(m,"p_params.nlsMessages:",dojo.toJson(_1d9.nlsMessages));this.trace(m,"p_params.nlsUserInterface:",dojo.toJson(_1d9.nlsUserInterface));this.trace(m,"p_params.namespace:",_1d9.namespace);this.trace(m,"p_params.nodeTypes:",dojo.toJson(_1d9.nodeTypes));this.trace(m,"p_params.onErrorStateChanged",_1d9.onErrorStateChanged);this.trace(m,"p_params.onLayoutChanged:",_1d9.onLayoutChanged);this.trace(m,"p_params.onReadyStateChanged:",_1d9.onReadyStateChanged);this.trace(m,"p_params.serviceDocBaseURL:",_1d9.serviceDocBaseURL);this.trace(m,"p_params.vaultMgmtDataSinkUrl:",_1d9.vaultMgmtDataSinkUrl);this.trace(m,"p_params.vaultSelectionEnabled:",_1d9.vaultSelectionEnabled);this.trace(m,"p_params.vaultSelectionEnabledForPZN:",_1d9.vaultSelectionEnabledForPZN);this.trace(m,"p_params.vaultSelectionEnabledForWCM:",_1d9.vaultSelectionEnabledForWCM);this.trace(m,"p_params.vaultSlots:",dojo.toJson(_1d9.vaultSlots));}}var _1da;_1da=new com.ibm.workplace.wcm.ecm.picker.widget.ServerConnectionPageWidget(_1d9);this._widgets.push(_1da);_1da=new com.ibm.workplace.wcm.ecm.picker.widget.CmisDocumentPickerPageWidget(_1d9);this._widgets.push(_1da);_1da=new com.ibm.workplace.wcm.ecm.picker.widget.QuickrDocumentPickerPageWidget(_1d9);this._widgets.push(_1da);if(this._isTracing){this.traceExit(m);}},_initNLS:function(){var m="_initNLS()";if(this._isTracing){this.traceEntry(m);}this._nlsUserInterface=dojo.i18n.getLocalization("com.ibm.workplace.wcm.ecm.picker","FederatedDocumentsPickerUserInterface");this._nlsMessages=dojo.i18n.getLocalization("com.ibm.workplace.wcm.ecm.picker","FederatedDocumentsPickerMessages");if(this._isTracing){this.trace(m,"Initialized NLS object for user interface elements:",dojo.toJson(this._nlsUserInterface));this.trace(m,"Initialized NLS object for messages:",dojo.toJson(this._nlsMessages));this.traceExit(m);}},_isCalledFromPZN:function(){var m="_isCalledFromPZN()";if(this._isTracing){this.traceEntry(m);}var _1db=(this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._pzn);if(this._isTracing){this.traceExit(m,_1db);}return _1db;},_isCalledFromWCM:function(){var m="_isCalledFromWCM()";if(this._isTracing){this.traceEntry(m);}var _1dc=(this._callingEnvironment===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm);if(this._isTracing){this.traceExit(m,_1dc);}return _1dc;},_isCurrentPageReady:function(){var m="_isCurrentPageReady()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Current page:",this._currentPage);}var _1dd=false;if((this._currentPage>-1)&&(this._currentPage<this._pages.length)){var _1de=this._widgets[this._currentPage];_1dd=_1de.isReady();}if(this._isTracing){this.traceExit(m,_1dd);}return _1dd;},_isQuickrFeedType:function(_1df){var _1e0;if((_1df===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._qds)||(_1df===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._qdsentry)){_1e0=true;}else{_1e0=false;}return _1e0;},_layoutAutoResize:function(_1e1,_1e2,_1e3,_1e4){var m="_layoutAutoResize(p_headerHeight, p_footerHeight, p_maxAllowedHeight, p_maxAllowedWidth)";if(this._isTracing){this.traceEntry(m,[_1e1,_1e2,_1e3,_1e4]);}var _1e5=Math.max(this.containerNode.scrollHeight,this.containerNode.offsetHeight);var _1e6=Math.max(this.containerNode.scrollWidth,this.containerNode.offsetWidth);var _1e7=dojo.marginBox(this.containerNode).h;var _1e8=_1e1+_1e5+_1e2;var _1e9=this._dialogBorderWidth+_1e6;var _1ea=_1e1+_1e7+_1e2;var _1eb=dojo.marginBox(this.containerNode).w;var _1ec=_1eb+this._dialogBorderWidth;if(this._isTracing){this.trace(m,"contentHeight:",_1e5);this.trace(m,"currentContentHeight:",_1e7);this.trace(m,"currentContentWidth:",_1eb);this.trace(m,"dialogHeight:",_1e8);this.trace(m,"currentDialogHeight:",_1ea);this.trace(m,"currentDialogWidth:",_1ec);}if(this.isResized===false){dojo.style(this.GenericDialogDiv,"height","auto");dojo.style(this.GenericDialogDiv,"width","auto");if(_1ea>_1e3){var _1ed=_1e3-_1e1-_1e2;if(this._isTracing){this.trace(m,"Reducing the dialog container node height to:",_1ed);}dojo.marginBox(this.containerNode,{"h":_1ed});}else{if(_1ea>=_1e8){if(this._isTracing){this.trace(m,"Setting the dialog container node height 'auto'");}dojo.style(this.containerNode,"height","auto");}else{if((_1ea<_1e3)&&(_1ea<_1e8)){var _1ee=Math.min(_1e3-_1e1-_1e2,_1e8+1-_1e1-_1e2);if(this._isTracing){this.trace(m,"Increasing the dialog container node height to:",_1ee);}dojo.marginBox(this.containerNode,{"h":_1ee});}}}if(_1ec>_1e4){var _1ef=_1e4-this._dialogBorderWidth;if(this._isTracing){this.trace(m,"Reducing the dialog container node width to:",_1ef);}dojo.marginBox(this.containerNode,{"w":_1ef});}else{if(_1ec>=_1e9){if(this._isTracing){this.trace(m,"Setting the dialog container node Width 'auto'");}dojo.style(this.containerNode,"width","auto");}else{if((_1ec<_1e4)&&(_1ec<_1e9)){var _1f0=Math.min(_1e4-this._dialogBorderWidth,_1e9+1-this._dialogBorderWidth);if(this._isTracing){this.trace(m,"Increasing the dialog container node width to:",_1f0);}dojo.marginBox(this.containerNode,{"w":_1f0});}}}if(this.wizardPageContainer){this.wizardPageContainer.layout();}}if(this._isTracing){this.traceExit(m);}},_layoutManualResize:function(_1f1,_1f2,_1f3,_1f4){var m="_layoutManualResize(p_headerHeight, p_footerHeight, p_maxAllowedHeight, p_maxAllowedWidth)";if(this._isTracing){this.traceEntry(m,[_1f1,_1f2,_1f3,_1f4]);}var _1f5=Math.max(dojo.contentBox(this.wizardErrorDiv).h,0);var _1f6=_1f1;var _1f7=_1f1+_1f5+_1f6+_1f2;var _1f8=dojo.marginBox(this.GenericDialogDiv).h;var _1f9=Math.max(_1f8,_1f7);_1f9=Math.min(_1f9,_1f3);var _1fa=_1f9-_1f1-_1f2-this._dialogBorderWidth;if(this._isTracing){this.trace(m,"errorHeight:",_1f5);this.trace(m,"stepHeaderHeight:",_1f6);this.trace(m,"dialogBoxHeight:",_1f8);this.trace(m,"dialogBoxHeightNew:",_1f9);this.trace(m,"contentHeightNew:",_1fa);}dojo.marginBox(this.GenericDialogDiv,{h:_1f9});dojo.marginBox(this.containerNode,{h:_1fa});this.wizardPageContainer.layout();if(this._isTracing){this.traceExit(m);}},_normalizeFeedTypeParam:function(_1fb){var m="_normalizeFeedTypeParam(p_feedType)";if(this._isTracing){this.traceEntry(m);}var _1fc="";if(typeof _1fb=="string"){var _1fd=_1fb.toLowerCase();if((_1fd==="cmis")||(_1fd==="servicedoc")){_1fc="cmis";}else{if((_1fd==="qds")||(_1fd==="qdsentry")){_1fc="qds";}}}else{_1fc="";}if(this._isTracing){this.traceExit(m,_1fc);}return _1fc;},_onCancel:function(){var m="_onCancel()";if(this._isTracing){this.traceEntry(m);}this._deleteTransientSlot();if(this._onCancelCallbackFn&&dojo.isFunction(this._onCancelCallbackFn)){if(this._isTracing){this.trace(m,"Dispatching to callback function:",this._onCancelCallbackFn);}this._onCancelCallbackFn();}if(this.autoClose){setTimeout(dojo.hitch(this,"destroyDialog"),this.duration);}if(this._isTracing){this.traceExit(m);}},_onConfirm:function(){var m="_onConfirm()";if(this._isTracing){this.traceEntry(m);}this._deleteTransientSlot();if(!dojo.hasClass(this.dialogConfirm,"lotusBtnDisabled")){var _1fe="";var _1ff="";var url="";var _200=this.getSelectedItemJSON();if(this._isTracing){this.trace(m,"Selected item:",_200);}if(_200!==null){_1ff=_200.title;url=_200.url;if(this._isCalledFromPZN()){var _201=this._widgets[0].getSettings();_1fe=com.ibm.workplace.wcm.ecm.picker.util.URLUtils._INSTANCE.addQueryParameter(url,"feedType",this._normalizeFeedTypeParam(_201.serverType));if((_201.authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeVault)&&(_201.authProperties.vaultSlotID)){_1fe=com.ibm.workplace.wcm.ecm.picker.util.URLUtils._INSTANCE.addQueryParameter(_1fe,com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._proxyVaultSlotParamName,_201.authProperties.vaultSlotID);}}else{_1fe=url;}}if(this._onConfirmCallbackFn&&dojo.isFunction(this._onConfirmCallbackFn)){if(this._isTracing){this.trace(m,"Dispatching to callback function passing title and URL of selection:",[this._onConfirmCallbackFn,_1ff,_1fe]);}this._onConfirmCallbackFn(_1ff,_1fe);}if(this.autoClose){this.hide();setTimeout(dojo.hitch(this,"destroyDialog"),this.duration);}}if(this._isTracing){this.traceExit(m);}},_onDefaultAction:function(){var m="_onDefaultAction()";if(this._isTracing){this.traceEntry(m);}var _202=this._getDefaultButton();if(_202===this.dialogConfirm){this._onConfirm();}else{if(_202===this.dialogNext){this._onGoFwdPrep();}}if(this._isTracing){this.traceExit(m);}},_onErrorStateChanged:function(_203,_204,_205,_206){var m="_onErrorStateChanged(p_sender, p_errorState, p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_203,_204,_205,_206]);}if(_204===true){this._showError(_205,_206);}else{if(_204===false){this._clearError();}else{}}if(this._isTracing){this.traceExit(m);}},_onFocusFirstItem:function(){var m="_onFocusFirstItem()";if(this._isTracing){this.traceEntry(m);}if((this._currentPage>-1)&&(this._currentPage<3)){if(this._widgets[this._currentPage]&&dojo.isFunction(this._widgets[this._currentPage].setFocus)){this._widgets[this._currentPage].setFocus();}}if(this._isTracing){this.traceExit(m);}},_onGoBack:function(_207){var m="_onGoBack()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Current page:",this._currentPage);}dojo.stopEvent(_207);if(!dojo.hasClass(this.dialogPrevious,"lotusBtnDisabled")){if(this._currentPage>0){this.isResized=false;this._widgets[0].setFeedType(null);this._switchToPage(0);}}if(this._isTracing){this.traceExit(m);}return false;},_onGoFwdPrep:function(){var m="_onGoFwdPrep()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Current page:",this._currentPage);}if((!dojo.hasClass(this.dialogNext,"lotusBtnDisabled"))&&(this._currentPage<this._pages.length-1)){var _208=this._widgets[0].getSettings();if(_208.authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd){var _209=_208.authProperties.username;var _20a=_208.authProperties.password;this._getTransientSlot(_209,_20a);}else{this._onGoFwd();}}if(this._isTracing){this.traceExit(m);}},_onGoFwd:function(){var m="_onGoFwd()";if(this._isTracing){this.traceEntry(m);this.trace(m,"Current page:",this._currentPage);}if(!dojo.hasClass(this.dialogNext,"lotusBtnDisabled")){if(this._currentPage<this._pages.length-1){var _20b=this._widgets[0].getSettings();var url=_20b.serverUrl;var _20c=this._serverTypeMap[url];if(_20c){this._widgets[0].setFeedType(_20c);if(this._isQuickrFeedType(_20c)){this._switchToQuickrPage();}else{this.isResized=false;this._switchToPage(1);}}else{var _20d=_20b.serverType;if(_20d===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._qds){this._serverTypeMap[url]=_20d;this._widgets[0].setFeedType(_20d);this._switchToQuickrPage();}else{this._fetchServerType(url);}}}}if(this._isTracing){this.traceExit(m);}},_onReadyStateChanged:function(_20e,_20f){var m="_onReadyStateChanged(p_readyState, p_widgetRef)";if(this._isTracing){this.traceEntry(m,[_20e,_20f]);}this._enableDisableButtons();if(this._isTracing){this.traceExit(m);}},_onSubmit:function(_210){var m="_onSubmit(p_evt)";if(this._isTracing){this.traceEntry(m,[_210]);}dojo.stopEvent(_210);this._onDefaultAction();if(this._isTracing){this.traceExit(m,false);}return false;},_setBackBtnEnabled:function(_211){var m="_setBackBtnEnabled(p_isEnabled)";if(this._isTracing){this.traceEntry(m,[_211]);}this._setBtnEnabled(this.dialogPrevious,_211);if(this._isTracing){this.traceExit(m);}},_setBtnEnabled:function(_212,_213){var m="_setBtnEnabled(p_Btn, p_isEnabled)";if(this._isTracing){this.traceEntry(m,[_212,_213]);}if(_213){dojo.removeClass(_212,"lotusBtnDisabled");dojo.removeAttr(_212,"disabled");dijit.removeWaiState(_212,"disabled");}else{dojo.addClass(_212,"lotusBtnDisabled");dojo.attr(_212,"disabled","disabled");dijit.setWaiState(_212,"disabled",true);}if(this._isTracing){this.traceExit(m);}},_setFinishBtnEnabled:function(_214){var m="_setFinishBtnEnabled(p_isEnabled)";if(this._isTracing){this.traceEntry(m,[_214]);}this._setBtnEnabled(this.dialogConfirm,_214);if(this._isTracing){this.traceExit(m);}},_setNextBtnEnabled:function(_215){var m="_setNextBtnEnabled(p_isEnabled)";if(this._isTracing){this.traceEntry(m,[_215]);}this._setBtnEnabled(this.dialogNext,_215);if(this._isTracing){this.traceExit(m);}},_showDetectingBox:function(){var m="_showDetectingBox()";if(this._isTracing){this.traceEntry(m);}if(dojo.style(this.fedDocPickerDetectingDiv,"display")!="block"){dojo.style(this.fedDocPickerDetectingDiv,"display","block");}dijit.setWaiState(this.fedDocPickerDetectingDiv,"hidden",false);dijit.setWaiState(this.wizardPageContainer,"busy",true);if(this._isTracing){this.traceExit(m);}},_showError:function(_216,_217){var m="_showError(p_errorMsg, p_errorDetails)";if(this._isTracing){this.traceEntry(m,[_216,_217]);}this._hideDetectingBox();this._hideGettingVaultBox();if(typeof _216=="string"){var _218=_216.substring(0,Math.min(this._maxErrorChars,_216.length));dojo.attr(this.wizardErrorSpan,"innerHTML",_218);dojo.style(this.wizardErrorDiv,"opacity","1");dojo.style(this.wizardErrorDiv,"display","block");dijit.setWaiState(this.wizardErrorDiv,"hidden",false);if(typeof _217=="string"){var _219=_217.substring(0,Math.min(this._maxErrorChars,_217.length));dojo.attr(this.wizardErrorDetailsSpan,"innerHTML",_219);dojo.style(this.wizardErrorDetailsDiv,"display","block");dijit.setWaiState(this.wizardErrorDetailsDiv,"hidden",false);}}else{this.trace(m,"_showError was called with an undefined error message.");}this._errorState=true;if((this._currentPage>=0)&&(this._currentPage<=2)){this._widgets[this._currentPage]._errorState=true;}this._enableDisableButtons();this.layout();if(this._isTracing){this.traceExit(m);}},_showErrorForXHRRequest:function(_21a){var m="_showErrorForXHRRequest()";if(this._isTracing){this.traceEntry(m,_21a);}var _21b=com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils._INSTANCE.getErrorMessage(_21a,this._nlsMessages.srvCommunication,(this._widgets[0].getSettings().serverUrl.substring(0,6).toLowerCase()==="https:"));this._showError(_21b[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorMessage],_21b[com.ibm.workplace.wcm.ecm.picker.util.ErrorMsgUtils.ErrorDetails]);if(this._isTracing){this.traceExit(m);}},_showGettingVaultBox:function(){var m="_showGettingVaultBox()";if(this._isTracing){this.traceEntry(m);}if(dojo.style(this.fedDocPickerGettingVaultDiv,"display")!="block"){dojo.style(this.fedDocPickerGettingVaultDiv,"display","block");}dijit.setWaiState(this.fedDocPickerGettingVaultDiv,"hidden",false);dijit.setWaiState(this.wizardPageContainer,"busy",true);if(this._isTracing){this.traceExit(m);}},_switchToPage:function(_21c,_21d){var m="_switchToPage(p_pageIndex)";if(this._isTracing){this.traceEntry(m,[_21c]);this.trace(m,"Current page:",this._currentPage);}if((_21c>-1)&&(_21c<this._pages.length)){this._clearError();this._hideDetectingBox();this._hideGettingVaultBox();this._currentPage=_21c;var _21e=this._widgets[this._currentPage];this._updateStepLabel(_21e.getStepLabel());this._updateStepDescription(_21e.getStepDescription());this.wizardPageContainer.selectChild(this._pages[this._currentPage]);if(this._currentPage>0){var _21f=this._widgets[0].getSettings();if((_21f.authProperties.authType==com.ibm.workplace.wcm.ecm.picker.widget.AuthenticationWidget._authTypeUserPwd)&&(this._transientSlotId)){_21f.authProperties.vaultSlotID=this._transientSlotId;}this._widgets[this._currentPage].initializePage(_21f);}else{}this._enableDisableButtons();this.layout();}if(this._isTracing){this.traceExit(m);}},_switchToQuickrPage:function(){var m="_switchToQuickrPage()";if(this._isTracing){this.traceEntry(m);}if(this._qdsSupportEnabled){this.isResized=false;this._switchToPage(2);}else{this._showError(this._nlsMessages.docPickerDialog.errorQDSNotEnabled,"");}if(this._isTracing){this.traceExit(m);}},_updateStepDescription:function(_220){var m="_updateStepDescription(p_descrText)";if(this._isTracing){this.traceEntry(m,_220);}dojo.attr(this.wizardStepDescription,"innerHTML",_220);if(this._isTracing){this.traceExit(m);}},_updateStepLabel:function(_221){var m="_updateStepLabel(p_labelText)";if(this._isTracing){this.traceEntry(m,_221);}dojo.attr(this.wizardStepLabel,"innerHTML","<b>"+_221+"</b>");if(this._isTracing){this.traceExit(m);}}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.quickr.picker.launcher.DocPickerLauncher"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.quickr.picker.launcher.DocPickerLauncher"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.quickr.picker.launcher.DocPickerLauncher");dojo.declare("com.ibm.workplace.wcm.ecm.quickr.picker.launcher.DocPickerLauncher",null,{_onConfirmCallbackFn:null,_onCloseCallbackFn:null,_dialogTitleKey:"dialogTitleDefault",_locale:null,_showPlaces:false,_showNodePath:true,_nodeTypes:[],_downloadTypes:[],_viewTypes:[],_forceSSO:false,_isMovable:true,_allowCustomServers:true,_allowedHosts:[],_cookieName:"QuickrPickerRecentHosts",_lastHostCookie:"qkrMRHU",_proxyUrl:"/wps/proxy",_pageSize:10,_timeout:15000,_linkType:null,_currentItem:null,_nodeType2Selector:{place:"new quickr.picker.data.filter.PlaceSelector()",library:"new quickr.picker.data.filter.LibrarySelector()",folder:"new quickr.picker.data.filter.FolderSelector()",doclink:"new quickr.picker.data.filter.DocLinkSelector()",document:"new quickr.picker.data.filter.DocumentSelector()"},_nlsStrings:null,_onCloseHdl:null,_onShowHdl:null,_pickerDialog:null,_feedUrl:"",constructor:function(_222,_223,_224){if(typeof _222=="function"){this._onConfirmCallbackFn=_222;}if(typeof _223=="function"){this._onCloseCallbackFn=_223;}this._evalArgs(_224);this._loadPrereqs();},launchDocumentPicker:function(_225){var _226;this._feedUrl=_225;inst=this;if(this._downloadTypes.length>0&&this._viewTypes.length>0){this._linkType="any";var _227={displayText:this._nlsStrings.menuItemViewLink,onClick:function(_228){inst._confirmSelection(_228,"view");},onItemSelected:function(_229,_22a,_22b){inst._onItemSelected(_229,_22a,_22b);}};var _22c={displayText:this._nlsStrings.menuItemDownloadLink,onClick:function(_22d){inst._confirmSelection(_22d,"download");},onItemSelected:function(_22e,_22f,_230){inst._onItemSelected(_22e,_22f,_230);}};_226={displayType:"menubutton",displayText:this._nlsStrings.menuInsertLink,menuItems:[_227,_22c]};}else{if(this._downloadTypes.length>0){this._linkType="download";}else{if(this._viewTypes.length>0){this._linkType="view";}}if(this._linkType){_226={displayType:"button",displayText:this._nlsStrings.buttonOk,onClick:function(_231){inst._confirmSelection(_231,inst._linkType);},onItemSelected:function(_232,_233,_234){inst._onItemSelected(_232,_233,_234);}};}}var _235=quickr.picker.widgets.PickerDialog.getCancelAction();var _236;if(typeof _226!="undefined"){_236=[_226,_235];}else{_236=[_235];}var _237={filterAttribute:"category"};if(this._nodeTypes.length===0){_237.place=[new quickr.picker.data.filter.PlaceSelector()];_237.library=[new quickr.picker.data.filter.LibrarySelector()];_237.folder=[new quickr.picker.data.filter.FolderSelector()];_237.doclink=[new quickr.picker.data.filter.DocLinkSelector()];_237.document=[new quickr.picker.data.filter.DocumentSelector()];}else{for(i=0;i<this._nodeTypes.length;i++){var _238=this._nodeTypes[i];var _239=this._nodeType2Selector[_238];if(typeof _239=="string"){_237[_238]=eval("["+_239+"]");}}}var args={title:this._nlsStrings[this._dialogTitleKey],pickerfilters:_237,isBrowseLocalOnly:false,showSummary:this._showNodePath,showPlaces:this._showPlaces,isMovable:this._isMovable,actions:_236,forceSSO:this._forceSSO,allowCustomServers:this._allowCustomServers,allowedHosts:this._allowedHosts,cookieName:this._cookieName,lastHostCookie:this._lastHostCookie,proxyUrl:this._proxyUrl,pageSize:this._pageSize,timeout:this._timeout,useInternalProxy:false,fillLastHost:false,portalContext:true};this._pickerDialog=new quickr.picker.widgets.PickerDialog(args);this._onCloseHdl=dojo.connect(this._pickerDialog,"hide",this,"_onClose");this._onShowHdl=dojo.connect(this._pickerDialog,"onShow",this,"_injectUrl");this._pickerDialog.show();},_onClose:function(){if(this._onCloseHdl){dojo.disconnect(this._onCloseHdl);}this._onCloseHdl=null;if(this._onShowHdl){dojo.disconnect(this._onShowHdl);}this._onShowHdl=null;this._currentItem=null;if(this._onCloseCallbackFn){this._onCloseCallbackFn();}},_confirmSelection:function(_23a,_23b){if(this._currentItem){var url;if(_23b=="view"){url=this._currentItem.viewUrl;}else{url=this._currentItem.downloadUrl;}if(this._onConfirmCallbackFn){this._onConfirmCallbackFn(this._currentItem.title,url,_23b);}}_23a.hide();_23a.destroy();},_injectUrl:function(){if(this._pickerDialog&&this._feedUrl&&dojo.isString(this._feedUrl)){if(this._pickerDialog.picker){if(this._pickerDialog.picker.recentHosts&&dojo.isFunction(this._pickerDialog.picker.recentHosts.attr)){this._pickerDialog.picker.recentHosts.attr("value",this._feedUrl);}}}},_onItemSelected:function(_23c,_23d,_23e){var item=_23e.getCurrentItem();var _23f=_23e.store.getLabel(item);var path=_23e.store.getPath(item);var _240=_23e.store.getValue(item,"category");var _241=_23e.store.getValue(item,"downloadurl");var _242=_23e.store.getValue(item,"viewurl");this._currentItem={title:_23f,path:path,category:_240[0],downloadUrl:_241,viewUrl:_242};var _243=true;if(this._linkType=="view"||(this._linkType=="any"&&_23c.label==this._nlsStrings.menuItemViewLink)){_243=this._containsString(this._viewTypes,_240[0]);}else{if(this._linkType=="download"||(this._linkType=="any"&&_23c.label==this._nlsStrings.menuItemDownloadLink)){_243=this._containsString(this._downloadTypes,_240[0]);}}_23c.setDisabled(!_243);},_evalArgs:function(_244){if(typeof _244!="undefined"&&_244){if(typeof _244.dialogTitleKey=="string"){this._dialogTitleKey=_244.dialogTitleKey;}if(typeof _244.locale=="string"){this._locale=_244.locale;}else{this._locale=dojo.config.locale;}if(typeof _244.showPlaces=="boolean"){this._showPlaces=_244.showPlaces;}if(typeof _244.showNodePath=="boolean"){this._showNodePath=_244.showNodePath;}if(typeof _244.nodeTypes=="object"&&_244.nodeTypes){this._nodeTypes=_244.nodeTypes;}if(typeof _244.downloadTypes=="object"&&_244.downloadTypes){this._downloadTypes=_244.downloadTypes;}if(typeof _244.viewTypes=="object"&&_244.viewTypes){this._viewTypes=_244.viewTypes;}if(typeof _244.forceSSO=="boolean"){this._forceSSO=_244.forceSSO;}if(typeof _244.isMovable=="boolean"){this._isMovable=_244.isMovable;}if(typeof _244.allowCustomServers=="boolean"){this._allowCustomServers=_244.allowCustomServers;}if(typeof _244.allowedHosts=="object"&&_244.allowedHosts){this._allowedHosts=_244.allowedHosts;}if(typeof _244.cookieName=="string"){this._cookieName=_244.cookieName;}if(typeof _244.proxyUrl=="string"){this._proxyUrl=_244.proxyUrl;}if(typeof _244.lastHostCookie=="string"){this._lastHostCookie=_244.lastHostCookie;}if(typeof _244.pageSize=="integer"){this._pageSize=_244.pageSize;}if(typeof _244.timeout=="integer"){this._timeout=_244.timeout;}}},_loadPrereqs:function(){dojo.require("dojo.i18n");this._nlsStrings=dojo.i18n.getLocalization("com.ibm.workplace.wcm.ecm.quickr.picker.launcher","DocPickerLauncher");},_containsString:function(_245,_246){if((typeof _245=="object")&&(_245!==null)&&(typeof _246=="string")){for(i=0;i<_245.length;i++){if(_245[i]==_246){return true;}}}return false;}});}if(!dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsPickerManager"]){dojo._hasResource["com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsPickerManager"]=true;dojo.provide("com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsPickerManager");dojo.require("com.ibm.widgets._Traceable");dojo.declare("com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsPickerManager",[com.ibm.widgets._Traceable],{_callingEnvId:com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm,_dsPickerArgs:{},_fedDocsPickerArgs:{},_federatedDocumentsServiceBean:null,_isTracing:false,_namespace:"fedDocsPckrDlg_",_onCancelCallbackFn:null,_onConfirmCallbackFn:null,constructor:function(_247){this._isTracing=this.isTracing();var m="constructor(p_params)";if(this._isTracing){this.traceEntry(m,_247);if(_247){this.trace(m,"p_params.callingEnvId:",_247.callingEnvId);this.trace(m,"p_params.documentServicesPickerArgs:",_247.documentServicesPickerArgs);this.trace(m,"p_params.federatedDocumentsPickerArgs:",_247.federatedDocumentsPickerArgs);this.trace(m,"p_params.federatedDocumentsServiceBean:",_247.federatedDocumentsServiceBean);this.trace(m,"p_params.namespace:",_247.namespace);this.trace(m,"p_params.onCancelCallbackFn:",_247.onCancelCallbackFn);this.trace(m,"p_params.onConfirmCallbackFn:",_247.onConfirmCallbackFn);}}if(typeof _247.callingEnvId=="string"){this._callingEnvId=_247.callingEnvId;}if(_247.federatedDocumentsServiceBean&&typeof _247.federatedDocumentsServiceBean=="object"){this._federatedDocumentsServiceBean=_247.federatedDocumentsServiceBean;}if(typeof _247.namespace=="string"){this._namespace=_247.namespace;}if(typeof _247.onCancelCallbackFn=="function"){this._onCancelCallbackFn=_247.onCancelCallbackFn;}if(typeof _247.onConfirmCallbackFn=="function"){this._onConfirmCallbackFn=_247.onConfirmCallbackFn;}if(this._federatedDocumentsServiceBean.isQDSSupportEnabled()){this._initFederatedDocumentsPickerArgs(_247.federatedDocumentsPickerArgs);this._initDocumentServicesPickerArgs(_247.documentServicesPickerArgs);}else{this._initFederatedDocumentsPickerArgs(_247.federatedDocumentsPickerArgs);}if(this._isTracing){this.traceExit(m);}},launchDocumentServicesPickerDialog:function(_248,_249,_24a){var m="launchDocumentServicesPickerDialog(p_url, p_onConfirmCallbackFn, p_onCloseCallbackFn)";if(this._isTracing){this.traceEntry(m,[_248,_249,_24a]);}var _24b=null;var _24c=null;if(typeof _249=="function"){_24b=_249;}if(typeof _24a=="function"){_24c=_24a;}if(this._isTracing){this.trace(m,"Confirm callback function: ",_24b);this.trace(m,"Close callback function: ",_24c);}var _24d=new com.ibm.workplace.wcm.ecm.quickr.picker.launcher.DocPickerLauncher(_24b,_24c,this._dsPickerArgs);_24d.launchDocumentPicker(_248);if(this._isTracing){this.traceExit(m);}},launchFederatedDocumentsPickerDialog:function(){var m="launchFederatedDocumentsPickerDialog()";if(this._isTracing){this.traceEntry(m);}var _24e=new com.ibm.workplace.wcm.ecm.picker.dialog.FederatedDocumentsPickerDialog(this._fedDocsPickerArgs);_24e.show();if(this._isTracing){this.traceExit(m);}},_initDocumentServicesPickerArgs:function(_24f){var m="_initDocumentServicesPickerArgs(p_dsPickerArgs)";if(this._isTracing){this.traceEntry(m,_24f);if(_24f){this.trace(m,"p_dsPickerArgs.dialogTitleKey",_24f.dialogTitleKey);this.trace(m,"p_dsPickerArgs.showNodePath",_24f.showNodePath);this.trace(m,"p_dsPickerArgs.showPlaces",_24f.showPlaces);this.trace(m,"p_dsPickerArgs.nodeTypes",dojo.toJson(_24f.nodeTypes));this.trace(m,"p_dsPickerArgs.downloadTypes",dojo.toJson(_24f.downloadTypes));this.trace(m,"p_dsPickerArgs.viewTypes",dojo.toJson(_24f.viewTypes));this.trace(m,"p_dsPickerArgs.proxyUrl",_24f.proxyUrl);}}var _250=this._federatedDocumentsServiceBean.getPortalContextPath()+"/proxy";if(this._callingEnvId===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._pzn){this._dsPickerArgs={"dialogTitleKey":"dialogTitleSelectFolder","showNodePath":true,"showPlaces":true,"nodeTypes":["place","library","folder"],"downloadTypes":["library","folder"],"viewTypes":[],"proxyUrl":_250};}else{if(this._callingEnvId===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm){this._dsPickerArgs={"dialogTitleKey":"dialogTitleSelectDocument","showNodePath":true,"showPlaces":true,"nodeTypes":["place","library","folder","document","doclink"],"downloadTypes":["document"],"viewTypes":["library","folder","document","doclink"],"proxyUrl":_250};}}if(_24f&&typeof _24f=="object"){this._mergeArguments(_24f,this._dsPickerArgs);}if(this._isTracing){this.trace(m,"Document services picker arguments initialized:",this._dsPickerArgs);if(this._dsPickerArgs){this.trace(m,"_dsPickerArgs.dialogTitleKey",this._dsPickerArgs.dialogTitleKey);this.trace(m,"_dsPickerArgs.showNodePath",this._dsPickerArgs.showNodePath);this.trace(m,"_dsPickerArgs.showPlaces",this._dsPickerArgs.showPlaces);this.trace(m,"_dsPickerArgs.nodeTypes",dojo.toJson(this._dsPickerArgs.nodeTypes));this.trace(m,"_dsPickerArgs.downloadTypes",dojo.toJson(this._dsPickerArgs.downloadTypes));this.trace(m,"_dsPickerArgs.viewTypes",dojo.toJson(this._dsPickerArgs.viewTypes));this.trace(m,"_dsPickerArgs.proxyUrl",this._dsPickerArgs.proxyUrl);}this.traceExit(m);}},_initFederatedDocumentsPickerArgs:function(_251){var m="_initFederatedDocumentsPickerArgs(p_fedDocsPickerArgs)";if(this._isTracing){this.traceEntry(m,_251);if(_251){this.trace(m,"p_fedDocsPickerArgs.callingEnvironment",_251.callingEnvironment);this.trace(m,"p_fedDocsPickerArgs.customServiceSelectionEnabled",_251.customServiceSelectionEnabled);this.trace(m,"p_fedDocsPickerArgs.documentsServices",_251.documentsServices);this.trace(m,"p_fedDocsPickerArgs.feedBaseURL",_251.feedBaseURL);this.trace(m,"p_fedDocsPickerArgs.feedTypeBaseURL",_251.feedTypeBaseURL);this.trace(m,"p_fedDocsPickerArgs.nodeTypes",dojo.toJson(_251.nodeTypes));this.trace(m,"p_fedDocsPickerArgs.onCancelCallbackFn",_251.onCancelCallbackFn);this.trace(m,"p_fedDocsPickerArgs.onConfirmCallbackFn",_251.onConfirmCallbackFn);this.trace(m,"p_fedDocsPickerArgs.pickerManager",_251.pickerManager);this.trace(m,"p_fedDocsPickerArgs.qdsSupportEnabled",_251.qdsSupportEnabled);this.trace(m,"p_fedDocsPickerArgs.serviceDocBaseURL",_251.serviceDocBaseURL);this.trace(m,"p_fedDocsPickerArgs.vaultMgmtDataSinkUrl",_251.vaultMgmtDataSinkUrl);this.trace(m,"p_fedDocsPickerArgs.vaultSelectionEnabled",_251.vaultSelectionEnabled);this.trace(m,"p_fedDocsPickerArgs.vaultSelectionEnabledForPZN",_251.vaultSelectionEnabledForPZN);this.trace(m,"p_fedDocsPickerArgs.vaultSelectionEnabledForWCM",_251.vaultSelectionEnabledForWCM);this.trace(m,"p_fedDocsPickerArgs.vaultSlots",_251.vaultSlots);this.trace(m,"p_fedDocsPickerArgs.portalContextPath",_251.portalContextPath);}}var _252=this._federatedDocumentsServiceBean.isCustomServiceSelectionEnabled();var _253=this._federatedDocumentsServiceBean.getFederatedDocumentsServices();var _254=this._federatedDocumentsServiceBean.getFeedBaseURL();var _255=this._federatedDocumentsServiceBean.getFeedTypeBaseURL();var _256=this._federatedDocumentsServiceBean.isQDSSupportEnabled();var _257=this._federatedDocumentsServiceBean.isVaultSelectionEnabledForPZN();var _258=this._federatedDocumentsServiceBean.isVaultSelectionEnabledForWCM();var _259=this._federatedDocumentsServiceBean.getServiceDocumentBaseURL();var _25a=this._federatedDocumentsServiceBean.getVaultMgmtDataSinkUrl();var _25b=this._federatedDocumentsServiceBean.getVaultSlots();var _25c=this._federatedDocumentsServiceBean.getPortalContextPath();if(this._callingEnvId===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._pzn){this._fedDocsPickerArgs={"callingEnvironment":this._callingEnvId,"customServiceSelectionEnabled":_252,"documentsServices":_253,"feedBaseURL":_254,"feedTypeBaseURL":_255,"namespace":this._namespace,"nodeTypes":["repository","folder"],"onCancelCallbackFn":this._onCancelCallbackFn,"onConfirmCallbackFn":this._onConfirmCallbackFn,"pickerManager":this,"qdsSupportEnabled":_256,"serviceDocBaseURL":_259,"vaultMgmtDataSinkUrl":_25a,"vaultSelectionEnabled":_257,"vaultSelectionEnabledForPZN":_257,"vaultSelectionEnabledForWCM":_258,"vaultSlots":_25b,"portalContextPath":_25c};}else{if(this._callingEnvId===com.ibm.workplace.wcm.ecm.picker.util.FederatedDocumentsDefinitions._wcm){this._fedDocsPickerArgs={"callingEnvironment":this._callingEnvId,"customServiceSelectionEnabled":_252,"documentsServices":_253,"feedBaseURL":_254,"feedTypeBaseURL":_255,"namespace":this._namespace,"nodeTypes":["repository","folder","document"],"onCancelCallbackFn":this._onCancelCallbackFn,"onConfirmCallbackFn":this._onConfirmCallbackFn,"pickerManager":this,"qdsSupportEnabled":_256,"serviceDocBaseURL":_259,"vaultMgmtDataSinkUrl":_25a,"vaultSelectionEnabled":_258,"vaultSelectionEnabledForPZN":_257,"vaultSelectionEnabledForWCM":_258,"vaultSlots":_25b,"portalContextPath":_25c};}}if(_251&&typeof _251=="object"){this._mergeArguments(_251,this._fedDocsPickerArgs);}if(this._isTracing){this.trace(m,"Federated documents picker arguments initialized:",this._fedDocsPickerArgs);if(this._fedDocsPickerArgs){this.trace(m,"this._fedDocsPickerArgs.callingEnvironment",this._fedDocsPickerArgs.callingEnvironment);this.trace(m,"this._fedDocsPickerArgs.customServiceSelectionEnabled",this._fedDocsPickerArgs.customServiceSelectionEnabled);this.trace(m,"this._fedDocsPickerArgs.documentsServices",this._fedDocsPickerArgs.documentsServices);this.trace(m,"this._fedDocsPickerArgs.feedBaseURL",this._fedDocsPickerArgs.feedBaseURL);this.trace(m,"this._fedDocsPickerArgs.feedTypeBaseURL",this._fedDocsPickerArgs.feedTypeBaseURL);this.trace(m,"this._fedDocsPickerArgs.namespace",this._fedDocsPickerArgs.namespace);this.trace(m,"this._fedDocsPickerArgs.nodeTypes",dojo.toJson(this._fedDocsPickerArgs.nodeTypes));this.trace(m,"this._fedDocsPickerArgs.onCancelCallbackFn",this._fedDocsPickerArgs.onCancelCallbackFn);this.trace(m,"this._fedDocsPickerArgs.onConfirmCallbackFn",this._fedDocsPickerArgs.onConfirmCallbackFn);this.trace(m,"this._fedDocsPickerArgs.pickerManager",this._fedDocsPickerArgs.pickerManager);this.trace(m,"this._fedDocsPickerArgs.qdsSupportEnabled",this._fedDocsPickerArgs.qdsSupportEnabled);this.trace(m,"this._fedDocsPickerArgs.serviceDocBaseURL",this._fedDocsPickerArgs.serviceDocBaseURL);this.trace(m,"this._fedDocsPickerArgs.vaultMgmtDataSinkUrl",this._fedDocsPickerArgs.vaultMgmtDataSinkUrl);this.trace(m,"this._fedDocsPickerArgs.vaultSelectionEnabled",this._fedDocsPickerArgs.vaultSelectionEnabled);this.trace(m,"this._fedDocsPickerArgs.vaultSelectionEnabledForPZN",this._fedDocsPickerArgs.vaultSelectionEnabledForPZN);this.trace(m,"this._fedDocsPickerArgs.vaultSelectionEnabledForWCM",this._fedDocsPickerArgs.vaultSelectionEnabledForWCM);this.trace(m,"this._fedDocsPickerArgs.vaultSlots",this._fedDocsPickerArgs.vaultSlots);this.trace(m,"this._fedDocsPickerArgs.portalContextPath",this._fedDocsPickerArgs.portalContextPath);}this.traceExit(m);}},_mergeArguments:function(_25d,_25e){var m="_mergeArguments(p_sourceArgs, p_targetArgs)";if(this._isTracing){this.traceEntry(m,[_25d,_25e]);}for(var _25f in _25d){_25e[_25f]=_25d[_25f];}if(this._isTracing){this.trace(m,"New set of target arguments:",_25e);this.traceExit(m);}}});} com.ibm.pb.io.RESOURCE_CACHE.set("/sabc/themeModules/modules/pagebuilder/xml/TemplateSelectDialog.xml", "<iw:iwidget name=\"com.ibm.mm.builder.systemwidget.TemplateSelectDialog\" xmlns:iw=\"http://www.ibm.com/xmlns/prod/iWidget\" iScope=\"com.ibm.mm.builder.systemwidget.TemplateSelectDialog\" allowInstanceContent=\"true\" supportedModes=\"view\" mode=\"view\" lang=\"en\">\n <iw:resource uri=\"TemplateSelectDialog.js\" skipLoad=\"dojo.getObject(\u0027com.ibm.mm.builder.systemwidget.TemplateSelectDialog\u0027) != null\" />\n <iw:itemSet id=\"attributes\">\n <iw:item id=\"version\" value=\"2.4\"/>\n </iw:itemSet>\n\t\n\t<iw:event id=\"com.ibm.mashups.builder.templateSelect\" handled=\"true\" onEvent=\"onTemplateSelect\" eventDescName=\"desc_onTemplateSelect\"/>\n\t<iw:eventDescription id=\"desc_onTemplateSelect\" payloadType=\"text\" description=\"Launches this dialog widget\" lang=\"en\"></iw:eventDescription>\n\t\n <iw:content mode=\"view\"><![CDATA[<div id=\"_IWID_contents_template\"></div>]]></iw:content>\n</iw:iwidget>\n"); com.ibm.pb.io.RESOURCE_CACHE.set("/sabc/themeModules/modules/pagebuilder/xml/universalToolbar.xml", "<iw:iwidget name=\"com.ibm.mm.builder.universalToolbar\" xmlns:iw=\"http://www.ibm.com/xmlns/prod/iWidget\" iScope=\"com.ibm.mm.builder.systemwidget.universalToolbar\" allowInstanceContent=\"true\" supportedModes=\"view\" mode=\"view\" lang=\"en\">\n <iw:resource uri=\"universalToolbar.js\" skipLoad=\"dojo.getObject(\u0027com.ibm.mm.builder.systemwidget.universalToolbar\u0027) != null\" />\n <iw:itemSet id=\"attributes\">\n <iw:item id=\"version\" value=\"1.0.0.0.0\"/>\n </iw:itemSet>\n\t\n\t<iw:event id=\"com.ibm.mashups.builder.savePage\" handled=\"true\" onEvent=\"onSavePage\" eventDescName=\"desc_onSavePage\"/>\n\t<iw:eventDescription id=\"desc_onSavePage\" payloadType=\"text\" description=\"save changes on shelf\" lang=\"en\">\n\t</iw:eventDescription>\n\t\n <iw:content mode=\"view\"></iw:content>\n</iw:iwidget>\n"); dojo.provide("pagebuilder.nls.toolbar_en");dojo.provide("com.ibm.bundles.nls.Theme");com.ibm.bundles.nls.Theme._built=true;dojo.provide("com.ibm.bundles.nls.Theme.en");com.ibm.bundles.nls.Theme.en={"theme_choose_skin":"Choose Skin","page_goTo_csa":"Switch to Client-Side Mode","theme_hiddenContentDesc":"Place content into the area below to prevent it from displaying when the page is viewed.","space_description":"Space","edit_wires_title":"Edit Wires","page_force_ssa_link":"Use server side mode.","exportSpace_title":"Export Space","layout_renderingError":"An error occurred rendering the assigned layout.","tagAndRate_description":"Tagging and Rating","site_promotion_title":"Site Promotions...","rate_title":"Rate...","theme_edit_wiring":"Edit Wiring...","theme_maximize":"Maximize","close_analytics_title":"Close Analytics Reports","theme_go_to_edit":"Go to Edit mode","dnd_not_instantiated":"Drag and drop could not be instantiated","theme_config_control":"Configure...","skin_show_titlebar":"Show title bar","catalog_title":"Catalog","theme_wire_widget":"Wire Widget","dnd_disabled":"Drag and drop is disabled","createFeed_title":"Create New Feed...","statusbar_messages_available":"${0} messages are available for review","page_title":"Page","move_left":"Move Left","layout_error_contactAdmin":"If the problem persists, contact your administrator.","page_analytics_reports_description":"Analytics Reports for Pages","embedPage_description":"Display on a Web Page","browseTags_description":"Browse Tags","close_analytics_description":"Close Analytics Reports","theme_actions_menu":"Actions Button","theme_close_shelf_help":"Button will close customize shelf","createSpace_title":"Create a New Space","editPageLayout_description":"Edit Page Layout","theme_sign_up":"Sign Up","page_goTo_ssa":"Switch to Server-Side Mode","theme_restore":"Restore","statusbar_items_available":"${0} items are available for review","other_description":"Other","theme_move":"Move...","layout_missingError":"The assigned layout does not exist.","statusbar_show_details":"Show Details","analytics_description":"Analytics","a11y_skip_portlet":"Skip to next portlet","dnd_copy_failed":"An error occurred copying the resource.","layout_resizer":"Layout Resizer","theme_move_page":"Move Page","dnd_locked_container":"Cannot move a resource to a locked container.","advanced_description":"Advanced","shareSpace_title":"Share Space","statusbar_warning":"Warning","context_portlet_menu_renderingError":"An error occurred rendering the portlet menu.","editPage_description":"Edit Page","exportSpace_description":"Export Space","removePage_title":"Remove Page","theme_remove_page":"Are you sure you want to remove this page and all of its children?","move_down":"Move Down","viewSource_title":"View Source","create_child_page_link":"Click here to create a child page.","layout_error_explanation":"This could be a result of an error during the page creation process, manual changes made to the page layout, or the actions of an Administrator.","theme_global_page_closing_non_active":"You are trying to close a global page that is not currently open.","theme_hide_portlet":"Hide Portlet","publishPage_description":"Publish Page","sharePage_title":"Share Page...","theme_more_pages":"More Pages","theme_display_shelf_help":"Button will display customize shelf below","theme_refresh_page":"Refresh Page","io_insufficient_permissionsError":"There are insufficient permissions to perform the requested operation.","editPageLayout_title":"Edit Page Layout","a11y_skip_widget":"Skip to next widget","move_up":"Move Up","theme_add_pages_shared":"Add Pages Shared with Me","theme_help":"Help","deleteSpace_title":"Delete Space","theme_complementary_content":"Complementary Content","theme_login":"Log In","theme_global_page_active":"The global page is currently active. Close the global page before continuing.","theme_hiddenControl":"hidden","removeFromFav_title":"Remove form Favorites","page_description":"Page","theme_additional_actions":"Additional Actions","theme_refresh_description":"Refresh the page to show the most recent information.","page_save_operation_not_complete":"A save operation to the server has not yet completed.","theme_remove_page_name":"Are you sure you want to remove the page ${0} and all of its children?","space_title":"Space","removeSharedPages_title":"Remove Page","statusbar_multiple":"Multiple Messages","sharing_description":"Share","statusbar_hide_details":"Hide Details","tagAndRate_title":"Tagging and Rating","deleteSpace_description":"Delete Space","sharing_title":"Share","page_initError":"An error occurred initializing the page.","theme_menu":"Menu","assignPagePermissions_description":"Assign Page Permissions","statusbar_clear":"Clear","theme_more_actions":"More Actions","newSiblingPage_title":"New Sibling Page...","widgetBuilder_title":"Create a New Widget...","currently_selected":"currently selected","theme_edit_settings_portal":"Edit Shared Settings...","createFeed_description":"Create New Feed","assignPagePermissions_title":"Assign Page Permissions","statusbar_error":"Error","site_promotion_description":"Add this Page to a Site Promotion","createSpace_description":"Create a New Space","theme_global_page_cannot_close":"The global page cannot be closed.","browseTags_title":"Browse Tags","ally_display_actions_menu":"Display actions menu","theme_delete":"Delete","theme_confirm_leave_edit":"Your changes have not been saved. Are you sure you want to leave Edit mode?","dnd_move_failed":"An error occurred moving the resource.","deletePage_title":"Delete Page","theme_share":"Share","movePage_description":"Move Page","aria_edit_mode":"Going to Edit mode. Options will be displayed below in the toolbar.","theme_logout":"Log Out","theme_customize":"Customize","generic_tag_description":"Add this Page to an Analytics Tag","deletePage_description":"Delete Page","openCatalog_title":"Open Catalog as a New Page","theme_edit_my_profile":"Edit My Profile","newSiblingPage_description":"New Sibling Page","edit_wires_description":"Add, modify, or remove wires.","theme_go_to_view":"Go to View mode","private_public_modelError":"Cannot place a public resource under a private resource.","statusbar_info":"Information","theme_edit_settings":"Edit Settings...","theme_view_wiring":"View Wiring Graph","a11y_focus_titlebar":"Focus will be moved to the title bar.","shareSpace_description":"Share Space","aria_view_mode":"Going to view mode.","openCatalogInDlg_description":"Open Catalog in a Dialog Box","setAsHomeSpace_title":"Set As Home Space","theme_global_page_already_opened":"The global page is already opened.","theme_accountSetting":"Settings","widgetBuilder_description":"Create a New Widget","edit_description":"Edit","theme_delete_page":"Are you sure you want to delete this page and all of its children?","theme_actions":"Actions","layout_error_mismatch":"The assigned layout does not match the actual page layout.","removePage_description":"Remove Page","theme_share_this_page":"Share this Page","a11y_skip_region":"Skip to next region","theme_viewWireGraph":"View Wiring Graph","context_page_menu_renderingError":"An error occurred rendering the page menu.","skin_hide_titlebar":"Hide title bar","theme_delete_page_name":"Are you sure you want to delete the page ${0} and all of its children?","editSpace_description":"Edit Space Settings","createDataMashup_title":"Create Data Mashup...","openCatalog_description":"Open Catalog as a New Page","addSharedPages_description":"Add Shared Pages","removeSharedPages_description":"Remove Page","theme_impersonation":"Impersonate","theme_hide":"Hide","advanced_title":"Advanced","portlet_analytics_reports":"Portlet Reports","embedPage_title":"Display on a Web Page...","other_title":"Other","layout_error_symptoms":"Until this problem is fixed, attempts to customize this page by adding content or changing the layout may not work properly.","theme_hide_widget":"Hide Widget","editPage_title":"Edit Page","a11y_layout_resized_pixels":"The left container is set to ${0} pixels and the right container is set to ${1} pixels.","io_serverError":"Internal server error.","theme_minimize":"Minimize","no_content_node":"This page does not support content.","theme_display":"Display","sharePage_description":"Share Page","page_analytics_reports":"Page Reports","statusbar_status_error":"A runtime error occurred","theme_menu_cannot_render":"Menu cannot be rendered.","createDataMashup_description":"Create Data Mashup","layout_error_heading":"Error with the Page Layout","layout_error_tryRecreate":"Try deleting the page and creating it again.","generic_tag_title":"Analytics Tags...","portlet_analytics_reports_description":"Analytics Reports for Portlets","tag_title":"Tag...","theme_rename":"Rename...","a11y_display_menu":"Display menu","theme_personalize_control":"Personalize...","catalog_description":"Catalog","io_missingResource":"The requested resource does not exist.","openCatalogInDlg_title":"Open Catalog in a Dialog Box","move_right":"Move Right","theme_websphere_portal":"IBM WebSphere Portal","publishPage_title":"Publish Page...","tag_description":"Tag","theme_back":"Back","theme_resize":"Resize...","a11y_show_focus_titlebar":"Show title bar. Focus will be moved to the title bar.","page_force_ssa_msg":"This page contains one or more portlets that do not support client-side mode.","theme_share_page":"Share Page","theme_refresh":"Refresh","rate_description":"Rate","editPageProperties_title":"Edit Page Properties...","theme_global_page_not_opened":"The global page is not open.","editPageProperties_description":"Edit Page Properties","statusbar_print":"Print","newChildPage_title":"New Child Page...","setAsHomeSpace_description":"Set As Home Space","a11y_layout_resized":"The left container is set to ${0} and the right container is set to ${1}.","io_networkError":"An error occurred communicating with the server.","addSharedPages_title":"Add Shared Pages...","viewSource_description":"View Source","analytics_title":"Analytics","editSpace_title":"Edit Space","a11y_skip_content":" link using access key S.","duplicateSpace_description":"Duplicate Space","newChildPage_description":"New Child Page","duplicateSpace_title":"Duplicate Space","a11y_layout_resizer":"Use the arrow keys to resize the layout containers","a11y_display_user_menu":"Display user menu","removeFromFav_description":"Remove form Favorites","theme_edit_control":"Edit","movePage_title":"Move Page...","edit_title":"Edit"};dojo.provide("com.ibm.bundles.nls.Shelf");com.ibm.bundles.nls.Shelf._built=true;dojo.provide("com.ibm.bundles.nls.Shelf.en");com.ibm.bundles.nls.Shelf.en={"mashups_hub_gadgets_label":"Gadgets","change_style_light":"Light","change_layout_restoreLayout":"Restore previous layout","add_content_data_viewer":"Data Viewer","add_content_legacyError2":"Content cannot be added to pages with legacy layouts. Assign a layout template before continuing.","menu_unselected_text":"press enter to browse this category","utb_style":"Style","shelf_session_timeout":"Your session has timed out. Log in to continue.","change_layout_label":"Layouts","add_content_cancel":"Cancel","utb_projectmenu_manageprojectdesc":"Manage the selected project","change_style_light_blue":"Light Blue","utb_live_edit":"Live Edit Mode","change_style_greyStyle":"Grey Stripes","utb_save_errors":"There were errors saving the page","change_style_lightGreyStyle":"Light Grey","change_layout_2RowDesc":"This layout has two rows stacking the portlets in a grid.","utb_projectmenu_nofavoriteprojects":"No favorite projects available","utb_overview_more_mappings":"[${0} more]","change_layout_col3CenterDesc":"This layout has two side bars with the main content between them.","change_style_black":"Black","mashup_hub_category_label":"Mashups","change_style_lightGreenStyle":"Light Green","utb_cannot_submit_page_desc":"The page cannot be submitted because the service to do so was not available in the page feed contents.","new_categoryLabel":"New","add_content_launchLabel2":"Content","add_content_feedReader":"Feed Reader","utb_projectmenu_editmode":"Edit","utb_analytics":"Analytics","utb_layout_noChange":"The layout cannot be changed when an item is maximized","add_content_launchLabel":"Add Content","utb_project_mode_desc":"Content changes are added into this project","shelf_saving":"Your changes are being saved...","utb_default_project_template":"Default project template","utb_projectmenu_approveprojectdesc":"Approve the selected project","new_wcm_addWiki":"Add wiki to page","new_wcm_wcmNotCopied":"A WCM library is not finished being copied.","add_content_legacyError":"Content cannot be added to pages with legacy layouts. Assign a layout, and save your changes to use this feature.","shelf_badDatastoreError":"${0} cannot be loaded because the datastore for this content source is undefined.","add_content_close":"close","shelf_bundleUndefined":"The resource bundle ${0} could not be found","utb_projectmenu_approve_with_comments_headline":"Approve Project:","utb_projectmenu_allprojects":"All Projects","shelf_submitSearch":"submit search","change_style_blueStyle":"Blue Lights","utb_projectmenu_projectactionsdesc":"Actions that can be applied to the selected project","utb_projectmenu_editmodepublishedsitedesc":"Launch the published site in edit mode","utb_projectmenu_withdrawprojects":"Withdraw from Review","utb_overview_community":"Community:","change_style_mojo":"Mojo","menu_selected_text":"currently selected category","shelf_saveAndExit":"Save & Exit","change_layout_col3Center":"3 column center","add_content_rss":"RSS","utb_no_edit_page_permission":"You don't have permission to edit this page.","change_layout_col2Left":"2 column left","add_content_widgetActions":"Component options","change_style_gold":"Gold","add_content_feedspace":"Feedspace","utb_projectmenu_submitproject":"Submit for Review","utb_projectmenu_publishedsite":"Published Site","shelf_closeDialog":"Close dialog","change_layout_maximizedError2":"The layout cannot be changed while there is an item maximized.","change_style_launchLabel":"Change Style","new_feed_enterUrl":"Specify a valid URL.","utb_preview":"Preview","add_content_restrictedContentError":"${0} is not allowed on this page","add_content_chart":"Chart","utb_overview_link_manage":"Manage","change_layout_launchLabel":"Change Layout","utb_projectmenu_viewmodepublishedsitedesc":"Launch the published site in view mode","new_generic_add":"Add ${0} to page","utb_create_new_project":"Create a new project:","utb_overview_no_items":"No items to display.","utb_approve":"Approve","new_wcm_wcmNameTaken":"This name is already being used. Try a different name.","change_layout_templateSyncError":"Error with layout template sync.","shelf_socialCategory":"Social Content","new_wcm_blogLibraryDescription":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","shelf_searchSocial":"Search Social","utb_project_action_failed":"Cannot execute project action","utb_project_mode":"Project Edit:","add_content_addToPage":"Add to page","add_content_add":"Add","shelf_unspecified":"Unspecified","add_content_untitled":"Untitled","add_content_tags":"tags: ${0}","change_style_defaultStyle":"Default","change_layout_col2Right":"2 column right","utb_overview_workflow_stage":"Workflow Stage:","change_style_twilight":"Twilight","shelf_feedError":"${0} cannot be loaded. Check the internet connection and proxy settings.","utb_approve_project":"Approve Project","add_content_desc":"Object Palette - Drag and Drop Portlets, Widgets, and Content to the page","utb_projectmenu_reject_with_comments":"Project Rejection","utb_overview_name":"Name:","mashup_hub_components_label":"Components","utb_cannot_reject_page":"Cannot reject the page.","utb_result_error":"Error loading item","category_web_content":"Web Content","utb_projectmenu_allprojectsdesc":"Select from all projects","change_layout_1Row2ColDesc":"This layout has two rows. The second row contains two unequal columns.","utb_public_page":"Public Page","utb_projectmenu_norecentprojects":"No recent projects available","add_content_notLoaded":"This item has not yet loaded.","add_content_ok":"OK","shelf_searchToolsCategory":"Search Tools","utb_save_draft":"Save Draft","change_style_carbon":"Carbon","shelf_searchAll":"Search All","utb_content":"Content","change_style_orangeStyle":"Orange","utb_save_changes":"Save changes","detail_dialog_instruction_text":"press enter to see details dialog","utb_projectmenu_approvalcomments_required":"Required","utb_projectmenu_favoriteprojects":"Favorite Projects:","utb_undo":"Undo","shelf_menu":"Menu","shelf_searchNew":"Search New","new_wcm_blogLibraryDesc":"Add a blog library to a page to collaborate with your team on multiple topics in a centralized view. To collaborate with your team on a single topic, click Cancel > Blog.","add_content_maximizedError2":"Content cannot be added to the page while there is an item maximized.","change_style_launchLabel2":"Style","utb_manage_project":"Manage Project","utb_reject_project":"Reject Project","utb_no":"No","utb_layout_noChange_desc":"Please minimize or restore the maximized content before proceeding to change the layout of the page.","utb_projectmenu_viewmodedesc":"Launch the project in view mode","change_layout_col2Equal":"2 column equal","shelf_configError":"Error reading configuration file or processing its content.","utb_nm_error":"Cannot save the navigation model","change_layout_save_warning":"The layout is not applied until you save the page.","change_style_pinkStyle":"Pink","utb_page_rejected":"The page has been rejected.","add_content_nested_data_viewer":"Nested Data Viewer","change_style_contemporary":"Contemporary","utb_projectmenu_manageproject":"Manage","utb_show_min_toolbar":"Show minimized toolbar","change_style_dark":"Dark","utb_projectmenu_loading":"Loading projects...","utb_projectmenu_approveproject":"Approve","change_layout_custom":"Custom Layout","shelf_jumpTo":"Jump to page","new_feed_enterTitle":"Specify a title.","change_layout_1Row3Col":"1 grid 3 column equal","utb_edit_page_condition":"To edit this page, you must","utb_content_noAdd2":"Content cannot be added to legacy pages","add_content_details":"Details","shelf_searchFeeds":"Search Feeds","new_wcm_addBlog":"Add blog to page","add_content_selectRenderer":"Select how to display the content","utb_page_not_in_draft_state":"You cannot edit this page because the page is no longer in a draft state.","utb_toggle_toolbar":"toggle the toolbar","utb_projectmenu_newproject":"New Project","utb_more":"More","utb_revert":"Revert","utb_project_action_success":"Your action was successfully executed.","utb_workflow":"Workflow","add_content_noPreviewSaved1":"To display this item,","change_style_desc":"Style Palette - Click a style to apply it to the page","add_content_noPreviewSaved2":"save","add_content_noPreviewSaved3":"the page.","utb_save_message":"There are unsaved changes on this page. What do you want to do?","utb_open_project_menu":"launch the project menu","new_blog_copyWcmLibrary":"Your blog is being created...","utb_overview_web_content":"Web Content:","utb_must_be_in_project":"To edit this page, you must be in a project.","mashup_hub_iwidgets_label":"Widgets","utb_end_preview":"Stop Previewing","utb_next_stage":"Next Stage","change_layout_col2RightDesc":"This layout has one side bar on the left with the main content on the right.","add_content_maximizedError":"Content cannot be added to the page while there is a portlet in maximized mode.","utb_customizing_your_page":"You are customizing your page. Changes are only visible to you.","new_wcm_wiki":"Wiki","utb_preview_as_unauthenticated_user":"Preview as unauthenticated user","utb_overview_text_tomorrow":"Tomorrow","add_content_missingRendererError":"Could not find the specified renderer.","change_layout_TopCol3ColDesc":"This layout has two stacked columns. The bottom column contains three unequal columns.","utb_overview_link_view_all":"View all","utb_projectmenu_withdrawprojectdesc":"Withdraw the selected project from review","no_web_content_mapping_desc":"The current page does not have a page content mapping. Please edit the page properties and set a default content mapping.","shelf_hideHiddenContainers":"Hide content","add_content_portlets":"Portlets","change_style_brown":"Brown","shelf_bundleKeyUndefined":"The key ${0} was undefined in the resource bundle ${1}","utb_overview_edit_title":"Edit \"${0}\"","add_content_closeDialog":"Close this dialog","change_layout_maximizedError":"The layout cannot be changed while there is a portlet in maximized mode.","change_layout_col3Equal":"3 column equal","add_content_feed_reader":"Feed Reader","new_wcm_createWcm":"Create WCM Library","utb_open_toolbar":"Open the toolbar","shelf_searchAdminCategory":"Search Administration","utb_discard_project":"Discard Project Draft","utb_projectmenu_noprojectsavailable":"None","shelf_previous":"Previous","new_wcm_feedDescription":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","utb_preview_as_user":"Preview as User","shelf_loading":"Loading...","shelf_page":"Page ${0} of ${1}","utb_project_add_to_favorites":"Add to favorites","change_layout_1Row2Col":"1 grid 2 column unequal","new_feed_title":"Title","change_layout_col2EqualDesc":"This layout has two columns each taking up 50% of the width.","utb_workflow_state_draft":"Draft","new_feed_addFeed":"Add feed to page","change_layout_customDesc":"This layout is a customized T-shaped layout.","utb_new_project_from_template":"New project from:","utb_workflow_state_pending_publish":"Pending publish","utb_edit":"edit","change_layout_desc":"Layout Palette - Click a layout and apply it by saving the page","utb_projectmenu_editmodedesc":"Launch the project in edit mode","change_layout_templateSyncConfirm":"Are you sure you want to sync the layout for this page? All personalizations will be lost.","new_feed_url":"URL","shelf_searchCollabCategory":"Search Collaboration","utb_publish":"Publish","shelf_search":"Search ${0}","change_layout_2Row":"2 grid","change_style_green":"Green","shelf_next":"Next","utb_customizing_this_page":"You are customizing this page. Changes are only visible to you.","utb_yes":"Yes","no_web_content_mapping":"Web Content cannot be added to the page","utb_submit_page_review":"Submit Page for Review","utb_launch_selector":"launch project selector","utb_end_results":"No more results","change_style_blue":"Blue","add_content_all":"All","shelf_communicationsCategory":"Communications","add_content_noPreview":"This item does not support preview","utb_live_edit_desc":"These changes affect everybody","utb_cannot_create_draft":"Cannot create a draft version of the page.","utb_discard_changes":"Discard changes","utb_partClose_toolbar":"Close the statusbar","utb_submit_project":"Submit Project for Review","change_layout_templateSyncLong":"Update the layout of this page by syncing with the template from which it was based. Note that personalizations made to this page will be lost.","utb_projectmenu_projectactions":"Project Actions","utb_projectmenu_projects":"Projects:","shelf_searchWidgets":"Search Widgets","utb_cannot_load_page":"An unexpected error occurred loading the page. The page may be corrupted. Contact your administrator to attempt a resynchronization.","shelf_toolsCategory":"Tools","new_wcm_blogDesc":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_projectment_no_comment_provided":"This project requires a comment.","shelf_saveChanges":"Save","utb_close_toolbar":"Close the toolbar","utb_projectmenu_rejectproject":"Reject","change_layout_templateSync":"Sync assigned layout","utb_cannot_publish_page":"Cannot publish the page for review","shelf_close":"close shelf","utb_layout_noChange2":"The layout cannot be changed on legacy pages","add_content_label":"Content","change_style_greenStyle":"Green Waves","new_wcm_createGeneric":"Create ${0}","utb_overview_loading_content":"Loading content...","new_blog_library_copyWcmLibrary":"Your blog library is being created...","change_style_metal":"Metal","utb_projectmenu_rejectcomments":"Rejection Comments","add_content_noPreviewSaved":"To display this item, save the page.","new_createCategory":"Create","utb_information_message":"Information","shelf_serverError":"Internal server error.","utb_min_toolbar":"Minimize the toolbar","utb_wm_error":"Cannot save the widget model","utb_projectmenu_recentprojects":"Recent Projects:","utb_projectmenu_reject_with_comments_headline":"Reject Project:","new_wcm_blog":"Blog","utb_overview_text_yesterday":"Yesterday","utb_project":"Project","new_portalCategory":"Portal","utb_reject":"Reject","utb_page_actions":"Page Actions","new_portletsCategoryLabel":"Portlets","utb_overview_dots":"...","utb_create_draft":"create a draft","shelf_all":"All","add_content_browseContent":"Browse Content","change_layout_TopCol3Col":"Top column 3 column center","menu_back":"back","generic_browse":"Browse ${0}","new_wcm_addBlogLibrary":"Add blog library to page","utb_show_hidden":"Show Hidden Content","utb_hide_hidden":"Hide Hidden Content","change_style_missingStyleError":"The specified style does not exist","shelf_untitled":"Untitled","shelf_searchPortlets":"Search Portlets","change_style_silver":"Silver","utb_page_submit_wait":"Please wait while your page is being submitted...","utb_cannot_submit_page":"Cannot submit the page for review","shelf_showHiddenContainers":"Show hidden content","utb_partOpen_toolbar":"Open the statusbar","selection_instructions":"press enter to select","new_wcm_wikiDescription":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_layout":"Layout","add_content_rating":"rating: ${0}","change_style_visionary":"Visionary","new_wcm_blogLibrary":"Blog Library","change_style_red":"Red","new_wiki_copyWcmLibrary":"Your wiki is being created...","project_expired":"The current project is no longer available. Click OK to be redirected.","utb_wcm_auth":"Web Content Authoring","add_content_lastMod":"Last modified: ${0}","change_style_browseStyles":"Browse Styles","utb_overview_project_content":"Project Content","shelf_searchCommunications":"Search Communications","utb_close_project_menu":"close the project menu","add_content_addContentError":"Error adding content to the page.","utb_overview_link_read":"Read","change_style_natural":"Natural","change_style_modern":"Modern","add_content_noRating":"no rating","utb_projectmenu_rejectprojectdesc":"Reject the selected project","utb_project_action_wait":"Please wait while your action is being executed...","shelf_noResults":"No results","shelf_searchGadgets":"Search Gadgets","change_layout_TopCol2ColDesc":"This layout has two stacked columns. The bottom column contains two unequal columns.","utb_projectmenu_approve_with_comments":"Project Approval","utb_projectmenu_approvalcomments_optional":"Optional","utb_toggle_statusbar":"toggle the status bar","utb_projectmenu_noprojects":"No projects available","change_style_orchid":"Orchid","shelf_adminCategory":"Administration","mashup_hub_feeds_label":"Feeds","change_style_restoreStyle":"Restore previous style","new_wcm_nameInvalid":"Name must contain at least one alphanumeric (a-zA-Z0-9) character. Try a different name.","utb_last_project":"Open last project:","shelf_unsavedChanges":"The customization shelf has unsaved changes.","change_style_label":"Styles","add_content_addSearch":"Add search results to page","utb_submit_review":"Submit for Review","new_wcm_blogDescription":"Add a blog to a page to collaborate with your team on a single topic. To collaborate with others on multiple topics, click Cancel > Blog Library.","utb_project_add_to_favorites_desc":"Add the new project to the list of favorite projects","change_layout_launchLabel2":"Layout","utb_overview_link_goto":"Go to","utb_projectmenu_approvalcomments":"Approval Comments","change_layout_browseLayouts":"Browse Layouts","change_style_white":"White","change_style_purpleStyle":"Purple","new_creatableCategory":"Creatable","utb_overview_none":"None","utb_overview":"Overview","utb_projectmenu_publishproject":"Publish","utb_workflow_state_published":"Published","utb_end_preview_as":"Stop Previewing as","utb_projectmenu_projectactionsfor":"Actions for","utb_project_publish_failed":"Project failed to publish. Open the manage project view for more details.","utb_private_page":"Private Page","change_layout_col1Desc":"This layout has one column taking up 100% of the available space.","new_wcm_feed":"Feed","change_layout_TopCol2Col":"Top column 2 column unequal","new_feed_feedDesc":"Provide a feed URL and a feed reader portlet configured to that feed will be added to the page.","change_layout_col1":"1 column","shelf_searchCreate":"Search Create","new_wcm_wikiDesc":"Quickly create and edit content in-line with a wiki. Instantly publish your work with the click of a button.","utb_cannot_approve_page":"Cannot approve the page.","utb_projectmenu_viewmode":"View","utb_create_draft_wait":"Please wait while your draft version of the page is being created.","change_style_yellow":"Yellow","utb_overview_text_today":"Today","create":"Create","utb_projectmenu_newprojectdesc":"Create a new project","utb_page_approved":"The page has been approved.","utb_projectmenu_publishprojectdesc":"Publish the selected project","change_layout_col2LeftDesc":"This layout has one side bar on the right with the main content on the left.","utb_content_noAdd_desc":"Please minimize or restore the maximized content before proceeding to add more items to the page.","utb_proceed_discard":"This will reverse all changes made since you last saved. Proceed?","new_wcm_name":"Name","shelf_customize":"Customize","change_style_slate":"Slate","utb_overview_friendly_name":"Friendly Url:","change_layout_1Row3ColDesc":"This layout has two rows. The second row contains three equal columns.","utb_content_noAdd":"Content cannot be added when an item is maximized","shelf_collabCategory":"Collaboration","utb_information":"information","utb_project_create_wait":"Please wait while your project is being created...","utb_overview_page_properties":"Page Properties","utb_unsaved_changes_prompt":"There are unsaved changes on this page. Click OK to save your changes. Click Cancel to discard your changes.","new_wcm_wcmNameInvalid":"Names may contain only alphanumeric (a-zA-Z0-9) characters, spaces, or any of the following characters: \" $ - _ . ! ( ) ,.","utb_overview_link_edit":"Edit","shelf_hiddenContainers":"Hidden Content","utb_more_actions":"More Actions","utb_projectmenu_submitprojectdesc":"Submit the selected project for review","add_content_submit":"Submit","change_layout_col3EqualDesc":"This layout has three columns each taking up 33% of the width."}; /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2009, 2010, 2011 - All Rights reserved. **/ dojo.i18n._preloadLocalizations("pagebuilder.nls.toolbar",["ROOT","ar","ca","cs","da","de","el","en","es","fi","fr","he","hr","hu","it","ja","kk","ko","nl","no","pl","pt","pt-br","ro","ru","sk","sl","sv","th","tr","uk","xx","zh","zh-tw"]);if(!dojo._hasResource["com.ibm.pb.contextMenu.JsonContextMenuLoader"]){dojo._hasResource["com.ibm.pb.contextMenu.JsonContextMenuLoader"]=true;dojo.provide("com.ibm.pb.contextMenu.JsonContextMenuLoader");dojo.declare("com.ibm.pb.contextMenu.JsonContextMenuLoader",[com.ibm.mashups.builder.model.ContextMenuLoader,com.ibm.pb.logging.Loggable],{_df:null,statusCodes:com.ibm.mm.enabler.model.HttpStatusCodes,constructor:function(_1){if(!_1){throw new Error("definition must not be null");}this._df=_1;this._data=null;},getItems:function(_2,_3,_4,_5){var _6="getItems",_7=this.LOGGER,me=this;_7.entering(_6,arguments);dfd=new com.ibm.mm.builder.DeferredImpl(this,function(_8,_9,_a){var _b=_8.getFinishedCallback(),_c=_8.getFinishedCallbackParameters(),_d;if(!this._data){this.getData(function(_e,_f){if(_f==200){_d=me._initMenuItems(_2,_3,_4,_5);}else{_d=_e;}if(_b){_b(_d,_f,_c);}},_9);}else{_d=this._initMenuItems(_2,_3,_4,_5);if(_b){_b(_d,200,_c);}}return _d;});_7.exiting(_6,arguments);return dfd;},getData:function(_10,_11){var _12="getData",lgr=this.LOGGER,me=this,_13=this._df.name,_14=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK;lgr.entering(_12,arguments);if(!this._data){if(this._df.data){this._data=_13?dojo.getObject(_13,false,this._df.data):this._df.data;if(_10){_10(this._data,200);}}else{if(this._df.url){lgr.trace(_12,"Requesting context menu by url ${0}",[this._df.url]);com.ibm.pb.data.RESOURCE_LOADER.getData(this._df.url,"json").setFinishedCallback(function(_15,_16,_17){me._data=_15;if(_16==200&&_13){me._data=dojo.getObject(_13,false,_15);}if(_10){_10(me._data,_16);}}).start(_11);}else{throw new Error("Configuration error for context menu: Must specify url or data properties");}}}lgr.exiting(_12,[this._data]);return this._data;},_initMenuItems:function(_18,_19,_1a,_1b){var _1c="_initMenuItems",lgr=this.LOGGER,ret=[],_1d=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();dojo.forEach(this._data,function(_1e){if(this._isVisible(_1e,_19,_1a,_1b)){lgr.trace(_1c,"Adding item ${0}",[_1e.id]);var l7d=this._getLocalized(_1e);ret.push(dojo.delegate(_1e,{enabled:this._isEnabled(_1e,_19,_1a,_1b),localized:l7d,title:_1e.title||_1d.getTitle(l7d),description:_1e.description||_1d.getDescription(l7d),actionCallBackFunction:this._getAction(_1e,_19,_1a,_1b)}));lgr.trace(_1c,"Added item ${0}",[_1e.id]);}else{lgr.trace(_1c,"Item ${0} is hidden",[_1e.id]);}},this);return ret;},_getAction:function(_1f,_20,_21,_22){var _23="_getAction",lgr=this.LOGGER;lgr.entering(_23,[_1f.id,_20,_21,_22]);var ret=dojo.partial(_1f.actionFn,_20,_21,_1f.metadata,_22);lgr.exiting(_23,[_1f.id,ret]);return ret;},_isVisible:function(_24,_25,_26,_27){var _28="_isVisible",lgr=this.LOGGER;lgr.entering(_28,[_24.id,_25,_26,_27]);var ret=false;try{ret=dojo.isFunction(_24.visibilityFn)?dojo.partial(_24.visibilityFn)(_25,_26,_24.metadata,_27):true;}catch(err){lgr.severe(_28,"Error executing visibilityFn for item ${0}: ${1}",[_24,err]);}lgr.exiting(_28,[_24.id,ret]);return ret;},_isEnabled:function(_29,_2a,_2b,_2c){var _2d="_isEnabled",lgr=this.LOGGER;lgr.entering(_2d,[_29.id,_2a,_2b,_2c]);var ret=false;try{ret=_29.stateFn?_29.stateFn(_2a,_2b,_29.metadata,_2c):_29.enabled;}catch(err){lgr.severe(_2d,"Error executing stateFn ${0}",[err]);}lgr.exiting(_2d,[_29.id,ret]);return ret;},_getLocalized:function(_2e){return new com.ibm.pb.localized.DojoLocalized(_2e);}});}dojo.declare("ibm.toolbar.OverviewContainer",[dijit._Widget,dijit._Templated,com.ibm.pb.customize.LotusPaletteContainer],{connections:[],currentProjectID:null,isManaged:true,blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString(),templateString:"<div class=\"utb-overview lotusui\">"+"<div class=\"utb-messageBox lotusMessage2 lotusInfo\" role=\"alert\" dojoAttachPoint=\"messageBox\">"+"<img class=\"lotusIcon lotusIconMsgInfo\" src=\"${blankImg}\" alt=\"${informationMessageTxt}\" />"+"<span class=\"lotusAltText\">${informationMessageTxt}</span>"+"<div class=\"lotusMessageBody\" dojoAttachPoint=\"messageBody\"></div>"+"</div>"+"<div class=\"utb-column\" dojoAttachPoint=\"col1\">"+"<div class=\"utb-header\">"+"<div class=\"utb-ellipsis\">"+"<span class=\"utb-header-title\">${pagePropsTxt}</span>"+"<span id=\"${id}-pageState\" class=\"utb-lightText utb-header-state\" dojoAttachPoint=\"pageState\"></span>"+"<span id=\"${id}-pageUpdateDateDay\" class=\"utb-lightText\" dojoAttachPoint=\"pageDateDay\"></span>"+"</div>"+"</div>"+"<div dojoAttachPoint=\"pagePropsBlockDiv\" class=\"lotusClear utb-pagePropsBlock\" tabindex=\"0\"></div>"+"<div dojoAttachPoint=\"pagePropsListDiv\" class=\"utb-pagePropsList\"></div>"+"</div>"+"<div class=\"utb-column utb-extended-column utb-last lotusHidden\" dojoAttachPoint=\"col2and3\">"+"<div class=\"utb-header\" dojoAttachPoint=\"headerProjectContent\">"+"<span class=\"utb-header-title\">${pageContentTxt}</span>"+"<span id=\"${id}-projectState\" class=\"utb-lightText utb-header-state\" dojoAttachPoint=\"projectState\"></span>"+"</div>"+"<div class=\"lotusLeft\" dojoAttachPoint=\"col2\">"+"<div id=\"${id}-col2Content\" dojoAttachPoint=\"projectContentDiv\"></div>"+"<div dojoAttachPoint=\"loadingDiv\" class=\"utb-noentry\">"+"<span><img class=\"lotusLoading\" src=\"${blankImg}\"></span>&nbsp;<span>${loadingTxt}</span>"+"</div>"+"</div>"+"<div class=\"lotusHidden lotusLeft\" dojoAttachPoint=\"col3\">"+"<div id=\"${id}-col3Content\" dojoAttachPoint=\"projectContentDiv2\"></div>"+"</div>"+"</div>"+"<div class=\"utb-column utb-extended-column utb-last lotusHidden\" dojoAttachPoint=\"colCreateProject\">"+"<div class=\"utb-header\">"+"<span>${projectTxt}</span>"+"</div>"+"<div class=\"lotusClear\">"+"<div><label for=\"projectName\">${createNewProjectTxt}</label></div>"+"<form action=\"javascript:;\" method=\"POST\" name=\"${id}-new-project\" class=\"lotusForm2\">"+"<div class=\"lotusFormField\"><input dojoAttachPoint=\"projectNameInputField\" id=\"projectName\" name=\"projectName\" class=\"lotusText\" type=\"text\"></input></div>"+"<div class=\"lotusFormField\"><input dojoAttachPoint=\"favoriteProjectCheckbox\" id=\"favoriteProject\" name=\"favoriteProject\" class=\"lotusCheckbox inlineCheckbox\" type=\"checkbox\" value=\"favorite\"></input><label class=\"inlineCheckbox\" for=\"favoriteProject\">${favoriteProjectTxt}</label></div>"+"<input dojoAttachPoint=\"createProjectButton\" value=\"${createTxt}\" href=\"javascript:void(0);\" class=\"lotusBtn\" type=\"button\"></input>"+"</form>"+"</div>"+"</div>"+"</div>",constructor:function(){this.bundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.tabLabel=this.bundle["utb_overview"];this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.lclCtx=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();},postMixInProperties:function(){this.editTxt=this.bundle.utb_overview_link_edit;this.readTxt=this.bundle.utb_overview_link_read;this.viewallTxt=this.bundle.utb_projectmenu_manageproject;this.moreTxt=this.bundle.utb_more;this.noneTxt=this.bundle.utb_overview_none;this.pageContentTxt=ibm.toolbar.ProjectSupport.getCurrentProjectUUID()?(this.bundle.utb_overview_project_content):"";this.pagePropsTxt=this.bundle.utb_overview_page_properties;this.nameTxt=this.bundle.utb_overview_name;this.friendlyNameTxt=this.bundle.utb_overview_friendly_name;this.workflowStageTxt=this.bundle.utb_overview_workflow_stage;this.webContentTxt=this.bundle.utb_overview_web_content;this.communityTxt=this.bundle.utb_overview_community;this.noItemsTxt=this.bundle.utb_overview_no_items;this.loadingTxt=this.bundle.utb_overview_loading_content;this.editTitleTxt=this.bundle.utb_overview_edit_title;this.moreMappingsTxt=this.bundle.utb_overview_more_mappings;this.gotoTxt=this.bundle.utb_overview_link_goto;this.dotsTxt=this.bundle.utb_overview_dots;this.viewAllContentTxt=this.bundle.utb_overview_view_all_content;this.informationMessageTxt=this.bundle.utb_information_message;this.editPageConditionTxt=this.bundle.utb_edit_page_condition;this.createDraftTxt=this.bundle.utb_create_draft;this.mustBeInProjectTxt=this.bundle.utb_must_be_in_project;this.noEditPagePermissionTxt=this.bundle.utb_no_edit_page_permission;this.customizingThisPage=this.bundle.utb_customizing_this_page;this.customizingYourPage=this.bundle.utb_customizing_your_page;this.lastProjectTxt=this.bundle.utb_last_project;this.createNewProjectTxt=this.bundle.utb_create_new_project;this.createTxt=this.bundle.create;this.projectTxt=this.bundle.utb_project;this.favoriteProjectTxt=this.bundle.utb_project_add_to_favorites;},destroy:function(){dojo.forEach(this.connections,dojo.disconnect);},createDraftPage:function(){ibm.toolbar.ProjectSupport.createDraftPage();},editWCMItem:function(id,_2f,_30){var _31=new ibm.toolbar.ModalDialog();var me=this;var _32=dojo.string.substitute(ibm.toolbar.readWCMItemURLPrefix,[_30])+id;_31.open(_32,function(){me._refreshProjectContent();},dojo.string.substitute(me.editTitleTxt,[_2f]));},editPageProperties:function(){var _33=ibm.toolbar.ProjectSupport.confirmSaveOrDiscard();if(_33.okSelected===true){return;}var _34=new ibm.toolbar.ModalDialog();var me=this;var _35=ibm.toolbar.showPagePropertiesURLPrefix+me.pageId;_34.open(_35,function(_36,_37){if(_36==ibm.toolbar.OverviewContainer.SAVE){ibm.toolbar.ProjectSupport.loadTop();}else{if(_33.wasDirty===true){com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);}}},me.pagePropsTxt,null,null,null,true,{w:550});},editContent:function(_38){var _39=new com.ibm.wps.contentmapping.widget.CMPickerDialogWidget({scopeprovidername:com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_WCM});_38.editCommunityOrContent(_39);},editCommunity:function(_3a){var _3b=new com.ibm.wps.contentmapping.widget.CMPickerDialogWidget({scopeprovidername:com.ibm.wps.contentmapping.utils.CMPickerConfig.SCOPE_PROVIDER_CONNECTIONS});_3a.editCommunityOrContent(_3b);},editCommunityOrContent:function(_3c){var _3d=ibm.toolbar.ProjectSupport.confirmSaveOrDiscard();if(_3d.okSelected===true){return;}var me=this;var _3e=dojo.hitch(this,function(_3f){this._refreshMappings();});var _40=dojo.hitch(this,function(_41){if(_3d.wasDirty===true){com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);}});var _42=new com.ibm.wps.contentmapping.dialog.ContentMappingPickerDialog({"widgetInstance":_3c,onConfirmCallbackFn:_3e,onCancelCallbackFn:_40});_42.show();var _43=window.setTimeout(function(){if(_42.domNode&&_42.domNode.style.display!=ibm.toolbar.OverviewContainer.NONE){_42.layout();}window.clearTimeout(_43);},1);},fillPropertiesHeader:function(_44){var _45;if(this._getPendingState(_44)){_45=this._escapeHTML((this._getPendingState(_44)).label);}else{_45=this._escapeHTML((this._getWorkflowState(_44)).label);}dojo.attr(this.pageState,"innerHTML",_45);dojo.attr(this.pageState,"title",_45);var _46=ibm.toolbar.DateUtil.JsonDateToString(_44.updated,true,false);dojo.attr(this.pageDateDay,"innerHTML",_46);dojo.attr(this.pageDateDay,"title",_46);},fillPageProperties:function(_47){var _48=[];var _49=this.navModel.find(this.pageId).start();_48.push({name:this.nameTxt,value:this.lclCtx.getTitle(_49),divID:"page-name"});var _4a=_49.getMetaData("com.ibm.portal.friendly.name")||"";_48.push({name:this.friendlyNameTxt,value:_4a?_4a:this.noneTxt,divID:"friendly-name"});if(this.isManaged&&_47!==null){_48.push({name:this.workflowStageTxt,value:_47?_47:this.noneTxt,divID:"workflow-stage"});}dojo.place(this._createPropertiesBlock(_48),this.pagePropsBlockDiv);},fillProjectContent:function(_4b){var me=this;dojo.attr(this.projectState,"innerHTML",me._escapeHTML(ibm.toolbar.ProjectSupport.getProjectState()));if(ibm.toolbar.ProjectSupport.isProjectPublishedFailed(ibmToolbarConfig.projectUUID)){var _4c=dojo.attr(this.projectState,"class");dojo.attr(this.projectState,"class",_4c+" lotusMessage2");}if(typeof _4b!==ibm.toolbar.OverviewContainer.STRING){var _4d=_4b.length;if(_4d>0){var _4e,_4f;if(this.isMessageBoxVisible===true){_4e=5;_4f=(_4d>9)?9:10;}else{_4e=6;_4f=(_4d>11)?11:12;}var _50=false;if(_4d>_4e){dojo.addClass(this.col2,"columnWidth50");dojo.addClass(this.col3,"columnWidth50");_50=true;dojo.removeClass(this.col3,"lotusHidden");}else{dojo.addClass(this.col2,"columnWidth100");}for(var i=0,l=Math.min(_4b.length,_4f);i<l;i++){var c=_4b[i];if(this._itemHasEditLink(c)){edit=true;}var _51=null;if(this._getPendingState(c)){_51=(this._getPendingState(c));}else{_51=this._getWorkflowState(c);}var _52=this._getID(c.id);var _53=null;var _54=null;if(c.type===ibm.toolbar.OverviewContainer.PORTAL_PAGE&&_51.term!==ibm.toolbar.OverviewContainer.PENDING_DELETED){var _55=function(_56){top.location.href="?uri=nm:oid:"+_56;};_53=me.gotoTxt;_54=dojo.partial(_55,c.name);}if(i<_4e){dojo.place(this._createOneRow(c.title,_51.label,ibm.toolbar.DateUtil.JsonDateToString(c.updated,true,false),ibm.toolbar.DateUtil.JsonDateToString(c.updated,false,true),_52,c.type,edit,_54,_53,_50),this.projectContentDiv);}else{if(i>=_4e&&i<_4f){dojo.place(this._createOneRow(c.title,_51.label,ibm.toolbar.DateUtil.JsonDateToString(c.updated,true,false),ibm.toolbar.DateUtil.JsonDateToString(c.updated,false,true),_52,c.type,edit,_54,_53,_50),this.projectContentDiv2);}}}if(_4d>_4f){me._addMoreLink(this.projectContentDiv2,me.currentProjectID);}}else{dojo.place(this._createText(me.noItemsTxt),this.projectContentDiv);}}else{dojo.place(this._createText(_4b),this.projectContentDiv);}},fillPageAssociations:function(_57){var _58=false;var _59=null;var _5a=null;var _5b=[];var me=this;var _5c=[];var _5d=[];var _5e=null;this._hasPageAssocRights?_58=true:_58=false;if(_57.scopeproviders.length>0){dojo.forEach(_57.scopeproviders,function(_5f){if(_5f.name===ibm.toolbar.OverviewContainer.IBM_WCM_PROVIDER){if(_5f.contentmappings.length>0){if(_5f.contentmappings.length===1){_5e=_5f.contentmappings[0];_5c.push(me._determineMapping(_5e));_5b=me._determineMapping(_5e);}else{if(dojo.some(_5f.contentmappings,function(_60){return _60.isDefault;})){dojo.forEach(_5f.contentmappings,function(_61){_5c.push(me._determineMapping(_61));if(_61.isDefault){_59=me._determineMapping(_61);}});}else{_5e=_5f.contentmappings[0];dojo.forEach(_5f.contentmappings,function(_62){_5c.push(me._determineMapping(_62));});_59=me._determineMapping(_5e);}_5b[0]=_59;_5b[1]=me._addContentMappingsInfo(_5f.contentmappings.length-1);}}}else{if(_5f.name===ibm.toolbar.OverviewContainer.IBM_CONN_PROVIDER){if(_5f.contentmappings.length>0){_5e=_5f.contentmappings[0];_5a=me._determineMapping(_5e);_5d.push(me._determineMapping(_5e));}else{_5a=me.noneTxt;}}}});}dojo.empty(me.pagePropsListDiv);if(_5b){dojo.place(me._createPageAssociationRow(ibm.toolbar.OverviewContainer.IBM_WCM_PROVIDER,me.webContentTxt,_5b,_5c,_58,me.editContent),me.pagePropsListDiv);}if(_5a){dojo.create("div",{className:"lotusClear"},me.pagePropsListDiv,"last");dojo.place(me._createPageAssociationRow(ibm.toolbar.OverviewContainer.IBM_CONN_PROVIDER,me.communityTxt,_5a,_5d,_58,me.editCommunity),me.pagePropsListDiv);}},loadPropertiesHeaderData:function(){if(this.uuid){var _63=ibm.toolbar.ProjectSupport.getPortalPage(this.uuid);this.fillPropertiesHeader(_63);}else{this._clearHeader();}},loadPageWorkflowStage:function(_64){if(this.uuid){var _65=ibm.toolbar.ProjectSupport.getPortalPage(this.uuid);if(this._itemHasWorkflowStageLink(_65)){this._getWorkflowStage(_65);}else{this.fillPageProperties();}}else{this.fillPageProperties();}},loadPageAssociations:function(_66){var _67=[{name:"mime-type",value:"application/json"}];var _68=this._createUrl("contentmapping:oid:",_67,_66);var me=this;var _69=function(_6a){me.fillPageAssociations(_6a);};this.getData(_68,_69,null,"json");},loadProjectContent:function(_6b){dojo.removeClass(this.col2and3,"lotusHidden");if(!_6b){this.fillProjectContent(this.noItemsTxt);}else{var _6c=[{name:"sort",value:"modified_descending"},{name:"pageSize",value:12},{name:"projectid",value:_6b},{name:"mime-type",value:"application/json"}];var _6d=this._createUrl("wcmrest:definedquery/item-by-project",_6c);var me=this;var _6e=function(_6f){me._displayLoading(false);if(_6f.feed){me._addAllLink(me.currentProjectID);if(_6f.feed.entry){me.fillProjectContent(_6f.feed.entry);}else{me.fillProjectContent(me.noItemsTxt);}}else{me.fillProjectContent(me.noItemsTxt);}};this._displayLoading(true,this.col1);this.getData(_6d,_6e,null,"json");}},loadPublishedPageContent:function(){var me=this;var _70=me._escapeHTML(ibm.toolbar.ProjectSupport._generateProjectTitle());dojo.attr(me.projectNameInputField,"value",_70);var _71=function(_72){var _72=this._escapeHTML(dojo.attr(me.projectNameInputField,"value"));var _73=me.favoriteProjectCheckbox.checked;var _74=function(id){ibm.toolbar.ProjectSupport.enterProject(id,"");};ibm.toolbar.ProjectSupport.createProject(_74,_72,_72,_73);};dojo.connect(me.createProjectButton,"onclick",me,_71);dojo.removeClass(me.colCreateProject,"lotusHidden");},getData:function(url,_75,_76,_77){var _78={url:url,handleAs:_77,headers:{"X-IBM-XHR":"true"},load:function(_79){_75(_79);},error:function(_7a,_7b){if(_7b.xhr.status==401||_7b.xhr.status=="401"){window.location.reload();}else{if(_76){_76(_7a,_7b);}}}};dojo.xhrGet(_78);},viewAllProjectContent:function(_7c){ibm.toolbar.ProjectSupport.launchViewProjectDialog(_7c,this.viewallTxt);},setupUI:function(){this.currentProjectID=this._getCurrentProjectID();this.pageId=ibmCfg.themeConfig.currentContentNodeOID;this.uuid=ibm.toolbar.ProjectSupport.getPageUUID();if(!this.uuid||!this._isManagedPagesEnabled()){this.isManaged=false;}var _7d=new com.ibm.wps.contentmapping.utils.CMPickerConfig();this._hasPageAssocRights=_7d.hasPageEditorRights();this.loadPageAssociations(this._getCurrentPageContentID());this.isMessageBoxVisible=this._createMessageBoxContent();if(!this.isManaged){this.fillPageProperties();this._clearHeader();if(this._isManagedPagesEnabled()){if(this.currentProjectID){this.loadProjectContent(this.currentProjectID);}else{this.loadPublishedPageContent();}}}else{this.loadPropertiesHeaderData();this.loadPageWorkflowStage(this.pageId);if(this._isManagedPagesEnabled()){if(this.currentProjectID){this.loadProjectContent(this.currentProjectID);}else{this.loadPublishedPageContent();}}}},_escapeHTML:function(str){return (str.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;"));},_clearHeader:function(){dojo.removeClass(this.pageState,"utb-header-state");},_determineMapping:function(_7e){var ret=null;if(_7e.title){ret=_7e.title;}else{ret=_7e.id;}return ret;},_addContentMappingsInfo:function(_7f){return dojo.string.substitute(this.moreMappingsTxt,[_7f]);},_getID:function(_80){return _80.split(":")[1];},_refreshProjectContent:function(){window.location.reload();},_refreshMappings:function(){window.location.reload();var _81=new Date().toString();document.cookie="modified.id="+_81+";domain="+document.domain+";path=/";},_setVisibility:function(_82,_83){if(_83){_82.style.display="block";}else{_82.style.display=ibm.toolbar.OverviewContainer.NONE;}},_displayLoading:function(_84){if(!_84){dojo.addClass(this.loadingDiv,"lotusHidden");}else{dojo.removeClass(this.loadingDiv,"lotusHidden");}},_createText:function(_85){var div=dojo.create("div",{className:"utb-noentry"});var _86=dojo.create("span",{innerHTML:this._escapeHTML(_85)},div);return div;},_itemHasEditLink:function(_87){var _88=false;if(_87.link){if(dojo.some(_87.link,function(_89){return (_89.rel&&_89.rel===ibm.toolbar.OverviewContainer.EDIT);})){_88=true;}}return _88;},_itemHasWorkflowStageLink:function(_8a){var _8b=false;if(_8a.link){if(dojo.some(_8a.link,function(_8c){return (_8c.rel&&_8c.rel===ibm.toolbar.OverviewContainer.WORKFLOW_STAGE);})){_8b=true;}}return _8b;},_getWorkflowState:function(_8d){var _8e=null;if(_8d.category){for(var j=0,l=_8d.category.length;j<l;j++){if(_8d.category[j].scheme&&_8d.category[j].scheme===ibm.toolbar.OverviewContainer.WORKFLOW_STATE){_8e=[];_8e.label=_8d.category[j].label;_8e.term=_8d.category[j].term;}}}return _8e;},_getPendingState:function(_8f){var _90=null;if(_8f.category){for(var j=0,l=_8f.category.length;j<l;j++){if(_8f.category[j].scheme&&_8f.category[j].scheme===ibm.toolbar.OverviewContainer.PENDING_STATE){_90=[];_90.term=_8f.category[j].term;_90.label=_8f.category[j].label;}}}return _90;},_getWorkflowStage:function(_91){var me=this;var _92={name:"mime-type",value:"application/json"};var _93=function(_94){if(typeof _94.entry.title==ibm.toolbar.OverviewContainer.STRING){me.fillPageProperties(_94.entry.title);}else{me.fillPageProperties(_94.entry.title.value);}};var _95=function(_96,_97){me.fillPageProperties(null);};var _98=null;dojo.forEach(_91.link,function(_99){if(_99.rel===ibm.toolbar.OverviewContainer.WORKFLOW_STAGE){_98=_99.href;}},this);if(_98){var _9a=this._addParamToURL(_98,_92.name,_92.value);this.getData(_9a,_93,_95,"json");}else{this.fillPageProperties();}},_formatWCMItemType:function(_9b){return _9b.substring(7);},_createPageAssociationRow:function(_9c,_9d,_9e,_9f,_a0,_a1){var me=this;var _a2;if(_9c===ibm.toolbar.OverviewContainer.IBM_WCM_PROVIDER){_a2=dojo.create("div",{id:this.id+"-wcmAssociations",className:"utb-entry",tabIndex:"0"});_a1=me.editContent;}else{if(_9c===ibm.toolbar.OverviewContainer.IBM_CONN_PROVIDER){_a2=dojo.create("div",{id:this.id+"-communityAssociations",className:"utb-entry",tabIndex:"0"});_a1=me.editCommunity;}else{_a2=dojo.create("div",{className:"utb-entry",tabIndex:"0"});}}dojo.create("div",{innerHTML:this._escapeHTML(_9d),className:"utb-name-text"},_a2);var _a3=null;if(_9e){if(typeof _9e=="object"){if(_9e.length>0){_a3=dojo.create("div",{innerHTML:this._escapeHTML(_9e[0]),className:"lotusEllipsis utb-valueText lotusLeft"},_a2,"last");var _a4=dojo.create("div",{innerHTML:this._escapeHTML(_9e[1]),className:"utb-lightText lotusLeft"},_a2,"last");this._createAssociationsTooltip(_a3,_9f);this._createAssociationsTooltip(_a4,_9f);}else{_a3=dojo.create("div",{innerHTML:this.noneTxt,className:"utb-valueText lotusLeft"},_a2,"last");this._createAssociationsTooltip(_a3,[this.noneTxt]);}}else{_a3=dojo.create("div",{innerHTML:this._escapeHTML(_9e),className:"lotusEllipsis utb-valueText lotusLeft"},_a2,"last");if(_9e===this.noneTxt){this._createAssociationsTooltip(_a3,[this.noneTxt]);}else{this._createAssociationsTooltip(_a3,_9f);}}}else{dojo.create("span",{innerHTML:this.noneTxt,className:"lotusEllipsis utb-valueText lotusLeft"},_a2,"last");this._createAssociationsTooltip(_a3,[this.noneTxt]);}if(_a0){var _a5=dojo.create("div",null,_a2);var a=dojo.create("a",{className:"utb-hoverLink",href:"javascript:void(0);",innerHTML:this.editTxt},_a5);var _a6=null;if(_a1){_a6=dojo.partial(_a1,me);}this.connections.push(dojo.connect(_a2,"onclick",this,_a6));this.connections.push(dojo.connect(_a2,"onfocus",function(e){me._toggleFocus(_a2,true);}));this.connections.push(dojo.connect(_a2,"onblur",function(e){me._toggleFocus(_a2,false);}));this.connections.push(dojo.connect(_a2,"onkeydown",function(e){if(e.keyCode==13){_a6();}}));}else{var _a7=dojo.create("div",{className:"lotusClear"},_a2);}return _a2;},_createAssociationsTooltip:function(_a8,_a9){var _aa="";dojo.forEach(_a9,function(_ab){if(_aa===""){_aa+=_ab;}else{_aa+=", "+_ab;}});this._createTooltip(_a8,_aa,"above");},_getImageClassForWcmType:function(_ac){var _ad="";if(_ac.substring(_ac.length-9,_ac.length)=="Component"){_ad="wcm-component";}else{switch(_ac){case "Category":_ad="wcm-category";break;case "Folder":_ad="wcm-folder";break;case "Content":_ad="wcm-content";break;case "PortalPage":_ad="wcm-page";break;case "PageTemplate":_ad="wcm-pageTemplate";break;case "PresentationTemplate":_ad="wcm-presentationTemplate";break;case "Project":_ad="wcm-project";break;case "ProjectTemplate":_ad="wcm-projectTemplate";break;case "Taxonomy":_ad="wcm-taxonomy";break;case "Workflow":_ad="wcm-workflow";break;case "WorkflowAction":_ad="wcm-workflowAction";break;case "WorkflowStage":_ad="wcm-workflowStage";break;case "SiteArea":_ad="wcm-siteArea";break;case "ContentTemplate":_ad="wcm-contentTemplate";break;default:_ad="wcm-component";break;}}return _ad;},_createOneRow:function(_ae,_af,_b0,_b1,id,_b2,_b3,_b4,_b5,_b6){var _b7=this._getImageClassForWcmType(_b2);var _b8=dojo.create("div",{className:"lotusClear utb-entry utb-project-entry",id:this.id+"-"+id,tabindex:"0"});var _b9=dojo.create("span",{className:"lotusLeft"},_b8);dojo.create("img",{src:this.blankImg,height:"18px",width:"18px",className:"pagebuilderSprite "+_b7},_b9);var _ba=this._escapeHTML(_ae.value);var _bb={innerHTML:_ba,lang:_ae.lang,dir:ibm.toolbar.ProjectSupport.isRTL(_ae.lang)?"RTL":"LTR"};if(_b6){_bb.className="utb-ellipsis utb-entry-title";}else{_bb.className="utb-entry-title";}var _bc=dojo.create("div",_bb,_b8);this._createTooltip(_bc,_ba,"above");if(_b0){var _bd=dojo.create("span",{innerHTML:this._escapeHTML(_b0),className:"utb-lightText lotusLeft"},_b8,"last");}if(_b3){var a=dojo.create("a",{className:"utb-hoverLink",id:this.id+"-hover-action-"+(_b5?_b5:this.readTxt),href:"javascript:void(0);",innerHTML:(_b5?_b5:this.readTxt)},_b8,"last");var me=this;var _be=null;if(_b4){_be=dojo.partial(_b4,id,_ae.value);}else{var _bf=null;if(_b2){_bf=me._formatWCMItemType(_b2);}_be=dojo.partial(me.editWCMItem,id,_ae.value,_bf);}this.connections.push(dojo.connect(_b8,"onclick",this,_be));this.connections.push(dojo.connect(_b8,"onfocus",function(e){me._toggleFocus(_b8,true);}));this.connections.push(dojo.connect(_b8,"onblur",function(e){me._toggleFocus(_b8,false);}));this.connections.push(dojo.connect(_b8,"onkeydown",function(e){if(e.keyCode==13){_be();}}));}return _b8;},_createTooltip:function(_c0,_c1,pos){if(typeof pos===ibm.toolbar.OverviewContainer.STRING){var _c2=new dijit.Tooltip({connectId:[_c0],label:_c1,position:[pos]});}else{var _c2=new dijit.Tooltip({connectId:[_c0],label:_c1});}return _c2;},_createMessageBoxContent:function(_c3){var _c4;var _c5;var _c6;if(this.currentProjectID){if(ibmToolbarConfig.hasEditPermission===true){return false;}}else{if(ibmToolbarConfig.hasEditPermission===true){if(ibmToolbarConfig.isPrivate){_c4=this.customizingYourPage;}else{return false;}}else{if(ibmToolbarConfig.hasPrivilegedPermission===true){if(ibmToolbarConfig.isPrivate){_c4=this.customizingYourPage;}else{_c4=this.customizingThisPage;}}}}if(!_c4){var _c7=ibm.toolbar.ProjectSupport.canCreateDraft(this.uuid);if(_c7){if(this.currentProjectID){_c4=this.editPageConditionTxt;_c5=this.createDraftTxt;_c6=function(){this.createDraftPage();};}else{_c4=this.mustBeInProjectTxt;}}else{_c4=this.noEditPagePermissionTxt;}}var _c8;if(_c4){if(_c5&&_c6){_c4=_c4+" ";var _c9=dojo.create("a",{className:"lotusAction",href:"javascript:void(0);",innerHTML:this._escapeHTML(_c5)},this.messageBody,"last");this.connections.push(dojo.connect(_c9,"onclick",this,_c6));}dojo.create("span",{innerHTML:this._escapeHTML(_c4)},this.messageBody,"first");this._setVisibility(this.messageBox,true);_c8=true;}else{this._setVisibility(this.messageBox,false);_c8=false;}return _c8;},_createPropertiesBlock:function(_ca){var me=this;var _cb=dojo.create("div",{className:"utb-page-block"});var _cc=function(){me.editPageProperties();};dojo.forEach(_ca,function(_cd){var div=dojo.create("div",(_cd.divID?{id:this.id+"-"+_cd.divID,className:"utb-entry"}:null),_cb);var _ce=dojo.create("div",{innerHTML:this._escapeHTML(_cd.name),className:"utb-name-text"},div);var _cf=null;var _d0=null;var _d1=this._escapeHTML(_cd.value);if(_cd.name===me.nameTxt){var _d2=dojo.create("div",{className:"lotusRight"},div,"last");_cf=dojo.create("div",{innerHTML:_d1,className:"lotusEllipsis utb-blockHeading utb-valueText-long lotusLeft"},div,"last");_d0=dojo.create("div",{className:"lotusClear"},div,"last");}else{_cf=dojo.create("div",{innerHTML:_d1,className:"lotusEllipsis utb-valueText lotusLeft"},div);_d0=dojo.create("div",{className:"lotusClear"},div,"last");}this._createTooltip(_cf,_d1,"above");if(ibmToolbarConfig.hasEditPermission===true){var _d3=dojo.create("span",{className:"utb-editText",innerHTML:me.editTxt},_d2,"last");}},this);if(ibmToolbarConfig.hasEditPermission===true){this.connections.push(dojo.connect(_cb,"onclick",this,_cc));this.connections.push(dojo.connect(this.pagePropsBlockDiv,"onfocus",function(e){me._toggleFocus(_cb,true);}));this.connections.push(dojo.connect(this.pagePropsBlockDiv,"onblur",function(e){me._toggleFocus(_cb,false);}));this.connections.push(dojo.connect(this.pagePropsBlockDiv,"onkeydown",function(e){if(e.keyCode==13){me.editPageProperties();}}));}return _cb;},_toggleFocus:function(_d4,add){if(add){dojo.addClass(_d4,"utb-editHover");}else{dojo.removeClass(_d4,"utb-editHover");}},_createUrl:function(_d5,_d6,_d7){var _d8=null;var uri="";if(_d7){uri=this._createPocUri(_d5+_d7);}else{uri=this._createPocUri(_d5);}var _d9=null;dojo.forEach(_d6,function(_da){if(_d9){_d9=this._addParamToURL(_d9,_da.name,_da.value);}else{_d9=this._addParamToURL(uri,_da.name,_da.value);}},this);return _d9;},_createPocUri:function(uri){var _db=ibmCfg.portalConfig.contentHandlerURI;return this._addParamToURL(_db,"uri",uri);},_getCurrentProjectID:function(){return ibm.toolbar.ProjectSupport.getCurrentProjectUUID();},_isManagedPagesEnabled:function(){return ibm.toolbar.ProjectSupport.confirmManagedPages();},_addAllLink:function(_dc){var _dd=dojo.create("a",{"aria-disabled":"false",className:"utb-link",innerHTML:this.viewallTxt},this.headerProjectContent);this.connect(_dd,"onclick",dojo.hitch(this,function(){this.viewAllProjectContent(_dc);}));},_addMoreLink:function(_de,_df){var _e0=dojo.create("a",{"aria-disabled":"false",className:"utb-link",innerHTML:this.moreTxt},_de);this.connect(_e0,"onclick",dojo.hitch(this,function(){this.viewAllProjectContent(_df);}));},_getCurrentPageContentID:function(){return this.pageId;},_addParamToURL:function(url,_e1,_e2){if(url&&_e1){var _e3=null;var _e4=url.lastIndexOf("#");var _e5=null;if(_e4>-1){_e5=url.substring(_e4);_e3=url.substring(0,_e4);}else{_e3=url;}var _e6=null;var _e7=_e3.indexOf("?");if(_e7!=-1){var _e8=_e3.lastIndexOf(";",_e7);if(_e8!=-1){_e6=_e3.substring(_e8);_e3=_e3.substring(0,_e8);}if(_e3.length-1>_e7){_e3=_e3+"&";}}else{_e3=_e3+"?";}if(_e2){if(_e2 instanceof Array){for(i=0;i<_e2.length;i++){_e3=_e3+encodeURIComponent(_e1)+"="+encodeURIComponent(_e2[i]);if(i+1<_e2.length){_e3=_e3+"&";}}}else{_e3=_e3+encodeURIComponent(_e1)+"="+encodeURIComponent(_e2);}}else{_e3=_e3+encodeURIComponent(_e1)+"=";}if(_e6){_e3=_e3+_e6;}if(_e5){_e3=_e3+_e5;}return _e3;}else{return url;}},startup:function(){this.started=true;this.setupUI();},undo:function(_e9){this.inherited(arguments);},makeDirty:function(_ea){this.dirty=_ea;},processChange:function(_eb){this.apply(_eb);},apply:function(_ec){},beforeSubmit:function(_ed){var dfd=new dojo.Deferred();dfd.callback();return dfd;},submit:function(_ee){if(this.dirty){this.makeDirty(false);}if(_ee.onComplete){_ee.onComplete();}}});ibm.toolbar.OverviewContainer.EDIT="edit";ibm.toolbar.OverviewContainer.WORKFLOW_STAGE="workflow-stage";ibm.toolbar.OverviewContainer.WORKFLOW_STATE="wcmrest:workflowState";ibm.toolbar.OverviewContainer.PENDING_STATE="wcmrest:pendingState";ibm.toolbar.OverviewContainer.PENDING_DELETED="PENDING_DELETED";ibm.toolbar.readWCMItemURLPrefix="?uri=dialog:wcm&wcmHiddenPortlet=true&action=read&docid=com.ibm.workplace.wcm.api.WCM_${0}/";ibm.toolbar.showPagePropertiesURLPrefix="?uri=epp:dialogState&pageid=";ibm.toolbar.OverviewContainer.SAVE="save";ibm.toolbar.OverviewContainer.NONE="none";ibm.toolbar.OverviewContainer.STRING="string";ibm.toolbar.OverviewContainer.PORTAL_PAGE="PortalPage";ibm.toolbar.OverviewContainer.IBM_WCM_PROVIDER="ibm.wcm.provider";ibm.toolbar.OverviewContainer.IBM_CONN_PROVIDER="ibm.connections.provider";if(!dojo._hasResource["com.ibm.pb.customize.AddContentPaletteContainer"]){dojo._hasResource["com.ibm.pb.customize.AddContentPaletteContainer"]=true;dojo.provide("com.ibm.pb.customize.AddContentPaletteContainer");dojo.declare("com.ibm.pb.customize.AddContentPaletteContainer",[com.ibm.pb.customize.LotusPaletteContainer],{createProxyURI:null,pendingItems:null,beforeSubmitDfds:null,afterSubmitDfds:null,allowedListJsonFile:null,constructor:function(){this.label=this.nlsBundle["add_content_browseContent"];this.tabLabel=this.nlsBundle["add_content_launchLabel2"];this.pendingItems={};this.beforeSubmitDfds=[];this.afterSubmitDfds=[];},processJSON:function(){if(this.hasAllowedPortletsList()){this.jsonFile=this.allowedListJsonFile;}this.inherited(arguments);},hasAllowedPortletsList:function(){var _ef=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID(),_f0=this.navModel.find(_ef).start(),_f1=this.navModel.getLayoutModel(_f0.getID()),_f2=_f1.getRoot().start(),xml=_f2.getXml(),_f3="//*[model:allPortletsAllowed=\"false\"]";return com.ibm.mashups.enabler.xml.XPath.evaluateBoolean(_f3,xml,{atom:"http://www.w3.org/2005/Atom",model:"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements"});}});}if(!dojo._hasResource["com.ibm.pb.customize.ChangeStylePaletteContainer"]){dojo._hasResource["com.ibm.pb.customize.ChangeStylePaletteContainer"]=true;dojo.provide("com.ibm.pb.customize.ChangeStylePaletteContainer");dojo.declare("com.ibm.pb.customize.ChangeStylePaletteContainer",[com.ibm.pb.customize.LotusPaletteContainer],{numRows:3,baseCssPath:"",constructor:function(){this.label=this.nlsBundle["change_style_browseStyles"];this.tabLabel=this.nlsBundle["change_style_launchLabel2"];this.themeBundle=dojo.i18n.getLocalization("com.ibm.bundles","Theme");},postCreate:function(){this.inherited("postCreate",arguments);dojo.addClass(this.domNode,"lotusLargeWidgets");this.connect(this,"apply","changeSelection");},setupUICallback:function(_f4){dojo.forEach(_f4,dojo.hitch(this,function(_f5){_f5.hub.fetch({onComplete:dojo.hitch(this,function(_f6){dojo.forEach(_f6,dojo.hitch(this,function(_f7){if(_f7.id[0]!="initial"&&dojo.query("[title~="+_f7.id[0]+"]").length==0){this._loadCss(this.baseCssPath+_f7.url[0],_f7.id[0],true,true);}}));})});}));this.inherited(arguments);},changeSelection:function(_f8){this.changeSelected(_f8.id);},newCell:function(_f9,_fa){var _fb=this.inherited(arguments),_fc=dijit.byNode(_fb),_fd=dojo.getObject("ibmCfg.themeConfig.editStyle");if(_fd&&_fc&&_fc.textBlock){var _fe=dojo.create("a",{href:"javascript:void(0);",className:"editStyleLink",innerHTML:this.themeBundle.edit_title},_fc.textBlock);_fc.connect(_fe,"onclick",function(){ibmCfg.themeConfig.editStyle({source:_f9,item:_fa,node:_fe,apply:_fc.apply});});}return _fb;}});}if(!dojo._hasResource["com.ibm.pb.customize.ChangeLayoutPaletteContainer"]){dojo._hasResource["com.ibm.pb.customize.ChangeLayoutPaletteContainer"]=true;dojo.provide("com.ibm.pb.customize.ChangeLayoutPaletteContainer");dojo.declare("com.ibm.pb.customize.ChangeLayoutPaletteContainer",[com.ibm.pb.customize.LotusPaletteContainer],{numRows:3,columnHash:{},constructor:function(){this.label=this.nlsBundle["change_layout_browseLayouts"];this.tabLabel=this.nlsBundle["change_layout_launchLabel2"];},postCreate:function(){this.inherited("postCreate",arguments);dojo.addClass(this.domNode,"lotusLargeWidgets hasLotusMessage");var _ff=this.createLotusMsgNode(this.nlsBundle.change_layout_save_warning,"Warning");this.center.appendChild(_ff);this.connect(this,"apply","changeSelection");},changeSelection:function(args){this.changeSelected(args.id);}});}if(!dojo._hasResource["com.ibm.UnloadGuard"]){dojo._hasResource["com.ibm.UnloadGuard"]=true;dojo.provide("com.ibm.UnloadGuard");(function(){var _100={};var _101=function(){for(var x in _100){if(_100[x]&&_100[x].length>0){return x;}}return false;};var _102=function(_103){if(!_100[_103]){_100[_103]=[];}_100[_103].push(true);};var _104=function(_105){if(_100[_105]){_100[_105].pop();}if(!_101()){dojo.publish("/window/unload/nonePending");}};dojo.subscribe("/window/unload/addPending",null,_102);dojo.subscribe("/window/unload/removePending",null,_104);window.onbeforeunload=function(){var msg=_101();if(msg!==false){return msg;}};})();}if(!dojo._hasResource["com.ibm.widgets.InlineShelf"]){dojo._hasResource["com.ibm.widgets.InlineShelf"]=true;dojo.provide("com.ibm.widgets.InlineShelf");dojo.require("dijit._Widget");dojo.require("dijit._Templated");dojo.declare("com.ibm.widgets.InlineShelf",[dijit._Widget,dijit._Templated],{content:null,link:null,shelfClass:"",displayState:"closed",everOpened:false,wipeOut:null,wipeIn:null,wipeTime:300,templateString:"<div dojoAttachPoint=\"focusNode\" style=\"display: none;\" class=\"${shelfClass}\"></div>",startup:function(){this.wipeOut=dojo.fx.wipeOut({node:this.domNode,duration:this.wipeTime});this.wipeIn=dojo.fx.wipeIn({node:this.domNode,duration:this.wipeTime});if(this.content){this.domNode.appendChild(this.content);}this.onCreate();},connectButton:function(){if(dojo.isString(this.link)){this.link=dojo.byId(this.link);}if(this.link&&!this.buttonConnection){this.buttonConnection=dojo.connect(this.link,"onclick",this,this.toggleDisplay);dojo.removeClass(this.link,"lotusBtnDisabled");}},disconnectButton:function(){if(this.displayState=="open"){this.toggleDisplay();}if(this.buttonConnection){dojo.disconnect(this.buttonConnection);this.buttonConnection=null;}if(this.link){dojo.addClass(this.link,"lotusBtnDisabled");}},toggleDisplay:function(){if(this.displayState=="open"){this.displayState="closed";this.onClose();if(dojo.isIE){dojo.style(this.domNode,"display","none");}else{this.wipeOut.play();}if(this.link){dojo.removeClass(this.link,"ibmCompressed");}}else{if(this.displayState=="closed"){this.displayState="open";this.onOpen();if(!this.everOpened){this.startup();}if(dojo.isIE){dojo.style(this.domNode,"display","");}else{this.wipeIn.play();}if(!this.everOpened){this.onFirstOpen();this.everOpened=true;}if(this.link){dojo.addClass(this.link,"ibmCompressed");}}}},onCreate:function(){},onOpen:function(){},onFirstOpen:function(){},onClose:function(){}});}if(!dojo._hasResource["com.ibm.pb.customize.enabler.TabbedController"]){dojo._hasResource["com.ibm.pb.customize.enabler.TabbedController"]=true;dojo.provide("com.ibm.pb.customize.enabler.TabbedController");dojo.require("dojo.i18n");dojo.require("dojo.DeferredList");dojo.declare("com.ibm.pb.customize.enabler.TabbedController",[com.ibm.widgets.InlineShelf],{childrenArray:[],imagePath:".",hiddenClass:"lotusHidden",selectedClass:"lotusSelected",navModel:null,widgetModel:null,selectedChild:null,templateString:"<div class=\"lotusui ibmPortalCustomizeShelf lotusPalette\" style=\"display: none;\">"+"<div class=\"lotusPaletteHeader\">"+"<ul dojoAttachPoint=\"tabs\" class=\"lotusTabs\"></ul>"+"</div>"+"<div dojoAttachPoint=\"containerDivs\"></div>"+"</div>",refreshRetryInterval:300,constructor:function(){this.logger=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.pb.customize.enabler.TabbedController");this.logger.entering("contructor");this.bundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.messages=dojo.i18n.getLocalization("com.ibm.bundles","SharedMessages");this.okText=this.bundle["shelf_saveChanges"];this.cancelText=this.bundle["add_content_cancel"];this.eventService=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");this.eventService.subscribeEvent("com.ibm.mashups.builder.changePageMode",this,this.onPageModeChanged);this.saveInProgress=false;this.changedToPageViewMode=false;this.logger.exiting("contructor");},destroy:function(){dojo.forEach(this.childrenArray,function(_106){_106.controller.destroy();});this.inherited(arguments);},onPageModeChanged:function(_107){var nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();if(_107=="edit"){nsm.startTransaction();}else{if(_107=="view"){if(this.saveInProgress){this.changedToPageViewMode=true;}else{nsm.discardTransaction();}}}},onFirstOpen:function(){this.logger.entering("onFirstOpen");this.fillTabs();this.logger.exiting("onFirstOpen");},onStartup:function(){this.logger.entering("onStartup");this.logger.exiting("onStartup");},onShowTab:function(_108){this.logger.entering("onShowTab",[_108]);this.logger.exiting("onShowTab",[_108]);},fillTabs:function(){this.logger.entering("fillTabs");var _109=0,_10a=0;dojo.forEach(this.childrenArray,dojo.hitch(this,function(_10b){var div=dojo.create("div",{className:this.hiddenClass,"id":this.id+_109+"P","role":"tabpanel","aria-labelledby":this.id+_109,"aria-hidden":"true"},this.containerDivs);dojo.place(_10b.controller.domNode,div);_10b.containerDiv=div;var tab=dojo.create("li");var _10c=dojo.create("a",{innerHTML:_10b.controller.tabLabel,href:"javascript:void(0)","role":"tab","id":this.id+_109,"aria-controls":this.id+_109+"P"},tab);dojo.place(tab,this.tabs);_10b.tab=tab;_10c.onclick=dojo.hitch(this,this.showTab,_10b);if(_10b.controller.id==this.selectedChild){_10a=_109;}_109++;}));if(this.childrenArray.length==0){this.disconnectButton();}else{this.showTab(this.childrenArray[_10a]);}this.onStartup();this.logger.exiting("fillTabs");},showTab:function(_10d){this.logger.entering("showTab",[_10d]);if(!_10d.controller.started){_10d.controller.startup(this);}dojo.forEach(this.childrenArray,dojo.hitch(this,function(_10e){dojo.removeClass(_10e.tab,this.selectedClass);dojo.addClass(_10e.containerDiv,this.hiddenClass);dojo.attr(_10e.containerDiv,"aria-hidden","true");}));dojo.addClass(_10d.tab,this.selectedClass);dojo.removeClass(_10d.containerDiv,this.hiddenClass);dojo.attr(_10d.containerDiv,"aria-hidden","false");this.onShowTab(_10d);this.selectedChild=_10d.controller.id;this.logger.exiting("showTab",[_10d]);return false;},refreshTabs:function(_10f){var _110=false;if(this.childrenArray.length!=_10f.length){_110=true;}else{for(var i=0,l=_10f.length;i<l;i++){var _111=false;for(var j=0,l2=this.childrenArray.length;j<l2;j++){if(_10f[i].controller.id==this.childrenArray[j].controller.id){_111=true;break;}}if(!_111){_110=true;break;}}}if(_110){this.childrenArray=_10f;if(!this.everOpened){return;}while(this.containerDivs.children.length>0){this.containerDivs.removeChild(this.containerDivs.firstChild);}while(this.tabs.children.length>0){this.tabs.removeChild(this.tabs.firstChild);}this.fillTabs();}},clearSelectedTab:function(){this.selectedChild=null;},undoChildren:function(){this.logger.entering("undoChildren");dojo.forEach(this.childrenArray,dojo.hitch(this,function(_112){_112.controller.undo();}));this.logger.entering("exiting");},beforeSave:function(_113){this.logger.entering("beforeSave",[_113]);if(!this.childrenArray||this.childrenArray.length==0){_113();return;}this.saveInProgress=true;this.closeOverlay=this.childrenArray[0].controller.showWaitMsgInDialog(this.bundle["shelf_saving"]);var dfdl=new dojo.DeferredList(dojo.map(this.childrenArray,function(_114){return _114.controller.beforeSubmit();},this));setTimeout(dojo.hitch(this,function(){dfdl.addCallback(dojo.hitch(this,_113));}),500);this.logger.exiting("beforeSave",[_113]);},_setDialogErr:function(_115,msg,_116){_115.containerNode.innerHTML=msg;var _117=dojo.create("div",{className:"lotusDialogFooter"},_115.containerNode,"after");if(_116){dojo.create("button",{className:"lotusBtn",innerHTML:this.bundle.add_content_ok,onclick:function(){_116();}},_117);}},saveChildren:function(_118){this.logger.entering("saveChildren",[_118]);var nsm=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _119=null;if(this.childrenArray&&this.childrenArray.length){_119=this.childrenArray[0].controller.waitingDialog;}var _11a=null;var _11b=ibmCfg.themeConfig.alwaysRefreshOnPageSave||com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().isDirty();com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(false);var _11c=this.childrenArray.length;var _11d=dojo.hitch(this,function(){this.logger.entering("counter in saveChildren",[_11c]);if(--_11c===0){var _11e=this.navModel.commit();_11e.setFinishedCallback(dojo.hitch(this,function(ctx){var _11f=ctx.statusCode;if(_11f==200||_11f==201||_11f==400){if(_11f>=300&&_119){_11a=true;var _120="";dojo.forEach(ctx.operations,function(op){if(op.request&&op.request.statusCode>=300){_120+="<br><br>"+op.request.responseText;}},this);this._setDialogErr(_119,this.messages.shelf_customizeError_0+_120,function(){window.location.reload();});}else{var _121=this.widgetModel.commit();_121.setFinishedCallback(dojo.hitch(this,function(x,_122){if(_122==200||_122==201||_122==400){if(_122>=300&&_119&&!_11a){_11a=true;this._setDialogErr(_119,this.messages.shelf_customizeError_0,function(){window.location.reload();});}else{nsm.commitTransaction();if(!this.changedToPageViewMode){nsm.startTransaction();}if(_11b&&!ibmCfg.themeConfig.savePageCheckerUnloading&&(dojo.isOpera||ibmCfg.themeConfig.alwaysRefreshOnPageSave||!ibmCfg.themeConfig.isPageRenderModeCSA)){com.ibm.utilities.refreshPage();}else{if(_11b){this.eventService.broadcastEvent("com.ibm.mashups.builder.layoutRefresh");}}this.closeOverlay();}}else{if(this.changedToPageViewMode){nsm.discardTransaction();}this.logger.severe("saveChildren","Cannot save the widget model",arguments);this.closeOverlay();}_118();this.changedToPageViewMode=false;this.saveInProgress=false;}));_121.start(false);}}else{this.logger.severe("saveChildren","Cannot save the navigation model",arguments);this.closeOverlay();_118();if(this.changedToPageViewMode){nsm.discardTransaction();}this.changedToPageViewMode=false;this.saveInProgress=false;}}),null,true);_11e.start(false);}this.logger.exiting("counter in saveChildren",[_11c]);});var _123=dojo.hitch(this,function(_124){this.logger.entering("handleError in saveChildren",[_124]);_11d();var _125=this.bundle["add_content_addContentError"];var _126="";if(_124){_125=_124[0].message;_126=_124[0].responseText;}if(_125.match(/\D401/)){_126=_125;_125=this.bundle["shelf_session_timeout"];}this.logger.severe("handleError in saveChildren",_125+" : "+_126,[_124]);this.logger.entering("handleError in saveChildren",[_124]);});dojo.forEach(this.childrenArray,function(_127){if(_127.controller.refresh&&_127.controller.dirty){_11b=true;}_127.controller.submit({onComplete:_11d,onError:_123});},this);this.logger.exiting("saveChildren",[_118]);}});}if(!dojo._hasResource["com.ibm.portal.fx.Transitions"]){dojo._hasResource["com.ibm.portal.fx.Transitions"]=true;dojo.provide("com.ibm.portal.fx.Transitions");dojo.require("dojo.fx");dojo.require("dojo.NodeList-fx");com.ibm.portal.fx.Transitions={collapsePortlets:function(_128,args){dojo.query(_128||".wpsPortletBody").wipeOut(dojo.mixin({duration:1000},args)).play();},uncollapsePortlets:function(_129,args){dojo.query(_129||".wpsPortletBody").wipeIn(dojo.mixin({duration:1000},args)).play();},combineMapAnimations:function(map,prop){prop=prop||"animation";return dojo.fx.combine(dojo.map(map,function(obj){return obj.animation;}));},chainMapAnimations:function(map,prop){prop=prop||"animation";return dojo.fx.chain(dojo.map(map,function(obj){return obj.animation;}));},fadeToOverlay:function(_12a,args,_12b){return dojo.query(_12a,_12b).map(function(node){var _12c=dojo.doc.createElement("div");var cds=dojo.coords(node);dojo.style(_12c,"position","absolute");dojo.style(_12c,"top",(cds.y-dojo.style(node,"marginTop"))+"px");dojo.style(_12c,"left",(cds.x-dojo.style(node,"marginLeft"))+"px");dojo.style(_12c,"height",cds.h+"px");dojo.style(_12c,"width",cds.w+"px");dojo.addClass(_12c,"fxOverlay");dojo.style(_12c,"border","solid 2px orange");dojo.style(_12c,"opacity",0);dojo.body().appendChild(_12c);var anim=dojo.fx.combine([dojo.fadeIn(dojo.mixin({node:_12c},args)),dojo.fadeOut(dojo.mixin({node:node},args))]);return {overlay:_12c,node:node,animation:anim};});},fadeOutOverlay:function(map,args){return dojo.map(map,function(obj){var anim=dojo.fx.combine([dojo.fadeOut(dojo.mixin({node:obj.overlay},args)),dojo.fadeIn(dojo.mixin({node:obj.node},args))]);return {overlay:obj.overlay,node:obj.node,animation:anim};});},positionOverlay:function(map,args){return dojo.map(map,function(obj){var _12d=dojo.coords(obj.node);var _12e=dojo.coords(obj.overlay);var _12f=dojo.animateProperty(dojo.mixin({node:obj.overlay,properties:{width:{start:_12e.w,end:_12d.w,unit:"px"},height:{start:_12e.h,end:_12d.h,unit:"px"}}},args));var anim=dojo.fx.combine([dojo.fx.slideTo(dojo.mixin({node:obj.overlay,unit:"px",left:_12d.l,top:_12d.t},args)),_12f]);return {overlay:obj.overlay,node:obj.node,animation:anim};});},showOverlayDisable:function(node,_130){var _131=dojo.query(node);var _132=[];for(var i=0;i<_131.length;i++){_131[i].style.position="relative";var _133=document.createElement("div");dojo.addClass(_133,"ibmPortalOverlayShow");if(_130){dojo.addClass(_133,"ibmPortalLoading");}dojo.style(_133,"height",_131[i].offsetHeight+"px");dojo.style(_133,"width",_131[i].offsetWidth+"px");_132.push(_133);_131[i].appendChild(_133);}return _132;},hideOverlayDisable:function(_134){for(var i=0;i<_134.length;i++){_134[i].parentNode.removeChild(_134[i]);}}};}if(!dojo._hasResource["com.ibm.pb.customize.enabler.AddContentController"]){dojo._hasResource["com.ibm.pb.customize.enabler.AddContentController"]=true;dojo.provide("com.ibm.pb.customize.enabler.AddContentController");dojo.require("dojo.string");dojo.require("dojo.i18n");dojo.require("dojo.DeferredList");com.ibm.pb.customize.enabler.AddContentController={dirty:false,started:false,refresh:true,navModel:null,imagePath:"",pendingItems:{},placeholders:[],ibmMainContainer:"ibmMainContainer",layoutParser:com.ibm.pb.layout.LayoutParser,startup:function(){this.logger.entering("startup");this.started=true;this.eventService=com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService");this.setupUI();this.logger.exiting("startup");},makeDirty:function(_135){this.logger.entering("makeDirty",[_135]);this.dirty=_135;this.logger.exiting("makeDirty",[_135]);},processChange:function(args){if(!this.dirty){this.makeDirty(true);}if(args.takeoverFcn){args.takeoverObject=dojo.mixin(args.takeoverObject,{controller:this});if(dojo.isString(args.takeoverFcn)){return dojo.getObject(args.takeoverFcn)(args.takeoverObject);}else{return args.takeoverFcn(args.takeoverObject);}}else{return this.apply(args);}},apply:function(args){this.logger.entering("apply",[args]);this.dialog.hide();var _136=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();var _137=this.navModel.getLayoutModel(_136);var _138=null,_139=null,_13a="";if(args.cID){_13a=args.cID;_139=_137.find(_13a);if(_139){_139.setFinishedCallback(dojo.hitch(this,"_apply"),{layoutModel:_137,args:args});_139.start(false);}else{this.logger.severe("apply","Cannot find dnd container in the layout model",[args]);}}else{var _13b=dojo.query("[name~="+this.ibmMainContainer+"]");if(_13b.length>0){_13a=this.layoutParser.extractID(_13b[0]);_139=_137.find(_13a);if(_139){_139.setFinishedCallback(dojo.hitch(this,"_apply"),{layoutModel:_137,args:args});_139.start(false);}else{this.logger.severe("apply","Cannot find main container in the layout model",[args]);}}else{var _13c=_137.getRoot();if(_13c){var root=_13c.start();}else{this.logger.severe("apply","Cannot find root layout container in the model",[args]);return;}var iter=_137.getChildren(root);while(iter.hasNext()){_138=iter.next();if(dojo.byId(_138.getID())){break;}}if(_138){this._apply(_138,"200",{layoutModel:_137,args:args});}else{this.logger.severe("apply","Cannot find any containers in the layout model",[args]);}}}this.logger.exiting("apply",[args]);},_apply:function(_13d,_13e,x){this.logger.entering("_apply",[_13d,_13e,x]);if(_13e!=200){this.logger.severe("_apply","Could not find container in the layout model. Cannot Add Content",[_13d,_13e,x]);return;}if(_13d instanceof com.ibm.mashups.enabler.layout.LayoutContainer){var _13f=null;if(x.args.cID&&!x.args.sID){_13f=null;}else{if(x.args.sID){var _140=x.args.sID;if(_140){nextSiblingDef=x.layoutModel.find(_140);}if(nextSiblingDef){_13f=nextSiblingDef.start();}if(!_13f){this.logger.warning("_apply","Cannot find dnd sibling control in the layout model. Setting it to null.",[_13d,_13e,x]);}}else{var iter=x.layoutModel.getChildren(_13d);if(iter.hasNext()){_13f=iter.next();}}}if(_13f&&!(_13f instanceof com.ibm.mashups.enabler.layout.LayoutControl)){this.logger.warning("_apply","Next sibling control is not an instance of com.ibm.mashups.enabler.layout.LayoutControl. Setting it to null.",[_13d,_13e,x]);_13f=null;}var _141=com.ibm.mashups.enabler.layout.Constants;var _142={};_142[_141.CONTEXT_TYPE]=_141.LAYOUT_CONTROL;if(x.args.definitionURL){_142[_141.CONTEXT_WIDGET_DEFINITION_URL]=x.args.definitionURL;}else{_142[_141.CONTEXT_WIDGET_DEFINITION_ID]=new com.ibm.pb.customize.Identifiable(x.args.id);}_142[_141.DISPLAY_TITLE]=x.args.label;var _143=x.layoutModel.create(_142);_143.setTitle(x.args.label,dojo.locale);x.layoutModel.insert(_143,_13d,_13f);this.pendingItems[x.args.label]=_143;if(x.args.prefsMapFcn){this._addPreferences(_143,x.args.prefsMapFcn,x.args);}this._addPreviewToPage(_143,_13d,_13f,x.args.label);}else{this.logger.severe("_apply","Container is not an instance of com.ibm.mashups.enabler.layout.LayoutContainer",[_13d,_13e,x]);}com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);this.logger.exiting("_apply",[_13d,_13e,x]);},_addPreviewToPage:function(_144,_145,_146,_147){var _148=_144.getID(),_149=_145.getID();var _14a=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");var _14b=ibmCfg.themeConfig.modulesWebAppBaseURI+"/modules/pagebuilder/css/images/defaultFileIcon_32.png";var _14c=_14a["add_content_noPreviewSaved1"];var _14d=_14a["add_content_noPreviewSaved2"];var _14e=_14a["add_content_noPreviewSaved3"];var _14f=dojo.create("div",{className:"component-control dojoDndItem id-"+_148,dndtype:"lm"});var _150=dojo.create("div",{className:"ibmPortalControl wpthemeControl wpthemeHidden",role:"region"},_14f);_150.setAttribute("aria-labelledby","wbRegionId"+_148);var _151=dojo.create("div",{className:"wpthemeControlHeader dojoDndHandle"},_150);_151.innerHTML="<div class=\"wpthemeInner\"><h2 id=\"wpRegionId"+_148+"\"><span id=\"regionSection"+_148+"\"></span><span>"+_147+"</span></h2></div>";var _152=dojo.create("div",{className:"wpthemeControlBody wpthemeOverflowAuto wpthemeClear"},_151,"after");var _153=dojo.create("img",{src:_14b,alt:""},_152);_153.setAttribute("padding-top","5px");var _154=dojo.create("span",{innerHTML:_14c},_152);var _155=dojo.create("a",{href:"javascript:;"},_152);_155.innerHTML=" "+_14d+" ";var _156=dojo.create("span",{innerHTML:_14e},_152);if(_146){var _157=this.layoutParser.findById(_146.getID());var _158=dojo.place(_14f,_157,"before");}else{var _159=this.layoutParser.findById(_149);var _158=dojo.place(_14f,_159,"last");}dojo.connect(_155,"onclick",function(){com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.savePage");});if(ibmCfg.controllers.dnd){ibmCfg.controllers.dnd.dndSources[_149].sync();}},_addPreferences:function(_15a,_15b,map){this.logger.entering("_addPreferences",[_15a,_15b,map]);var _15c=this.widgetModel.getWidgetWindow(_15a);_15c.setFinishedCallback(dojo.hitch(this,function(_15d,_15e){if(_15e==200){instanceDef=this.widgetModel.getWidgetInstance(_15d);instanceDef.setFinishedCallback(dojo.hitch(this,function(_15f,_160){if(_160==200){var _161=this.widgetModel.getHierarchicalPreferences(_15f);_161.setFinishedCallback(dojo.hitch(this,function(_162,_163){if(_163==200){var _164={};if(dojo.isString(_15b)){_164=dojo.getObject(_15b)(map);}else{_164=_15b(map);}for(var i in _164){_162.setValue(i,_164[i]);}}else{this.logger.warning("_addPreferences","Cannot preferences for widget instance",[_15a,_15b,map]);}}));_161.start(true);}else{this.logger.warning("_addPreferences","Cannot find instance for widget window",[_15a,_15b,map]);}}));instanceDef.start(true);}else{this.logger.warning("_addPreferences","Cannot find widget window based on newly created control",[_15a,_15b,map]);}}));_15c.start(true);this.logger.exiting("_addPreferences",[_15a,_15b,map]);},undo:function(){this.logger.entering("undo");dojo.forEach(this.beforeSubmitDfds,function(dfd){dfd.cancel();});this.beforeSubmitDfds=[];this.logger.exiting("undo");},beforeSubmit:function(args){this.logger.entering("beforeSubmit",[args]);var dfd=(new dojo.Deferred()).addCallback(dojo.hitch(this,function(){this.logger.entering("beforeSubmit dfd callback");var dfdl=new dojo.DeferredList(this.beforeSubmitDfds,false,false);dojo.forEach(this.beforeSubmitDfds,function(df){if(df.fired<0){df.callback();}});this.beforeSubmitDfds=[];this.logger.exiting("beforeSubmit dfd callback");return dfdl;}));if(args&&args.onError){dfd.addErrback(args.onError);}dfd.callback();this.logger.exiting("beforeSubmit",[args]);return dfd;},submit:function(args){this.logger.entering("submit",[args]);if(this.dirty){this.makeDirty(false);}this.pendingItems={};if(args.onComplete){args.onComplete();}this.logger.exiting("submit",[args]);},addBeforeSubmit:function(dfd){this.logger.entering("addBeforeSubmit",[dfd]);if(dfd){this.beforeSubmitDfds.push(dfd);}this.logger.exiting("addBeforeSubmit",[dfd]);},newFeed:function(args){var _165=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");var form=[{label:_165["new_feed_title"],id:"new_feed_title",value:"",regex:/\S+/,error:_165["new_feed_enterTitle"]},{label:_165["new_feed_url"],id:"new_feed_url",value:"http://",regex:/http:\/\/\S+/,error:_165["new_feed_enterUrl"],ltr:true}];var _166=dojo.hitch(args.controller,function(_167){var _168=_167["new_feed_title"].replace(/<(?:\/?)script>/g,""),url=_167["new_feed_url"].replace(/<(?:\/?)script>/g,"");args.submit(dojo.mixin(args.submitObj,{id:ibmPortalConfig.contentRenderers.feed,label:_168}));this.addBeforeSubmit((new dojo.Deferred()).addCallback(dojo.hitch(this,function(){this._addPreferences(this.pendingItems[_168],this.getFeedspacePreferences,{url:url,label:_168});})));});args.getInfo(form,_165["new_feed_addFeed"],_165["add_content_add"],null,_166);},newWCM:function(args){var _169=args.label?args.label:args.submitObj.hub.getValue(args.submitObj.item,"label","");_169=(args.submitObj.hub&&args.submitObj.hub.nlsBundle&&args.submitObj.hub.nlsBundle[_169])?args.submitObj.hub.nlsBundle[_169]:_169;var _16a=args.submitObj.hub.getValue(args.submitObj.item,"waitingMsg","");_16a=(args.submitObj.hub&&args.submitObj.hub.nlsBundle&&args.submitObj.hub.nlsBundle[_16a])?args.submitObj.hub.nlsBundle[_16a]:_16a;var type=args.type?args.type:args.submitObj.hub.getValue(args.submitObj.item,"type","");var _16b=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");var _16c=dojo.string.substitute(_16b["new_generic_add"],[_169]);var _16d=dojo.hitch(args.controller,function(_16e){var name=dojo.string.trim(_16e["new_wcm_name"]).replace(/<(?:\/?)script>/g,"");if(name&&name.length>0){var _16f=com.ibm.pb.customize.enabler.AddContentController;var _170=args.showInfo(_16a);var _171=dojo.hitch(this,function(_172){_170();if(_172=="false"){args.submit(dojo.mixin(args.submitObj,{id:ibmPortalConfig.contentRenderers.wcm,label:name}));prefsCallback=dojo.hitch(this,function(data){this._addPreferences(this.pendingItems[name],this.getJSRWcmRenderingPreferences,{contextid:data,title:name});});this.addBeforeSubmit((new dojo.Deferred()).addCallback(dojo.hitch(this,"_processCreateLibrary",name,type,prefsCallback,null)));}else{args.getInfo(form,_16c,_16b["add_content_add"],_16b["new_wcm_wcmNameTaken"],_16d);}});_16f._validateNameField(name,type,_171,_170);}else{args.getInfo(form,_16c,_16b["add_content_add"],_16b["new_wcm_wcmNameInvalid"],_16d);}});var form=[{label:_16b["new_wcm_name"],id:"new_wcm_name",value:"",regex:/^[\s\S]/,error:_16b["new_wcm_wcmNameInvalid"]}];args.getInfo(form,_16c,_16b["add_content_add"],null,_16d);},getFeedReaderPreferences:function(_173){var map={};map.feedURL=_173.url;map.title=_173.label;return map;},getFeedspacePreferences:function(_174){var url=_174.url.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/,"&#39;");var _175=_174.label.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/,"&#39;");var map={};map.selection="/0";var _176="<?xml version=\"1.0\" encoding=\"utf-8\"?><opml version=\"2.0\"><head><title><![CDATA[My Subscription List]]></title><dateModified><![CDATA["+Date()+"]]></dateModified></head><body><outline xml:id=\"Subscription_1";_176=_176+"\" text=\""+_175+"\" type=\"rss\" isComment=\"false\" isBreakpoint=\"false\" created=\""+Date()+"\" category=\"\" title=\""+_175+"\" xmlUrl=\""+url+"\" /></body></opml>";map.subscriptions=_176;return map;},getJSRWcmRenderingPreferences:function(args){var _177=args.title.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/,"&#39;");var map={};map.WCM_CONTENT_CONTEXT_IDR=args.contextid;map.WCM_BROADCASTS_TO="WCM_LINKING_NONE";map.WCM_CONTENT_TYPE="CONTENT";map.WCM_CONTENT_CONTEXT_TYPE="sitearea";map.WCM_LISTENS_TO="WCM_LINKING_OTHER";map.WCM_PORTLET_TITLE=_177;map.WCM_PORTLET_TITLE_TYPE="WCM_PORTLET_TITLE_TYPE_GENERAL";return map;},_pageHasContentMapping:function(_178){var _179=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();if(!_178){_178=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();}var page=_179.find(_178).start();var _17a=page.getContent().start();mappingUrl=com.ibm.mashups.enabler.xml.XPath.evaluateString("//atom:link[@portal:rel='contentmapping']/@href",_17a.getXml(),{atom:"http://www.w3.org/2005/Atom",portal:"http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model"});var ret=false;dojo.xhrGet({url:mappingUrl,handleAs:"xml",sync:true,load:function(doc){ret=com.ibm.mashups.enabler.xml.XPath.evaluateBoolean("//contentmapping:content-mapping[((not(@scope)) or (@scope='ibm.wcm') or (@scope='default'))]",doc,{atom:"http://www.w3.org/2005/Atom",contentmapping:"http://www.ibm.com/xmlns/prod/content-mappings/v1.0"});},error:function(_17b){console.error(_17b);}});return ret;},_addResourceListFeed:function(_17c,_17d,_17e,_17f,_180){var _181=ibmPortalConfig.contentHandlerURI;var _182=_181+"?uri=wcmbw:id:"+_17e;var _183=dojo.i18n.getLocalization("com.ibm.bundles","Shelf")["new_wcm_wcmNotCopied"];var _184=dojo.xhrPost({url:_182,content:{blogname:_17c,resourcetype:_17d,pageid:com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID()},handleAs:"json",preventCache:true,load:function(data){var _185=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID(),_186=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel(),page=_186.find(_185).start(),_187=page.getMetaData("param.sharing.scope")!=null,_188=page.confirmSetMetaData("param.sharing.scope");if(_17e=="copylibrary"&&_188&&!_187){page.setMetaData("param.sharing.scope","ibm.wcm.0."+new Date().getTime());}if(_17f){_17f(data.items[0]);}},error:function(_189,_18a){if(_180){_180();}}});return _184;},_validateNameField:function(_18b,_18c,_18d,_18e){var rv=false;if(_18b&&_18b.length>0){rv=true;return com.ibm.pb.customize.enabler.AddContentController._addResourceListFeed(_18b,_18c,"validinput",_18d,_18e);}},_processCreateLibrary:function(name,_18f,_190,_191){var _192=null;var _193="Wiki Template v70";if(_18f=="BLOG_LIBRARY_TYPE"){_193="Blog Template v70";}else{if(_18f=="BLOG_SOLO_TYPE"){_193="Blog Solo Template v70";}}return com.ibm.pb.customize.enabler.AddContentController._addResourceListFeed(name,_193,"copylibrary",_190,_191);}};dojo.provide("com.ibm.pb.customize.Identifiable");dojo.declare("com.ibm.pb.customize.Identifiable",com.ibm.mashups.enabler.Identifiable,{_id:null,constructor:function(id){this._id=id;},getID:function(){return this._id;}});}if(!dojo._hasResource["com.ibm.pb.customize.enabler.ChangeLayoutController"]){dojo._hasResource["com.ibm.pb.customize.enabler.ChangeLayoutController"]=true;dojo.provide("com.ibm.pb.customize.enabler.ChangeLayoutController");com.ibm.pb.customize.enabler.ChangeLayoutController={current:"",currentSet:"",url:"",navModel:null,dirty:false,started:false,refresh:true,layoutMarkupMetadataKey:"com.ibm.portal.layout.template.markup",layoutNameMetadataKey:"com.ibm.portal.layout.template.file.name.",layoutFileName:"layout.html",ibmMainContainer:"ibmMainContainer",ibmHiddenWidgets:"ibmHiddenWidgets",containerNameMetadataKey:"com.ibm.portal.layoutnode.localname",startup:function(){this.logger.entering("startup");this.current=this.currentSet;this.started=true;this.setupUI();if(!this.navModel){this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();}this.logger.exiting("startup");},makeDirty:function(_194){this.logger.entering("makeDirty",[_194]);this.dirty=_194;this.logger.exiting("makeDirty",[_194]);},processChange:function(args){this.logger.entering("processChange",[args]);this.apply(args);this.logger.exiting("processChange",[args]);},apply:function(args){this.logger.entering("apply",[args]);if(args.id!=this.current){if(args.id==this.currentSet){this.makeDirty(false);}else{if(this.dirty===false){this.makeDirty(true);}}this.current=args.id;this.url=args.url;}com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().setDirty(true);this.logger.exiting("apply",[args]);},undo:function(){this.logger.entering("undo");if(this.started){this.apply({id:this.currentSet});}this.logger.exiting("undo");},beforeSubmit:function(args){this.logger.entering("beforeSubmit",[args]);var dfd=new dojo.Deferred();dfd.callback();this.logger.exiting("beforeSubmit",[args]);return dfd;},submit:function(args){this.logger.entering("submit",[args]);if(!this.dirty){if(args.onComplete){args.onComplete();}this.logger.exiting("submit",[args]);return;}var _195=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID();if(_195){var _196=this.navModel.find(_195);if(_196){_196.setFinishedCallback(dojo.hitch(this,"_setLayout"),args);_196.start(false);}else{this.logger.severe("submit","Cannot get page node object from Navigation Model",[args]);if(args.onError){args.onError();}}}else{this.logger.severe("submit","Cannot get current page id",[args]);if(args.onError){args.onError();}}this.logger.exiting("submit",[args]);},_setLayout:function(page,_197,args){this.logger.entering("_setLayout",[page,_197,args]);if(_197=="200"){var _198=page.getContent();if(_198){_198.setFinishedCallback(dojo.hitch(this,"_setMetadata"),args);_198.start(false);}else{this.logger.severe("submit","Cannot get page content object",[args]);if(args.onError){args.onError();}}}else{this.logger.severe("submit","Cannot get page object for current node",[args]);if(args.onError){args.onError();}}this.logger.exiting("_setLayout",[page,_197,args]);},_setMetadata:function(_199,_19a,args){this.logger.entering("_setMetadata",[_199,_19a,args]);if(_19a==200){var _19b=_199.getMetaData(this.layoutMarkupMetadataKey)||"html";if(_199.confirmSetStaticContentURL(this.url)&&_199.confirmSetMetaData(this.layoutNameMetadataKey+_19b,this.layoutFileName)&&_199.confirmRefreshStaticMarkup()){_199.setStaticContentURL(this.url);_199.setMetaData(this.layoutNameMetadataKey+_19b,this.layoutFileName);_199.refreshStaticMarkup();this.makeDirty(false);this.currentSet=this.current;this._reparentControls(args.onComplete);}else{this.logger.severe("_setMetadata","User does not have permission to set new static layout template",[_199,_19a,args]);if(args.onError){args.onError();}}}else{this.logger.severe("_setMetadata","Cannot get page content object",[_199,_19a,args]);if(args.onError){args.onError();}}this.logger.exiting("_setMetadata",[_199,_19a,args]);},_reparentControls:function(_19c){this.logger.entering("_reparentControls",[_19c]);var _19d=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID(),_19e=this.navModel.getLayoutModel(_19d),_19f=_19e.getRoot();if(_19f){_19f.setFinishedCallback(dojo.hitch(this,"_processControls"),{layoutModel:_19e,onComplete:_19c});_19f.start(false);}else{this.logger.severe("_reparentControls","Cannot find root layout container in the Layout Model",[_19c]);if(_19c){_19c();}}this.logger.exiting("_reparentControls",[_19c]);},_processControls:function(root,_1a0,x){this.logger.entering("_processControls",[root,_1a0,x]);if(_1a0==200||_1a0=="200"){var _1a1=x.layoutModel.getChildren(root);var _1a2=null,_1a3=[];while(_1a1.hasNext()){var _1a4=_1a1.next();if(_1a4.getMetaData(this.containerNameMetadataKey)==this.ibmMainContainer){_1a2=_1a4;}else{if(_1a4.getMetadata(this.containerNameMetadataKey)==this.ibmHiddenWidgets){continue;}else{var _1a5=x.layoutModel.getChildren(_1a4);while(_1a5.hasNext()){_1a3.push(_1a5.next());}}}}if(_1a2){for(var i=0;i<_1a3.length;i++){if(!(_1a3[i] instanceof com.ibm.mashups.enabler.layout.LayoutControl)){this.logger.warning("_reparentControls","Orphan is not an instance of a layout control. Skipping...");continue;}try{x.layoutModel.insert(_1a3[i],_1a2);}catch(e){console.error(e);}}}else{this.logger.warning("_reparentControls","Cannot find the container named '"+this.ibmMainContainer+"' to hold orphaned controls. They will be lost.");}if(x.onComplete){x.onComplete();}}else{this.logger.severe("_processControls","Cannot find root layout container in the Layout Model",[root,_1a0,x]);if(x.onComplete){x.onComplete();}}this.logger.exiting("_processControls",[root,_1a0,x]);}};}if(!dojo._hasResource["ibm.toolbar.DateUtil"]){dojo._hasResource["ibm.toolbar.DateUtil"]=true;dojo.provide("ibm.toolbar.DateUtil");dojo.require("dojo.i18n");dojo.require("dojo.string");dojo.require("dojo.date.locale");var w={};w.MILLS_IN_DAY=86400000;w.inited=null;w.initResStrings=function(){this.bundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");w.Today=this.bundle["utb_overview_text_today"]||"today";w.Yesterday=this.bundle["utb_overview_text_yesterday"]||"yesterday";w.Tomorrow=this.bundle["utb_overview_text_tomorrow"]||"tomorrow";this.inited=true;};w.delta=function(_1a6,date){var diff=_1a6.getTime()-date;var _1a7=Math.ceil(diff/(this.MILLS_IN_DAY));return _1a7;};w.toString=function(date,_1a8,_1a9){var _1aa;if(!date||!(_1aa=Date.parse(date))){console.log("Invalid date passed to DateUtil.toString(): "+date);return;}var _1ab="";_1ab=this.toStringForTimeinMs(_1aa,_1a8,_1a9);return _1ab;};w.toStringForTimeinMs=function(_1ac,_1ad,_1ae){if(!this.Days){this.Days=dojo.i18n.getLocalization("dojo.cldr","gregorian")["days-format-wide"];}if(!this.Month){this.Month=dojo.i18n.getLocalization("dojo.cldr","gregorian")["months-format-abbr"];}if(this.inited===null){this.initResStrings();}var _1af=new Date();_1af.setHours(0,0,0,0);var _1b0=new Date();_1b0.setTime(_1ac);var _1b1=this.delta(_1af,_1ac);var _1b2="";var _1b3="";var _1b4="";if(_1b1<=2&&_1b1>=-2){if(_1b1==2){if(!_1ad&&!_1ae){_1b2=this.Days[_1b0.getDay()]+" "+this.getLocalizedTime(_1b0);}else{if(_1ad){_1b2=this.Days[_1b0.getDay()];}else{if(_1ae){_1b2=this.getLocalizedTime(_1b0);}}}}else{if(_1b1==1){if(!_1ad&&!_1ae){_1b2=this.Yesterday+" "+this.getLocalizedTime(_1b0);}else{if(_1ad){_1b2=this.Yesterday;}else{if(_1ae){_1b2=this.getLocalizedTime(_1b0);}}}}else{if(_1b1===0){if(!_1ad&&!_1ae){_1b2=this.Today+" "+this.getLocalizedTime(_1b0);}else{if(_1ad){_1b2=this.Today;}else{if(_1ae){_1b2=this.getLocalizedTime(_1b0);}}}}else{if(_1b1==-1){_1b2=this.Tomorrow;}else{if(_1b1==-2){_1b2=this.Days[_1b0.getDay()];}}}}}}else{if(_1af.getFullYear()==_1b0.getFullYear()){_1b3=djConfig.locale.substring(0,2).toLowerCase();if(djConfig.locale.length>2){_1b4=djConfig.locale.substring(3,5).toLowerCase();}if(_1b3=="en"&&(_1b4===""||_1b4=="us")){_1b2=this.Month[_1b0.getMonth()]+" "+_1b0.getDate();}else{_1b2=this.getLocalizedDate(_1b0);}if(_1ae==true){_1b2="";}}else{_1b3=djConfig.locale.substring(0,2).toLowerCase();if(djConfig.locale.length>2){_1b4=djConfig.locale.substring(3,5).toLowerCase();}if(_1b3=="en"&&(_1b4===""||_1b4=="us")){_1b2=this.Month[_1b0.getMonth()]+" "+_1b0.getDate()+" "+_1b0.getFullYear();}else{_1b2=this.getLocalizedDate(_1b0);}if(_1ae==true){_1b2="";}}}if(djConfig.locale=="ar"||djConfig.locale=="he"){return ""+_1b2;}return _1b2;};w.getLocalizedTime=function(date){return dojo.date.locale.format(date,{selector:"time",formatLength:"short",locale:djConfig.locale});};w.getLocalizedDate=function(date){return dojo.date.locale.format(date,{selector:"date",formatLength:"medium",locale:djConfig.locale});};w.getLocaleString=function(date){var _1b5=new Date();_1b5.setTime(date);return _1b5.toLocaleString();};ibm.toolbar.DateUtil=w;ibm.toolbar.DateUtil.JsonToJsDate=function atomDateToJsDate(_1b6){var _1b7=null;var s=_1b6;var _1b8=(s.charAt(s.length-1)=="Z");var _1b9=s.indexOf(" ");if(s.length>="yyyy-mm-ddThh:mm".length){s=s.substring(_1b9-4);var y=parseInt(s.substr(12,4),10);var _1ba=s.substr(8,3);switch(_1ba){case "Jan":m=0;break;case "Feb":m=1;break;case "Mar":m=2;break;case "Apr":m=3;break;case "May":m=4;break;case "Jun":m=5;break;case "Jul":m=6;break;case "Aug":m=7;break;case "Sep":m=8;break;case "Oct":m=9;break;case "Nov":m=10;break;case "Dec":m=11;break;default:break;}var d=parseInt(s.substr(5,2),10);var h=parseInt(s.substr(17,2),10);var mi=parseInt(s.substr(20,2),10);var utc=0;if(_1b8){var _1bb=s.substring(24,s.length-1);var _1bc=parseFloat(_1bb);utc=Date.UTC(y,m,d,h,mi)+_1bc*1000;}else{var zh=0;var zm=0;var _1bd=s.length-6;var _1be=s.charAt(_1bd);if((_1be=="+"||_1be=="-")&&s.indexOf("T")<s.length-5){var se=parseInt(s.substr(24,2),10);zh=parseInt(s.substr(_1bd,3),10);zm=parseInt(s.substr(_1bd+4,2),10);}utc=Date.UTC(y,m,d,h,mi,se)-(zh*60*60*1000+zm*60*1000);}_1b7=new Date(utc);}return _1b7;};ibm.toolbar.DateUtil.JsonDateToString=function AtomDateToString(_1bf,_1c0,_1c1){var date=ibm.toolbar.DateUtil.JsonToJsDate(_1bf);return date?ibm.toolbar.DateUtil.toString(date,_1c0,_1c1):_1bf;};}dojo.require("dojo.cookie");dojo.declare("com.ibm.mm.builder.systemwidget.universalToolbar",[com.ibm.pb.iwidget.iWidgetBase],{contextMenuID:"shelfActions",menuFile:"shelfActions.json",menuModule:"com.ibm.themes.PageBuilder2.menuDefinitions",maximized:false,minimized:false,projectSupport:ibm.toolbar.ProjectSupport,shelf:null,_someObjectInfo:{defaultStyle:"initial",defaultLayout:"2ColumnEqual",styleMetadataKey:"colorPalette",layoutMetadataKey:"com.ibm.portal.layout.template.ref",layoutFileMetadataKey:"com.ibm.portal.static.page.file.name.html",maxLabelLength:50,maxLabelLengthLarge:25,addContent:ibmCfg.themeConfig.themeRootURI+"/system/addContent.json",addContentWCM:ibmCfg.themeConfig.themeRootURI+"/system/addContent_wcm.json",addContentAllowed:ibmCfg.themeConfig.themeRootURI+"/system/addContent_allowedList.json",changeStyle:ibmCfg.themeConfig.themeRootURI+"/system/changeStyle.json",changeLayout:ibmCfg.themeConfig.themeRootURI+"/system/changeLayout.json",imagePath:ibmCfg.themeConfig.themeRootURI+"/css/images",blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString()},onLoad:function(){this.cookiePath=ibmPortalConfig.portalContext;this.stateCookieName="com.ibm.portal.utb.state";this.bundle=dojo.i18n.getLocalization("com.ibm.bundles","Shelf");this.themeBundle=dojo.i18n.getLocalization("com.ibm.bundles","Theme");this.attrs=this.iContext.getiWidgetAttributes();this.root=dojo.byId(this.attrs.getItemValue("rootID"));this.minimized=ibmToolbarConfig.toolbarMode==="minimized";this.justLoaded=true;if(this.root&&(dojo.hasClass(this.root,"wpthemeOpen")||dojo.hasClass(this.root,"wpthemeMinimized"))){this.initShelf();this.shelf.toggleDisplay();dojo.addClass(dojo.body(),"edit-mode");}if(this.shelf){var _1c2=ibmToolbarConfig.hasEditPermission||ibmToolbarConfig.hasPrivilegedPermission;if(_1c2){this.shelf.buttonRevert.removeAttribute("disabled");i$.removeClass(this.shelf.buttonRevert,"utb-btn-disabled");this.shelf.buttonSave.removeAttribute("disabled");i$.removeClass(this.shelf.buttonSave,"utb-btn-disabled");}else{this.shelf.buttonRevert.setAttribute("disabled","true");i$.addClass(this.shelf.buttonRevert,"utb-btn-disabled");this.shelf.buttonSave.setAttribute("disabled","true");i$.addClass(this.shelf.buttonSave,"utb-btn-disabled");}}},initShelf:function(){this.navModel=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();this.widgetModel=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1c3=this.runtimeModel.getCurrentPage().getID();this.curProjectName=this.projectSupport.getProjectName();this._setUpDraftURLs();var _1c4=new com.ibm.pb.contextMenu.JsonContextMenuLoader({url:dojo.moduleUrl(this.menuModule,this.menuFile),data:null});this.builderFactory.getContextMenuModel().registerContextMenu(this.contextMenuID,_1c4);this.evtSvc.subscribeEvent(this.iWidgetConstants.CHANGE_WIDGETWINDOWSTATE,this,this.onWidgetWindowStateChange);this.evtSvc.subscribeEvent(this.iWidgetConstants.UNLOAD_WIDGETS,this,this.onUnloadWidgets);var me=this;this.shelf=new com.ibm.pb.customize.enabler.TabbedController({childrenArray:this._getData(_1c3,dojo.query(".ibm-maximized","layoutContainers").length!=0),imagePath:this._someObjectInfo.imagePath,navModel:this.navModel,widgetModel:this.widgetModel,savePage:this.savePage,cancelAll:this.cancelAll,onShowTab:dojo.hitch(this,"onShowTab"),revertTxt:this.bundle.utb_revert,saveTxt:this.curProjectName?this.bundle.utb_save_draft:this.bundle.shelf_saveChanges,moreTxt:this.bundle.utb_more,loadTxt:this.bundle.shelf_loading,minTxt:this.themeBundle.theme_minimize,moreMenuId:"moreActions",blankImg:dojo.moduleUrl("dojo","resources/blank.gif").toString(),templateString:"<div>"+"<div class=\"lotusui lotusui30 ibmPortalCustomizeShelf lotusPalette\">"+"<div class=\"utb-statusbar\">"+"<div class=\"utb-palette lotusPaletteHeader wpthemeInner\">"+"<ul dojoAttachPoint=\"tabs\" class=\"lotusTabs\" role=\"tablist\"></ul>"+"<span class=\"utb-btn-container\" >"+"<button role=\"button\" dojoAttachEvent=\"onclick:cancelAll\" dojoAttachPoint=\"buttonRevert\">${revertTxt}</button>"+"<button role=\"button\" dojoAttachEvent=\"onclick:savePage\" dojoAttachPoint=\"buttonSave\">${saveTxt}</button>"+"<button role=\"button\" aria-haspopup=\"true\" href=\"javascript:;\" class=\"utb-more wpthemeMenuFocus\" "+"onclick=\"javascript:if (typeof wptheme != 'undefined') wptheme.contextMenu.init(this, '${moreMenuId}', {'navID':ibmCfg.portalConfig.currentPageOID});\""+"onmousemove=\"javascript:if (typeof i$ != 'undefined' && typeof wptheme != 'undefined') { i$.removeClass(this,'wpthemeActionDisabled'); this.onmousemove = null; }\""+"onkeydown=\"javascript:if (typeof i$ != 'undefined' && typeof wptheme != 'undefined') {if (event.keyCode ==13) {wptheme.contextMenu.init(this, '${moreMenuId}', {'navID':ibmCfg.portalConfig.currentPageOID});}}\">"+"${moreTxt}"+"<img alt=\"\" src=\"${blankImg}\" class=\"lotusArrow lotusDropDownSprite\" />"+"<span class=\"lotusAltText\">?</span>"+"<span class=\"wpthemeMenuRight\">"+"<div class=\"wpthemeMenuBorder\">"+"<div class=\"wpthemeMenuNotchBorder\"></div>"+"<ul class=\"wpthemeMenuDropDown wpthemeTemplateMenu\" role=\"menu\">"+"<li class=\"&#36;{css-class}\" role=\"menuitem\" tabindex=\"-1\"><span class=\"wpthemeMenuText\" >&#36;{title}</span></li>"+"</ul>"+"</div>"+"<div class=\"wpthemeMenuLoading wpthemeTemplateLoading\">${loadTxt}</div>"+"<div class=\"wpthemeAnchorSubmenu wpthemeTemplateSubmenu\">"+"<div class=\"wpthemeMenuBorder wpthemeMenuSubmenu\">"+"<ul id=\"&#36;{submenu-id}\" class=\"wpthemeMenuDropDown\" role=\"menu\"><li role=\"menuitem\" tabindex=\"-1\"></li></ul>"+"</div>"+"</div>"+"</span>"+"</button>"+"</span>"+"</div>"+"</div>"+"<div dojoAttachPoint=\"containerDivs\" class=\"wpthemeInner utb-container\"></div>"+"</div>"+"<div class=\"lotusui30 utb-pull-container\">"+"<button href=\"javascript:;\" dojoAttachPoint=\"minBtn\" class=\"utb-minimize-pull\" tabindex=\"0\" role=\"button\" title=\"${minTxt}\">"+"<div class=\"utb-pull-arrow\" id=\"${id}-pull-arrow\">"+"<span dojoAttachPoint=\"minAlt\" class=\"lotusAltText\">${minTxt}</span>"+"</div>"+"</button>"+"</div>"+"</div>",toggleDisplay:function(){if(this.displayState=="open"){this.displayState="closed";dojo.addClass(me.root,"wpthemeClosed");}else{if(this.displayState=="closed"){this.displayState="open";if(!this.everOpened){this.startup();this.onFirstOpen();this.everOpened=true;}dojo.removeClass(me.root,"wpthemeClosed");dojo.removeClass(me.root,"wpthemeLoading");}}}},dojo.byId(this.attrs.getItemValue("shelfRootID")));dojo.connect(this.shelf.minBtn,"onclick",this,"toggleMinimize");},_supportsLocalStorage:function(){if("localStorage" in window&&window["localStorage"]!==null){return true;}else{return false;}},_setUpDraftURLs:function(){this.pageUUID=this.projectSupport.getPageUUID(this.pageId);ibmToolbarConfig.isDraftPage=this.projectSupport.isDraftPage(this.pageUUID);ibmToolbarConfig.publishPageURL=null;ibmToolbarConfig.nextStageURL=null;ibmToolbarConfig.approvePageURL=null;ibmToolbarConfig.rejectPageURL=null;if(!ibmToolbarConfig.isPrivilegedUser&&ibmToolbarConfig.isDraftPage){ibmToolbarConfig.publishPageURL=this.projectSupport.getSubmitPageURL(this.pageUUID);ibmToolbarConfig.nextStageURL=this.projectSupport.getNextStagePageURL(this.pageUUID);ibmToolbarConfig.approvePageURL=this.projectSupport.getApprovePageURL(this.pageUUID);ibmToolbarConfig.rejectPageURL=this.projectSupport.getRejectPageURL(this.pageUUID);}},toggleMinimize:function(){var _1c5=this.stateCookieName;if(this.minimized){this.root.className="utb wpthemeOpen";this.shelf.minAlt.innerHTML=this.shelf.minBtn.title=this.themeBundle.theme_minimize;this.minimized=false;this._setCookie(_1c5,null);}else{this.root.className="utb wpthemeMinimized";this.shelf.minAlt.innerHTML=this.shelf.minBtn.title=this.themeBundle.theme_maximize;this.minimized=true;this._setCookie(_1c5,"minimized");}},_setCookie:function(name,_1c6){if(name&&dojo.cookie.isSupported()){if(_1c6){dojo.cookie(name,_1c6,{path:this.cookiePath});}else{dojo.cookie(name,null,{path:this.cookiePath,expires:-1});}}},_getCookie:function(name){if(dojo.cookie.isSupported()){return dojo.cookie(name);}else{return null;}},onShowTab:function(){if(this.justLoaded){this.justLoaded=false;}else{if(this.minimized){this.toggleMinimize();}}},savePage:function(){com.ibm.mashups.iwidget.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.savePage");},cancelAll:function(){var _1c7=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage();if(_1c7.isDirty()){window.onbeforeunload=null;top.location.reload();}},_getData:function(_1c8,_1c9){this.maximized=_1c9;var _1ca=ibmCfg.portalConfig.aggregatedStyle;var _1cb=_1ca&&_1ca!="null"?_1ca.substring(_1ca.lastIndexOf("/")+1):this._someObjectInfo.defaultStyle;var _1cc=dojo.mixin({},this._someObjectInfo,{isMaximized:_1c9,contentIdChanged:false,pageDefaultStyle:_1cb});var data=this.builderFactory.getContextMenuModel().getContextMenu(this.contextMenuID,_1c8,"com.ibm.mm.builder.systemwidget.universalToolbar",_1cc);var _1cd=[];for(var i in data){if(data[i].enabled){var _1ce=data[i].actionCallBackFunction();_1cd.push({controller:_1ce});}}return _1cd;},_refreshTabs:function(_1cf,_1d0){this.shelf.refreshTabs(this._getData(_1cf,_1d0));},onSavePage:function(_1d1){this.shelf.beforeSave(dojo.hitch(this,function(){this.shelf.saveChildren(dojo.hitch(this,function(){var _1d2=this.runtimeModel.getCurrentPage().getID();com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.pageSaved",_1d2);}));}));},onWidgetWindowStateChange:function(_1d3){var max=com.ibm.mm.iwidget.Constants.windowstate.MAXIMIZE;if(_1d3.newWindowState==max||_1d3.oldWindowState==max){this._refreshTabs(this.runtimeModel.getCurrentPage().getID(),_1d3.newWindowState==max);}},onUnloadWidgets:function(_1d4){if(this.maximized){this.maximized=false;this._refreshTabs(this.runtimeModel.getCurrentPage().getID(),false);}},onUnload:function(){if(this.root){dojo.addClass(this.root,"wpthemeLoading");}if(this.shelf!==null){this.shelf.destroy();this.shelf=null;}}});(function(){ibm.toolbar.showOverview=function(_1d5,_1d6,_1d7,_1d8){if(!ibmCfg.controllers.overview){ibmCfg.controllers.overview=new ibm.toolbar.OverviewContainer({});}return ibmCfg.controllers.overview;};var _1d9=function(){if(ibmToolbarConfig.hasStaticLayoutMetaData&&ibmToolbarConfig.isStaticContentPage){return false;}else{return true;}};ibm.toolbar.confirmShowAddContent=function(_1da,_1db,_1dc,_1dd){if(!(ibmToolbarConfig.hasEditPermission||ibmToolbarConfig.hasPrivilegedPermission)){return false;}else{if(_1dd.isMaximized){return false;}else{if(_1d9()){return false;}else{return true;}}}};ibm.toolbar.confirmShowChangeStyle=function(_1de,_1df,_1e0,_1e1){if(!ibmToolbarConfig.hasEditPermission){return false;}else{return true;}};ibm.toolbar.confirmShowChangeLayout=function(_1e2,_1e3,_1e4,_1e5){if(!ibmToolbarConfig.hasEditPermission){return false;}else{if(_1e5.isMaximized){return false;}else{if(_1d9()){return false;}else{return true;}}}};var _1e6=com.ibm.pb.customize,_1e7=com.ibm.pb.customize.enabler;dojo.extend(_1e6.AddContentPaletteContainer,_1e7.AddContentController);dojo.extend(_1e6.ChangeStylePaletteContainer,_1e7.ChangeStyleController);dojo.extend(_1e6.ChangeLayoutPaletteContainer,_1e7.ChangeLayoutController);i$.toPath("com.ibm.theme.shelf.checkForVP",function(){if(ibmCfg&&ibmCfg.portalConfig&&ibmCfg.portalConfig["isVirtualPortal"]){return false;}return true;});})(); com.ibm.pb.io.RESOURCE_CACHE.set("/sabc/mccbuilder.v3001/widget-catalog/wireInterfaceWithSettings.xml", "<!-- ***************************************************************** -->\n<!-- -->\n<!-- Licensed Materials - Property of IBM -->\n<!-- -->\n<!-- 5724-U69 -->\n<!-- -->\n<!-- Copyright IBM Corp. 2012 All Rights Reserved. -->\n<!-- -->\n<!-- US Government Users Restricted Rights - Use, duplication or -->\n<!-- disclosure restricted by GSA ADP Schedule Contract with -->\n<!-- IBM Corp. -->\n<!-- -->\n<!-- ***************************************************************** -->\n\n<iw:iwidget name=\"wireInterfaceWithSettings\" xmlns:iw=\"http://www.ibm.com/xmlns/prod/iWidget\" iScope=\"com.ibm.mm.builder.systemwidget.wireInterfaceWithSettings\" allowInstanceContent=\"true\" supportedModes=\"view edit\" mode=\"view\" lang=\"en\">\n\n<!--iw:resource uri=\"../css/wirePane.css\"/>\n<iw:resource uri=\"../css/wirePane_rtl.css\"/>\n<iw:resource uri=\"../css/wirePanePrompter.css\"/>\n<iw:resource uri=\"../css/wirePanePrompter_rtl.css\"/-->\n\n<iw:itemSet id=\"attributes\" >\n <iw:item id=\"version\" value=\"1.0.0.0.0\"/>\n <iw:item id=\"displaySettings\" value=\"false\" />\n\t<iw:item id=\"defaultMatchingType\" value=\"0\" />\n\t<iw:item id=\"displayPortletsAndWidgetsWarningMessage\" value=\"false\" />\n\t<iw:item id=\"displayQName\" value=\"true\" />\n</iw:itemSet>\n\n<iw:event id=\"com.ibm.mashups.builder.editWire\" handled=\"true\" onEvent=\"onWireInterfaceDisplay\" eventDescName=\"desc_onWireInterfaceDisplay\"/>\n<iw:eventDescription id=\"desc_onWireInterfaceDisplay\" payloadType=\"text\" title=\"Widget ID\" description=\"Receives a widget ID from another widget and displays the wire info of that widget\" lang=\"en\">\n\t<!--@wireInterface.com.ibm.mashups.builder.editWire@-->\n</iw:eventDescription>\n\n<iw:event id=\"onWidgetUpdated\" handled=\"true\" onEvent=\"handleWidgetUpdated\" eventDescName=\"desc_widgetUpdated\"/>\n<iw:eventDescription id=\"desc_widgetUpdated\" payloadType=\"JSON\" title=\"Widgets On Page\" description=\"Receives widgets info from layout widget to update the widgets-on-page list\" lang=\"en\">\n\t<!--@wireInterface.widgetUpdated@-->\n</iw:eventDescription>\n\n<iw:resource uri=\"wireInterfaceWithSettings.js\" />\n\n<iw:content mode=\"view\">\n\t<![CDATA[\n\t]]>\n</iw:content>\n</iw:iwidget>\n"); com.ibm.pb.io.RESOURCE_CACHE.set("/sabc/mccbuilder.v3001/widget-catalog/autoWiringManager.xml", "<!-- ***************************************************************** -->\n<!-- -->\n<!-- Licensed Materials - Property of IBM -->\n<!-- -->\n<!-- 5724-U69 -->\n<!-- -->\n<!-- Copyright IBM Corp. 2012 All Rights Reserved. -->\n<!-- -->\n<!-- US Government Users Restricted Rights - Use, duplication or -->\n<!-- disclosure restricted by GSA ADP Schedule Contract with -->\n<!-- IBM Corp. -->\n<!-- -->\n<!-- ***************************************************************** -->\n\n<iw:iwidget name=\"autoWiringManager\" xmlns:iw=\"http://www.ibm.com/xmlns/prod/iWidget\" iScope=\"com.ibm.mm.builder.systemwidget.autoWiringManager\" allowInstanceContent=\"true\" supportedModes=\"view\" mode=\"view\" lang=\"en\">\n\n<!--iw:resource uri=\"../css/autoWireNotification.css\" />\n<iw:resource uri=\"../css/autoWireNotification_rtl.css\" /-->\n\n<iw:itemSet id=\"attributes\" >\n <iw:item id=\"version\" value=\"1.0.0.0.0\"/>\n</iw:itemSet>\n\n<iw:event id=\"com.ibm.mashups.builder.autoWiringWidget\" handled=\"true\" onEvent=\"autoWiringWidget\" eventDescName=\"desc_createAutoWiring\"/>\n<iw:eventDescription id=\"desc_createAutoWiring\" payloadType=\"text\" title=\"Widget ID\" description=\"\" lang=\"en\">\n\t<!--@wireGraph.createAutoWire@-->\n</iw:eventDescription>\n\n<iw:event id=\"com.ibm.mashups.builder.createAutoWire\" handled=\"true\" onEvent=\"autoWiringWidget\" eventDescName=\"desc_createAutoWiring\"/>\n<iw:eventDescription id=\"desc_createAutoWiring\" payloadType=\"text\" title=\"Widget ID\" description=\"\" lang=\"en\">\n\t<!--@wireGraph.createAutoWire@-->\n</iw:eventDescription>\n\n<iw:event id=\"com.ibm.mashups.builder.displayWireGraph\" handled=\"true\" onEvent=\"onWireGraphDisplay\" eventDescName=\"desc_onWireGraphDisplay\"/>\n<iw:eventDescription id=\"desc_onWireGraphDisplay\" payloadType=\"text\" title=\"Widget ID\" description=\"Receives a widget ID from another widget and displays the wires graph\" lang=\"en\">\n\t<!--@wireGraph.displayWireGraph@-->\n</iw:eventDescription>\n\n<iw:event id=\"com.ibm.mashups.builder.createQuickWire\" handled=\"true\" onEvent=\"onQuickWireCreate\" eventDescName=\"desc_createQuickWire\"/>\n<iw:eventDescription id=\"desc_createQuickWire\" payloadType=\"JSON\" title=\"Wire Info\" description=\"\" lang=\"en\">\n\t<!--@wireInterface.createQuickWire@-->\n</iw:eventDescription>\n\n<iw:event id=\"com.ibm.mashups.builder.addNewWire\" handled=\"true\" onEvent=\"onAddNewWire\" eventDescName=\"desc_addNewWire\" />\n<iw:eventDescription id=\"desc_addNewWire\" payloadType=\"any\" title=\"Add New Wire\" description=\"Add a new wire\" lang=\"en\">\n</iw:eventDescription>\n\n<!--iw:event id=\"com.ibm.mashups.builder.layoutRefreshed\" handled=\"true\" onEvent=\"onLayoutRefreshed\" eventDescName=\"desc_layoutRefreshed\" />\n<iw:eventDescription id=\"desc_layoutRefreshed\" payloadType=\"any\" title=\"Layout Refreshed\" description=\"Layout Refreshed\" lang=\"en\">\n</iw:eventDescription-->\n\n<iw:resource uri=\"autoWiringManager.js\" skipLoad=\"dojo.getObject(\u0027com.ibm.mm.builder.systemwidget.autoWiringManager\u0027) != null\" />\n\n<iw:content mode=\"view\">\n\t<![CDATA[\n\t]]>\n</iw:content>\n</iw:iwidget>\n"); dojo.require("com.ibm.mm.builder.iwidget.wiringscreen.WirePaneWithSettings"); dojo.require("com.ibm.mm.builder.iwidget.wiringscreen.WiringCanvas"); dojo.require("com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringNotification"); dojo.require("com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringDisabledTip"); dojo.require("com.ibm.mm.builder.iwidget.wiringscreen.WiringSettingsDialog"); dojo.require("com.ibm.mm.builder.utils.wireUtil"); dojo.declare("com.ibm.mm.builder.systemwidget.wireInterfaceWithSettings",null,{wirePane:null,wiringCanvas:null,layouts:null,displayDisabledNotification:false,autoWiringDisabledTip:null,onLoad:function(){ this.layouts=[]; var _1=this.iContext; this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.systemwidget.wireInterfaceWithSettings"); },publishNewWireAdded:function(){ },publishWireRemoved:function(){ },onWireInterfaceDisplay:function(_2){ var _3=_2.payload; if(_3){ this.displayWireInterface(_3); } },displayWireInterface:function(_4){ if(this.wirePane){ this.wirePane.destroy(); } this.wirePane=new com.ibm.mm.builder.iwidget.wiringscreen.WirePaneWithSettings(); this.wirePane.displayQName=this.iContext.getiWidgetAttributes().getItemValue("displayQName"); this.wirePane.setContext(this.iContext); this.wirePane.display(_4); var _5=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getAutoWiringEnablement(); this.initAutoWiringSettings(); var _6=com.ibm.mm.builder.utils.userUtil.isLookasideEnabled("com.ibm.mashups.user.AUTO_WIRE_ENABLED_NOTIFICATIONS"); if(!_5&&_6&&this.displayDisabledNotification){ if(com.ibm.mm.builder.utils.wireUtil.checkAutoWiringCSA2(_4)){ this.autoWiringDisabledTip.show(_4); if(this.iContext.dialogContainer){ this.iContext.dialogContainer.registerSubDialog("Mashup_Auto_Wiring_Disable_Tip_Dlg"); } } } },initAutoWiringSettings:function(){ var _7=com.ibm.mm.builder.utils.userUtil.getCurrentUser(); var _8=com.ibm.mm.builder.utils.userUtil.isLookasideEnabled("com.ibm.mashups.user.AUTO_WIRE_DISABLED_NOTIFICATIONS"); if(!_8){ this.displayDisabledNotification=false; }else{ var v1=_7.getAttribute("com.ibm.mashups.user.AUTO_WIRE_DISABLED_NOTIFICATIONS"); this.lookaside=true; if(v1===true||v1=="true"){ this.displayDisabledNotification=true; }else{ this.displayDisabledNotification=false; } } if(this.autoWiringDisabledTip===null){ this.autoWiringDisabledTip=new com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringDisabledTip(); this.autoWiringDisabledTip.setOuterWirePaneContext(this.iContext); } },handleWidgetUpdated:function(_9){ var _a=_9.payload; if(wirePane){ this.wirePane.updateWidgetList(_a); } },onUnload:function(){ if(this.wirePane){ this.wirePane.destroy(); this.wirePane=null; } if(this.autoWiringDisabledTip){ this.autoWiringDisabledTip.destroy(); } }}); dojo.require("com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringNotification"); dojo.require("com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringDisabledTip"); dojo.require("com.ibm.mm.builder.iwidget.wiringscreen.WiringCanvas"); dojo.require("com.ibm.mm.builder.utils.userUtil"); dojo.declare("com.ibm.mm.builder.systemwidget.autoWiringManager",null,{disabledTip:null,hwcBtnPos:null,displaySuccessNotification:false,autoWireWidget:null,layoutParser:com.ibm.pb.layout.LayoutParser,onLoad:function(){ var _1=this.iContext; this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger("com.ibm.mm.builder.systemwidget.autoWiringManager"); },onWireInterfaceDisplay:function(_2){ var _3=_2.payload; if(!_3){ return; } var _4=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage(); var _5=_4.getAutoWiringEnablement(); if(_5){ return; } },displayMessage:function(_6,_7,_8){ var _9=new com.ibm.widgets.StatusMessage(_6,_7,_8); dojo.publish("/message/status",[{message:_9,uid:"ibmStatusBox"}]); },isWidgetHidden:function(_a){ var _b=this.layoutParser.findById(_a); if(dojo.attr(_b.parentNode,"name")=="ibmHiddenWidgets"){ return true; }else{ return false; } },onAddNewWire:function(_c){ var _d=_c.payload; var _e=com.ibm.mm.builder.utils.wireUtil.addWireCSA2(_d.sourceWidgetId,_d.sourceEvent,_d.targetWidgetId,_d.targetEvent); if(_e){ if(!this.isWidgetHidden(_d.sourceWidgetId)){ com.ibm.pb.contextMenu.sharedActions.hideControl(_d.sourceWidgetId); } var _f=com.ibm.mm.builder.coreWidgetsStrings.I_QUICK_WIRE_CREATED_TITLE; var msg=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_QUICK_WIRE_CREATED,[com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(_d.sourceWidgetId),_d.sourceEvent,com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(_d.targetWidgetId)]); this.displayMessage("info",_f,msg); }else{ this._displayWirePane(_d.sourceWidgetId); var _f=com.ibm.mm.builder.coreWidgetsStrings.I_QUICK_WIRE_ALREADY_CREATED_TITLE; var msg=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_QUICK_WIRE_ALREADY_CREATED,[com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(_d.sourceWidgetId),com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(_d.targetWidgetId)]); this.displayMessage("info",_f,msg); } },autoWiringWidget:function(_10){ var _11=_10.payload; if(!_11){ return; } var _12=com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage(); var _13=_12.getAutoWiringEnablement(); if(_13){ var _14=com.ibm.mm.builder.utils.wireUtil.setupAutoWiring(_11); this.initAutoWiringSettings(); if(_14.hasAutoWire&&this.displaySuccessNotification){ this.autoWireWidget={id:_11,result:_14}; this._displayNotiWhenWidgetReady(_11); } } },_displayNotiWhenWidgetReady:function(_15){ window.setTimeout(dojo.hitch(this,function(){ var div=this.layoutParser.findById(_15); if(div){ this.onLayoutRefreshed(); }else{ this._displayNotiWhenWidgetReady(); } }),100); },onLayoutRefreshed:function(){ if(this.autoWireWidget){ var _16=this.getDialogLocation(this.autoWireWidget.id); var _17=new com.ibm.mm.builder.iwidget.wiringscreen.AutoWiringNotification(); _17.showAutoWiringResult(this.autoWireWidget.id,this.autoWireWidget.result,_16); this.autoWireWidget=null; } },_displayWirePane:function(_18){ var _19=com.ibm.mm.builder.utils.iwidgetUtil.getWidgetIconCSA2(_18); var _1a={nodeWidth:"486px",title:com.ibm.mm.builder.coreWidgetsStrings.I_WIRING_NAME,titleIconUrl:_19,leftBarWidth:"18px",rightBarWidth:"12px",displayCloseButton:true,hasRightBottomResizer:false}; var _1b={widgetTypeId:"wireInterface",eventName:"com.ibm.mashups.builder.editWire",eventPayload:_18,dialogParam:_1a,requestRefresh:true}; com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.displayInMashupDialog",_1b); },onQuickWireCreate:function(_1c){ var _1d=_1c.payload; var _1e=_1d.sourceWidgetId; var _1f=_1d.targetWidgetId; var _20=com.ibm.mm.builder.utils.iwidgetUtil; var _21=com.ibm.mm.builder.utils.wireUtil; var _22=_20.getLayoutControl(_1e); var _23=_20.getLayoutControl(_1f); var _24=_21.getWidgetPublishedEventsCSA2(_22)[0]; var _25=_21.getWidgetHandledEventsCSA2(_23)[0]; var _26=com.ibm.mm.builder.coreWidgetsStrings.I_QUICK_WIRE_CANNOT_CREATE_TITLE; var _27=dojo.string.substitute(com.ibm.mm.builder.coreWidgetsStrings.I_QUICK_WIRE_CANNOT_CREATE,[com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(_1e),com.ibm.mm.builder.utils.iwidgetUtil.getWidgetTitleCSA2(_1f)]); if(_24&&_25){ var _28=_21.isEventCompatibleCSA2(_24,_25,1); if(_28){ var _29={"sourceWidgetId":_1e,"sourceEvent":_24.getName(),"targetWidgetId":_1f,"targetEvent":_25.getName()}; com.ibm.mashups.services.ServiceManager.getService("eventService").broadcastEvent("com.ibm.mashups.builder.addNewWire",_29); }else{ this._displayWirePane(_1e); this.displayMessage("info",_26,_27); } }else{ this._displayWirePane(_1e); this.displayMessage("info",_26,_27); } },initAutoWiringSettings:function(){ var _2a=com.ibm.mm.builder.utils.userUtil.getCurrentUser(); var _2b=com.ibm.mm.builder.utils.userUtil.isLookasideEnabled("com.ibm.mashups.user.AUTO_WIRE_ENABLED_NOTIFICATIONS"); if(!_2b){ this.displaySuccessNotification=false; }else{ var v1=_2a.getAttribute("com.ibm.mashups.user.AUTO_WIRE_ENABLED_NOTIFICATIONS"); if(v1===true||v1=="true"){ this.displaySuccessNotification=true; }else{ this.displaySuccessNotification=false; } } },onHWCPositionPublished:function(_2c){ this.hwcBtnPos=_2c.payload; },getDialogLocation:function(_2d){ var div=this.layoutParser.findById(_2d); var _2e=dojo.coords(div); x=_2e.x+15; y=_2e.y+15; var _2f={x:x,y:y,inNVA:false}; return _2f; },onWireGraphDisplay:function(_30){ var _31=_30.payload; this.displayWireGraph(_31,true); },displayWireGraph:function(_32,_33){ var _34=dijit.byId(_32+"_wiringCanvas"); if(_34){ _34.destroy(); } this.wiringCanvas=new com.ibm.mm.builder.iwidget.wiringscreen.WiringCanvas({id:_32+"_wiringCanvas",selectedWidgetId:_32,alone:_33}); this.wiringCanvas.showGraph(); },onUnload:function(){ if(this.wiringCanvas){ this.wiringCanvas.destroy(); this.wiringCanvas=null; } }}); i$.toPath("com.ibm.mm.builder.editWiring.action", function(menuitem) { com.ibm.pb.contextMenu.sharedActions.editWiring(menuitem.metadata.wid); }); i$.toPath("com.ibm.mm.builder.editWiring.action.visibility", function(menuitem) { var nm = com.ibm.mashups.enabler.navigation.Factory.getNavigationModel(); var pid = com.ibm.mashups.builder.model.Factory.getRuntimeModel().getCurrentPage().getID(); var page = nm.find(pid).start(); var content = page.getContent().start(); var canEdit = content.hasRole("Privileged User") || content.hasRole("Editor") || content.hasRole("Administrator"); return canEdit && com.ibm.pb.contextMenu.sharedActions.confirmEditWiring(ibmCfg.portalConfig.currentPageOID); });