(function(){ var _1=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,_2=0,_3=Object.prototype.toString,_4=false,_5=true,_6=/\\/g,_7=/\W/; [0,0].sort(function(){ _5=false; return 0; }); var _8=function(_9,_a,_b,_c){ _b=_b||[]; _a=_a||document; var _d=_a; if(_a.nodeType!==1&&_a.nodeType!==9){ return []; } if(!_9||typeof _9!=="string"){ return _b; } var m,_e,_f,_10,ret,cur,pop,i,_11=true,_12=_8.isXML(_a),_13=[],_14=_9; do{ _1.exec(""); m=_1.exec(_14); if(m){ _14=m[3]; _13.push(m[1]); if(m[2]){ _10=m[3]; break; } } }while(m); if(_13.length>1&&_15.exec(_9)){ if(_13.length===2&&_16.relative[_13[0]]){ _e=_17(_13[0]+_13[1],_a); }else{ _e=_16.relative[_13[0]]?[_a]:_8(_13.shift(),_a); while(_13.length){ _9=_13.shift(); if(_16.relative[_9]){ _9+=_13.shift(); } _e=_17(_9,_e); } } }else{ if(!_c&&_13.length>1&&_a.nodeType===9&&!_12&&_16.match.ID.test(_13[0])&&!_16.match.ID.test(_13[_13.length-1])){ ret=_8.find(_13.shift(),_a,_12); _a=ret.expr?_8.filter(ret.expr,ret.set)[0]:ret.set[0]; } if(_a){ ret=_c?{expr:_13.pop(),set:_18(_c)}:_8.find(_13.pop(),_13.length===1&&(_13[0]==="~"||_13[0]==="+")&&_a.parentNode?_a.parentNode:_a,_12); _e=ret.expr?_8.filter(ret.expr,ret.set):ret.set; if(_13.length>0){ _f=_18(_e); }else{ _11=false; } while(_13.length){ cur=_13.pop(); pop=cur; if(!_16.relative[cur]){ cur=""; }else{ pop=_13.pop(); } if(pop==null){ pop=_a; } _16.relative[cur](_f,pop,_12); } }else{ _f=_13=[]; } } if(!_f){ _f=_e; } if(!_f){ _8.error(cur||_9); } if(_3.call(_f)==="[object Array]"){ if(!_11){ _b.push.apply(_b,_f); }else{ if(_a&&_a.nodeType===1){ for(i=0;_f[i]!=null;i++){ if(_f[i]&&(_f[i]===true||_f[i].nodeType===1&&_8.contains(_a,_f[i]))){ _b.push(_e[i]); } } }else{ for(i=0;_f[i]!=null;i++){ if(_f[i]&&_f[i].nodeType===1){ _b.push(_e[i]); } } } } }else{ _18(_f,_b); } if(_10){ _8(_10,_d,_b,_c); _8.uniqueSort(_b); } return _b; }; _8.uniqueSort=function(_19){ if(_1a){ _4=_5; _19.sort(_1a); if(_4){ for(var i=1;i<_19.length;i++){ if(_19[i]===_19[i-1]){ _19.splice(i--,1); } } } } return _19; }; _8.matches=function(_1b,set){ return _8(_1b,null,null,set); }; _8.matchesSelector=function(_1c,_1d){ return _8(_1d,null,null,[_1c]).length>0; }; _8.find=function(_1e,_1f,_20){ var set; if(!_1e){ return []; } for(var i=0,l=_16.order.length;i":function(_39,_3a){ var _3b,_3c=typeof _3a==="string",i=0,l=_39.length; if(_3c&&!_7.test(_3a)){ _3a=_3a.toLowerCase(); for(;i=0)){ if(!_56){ _57.push(_59); } }else{ if(_56){ _55[i]=false; } } } } return false; },ID:function(_5a){ return _5a[1].replace(_6,""); },TAG:function(_5b,_5c){ return _5b[1].replace(_6,"").toLowerCase(); },CHILD:function(_5d){ if(_5d[1]==="nth"){ if(!_5d[2]){ _8.error(_5d[0]); } _5d[2]=_5d[2].replace(/^\+|\s*/g,""); var _5e=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(_5d[2]==="even"&&"2n"||_5d[2]==="odd"&&"2n+1"||!/\D/.test(_5d[2])&&"0n+"+_5d[2]||_5d[2]); _5d[2]=(_5e[1]+(_5e[2]||1))-0; _5d[3]=_5e[3]-0; }else{ if(_5d[2]){ _8.error(_5d[0]); } } _5d[0]=_2++; return _5d; },ATTR:function(_5f,_60,_61,_62,not,_63){ var _64=_5f[1]=_5f[1].replace(_6,""); if(!_63&&_16.attrMap[_64]){ _5f[1]=_16.attrMap[_64]; } _5f[4]=(_5f[4]||_5f[5]||"").replace(_6,""); if(_5f[2]==="~="){ _5f[4]=" "+_5f[4]+" "; } return _5f; },PSEUDO:function(_65,_66,_67,_68,not){ if(_65[1]==="not"){ if((_1.exec(_65[3])||"").length>1||/^\w/.test(_65[3])){ _65[3]=_8(_65[3],null,null,_66); }else{ var ret=_8.filter(_65[3],_66,_67,true^not); if(!_67){ _68.push.apply(_68,ret); } return false; } }else{ if(_16.match.POS.test(_65[0])||_16.match.CHILD.test(_65[0])){ return true; } } return _65; },POS:function(_69){ _69.unshift(true); return _69; }},filters:{enabled:function(_6a){ return _6a.disabled===false&&_6a.type!=="hidden"; },disabled:function(_6b){ return _6b.disabled===true; },checked:function(_6c){ return _6c.checked===true; },selected:function(_6d){ if(_6d.parentNode){ _6d.parentNode.selectedIndex; } return _6d.selected===true; },parent:function(_6e){ return !!_6e.firstChild; },empty:function(_6f){ return !_6f.firstChild; },has:function(_70,i,_71){ return !!_8(_71[3],_70).length; },header:function(_72){ return (/h\d/i).test(_72.nodeName); },text:function(_73){ return "text"===_73.getAttribute("type"); },radio:function(_74){ return "radio"===_74.type; },checkbox:function(_75){ return "checkbox"===_75.type; },file:function(_76){ return "file"===_76.type; },password:function(_77){ return "password"===_77.type; },submit:function(_78){ return "submit"===_78.type; },image:function(_79){ return "image"===_79.type; },reset:function(_7a){ return "reset"===_7a.type; },button:function(_7b){ return "button"===_7b.type||_7b.nodeName.toLowerCase()==="button"; },input:function(_7c){ return (/input|select|textarea|button/i).test(_7c.nodeName); }},setFilters:{first:function(_7d,i){ return i===0; },last:function(_7e,i,_7f,_80){ return i===_80.length-1; },even:function(_81,i){ return i%2===0; },odd:function(_82,i){ return i%2===1; },lt:function(_83,i,_84){ return i<_84[3]-0; },gt:function(_85,i,_86){ return i>_86[3]-0; },nth:function(_87,i,_88){ return _88[3]-0===i; },eq:function(_89,i,_8a){ return _8a[3]-0===i; }},filter:{PSEUDO:function(_8b,_8c,i,_8d){ var _8e=_8c[1],_8f=_16.filters[_8e]; if(_8f){ return _8f(_8b,i,_8c,_8d); }else{ if(_8e==="contains"){ return (_8b.textContent||_8b.innerText||_8.getText([_8b])||"").indexOf(_8c[3])>=0; }else{ if(_8e==="not"){ var not=_8c[3]; for(var j=0,l=not.length;j=0); } } },ID:function(_9a,_9b){ return _9a.nodeType===1&&_9a.getAttribute("id")===_9b; },TAG:function(_9c,_9d){ return (_9d==="*"&&_9c.nodeType===1)||_9c.nodeName.toLowerCase()===_9d; },CLASS:function(_9e,_9f){ return (" "+(_9e.className||_9e.getAttribute("class"))+" ").indexOf(_9f)>-1; },ATTR:function(_a0,_a1){ var _a2=_a1[1],_a3=_16.attrHandle[_a2]?_16.attrHandle[_a2](_a0):_a0[_a2]!=null?_a0[_a2]:_a0.getAttribute(_a2),_a4=_a3+"",_a5=_a1[2],_a6=_a1[4]; return _a3==null?_a5==="!=":_a5==="="?_a4===_a6:_a5==="*="?_a4.indexOf(_a6)>=0:_a5==="~="?(" "+_a4+" ").indexOf(_a6)>=0:!_a6?_a4&&_a3!==false:_a5==="!="?_a4!==_a6:_a5==="^="?_a4.indexOf(_a6)===0:_a5==="$="?_a4.substr(_a4.length-_a6.length)===_a6:_a5==="|="?_a4===_a6||_a4.substr(0,_a6.length+1)===_a6+"-":false; },POS:function(_a7,_a8,i,_a9){ var _aa=_a8[2],_ab=_16.setFilters[_aa]; if(_ab){ return _ab(_a7,i,_a8,_a9); } }}}; var _15=_16.match.POS,_ac=function(all,num){ return "\\"+(num-0+1); }; for(var _ad in _16.match){ _16.match[_ad]=new RegExp(_16.match[_ad].source+(/(?![^\[]*\])(?![^\(]*\))/.source)); _16.leftMatch[_ad]=new RegExp(/(^(?:.|\r|\n)*?)/.source+_16.match[_ad].source.replace(/\\(\d+)/g,_ac)); } var _18=function(_ae,_af){ _ae=Array.prototype.slice.call(_ae,0); if(_af){ _af.push.apply(_af,_ae); return _af; } return _ae; }; try{ Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType; } catch(e){ _18=function(_b0,_b1){ var i=0,ret=_b1||[]; if(_3.call(_b0)==="[object Array]"){ Array.prototype.push.apply(ret,_b0); }else{ if(typeof _b0.length==="number"){ for(var l=_b0.length;i"; _b6.insertBefore(_b5,_b6.firstChild); if(document.getElementById(id)){ _16.find.ID=function(_b7,_b8,_b9){ if(typeof _b8.getElementById!=="undefined"&&!_b9){ var m=_b8.getElementById(_b7[1]); return m?m.id===_b7[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===_b7[1]?[m]:undefined:[]; } }; _16.filter.ID=function(_ba,_bb){ var _bc=typeof _ba.getAttributeNode!=="undefined"&&_ba.getAttributeNode("id"); return _ba.nodeType===1&&_bc&&_bc.nodeValue===_bb; }; } _b6.removeChild(_b5); _b6=_b5=null; })(); (function(){ var div=document.createElement("div"); div.appendChild(document.createComment("")); if(div.getElementsByTagName("*").length>0){ _16.find.TAG=function(_bd,_be){ var _bf=_be.getElementsByTagName(_bd[1]); if(_bd[1]==="*"){ var tmp=[]; for(var i=0;_bf[i];i++){ if(_bf[i].nodeType===1){ tmp.push(_bf[i]); } } _bf=tmp; } return _bf; }; } div.innerHTML=""; if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){ _16.attrHandle.href=function(_c0){ return _c0.getAttribute("href",2); }; } div=null; })(); if(document.querySelectorAll){ (function(){ var _c1=_8,div=document.createElement("div"),id="__sizzle__"; div.innerHTML="

"; if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){ return; } _8=function(_c2,_c3,_c4,_c5){ _c3=_c3||document; if(!_c5&&!_8.isXML(_c3)){ var _c6=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(_c2); if(_c6&&(_c3.nodeType===1||_c3.nodeType===9)){ if(_c6[1]){ return _18(_c3.getElementsByTagName(_c2),_c4); }else{ if(_c6[2]&&_16.find.CLASS&&_c3.getElementsByClassName){ return _18(_c3.getElementsByClassName(_c6[2]),_c4); } } } if(_c3.nodeType===9){ if(_c2==="body"&&_c3.body){ return _18([_c3.body],_c4); }else{ if(_c6&&_c6[3]){ var _c7=_c3.getElementById(_c6[3]); if(_c7&&_c7.parentNode){ if(_c7.id===_c6[3]){ return _18([_c7],_c4); } }else{ return _18([],_c4); } } } try{ return _18(_c3.querySelectorAll(_c2),_c4); } catch(qsaError){ } }else{ if(_c3.nodeType===1&&_c3.nodeName.toLowerCase()!=="object"){ var _c8=_c3,old=_c3.getAttribute("id"),nid=old||id,_c9=_c3.parentNode,_ca=/^\s*[+~]/.test(_c2); if(!old){ _c3.setAttribute("id",nid); }else{ nid=nid.replace(/'/g,"\\$&"); } if(_ca&&_c9){ _c3=_c3.parentNode; } try{ if(!_ca||_c9){ return _18(_c3.querySelectorAll("[id='"+nid+"'] "+_c2),_c4); } } catch(pseudoError){ } finally{ if(!old){ _c8.removeAttribute("id"); } } } } } return _c1(_c2,_c3,_c4,_c5); }; for(var _cb in _c1){ _8[_cb]=_c1[_cb]; } div=null; })(); } (function(){ var _cc=document.documentElement,_cd=_cc.matchesSelector||_cc.mozMatchesSelector||_cc.webkitMatchesSelector||_cc.msMatchesSelector,_ce=false; try{ _cd.call(document.documentElement,"[test!='']:sizzle"); } catch(pseudoError){ _ce=true; } if(_cd){ _8.matchesSelector=function(_cf,_d0){ _d0=_d0.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"); if(!_8.isXML(_cf)){ try{ if(_ce||!_16.match.PSEUDO.test(_d0)&&!/!=/.test(_d0)){ return _cd.call(_cf,_d0); } } catch(e){ } } return _8(_d0,null,null,[_cf]).length>0; }; } })(); (function(){ var div=document.createElement("div"); div.innerHTML="
"; if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){ return; } div.lastChild.className="e"; if(div.getElementsByClassName("e").length===1){ return; } _16.order.splice(1,0,"CLASS"); _16.find.CLASS=function(_d1,_d2,_d3){ if(typeof _d2.getElementsByClassName!=="undefined"&&!_d3){ return _d2.getElementsByClassName(_d1[1]); } }; div=null; })(); function _45(dir,cur,_d4,_d5,_d6,_d7){ for(var i=0,l=_d5.length;i0){ _df=_de; break; } } } _de=_de[dir]; } _db[i]=_df; } } }; if(document.documentElement.contains){ _8.contains=function(a,b){ return a!==b&&(a.contains?a.contains(b):true); }; }else{ if(document.documentElement.compareDocumentPosition){ _8.contains=function(a,b){ return !!(a.compareDocumentPosition(b)&16); }; }else{ _8.contains=function(){ return false; }; } } _8.isXML=function(_e0){ var _e1=(_e0?_e0.ownerDocument||_e0:0).documentElement; return _e1?_e1.nodeName!=="HTML":false; }; var _17=function(_e2,_e3){ var _e4,_e5=[],_e6="",_e7=_e3.nodeType?[_e3]:_e3; while((_e4=_16.match.PSEUDO.exec(_e2))){ _e6+=_e4[0]; _e2=_e2.replace(_16.match.PSEUDO,""); } _e2=_16.relative[_e2]?_e2+"*":_e2; for(var i=0,l=_e7.length;i_27||_25<_27):_25>_27||_26<_27; _21=_1d(_1f,_20,_24,_28,_1b); }else{ var h=_19.height||_20.height,w=_19.width||_20.width; _21={top:Math.min(_19.top||(_1f.height-h)/2,_1f.height-_20.height-_1b),left:Math.min(_19.left||(_1f.width-w)/2,_1f.width-_20.width-_1b)}; } if(!i$.isIE||i$.isIE!==7){ _21.top+=_22; _21.left+=_23; } _e(_1c||_17,_21); if(_18&&_1e){ var _29=i$.query(".pointer",_17).pop(); if(_29){ _e(_29,_1e(_9(_17),_24,_9(_29),_29,_28)); } } },registerHandler:function(_2a){ if(_2a.nodeHandler){ _13.nodeHandler[_2a.name]=_2a.nodeHandler; } if(_2a.pointerHandler){ _13.pointerHandler[_2a.name]=_2a.pointerHandler; } }}; i$.toPath("wpModules.util.Positioning",_13); })(window); (function(){ var _2b={name:"horizontallyCenteredBelow",nodeHandler:function(_2c,_2d,_2e,_2f,_30){ var pos={}; pos.top=_2e.top+_2e.height; if(pos.top<0){ pos.top=0; } if(pos.top+_2d.height>_2c.height){ pos.top=_2c.height-_2d.height-_30; } pos.left=Math.max(_2e.left+(_2e.width-_2d.width)/2,_30); return pos; },pointerHandler:function(_31,_32,_33,_34,_35){ var _36=_33.height,_37=_33.width,_38=Math.min(_32.left+_32.width,_31.left+_31.width),_39=Math.max(_32.left,_31.left),_3a=(_38+_39)/2-_31.left; return {top:-(_36-2),left:_3a-_37/2}; }}; wpModules.util.Positioning.registerHandler(_2b); })(); (function(){ var _3b={name:"verticallyCenteredRightHand",nodeHandler:function(_3c,_3d,_3e,_3f,_40){ var pos={}; pos.top=Math.max(_3e.top+(_3e.height-_3d.height)/2,_40); pos.top=Math.min(pos.top,_3c.height-_3d.height-_40); if(_3f){ pos.left=Math.min(_3e.left+_3e.width,_3c.width-_3d.width-_40); }else{ pos.left=Math.max(_3e.left-_3d.width,_40); } return pos; },pointerHandler:function(_41,_42,_43,_44,_45){ var _46=_43.height,_47=_46/2+6,_48=Math.min(_42.top+_42.height,_41.top+_41.height-_47),_49=Math.max(_42.top,_41.top+_47),_4a=_45?_41.left-_43.width:_41.left+_41.width+_43.width; i$.removeClass(_44,"right"); i$.removeClass(_44,"left"); if(_48-_49>0&&_42.left<_4a&&_4a<_42.right){ i$.addClass(_44,_45?"left":"right"); } return {top:(_49+_48-_46)/2-_41.top}; }}; wpModules.util.Positioning.registerHandler(_3b); })(); /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2012 - All Rights reserved. **/ if(!i$.fromPath("wpModules.dialog.Dialog")){ i$.toPath("wpModules.dialog.Dialog",function(_1,_2){ var _3=[]; function _4(_5,_6){ i$.each(_6,function(v,k){ _5=_5.replace(new RegExp("\\${"+k+"}","g"),v); }); return _5; }; function _7(_8,_9){ var s="data-attach-point"; i$.each(i$.query("["+s+"]",_8),function(e){ _9[e.getAttribute(s)]=e; }); }; function _a(){ return Math.round(Math.random()*1000000000)+""; }; function _b(_c){ var v=_c.documentElement; return {width:v.clientWidth,height:v.clientHeight}; }; function _d(_e){ var b={}; i$.forIn(_e.getBoundingClientRect(),function(v,n){ b[n]=v; }); if(i$.isIE){ b.height=b.bottom-b.top; b.width=b.right-b.left; } return b; }; function _f(p,_10,box){ wpModules.util.Positioning.handle({name:p.posHandler,targetWindow:p.window,targetBox:box,node:_10,refNode:p.autoPosition,maxOverLay:p.maxOverlay,viewMargin:p.viewMargin}); }; function _11(_12){ return _12.window.document.getElementById(_12.id+"-iframe"); }; function _13(_14,_15){ i$.forIn(_15,function(v,n){ _14.style[n]=Math.round(v)+"px"; }); }; var _16=i$.augment((function(_17){ this._init(_17); }),{_init:function(_18){ var doc=_18.window.document,_19=doc.body,div=doc.createElement("div"),_1a=this._overlayNode=doc.createElement("div"),os=_1a.style,_1b=this.rootNode=doc.createElement("div"); i$.addClass(_1a,"lotusOverlay"); i$.addClass(_1b,"lotusui30"); os.display="block"; os.height="100%"; os.top="0px"; os.position="fixed"; this.id=_a(); this.window=_18.window; div.innerHTML=_4(_18.template,{title:_18.title,itemClose:_18.itemClose,z_index:_18.z_index,id:this.id}); _7(div,this); this.domNode=div.firstChild; this.domNode.id=this.id; if(!_18.modal){ os.opacity="0"; os.filter="Alpha(opacity=0)"; } _19.appendChild(_1b); _1b.appendChild(_1a); _1b.appendChild(this.domNode); i$.bindDomEvt(this.domNode,"onkeydown",i$.scope(this,function(e){ if(e.keyCode===9){ if(!e){ var e=_1.event; } var t=e.target||e.srcElement; if(t.nodeType===3){ t=t.parentNode; } var f1=e.shiftKey?"-firstFocus":"-lastFocus",f2=e.shiftKey?"-lastFocus":"-firstFocus"; if(this.id+f1===t.getAttribute("id")){ _18.window.document.getElementById(this.id+f2).focus(); } } })); if(!_18.autoPosition){ i$.query(".pointer",this.domNode).pop().style.display="none"; } },show:function(){ this.domNode.style.display="block"; },hide:function(){ this.domNode.style.display="none"; }}); return i$.augment((function(_1c){ this.blankImgSrc="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; if(i$.isIE===7){ var b=ibmConfig&&ibmConfig["loadingHTML.imageURL"]; if(b){ this.blankImgSrc=b.replace("loading.gif","blank.gif"); } } this.z_index=_3.length===0?1000:_3[_3.length-1].z_index+500; var prm=this.prm=i$.mash({window:_1,posHandler:"verticallyCenteredRightHand",maxOverlay:0.5,viewMargin:15,autoResize:false,autoClose:!_1c.modal,modal:false,template:"
"+"
"+"
"+(_1c.title?"
"+"

${title}

"+""+"\"\""+"X"+""+"
":"")+"
"+"
"+"
"+"
"+"
"+"
"+"
"},_1c); this.widget=new _16({window:prm.window,title:prm.title,autoPosition:prm.autoPosition,modal:prm.modal,itemClose:"Close",template:prm.template,z_index:this.z_index}); var cb=this.widget.closeButtonNode; cb&&i$.bindDomEvt(cb,"onclick",i$.scope(this,"_close")); if(prm.autoClose){ i$.bindDomEvt(this.widget._overlayNode,"onclick",i$.scope(this,"_close")); } _3.push(this); }),{open:function(){ var w=this.widget,p=this.prm,wd=w.domNode,m=p.metrics,tb=p.targetBox={}; if(p.url){ w.containerNode.innerHTML=_4("
"+""+"\"${loading}\"/"+""+"
"+"",{id:w.id,url:i$.isIE?"":p.url,title:p.title||p.description||"dialog contents",blank:this.blankImgSrc,loading:"loading...",border:i$.isIE?"border='0'":"",visibility:i$.isIE?"visibility:hidden;":"opacity:0;filter:Alpha(opacity=0)"}); var f=_11(w); if(i$.isIE){ f.src=p.url; this._initCallbacksOnloadIE(); this._ieRefreshListener=i$.addListener("wpModules/dialog/Dialog/ieRefresh",i$.scope(this,this._handleIeRefreshEvent)); }else{ f.onload=i$.scope(this,this._initCallbacks); } } wd.style.visibility="hidden"; w.show(); if(m){ if(!p.autoPosition){ m.top&&(tb.top=m.top); m.left&&(tb.left=m.left); } m.width&&(tb.width=m.width); m.height&&(tb.height=m.height); } _f(p,wd,tb); setTimeout(function(){ wd.style.visibility="visible"; },100); return false; },_initCallbacks:function(){ var w=this.widget; var p=this.prm; var f=_11(w); var _1d=i$.scope(this,function(){ var fw=f.contentWindow,_1e=fw.contentDocument||fw.document,_1f=i$.scope(this,function(){ this.onLoadFrame(); p.onLoadCallbackFn&&p.onLoadCallbackFn(_1e); }); fw.onunload=function(){ p.onUnloadCallbackFn&&p.onUnloadCallbackFn(_1e); }; fw.onload=_1f; fw.resize=i$.scope(this,"resize"); fw.close=fw.closeDialog=f.onCloseModalDialog=i$.scope(this,"close"); _1f(); }); _1d(); },_initCallbacksOnloadIE:function(){ var _20=this; var w=this.widget; var p=this.prm; var f=_11(w); var fn=function(i){ p.window.setTimeout(function(){ if((f.contentDocument&&f.contentDocument.readyState&&f.contentDocument.readyState==="complete")||(f.readyState&&f.readyState==="complete")){ _20._initCallbacks(); }else{ if(i<300){ fn(i+1); } } },200+10); }; fn(0); },_handleIeRefreshEvent:function(_21){ var w=this.widget; var f=_11(w); var cw=f.contentWindow; if(_21==cw){ this._initCallbacksOnloadIE(); } },isActive:function(){ return _3.length>0&&this.widget.id===_3[_3.length-1].widget.id; },onLoadFrame:function(){ var w=this.widget,wd=w.domNode,p=this.prm,_22=p.targetBox,_23=p.autoResize,_24=_b(p.window.document),_25=_11(w),bs=wd.style; bs.maxWidth="none"; bs.maxHeight="none"; bs.minWidth="0"; bs.minHeight="0"; var _26=p.window.document.getElementById(w.id+"-progressLoading"); if(_26){ _26.style.display="none"; } var cs=w.containerNode.style,fs=_25.style; cs.paddingBottom="0px"; cs.marginBottom="0px"; if(i$.isIE){ fs.visibility="visible"; }else{ fs.opacity="100"; fs.filter="Alpha(opacity=100)"; } var fw=_25.contentWindow,_27=fw.contentDocument||fw.document,fde=_27.documentElement,_28=_27.body; if(i$.isWebKit){ _28.style.overflow="auto"; } _13(_25,{width:300,height:150}); var _29=Math.max(_28.scrollHeight,fde.scrollHeight,_28.offsetHeight,fde.offsetHeight,fde.clientHeight),_2a=Math.max(_28.scrollWidth,fde.scrollWidth,_28.offsetWidth,fde.offsetWidth,fde.clientWidth),_2b=_d(wd),_2c=_d(_25),_2d=_2b.width-_2c.width,_2e=_2b.height-_2c.height,_2f=_24.width-2*p.viewMargin-_2d,_30=_24.height-2*p.viewMargin-_2e,_31=_22.height||(_23?_29:_24.height/3),_32=_22.width||(_23?_2a:_24.width/3); _2a=Math.min(_32,_2f); _29=Math.min(_31,_30); _13(wd,{top:0,left:0}); _2a+=2; _29+=2; _13(_25,{width:_2a,height:_29}); if(_23&&!_22.width){ if(i$.isFF){ if(fde.clientWidth_30){ var _33=Math.max(_28.scrollWidth,fde.scrollWidth),_34=Math.max(_28.clientWidth,fde.clientWidth); if(_34<_33){ var _35=_33-_34; if(_2a+_35<=_2f){ _2a+=_35; _13(_25,{width:_2a}); } } } } _f(p,wd,{top:p.targetBox.top,left:p.targetBox.left,width:_2a+_2d,height:_29+_2e}); i$.bindDomEvt(_28,"onkeydown",i$.scope(this,function(e){ if(e.keyCode===27){ this._close(); } })); p.window.setTimeout(function(){ _25.focus(); },100); },resize:function(_36){ var is=_36&&(_36.width||_36.height); if(is){ i$.mash(this.prm.targetBox,_36); } this.prm.autoResize=!is; this.onLoadFrame(); },setFocus:function(){ },setMarkup:function(_37){ this.widget.containerNode.innerHTML=_37; },_close:function(){ this.close(); },close:function(_38){ var w=this.widget,r=w.rootNode,p=this.prm,_39=_11(w),fw=_39&&_39.contentWindow; if(fw&&fw.onbeforeunload){ var _3a=fw.onbeforeunload(); if(_3a&&!confirm(_3a)){ return; } } w.hide(); for(var da=_3,i=da.length;i>0;i--){ if(da[i-1].widget.id===w.id){ da.splice(i-1,1); break; } } p.callbackFn&&p.callbackFn(_38); r&&r.parentNode.removeChild(r); if(i$.isIE){ i$.removeListener(this._ieRefreshListener); } }}); }(window)); } /** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2012 - All Rights reserved. **/ (function(_1){ var _2=_1.document; var _3=false; var _4=function(){ return !!(i$.query); }; function _5(){ return Math.round(Math.random()*1000000000); }; var _6={cache:{},triggerRegisterHandlers:{},triggerUnregisterHandlers:{},positioningHandlers:{},defaultCss:{focus:"wpthemeMenuFocus",disabled:"wpthemeMenuDisabled",show:"wpthemeMenuShow",error:"wpthemeMenuError",menuTemplate:"wpthemeTemplateMenu",submenuTemplate:"wpthemeTemplateSubmenu",loadingTemplate:"wpthemeTemplateLoading",firstItem:"wpthemeFirst",lastItem:"wpthemeLast"},init:function(_7){ var _8=_7.refNode; var _9=_8||_7.node; var _a=_9._contextMenu=_9._contextMenu||{}; var _b=(_8?_a.menuId:_7.menuId); var _c=_6._sticky; if(_9._contextMenu.preventOpen||_c){ delete _9._contextMenu.preventOpen; return; } _a.id=_a.id||_9.getAttribute("id")||_5(); _9.setAttribute("id",_a.id); _a.menuId=_b; _a.closeFn=_7.onClose||null; _a.params=_a.params||{}; if(_7.params){ _7.params.sticky&&(_6._sticky=true); i$.mash(_a.params,_7.params); } _a.jsonQuery=_a.jsonQuery||{}; _a.jsonQuery=i$.mash(_a.jsonQuery,_7.jsonQuery); _a.css=_8?_a.css:_6._getCssClasses(_9); _a.defaultTemplateId=_a.defaultTemplateId||(_b+"Template"); _a.templateId=_a.templateId||_a.params.templateId||null; var _d=function(_e){ if(!_e.displayMenu){ return; } i$.fireEvent("wptheme/contextMenu/close/all"); if(_a.params._executeDefaultAction){ delete _a.params._executeDefaultAction; delete _7.params._executeDefaultAction; _6._hideLoadingAnimation(_a); _6._registerEventHandlers(_a); i$.fireEvent("wpModules/contextMenu/close/id/"+_a.id); _6._executeDefaultAction(_a); return; } if(_a._loading||!i$.hasClass((_a.shadowNode)?_a.shadowNode:i$.byId(_a.id),_6.defaultCss.show)){ var _f=_a.menuNode; i$.when(_6._updateVisibility(_f,_a)).then(function(_10){ if(_a._loading){ _a.loadingNode.style.display="none"; _a._loading=false; } if(!_10){ return; } _6._updateAbsolutePosition(i$.byId(_a.id)); var _11=_6._adjustScreenPositionStart(); if(!_a._hoverEventRegistered){ _6._addHoverEventListeners(_7); } i$.addClass((_a.shadowNode)?_a.shadowNode:i$.byId(_a.id),_6.defaultCss.show); _6._adjustScreenPositionEnd(_11); if(_a.params._setFocus){ delete _a.params._setFocus; delete _7.params._setFocus; var n=i$.byId(_a.id),_12=n&&n._firstSelectable; if(_12){ _12.focus(); n._currentSelected=_12; } } _6._registerEventHandlers(_a); }); } }; _6._initialize(_9).then(_d,_d); _9=null; return function(_13){ if(_a._preventClose||_a._closing){ delete _a._preventClose; delete _7._preventClose; return; } _a._closing=true; _6._executeMenuAction(_13,_a); _1.setTimeout(function(){ i$.fireEvent("wpModules/contextMenu/close/id/"+_a.id,[true]); },1); delete _a._closing; }; },lock:function(_14){ var cm=_14._contextMenu=_14._contextMenu||{}; cm._lockMenu=true; },unlock:function(_15){ var cm=_15._contextMenu||{}; cm._lockMenu=false; },reposition:function(_16){ var _17=_16._contextMenu; _6._updateAbsolutePosition(_16); var _18=_6._adjustScreenPositionStart(); i$.addClass((_17.shadowNode)?_17.shadowNode:i$.byId(_17.id),_6.defaultCss.show); _6._adjustScreenPositionEnd(_18); },_hideLoadingAnimation:function(_19){ if(_19._loading){ _19.loadingNode.style.display="none"; _19._loading=false; } },_executeDefaultAction:function(_1a){ var _1b=_1a.menuNode; var _1c=_6._findNodes(_1b),_1d=_1c.menu,_1e=_1d.children; var _1f,_20; for(var i=0,l=_1e.length;i=0;i--){ _42=_46.childNodes[i]; if(i$.hasClass(_42,_43.menuTemplate)){ _3f=_42; continue; } if(i$.hasClass(_42,_43.submenuTemplate)){ _40=_42; continue; } if(i$.hasClass(_42,_43.loadingTemplate)){ _41=_42; continue; } if(_42.childNodes){ i=_45(_42,i); } } return _47; }; _45(_44); return {"menu":_3f,"submenu":_40,"loading":_41}; },_findMenuNode:function(_48){ var _49,cm=_48._contextMenu,_4a=cm.templateId,_4b=cm.defaultTemplateId; if(_4a){ _49=_2.getElementById(_4a); } _49=_49||(_4()?_6._findMenuNodeSelector(_48):_6._findMenuNodeRecursive(_48)); _49=_49||_2.getElementById(_4b); return _49; },_findMenuNodeSelector:function(_4c){ return i$.query([".wpthemeMenu",", .wpthemeMenuRight",", .wpthemeMenuLeft"].join(""),_4c).shift(); },_findMenuNodeRecursive:function(_4d){ var _4e,i,_4f; var _50=function(_51,_52){ for(i=_51.childNodes.length-1;i>=0;i--){ _4f=_51.childNodes[i]; if(i$.hasClass(_4f,"wpthemeMenu")||i$.hasClass(_4f,"wpthemeMenuRight")||i$.hasClass(_4f,"wpthemeMenuLeft")){ _4e=_4f; break; } if(_4f.childNodes){ i=_50(_4f,i); } } return _52; }; _50(_4d); return _4e; },_invalidateCallback:function(){ _6.cache={}; },_initialize:function(_53){ var _54=true; var _55=_53._contextMenu,_56=_55.css; if(_6.cache[_55.id]||_55._inProgress){ return i$.promise.resolved({displayMenu:_54}); } if(!_55._menuTemplateNode){ _55._menuTemplateNode=_6._findMenuNode(_53); if(_55._menuTemplateNode.parentNode!=_53){ _55._menuTemplateNode=_55._menuTemplateNode.cloneNode(true); _55._menuTemplateNode.removeAttribute("id"); _53.appendChild(_55._menuTemplateNode); } } _55._inProgress=true; i$.addListener("wptheme/contextMenu/invalidate/all",_6._invalidateCallback); var _57,_58,tmp=i$.createDom("div"); if(_55._submenu){ tmp.innerHTML=_55._subMenuTemplate.replace(/\$\{submenu-id\}/g,_55.id+"_menu"); _53.appendChild(tmp.firstChild); _57=i$.byId(_55.id+"_menu"); _58=i$.createDom("div"); _58.innerHTML=_55._loadingTemplate; }else{ var _59=_6._findNodes((_55.shadowNode)?_55.shadowNode:_53); _57=_59.menu; if(!_55._menuitemTemplate){ _55._menuitemTemplate=i$.trim(_57.innerHTML); } if(!_55._loadingTemplate&&_59.loading){ _58=i$.createDom("div"); _58.appendChild(_59.loading); _58.innerHTML=_58.innerHTML.replace(/\$\{loading\}/g,_6.nls.LOADING_0); _55._loadingTemplate=i$.trim(_58.innerHTML); _58=null; } _58=i$.createDom("div"); _58.innerHTML=_55._loadingTemplate||""; if(_59.submenu){ tmp.appendChild(_59.submenu.cloneNode(true)); if(!_55._subMenuTemplate){ _55._subMenuTemplate=i$.trim(tmp.innerHTML); } } } while(_57.firstChild){ _57.removeChild(_57.firstChild); } _57.appendChild(_58); _55.loadingNode=_58; var _5a; if(_55.shadowNode){ _5a=_55.shadowNode; }else{ _5a=_6._transformIntoAbsolutePosition(_53); } i$.addClass((_5a)?_5a:_53,_56.show); return _6._load(_55).then(function(_5b){ var _5c=_6._parseData(_5b).then(function(_5d){ _5d=_6._filterMenu(_5d); if(!_5d||_5d.length==0){ var tmp=i$.createDom("div"); tmp.innerHTML=_6._fromTemplate(_55._menuitemTemplate,_56.error,_6.nls.NO_ITEMS_0); while(_57.firstChild){ _57.removeChild(_57.firstChild); } _57.appendChild(tmp); }else{ _6._buildMenu(_55,_57,_5d); } _55._inProgress=false; _55._loading=true; _6.cache[_55.id]=true; return {displayMenu:_54}; }); return _5c; },function(){ var tmp=i$.createDom("div"); tmp.innerHTML=_6._fromTemplate(_55._menuitemTemplate,_56.error,_6.nls.ERROR_LOADING_0); while(_57.firstChild){ _57.removeChild(_57.firstChild); } _57.appendChild(tmp); _55._inProgress=false; _6.cache[_55.id]=true; return {displayMenu:_54}; }); },_updateVisibility:function(_5e,_5f){ var _60=_6._findNodes(_5e),_61=_60.menu,_62=_61.children,_63=[]; var _64,_65; for(var i=0,l=_62.length;i-1){ var n=i$.byId(_5f.id); n._firstSelectable=_70; n._currentSelected=null; i$.addClass(_62[_68],_5f.css.firstItem); } (_69>-1)&&i$.addClass(_62[_69],_5f.css.lastItem); _6a.resolve(_6b); }); return _6a; },_filterMenu:function(_72){ var _73=[],_74,_75={"type":"Separator"}; for(var i=_72.length-1;i>=0;i--){ _74=_72[i]; if(_74.type=="Separator"){ if(_75.type=="Separator"){ continue; } }else{ if(_74.type=="Header"){ if((_75.type=="Separator")||(_75.type=="Header")){ continue; } } } _75=_74; _73.unshift(_74); } while(_73.length>0&&_73[0].type=="Separator"){ _73=_73.slice(1); } return _73; },_buildMenu:function(_76,_77,_78){ var _79=_2.createDocumentFragment(),tmp=i$.createDom("div"),_7a,_7b,_7c=_76.id,_7d,_7e=i$.byId(_76.id); for(var i=0,l=_78.length;i 0) { if (projectLink != null && projectLink.length > 0) { message = dojo.replace(wcmModules.nls.inplace["added_item_to_the_project_1"], [contentTitle]); } else { message = dojo.replace(wcmModules.nls.inplace["draft_of_item_was_created_1"], [contentTitle]); } } var messageObject = new com.ibm.widgets.StatusMessage("info", message , ""); i$.fireEvent("/portal/status",[{message: messageObject, uid: 'ibmStatusBox'}]); inplaceMenu._createdDrafts[publishedId] = draftId; }, /** Get the id of the auto-created draft given a published id. * Returns null if no draft has been created. */ /*String*/getCreatedDraft: function(/*String*/publishedId) { return inplaceMenu._createdDrafts[publishedId]; }, /** Called to edit property or element using true inplace editing */ edit : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); // Can't edit while saving if (inplaceMenu.isSaving(wcmMetaData.editableRegionId)) { return; } // Node to which the CAM menu is attached var attachNode = i$.byId(wcmMetaData.editableRegionId); // Lock the CAM menu. It will be unlocked again once we've loaded an editor wpModules.contextMenu.lock(attachNode); try { //console.log("wcmInplaceModule: edit: wcmMetaData", wcmMetaData); inplaceMenu.setEditing(wcmMetaData.editableRegionId, true); // If a draft has been created since page load, we need to edit that instead of the published item var draftId = inplaceMenu.getCreatedDraft(wcmMetaData.itemId); if (draftId != null) { //console.log("Identified that we should edit draft with id " + draftId + " instead of published item " + wcmMetaData.itemId); wcmMetaData.itemId = draftId; } //Property here is defined by 'wcm/TagType.PROPERTY', if (wcmMetaData.tagType === "Property") { wcmModules.inplaceMenu.editProperty(wcmMetaData); } else { wcmModules.inplaceMenu.editElement(wcmMetaData); } } catch (e) { // If anything goes wrong, make sure to unlock the CAM menu again wpModules.contextMenu.unlock(attachNode); inplaceMenu.setEditing(wcmMetaData.editableRegionId, false); throw e; } }, /** Called to edit property using true inplace editing */ editProperty : function(/*Object*/wcmMetaData) { //console.log("Entered editProperty: ", wcmMetaData); if (inplaceMenu._textBox[wcmMetaData.editableRegionId]) { // Reuse textBox if already created var textBox = inplaceMenu._textBox[wcmMetaData.editableRegionId]; // Don't reload the item value - the user may already have edited this value textBox.editInplace(false); } else { require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, [ 'wcm/InplaceTextBox', 'wcm/InplaceEditable', 'wcm/SavePropertyHandler', 'wcm/ItemRepository' ], function(InplaceTextBox, InplaceEditable, SavePropertyHandler, ItemRepository) { var saveHandlerObject = new SavePropertyHandler({ wcmMetaData : wcmMetaData }); var saveHandler = saveHandlerObject.createHandler(); var useEmbedEdit = (wcmMetaData.editMode == "embed") || (wcmMetaData.editMode == "default" && wcmMetaData.defaultMode == "embed"); var textBox = null; if (useEmbedEdit) { textBox = new InplaceEditable({ onChange : saveHandler, renderAsHtml : false, getItemValue : function(callback) { var rep = new ItemRepository({ wcmMetaData : wcmMetaData }); var propValue = rep.getPropertyValue(wcmMetaData.itemId, wcmMetaData.propertyType); propValue.then(function(value) { callback(value); }); }, uniqueId : wcmMetaData.editableRegionId }, wcmMetaData.contentRegion); } else { textBox = new InplaceTextBox({ onChange : saveHandler, autoSave : false, // don't use dijit's autosave - we'll implement this ourselves editorParams : { // TODO: We should set this max using the value from the template. For now, this // will be checked on the server //maxLength : 250 }, editor : 'dijit.form.Textarea', renderAsHtml : false, getItemValue : function(callback) { var rep = new ItemRepository({ wcmMetaData : wcmMetaData }); var propValue = rep.getPropertyValue(wcmMetaData.itemId, wcmMetaData.propertyType); propValue.then(function(value) { callback(value); }); }, uniqueId : wcmMetaData.editableRegionId }, wcmMetaData.contentRegion); } inplaceMenu._textBox[wcmMetaData.editableRegionId] = textBox; // Load the item value - we want to edit the real item value, not the rendered value textBox.editInplace(true); }); } }, /** Called to edit element using true inplace editing */ editElement : function(/*Object*/wcmMetaData) { //console.log("wcmInplaceModule: Entered editElement: ", wcmMetaData); if (inplaceMenu._textBox[wcmMetaData.editableRegionId]) { // Reuse textBox if already created var textBox = inplaceMenu._textBox[wcmMetaData.editableRegionId]; //console.log("wcmInplaceModule: editElement reused textBox: ", textBox); // Don't reload the item value - the user may already have edited this value textBox.editInplace(false); } else { require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, [ 'dojo/dom', 'dojo/DeferredList', 'wcm/InplaceTextBox', 'wcm/InplaceEditable', 'wcm/SaveElementHandler', 'wcm/ItemRepository', 'wcm/ElementType' ], function(dom, DeferredList, InplaceTextBox, InplaceEditable, SaveElementHandler, ItemRepository, ElementType) { //console.log("wcmMetaData.elementType", wcmMetaData.elementType); var saveHandlerObject = new SaveElementHandler({ wcmMetaData : wcmMetaData, isNumber : (wcmMetaData.elementType === ElementType.NUMBER) }); var saveHandler = saveHandlerObject.createHandler(); var isRichText = (wcmMetaData.elementType === ElementType.RICH_TEXT); var useEmbedEdit = (wcmMetaData.editMode == "embed") || (wcmMetaData.editMode == "default" && wcmMetaData.defaultMode == "embed"); var textBox = null; if (useEmbedEdit) { textBox = new InplaceEditable({ onChange : saveHandler, renderAsHtml : (wcmMetaData.elementType === ElementType.RICH_TEXT), // Render everything as text, apart from RICH_TEXT getItemValue : function(callback) { var rep = new ItemRepository({ wcmMetaData : wcmMetaData }); var elementValue = rep.getElementValue(wcmMetaData.itemId, wcmMetaData.elementName); elementValue.then(function(value) { //console.log("wcmInplaceModule: editElement: Element Value is", value); callback(value); }); }, uniqueId : wcmMetaData.editableRegionId, isRichText : isRichText }, wcmMetaData.contentRegion); } else { textBox = new InplaceTextBox({ onChange : saveHandler, autoSave : false, // don't use dijit's autosave - we'll implement this ourselves editorParams : { // TODO: We should set this max using the value from the template. For now, this // will be checked on the server //maxLength : 250 }, editor : 'dijit.form.Textarea', renderAsHtml : (wcmMetaData.elementType === ElementType.RICH_TEXT), // Render everything as text, apart from RICH_TEXT getItemValue : function(callback) { var rep = new ItemRepository({ wcmMetaData : wcmMetaData }); var elementValue = rep.getElementValue(wcmMetaData.itemId, wcmMetaData.elementName); elementValue.then(function(value) { //console.log("wcmInplaceModule: editElement: Element Value is", value); callback(value); }); }, uniqueId : wcmMetaData.editableRegionId, isRichText : isRichText }, wcmMetaData.contentRegion); } inplaceMenu._textBox[wcmMetaData.editableRegionId] = textBox; // Initiate edit inplace if (wcmMetaData.elementType === ElementType.RICH_TEXT) { var contentRegionNode = i$.byId(wcmMetaData.contentRegion); // Show RTE has inactive while it's loading - this is equivalent to 'saving' i$.addClass(contentRegionNode.parentNode, "saving"); // Load all required scripts for RTE in paralled. When all are loaded, initiate inplace edit // The inplace edit will fail if the scripts have not all been loaded in time. var deferred1 = dojo.io.script.get({ url : wcmModules.config.inplaceResourceRoot + "/ckeditor/ckeditor.js" }); var deferred2 = dojo.io.script.get({ url : wcmModules.config.inplaceResourceRoot + "/js/editor/ckeditorIntegration.js" }); var deferred3 = dojo.io.script.get({ url : wcmModules.config.inplaceResourceRoot + "/js/editor/RTEFieldActions.js" }); var deferredList = new DeferredList([deferred1, deferred2, deferred3]); deferredList.then(function() { // Remove loading indicator i$.removeClass(contentRegionNode.parentNode, "saving"); // Load the item value - we want to edit the real item value, not the rendered value textBox.editInplace(true); }); } else { // Load the item value - we want to edit the real item value, not the rendered value textBox.editInplace(true); } }); } }, /** Called to save item using true inplace editing */ save : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); inplaceMenu.setEditing(wcmMetaData.editableRegionId, false); if (inplaceMenu._textBox[wcmMetaData.editableRegionId]) { var textBox = inplaceMenu._textBox[wcmMetaData.editableRegionId]; textBox.save(); } else { console.log("wcmInplaceModule: No Inplace Widget for : " + wcmMetaData.editableRegionId); } }, /** Called to cancel item using true inplace editing */ cancel : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); inplaceMenu.setEditing(wcmMetaData.editableRegionId, false); if (inplaceMenu._textBox[wcmMetaData.editableRegionId]) { var textBox = inplaceMenu._textBox[wcmMetaData.editableRegionId]; textBox.cancel(); } else { console.log("wcmInplaceModule: No Inplace Widget for : " + wcmMetaData.editableRegionId); } }, /** * Whether the property/element corresponding to the jsonData is NOT being * edited using true inplace editing. This is used in the Java code as a CAM visibility function. */ isNotEditing : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); var notEditing = (!inplaceMenu.isEditing(jsonData) ); var notSaving = !inplaceMenu.isSaving(wcmMetaData.editableRegionId); return (notEditing && notSaving); }, /** * Whether the property/element corresponding to the jsonData is being * edited using true inplace editing. */ isEditing : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); var isEdit = (inplaceMenu._isEditing[wcmMetaData.editableRegionId] === true); //console.log("isEditing: ", isEdit); return isEdit; }, /** * Set whether the property/element corresponding to the jsonData is being * edited using true inplace editing. */ setEditing : function(/*String*/key, /*boolean*/editing) { inplaceMenu._isEditing[key] = editing; }, /** Open the inplace edit popup dialog with the supplied jsonData.actionUrl */ editDialog : function(/*Object*/jsonData) { //console.log("wcmInplaceModule:", jsonData); var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); //console.log("wcmInplaceModule: editDialog extracted wcmMetaData: ", wcmMetaData); // No need to look in the createdDrafts map to see if there's a project draft - the remote action will // find it. var contentRegionNode = i$.byId(wcmMetaData.contentRegion); i$.addClass(contentRegionNode.parentNode, "editing"); inplaceMenu._extractedWcmMetaData = wcmMetaData; // Create promise. When promise is resolved, the edit popup dialog will be shown, with the given URL. var promise = new i$.promise.Promise(); require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, ['dojo/topic', 'wcm/EventTopic', 'wcm/ItemRepository'], function(topic, EventTopic, ItemRepository) { if (ItemRepository && ItemRepository._saveDeferredCount && ItemRepository._saveDeferredCount > 0) { if (inplaceMenu.updatesCompleteTopic) { inplaceMenu.updatesCompleteTopic.remove(); } // Show 'loading' until all true inplace saves have completed, then allow popup dialog to open. inplaceMenu.showOverlay(); inplaceMenu.updatesCompleteTopic = topic.subscribe(EventTopic.updatesComplete, function() { //console.log("wcmInplaceModule: editDialog: Updates complete callback", jsonData); inplaceMenu.hideOverlay(); promise.resolve(jsonData.actionUrl); }); } else { // Resolve immediately, to allow popup dialog to open promise.resolve(jsonData.actionUrl); } }); return promise; }, /** Called when the inplace edit popup dialog is closed */ closeDialog : function(/*Object*/event) { //console.log("wcmInplaceModule: Entering closeDialog: event", event); var wcmMetaData = inplaceMenu._extractedWcmMetaData; //console.log("wcmInplaceModule: editDialog extracted wcmMetaData: ", wcmMetaData); var contentRegionNode = i$.byId(wcmMetaData.contentRegion); // Empty event indicates that the dialog was cancelled if (event && event.resultInfo && event.resultInfo.itemId) { // Inplace re-render, and publish create-draft event if necessary var outerEvent = event; require(['wcm/InplaceRender', 'wcm/PropertyType', 'wcm/ItemRepository'], function(InplaceRender, PropertyType, ItemRepository) { // If we've just updated the name, we need to refresh the whole page, as all the re-render URLs will be wrong if (wcmMetaData.propertyType === PropertyType.NAME) { ItemRepository.noUnloadPrompt = true; document.location.reload(); } else { inplaceMenu.setSaving(wcmMetaData.editableRegionId, true); i$.removeClass(contentRegionNode.parentNode, "editing"); if (outerEvent.resultInfo.createdDraftId) { //console.log("Draft was auto-created in dialog. Publishing the event"); inplaceMenu.notifyCreatedDraft(outerEvent.resultInfo.itemId, outerEvent.resultInfo.createdDraftId); } var inplaceRender = new InplaceRender({wcmMetaData : wcmMetaData}); //console.log("Re-rendering with this URL: " + wcmMetaData.rerenderURL); inplaceRender.render(wcmMetaData.rerenderURL, function(/*Object*/renderJson) { //console.log("wcmInplaceModule: Entering re-render callback: ", renderJson); // Don't allow the HTML to be empty, as then inplace edit is not possible contentRegionNode.innerHTML = renderJson.contents + " "; inplaceMenu.setSaving(renderJson.editableRegionId, false); }); } }); } else { i$.removeClass(contentRegionNode.parentNode, "editing"); } }, /** * Whether the property/element corresponding to the jsonData is NOT being * saved using true inplace editing. This is used in the Java code as a CAM visibility function. */ isNotSaving : function(/*Object*/jsonData) { var wcmMetaData = inplaceMenu._extractWcmMetaData(jsonData); var isSaving = inplaceMenu._isSaving[wcmMetaData.editableRegionId]; return !isSaving; }, /** * @return true if the field is currently being saved */ isSaving : function(/*String*/editableRegionId) { var isSaving = !!inplaceMenu._isSaving[editableRegionId]; return isSaving; }, /** Set the editableRegion element as saving (disabled), or no longer saving (enabled again) */ setSaving : function(/*String*/editableRegionId, /*boolean*/saving) { var editableRegionNode = i$.byId(editableRegionId); if (saving) { i$.addClass(editableRegionNode, "saving"); } else { i$.removeClass(editableRegionNode, "saving"); } dojo.setAttr(editableRegionNode, "aria-busy", saving); inplaceMenu._isSaving[editableRegionId] = saving; }, /** Set the editableRegionNodeId as in error, or no longer in error */ setError : function(/*String*/editableRegionNodeId, /*boolean*/error) { var editableRegionNode = i$.byId(editableRegionNodeId); if (error) { i$.addClass(editableRegionNode, "error"); } else { i$.removeClass(editableRegionNode, "error"); } dojo.setAttr(editableRegionNode, "aria-invalid", error); }, /** Show an overlay over the entire screen, blocking interaction until the overlay is hidden */ showOverlay : function() { var loading = wcmModules.nls.inplace["loading_msg"]; require(['dojo/_base/window', 'dojo/window', 'dojo/dom-construct', 'dojo/dom-style'], function(baseWin, win, domConstruct, domStyle){ var body = baseWin.body(); var browserHeight = (win.getBox().h/2) + "px"; var bodyHeight = domStyle.get(body, "height") + "px"; var bodyWidth = domStyle.get(body, "width") + "px"; var overlay = domConstruct.place("
" + "
" + "" + loading + "
", body); }); }, /** Hide the previously shown overlay */ hideOverlay : function() { require(['dojo/dom'], function(dom){ document.body.removeChild(dom.byId("wcm-inplace-overlay")); }); } }; i$.toPath("wcmModules.inplaceMenu", inplaceMenu); })(window); /** This Module is part of the Theme. Its packaged into wcmModules.inplace. This is the handler to inplace Creating of new items * It contains JS code for the UI for creating inplace Items and the code to trigger the rest requests*/ (function(window) { "use strict"; var create = { /** The function that returns a promise to create the item */ createPromiseFunction : null, /** * Show the Form to Create a new WCM content item in place, and create the item (via the WCM Rest API) once * the form has been filled out. * * Note that this is a public method, used in CTC, so the signature and promise interface should not be changed. * * @param attachTo domNode that the form will launch around * @param templateId the UUID of the content Template to use to create a new content item * @param siteAreaId the UUID of the site area that the new content should be saved under */ showFormAndCreateContent : function(/*Node*/attachTo, /*String*/templateId, /*String*/siteAreaId) { var createParams = {templateId : templateId, siteAreaId : siteAreaId}; this.showForm(attachTo, this.getCreateItemPromiseFunction(createParams)); }, /** * Show the Form to Create a new WCM item inplace. A promise function must be set that is called once the form has been * complete by the user, by clicking 'Create'. * * This promise can then be resolved or rejected by the calling function. Typically this will mean creating a new item (or items) * of some type. The id of the created item can be returned when the promise is resolved. * * If the promise is resolved, then the form will be dismissed, and a redirect to the created item will occur if the id of the new item * is returned by the promise as the optional single parameter. If the promise is rejected, an error will be shown and the form will not * dismiss. In this case, the promise should be rejected, optionally with an error message as the single parameter. * * Note that this is a public method, used in CTC, so the signature and promise interface should not be changed. * * @param attachTo dom Node that the form will launch around * @param createPromiseFunction The function that returns an i$.Promise to do the create */ showForm : function(/*Node*/attachTo, /*Function*/createPromiseFunction) { //console.log("wcmModuleInplaceCreate: Entering showForm: ", attachTo); wcmModules.inplace.create.createPromiseFunction = createPromiseFunction; require({ packages : [{ name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' }] }, ['wcm/CreateForm', 'wcm/Item', 'dijit/TooltipDialog', 'dijit/popup'], function(CreateForm, Item, TooltipDialog, popup) { // Create the 'new item' form var dialogId = Math.round(Math.random() * 1000000) + "_create_dialog"; var createForm = new CreateForm({ dialogRef : dialogId, consumeForm : wcmModules.inplace.create.consumeForm }); // Put the 'new item' form inside a tooltip dialog var tooltipDialog = new TooltipDialog({ id : dialogId, content : createForm, onBlur : function(){ // 'new item' popup should close on blur popup.close(tooltipDialog); } }); i$.addClass(tooltipDialog.domNode, 'noPadding'); // Show the tooltip dialog popup.open({ popup : tooltipDialog, around : attachTo, orient : [ "below", "below-alt", "above", "above-alt" ], onCancel: function(){ popup.close(tooltipDialog); }, onClose : function(){ attachTo.focus(); } }); // Add a class to the tooltip container, so that we can style it in createForm.css var tooltipContainer = dojo.query("div", tooltipDialog.domNode)[0]; if (tooltipContainer) i$.addClass(tooltipContainer, "wpwcmCreateTooltipContainer"); // Ensure the New dialog appears behind the inline edit popup dialog if (tooltipDialog.domNode.parentNode) dojo.style(tooltipDialog.domNode.parentNode, "zIndex", 500); tooltipDialog.focus(); }); }, /** * This function handles consuming the Create New item form, using the promise returned by * executing the createPromiseFunction that has already been specified. This promise is returned. * @param value the value that form has provided * @return A promise to consume the form */ consumeForm : function(/*String*/value) { //console.log("wcmModuleInplaceCreate: Entering consumeForm: ", value); var promise = new i$.Promise(); // Run the createPromiseFunction with the value to return a promise wcmModules.inplace.create.createPromiseFunction(value).then( function(/*String*/itemId) { //console.log("wcmModuleInplaceCreate: consumeForm promise resolved, ", itemId); promise.resolve(itemId); // Success - redirect to the created item if (itemId) { var pocUrl = '?uri=wcm:oid:' + itemId + "&previewopt=id&previewopt=" + itemId + "&previewopt=isdraft&previewopt=true"; window.location.replace(pocUrl); } }, function(/*String*/errorMessage) { //console.log("wcmModuleInplaceCreate: consumeForm promise rejected, ", errorMessage); // on error we write out the error message in the CreateForm promise.reject(errorMessage); }); return promise; }, /** * Get a promise to call the relevant Rest Requests to create the content item. * @param createParams the create item parameters * createParams.templateId the UUID of the content Template to use to create a new content item * createParams.siteAreaId the UUID of the site area that the new content should be saved under * @return A function */ getCreateItemPromiseFunction : function(/*Object*/createParams) { // Create a closure that when called returns the createItem promise function, with createParams inside the closure. // This is done so that createParams can be fixed and doesn't need to be passed through all the code. /** * Define a function that returns a promise to call the relevant Rest Requests to create the content item. * @param value the value entered in the form * @return A promise to create the item */ var createItemPromiseFunction = function(/*String*/value) { //console.log("wcmModuleInplaceCreate: Entering createItem: ", value); var promise = new i$.Promise(); // Use the value entered in the dialog as the new content name var name = value; // Just use the name for the title var title = value; // Create content via WCM Rest API require({ packages : [{ name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' }] }, ['wcm/ItemRepository', 'wcm/Item'], function(ItemRepository, Item) { var rep = new ItemRepository(); var createPromise = rep.createContentWithTemplate({ templateId : createParams.templateId, name : name, title : title, siteAreaId : createParams.siteAreaId }); // Chain a promise with just the ItemId or the errorMessage in it. That is, we pull out the info // that we need from the ItemRepository objects, to allow for a simple promise interface for createPromiseFunction. createPromise.then( function(/*Item*/item) { // Success promise.resolve(item.getId()); }, function(/*Error*/error) { // Failure var errorMessage; var errorObj = i$.fromJson(error.responseText); if (errorObj.errors && errorObj.errors.message && errorObj.errors.message.length > 0) { errorMessage = errorObj.errors.message[0].text; } promise.reject(errorMessage) }); }); return promise; }; return createItemPromiseFunction; } }; i$.toPath("wcmModules.inplace.create", create); })(window); /** * This Module is part of the Theme. Its packaged into wcmModules.inplace. This * particular code manages the Portlet level Inplace editing toolbar Functions * include all the basic WCM inline editing functionalties such as * edit/publish/approve etc. * * The functions are called by the CAM Framework when building the menu. * In particular the performAction corresponds to the CAM actionFn * and the isActionEnabled corresponds to the CAM visibilityFn */ (function(window) { "use strict"; var portletMenu = { /** * the item cache , is key value pair of UUID to a "wcm/Item" object. The * portlet menu has many actions that refer to the same item. Without a * Page level cache we could perform as many as 12 requests every time the * menu is loaded! The disadvantage is that other inline changes to the * page will not be picked up by the menu as it will continue looking at * the cache item until a page refresh occurs. The solution to this is to * hook on an event producer/listener (e.g. i$.fireEvent) to handle * changes to items * * Important!: * To stop a thundering herds scenario where multiple requests are created for the same item since the * cache was empty there is a possibility the itemCache item may be a dojo.Deferred object that resolves to the "wcm/Item" * As a result it is important to combine this with a "Deferred.when()" when working with item * * For more information about dojo Deferred and When see dojo documentation. * */ _itemCache : {}, /** * the argument object passed into all the action Functions is not * controlled by WCM. CAM in fact passes the entire Menu JSON entry as the * argument. The relevant WCM metadata is encapsulated within at * args.metadata.wcm. This is a convenience method to extract this WCM metadata. */ _extractWcmMetaData : function(/*Object*/jsonData) { return jsonData.metadata.wcm; }, /** * The function is called by the CAM menu. It corresponds to the CAM * "actionFn" {Object} args * * @param [args.title] * The localized title of this action , used for the dialog * title metadata = args.metadata.wcm * @param [metaData.itemId] * the UUID of the item * @param [metaData.action] * the Inline Action to peform , (represented by * wcm/inplace/portlet/InlineAction) */ performAction : function(/*Object*/args) { var title = args.title.value; var metaData = portletMenu._extractWcmMetaData(args); //console.log("wcmModuleInplacePortlet: performAction", metaData); var outer = this; //dojo time require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, [ 'dojo/_base/Deferred', 'wcm/RemoteAction', 'wcm/ItemRepository', 'wcm/inplace/portlet/InlineAction' ], function(Deferred, RemoteAction, ItemRepository, InlineAction) { var rep = new ItemRepository({ wcmMetaData : metaData }); //cache the item var item = portletMenu._itemCache[metaData.itemId]; if (!item) { item = rep.getById(metaData.itemId); //console.log("Retrieving item from REST..."); //put the deferred item in the cache , //this will prevent other asynchronous threads from trying to //retrieve the item from the cache and instead will block on the Deferred.when portletMenu._itemCache[metaData.itemId] = item; } else { //console.log("Found item in cache...."); } Deferred.when(item, function(resolvedItem) { var enabled; portletMenu._itemCache[metaData.itemId] = resolvedItem; //console.log("building remote action.."); var inlineAction = new InlineAction({ action : metaData.action }); var remoteAction = new RemoteAction({ id : metaData.itemId, action : inlineAction.getRemoteAction() }); //okay we got the url //now lets get the function //console.log("Calling openInlineEditDialog"); var openDialogFn = window["ns_" + metaData.windowId + "_openInlineEditingDialog"]; if (!openDialogFn) { console.error("Can't find openDialog function"); } openDialogFn(remoteAction.getUrl(), title); }); }); //console.log("wcmModuleInplacePortlet: performAction returning"); }, /** * This method is called by the CAM to check if the menu entry should be * shown. It corresponds to the CAM "visibilityFn" Retrieves the item by * the given UUID and then checks if the passed in action is one of the * actions available in the retrieved item (retrieve through REST). * ${Object} args * * @param args.action * the InlineAction * @param args.itemId * the items UUID * @return A Promise */ isActionEnabled : function(/*Object*/args) { //console.log("isActionEnabled: entering: ", args); var metaData = portletMenu._extractWcmMetaData(args); //console.log("isActionEnabled: itemId: ", metaData.itemId, " action: ", metaData.action); //this promise will return the value of whether the item is visble or not var enabledPromise = new i$.Promise(); //dojo time require({ packages : [ { name : 'wcm', location : wcmModules.config.inplaceResourceRoot + '/js' } ] }, [ 'dojo/_base/Deferred', 'wcm/ItemRepository', 'wcm/inplace/portlet/InlineAction', 'wcm/rest/RelationType'], function(Deferred, ItemRepository, InlineAction, RelationType) { var rep = new ItemRepository({ wcmMetaData : metaData }); //cache the item var item = portletMenu._itemCache[metaData.itemId]; if (!item) { //console.log("Retrieving item from REST..."); item = rep.getById(metaData.itemId); //put the deferred item in the cache , //this will prevent other asynchronous threads from trying to //retrieve the item from the cache and instead will block on the Deferred.when portletMenu._itemCache[metaData.itemId] = item; } else { //console.log("Found item in cache...."); } Deferred.when(item, function(resolvedItem) { var enabled; portletMenu._itemCache[metaData.itemId] = resolvedItem; //console.log("Recieved item, determining if entry should be visible"); var inlineAction = new InlineAction({ action : metaData.action }); var rel = inlineAction.getRelation(); if (resolvedItem.getLinks().hasLink(rel)) { //if this is create draft then don't display if we are in a project. // Edit in project mode is essentially "create-draft" so having both is redundant if (rel === RelationType.CREATE_DRAFT && wcmModules.config.projectId && wcmModules.config.projectId !== "") { enabled = false; //console.log("Create Draft disabled as we are in project context"); } else { enabled = true; //console.log("Item has link for given action , visible"); } } else { enabled = false; } enabledPromise.resolve(enabled); }, function(error){ //something went wrong looking up the item // the error handling should be covered by the ItemRepository //lets just log to the console console.error("Error retrieving item for Portlet level actions", error); enabledPromise.resolve(false); }); }); //console.log("isActionEnabled returning promise"); return enabledPromise; } }; //namespace this object i$.toPath("wcmModules.inplace.portletMenu", portletMenu); })(window); /* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dojox/gfx/arc":function(){define("dojox/gfx/arc",["./_base","dojo/_base/lang","./matrix"],function(g,_1,m){var _2=2*Math.PI,_3=Math.PI/4,_4=Math.PI/8,_5=_3+_4,_6=_7(_4);function _7(_8){var _9=Math.cos(_8),_a=Math.sin(_8),p2={x:_9+(4/3)*(1-_9),y:_a-(4/3)*_9*(1-_9)/_a};return {s:{x:_9,y:-_a},c1:{x:p2.x,y:-p2.y},c2:p2,e:{x:_9,y:_a}};};var _b=g.arc={unitArcAsBezier:_7,curvePI4:_6,arcAsBezier:function(_c,rx,ry,_d,_e,_f,x,y){_e=Boolean(_e);_f=Boolean(_f);var _10=m._degToRad(_d),rx2=rx*rx,ry2=ry*ry,pa=m.multiplyPoint(m.rotate(-_10),{x:(_c.x-x)/2,y:(_c.y-y)/2}),_11=pa.x*pa.x,_12=pa.y*pa.y,c1=Math.sqrt((rx2*ry2-rx2*_12-ry2*_11)/(rx2*_12+ry2*_11));if(isNaN(c1)){c1=0;}var ca={x:c1*rx*pa.y/ry,y:-c1*ry*pa.x/rx};if(_e==_f){ca={x:-ca.x,y:-ca.y};}var c=m.multiplyPoint([m.translate((_c.x+x)/2,(_c.y+y)/2),m.rotate(_10)],ca);var _13=m.normalize([m.translate(c.x,c.y),m.rotate(_10),m.scale(rx,ry)]);var _14=m.invert(_13),sp=m.multiplyPoint(_14,_c),ep=m.multiplyPoint(_14,x,y),_15=Math.atan2(sp.y,sp.x),_16=Math.atan2(ep.y,ep.x),_17=_15-_16;if(_f){_17=-_17;}if(_17<0){_17+=_2;}else{if(_17>_2){_17-=_2;}}var _18=_4,_19=_6,_1a=_f?_18:-_18,_1b=[];for(var _1c=_17;_1c>0;_1c-=_3){if(_1c<_5){_18=_1c/2;_19=_7(_18);_1a=_f?_18:-_18;_1c=0;}var c2,e,M=m.normalize([_13,m.rotate(_15+_1a)]);if(_f){c1=m.multiplyPoint(M,_19.c1);c2=m.multiplyPoint(M,_19.c2);e=m.multiplyPoint(M,_19.e);}else{c1=m.multiplyPoint(M,_19.c2);c2=m.multiplyPoint(M,_19.c1);e=m.multiplyPoint(M,_19.s);}_1b.push([c1.x,c1.y,c2.x,c2.y,e.x,e.y]);_15+=2*_1a;}return _1b;}};return _b;});},"dojox/gfx":function(){define("dojox/gfx",["dojo/_base/lang","./gfx/_base","./gfx/renderer!"],function(_1d,_1e,_1f){_1e.switchTo(_1f);return _1e;});},"dojox/gfx/gradient":function(){define("dojox/gfx/gradient",["dojo/_base/lang","./matrix","dojo/_base/Color"],function(_20,m,_21){var _22=_20.getObject("dojox.gfx.gradient",true);var C=_21;_22.rescale=function(_23,_24,to){var len=_23.length,_25=(to<_24),_26;if(_25){var tmp=_24;_24=to;to=tmp;}if(!len){return [];}if(to<=_23[0].offset){_26=[{offset:0,color:_23[0].color},{offset:1,color:_23[0].color}];}else{if(_24>=_23[len-1].offset){_26=[{offset:0,color:_23[len-1].color},{offset:1,color:_23[len-1].color}];}else{var _27=to-_24,_28,_29,i;_26=[];if(_24<0){_26.push({offset:0,color:new C(_23[0].color)});}for(i=0;i=_24){break;}}if(i){_29=_23[i-1];_26.push({offset:0,color:_21.blendColors(new C(_29.color),new C(_28.color),(_24-_29.offset)/(_28.offset-_29.offset))});}else{_26.push({offset:0,color:new C(_28.color)});}for(;i=to){break;}_26.push({offset:(_28.offset-_24)/_27,color:new C(_28.color)});}if(i=4)?"auto":"optimizeLegibility";function _42(ns,_43){if(win.doc.createElementNS){return win.doc.createElementNS(ns,_43);}else{return win.doc.createElement(_43);}};function _44(_45){if(svg.useSvgWeb){return win.doc.createTextNode(_45,true);}else{return win.doc.createTextNode(_45);}};function _46(){if(svg.useSvgWeb){return win.doc.createDocumentFragment(true);}else{return win.doc.createDocumentFragment();}};svg.xmlns={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"};svg.getRef=function(_47){if(!_47||_47=="none"){return null;}if(_47.match(/^url\(#.+\)$/)){return dom.byId(_47.slice(5,-1));}if(_47.match(/^#dojoUnique\d+$/)){return dom.byId(_47.slice(1));}return null;};svg.dasharray={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};_3b("dojox.gfx.svg.Shape",gs.Shape,{setFill:function(_48){if(!_48){this.fillStyle=null;this.rawNode.setAttribute("fill","none");this.rawNode.setAttribute("fill-opacity",0);return this;}var f;var _49=function(x){this.setAttribute(x,f[x].toFixed(8));};if(typeof (_48)=="object"&&"type" in _48){switch(_48.type){case "linear":f=g.makeParameters(g.defaultLinearGradient,_48);var _4a=this._setFillObject(f,"linearGradient");arr.forEach(["x1","y1","x2","y2"],_49,_4a);break;case "radial":f=g.makeParameters(g.defaultRadialGradient,_48);var _4b=this._setFillObject(f,"radialGradient");arr.forEach(["cx","cy","r"],_49,_4b);break;case "pattern":f=g.makeParameters(g.defaultPattern,_48);var _4c=this._setFillObject(f,"pattern");arr.forEach(["x","y","width","height"],_49,_4c);break;}this.fillStyle=f;return this;}f=g.normalizeColor(_48);this.fillStyle=f;this.rawNode.setAttribute("fill",f.toCss());this.rawNode.setAttribute("fill-opacity",f.a);this.rawNode.setAttribute("fill-rule","evenodd");return this;},setStroke:function(_4d){var rn=this.rawNode;if(!_4d){this.strokeStyle=null;rn.setAttribute("stroke","none");rn.setAttribute("stroke-opacity",0);return this;}if(typeof _4d=="string"||_3a.isArray(_4d)||_4d instanceof _3d){_4d={color:_4d};}var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_4d);s.color=g.normalizeColor(s.color);if(s){rn.setAttribute("stroke",s.color.toCss());rn.setAttribute("stroke-opacity",s.color.a);rn.setAttribute("stroke-width",s.width);rn.setAttribute("stroke-linecap",s.cap);if(typeof s.join=="number"){rn.setAttribute("stroke-linejoin","miter");rn.setAttribute("stroke-miterlimit",s.join);}else{rn.setAttribute("stroke-linejoin",s.join);}var da=s.style.toLowerCase();if(da in svg.dasharray){da=svg.dasharray[da];}if(da instanceof Array){da=_3a._toArray(da);for(var i=0;ix){this.bbox.l=x;}if(this.bbox.ry){this.bbox.t=y;}if(this.bbox.b=_98){_99={action:_96,args:_97.slice(0,_97.length-_97.length%_98)};this.segments.push(_99);this._updateWithSegment(_99);}}else{_99={action:_96,args:[]};this.segments.push(_99);this._updateWithSegment(_99);}}},_collectArgs:function(_9a,_9b){for(var i=0;i<_9b.length;++i){var t=_9b[i];if(typeof t=="boolean"){_9a.push(t?1:0);}else{if(typeof t=="number"){_9a.push(t);}else{if(t instanceof Array){this._collectArgs(_9a,t);}else{if("x" in t&&"y" in t){_9a.push(t.x,t.y);}}}}}},moveTo:function(){this._confirmSegmented();var _9c=[];this._collectArgs(_9c,arguments);this._pushSegment(this.absolute?"M":"m",_9c);return this;},lineTo:function(){this._confirmSegmented();var _9d=[];this._collectArgs(_9d,arguments);this._pushSegment(this.absolute?"L":"l",_9d);return this;},hLineTo:function(){this._confirmSegmented();var _9e=[];this._collectArgs(_9e,arguments);this._pushSegment(this.absolute?"H":"h",_9e);return this;},vLineTo:function(){this._confirmSegmented();var _9f=[];this._collectArgs(_9f,arguments);this._pushSegment(this.absolute?"V":"v",_9f);return this;},curveTo:function(){this._confirmSegmented();var _a0=[];this._collectArgs(_a0,arguments);this._pushSegment(this.absolute?"C":"c",_a0);return this;},smoothCurveTo:function(){this._confirmSegmented();var _a1=[];this._collectArgs(_a1,arguments);this._pushSegment(this.absolute?"S":"s",_a1);return this;},qCurveTo:function(){this._confirmSegmented();var _a2=[];this._collectArgs(_a2,arguments);this._pushSegment(this.absolute?"Q":"q",_a2);return this;},qSmoothCurveTo:function(){this._confirmSegmented();var _a3=[];this._collectArgs(_a3,arguments);this._pushSegment(this.absolute?"T":"t",_a3);return this;},arcTo:function(){this._confirmSegmented();var _a4=[];this._collectArgs(_a4,arguments);this._pushSegment(this.absolute?"A":"a",_a4);return this;},closePath:function(){this._confirmSegmented();this._pushSegment("Z",[]);return this;},_confirmSegmented:function(){if(!this.segmented){var _a5=this.shape.path;this.shape.path=[];this._setPath(_a5);this.shape.path=this.shape.path.join("");this.segmented=true;}},_setPath:function(_a6){var p=_89.isArray(_a6)?_a6:_a6.match(g.pathSvgRegExp);this.segments=[];this.absolute=true;this.bbox={};this.last={};if(!p){return;}var _a7="",_a8=[],l=p.length;for(var i=0;i0){var _b2=m.normalize(arg[0]);for(var i=1;i1){return new m.Matrix2D({dx:a,dy:b});}return new m.Matrix2D({dx:a.x,dy:a.y});},scale:function(a,b){if(arguments.length>1){return new m.Matrix2D({xx:a,yy:b});}if(typeof a=="number"){return new m.Matrix2D({xx:a,yy:a});}return new m.Matrix2D({xx:a.x,yy:a.y});},rotate:function(_b3){var c=Math.cos(_b3);var s=Math.sin(_b3);return new m.Matrix2D({xx:c,xy:-s,yx:s,yy:c});},rotateg:function(_b4){return m.rotate(m._degToRad(_b4));},skewX:function(_b5){return new m.Matrix2D({xy:Math.tan(_b5)});},skewXg:function(_b6){return m.skewX(m._degToRad(_b6));},skewY:function(_b7){return new m.Matrix2D({yx:Math.tan(_b7)});},skewYg:function(_b8){return m.skewY(m._degToRad(_b8));},reflect:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=2*a*b/n2;return new m.Matrix2D({xx:2*a2/n2-1,xy:xy,yx:xy,yy:2*b2/n2-1});},project:function(a,b){if(arguments.length==1){b=a.y;a=a.x;}var a2=a*a,b2=b*b,n2=a2+b2,xy=a*b/n2;return new m.Matrix2D({xx:a2/n2,xy:xy,yx:xy,yy:b2/n2});},normalize:function(_b9){return (_b9 instanceof m.Matrix2D)?_b9:new m.Matrix2D(_b9);},clone:function(_ba){var obj=new m.Matrix2D();for(var i in _ba){if(typeof (_ba[i])=="number"&&typeof (obj[i])=="number"&&obj[i]!=_ba[i]){obj[i]=_ba[i];}}return obj;},invert:function(_bb){var M=m.normalize(_bb),D=M.xx*M.yy-M.xy*M.yx;M=new m.Matrix2D({xx:M.yy/D,xy:-M.xy/D,yx:-M.yx/D,yy:M.xx/D,dx:(M.xy*M.dy-M.yy*M.dx)/D,dy:(M.yx*M.dx-M.xx*M.dy)/D});return M;},_multiplyPoint:function(_bc,x,y){return {x:_bc.xx*x+_bc.xy*y+_bc.dx,y:_bc.yx*x+_bc.yy*y+_bc.dy};},multiplyPoint:function(_bd,a,b){var M=m.normalize(_bd);if(typeof a=="number"&&typeof b=="number"){return m._multiplyPoint(M,a,b);}return m._multiplyPoint(M,a.x,a.y);},multiply:function(_be){var M=m.normalize(_be);for(var i=1;i2){return m._sandwich(m.rotate(_c0),a,b);}return m._sandwich(m.rotate(_c0),a.x,a.y);},rotategAt:function(_c1,a,b){if(arguments.length>2){return m._sandwich(m.rotateg(_c1),a,b);}return m._sandwich(m.rotateg(_c1),a.x,a.y);},skewXAt:function(_c2,a,b){if(arguments.length>2){return m._sandwich(m.skewX(_c2),a,b);}return m._sandwich(m.skewX(_c2),a.x,a.y);},skewXgAt:function(_c3,a,b){if(arguments.length>2){return m._sandwich(m.skewXg(_c3),a,b);}return m._sandwich(m.skewXg(_c3),a.x,a.y);},skewYAt:function(_c4,a,b){if(arguments.length>2){return m._sandwich(m.skewY(_c4),a,b);}return m._sandwich(m.skewY(_c4),a.x,a.y);},skewYgAt:function(_c5,a,b){if(arguments.length>2){return m._sandwich(m.skewYg(_c5),a,b);}return m._sandwich(m.skewYg(_c5),a.x,a.y);}});g.Matrix2D=m.Matrix2D;return m;});},"dojox/gfx/_base":function(){define("dojox/gfx/_base",["dojo/_base/lang","dojo/_base/html","dojo/_base/Color","dojo/_base/sniff","dojo/_base/window","dojo/_base/array","dojo/dom","dojo/dom-construct","dojo/dom-geometry"],function(_c6,_c7,_c8,has,win,arr,dom,_c9,_ca){var g=_c6.getObject("dojox.gfx",true),b=g._base={};g._hasClass=function(_cb,_cc){var cls=_cb.getAttribute("className");return cls&&(" "+cls+" ").indexOf(" "+_cc+" ")>=0;};g._addClass=function(_cd,_ce){var cls=_cd.getAttribute("className")||"";if(!cls||(" "+cls+" ").indexOf(" "+_ce+" ")<0){_cd.setAttribute("className",cls+(cls?" ":"")+_ce);}};g._removeClass=function(_cf,_d0){var cls=_cf.getAttribute("className");if(cls){_cf.setAttribute("className",cls.replace(new RegExp("(^|\\s+)"+_d0+"(\\s+|$)"),"$1$2"));}};b._getFontMeasurements=function(){var _d1={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,"small":0,"medium":0,"large":0,"x-large":0,"xx-large":0};var p;if(has("ie")){win.doc.documentElement.style.fontSize="100%";}var div=_c9.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},win.body());for(p in _d1){div.style.fontSize=p;_d1[p]=Math.round(div.offsetHeight*12/16)*16/12/1000;}win.body().removeChild(div);return _d1;};var _d2=null;b._getCachedFontMeasurements=function(_d3){if(_d3||!_d2){_d2=b._getFontMeasurements();}return _d2;};var _d4=null,_d5={};b._getTextBox=function(_d6,_d7,_d8){var m,s,al=arguments.length;var i;if(!_d4){_d4=_c9.create("div",{style:{position:"absolute",top:"-10000px",left:"0"}},win.body());}m=_d4;m.className="";s=m.style;s.borderWidth="0";s.margin="0";s.padding="0";s.outline="0";if(al>1&&_d7){for(i in _d7){if(i in _d5){continue;}s[i]=_d7[i];}}if(al>2&&_d8){m.className=_d8;}m.innerHTML=_d6;if(m["getBoundingClientRect"]){var bcr=m.getBoundingClientRect();return {l:bcr.left,t:bcr.top,w:bcr.width||(bcr.right-bcr.left),h:bcr.height||(bcr.bottom-bcr.top)};}else{return _ca.getMarginBox(m);}};var _d9=0;b._getUniqueId=function(){var id;do{id=dojo._scopeName+"xUnique"+(++_d9);}while(dom.byId(id));return id;};_c6.mixin(g,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:false,kerning:true},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:(function(){var _da={};return function(_db){var t=_da[_db];if(t){return new t();}t=_da[_db]=new Function();t.prototype=g["default"+_db];return new t();};})(),normalizeColor:function(_dc){return (_dc instanceof _c8)?_dc:new _c8(_dc);},normalizeParameters:function(_dd,_de){var x;if(_de){var _df={};for(x in _dd){if(x in _de&&!(x in _df)){_dd[x]=_de[x];}}}return _dd;},makeParameters:function(_e0,_e1){var i=null;if(!_e1){return _c6.delegate(_e0);}var _e2={};for(i in _e0){if(!(i in _e2)){_e2[i]=_c6.clone((i in _e1)?_e1[i]:_e0[i]);}}return _e2;},formatNumber:function(x,_e3){var val=x.toString();if(val.indexOf("e")>=0){val=x.toFixed(4);}else{var _e4=val.indexOf(".");if(_e4>=0&&val.length-_e4>5){val=x.toFixed(4);}}if(x<0){return val;}return _e3?" "+val:val;},makeFontString:function(_e5){return _e5.style+" "+_e5.variant+" "+_e5.weight+" "+_e5.size+" "+_e5.family;},splitFontString:function(str){var _e6=g.getDefault("Font");var t=str.split(/\s+/);do{if(t.length<5){break;}_e6.style=t[0];_e6.variant=t[1];_e6.weight=t[2];var i=t[3].indexOf("/");_e6.size=i<0?t[3]:t[3].substring(0,i);var j=4;if(i<0){if(t[4]=="/"){j=6;}else{if(t[4].charAt(0)=="/"){j=5;}}}if(j2){var _e7=g.px_in_pt();var val=parseFloat(len);switch(len.slice(-2)){case "px":return val;case "pt":return val*_e7;case "in":return val*72*_e7;case "pc":return val*12*_e7;case "mm":return val*g.mm_in_pt*_e7;case "cm":return val*g.cm_in_pt*_e7;}}return parseFloat(len);},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-Za-z])|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,equalSources:function(a,b){return a&&b&&a===b;},switchTo:function(_e8){var ns=typeof _e8=="string"?g[_e8]:_e8;if(ns){arr.forEach(["Group","Rect","Ellipse","Circle","Line","Polyline","Image","Text","Path","TextPath","Surface","createSurface","fixTarget"],function(_e9){g[_e9]=ns[_e9];});}}});return g;});},"dojox/gfx/shape":function(){define("dojox/gfx/shape",["./_base","dojo/_base/lang","dojo/_base/declare","dojo/_base/window","dojo/_base/sniff","dojo/_base/connect","dojo/_base/array","dojo/dom-construct","dojo/_base/Color","./matrix"],function(g,_ea,_eb,win,has,_ec,arr,_ed,_ee,_ef){var _f0=g.shape={};var _f1={};var _f2={};var _f3=0,_f4=has("ie")<9;function _f5(_f6){var _f7={};for(var key in _f6){if(_f6.hasOwnProperty(key)){_f7[key]=_f6[key];}}return _f7;};_f0.register=function(_f8){var t=_f8.declaredClass.split(".").pop();var i=t in _f1?++_f1[t]:((_f1[t]=0));var uid=t+i;_f2[uid]=_f8;return uid;};_f0.byId=function(id){return _f2[id];};_f0.dispose=function(_f9){delete _f2[_f9.getUID()];++_f3;if(_f4&&_f3>10000){_f2=_f5(_f2);_f3=0;}};_eb("dojox.gfx.shape.Shape",null,{constructor:function(){this.rawNode=null;this.shape=null;this.matrix=null;this.fillStyle=null;this.strokeStyle=null;this.bbox=null;this.parent=null;this.parentMatrix=null;var uid=_f0.register(this);this.getUID=function(){return uid;};},getNode:function(){return this.rawNode;},getShape:function(){return this.shape;},getTransform:function(){return this.matrix;},getFill:function(){return this.fillStyle;},getStroke:function(){return this.strokeStyle;},getParent:function(){return this.parent;},getBoundingBox:function(){return this.bbox;},getTransformedBoundingBox:function(){var b=this.getBoundingBox();if(!b){return null;}var m=this._getRealMatrix(),gm=_ef;return [gm.multiplyPoint(m,b.x,b.y),gm.multiplyPoint(m,b.x+b.width,b.y),gm.multiplyPoint(m,b.x+b.width,b.y+b.height),gm.multiplyPoint(m,b.x,b.y+b.height)];},getEventSource:function(){return this.rawNode;},setShape:function(_fa){this.shape=g.makeParameters(this.shape,_fa);this.bbox=null;return this;},setFill:function(_fb){if(!_fb){this.fillStyle=null;return this;}var f=null;if(typeof (_fb)=="object"&&"type" in _fb){switch(_fb.type){case "linear":f=g.makeParameters(g.defaultLinearGradient,_fb);break;case "radial":f=g.makeParameters(g.defaultRadialGradient,_fb);break;case "pattern":f=g.makeParameters(g.defaultPattern,_fb);break;}}else{f=g.normalizeColor(_fb);}this.fillStyle=f;return this;},setStroke:function(_fc){if(!_fc){this.strokeStyle=null;return this;}if(typeof _fc=="string"||_ea.isArray(_fc)||_fc instanceof _ee){_fc={color:_fc};}var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_fc);s.color=g.normalizeColor(s.color);return this;},setTransform:function(_fd){this.matrix=_ef.clone(_fd?_ef.normalize(_fd):_ef.identity);return this._applyTransform();},_applyTransform:function(){return this;},moveToFront:function(){var p=this.getParent();if(p){p._moveChildToFront(this);this._moveToFront();}return this;},moveToBack:function(){var p=this.getParent();if(p){p._moveChildToBack(this);this._moveToBack();}return this;},_moveToFront:function(){},_moveToBack:function(){},applyRightTransform:function(_fe){return _fe?this.setTransform([this.matrix,_fe]):this;},applyLeftTransform:function(_ff){return _ff?this.setTransform([_ff,this.matrix]):this;},applyTransform:function(_100){return _100?this.setTransform([this.matrix,_100]):this;},removeShape:function(_101){if(this.parent){this.parent.remove(this,_101);}return this;},_setParent:function(_102,_103){this.parent=_102;return this._updateParentMatrix(_103);},_updateParentMatrix:function(_104){this.parentMatrix=_104?_ef.clone(_104):null;return this._applyTransform();},_getRealMatrix:function(){var m=this.matrix;var p=this.parent;while(p){if(p.matrix){m=_ef.multiply(p.matrix,m);}p=p.parent;}return m;}});_f0._eventsProcessing={connect:function(name,_105,_106){return _ec.connect(this.getEventSource(),name,_f0.fixCallback(this,g.fixTarget,_105,_106));},disconnect:function(_107){_ec.disconnect(_107);}};_f0.fixCallback=function(_108,_109,_10a,_10b){if(!_10b){_10b=_10a;_10a=null;}if(_ea.isString(_10b)){_10a=_10a||win.global;if(!_10a[_10b]){throw (["dojox.gfx.shape.fixCallback: scope[\"",_10b,"\"] is null (scope=\"",_10a,"\")"].join(""));}return function(e){return _109(e,_108)?_10a[_10b].apply(_10a,arguments||[]):undefined;};}return !_10a?function(e){return _109(e,_108)?_10b.apply(_10a,arguments):undefined;}:function(e){return _109(e,_108)?_10b.apply(_10a,arguments||[]):undefined;};};_ea.extend(_f0.Shape,_f0._eventsProcessing);_f0.Container={_init:function(){this.children=[];},openBatch:function(){},closeBatch:function(){},add:function(_10c){var _10d=_10c.getParent();if(_10d){_10d.remove(_10c,true);}this.children.push(_10c);return _10c._setParent(this,this._getRealMatrix());},remove:function(_10e,_10f){for(var i=0;it.x){bbox.l=t.x;}if(bbox.rt.y){bbox.t=t.y;}if(bbox.b";var _132=("adj" in _131.firstChild);_131.innerHTML="";return _132;});return {load:function(id,_133,load){if(_12e&&id!="force"){load(_12e);return;}var _134=_12d.forceGfxRenderer,_135=!_134&&(lang.isString(_12d.gfxRenderer)?_12d.gfxRenderer:"svg,vml,canvas,silverlight").split(","),_136,_137;while(!_134&&_135.length){switch(_135.shift()){case "svg":if("SVGAngle" in win.global){_134="svg";}break;case "vml":if(has("vml")){_134="vml";}break;case "silverlight":try{if(has("ie")){_136=new ActiveXObject("AgControl.AgControl");if(_136&&_136.IsVersionSupported("1.0")){_137=true;}}else{if(navigator.plugins["Silverlight Plug-In"]){_137=true;}}}catch(e){_137=false;}finally{_136=null;}if(_137){_134="silverlight";}break;case "canvas":if(win.global.CanvasRenderingContext2D){_134="canvas";}break;}}if(_134==="canvas"&&_12d.canvasEvents!==false){_134="canvasWithEvents";}if(_12d.isDebug){}function _138(){_133(["dojox/gfx/"+_134],function(_139){g.renderer=_134;_12e=_139;load(_139);});};if(_134=="svg"&&typeof window.svgweb!="undefined"){window.svgweb.addOnLoad(_138);}else{_138();}}};});},"dojox/gfx/vml":function(){define("dojox/gfx/vml",["dojo/_base/lang","dojo/_base/declare","dojo/_base/array","dojo/_base/Color","dojo/_base/sniff","dojo/_base/config","dojo/dom","dojo/dom-geometry","dojo/_base/window","./_base","./shape","./path","./arc","./gradient","./matrix"],function(lang,_13a,arr,_13b,has,_13c,dom,_13d,win,g,gs,_13e,_13f,_140,m){var vml=g.vml={};vml.xmlns="urn:schemas-microsoft-com:vml";document.namespaces.add("v",vml.xmlns);var _141=["*","group","roundrect","oval","shape","rect","imagedata","path","textpath","text"],i=0,l=1,s=document.createStyleSheet();if(has("ie")>=8){i=1;l=_141.length;}for(;i0){a.push({offset:1,color:g.normalizeColor(f.colors[0].color)});}arr.forEach(f.colors,function(v,i){a.push({offset:1-v.offset*c,color:g.normalizeColor(v.color)});});i=a.length-1;while(i>=0&&a[i].offset<0){--i;}if(i2){a.pop();}}i=a.length-1,s=[];if(a[i].offset>0){s.push("0 "+a[i].color.toHex());}for(;i>=0;--i){s.push(a[i].offset.toFixed(5)+" "+a[i].color.toHex());}fo=this.rawNode.fill;fo.colors.value=s.join(";");fo.method="sigma";fo.type="gradientradial";if(isNaN(w)||isNaN(h)||isNaN(l)||isNaN(t)){fo.focusposition="0.5 0.5";}else{fo.focusposition=((f.cx-l)/w).toFixed(5)+" "+((f.cy-t)/h).toFixed(5);}fo.focussize="0 0";fo.on=true;break;case "pattern":f=g.makeParameters(g.defaultPattern,fill);this.fillStyle=f;fo=this.rawNode.fill;fo.type="tile";fo.src=f.src;if(f.width&&f.height){fo.size.x=g.px2pt(f.width);fo.size.y=g.px2pt(f.height);}fo.alignShape="f";fo.position.x=0;fo.position.y=0;fo.origin.x=f.width?f.x/f.width:0;fo.origin.y=f.height?f.y/f.height:0;fo.on=true;break;}this.rawNode.fill.opacity=1;return this;}this.fillStyle=g.normalizeColor(fill);fo=this.rawNode.fill;if(!fo){fo=this.rawNode.ownerDocument.createElement("v:fill");}fo.method="any";fo.type="solid";fo.opacity=this.fillStyle.a;var _144=this.rawNode.filters["DXImageTransform.Microsoft.Alpha"];if(_144){_144.opacity=Math.round(this.fillStyle.a*100);}this.rawNode.fillcolor=this.fillStyle.toHex();this.rawNode.filled=true;return this;},setStroke:function(_145){if(!_145){this.strokeStyle=null;this.rawNode.stroked="f";return this;}if(typeof _145=="string"||lang.isArray(_145)||_145 instanceof _13b){_145={color:_145};}var s=this.strokeStyle=g.makeParameters(g.defaultStroke,_145);s.color=g.normalizeColor(s.color);var rn=this.rawNode;rn.stroked=true;rn.strokecolor=s.color.toCss();rn.strokeweight=s.width+"px";if(rn.stroke){rn.stroke.opacity=s.color.a;rn.stroke.endcap=this._translate(this._capMap,s.cap);if(typeof s.join=="number"){rn.stroke.joinstyle="miter";rn.stroke.miterlimit=s.join;}else{rn.stroke.joinstyle=s.join;}rn.stroke.dashstyle=s.style=="none"?"Solid":s.style;}return this;},_capMap:{butt:"flat"},_capMapReversed:{flat:"butt"},_translate:function(dict,_146){return (_146 in dict)?dict[_146]:_146;},_applyTransform:function(){var _147=this._getRealMatrix();if(_147){var skew=this.rawNode.skew;if(typeof skew=="undefined"){for(var i=0;i7){var node=this.rawNode.ownerDocument.createElement("v:roundrect");node.arcsize=r;node.style.display="inline-block";this.rawNode=node;this.rawNode.__gfxObject__=this.getUID();}else{this.rawNode.arcsize=r;}if(_152){if(_153){_152.insertBefore(this.rawNode,_153);}else{_152.appendChild(this.rawNode);}}var _154=this.rawNode.style;_154.left=_151.x.toFixed();_154.top=_151.y.toFixed();_154.width=(typeof _151.width=="string"&&_151.width.indexOf("%")>=0)?_151.width:Math.max(_151.width.toFixed(),0);_154.height=(typeof _151.height=="string"&&_151.height.indexOf("%")>=0)?_151.height:Math.max(_151.height.toFixed(),0);return this.setTransform(this.matrix).setFill(this.fillStyle).setStroke(this.strokeStyle);}});vml.Rect.nodeType="roundrect";_13a("dojox.gfx.vml.Ellipse",[vml.Shape,gs.Ellipse],{setShape:function(_155){var _156=this.shape=g.makeParameters(this.shape,_155);this.bbox=null;var _157=this.rawNode.style;_157.left=(_156.cx-_156.rx).toFixed();_157.top=(_156.cy-_156.ry).toFixed();_157.width=(_156.rx*2).toFixed();_157.height=(_156.ry*2).toFixed();return this.setTransform(this.matrix);}});vml.Ellipse.nodeType="oval";_13a("dojox.gfx.vml.Circle",[vml.Shape,gs.Circle],{setShape:function(_158){var _159=this.shape=g.makeParameters(this.shape,_158);this.bbox=null;var _15a=this.rawNode.style;_15a.left=(_159.cx-_159.r).toFixed();_15a.top=(_159.cy-_159.r).toFixed();_15a.width=(_159.r*2).toFixed();_15a.height=(_159.r*2).toFixed();return this;}});vml.Circle.nodeType="oval";_13a("dojox.gfx.vml.Line",[vml.Shape,gs.Line],{constructor:function(_15b){if(_15b){_15b.setAttribute("dojoGfxType","line");}},setShape:function(_15c){var _15d=this.shape=g.makeParameters(this.shape,_15c);this.bbox=null;this.rawNode.path.v="m"+_15d.x1.toFixed()+" "+_15d.y1.toFixed()+"l"+_15d.x2.toFixed()+" "+_15d.y2.toFixed()+"e";return this.setTransform(this.matrix);}});vml.Line.nodeType="shape";_13a("dojox.gfx.vml.Polyline",[vml.Shape,gs.Polyline],{constructor:function(_15e){if(_15e){_15e.setAttribute("dojoGfxType","polyline");}},setShape:function(_15f,_160){if(_15f&&_15f instanceof Array){this.shape=g.makeParameters(this.shape,{points:_15f});if(_160&&this.shape.points.length){this.shape.points.push(this.shape.points[0]);}}else{this.shape=g.makeParameters(this.shape,_15f);}this.bbox=null;this._normalizePoints();var attr=[],p=this.shape.points;if(p.length>0){attr.push("m");attr.push(p[0].x.toFixed(),p[0].y.toFixed());if(p.length>1){attr.push("l");for(var i=1;i0&&_163.yy>0){s.filter="";s.width=Math.floor(_163.xx*_165.width);s.height=Math.floor(_163.yy*_165.height);s.left=Math.floor(_163.dx);s.top=Math.floor(_163.dy);}else{var ps=_164.parentNode.style;s.left="0px";s.top="0px";s.width=ps.width;s.height=ps.height;_163=m.multiply(_163,{xx:_165.width/parseInt(s.width),yy:_165.height/parseInt(s.height)});var f=_164.filters["DXImageTransform.Microsoft.Matrix"];if(f){f.M11=_163.xx;f.M12=_163.xy;f.M21=_163.yx;f.M22=_163.yy;f.Dx=_163.dx;f.Dy=_163.dy;}else{s.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+_163.xx+", M12="+_163.xy+", M21="+_163.yx+", M22="+_163.yy+", Dx="+_163.dx+", Dy="+_163.dy+")";}}return this;},_setDimensions:function(_166,_167){var r=this.rawNode,f=r.filters["DXImageTransform.Microsoft.Matrix"];if(f){var s=r.style;s.width=_166;s.height=_167;return this._applyTransform();}return this;}});vml.Image.nodeType="rect";_13a("dojox.gfx.vml.Text",[vml.Shape,gs.Text],{constructor:function(_168){if(_168){_168.setAttribute("dojoGfxType","text");}this.fontStyle=null;},_alignment:{start:"left",middle:"center",end:"right"},setShape:function(_169){this.shape=g.makeParameters(this.shape,_169);this.bbox=null;var r=this.rawNode,s=this.shape,x=s.x,y=s.y.toFixed(),path;switch(s.align){case "middle":x-=5;break;case "end":x-=10;break;}path="m"+x.toFixed()+","+y+"l"+(x+10).toFixed()+","+y+"e";var p=null,t=null,c=r.childNodes;for(var i=0;i1){return;}var path=this[this.renderers[_16f.action]](_16f,last);if(typeof this.vmlPath=="string"){this.vmlPath+=path.join("");this.rawNode.path.v=this.vmlPath+" r0,0 e";}else{Array.prototype.push.apply(this.vmlPath,path);}},setShape:function(_170){this.vmlPath=[];this.lastControl.type="";this.inherited(arguments);this.vmlPath=this.vmlPath.join("");this.rawNode.path.v=this.vmlPath+" r0,0 e";return this;},_pathVmlToSvgMap:{m:"M",l:"L",t:"m",r:"l",c:"C",v:"c",qb:"Q",x:"z",e:""},renderers:{M:"_moveToA",m:"_moveToR",L:"_lineToA",l:"_lineToR",H:"_hLineToA",h:"_hLineToR",V:"_vLineToA",v:"_vLineToR",C:"_curveToA",c:"_curveToR",S:"_smoothCurveToA",s:"_smoothCurveToR",Q:"_qCurveToA",q:"_qCurveToR",T:"_qSmoothCurveToA",t:"_qSmoothCurveToR",A:"_arcTo",a:"_arcTo",Z:"_closePath",z:"_closePath"},_addArgs:function(path,_171,from,upto){var n=_171 instanceof Array?_171:_171.args;for(var i=from;i2){p.push(" l");this._addArgs(p,n,2,l);}this.lastControl.type="";return p;},_moveToR:function(_177,last){return this._moveToA(this._adjustRelCrd(last,_177));},_lineToA:function(_178){var p=[" l"],n=_178 instanceof Array?_178:_178.args;this._addArgs(p,n,0,n.length);this.lastControl.type="";return p;},_lineToR:function(_179,last){return this._lineToA(this._adjustRelCrd(last,_179));},_hLineToA:function(_17a,last){var p=[" l"],y=" "+last.y.toFixed(),n=_17a instanceof Array?_17a:_17a.args,l=n.length;for(var i=0;i7){rs.display="inline-block";}s._parent=p;s._nodes.push(c);p.style.width=_18f;p.style.height=_190;cs.position="absolute";cs.width=_18f;cs.height=_190;cs.clip="rect(0px "+_18f+" "+_190+" 0px)";rs.position="absolute";rs.width=_18f;rs.height=_190;r.coordsize=(_18f==="100%"?_18f:parseFloat(_18f))+" "+(_190==="100%"?_190:parseFloat(_190));r.coordorigin="0 0";var b=s.bgNode=r.ownerDocument.createElement("v:rect"),bs=b.style;bs.left=bs.top=0;bs.width=rs.width;bs.height=rs.height;b.filled=b.stroked="f";r.appendChild(b);c.appendChild(r);p.appendChild(c);s.width=g.normalizedLength(_18f);s.height=g.normalizedLength(_190);return s;};function _191(_192,f,o){o=o||win.global;f.call(o,_192);if(_192 instanceof g.Surface||_192 instanceof g.Group){arr.forEach(_192.children,function(_193){_191(_193,f,o);});}};var _194=function(_195){if(this!=_195.getParent()){var _196=_195.getParent();if(_196){_196.remove(_195);}this.rawNode.appendChild(_195.rawNode);C.add.apply(this,arguments);_191(this,function(s){if(typeof (s.getFont)=="function"){s.setShape(s.getShape());s.setFont(s.getFont());}if(typeof (s.setFill)=="function"){s.setFill(s.getFill());s.setStroke(s.getStroke());}});}return this;};var _197=function(_198){if(this!=_198.getParent()){this.rawNode.appendChild(_198.rawNode);if(!_198.getParent()){_198.setFill(_198.getFill());_198.setStroke(_198.getStroke());}C.add.apply(this,arguments);}return this;};var C=gs.Container,_199={add:_13c.fixVmlAdd===true?_194:_197,remove:function(_19a,_19b){if(this==_19a.getParent()){if(this.rawNode==_19a.rawNode.parentNode){this.rawNode.removeChild(_19a.rawNode);}C.remove.apply(this,arguments);}return this;},clear:function(){var r=this.rawNode;while(r.firstChild!=r.lastChild){if(r.firstChild!=this.bgNode){r.removeChild(r.firstChild);}if(r.lastChild!=this.bgNode){r.removeChild(r.lastChild);}}return C.clear.apply(this,arguments);},_moveChildToFront:C._moveChildToFront,_moveChildToBack:C._moveChildToBack};var _19c={createGroup:function(){var node=this.createObject(vml.Group,null);var r=node.rawNode.ownerDocument.createElement("v:rect");r.style.left=r.style.top=0;r.style.width=node.rawNode.style.width;r.style.height=node.rawNode.style.height;r.filled=r.stroked="f";node.rawNode.appendChild(r);node.bgNode=r;return node;},createImage:function(_19d){if(!this.rawNode){return null;}var _19e=new vml.Image(),doc=this.rawNode.ownerDocument,node=doc.createElement("v:rect");node.stroked="f";node.style.width=this.rawNode.style.width;node.style.height=this.rawNode.style.height;var img=doc.createElement("v:imagedata");node.appendChild(img);_19e.setRawNode(node);this.rawNode.appendChild(node);_19e.setShape(_19d);this.add(_19e);return _19e;},createRect:function(rect){if(!this.rawNode){return null;}var _19f=new vml.Rect,node=this.rawNode.ownerDocument.createElement("v:roundrect");if(has("ie")>7){node.style.display="inline-block";}_19f.setRawNode(node);this.rawNode.appendChild(node);_19f.setShape(rect);this.add(_19f);return _19f;},createObject:function(_1a0,_1a1){if(!this.rawNode){return null;}var _1a2=new _1a0(),node=this.rawNode.ownerDocument.createElement("v:"+_1a0.nodeType);_1a2.setRawNode(node);this.rawNode.appendChild(node);switch(_1a0){case vml.Group:case vml.Line:case vml.Polyline:case vml.Image:case vml.Text:case vml.Path:case vml.TextPath:this._overrideSize(node);}_1a2.setShape(_1a1);this.add(_1a2);return _1a2;},_overrideSize:function(node){var s=this.rawNode.style,w=s.width,h=s.height;node.style.width=w;node.style.height=h;node.coordsize=parseInt(w)+" "+parseInt(h);}};lang.extend(vml.Group,_199);lang.extend(vml.Group,gs.Creator);lang.extend(vml.Group,_19c);lang.extend(vml.Surface,_199);lang.extend(vml.Surface,gs.Creator);lang.extend(vml.Surface,_19c);vml.fixTarget=function(_1a3,_1a4){if(!_1a3.gfxTarget){_1a3.gfxTarget=gs.byId(_1a3.target.__gfxObject__);}return true;};return vml;});},"*noref":1}});define("dojox/_dojox_gfx",[],1);require(["dojox/gfx"]);/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dojox/lang/functional/array":function(){define("dojox/lang/functional/array",["dojo/_base/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/window","./lambda"],function(_1,_2,_3,_4,df){var _5={};_2.mixin(df,{filter:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||_4.global;f=df.lambda(f);var t=[],v,i,n;if(_2.isArray(a)){for(i=0,n=a.length;i_16){_1d-=1;}return {text:(s.substring(0,_1d)+this.trailingSymbol),truncated:true};}var _1e=_1d+Math.round((end-_1d)*_19),_1f=this.getTextWidth(s.substring(0,_1e),_15);if(_1f<_16){_1d=_1e;end=end;}else{_1d=_1d;end=_1e;}}}},getTextWithLimitCharCount:function(s,_20,_21,_22){if(!s||s.length<=0){return {text:"",truncated:_22||false};}if(!_21||_21<=0||s.length<=_21){return {text:s,truncated:_22||false};}return {text:s.substring(0,_21)+this.trailingSymbol,truncated:true};},_plotFill:function(_23,dim,_24){if(!_23||!_23.type||!_23.space){return _23;}var _25=_23.space;switch(_23.type){case "linear":if(_25==="plot"||_25==="shapeX"||_25==="shapeY"){_23=_a.makeParameters(_a.defaultLinearGradient,_23);_23.space=_25;if(_25==="plot"||_25==="shapeX"){var _26=dim.height-_24.t-_24.b;_23.y1=_24.t+_26*_23.y1/100;_23.y2=_24.t+_26*_23.y2/100;}if(_25==="plot"||_25==="shapeY"){var _26=dim.width-_24.l-_24.r;_23.x1=_24.l+_26*_23.x1/100;_23.x2=_24.l+_26*_23.x2/100;}}break;case "radial":if(_25==="plot"){_23=_a.makeParameters(_a.defaultRadialGradient,_23);_23.space=_25;var _27=dim.width-_24.l-_24.r,_28=dim.height-_24.t-_24.b;_23.cx=_24.l+_27*_23.cx/100;_23.cy=_24.t+_28*_23.cy/100;_23.r=_23.r*Math.sqrt(_27*_27+_28*_28)/200;}break;case "pattern":if(_25==="plot"||_25==="shapeX"||_25==="shapeY"){_23=_a.makeParameters(_a.defaultPattern,_23);_23.space=_25;if(_25==="plot"||_25==="shapeX"){var _26=dim.height-_24.t-_24.b;_23.y=_24.t+_26*_23.y/100;_23.height=_26*_23.height/100;}if(_25==="plot"||_25==="shapeY"){var _26=dim.width-_24.l-_24.r;_23.x=_24.l+_26*_23.x/100;_23.width=_26*_23.width/100;}}break;}return _23;},_shapeFill:function(_29,_2a){if(!_29||!_29.space){return _29;}var _2b=_29.space;switch(_29.type){case "linear":if(_2b==="shape"||_2b==="shapeX"||_2b==="shapeY"){_29=_a.makeParameters(_a.defaultLinearGradient,_29);_29.space=_2b;if(_2b==="shape"||_2b==="shapeX"){var _2c=_2a.width;_29.x1=_2a.x+_2c*_29.x1/100;_29.x2=_2a.x+_2c*_29.x2/100;}if(_2b==="shape"||_2b==="shapeY"){var _2c=_2a.height;_29.y1=_2a.y+_2c*_29.y1/100;_29.y2=_2a.y+_2c*_29.y2/100;}}break;case "radial":if(_2b==="shape"){_29=_a.makeParameters(_a.defaultRadialGradient,_29);_29.space=_2b;_29.cx=_2a.x+_2a.width/2;_29.cy=_2a.y+_2a.height/2;_29.r=_29.r*_2a.width/200;}break;case "pattern":if(_2b==="shape"||_2b==="shapeX"||_2b==="shapeY"){_29=_a.makeParameters(_a.defaultPattern,_29);_29.space=_2b;if(_2b==="shape"||_2b==="shapeX"){var _2c=_2a.width;_29.x=_2a.x+_2c*_29.x/100;_29.width=_2c*_29.width/100;}if(_2b==="shape"||_2b==="shapeY"){var _2c=_2a.height;_29.y=_2a.y+_2c*_29.y/100;_29.height=_2c*_29.height/100;}}break;}return _29;},_pseudoRadialFill:function(_2d,_2e,_2f,_30,end){if(!_2d||_2d.type!=="radial"||_2d.space!=="shape"){return _2d;}var _31=_2d.space;_2d=_a.makeParameters(_a.defaultRadialGradient,_2d);_2d.space=_31;if(arguments.length<4){_2d.cx=_2e.x;_2d.cy=_2e.y;_2d.r=_2d.r*_2f/100;return _2d;}var _32=arguments.length<5?_30:(end+_30)/2;return {type:"linear",x1:_2e.x,y1:_2e.y,x2:_2e.x+_2d.r*_2f*Math.cos(_32)/100,y2:_2e.y+_2d.r*_2f*Math.sin(_32)/100,colors:_2d.colors};return _2d;}});});},"dojox/gfx/utils":function(){define("dojox/gfx/utils",["dojo/_base/kernel","dojo/_base/lang","./_base","dojo/_base/html","dojo/_base/array","dojo/_base/window","dojo/_base/json","dojo/_base/Deferred","dojo/_base/sniff","require","dojo/_base/config"],function(_33,_34,g,_35,arr,win,_36,_37,has,_38,_39){var gu=g.utils={};_34.mixin(gu,{forEach:function(_3a,f,o){o=o||win.global;f.call(o,_3a);if(_3a instanceof g.Surface||_3a instanceof g.Group){arr.forEach(_3a.children,function(_3b){gu.forEach(_3b,f,o);});}},serialize:function(_3c){var t={},v,_3d=_3c instanceof g.Surface;if(_3d||_3c instanceof g.Group){t.children=arr.map(_3c.children,gu.serialize);if(_3d){return t.children;}}else{t.shape=_3c.getShape();}if(_3c.getTransform){v=_3c.getTransform();if(v){t.transform=v;}}if(_3c.getStroke){v=_3c.getStroke();if(v){t.stroke=v;}}if(_3c.getFill){v=_3c.getFill();if(v){t.fill=v;}}if(_3c.getFont){v=_3c.getFont();if(v){t.font=v;}}return t;},toJson:function(_3e,_3f){return _36.toJson(gu.serialize(_3e),_3f);},deserialize:function(_40,_41){if(_41 instanceof Array){return arr.map(_41,_34.hitch(null,gu.deserialize,_40));}var _42=("shape" in _41)?_40.createShape(_41.shape):_40.createGroup();if("transform" in _41){_42.setTransform(_41.transform);}if("stroke" in _41){_42.setStroke(_41.stroke);}if("fill" in _41){_42.setFill(_41.fill);}if("font" in _41){_42.setFont(_41.font);}if("children" in _41){arr.forEach(_41.children,_34.hitch(null,gu.deserialize,_42));}return _42;},fromJson:function(_43,_44){return gu.deserialize(_43,_36.fromJson(_44));},toSvg:function(_45){var _46=new _37();if(g.renderer==="svg"){try{var svg=gu._cleanSvg(gu._innerXML(_45.rawNode));_46.callback(svg);}catch(e){_46.errback(e);}}else{if(!gu._initSvgSerializerDeferred){gu._initSvgSerializer();}var _47=gu.toJson(_45);var _48=function(){try{var _49=_45.getDimensions();var _4a=_49.width;var _4b=_49.height;var _4c=gu._gfxSvgProxy.document.createElement("div");gu._gfxSvgProxy.document.body.appendChild(_4c);win.withDoc(gu._gfxSvgProxy.document,function(){_35.style(_4c,"width",_4a);_35.style(_4c,"height",_4b);},this);var ts=gu._gfxSvgProxy[dojox._scopeName].gfx.createSurface(_4c,_4a,_4b);var _4d=function(_4e){try{gu._gfxSvgProxy[dojox._scopeName].gfx.utils.fromJson(_4e,_47);var svg=gu._cleanSvg(_4c.innerHTML);_4e.clear();_4e.destroy();gu._gfxSvgProxy.document.body.removeChild(_4c);_46.callback(svg);}catch(e){_46.errback(e);}};ts.whenLoaded(null,_4d);}catch(ex){_46.errback(ex);}};if(gu._initSvgSerializerDeferred.fired>0){_48();}else{gu._initSvgSerializerDeferred.addCallback(_48);}}return _46;},_gfxSvgProxy:null,_initSvgSerializerDeferred:null,_svgSerializerInitialized:function(){gu._initSvgSerializerDeferred.callback(true);},_initSvgSerializer:function(){if(!gu._initSvgSerializerDeferred){gu._initSvgSerializerDeferred=new _37();var f=win.doc.createElement("iframe");_35.style(f,{display:"none",position:"absolute",width:"1em",height:"1em",top:"-10000px"});var _4f;if(has("ie")){f.onreadystatechange=function(){if(f.contentWindow.document.readyState=="complete"){f.onreadystatechange=function(){};_4f=setInterval(function(){if(f.contentWindow[_33.scopeMap["dojo"][1]._scopeName]&&f.contentWindow[_33.scopeMap["dojox"][1]._scopeName].gfx&&f.contentWindow[_33.scopeMap["dojox"][1]._scopeName].gfx.utils){clearInterval(_4f);f.contentWindow.parent[_33.scopeMap["dojox"][1]._scopeName].gfx.utils._gfxSvgProxy=f.contentWindow;f.contentWindow.parent[_33.scopeMap["dojox"][1]._scopeName].gfx.utils._svgSerializerInitialized();}},50);}};}else{f.onload=function(){f.onload=function(){};_4f=setInterval(function(){if(f.contentWindow[_33.scopeMap["dojo"][1]._scopeName]&&f.contentWindow[_33.scopeMap["dojox"][1]._scopeName].gfx&&f.contentWindow[_33.scopeMap["dojox"][1]._scopeName].gfx.utils){clearInterval(_4f);f.contentWindow.parent[_33.scopeMap["dojox"][1]._scopeName].gfx.utils._gfxSvgProxy=f.contentWindow;f.contentWindow.parent[_33.scopeMap["dojox"][1]._scopeName].gfx.utils._svgSerializerInitialized();}},50);};}var uri=(_39["dojoxGfxSvgProxyFrameUrl"]||_38.toUrl("dojox/gfx/resources/gfxSvgProxyFrame.html"));f.setAttribute("src",uri.toString());win.body().appendChild(f);}},_innerXML:function(_50){if(_50.innerXML){return _50.innerXML;}else{if(_50.xml){return _50.xml;}else{if(typeof XMLSerializer!="undefined"){return (new XMLSerializer()).serializeToString(_50);}}}return null;},_cleanSvg:function(svg){if(svg){if(svg.indexOf("xmlns=\"http://www.w3.org/2000/svg\"")==-1){svg=svg.substring(4,svg.length);svg=")/g,"=\"$1\"$2");svg=svg.replace(/\bstroke-opacity\w*\s*=\s*(['"])undefined\1/g,"");}return svg;}});return gu;});},"dojox/main":function(){define("dojox/main",["dojo/_base/kernel"],function(_51){return _51.dojox;});},"dojox/lang/functional/reversed":function(){define("dojox/lang/functional/reversed",["dojo/_base/lang","dojo/_base/window","./lambda"],function(_52,win,df){_52.mixin(df,{filterRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);var t=[],v,i=a.length-1;for(;i>=0;--i){v=a[i];if(f.call(o,v,i,a)){t.push(v);}}return t;},forEachRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);for(var i=a.length-1;i>=0;f.call(o,a[i],i,a),--i){}},mapRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);var n=a.length,t=new Array(n),i=n-1,j=0;for(;i>=0;t[j++]=f.call(o,a[i],i,a),--i){}return t;},everyRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);for(var i=a.length-1;i>=0;--i){if(!f.call(o,a[i],i,a)){return false;}}return true;},someRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);for(var i=a.length-1;i>=0;--i){if(f.call(o,a[i],i,a)){return true;}}return false;}});return df;});},"dojox/charting/Chart":function(){define("dojox/charting/Chart",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/html","dojo/dom","dojo/dom-geometry","dojo/dom-construct","dojo/_base/Color","dojo/_base/sniff","./Element","./Theme","./Series","./axis2d/common","dojox/gfx/shape","dojox/gfx","dojox/lang/functional","dojox/lang/functional/fold","dojox/lang/functional/reversed"],function(_53,arr,_54,_55,dom,_56,_57,_58,has,_59,_5a,_5b,_5c,_5d,g,_5e,_5f,_60){var dc=dojox.charting,_61=_5e.lambda("item.clear()"),_62=_5e.lambda("item.purgeGroup()"),_63=_5e.lambda("item.destroy()"),_64=_5e.lambda("item.dirty = false"),_65=_5e.lambda("item.dirty = true"),_66=_5e.lambda("item.name");_54("dojox.charting.Chart",null,{constructor:function(_67,_68){if(!_68){_68={};}this.margins=_68.margins?_68.margins:{l:10,t:10,r:10,b:10};this.stroke=_68.stroke;this.fill=_68.fill;this.delayInMs=_68.delayInMs||200;this.title=_68.title;this.titleGap=_68.titleGap;this.titlePos=_68.titlePos;this.titleFont=_68.titleFont;this.titleFontColor=_68.titleFontColor;this.chartTitle=null;this.theme=null;this.axes={};this.stack=[];this.plots={};this.series=[];this.runs={};this.dirty=true;this.coords=null;this._clearRects=[];this.node=dom.byId(_67);var box=_56.getMarginBox(_67);this.surface=g.createSurface(this.node,box.w||400,box.h||300);},destroy:function(){arr.forEach(this.series,_63);arr.forEach(this.stack,_63);_5e.forIn(this.axes,_63);if(this.chartTitle&&this.chartTitle.tagName){_57.destroy(this.chartTitle);}arr.forEach(this._clearRects,function(_69){_5d.dispose(_69);});this.surface.destroy();},getCoords:function(){return _55.coords(this.node,true);},setTheme:function(_6a){this.theme=_6a.clone();this.dirty=true;return this;},addAxis:function(_6b,_6c){var _6d,_6e=_6c&&_6c.type||"Default";if(typeof _6e=="string"){if(!dc.axis2d||!dc.axis2d[_6e]){throw Error("Can't find axis: "+_6e+" - Check "+"require() dependencies.");}_6d=new dc.axis2d[_6e](this,_6c);}else{_6d=new _6e(this,_6c);}_6d.name=_6b;_6d.dirty=true;if(_6b in this.axes){this.axes[_6b].destroy();}this.axes[_6b]=_6d;this.dirty=true;return this;},getAxis:function(_6f){return this.axes[_6f];},removeAxis:function(_70){if(_70 in this.axes){this.axes[_70].destroy();delete this.axes[_70];this.dirty=true;}return this;},addPlot:function(_71,_72){var _73,_74=_72&&_72.type||"Default";if(typeof _74=="string"){if(!dc.plot2d||!dc.plot2d[_74]){throw Error("Can't find plot: "+_74+" - didn't you forget to dojo"+".require() it?");}_73=new dc.plot2d[_74](this,_72);}else{_73=new _74(this,_72);}_73.name=_71;_73.dirty=true;if(_71 in this.plots){this.stack[this.plots[_71]].destroy();this.stack[this.plots[_71]]=_73;}else{this.plots[_71]=this.stack.length;this.stack.push(_73);}this.dirty=true;return this;},getPlot:function(_75){return this.stack[this.plots[_75]];},removePlot:function(_76){if(_76 in this.plots){var _77=this.plots[_76];delete this.plots[_76];this.stack[_77].destroy();this.stack.splice(_77,1);_5e.forIn(this.plots,function(idx,_78,_79){if(idx>_77){_79[_78]=idx-1;}});var ns=arr.filter(this.series,function(run){return run.plot!=_76;});if(ns.length_8f){_91[_90]=idx-1;}});this.dirty=true;}return this;},updateSeries:function(_92,_93){if(_92 in this.runs){var run=this.series[this.runs[_92]];run.update(_93);this._invalidateDependentPlots(run.plot,false);this._invalidateDependentPlots(run.plot,true);}return this;},getSeriesOrder:function(_94){return _5e.map(_5e.filter(this.series,function(run){return run.plot==_94;}),_66);},setSeriesOrder:function(_95){var _96,_97={},_98=_5e.filter(_95,function(_99){if(!(_99 in this.runs)||(_99 in _97)){return false;}var run=this.series[this.runs[_99]];if(_96){if(run.plot!=_96){return false;}}else{_96=run.plot;}_97[_99]=1;return true;},this);_5e.forEach(this.series,function(run){var _9a=run.name;if(!(_9a in _97)&&run.plot==_96){_98.push(_9a);}});var _9b=_5e.map(_98,function(_9c){return this.series[this.runs[_9c]];},this);this.series=_9b.concat(_5e.filter(this.series,function(run){return run.plot!=_96;}));_5e.forEach(this.series,function(run,i){this.runs[run.name]=i;},this);this.dirty=true;return this;},moveSeriesToFront:function(_9d){if(_9d in this.runs){var _9e=this.runs[_9d],_9f=this.getSeriesOrder(this.series[_9e].plot);if(_9d!=_9f[0]){_9f.splice(_9e,1);_9f.unshift(_9d);return this.setSeriesOrder(_9f);}}return this;},moveSeriesToBack:function(_a0){if(_a0 in this.runs){var _a1=this.runs[_a0],_a2=this.getSeriesOrder(this.series[_a1].plot);if(_a0!=_a2[_a2.length-1]){_a2.splice(_a1,1);_a2.push(_a0);return this.setSeriesOrder(_a2);}}return this;},resize:function(_a3,_a4){var box;switch(arguments.length){case 1:box=_53.mixin({},_a3);_56.setMarginBox(this.node,box);break;case 2:box={w:_a3,h:_a4};_56.setMarginBox(this.node,box);break;}box=_56.getMarginBox(this.node);var d=this.surface.getDimensions();if(d.width!=box.w||d.height!=box.h){this.surface.setDimensions(box.w,box.h);this.dirty=true;return this.render();}else{return this;}},getGeometry:function(){var ret={};_5e.forIn(this.axes,function(_a5){if(_a5.initialized()){ret[_a5.name]={name:_a5.name,vertical:_a5.vertical,scaler:_a5.scaler,ticks:_a5.ticks};}});return ret;},setAxisWindow:function(_a6,_a7,_a8,_a9){var _aa=this.axes[_a6];if(_aa){_aa.setWindow(_a7,_a8);arr.forEach(this.stack,function(_ab){if(_ab.hAxis==_a6||_ab.vAxis==_a6){_ab.zoom=_a9;}});}return this;},setWindow:function(sx,sy,dx,dy,_ac){if(!("plotArea" in this)){this.calculateGeometry();}_5e.forIn(this.axes,function(_ad){var _ae,_af,_b0=_ad.getScaler().bounds,s=_b0.span/(_b0.upper-_b0.lower);if(_ad.vertical){_ae=sy;_af=dy/s/_ae;}else{_ae=sx;_af=dx/s/_ae;}_ad.setWindow(_ae,_af);});arr.forEach(this.stack,function(_b1){_b1.zoom=_ac;});return this;},zoomIn:function(_b2,_b3){var _b4=this.axes[_b2];if(_b4){var _b5,_b6,_b7=_b4.getScaler().bounds;var _b8=Math.min(_b3[0],_b3[1]);var _b9=Math.max(_b3[0],_b3[1]);_b8=_b3[0]<_b7.lower?_b7.lower:_b8;_b9=_b3[1]>_b7.upper?_b7.upper:_b9;_b5=(_b7.upper-_b7.lower)/(_b9-_b8);_b6=_b8-_b7.lower;this.setAxisWindow(_b2,_b5,_b6);this.render();}},calculateGeometry:function(){if(this.dirty){return this.fullGeometry();}var _ba=arr.filter(this.stack,function(_bb){return _bb.dirty||(_bb.hAxis&&this.axes[_bb.hAxis].dirty)||(_bb.vAxis&&this.axes[_bb.vAxis].dirty);},this);_bc(_ba,this.plotArea);return this;},fullGeometry:function(){this._makeDirty();arr.forEach(this.stack,_61);if(!this.theme){this.setTheme(new _5a(dojox.charting._def));}arr.forEach(this.series,function(run){if(!(run.plot in this.plots)){if(!dc.plot2d||!dc.plot2d.Default){throw Error("Can't find plot: Default - didn't you forget to dojo"+".require() it?");}var _bd=new dc.plot2d.Default(this,{});_bd.name=run.plot;this.plots[run.plot]=this.stack.length;this.stack.push(_bd);}this.stack[this.plots[run.plot]].addSeries(run);},this);arr.forEach(this.stack,function(_be){if(_be.hAxis){_be.setAxis(this.axes[_be.hAxis]);}if(_be.vAxis){_be.setAxis(this.axes[_be.vAxis]);}},this);var dim=this.dim=this.surface.getDimensions();dim.width=g.normalizedLength(dim.width);dim.height=g.normalizedLength(dim.height);_5e.forIn(this.axes,_61);_bc(this.stack,dim);var _bf=this.offsets={l:0,r:0,t:0,b:0};_5e.forIn(this.axes,function(_c0){_5e.forIn(_c0.getOffsets(),function(o,i){_bf[i]+=o;});});if(this.title){this.titleGap=(this.titleGap==0)?0:this.titleGap||this.theme.chart.titleGap||20;this.titlePos=this.titlePos||this.theme.chart.titlePos||"top";this.titleFont=this.titleFont||this.theme.chart.titleFont;this.titleFontColor=this.titleFontColor||this.theme.chart.titleFontColor||"black";var _c1=g.normalizedLength(g.splitFontString(this.titleFont).size);_bf[this.titlePos=="top"?"t":"b"]+=(_c1+this.titleGap);}_5e.forIn(this.margins,function(o,i){_bf[i]+=o;});this.plotArea={width:dim.width-_bf.l-_bf.r,height:dim.height-_bf.t-_bf.b};_5e.forIn(this.axes,_61);_bc(this.stack,this.plotArea);return this;},render:function(){if(this.theme){this.theme.clear();}if(this.dirty){return this.fullRender();}this.calculateGeometry();_5e.forEachRev(this.stack,function(_c2){_c2.render(this.dim,this.offsets);},this);_5e.forIn(this.axes,function(_c3){_c3.render(this.dim,this.offsets);},this);this._makeClean();if(this.surface.render){this.surface.render();}return this;},fullRender:function(){this.fullGeometry();var _c4=this.offsets,dim=this.dim,_c5;arr.forEach(this.series,_62);_5e.forIn(this.axes,_62);arr.forEach(this.stack,_62);arr.forEach(this._clearRects,function(_c6){_5d.dispose(_c6);});this._clearRects=[];if(this.chartTitle&&this.chartTitle.tagName){_57.destroy(this.chartTitle);}this.surface.clear();this.chartTitle=null;var t=this.theme,_c7=t.plotarea&&t.plotarea.fill,_c8=t.plotarea&&t.plotarea.stroke,w=Math.max(0,dim.width-_c4.l-_c4.r),h=Math.max(0,dim.height-_c4.t-_c4.b),_c5={x:_c4.l-1,y:_c4.t-1,width:w+2,height:h+2};if(_c7){_c7=_59.prototype._shapeFill(_59.prototype._plotFill(_c7,dim,_c4),_c5);this._clearRects.push(this.surface.createRect(_c5).setFill(_c7));}if(_c8){this._clearRects.push(this.surface.createRect({x:_c4.l,y:_c4.t,width:w+1,height:h+1}).setStroke(_c8));}_5e.foldr(this.stack,function(z,_c9){return _c9.render(dim,_c4),0;},0);_c7=this.fill!==undefined?this.fill:(t.chart&&t.chart.fill);_c8=this.stroke!==undefined?this.stroke:(t.chart&&t.chart.stroke);if(_c7=="inherit"){var _ca=this.node,_c7=new _58(_55.style(_ca,"backgroundColor"));while(_c7.a==0&&_ca!=document.documentElement){_c7=new _58(_55.style(_ca,"backgroundColor"));_ca=_ca.parentNode;}}if(_c7){_c7=_59.prototype._plotFill(_c7,dim,_c4);if(_c4.l){_c5={width:_c4.l,height:dim.height+1};this._clearRects.push(this.surface.createRect(_c5).setFill(_59.prototype._shapeFill(_c7,_c5)));}if(_c4.r){_c5={x:dim.width-_c4.r,width:_c4.r+1,height:dim.height+2};this._clearRects.push(this.surface.createRect(_c5).setFill(_59.prototype._shapeFill(_c7,_c5)));}if(_c4.t){_c5={width:dim.width+1,height:_c4.t};this._clearRects.push(this.surface.createRect(_c5).setFill(_59.prototype._shapeFill(_c7,_c5)));}if(_c4.b){_c5={y:dim.height-_c4.b,width:dim.width+1,height:_c4.b+2};this._clearRects.push(this.surface.createRect(_c5).setFill(_59.prototype._shapeFill(_c7,_c5)));}}if(_c8){this._clearRects.push(this.surface.createRect({width:dim.width-1,height:dim.height-1}).setStroke(_c8));}if(this.title){var _cb=(g.renderer=="canvas"),_cc=_cb||!has("ie")&&!has("opera")?"html":"gfx",_cd=g.normalizedLength(g.splitFontString(this.titleFont).size);this.chartTitle=_5c.createText[_cc](this,this.surface,dim.width/2,this.titlePos=="top"?_cd+this.margins.t:dim.height-this.margins.b,"middle",this.title,this.titleFont,this.titleFontColor);}_5e.forIn(this.axes,function(_ce){_ce.render(dim,_c4);});this._makeClean();if(this.surface.render){this.surface.render();}return this;},delayedRender:function(){if(!this._delayedRenderHandle){this._delayedRenderHandle=setTimeout(_53.hitch(this,function(){clearTimeout(this._delayedRenderHandle);this._delayedRenderHandle=null;this.render();}),this.delayInMs);}return this;},connectToPlot:function(_cf,_d0,_d1){return _cf in this.plots?this.stack[this.plots[_cf]].connect(_d0,_d1):null;},fireEvent:function(_d2,_d3,_d4){if(_d2 in this.runs){var _d5=this.series[this.runs[_d2]].plot;if(_d5 in this.plots){var _d6=this.stack[this.plots[_d5]];if(_d6){_d6.fireEvent(_d2,_d3,_d4);}}}return this;},_makeClean:function(){arr.forEach(this.axes,_64);arr.forEach(this.stack,_64);arr.forEach(this.series,_64);this.dirty=false;},_makeDirty:function(){arr.forEach(this.axes,_65);arr.forEach(this.stack,_65);arr.forEach(this.series,_65);this.dirty=true;},_invalidateDependentPlots:function(_d7,_d8){if(_d7 in this.plots){var _d9=this.stack[this.plots[_d7]],_da,_db=_d8?"vAxis":"hAxis";if(_d9[_db]){_da=this.axes[_d9[_db]];if(_da&&_da.dependOnData()){_da.dirty=true;arr.forEach(this.stack,function(p){if(p[_db]&&p[_db]==_d9[_db]){p.dirty=true;}});}}else{_d9.dirty=true;}}}});function _dc(_dd){return {min:_dd.hmin,max:_dd.hmax};};function _de(_df){return {min:_df.vmin,max:_df.vmax};};function _e0(_e1,h){_e1.hmin=h.min;_e1.hmax=h.max;};function _e2(_e3,v){_e3.vmin=v.min;_e3.vmax=v.max;};function _e4(_e5,_e6){if(_e5&&_e6){_e5.min=Math.min(_e5.min,_e6.min);_e5.max=Math.max(_e5.max,_e6.max);}return _e5||_e6;};function _bc(_e7,_e8){var _e9={},_ea={};arr.forEach(_e7,function(_eb){var _ec=_e9[_eb.name]=_eb.getSeriesStats();if(_eb.hAxis){_ea[_eb.hAxis]=_e4(_ea[_eb.hAxis],_dc(_ec));}if(_eb.vAxis){_ea[_eb.vAxis]=_e4(_ea[_eb.vAxis],_de(_ec));}});arr.forEach(_e7,function(_ed){var _ee=_e9[_ed.name];if(_ed.hAxis){_e0(_ee,_ea[_ed.hAxis]);}if(_ed.vAxis){_e2(_ee,_ea[_ed.vAxis]);}_ed.initializeScalers(_e8,_ee);});};return dojox.charting.Chart;});},"dojox/color/Palette":function(){define("dojox/color/Palette",["dojo/_base/kernel","../main","dojo/_base/lang","dojo/_base/array","./_base"],function(_ef,_f0,_f1,arr,dxc){dxc.Palette=function(_f2){this.colors=[];if(_f2 instanceof dxc.Palette){this.colors=_f2.colors.slice(0);}else{if(_f2 instanceof dxc.Color){this.colors=[null,null,_f2,null,null];}else{if(_f1.isArray(_f2)){this.colors=arr.map(_f2.slice(0),function(_f3){if(_f1.isString(_f3)){return new dxc.Color(_f3);}return _f3;});}else{if(_f1.isString(_f2)){this.colors=[null,null,new dxc.Color(_f2),null,null];}}}}};function _f4(p,_f5,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(_f6){var r=(_f5=="dr")?_f6.r+val:_f6.r,g=(_f5=="dg")?_f6.g+val:_f6.g,b=(_f5=="db")?_f6.b+val:_f6.b,a=(_f5=="da")?_f6.a+val:_f6.a;ret.colors.push(new dxc.Color({r:Math.min(255,Math.max(0,r)),g:Math.min(255,Math.max(0,g)),b:Math.min(255,Math.max(0,b)),a:Math.min(1,Math.max(0,a))}));});return ret;};function _f7(p,_f8,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(_f9){var o=_f9.toCmy(),c=(_f8=="dc")?o.c+val:o.c,m=(_f8=="dm")?o.m+val:o.m,y=(_f8=="dy")?o.y+val:o.y;ret.colors.push(dxc.fromCmy(Math.min(100,Math.max(0,c)),Math.min(100,Math.max(0,m)),Math.min(100,Math.max(0,y))));});return ret;};function _fa(p,_fb,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(_fc){var o=_fc.toCmyk(),c=(_fb=="dc")?o.c+val:o.c,m=(_fb=="dm")?o.m+val:o.m,y=(_fb=="dy")?o.y+val:o.y,k=(_fb=="dk")?o.b+val:o.b;ret.colors.push(dxc.fromCmyk(Math.min(100,Math.max(0,c)),Math.min(100,Math.max(0,m)),Math.min(100,Math.max(0,y)),Math.min(100,Math.max(0,k))));});return ret;};function _fd(p,_fe,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(_ff){var o=_ff.toHsl(),h=(_fe=="dh")?o.h+val:o.h,s=(_fe=="ds")?o.s+val:o.s,l=(_fe=="dl")?o.l+val:o.l;ret.colors.push(dxc.fromHsl(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,l))));});return ret;};function tHSV(p,_100,val){var ret=new dxc.Palette();ret.colors=[];arr.forEach(p.colors,function(item){var o=item.toHsv(),h=(_100=="dh")?o.h+val:o.h,s=(_100=="ds")?o.s+val:o.s,v=(_100=="dv")?o.v+val:o.v;ret.colors.push(dxc.fromHsv(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,v))));});return ret;};function _101(val,low,high){return high-((high-val)*((high-low)/high));};_f1.extend(dxc.Palette,{transform:function(_102){var fn=_f4;if(_102.use){var use=_102.use.toLowerCase();if(use.indexOf("hs")==0){if(use.charAt(2)=="l"){fn=_fd;}else{fn=tHSV;}}else{if(use.indexOf("cmy")==0){if(use.charAt(3)=="k"){fn=_fa;}else{fn=_f7;}}}}else{if("dc" in _102||"dm" in _102||"dy" in _102){if("dk" in _102){fn=_fa;}else{fn=_f7;}}else{if("dh" in _102||"ds" in _102){if("dv" in _102){fn=tHSV;}else{fn=_fd;}}}}var _103=this;for(var p in _102){if(p=="use"){continue;}_103=fn(_103,p,_102[p]);}return _103;},clone:function(){return new dxc.Palette(this);}});_f1.mixin(dxc.Palette,{generators:{analogous:function(args){var high=args.high||60,low=args.low||18,base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var h=[(hsv.h+low+360)%360,(hsv.h+Math.round(low/2)+360)%360,hsv.h,(hsv.h-Math.round(high/2)+360)%360,(hsv.h-high+360)%360];var s1=Math.max(10,(hsv.s<=95)?hsv.s+5:(100-(hsv.s-95))),s2=(hsv.s>1)?hsv.s-1:21-hsv.s,v1=(hsv.v>=92)?hsv.v-9:Math.max(hsv.v+9,20),v2=(hsv.v<=90)?Math.max(hsv.v+5,20):(95+Math.ceil((hsv.v-90)/2)),s=[s1,s2,hsv.s,s1,s1],v=[v1,v2,hsv.v,v1,v2];return new dxc.Palette(arr.map(h,function(hue,i){return dxc.fromHsv(hue,s[i],v[i]);}));},monochromatic:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var s1=(hsv.s-30>9)?hsv.s-30:hsv.s+30,s2=hsv.s,v1=_101(hsv.v,20,100),v2=(hsv.v-20>20)?hsv.v-20:hsv.v+60,v3=(hsv.v-50>20)?hsv.v-50:hsv.v+30;return new dxc.Palette([dxc.fromHsv(hsv.h,s1,v1),dxc.fromHsv(hsv.h,s2,v3),base,dxc.fromHsv(hsv.h,s1,v3),dxc.fromHsv(hsv.h,s2,v2)]);},triadic:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var h1=(hsv.h+57+360)%360,h2=(hsv.h-157+360)%360,s1=(hsv.s>20)?hsv.s-10:hsv.s+10,s2=(hsv.s>90)?hsv.s-10:hsv.s+10,s3=(hsv.s>95)?hsv.s-5:hsv.s+5,v1=(hsv.v-20>20)?hsv.v-20:hsv.v+20,v2=(hsv.v-30>20)?hsv.v-30:hsv.v+30,v3=(hsv.v-30>70)?hsv.v-30:hsv.v+30;return new dxc.Palette([dxc.fromHsv(h1,s1,hsv.v),dxc.fromHsv(hsv.h,s2,v2),base,dxc.fromHsv(h2,s2,v1),dxc.fromHsv(h2,s3,v3)]);},complementary:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var h1=((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,s1=Math.max(hsv.s-10,0),s2=_101(hsv.s,10,100),s3=Math.min(100,hsv.s+20),v1=Math.min(100,hsv.v+30),v2=(hsv.v>20)?hsv.v-30:hsv.v+30;return new dxc.Palette([dxc.fromHsv(hsv.h,s1,v1),dxc.fromHsv(hsv.h,s2,v2),base,dxc.fromHsv(h1,s3,v2),dxc.fromHsv(h1,hsv.s,hsv.v)]);},splitComplementary:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,_104=args.da||30,hsv=base.toHsv();var _105=((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,h1=(_105-_104+360)%360,h2=(_105+_104)%360,s1=Math.max(hsv.s-10,0),s2=_101(hsv.s,10,100),s3=Math.min(100,hsv.s+20),v1=Math.min(100,hsv.v+30),v2=(hsv.v>20)?hsv.v-30:hsv.v+30;return new dxc.Palette([dxc.fromHsv(h1,s1,v1),dxc.fromHsv(h1,s2,v2),base,dxc.fromHsv(h2,s3,v2),dxc.fromHsv(h2,hsv.s,hsv.v)]);},compound:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var h1=((hsv.h*2)+18<360)?(hsv.h*2)+18:Math.floor(hsv.h/2)-18,h2=((hsv.h*2)+120<360)?(hsv.h*2)+120:Math.floor(hsv.h/2)-120,h3=((hsv.h*2)+99<360)?(hsv.h*2)+99:Math.floor(hsv.h/2)-99,s1=(hsv.s-40>10)?hsv.s-40:hsv.s+40,s2=(hsv.s-10>80)?hsv.s-10:hsv.s+10,s3=(hsv.s-25>10)?hsv.s-25:hsv.s+25,v1=(hsv.v-40>10)?hsv.v-40:hsv.v+40,v2=(hsv.v-20>80)?hsv.v-20:hsv.v+20,v3=Math.max(hsv.v,20);return new dxc.Palette([dxc.fromHsv(h1,s1,v1),dxc.fromHsv(h1,s2,v2),base,dxc.fromHsv(h2,s3,v3),dxc.fromHsv(h3,s2,v2)]);},shades:function(args){var base=_f1.isString(args.base)?new dxc.Color(args.base):args.base,hsv=base.toHsv();var s=(hsv.s==100&&hsv.v==0)?0:hsv.s,v1=(hsv.v-50>20)?hsv.v-50:hsv.v+30,v2=(hsv.v-25>=20)?hsv.v-25:hsv.v+55,v3=(hsv.v-75>=20)?hsv.v-75:hsv.v+5,v4=Math.max(hsv.v-10,20);return new dxc.Palette([new dxc.fromHsv(hsv.h,s,v1),new dxc.fromHsv(hsv.h,s,v2),base,new dxc.fromHsv(hsv.h,s,v3),new dxc.fromHsv(hsv.h,s,v4)]);}},generate:function(base,type){if(_f1.isFunction(type)){return type({base:base});}else{if(dxc.Palette.generators[type]){return dxc.Palette.generators[type]({base:base});}}throw new Error("dojox.color.Palette.generate: the specified generator ('"+type+"') does not exist.");}});return dxc.Palette;});},"dojox/color/_base":function(){define("dojox/color/_base",["dojo/_base/kernel","../main","dojo/_base/lang","dojo/_base/Color","dojo/colors"],function(dojo,_106,lang,_107,_108){var cx=lang.getObject("dojox.color",true);cx.Color=_107;cx.blend=_107.blendColors;cx.fromRgb=_107.fromRgb;cx.fromHex=_107.fromHex;cx.fromArray=_107.fromArray;cx.fromString=_107.fromString;cx.greyscale=_108.makeGrey;lang.mixin(cx,{fromCmy:function(cyan,_109,_10a){if(lang.isArray(cyan)){_109=cyan[1],_10a=cyan[2],cyan=cyan[0];}else{if(lang.isObject(cyan)){_109=cyan.m,_10a=cyan.y,cyan=cyan.c;}}cyan/=100,_109/=100,_10a/=100;var r=1-cyan,g=1-_109,b=1-_10a;return new _107({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromCmyk:function(cyan,_10b,_10c,_10d){if(lang.isArray(cyan)){_10b=cyan[1],_10c=cyan[2],_10d=cyan[3],cyan=cyan[0];}else{if(lang.isObject(cyan)){_10b=cyan.m,_10c=cyan.y,_10d=cyan.b,cyan=cyan.c;}}cyan/=100,_10b/=100,_10c/=100,_10d/=100;var r,g,b;r=1-Math.min(1,cyan*(1-_10d)+_10d);g=1-Math.min(1,_10b*(1-_10d)+_10d);b=1-Math.min(1,_10c*(1-_10d)+_10d);return new _107({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsl:function(hue,_10e,_10f){if(lang.isArray(hue)){_10e=hue[1],_10f=hue[2],hue=hue[0];}else{if(lang.isObject(hue)){_10e=hue.s,_10f=hue.l,hue=hue.h;}}_10e/=100;_10f/=100;while(hue<0){hue+=360;}while(hue>=360){hue-=360;}var r,g,b;if(hue<120){r=(120-hue)/60,g=hue/60,b=0;}else{if(hue<240){r=0,g=(240-hue)/60,b=(hue-120)/60;}else{r=(hue-240)/60,g=0,b=(360-hue)/60;}}r=2*_10e*Math.min(r,1)+(1-_10e);g=2*_10e*Math.min(g,1)+(1-_10e);b=2*_10e*Math.min(b,1)+(1-_10e);if(_10f<0.5){r*=_10f,g*=_10f,b*=_10f;}else{r=(1-_10f)*r+2*_10f-1;g=(1-_10f)*g+2*_10f-1;b=(1-_10f)*b+2*_10f-1;}return new _107({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});}});cx.fromHsv=function(hue,_110,_111){if(lang.isArray(hue)){_110=hue[1],_111=hue[2],hue=hue[0];}else{if(lang.isObject(hue)){_110=hue.s,_111=hue.v,hue=hue.h;}}if(hue==360){hue=0;}_110/=100;_111/=100;var r,g,b;if(_110==0){r=_111,b=_111,g=_111;}else{var _112=hue/60,i=Math.floor(_112),f=_112-i;var p=_111*(1-_110);var q=_111*(1-(_110*f));var t=_111*(1-(_110*(1-f)));switch(i){case 0:r=_111,g=t,b=p;break;case 1:r=q,g=_111,b=p;break;case 2:r=p,g=_111,b=t;break;case 3:r=p,g=q,b=_111;break;case 4:r=t,g=p,b=_111;break;case 5:r=_111,g=p,b=q;break;}}return new _107({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});};lang.extend(_107,{toCmy:function(){var cyan=1-(this.r/255),_113=1-(this.g/255),_114=1-(this.b/255);return {c:Math.round(cyan*100),m:Math.round(_113*100),y:Math.round(_114*100)};},toCmyk:function(){var cyan,_115,_116,_117;var r=this.r/255,g=this.g/255,b=this.b/255;_117=Math.min(1-r,1-g,1-b);cyan=(1-r-_117)/(1-_117);_115=(1-g-_117)/(1-_117);_116=(1-b-_117)/(1-_117);return {c:Math.round(cyan*100),m:Math.round(_115*100),y:Math.round(_116*100),b:Math.round(_117*100)};},toHsl:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _118=max-min;var h=0,s=0,l=(min+max)/2;if(l>0&&l<1){s=_118/((l<0.5)?(2*l):(2-2*l));}if(_118>0){if(max==r&&max!=g){h+=(g-b)/_118;}if(max==g&&max!=b){h+=(2+(b-r)/_118);}if(max==b&&max!=r){h+=(4+(r-g)/_118);}h*=60;}return {h:h,s:Math.round(s*100),l:Math.round(l*100)};},toHsv:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _119=max-min;var h=null,s=(max==0)?0:(_119/max);if(s==0){h=0;}else{if(r==max){h=60*(g-b)/_119;}else{if(g==max){h=120+60*(b-r)/_119;}else{h=240+60*(r-g)/_119;}}if(h<0){h+=360;}}return {h:h,s:Math.round(s*100),v:Math.round(max*100)};}});return cx;});},"dojo/colors":function(){define("dojo/colors",["./_base/kernel","./_base/lang","./_base/Color","./_base/array"],function(dojo,lang,_11a,_11b){var _11c=lang.getObject("dojo.colors",true);var _11d=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=_11a.fromRgb=function(_11e,obj){var m=_11e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=_11b.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return _11a.fromArray(a,obj);}return _11a.fromArray(c,obj);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_11d(m1,m2,H+1/3)*256,_11d(m1,m2,H)*256,_11d(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return _11a.fromArray(a,obj);}}return null;};var _11f=function(c,low,high){c=Number(c);return isNaN(c)?high:chigh?high:c;};_11a.prototype.sanitize=function(){var t=this;t.r=Math.round(_11f(t.r,0,255));t.g=Math.round(_11f(t.g,0,255));t.b=Math.round(_11f(t.b,0,255));t.a=_11f(t.a,0,1);return this;};_11c.makeGrey=_11a.makeGrey=function(g,a){return _11a.fromArray([g,g,g,a]);};lang.mixin(_11a.named,{"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"blanchedalmond":[255,235,205],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"oldlace":[253,245,230],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"whitesmoke":[245,245,245],"yellowgreen":[154,205,50]});return _11a;});},"dojox/charting/Theme":function(){define("dojox/charting/Theme",["dojo/_base/lang","dojo/_base/array","dojo/_base/declare","dojo/_base/Color","dojox/color/_base","dojox/color/Palette","dojox/lang/utils","dojox/gfx/gradutils"],function(lang,arr,_120,_121,_122,_123,dlu,dgg){var _124=_120("dojox.charting.Theme",null,{shapeSpaces:{shape:1,shapeX:1,shapeY:1},constructor:function(_125){_125=_125||{};var def=_124.defaultTheme;arr.forEach(["chart","plotarea","axis","series","marker","indicator"],function(name){this[name]=lang.delegate(def[name],_125[name]);},this);if(_125.seriesThemes&&_125.seriesThemes.length){this.colors=null;this.seriesThemes=_125.seriesThemes.slice(0);}else{this.seriesThemes=null;this.colors=(_125.colors||_124.defaultColors).slice(0);}this.markerThemes=null;if(_125.markerThemes&&_125.markerThemes.length){this.markerThemes=_125.markerThemes.slice(0);}this.markers=_125.markers?lang.clone(_125.markers):lang.delegate(_124.defaultMarkers);this.noGradConv=_125.noGradConv;this.noRadialConv=_125.noRadialConv;if(_125.reverseFills){this.reverseFills();}this._current=0;this._buildMarkerArray();},clone:function(){var _126=new _124({chart:this.chart,plotarea:this.plotarea,axis:this.axis,series:this.series,marker:this.marker,colors:this.colors,markers:this.markers,indicator:this.indicator,seriesThemes:this.seriesThemes,markerThemes:this.markerThemes,noGradConv:this.noGradConv,noRadialConv:this.noRadialConv});arr.forEach(["clone","clear","next","skip","addMixin","post","getTick"],function(name){if(this.hasOwnProperty(name)){_126[name]=this[name];}},this);return _126;},clear:function(){this._current=0;},next:function(_127,_128,_129){var _12a=dlu.merge,_12b,_12c;if(this.colors){_12b=lang.delegate(this.series);_12c=lang.delegate(this.marker);var _12d=new _121(this.colors[this._current%this.colors.length]),old;if(_12b.stroke&&_12b.stroke.color){_12b.stroke=lang.delegate(_12b.stroke);old=new _121(_12b.stroke.color);_12b.stroke.color=new _121(_12d);_12b.stroke.color.a=old.a;}else{_12b.stroke={color:_12d};}if(_12c.stroke&&_12c.stroke.color){_12c.stroke=lang.delegate(_12c.stroke);old=new _121(_12c.stroke.color);_12c.stroke.color=new _121(_12d);_12c.stroke.color.a=old.a;}else{_12c.stroke={color:_12d};}if(!_12b.fill||_12b.fill.type){_12b.fill=_12d;}else{old=new _121(_12b.fill);_12b.fill=new _121(_12d);_12b.fill.a=old.a;}if(!_12c.fill||_12c.fill.type){_12c.fill=_12d;}else{old=new _121(_12c.fill);_12c.fill=new _121(_12d);_12c.fill.a=old.a;}}else{_12b=this.seriesThemes?_12a(this.series,this.seriesThemes[this._current%this.seriesThemes.length]):this.series;_12c=this.markerThemes?_12a(this.marker,this.markerThemes[this._current%this.markerThemes.length]):_12b;}var _12e=_12c&&_12c.symbol||this._markers[this._current%this._markers.length];var _12f={series:_12b,marker:_12c,symbol:_12e};++this._current;if(_128){_12f=this.addMixin(_12f,_127,_128);}if(_129){_12f=this.post(_12f,_127);}return _12f;},skip:function(){++this._current;},addMixin:function(_130,_131,_132,_133){if(lang.isArray(_132)){arr.forEach(_132,function(m){_130=this.addMixin(_130,_131,m);},this);}else{var t={};if("color" in _132){if(_131=="line"||_131=="area"){lang.setObject("series.stroke.color",_132.color,t);lang.setObject("marker.stroke.color",_132.color,t);}else{lang.setObject("series.fill",_132.color,t);}}arr.forEach(["stroke","outline","shadow","fill","font","fontColor","labelWiring"],function(name){var _134="marker"+name.charAt(0).toUpperCase()+name.substr(1),b=_134 in _132;if(name in _132){lang.setObject("series."+name,_132[name],t);if(!b){lang.setObject("marker."+name,_132[name],t);}}if(b){lang.setObject("marker."+name,_132[_134],t);}});if("marker" in _132){t.symbol=_132.marker;}_130=dlu.merge(_130,t);}if(_133){_130=this.post(_130,_131);}return _130;},post:function(_135,_136){var fill=_135.series.fill,t;if(!this.noGradConv&&this.shapeSpaces[fill.space]&&fill.type=="linear"){if(_136=="bar"){t={x1:fill.y1,y1:fill.x1,x2:fill.y2,y2:fill.x2};}else{if(!this.noRadialConv&&fill.space=="shape"&&(_136=="slice"||_136=="circle")){t={type:"radial",cx:0,cy:0,r:100};}}if(t){return dlu.merge(_135,{series:{fill:t}});}}return _135;},getTick:function(name,_137){var tick=this.axis.tick,_138=name+"Tick",_139=dlu.merge;if(tick){if(this.axis[_138]){tick=_139(tick,this.axis[_138]);}}else{tick=this.axis[_138];}if(_137){if(tick){if(_137[_138]){tick=_139(tick,_137[_138]);}}else{tick=_137[_138];}}return tick;},inspectObjects:function(f){arr.forEach(["chart","plotarea","axis","series","marker","indicator"],function(name){f(this[name]);},this);if(this.seriesThemes){arr.forEach(this.seriesThemes,f);}if(this.markerThemes){arr.forEach(this.markerThemes,f);}},reverseFills:function(){this.inspectObjects(function(o){if(o&&o.fill){o.fill=dgg.reverse(o.fill);}});},addMarker:function(name,_13a){this.markers[name]=_13a;this._buildMarkerArray();},setMarkers:function(obj){this.markers=obj;this._buildMarkerArray();},_buildMarkerArray:function(){this._markers=[];for(var p in this.markers){this._markers.push(this.markers[p]);}}});lang.mixin(_124,{defaultMarkers:{CIRCLE:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",SQUARE:"m-3,-3 l0,6 6,0 0,-6 z",DIAMOND:"m0,-3 l3,3 -3,3 -3,-3 z",CROSS:"m0,-3 l0,6 m-3,-3 l6,0",X:"m-3,-3 l6,6 m0,-6 l-6,6",TRIANGLE:"m-3,3 l3,-6 3,6 z",TRIANGLE_INVERTED:"m-3,-3 l3,6 3,-6 z"},defaultColors:["#54544c","#858e94","#6e767a","#948585","#474747"],defaultTheme:{chart:{stroke:null,fill:"white",pageStyle:null,titleGap:20,titlePos:"top",titleFont:"normal normal bold 14pt Tahoma",titleFontColor:"#333"},plotarea:{stroke:null,fill:"white"},axis:{stroke:{color:"#333",width:1},tick:{color:"#666",position:"center",font:"normal normal normal 7pt Tahoma",fontColor:"#333",titleGap:15,titleFont:"normal normal normal 11pt Tahoma",titleFontColor:"#333",titleOrientation:"axis"},majorTick:{width:1,length:6},minorTick:{width:0.8,length:3},microTick:{width:0.5,length:1}},series:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000",labelWiring:{width:1,color:"#ccc"}},marker:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000"},indicator:{lineStroke:{width:1.5,color:"#333"},lineOutline:{width:0.1,color:"#ccc"},lineShadow:null,stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",radius:3,font:"normal normal normal 10pt Tahoma",fontColor:"#000",markerFill:"#ccc",markerSymbol:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",markerStroke:{width:1.5,color:"#333"},markerOutline:{width:0.1,color:"#ccc"},markerShadow:null}},defineColors:function(_13b){_13b=_13b||{};var l,c=[],n=_13b.num||5;if(_13b.colors){l=_13b.colors.length;for(var i=0;i1?String.prototype.split:function(sep){var r=this.split.call(this,sep),m=sep.exec(this);if(m&&m.index==0){r.unshift("");}return r;};var _14b=function(s){var args=[],_14c=_14a.call(s,/\s*->\s*/m);if(_14c.length>1){while(_14c.length){s=_14c.pop();args=_14c.pop().split(/\s*,\s*|\s+/m);if(_14c.length){_14c.push("(function("+args+"){return ("+s+")})");}}}else{if(s.match(/\b_\b/)){args=["_"];}else{var l=s.match(/^\s*(?:[+*\/%&|\^\.=<>]|!=)/m),r=s.match(/[+\-*\/%&|\^\.=<>!]\s*$/m);if(l||r){if(l){args.push("$1");s="$1"+s;}if(r){args.push("$2");s=s+"$2";}}else{var vars=s.replace(/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|this|true|false|null|undefined|typeof|instanceof|in|delete|new|void|arguments|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|dojo|dijit|dojox|window|document|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g,"").match(/([a-z_$][a-z_$\d]*)/gi)||[],t={};arr.forEach(vars,function(v){if(!(v in t)){args.push(v);t[v]=1;}});}}}return {args:args,body:s};};var _14d=function(a){return a.length?function(){var i=a.length-1,x=df.lambda(a[i]).apply(this,arguments);for(--i;i>=0;--i){x=df.lambda(a[i]).call(this,x);}return x;}:function(x){return x;};};lang.mixin(df,{rawLambda:function(s){return _14b(s);},buildLambda:function(s){s=_14b(s);return "function("+s.args.join(",")+"){return ("+s.body+");}";},lambda:function(s){if(typeof s=="function"){return s;}if(s instanceof Array){return _14d(s);}if(s in _149){return _149[s];}s=_14b(s);return _149[s]=new Function(s.args,"return ("+s.body+");");},clearLambdaCache:function(){_149={};}});return df;});},"dojox/lang/functional/fold":function(){define("dojox/lang/functional/fold",["dojo/_base/lang","dojo/_base/array","dojo/_base/window","./lambda"],function(lang,arr,win,df){var _14e={};lang.mixin(df,{foldl:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);var i,n;if(lang.isArray(a)){for(i=0,n=a.length;i0;--i,z=f.call(o,z,a[i],i,a)){}return z;},foldr1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||win.global;f=df.lambda(f);var n=a.length,z=a[n-1],i=n-1;for(;i>0;--i,z=f.call(o,z,a[i],i,a)){}return z;},reduce:function(a,f,z){return arguments.length<3?df.foldl1(a,f):df.foldl(a,f,z);},reduceRight:function(a,f,z){return arguments.length<3?df.foldr1(a,f):df.foldr(a,f,z);},unfold:function(pr,f,g,z,o){o=o||win.global;f=df.lambda(f);g=df.lambda(g);pr=df.lambda(pr);var t=[];for(;!pr.call(o,z);t.push(f.call(o,z)),z=g.call(o,z)){}return t;}});});},"dojox/charting/Series":function(){define("dojox/charting/Series",["dojo/_base/lang","dojo/_base/declare","./Element"],function(lang,_150,_151){return _150("dojox.charting.Series",_151,{constructor:function(_152,data,_153){lang.mixin(this,_153);if(typeof this.plot!="string"){this.plot="default";}this.update(data);},clear:function(){this.dyn={};},update:function(data){if(lang.isArray(data)){this.data=data;}else{this.source=data;this.data=this.source.data;if(this.source.setSeriesObject){this.source.setSeriesObject(this);}}this.dirty=true;this.clear();}});});},"dojox/lang/functional":function(){define("dojox/lang/functional",["./functional/lambda","./functional/array","./functional/object"],function(df){return df;});},"dojox/gfx/gradutils":function(){define("dojox/gfx/gradutils",["./_base","dojo/_base/lang","./matrix","dojo/_base/Color"],function(g,lang,m,_154){var _155=g.gradutils={};function _156(o,c){if(o<=0){return c[0].color;}var len=c.length;if(o>=1){return c[len-1].color;}for(var i=0;i=o){if(i){var prev=c[i-1];return _154.blendColors(new _154(prev.color),new _154(stop.color),(o-prev.offset)/(stop.offset-prev.offset));}return stop.color;}}return c[len-1].color;};_155.getColor=function(fill,pt){var o;if(fill){switch(fill.type){case "linear":var _157=Math.atan2(fill.y2-fill.y1,fill.x2-fill.x1),_158=m.rotate(-_157),_159=m.project(fill.x2-fill.x1,fill.y2-fill.y1),p=m.multiplyPoint(_159,pt),pf1=m.multiplyPoint(_159,fill.x1,fill.y1),pf2=m.multiplyPoint(_159,fill.x2,fill.y2),_15a=m.multiplyPoint(_158,pf2.x-pf1.x,pf2.y-pf1.y).x;o=m.multiplyPoint(_158,p.x-pf1.x,p.y-pf1.y).x/_15a;break;case "radial":var dx=pt.x-fill.cx,dy=pt.y-fill.cy;o=Math.sqrt(dx*dx+dy*dy)/fill.r;break;}return _156(o,fill.colors);}return new _154(fill||[0,0,0,0]);};_155.reverse=function(fill){if(fill){switch(fill.type){case "linear":case "radial":fill=lang.delegate(fill);if(fill.colors){var c=fill.colors,l=c.length,i=0,stop,n=fill.colors=new Array(c.length);for(;i= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ /* This is an optimized version of Dojo, built for deployment and not for development. To get sources and documentation, please visit: http://dojotoolkit.org */ //>>built require({cache:{"dijit/tree/_dndSelector":function(){define("dijit/tree/_dndSelector",["dojo/_base/array","dojo/_base/connect","dojo/_base/declare","dojo/_base/lang","dojo/mouse","dojo/on","dojo/touch","dojo/_base/window","./_dndContainer"],function(_1,_2,_3,_4,_5,on,_6,_7,_8){return _3("dijit.tree._dndSelector",_8,{constructor:function(){this.selection={};this.anchor=null;this.tree.domNode.setAttribute("aria-multiselect",!this.singular);this.events.push(on(this.tree.domNode,_6.press,_4.hitch(this,"onMouseDown")),on(this.tree.domNode,_6.release,_4.hitch(this,"onMouseUp")),on(this.tree.domNode,_6.move,_4.hitch(this,"onMouseMove")));},singular:false,getSelectedTreeNodes:function(){var _9=[],_a=this.selection;for(var i in _a){_9.push(_a[i]);}return _9;},selectNone:function(){this.setSelection([]);return this;},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null;},addTreeNode:function(_b,_c){this.setSelection(this.getSelectedTreeNodes().concat([_b]));if(_c){this.anchor=_b;}return _b;},removeTreeNode:function(_d){this.setSelection(this._setDifference(this.getSelectedTreeNodes(),[_d]));return _d;},isTreeNodeSelected:function(_e){return _e.id&&!!this.selection[_e.id];},setSelection:function(_f){var _10=this.getSelectedTreeNodes();_1.forEach(this._setDifference(_10,_f),_4.hitch(this,function(_11){_11.setSelected(false);if(this.anchor==_11){delete this.anchor;}delete this.selection[_11.id];}));_1.forEach(this._setDifference(_f,_10),_4.hitch(this,function(_12){_12.setSelected(true);this.selection[_12.id]=_12;}));this._updateSelectionProperties();},_setDifference:function(xs,ys){_1.forEach(ys,function(y){y.__exclude__=true;});var ret=_1.filter(xs,function(x){return !x.__exclude__;});_1.forEach(ys,function(y){delete y["__exclude__"];});return ret;},_updateSelectionProperties:function(){var _13=this.getSelectedTreeNodes();var _14=[],_15=[];_1.forEach(_13,function(_16){_15.push(_16);_14.push(_16.getTreePath());});var _17=_1.map(_15,function(_18){return _18.item;});this.tree._set("paths",_14);this.tree._set("path",_14[0]||[]);this.tree._set("selectedNodes",_15);this.tree._set("selectedNode",_15[0]||null);this.tree._set("selectedItems",_17);this.tree._set("selectedItem",_17[0]||null);},onMouseDown:function(e){if(!this.current||this.tree.isExpandoNode(e.target,this.current)){return;}if(e.type=="mousedown"&&_5.isLeft(e)){e.preventDefault();}else{if(e.type!="touchstart"){return;}}var _19=this.current,_1a=_2.isCopyKey(e),id=_19.id;if(!this.singular&&!e.shiftKey&&this.selection[id]){this._doDeselect=true;return;}else{this._doDeselect=false;}this.userSelect(_19,_1a,e.shiftKey);},onMouseUp:function(e){if(!this._doDeselect){return;}this._doDeselect=false;this.userSelect(this.current,_2.isCopyKey(e),e.shiftKey);},onMouseMove:function(){this._doDeselect=false;},_compareNodes:function(n1,n2){if(n1===n2){return 0;}if("sourceIndex" in document.documentElement){return n1.sourceIndex-n2.sourceIndex;}else{if("compareDocumentPosition" in document.documentElement){return n1.compareDocumentPosition(n2)&2?1:-1;}else{if(document.createRange){var r1=doc.createRange();r1.setStartBefore(n1);var r2=doc.createRange();r2.setStartBefore(n2);return r1.compareBoundaryPoints(r1.END_TO_END,r2);}else{throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");}}}},userSelect:function(_1b,_1c,_1d){if(this.singular){if(this.anchor==_1b&&_1c){this.selectNone();}else{this.setSelection([_1b]);this.anchor=_1b;}}else{if(_1d&&this.anchor){var cr=this._compareNodes(this.anchor.rowNode,_1b.rowNode),_1e,end,_1f=this.anchor;if(cr<0){_1e=_1f;end=_1b;}else{_1e=_1b;end=_1f;}var _20=[];while(_1e!=end){_20.push(_1e);_1e=this.tree._getNextNode(_1e);}_20.push(end);this.setSelection(_20);}else{if(this.selection[_1b.id]&&_1c){this.removeTreeNode(_1b);}else{if(_1c){this.addTreeNode(_1b,true);}else{this.setSelection([_1b]);this.anchor=_1b;}}}}},getItem:function(key){var _21=this.selection[key];return {data:_21,type:["treeNode"]};},forInSelectedItems:function(f,o){o=o||_7.global;for(var id in this.selection){f.call(o,this.getItem(id),id,this);}}});});},"dijit/tree/TreeStoreModel":function(){define("dijit/tree/TreeStoreModel",["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/json","dojo/_base/lang"],function(_22,_23,_24,_25,_26){return _24("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:false,constructor:function(_27){_26.mixin(this,_27);this.connects=[];var _28=this.store;if(!_28.getFeatures()["dojo.data.api.Identity"]){throw new Error("dijit.Tree: store must support dojo.data.Identity");}if(_28.getFeatures()["dojo.data.api.Notification"]){this.connects=this.connects.concat([_23.after(_28,"onNew",_26.hitch(this,"onNewItem"),true),_23.after(_28,"onDelete",_26.hitch(this,"onDeleteItem"),true),_23.after(_28,"onSet",_26.hitch(this,"onSetItem"),true)]);}},destroy:function(){var h;while(h=this.connects.pop()){h.remove();}},getRoot:function(_29,_2a){if(this.root){_29(this.root);}else{this.store.fetch({query:this.query,onComplete:_26.hitch(this,function(_2b){if(_2b.length!=1){throw new Error(this.declaredClass+": query "+_25.stringify(this.query)+" returned "+_2b.length+" items, but must return exactly one item");}this.root=_2b[0];_29(this.root);}),onError:_2a});}},mayHaveChildren:function(_2c){return _22.some(this.childrenAttrs,function(_2d){return this.store.hasAttribute(_2c,_2d);},this);},getChildren:function(_2e,_2f,_30){var _31=this.store;if(!_31.isItemLoaded(_2e)){var _32=_26.hitch(this,arguments.callee);_31.loadItem({item:_2e,onItem:function(_33){_32(_33,_2f,_30);},onError:_30});return;}var _34=[];for(var i=0;i
\"\"\n\t\t\t\"\"\n\t\t
\n\t
\n
\n","url:dijit/templates/Tree.html":"
\n\t
\n
\n"}});define("dijit/Tree",["dojo/_base/array","dojo/_base/connect","dojo/cookie","dojo/_base/declare","dojo/_base/Deferred","dojo/DeferredList","dojo/dom","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/event","dojo/fx","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/on","dojo/topic","./focus","./registry","./_base/manager","./_Widget","./_TemplatedMixin","./_Container","./_Contained","./_CssStateMixin","dojo/text!./templates/TreeNode.html","dojo/text!./templates/Tree.html","./tree/TreeStoreModel","./tree/ForestStoreModel","./tree/_dndSelector"],function(_5f,_60,_61,_62,_63,_64,dom,_65,_66,_67,_68,_69,_6a,_6b,_6c,on,_6d,_6e,_6f,_70,_71,_72,_73,_74,_75,_76,_77,_78,_79,_7a){var _7b=_62("dijit._TreeNode",[_71,_72,_73,_74,_75],{item:null,isTreeNode:true,label:"",_setLabelAttr:{node:"labelNode",type:"innerText"},isExpandable:null,isExpanded:false,state:"UNCHECKED",templateString:_76,baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow",labelNode:"dijitTreeLabel"},_setTooltipAttr:{node:"rowNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);if(this.isExpandable){this.labelNode.setAttribute("aria-expanded",this.isExpanded);}this.setSelected(false);},_setIndentAttr:function(_7c){var _7d=(Math.max(_7c,0)*this.tree._nodePixelIndent)+"px";_67.set(this.domNode,"backgroundPosition",_7d+" 0px");_67.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",_7d);_5f.forEach(this.getChildren(),function(_7e){_7e.set("indent",_7c+1);});this._set("indent",_7c);},markProcessing:function(){this.state="LOADING";this._setExpando(true);},unmarkProcessing:function(){this._setExpando(false);},_updateItemClasses:function(_7f){var _80=this.tree,_81=_80.model;if(_80._v10Compat&&_7f===_81.root){_7f=null;}this._applyClassAndStyle(_7f,"icon","Icon");this._applyClassAndStyle(_7f,"label","Label");this._applyClassAndStyle(_7f,"row","Row");},_applyClassAndStyle:function(_82,_83,_84){var _85="_"+_83+"Class";var _86=_83+"Node";var _87=this[_85];this[_85]=this.tree["get"+_84+"Class"](_82,this.isExpanded);_65.replace(this[_86],this[_85]||"",_87||"");_67.set(this[_86],this.tree["get"+_84+"Style"](_82,this.isExpanded)||{});},_updateLayout:function(){var _88=this.getParent();if(!_88||!_88.rowNode||_88.rowNode.style.display=="none"){_65.add(this.domNode,"dijitTreeIsRoot");}else{_65.toggle(this.domNode,"dijitTreeIsLast",!this.getNextSibling());}},_setExpando:function(_89){var _8a=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],_8b=["*","-","+","*"],idx=_89?0:(this.isExpandable?(this.isExpanded?1:2):3);_65.replace(this.expandoNode,_8a[idx],_8a);this.expandoNodeText.innerHTML=_8b[idx];},expand:function(){if(this._expandDeferred){return this._expandDeferred;}this._wipeOut&&this._wipeOut.stop();this.isExpanded=true;this.labelNode.setAttribute("aria-expanded","true");if(this.tree.showRoot||this!==this.tree.rootNode){this.containerNode.setAttribute("role","group");}_65.add(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(this==this.tree.rootNode){this.tree.domNode.setAttribute("aria-expanded","true");}var def,_8c=_69.wipeIn({node:this.containerNode,duration:_70.defaultDuration,onEnd:function(){def.callback(true);}});def=(this._expandDeferred=new _63(function(){_8c.stop();}));_8c.play();return def;},collapse:function(){if(!this.isExpanded){return;}if(this._expandDeferred){this._expandDeferred.cancel();delete this._expandDeferred;}this.isExpanded=false;this.labelNode.setAttribute("aria-expanded","false");if(this==this.tree.rootNode){this.tree.domNode.setAttribute("aria-expanded","false");}_65.remove(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(!this._wipeOut){this._wipeOut=_69.wipeOut({node:this.containerNode,duration:_70.defaultDuration});}this._wipeOut.play();},indent:0,setChildItems:function(_8d){var _8e=this.tree,_8f=_8e.model,_90=[];_5f.forEach(this.getChildren(),function(_91){_73.prototype.removeChild.call(this,_91);},this);this.state="LOADED";if(_8d&&_8d.length>0){this.isExpandable=true;_5f.forEach(_8d,function(_92){var id=_8f.getIdentity(_92),_93=_8e._itemNodesMap[id],_94;if(_93){for(var i=0;i<_93.length;i++){if(_93[i]&&!_93[i].getParent()){_94=_93[i];_94.set("indent",this.indent+1);break;}}}if(!_94){_94=this.tree._createTreeNode({item:_92,tree:_8e,isExpandable:_8f.mayHaveChildren(_92),label:_8e.getLabel(_92),tooltip:_8e.getTooltip(_92),dir:_8e.dir,lang:_8e.lang,textDir:_8e.textDir,indent:this.indent+1});if(_93){_93.push(_94);}else{_8e._itemNodesMap[id]=[_94];}}this.addChild(_94);if(this.tree.autoExpand||this.tree._state(_94)){_90.push(_8e._expandNode(_94));}},this);_5f.forEach(this.getChildren(),function(_95){_95._updateLayout();});}else{this.isExpandable=false;}if(this._setExpando){this._setExpando(false);}this._updateItemClasses(this.item);if(this==_8e.rootNode){var fc=this.tree.showRoot?this:this.getChildren()[0];if(fc){fc.setFocusable(true);_8e.lastFocused=fc;}else{_8e.domNode.setAttribute("tabIndex","0");}}return new _64(_90);},getTreePath:function(){var _96=this;var _97=[];while(_96&&_96!==this.tree.rootNode){_97.unshift(_96.item);_96=_96.getParent();}_97.unshift(this.tree.rootNode.item);return _97;},getIdentity:function(){return this.tree.model.getIdentity(this.item);},removeChild:function(_98){this.inherited(arguments);var _99=this.getChildren();if(_99.length==0){this.isExpandable=false;this.collapse();}_5f.forEach(_99,function(_9a){_9a._updateLayout();});},makeExpandable:function(){this.isExpandable=true;this._setExpando(false);},_onLabelFocus:function(){this.tree._onNodeFocus(this);},setSelected:function(_9b){this.labelNode.setAttribute("aria-selected",_9b);_65.toggle(this.rowNode,"dijitTreeRowSelected",_9b);},setFocusable:function(_9c){this.labelNode.setAttribute("tabIndex",_9c?"0":"-1");},_onClick:function(evt){this.tree._onClick(this,evt);},_onDblClick:function(evt){this.tree._onDblClick(this,evt);},_onMouseEnter:function(evt){this.tree._onNodeMouseEnter(this,evt);},_onMouseLeave:function(evt){this.tree._onNodeMouseLeave(this,evt);},_setTextDirAttr:function(_9d){if(_9d&&((this.textDir!=_9d)||!this._created)){this._set("textDir",_9d);this.applyTextDir(this.labelNode,this.labelNode.innerText||this.labelNode.textContent||"");_5f.forEach(this.getChildren(),function(_9e){_9e.set("textDir",_9d);},this);}}});var _9f=_62("dijit.Tree",[_71,_72],{store:null,model:null,query:null,label:"",showRoot:true,childrenAttr:["children"],paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:false,openOnDblClick:false,templateString:_77,persist:true,autoExpand:false,dndController:_7a,dndParams:["onDndDrop","itemCreator","onDndCancel","checkAcceptance","checkItemAcceptance","dragThreshold","betweenThreshold"],onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(_a0,_a1){_6d.publish(this.id,_6c.mixin({tree:this,event:_a0},_a1||{}));},postMixInProperties:function(){this.tree=this;if(this.autoExpand){this.persist=false;}this._itemNodesMap={};if(!this.cookieName&&this.id){this.cookieName=this.id+"SaveStateCookie";}this._loadDeferred=new _63();this.inherited(arguments);},postCreate:function(){this._initState();var _a2=this;this._connects.push(on(this.domNode,on.selector(".dijitTreeNode","keypress"),function(evt){_a2._onKeyPress(_6f.byNode(this),evt);}),on(this.domNode,on.selector(".dijitTreeNode","keydown"),function(evt){_a2._onKeyDown(_6f.byNode(this),evt);}));if(!this.model){this._store2model();}this.connect(this.model,"onChange","_onItemChange");this.connect(this.model,"onChildrenChange","_onItemChildrenChange");this.connect(this.model,"onDelete","_onItemDelete");this._load();this.inherited(arguments);if(this.dndController){if(_6c.isString(this.dndController)){this.dndController=_6c.getObject(this.dndController);}var _a3={};for(var i=0;i_108+1000){_10c.call(this,evt);}});return {remove:function(){_10d.remove();_10e.remove();}};};}else{return function(node,_10f){return on(node,_10a,_10f);};}};var _110,_111;if(_107){_106(function(){_111=win.body();win.doc.addEventListener("touchstart",function(evt){_108=(new Date()).getTime();var _112=_111;_111=evt.target;on.emit(_112,"dojotouchout",{target:_112,relatedTarget:_111,bubbles:true});on.emit(_111,"dojotouchover",{target:_111,relatedTarget:_112,bubbles:true});},true);on(win.doc,"touchmove",function(evt){_108=(new Date()).getTime();var _113=win.doc.elementFromPoint(evt.pageX-(ios4?0:win.global.pageXOffset),evt.pageY-(ios4?0:win.global.pageYOffset));if(_113&&_111!==_113){on.emit(_111,"dojotouchout",{target:_111,relatedTarget:_113,bubbles:true});on.emit(_113,"dojotouchover",{target:_113,relatedTarget:_111,bubbles:true});_111=_113;}});});_110=function(node,_114){return on(win.doc,"touchmove",function(evt){if(node===win.doc||dom.isDescendant(_111,node)){evt.target=_111;_114.call(this,evt);}});};}var _115={press:_109("mousedown","touchstart"),move:_109("mousemove",_110),release:_109("mouseup","touchend"),cancel:_109(_105.leave,"touchcancel"),over:_109("mouseover","dojotouchover"),out:_109("mouseout","dojotouchout"),enter:_105._eventHandler(_109("mouseover","dojotouchover")),leave:_105._eventHandler(_109("mouseout","dojotouchout"))};1&&(dojo.touch=_115);return _115;});},"url:dijit/templates/Tree.html":"
\n\t
\n
\n","url:dijit/templates/TreeNode.html":"
\"\"\n\t\t\t\"\"\n\t\t
\n\t
\n
\n","dijit/tree/_dndContainer":function(){define("dijit/tree/_dndContainer",["dojo/aspect","dojo/_base/declare","dojo/dom-class","dojo/_base/event","dojo/_base/lang","dojo/mouse","dojo/on"],function(_116,_117,_118,_119,lang,_11a,on){return _117("dijit.tree._dndContainer",null,{constructor:function(tree,_11b){this.tree=tree;this.node=tree.domNode;lang.mixin(this,_11b);this.current=null;this.containerState="";_118.add(this.node,"dojoDndContainer");this.events=[on(this.node,_11a.enter,lang.hitch(this,"onOverEvent")),on(this.node,_11a.leave,lang.hitch(this,"onOutEvent")),_116.after(this.tree,"_onNodeMouseEnter",lang.hitch(this,"onMouseOver"),true),_116.after(this.tree,"_onNodeMouseLeave",lang.hitch(this,"onMouseOut"),true),on(this.node,"dragstart",lang.hitch(_119,"stop")),on(this.node,"selectstart",lang.hitch(_119,"stop"))];},destroy:function(){var h;while(h=this.events.pop()){h.remove();}this.node=this.parent=null;},onMouseOver:function(_11c){this.current=_11c;},onMouseOut:function(){this.current=null;},_changeState:function(type,_11d){var _11e="dojoDnd"+type;var _11f=type.toLowerCase()+"State";_118.replace(this.node,_11e+_11d,_11e+this[_11f]);this[_11f]=_11d;},_addItemClass:function(node,type){_118.add(node,"dojoDndItem"+type);},_removeItemClass:function(node,type){_118.remove(node,"dojoDndItem"+type);},onOverEvent:function(){this._changeState("Container","Over");},onOutEvent:function(){this._changeState("Container","");}});});},"dijit/tree/dndSource":function(){define("dijit/tree/dndSource",["dojo/_base/array","dojo/_base/connect","dojo/_base/declare","dojo/dom-class","dojo/dom-geometry","dojo/_base/lang","dojo/on","dojo/touch","dojo/topic","dojo/dnd/Manager","./_dndSelector"],function(_120,_121,_122,_123,_124,lang,on,_125,_126,_127,_128){return _122("dijit.tree.dndSource",_128,{isSource:true,accept:["text","treeNode"],copyOnly:false,dragThreshold:5,betweenThreshold:0,constructor:function(tree,_129){if(!_129){_129={};}lang.mixin(this,_129);this.isSource=typeof _129.isSource=="undefined"?true:_129.isSource;var type=_129.accept instanceof Array?_129.accept:["text","treeNode"];this.accept=null;if(type.length){this.accept={};for(var i=0;i0){if(!this.targetBox||_12b!=_12c){this.targetBox=_124.position(_12c.rowNode,true);}if((e.pageY-this.targetBox.y)<=this.betweenThreshold){_12e="Before";}else{if((e.pageY-this.targetBox.y)>=(this.targetBox.h-this.betweenThreshold)){_12e="After";}}}if(_12c!=_12b||_12e!=_12d){if(_12b){this._removeItemClass(_12b.rowNode,_12d);}if(_12c){this._addItemClass(_12c.rowNode,_12e);}if(!_12c){m.canDrop(false);}else{if(_12c==this.tree.rootNode&&_12e!="Over"){m.canDrop(false);}else{var _12f=this.tree.model,_130=false;if(m.source==this){for(var _131 in this.selection){var _132=this.selection[_131];if(_132.item===_12c.item){_130=true;break;}}}if(_130){m.canDrop(false);}else{if(this.checkItemAcceptance(_12c.rowNode,m.source,_12e.toLowerCase())&&!this._isParentChildDrop(m.source,_12c.rowNode)){m.canDrop(true);}else{m.canDrop(false);}}}}this.targetAnchor=_12c;this.dropPosition=_12e;}},onMouseMove:function(e){if(this.isDragging&&this.targetState=="Disabled"){return;}this.inherited(arguments);var m=_127.manager();if(this.isDragging){this._onDragMouse(e);}else{if(this.mouseDown&&this.isSource&&(Math.abs(e.pageX-this._lastX)>=this.dragThreshold||Math.abs(e.pageY-this._lastY)>=this.dragThreshold)){var _133=this.getSelectedTreeNodes();if(_133.length){if(_133.length>1){var seen=this.selection,i=0,r=[],n,p;nextitem:while((n=_133[i++])){for(p=n.getParent();p&&p!==this.tree;p=p.getParent()){if(seen[p.id]){continue nextitem;}}r.push(n);}_133=r;}_133=_120.map(_133,function(n){return n.domNode;});m.startDrag(this,_133,this.copyState(_121.isCopyKey(e)));}}}},onMouseDown:function(e){this.mouseDown=true;this.mouseButton=e.button;this._lastX=e.pageX;this._lastY=e.pageY;this.inherited(arguments);},onMouseUp:function(e){if(this.mouseDown){this.mouseDown=false;this.inherited(arguments);}},onMouseOut:function(){this.inherited(arguments);this._unmarkTargetAnchor();},checkItemAcceptance:function(){return true;},onDndSourceOver:function(_134){if(this!=_134){this.mouseDown=false;this._unmarkTargetAnchor();}else{if(this.isDragging){var m=_127.manager();m.canDrop(false);}}},onDndStart:function(_135,_136,copy){if(this.isSource){this._changeState("Source",this==_135?(copy?"Copied":"Moved"):"");}var _137=this.checkAcceptance(_135,_136);this._changeState("Target",_137?"":"Disabled");if(this==_135){_127.manager().overSource(this);}this.isDragging=true;},itemCreator:function(_138){return _120.map(_138,function(node){return {"id":node.id,"name":node.textContent||node.innerText||""};});},onDndDrop:function(_139,_13a,copy){if(this.containerState=="Over"){var tree=this.tree,_13b=tree.model,_13c=this.targetAnchor;this.isDragging=false;var _13d;var _13e;_13d=(_13c&&_13c.item)||tree.item;if(this.dropPosition=="Before"||this.dropPosition=="After"){_13d=(_13c.getParent()&&_13c.getParent().item)||tree.item;_13e=_13c.getIndexInParent();if(this.dropPosition=="After"){_13e=_13c.getIndexInParent()+1;}}else{_13d=(_13c&&_13c.item)||tree.item;}var _13f;_120.forEach(_13a,function(node,idx){var _140=_139.getItem(node.id);if(_120.indexOf(_140.type,"treeNode")!=-1){var _141=_140.data,_142=_141.item,_143=_141.getParent().item;}if(_139==this){if(typeof _13e=="number"){if(_13d==_143&&_141.getIndexInParent()<_13e){_13e-=1;}}_13b.pasteItem(_142,_143,_13d,copy,_13e);}else{if(_13b.isItem(_142)){_13b.pasteItem(_142,_143,_13d,copy,_13e);}else{if(!_13f){_13f=this.itemCreator(_13a,_13c.rowNode,_139);}_13b.newItem(_13f[idx],_13d,_13e);}}},this);this.tree._expandNode(_13c);}this.onDndCancel();},onDndCancel:function(){this._unmarkTargetAnchor();this.isDragging=false;this.mouseDown=false;delete this.mouseButton;this._changeState("Source","");this._changeState("Target","");},onOverEvent:function(){this.inherited(arguments);_127.manager().overSource(this);},onOutEvent:function(){this._unmarkTargetAnchor();var m=_127.manager();if(this.isDragging){m.canDrop(false);}m.outSource(this);this.inherited(arguments);},_isParentChildDrop:function(_144,_145){if(!_144.tree||_144.tree!=this.tree){return false;}var root=_144.tree.domNode;var ids=_144.selection;var node=_145.parentNode;while(node!=root&&!ids[node.id]){node=node.parentNode;}return node.id&&ids[node.id];},_unmarkTargetAnchor:function(){if(!this.targetAnchor){return;}this._removeItemClass(this.targetAnchor.rowNode,this.dropPosition);this.targetAnchor=null;this.targetBox=null;this.dropPosition=null;},_markDndStatus:function(copy){this._changeState("Source",copy?"Copied":"Moved");}});});},"dijit/tree/ForestStoreModel":function(){define("dijit/tree/ForestStoreModel",["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojo/_base/window","./TreeStoreModel"],function(_146,_147,lang,win,_148){return _147("dijit.tree.ForestStoreModel",_148,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(_149){this.root={store:this,root:true,id:_149.rootId,label:_149.rootLabel,children:_149.rootChildren};},mayHaveChildren:function(item){return item===this.root||this.inherited(arguments);},getChildren:function(_14a,_14b,_14c){if(_14a===this.root){if(this.root.children){_14b(this.root.children);}else{this.store.fetch({query:this.query,onComplete:lang.hitch(this,function(_14d){this.root.children=_14d;_14b(_14d);}),onError:_14c});}}else{this.inherited(arguments);}},isItem:function(_14e){return (_14e===this.root)?true:this.inherited(arguments);},fetchItemByIdentity:function(_14f){if(_14f.identity==this.root.id){var _150=_14f.scope?_14f.scope:win.global;if(_14f.onItem){_14f.onItem.call(_150,this.root);}}else{this.inherited(arguments);}},getIdentity:function(item){return (item===this.root)?this.root.id:this.inherited(arguments);},getLabel:function(item){return (item===this.root)?this.root.label:this.inherited(arguments);},newItem:function(args,_151,_152){if(_151===this.root){this.onNewRootItem(args);return this.store.newItem(args);}else{return this.inherited(arguments);}},onNewRootItem:function(){},pasteItem:function(_153,_154,_155,_156,_157){if(_154===this.root){if(!_156){this.onLeaveRoot(_153);}}this.inherited(arguments,[_153,_154===this.root?null:_154,_155===this.root?null:_155,_156,_157]);if(_155===this.root){this.onAddToRoot(_153);}},onAddToRoot:function(item){},onLeaveRoot:function(item){},_requeryTop:function(){var _158=this.root.children||[];this.store.fetch({query:this.query,onComplete:lang.hitch(this,function(_159){this.root.children=_159;if(_158.length!=_159.length||_146.some(_158,function(item,idx){return _159[idx]!=item;})){this.onChildrenChange(this.root,_159);}})});},onNewItem:function(item,_15a){this._requeryTop();this.inherited(arguments);},onDeleteItem:function(item){if(_146.indexOf(this.root.children,item)!=-1){this._requeryTop();}this.inherited(arguments);},onSetItem:function(item,_15b,_15c,_15d){this._requeryTop();this.inherited(arguments);}});});},"dojo/window":function(){define("dojo/window",["./_base/lang","./_base/sniff","./_base/window","./dom","./dom-geometry","./dom-style","./dom-construct"],function(lang,has,_15e,dom,geom,_15f,_160){has.add("rtl-adjust-position-for-verticalScrollBar",function(win,doc){var body=_15e.body(doc),_161=_160.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},body,"last"),div=_160.create("div",{style:{overflow:"hidden",direction:"ltr"}},_161,"last"),ret=geom.position(div).x!=0;_161.removeChild(div);body.removeChild(_161);return ret;});has.add("position-fixed-support",function(win,doc){var body=_15e.body(doc),_162=_160.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},body,"last"),_163=_160.create("span",{style:{position:"fixed",left:"0",top:"0"}},_162,"last"),ret=geom.position(_163).x!=geom.position(_162).x;_162.removeChild(_163);body.removeChild(_162);return ret;});var _164=lang.getObject("dojo.window",true);_164.getBox=function(){var _165=(_15e.doc.compatMode=="BackCompat")?_15e.body():_15e.doc.documentElement,_166=geom.docScroll(),w,h;if(has("touch")){var _167=_15e.doc.parentWindow||_15e.doc.defaultView;w=_167.innerWidth||_165.clientWidth;h=_167.innerHeight||_165.clientHeight;}else{w=_165.clientWidth;h=_165.clientHeight;}return {l:_166.x,t:_166.y,w:w,h:h};};_164.get=function(doc){if(has("ie")<9&&_164!==document.parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc.parentWindow||doc.defaultView;};_164.scrollIntoView=function(node,pos){try{node=dom.byId(node);var doc=node.ownerDocument||_15e.doc,body=_15e.body(doc),html=doc.documentElement||body.parentNode,isIE=has("ie"),isWK=has("webkit");if(node==body||node==html){return;}if(!(has("mozilla")||isIE||isWK||has("opera")||has("trident"))&&("scrollIntoView" in node)){node.scrollIntoView(false);return;}var _168=doc.compatMode=="BackCompat",_169=Math.min(body.clientWidth||html.clientWidth,html.clientWidth||body.clientWidth),_16a=Math.min(body.clientHeight||html.clientHeight,html.clientHeight||body.clientHeight),_16b=(isWK||_168)?body:html,_16c=pos||geom.position(node),el=node.parentNode,_16d=function(el){return (isIE<=6||(isIE==7&&_168))?false:(has("position-fixed-support")&&(_15f.get(el,"position").toLowerCase()=="fixed"));},self=this,_16e=function(el,x,y){if(el.tagName=="BODY"||el.tagName=="HTML"){self.get(el.ownerDocument).scrollBy(x,y);}else{x&&(el.scrollLeft+=x);y&&(el.scrollTop+=y);}};if(_16d(node)){return;}while(el){if(el==body){el=_16b;}var _16f=geom.position(el),_170=_16d(el),rtl=_15f.getComputedStyle(el).direction.toLowerCase()=="rtl";if(el==_16b){_16f.w=_169;_16f.h=_16a;if(_16b==html&&(isIE||has("trident"))&&rtl){_16f.x+=_16b.offsetWidth-_16f.w;}if(_16f.x<0||!isIE||isIE>=9||has("trident")){_16f.x=0;}if(_16f.y<0||!isIE||isIE>=9||has("trident")){_16f.y=0;}}else{var pb=geom.getPadBorderExtents(el);_16f.w-=pb.w;_16f.h-=pb.h;_16f.x+=pb.l;_16f.y+=pb.t;var _171=el.clientWidth,_172=_16f.w-_171;if(_171>0&&_172>0){if(rtl&&has("rtl-adjust-position-for-verticalScrollBar")){_16f.x+=_172;}_16f.w=_171;}_171=el.clientHeight;_172=_16f.h-_171;if(_171>0&&_172>0){_16f.h=_171;}}if(_170){if(_16f.y<0){_16f.h+=_16f.y;_16f.y=0;}if(_16f.x<0){_16f.w+=_16f.x;_16f.x=0;}if(_16f.y+_16f.h>_16a){_16f.h=_16a-_16f.y;}if(_16f.x+_16f.w>_169){_16f.w=_169-_16f.x;}}var l=_16c.x-_16f.x,t=_16c.y-_16f.y,r=l+_16c.w-_16f.w,bot=t+_16c.h-_16f.h;var s,old;if(r*l>0&&(!!el.scrollLeft||el==_16b||el.scrollWidth>el.offsetHeight)){s=Math[l<0?"max":"min"](l,r);if(rtl&&((isIE==8&&!_168)||isIE>=9||has("trident"))){s=-s;}old=el.scrollLeft;_16e(el,s,0);s=el.scrollLeft-old;_16c.x-=s;}if(bot*t>0&&(!!el.scrollTop||el==_16b||el.scrollHeight>el.offsetHeight)){s=Math.ceil(Math[t<0?"max":"min"](t,bot));old=el.scrollTop;_16e(el,0,s);s=el.scrollTop-old;_16c.y-=s;}el=(el!=_16b)&&!_170&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);node.scrollIntoView(false);}};return _164;});},"*noref":1}});define("dijit/_dijit_tree",[],1);require(["dijit/Tree","dijit/tree/dndSource","dijit/tree/TreeStoreModel","dijit/tree/ForestStoreModel"]);