(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 [ "+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 "+[_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 "+_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 "+_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","ALL_PORTAL":"All Portal Users","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.20150114-1545".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||window.ActiveXObject!==undefined){_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||window.ActiveXObject!==undefined){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||window.ActiveXObject!==undefined){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||window.ActiveXObject!==undefined){dojo.attr(_8c,"outerHTML","");}}},createDocument:function(_8e,_8f){if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){var _90=["MSXML2.FreeThreadedDOMDocument.6.0","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||window.ActiveXObject!==undefined)){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||window.ActiveXObject!==undefined){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||window.ActiveXObject!==undefined){_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||window.ActiveXObject!==undefined?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").replace(/</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",ALL_PORTAL_VIRTUAL_GROUP_ID:"com.ibm.mashups.allPortalGroupId"});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;i0){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=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=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=0){me._doLogin();return;}if(dojo.isIE||window.ActiveXObject!==undefined){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||window.ActiveXObject!==undefined){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||window.ActiveXObject!==undefined){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||window.ActiveXObject!==undefined){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||window.ActiveXObject!==undefined){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;i0){var _1fc=[];for(var ii=0,ll=_1fb.length;ii0){var _205=[];for(var ii=0,ll=_204.length;iithis.max_version)){_209=-1000;}_207[i]=_209;}var _20b=-1;var _20c=1000;for(i=0,scl=_207.length;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;jj0;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.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;i0){if(i#%{}|\\^~[]`\"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;i0){_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>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>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=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=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=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;x0)){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;xthis.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_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_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_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_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="";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,">").replace(/&/g,"&");cxml+="";}}cxml+="";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="\n"+"\n"+""+_42e+"\n"+""+id+"\n"+""+time.toGMTString()+"\n"+_42f+"";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||window.ActiveXObject!==undefined){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||window.ActiveXObject!==undefined){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=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;i0){var i=0;if(dojo.isIE||window.ActiveXObject!==undefined){cont="
"+cont;i++;}var div=dojo.create("div",{innerHTML:cont});var _559=dojo.isIE||window.ActiveXObject!==undefined||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("");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");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=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("=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||window.ActiveXObject!==undefined){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;i0){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?document.location.port:(document.location.protocol=="https:"?"443":"80");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.AdminModelStrategy"]){dojo._hasResource["com.ibm.mashups.enabler.strategy.AdminModelStrategy"]=true;dojo.provide("com.ibm.mashups.enabler.strategy.AdminModelStrategy");dojo.declare("com.ibm.mashups.enabler.strategy.AdminModelStrategy",com.ibm.mashups.enabler.strategy.Strategy,{_apply:function(_8dd){_8dd.setHeader("X-Pragma","admin");}});}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(_8de){this.names=_8de;},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(_8df){this.interval=_8df;},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,_8e0){return node.getID()!=_8e0;}});}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(_8e1){this._URLUpdateParameterValue=_8e1;},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(_8e2,_8e3){this.parentLevel=_8e2;this.childrenLevel=_8e3;},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(_8e4,_8e5,_8e6){}});}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(_8e7){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(_8e8,_8e9){if(!_8e8){return;}this._alltypes.typename=1;if(!_8e9||_8e9==this._SIMPLE_DATA_TYPE){this._simpleTypes.typename=1;}else{this._complexTypes.typename=1;}},removeDataType:function(_8ea){delete this._alltypes[_8ea];},addDataMapping:function(_8eb,_8ec){if(this._mappings.typename1===null){this._mappings.typename1={};}this._mappings[_8eb][_8ec]=1;},removeDataMapping:function(_8ed,_8ee){if(this._mappings[_8ed]!==null){if(this._mappings[_8ed][_8ee]!==null){delete this._mappings[_8ed][_8ee];}}},getAllTypes:function(){return dojo.clone(this._alltypes);},doesTypeMatch:function(_8ef,_8f0){var _8f1=false;if(!_8ef||!_8f0){return _8f1;}_8ef=_8ef.toLowerCase();_8f0=_8f0.toLowerCase();if(_8ef==_8f0||_8ef=="any"||_8f0=="any"){_8f1=true;}else{var _8f2=this.checkDataType(_8ef);switch(_8f2){case this._SIMPLE_DATA_TYPE:var _8f3=this.checkDataType(_8f0);switch(_8f3){case this._SIMPLE_DATA_TYPE:if(this._mappings[_8ef][_8f0]==1){_8f1=true;}break;case this._COMBINED_DATA_TYPE:var _8f4=this.getMainType(_8f0);if(_8ef==_8f4||this._mappings[_8ef][_8f4]==1){_8f1=true;}break;default:break;}break;case this._COMBINED_DATA_TYPE:break;case this._COMPLEX_DATA_TYPE:break;default:break;}}return _8f1;},doesTypeFlexMatch:function(_8f5,_8f6,_8f7){var _8f8=false;if(_8f5===null||_8f6===null){return _8f8;}if((_8f7===null)||(typeof _8f7=="undefined")){_8f7=true;}_8f5=this.getNormalizedPayload(_8f5);_8f6=this.getNormalizedPayload(_8f6);_8f5=_8f5.toLowerCase();_8f6=_8f6.toLowerCase();if(_8f5==_8f6||_8f5=="any"||_8f6=="any"){_8f8=true;}else{var _8f9=this.checkDataType(_8f5);var _8fa,_8fb;switch(_8f9){case this._SIMPLE_DATA_TYPE:_8fa=this.checkDataType(_8f6);switch(_8fa){case this._SIMPLE_DATA_TYPE:if(_8f7){if(this._mappings[_8f5][_8f6]==1){_8f8=true;}}else{if(this._semanticMappings[_8f5][_8f6]==1){_8f8=true;}}break;case this._COMBINED_DATA_TYPE:_8fb=this.getMainType(_8f6);if(_8f7){if(_8f5==_8fb||this._mappings[_8f5][_8fb]==1){_8f8=true;}}else{if(_8f5==_8fb||this._semanticMappings[_8f5][_8fb]==1){_8f8=true;}}break;default:break;}break;case this._COMBINED_DATA_TYPE:_8fa=this.checkDataType(_8f6);var _8fc=this.getMainType(_8f5);switch(_8fa){case this._SIMPLE_DATA_TYPE:if(_8f7){if(_8fc==_8f6||this._mappings[_8fc][_8f6]==1){_8f8=true;}}else{if(_8fc==_8f6||this._semanticMappings[_8fc][_8f6]==1){_8f8=true;}}break;case this._COMBINED_DATA_TYPE:_8fb=this.getMainType(_8f6);if(_8fc==_8fb||this._mappings[_8fc][_8fb]==1){_8f8=true;}break;default:break;}break;default:break;}}return _8f8;},getMainType:function(_8fd){var _8fe=_8fd.indexOf(".");if(_8fe<0){return _8fd;}else{return _8fd.substring(0,_8fe);}},checkDataType:function(_8ff){_8ff=_8ff.toLowerCase();var _900=_8ff.split(".");if(_900.length==1){if(this._simpleTypes[_8ff]==1){return this._SIMPLE_DATA_TYPE;}else{return this._COMPLEX_DATA_TYPE;}}else{if(_900.length==2||_900.length==3){var _901=_900[0];var _902=_900[_900.length-1];if(_901=="url"||_902=="languagecode"||_902=="countrycode"){return this._COMBINED_DATA_TYPE;}else{return this._COMPLEX_DATA_TYPE;}}else{return this._COMPLEX_DATA_TYPE;}}},getTypeLabel:function(_903,_904){_903=_903.toLowerCase();var _905=_903;var _906=this.checkDataType(_903);if(_906==this._COMBINED_DATA_TYPE){var _907=_903.indexOf(".");var main=_903.substring(0,_907);var _908=this.getSimpleTypeLabel(main,_904);var sub=_903.substring(_907+1,_903.length);var _909=this.getSimpleTypeLabel(sub,_904);_905=_908+" ("+_909+")";}else{_905=this.getSimpleTypeLabel(_903,_904);}return _905;},getNormalizedPayload:function(_90a){var _90b=_90a;var _90c=_90a;var _90d=_90a.indexOf("{");var _90e=_90a.indexOf("}");var _90f="";if(_90e>_90d){_90b=_90a.substring(_90d+1,_90e);_90c=_90a.substring(_90e+1,_90a.length);if(_90b===this.xsdNS){_90f=this.xsdPrefix;}else{if(_90b===this.jsNS){_90f=this.jsPrefix;}else{if(_90b===this.nsNS){_90f=this.nsPrefix;}}}_90c=_90f+_90c;}return _90c;},getSimpleTypeLabel:function(_910,_911){var _912;if(this.resourceBundle[_910]){_912=this.resourceBundle[_910];}else{_912=_910.charAt(0).toUpperCase()+_910.substring(1);}return _912;}});}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(_913,_914,_915){var _916=null;if(_913.type==_914.type||_913.type=="any"||_914.type=="any"){_916=new com.ibm.mm.iwidget.IEventImpl(_913.name,_913.type,_913.payload,_913.source);}else{var _917=this.isTransformable(_913,_914,_915);if(_917){var _918=null;switch(_914.type.toLowerCase()){case "time":if(_913.type.toLowerCase()=="xsd:time"){_918=this._xsdTimeToMmTime(_913.payload);}break;case "date":switch(_913.type.toLowerCase()){case "xsd:date":_918=this._xsdDateToMmDate(_913.payload);break;case "js:date":_918=this._jsDateToMmDate(_913.payload);break;}break;case "timestamp":if(_913.type.toLowerCase()=="xsd:datetime"){_918=this._xsdDateTimeToMmTimestamp(_913.payload);}break;case "xsd:time":if(_913.type.toLowerCase()=="time"){_918=this._mmTimeToXsdTime(_913.payload);}break;case "xsd:date":switch(_913.type.toLowerCase()){case "date":_918=this._mmDateToXsdDate(_913.payload);break;case "js:date":_918=this._jsDateToXsdDate(_913.payload);break;}break;case "xsd:datetime":if(_913.type.toLowerCase()=="timestamp"){_918=this._mmTimestampToXsdDatetime(_913.payload);}break;case "js:date":switch(_913.type.toLowerCase()){case "xsd:date":_918=this._xsdDateToJsDate(_913.payload);break;case "date":_918=this._mmDateToJsDate(_913.payload);break;}break;}if(_918!==null){_916=new com.ibm.mm.iwidget.IEventImpl(_913.name,_914.type,_918,_913.source);}else{_916=new com.ibm.mm.iwidget.IEventImpl(_913.name,_914.type,_913.payload,_913.source);}}}return _916;},isTransformable:function(_919,_91a,_91b){return this.dataTypes.doesTypeFlexMatch(_919.type,_91a.type,_91b);},_mmTimestampToXsdDatetime:function(_91c){var _91d="T";var _91e="-";var _91f=":";var _920=/^([\d]{4})-([\d]{2})-([\d]{2})\s([\d]{2}):([\d]{2}):([\d]{2})$/;var _921=/^([\d]{4})-([\d]{2})-([\d]{2})\s([\d]{2}):([\d]{2}):([\d]{2})\.([\d]{4})$/;var _922=/^([\d]{4})([\d]{2})([\d]{2})\s([\d]{2})([\d]{2})([\d]{2})$/;var _923=false;_923=_921.test(_91c);if(_923){var _924=_91c.split(new RegExp("[.]{1}"))[0];return _924.replace(/\s/,_91d);}else{_923=_920.test(_91c);if(_923){return _91c.replace(/\s/,_91d);}else{_923=_922.test(_91c);if(_923){var _925=_922.exec(_91c);var yyyy=_925[1];var _926=_925[2];var dd=_925[3];var hh=_925[4];var _927=_925[5];var ss=_925[6];return yyyy+_91e+_926+_91e+dd+_91d+hh+_91f+_927+_91f+ss;}else{return null;}}}},_mmDateToXsdDate:function(date){var _928="-";var _929="01";var _92a="01";var _92b=/^([\d]{4})-([\d]{2})-([\d]{2})$/;var _92c=/^([\d]{4})([\d]{2})([\d]{2})$/;var _92d=/^([\d]{4})([\d]{2})$/;var _92e=/^([\d]{4})$/;var _92f=false;_92f=_92b.test(date);if(_92f){return date;}else{_92f=_92c.test(date);var yyyy,mm,_930;if(_92f){_930=_92c.exec(date);yyyy=_930[1];mm=_930[2];var dd=_930[3];return yyyy+_928+mm+_928+dd;}else{_92f=_92d.test(date);if(_92f){_930=_92d.exec(date);yyyy=_930[1];mm=_930[2];return yyyy+_928+mm+_928+_92a;}else{_92f=_92e.test(date);if(_92f){_930=_92e.exec(date);yyyy=_930[1];return yyyy+_928+_929+_928+_92a;}else{return null;}}}}},_mmTimeToXsdTime:function(time){var _931=":";var _932="00";var _933="00";var _934=/^\d{2}\:\d{2}\:\d{2}\.\d{4}$/;var _935=/^\d{2}\:\d{2}\:\d{2}$/;var _936=/^\d{2}\:\d{2}$/;var _937=/^\d{2}$/;var _938=false;_938=_934.test(time);if(_938){return time.split(new RegExp("[.]{1}"))[0];}else{_938=_935.test(time);if(_938){return time;}else{_938=_936.test(time);if(_938){return time+_931+_933;}else{_938=_937.test(time);if(_938){return time+_931+_932+_931+_933;}else{return null;}}}}},_xsdDateTimeToMmTimestamp:function(_939){var _93a=" ";var _93b=/^\d{4}\-\d{2}\-\d{2}\T\d{2}\:\d{2}\:\d{2}/;var _93c=false;_93c=_93b.test(_939);if(_93c){var _93d=_939.match(_93b)[0];return _93d.replace(/T/,_93a);}else{return null;}},_xsdDateToMmDate:function(date){var _93e=/^\d{4}\-\d{2}\-\d{2}/;var _93f=false;_93f=_93e.test(date);if(_93f){return date.match(_93e)[0];}else{return null;}},_xsdTimeToMmTime:function(time){var _940=/^\d{2}\:\d{2}\:\d{2}/;var _941=false;_941=_940.test(time);if(_941){return time.match(_940)[0];}else{return null;}},_jsDateToMmDate:function(date){if(date){var year=date.getFullYear();var _942=date.getMonth();var day=date.getDate();_942=this._format(_942.toString());day=this._format(day.toString());return year+"-"+_942+"-"+day;}else{return null;}},_jsDateToXsdDate:function(date){var _943=null;if(date){var year=date.getFullYear();var _944=date.getMonth();var day=date.getDate();var _945=date.getTimezoneOffset();_944=this._format(_944.toString());day=this._format(day.toString());_943=year+"-"+_944+"-"+day;if(_945!==0){var _946;var _947;var _948;if(_945<0){_947=Math.ceil(_945/60);_948=(_945*-1)%60;if(_948===0){_946="-"+this._format((_947*-1).toString())+":00";}else{_946="-"+this._format((_947*-1).toString())+this._format(_948);}_943=_943+_946;}else{_947=Math.floor(_945/60);_948=_945%60;if(_948===0){_946="+"+this._format((_947).toString())+":00";}else{_946="+"+this._format((_947).toString())+this._format(_948);}_943=_943+_946;}}}return _943;},_xsdDateToJsDate:function(date){var _949=/^([\d]{4})-(\d\d)-(\d\d)/;var _94a=false;_94a=_949.test(date);if(_94a){var _94b=new Date(NaN);var _94c;var _94d=_949.exec(date);if(_94d){_94c=_94d[2];_94b.setFullYear(_94d[1],_94c-1,_94d[3]);if(_94c!=_94b.getMonth()+1){_94b.setTime(NaN);}}return _94b;}else{return null;}},_mmDateToJsDate:function(date){return this._xsdDateToJsDate(this._mmDateToXsdDate(date));},_format:function(_94e){if(_94e.length==1){_94e="0"+_94e;}return _94e;}});}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(_94f,_950,args){if((args)&&(args.length==0)){args=null;}com.ibm.mashups.enabler.logging.Logger.getLogger(_94f).entering(_950,args);},msg:function(_951,_952,msg,args){com.ibm.mashups.enabler.logging.Logger.getLogger(_951).trace(_952,msg,args);},evalFunction:function(js){return "function() {"+js+"}";},evalResult:function(_953,_954,msg){com.ibm.mashups.enabler.logging.Logger.getLogger(_953).trace(_954,msg);},exit:function(_955,_956,_957){com.ibm.mashups.enabler.logging.Logger.getLogger(_955).exiting(_956,_957);},assertFunction:function(_958){return "function() {\t if (!("+_958+")) {\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(_959,_95a){},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(_95b,_95c){},setFactory:function(_95d,_95e){},removeFactory:function(_95f){}});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(_960,_961){return new com.ibm.mm.iwidget.manageditemset.PersistentAttributes(_960,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(_962,_963){if(_963){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES,_963);}var _964;var wID=_962.id;var _964=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_ATTRIBUTES);var _965=_962.rootElement;if(dojo.hasClass(_965,com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.STANDALONE_CLASS)||!_964){_964=com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE;}if(typeof _964!=="undefined"&&_964==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _966=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _967=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _968=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_967);var _969=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_967,_96a);var _96a=_968.getSpaceID();var _96b=_969.getPageID();var _96c=com.ibm.mm.iwidget.Utils.getModelID(wID);var wnd=_966.findWidgetWindow(_96c,_96b).start();if(!wnd){if(!com.ibm.mashups.enabler.services.IdentificationService.isClientID(_96c)){if(dojo.isFunction(_962._getResourceBundle)){_962._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",_962.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);}}_964=com.ibm.mm.iwidget.services.PersistentAttributesFactoryServiceImpl.DEFAULT_PERSISTENCE;}}if(!(_964 in this._factories)){return null;}return this._factories[_964].createPersistentAttributes(_962,_964);},setFactory:function(_96d,_96e){this._factories[_96d]=_96e;},removeFactory:function(_96f){if(_96f in this._factories){delete this._factories[_96f];}}});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(_970,_971,_972,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","#"+_970);if(_972){item.setAttribute("lang",_972);}if(_971&&!_972){item.innerHTML=_971;}return item;},createItemSet:function(_973,ns){if(!ns){ns="iw-";}var _974=document.createElement("span");dojo.addClass(_974,ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet);_974.setAttribute("title",_973);dojo.style(_974,"visibility","hidden");dojo.style(_974,"display","none");return _974;},createWidgetDefRef:function(_975,ns){if(!ns){ns="iw-";}var aTag=document.createElement("a");dojo.addClass(aTag,ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition);aTag.setAttribute("href",_975);dojo.style(aTag,"visibility","hidden");dojo.style(aTag,"display","none");return aTag;},getItemSet:function(_976,name,ns){if(!ns){ns="iw-";}var rc=null;var _977=dojo.byId(_976);var _978=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItemSet,_977);for(var i=0;i<_978.length;i++){var _979=_978[i];var _97a=_979.getAttribute("title");if(name==_97a){rc=_979;break;}}return rc;},getItem:function(_97b,name,ns){if(!ns){ns="iw-";}var rc=null;var _97c=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_97b);for(var i=0;i<_97c.length;i++){var _97d=_97c[i];var _97e=this.getKeyFromHref(_97d);if(_97e&&_97e==name){rc=_97d;break;}}return rc;},getItems:function(_97f,ns){if(!ns){ns="iw-";}var _980=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwItem,_97f);if(typeof _980=="undefined"||_980===null||_980.length===0){_980=null;}return _980;},getWidgetDefRef:function(_981,ns){if(!ns){ns="iw-";}var rc=null;var _982=dojo.byId(_981);var def=dojo.query("."+ns+iwConstants.CSSCLASS_INSTANCE.iwDefinition,_982)[0];var ref=def.getAttribute("href");if(ref){rc=ref;}return rc;},getKeyFromHref:function(node){var _983=node.getAttribute("href");if(!_983){return null;}var pos=_983.indexOf("#");if(pos<0){return null;}return _983.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 _984=url.toString();if(_984){var _985=_984.indexOf("endpoint://",0);if(_985===0){var _986=_984.indexOf("/",11);if(_986>0){var _987=_984.substring(11,_986);var _988=_984.substring(_986+1);var _989=this._resolveEndpoint(_987);if(_989){if(_989.charAt(_989.length-1)=="/"){_984=_989+_988;}else{_984=_989+"/"+_988;}return _984;}else{return null;}}}else{if(_985>0){var _98a=_984.substring(0,_985);var _98b=_984.substring(_985);var _98c=this.checkForEndpoints(_98b);if(_98c){return _98c.substring(0);}}}}return url;},_resolveEndpoint:function(_98d){if(!this.co){this._init();}var _98e=decodeURIComponent(_98d);var url=this.co.getValue(_98e+".url");if(!url){if(_98e=="{contenthandler}"){url=this.urlContentHandler;}else{if(_98e=="{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 _98f=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANONYMOUS_USER);var _990;if(_98f){_990=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PUBLIC);}else{_990=this.cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTENTHANDLER_PRIVATE);}this.urlContentHandler+=_990;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,_991,_992,_993){this.name=name;this.attributes=_993||null;if(!this.attributes){this.attributes={};}if(typeof type!="undefined"&&type!==null){this.attributes.type=type;}if(typeof _991!="undefined"&&_991!==null){this.attributes.defaultValue=_991;}if(typeof _992!="undefined"&&_992!==null){this.attributes.description=_992;}this.attributeNames=[];this.attributeNames.push("type");this.attributeNames.push("defaultValue");this.attributeNames.push("description");var _994;for(_994 in _993){if(Object.prototype.hasOwnProperty.call(_993,_994)){this.attributeNames.push(_994);}}this.children=new com.ibm.mm.enabler.ArrayMap();},setAttribute:function(name,_995){this.attributes[name]=_995;if(typeof (this.attributeNames[name])!="undefined"){this.attributeNames.push(name);}},getAttribute:function(name){var _996=this.attributes[name];if(typeof _996=="undefined"){_996=null;}return _996;},getAttributeNames:function(){return this.attributeNames;},getChildren:function(){return this.children.values();},getChild:function(name){return this.children.get(name);},setChild:function(name,_997){this.children.put(name,_997);},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(_998){var name=_998.getAttribute("name");var _999=new com.ibm.mm.iwidget.payloadDef(name);var _99a=_998.attributes;for(var i=0;i<_99a.length;i++){var _99b=_99a[i];if(_99b.name!="name"){_999.setAttribute(_99b.name,_99b.value);}}var _99c=_998.childNodes;for(var j=0;j<_99c.length;j++){var _99d=_99c[j];if(_99d.nodeType==1){var _99e=this.getPayloadDef(_99d);_999.setChild(_99e.name,_99e);}}return _999;}});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(_99f){this.widget=_99f;this.widgetId=_99f.id;},getSupportedModes:function(){var _9a0=this.widgetwrapper.widgetDef.getSupportedModes();return _9a0;},getPayloadDef:function(name){var _9a1=this.widget.widgetDef.payloadDefs;var _9a2=_9a1[name];if(typeof _9a2=="undefined"){return null;}return _9a2;},getPayloadDefNames:function(){var _9a3=this.widget.widgetDef.payloadDefs;var arr=[];for(var a in _9a3){if(Object.prototype.hasOwnProperty.call(_9a3,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(_9a4,user){this.widgetId=_9a4;this.user=user;},getItemValue:function(name){if(!name){return null;}var _9a5=this.user.getAttribute(name);if(typeof _9a5=="undefined"){_9a5=null;}return _9a5;},setItemValue:function(name,_9a6){if(!name||!_9a6){return null;}if(this.isReadOnly(name)){return null;}this.user.setAttribute(name,_9a6);return this;},isReadOnly:function(name){if(typeof name=="undefined"||name===null){return false;}var _9a7=this.user.getReadOnlyAttributeNames();var rc=this._contains(_9a7,name);return rc;},_contains:function(_9a8,_9a9){if(!_9a9){return false;}if(!_9a8){return false;}if(_9a8&&!dojo.isArray(_9a8)){return false;}for(var i=0;i<_9a8.length;i++){if(_9a8[i]&&_9a8[i]==_9a9){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 _9aa=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _9ab=_9aa.getValue("com.ibm.mashups.hideLookaside");if(dojo.isString(_9ab)&&_9ab.toLowerCase()=="true"){return this.user.getReadOnlyAttributeNames();}return this.user.getAttributeNames();},save:function(cb){return this.commit(cb);},commit:function(cb){var _9ac=null;if(com.ibm.mashups.enabler.user.Factory.getUserModel){_9ac=com.ibm.mashups.enabler.user.Factory.getUserModel();}if(_9ac){var _9ad=_9ac.commit();var fn=function(_9ae,_9af,_9b0){if(cb){var rc=false;var _9b1=iwConstants.USERPROFILE;if(_9af&&_9af==iwConstants.status.SUCCESS){rc=true;}cb(_9b1,rc);}};_9ad.setFinishedCallback(fn);_9ad.start();}},addListener:function(fn){var _9b2=this._getWidget();if(!_9b2){return null;}var _9b3=_9b2._registerListener(iwConstants.USERPROFILE,fn);return _9b3;},removeListener:function(_9b4){var _9b5=this._getWidget();if(!_9b5){return null;}return _9b5._removeListener(iwConstants.USERPROFILE,_9b4);},_getWidget:function(){var _9b6=com.ibm.mashups.iwidget.model.Factory.getGlobalModel();return _9b6.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 _9b7=this._getExtension();if(_9b7&&_9b7=="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 _9b8=this._getExtension();if(_9b8&&_9b8 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 _9b9=this._getExtension();if(_9b9&&_9b9=="js"){rc=true;}if(!rc&&this.getMimeType()){var _9ba=this.getMimeType();if(_9ba=="text/javascript"||_9ba=="application/x-javascript"||_9ba=="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 _9bb=this[iwConstants.RESOURCE.mimeType];if(!_9bb){_9bb=null;}return _9bb;},_getExtension:function(){var uri=this.getSrc();if(!uri){return null;}var _9bc=uri.substring(uri.lastIndexOf(".")+1,uri.length);if(!_9bc){return null;}return _9bc;}});}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 _9bd=null;if(com.ibm.mashups.enabler.user.Factory.getUserModel){_9bd=com.ibm.mashups.enabler.user.Factory.getUserModel();}var user=null;if(_9bd){user=_9bd.findCurrentUser().start();}var _9be=null;if(user){_9be=new com.ibm.mm.iwidget.manageditemset.UserProfileImpl(this.widgetId,user);}return _9be;},requires:function(_9bf,_9c0,uri,cb,_9c1){_9c1=_9c1||null;if(!_9c1){_9c1="text/plain";}uri=uri||null;if(uri){var obj={};obj[iwConstants.RESOURCE.mimeType]=_9c1;obj[iwConstants.RESOURCE.id]=_9bf;obj[iwConstants.RESOURCE.version]=_9c0;obj[iwConstants.RESOURCE.src]=uri;obj[iwConstants.RESOURCE.callback]=cb;var _9c2=new com.ibm.mm.iwidget.widget.ResourceImpl(obj);com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").loadResource(_9c2,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 _9c3=this.widgetwrapper._getShareableItemSet(name);return _9c3;}});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 _9c4=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(this.navStateModel,this.widget.id);value=_9c4.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 _9c5=cs.getValue(com.ibm.mashups.enabler.services.ConfigConstants.REGISTER_LOADEDRESOURCES);if(_9c5){if(dojo.isString(_9c5)){try{_9c5=dojo.fromJson(_9c5);}catch(e){}}if(dojo.isArray(_9c5)){this.registeredLoadedResources=_9c5;}}}},executeCallbackQueue:function(_9c6){if(this.callbackQueue[_9c6]){var _9c7=this.callbackQueue[_9c6];var _9c8=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_9c6);if(_9c8){for(var i=0;i<_9c7.length;i++){if(_9c7[i]){var _9c9=_9c8._getHandlerScope(_9c7[i].cb);if(_9c9){var cb=dojo.hitch(_9c9,_9c7[i].cb);cb(_9c7[i].id,_9c7[i].src,_9c7[i].status);_9c7[i]=null;}}}}}},loadResource:function(_9ca,_9cb,cb2){var _9cc="loadResource";var _9cd=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_9cd){this.LOGGER.entering(_9cc,arguments);}var _9ce=_9ca.getGlobalId();var uri=_9ca.getSrc();var path=null;if(_9ca.isJS()){path=this._rewriteUrl(uri,_9cb,true);}else{path=this._rewriteUrl(uri,_9cb,false);}if(!_9ce){_9ce=path;}if(!_9ce){return;}this.evalqueue[_9cb]=this.evalqueue[_9cb]?this.evalqueue[_9cb]:[];this.evalqueue[_9cb].push({_id:_9ce,resourceElem:_9ca,cb2:cb2,widgetId:_9cb,isReady:false});var _9cf=_9ca[iwConstants.RESOURCE.skipLoad];if(_9cf){var rc=false;try{rc=dojo.eval(_9cf);}catch(e){rc=false;}if(rc){this._handleLoadedResource(_9ce,_9cb,null,iwConstants.status.OTHER);return;}}var _9d0=this.registeredLoadedResources;if(dojo.isArray(_9d0)){for(var j=0;j<_9d0.length;j++){if(_9d0[j].globalid&&_9d0[j].globalid==_9ce){if(_9d0[j].version){var _9d1=_9ca[iwConstants.RESOURCE.version];if(!_9d1||(_9d1&&_9d1==_9d0[j].version)){this._handleLoadedResource(_9ce,_9cb,null,iwConstants.status.OTHER);return;}}else{this._handleLoadedResource(_9ce,_9cb,null,iwConstants.status.OTHER);return;}}}}var _9d2=this.modules[_9ce];var me=this;if(_9d2&&_9d2!==null){var type=_9d2.type;switch(type){case 0:this.waitingqueue[_9d2._id]=(this.waitingqueue[_9d2._id])?this.waitingqueue[_9d2._id]:[];this.waitingqueue[_9d2._id].push({resourceElem:_9ca,widgetId:_9cb,cb2:cb2});return;case 1:this._handleLoadedResource(_9ce,_9cb,null,_9d2.status,_9d2.data);return;case 2:this._handleLoadedResource(_9ce,_9cb,null,_9d2.status);return;}}_9d2={};_9d2.type=this.LOADING_TOKEN;_9d2._id=_9ce;_9d2._path=path;this.modules[_9ce]=_9d2;if(_9ce!=path){this.modules[path]=this.modules[_9ce];}var _9d3=null;if(_9ca.isCSS()){_9d3=this._loadCSS(path);this.modules[_9ce].type=this.LOADED_TOKEN;this.modules[_9ce].status=iwConstants.status.OTHER;this._handleLoadedResource(_9ce,_9cb,null,iwConstants.status.OTHER);return;}if(_9ca.isImage()){_9d3=this._loadImage(path);this.modules[_9ce].type=this.LOADED_TOKEN;this.modules[_9ce].status=iwConstants.status.OTHER;this._handleLoadedResource(_9ce,_9cb,null,iwConstants.status.OTHER);return;}var _9d4=path;if(dojo.isIE==6&&path.indexOf("/")===0){var _9d5=window.location.protocol;var host=window.location.hostname;var port=window.location.port;_9d4=_9d5+"//"+host+":"+port+path;}var _9d6=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _9d7=_9d6.create();var _9d8=!_9d7.isTransaction();if(ibmConfig.dojotest){_9d8=true;}var args={url:_9d4,ibmMultipart:{context:_9d6.CONTEXT_ENABLER},sync:_9d8,load:function(data,_9d9){var _9da=null;if(_9d9.xhr.status==200||_9d9.xhr.status===0){var _9db=_9d9.xhr.responseText;_9da=_9db.replace(/_IWID_/g,"_"+_9cb+"_");}me.modules[_9ce].type=me.LOADED_TOKEN;me.modules[_9ce].status=iwConstants.status.SUCCESS;me._handleLoadedResource(_9ce,_9cb,_9da,iwConstants.status.SUCCESS);var _9dc=me.waitingqueue[_9ce];if(_9dc){for(var j=0;j<_9dc.length;j++){var req=_9dc[j];me._handleLoadedResource(_9ce,req.widgetId,null,iwConstants.status.SUCCESS);}}me.waitingqueue[_9ce]=null;},error:function(data,_9dd){me.modules[_9ce].type=me.LOADING_ERROR_TOKEN;me.modules[_9ce].data=data;me.modules[_9ce].status=_9dd.xhr.status;me._handleLoadedResource(_9ce,_9cb,null,_9dd.xhr.status,data);var _9de=me.waitingqueue[_9ce];if(_9de){for(var h=0;h<_9de.length;h++){var req=_9de[h];me._handleLoadedResource(_9ce,req.widgetId,null,_9dd.xhr.status,data);}}me.waitingqueue[_9ce]=null;}};dojo.xhrGet(args);},_rewriteUrl:function(uri,id,_9df){var _9e0=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);return _9e0._rewriteURI(uri,_9df);},_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,_9e1,_9e2,_9e3){if(cb){if(dojo.isString(cb)){var _9e4=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(_9e1);if(_9e4){var _9e5=_9e4._getHandlerScope(cb);if(_9e5){cb=dojo.hitch(_9e5,cb);}}}var id=_9e2.getGlobalId();var src=_9e2.getSrc();if(!_9e3){_9e3=iwConstants.status.SUCCESS;}if(dojo.isFunction(cb)){dojo.partial(cb)(id,src,_9e3);}else{this.callbackQueue[_9e1]=this.callbackQueue[_9e1]?this.callbackQueue[_9e1]:[];var _9e6={cb:cb,id:id,src:src,status:_9e3};this.callbackQueue[_9e1].push(_9e6);}}},_evalFn:function(_9e7){if(window.execScript){window.execScript(_9e7,"JavaScript");}else{dojo.eval(_9e7);}},_loadedFC:function(_9e8,_9e9,cb2,data,_9ea){var cb=_9e8[iwConstants.RESOURCE.callback];if(cb){this._evalCallback(cb,_9e9,_9e8,_9ea);}if(cb2){var _9eb=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();_9eb.suspendTransaction();if(data&&_9ea){cb2(data,_9ea);}else{cb2();}_9eb.resumeTransaction();}},_handleLoadedResource:function(_9ec,_9ed,_9ee,_9ef,_9f0){var _9f1;var _9f2=this.evalqueue[_9ed];if(_9f2){if(_9f2[0]&&_9f2[0]._id&&_9f2[0]._id==_9ec){if(_9ee){this._evalFn(_9ee);}_9f1=_9f2.shift();this._loadedFC(_9f1.resourceElem,_9ed,_9f1.cb2,_9f0,_9ef);var arr=_9f2;var _9f3=true;while(_9f3&&_9f2.length>0){if(_9f2[0].isReady){var _9f4=_9f2[0].contents;if(_9f4){this._evalFn(_9f4);}this._loadedFC(_9f2[0].resourceElem,_9ed,_9f2[0].cb2,_9f2[0].statusData,_9f2[0].status);_9f2.shift();}else{_9f3=false;}}}else{if(_9f2[0]&&_9f2[0]._id&&_9f2[0]._id!=_9ec){for(var i=0;i<_9f2.length;i++){_9f1=_9f2[i];if(_9f1._id&&_9f1._id==_9ec){_9f2[i].contents=_9ee;_9f2[i].isReady=true;_9f2[i].status=_9ef;_9f2[i].statusData=_9f0;}}}}}}});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"||window.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"||window.ActiveXObject!==undefined){return com.ibm.mm.enabler.xslt.ie.loadXmlString(sXml);}else{var _9f5=new DOMParser();return com.ibm.mm.enabler.xslt.gecko.loadXmlString(sXml);}};com.ibm.mm.enabler.xslt.loadXsl=function(sUrl){if(typeof ActiveXObject!="undefined"||window.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,_9f6,_9f7,_9f8){var _9f9=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _9fa="transform";var _9fb=com.ibm.mm.enabler.xslt.LOGGER.isLoggable(_9f9);if(_9fb){com.ibm.mm.enabler.xslt.LOGGER.entering(_9fa,arguments);}if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){return com.ibm.mm.enabler.xslt.ie.transform(xml,xsl,_9f6,_9f7,_9f8);}else{return com.ibm.mm.enabler.xslt.gecko.transform(xml,xsl,_9f6,_9f7,_9f8);}};com.ibm.mm.enabler.xslt.transformAndUpdate=function(_9fc,xml,xsl,_9fd,_9fe){var _9ff=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _a00="transformAndUpdate";var _a01=com.ibm.mm.enabler.xslt.LOGGER.isLoggable(_9ff);if(_a01){com.ibm.mm.enabler.xslt.LOGGER.entering(_a00,arguments);}var _a02;if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){_a02=com.ibm.mm.enabler.xslt.ie.transform(xml,xsl,_9fd,_9fe,true);if(_a01){com.ibm.mm.enabler.xslt.LOGGER.trace(_a00,"XSLT result: "+_a02);}_9fc.innerHTML+=_a02;}else{_a02=com.ibm.mm.enabler.xslt.gecko.transform(xml,xsl,_9fd,_9fe,false);if(_a01){com.ibm.mm.enabler.xslt.LOGGER.trace(_a00,"XSLT result: "+(new XMLSerializer()).serializeToString(_a02));}var _a03=_a02.documentElement;if(_a02.documentElement.tagName=="transformiix:result"){_a03=_a02.documentElement.childNodes;com.ibm.mm.enabler.utils.Dom.copyChildren(_a02.documentElement,_9fc,true);}else{if(_a01){com.ibm.mm.enabler.xslt.LOGGER.trace(_a00,"Appending: "+(new XMLSerializer()).serializeToString(_a03));}_9fc.appendChild(_a03);}}if(_a01){com.ibm.mm.enabler.xslt.LOGGER.exiting(_a00);}};com.ibm.mm.enabler.xslt.ie.loadXml=function(sUrl){var _a04=new ActiveXObject("MSXML2.DOMDocument");_a04.async=0;_a04.resolveExternals=0;if(!_a04.load(sUrl)){throw new Error("Error loading xml file "+sUrl);}return _a04;};com.ibm.mm.enabler.xslt.ie.loadXmlString=function(sXml){var _a05=!window.ActiveXObject&&window.ActiveXObject!==undefined;var _a06=_a05?new ActiveXObject("MSXML2.FreeThreadedDOMDocument.6.0"):new ActiveXObject("MSXML2.DOMDocument");_a06.async=0;_a06.resolveExternals=0;if(!_a06.loadXML(sXml)){throw new Error("Error loading xml string "+sXml);}return _a06;};com.ibm.mm.enabler.xslt.ie.loadXsl=function(sUrl){var _a07=new ActiveXObject("MSXML2.FreeThreadedDOMDocument");_a07.async=0;_a07.resolveExternals=0;if(!_a07.load(sUrl)){throw new Error("Error loading xsl file "+sUrl);}return _a07;};com.ibm.mm.enabler.xslt.ie.transform=function(_a08,xsl,_a09,_a0a,_a0b){var oXml=_a08;var oXsl=xsl;try{if(!oXsl.documentElement){oXsl=this.loadXsl(xsl);}}catch(e){var sMsg=e.message;throw new Error(""+sMsg,""+sMsg);}var _a0c=new ActiveXObject("Msxml2.XSLTemplate");_a0c.stylesheet=oXsl;var _a0d=_a0c.createProcessor();_a0d.input=oXml;if(_a0a){com.ibm.mm.enabler.utils.Misc.forIn(_a0a,function(_a0e,key,obj){this.addParameter(key,_a0e);},_a0d);}if(_a09){_a0d.addParameter("mode",_a09);}if(_a0b){if(!_a0d.transform()){throw new Error("Error transforming xml doc "+oXml);}return _a0d.output;}else{var _a0f=new ActiveXObject("MSXML2.DOMDocument");_a0f.async=0;_a0f.validateOnParse=1;oXml.transformNodeToObject(oXsl,_a0f);return _a0f;}};com.ibm.mm.enabler.xslt.gecko.loadXml=function(sUrl){};com.ibm.mm.enabler.xslt.gecko.loadXmlString=function(sXml){var _a10=new DOMParser();var _a11;try{_a11=_a10.parseFromString(sXml,"text/xml");}catch(exc){throw new Error("Error loading xml string "+sXml);}return _a11;};com.ibm.mm.enabler.xslt.gecko.loadXsl=function(sUrl){var _a12=document.implementation.createDocument("","",null);_a12.async=0;_a12.load(sUrl);return _a12;};com.ibm.mm.enabler.xslt.gecko.transform=function(_a13,xsl,_a14,_a15,_a16){try{var _a17=xsl;if(!_a17.documentElement){_a17=this.loadXsl(xsl);}var proc=new XSLTProcessor();proc.importStylesheet(_a17);if(_a15){com.ibm.mm.enabler.utils.Misc.forIn(_a15,function(_a18,key,obj){this.setParameter(null,key,_a18);},proc);}if(_a14){proc.setParameter(null,"mode",_a14);}var _a19=proc.transformToDocument(_a13);if(!_a16){return _a19;}resultStr=_a19.documentElement.childNodes[0].textContent;}catch(exc){throw new Error("Error transforming xml doc "+exc);}return resultStr;};com.ibm.mm.enabler.xslt.setLayerContentByXml=function(_a1a,xml,xsl,_a1b,_a1c){var _a1d=com.ibm.mm.enabler.xslt.transform(xml,xsl,null,_a1b,_a1c);if(_a1a.innerHTML){_a1a.innerHTML=_a1d;}else{var obj=document.getElementById(_a1a);obj.innerHTML=_a1d;}};}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,_a1e,_a1f,_a20,_a21,uri,_a22,_a23,_a24,_a25,_a26,_a27){var arg1=name;if(dojo.isString(arg1)){this.name=name;this.markup=_a1e;this.iScope=_a1f;this.itemSetsArr=_a20;this.uri=uri;this.widgetEvents=_a21;this.publishedEvents=_a23;this.handledEvents=_a24;this.supportedModes=_a22;this.resources=_a25;this.payloadDefs=_a26;this.iDescriptor=_a27;}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 _a28;this.widgetEvents={};for(_a28 in this.metaData){if(_a28.indexOf("on")===0){this.widgetEvents[_a28]=this.metaData[_a28];}}var _a29=arg1.events.publishedEvents;this.publishedEvents={};this.handledEvents={};var _a2a;var _a2b;for(_a2a in _a29){if(Object.prototype.hasOwnProperty.call(_a29,_a2a)){_a28=_a29[_a2a];_a2b=new com.ibm.mm.iwidget.IEventDescriptionImpl(_a28.eventName,_a28.payloadType,_a28.description,_a28.onEvent);if(!this.publishedEvents[_a2a]){this.publishedEvents[_a2a]=[];}this.publishedEvents[_a2a].push(_a2b);}}var _a2c=arg1.events.handledEvents;for(_a2a in _a2c){if(Object.prototype.hasOwnProperty.call(_a2c,_a2a)){_a28=_a2c[_a2a];_a2b=new com.ibm.mm.iwidget.IEventDescriptionImpl(_a28.eventName,_a28.payloadType,_a28.description,_a28.onEvent);if(!this.handledEvents[_a2a]){this.handledEvents[_a2a]=[];}this.handledEvents[_a2a].push(_a2b);}}var _a2d;this.itemSetsArr={};for(_a2d in arg1.itemSets){if(Object.prototype.hasOwnProperty.call(arg1.itemSets,_a2d)){var _a2e=arg1.itemSets[_a2d];var _a2f;if(_a2d=="attributes"){_a2f=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(_a2e.name,_a2e.onItemSetChanged);}else{_a2f=new com.ibm.mm.iwidget.itemset.ItemSetDefaultImpl(_a2e.name,_a2e.onItemSetChanged);}_a2f.itemLists.items=_a2e.itemLists;this.itemSetsArr[_a2d]=_a2f;}}}},_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 _a30=this.itemSetsArr.attributes;if(!_a30){_a30={name:"attributes",items:{}};}if(typeof (this.uri)!="undefined"&&_a30){_a30.items.contentURI={id:"contentURI",value:this.uri,readOnly:false};}if(typeof (this.supportedModes)!="undefined"&&_a30){_a30.items.supportedModes={id:"supportedModes",value:this.uri,readOnly:false};}return _a30;},getAllItemSetNames:function(){var _a31=[];if(!this.itemSetsArr){return _a31;}var i=0;for(var _a32 in this.itemSetsArr){if(Object.prototype.hasOwnProperty.call(this.itemSetsArr,_a32)){var _a33=this.itemSetsArr[_a32];if(typeof (_a33)!="undefined"){_a31[i]=_a33.name;}i++;}}return _a31;},getItemSet:function(name){if(name=="attributes"){return this.getAttributes();}var _a34=this.itemSetsArr[name];if(typeof (_a34)!="undefined"){return _a34;}return null;},getPublishedEventsNames:function(){if(!this.publishedEvents){return null;}var _a35=[];var _a36;for(_a36 in this.publishedEvents){if(Object.prototype.hasOwnProperty.call(this.publishedEvents,_a36)){_a35.push(_a36);}}return _a35;},getHandledEventsNames:function(){if(!this.handledEvents){return null;}var _a37=[];var _a38;for(_a38 in this.handledEvents){if(Object.prototype.hasOwnProperty.call(this.handledEvents,_a38)){_a37.push(_a38);}}return _a37;},getPublishedEvent:function(_a39){if(!this.publishedEvents){return null;}return this.publishedEvents[_a39];},getHandledEvent:function(_a3a){if(!this.handledEvents){return null;}return this.handledEvents[_a3a];},getWidgetName:function(){return this.name;},getPayloadDefs:function(){return this.payloadDefs;},getPayloadDef:function(name){var _a3b=this.payloadDefs[name];if(typeof _a3b=="undefined"){return null;}return _a3b;},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(_a3c){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(_a3d){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.xmlStr=_a3d;},namespaces:{"iw":"http://www.ibm.com/iWidget"},parseWidgetDefinition:function(){var _a3e=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var _a3f=this.readMarkup(_a3e);var _a40=this.readItemSets(_a3e);var uri=this.readContentURI(_a3e);var _a41=this.readWidgetEvents(_a3e);var name=this.readName(_a3e);var _a42=this.readiScope(_a3e);var _a43=this.readSupportedModes(_a3e);var _a44=this.readPublicEvents(_a3e,"iw:handledEvents");var _a45=this.readPublicEvents(_a3e,"iw:publishedEvents");var _a46=this.readResources(_a3e);var _a47=this.readPayloadDefs(_a3e);var _a48=this.readIDescriptor(_a3e);return new com.ibm.mm.iwidget.widget.IWidgetDefinitionLegacyImpl(name,_a3f,_a42,_a40,_a41,uri,_a43,_a45,_a44,_a46,_a47,_a48);},readMarkup:function(_a49){var _a4a="readMarkup";var _a4b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a4b){this.LOGGER.entering(_a4a,arguments);}var _a4c="/iw:iwidget/iw:content";var _a4d=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_a4c,_a49,this.namespaces);var _a4e="";if(_a4d){var _a4f=_a4d.childNodes;for(var j=0,l=_a4f.length;j0){dojo.forEach(_a7a,function(node){var _a7b={};_a7b.name=node.getAttribute("resourceName");_a7b.src=node.getAttribute("uri");_a7b.version=node.getAttribute("version");_a7b.callback=node.getAttribute("callback");_a7b.mimetype=node.getAttribute("mimetype");_a79[i]=_a7b;},this);}return _a79;},readIDescriptor:function(_a7c){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(_a7d){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.xmlStr=_a7d;},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 _a7e=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var _a7f=this.readRootElement(_a7e);_a7f.markup=this.readMarkup(_a7e);_a7f.itemSetsArr=this.readItemSets(_a7e,_a7f);_a7f.publicEvents=this.readPublicEvents(_a7e);_a7f.resources=this.readResources(_a7e);var _a80=this.readPayloadDefs(_a7e);if(_a80){_a7f.payloadDefs=_a80;}_a7f.eventDescriptions=this.readEventDescriptions(_a7e);_a7f.xmlStr=this.xmlStr;return new com.ibm.mm.iwidget.widget.IWidgetDefinitionImpl(_a7f,this.xmlStr);},readRootElement:function(_a81){var _a82={};var root=_a81.documentElement;var _a83=root.getAttribute("supportedModes");if(!_a83){_a83="view";}_a82.supportedModes=_a83;var _a84;var name=root.getAttribute("id");if(!name){name=null;}_a82.id=name;_a82.name=name;var temp=root.getAttribute("allowInstanceContent");var _a85=false;if(temp&&temp=="true"){_a85=true;}_a82.allowInstanceContent=_a85;var lang=root.getAttribute("lang");if(!lang){lang=root.getAttribute("xml:lang");}if(!lang){lang="en";}_a82.lang=lang;var _a86={};var _a87=root.attributes;var i;for(i=0;i<_a87.length;i++){var _a88=_a87[i];if(_a88.name.indexOf("on")===0){var _a89=_a88.value;if(_a89){_a86[_a88.name]=_a89;}}}_a82.widgetEvents=_a86;var _a8a=root.getAttribute("iScope");if(!_a8a){_a8a=null;}_a82.iScope=_a8a;var _a8b=iwConstants.iDescriptorItems;var _a8c={};for(var j in _a8b){if(Object.prototype.hasOwnProperty.call(_a8b,j)){name=_a8b[j];_a84=root.getAttribute(name);_a8c[name]=_a84;}}_a82.iDescriptor=_a8c;var _a8d={};_a87=root.attributes;for(i=0;i<_a87.length;i++){var att=_a87[i];if(att.name.indexOf("on")!==0&&!iwConstants.iDescriptorItems[att.name]&&!this.reservedAttributes[att.name]){_a84=att.value;if(typeof _a84!="undefined"&&_a84!==null){_a8d[att.name]=_a84;}}}_a82.simpleAttributes=_a8d;var _a8e=root.getAttribute("supportedWindowStates");if(!_a8e){_a8e="normal";}_a82.supportedWindowStates=_a8e;var _a8f=root.getAttribute("xml:base");if(_a8f){_a82.xmlBase=_a8f;}return _a82;},readMarkup:function(_a90){var _a91="readMarkup";var _a92=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_a92){this.LOGGER.entering(_a91,arguments);}var _a93="/iw:iwidget/iw:content";var _a94=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_a93,_a90,this.namespaces);var _a95={};var _a96="";var mode=null;if(_a94&&_a94.length>0){for(var i=0,l=_a94.length;i0||(lang&&_aae)){for(var v=0,vL=_ab0.length;v=0){_b02=true;_b07.defaultLocale=lang;}else{_b07.value=_b06;}_b03.items[id]=_b07;if(_b00){_afc[_afe]=_b03;}else{_afd[_afe]=_b03;}}}}}_af8.shareableItemSetsArr=_afd;_af8.itemSetsArr=_afc;if(_afa){this.LOGGER.exiting(_af9,_afc);}},readPayloadDefs:function(_b08){var _b09="readPayloadDefs";var _b0a=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b0a){this.LOGGER.entering(_b09,arguments);}var _b0b={};return _b0b;},readPublicEvents:function(_b0c,_b0d){var _b0e="readPublicEvents";var _b0f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b0f){this.LOGGER.entering(_b0e,arguments);}var _b10={};if(_b0f){this.LOGGER.exiting(_b0e,itemSetsArr);}return _b10;},readResources:function(_b11){var _b12="readResources";var _b13=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b13){this.LOGGER.entering(_b12,arguments);}var _b14=[];if(_b13){this.LOGGER.exiting(_b12,itemSetsArr);}return _b14;},readEventDescriptions:function(_b15){var _b16="readEventDescriptions";var _b17=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_b17){this.LOGGER.entering(_b16,arguments);}var _b18={};if(_b17){this.LOGGER.exiting(_b16,itemSetsArr);}return _b18;}});}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(_b19){var _b1a=_b19.replace(/^\s+/,"").replace(/\s+$/,"");var _b1b=this._isXML(_b1a);var _b1c=this._isLegacy(_b1a);var _b1d=this._isOpenSocialGadget(_b1a);if(_b1b&&_b1c&&!_b1d){return new com.ibm.mm.iwidget.parser.LegacyXMLParser(_b1a);}else{if(_b1b&&!_b1c&&!_b1d){return new com.ibm.mm.iwidget.parser.StandardXMLParser(_b1a);}else{if(_b1b&&_b1d){return new com.ibm.mm.iwidget.parser.OpenSocialXMLParser(_b1a);}}}return null;},_isOpenSocialGadget:function(_b1e){var _b1f=true;var _b20=_b1e.indexOf("");if(_b20===-1){_b1f=false;}return _b1f;},_isXML:function(_b21){var _b22=true;var _b23=_b21.indexOf("=\"http://www.w3.org/1999/xhtml\"");if(_b23!=-1){_b22=false;}return _b22;},_isLegacy:function(_b24){var _b25=true;var _b26=_b24.indexOf("=\"http://www.ibm.com/xmlns/prod/iWidget\"");if(_b26!=-1){_b25=false;}return _b25;}});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(_b27,sync,_b28,_b29){if(ibmConfig.dojotest){sync=true;}var _b2a=this.widgetDef[_b27];if(_b2a&&_b2a==this.LOADING_TOKEN){if(!this.waitingqueue[_b27]){this.waitingqueue[_b27]=[];}var _b2b={id:_b29,cb:_b28};this.waitingqueue[_b27].push(_b2b);return;}else{if(_b2a&&_b2a.error&&_b2a.error==this.LOADING_ERROR_TOKEN){return this.handleCallback(_b28,_b2a.data,_b2a.status);}else{if(_b2a){return this.handleCallback(_b28,_b2a,"200");}}}this.widgetDef[_b27]=this.LOADING_TOKEN;var me=this;var _b2c=_b27;if((_b2c.indexOf("http")===0)||(_b2c.indexOf("https")===0)||(_b2c.indexOf("endpoint")===0)){_b2c=com.ibm.mm.enabler.utils.URLHelper.rewriteURL(_b2c);}var args={url:_b2c,ibmMultipart:{context:com.ibm.mashups.enabler.io.XHRMultipartFactory.CONTEXT_ENABLER},load:function(data,_b2d){var xhr=_b2d.xhr;_b2d["com.ibm.mm.Multipart.forceOnNextResponse"]=true;var _b2e=com.ibm.mm.iwidget.parser.WidgetParserFactory.getWidgetParser(xhr.responseText);var _b2f=_b2e.parseWidgetDefinition();me.widgetDef[_b27]=_b2f;me.handleCallback(_b28,_b2f,xhr.status,xhr);var _b30=me.waitingqueue[_b27];if(_b30){for(var i in _b30){if(Object.prototype.hasOwnProperty.call(_b30,i)){me.handleCallback(_b30[i].cb,_b2f,xhr.status,xhr);}}me.waitingqueue[_b27]=null;}},error:function(data,_b31){var xhr=_b31.xhr;if(xhr.status==404){me.LOGGER.warning("getWidgetXML","Error loading widget xml. "+data.message);}me.widgetDef[_b27]={error:me.LOADING_ERROR_TOKEN,data:data,status:xhr.status};me.handleCallback(_b28,data,xhr.status,xhr);var _b32=me.waitingqueue[_b27];if(_b32){for(var i in _b32){if(Object.prototype.hasOwnProperty.call(_b32,i)){me.handleCallback(_b32[i].cb,data,xhr.status,xhr);}}me.waitingqueue[_b27]=null;}},handleAs:"text",sync:sync};dojo.xhrGet(args);return;},handleCallback:function(_b33,data,_b34,xhr){if(_b33){_b33(data,_b34,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,_b35,_b36,_b37,_b38){this._id=id;this._styleClass=_b35;this._iconPath=_b36;this._iconAlt=_b37;this._color=_b38;}});dojo.declare("com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusMessage",null,{constructor:function(type,_b39,_b3a){this._type=type;this._message=_b39;this._details=_b3a;},render:function(_b3b){var _b3c=com.ibm.mm.enabler.logging.LegacyLoggerStatus.statusTypesMap.getStatusType(this._type);var msg=[];msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]="
";var _b3d=this._message;if(this._type==="error"){var _b3e=_b3d.split(":");var _b3f=_b3e.shift()+":";_b3d=_b3e.join(":");msg[msg.length]="
";msg[msg.length]=_b3f;msg[msg.length]="
";}msg[msg.length]="
";msg[msg.length]=_b3d;msg[msg.length]="
";if(this._details&&this._details.length>0){msg[msg.length]="
";msg[msg.length]=this._details;msg[msg.length]="
";}msg[msg.length]="
";_b3b.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 _b40=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",_b40.ERROR,"#FF0000");this.internalStatusTypeMap.warn=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(1,"warning",this._baseURL+"warning.gif",_b40.WARNING,"FFFF00");this.internalStatusTypeMap.info=new com.ibm.mm.enabler.logging.LegacyLoggerStatus.StatusType(2,"info",this._baseURL+"info.gif",_b40.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 _b41=[];for(var i=1;i/g,">");return _b48;};com.ibm.mm.enabler.logging.LegacyLogger.info=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.info(_b49,msg);};com.ibm.mm.enabler.logging.LegacyLogger.warn=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.warning(_b4b,msg);};com.ibm.mm.enabler.logging.LegacyLogger.error=function(_b4d){var _b4e=com.ibm.mm.enabler.logging.LegacyLogger.getObjectArryFromArguments(arguments);var msg=com.ibm.mm.enabler.logging.LegacyLogger.LOGGER._getMessageString(_b4e);com.ibm.mm.enabler.logging.LegacyLogger.LOGGER.severe(_b4d,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;i0){var _b79=_b78[0].getSourceWidgetID();_b77.removeWire(_b79);this.commit();_b78=_b77.getWires();}}var _b7a=null;if(_b77){_b7a=_b77.getTargets();}if(_b7a){var _b7b=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();for(var i in _b7a){if(Object.prototype.hasOwnProperty.call(_b7a,i)){var _b7c=_b7b.find(i);if(_b7c){var _b7d=_b7c.getIWidgetInstance().getWireModel();_b7d.removeWire(this.id);_b7c.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(_b7e){this.parent=_b7e;},_getPublishedEvents:function(){var _b7f=this.getWidgetPublishedEvents();var arr={};if(dojo.isArray(_b7f)){for(var i=0,l=_b7f.length;i ."+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(_ba9);var _bab=that.eventSvr.subscribeEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+"."+that.id,that,"handleSizeChanged");that.subHandler[id].push(_bab);};if(_ba1.isLoaded()&&_ba0&&_ba0=="false"){_ba1.loaded=false;_ba1._getInstanceMarkup(eventCallbackContinue);}else{eventCallbackContinue(_b9f);}};var _bac=_ba1.eventSvr.subscribeEvent(_ba1.eventSvr.WIDGETEVENT_PREFIX+id+"."+"onFrameLoaded",null,eventCallback);_ba1.subHandler[id].push(_bac);var _bad=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 _bae=_bad.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SERVERDOMAIN);if(_bae&&_bae!="null"){host=_bae;}var port=window.location.port;var path=window.location.pathname;var _baf=_bad.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT);var _bb0=null;if(path.indexOf(_baf)>0){_bb0=path.slice(0,path.indexOf(_baf));}if(_ba1._getSubDomain()){var _bb1=_ba1._getSubDomain()+"."+host;if(_bad.getValue("sandbox.disable.subdomains")){_bb1=host;}if(port!=""){url+="//"+_bb1+":"+port;}else{url+="//"+_bb1;}if(_bb0){url+=_bb0;}url+=_bad.getValue(com.ibm.mashups.enabler.services.ConfigConstants.CONTEXT_ROOT_ENABLER);url+="/widgetsandbox";_ba1.eventSvr._getHubAdapter().createIframeHubContainer(id,root,url,_ba0,null,null,dojo.hitch(this,"_onSecurityAlert"));}else{var _bb2=_ba1.eventSvr._getHubAdapter().getSubDomainSize();var _bb3=unescape(_ba1.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_bb3){_bb3=_ba1.getID();}var _bb4=_bad.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SUBDOMAINREUSE);var fmt=_ba1.iwMessages.E_SUBDOMAIN_NOTAVAILABLE1_2;if(_bb4){fmt=_ba1.iwMessages.E_SUBDOMAIN_NOTAVAILABLE_2;}var _bb5=dojo.string.substitute(fmt,[_bb3,_bb2]);var _bb6=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+_ba1.ns+"loading",_ba1.rootElement,_bb6,false);if(_bb6.length>0){aNode=_bb6[0];aNode.innerHTML="";com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(aNode,"error",_bb5);}}},_onSecurityAlert:function(_bb7,_bb8){if(_bb8&&_bb8=="OpenAjax.hub.SecurityAlert.FramePhish"){var me=this;setTimeout(function(){me._handleIframeMove(_bb7);},0);}else{this.LOGGER.trace("_onSecurityAlert","securityAlert:"+_bb8);}},_handleIframeMove:function(_bb9){this.eventSvr._getHubAdapter(this.id).returnSubDomain(this._getSubDomain());var _bba=this.windowManager[this.currentMode];var id=_bba.id;var root=_bba.root||null;if(root===null){var _bbb=this._getDefaultMode()||iwConstants.mode_view;var _bbc=this.windowManager[_bbb]||null;if(_bbc!==null){root=_bbc.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(_bbd){this._createIframe(_bbd,root,id,"false",this);}));},_getSubDomain:function(){if(!this.subDomain){this.subDomain=this.eventSvr._getHubAdapter().getSubDomain();}return this.subDomain;},_handleDataSync:function(_bbe){if(_bbe&&_bbe.attributes){var _bbf=_bbe.attributes;this._syncModifiableProperties(_bbf,this.getIWidgetInstance().getAttributes());this._syncAttributes(_bbf,this.getAttributes());}if(_bbe&&_bbe.wiremodel){var _bc0=_bbe.wiremodel;this._syncWireModel(_bc0,this.getIWidgetInstance().getWireModel());}this.commit(true);},_syncWireModel:function(_bc1,_bc2){var _bc3=_bc1._wires;for(var i in _bc3){if(Object.prototype.hasOwnProperty.call(_bc3,i)){var _bc4=_bc3[i];if(_bc4._isDirty&&_bc4._type&&_bc4._type=="NEW"){_bc2.addWire(_bc4.SourceWidget,_bc4.SourceEvent,_bc4.TargetEvent);}else{if(_bc4._isDirty&&_bc4._type&&_bc4._type=="DELETE"){_bc2.removeWire(_bc4.SourceWidget,_bc4.SourceEvent,_bc4.TargetEvent);}}}}var _bc5=_bc1._targets;_bc2._targets=_bc5;},_syncModifiableProperties:function(_bc6,_bc7){_bc7._updateProperties(_bc6);},_syncAttributes:function(_bc8,_bc9){var _bca="newItem";var _bcb="updatedValue";var _bcc="removedItem";for(var att in _bc8){if(Object.prototype.hasOwnProperty.call(_bc8,att)){var item=_bc8[att];if(item._dirty){if(item._change.changeType==_bcc){_bc9.removeItem(item.id);}else{_bc9.setItemValue(item.id,item.value,item.readOnly);}}}}_bc9.commit();},handleSizeChanged:function(_bcd){var _bce=this.windowManager[this.currentMode];var id=this.id;if(!_bce.main){id=this.id+"_"+this.currentMode;}var root=_bce.root;var _bcf=root.childNodes[0];if(_bcd.newWidth){var _bd0=parseInt(_bcd.newWidth,10);_bd0=_bd0-5;dojo.style(_bcf,"width",_bd0+"px");}if(_bcd.newHeight){var _bd1=parseInt(_bcd.newHeight,10);_bd1=_bd1-5;dojo.style(_bcf,"height",_bd1+"px");}this.eventSvr._publishEvent(com.ibm.mashups.iwidget.Constants.RESIZE_WIDGET+id,_bcd);},getCSSUrl:function(){var that=this;if(this.themeCSS){return this.themeCSS;}dojo.forEach(document.getElementsByTagName("link"),function(_bd2){if(_bd2.href&&_bd2.href.indexOf("theme.css")!=-1){var _bd3=_bd2.href.length-9;if(_bd2.href.indexOf("theme.css")==_bd3){that.themeCSS=_bd2.href;}}else{if(_bd2.href&&_bd2.href.indexOf("theme_rtl.css")!=-1){var _bd4=_bd2.href.length-13;if(_bd2.href.indexOf("theme_rtl.css")==_bd4){that.themeCSS=_bd2.href;}}}});return this.themeCSS;},_handleOnNavStateChanged:function(_bd5){var _bd6=_bd5.payload;if(_bd6){var _bd7=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _bd8=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_bd7,this.id);_bd8.setWidgetState("cp",_bd6);var _bd9=_bd7.commit();_bd9.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(_bda){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.widgetwrapper=_bda;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 _bdb=document.createElement("div");_bdb.className=this.widgetwrapper.ns+"loading";if(ibmConfig&&ibmConfig.loadingHTML){_bdb.innerHTML=ibmConfig.loadingHTML;}else{if(ibmConfig&&ibmConfig["loadingHTML.imageURL"]){_bdb.innerHTML=""+this.iwStr.LOAD+" "+this.iwStr.LOAD;}else{_bdb.innerHTML=""+this.iwStr.LOAD+" "+this.iwStr.LOAD;}}this.widgetwrapper.rootElement.appendChild(_bdb);},_loadWidgetDefinition:function(){var _bdc="_loadWidgetDefinition";var _bdd=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_bdd){this.LOGGER.entering(_bdc,arguments);}var _bde=this.widgetwrapper.rootElement;if(this.widgetwrapper.loaded){return false;}this._setLoading();if(this.widgetXMLUrl!==null){var _bdf=com.ibm.mashups.services.ServiceManager.getService("widgetLoadService");_bdf.getWidgetXML(this.widgetXMLUrl,false,dojo.hitch(this,"handleWidgetInfoRetrieved"),this.widgetwrapper.id);}else{return false;}if(_bdd){this.LOGGER.exiting(_bdc,true);}return true;},handleWidgetInfoRetrieved:function(data,_be0,xhr){var _be1="handleWidgetInfoRetrieved";var _be2=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_be2){this.LOGGER.entering(_be1,arguments);}var _be3;if(_be0=="200"||_be0=="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{_be3=unescape(this.widgetwrapper.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_be3){_be3=this.widgetXMLUrl;}this._handleInlineMessage("error",dojo.string.substitute(this.iwMessages.E_IWIDGETDEF_NOTAVAILABLE_1,[_be3]),data.message);}return;}var _be4=this.isSandboxed();if(dojo.isIE<7&&_be4){_be3=unescape(this.widgetwrapper.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));if(!_be3){_be3=this.widgetXMLUrl;}this._handleInlineMessage("error",dojo.string.substitute(this.iwMessages.E_NODISPLAY_UNSECUREWIDGET_1,[_be3]));return;}this._doRender(_be4);if(_be2){this.LOGGER.exiting(_be1);}},_isWidgetInstalled:function(){try{var _be5=com.ibm.mashups.enabler.catalog.Factory.getCatalogCategoryModel();_be5.setStrategy(new com.ibm.mashups.enabler.strategy.ListLoadAheadStrategy(25));var _be6=null;var _be7=null;var _be8=_be5.getRoot().start();var _be9=_be5.getChildren(_be8);while(_be9.hasNext()){var _bea=_be9.next();_be6=_be5.getCatalogEntryModel(_bea);var _beb=_be6.iterator();_beb.setCursorPosition(0);while(_beb.hasNext()){var _bec=_beb.next();var _bed=decodeURIComponent(this.widgetXMLUrl);if(_bed.indexOf(_bec.getDefinitionURL(false))>=0){return true;}}}}catch(e){return true;}return false;},isSandboxed:function(){var _bee=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _bef=_bee.getValue(com.ibm.mashups.enabler.services.ConfigConstants.SANDBOXENABLED);if(!_bef){return false;}var _bf0=document.location+"";_bef=false;var _bf1=this.widgetDef.getAttributes()||null;if(_bf1){var _bf2=_bf1.getItemValue("sandbox");if(typeof _bf2!="undefined"&&_bf2!==null){if(_bf2=="true"){_bef=true;}}}if(!_bef){if(this.widgetwrapper.rootElement.getAttribute("sandbox")!==null&&this.widgetwrapper.rootElement.getAttribute("sandbox")=="true"){_bef=true;}}if(!_bef){if(this.widgetwrapper.rootElement.className.indexOf(iwConstants.CSSCLASS_INSTANCE.iwSandbox)>0){_bef=true;}}if(_bef){if(this._isSandboxDisabledWidget(this.widgetXMLUrl)){_bef=false;}}return _bef;},_isSandboxDisabledWidget:function(_bf3){var _bf4=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var temp=_bf4.getValue(com.ibm.mashups.enabler.services.ConfigConstants.WIDGETDEFID_SANDBOX_DISABLED);var _bf5=temp;if(dojo.isString(_bf5)){_bf5=[temp];}if(_bf5.length===0){return false;}for(var i=0;i<_bf5.length;i++){if(dojo.string.trim(_bf3)===dojo.string.trim(_bf5[i])){return true;}else{if(dojo.string.trim(_bf3).indexOf(dojo.string.trim(_bf5[i]))!=-1&&dojo.string.trim(_bf5[i]).indexOf("/")!==0){return true;}else{if(dojo.string.trim(_bf3).indexOf(dojo.string.trim(_bf5[i]))!=-1&&dojo.string.trim(_bf5[i]).indexOf("/")===0&&dojo.string.trim(_bf3).indexOf(":")!=-1){var buf=_bf3.split("//");var _bf6=buf[0];var buf2=buf[1].split("/");var host=buf2[0];if(_bf6==window.location.protocol&&window.location.host==host){return true;}else{if(_bf6==window.location.protocol&&_bf6=="http:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="80"){return true;}}else{if(_bf6==window.location.protocol&&_bf6=="https:"&&host.indexOf(window.location.host)===0){if(host.substr(host.indexOf(":")+1)=="443"){return true;}}}}}}}}return false;},_handleInlineMessage:function(type,_bf7,_bf8){var _bf9=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.widgetwrapper.ns+"loading",this.widgetwrapper.rootElement,_bf9,false);var _bfa=_bf9[0];_bfa.innerHTML="";com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(_bfa,type,_bf7,_bf8);},_handleInlineWidgetNotInstalledMessage:function(_bfb,_bfc,_bfd){var _bfe=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.widgetwrapper.ns+"loading",this.widgetwrapper.rootElement,_bfe,false);var _bff=_bfe[0];var msg=[];msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]="
";msg[msg.length]=_bfb;msg[msg.length]="
";if(_bfc&&_bfc.length>0){msg[msg.length]="
";msg[msg.length]=_bfc;msg[msg.length]="
";}msg[msg.length]="
";_bff.innerHTML=msg.join("");com.ibm.mm.enabler.logging.LegacyLogger._publishStatusMsg("info",_bfb,_bfd);},_doRender:function(_c00){var _c01=com.ibm.mashups.services.ServiceManager.getService("eventService");if(_c00){dojo.mixin(this.widgetwrapper,new com.ibm.mm.iwidget.widget.IWidgetWrapperStubImpl());}else{_c01._getHubAdapter().createInlineHubContainer(this.widgetwrapper.id);_c01._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 _c02=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();if(_c02){var _c03=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageModeAccessor(_c02);_c03.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(_c04){if(typeof _c04=="undefined"){return;}if(_c04.loaded||_c04.loading){return;}_c04.loading=true;var _c05=new com.ibm.mm.iwidget.RenderController(_c04);_c05.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 _c06=com.ibm.mashups.iwidget.Constants.WIDGET_WINDOWSTATECHANGED;var me=this;var _c07=function(_c08){var _c09=_c08.id;var _c0a=_c08.newWindowState;var _c0b=_c08.oldWindowState;me.fireEvent(_c09,"onWindowStateChanged",{newWindowState:_c0a,oldWindowState:_c0b});};this.subscribeEvent(_c06,null,_c07,null,null);},subscribeWire:function(_c0c,_c0d,_c0e,_c0f){if(this.bIsLoggable){this.LOGGER.entering("eventService.subscribeWire",[_c0c,_c0d,_c0e,_c0f]);}if(typeof _c0c=="undefined"||_c0c===null){return false;}if(typeof _c0d=="undefined"||_c0d===null){return false;}if(typeof _c0e=="undefined"||_c0e===null){return false;}if(typeof _c0f=="undefined"||_c0f===null){return false;}var rc=true;var that=this;function eventCallback(_c10,_c11,_c12){that.fireEvent(_c0e,_c0f,_c11.payload,_c11.payloadType,_c0c);};function callback(item,_c13,_c14){if(!_c13){console.log("eventService.subscribeWire subscribe failed "+"source:"+_c0c+" sourceEvent:"+_c0d+" targetWidget:"+_c0e+" targetEvent:"+_c0f);}};var _c15;var _c16=this.hubAdapter._getInlineHubClient(_c0e);if(_c16){var _c17=this._generateWireId(_c0c,_c0d,_c0e,_c0f);if(this.subMgr[_c17]){return true;}var _c18=_c16.subscribe(this.WIDGETEVENT_PREFIX+_c0c+"."+_c0d,eventCallback,null,callback);this.subMgr[_c17]=_c18;_c15={};_c15.targetWidget=_c0e;_c15.sourceEvent=_c0d;_c15.sourceWidget=_c0c;_c15.targetEvent=_c0f;this.fireEvent(_c0c,"onNewWire",_c15);}var _c19=this.hubAdapter.isInlineClient(_c0e);if(!_c19){var _c1a="eventservice."+_c0e;_c15={};_c15.methodname="subscribeWire";_c15.sourceWidget=_c0c;_c15.sourceEvent=_c0d;_c15.targetWidget=_c0e;_c15.targetEvent=_c0f;_c15.hubclient="main";this._publishEvent(_c1a,_c15);rc=true;}return rc;},publishWire:function(_c1b,_c1c,_c1d,_c1e){_c1d=this._serializePayload(_c1d);if(this.bIsLoggable){this.LOGGER.entering("eventService.publishWire",[_c1b,_c1c,_c1d,_c1e]);}if(typeof _c1b=="undefined"||_c1b===null){return false;}if(typeof _c1c=="undefined"||_c1c===null){return false;}var _c1f=this.hubAdapter._getInlineHubClient(_c1b);if(_c1f){_c1f.publish(this.WIDGETEVENT_PREFIX+_c1b+"."+_c1c,{"payload":_c1d,"payloadType":_c1e});}return true;},_serializePayload:function(_c20){if(typeof _c20=="object"&&_c20.toJson){_c20=_c20.toJson();}return _c20;},unSubscribeWire:function(_c21,_c22,_c23,_c24){if(typeof _c21=="undefined"||_c21===null){return false;}if(typeof _c22=="undefined"||_c22===null){return false;}if(typeof _c23=="undefined"||_c23===null){return false;}if(typeof _c24=="undefined"||_c24===null){return false;}var _c25;var _c26=this.hubAdapter._getInlineHubClient(_c23);if(_c26){var _c27=this._generateWireId(_c21,_c22,_c23,_c24);var _c28=this.subMgr[_c27];if(_c28){this.unsubscribeEvent(_c28,_c23);delete this.subMgr[_c27];}_c25={};_c25.targetWidget=_c23;_c25.targetEvent=_c24;_c25.sourceWidget=_c21;_c25.sourceEvent=_c22;this.fireEvent(_c23,"onRemoveWire",_c25);this.fireEvent(_c21,"onRemoveWire",_c25);this.publishEvent(iwConstants.EVENTS.unSubscribeWire,{wires:[_c25]});}var _c29=this.hubAdapter.isInlineClient(_c23);if(!_c29){var _c2a="eventservice."+_c23;_c25={};_c25.methodname="unSubscribeWire";_c25.sourceWidget=_c21;_c25.sourceEvent=_c22;_c25.targetWidget=_c23;_c25.targetEvent=_c24;_c25.hubclient="main";this._publishEvent(_c2a,_c25);rc=true;}return true;},addWire:function(_c2b,_c2c,_c2d,_c2e){if(this.bIsLoggable){this.LOGGER.entering("eventService.addWire",[_c2b,_c2c,_c2d,_c2e]);}if(typeof _c2b=="undefined"||_c2b===null){return false;}if(typeof _c2c=="undefined"||_c2c===null){return false;}if(typeof _c2d=="undefined"||_c2d===null){return false;}if(typeof _c2e=="undefined"||_c2e===null){return false;}var rc=false;var _c2f=this.hubAdapter.isInlineClient(_c2d);if(!_c2f){var _c30="eventservice."+_c2d;var _c31={};_c31.methodname="addWire";_c31.params=arguments;_c31.hubclient="main";this._publishEvent(event,_c31);rc=true;}else{rc=this.subscribeWire(_c2b,_c2c,_c2d,_c2e);if(rc){var _c32=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(_c2d);if(typeof _c32!="undefined"&&_c32!==null){var _c33={};_c33.SourceWidget=_c2b;_c33.SourceEvent=_c2c;_c33.TargetEvent=_c2e;var _c34=_c32.getIWidgetInstance();var _c35=new com.ibm.mm.iwidget.widget.WireImpl(_c2d,_c33);_c34._addWire(_c35);}}}return rc;},removeWire:function(_c36,_c37,_c38,_c39){if(this.bIsLoggable){this.LOGGER.entering("eventService.removeWire",[_c36,_c37,_c38,_c39]);}if(typeof _c36=="undefined"||_c36===null){return false;}if(typeof _c37=="undefined"||_c37===null){return false;}if(typeof _c38=="undefined"||_c38===null){return false;}if(typeof _c39=="undefined"||_c39===null){return false;}var rc=false;var _c3a=this.hubAdapter.isInlineClient(_c38);if(!_c3a){var _c3b="eventservice."+_c38;var _c3c={};_c3c.methodname="removeWire";_c3c.params=arguments;_c3c.hubclient="main";this._publishEvent(event,_c3c);rc=true;}else{rc=this.unSubscribeWire(_c36,_c37,_c38,_c39);if(rc){var _c3d=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().getWidgetById(_c38);if(typeof _c3d!="undefined"&&_c3d!==null){var _c3e={};_c3e.SourceWidget=_c36;_c3e.SourceEvent=_c37;_c3e.TargetEvent=_c39;var _c3f=_c3d.getIWidgetInstance();var _c40=new com.ibm.mm.iwidget.widget.WireImpl(_c38,_c3e);_c3f._removeWire(_c40.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(_c41,_c42){if(that.bIsLoggable){that.LOGGER.trace("onHubClientSecurityAlert","security alert from "+_c41.getClientID());}};var _c43=new OpenAjax.hub.IframeHubClient({HubClient:{onSecurityAlert:onHubClientSecurityAlert}});function onHubClientConnect2(_c44,_c45,_c46){if(!_c45){if(that.bIsLoggable){that.LOGGER.trace("onHubClientConnect2","!! client connection error = id: '"+_c44.getClientID()+"' msg: '"+_c46);}}var id=_c44.getClientID();id=id.slice(8);that.setId(id);that._hubClient=_c44;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(_c47,_c48,_c49){if(!_c48){if(that.bIsLoggable){that.LOGGER.trace("onHubClientDisconnect2","!! client disconnection error = id: '"+_c47.getClientID()+"' msg: '"+_c49);}}_c47.connect(onHubClientConnect2);};_c43.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(_c4a,_c4b,_c4c){var _c4d=_c4b.methodname;if((_c4d=="subscribeWire")||(_c4d=="unSubscribeWire")){var fn=that[_c4b.methodname];if(fn){fn.apply(that,[_c4b.sourceWidget,_c4b.sourceEvent,_c4b.targetWidget,_c4b.targetEvent]);}}else{if(_c4d){var fn=that[_c4b.methodname];if(fn){fn.apply(that,_c4b.params);}}}};this._hubClient.subscribe("eventservice."+this.getId(),eventCallback,this,this._subscribeCallback);},_subscribeCallback:function(_c4e,_c4f,_c50){if(!_c4f){}},WIDGETEVENT_PREFIX:iwConstants.WIDGETEVENT_PREFIX,WILDCARD_PREFIX:iwConstants.WILDCARD_PREFIX,subscribeWire:function(_c51,_c52,_c53,_c54){var _c55="subscribeWire";var _c56=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_c56){this.LOGGER.entering(_c55,arguments);}if(typeof _c51=="undefined"||_c51===null){return false;}if(typeof _c52=="undefined"||_c52===null){return false;}if(typeof _c53=="undefined"||_c53===null){return false;}if(typeof _c54=="undefined"||_c54===null){return false;}var rc=true;var that=this;function eventCallback(_c57,_c58,_c59){that.fireEvent(_c53,_c54,_c58.payload,_c58.payloadType,_c51);};function callback(item,_c5a,_c5b){if(!_c5a){if(that.bIsLoggable){that.LOGGER.trace("subscribeWire","eventService.subscribeWire subscribe failed "+"source:"+_c51+" sourceEvent:"+_c52+" targetWidget:"+_c53+" targetEvent:"+_c54);}}};var _c5c=this._hubClient.subscribe(this.WIDGETEVENT_PREFIX+_c51+"."+_c52,eventCallback,null,callback);var _c5d=this._generateWireId(_c51,_c52,_c53,_c54);this.subMgr[_c5d]=_c5c;var _c5e={};_c5e.targetWidget=_c53;_c5e.sourceEvent=_c52;_c5e.sourceWidget=_c51;_c5e.targetEvent=_c54;this.fireEvent(_c51,"onNewWire",_c5e);return rc;},publishWire:function(_c5f,_c60,_c61,_c62){_c61=this._serializePayload(_c61);if(typeof _c5f=="undefined"||_c5f===null){return false;}if(typeof _c60=="undefined"||_c60===null){return false;}this._hubClient.publish(this.WIDGETEVENT_PREFIX+_c5f+"."+_c60,{"payload":_c61,"payloadType":_c62});return true;},_serializePayload:function(_c63){if(typeof _c63=="object"&&_c63.toJson){_c63=_c63.toJson();}return _c63;},unSubscribeWire:function(_c64,_c65,_c66,_c67){if(typeof _c64=="undefined"||_c64===null){return false;}if(typeof _c65=="undefined"||_c65===null){return false;}if(typeof _c66=="undefined"||_c66===null){return false;}if(typeof _c67=="undefined"||_c67===null){return false;}var _c68=this._generateWireId(_c64,_c65,_c66,_c67);var _c69=this.subMgr[_c68];if(_c69){this._unsubscribeEvent(_c69,_c67);delete this.subMgr[_c68];}var _c6a={};_c6a.targetWidget=_c66;_c6a.targetEvent=_c67;_c6a.sourceWidget=_c64;_c6a.sourceEvent=_c65;this.fireEvent(_c66,"onRemoveWire",_c6a);this.fireEvent(_c64,"onRemoveWire",_c6a);this._publishEvent(iwConstants.EVENTS.unSubscribeWire,{wires:[_c6a]});},fireEvent:function(_c6b,_c6c,_c6d,_c6e,_c6f){var _c70=new com.ibm.mm.iwidget.IEventImpl(_c6c,_c6e,_c6d,_c6f);var _c71=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _c72=_c71.find(_c6b);if(typeof _c72!="undefined"&&_c72!==null){if(_c72.isLoaded()){_c72.handleEvent(_c70);}else{var _c73=dojox.uuid.generateRandomUuid();var cb=function(_c74,_c75,_c76){_c75.handleEvent(_c76);var _c77=_c74.subMgr[_c73];if(_c77){_c74._unsubscribeEvent(_c77);}};var _c78=this._subscribeEvent(com.ibm.mashups.iwidget.Constants.WIDGET_LOADED+"."+_c72.id,null,dojo.partial(cb,this,_c72,_c70));this.subMgr[_c73]=_c78;}}else{var _c79={};_c79.methodname="fireEvent";_c79.hubclient=this.getId();_c79.params=[_c6b,_c6c,_c6d,_c6e];this._publishEvent("eventservice.main",_c79);}},publishEvent:function(_c7a,_c7b,_c7c,_c7d){return;},_publishEvent:function(_c7e,_c7f,_c80){if(typeof _c7f=="undefined"||_c7f===null){this._hubClient.publish(_c7e,"");}else{this._hubClient.publish(_c7e,_c7f);}},broadcastEvent:function(_c81,_c82,_c83,_c84,_c85,_c86){return;},broadcastEvents:function(_c87,_c88,_c89,_c8a){return;},_handleBroadcastEventsCache:function(){var _c8b={};_c8b.methodname="_handleBroadcastEventsCache";_c8b.hubclient=this.getId();_c8b.params=[];this._publishEvent("eventservice.main",_c8b);},subscribeEvent:function(_c8c,_c8d,_c8e,_c8f,_c90){return;},_subscribeEvent:function(_c91,_c92,_c93,_c94,_c95){if(!this._hubClient){this.eventQueue.push(arguments);return;}var _c96=this._hubClient.subscribe(_c91,function(_c97,data,_c98){if(_c92&&_c93){_c93=dojo.hitch(_c92,_c93);}if(_c93){_c93.apply(this,[data]);}},null,function(_c99,_c9a,_c9b){if(_c92&&_c94){_c94=dojo.hitch(_c92,_c94);}if(_c94){_c94.apply(this,[_c99,_c9a,_c9b]);}if(!_c9a){return;}});return _c96;},_unsubscribeEvent:function(_c9c,_c9d){if(!_c9c){return;}this._hubClient.unsubscribe(_c9c);},unsubscribeEvent:function(_c9e,_c9f){return;},_generateWireId:function(_ca0,_ca1,_ca2,_ca3){return _ca0+"_"+_ca1+"_"+_ca2+"_"+_ca3;}});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(_ca4){return new com.ibm.mm.iwidget.widget.ResourceImpl(_ca4);});}return this.resources;},getPublishedEventsNames:function(){var _ca5=[];if(this.widgetDef.publicEvents){com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(temp,_ca6){if(!temp.isPublished||(temp.isPublished&&temp.isPublished=="true")){_ca5.push(_ca6);}});}return _ca5;},getHandledEventsNames:function(){var _ca7=[];if(this.widgetDef.publicEvents){com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(temp,_ca8){if(temp.onEvent){_ca7.push(_ca8);}});}return _ca7;},getPublishedEvent:function(_ca9){if(!this.widgetDef.publicEvents){return null;}var _caa=this.getPublicEvent(_ca9)||null;if(_caa){if(!_caa.isPublished||(_caa.isPublished&&_caa.isPublished=="false")){_caa=null;}}return _caa;},getHandledEvent:function(_cab){if(!this.widgetDef.publicEvents){return null;}var _cac=this.getPublicEvent(_cab)||null;if(_cac){if(!_cac.onEvent){_cac=null;}}return _cac;},getPublicEvent:function(_cad){if(!this.widgetDef.publicEvents){return null;}if(this.eventsCache&&this.eventsCache[_cad]){return new com.ibm.mm.iwidget.IEventDescriptionImpl(this.eventsCache[_cad]);}var data=this.widgetDef.publicEvents[_cad];var _cae=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 _caf=null;com.ibm.mm.enabler.utils.Misc.forIn(data,function(d,i){if(i=="description"){_caf=d;}else{if(i!="id"&&i!="onEvent"){obj.attributes[i]=d;}}});var _cb0=null;if(_caf){_cb0=this._getEventDescription(_caf)||null;if(_cb0){var _cb1=_cb0.lang;if(!_cb1){_cb1=this.getDefaultLanguage();if(!_cb1){_cb1="en";}}obj.lang=_cb1;if(_cb0.payloadType){obj.type=_cb0.payloadType;}if(_cb0.aliases){obj.attributes.aliases=_cb0.aliases;}var _cb2=_cb0.descriptions;if(_cb2){obj.localizedAttributes=_cb0.descriptions;}if(typeof (obj.localizedAttributes[_cb1])=="undefined"){obj.localizedAttributes[_cb1]={};}if(_cb0.title){obj.localizedAttributes[_cb1].title=_cb0.title;}if(_cb0.description){obj.localizedAttributes[_cb1].description=_cb0.description;}if(_cb0.descriptionURI){obj.localizedAttributes[_cb1].descriptionURI=_cb0.descriptionURI;}}}if(!this.eventsCache){this.eventsCache={};}this.eventsCache[_cad]=obj;_cae=new com.ibm.mm.iwidget.IEventDescriptionImpl(obj);}return _cae;},_getEventDescription:function(id){var _cb3=null;if(this.widgetDef.eventDescriptions){_cb3=this.widgetDef.eventDescriptions[id];}return _cb3;},_getPublicEvents:function(){var _cb4={};com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.publicEvents,function(k,_cb5){var _cb6=this.getPublicEvent(_cb5)||null;if(_cb6){_cb4[_cb5]=_cb6;}},this);return _cb4;},getWidgetPublishedEvents:function(){return this.getPublishedEvents();},getWidgetHandledEvents:function(){return this.getHandledEvents();},getPublishedEvents:function(){var _cb7=[];dojo.forEach(this.getPublishedEventsNames(),function(_cb8){var _cb9=this.getPublicEvent(_cb8)||null;if(_cb9){_cb7.push(_cb9);}},this);return _cb7;},getHandledEvents:function(){var _cba=[];dojo.forEach(this.getHandledEventsNames(),function(_cbb){var _cbc=this.getPublicEvent(_cbb)||null;if(_cbc){_cba.push(_cbc);}},this);return _cba;},getPayloadDefs:function(){return this.widgetDef.payloadDefs;},getPayloadDef:function(name){var _cbd=this.widgetDef.payloadDefs[name];return (typeof _cbd=="undefined")?null:_cbd;},getPayloadDefNames:function(){var arr=[];com.ibm.mm.enabler.utils.Misc.forIn(this.widgetDef.payloadDefs,function(a){arr.push(a);});return arr;},_getShareableItemSets:function(){var _cbe=this.widgetDef.shareableItemSetsArr;if(_cbe){for(var i in _cbe){if(Object.prototype.hasOwnProperty.call(_cbe,i)){return _cbe;}}}return null;},toSpecObject:function(){if(this.specObject){return this.specObject;}var _cbf={};if(!this.xmlStr){return _cbf;}var _cc0=com.ibm.mm.enabler.xslt.loadXmlString(this.xmlStr);var expr="/iw:iwidget";var _cc1=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_cc0,this.namespaces);if(_cc1){this._addAttributesToJson(_cc1,_cbf);var _cc2=[];_cc2.push({elementName:"eventDescription",keyNames:["id"]});_cc2.push({elementName:"alt",keyNames:["lang","xml:lang"]});this._addElements(_cc1,_cc2,_cbf);_cc2=[];_cc2.push({elementName:"event",keyNames:["id"]});this._addElements(_cc1,_cc2,_cbf);_cc2=[];_cc2.push({elementName:"itemSet",keyNames:["id"]});_cc2.push({elementName:"item",keyNames:["id"]});_cc2.push({elementName:"alt",keyNames:["lang","xml:lang"]});this._addElements(_cc1,_cc2,_cbf);_cc2=[];_cc2.push({elementName:"resource",keyNames:["uri","src"],elemsAsAtt:["skipLoad"]});this._addElements(_cc1,_cc2,_cbf);_cc2=[];_cc2.push({elementName:"content",keyNames:["mode"]});this._addElements(_cc1,_cc2,_cbf,true);}this.specObject=_cbf;return _cbf;},_addAttributesToJson:function(node,_cc3){dojo.forEach(node.attributes,function(att){_cc3["_"+att.nodeName.replace(":","_")]=att.nodeValue;});},_addElements:function(node,_cc4,_cc5,_cc6){if(!dojo.isArray(_cc4)||_cc4.length===0){return;}var _cc7=_cc4[0].elementName;var _cc8=_cc4[0].keyNames;var _cc9=_cc4[0].elemsAsAtt;var _cca=null;var _ccb=null;if(_cc4.length>1){_cca=_cc4[1].elementName;_ccb=_cc4[1].keyNames;}var _ccc=_cc5[_cc7+"s"]={};var _ccd=com.ibm.mashups.enabler.xml.XPath.evaluateXPath("iw:"+_cc7,node,this.namespaces);if(_ccd){dojo.forEach(_ccd,function(node){var _cce;for(var j=0,kL=_cc8.length;j ."+ns+_cec,this._instance.rootElement,_ced,true);var _cee=["SourceWidget","SourceEvent","TargetEvent"];var _cef=["SourceEvent","TargetEvent"];for(var i=0;i<_ced.length;i++){var _cf0=_ced[i];var _cf1={};var _cf2=true;for(var j=0;j<2;j++){var _cf3=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+ns+_cef[j],_cf0,_cf3,false);if(_cf3.length===0){_cf2=false;}else{if(j===0){var temp=_cf3[0].getAttribute("href")||null;if(temp!==null){var _cf4=temp.indexOf("#");if(_cf4!=-1){temp=temp.substring(_cf4+1);}_cf1[_cee[0]]=temp;_cf1[_cee[1]]=_cf3[0].innerHTML;}}else{_cf1[_cee[2]]=_cf3[0].innerHTML;}}}if(_cf2){this._addWire(new com.ibm.mm.iwidget.widget.WireImpl(this._instance.id,_cf1),true);}}},commit:function(){if(this.isDirty()===true){for(var i in this._wires){if(Object.prototype.hasOwnProperty.call(this._wires,i)){var _cf5=this._wires[i];if(_cf5.isDirty()&&_cf5.getType()!==null&&_cf5.getType()==_cf5.TYPE_NEW){this._addToDOM(_cf5);_cf5.setDirty(false);_cf5.setType(null);}else{if(_cf5.isDirty()&&_cf5.getType()!==null&&_cf5.getType()==_cf5.TYPE_DELETE){this._removeFromDOM(_cf5);this._wires.splice(i,1);}}}}this.setDirty(false);}},_addToDOM:function(_cf6){var _cf7=_cf6.getSourceWidgetID();var _cf8=_cf6.getSourceEventName();var _cf9=_cf6.getTargetEventName();var _cfa=document.createElement("span");_cfa.className=this._instance.ns+"ReceivedEvent";var _cfb=document.createElement("a");_cfb.className=this._instance.ns+"SourceEvent";_cfb.setAttribute("href","#"+_cf7);_cfb.innerHTML=_cf8;var _cfc=document.createElement("span");_cfc.className=this._instance.ns+"TargetEvent";_cfc.innerHTML=_cf9;_cfa.appendChild(_cfb);_cfa.appendChild(_cfc);this._instance.rootElement.appendChild(_cfa);},_removeFromDOM:function(_cfd){var _cfe=_cfd.getSourceWidgetID();var _cff=_cfd.getSourceEventName();var _d00=_cfd.getTargetEventName();var _d01=this._instance.rootElement;var _d02=dojo.query("."+this._instance.ns+"ReceivedEvent",_d01);var _d03=com.ibm.mashups.services.ServiceManager.getService("iwidgetFragmentService");for(var i=0;i<_d02.length;i++){var _d04=_d02[i];var _d05=dojo.query("."+this._instance.ns+"SourceEvent",_d04)[0];var _d06=_d05.innerHTML;var _d07=dojo.query("."+this._instance.ns+"TargetEvent",_d04)[0];if(_d03.getKeyFromHref(_d05)==_cfe&&_d06==_cff&&_d07.innerHTML==_d00){dojo.destroy(_d04);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(_d08,_d09){return new com.ibm.mm.iwidget.widget.ModifiableWireModelImpl(_d08);},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(_d0a,_d0b){if(_d0b){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES,_d0b);}var _d0c;var wID=_d0a.id;_d0c=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_WIRES);var _d0d=_d0a.rootElement;if(dojo.hasClass(_d0d,com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.STANDALONE_CLASS)||!_d0c){_d0c=com.ibm.mm.iwidget.services.WireProviderFactoryServiceImpl.DEFAULT_PERSISTENCE;}if(typeof _d0c!=="undefined"&&_d0c==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _d0e=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _d0f=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _d10=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_d0f);var _d11=_d10.getSpaceID();var _d12=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_d0f,_d11);var _d13=_d12.getPageID();var _d14=com.ibm.mm.iwidget.Utils.getModelID(wID);var wnd=_d0e.findWidgetWindow(_d14,_d13).start();if(!wnd){_d0c=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(!(_d0c in this._factories)){return null;}return this._factories[_d0c].createWireProvider(_d0a,_d0c);},setFactory:function(_d15,_d16){this._factories[_d15]=_d16;},removeFactory:function(_d17){if(_d17 in this._factories){delete this._factories[_d17];}}});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(_d18,_d19,_d1a){return this.getWireModel().addWire(_d18,_d19,_d1a);},removeWire:function(_d1b,_d1c,_d1d){return this.getWireModel().removeWire(_d1b,_d1c,_d1d);},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(_d1e){this.wrapper.unregisterArray.push(_d1e);}});}return this.wiremodel;},_wireProviderModeChange:function(_d1f,_d20,_d21){var _d22=null;if(this.wiremodel){_d22=this.wiremodel.getTargets();}this.wiremodel=com.ibm.mashups.services.ServiceManager.getService("WireProviderFactoryService").createWireProvider(this);if(_d22){for(var id in _d22){var _d23=_d22[id];for(var i=0,l=_d23.length;i ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwEvent,this.rootElement,_d24,true);var _d25=[];com.ibm.mm.iwidget.Utils.findElementByAttribute("query","> ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwEventDescription,this.rootElement,_d25,true);if(_d24.length>0){for(var i=0;i<_d24.length;i++){var elem=_d24[i];var _d26=this._getEventDescription(elem,_d25);var id=elem.getAttribute("title");this.events[id]=_d26;}}}return this.events;},_getEventDescription:function(elem,_d27){var id=elem.getAttribute("title");var _d28=dojo.query("> ."+this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwDescRef,elem);var _d29=null;if(_d28){_d29=_d28[0];}var _d2a=null;if(_d29){_d2a=_d29.getAttribute("href");if(_d2a.indexOf("#")===0){_d2a=_d2a.slice(1);_d2a=unescape(_d2a);}}var _d2b=null;for(var j=0;j<_d27.length;j++){var temp=_d27[j];if(temp.getAttribute("title")==_d2a){_d2b=temp;break;}}var obj={};obj.name=id;var _d2c=_d29.innerHTML;_d2c=_d2c.replace(/^\s*/,"").replace(/\s*$/,"");if(_d2c){obj.alias=_d2c;}var _d2d=elem.className;if(_d2d.indexOf(this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwPublished)>0){obj.isPublished=true;}if(_d2d.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[s],elem);if(_d2e){var _d2f=_d2e[0];if(_d2f){switch(s){case 0:obj.handlingFn=_d2f.innerHTML;break;case 1:obj.attributes=obj.attributes?obj.attributes:{};obj.attributes.onNewWire=_d2f.innerHTML;break;case 2:obj.attributes=obj.attributes?obj.attributes:{};obj.attributes.onRemoveWire=_d2f.innerHTML;break;default:break;}}}}if(_d2b){var _d30=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwPayloadType;var list=dojo.query("> ."+_d30,_d2b);if(list&&list[0]){obj.type=list[0].innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");}obj.localizedAttributes={};var _d31=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwTitle;var _d32=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwValue;var _d33=dojo.query("> ."+_d31,_d2b);if(_d33&&_d33[0]){dojo.query("> ."+_d32,_d33[0]).forEach(function(elem){var lang=elem.getAttribute("lang");var _d34=elem.innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");if(!obj.localizedAttributes[lang]){obj.localizedAttributes[lang]={};}obj.localizedAttributes[lang].title=_d34;});}var _d35=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwDescription;var _d32=this.ns+com.ibm.mm.iwidget.Constants.CSSCLASS_INSTANCE.iwValue;var _d36=dojo.query("> ."+_d35,_d2b);if(_d36&&_d36[0]){dojo.query("> ."+_d32,_d36[0]).forEach(function(elem){var lang=elem.getAttribute("lang");var _d37=elem.innerHTML.replace(/^\s*/,"").replace(/\s*$/,"");if(!obj.localizedAttributes[lang]){obj.localizedAttributes[lang]={};}obj.localizedAttributes[lang].description=_d37;});}}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(_d38,_d39){},setFactory:function(_d3a,_d3b){},removeFactory:function(_d3c){}});}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(_d3d,_d3e){},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(_d3f){this.wrapper=_d3f;},find:function(id){return null;},eventExists:function(id){return false;},createEvent:function(_d40){return null;},removeEvent:function(_d41){},isUpdateEventRequired:function(_d42){},updateEvent:function(_d43){},getEvents:function(_d44){}});}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(_d45,_d46){var rc=true;var _d47=[];var _d48;for(var i in _d46){if(Object.prototype.hasOwnProperty.call(_d46,i)){if(!_d46[i]){continue;}if(typeof (this._PredefinedFields[i])!="undefined"){if(i==this._PredefinedFields.isPublished&&(_d46[i]===true||_d46[i]=="true")){_d48=_d45.isPublished;if(!(_d48&&(_d48===true||_d48=="true"))){rc=false;break;}}else{if(i==this._PredefinedFields.isPublished&&(_d46[i]=="false"||_d46[i]===false)){_d48=_d45.isPublished;if(!(_d48&&(_d48===false||_d48=="false"))){rc=false;break;}}else{if(i==this._PredefinedFields.isPublished&&(_d46[i]=="false"||_d46[i]===false)){if(!this._checkBoolean(dojo.toJson(_d45),i,"false")){rc=false;break;}}else{if(i==this._PredefinedFields.isHandled&&(_d46[i]===true||_d46[i]=="true")){if(!_d45[this._PredefinedFields.handlingFn]){rc=false;break;}}else{if(i==this._PredefinedFields.isHandled&&(_d46[i]=="false"||_d46[i]===false)){if(_d45[this._PredefinedFields.handlingFn]){rc=false;break;}}else{if(!(_d45[i]&&_d45[i]==_d46[i])){rc=false;break;}}}}}}}else{if(!(_d45.attributes&&_d45.attributes[i]&&_d45.attributes[i]==_d46[i])){rc=false;break;}}}}return rc;},_checkBoolean:function(str,name,_d49){var rc=false;var temp="\""+name+"\""+":"+_d49;if(str.indexOf(temp)!=-1){return true;}temp="\""+name+"\""+":\""+_d49+"\"";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(_d4a){this.wrapper=_d4a;this.eventDescriptionPool={};var _d4b=_d4a.widgetDef._getPublicEvents();var _d4c=_d4a.getIWidgetInstance()._getPublicEvents();var _d4d=_d4b?_d4b:null;if(_d4c){for(var j in _d4c){if(Object.prototype.hasOwnProperty.call(_d4c,j)){_d4d[j]=_d4c[j];}}}if(_d4d){var _d4e={};for(var i in _d4d){if(Object.prototype.hasOwnProperty.call(_d4d,i)){_d4e[i]=_d4d[i];}}this.eventDescriptionPool=_d4e;}},find:function(id){var _d4f=this.eventDescriptionPool[id];if(_d4f){return _d4f;}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(_d50){var temp=this.eventDescriptionPool[_d50];if(temp){return true;}else{return false;}},_getEventDescObj:function(_d51){var obj=_d51;var _d52=_d51.declaredClass;if(typeof _d52=="undefined"||_d52===null){obj=new com.ibm.mm.iwidget.IEventDescriptionImpl(_d51);}return obj;},createEvent:function(_d53){var _d54=this._getEventDescObj(_d53);var _d55=this.eventExists(_d54.name);if(_d55){return false;}else{this.eventDescriptionPool[_d54.name]=_d54;return true;}},removeEvent:function(_d56){var _d57=this.eventExists(_d56);if(_d57){delete this.eventDescriptionPool[_d56];return true;}else{return true;}},removeEvents:function(_d58){for(var i=0;i<_d58.length;i++){this.removeEvent(_d58[i]);}return true;},isUpdateEventRequired:function(_d59){var _d5a=this._getEventDescObj(_d59);var _d5b=this.eventExists(_d5a.name);if(_d5b){var _d5c=this.eventDescriptionPool[_d5a.name];var _d5d=_d5c.type||"";_d5d=(_d5d.indexOf("}")==-1)?_d5d:_d5d.substring(_d5d.indexOf("}")+1);var _d5e=_d5a.type||"";_d5e=(_d5e.indexOf("}")==-1)?_d5e:_d5e.substring(_d5e.indexOf("}")+1);if((_d5c.alias!=_d5a.alias)||(_d5c.name!=_d5a.name)||(_d5d!=_d5e)||(_d5c.isHandled!=_d5a.isHandled)||(_d5c.isPublished!=_d5a.isPublished)){return true;}return false;}else{return true;}},updateEvent:function(_d5f){var _d60=this._getEventDescObj(_d5f);var _d61=this.eventExists(_d60.name);if(_d61){this.eventDescriptionPool[_d60.name]=_d60;}else{return false;}return true;},setEvents:function(_d62){var rc=true;for(var i=0;i<_d62.length;i++){var _d63=_d62[i];var _d64=this.createEvent(_d63);_d64=_d64||false;if(_d64===false){_d64=this.updateEvent(_d63);}_d64=_d64||false;if(rc===true){rc=_d64;}}return rc;},getEvents:function(_d65){if(typeof _d65=="undefined"||_d65===null){return this._getEventsInArray(this.eventDescriptionPool);}var _d66=[];if(_d65.isHandled&&_d65.isHandled=="true"){if(this.wrapper.handledEvents){this._addEvents(_d66,this.wrapper.handledEvents);}}if(_d65.isPublished&&_d65.isPublished=="true"){if(this.wrapper.publishedEvents){this._addEvents(_d66,this.wrapper.publishedEvents);}}if(dojo.isString(_d65)){try{_d65=dojo.fromJson(_d65);}catch(e){return null;}}for(var j in this.eventDescriptionPool){if(Object.prototype.hasOwnProperty.call(this.eventDescriptionPool,j)){var _d67=this.eventDescriptionPool[j];var rc=com.ibm.mashups.enabler.utils.EventModelHelper.checkMatch(_d67._getInternalJsonObj(),_d65);if(rc){_d66.push(_d67);}}}if(_d66.length===0){return null;}else{return _d66;}},_getEventsInArray:function(arr){var _d68=[];for(var j in arr){if(Object.prototype.hasOwnProperty.call(arr,j)){_d68.push(arr[j]);}}if(_d68.length===0){return null;}else{return _d68;}},_addEvents:function(arr,_d69){for(var i in _d69){if(Object.prototype.hasOwnProperty.call(_d69,i)){var _d6a=_d69[i];for(var j in _d6a){if(Object.prototype.hasOwnProperty.call(_d6a,j)){arr.push(_d6a[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(_d6b,_d6c){return new com.ibm.mm.iwidget.model.DOMEventModelImpl(_d6b);},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(_d6d,_d6e){if(_d6e){com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).registerOnChangeListener(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS,_d6e);}return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var wID=_d6d.id;var _d6f=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME).getPersistenceMode(com.ibm.mashups.iwidget.services.ContainerService.PROVIDER_EVENTS);var _d70=_d6d.rootElement;if(dojo.hasClass(_d70,com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.STANDALONE_CLASS)||!_d6f){_d6f=com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE;}var _d71;if(typeof _d6f!=="undefined"&&_d6f==com.ibm.mashups.enabler.widget.Constants.PERSISTENCE_MODE_MODEL){var _d72=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _d73=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _d74=com.ibm.mashups.enabler.model.state.AccessorFactory.getSpaceAccessor(_d73);var _d75=_d74.getSpaceID();var _d76=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_d73,_d75);var _d77=_d76.getPageID();var _d78=com.ibm.mm.iwidget.Utils.getModelID(wID);var _d79=_d72.findWidgetWindow(_d78,_d77);_d79.setFinishedCallback(dojo.hitch(this,function(wnd,_d7a){if(!wnd){_d6f=com.ibm.mm.iwidget.services.WidgetEventModelFactoryServiceImpl.DEFAULT_PERSISTENCE;if(dojo.isFunction(_d6d._getResourceBundle)){_d6d._getResourceBundle();this.LOGGER.warning("createPersistentAttributes",_d6d.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(!(_d6f in this._factories)){_d71=null;}else{_d71=this._factories[_d6f].createEventModel(_d6d,_d6f);}dfr.finish(_d71,_d7a);}));_d79.start(sync);}else{if(!_d71){if(!(_d6f in this._factories)){_d71=null;}else{_d71=this._factories[_d6f].createEventModel(_d6d,_d6f);}}dfr.finish(_d71,200);}return _d71;});},setFactory:function(_d7b,_d7c){this._factories[_d7b]=_d7c;},removeFactory:function(_d7d){if(_d7d in this._factories){delete this._factories[_d7d];}}});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(_d7e,_d7f){return this;},getItemValue:function(_d80){return null;},getAllNames:function(){return null;},removeItem:function(_d81){return null;},commit:function(){return null;},addListener:function(_d82){return null;},removeListener:function(_d83){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(_d84,_d85,name){this.DELETE_TOKEN="DELETE_TOKEN";this.parent=_d84;if(name){this.id=name;}if(_d85){this.id=_d85.id;this.alias=_d85.alias?_d85.alias:null;this.defData=_d85;}this.mapping={};this.items={};if(_d85){var _d86=_d85.items;for(var i in _d86){if(Object.prototype.hasOwnProperty.call(_d86,i)){var id=i;var _d87=_d86[i].alias?_d86[i].alias:null;this.items[i]={id:id};if(_d87){this.mapping[_d87]=id;this.items[i].alias=_d87;}}}}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 _d88=function(_d89){if(me._isSender){return;}var _d8a=_d89.changes?_d89.changes:null;if(_d8a){for(var i=0;i<_d8a.length;i++){var _d8b=_d8a[i].alias;if(me.mapping){if(me.mapping[_d8b]){var _d8c=me.mapping[_d8b];_d8a[i].id=_d8c;}}}}if(_d8a.length>0){var _d8d=new com.ibm.mm.iwidget.IEventImpl("onItemSetChanged",null,_d89);if(dojo.isString(fn)){var _d8e=me.parent._getHandlerScope(fn);if(_d8e){fn=dojo.hitch(_d8e,fn);}}fn(_d8d);}};var _d8f=this.shareableAccessor.registerListener(_d88);return _d8f;},removeListener:function(_d90){return this.shareableAccessor.removeListener(_d90);},setItemValue:function(_d91,_d92){if(!_d91){return null;}if(!_d92){return null;}if(typeof (this._isDirty)!="undefined"&&!this._isDirty){this._isDirty=true;this._changedItems={};}var _d93=this._resolveMapping(_d91);if(!_d93){_d93=_d91;}this._changedItems=this._changedItems?this._changedItems:{};this._changedItems[_d93]=_d92;return this;},getItemValue:function(_d94){var id=this._resolveMapping(_d94);if(!id){id=_d94;}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 _d95=this.alias;if(!_d95){_d95=this.id;}var _d96=this.shareableAccessor.getItemValue(id);if(!_d96){_d96=null;}return _d96;},getAllNames:function(){var _d97=this.alias;if(!_d97){_d97=this.id;}var _d98=this.shareableAccessor.getAllNames();if(this._isDirty){var obj={};for(var i=0;i<_d98.length;i++){var _d99=_d98[i];obj[_d99]=_d99;}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);}}_d98=arr;}for(var s=0;s<_d98.length;s++){var id=_d98[s];if(this.mapping[id]){_d98[s]=this.mapping[id];}}if(_d98.length===0){return null;}return _d98;},removeItem:function(_d9a){if(typeof (this._isDirty)!="undefined"&&!this._isDirty){this._isDirty=true;this._changedItems={};}var _d9b=this.getAllNames();if(_d9b===null){return null;}var _d9c=false;for(var i=0;i<_d9b.length;i++){if(_d9b[i]==_d9a){_d9c=true;}}if(!_d9c){return null;}var id=this._resolveMapping(_d9a);if(!id){id=_d9a;}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 _d9d=this.alias;if(!_d9d){_d9d=this.id;}this.shareableAccessor._setItems(this._changedItems);var _d9e=this.navigationStateModel.commit();_d9e.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(_d9f){this.wrapper=_d9f;},start:function(sync){if(sync){return;}var _da0=this.wrapper.getIWidgetInstance();if(dojo.isFunction(this.wrapper.iScope._onGetMarkup)){this.wrapper.iScope._onGetMarkup();}var _da1=dojo.clone(this.wrapper.rootElement);dojo.publish("/com/ibm/mashups/livetext/livetextunchange",[_da1,true,null,null,dojo.hitch(this,this._unchangeCompleteCallback),this.includeParent]);},setIncludeParent:function(_da2){this.includeParent=_da2;},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 _da3=this.widgetDef._getShareableItemSets();if(_da3){var _da4=null;for(var i in _da3){if(Object.prototype.hasOwnProperty.call(_da3,i)){if(this.shareableItemSets.listeners[i]){for(var j=0,l=this.shareableItemSets.listeners[i].length;j ."+_da7.ns+"loading",_da7.rootElement).forEach(function(elem){elem.innerHTML="";var _da8=_da7.id;if(_da7.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale)){_da8=unescape(_da7.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale));com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(_da7.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_da8,e.message]));}else{if(typeof (e)!=="undefined"&&null!==e){com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(_da7.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_da8,e.message]));}else{elem.innerHTML=dojo.string.substitute(_da7.iwMessages.E_WIDGET_INCORRECTCONFIG_1,[_da8]);}}});},_logUpdateMarkupError:function(mode){this._getResourceBundle();var _da9=dojo.string.substitute(this.iwMessages.E_IWIDGETDEF_CONTENTNOTAVAILABLE_1,[mode]);},_loadWidgetSharedResource:function(cb2){var _daa=this.widgetDef.getResources();this._getResourceBundle();if(typeof _daa!="undefined"&&_daa!==null){var size=_daa.length-1;if(size==-1){cb2();}var _dab=[];var temp=[];for(var x in _daa){if(Object.prototype.hasOwnProperty.call(_daa,x)){var _dac=_daa[x];if(_dac.isImage()||_dac.isCSS()){temp.push(_dac);}else{_dab.push(_dac);}}}for(var y=0;y ."+me.ns+"loading",me.rootElement).forEach(function(elem){elem.innerHTML="";var _daf=me.getIWidgetInstance().getIDescriptorItems().getItemValue("title",dojo.locale);if(!_daf){_daf="'"+me.getIWidgetInstance().widgetXMLUrl+"'";}else{_daf="'"+unescape(_daf)+"'";}if(me.widgetDef){var _db0=me.widgetDef.getWidgetId();if(_db0){_daf="'"+_db0+"' ("+_daf+")";}}var _db1="";var _db2=(dojo.isArray(me.data))?me.data[0]:me.data;_db1="";for(var j in _db2){if(Object.prototype.hasOwnProperty.call(_db2,j)){if(j=="data"){_db1=_db1.concat("'"+_db2[j]+"'").concat("\n");}}}com.ibm.mm.enabler.logging.LegacyLogger.logInlineMessage(elem,"error",dojo.string.substitute(me.iwMessages.E_WIDGET_DISPLAY_FAIL_2,[_daf,_db1]));});me.error=null;me.data=null;}else{if(cb2){cb2();}}}};for(var i=0;i<_dab.length;i++){var _db3=_dab[i];if(typeof _db3!="undefined"&&_db3!==null){com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").loadResource(_db3,this.id,dojo.partial(mycb,i,_db3));}}}},handleEvent:function(_db4){var _db5=_db4.declaredClass;if(typeof _db5!="undefined"&&_db5!==null&&_db5=="com.ibm.mm.iwidget.IEventImpl"){var _db6=_db4.name;return this._handleEvent(_db6,_db4);}var _db7=_db4.scope;if(typeof _db7!="undefined"&&_db7!==null){if(_db7=="instance"){_db7=this.getIWidgetInstance();}else{if(_db7=="eventmodel"){_db7=this._getPublicEvents();}}}else{_db7=this;}var _db8=_db4.methodname;if(typeof _db8!="undefined"&&_db8!==null){if(_db7[_db8]&&dojo.isFunction(_db7[_db8])){_db7[_db8].apply(_db7,_db4.params);}}},_handleEvent:function(_db9,_dba){var _dbb="_handleEvent(eventName, iEvent)";if(this.bIsLoggable){this.LOGGER.entering(_dbb,[_db9,dojo.toJson(_dba)]);}_dba=this._deserializePayload(_dba);if(typeof _db9=="undefined"||_db9===null){return false;}if(!this.loaded){if(!this._eventqueue){this._eventqueue={};}this._eventqueue[_db9]=_dba;return;}try{if(_db9==iwConstants.EVENTS.onNavStateChanged){return this._handleOnNavStateChanged(_dba);}if(_db9==iwConstants.EVENTS.onWindowStateChanged){var _dbc=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _dbd=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_dbc,this.id);var _dbe=_dba.payload.newWindowState;_dbd.setWindowState(_dbe);var _dbf=dojo.contentBox(this.rootElement.parentNode);this.handleSizeChanged({"newWidth":Math.max(0,_dbf.w),"newHeight":Math.max(0,_dbf.h)});return this._handleEventInternal(_db9,_dba);}if(_db9==iwConstants.EVENTS.onModeChanged){if(this._inIframe()){var _dc0={};_dc0.methodname="_handleOnModeChange";_dc0.hubclient=this.hubId;_dc0.params=[_dba.payload];var id="_stub_"+this.id;this.eventSvr._publishEvent(iwConstants.WIDGETEVENT_PREFIX+id,_dc0,this.hubId);return;}return this._handleModeChange(_dba);}if(_db9=="onNewWire"){return this._handleNewWire(_dba);}if(_db9=="onRemoveWire"){return this._handleRemoveWire(_dba);}return this._handleEventInternal(_db9,_dba);}catch(e){var _dc1=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);_dc1.severe("_handleEvent","widget:"+this.hubId+"eventName:"+_db9+" HandleEventException:"+e);}},getPublicEventHandler:function(_dc2){var _dc3=this._getPublicEvents()||null;if(!_dc3){return null;}var _dc4=_dc3.find(_dc2)||null;if(!_dc4){return null;}var _dc5=_dc4.handlingFn||null;if(!_dc5){var _dc6=_dc4.getAttribute("isComplete");if(typeof _dc6!=="undefined"&&_dc6===false){var _dc7=iwConstants.EVENTS.onIncompleteEventDescription;var _dc8={eventDescription:_dc4};var _dc9=new com.ibm.mm.iwidget.IEventImpl(_dc7,null,_dc8);this._handleEventInternal(_dc7,_dc9);_dc4=_dc3.find(_dc2);_dc5=_dc4.handlingFn;}}var _dca=null;if(_dc5){if(dojo.isFunction(_dc5)){_dca=_dc5;}else{var _dcb=this._getHandlerScope(_dc5)||null;if(_dcb){_dca=dojo.hitch(_dcb,_dc5);}}}return _dca;},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 _dcc=false;var type=this.eventSvr.getType();if(typeof type!="undefined"&&type==com.ibm.mm.iwidget.Constants.eventservice.type.IFRAME){_dcc=true;}this._isInIframe=_dcc;return this._isInIframe;},setMainframeId:function(_dcd){this._mainframeId=_dcd;},setModal:function(_dce){this._isModal=_dce;},isModal:function(){return this._isModal?this._isModal:false;},_handleDataSync:function(_dcf){if(typeof _dcf.attributes!="undefined"&&_dcf.attributes!==null){var _dd0=_dcf.attributes;this._syncModifiableProperties(_dd0,this.getIWidgetInstance().getAttributes());}if(typeof _dcf.idescriptors!="undefined"&&_dcf.idescriptors!==null){var _dd1=_dcf.idescriptors;this._syncModifiableProperties(_dd1,this.getIWidgetInstance().getIDescriptorItems());}if(typeof _dcf.wiremodel!="undefined"&&_dcf.wiremodel!==null){var _dd2=_dcf.wiremodel;this._syncWireModel(_dd2,this.getIWidgetInstance().getWireModel());}this.commit(true);},_syncModifiableProperties:function(_dd3,_dd4){var _dd5=_dd3._items;if(_dd3._dirty){for(var i in _dd5){if(Object.prototype.hasOwnProperty.call(_dd5,i)){var name=i;var temp=_dd5[i];if(dojo.isString(temp)){if(temp&&temp==_dd4.DELETE_TOKEN){_dd4.removeItem(name);}}else{var _dd6=(_dd5[i].readOnly)?_dd5[i].readOnly:false;var _dd7=_dd5[i].values;if(typeof _dd7!="undefined"&&_dd7!==null){for(var j in _dd7){if(Object.prototype.hasOwnProperty.call(_dd7,j)){var _dd8=_dd7[j];if(_dd8&&_dd8==_dd4.DELETE_TOKEN){_dd4.removeItemValue(name,j);}else{if(_dd8){_dd4.setItemValue(name,_dd8,_dd6,j);}}}}}}}}}},_syncWireModel:function(_dd9,_dda){var _ddb=_dd9._wires;for(var i in _ddb){if(Object.prototype.hasOwnProperty.call(_ddb,i)){var _ddc=_ddb[i];if(_ddc._isDirty&&_ddc._type&&_ddc._type=="NEW"){_dda.addWire(_ddc.SourceWidget,_ddc.SourceEvent,_ddc.TargetEvent);}else{if(_ddc._isDirty&&_ddc._type&&_ddc._type=="DELETE"){_dda.removeWire(_ddc.SourceWidget,_ddc.SourceEvent,_ddc.TargetEvent);}}}}var _ddd=_dd9._targets;_dda._targets=_ddd;},setStateData:function(_dde){this.stateData=_dde;},updateState:function(){var _ddf;if(!this._inIframe()){var _de0=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _de1=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_de0,this.id)||null;if(_de1){var _de2=_de1.getWidgetState("cp");if(_de2){_ddf=new com.ibm.mm.iwidget.IEventImpl(iwConstants.EVENTS.onNavStateChanged,"json",_de2);this._handleEventInternal(iwConstants.EVENTS.onNavStateChanged,_ddf);}}}else{if(this.stateData){_ddf=new com.ibm.mm.iwidget.IEventImpl(iwConstants.EVENTS.onNavStateChanged,null,this.stateData);this._handleEventInternal(iwConstants.EVENTS.onNavStateChanged,_ddf);}}},_handleOnNavStateChanged:function(_de3){if(!this._inIframe()){var _de4=_de3.payload;if(_de4){var _de5=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _de6=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_de5,this.id);_de6.setWidgetState("cp",_de4);var _de7=_de5.commit();_de7.start();}}else{var _de8={};_de8.methodname="_handleOnNavStateChanged";_de8.params=[_de3];this.eventSvr._publishEvent(this.eventSvr.WIDGETEVENT_PREFIX+"_stub_"+this.id,_de8);}},_initialize:function(_de9){var lang=this.widgetDef.getDefaultLanguage()||null;if(lang){this.defaultLanguage=lang;}else{this.defaultLanguage="en";}var _dea=this._getInitDefaultMode()||null;if(!_dea){_dea=iwConstants.mode_view;}this.currentMode=_dea;this._handleSaveMode();this._initManagedItemSet();this._getShareableItemSets();this._getPublicEvents(dojo.hitch(this,function(_deb){this.getWires();if(_de9){_de9();}}));},getPublicEvent:function(name){var _dec=this._getPublicEvents();return _dec.find(name);},_getPublicEvents:function(_ded){if(!this.publicEvents){var _dee=com.ibm.mashups.services.ServiceManager.getService("WidgetEventModelFactoryService");var dfr=_dee.createEventModel(this,{context:this,callback:"_eventProviderModeChange",unregister:function(_def){this.unregisterArray.push(_def);}});dfr.setFinishedCallback(dojo.hitch(this,function(_df0,_df1){this.publicEvents=_df0;if(_ded){_ded(this.publicEvents);}}));var sync=(_ded)?false:true;if(ibmConfig.dojotest){sync=true;}dfr.start(sync);}return this.publicEvents;},_eventProviderModeChange:function(_df2,_df3,_df4){var _df5=this.publicEvents;var _df6=com.ibm.mashups.services.ServiceManager.getService("WidgetEventModelFactoryService");var dfr=_df6.createEventModel(this,{context:this,callback:"_eventProviderModeChange",unregister:function(_df7){this.unregisterArray.push(_df7);}});dfr.setFinishedCallback(dojo.hitch(this,function(_df8,_df9){this.publicEvents=_df8;}));dfr.start(true);var _dfa={};_dfa.isHandled="true";var _dfb=_df5.getEvents(_dfa);if(_dfb){for(var i=0;i<_dfb.length;i++){var _dfc=_dfb[i];var _dfd=this.getPublicEvent(_dfc.name);if(_dfc&&_dfd){_dfd.copyRuntimeProperties(_dfc);}}}},_getPublishedEvents:function(){var _dfe=this.getWidgetPublishedEvents()||null;var arr={};if(_dfe){var i=0;for(i;i<_dfe.length;i++){arr[_dfe[i].name]=_dfe[i];}}return arr;},_getHandledEvents:function(){var _dff=this.getWidgetHandledEvents()||null;var arr={};if(_dff){var i=0;for(i;i<_dff.length;i++){arr[_dff[i].name]=_dff[i];}}return arr;},getWidgetPublishedEvents:function(){var _e00=this._getPublicEvents();if(_e00){var _e01={};_e01.isPublished="true";return _e00.getEvents(_e01);}return null;},getWidgetHandledEvents:function(){var _e02=this._getPublicEvents();if(_e02){var _e03={};_e03.isHandled="true";return _e02.getEvents(_e03);}return null;},getWires:function(){return this.getIWidgetInstance().getWires();},_handleNewWire:function(_e04){var _e05=_e04.payload;var _e06=this.getIWidgetInstance().getWireModel();_e06.registerTargets(_e05.targetWidget,_e05.targetEvent,_e05.sourceEvent);this.commit();var _e07=_e05.sourceEvent;var _e08=this._getPublicEvents();if(!_e08){return false;}var _e09=_e08.find(_e07);if(_e09){var _e0a=_e09.getOnNewWire();if(_e0a){var _e0b=this._getHandlerScope(_e0a);if(_e0b&&dojo.isFunction(_e0b)){_e0b(_e04);}else{if(_e0b&&dojo.isObject(_e0b)){_e0b[_e0a](_e04);}}return true;}}return false;},_handleRemoveWire:function(_e0c){var _e0d=_e0c.payload;var _e0e=_e0d.targetEvent;if(this.id==_e0d.sourceWidget){_e0e=_e0d.sourceEvent;}var _e0f=this._getPublicEvents()||null;if(!_e0f){return false;}var _e10=_e0f.find(_e0e)||null;if(_e10){var _e11=_e10.getOnRemoveWire();if(_e11){var _e12=this._getHandlerScope(_e11);if(_e12&&dojo.isFunction(_e12)){_e12(_e0c);}else{if(_e12&&dojo.isObject(_e12)){_e12[_e11](_e0c);}}return true;}}return false;},_getShareableItemSets:function(){if(this.shareableItemSets){return this.shareableItemSets;}this.shareableItemSets={};this.shareableItemSets.mapping={};this.shareableItemSets.itemsets={};this.shareableItemSets.listeners={};var _e13=this.widgetDef._getShareableItemSets();if(_e13){var _e14=null;for(var i in _e13){if(Object.prototype.hasOwnProperty.call(_e13,i)){_e14=new com.ibm.mm.iwidget.itemset.ShareableItemSetFactory(this,_e13[i]);var _e15=_e13[i].onItemSetChanged||null;if(_e15){if(!this.shareableItemSets.listeners[i]){this.shareableItemSets.listeners[i]=[];}this.shareableItemSets.listeners[i].push(_e14.addListener(_e15));}this.shareableItemSets.itemsets[i]=_e14;var _e16=_e13[i].alias||null;if(_e16){this.shareableItemSets.mapping[_e16]=_e16;}}}}return this.shareableItemSets;},_getShareableItemSet:function(id){var _e17=this._getShareableItemSets();if(_e17&&_e17.mapping[id]){var _e18=_e17.mapping[id];return _e17.itemsets[_e18];}else{if(_e17&&_e17.itemsets[id]){return _e17.itemsets[id];}}var _e19=new com.ibm.mm.iwidget.itemset.ShareableItemSetFactory(this.widgetwrapper,null,name);_e17.itemsets[id]=_e19;return _e17.itemsets[id];},_executeCallbackQueue:function(){com.ibm.mashups.services.ServiceManager.getService("resourceLoadService").executeCallbackQueue(this.id);},_handleSaveMode:function(){var _e1a=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _e1b=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_e1a,this.id);var _e1c=_e1b.getWidgetMode();if(_e1c!=this.currentMode){if(!((_e1c===null)&&(this.currentMode==com.ibm.mm.iwidget.Constants.mode.VIEW))){_e1b.setWidgetMode(this.currentMode);var _e1d=_e1a.commit();_e1d.start();}}},_transform:function(_e1e,_e1f){var _e20=this.getPublicEvent(_e1e);if(!(!_e20||!_e20.type||!_e1f.type)){var _e21=new com.ibm.mm.iwidget.IEventImpl(_e20.name,_e20.type,_e1f.payload,null);var _e22=new com.ibm.mm.enabler.utils.EventTransformerImpl();var _e23=_e22._transform(_e1f,_e21)||null;if(_e23){_e1f=_e23;}}return _e1f;},_getModeFromNavStateModel:function(){var _e24=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _e25=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_e24,this.id);return _e25.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(_e26,_e27,_e28){},postProcessCallbackFunc:function(_e29,_e2a,_e2b,_e2c){}});}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(_e2d,_e2e,_e2f,path,_e30,_e31,id){},isEqual:function(_e32){}});}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(_e33,_e34,_e35,path,_e36,_e37,id){this.match=_e33;this.wait=_e37;this.procEnc=_e34;this.mod=_e35;this.path=path;this.baseCls=_e36;this.id=id;},isEqual:function(_e38){return _e38&&_e38.match==this.match&&_e38.wait==this.wait&&_e38.procEnc==this.procEnc&&_e38.mod==this.mod&&_e38.path==this.path&&_e38.baseCls==this.baseCls&&_e38.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(_e39,_e3a){},getMessage:function(_e3b){}});}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(_e3c,_e3d){},unprocessTag:function(_e3e){}});}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(_e3f){},onTagChanged:function(_e40,_e41,_e42,_e43){},onUnchangeTag:function(node,_e44,_e45,_e46,_e47){},onTagContentChanged:function(_e48,_e49,_e4a,_e4b){},onAddConfigEntry:function(_e4c,_e4d){},onRemoveConfigEntry:function(_e4e){}});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(_e4f){if(this._initialized){console.warn("WARNING: Do not initialize the LiveText Framework multiple times!");return;}this._initialized=true;if(!_e4f){_e4f={};}this._loadTags(_e4f);dojo.subscribe(this.tagChanged,this,"onTagChanged");dojo.subscribe(this.unchangeTag,this,"onUnchangeTag");dojo.subscribe(this.tagContentChanged,this,"onTagContentChanged");dojo.publish(this.tagContentChanged,[_e4f.node||document,("continueAfterException" in _e4f)?_e4f.continueAfterException:true,_e4f.preProcessCallbackFunc,_e4f.postProcessCallbackFunc]);},_getNodes:function(node,_e50){var k=[];if(_e50=="undfined"||!_e50){console.error("Why are we having tagType undefined ::::");return k;}var _e51;var a;var _e52=0;if(_e50.processEnclosedTags!="undefined"&&_e50.processEnclosedTags){var _e53=_e50.match;a=[];_e51=dojo.query(_e53,node);_e51.forEach(function(node,_e54,_e55){a.push(node);});return a;}else{var _e56=_e50.match.split(",");a=[];var b=[];for(_e52=0,l=_e56.length;_e520){_e5c=a[0];_e5d=0;while(_e5d0){tag.loaded=tag.loaded||null;if(tag.loaded===null){this._loadTagHandler(tag);}var _e74=[];if(dojo.isFunction(_e6e)){try{_e6e(node,_e73,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(_e71,"calling processTag with tagHanlder ${0}",[tag.tagHandler.processTag]);}}if(this.LOGGER.isLoggable(this.LogLevel.TRACE)){this.LOGGER.trace(_e71,"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(_e72,tag);}catch(error){this.LOGGER.trace("_processTypeTag","processTag tag:"+tag.baseClass+" error:"+error.message);_e74[_e74.length]=error;}}else{for(var _e75=0,l=_e72.length;_e750){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){_e7b[_e7b.length]=error2;}}else{for(var _e7c=0,l=tags.length;_e7c0){_e7d=true;}dojo.destroy(copy.copyOfNode);dojo.destroy(copy.copyNodeParent);delete copy.copyOfNode;delete copy.copyNodeParent;delete copy.result;}return _e7d;},_loadTags:function(){var _e7e="_loadTags";this._tagTypes=this._tagTypes||null;if(this._tagTypes===null){var _e7f=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(_e80){_e7f._tagTypes=dojo.fromJson(_e80);if(_e7f.LOGGER.isLoggable(_e7f.LogLevel.TRACE)){_e7f.LOGGER.trace(_e7e,"got Inside _loadTags of ServiceModelImpl"+_e7f._tagTypes);}},error:function(data){console.dir(data);}});}}},onAddConfigEntry:function(_e81,_e82){this._loadTags();if(!dojo.some(this._tagTypes,function(_e83){return _e81.isEqual(_e83);})){if(_e82){this._tagTypes.unshift({"match":_e81.match,"processEnclosedTags":_e81.procEnc,"waitOnPreTag":_e81.wait,"module":_e81.mod,"path":_e81.path,"baseClass":_e81.baseCls,"id":_e81.id});}else{this._tagTypes.push({"match":_e81.match,"processEnclosedTags":_e81.procEnc,"waitOnPreTag":_e81.wait,"module":_e81.mod,"path":_e81.path,"baseClass":_e81.baseCls,"id":_e81.id});}}},onRemoveConfigEntry:function(_e84){this._loadTags();for(var i=0;;i\s*/,"");_e8f.allSkins[_e8d]=_e92;_e8f.allVars[_e8d]=_e93;_e8f.startAttatchSkin(_e8d,tag);},error:function(data){_e8f.allSkins[_e8d]=_e92;_e8f.startAttatchSkin(_e8d,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(_e8d,tag);}},startAttatchSkin:function(_e94,tag){if(this.isProcessing===0){this.executeReplaceSkin(_e94,tag);}else{this.addToWaitingList(_e94,tag);}},chooseNext:function(){if(this.waitingList.length!==0){var _e95=this.waitingList.pop();this.executeReplaceSkin(_e95.skin,_e95.tag);}},addToWaitingList:function(_e96,tag){if(!this.subscribeHandler){this.subscribeHandler=dojo.subscribe(this.skinAttachEvent,this,"chooseNext");}var _e97={};_e97.skin=_e96;_e97.tag=tag;this.waitingList.push(_e97);},executeReplaceSkin:function(_e98,tag){this.isProcessing=1;var temp=this.allSkins[_e98];if(temp){var _e99=this._getNodeToReplace(tag);var _e9a=_e99.parentNode;var anId=dojox.uuid.generateRandomUuid().replace(/\-/g,"");var args=this._getArgs(_e98,tag,anId);if(!args){this.LOGGER.severe("executeReplaceSkin",com.ibm.mm.builder.coreWidgetsMessages.E_SKIN_NOT_EXIST_0);return;}var _e9b=this._getSkinResourceUrl(_e98,"skin.css");com.ibm.mm.builder.utils.htmlUtil.loadCss(_e9b);if(builderConfig.isBidi){var _e9c=this._getSkinResourceUrl(_e98,"skin_rtl.css");com.ibm.mm.builder.utils.htmlUtil.loadCss(_e9c);}var _e9d=dojo.string.substitute(temp,args);_e9d=_e9d.replace(/\/>/g,">");var _e9e=this._getNodeFromMarkup(_e9d);dojo.addClass(_e9e,"mumWidgetTitleBar");_e9a.replaceChild(_e9e,_e99);var _e9f=dojo.byId(anId);_e9f.parentNode.replaceChild(tag,_e9f);if(!(dojo.hasClass(_e99,"iw-iWidget")||dojo.hasClass(_e99,"mm_iWidget"))){}var para={};para.widgetId=tag.id;para.skinNodeId=_e9e.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(_ea0,_ea1){try{var _ea2=com.ibm.mm.builder.utils.skinUtil._getSkinModel();var skin=com.ibm.mm.builder.utils.skinUtil.getSkinNode(_ea0)||com.ibm.mm.builder.utils.skinUtil.getDefaultSkin();var url=_ea2.findResourceURL(skin,_ea1);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(_ea3,tag,anId){var args={};var _ea4=this.allVars[_ea3];if(_ea4){dojo.mixin(args,_ea4);}args.widgetBody="
";args.skinId=this.skinIdPrefix+tag.id;if(!args.process){args.process=function(_ea5,_ea6){};}args.process(_ea3,tag.id);return args;},_getNodeMarkup:function(tag){var _ea7=document.createElement("div");_ea7.appendChild(tag.cloneNode(true));var _ea8=_ea7.innerHTML;_ea7.removeChild(_ea7.firstChild);return _ea8;},_getNodeFromMarkup:function(_ea9){var _eaa=document.createElement("div");_eaa.innerHTML=_ea9;return _eaa.removeChild(_eaa.firstChild);},_getNodeToReplace:function(tag){var node=dojo.byId(this.skinIdPrefix+tag.id);if(!node){node=tag;}return node;},_showParent:function(node){var _eab=node.parentNode;while(_eab){_eab=_eab.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 _eac=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);queueRendering=_eac.getValue(com.ibm.mashups.enabler.services.ConfigConstants.QUEUE_RENDERING);},processTag:function(tag){var _ead="processTag";var _eae=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_eae){this.LOGGER.entering(_ead,arguments);}var id=dojo.attr(tag,"id");if(typeof id!="undefined"){var _eaf=dojo.attr(tag,"lazyLoad");var _eb0=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(id);if(_eb0===null){_eb0=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().createWidget(tag);}if(_eb0){if(!_eaf||(_eaf&&_eaf!="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(_eb0);}}else{_eb0.lazyLoad=true;}}}},processQueue:function(_eb1){if(this.queue.length>0){if(_eb1){while(this.queue.length>0){var json=this.queue.shift();var _eb2=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().find(json.widgetId);if(_eb2){com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel().renderWidget(_eb2);break;}}}else{this.queue.sort(function(_eb3,_eb4){return _eb3.priority-_eb4.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;n0){for(var i=0,l=_ec5.length;i0){return dojo.map(md,function(item){return com.ibm.mm.enabler.utils.Dom.textContent(item);});}return [];},getMetaData:function(name,_ed9){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&&_ed9){var _eda=com.ibm.mm.enabler.EndpointUtils.checkForEndpoints(res);if(_eda){return _eda;}}return res;},setMetaData:function(name,_edb){var _edc;var _edd=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.MODEL_METADATA+"[@name='"+name+"']/"+this.BASE_VALUE,this.xmlData,this.mdi_ns);if(_edd&&_edd.length>0){_edc=_edd[0];for(var i=1,l=_edd.length;i0){_ee2=this.getMetaData(name);dojo.forEach(_ee3,function(item){dojo.destroy(item);},this);this._setDirty();}return _ee2||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(_ee4){},getThemeIdentifier:function(){},setThemeIdentifier:function(_ee5){}});}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(_ee6,_ee7,_ee8){var _ee9=dojo.getObject(this.declaredClass).prototype;com.ibm.mm.enabler.utils.Misc.forIn(_ee6,function(f,fn){if(dojo.isFunction(f)&&!Object.prototype.hasOwnProperty.call(_ee9,fn)){if(!_ee8||!(_ee8&&_ee8[fn])){this[fn]=dojo.hitch(this,(function(fn){return function(){return (_ee7&&_ee7[fn])?this._delegate(fn,arguments,_ee7[fn]):this._delegate(fn,arguments);};})(fn));}}},this);},_delegate:function(fn,args,_eea){var _eeb=this.LOGGER.isLoggable(this.LOG_LEVEL);var id;if(!dojo.isFunction(this._persistence[fn])){id=(this.getID)?this.getID():"unknown";if(_eeb){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(_eea&&dojo.isFunction(this._persistence[_eea])&&!this._persistence[_eea].apply(this._persistence,args||[])){id=(this.getID)?this.getID():"unknown";if(_eeb){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}'.",[_eea,fn,id]);}this._transitionFn.apply(this._transitionCtx,[id]).start();}}if(!dojo.isFunction(this._persistence[fn])){if(_eeb){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(_eec){this.navModel=_eec;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(_eed,sync){var _eee="getContent";var _eef=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_eef){this.LOGGER.entering(_eee,arguments);}var _ef0=null;var dfr=this._getPersistence().getContent();dfr.setFinishedCallback(dojo.hitch(this,function(node,_ef1){if(node){_ef0=this.navModel._wrapContent(node);}_eed.finish(_ef0,_ef1);}));dfr.start(sync);if(_eef){this.LOGGER.exiting(_eee,_ef0);}return _ef0;});}});}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(_ef2){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(_ef3){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,_ef4){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(_ef4);break;case c.NAVIGATION_LABEL:w=new com.ibm.mm.enabler.navigation.NavigationLabelImpl(_ef4);break;case c.NAVIGATION_URL:w=new com.ibm.mm.enabler.navigation.NavigationURLImpl(_ef4);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(_ef5,_ef6){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;this.persistenceProvider=_ef5;this.modelProvider=_ef6;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 _ef7=0;if(this.loadFurtherNodes){this._loadAheadInternal(dfr||null,true);_ef7=this.cursor;}else{this.entries[0]=null;}}var _ef8=this.entries[this.cursor];var _ef9=_ef8?true:false;if(_ef9&&this._outboundNodes[_ef8]===null){this.cursor++;return this.hasNext(dfr,sync);}return _ef9;},next:function(dfr,sync){if(this.hasNext(dfr||null,true)){var _efa=this.entries[this.cursor++];var _efb=this.modelProvider.lookupNodeInCacheByID(_efa);return (typeof _efb=="undefined")?this.entryCache[_efa]:_efb;}return null;},_insertInbound:function(_efc,_efd){for(var id in this._inboundNodes){_efc.splice(_efd,0,id);_efd++;}},setCursorPosition:function(_efe){if(_efe<0){return;}if(!this.loadFurtherNodes){if(_efe>=this.size().start()){return;}}this.cursor=_efe;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(_eff,sync,_f00){var _f01="_loadAhead";var _f02=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_f02){this.LOGGER.entering(_f01,arguments);}if(!this.context){this.context=this.persistenceProvider.getLoadAheadContext(null,this);}var _f03;var dfr=this.persistenceProvider.loadAhead(this.context);dfr.setFinishedCallback(dojo.hitch(this,function(_f04,_f05){if(_f04==null){this.loadFurtherNodes=false;this.sizeValue=0;this.entries[this.cursor]=null;this._insertInbound(this.entries,this.cursor);if(_eff){_eff.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_BAD_REQUEST);}return;}this.loadFurtherNodes=_f04.loadFurtherNodes;this.sizeValue=_f04.size;if(_f04.size==0){this.entries[this.cursor]=null;this._insertInbound(this.entries,this.cursor);if(_eff){_eff.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return;}var c=0;if(_f04.nodes){for(var i=0,l=_f04.nodes.length;i0;}return _f46;},hasCachedHasChildren:function(_f48){return this._internalCache.pages[_f48];},findSpace:function(_f49,_f4a,sync,_f4b){var _f4c=function(_f4d){if(this._internalCache.spaces[_f4d]){return this._internalCache.spaces[_f4d];}return null;};var _f4e=_f4c.apply(this,[_f49])||null;if(_f4e){if(dojo.isFunction(_f4a)){_f4a(_f4e,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}else{var _f4f=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.pages)){_f4f={"sections":["spaces"],"spaces":{"select":["current"]}};}this.findBySelection(this.COLLECTION,_f49,_f4f,dojo.hitch(this,function(_f50){if(_f50==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f4e=_f4c.apply(this,[_f49])||null;}if(dojo.isFunction(_f4a)){_f4a(_f4e,_f50);}}),sync,_f4b);}return _f4e;},getSpace:function(_f51,_f52,sync,_f53){var _f54=function(_f55){if(this._page2SpaceMap[_f55]){var _f56=this._page2SpaceMap[_f55];if(_f56==this.MY_MASHUP_APPS){return this.MY_MASHUP_APPS;}else{if(this._internalCache.spaces[_f56]){return this._internalCache.spaces[_f56];}}}return null;};var _f57=null;var _f58=_f54.apply(this,[_f51])||null;if(_f58){if(_f58==this.MY_MASHUP_APPS){if(dojo.isFunction(_f52)){_f52(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}else{_f57=_f58;if(dojo.isFunction(_f52)){_f52(_f57,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}}}else{var _f59=null;if(!com.ibm.mm.enabler.utils.Misc.isEmpty(this._internalCache.spaces)){_f59={"sections":["spaces"],"spaces":{"select":["current"]}};}this.findBySelection(_f51,null,_f59,dojo.hitch(this,function(_f5a){if(_f5a==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){_f57=_f54.apply(this,[_f51])||null;if(!_f57){this._page2SpaceMap[_f51]=this.MY_MASHUP_APPS;_f57=this.MY_MASHUP_APPS;}}if(dojo.isFunction(_f52)){_f52(_f57,_f5a);}}),sync,_f53);}return _f57;},getFavoriteSpaces:function(_f5b,sync,_f5c){var _f5d=this.COLLECTION;var _f5e=function(_f5f){if(this._internalCache.favorites.length>0){var _f60=[];for(var i=0;i0;i--){this._internalCache.parents[_f8b[i]]=_f8b[i-1];}}if(_f88.topLevel){var tl=_f88.topLevel;this._internalCache.topLevels[_f89]=tl;}if(_f88.root){this._internalCache.rootNodes[_f89]=_f88.root;}else{if(_f88.trail){this._internalCache.rootNodes[this.MY_MASHUP_APPS]=_f88.trail[0];}}}for(var j=0,m=_f85.data.length;j0);},hasWidgetsCached:function(_f94){if(this._internalCache.widgets[_f94]){return true;}else{return false;}},invalidatePage:function(id,_f95){if(!id){this._internalCache.pages={};this._internalCache.trails={};this._internalCache.parents={};this._page2SpaceMap={};this._spaceForPage={};}else{if(_f95){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 _f96=this._internalCache.parents[id];if(_f96){var _f97=this._internalCache.pages[_f96];if(_f97){_f97.children=null;}}var _f98=[];for(var _f99 in this._internalCache.parents){_f96=this._internalCache.parents[_f99];if(_f96==id){_f98.push(_f99);}}for(var i=0,l=_f98.length;i1&&com.ibm.mm.enabler.utils.Misc.isEmpty(node.children[0])){var _f9e=com.ibm.mm.enabler.persistence.JsonPersistenceProvider;for(var i=1;i1){c.children=[];for(var j=0;j=this.filters.length){return;}if(this.changing){this.filters[this.current++].onChangingStyle(_103c,_103d,_103e,_103f,this);}else{this.filters[this.current++].onChangeStyle(_103c,_103d,_103e,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(_1040,_1041,_1042,_1043,_1044){},onChangeStyle:function(_1045,_1046,_1047,_1048){},onChangeLayoutControl:function(_1049){}});}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(_104a,_104b,_104c){},removeStyleFilter:function(_104d){},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(_104e,name,_104f,_1050,_1051){}});}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(_1052,_1053){this.filters=_1052;this.changing=_1053;this.current=0;},doFilter:function(_1054,name,_1055,_1056,_1057){if(this.current>=this.filters.length){return;}if(this.changing){this.filters[this.current++].onChangingDynamicContent(_1054,name,_1055,_1056,_1057,this);}else{this.filters[this.current++].onChangeDynamicContent(_1054,name,_1055,_1056,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(_1058,name,_1059,_105a,_105b,_105c){},onChangeDynamicContent:function(_105d,name,_105e,_105f,_1060){}});}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(_1061,_1062,_1063){this.navModel=_1061;this.layoutModel=_1062;this.rsModel=_1063;},onChangingStyle:function(_1064,_1065,_1066,_1067,_1068){_1068.doFilter(_1064,_1065,_1066,_1067);},onChangeStyle:function(_1069,_106a,_106b,_106c){var _106d=com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl.prototype._serializeStyle(_106b);_1069.setMetaData("css-style",_106d);_106c.doFilter(_1069,_106a,_106b);}});}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(_106e,name,_106f,_1070,_1071,_1072){_1072.doFilter(_106e,name,_106f,_1070,_1071,_1072);},onChangeDynamicContent:function(_1073,name,_1074,_1075,_1076){_1076.doFilter(_1073,name,_1074,_1075);if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1073,com.ibm.mashups.enabler.layout.LayoutControl)||(typeof _1075==="undefined"||null===_1075)||_1074===_1075){return;}var _1077=com.ibm.mashups.enabler.runtime.skin.Factory.getRuntimeSkinModel();var _1078=_1077.findByLayoutNode(_1073);var node=_1078.getDomElementForDynamicContent(name);if(!node){return;}if(name==com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE){node.innerHTML=_1075.replace(/&/g,"&").replace(/"/g,"\"").replace(/>/g,">").replace(/</g,"<");}else{if(name==com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_ICON){node.src=_1075;}}}});}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 _1079=com.ibm.mm.enabler.runtime.skin.RuntimeSkinModelImpl._instance;var ret=_1079?_1079:(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 _107a="buildIteratorNodes(node, lm)";var _107b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_107b){this.LOGGER.entering(_107a,[node,lm]);}if(typeof node=="undefined"||null===node){if(_107b){this.LOGGER.exiting(_107a);}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(_107b){this.LOGGER.trace(_107a,"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 _107c=lm.getChildren(node);while(_107c.hasNext()){this._buildIteratorNodes(_107c.next(),lm);}if(_107b){this.LOGGER.exiting(_107a);}},iterator:function(){var _107d="iterator()";var _107e=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_107e){this.LOGGER.entering(_107d);}this.nodes.clear();this.ids=[];var page=this._getCurrentPage();this.cursor=0;if(page===null){if(_107e){this.LOGGER.exiting(_107d);}return this;}var _107f=this.navModel.getLayoutModel(page);if(_107f===null){if(_107e){this.LOGGER.exiting(_107d);}return this;}var root=_107f.getRoot().start();this._buildIteratorNodes(root,_107f);if(_107e){this.LOGGER.exiting(_107d);}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(_1080){this.cursor=_1080;},getCursorPosition:function(){return this.cursor;},_getCurrentPage:function(){var _1081="_getCurrentPage()";var _1082=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1082){this.LOGGER.entering(_1081);}var _1083=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(this.navStateModel,null);var _1084=_1083.getPageID();if(_1082){this.LOGGER.trace(_1081,"page id is "+_1084);}if(typeof _1084=="undefined"||null===_1084){if(_1082){this.LOGGER.exiting(_1081,null);}return null;}var node=this.navModel.find(_1084).start();if(_1082){this.LOGGER.exiting(_1081,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(_1085){return true;},find:function(id){var _1086="find(id)";var _1087=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1087){this.LOGGER.entering(_1086,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(_1087){this.LOGGER.trace(_1086,id+" is not on the current page");this.LOGGER.exiting(_1086,null);}return null;}if(this.nodes.containsKey(id)){if(_1087){this.LOGGER.trace(_1086,id+" is cached");this.LOGGER.exiting(_1086,this.nodes.entry(id).valueOf());}return this.nodes.entry(id).valueOf();}var _1088=new com.ibm.mm.enabler.runtime.skin.RuntimeSkinNodeImpl(id,this);this.nodes.add(id,_1088);this.ids[this.ids.length]=id;if(_1087){this.LOGGER.exiting(_1086,_1088);}return _1088;},findByLayoutNode:function(_1089){var _108a="findByLayoutNode(layoutNode)";var _108b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_108b){this.LOGGER.entering(_108a,_1089);}if(typeof _1089=="undefined"||null===_1089){if(_108b){this.LOGGER.exiting(_108a,null);}return null;}var _108c=this.find(_1089.getID());if(_108c){_108c._setLayoutNode(_1089);}if(_108b){this.LOGGER.exiting(_108a,_108c);}return _108c;},_generateFilterId:function(){if(!this._listenerCounter){this._listenerCounter=1;}else{this._listenerCounter++;}return this._listenerCounter;},addStyleFilter:function(_108d,_108e,_108f){var _1090="ordinal, filter, scopeObject";var _1091=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1091){this.LOGGER.entering(_1090,[_108d,_108e,_108f]);}if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_108e,com.ibm.mashups.enabler.runtime.skin.StyleFilter)){if(_1091){this.LOGGER.exiting(_1090,-1);}return -1;}var id=this._addFilter(_108d,_108e,_108f,this.styleFilterIDs,this.styleFilters,this.styleChains);if(_1091){this.LOGGER.exiting(_1090,id);}return id;},_addFilter:function(_1092,_1093,_1094,ids,_1095,_1096){var _1097="_addFilter(ordinal, filter, scopeObject, ids, filters)";var _1098=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1098){this.LOGGER.entering(_1097,[_1092,_1093,_1094,ids,_1095]);}if(typeof _1092!="number"){this.LOGGER.trace(_1097,"ordinal is not a number");this.LOGGER.exiting(_1097,-1);return -1;}var _1099;var _109a=false;if(typeof _1094=="undefined"||null===_1094||!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1094,com.ibm.mashups.enabler.layout.LayoutNode)){_1099=null;if(_1098){this.LOGGER.trace(_1097,"no scope object");}}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1094,com.ibm.mashups.enabler.layout.LayoutControl)){_1099=_1094;if(_1098){this.LOGGER.trace(_1097,"scope object is a LayoutControl");}}else{if(com.ibm.mm.enabler.utils.Misc.isInstanceOf(_1094,com.ibm.mashups.enabler.layout.LayoutContainer)){_1099=_1094;_109a=true;if(_1098){this.LOGGER.trace(_1097,"scope object is a LayoutContainer");}}else{_1099=null;if(_1098){this.LOGGER.trace(_1097,"no scope object");}}}}var id=this._generateFilterId();var _109b={id:id,filter:_1093,scope:_1099,isContainer:_109a,ordinal:_1092};var list;if(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST>=_1092){list=_1095.item(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST);list.insert(0,_109b);ids.add(id,com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_FIRST);}else{if(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST<=_1092){list=_1095.item(com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST);list.add(_109b);ids.add(id,com.ibm.mashups.enabler.runtime.skin.Constants.ORDINAL_LAST);}else{list=_1095.item(_1092);if(typeof list==="undefined"||null===list){list=new dojox.collections.ArrayList();this.styleFilters.add(_1092,list);}list.add(_109b);ids.add(id,_1092);}}_1096.clear();if(_1098){this.LOGGER.exiting(_1097,id);}return id;},removeStyleFilter:function(_109c){this._removeFilter(_109c,this.styleFilterIDs,this.styleFilters,this.styleChains);},_removeFilter:function(_109d,ids,_109e,_109f){var _10a0=ids.item(_109d);if(typeof _10a0=="undefined"||null===_10a0){return;}var list=_109e.item(_10a0);if(typeof list!=="undefined"&&null!==list&&0 .component-container > .id-"+_10d4);if(!!_10d6&&_10d6.length>0){return _10d6;}_10d6=dojo.query("#layoutContainers > .hiddenWidgetsDiv > .component-container > .id-"+_10d4);if(!!_10d6&&_10d6.length>0){return _10d6;}return dojo.query(".id-"+_10d4);},_updateTitle:function(){var _10d7="_updateTitle()";if(this.bIsLoggable){this.LOGGER.entering(_10d7);}var _10d8=com.ibm.mm.iwidget.Utils.getModelID(this.id);var _10d9,elem;var _10da=this._query(_10d8);if(_10da.length!==1){if(this.bIsLoggable){this.LOGGER.trace(_10d7,_10d8+": no layout node; not updating title");this.LOGGER.exiting(_10d7);}return;}_10d9=_10da[0];var elems=dojo.query("."+com.ibm.mashups.enabler.runtime.skin.Constants.DYNAMIC_CONTENT_TITLE,_10d9);if(elems.length!==1){if(this.bIsLoggable){this.LOGGER.trace(_10d7,_10d8+": no dynamic content title element; not updating title");this.LOGGER.exiting(_10d7);}return;}elem=elems[0];var title=com.ibm.mm.iwidget.Utils._getWidgetTitle(_10d8);if(title===null){title=this.widgetDef.getIDescriptorItems().getItemValue("title",dojo.locale);if(this.bIsLoggable){this.LOGGER.trace(_10d7,_10d8+": using title from widget xml: "+title);}}if(title!==null){elem.innerHTML=title;if(this.bIsLoggable){this.LOGGER.trace(_10d7,_10d8+": set title to: "+title);}}if(this.bIsLoggable){this.LOGGER.exiting(_10d7);}}});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 _10db=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _10dc=com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_10db,null);var _10dd=_10dc.getPageID();return _10dd;},getCurrentPageDeferred:function(){var _10de="getCurrentPageDeferred()";var _10df=com.ibm.mm.enabler.utils.Model.LOGGER.isLoggable(this.LOG_LEVEL);if(_10df){com.ibm.mm.enabler.utils.Model.LOGGER.entering(_10de);}var _10e0=this.getCurrentPageID();if(_10df){com.ibm.mm.enabler.utils.Model.LOGGER.trace(_10de,"page id is "+_10e0);}if(typeof _10e0=="undefined"||null===_10e0){if(_10df){com.ibm.mm.enabler.utils.Model.LOGGER.exiting(_10de,null);}return null;}var _10e1=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _10e2=_10e1.find(_10e0);if(_10df){this.LOGGER.exiting(_10de,_10e2);}return _10e2;},getCurrentPageLayoutModel:function(){var _10e3="getCurrentPageLayoutModel()";var _10e4=com.ibm.mm.enabler.utils.Model.LOGGER.isLoggable(this.LOG_LEVEL);if(_10e4){com.ibm.mm.enabler.utils.Model.LOGGER.entering(_10e3);}var _10e5=com.ibm.mm.enabler.utils.Model.getCurrentPageDeferred().start();if(!_10e5){return null;}if(_10e4){com.ibm.mm.enabler.utils.Model.LOGGER.trace(_10e3,"page id is "+_10e5.getID());}var _10e6=com.ibm.mashups.enabler.navigation.Factory.getNavigationModel();var _10e7=_10e6.getLayoutModel(_10e5);if(_10e4){this.LOGGER.exiting(_10e3,_10e7);}return _10e7;}};}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(_10e8,_10e9,name){var _10ea=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(),_10ea);}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(_10eb,_10ec){if(_10eb){var scope=_10eb.getMetaData("param.sharing.scope");if(scope){return scope;}var _10ed=_10ec.getParent(_10eb);if(_10ed){var _10ee=_10ed.start();if(_10ee){return this._getScope(_10ee,_10ec);}}}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(_10ef){},getAccessControlModel:function(_10f0){},getAccessControlModel:function(_10f1){},getAccessControlModel:function(_10f2,_10f3){},getAccessControlModel:function(_10f4,_10f5){}});}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(_10f6,xNode){var ret=null;var _10f7=_10f6.getID();var xID=xNode.getID();if(this._resourceSpaceACModels[_10f7]){ret=this._resourceSpaceACModels[_10f7][xID];}if(!ret){ret=new com.ibm.mm.enabler.ac.ResourceSpaceAccessControlModelImpl(_10f6,xNode);if(!this._resourceSpaceACModels[_10f7]){this._resourceSpaceACModels[_10f7]={};}this._resourceSpaceACModels[_10f7][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(_10f8){return new com.ibm.mm.enabler.ac.SpaceAccessControlModelImpl(_10f8);},_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 _10f9=arguments[0];xNode=arguments[1];if(!com.ibm.mm.enabler.utils.Misc.isInstanceOf(_10f9,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(_10f9,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(_10fa){}});}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(_10fb){var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.AC_URL,null);myUrl.setNodes([{value:_10fb,isID:true,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ACCESS}]);var _10fc=null;var _10fd=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,true);_10fd.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){_10fc=node;}}}));if(_10fc){var ret=new com.ibm.mm.enabler.ac.EffectiveAccessImpl();ret._init(_10fc);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(_10fe,_10ff){},setOperation:function(_1100,_1101){}});}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(_1102){this.context=_1102;this.roleCheck=null;},isAllowed:function(){this.context=this.context||null;if(this.context===null){return false;}if(!this.context.contentNode){return false;}var _1103=com.ibm.mashups.enabler.ac.AccessFactory.getEffectiveAccess(this.context.contentNode);_1103=_1103||null;if(_1103!==null&&_1103.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(_1104){this.context=_1104;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(_1105){this.context=_1105;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(_1106){this.context=_1106;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(_1107,mode){this.context=_1107;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 _1108=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1109=com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(_1108,this.context.id);return _1109.getWidgetMode();},_getCurrentPageID:function(){var _110a=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();return com.ibm.mashups.enabler.model.state.AccessorFactory.getPageAccessor(_110a).getPageID();},_getSupportModes:function(){var _110b=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _110c=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _110d=_110c.findWidgetWindow(this.context.id,this._getCurrentPageID(_110b)).start();var _110e=_110c.getWidgetDefinitionByWindow(_110d).start();return _110e.getSupportedModes();},_isSupportedMode:function(){var _110f=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1110=this._getSupportModes(_110f);var _1111=(dojo.indexOf(_1110,this.mode)>=0);if(_1111&&(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG)){var _1112=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1113=_1112.findWidgetWindow(this.context.id,this._getCurrentPageID(_110f)).start();var _1114=_1112.getWidgetInstance(_1113).start();if(_1114.isSandboxed()){_1111=false;}}return _1111;},_isModeSwitchable:function(){var _1115=com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel();var _1116=this._getCurrentMode(_1115);var _1117=[com.ibm.mm.iwidget.Constants.mode.EDIT,com.ibm.mm.iwidget.Constants.mode.PERSONALIZE,com.ibm.mm.iwidget.Constants.mode.CONFIG];return (dojo.indexOf(_1117,_1116)<0||dojo.indexOf(_1117,this.mode)<0);},isAllowed:function(){if(!this._isSupportedMode()){return false;}if(!this._isModeSwitchable()){return false;}var _1118=this.inherited(arguments);if(_1118){if(this.mode==com.ibm.mm.iwidget.Constants.mode.PERSONALIZE){var _1119=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _111a=_1119.getValue(com.ibm.mashups.enabler.services.ConfigConstants.WIDGET_PERSONALIZE_ENABLED);if(typeof _111a!="undefined"){if(!_111a){return false;}}var _111b=com.ibm.mashups.enabler.user.Factory.getUserModel().findCurrentUser().start();if(_111b&&_111b.isVirtual()){var _111c=_111b.getVirtualType();if(com.ibm.mashups.enabler.user.VirtualType.ANONYMOUS_USER==_111c){return false;}}}else{if(this.mode==com.ibm.mm.iwidget.Constants.mode.CONFIG){if(!ibmConfig["com.ibm.mm.internal.allowConfig"]){return false;}}}}return _1118;}});}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 _111d=com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl._instance;return _111d?_111d:(com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl._instance=new com.ibm.mm.enabler.ac.operation.AllowedOperationsModelImpl());},getOperation:function(_111e,_111f){return new com.ibm.mm.enabler.DeferredImpl(this,this._getOperation,{"operationName":_111e,"jsonContext":_111f});},_getOperation:function(dfr,sync,_1120){var _1121="_getOperation";var _1122=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1122){this.LOGGER.entering(_1121,arguments);}var _1123=_1120.operationName;var _1124=_1120.jsonContext;var _1125=null;if(_1123){var _1126=this.additionalOperations[_1123]||null;if(dojo.isFunction(_1126)){var _1127=function(_1128){_1125=_1128;dfr.finish(_1125,(_1125!==null)?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);};dojo.partial(_1126)(_1123,_1124,sync,_1127);if(_1122){this.LOGGER.exiting(_1121,[_1125]);}return _1125;}switch(_1123){case com.ibm.mashups.enabler.ac.operation.Constants.EDIT_PAGE_LAYOUT:_1125=new com.ibm.mm.enabler.ac.operation.EditPageLayoutOperationImpl(_1124);break;case com.ibm.mashups.enabler.ac.operation.Constants.EDIT_PAGE_PROPERTIES:_1125=new com.ibm.mm.enabler.ac.operation.EditPagePropertiesOperationImpl(_1124);break;case com.ibm.mashups.enabler.ac.operation.Constants.ASSIGN_PAGE_PERMISSIONS:_1125=new com.ibm.mm.enabler.ac.operation.AssignPagePermissionsOperationImpl(_1124);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_VIEW:_1125=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1124,com.ibm.mm.iwidget.Constants.mode.VIEW);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_PERSONALIZE:_1125=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1124,com.ibm.mm.iwidget.Constants.mode.PERSONALIZE);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_EDIT:_1125=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1124,com.ibm.mm.iwidget.Constants.mode.EDIT);break;case com.ibm.mashups.enabler.ac.operation.Constants.WIDGET_MODE_CONFIG:_1125=new com.ibm.mm.enabler.ac.operation.WidgetModeOperationImpl(_1124,com.ibm.mm.iwidget.Constants.mode.CONFIG);break;}}dfr.finish(_1125,(_1125!==null)?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);if(_1122){this.LOGGER.exiting(_1121,[_1125]);}return _1125;},setOperation:function(_1129,_112a){if(!_1129){return false;}if(!_112a){return false;}this.additionalOperations[_1129]=_112a;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",ALL_PORTAL_GROUP:"all portal 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(_112b,_112c){},findGroupByID:function(id){return new Deferred();},findGroupsByAttribute:function(_112d,_112e){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(_112f,_1130){this.allAuthID=_112f;this.allAuthIDEncoded=_1130;},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(_1131){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.AllPortalGroupImpl"]){dojo._hasResource["com.ibm.mm.enabler.user.AllPortalGroupImpl"]=true;dojo.provide("com.ibm.mm.enabler.user.AllPortalGroupImpl");dojo.declare("com.ibm.mm.enabler.user.AllPortalGroupImpl",[com.ibm.mm.enabler.user.EntityImpl],{constructor:function(_1132,_1133){this.allPortalID=_1132;this.allPortalIDEncoded=_1133;},getID:function(){return this.allPortalID;},getCN:function(){return "all portal users";},getDisplayName:function(){this.iwStr=dojo.i18n.getLocalization("com.ibm.mm.enabler","iwStr");return this.iwStr.ALL_PORTAL;},getEntityType:function(){return "group";},getAttribute:function(_1134){return null;},isVirtual:function(){return true;},getVirtualType:function(){return com.ibm.mashups.enabler.user.VirtualType.ALL_PORTAL_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(_1135,_1136){this.anonUserID=_1135;this.anonUserIDEncoded=_1136;},getAttribute:function(_1137){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 _1138=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var eps=_1138.getValue("ConfigProvider.Endpoints");this.anonUserID=_1138.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=_1138.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.allPortalID=_1138.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ALL_PORTAL_VIRTUAL_GROUP_ID);if((typeof this.allPortalID=="undefined")||(this.allPortalID===null)){this.allPortalID="all portal users";}this.anonEnabled=false;var _1139=_1138.getValue(com.ibm.mashups.enabler.services.ConfigConstants.ANON_MODE_ENABLED)||false;if(_1139===true||_1139=="true"||_1139=="on"||_1139=="TRUE"||_1139=="ON"){this.anonEnabled=true;}this.anonUserIDEncoded=encodeURIComponent(this.anonUserID);this.allAuthIDEncoded=encodeURIComponent(this.allAuthID);this.allPortalIDEncoded=encodeURIComponent(this.allPortalID);this.anonUser=null;this.allAuth=null;this.allPortal=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);this.allPortal=new com.ibm.mm.enabler.user.AllPortalGroupImpl(this.allPortalID,this.allPortalIDEncoded);},_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,this.allPortalID,this.allPortalIDEncoded,this.allPortal);}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,this.allPortalID,this.allPortalIDEncoded,this.allPortal);}return this._jsonModel;}return null;},_getInstance:function(){var _113a=com.ibm.mm.enabler.user.UserModelImpl._instance;return _113a?_113a:(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 _113b=[];_113b.push(this.allAuth);_113b.push(this.allPortal);return _113b;},find:function(uri){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync,id){var _113c="find";var _113d=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_113d){this.LOGGER.entering(_113c,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===this.allPortalID)||(id===this.allPortalIDEncoded)){this.entry=this.allPortal;if(dfr){dfr.finish(this.entry,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return this.allPortal;}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 _113e=null;var _113f=this._getXmlModel().find(id);_113f.setFinishedCallback(dojo.hitch(this,function(node,_1140){if(node){var _1141=new com.ibm.mm.enabler.user.UserImpl();_1141._setPersistence(node);_113e=this.loadedUsers[_1141.getID()]=_1141;}dfr.finish(_113e,_1140);}));_113f.start(sync);if(_113d){this.LOGGER.exiting(_113c);}return _113e;},uri);},getModifiableNode:function(node){return new com.ibm.mm.enabler.DeferredImpl(this,function(_1142,sync,node){var _1143="getModifiable";var _1144=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1144){this.LOGGER.entering(_1143,arguments);}var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);var _1145;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,_1146){if(node){if(this.currentUser){this.currentUser._setPersistence(node);this.loadedUsers[id]=this.currentUser;}else{var _1147=new com.ibm.mm.enabler.user.CurrentUserImpl();_1147._setPersistence(node);this.currentUser=_1147;this.loadedUsers[id]=_1147;}_1145=this.loadedUsers[id];}_1142.finish(_1145,_1146);}));dfr.start();}else{dfr=this._getXmlModel().find(id);dfr.setFinishedCallback(dojo.hitch(this,function(node,_1148){if(node){if(this.loadedUsers[id]){this.loadedUsers[id]._setPersistence(node);}else{var _1149=new com.ibm.mm.enabler.user.UserImpl();_1149._setPersistence(node);this.loadedUsers[id]=_1149;}_1145=this.loadedUsers[id];}_1142.finish(_1145,_1148);}));dfr.start();}if(_1142){_1142.finish(this.loadedUsers[id],com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}_1145=this.loadedUsers[id];}if(_1144){this.LOGGER.exiting(_1143,_1145);}return _1145;},node);},findUserAttributes:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(dfr,sync){var _114a="findUserAttributes";var _114b=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_114b){this.LOGGER.entering(_114a,arguments);}var _114c=null;var _114d=this._getPersistenceModel().findUserAttributes();_114d.setFinishedCallback(dojo.hitch(this,function(nodes,_114e){if(nodes){_114c=[];for(var i=0;i0;i--){var _1163=this._filters[p][i-1];try{_1162=_1163.fn.apply(_1163.scope||null,[data]);}catch(e){this.LOGGER.warning("_getType","Type mapping filter failed to execute; skipping. Reason: "+e.message);}if(_1162){break;}}return _1162||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,_1164,_1165,_1166){},create:function(_1167){},remove:function(_1168,_1169,_116a){},store:function(_116b,_116c,_116d){},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,_116e,_116f){},findBySelection:function(url,_1170,_1171,_1172){},create:function(_1173){}});}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,_1174,_1175){},findBySelection:function(url,_1176,_1177,_1178){},create:function(_1179){}});}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,_117a){},getStrategies:function(model){},getStrategy:function(model,_117b){},addStrategy:function(model,_117c){},removeStrategy:function(model,_117d){}});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,_117e){var _117f=this.map[model];if(_117f){_117f.setStrategy(_117e);}},getStrategies:function(model){var _1180=this.map[model];if(_1180){return _1180.getStrategies(strategy);}return null;},getStrategy:function(model,_1181){var _1182=this.map[model];if(_1182){return _1182.getStrategy(_1181);}return null;},addStrategy:function(model,_1183){var _1184=this.map[model];if(_1184){_1184.addStrategy(_1183);}},removeStrategy:function(model,_1185){var _1186=this.map[model];if(_1186){_1186.removeStrategy(_1185);}}});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(_1187){this.loadAheadCatalogCategoryModel=_1187;this.catalogCategoryModel=null;},isLoadAheadCatalogCategoryModel:function(){return this.loadAheadCatalogCategoryModel;},setCatalogCategoryModel:function(_1188){this.catalogCategoryModel=_1188||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(_1189,_118a,_118b){},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(_118c,_118d,_118e){this.loadAheadLayoutModel=!!_118c;this.loadAheadUser=!!_118e;this.userModel=null;var _118f=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.ConfigService.SERVICE_NAME);var _1190=_118f.getValue(com.ibm.mashups.enabler.services.ConfigConstants.PAGE_LOAD_OPTIMIZATION_THEME);if(_1190===true){this.loadAheadTheme=!!_118d;}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(_1191){this.userModel=_1191;},getUserModel:function(){if(!this.userModel){this.userModel=com.ibm.mashups.enabler.user.Factory.getUserModel();}return this.userModel;},_processLoadAhead:function(_1192,sync){if(!com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()){return;}var _1193=com.ibm.mashups.enabler.io.XHRMultipartFactory.create();_1193.startTransaction();if(this.loadAheadUser){var _1194=this.getUserModel();_1194.findCurrentUser().start();}this._initServiceDoc();for(var i=0;i<_1192.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,_1192[i].xmlData,this.ns);if(node){href=node.getAttribute("href");id=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,node);}var _1195=(id!==null)?id:_1192[i].getID();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(href,null);var _1196=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1196.read(dojo.hitch(this,function(type,data,xhr,args){if((type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD)&&(args.node)){var _1197=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:feed/atom:entry",data,this.ns);if(_1197){args.node._setFragmentData(_1197);}}}),{"node":_1192[i]});myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_MEDIA_URL,null);myUrl.setNodes([{value:_1195,isID:true},{value:"index.html",isID:false}]);_1196=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,true,sync);_1196.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":_1192[i]});}if(this.loadAheadTheme){var _1198=_1192[i].getThemeIdentifier().getID();if(_1198!==null){var _1199=com.ibm.mashups.enabler.theme.Factory.getThemeModel();_1199.find(_1198).start();}}}_1193.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 _119a=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:feed/atom:entry",data,this.ns);if(_119a){node._setFragmentData(_119a);}}}));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 _119b=com.ibm.mashups.enabler.theme.Factory.getThemeModel();_119b.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(_119c){this.windowMap=_119c;},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 _119d=[];com.ibm.mm.enabler.utils.Misc.forIn(this.data.metadata,function(value,name){_119d.push(name);},this);return _119d;},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(_119e){if(dojo.isString(_119e)){_119e=_119e.toUpperCase();}if(this.data.roles&&dojo.isArray(this.data.roles)){for(var i=0,l=this.data.roles.length;i0){for(var i=0;i<_122f.length;i++){var node=new com.ibm.mm.enabler.ac.MemberNodeImpl(this.roleID,_122f[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(_1230){if(!_1230){throw new Error("MemberModelImpl.create: no context");}if(!_1230.type){throw new Error("MemberModelImpl.create: no type context");}if(!_1230.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 _1231=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",this.ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_1231,time.toGMTString());entry.appendChild(_1231);var _1232=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_1232.setAttribute("type","application/xml");var _1233=com.ibm.mm.enabler.utils.Utils.createNode("ac:member",this.ns.ac);com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1233,"ac:id",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_1230.id);com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1233,"ac:type",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_1230.type);_1232.appendChild(_1233);entry.appendChild(_1232);var _1234=new com.ibm.mm.enabler.ac.MemberNodeImpl(this.roleID,entry,this.um);return _1234;},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(_1235,sync){var _1236=false;var next=this.accessControlModel.membersEntries[this.roleID][this.accessControlModel.membersCursor[this.roleID]];if(next!==null&&next!==undefined){_1236=true;}return _1236;},next:function(){return this._next(null,true);},_next:function(_1237,sync){var _1238=this._hasNext(_1237,sync);var _1239=this.accessControlModel.membersEntries[this.roleID];var _123a=this.accessControlModel.membersLoadedNodes[this.roleID];var ret=_1238?_123a[_1239[this.accessControlModel.membersCursor[this.roleID]]]:null;this.accessControlModel.membersCursor[this.roleID]++;return ret;},size:function(){return this.accessControlModel.membersSizeValue[this.roleID];},setCursorPosition:function(_123b){this.accessControlModel.membersCursor[this.roleID]=_123b;},getCursorPosition:function(){return this.accessControlModel.membersCursor[this.roleID];},insert:function(node,_123c){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this.accessControlModel.getRoleModel()._getRoles();}this.accessControlModel.membersCreatedNodes[this.roleID][node.getID()]=node;var _123d=this.accessControlModel.membersEntries[this.roleID].length;if((!_123d)||(_123d===0)){this.accessControlModel.membersEntries[this.roleID][0]=node.getID();this.accessControlModel.membersEntries[this.roleID][1]=null;}else{this.accessControlModel.membersEntries[this.roleID][_123d-1]=node.getID();this.accessControlModel.membersEntries[this.roleID][_123d]=null;}this.accessControlModel._cacheNodeMembers(this.roleID,node);},find:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,id);},_find:function(_123e,sync,id){if(id in this.accessControlModel.membersDeletedNodes[this.roleID]){if(_123e){_123e.finish(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return null;}if(id in this.accessControlModel.membersLoadedNodes[this.roleID]){if(_123e){_123e.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 _123f=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var entry=null;var _1240={};_1240.node=null;_123f.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 _1241=new com.ibm.mm.enabler.ac.MemberNodeImpl(nodes,this);this.accessControlModel.membersNewid[this.roleID]=_1241.getID();this.membersLoadedNodes[this.roleID][this.membersNewid[this.roleID]]=_1241;_1240.node=this.accessControlModel.membersLoadedNodes[this.roleID][this.membersNewid[this.roleID]];}else{if(sync){_1240.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(_123e){_123e.finish(_1240.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){_1240.status=xhr.status;}}}));if(_1240.status){throw new Error(dojo.string.substitute(this.modelMessages.E_COMNODE_NOTFOUND_1,[id,_1240.status]));}retVal=_1240.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(_1242){},getMemberModel:function(_1243){}});}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(_1244,_1245){this.accessControlModel=_1244;this.um=_1245;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(_1246){if(!_1246){throw new Error("RoleModelImpl.create: no context");}if(!_1246.roletype){throw new Error("RoleModelImpl.create: no roletype context");}var _1247=this.getCursorPosition();this.setCursorPosition(0);var _1248=this.iterator();while(_1248.hasNext()){var role=_1248.next();if(role.getRoleType()==_1246.roletype){if(_1247){this.setCursorPosition(_1247);}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 _1249=com.ibm.mm.enabler.utils.Utils.createNode("atom:updated",this.ns.atom);var time=new Date();com.ibm.mm.enabler.utils.Dom.textContent(_1249,time.toGMTString());entry.appendChild(_1249);var _124a=com.ibm.mm.enabler.utils.Utils.createNode("atom:content",this.ns.atom);_124a.setAttribute("type","application/xml");var _124b=com.ibm.mm.enabler.utils.Utils.createNode("ac:role",this.ns.ac);var _124c=this.accessControlModel._getCreationRoleName(_1246.roletype);if(!_124c){_124c=_1246.roletype;}com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_124b,"ac:type",this.nsf.getNameSpaceUri(this.nsf.NS_AC),_124c);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_124b,"creation-context:role-types","role-types",this.ns["creation-context"],_1246.roletype);var _124d=this.accessControlModel._getCreationResourceID();com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.xmlDom,_124b,"creation-context:resource-id","resource-id",this.ns["creation-context"],_124d);_124a.appendChild(_124b);entry.appendChild(_124a);var _124e=new com.ibm.mm.enabler.ac.RoleNodeImpl(entry,this.um,_1246.roletype);_124e.setID(""+(this.cid++));return _124e;},remove:function(role){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this._getRoles();}var _124f=role.getID();for(var i=this.accessControlModel.rolesEntries.length;i>0;i--){if(this.accessControlModel.rolesEntries[i]==_124f){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(_1250,sync){var _1251=false;var next=this.accessControlModel.rolesEntries[this.accessControlModel.rolesCursor];if(next!==null&&next!==undefined){_1251=true;}return _1251;},next:function(){return this._next(null,true);},_next:function(_1252,sync){var _1253=this._hasNext(_1252,sync);var _1254=this.accessControlModel.rolesEntries;var _1255=this.accessControlModel.rolesLoadedNodes;var ret=_1253?_1255[_1254[this.accessControlModel.rolesCursor]]:null;this.accessControlModel.rolesCursor++;return ret;},size:function(){return this.accessControlModel.rolesSizeValue;},setCursorPosition:function(_1256){this.accessControlModel.rolesCursor=_1256;},getCursorPosition:function(){return this.accessControlModel.rolesCursor;},insert:function(node,_1257){if(!this.accessControlModel.changedProperties.role){this.accessControlModel.changedProperties.role=this._getRoles();}this.accessControlModel.rolesCreatedNodes[node.getID()]=node;var _1258=this.accessControlModel.rolesEntries.length;if((!_1258)||(_1258===0)){this.accessControlModel.rolesEntries[0]=node.getID();this.accessControlModel.rolesEntries[1]=null;}else{this.accessControlModel.rolesEntries[_1258-1]=node.getID();this.accessControlModel.rolesEntries[_1258]=null;}this.accessControlModel._cacheNodeRoles(node);},_getRoles:function(){var roles={};this.setCursorPosition(0);var _1259=this.iterator();while(_1259.hasNext()){var role=_1259.next();var _125a=role.getID();roles[_125a]=_125a;}return roles;},find:function(id){return new com.ibm.mm.enabler.DeferredImpl(this,this._find,id);},_find:function(_125b,sync,id){if(id in this.accessControlModel.rolesLoadedNodes){if(_125b){_125b.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(_125b){_125b.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 _125c=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);var entry=null;var _125d={};_125d.node=null;_125c.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 _125e=new com.ibm.mm.enabler.ac.RoleNodeImpl(node,this);this.accessControlModel.rolesNewid=_125e.getID();this.rolesLoadedNodes[this.rolesNewid]=_125e;_125d.node=this.accessControlModel.rolesLoadedNodes[this.rolesNewid];}else{if(sync){_125d.status=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;}}}if(_125b){_125b.finish(_125d.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){_125d.status=xhr.status;}}}));if(_125d.status){throw new Error(dojo.string.substitute(this.modelMessages.E_COMNODE_NOTFOUND_1,[id,_125d.status]));}retVal=_125d.node;return retVal;},getMemberModel:function(_125f){if(!_125f){return null;}var id=_125f.getID();if(!id){return null;}if(this.accessControlModel.memberModel){if(this.accessControlModel.memberModel[id]){return this.accessControlModel.memberModel[id];}}this.accessControlModel._loadAheadMember(_125f,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(_1260){},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 _1261=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(_1261.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(_1262){var _1263=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_RESOURCE_ATOM_LINK,_1262,this.ns_acrlp);if(node){_1263=node.getAttribute("href");}return _1263;},getACRolesLink:function(_1264){var _1265=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_ROLES_ATOM_LINK,_1264,this.ns_acrlp);if(node){_1265=node.getAttribute("href");}return _1265;},getCARolesLink:function(_1266){var _1267=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.CA_ROLES_ATOM_LINK,_1266,this.ns_acrlp);if(node){_1267=node.getAttribute("href");}return _1267;},getACMembersLink:function(_1268){var _1269=null;var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.AC_MEMBERS_ATOM_LINK,_1268,this.ns_acrlp);if(node){_1269=node.getAttribute("href");}return _1269;}});}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(_126a){this.mainResource=_126a;this.url=com.ibm.mashups.enabler.model.url.ModelUrlFactory.AI_URL;},_init:function(){this.initialContentsMembers=null;this.rolesLoadedNodes={};this.rolesCreatedNodes={};this.rolesDeletedNodes={};var _126b;this.roleModel=_126b;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(_126c){return null;},_getCreationRoleName:function(_126d){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(_126e){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(_126f,sync){var myUrl;var _1270;this.rolesEntries=[];this.rolesStart=0;this.rolesCursor=0;var _1271=this._getPossibleRoles();if((this._isPageInSpace())&&(_1271)){var i=0;for(var _1272 in _1271){if(Object.prototype.hasOwnProperty.call(_1271,_1272)){var _1273=_1271[_1272];myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(this.url,this);_1270=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_1270);myUrl.setParameter("filter","type="+_1273);this.__loadAheadRole(myUrl,_126f,sync,i,_1272);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);_1270=[{value:"collection",isID:false,subModel:com.ibm.mashups.enabler.model.url.ModelUrlFactory.SUBMODEL_ROLE},{value:this.mainResource.getID(),isID:true}];myUrl.setNodes(_1270);}}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,_126f,sync,null);}},__loadAheadRole:function(myUrl,_1274,sync,_1275,_1276){var _1277=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1275=_1275||null;_1277.read(dojo.hitch(this,function(type,data,xhr,args){if(type==com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD){var expr,nodes;if(_1275===null){if(!this.rolesSizeValue){expr="atom:feed/openSearch:totalResults";var _1278=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,data,this.ns);if(_1278){this.rolesSizeValue=com.ibm.mm.enabler.utils.Dom.textContent(_1278);}}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(_1275===null){for(i=0,c=0,l=nodes.length;i0){for(var i=0,l=nodes.length;i0){for(var i=0,l=_1295.length;i0);},_getRolesLink:function(){return this.getCARolesLink(this.mainResource.getXml());},_getMembersLink:function(_12d6){return this.getACMembersLink(_12d6);},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(_12d7,sync){var e=com.ibm.mashups.enabler;if((typeof e.space!="undefined")&&(typeof e.space.Factory!="undefined")){var _12d8=e.space.Factory.getSpaceModel();_12d8.commit().start();}this.__commit(_12d7,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(_12d9,_12da){this.mainResource=_12d9;this.subResource=_12da;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(_12db){return _12db+"@"+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;i0){this._deferreds.forEach(function(_12e9){_12e9.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","
\n ${childrenMarkup}\n
\n"))},getRuntimeContent:function(){return new com.ibm.mm.enabler.content.RuntimeContentImpl(this,this._getRuntimeMarkup);},_templateFunc:function(_12ea,sync,_12eb){var ret=null;var _12ec=this.getMetaData("css-classes");var cName=this.getMetaData("com.ibm.portal.layoutnode.localname");ret=dojo.string.substitute(this._templates.baseMarkup,{containerClass:_12ec||"",containerId:com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this),containerName:cName||"",childrenMarkup:_12eb||""});if(_12ea){_12ea.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return ret;},_getRuntimeMarkup:function(_12ed,sync){var chain=new com.ibm.mm.enabler.DeferredSet();if(this._getLayoutModel().hasChildren(this)){var _12ee=this._getLayoutModel().getChildren(this);while(_12ee.hasNext()){var child=_12ee.next();var _12ef=child.getRuntimeContent().getRuntimeMarkup();chain.addDeferred(_12ef);}}var ret=null;chain.setFinishedCallback(dojo.hitch(this,function(_12f0,_12f1,args){var _12f2=args.origDf;if(_12f1==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var _12f3=[];_12f0.forEach(function(item,idx,arr){this.push(item.result);},_12f3);ret=this._templateFunc(_12f2,sync,_12f3.join("\n"));}else{if(_12f2){_12f2.finish(null,_12f1);}}return ret;}),{origDf:_12ed});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 _12f4=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(_12f4.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 _12f5=[];com.ibm.mm.enabler.utils.Misc.forIn(this._cache.titles,function(title,loc){_12f5.push(loc);});return _12f5;},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 _12f6={};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){_12f6[l]=title;}});}else{_12f6=dojo.clone(this._cache.titles);}return _12f6;},getDescription:function(loc){this.enforcementHelper.enforceDefinedNotNull(loc,this.modelMessages.E_PARAM_ISNULL_OR_UNDEFINED_3,["locale",this.declaredClass,"getDescription(locale)"]);this._readLocales();var _12f7=this._cache.descriptions[this._normalizeLocale(loc)];return (typeof _12f7=="undefined")?null:_12f7;},getDescriptions:function(loc){this._readLocales();var _12f8={};if(loc){var nLoc=this._normalizeLocale(loc);com.ibm.mm.enabler.utils.Misc.forIn(this._cache.descriptions,function(_12f9,l){if(l.indexOf(nLoc)===0){_12f8[l]=_12f9;}});}else{_12f8=dojo.clone(this._cache.descriptions);}return _12f8;},_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 _12fa=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_12fa){for(var i=_12fa.length;i>0;i--){var title=_12fa[i-1];this._cache.titles[this._normalizeLocale(this._getLang(title))]=com.ibm.mm.enabler.utils.Dom.textContent(title);}}var _12fb=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_12fb){for(var j=_12fb.length;j>0;j--){var _12fc=_12fb[j-1];this._cache.descriptions[this._normalizeLocale(this._getLang(_12fc))]=com.ibm.mm.enabler.utils.Dom.textContent(_12fc);}}}},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 _12fd=com.ibm.mashups.enabler.xml.XPath.createXPath(this.TITLE_ELEMENT,this.xmlData,this.li_ns);var _12fe=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_NLS_TITLE_STRING,_12fd,this.li_ns);var nLoc=this._normalizeLocale(loc);var _12ff=false;var i=_12fe.length;while(--i>=0){var t=_12fe[i];var lang=this._getLang(t);if(lang!==null&&this._normalizeLocale(lang)==nLoc){com.ibm.mm.enabler.utils.Dom.textContent(t,title);_12ff=true;break;}}if(!_12ff){var _1300=this.xmlData.ownerDocument;var node=com.ibm.mm.enabler.utils.Dom.createElement(_1300,this.BASE_NLS_TITLE_STRING,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_1300,node,"xml:lang","lang",this.li_ns.xml,loc);com.ibm.mm.enabler.utils.Dom.textContent(node,title);_12fd.appendChild(node);}this._cache.titles[nLoc]=title;this._setDirty();}},confirmSetTitle:function(title,_1301){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 _1302=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_1302&&_1302.length>0){var nLoc=this._normalizeLocale(loc);for(var i=_1302.length;i>0;i--){var title=_1302[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 _1303=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.TITLE,this.xmlData,this.li_ns);if(_1303&&_1303.length>0){for(var i=_1303.length;i>0;i--){var _1304=_1303[i-1].parentNode;_1304.removeChild(_1303[i-1]);}this._cache.titles={};this._setDirty();}},confirmRemoveTitles:function(){return this.hasRole(com.ibm.mashups.enabler.ac.RoleType.EDITOR);},setDescription:function(_1305,loc){this.enforcementHelper.enforceDefinedNotNull(_1305,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(_1305)&&loc){if(this.getDescription(loc)==_1305){return;}var _1306=com.ibm.mashups.enabler.xml.XPath.createXPath(this.DESCRIPTION_ELEMENT,this.xmlData,this.li_ns);var _1307=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_NLS_DESCRIPTION_STRING,_1306,this.li_ns);var nLoc=this._normalizeLocale(loc);var _1308=false;var i=_1307.length;while(--i>=0){var desc=_1307[i];var lang=this._getLang(desc);if(lang!==null&&this._normalizeLocale(lang)==nLoc){com.ibm.mm.enabler.utils.Dom.textContent(desc,_1305);_1308=true;break;}}if(!_1308){var _1309=this.xmlData.ownerDocument;var node=com.ibm.mm.enabler.utils.Dom.createElement(_1309,this.BASE_NLS_DESCRIPTION_STRING,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_1309,node,"xml:lang","lang",this.li_ns.xml,loc);com.ibm.mm.enabler.utils.Dom.textContent(node,_1305);_1306.appendChild(node);}this._cache.descriptions[nLoc]=_1305;this._setDirty();}},confirmSetDescription:function(title,_130a){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 _130b=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_130b&&_130b.length>0){var _130c=this._normalizeLocale(loc);for(var i=_130b.length;i>0;i--){var desc=_130b[i-1];var lang=this._getLang(desc);if(lang!==null&&this._normalizeLocale(lang)==_130c){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 _130d=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.DESCRIPTION,this.xmlData,this.li_ns);if(_130d&&_130d.length>0){for(var i=_130d.length;i>0;i--){dojo.destroy(_130d[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","
\n \n ${eventDescriptions}\n ${events}\n ${itemSets}\n ${receivedEvents}\n
\n"),valueFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ValueFragment.html","${val}\n"),eventDescFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/EventDescriptionFragment.html"," \n ${payloadType}\n \n ${descriptions}\n \n \n ${titles}\n \n \n"),mappedNameFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/MappedNameFragment.html","${value}\n"),eventFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/EventFragment.html","\n \n ${mappedName}\n\n"),itemSetFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ItemSetFragment.html","\n ${items}\n\n"),receivedEventFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ReceivedEventFragment.html","\n ${sourceEventName}\n ${targetEventName}\n\n"),itemSetItemFragment:dojo.cache("com.ibm.mm.enabler.layout.widget","templates/ItemSetItemFragment.html","${itemValue}\n"),gadgetFragment:dojo.cache("com.ibm.mm.enabler.layout.gadget","templates/GadgetFragment.html","
\n \n ${itemSets}\n
\n"),baseMarkup:dojo.string.trim(dojo.cache("com.ibm.mm.enabler.layout","templates/LayoutControlFragment.html","
\n ${skinMarkup}\n
\n"))},constructor:function(){var _130e=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.ns=dojo.delegate(_130e.namespaces,com.ibm.mm.enabler.model.NameSpaceFactory.getNameSpaces([com.ibm.mm.enabler.model.NameSpaceFactory.NS_ATOM]));this.id_prefix=_130e.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(_130f){this._displayTitle=_130f;},_getWidgetFragment:function(_1310,_1311,_1312,_1313,_1314,_1315,_1316){return dojo.string.substitute(this._templates.widgetFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,instanceID:com.ibm.mm.iwidget.Utils.getMarkupID(_1310.getID()),sandboxEnabled:!!_1312,widgetDefinitionURI:_1311||"",eventDescriptions:_1313||"",events:_1314||"",itemSets:_1315||"",receivedEvents:_1316||""});},_getValueFragment:function(_1317,value){var ret=dojo.string.substitute(this._templates.valueFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,loc:_1317||"",val:value||""});return ret;},_getEventDescriptionFragment:function(_1318,_1319,_131a,_131b){return dojo.string.substitute(this._templates.eventDescFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,eventDescName:_1318||"",payloadType:_1319||"",descriptions:_131a||"",titles:_131b||""});},_eventDescSuffix:"_desc",_getEventDescriptions:function(_131c){var _131d={};return dojo.map(_131c.getEvents(_131d)||[],function(event){var _131e=[];var _131f=[];dojo.forEach(event.getLocales()||[],function(_1320){_131e.push(this._getValueFragment(_1320,event.getTitle(_1320)));_131f.push(this._getValueFragment(_1320,event.getDescription(_1320)));},this);return this._getEventDescriptionFragment(event.getName()+this._eventDescSuffix,event.getPayloadType(),_131f.join("\n"),_131e.join("\n"));},this);},_getMappedNameFragment:function(_1321){var ret="";dojo.forEach(_1321,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,_1322){var _1323=[];var _1324=[];if(event.isPublished()){_1324.push(com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwPublished);}if(event.isHandled()){_1324.push(com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwHandled);}if(_1322){var _1325=_1322.getPublicEvent(event.getName());if(_1325){if(_1325.handlingFn){if(!dojo.isFunction(_1325.handlingFn)){_1323.push({name:"iw-Handler",value:_1325.handlingFn});}}if(_1325.getOnRemoveWire()){_1323.push({name:"iw-Remove-Wire",value:_1325.getOnRemoveWire()});}if(_1325.getOnNewWire()){_1323.push({name:"iw-New-Wire",value:_1325.getOnNewWire()});}}}var _1326=event.getName();return dojo.string.substitute(this._templates.eventFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,additionalClasses:_1324.join(" "),eventName:_1326,eventDescName:_1326+this._eventDescSuffix,mappedName:this._getMappedNameFragment(_1323)||""});},_getEvents:function(_1327,_1328){var _1329={};return dojo.map(_1327.getEvents(_1329)||[],function(item){return this._getEventFragment(item,_1328);},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(_132a){return dojo.map(this._getLayoutModel().getWireModel().findByTargetWidget(_132a).start(),function(wire){return this._getReceivedEventFragment(wire);},this);},_getItemSetItemFragment:function(name,_132b,_132c){return dojo.string.substitute(this._templates.itemSetItemFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,readOnly:_132c?" "+com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE.iwReadOnly:"",itemName:name||"",itemValue:(dojo.isArray(_132b)&&_132b.length===1)?dojox.html.entities.encode(_132b[0]):dojo.toJson(_132b)||""});},_getItemSetFragment:function(_132d){var items=dojo.map(_132d.getNames()||[],function(name){return this._getItemSetItemFragment(name,_132d.getValues(name),_132d.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(_132e,sync){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _132f=wm.getWidgetWindow(this);_132f.setFinishedCallback(dojo.hitch(this,function(_1330,_1331,args){var _1332=args.deferred;var sync=args.sync;var wm=args.wm;var ret=null;if(_1331==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK&&_1330){var _1333=new com.ibm.mm.enabler.DeferredSetImpl();_1333.addDeferred(wm.getHierarchicalPreferences(_1330));_1333.setFinishedCallback(dojo.hitch(this,function(_1334,_1335,args){var _1336=args.deferred;var _1337=args.wWindow;var wm=args.wm;var ret=null;if(_1335==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var prefs=_1334.item(0).result;var _1338=wm.getWidgetInstance(_1337).start(true);var _1339=_1338;var _133a=com.ibm.mashups.iwidget.model.Factory.getGlobalWidgetModel();var _133b=_133a.find(_1337.getID());var _133c=this._getEventDescriptions(_1339);var _133d=this._getEvents(_1339,_133b);var _133e=this._getItemSetFragment(prefs);var _133f=this._getReceivedEvents(_1337);var _1340=wm.getWidgetDefinitionByWindow(_1337).start(true);ret=this._getWidgetFragment(_1337,_1340.getURL(),_1340._isSandboxed()||_1338.isSandboxed(),_133c.join("\n"),_133d.join("\n"),_133e,_133f.join("\n"));}if(_1336){_1336.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}),{deferred:_1332,wWindow:_1330,wm:wm});ret=_1333.start(sync);}else{if(_1332){_1332.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}return ret;}),{deferred:_132e,sync:sync,wm:wm});var ret=_132f.start(sync);return ret;});},_getOpenSocialGadgetBody:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_1341,sync){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1342=wm.getWidgetWindow(this);_1342.setFinishedCallback(dojo.hitch(this,function(_1343,_1344,args){var _1345=args.deferred;var sync=args.sync;var wm=args.wm;var ret=null;com.ibm.mm.enabler.opensocial.OpenSocial.removeGadgetInstance(_1343.getID());if(_1344==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK&&_1343){var _1346=new com.ibm.mm.enabler.DeferredSetImpl();_1346.addDeferred(wm.getHierarchicalPreferences(_1343));_1346.setFinishedCallback(dojo.hitch(this,function(_1347,_1348,args){var _1349=args.deferred;var _134a=args.wWindow;var wm=args.wm;var ret=null;if(_1348==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var prefs=_1347.item(0).result;var _134b=this._getItemSetFragment(prefs);var _134c=wm.getWidgetInstance(_134a).start(true);var _134d=wm.getWidgetDefinitionByWindow(_134a).start(true);ret=this._getGadgetFragment(_134a,_134d.getURL(),_134b);}if(_1349){_1349.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}),{deferred:_1345,wWindow:_1343,wm:wm});ret=_1346.start(sync);}else{if(_1345){_1345.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}}return ret;}),{deferred:_1341,sync:sync,wm:wm});var ret=_1342.start(sync);return ret;});},_getGadgetFragment:function(_134e,_134f,_1350){return dojo.string.substitute(this._templates.gadgetFragment,{css:com.ibm.mm.iwidget.Constants.CSSCLASS_PREFIXED_INSTANCE,instanceID:com.ibm.mm.iwidget.Utils.getMarkupID(_134e.getID()),gadgetDefinitionURI:_134f||"",itemSets:_1350||""});},_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(_1351,sync){var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _1352=wm.getWidgetWindow(this);_1352.setFinishedCallback(dojo.hitch(this,function(_1353,_1354,args){var _1355=args.deferred;var sync=args.sync;var ret=null;if(_1354==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK&&_1353){ret=this._getWidgetFragment(_1353,this._getGenericWidgetURI());}if(_1355){_1355.finish(ret,ret?com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK:com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND);}return ret;}),{deferred:_1351,sync:sync});var ret=_1352.start(sync);return ret;});},replaceControl:function(_1356,_1357){return _1356.replace(com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_CONTROL,_1357);},replaceTitle:function(_1358,title){return _1358.replace(com.ibm.mm.enabler.layout.LayoutControlImpl.REGEX_TITLE,title);},_templateFunc:function(_1359,sync,_135a){var _135b=false;var _135c=false;if(_1359.context){var _135d=null;var wm=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();var _135e=wm.getWidgetWindow(_1359.context).start();_135d=wm.getWidgetDefinitionByWindow(_135e).start(true);if(_135d&&dojo.isFunction(_135d.getType)&&_135d.getType()){_135b=(_135d.getType()==com.ibm.mm.iwidget.Constants.OSGADGET_DEFINITION_TYPE);}if(com.ibm.mashups.enabler.services.IdentificationService.isServerID(_135e.getID())){_135c=true;}}var def;if(dojo.isString(_135a)&&!this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NON_PREVIEWABLE_WIDGET_LOCATION)&&!_135b){def=this._getWidgetBody();}else{if(_135b&&_135c){def=this._getOpenSocialGadgetBody();}else{def=this._getGenericWidgetBody();}}def.setFinishedCallback(dojo.hitch(this,function(_135f,_1360,args){var _1361=args.skinData;var _1362=args.deferred;var ret=null;if(dojo.isString(_1361)&&!this.configService.getValue(com.ibm.mashups.enabler.services.ConfigConstants.NON_PREVIEWABLE_WIDGET_LOCATION)){_1361=this.replaceControl(_1361,_135f);var _1363=com.ibm.mashups.enabler.context.Factory.getLocalizedContext();var title=_1363.getTitle(this);if((title===null)||(typeof title=="undefined")){if(_135d!==null){title=_1363.getTitle(_135d);}if((title===null)||(typeof title=="undefined")){title="";}}_1361=this.replaceTitle(_1361,title);}else{_1361=_135f;}ret=dojo.string.substitute(this._templates.baseMarkup,{controlId:com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(this),cssStyle:this.getMetaData("css-style")||"",skinMarkup:_1361});if(_1362){_1362.finish(ret,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK);}return ret;}),{deferred:_1359,skinData:_135a});return def;},getRuntimeContent:function(){return new com.ibm.mm.enabler.content.RuntimeContentImpl(this,function(_1364,sync){var self=this;var skin=this.getSkin();var _1365=null;if(skin){var _1366=com.ibm.mashups.enabler.model.staticSkin.Factory.getStaticSkinModel();var rawID=this.getSkin()._getRawID();var _1367=rawID.substring(1+rawID.lastIndexOf(":"));var _1368=_1366.find(skin,_1367);_1368.setFinishedCallback(function(_1369,_136a,_136b){var ret=null;var _136c=com.ibm.mm.enabler.services.ModelRestServiceRequest.XHR_STATUS_LOAD;var _136d=com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND;if(_136a==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){var _136e=_1369._getMediaURL();if(_136e){if(_136e in self._cachedSkinData){if(_136c in self._cachedSkinData[_136e]){ret=self._templateFunc(_136b,sync,self._cachedSkinData[_136e][_136c]).start(sync);}else{if(_136b){_136b.finish(null,_136d);}}}else{var req=new com.ibm.mm.enabler.services.ModelRestServiceRequest(new com.ibm.mm.enabler.utils.HttpUrl(_136e),null,null,true,sync);req.read(function(_136f,_1370,xhr,_1371){self._cachedSkinData[_136e]={};self._cachedSkinData[_136e][_136f]=_1370;if(_136f==_136c){ret=self._templateFunc(_1371,sync,_1370).start(sync);}else{if(_1371){_1371.finish(null,_136d);}}},_136b);}}else{ret=self._templateFunc(_136b,sync,null).start(sync);}}else{if(_136b){_136b.finish(null,_136d);}}return ret;},_1364);_1365=_1368.start(sync);}else{_1365=this._templateFunc(_1364,sync,null).start(sync);}return _1365;});},setMetaData:function(name,value){var _1372=this.inherited(arguments);dojo.publish(com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_SET,[this,name,_1372,value]);this._setDirty();return _1372;},removeMetaData:function(name){var _1373=this.inherited(arguments);dojo.publish(com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_METADATA_REMOVE,[this,name,_1373,null]);this._setDirty();return _1373;},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 _1374;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{_1374=this.getSkin().getID();}var newId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(id);if(newId!=_1374){var _1375=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(com.ibm.mashups.enabler.model.url.ModelUrlFactory.THEME_URL,this.layoutModel);_1375.setNodes([{value:newId,isID:true},{value:this.layoutModel._getNavigationNode().getThemeIdentifier().getID(),isID:true}]);node.setAttribute("href",_1375.getAbsoluteURL());com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(this.getXml().ownerDocument,node,"ext:uri","uri",this.ns.ext,_1375.getModelURI());this._setDirty();if(this._skins.containsKey(_1374)){var it=this._skins.item(_1374);this._skins.remove(_1374);it.setID(_1375.getModelURI());this._skins.add(newId,it);}dojo.publish(com.ibm.mm.enabler.layout.LayoutControlImpl.TOPIC_SKIN_SET,[this,null,_1374||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 _1376={};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){_1376[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_ID]=new com.ibm.mm.enabler.IdentifierImpl(id);_1376[com.ibm.mashups.enabler.layout.Constants.CONTEXT_TYPE]=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL;return _1376;}var url=this._getWidgetDefinitionURL();if(url){_1376[com.ibm.mashups.enabler.layout.Constants.CONTEXT_WIDGET_DEFINITION_URL]=url;_1376[com.ibm.mashups.enabler.layout.Constants.CONTEXT_TYPE]=com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL;return _1376;}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(_1377){},confirmSetFragment:function(_1378){}});}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,_1379){this.xmlData=node;this.wireModel=_1379;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(_137a){var expr="atom:link[@ext:rel='"+_137a+"']";var node=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.wireModel.ns);return node||null;},_getIdentifier:function(_137b){var _137c=null;var node=this._getNode(_137b);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){_137c=new com.ibm.mm.enabler.IdentifierImpl(id,uri);}}return _137c;},_setIdentifier:function(_137d,value){var node=this._getNode(_137d);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,_137e){var oldID=this._getIdentifier(name);var newID=this.idService.resolveID(oldID);var _137f=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_137e,this.wireModel);_137f.setNodes([{value:newID,isID:true}]);var _1380=dojo.string.trim(_137f.getModelURI());this._setIdentifier(name,_1380);},_getName:function(_1381){var node=this._getNode(_1381);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 _1382="sourcePortletWindow";return this._getIdentifier(_1382);},getSourceEvent:function(){var _1383="communicationSource";return this._getIdentifier(_1383);},getSourceEventName:function(){var _1384="communicationSource";return this._getName(_1384);},getSourcePage:function(){var _1385="sourcePage";return this._getIdentifier(_1385);},getTargetWidget:function(){var _1386="targetPortletWindow";return this._getIdentifier(_1386);},getTargetEvent:function(){var _1387="communicationTarget";return this._getIdentifier(_1387);},getTargetEventName:function(){var _1388="communicationTarget";return this._getName(_1388);},getTargetPage:function(){var _1389="targetPage";return this._getIdentifier(_1389);},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(_138a){},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,_138b){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=_138b;var _138c=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.entryUrl=_138c.url;this.prefix=_138c.idprefix;var nsf=com.ibm.mm.enabler.model.NameSpaceFactory;this.ns=dojo.delegate(_138c.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 _138d=function(){var _138e="WireModel.dirtyHandler()";var _138f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_138f){this.LOGGER.trace(_138e,"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(_138d);};this.addDirtyCallback(this,dojo.hitch(this,_138d));},_setWireModelDirty:function(){this._setDirty();},create:function(_1390){if(this._isEmpty(_1390)||this._isEmpty(_1390.sourceWidgetId)||this._isEmpty(_1390.sourcePageId)||this._isEmpty(_1390.sourcePageId)||this._isEmpty(_1390.sourceEventId)||this._isEmpty(_1390.targetWidgetId)||this._isEmpty(_1390.targetPageId)||this._isEmpty(_1390.targetEventId)){throw new Error(this.modelMessages.E_INVALID_CONTEXT_SPECIFIED_0);}var _1391=com.ibm.mm.enabler.utils.Atom.createEntry("New Wire","model:wire",this.ns.model);var entry=_1391.entryElement;com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(_1391.idElement,"ext:uniquename",this.ns.ext,"wire.orderDetails.orderId");com.ibm.mm.enabler.utils.Dom.textContent(_1391.idElement,"cid:"+this._cidCounter++);var _1392=com.ibm.mm.enabler.utils.Utils.createNode("model:isimmediateswitch",this.ns.model);_1392.setAttribute("value","false");_1391.modelElement.appendChild(_1392);var _1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL;var _1394=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1393,this);_1394.setNodes([{value:dojo.string.trim(_1390.sourcePageId.getID()),isID:true}]);var _1395=dojo.string.trim(_1394.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,_1395);entry.appendChild(link);_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL;_1394=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1393,this);_1394.setNodes([{value:dojo.string.trim(_1390.sourceWidgetId.getID()),isID:true}]);_1395=dojo.string.trim(_1394.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,_1395);entry.appendChild(link);_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.FRAGMENT_URL;_1394=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1393,this);_1394.setNodes([{value:dojo.string.trim(_1390.targetPageId.getID()),isID:true}]);_1395=dojo.string.trim(_1394.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,_1395);entry.appendChild(link);_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.WIDGET_URL;_1394=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1393,this);_1394.setNodes([{value:dojo.string.trim(_1390.targetWidgetId.getID()),isID:true}]);_1395=dojo.string.trim(_1394.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,_1395);entry.appendChild(link);_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL;_1394=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1393,this);_1394.setNodes([{value:dojo.string.trim(_1390.sourceEventId.getID()),isID:true}]);_1395=dojo.string.trim(_1394.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,_1395);if(_1390.sourceEventId.getName){var _1396=_1390.sourceEventId.getName();com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"model:internalName",this.ns.model,_1396);}entry.appendChild(link);_1393=com.ibm.mashups.enabler.model.url.ModelUrlFactory.EVENT_URL;_1394=com.ibm.mashups.enabler.model.url.ModelUrlFactory.createModelURL(_1393,this);_1394.setNodes([{value:dojo.string.trim(_1390.targetEventId.getID()),isID:true}]);_1395=dojo.string.trim(_1394.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,_1395);if(_1390.targetEventId.getName){var _1397=_1390.targetEventId.getName();com.ibm.mm.enabler.utils.Utils.setAttributeWithNS(link,"model:internalName",this.ns.model,_1397);}entry.appendChild(link);ret=new com.ibm.mm.enabler.wire.WireImpl(entry,this);return ret;},confirmCreate:function(_1398){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,_1399){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,_139a,_139b){if(this._isEmpty(node)){throw new Error(this.modelMessages.E_NODE_ISNULL_0);}if(this._isEmpty(_139a)){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;ds0){for(var i=0,l=_13a0.length;i0||this._deletedNodes.count>0){return true;}return false;},_commit:function(_13a6,sync,_13a7){var _13a8=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _13a9=_13a8.create();_13a9.startTransaction(_13a8.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 _13aa=node.getEditLink();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_13aa,this);var _13ab=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);node._updateEventIDs();_13a7._acquire();_13ab.update(node.toString(),dojo.hitch(this,function(type,data,xhr,args){var id=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(args.node);var _13ac=args.deferred;if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){this._replaceNodeXmlFromFeed(args.node,data);}var _13ad;if(_13ac){_13ac.finishOperation(id,com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status);}_13a7._release(_13a6,xhr.status);}),{node:node,deferred:_13a6});}},this);this._insertedNodes.forEach(function(entry){var node=entry.valueOf();node._updateEventIDs();var _13ae=this._layoutModel.find(node.getSourceWidget().getID()).start();var _13af=this._layoutModel.find(node.getTargetWidget().getID()).start();if((!_13ae)||(!_13af)){return;}var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(this.href,this);var _13b0=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_13a7._acquire();_13b0.create(node.toString(),dojo.hitch(this,function(type,data,xhr,args){var _13b1=args.deferred;if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_CREATED){this._replaceNodeXmlFromFeed(node,data);}if(_13b1){_13b1.finishOperation(node,com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}_13a7._release(_13b1,xhr.status);}),{node:node,deferred:_13a6});},this);_13a9.endTransactionDeferred().start();this._insertedNodes.clear();this._deletedNodes.forEach(function(entry){var node=entry.valueOf();var _13b2=node.getEditLink();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(_13b2,this);node._updateEventIDs();var _13b3=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_13a7._acquire();_13b3.remove(dojo.hitch(this,function(type,data,xhr,_13b4){var _13b5;if(_13b4){_13b4.finishOperation(node.getID(),com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status);}_13a7._release(_13b4,xhr.status);}),_13a6);},this);this._deletedNodes.clear();},hasNext:function(){return this.size().start(true)>this._cursor;},next:function(){var ret=null;if(this.hasNext()){var _13b6=this._cursor++;var id=this._ids[_13b6];ret=this._nodes.item(id).valueOf()||null;if(ret){var _13b7=this.getForeachCallback();if(_13b7){_13b7(ret,this.getForeachCallbackParameters());}}}return ret;},size:function(){return new com.ibm.mm.enabler.DeferredImpl(this,function(_13b8,sync){if(!this._data){this._getData();}var size=this._nodes.count;var _13b9=_13b8.getFinishedCallback();if(_13b9){_13b9(size,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_13b8.getFinishedCallbackParameters());}return size;});},setCursorPosition:function(_13ba){if(_13ba<0){throw new Error(this.modelMessages.E_PARAM_IS_SMALLER_ZERO_0);}this._cursor=_13ba||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(_13bb,sync,id){var _13bc=_13bb.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&&_13bc){_13bc(wires,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_13bb.getFinishedCallbackParameters());}else{if(_13bc){_13bc(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND,_13bb.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(_13bd,sync,id){var _13be=_13bd.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&&_13be){_13be(wires,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK,_13bd.getFinishedCallbackParameters());}else{if(_13be){_13be(null,com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_NOT_FOUND,_13bd.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(_13bf){},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,_13c0){this.node=node;this.layoutModel=_13c0;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 _13c1={};dojo.forEach(this._getEntries(),function(node,idx,arr){var _13c2=this.layoutModel._getNextNodeID(node);if(_13c2){_13c1[_13c2]=true;}},this);var ret=null;dojo.forEach(this._getEntries(),function(node,idx,arr){if(!(node.getID() in _13c1)){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 _13c3=this.layoutModel._getNextNodeID(node);if(!_13c3){ret=node;}},this);return ret;},_previousEntry:function(node){if(!node){return this._lastEntry();}else{var _13c4=this.layoutModel._findPointingNodeID(node);return this._findEntryById(_13c4);}},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(_13c5,sync){var size=this._getEntries().length;if(_13c5){_13c5.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(_13c6){if(_13c6<0){throw new Error(this.layoutModel.modelMessages.E_PARAM_IS_SMALLER_ZERO_0);}this._cursor=_13c6||0;var x;for(var i=0,size=this.size().start(true);i0){var _140b=this._getNext(node);var _140c=this._getPrevious(node);if(_140c){this._setNext(_140c,_140b);}}else{}}}},confirmRemove:function(node){var ret;var _140d="confirmRemove(node)";var _140e=com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.isLoggable(com.ibm.mm.enabler.layout.LayoutModelImpl.LOG_LEVEL);if(_140e){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.entering(_140d,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(_140e){com.ibm.mm.enabler.layout.LayoutModelImpl.LOGGER.exiting(_140d,[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,_140f){this.uri=uri;this.href=href;this.navigationNode=_140f;this.modelMessages=dojo.i18n.getLocalization("com.ibm.mm.enabler","modelMessages");var _1410=com.ibm.mm.enabler.model.ServiceDocumentModel.getCollectionData(com.ibm.mm.enabler.model.ServiceDocumentModel.SERVICE_CONTENT);this.prefix=_1410.idprefix;this.entryUrl=this.href;this.ns=dojo.delegate(_1410.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 _1411=function(){var cs=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.iwidget.services.ContainerService.SERVICE_NAME);cs.switchToModifiablePersistenceMode();this.removeDirtyCallback(_1411);};this.addDirtyCallback(this,dojo.hitch(this,_1411));},_getNavigationNode:function(){return this.navigationNode;},_commit:function(_1412,sync,_1413){if(!com.ibm.mashups.enabler.io.XHRMultipartFactory.isMultipartEnabled()){sync=true;}var _1414=com.ibm.mashups.enabler.io.XHRMultipartFactory;var _1415=_1414.create();_1415.startTransaction(_1414.CONTEXT_ENABLER);this.widgetWindowLoadAheadMap={};this._commitChanges(_1412,sync,_1413,this.getRoot().start(true));var _1416=com.ibm.mashups.services.ServiceManager.getService(com.ibm.mashups.enabler.services.StrategyService.SERVICE_NAME);var _1417=new com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy(this.widgetWindowLoadAheadMap);_1416.setStrategy("com.ibm.mashups.enabler.widget.WidgetModel",_1417);_1415.endTransactionDeferred().start();_1416.removeStrategy("com.ibm.mashups.enabler.widget.WidgetModel","com.ibm.mashups.enabler.strategy.WidgetWindowLoadAheadStrategy");this._commitWireModel(_1412,sync,_1413);_1415=_1414.create();_1415.startTransaction(_1414.CONTEXT_ENABLER);this._commitDelete(_1412,sync,_1413);_1415.endTransactionDeferred().start();this._setClean();},_replaceNodeXmlFromFeed:function(node,_1418,_1419){if(_1419){var entry=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("//atom:entry",_1419,this.ns);if(entry){this._replaceNodeXml(node,_1418,entry);}}},_replaceNodeXml:function(node,_141a,_141b){if(dojo.isWebKit){_141b=_141b.cloneNode(true);}var _141c=node.getXml().parentNode;if(!_141a){_141a=this._getPrevious(node);}var _141d=this._getNext(node);var _141e=this._isClientNode(node);var oldId=com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(node);this._deleteNode(node.getXml(),true);node.setXml(_141b);node._setClean();_141c.appendChild(node.getXml());if(_141a&&_141e){this._setNext(_141a,node);}if(_141d){this._setNext(node,_141d);}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(_141f,sync,_1420){if(this._wireModel){this.lazyLoadModules(["WidgetModel"]);var _1421=com.ibm.mashups.enabler.widget.Factory.getWidgetModel();if(this._wireModel._isDirty()&&_1421.isDirty()){_1421.commit().start(sync);}this._wireModel._commit(_141f,sync,_1420);}},_commitDelete:function(_1422,sync,_1423){this._deletedNodes.forEach(function(entry){var node=entry.valueOf();var myUrl=com.ibm.mashups.enabler.model.url.ModelUrlFactory.getModelURL(node.getEditLink(),this);var _1424=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1423._acquire();_1424.remove(dojo.hitch(this,function(type,data,xhr,_1425){if(_1425){_1425.finishOperation(node.getID(),com.ibm.mashups.enabler.DeferredOperation.OPERATION_DELETE,xhr.status);}_1423._release(_1425,xhr.status);}),_1422);},this);this._deletedNodes.clear();},_commitChanges:function(_1426,sync,_1427,_1428){if(!_1428){return;}var _1429=this.getChildren(_1428);var _142a=null;while(_1429.hasNext()){var node=_1429.next();if(this._isClientNode(node)){this._insertCommit(node,_142a,_1426,sync,_1427);}else{if(node&&node._isDirty()){this._updateCommit(node,_1426,sync,_1427);}}if(this._isContainer(node)){this._commitChanges(_1426,sync,_1427,node);}_142a=node;}},_prepareNodeCommit:function(node){var _142b=true;var _142c=null;var _142d=node;while(_142b){var _142e=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@rel='next']",_142d.getXml(),this.ns);if(_142e){var _142f=com.ibm.mm.enabler.utils.Utils.getIdFromExtUri(this.prefix,_142e);var _1430=this.find(_142f).start();var _1431=this._isClientNode(_1430);var _1432=_1430._isDirty();_142b=_1431||_1432;if(!_142b){_142c=_1430;}_142d=_1430;}else{_142b=false;_142c=null;}}_142d=new com.ibm.mm.enabler.layout.LayoutNodeImpl(node.getXml().cloneNode(true),this);this._setNext(_142d,_142c);return _142d;},_updateCommit:function(node,_1433,sync,_1434){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 _1435=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;_1435=this._prepareNodeCommit(node);}var _1436=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_1436.setHandleAs("text");_1434._acquire();_1436.update(_1435.toString(),dojo.hitch(this,function(type,data,xhr,args){var _1437=args.deferred;data=com.ibm.mm.enabler.utils.Dom.createDocument(xhr.responseText);try{if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_OK){this._replaceNodeXmlFromFeed(args.node,null,data);}if(_1437){_1437.finishOperation(com.ibm.mm.enabler.utils.Utils.getIdFromIdentifiable(args.node),com.ibm.mashups.enabler.DeferredOperation.OPERATION_MODIFY,xhr.status);}}catch(e){console.error(e);}_1434._release(_1437,xhr.status);}),{node:node,deferred:_1433});},_insertCommit:function(node,_1438,_1439,sync,_143a){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 _143b=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;_143b=this._prepareNodeCommit(node);}var _143c=new com.ibm.mm.enabler.services.ModelRestServiceRequest(myUrl,null,null,false,sync);_143a._acquire();_143c.create(_143b.toString(),dojo.hitch(this,function(type,data,xhr,args){var _143d=args.deferred;var node=args.node;var _143e=args.previousNode;try{if(xhr.status==com.ibm.mm.enabler.model.HttpStatusCodes.HTTP_CREATED){this._replaceNodeXmlFromFeed(node,_143e,data);}if(_143d){_143d.finishOperation(node,com.ibm.mashups.enabler.DeferredOperation.OPERATION_CREATE,xhr.status,com.ibm.mm.enabler.DeferredDataComposer._dataFromXhr(xhr));}}catch(e){console.error(e);}_143a._release(_143d,xhr.status);}),{node:node,previousNode:_1438,deferred:_1439});},_getMediaLink:function(){var _143f=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@ext:rel='media']",this.root.xmlData,this.ns);if(_143f){return _143f.getAttribute("href");}return null;},_getEditMediaLink:function(){var _1440=com.ibm.mashups.enabler.xml.XPath.evaluateEntry("atom:link[@rel='edit-media']",this.root.xmlData,this.ns);if(_1440){return _1440.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(_1441){this.loadAheadUser=_1441;this.userModel=null;},isLoadAheadUser:function(){return this.loadAheadUser;},setUserModel:function(_1442){this.userModel=_1442;},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(_1443){},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(_1444){}});}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,_1445){},getEvents:function(_1446){},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,_1447){},confirmSetReadOnly:function(name){},setValue:function(name,value){},setValue:function(name,value,_1448){},setValues:function(name,_1449){},setValues:function(name,_144a,_144b){},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,_144c,_144d){this.prefProvider=_144c;this.defaultPreferences=_144d;var _144e=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(_144e.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 _144f=null;var expr=dojo.string.substitute(this.PREFERENCES_BY_NAME,[name]);var _1450=this.prefProvider._getPreferencesXML();var _1451=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,_1450,this.li_ns);return _1451||_144f;},getValue:function(name){var _1452=this._getPrefNode(name);if(_1452){var _1453="base:value[@xsi:type='base:String' and position()=1]/@value";var value=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_1453,_1452,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 _1454=this._getPrefNode(name);if(_1454){var _1455="base:value[@xsi:type='base:String']/@value";var _1456=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(_1455,_1454,this.li_ns);if(_1456&&_1456.length>0){return dojo.map(_1456,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 _1457=false;var _1458=this._getPrefNode(name);if(_1458){var _1459=_1458.getAttribute("read-only");if(_1459=="true"){_1457=true;}}else{if(this.defaultPreferences){_1457=this.defaultPreferences.isReadOnly(name);}}return _1457;},getNames:function(){var _145a=[];var names={};var _145b=this.prefProvider._getPreferencesXML();var _145c=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.PREFERENCES_TOP,_145b,this.li_ns);var i;if(_145c){var _145d=_145c.length;for(i=0;i<_145d;i++){names[_145c[i].getAttribute("name")]=null;}}if(this.defaultPreferences){var _145e=this.defaultPreferences.getNames();var _145f=_145e.length;for(i=0;i<_145f;++i){names[_145e[i]]=null;}}for(var name in names){if(Object.prototype.hasOwnProperty.call(names,name)){_145a.push(name);}}return _145a;},_getValueForMap:function(_1460){if(_1460){var _1461="base:value[@xsi:type='base:String' and position()=1]/@value";var value=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(_1461,_1460,this.li_ns);if(value){return com.ibm.mm.enabler.utils.Dom.textContent(value);}}return null;},getMap:function(){var _1462={};var _1463=this.prefProvider._getPreferencesXML();var _1464=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.PREFERENCES_TOP,_1463,this.li_ns);var i;if(this.defaultPreferences){_1462=this.defaultPreferences.getMap();}if(_1464){var map={};var _1465=_1464.length;for(i=0;i<_1465;i++){var name=_1464[i].getAttribute("name");var value=this._getValueForMap(_1464[i]);map[name]=value;}dojo.mixin(_1462,map);}return _1462;}});}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:"",type:""});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,_1466,_1467){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 _1468=this.getValue(name);var _1469=this._setValuesInternally(name,[value],_1466);if(_1469){var _146a=null;if(_1467){_146a=_1467;}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,[this,name,_1468,value,_146a]);}return _1469;},setValues:function(name,_146b,_146c){if(_146b===null){return false;}if(!this.confirmSetValues(name,_146b)){return false;}return this._setValuesInternally(name,_146b,_146c);},_setValuesInternally:function(name,_146d,_146e){if(!dojo.isArray(_146d)){return false;}if(this.defaultPreferences&&this.defaultPreferences.isReadOnly(name)){return false;}var _146f=this._getPrefNode(name);var _1470=this.prefProvider._getPreferencesXML();var _1471=_1470.ownerDocument;if(_146f){if(_146f.hasChildNodes()){var _1472=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(this.BASE_VALUE,_146f,this.li_ns);dojo.forEach(_1472,dojo.destroy);}}else{var _1473=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.STAR_NODE,_1470,this.li_ns);if(!_1473){return false;}_146f=com.ibm.mm.enabler.utils.Dom.createElement(_1471,this.MODEL_PORTLETPREFERENCES,this.MODEL_NS);_146f.setAttribute("name",name);_1473.appendChild(_146f);_146f.setAttribute("read-only","false");}if(this.confirmSetReadOnly(name)){if(_146e===true){_146f.setAttribute("read-only","true");}else{if(_146e===false){_146f.setAttribute("read-only","false");}}}var _1474=_146d.length;for(var i=0;i<_1474;++i){var value=_146d[i];var node=com.ibm.mm.enabler.utils.Dom.createElement(_1471,this.BASE_VALUE,this.BASE_NS);com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_1471,node,this.XSI_TYPE,"type",this.XSI_NS,this.BASE_STRING);node.setAttribute("value",value);_146f.appendChild(node);}this._setDirty();return true;},remove:function(name,_1475){if(!this.confirmRemove(name)){return false;}var _1476=this._getPrefNode(name);if(!_1476){return false;}var _1477=this.getValue(name);var _1478=this.prefProvider._getPreferencesXML();var _1479=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.STAR_NODE,_1478,this.li_ns);if(!_1479){return false;}_1479.removeChild(_1476);this._setDirty();var _147a=null;if(_1475){_147a=_1475;}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE,[this,name,_1477,null,_147a]);return true;},confirmRemove:function(name){var _147b=this._getPrefNode(name);if(!_147b){return false;}return true;},confirmSetValue:function(name,value){return true;},confirmSetValues:function(name,_147c){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(_147d){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _147e="constructor(basePreferences)";var _147f=this.LOGGER.isLoggable(this.LOG_LEVEL,_147d);if(_147f){this.LOGGER.entering(_147e);}this.basePrefs=_147d;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(_147f){this.LOGGER.exiting(_147e);}},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 _1480=this.basePrefs.getValues(name);if(_1480!==null){return _1480;}if(this.parentPrefs){return this.parentPrefs.getValues(name);}return null;},setValue:function(name,value,_1481,_1482){var _1483="setValue(name, value, readOnly, _context)";var _1484=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,value,_1481,_1482]);if(_1484){this.LOGGER.entering(_1483);}if(!this.confirmSetValue(name,value)){if(_1484){this.LOGGER.trace(_1483,"confirmSetValue is false");}if(_1484){this.LOGGER.exiting(_1483,false);}return false;}if(_1484){this.LOGGER.trace(_1483,"Setting the new value");}var _1485=this.getValue(name);var _1486=this.basePrefs.setValue(name,value,_1481,_1482);if(_1484){this.LOGGER.exiting(_1483,_1486);}return _1486;},setValues:function(name,_1487,_1488){var _1489="setValues(name, values, readOnly)";var _148a=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,_1487,_1488]);if(_148a){this.LOGGER.entering(_1489);}if(!this.confirmSetValues(name,_1487)){if(_148a){this.LOGGER.trace(_1489,"confirmSetValues is false");}if(_148a){this.LOGGER.exiting(_1489,false);}return false;}if(_148a){this.LOGGER.trace(_1489,"Setting the new values");}var _148b=this.basePrefs.setValues(name,_1487,_1488);if(_148a){this.LOGGER.exiting(_1489,_148b);}return _148b;},remove:function(name,_148c){var _148d=this.basePrefs.remove(name,_148c);return _148d;},getNames:function(){var _148e="getNames()";var _148f=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_148f){this.LOGGER.entering(_148e);}var _1490=[];var names={};var i;if(this.parentPrefs){if(_148f){this.LOGGER.trace(_148e,"Getting names from parent preference");}var _1491=this.parentPrefs.getNames();var _1492=_1491.length;for(i=0;i<_1492;++i){names[_1491[i]]=null;}}if(_148f){this.LOGGER.trace(_148e,"Getting own names");}var _1493=this.basePrefs.getNames();var _1494=_1493.length;for(i=0;i<_1494;++i){names[_1493[i]]=null;}for(var name in names){if(Object.prototype.hasOwnProperty.call(names,name)){_1490.push(name);}}if(_148f){this.LOGGER.exiting(_148e);}return _1490;},getMap:function(){var _1495="getMap()";var _1496=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_1496){this.LOGGER.entering(_1495);}var _1497={};if(this.parentPrefs){if(_1496){this.LOGGER.trace(_1495,"Getting map from parent preference");}_1497=this.parentPrefs.getMap();}if(_1496){this.LOGGER.trace(_1495,"Getting own map");}var _1498=this.basePrefs.getMap();dojo.mixin(_1497,_1498);if(_1496){this.LOGGER.exiting(_1495);}return _1497;},confirmRemove:function(name){return this.basePrefs.confirmRemove(name);},confirmSetValue:function(name,value){var _1499="confirmSetValue(name, value)";var _149a=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,value]);if(_149a){this.LOGGER.entering(_1499);}if(this.parentPrefs&&this.parentPrefs.isReadOnly(name)){if(_149a){this.LOGGER.trace(_1499,"Preference is read only on parent");}if(_149a){this.LOGGER.exiting(_1499,false);}return false;}var _149b=this.basePrefs.confirmSetValue(name,value);if(_149a){this.LOGGER.trace(_1499,"Confirm on base preferences is ${0}",_149b);}if(_149a){this.LOGGER.exiting(_1499,_149b);}return _149b;},confirmSetValues:function(name,_149c){return this.confirmSetValue(name,_149c);},confirmSetReadOnly:function(name){return false;},_valueExistsOnHierarchy:function(_149d){},_setValueHandler:function(_149e,_149f,_14a0,_14a1,_14a2){if(_149e!==this.basePrefs&&_149e!==this.parentPrefs){return;}var myOV=_14a0;if(_149e===this.basePrefs){if(_14a0===null&&this.parentPrefs){myOV=this.parentPrefs.getValue(_149f);}}else{if(_149e===this.parentPrefs){var _14a3=this.basePrefs.getValue(_149f);if(_14a3!==null){return;}}}if(_14a2===null){_14a2=this.eventContext;}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,[this,_149f,myOV,_14a1,_14a2]);},_removeHandler:function(_14a4,_14a5,_14a6,_14a7,_14a8){if(_14a4!==this.basePrefs&&_14a4!==this.parentPrefs){return;}if(_14a8===null){_14a8=this.eventContext;}var value;if(_14a4===this.parentPrefs){value=this.basePrefs.getValue(_14a5);if(value!==null){return;}}if(_14a4===this.basePrefs){if(this.parentPrefs){value=this.parentPrefs.getValue(_14a5);if(value!==null){dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_SET,[this,_14a5,_14a6,value,_14a8]);return;}}}dojo.publish(com.ibm.mashups.enabler.widget.ModifiablePreferences.TOPIC_PREFERENCES_REMOVE,[this,_14a5,_14a6,_14a7,_14a8]);}});}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 _14a9=this._getPreferencesXML();if(!_14a9){return null;}var _14aa=null;var _14ab=null;if(this._getDefaultPreferencesXML){_14aa=this._getDefaultPreferencesXML();if(_14aa){var me=this;var _14ac={_getPreferencesXML:function(){return me._getDefaultPreferencesXML();}};_14ab=new com.ibm.mm.enabler.widget.PreferencesImpl(_14aa,_14ac);}}this.preferences=new com.ibm.mm.enabler.widget.ModifiablePreferencesImpl(_14a9,this,_14ab);}return this.preferences;},_getParentPreferences:function(){var _14ad=this.model._getParent(this);if(_14ad&&_14ad.getPreferences){return _14ad.getPreferences();}else{return null;}},_getHierarchicalPreferences:function(){if(!this.hierarchicalPrefs){if(!this.getPreferences()){this.hierarchicalPrefs=this._getParentHierarchicalPreferences();}else{this.hierarchicalPrefs=new com.ibm.mm.enabler.widget.HierarchicalPreferencesImpl(this.getPreferences());}}return this.hierarchicalPrefs;},_getParentHierarchicalPreferences:function(){var _14ae=this.model._getParent(this);if(_14ae&&_14ae._getParentHierarchicalPreferences){return _14ae._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(_14af,_14b0){},getWidgetDefinitionByWindow:function(_14b1){},getWidgetDefinitionByInstance:function(_14b2){},getWidgetWindow:function(_14b3){},isWidgetWindowCached:function(id){},getWidgetInstance:function(_14b4){},getHierarchicalPreferences:function(_14b5){},getHierarchicalEventProvider:function(_14b6){}});}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,_14b7){this.xmlData=node;this.eventProvider=_14b7;var _14b8=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(_14b8.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 _14b9=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.li_ns);if(!_14b9){return null;}var qName=com.ibm.mm.enabler.utils.Dom.textContent(_14b9);var _14ba=null;var _14bb=null;if(qName.indexOf(":")!=qName.length-1){_14ba=com.ibm.mm.enabler.utils.Dom.getNodeNSPrefix(qName);_14bb=com.ibm.mm.enabler.utils.Dom.removeNodeNS(qName);}else{_14bb=qName;}if(_14ba===null){return _14bb;}var ns=com.ibm.mm.enabler.utils.Dom.lookupNamespaceURI(_14b9,_14ba);if(ns===null){return _14bb;}return "{"+ns+"}"+_14bb;},isPublished:function(){var _14bc=com.ibm.mm.enabler.utils.Dom.getLocalName(this.xmlData);return (_14bc==this.PUBLISHED_LNAME);},isHandled:function(){var _14bd=com.ibm.mm.enabler.utils.Dom.getLocalName(this.xmlData);return (_14bd==this.PROCESSED_LNAME);},getPayloadType:function(){var expr=this.PAYLOAD_TYPE_XPATH;var _14be=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.li_ns);if(!_14be){return null;}var _14bf=com.ibm.mm.enabler.utils.Dom.textContent(_14be);var _14c0=com.ibm.mm.enabler.utils.Dom.getNodeNSPrefix(_14bf);var _14c1=com.ibm.mm.enabler.utils.Dom.removeNodeNS(_14bf);if(_14c0===null){return _14c1;}var ns=com.ibm.mm.enabler.utils.Dom.lookupNamespaceURI(_14be,_14c0);if(ns===null){return _14c1;}return "{"+ns+"}"+_14c1;},_setQNameNode:function(_14c2,_14c3,value,_14c4){var expr=_14c3;var _14c5=this.xmlData.ownerDocument;var _14c6=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this.xmlData,this.li_ns);if(!_14c6){_14c6=com.ibm.mm.enabler.utils.Dom.createElement(_14c5,_14c2,this.li_ns.model);this.xmlData.appendChild(_14c6);}var nsUri=null;var _14c7=null;var _14c8=value.indexOf("{");if(_14c8===0){var nsEnd=value.indexOf("}");if(nsEnd==-1){throw new Error("Name is not a valid qName");}nsUri=value.substring(_14c8+1,nsEnd);_14c7=value.substring(nsEnd+1);}else{_14c7=value;}if(nsUri!==null){com.ibm.mm.enabler.utils.Dom.setAttributeWithNS(_14c6.ownerDocument,_14c6,"xmlns:"+_14c4,_14c4,this.XMLNS_NS,nsUri);com.ibm.mm.enabler.utils.Dom.textContent(_14c6,_14c4+":"+_14c7);}else{com.ibm.mm.enabler.utils.Dom.textContent(_14c6,_14c7);}},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(_14c9){var _14ca=_14c9;var _14cb=_14c9.indexOf("{");if(_14cb==-1){_14ca="{"+this.DATATYPE_NS+"}"+_14c9;}if(this.getPayloadType()==_14ca){return;}this._setQNameNode(this.MODEL_PAYLOAD_TYPE,this.PAYLOAD_TYPE_XPATH,_14ca,this.DEFAULT_PAYLOAD_PREFIX);this._setDirty();},_getXML:function(){return this.xmlData;},_setXML:function(_14cc){this.xmlData=_14cc;}});}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(_14cd){this.LOGGER=com.ibm.mashups.enabler.logging.Logger.getLogger(this.declaredClass);this.LOG_LEVEL=com.ibm.mashups.enabler.logging.LogLevel.TRACE;var _14ce="constructor(baseEventProvider)";var _14cf=this.LOGGER.isLoggable(this.LOG_LEVEL,_14cd);if(_14cf){this.LOGGER.entering(_14ce);}this.baseEP=_14cd;this.parentEP=this.baseEP._getParentHierarchicalEventProvider();if(_14cf){this.LOGGER.exiting(_14ce);}},createEvent:function(name,_14d0){var _14d1="createEvent(name, handled)";var _14d2=this.LOGGER.isLoggable(this.LOG_LEVEL,[name,_14d0]);if(_14d2){this.LOGGER.entering(_14d1);}var _14d3=this.baseEP.createEvent(name,_14d0);if(_14d2){this.LOGGER.exiting(_14d1,_14d3);}return _14d3;},getEvents:function(_14d4){var _14d5="getEvents()";var _14d6=this.LOGGER.isLoggable(this.LOG_LEVEL);if(_14d6){this.LOGGER.entering(_14d5);}var _14d7=[];var _14d8={};var i;var _14d9;if(_14d6){this.LOGGER.trace(_14d5,"Getting own events");}var _14da=this.baseEP.getEvents(_14d4);var _14db=_14da.length;for(i=0;i<_14db;++i){var _14dc=_14da[i];if(_14dc.isHandled()){_14d9=this.HANDLED_NAME_PREFIX;}else{_14d9=this.PUBLISHED_NAME_PREFIX;}_14d8[_14d9+_14dc.getName()]=_14da[i];}if(this.parentEP){if(_14d6){this.LOGGER.trace(_14d5,"Getting events from parent event provider");}var _14dd=this.parentEP.getEvents(_14d4);var _14de=_14dd.length;var name;for(i=0;i<_14de;++i){var _14df=_14dd[i];name=_14df.getName();if(_14df.isHandled()){_14d9=this.HANDLED_NAME_PREFIX;}else{_14d9=this.PUBLISHED_NAME_PREFIX;}var _14e0=_14d9+name;if(!(_14e0 in _14d8)){_14d8[_14e0]=_14dd[i];}}}for(var _14e1 in _14d8){if(Object.prototype.hasOwnProperty.call(_14d8,_14e1)){_14d7.push(_14d8[_14e1]);}}if(_14d6){this.LOGGER.exiting(_14d5);}return _14d7;},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 _14e2="addEvent(event)";var _14e3=this.LOGGER.isLoggable(this.LOG_LEVEL,[event]);if(_14e3){this.LOGGER.entering(_14e2);}if(!this.confirmAddEvent(event)){if(_14e3){this.LOGGER.trace(_14e2,"confirmAddEvent is false");}if(_14e3){this.LOGGER.exiting(_14e2);}return;}this.baseEP.addEvent(event);if(_14e3){this.LOGGER.exiting(_14e2);}},removeEvent:function(event){var _14e4="removeEvent(event)";var _14e5=this.LOGGER.isLoggable(this.LOG_LEVEL,[event]);if(_14e5){this.LOGGER.entering(_14e4);}if(!this.confirmRemoveEvent(event)){if(_14e5){this.LOGGER.trace(_14e4,"confirmRemoveEvent is false");}if(_14e5){this.LOGGER.exiting(_14e4);}return;}this.baseEP.removeEvent(event);if(_14e5){this.LOGGER.exiting(_14e4);}},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,_14e6){var _14e7=this._getEventXML().ownerDocument;var _14e8=this.MODEL_PUBLISH_EVENT;if(_14e6){_14e8=this.MODEL_PROCESS_EVENT;}var node=com.ibm.mm.enabler.utils.Dom.createElement(_14e7,_14e8,this.ns.model);node.setAttribute("id","cid:"+this.idService.createClientID());var _14e9=new com.ibm.mm.enabler.widget.ModifiableEventImpl(node,this);_14e9._addDirtyCallback(this,function(){this._setDirty();});_14e9.setName(name);_14e9.setPayloadType("{"+this.ns.xsi+"}String");_14e9._setDirty();return _14e9;},getEvents:function(_14ea){var _14eb=true;var _14ec=false;var _14ed=false;if(typeof _14ea!="undefined"&&_14ea!==null){if(_14ea[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS]!==null&&_14ea[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS]===true){_14ec=true;_14eb=false;}if(_14ea[com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS]!==null&&_14ea[com.ibm.mashups.enabler.widget.Constants.FILTER_PUBLISHED_EVENTS]===true){_14ed=true;_14eb=false;}if(_14ed&&_14ec){_14eb=true;}}if(this._events===null){this._loadEventsFromXML();}var _14ee=[];for(var _14ef in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_14ef)){_14ee.push(this._events[_14ef]);}}var event;if(this._defaultEventProvider){var _14f0=this._defaultEventProvider.getEvents();var _14f1=_14f0.length;for(var i=0;i<_14f1;++i){event=_14f0[i];if(event.isHandled()){namePrefix=this.HANDLED_NAME_PREFIX;}else{namePrefix=this.PUBLISHED_NAME_PREFIX;}if(!(namePrefix+event.getName() in this._events)){_14ee.push(event);}}}var _14f2=[];if(!_14eb){var _14f3=_14ee.length;for(var j=0;j<_14f3;++j){event=_14ee[j];if(_14ec&&event.isHandled()){_14f2.push(event);}else{if(_14ed&&event.isPublished()){_14f2.push(event);}}}_14ee=_14f2;}return _14ee;},_updateEventsFromXML:function(_14f4){if(this._events===null){return;}if(!this._getEventXML()){return;}var expr=this.EVENTS_XPATH;var _14f5=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,(_14f4)?_14f4:this._getEventXML(),this.ns);if(!_14f5){return;}var _14f6=_14f5.length;var _14f7;for(var i=0;i<_14f6;++i){var event=new com.ibm.mm.enabler.widget.ModifiableEventImpl(_14f5[i],this);var _14f8;if(event.isHandled()){_14f8=this.HANDLED_NAME_PREFIX;}else{_14f8=this.PUBLISHED_NAME_PREFIX;}var _14f9=_14f8+event.getName();if(_14f9 in this._events){var oldID=this._events[_14f9].getID();this._events[_14f9]._setXML(event._getXML());var newID=this._events[_14f9].getID();if(oldID!=newID){this.idService.attachServerID(oldID,newID);}}}},_loadEventsFromXML:function(){var expr=this.EVENTS_XPATH;var _14fa=com.ibm.mashups.enabler.xml.XPath.evaluateXPath(expr,this._getEventXML(),this.ns);this._events={};if(!_14fa){return;}var _14fb=_14fa.length;var _14fc;for(var i=0;i<_14fb;++i){var event=new com.ibm.mm.enabler.widget.ModifiableEventImpl(_14fa[i],this);var _14fd;if(event.isHandled()){_14fd=this.HANDLED_NAME_PREFIX;}else{_14fd=this.PUBLISHED_NAME_PREFIX;}var _14fe=_14fd+event.getName();this._events[_14fe]=event;}},getEvent:function(name){if(this._events===null){this._loadEventsFromXML();}if(name===null){return null;}var _14ff=this.HANDLED_NAME_PREFIX+name;if(_14ff in this._events){return this._events[_14ff];}_14ff=this.PUBLISHED_NAME_PREFIX+name;if(_14ff in this._events){return this._events[_14ff];}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 _1500=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this._getEventXML(),this.ns);if(!_1500){var _1501=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(this.PARENT_XPATH,this._getEventXML(),this.ns);if(!_1501){return;}_1500=com.ibm.mm.enabler.utils.Dom.createElement(this._getEventXML().ownerDocument,this.MODEL_EVENTS,this.ns.model);_1501.appendChild(_1500);}_1500.appendChild(event._getXML());if(this._events===null){this._loadEventsFromXML();}var _1502;if(event.isHandled()){_1502=this.HANDLED_NAME_PREFIX;}else{_1502=this.PUBLISHED_NAME_PREFIX;}var _1503=_1502+event.getName();this._events[_1503]=event;this._eventProviderIsDirty=true;this._setDirty();},removeEvent:function(event){if(!event){return;}if(!this.confirmRemoveEvent(event)){return;}var expr=this.EVENTS_TOP_XPATH;var _1504=com.ibm.mashups.enabler.xml.XPath.evaluateEntry(expr,this._getEventXML(),this.ns);if(!_1504){return;}_1504.removeChild(event._getXML());if(this._events!==null){var _1505;if(event.isHandled()){_1505=this.HANDLED_NAME_PREFIX;}else{_1505=this.PUBLISHED_NAME_PREFIX;}var _1506=_1505+event.getName();if(_1506 in this._events){delete this._events[_1506];}}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 _1507=this.model._getParent(this);if(_1507&&_1507._getParentHierarchicalEventProvider){return _1507._getHierarchicalEventProvider();}else{return null;}},_getEventXML:function(){return this.xmlData;},_isEventProviderDirty:function(){if(this._eventProviderIsDirty){return true;}if(this._events===null){return false;}for(var _1508 in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_1508)){var event=this._events[_1508];if(event._isDirty()){return true;}}}return false;},_setEventProviderClean:function(){this._eventProviderIsDirty=false;if(this._events===null){return;}for(var _1509 in this._events){if(Object.prototype.hasOwnProperty.call(this._events,_1509)){var event=this._events[_1509];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 _150a=this.getEvents(null);if(_150a&&_150a!==null){for(var i=0,l=_150a.length;i