From: Dan Vanderkam Date: Wed, 19 Aug 2009 04:49:07 +0000 (+0000) Subject: update combined files X-Git-Tag: v1.0.0~917 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=165759fa5c38d38d67fbd93def8beb62017dc0af;p=dygraphs.git update combined files --- diff --git a/docs/dygraph-combined.js b/docs/dygraph-combined.js index f0123ae..57a5e6a 100644 --- a/docs/dygraph-combined.js +++ b/docs/dygraph-combined.js @@ -1002,6 +1002,618 @@ serializeJSON=MochiKit.Base.serializeJSON; } MochiKit.Base._exportSymbols(this,MochiKit.Base); if(typeof (dojo)!="undefined"){ +dojo.provide("MochiKit.Iter"); +dojo.require("MochiKit.Base"); +} +if(typeof (JSAN)!="undefined"){ +JSAN.use("MochiKit.Base",[]); +} +try{ +if(typeof (MochiKit.Base)=="undefined"){ +throw ""; +} +} +catch(e){ +throw "MochiKit.Iter depends on MochiKit.Base!"; +} +if(typeof (MochiKit.Iter)=="undefined"){ +MochiKit.Iter={}; +} +MochiKit.Iter.NAME="MochiKit.Iter"; +MochiKit.Iter.VERSION="1.4"; +MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){ +return "["+this.NAME+" "+this.VERSION+"]"; +},toString:function(){ +return this.__repr__(); +},registerIteratorFactory:function(name,_14e,_14f,_150){ +MochiKit.Iter.iteratorRegistry.register(name,_14e,_14f,_150); +},iter:function(_151,_152){ +var self=MochiKit.Iter; +if(arguments.length==2){ +return self.takewhile(function(a){ +return a!=_152; +},_151); +} +if(typeof (_151.next)=="function"){ +return _151; +}else{ +if(typeof (_151.iter)=="function"){ +return _151.iter(); +} +} +try{ +return self.iteratorRegistry.match(_151); +} +catch(e){ +var m=MochiKit.Base; +if(e==m.NotFound){ +e=new TypeError(typeof (_151)+": "+m.repr(_151)+" is not iterable"); +} +throw e; +} +},count:function(n){ +if(!n){ +n=0; +} +var m=MochiKit.Base; +return {repr:function(){ +return "count("+n+")"; +},toString:m.forwardCall("repr"),next:m.counter(n)}; +},cycle:function(p){ +var self=MochiKit.Iter; +var m=MochiKit.Base; +var lst=[]; +var _15c=self.iter(p); +return {repr:function(){ +return "cycle(...)"; +},toString:m.forwardCall("repr"),next:function(){ +try{ +var rval=_15c.next(); +lst.push(rval); +return rval; +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +if(lst.length===0){ +this.next=function(){ +throw self.StopIteration; +}; +}else{ +var i=-1; +this.next=function(){ +i=(i+1)%lst.length; +return lst[i]; +}; +} +return this.next(); +} +}}; +},repeat:function(elem,n){ +var m=MochiKit.Base; +if(typeof (n)=="undefined"){ +return {repr:function(){ +return "repeat("+m.repr(elem)+")"; +},toString:m.forwardCall("repr"),next:function(){ +return elem; +}}; +} +return {repr:function(){ +return "repeat("+m.repr(elem)+", "+n+")"; +},toString:m.forwardCall("repr"),next:function(){ +if(n<=0){ +throw MochiKit.Iter.StopIteration; +} +n-=1; +return elem; +}}; +},next:function(_162){ +return _162.next(); +},izip:function(p,q){ +var m=MochiKit.Base; +var self=MochiKit.Iter; +var next=self.next; +var _168=m.map(self.iter,arguments); +return {repr:function(){ +return "izip(...)"; +},toString:m.forwardCall("repr"),next:function(){ +return m.map(next,_168); +}}; +},ifilter:function(pred,seq){ +var m=MochiKit.Base; +seq=MochiKit.Iter.iter(seq); +if(pred===null){ +pred=m.operator.truth; +} +return {repr:function(){ +return "ifilter(...)"; +},toString:m.forwardCall("repr"),next:function(){ +while(true){ +var rval=seq.next(); +if(pred(rval)){ +return rval; +} +} +return undefined; +}}; +},ifilterfalse:function(pred,seq){ +var m=MochiKit.Base; +seq=MochiKit.Iter.iter(seq); +if(pred===null){ +pred=m.operator.truth; +} +return {repr:function(){ +return "ifilterfalse(...)"; +},toString:m.forwardCall("repr"),next:function(){ +while(true){ +var rval=seq.next(); +if(!pred(rval)){ +return rval; +} +} +return undefined; +}}; +},islice:function(seq){ +var self=MochiKit.Iter; +var m=MochiKit.Base; +seq=self.iter(seq); +var _174=0; +var stop=0; +var step=1; +var i=-1; +if(arguments.length==2){ +stop=arguments[1]; +}else{ +if(arguments.length==3){ +_174=arguments[1]; +stop=arguments[2]; +}else{ +_174=arguments[1]; +stop=arguments[2]; +step=arguments[3]; +} +} +return {repr:function(){ +return "islice("+["...",_174,stop,step].join(", ")+")"; +},toString:m.forwardCall("repr"),next:function(){ +var rval; +while(i<_174){ +rval=seq.next(); +i++; +} +if(_174>=stop){ +throw self.StopIteration; +} +_174+=step; +return rval; +}}; +},imap:function(fun,p,q){ +var m=MochiKit.Base; +var self=MochiKit.Iter; +var _17e=m.map(self.iter,m.extend(null,arguments,1)); +var map=m.map; +var next=self.next; +return {repr:function(){ +return "imap(...)"; +},toString:m.forwardCall("repr"),next:function(){ +return fun.apply(this,map(next,_17e)); +}}; +},applymap:function(fun,seq,self){ +seq=MochiKit.Iter.iter(seq); +var m=MochiKit.Base; +return {repr:function(){ +return "applymap(...)"; +},toString:m.forwardCall("repr"),next:function(){ +return fun.apply(self,seq.next()); +}}; +},chain:function(p,q){ +var self=MochiKit.Iter; +var m=MochiKit.Base; +if(arguments.length==1){ +return self.iter(arguments[0]); +} +var _189=m.map(self.iter,arguments); +return {repr:function(){ +return "chain(...)"; +},toString:m.forwardCall("repr"),next:function(){ +while(_189.length>1){ +try{ +return _189[0].next(); +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +_189.shift(); +} +} +if(_189.length==1){ +var arg=_189.shift(); +this.next=m.bind("next",arg); +return this.next(); +} +throw self.StopIteration; +}}; +},takewhile:function(pred,seq){ +var self=MochiKit.Iter; +seq=self.iter(seq); +return {repr:function(){ +return "takewhile(...)"; +},toString:MochiKit.Base.forwardCall("repr"),next:function(){ +var rval=seq.next(); +if(!pred(rval)){ +this.next=function(){ +throw self.StopIteration; +}; +this.next(); +} +return rval; +}}; +},dropwhile:function(pred,seq){ +seq=MochiKit.Iter.iter(seq); +var m=MochiKit.Base; +var bind=m.bind; +return {"repr":function(){ +return "dropwhile(...)"; +},"toString":m.forwardCall("repr"),"next":function(){ +while(true){ +var rval=seq.next(); +if(!pred(rval)){ +break; +} +} +this.next=bind("next",seq); +return rval; +}}; +},_tee:function(_194,sync,_196){ +sync.pos[_194]=-1; +var m=MochiKit.Base; +var _198=m.listMin; +return {repr:function(){ +return "tee("+_194+", ...)"; +},toString:m.forwardCall("repr"),next:function(){ +var rval; +var i=sync.pos[_194]; +if(i==sync.max){ +rval=_196.next(); +sync.deque.push(rval); +sync.max+=1; +sync.pos[_194]+=1; +}else{ +rval=sync.deque[i-sync.min]; +sync.pos[_194]+=1; +if(i==sync.min&&_198(sync.pos)!=sync.min){ +sync.min+=1; +sync.deque.shift(); +} +} +return rval; +}}; +},tee:function(_19b,n){ +var rval=[]; +var sync={"pos":[],"deque":[],"max":-1,"min":-1}; +if(arguments.length==1||typeof (n)=="undefined"||n===null){ +n=2; +} +var self=MochiKit.Iter; +_19b=self.iter(_19b); +var _tee=self._tee; +for(var i=0;i0&&_1ac>=stop)||(step<0&&_1ac<=stop)){ +throw MochiKit.Iter.StopIteration; +} +var rval=_1ac; +_1ac+=step; +return rval; +},repr:function(){ +return "range("+[_1ac,stop,step].join(", ")+")"; +},toString:MochiKit.Base.forwardCall("repr")}; +},sum:function(_1b0,_1b1){ +if(typeof (_1b1)=="undefined"||_1b1===null){ +_1b1=0; +} +var x=_1b1; +var self=MochiKit.Iter; +_1b0=self.iter(_1b0); +try{ +while(true){ +x+=_1b0.next(); +} +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +} +return x; +},exhaust:function(_1b4){ +var self=MochiKit.Iter; +_1b4=self.iter(_1b4); +try{ +while(true){ +_1b4.next(); +} +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +} +},forEach:function(_1b6,func,self){ +var m=MochiKit.Base; +if(arguments.length>2){ +func=m.bind(func,self); +} +if(m.isArrayLike(_1b6)){ +try{ +for(var i=0;i<_1b6.length;i++){ +func(_1b6[i]); +} +} +catch(e){ +if(e!=MochiKit.Iter.StopIteration){ +throw e; +} +} +}else{ +self=MochiKit.Iter; +self.exhaust(self.imap(func,_1b6)); +} +},every:function(_1bb,func){ +var self=MochiKit.Iter; +try{ +self.ifilterfalse(func,_1bb).next(); +return false; +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +return true; +} +},sorted:function(_1be,cmp){ +var rval=MochiKit.Iter.list(_1be); +if(arguments.length==1){ +cmp=MochiKit.Base.compare; +} +rval.sort(cmp); +return rval; +},reversed:function(_1c1){ +var rval=MochiKit.Iter.list(_1c1); +rval.reverse(); +return rval; +},some:function(_1c3,func){ +var self=MochiKit.Iter; +try{ +self.ifilter(func,_1c3).next(); +return true; +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +return false; +} +},iextend:function(lst,_1c7){ +if(MochiKit.Base.isArrayLike(_1c7)){ +for(var i=0;i<_1c7.length;i++){ +lst.push(_1c7[i]); +} +}else{ +var self=MochiKit.Iter; +_1c7=self.iter(_1c7); +try{ +while(true){ +lst.push(_1c7.next()); +} +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +} +} +return lst; +},groupby:function(_1ca,_1cb){ +var m=MochiKit.Base; +var self=MochiKit.Iter; +if(arguments.length<2){ +_1cb=m.operator.identity; +} +_1ca=self.iter(_1ca); +var pk=undefined; +var k=undefined; +var v; +function fetch(){ +v=_1ca.next(); +k=_1cb(v); +} +function eat(){ +var ret=v; +v=undefined; +return ret; +} +var _1d2=true; +var _1d3=m.compare; +return {repr:function(){ +return "groupby(...)"; +},next:function(){ +while(_1d3(k,pk)===0){ +fetch(); +if(_1d2){ +_1d2=false; +break; +} +} +pk=k; +return [k,{next:function(){ +if(v==undefined){ +fetch(); +} +if(_1d3(k,pk)!==0){ +throw self.StopIteration; +} +return eat(); +}}]; +}}; +},groupby_as_array:function(_1d4,_1d5){ +var m=MochiKit.Base; +var self=MochiKit.Iter; +if(arguments.length<2){ +_1d5=m.operator.identity; +} +_1d4=self.iter(_1d4); +var _1d8=[]; +var _1d9=true; +var _1da; +var _1db=m.compare; +while(true){ +try{ +var _1dc=_1d4.next(); +var key=_1d5(_1dc); +} +catch(e){ +if(e==self.StopIteration){ +break; +} +throw e; +} +if(_1d9||_1db(key,_1da)!==0){ +var _1de=[]; +_1d8.push([key,_1de]); +} +_1de.push(_1dc); +_1d9=false; +_1da=key; +} +return _1d8; +},arrayLikeIter:function(_1df){ +var i=0; +return {repr:function(){ +return "arrayLikeIter(...)"; +},toString:MochiKit.Base.forwardCall("repr"),next:function(){ +if(i>=_1df.length){ +throw MochiKit.Iter.StopIteration; +} +return _1df[i++]; +}}; +},hasIterateNext:function(_1e1){ +return (_1e1&&typeof (_1e1.iterateNext)=="function"); +},iterateNextIter:function(_1e2){ +return {repr:function(){ +return "iterateNextIter(...)"; +},toString:MochiKit.Base.forwardCall("repr"),next:function(){ +var rval=_1e2.iterateNext(); +if(rval===null||rval===undefined){ +throw MochiKit.Iter.StopIteration; +} +return rval; +}}; +}}); +MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter",]; +MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"]; +MochiKit.Iter.__new__=function(){ +var m=MochiKit.Base; +if(typeof (StopIteration)!="undefined"){ +this.StopIteration=StopIteration; +}else{ +this.StopIteration=new m.NamedError("StopIteration"); +} +this.iteratorRegistry=new m.AdapterRegistry(); +this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter); +this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter); +this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; +m.nameFunctions(this); +}; +MochiKit.Iter.__new__(); +if(MochiKit.__export__){ +reduce=MochiKit.Iter.reduce; +} +MochiKit.Base._exportSymbols(this,MochiKit.Iter); +if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Format"); } if(typeof (MochiKit)=="undefined"){ @@ -1018,80 +1630,80 @@ return "["+this.NAME+" "+this.VERSION+"]"; MochiKit.Format.toString=function(){ return this.__repr__(); }; -MochiKit.Format._numberFormatter=function(_14d,_14e,_14f,_150,_151,_152,_153,_154,_155){ +MochiKit.Format._numberFormatter=function(_1e5,_1e6,_1e7,_1e8,_1e9,_1ea,_1eb,_1ec,_1ed){ return function(num){ num=parseFloat(num); if(typeof (num)=="undefined"||num===null||isNaN(num)){ -return _14d; +return _1e5; } -var _157=_14e; -var _158=_14f; +var _1ef=_1e6; +var _1f0=_1e7; if(num<0){ num=-num; }else{ -_157=_157.replace(/-/,""); +_1ef=_1ef.replace(/-/,""); } var me=arguments.callee; -var fmt=MochiKit.Format.formatLocale(_150); -if(_151){ +var fmt=MochiKit.Format.formatLocale(_1e8); +if(_1e9){ num=num*100; -_158=fmt.percent+_158; +_1f0=fmt.percent+_1f0; } -num=MochiKit.Format.roundToFixed(num,_152); -var _15b=num.split(/\./); -var _15c=_15b[0]; -var frac=(_15b.length==1)?"":_15b[1]; +num=MochiKit.Format.roundToFixed(num,_1ea); +var _1f3=num.split(/\./); +var _1f4=_1f3[0]; +var frac=(_1f3.length==1)?"":_1f3[1]; var res=""; -while(_15c.length<_153){ -_15c="0"+_15c; +while(_1f4.length<_1eb){ +_1f4="0"+_1f4; } -if(_154){ -while(_15c.length>_154){ -var i=_15c.length-_154; -res=fmt.separator+_15c.substring(i,_15c.length)+res; -_15c=_15c.substring(0,i); +if(_1ec){ +while(_1f4.length>_1ec){ +var i=_1f4.length-_1ec; +res=fmt.separator+_1f4.substring(i,_1f4.length)+res; +_1f4=_1f4.substring(0,i); } } -res=_15c+res; -if(_152>0){ -while(frac.length<_155){ +res=_1f4+res; +if(_1ea>0){ +while(frac.length<_1ed){ frac=frac+"0"; } res=res+fmt.decimal+frac; } -return _157+res+_158; +return _1ef+res+_1f0; }; }; -MochiKit.Format.numberFormatter=function(_160,_161,_162){ -if(typeof (_161)=="undefined"){ -_161=""; +MochiKit.Format.numberFormatter=function(_1f8,_1f9,_1fa){ +if(typeof (_1f9)=="undefined"){ +_1f9=""; } -var _163=_160.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/); -if(!_163){ +var _1fb=_1f8.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/); +if(!_1fb){ throw TypeError("Invalid pattern"); } -var _164=_160.substr(0,_163.index); -var _165=_160.substr(_163.index+_163[0].length); -if(_164.search(/-/)==-1){ -_164=_164+"-"; +var _1fc=_1f8.substr(0,_1fb.index); +var _1fd=_1f8.substr(_1fb.index+_1fb[0].length); +if(_1fc.search(/-/)==-1){ +_1fc=_1fc+"-"; } -var _166=_163[1]; -var frac=(typeof (_163[2])=="string"&&_163[2]!="")?_163[2]:""; -var _168=(typeof (_163[3])=="string"&&_163[3]!=""); -var tmp=_166.split(/,/); -var _16a; -if(typeof (_162)=="undefined"){ -_162="default"; +var _1fe=_1fb[1]; +var frac=(typeof (_1fb[2])=="string"&&_1fb[2]!="")?_1fb[2]:""; +var _200=(typeof (_1fb[3])=="string"&&_1fb[3]!=""); +var tmp=_1fe.split(/,/); +var _202; +if(typeof (_1fa)=="undefined"){ +_1fa="default"; } if(tmp.length==1){ -_16a=null; +_202=null; }else{ -_16a=tmp[1].length; +_202=tmp[1].length; } -var _16b=_166.length-_166.replace(/0/g,"").length; -var _16c=frac.length-frac.replace(/0/g,"").length; -var _16d=frac.length; -var rval=MochiKit.Format._numberFormatter(_161,_164,_165,_162,_168,_16d,_16b,_16a,_16c); +var _203=_1fe.length-_1fe.replace(/0/g,"").length; +var _204=frac.length-frac.replace(/0/g,"").length; +var _205=frac.length; +var rval=MochiKit.Format._numberFormatter(_1f9,_1fc,_1fd,_1fa,_200,_205,_203,_202,_204); var m=MochiKit.Base; if(m){ var fn=arguments.callee; @@ -1102,33 +1714,33 @@ return [self.NAME,"(",map(m.repr,args).join(", "),")"].join(""); } return rval; }; -MochiKit.Format.formatLocale=function(_172){ -if(typeof (_172)=="undefined"||_172===null){ -_172="default"; +MochiKit.Format.formatLocale=function(_20a){ +if(typeof (_20a)=="undefined"||_20a===null){ +_20a="default"; } -if(typeof (_172)=="string"){ -var rval=MochiKit.Format.LOCALE[_172]; +if(typeof (_20a)=="string"){ +var rval=MochiKit.Format.LOCALE[_20a]; if(typeof (rval)=="string"){ rval=arguments.callee(rval); -MochiKit.Format.LOCALE[_172]=rval; +MochiKit.Format.LOCALE[_20a]=rval; } return rval; }else{ -return _172; +return _20a; } }; -MochiKit.Format.twoDigitAverage=function(_174,_175){ -if(_175){ -var res=_174/_175; +MochiKit.Format.twoDigitAverage=function(_20c,_20d){ +if(_20d){ +var res=_20c/_20d; if(!isNaN(res)){ -return MochiKit.Format.twoDigitFloat(_174/_175); +return MochiKit.Format.twoDigitFloat(_20c/_20d); } } return "0"; }; -MochiKit.Format.twoDigitFloat=function(_177){ -var sign=(_177<0?"-":""); -var s=Math.floor(Math.abs(_177)*100).toString(); +MochiKit.Format.twoDigitFloat=function(_20f){ +var sign=(_20f<0?"-":""); +var s=Math.floor(Math.abs(_20f)*100).toString(); if(s=="0"){ return s; } @@ -1150,45 +1762,45 @@ return head+"."+tail; } } }; -MochiKit.Format.lstrip=function(str,_17d){ +MochiKit.Format.lstrip=function(str,_215){ str=str+""; if(typeof (str)!="string"){ return null; } -if(!_17d){ +if(!_215){ return str.replace(/^\s+/,""); }else{ -return str.replace(new RegExp("^["+_17d+"]+"),""); +return str.replace(new RegExp("^["+_215+"]+"),""); } }; -MochiKit.Format.rstrip=function(str,_17f){ +MochiKit.Format.rstrip=function(str,_217){ str=str+""; if(typeof (str)!="string"){ return null; } -if(!_17f){ +if(!_217){ return str.replace(/\s+$/,""); }else{ -return str.replace(new RegExp("["+_17f+"]+$"),""); +return str.replace(new RegExp("["+_217+"]+$"),""); } }; -MochiKit.Format.strip=function(str,_181){ +MochiKit.Format.strip=function(str,_219){ var self=MochiKit.Format; -return self.rstrip(self.lstrip(str,_181),_181); +return self.rstrip(self.lstrip(str,_219),_219); }; -MochiKit.Format.truncToFixed=function(_183,_184){ -_183=Math.floor(_183*Math.pow(10,_184)); -var res=(_183*Math.pow(10,-_184)).toFixed(_184); +MochiKit.Format.truncToFixed=function(_21b,_21c){ +_21b=Math.floor(_21b*Math.pow(10,_21c)); +var res=(_21b*Math.pow(10,-_21c)).toFixed(_21c); if(res.charAt(0)=="."){ res="0"+res; } return res; }; -MochiKit.Format.roundToFixed=function(_186,_187){ -return MochiKit.Format.truncToFixed(_186+0.5*Math.pow(10,-_187),_187); +MochiKit.Format.roundToFixed=function(_21e,_21f){ +return MochiKit.Format.truncToFixed(_21e+0.5*Math.pow(10,-_21f),_21f); }; -MochiKit.Format.percentFormat=function(_188){ -return MochiKit.Format.twoDigitFloat(100*_188)+"%"; +MochiKit.Format.percentFormat=function(_220){ +return MochiKit.Format.twoDigitFloat(100*_220)+"%"; }; MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"]; MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"}; @@ -1221,11 +1833,11 @@ MochiKit.Format.__new__(); if(typeof (MochiKit.Base)!="undefined"){ MochiKit.Base._exportSymbols(this,MochiKit.Format); }else{ -(function(_18d,_18e){ +(function(_225,_226){ if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(MochiKit.__export__===false)){ -var all=_18e.EXPORT_TAGS[":all"]; +var all=_226.EXPORT_TAGS[":all"]; for(var i=0;i=0){ var opt=elem.options[elem.selectedIndex]; @@ -1310,18 +1922,18 @@ if(h&&!h.match(/^[^>]+\svalue\s*=/i)){ v=opt.text; } } -_198.push(name); -_199.push(v); +_230.push(name); +_231.push(v); return null; } -_198.push(name); -_199.push(""); +_230.push(name); +_231.push(""); return null; }else{ var opts=elem.options; if(!opts.length){ -_198.push(name); -_199.push(""); +_230.push(name); +_231.push(""); return null; } for(var i=0;i]+\svalue\s*=/i)){ v=opt.text; } } -_198.push(name); -_199.push(v); +_230.push(name); +_231.push(v); } return null; } } -if(_19e==="FORM"||_19e==="P"||_19e==="SPAN"||_19e==="DIV"){ +if(_236==="FORM"||_236==="P"||_236==="SPAN"||_236==="DIV"){ return elem.childNodes; } -_198.push(name); -_199.push(elem.value||""); +_230.push(name); +_231.push(elem.value||""); return null; } return elem.childNodes; }); -return [_198,_199]; +return [_230,_231]; },withDocument:function(doc,func){ var self=MochiKit.DOM; -var _1a7=self._document; +var _23f=self._document; var rval; try{ self._document=doc; rval=func(); } catch(e){ -self._document=_1a7; +self._document=_23f; throw e; } -self._document=_1a7; +self._document=_23f; return rval; -},registerDOMConverter:function(name,_1aa,wrap,_1ac){ -MochiKit.DOM.domConverters.register(name,_1aa,wrap,_1ac); +},registerDOMConverter:function(name,_242,wrap,_244){ +MochiKit.DOM.domConverters.register(name,_242,wrap,_244); },coerceToDOM:function(node,ctx){ var m=MochiKit.Base; var im=MochiKit.Iter; var self=MochiKit.DOM; if(im){ var iter=im.iter; -var _1b3=im.repeat; +var _24b=im.repeat; var map=m.map; } -var _1b5=self.domConverters; -var _1b6=arguments.callee; -var _1b7=m.NotFound; +var _24d=self.domConverters; +var _24e=arguments.callee; +var _24f=m.NotFound; while(true){ if(typeof (node)=="undefined"||node===null){ return null; @@ -1409,49 +2021,49 @@ node=node.apply(ctx,[ctx]); continue; } if(im){ -var _1b8=null; +var _250=null; try{ -_1b8=iter(node); +_250=iter(node); } catch(e){ } -if(_1b8){ -return map(_1b6,_1b8,_1b3(ctx)); +if(_250){ +return map(_24e,_250,_24b(ctx)); } } try{ -node=_1b5.match(node,ctx); +node=_24d.match(node,ctx); continue; } catch(e){ -if(e!=_1b7){ +if(e!=_24f){ throw e; } } return self._document.createTextNode(node.toString()); } return undefined; -},isChildNode:function(node,_1ba){ +},isChildNode:function(node,_252){ var self=MochiKit.DOM; if(typeof (node)=="string"){ node=self.getElement(node); } -if(typeof (_1ba)=="string"){ -_1ba=self.getElement(_1ba); +if(typeof (_252)=="string"){ +_252=self.getElement(_252); } -if(node===_1ba){ +if(node===_252){ return true; } while(node&&node.tagName.toUpperCase()!="BODY"){ node=node.parentNode; -if(node===_1ba){ +if(node===_252){ return true; } } return false; -},setNodeAttribute:function(node,attr,_1be){ +},setNodeAttribute:function(node,attr,_256){ var o={}; -o[attr]=_1be; +o[attr]=_256; try{ return MochiKit.DOM.updateNodeAttributes(node,o); } @@ -1460,11 +2072,11 @@ catch(e){ return null; },getNodeAttribute:function(node,attr){ var self=MochiKit.DOM; -var _1c3=self.attributeArray.renames[attr]; +var _25b=self.attributeArray.renames[attr]; node=self.getElement(node); try{ -if(_1c3){ -return node[_1c3]; +if(_25b){ +return node[_25b]; } return node.getAttribute(attr); } @@ -1473,33 +2085,33 @@ catch(e){ return null; },removeNodeAttribute:function(node,attr){ var self=MochiKit.DOM; -var _1c7=self.attributeArray.renames[attr]; +var _25f=self.attributeArray.renames[attr]; node=self.getElement(node); try{ -if(_1c7){ -return node[_1c7]; +if(_25f){ +return node[_25f]; } return node.removeAttribute(attr); } catch(e){ } return null; -},updateNodeAttributes:function(node,_1c9){ +},updateNodeAttributes:function(node,_261){ var elem=node; var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } -if(_1c9){ -var _1cc=MochiKit.Base.updatetree; +if(_261){ +var _264=MochiKit.Base.updatetree; if(self.attributeArray.compliant){ -for(var k in _1c9){ -var v=_1c9[k]; +for(var k in _261){ +var v=_261[k]; if(typeof (v)=="object"&&typeof (elem[k])=="object"){ if(k=="style"&&MochiKit.Style){ MochiKit.Style.setStyle(elem,v); }else{ -_1cc(elem[k],v); +_264(elem[k],v); } }else{ if(k.substring(0,2)=="on"){ @@ -1513,21 +2125,21 @@ elem.setAttribute(k,v); } } }else{ -var _1cf=self.attributeArray.renames; -for(var k in _1c9){ -v=_1c9[k]; -var _1d0=_1cf[k]; +var _267=self.attributeArray.renames; +for(var k in _261){ +v=_261[k]; +var _268=_267[k]; if(k=="style"&&typeof (v)=="string"){ elem.style.cssText=v; }else{ -if(typeof (_1d0)=="string"){ -elem[_1d0]=v; +if(typeof (_268)=="string"){ +elem[_268]=v; }else{ if(typeof (elem[k])=="object"&&typeof (v)=="object"){ if(k=="style"&&MochiKit.Style){ MochiKit.Style.setStyle(elem,v); }else{ -_1cc(elem[k],v); +_264(elem[k],v); } }else{ if(k.substring(0,2)=="on"){ @@ -1551,16 +2163,16 @@ var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } -var _1d4=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; -var _1d5=MochiKit.Base.concat; -while(_1d4.length){ -var n=_1d4.shift(); +var _26c=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; +var _26d=MochiKit.Base.concat; +while(_26c.length){ +var n=_26c.shift(); if(typeof (n)=="undefined"||n===null){ }else{ if(typeof (n.nodeType)=="number"){ elem.appendChild(n); }else{ -_1d4=_1d5(n,_1d4); +_26c=_26d(n,_26c); } } } @@ -1571,32 +2183,32 @@ var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } -var _1da=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; -var _1db=elem.parentNode; -var _1dc=MochiKit.Base.concat; -while(_1da.length){ -var n=_1da.shift(); +var _272=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; +var _273=elem.parentNode; +var _274=MochiKit.Base.concat; +while(_272.length){ +var n=_272.shift(); if(typeof (n)=="undefined"||n===null){ }else{ if(typeof (n.nodeType)=="number"){ -_1db.insertBefore(n,elem); +_273.insertBefore(n,elem); }else{ -_1da=_1dc(n,_1da); +_272=_274(n,_272); } } } -return _1db; +return _273; },insertSiblingNodesAfter:function(node){ var elem=node; var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } -var _1e1=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; +var _279=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; if(elem.nextSibling){ -return self.insertSiblingNodesBefore(elem.nextSibling,_1e1); +return self.insertSiblingNodesBefore(elem.nextSibling,_279); }else{ -return self.appendChildNodes(elem.parentNode,_1e1); +return self.appendChildNodes(elem.parentNode,_279); } },replaceChildNodes:function(node){ var elem=node; @@ -1605,40 +2217,40 @@ if(typeof (node)=="string"){ elem=self.getElement(node); arguments[0]=elem; } -var _1e5; -while((_1e5=elem.firstChild)){ -elem.removeChild(_1e5); +var _27d; +while((_27d=elem.firstChild)){ +elem.removeChild(_27d); } if(arguments.length<2){ return elem; }else{ return self.appendChildNodes.apply(this,arguments); } -},createDOM:function(name,_1e7){ +},createDOM:function(name,_27f){ var elem; var self=MochiKit.DOM; var m=MochiKit.Base; -if(typeof (_1e7)=="string"||typeof (_1e7)=="number"){ +if(typeof (_27f)=="string"||typeof (_27f)=="number"){ var args=m.extend([name,null],arguments,1); return arguments.callee.apply(this,args); } if(typeof (name)=="string"){ -var _1ec=self._xhtml; -if(_1e7&&!self.attributeArray.compliant){ -var _1ed=""; -if("name" in _1e7){ -_1ed+=" name=\""+self.escapeHTML(_1e7.name)+"\""; +var _284=self._xhtml; +if(_27f&&!self.attributeArray.compliant){ +var _285=""; +if("name" in _27f){ +_285+=" name=\""+self.escapeHTML(_27f.name)+"\""; } -if(name=="input"&&"type" in _1e7){ -_1ed+=" type=\""+self.escapeHTML(_1e7.type)+"\""; +if(name=="input"&&"type" in _27f){ +_285+=" type=\""+self.escapeHTML(_27f.type)+"\""; } -if(_1ed){ -name="<"+name+_1ed+">"; -_1ec=false; +if(_285){ +name="<"+name+_285+">"; +_284=false; } } var d=self._document; -if(_1ec&&d===document){ +if(_284&&d===document){ elem=d.createElementNS("http://www.w3.org/1999/xhtml",name); }else{ elem=d.createElement(name); @@ -1646,8 +2258,8 @@ elem=d.createElement(name); }else{ elem=name; } -if(_1e7){ -self.updateNodeAttributes(elem,_1e7); +if(_27f){ +self.updateNodeAttributes(elem,_27f); } if(arguments.length<=2){ return elem; @@ -1665,12 +2277,12 @@ return e; },swapDOM:function(dest,src){ var self=MochiKit.DOM; dest=self.getElement(dest); -var _1f5=dest.parentNode; +var _28d=dest.parentNode; if(src){ src=self.getElement(src); -_1f5.replaceChild(src,dest); +_28d.replaceChild(src,dest); }else{ -_1f5.removeChild(dest); +_28d.removeChild(dest); } return src; },getElement:function(id){ @@ -1680,40 +2292,40 @@ return ((typeof (id)=="string")?self._document.getElementById(id):id); }else{ return MochiKit.Base.map(self.getElement,arguments); } -},getElementsByTagAndClassName:function(_1f8,_1f9,_1fa){ +},getElementsByTagAndClassName:function(_290,_291,_292){ var self=MochiKit.DOM; -if(typeof (_1f8)=="undefined"||_1f8===null){ -_1f8="*"; +if(typeof (_290)=="undefined"||_290===null){ +_290="*"; } -if(typeof (_1fa)=="undefined"||_1fa===null){ -_1fa=self._document; +if(typeof (_292)=="undefined"||_292===null){ +_292=self._document; } -_1fa=self.getElement(_1fa); -var _1fc=(_1fa.getElementsByTagName(_1f8)||self._document.all); -if(typeof (_1f9)=="undefined"||_1f9===null){ -return MochiKit.Base.extend(null,_1fc); +_292=self.getElement(_292); +var _294=(_292.getElementsByTagName(_290)||self._document.all); +if(typeof (_291)=="undefined"||_291===null){ +return MochiKit.Base.extend(null,_294); } -var _1fd=[]; -for(var i=0;i<_1fc.length;i++){ -var _1ff=_1fc[i]; -var cls=_1ff.className; +var _295=[]; +for(var i=0;i<_294.length;i++){ +var _297=_294[i]; +var cls=_297.className; if(!cls){ continue; } -var _201=cls.split(" "); -for(var j=0;j<_201.length;j++){ -if(_201[j]==_1f9){ -_1fd.push(_1ff); +var _299=cls.split(" "); +for(var j=0;j<_299.length;j++){ +if(_299[j]==_291){ +_295.push(_297); break; } } } -return _1fd; +return _295; },_newCallStack:function(path,once){ var rval=function(){ -var _206=arguments.callee.callStack; -for(var i=0;i<_206.length;i++){ -if(_206[i].apply(this,arguments)===false){ +var _29e=arguments.callee.callStack; +for(var i=0;i<_29e.length;i++){ +if(_29e[i].apply(this,arguments)===false){ break; } } @@ -1727,102 +2339,102 @@ catch(e){ }; rval.callStack=[]; return rval; -},addToCallStack:function(_208,path,func,once){ +},addToCallStack:function(_2a0,path,func,once){ var self=MochiKit.DOM; -var _20d=_208[path]; -var _20e=_20d; -if(!(typeof (_20d)=="function"&&typeof (_20d.callStack)=="object"&&_20d.callStack!==null)){ -_20e=self._newCallStack(path,once); -if(typeof (_20d)=="function"){ -_20e.callStack.push(_20d); +var _2a5=_2a0[path]; +var _2a6=_2a5; +if(!(typeof (_2a5)=="function"&&typeof (_2a5.callStack)=="object"&&_2a5.callStack!==null)){ +_2a6=self._newCallStack(path,once); +if(typeof (_2a5)=="function"){ +_2a6.callStack.push(_2a5); } -_208[path]=_20e; +_2a0[path]=_2a6; } -_20e.callStack.push(func); +_2a6.callStack.push(func); },addLoadEvent:function(func){ var self=MochiKit.DOM; self.addToCallStack(self._window,"onload",func,true); -},focusOnLoad:function(_211){ +},focusOnLoad:function(_2a9){ var self=MochiKit.DOM; self.addLoadEvent(function(){ -_211=self.getElement(_211); -if(_211){ -_211.focus(); +_2a9=self.getElement(_2a9); +if(_2a9){ +_2a9.focus(); } }); -},setElementClass:function(_213,_214){ +},setElementClass:function(_2ab,_2ac){ var self=MochiKit.DOM; -var obj=self.getElement(_213); +var obj=self.getElement(_2ab); if(self.attributeArray.compliant){ -obj.setAttribute("class",_214); +obj.setAttribute("class",_2ac); }else{ -obj.setAttribute("className",_214); +obj.setAttribute("className",_2ac); } -},toggleElementClass:function(_217){ +},toggleElementClass:function(_2af){ var self=MochiKit.DOM; for(var i=1;i"); -_23a.push(""); -var _244=dom.childNodes; -for(i=_244.length-1;i>=0;i--){ -_23a.push(_244[i]); +_2d2.push(""); +var _2dc=dom.childNodes; +for(i=_2dc.length-1;i>=0;i--){ +_2d2.push(_2dc[i]); } }else{ lst.push("/>"); } }else{ if(dom.nodeType==3){ -lst.push(_23c(dom.nodeValue)); +lst.push(_2d4(dom.nodeValue)); } } } } return lst; -},scrapeText:function(node,_246){ +},scrapeText:function(node,_2de){ var rval=[]; (function(node){ var cn=node.childNodes; @@ -1891,103 +2503,103 @@ for(var i=0;i0){ -var _26d=m.filter; -_26c=function(node){ -return _26d(_26c.ignoreAttrFilter,node.attributes); -}; -_26c.ignoreAttr={}; -var _26f=_26b.attributes; -var _270=_26c.ignoreAttr; -for(var i=0;i<_26f.length;i++){ -var a=_26f[i]; -_270[a.name]=a.value; -} -_26c.ignoreAttrFilter=function(a){ -return (_26c.ignoreAttr[a.name]!=a.value); -}; -_26c.compliant=false; -_26c.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"}; -}else{ -_26c=function(node){ +var _303=this._document.createElement("span"); +var _304; +if(_303&&_303.attributes&&_303.attributes.length>0){ +var _305=m.filter; +_304=function(node){ +return _305(_304.ignoreAttrFilter,node.attributes); +}; +_304.ignoreAttr={}; +var _307=_303.attributes; +var _308=_304.ignoreAttr; +for(var i=0;i<_307.length;i++){ +var a=_307[i]; +_308[a.name]=a.value; +} +_304.ignoreAttrFilter=function(a){ +return (_304.ignoreAttr[a.name]!=a.value); +}; +_304.compliant=false; +_304.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"}; +}else{ +_304=function(node){ return node.attributes; }; -_26c.compliant=true; -_26c.renames={}; +_304.compliant=true; +_304.renames={}; } -this.attributeArray=_26c; -var _275=function(_276,arr){ -var _278=arr[1].split("."); +this.attributeArray=_304; +var _30d=function(_30e,arr){ +var _310=arr[1].split("."); var str=""; var obj={}; -str+="if (!MochiKit."+_278[1]+") { throw new Error(\""; +str+="if (!MochiKit."+_310[1]+") { throw new Error(\""; str+="This function has been deprecated and depends on MochiKit."; -str+=_278[1]+".\");}"; -str+="return MochiKit."+_278[1]+"."+arr[0]; +str+=_310[1]+".\");}"; +str+="return MochiKit."+_310[1]+"."+arr[0]; str+=".apply(this, arguments);"; -obj[_278[2]]=new Function(str); -MochiKit.Base.update(MochiKit[_276],obj); +obj[_310[2]]=new Function(str); +MochiKit.Base.update(MochiKit[_30e],obj); }; for(var i;i0.5; @@ -2571,114 +3183,114 @@ var c=this.rgb; var col=[c.r,c.g,c.b,c.a]; return this.__class__.NAME+"("+col.join(", ")+")"; }}; -MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_2f0,blue,_2f2){ -var _2f3=MochiKit.Color.Color; +MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_388,blue,_38a){ +var _38b=MochiKit.Color.Color; if(arguments.length==1){ var rgb=red; red=rgb.r; -_2f0=rgb.g; +_388=rgb.g; blue=rgb.b; if(typeof (rgb.a)=="undefined"){ -_2f2=undefined; +_38a=undefined; }else{ -_2f2=rgb.a; +_38a=rgb.a; } } -return new _2f3(red,_2f0,blue,_2f2); -},fromHSL:function(hue,_2f6,_2f7,_2f8){ +return new _38b(red,_388,blue,_38a); +},fromHSL:function(hue,_38e,_38f,_390){ var m=MochiKit.Color; return m.Color.fromRGB(m.hslToRGB.apply(m,arguments)); -},fromHSV:function(hue,_2fb,_2fc,_2fd){ +},fromHSV:function(hue,_393,_394,_395){ var m=MochiKit.Color; return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments)); },fromName:function(name){ -var _300=MochiKit.Color.Color; +var _398=MochiKit.Color.Color; if(name.charAt(0)=="\""){ name=name.substr(1,name.length-2); } -var _301=_300._namedColors[name.toLowerCase()]; -if(typeof (_301)=="string"){ -return _300.fromHexString(_301); +var _399=_398._namedColors[name.toLowerCase()]; +if(typeof (_399)=="string"){ +return _398.fromHexString(_399); }else{ if(name=="transparent"){ -return _300.transparentColor(); +return _398.transparentColor(); } } return null; -},fromString:function(_302){ +},fromString:function(_39a){ var self=MochiKit.Color.Color; -var _304=_302.substr(0,3); -if(_304=="rgb"){ -return self.fromRGBString(_302); +var _39c=_39a.substr(0,3); +if(_39c=="rgb"){ +return self.fromRGBString(_39a); }else{ -if(_304=="hsl"){ -return self.fromHSLString(_302); +if(_39c=="hsl"){ +return self.fromHSLString(_39a); }else{ -if(_302.charAt(0)=="#"){ -return self.fromHexString(_302); +if(_39a.charAt(0)=="#"){ +return self.fromHexString(_39a); } } } -return self.fromName(_302); -},fromHexString:function(_305){ -if(_305.charAt(0)=="#"){ -_305=_305.substring(1); +return self.fromName(_39a); +},fromHexString:function(_39d){ +if(_39d.charAt(0)=="#"){ +_39d=_39d.substring(1); } -var _306=[]; +var _39e=[]; var i,hex; -if(_305.length==3){ +if(_39d.length==3){ for(i=0;i<3;i++){ -hex=_305.substr(i,1); -_306.push(parseInt(hex+hex,16)/255); +hex=_39d.substr(i,1); +_39e.push(parseInt(hex+hex,16)/255); } }else{ for(i=0;i<6;i+=2){ -hex=_305.substr(i,2); -_306.push(parseInt(hex,16)/255); +hex=_39d.substr(i,2); +_39e.push(parseInt(hex,16)/255); } } -var _309=MochiKit.Color.Color; -return _309.fromRGB.apply(_309,_306); -},_fromColorString:function(pre,_30b,_30c,_30d){ -if(_30d.indexOf(pre)===0){ -_30d=_30d.substring(_30d.indexOf("(",3)+1,_30d.length-1); +var _3a1=MochiKit.Color.Color; +return _3a1.fromRGB.apply(_3a1,_39e); +},_fromColorString:function(pre,_3a3,_3a4,_3a5){ +if(_3a5.indexOf(pre)===0){ +_3a5=_3a5.substring(_3a5.indexOf("(",3)+1,_3a5.length-1); } -var _30e=_30d.split(/\s*,\s*/); -var _30f=[]; -for(var i=0;i<_30e.length;i++){ -var c=_30e[i]; +var _3a6=_3a5.split(/\s*,\s*/); +var _3a7=[]; +for(var i=0;i<_3a6.length;i++){ +var c=_3a6[i]; var val; -var _313=c.substring(c.length-3); +var _3ab=c.substring(c.length-3); if(c.charAt(c.length-1)=="%"){ val=0.01*parseFloat(c.substring(0,c.length-1)); }else{ -if(_313=="deg"){ +if(_3ab=="deg"){ val=parseFloat(c)/360; }else{ -if(_313=="rad"){ +if(_3ab=="rad"){ val=parseFloat(c)/(Math.PI*2); }else{ -val=_30c[i]*parseFloat(c); +val=_3a4[i]*parseFloat(c); } } } -_30f.push(val); +_3a7.push(val); } -return this[_30b].apply(this,_30f); -},fromComputedStyle:function(elem,_315){ +return this[_3a3].apply(this,_3a7); +},fromComputedStyle:function(elem,_3ad){ var d=MochiKit.DOM; var cls=MochiKit.Color.Color; for(elem=d.getElement(elem);elem;elem=elem.parentNode){ -var _318=MochiKit.Style.getStyle.apply(d,arguments); -if(!_318){ +var _3b0=MochiKit.Style.getStyle.apply(d,arguments); +if(!_3b0){ continue; } -var _319=cls.fromString(_318); -if(!_319){ +var _3b1=cls.fromString(_3b0); +if(!_3b1){ break; } -if(_319.asRGB().a>0){ -return _319; +if(_3b1.asRGB().a>0){ +return _3b1; } } return null; @@ -2691,13 +3303,13 @@ return cls.fromComputedStyle(elem,"color","color")||cls.blackColor(); },namedColors:function(){ return MochiKit.Base.clone(MochiKit.Color.Color._namedColors); }}); -MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_31f){ -v*=_31f; +MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_3b7){ +v*=_3b7; if(v<0){ return 0; }else{ -if(v>_31f){ -return _31f; +if(v>_3b7){ +return _3b7; }else{ return v; } @@ -2725,118 +3337,118 @@ val=n1; } } return val; -},hsvToRGB:function(hue,_325,_326,_327){ +},hsvToRGB:function(hue,_3bd,_3be,_3bf){ if(arguments.length==1){ var hsv=hue; hue=hsv.h; -_325=hsv.s; -_326=hsv.v; -_327=hsv.a; +_3bd=hsv.s; +_3be=hsv.v; +_3bf=hsv.a; } var red; -var _32a; +var _3c2; var blue; -if(_325===0){ -red=_326; -_32a=_326; -blue=_326; +if(_3bd===0){ +red=_3be; +_3c2=_3be; +blue=_3be; }else{ var i=Math.floor(hue*6); var f=(hue*6)-i; -var p=_326*(1-_325); -var q=_326*(1-(_325*f)); -var t=_326*(1-(_325*(1-f))); +var p=_3be*(1-_3bd); +var q=_3be*(1-(_3bd*f)); +var t=_3be*(1-(_3bd*(1-f))); switch(i){ case 1: red=q; -_32a=_326; +_3c2=_3be; blue=p; break; case 2: red=p; -_32a=_326; +_3c2=_3be; blue=t; break; case 3: red=p; -_32a=q; -blue=_326; +_3c2=q; +blue=_3be; break; case 4: red=t; -_32a=p; -blue=_326; +_3c2=p; +blue=_3be; break; case 5: -red=_326; -_32a=p; +red=_3be; +_3c2=p; blue=q; break; case 6: case 0: -red=_326; -_32a=t; +red=_3be; +_3c2=t; blue=p; break; } } -return {r:red,g:_32a,b:blue,a:_327}; -},hslToRGB:function(hue,_332,_333,_334){ +return {r:red,g:_3c2,b:blue,a:_3bf}; +},hslToRGB:function(hue,_3ca,_3cb,_3cc){ if(arguments.length==1){ var hsl=hue; hue=hsl.h; -_332=hsl.s; -_333=hsl.l; -_334=hsl.a; +_3ca=hsl.s; +_3cb=hsl.l; +_3cc=hsl.a; } var red; -var _337; +var _3cf; var blue; -if(_332===0){ -red=_333; -_337=_333; -blue=_333; +if(_3ca===0){ +red=_3cb; +_3cf=_3cb; +blue=_3cb; }else{ var m2; -if(_333<=0.5){ -m2=_333*(1+_332); +if(_3cb<=0.5){ +m2=_3cb*(1+_3ca); }else{ -m2=_333+_332-(_333*_332); +m2=_3cb+_3ca-(_3cb*_3ca); } -var m1=(2*_333)-m2; +var m1=(2*_3cb)-m2; var f=MochiKit.Color._hslValue; var h6=hue*6; red=f(m1,m2,h6+2); -_337=f(m1,m2,h6); +_3cf=f(m1,m2,h6); blue=f(m1,m2,h6-2); } -return {r:red,g:_337,b:blue,a:_334}; -},rgbToHSV:function(red,_33e,blue,_340){ +return {r:red,g:_3cf,b:blue,a:_3cc}; +},rgbToHSV:function(red,_3d6,blue,_3d8){ if(arguments.length==1){ var rgb=red; red=rgb.r; -_33e=rgb.g; +_3d6=rgb.g; blue=rgb.b; -_340=rgb.a; +_3d8=rgb.a; } -var max=Math.max(Math.max(red,_33e),blue); -var min=Math.min(Math.min(red,_33e),blue); +var max=Math.max(Math.max(red,_3d6),blue); +var min=Math.min(Math.min(red,_3d6),blue); var hue; -var _345; -var _346=max; +var _3dd; +var _3de=max; if(min==max){ hue=0; -_345=0; +_3dd=0; }else{ -var _347=(max-min); -_345=_347/max; +var _3df=(max-min); +_3dd=_3df/max; if(red==max){ -hue=(_33e-blue)/_347; +hue=(_3d6-blue)/_3df; }else{ -if(_33e==max){ -hue=2+((blue-red)/_347); +if(_3d6==max){ +hue=2+((blue-red)/_3df); }else{ -hue=4+((red-_33e)/_347); +hue=4+((red-_3d6)/_3df); } } hue/=6; @@ -2847,37 +3459,37 @@ if(hue>1){ hue-=1; } } -return {h:hue,s:_345,v:_346,a:_340}; -},rgbToHSL:function(red,_349,blue,_34b){ +return {h:hue,s:_3dd,v:_3de,a:_3d8}; +},rgbToHSL:function(red,_3e1,blue,_3e3){ if(arguments.length==1){ var rgb=red; red=rgb.r; -_349=rgb.g; +_3e1=rgb.g; blue=rgb.b; -_34b=rgb.a; +_3e3=rgb.a; } -var max=Math.max(red,Math.max(_349,blue)); -var min=Math.min(red,Math.min(_349,blue)); +var max=Math.max(red,Math.max(_3e1,blue)); +var min=Math.min(red,Math.min(_3e1,blue)); var hue; -var _350; -var _351=(max+min)/2; -var _352=max-min; -if(_352===0){ +var _3e8; +var _3e9=(max+min)/2; +var _3ea=max-min; +if(_3ea===0){ hue=0; -_350=0; +_3e8=0; }else{ -if(_351<=0.5){ -_350=_352/(max+min); +if(_3e9<=0.5){ +_3e8=_3ea/(max+min); }else{ -_350=_352/(2-max-min); +_3e8=_3ea/(2-max-min); } if(red==max){ -hue=(_349-blue)/_352; +hue=(_3e1-blue)/_3ea; }else{ -if(_349==max){ -hue=2+((blue-red)/_352); +if(_3e1==max){ +hue=2+((blue-red)/_3ea); }else{ -hue=4+((red-_349)/_352); +hue=4+((red-_3e1)/_3ea); } } hue/=6; @@ -2888,33 +3500,33 @@ if(hue>1){ hue-=1; } } -return {h:hue,s:_350,l:_351,a:_34b}; +return {h:hue,s:_3e8,l:_3e9,a:_3e3}; },toColorPart:function(num){ num=Math.round(num); -var _354=num.toString(16); +var _3ec=num.toString(16); if(num<16){ -return "0"+_354; +return "0"+_3ec; } -return _354; +return _3ec; },__new__:function(){ var m=MochiKit.Base; this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]); this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]); -var _356=1/3; -var _357={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_356,_356,_356],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_356,2*_356,2*_356],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]}; -var _358=function(name,r,g,b,a){ +var _3ee=1/3; +var _3ef={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_3ee,_3ee,_3ee],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_3ee,2*_3ee,2*_3ee],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]}; +var _3f0=function(name,r,g,b,a){ var rval=this.fromRGB(r,g,b,a); this[name]=function(){ return rval; }; return rval; }; -for(var k in _357){ +for(var k in _3ef){ var name=k+"Color"; -var _361=m.concat([_358,this.Color,name],_357[k]); -this.Color[name]=m.bind.apply(null,_361); +var _3f9=m.concat([_3f0,this.Color,name],_3ef[k]); +this.Color[name]=m.bind.apply(null,_3f9); } -var _362=function(){ +var _3fa=function(){ for(var i=0;i1){ var src=MochiKit.DOM.getElement(arguments[0]); var sig=arguments[1]; var obj=arguments[2]; var func=arguments[3]; -for(var i=_3a4.length-1;i>=0;i--){ -var o=_3a4[i]; +for(var i=_43c.length-1;i>=0;i--){ +var o=_43c[i]; if(o.source===src&&o.signal===sig&&o.objOrFunc===obj&&o.funcOrStr===func){ self._disconnect(o); if(!self._lock){ -_3a4.splice(i,1); +_43c.splice(i,1); }else{ self._dirty=true; } @@ -3339,11 +3951,11 @@ return true; } } }else{ -var idx=m.findIdentical(_3a4,_3a2); +var idx=m.findIdentical(_43c,_43a); if(idx>=0){ -self._disconnect(_3a2); +self._disconnect(_43a); if(!self._lock){ -_3a4.splice(idx,1); +_43c.splice(idx,1); }else{ self._dirty=true; } @@ -3351,100 +3963,100 @@ return true; } } return false; -},disconnectAllTo:function(_3ad,_3ae){ +},disconnectAllTo:function(_445,_446){ var self=MochiKit.Signal; -var _3b0=self._observers; -var _3b1=self._disconnect; -var _3b2=self._lock; -var _3b3=self._dirty; -if(typeof (_3ae)==="undefined"){ -_3ae=null; +var _448=self._observers; +var _449=self._disconnect; +var _44a=self._lock; +var _44b=self._dirty; +if(typeof (_446)==="undefined"){ +_446=null; } -for(var i=_3b0.length-1;i>=0;i--){ -var _3b5=_3b0[i]; -if(_3b5.objOrFunc===_3ad&&(_3ae===null||_3b5.funcOrStr===_3ae)){ -_3b1(_3b5); -if(_3b2){ -_3b3=true; +for(var i=_448.length-1;i>=0;i--){ +var _44d=_448[i]; +if(_44d.objOrFunc===_445&&(_446===null||_44d.funcOrStr===_446)){ +_449(_44d); +if(_44a){ +_44b=true; }else{ -_3b0.splice(i,1); +_448.splice(i,1); } } } -self._dirty=_3b3; +self._dirty=_44b; },disconnectAll:function(src,sig){ src=MochiKit.DOM.getElement(src); var m=MochiKit.Base; -var _3b9=m.flattenArguments(m.extend(null,arguments,1)); +var _451=m.flattenArguments(m.extend(null,arguments,1)); var self=MochiKit.Signal; -var _3bb=self._disconnect; -var _3bc=self._observers; -var i,_3be; -var _3bf=self._lock; -var _3c0=self._dirty; -if(_3b9.length===0){ -for(i=_3bc.length-1;i>=0;i--){ -_3be=_3bc[i]; -if(_3be.source===src){ -_3bb(_3be); -if(!_3bf){ -_3bc.splice(i,1); +var _453=self._disconnect; +var _454=self._observers; +var i,_456; +var _457=self._lock; +var _458=self._dirty; +if(_451.length===0){ +for(i=_454.length-1;i>=0;i--){ +_456=_454[i]; +if(_456.source===src){ +_453(_456); +if(!_457){ +_454.splice(i,1); }else{ -_3c0=true; +_458=true; } } } }else{ var sigs={}; -for(i=0;i<_3b9.length;i++){ -sigs[_3b9[i]]=true; +for(i=0;i<_451.length;i++){ +sigs[_451[i]]=true; } -for(i=_3bc.length-1;i>=0;i--){ -_3be=_3bc[i]; -if(_3be.source===src&&_3be.signal in sigs){ -_3bb(_3be); -if(!_3bf){ -_3bc.splice(i,1); +for(i=_454.length-1;i>=0;i--){ +_456=_454[i]; +if(_456.source===src&&_456.signal in sigs){ +_453(_456); +if(!_457){ +_454.splice(i,1); }else{ -_3c0=true; +_458=true; } } } } -self._dirty=_3c0; +self._dirty=_458; },signal:function(src,sig){ var self=MochiKit.Signal; -var _3c5=self._observers; +var _45d=self._observers; src=MochiKit.DOM.getElement(src); var args=MochiKit.Base.extend(null,arguments,2); -var _3c7=[]; +var _45f=[]; self._lock=true; -for(var i=0;i<_3c5.length;i++){ -var _3c9=_3c5[i]; -if(_3c9.source===src&&_3c9.signal===sig){ +for(var i=0;i<_45d.length;i++){ +var _461=_45d[i]; +if(_461.source===src&&_461.signal===sig){ try{ -_3c9.listener.apply(src,args); +_461.listener.apply(src,args); } catch(e){ -_3c7.push(e); +_45f.push(e); } } } self._lock=false; if(self._dirty){ self._dirty=false; -for(var i=_3c5.length-1;i>=0;i--){ -if(!_3c5[i].connected){ -_3c5.splice(i,1); +for(var i=_45d.length-1;i>=0;i--){ +if(!_45d[i].connected){ +_45d.splice(i,1); } } } -if(_3c7.length==1){ -throw _3c7[0]; +if(_45f.length==1){ +throw _45f[0]; }else{ -if(_3c7.length>1){ +if(_45f.length>1){ var e=new Error("Multiple errors thrown in handling 'sig', see errors property"); -e.errors=_3c7; +e.errors=_45f; throw e; } } diff --git a/dygraph-combined.js b/dygraph-combined.js index f0123ae..57a5e6a 100644 --- a/dygraph-combined.js +++ b/dygraph-combined.js @@ -1002,6 +1002,618 @@ serializeJSON=MochiKit.Base.serializeJSON; } MochiKit.Base._exportSymbols(this,MochiKit.Base); if(typeof (dojo)!="undefined"){ +dojo.provide("MochiKit.Iter"); +dojo.require("MochiKit.Base"); +} +if(typeof (JSAN)!="undefined"){ +JSAN.use("MochiKit.Base",[]); +} +try{ +if(typeof (MochiKit.Base)=="undefined"){ +throw ""; +} +} +catch(e){ +throw "MochiKit.Iter depends on MochiKit.Base!"; +} +if(typeof (MochiKit.Iter)=="undefined"){ +MochiKit.Iter={}; +} +MochiKit.Iter.NAME="MochiKit.Iter"; +MochiKit.Iter.VERSION="1.4"; +MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){ +return "["+this.NAME+" "+this.VERSION+"]"; +},toString:function(){ +return this.__repr__(); +},registerIteratorFactory:function(name,_14e,_14f,_150){ +MochiKit.Iter.iteratorRegistry.register(name,_14e,_14f,_150); +},iter:function(_151,_152){ +var self=MochiKit.Iter; +if(arguments.length==2){ +return self.takewhile(function(a){ +return a!=_152; +},_151); +} +if(typeof (_151.next)=="function"){ +return _151; +}else{ +if(typeof (_151.iter)=="function"){ +return _151.iter(); +} +} +try{ +return self.iteratorRegistry.match(_151); +} +catch(e){ +var m=MochiKit.Base; +if(e==m.NotFound){ +e=new TypeError(typeof (_151)+": "+m.repr(_151)+" is not iterable"); +} +throw e; +} +},count:function(n){ +if(!n){ +n=0; +} +var m=MochiKit.Base; +return {repr:function(){ +return "count("+n+")"; +},toString:m.forwardCall("repr"),next:m.counter(n)}; +},cycle:function(p){ +var self=MochiKit.Iter; +var m=MochiKit.Base; +var lst=[]; +var _15c=self.iter(p); +return {repr:function(){ +return "cycle(...)"; +},toString:m.forwardCall("repr"),next:function(){ +try{ +var rval=_15c.next(); +lst.push(rval); +return rval; +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +if(lst.length===0){ +this.next=function(){ +throw self.StopIteration; +}; +}else{ +var i=-1; +this.next=function(){ +i=(i+1)%lst.length; +return lst[i]; +}; +} +return this.next(); +} +}}; +},repeat:function(elem,n){ +var m=MochiKit.Base; +if(typeof (n)=="undefined"){ +return {repr:function(){ +return "repeat("+m.repr(elem)+")"; +},toString:m.forwardCall("repr"),next:function(){ +return elem; +}}; +} +return {repr:function(){ +return "repeat("+m.repr(elem)+", "+n+")"; +},toString:m.forwardCall("repr"),next:function(){ +if(n<=0){ +throw MochiKit.Iter.StopIteration; +} +n-=1; +return elem; +}}; +},next:function(_162){ +return _162.next(); +},izip:function(p,q){ +var m=MochiKit.Base; +var self=MochiKit.Iter; +var next=self.next; +var _168=m.map(self.iter,arguments); +return {repr:function(){ +return "izip(...)"; +},toString:m.forwardCall("repr"),next:function(){ +return m.map(next,_168); +}}; +},ifilter:function(pred,seq){ +var m=MochiKit.Base; +seq=MochiKit.Iter.iter(seq); +if(pred===null){ +pred=m.operator.truth; +} +return {repr:function(){ +return "ifilter(...)"; +},toString:m.forwardCall("repr"),next:function(){ +while(true){ +var rval=seq.next(); +if(pred(rval)){ +return rval; +} +} +return undefined; +}}; +},ifilterfalse:function(pred,seq){ +var m=MochiKit.Base; +seq=MochiKit.Iter.iter(seq); +if(pred===null){ +pred=m.operator.truth; +} +return {repr:function(){ +return "ifilterfalse(...)"; +},toString:m.forwardCall("repr"),next:function(){ +while(true){ +var rval=seq.next(); +if(!pred(rval)){ +return rval; +} +} +return undefined; +}}; +},islice:function(seq){ +var self=MochiKit.Iter; +var m=MochiKit.Base; +seq=self.iter(seq); +var _174=0; +var stop=0; +var step=1; +var i=-1; +if(arguments.length==2){ +stop=arguments[1]; +}else{ +if(arguments.length==3){ +_174=arguments[1]; +stop=arguments[2]; +}else{ +_174=arguments[1]; +stop=arguments[2]; +step=arguments[3]; +} +} +return {repr:function(){ +return "islice("+["...",_174,stop,step].join(", ")+")"; +},toString:m.forwardCall("repr"),next:function(){ +var rval; +while(i<_174){ +rval=seq.next(); +i++; +} +if(_174>=stop){ +throw self.StopIteration; +} +_174+=step; +return rval; +}}; +},imap:function(fun,p,q){ +var m=MochiKit.Base; +var self=MochiKit.Iter; +var _17e=m.map(self.iter,m.extend(null,arguments,1)); +var map=m.map; +var next=self.next; +return {repr:function(){ +return "imap(...)"; +},toString:m.forwardCall("repr"),next:function(){ +return fun.apply(this,map(next,_17e)); +}}; +},applymap:function(fun,seq,self){ +seq=MochiKit.Iter.iter(seq); +var m=MochiKit.Base; +return {repr:function(){ +return "applymap(...)"; +},toString:m.forwardCall("repr"),next:function(){ +return fun.apply(self,seq.next()); +}}; +},chain:function(p,q){ +var self=MochiKit.Iter; +var m=MochiKit.Base; +if(arguments.length==1){ +return self.iter(arguments[0]); +} +var _189=m.map(self.iter,arguments); +return {repr:function(){ +return "chain(...)"; +},toString:m.forwardCall("repr"),next:function(){ +while(_189.length>1){ +try{ +return _189[0].next(); +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +_189.shift(); +} +} +if(_189.length==1){ +var arg=_189.shift(); +this.next=m.bind("next",arg); +return this.next(); +} +throw self.StopIteration; +}}; +},takewhile:function(pred,seq){ +var self=MochiKit.Iter; +seq=self.iter(seq); +return {repr:function(){ +return "takewhile(...)"; +},toString:MochiKit.Base.forwardCall("repr"),next:function(){ +var rval=seq.next(); +if(!pred(rval)){ +this.next=function(){ +throw self.StopIteration; +}; +this.next(); +} +return rval; +}}; +},dropwhile:function(pred,seq){ +seq=MochiKit.Iter.iter(seq); +var m=MochiKit.Base; +var bind=m.bind; +return {"repr":function(){ +return "dropwhile(...)"; +},"toString":m.forwardCall("repr"),"next":function(){ +while(true){ +var rval=seq.next(); +if(!pred(rval)){ +break; +} +} +this.next=bind("next",seq); +return rval; +}}; +},_tee:function(_194,sync,_196){ +sync.pos[_194]=-1; +var m=MochiKit.Base; +var _198=m.listMin; +return {repr:function(){ +return "tee("+_194+", ...)"; +},toString:m.forwardCall("repr"),next:function(){ +var rval; +var i=sync.pos[_194]; +if(i==sync.max){ +rval=_196.next(); +sync.deque.push(rval); +sync.max+=1; +sync.pos[_194]+=1; +}else{ +rval=sync.deque[i-sync.min]; +sync.pos[_194]+=1; +if(i==sync.min&&_198(sync.pos)!=sync.min){ +sync.min+=1; +sync.deque.shift(); +} +} +return rval; +}}; +},tee:function(_19b,n){ +var rval=[]; +var sync={"pos":[],"deque":[],"max":-1,"min":-1}; +if(arguments.length==1||typeof (n)=="undefined"||n===null){ +n=2; +} +var self=MochiKit.Iter; +_19b=self.iter(_19b); +var _tee=self._tee; +for(var i=0;i0&&_1ac>=stop)||(step<0&&_1ac<=stop)){ +throw MochiKit.Iter.StopIteration; +} +var rval=_1ac; +_1ac+=step; +return rval; +},repr:function(){ +return "range("+[_1ac,stop,step].join(", ")+")"; +},toString:MochiKit.Base.forwardCall("repr")}; +},sum:function(_1b0,_1b1){ +if(typeof (_1b1)=="undefined"||_1b1===null){ +_1b1=0; +} +var x=_1b1; +var self=MochiKit.Iter; +_1b0=self.iter(_1b0); +try{ +while(true){ +x+=_1b0.next(); +} +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +} +return x; +},exhaust:function(_1b4){ +var self=MochiKit.Iter; +_1b4=self.iter(_1b4); +try{ +while(true){ +_1b4.next(); +} +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +} +},forEach:function(_1b6,func,self){ +var m=MochiKit.Base; +if(arguments.length>2){ +func=m.bind(func,self); +} +if(m.isArrayLike(_1b6)){ +try{ +for(var i=0;i<_1b6.length;i++){ +func(_1b6[i]); +} +} +catch(e){ +if(e!=MochiKit.Iter.StopIteration){ +throw e; +} +} +}else{ +self=MochiKit.Iter; +self.exhaust(self.imap(func,_1b6)); +} +},every:function(_1bb,func){ +var self=MochiKit.Iter; +try{ +self.ifilterfalse(func,_1bb).next(); +return false; +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +return true; +} +},sorted:function(_1be,cmp){ +var rval=MochiKit.Iter.list(_1be); +if(arguments.length==1){ +cmp=MochiKit.Base.compare; +} +rval.sort(cmp); +return rval; +},reversed:function(_1c1){ +var rval=MochiKit.Iter.list(_1c1); +rval.reverse(); +return rval; +},some:function(_1c3,func){ +var self=MochiKit.Iter; +try{ +self.ifilter(func,_1c3).next(); +return true; +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +return false; +} +},iextend:function(lst,_1c7){ +if(MochiKit.Base.isArrayLike(_1c7)){ +for(var i=0;i<_1c7.length;i++){ +lst.push(_1c7[i]); +} +}else{ +var self=MochiKit.Iter; +_1c7=self.iter(_1c7); +try{ +while(true){ +lst.push(_1c7.next()); +} +} +catch(e){ +if(e!=self.StopIteration){ +throw e; +} +} +} +return lst; +},groupby:function(_1ca,_1cb){ +var m=MochiKit.Base; +var self=MochiKit.Iter; +if(arguments.length<2){ +_1cb=m.operator.identity; +} +_1ca=self.iter(_1ca); +var pk=undefined; +var k=undefined; +var v; +function fetch(){ +v=_1ca.next(); +k=_1cb(v); +} +function eat(){ +var ret=v; +v=undefined; +return ret; +} +var _1d2=true; +var _1d3=m.compare; +return {repr:function(){ +return "groupby(...)"; +},next:function(){ +while(_1d3(k,pk)===0){ +fetch(); +if(_1d2){ +_1d2=false; +break; +} +} +pk=k; +return [k,{next:function(){ +if(v==undefined){ +fetch(); +} +if(_1d3(k,pk)!==0){ +throw self.StopIteration; +} +return eat(); +}}]; +}}; +},groupby_as_array:function(_1d4,_1d5){ +var m=MochiKit.Base; +var self=MochiKit.Iter; +if(arguments.length<2){ +_1d5=m.operator.identity; +} +_1d4=self.iter(_1d4); +var _1d8=[]; +var _1d9=true; +var _1da; +var _1db=m.compare; +while(true){ +try{ +var _1dc=_1d4.next(); +var key=_1d5(_1dc); +} +catch(e){ +if(e==self.StopIteration){ +break; +} +throw e; +} +if(_1d9||_1db(key,_1da)!==0){ +var _1de=[]; +_1d8.push([key,_1de]); +} +_1de.push(_1dc); +_1d9=false; +_1da=key; +} +return _1d8; +},arrayLikeIter:function(_1df){ +var i=0; +return {repr:function(){ +return "arrayLikeIter(...)"; +},toString:MochiKit.Base.forwardCall("repr"),next:function(){ +if(i>=_1df.length){ +throw MochiKit.Iter.StopIteration; +} +return _1df[i++]; +}}; +},hasIterateNext:function(_1e1){ +return (_1e1&&typeof (_1e1.iterateNext)=="function"); +},iterateNextIter:function(_1e2){ +return {repr:function(){ +return "iterateNextIter(...)"; +},toString:MochiKit.Base.forwardCall("repr"),next:function(){ +var rval=_1e2.iterateNext(); +if(rval===null||rval===undefined){ +throw MochiKit.Iter.StopIteration; +} +return rval; +}}; +}}); +MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter",]; +MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"]; +MochiKit.Iter.__new__=function(){ +var m=MochiKit.Base; +if(typeof (StopIteration)!="undefined"){ +this.StopIteration=StopIteration; +}else{ +this.StopIteration=new m.NamedError("StopIteration"); +} +this.iteratorRegistry=new m.AdapterRegistry(); +this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter); +this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter); +this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; +m.nameFunctions(this); +}; +MochiKit.Iter.__new__(); +if(MochiKit.__export__){ +reduce=MochiKit.Iter.reduce; +} +MochiKit.Base._exportSymbols(this,MochiKit.Iter); +if(typeof (dojo)!="undefined"){ dojo.provide("MochiKit.Format"); } if(typeof (MochiKit)=="undefined"){ @@ -1018,80 +1630,80 @@ return "["+this.NAME+" "+this.VERSION+"]"; MochiKit.Format.toString=function(){ return this.__repr__(); }; -MochiKit.Format._numberFormatter=function(_14d,_14e,_14f,_150,_151,_152,_153,_154,_155){ +MochiKit.Format._numberFormatter=function(_1e5,_1e6,_1e7,_1e8,_1e9,_1ea,_1eb,_1ec,_1ed){ return function(num){ num=parseFloat(num); if(typeof (num)=="undefined"||num===null||isNaN(num)){ -return _14d; +return _1e5; } -var _157=_14e; -var _158=_14f; +var _1ef=_1e6; +var _1f0=_1e7; if(num<0){ num=-num; }else{ -_157=_157.replace(/-/,""); +_1ef=_1ef.replace(/-/,""); } var me=arguments.callee; -var fmt=MochiKit.Format.formatLocale(_150); -if(_151){ +var fmt=MochiKit.Format.formatLocale(_1e8); +if(_1e9){ num=num*100; -_158=fmt.percent+_158; +_1f0=fmt.percent+_1f0; } -num=MochiKit.Format.roundToFixed(num,_152); -var _15b=num.split(/\./); -var _15c=_15b[0]; -var frac=(_15b.length==1)?"":_15b[1]; +num=MochiKit.Format.roundToFixed(num,_1ea); +var _1f3=num.split(/\./); +var _1f4=_1f3[0]; +var frac=(_1f3.length==1)?"":_1f3[1]; var res=""; -while(_15c.length<_153){ -_15c="0"+_15c; +while(_1f4.length<_1eb){ +_1f4="0"+_1f4; } -if(_154){ -while(_15c.length>_154){ -var i=_15c.length-_154; -res=fmt.separator+_15c.substring(i,_15c.length)+res; -_15c=_15c.substring(0,i); +if(_1ec){ +while(_1f4.length>_1ec){ +var i=_1f4.length-_1ec; +res=fmt.separator+_1f4.substring(i,_1f4.length)+res; +_1f4=_1f4.substring(0,i); } } -res=_15c+res; -if(_152>0){ -while(frac.length<_155){ +res=_1f4+res; +if(_1ea>0){ +while(frac.length<_1ed){ frac=frac+"0"; } res=res+fmt.decimal+frac; } -return _157+res+_158; +return _1ef+res+_1f0; }; }; -MochiKit.Format.numberFormatter=function(_160,_161,_162){ -if(typeof (_161)=="undefined"){ -_161=""; +MochiKit.Format.numberFormatter=function(_1f8,_1f9,_1fa){ +if(typeof (_1f9)=="undefined"){ +_1f9=""; } -var _163=_160.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/); -if(!_163){ +var _1fb=_1f8.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/); +if(!_1fb){ throw TypeError("Invalid pattern"); } -var _164=_160.substr(0,_163.index); -var _165=_160.substr(_163.index+_163[0].length); -if(_164.search(/-/)==-1){ -_164=_164+"-"; +var _1fc=_1f8.substr(0,_1fb.index); +var _1fd=_1f8.substr(_1fb.index+_1fb[0].length); +if(_1fc.search(/-/)==-1){ +_1fc=_1fc+"-"; } -var _166=_163[1]; -var frac=(typeof (_163[2])=="string"&&_163[2]!="")?_163[2]:""; -var _168=(typeof (_163[3])=="string"&&_163[3]!=""); -var tmp=_166.split(/,/); -var _16a; -if(typeof (_162)=="undefined"){ -_162="default"; +var _1fe=_1fb[1]; +var frac=(typeof (_1fb[2])=="string"&&_1fb[2]!="")?_1fb[2]:""; +var _200=(typeof (_1fb[3])=="string"&&_1fb[3]!=""); +var tmp=_1fe.split(/,/); +var _202; +if(typeof (_1fa)=="undefined"){ +_1fa="default"; } if(tmp.length==1){ -_16a=null; +_202=null; }else{ -_16a=tmp[1].length; +_202=tmp[1].length; } -var _16b=_166.length-_166.replace(/0/g,"").length; -var _16c=frac.length-frac.replace(/0/g,"").length; -var _16d=frac.length; -var rval=MochiKit.Format._numberFormatter(_161,_164,_165,_162,_168,_16d,_16b,_16a,_16c); +var _203=_1fe.length-_1fe.replace(/0/g,"").length; +var _204=frac.length-frac.replace(/0/g,"").length; +var _205=frac.length; +var rval=MochiKit.Format._numberFormatter(_1f9,_1fc,_1fd,_1fa,_200,_205,_203,_202,_204); var m=MochiKit.Base; if(m){ var fn=arguments.callee; @@ -1102,33 +1714,33 @@ return [self.NAME,"(",map(m.repr,args).join(", "),")"].join(""); } return rval; }; -MochiKit.Format.formatLocale=function(_172){ -if(typeof (_172)=="undefined"||_172===null){ -_172="default"; +MochiKit.Format.formatLocale=function(_20a){ +if(typeof (_20a)=="undefined"||_20a===null){ +_20a="default"; } -if(typeof (_172)=="string"){ -var rval=MochiKit.Format.LOCALE[_172]; +if(typeof (_20a)=="string"){ +var rval=MochiKit.Format.LOCALE[_20a]; if(typeof (rval)=="string"){ rval=arguments.callee(rval); -MochiKit.Format.LOCALE[_172]=rval; +MochiKit.Format.LOCALE[_20a]=rval; } return rval; }else{ -return _172; +return _20a; } }; -MochiKit.Format.twoDigitAverage=function(_174,_175){ -if(_175){ -var res=_174/_175; +MochiKit.Format.twoDigitAverage=function(_20c,_20d){ +if(_20d){ +var res=_20c/_20d; if(!isNaN(res)){ -return MochiKit.Format.twoDigitFloat(_174/_175); +return MochiKit.Format.twoDigitFloat(_20c/_20d); } } return "0"; }; -MochiKit.Format.twoDigitFloat=function(_177){ -var sign=(_177<0?"-":""); -var s=Math.floor(Math.abs(_177)*100).toString(); +MochiKit.Format.twoDigitFloat=function(_20f){ +var sign=(_20f<0?"-":""); +var s=Math.floor(Math.abs(_20f)*100).toString(); if(s=="0"){ return s; } @@ -1150,45 +1762,45 @@ return head+"."+tail; } } }; -MochiKit.Format.lstrip=function(str,_17d){ +MochiKit.Format.lstrip=function(str,_215){ str=str+""; if(typeof (str)!="string"){ return null; } -if(!_17d){ +if(!_215){ return str.replace(/^\s+/,""); }else{ -return str.replace(new RegExp("^["+_17d+"]+"),""); +return str.replace(new RegExp("^["+_215+"]+"),""); } }; -MochiKit.Format.rstrip=function(str,_17f){ +MochiKit.Format.rstrip=function(str,_217){ str=str+""; if(typeof (str)!="string"){ return null; } -if(!_17f){ +if(!_217){ return str.replace(/\s+$/,""); }else{ -return str.replace(new RegExp("["+_17f+"]+$"),""); +return str.replace(new RegExp("["+_217+"]+$"),""); } }; -MochiKit.Format.strip=function(str,_181){ +MochiKit.Format.strip=function(str,_219){ var self=MochiKit.Format; -return self.rstrip(self.lstrip(str,_181),_181); +return self.rstrip(self.lstrip(str,_219),_219); }; -MochiKit.Format.truncToFixed=function(_183,_184){ -_183=Math.floor(_183*Math.pow(10,_184)); -var res=(_183*Math.pow(10,-_184)).toFixed(_184); +MochiKit.Format.truncToFixed=function(_21b,_21c){ +_21b=Math.floor(_21b*Math.pow(10,_21c)); +var res=(_21b*Math.pow(10,-_21c)).toFixed(_21c); if(res.charAt(0)=="."){ res="0"+res; } return res; }; -MochiKit.Format.roundToFixed=function(_186,_187){ -return MochiKit.Format.truncToFixed(_186+0.5*Math.pow(10,-_187),_187); +MochiKit.Format.roundToFixed=function(_21e,_21f){ +return MochiKit.Format.truncToFixed(_21e+0.5*Math.pow(10,-_21f),_21f); }; -MochiKit.Format.percentFormat=function(_188){ -return MochiKit.Format.twoDigitFloat(100*_188)+"%"; +MochiKit.Format.percentFormat=function(_220){ +return MochiKit.Format.twoDigitFloat(100*_220)+"%"; }; MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"]; MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"}; @@ -1221,11 +1833,11 @@ MochiKit.Format.__new__(); if(typeof (MochiKit.Base)!="undefined"){ MochiKit.Base._exportSymbols(this,MochiKit.Format); }else{ -(function(_18d,_18e){ +(function(_225,_226){ if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(MochiKit.__export__===false)){ -var all=_18e.EXPORT_TAGS[":all"]; +var all=_226.EXPORT_TAGS[":all"]; for(var i=0;i=0){ var opt=elem.options[elem.selectedIndex]; @@ -1310,18 +1922,18 @@ if(h&&!h.match(/^[^>]+\svalue\s*=/i)){ v=opt.text; } } -_198.push(name); -_199.push(v); +_230.push(name); +_231.push(v); return null; } -_198.push(name); -_199.push(""); +_230.push(name); +_231.push(""); return null; }else{ var opts=elem.options; if(!opts.length){ -_198.push(name); -_199.push(""); +_230.push(name); +_231.push(""); return null; } for(var i=0;i]+\svalue\s*=/i)){ v=opt.text; } } -_198.push(name); -_199.push(v); +_230.push(name); +_231.push(v); } return null; } } -if(_19e==="FORM"||_19e==="P"||_19e==="SPAN"||_19e==="DIV"){ +if(_236==="FORM"||_236==="P"||_236==="SPAN"||_236==="DIV"){ return elem.childNodes; } -_198.push(name); -_199.push(elem.value||""); +_230.push(name); +_231.push(elem.value||""); return null; } return elem.childNodes; }); -return [_198,_199]; +return [_230,_231]; },withDocument:function(doc,func){ var self=MochiKit.DOM; -var _1a7=self._document; +var _23f=self._document; var rval; try{ self._document=doc; rval=func(); } catch(e){ -self._document=_1a7; +self._document=_23f; throw e; } -self._document=_1a7; +self._document=_23f; return rval; -},registerDOMConverter:function(name,_1aa,wrap,_1ac){ -MochiKit.DOM.domConverters.register(name,_1aa,wrap,_1ac); +},registerDOMConverter:function(name,_242,wrap,_244){ +MochiKit.DOM.domConverters.register(name,_242,wrap,_244); },coerceToDOM:function(node,ctx){ var m=MochiKit.Base; var im=MochiKit.Iter; var self=MochiKit.DOM; if(im){ var iter=im.iter; -var _1b3=im.repeat; +var _24b=im.repeat; var map=m.map; } -var _1b5=self.domConverters; -var _1b6=arguments.callee; -var _1b7=m.NotFound; +var _24d=self.domConverters; +var _24e=arguments.callee; +var _24f=m.NotFound; while(true){ if(typeof (node)=="undefined"||node===null){ return null; @@ -1409,49 +2021,49 @@ node=node.apply(ctx,[ctx]); continue; } if(im){ -var _1b8=null; +var _250=null; try{ -_1b8=iter(node); +_250=iter(node); } catch(e){ } -if(_1b8){ -return map(_1b6,_1b8,_1b3(ctx)); +if(_250){ +return map(_24e,_250,_24b(ctx)); } } try{ -node=_1b5.match(node,ctx); +node=_24d.match(node,ctx); continue; } catch(e){ -if(e!=_1b7){ +if(e!=_24f){ throw e; } } return self._document.createTextNode(node.toString()); } return undefined; -},isChildNode:function(node,_1ba){ +},isChildNode:function(node,_252){ var self=MochiKit.DOM; if(typeof (node)=="string"){ node=self.getElement(node); } -if(typeof (_1ba)=="string"){ -_1ba=self.getElement(_1ba); +if(typeof (_252)=="string"){ +_252=self.getElement(_252); } -if(node===_1ba){ +if(node===_252){ return true; } while(node&&node.tagName.toUpperCase()!="BODY"){ node=node.parentNode; -if(node===_1ba){ +if(node===_252){ return true; } } return false; -},setNodeAttribute:function(node,attr,_1be){ +},setNodeAttribute:function(node,attr,_256){ var o={}; -o[attr]=_1be; +o[attr]=_256; try{ return MochiKit.DOM.updateNodeAttributes(node,o); } @@ -1460,11 +2072,11 @@ catch(e){ return null; },getNodeAttribute:function(node,attr){ var self=MochiKit.DOM; -var _1c3=self.attributeArray.renames[attr]; +var _25b=self.attributeArray.renames[attr]; node=self.getElement(node); try{ -if(_1c3){ -return node[_1c3]; +if(_25b){ +return node[_25b]; } return node.getAttribute(attr); } @@ -1473,33 +2085,33 @@ catch(e){ return null; },removeNodeAttribute:function(node,attr){ var self=MochiKit.DOM; -var _1c7=self.attributeArray.renames[attr]; +var _25f=self.attributeArray.renames[attr]; node=self.getElement(node); try{ -if(_1c7){ -return node[_1c7]; +if(_25f){ +return node[_25f]; } return node.removeAttribute(attr); } catch(e){ } return null; -},updateNodeAttributes:function(node,_1c9){ +},updateNodeAttributes:function(node,_261){ var elem=node; var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } -if(_1c9){ -var _1cc=MochiKit.Base.updatetree; +if(_261){ +var _264=MochiKit.Base.updatetree; if(self.attributeArray.compliant){ -for(var k in _1c9){ -var v=_1c9[k]; +for(var k in _261){ +var v=_261[k]; if(typeof (v)=="object"&&typeof (elem[k])=="object"){ if(k=="style"&&MochiKit.Style){ MochiKit.Style.setStyle(elem,v); }else{ -_1cc(elem[k],v); +_264(elem[k],v); } }else{ if(k.substring(0,2)=="on"){ @@ -1513,21 +2125,21 @@ elem.setAttribute(k,v); } } }else{ -var _1cf=self.attributeArray.renames; -for(var k in _1c9){ -v=_1c9[k]; -var _1d0=_1cf[k]; +var _267=self.attributeArray.renames; +for(var k in _261){ +v=_261[k]; +var _268=_267[k]; if(k=="style"&&typeof (v)=="string"){ elem.style.cssText=v; }else{ -if(typeof (_1d0)=="string"){ -elem[_1d0]=v; +if(typeof (_268)=="string"){ +elem[_268]=v; }else{ if(typeof (elem[k])=="object"&&typeof (v)=="object"){ if(k=="style"&&MochiKit.Style){ MochiKit.Style.setStyle(elem,v); }else{ -_1cc(elem[k],v); +_264(elem[k],v); } }else{ if(k.substring(0,2)=="on"){ @@ -1551,16 +2163,16 @@ var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } -var _1d4=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; -var _1d5=MochiKit.Base.concat; -while(_1d4.length){ -var n=_1d4.shift(); +var _26c=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; +var _26d=MochiKit.Base.concat; +while(_26c.length){ +var n=_26c.shift(); if(typeof (n)=="undefined"||n===null){ }else{ if(typeof (n.nodeType)=="number"){ elem.appendChild(n); }else{ -_1d4=_1d5(n,_1d4); +_26c=_26d(n,_26c); } } } @@ -1571,32 +2183,32 @@ var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } -var _1da=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; -var _1db=elem.parentNode; -var _1dc=MochiKit.Base.concat; -while(_1da.length){ -var n=_1da.shift(); +var _272=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; +var _273=elem.parentNode; +var _274=MochiKit.Base.concat; +while(_272.length){ +var n=_272.shift(); if(typeof (n)=="undefined"||n===null){ }else{ if(typeof (n.nodeType)=="number"){ -_1db.insertBefore(n,elem); +_273.insertBefore(n,elem); }else{ -_1da=_1dc(n,_1da); +_272=_274(n,_272); } } } -return _1db; +return _273; },insertSiblingNodesAfter:function(node){ var elem=node; var self=MochiKit.DOM; if(typeof (node)=="string"){ elem=self.getElement(node); } -var _1e1=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; +var _279=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; if(elem.nextSibling){ -return self.insertSiblingNodesBefore(elem.nextSibling,_1e1); +return self.insertSiblingNodesBefore(elem.nextSibling,_279); }else{ -return self.appendChildNodes(elem.parentNode,_1e1); +return self.appendChildNodes(elem.parentNode,_279); } },replaceChildNodes:function(node){ var elem=node; @@ -1605,40 +2217,40 @@ if(typeof (node)=="string"){ elem=self.getElement(node); arguments[0]=elem; } -var _1e5; -while((_1e5=elem.firstChild)){ -elem.removeChild(_1e5); +var _27d; +while((_27d=elem.firstChild)){ +elem.removeChild(_27d); } if(arguments.length<2){ return elem; }else{ return self.appendChildNodes.apply(this,arguments); } -},createDOM:function(name,_1e7){ +},createDOM:function(name,_27f){ var elem; var self=MochiKit.DOM; var m=MochiKit.Base; -if(typeof (_1e7)=="string"||typeof (_1e7)=="number"){ +if(typeof (_27f)=="string"||typeof (_27f)=="number"){ var args=m.extend([name,null],arguments,1); return arguments.callee.apply(this,args); } if(typeof (name)=="string"){ -var _1ec=self._xhtml; -if(_1e7&&!self.attributeArray.compliant){ -var _1ed=""; -if("name" in _1e7){ -_1ed+=" name=\""+self.escapeHTML(_1e7.name)+"\""; +var _284=self._xhtml; +if(_27f&&!self.attributeArray.compliant){ +var _285=""; +if("name" in _27f){ +_285+=" name=\""+self.escapeHTML(_27f.name)+"\""; } -if(name=="input"&&"type" in _1e7){ -_1ed+=" type=\""+self.escapeHTML(_1e7.type)+"\""; +if(name=="input"&&"type" in _27f){ +_285+=" type=\""+self.escapeHTML(_27f.type)+"\""; } -if(_1ed){ -name="<"+name+_1ed+">"; -_1ec=false; +if(_285){ +name="<"+name+_285+">"; +_284=false; } } var d=self._document; -if(_1ec&&d===document){ +if(_284&&d===document){ elem=d.createElementNS("http://www.w3.org/1999/xhtml",name); }else{ elem=d.createElement(name); @@ -1646,8 +2258,8 @@ elem=d.createElement(name); }else{ elem=name; } -if(_1e7){ -self.updateNodeAttributes(elem,_1e7); +if(_27f){ +self.updateNodeAttributes(elem,_27f); } if(arguments.length<=2){ return elem; @@ -1665,12 +2277,12 @@ return e; },swapDOM:function(dest,src){ var self=MochiKit.DOM; dest=self.getElement(dest); -var _1f5=dest.parentNode; +var _28d=dest.parentNode; if(src){ src=self.getElement(src); -_1f5.replaceChild(src,dest); +_28d.replaceChild(src,dest); }else{ -_1f5.removeChild(dest); +_28d.removeChild(dest); } return src; },getElement:function(id){ @@ -1680,40 +2292,40 @@ return ((typeof (id)=="string")?self._document.getElementById(id):id); }else{ return MochiKit.Base.map(self.getElement,arguments); } -},getElementsByTagAndClassName:function(_1f8,_1f9,_1fa){ +},getElementsByTagAndClassName:function(_290,_291,_292){ var self=MochiKit.DOM; -if(typeof (_1f8)=="undefined"||_1f8===null){ -_1f8="*"; +if(typeof (_290)=="undefined"||_290===null){ +_290="*"; } -if(typeof (_1fa)=="undefined"||_1fa===null){ -_1fa=self._document; +if(typeof (_292)=="undefined"||_292===null){ +_292=self._document; } -_1fa=self.getElement(_1fa); -var _1fc=(_1fa.getElementsByTagName(_1f8)||self._document.all); -if(typeof (_1f9)=="undefined"||_1f9===null){ -return MochiKit.Base.extend(null,_1fc); +_292=self.getElement(_292); +var _294=(_292.getElementsByTagName(_290)||self._document.all); +if(typeof (_291)=="undefined"||_291===null){ +return MochiKit.Base.extend(null,_294); } -var _1fd=[]; -for(var i=0;i<_1fc.length;i++){ -var _1ff=_1fc[i]; -var cls=_1ff.className; +var _295=[]; +for(var i=0;i<_294.length;i++){ +var _297=_294[i]; +var cls=_297.className; if(!cls){ continue; } -var _201=cls.split(" "); -for(var j=0;j<_201.length;j++){ -if(_201[j]==_1f9){ -_1fd.push(_1ff); +var _299=cls.split(" "); +for(var j=0;j<_299.length;j++){ +if(_299[j]==_291){ +_295.push(_297); break; } } } -return _1fd; +return _295; },_newCallStack:function(path,once){ var rval=function(){ -var _206=arguments.callee.callStack; -for(var i=0;i<_206.length;i++){ -if(_206[i].apply(this,arguments)===false){ +var _29e=arguments.callee.callStack; +for(var i=0;i<_29e.length;i++){ +if(_29e[i].apply(this,arguments)===false){ break; } } @@ -1727,102 +2339,102 @@ catch(e){ }; rval.callStack=[]; return rval; -},addToCallStack:function(_208,path,func,once){ +},addToCallStack:function(_2a0,path,func,once){ var self=MochiKit.DOM; -var _20d=_208[path]; -var _20e=_20d; -if(!(typeof (_20d)=="function"&&typeof (_20d.callStack)=="object"&&_20d.callStack!==null)){ -_20e=self._newCallStack(path,once); -if(typeof (_20d)=="function"){ -_20e.callStack.push(_20d); +var _2a5=_2a0[path]; +var _2a6=_2a5; +if(!(typeof (_2a5)=="function"&&typeof (_2a5.callStack)=="object"&&_2a5.callStack!==null)){ +_2a6=self._newCallStack(path,once); +if(typeof (_2a5)=="function"){ +_2a6.callStack.push(_2a5); } -_208[path]=_20e; +_2a0[path]=_2a6; } -_20e.callStack.push(func); +_2a6.callStack.push(func); },addLoadEvent:function(func){ var self=MochiKit.DOM; self.addToCallStack(self._window,"onload",func,true); -},focusOnLoad:function(_211){ +},focusOnLoad:function(_2a9){ var self=MochiKit.DOM; self.addLoadEvent(function(){ -_211=self.getElement(_211); -if(_211){ -_211.focus(); +_2a9=self.getElement(_2a9); +if(_2a9){ +_2a9.focus(); } }); -},setElementClass:function(_213,_214){ +},setElementClass:function(_2ab,_2ac){ var self=MochiKit.DOM; -var obj=self.getElement(_213); +var obj=self.getElement(_2ab); if(self.attributeArray.compliant){ -obj.setAttribute("class",_214); +obj.setAttribute("class",_2ac); }else{ -obj.setAttribute("className",_214); +obj.setAttribute("className",_2ac); } -},toggleElementClass:function(_217){ +},toggleElementClass:function(_2af){ var self=MochiKit.DOM; for(var i=1;i"); -_23a.push(""); -var _244=dom.childNodes; -for(i=_244.length-1;i>=0;i--){ -_23a.push(_244[i]); +_2d2.push(""); +var _2dc=dom.childNodes; +for(i=_2dc.length-1;i>=0;i--){ +_2d2.push(_2dc[i]); } }else{ lst.push("/>"); } }else{ if(dom.nodeType==3){ -lst.push(_23c(dom.nodeValue)); +lst.push(_2d4(dom.nodeValue)); } } } } return lst; -},scrapeText:function(node,_246){ +},scrapeText:function(node,_2de){ var rval=[]; (function(node){ var cn=node.childNodes; @@ -1891,103 +2503,103 @@ for(var i=0;i0){ -var _26d=m.filter; -_26c=function(node){ -return _26d(_26c.ignoreAttrFilter,node.attributes); -}; -_26c.ignoreAttr={}; -var _26f=_26b.attributes; -var _270=_26c.ignoreAttr; -for(var i=0;i<_26f.length;i++){ -var a=_26f[i]; -_270[a.name]=a.value; -} -_26c.ignoreAttrFilter=function(a){ -return (_26c.ignoreAttr[a.name]!=a.value); -}; -_26c.compliant=false; -_26c.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"}; -}else{ -_26c=function(node){ +var _303=this._document.createElement("span"); +var _304; +if(_303&&_303.attributes&&_303.attributes.length>0){ +var _305=m.filter; +_304=function(node){ +return _305(_304.ignoreAttrFilter,node.attributes); +}; +_304.ignoreAttr={}; +var _307=_303.attributes; +var _308=_304.ignoreAttr; +for(var i=0;i<_307.length;i++){ +var a=_307[i]; +_308[a.name]=a.value; +} +_304.ignoreAttrFilter=function(a){ +return (_304.ignoreAttr[a.name]!=a.value); +}; +_304.compliant=false; +_304.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"}; +}else{ +_304=function(node){ return node.attributes; }; -_26c.compliant=true; -_26c.renames={}; +_304.compliant=true; +_304.renames={}; } -this.attributeArray=_26c; -var _275=function(_276,arr){ -var _278=arr[1].split("."); +this.attributeArray=_304; +var _30d=function(_30e,arr){ +var _310=arr[1].split("."); var str=""; var obj={}; -str+="if (!MochiKit."+_278[1]+") { throw new Error(\""; +str+="if (!MochiKit."+_310[1]+") { throw new Error(\""; str+="This function has been deprecated and depends on MochiKit."; -str+=_278[1]+".\");}"; -str+="return MochiKit."+_278[1]+"."+arr[0]; +str+=_310[1]+".\");}"; +str+="return MochiKit."+_310[1]+"."+arr[0]; str+=".apply(this, arguments);"; -obj[_278[2]]=new Function(str); -MochiKit.Base.update(MochiKit[_276],obj); +obj[_310[2]]=new Function(str); +MochiKit.Base.update(MochiKit[_30e],obj); }; for(var i;i0.5; @@ -2571,114 +3183,114 @@ var c=this.rgb; var col=[c.r,c.g,c.b,c.a]; return this.__class__.NAME+"("+col.join(", ")+")"; }}; -MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_2f0,blue,_2f2){ -var _2f3=MochiKit.Color.Color; +MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_388,blue,_38a){ +var _38b=MochiKit.Color.Color; if(arguments.length==1){ var rgb=red; red=rgb.r; -_2f0=rgb.g; +_388=rgb.g; blue=rgb.b; if(typeof (rgb.a)=="undefined"){ -_2f2=undefined; +_38a=undefined; }else{ -_2f2=rgb.a; +_38a=rgb.a; } } -return new _2f3(red,_2f0,blue,_2f2); -},fromHSL:function(hue,_2f6,_2f7,_2f8){ +return new _38b(red,_388,blue,_38a); +},fromHSL:function(hue,_38e,_38f,_390){ var m=MochiKit.Color; return m.Color.fromRGB(m.hslToRGB.apply(m,arguments)); -},fromHSV:function(hue,_2fb,_2fc,_2fd){ +},fromHSV:function(hue,_393,_394,_395){ var m=MochiKit.Color; return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments)); },fromName:function(name){ -var _300=MochiKit.Color.Color; +var _398=MochiKit.Color.Color; if(name.charAt(0)=="\""){ name=name.substr(1,name.length-2); } -var _301=_300._namedColors[name.toLowerCase()]; -if(typeof (_301)=="string"){ -return _300.fromHexString(_301); +var _399=_398._namedColors[name.toLowerCase()]; +if(typeof (_399)=="string"){ +return _398.fromHexString(_399); }else{ if(name=="transparent"){ -return _300.transparentColor(); +return _398.transparentColor(); } } return null; -},fromString:function(_302){ +},fromString:function(_39a){ var self=MochiKit.Color.Color; -var _304=_302.substr(0,3); -if(_304=="rgb"){ -return self.fromRGBString(_302); +var _39c=_39a.substr(0,3); +if(_39c=="rgb"){ +return self.fromRGBString(_39a); }else{ -if(_304=="hsl"){ -return self.fromHSLString(_302); +if(_39c=="hsl"){ +return self.fromHSLString(_39a); }else{ -if(_302.charAt(0)=="#"){ -return self.fromHexString(_302); +if(_39a.charAt(0)=="#"){ +return self.fromHexString(_39a); } } } -return self.fromName(_302); -},fromHexString:function(_305){ -if(_305.charAt(0)=="#"){ -_305=_305.substring(1); +return self.fromName(_39a); +},fromHexString:function(_39d){ +if(_39d.charAt(0)=="#"){ +_39d=_39d.substring(1); } -var _306=[]; +var _39e=[]; var i,hex; -if(_305.length==3){ +if(_39d.length==3){ for(i=0;i<3;i++){ -hex=_305.substr(i,1); -_306.push(parseInt(hex+hex,16)/255); +hex=_39d.substr(i,1); +_39e.push(parseInt(hex+hex,16)/255); } }else{ for(i=0;i<6;i+=2){ -hex=_305.substr(i,2); -_306.push(parseInt(hex,16)/255); +hex=_39d.substr(i,2); +_39e.push(parseInt(hex,16)/255); } } -var _309=MochiKit.Color.Color; -return _309.fromRGB.apply(_309,_306); -},_fromColorString:function(pre,_30b,_30c,_30d){ -if(_30d.indexOf(pre)===0){ -_30d=_30d.substring(_30d.indexOf("(",3)+1,_30d.length-1); +var _3a1=MochiKit.Color.Color; +return _3a1.fromRGB.apply(_3a1,_39e); +},_fromColorString:function(pre,_3a3,_3a4,_3a5){ +if(_3a5.indexOf(pre)===0){ +_3a5=_3a5.substring(_3a5.indexOf("(",3)+1,_3a5.length-1); } -var _30e=_30d.split(/\s*,\s*/); -var _30f=[]; -for(var i=0;i<_30e.length;i++){ -var c=_30e[i]; +var _3a6=_3a5.split(/\s*,\s*/); +var _3a7=[]; +for(var i=0;i<_3a6.length;i++){ +var c=_3a6[i]; var val; -var _313=c.substring(c.length-3); +var _3ab=c.substring(c.length-3); if(c.charAt(c.length-1)=="%"){ val=0.01*parseFloat(c.substring(0,c.length-1)); }else{ -if(_313=="deg"){ +if(_3ab=="deg"){ val=parseFloat(c)/360; }else{ -if(_313=="rad"){ +if(_3ab=="rad"){ val=parseFloat(c)/(Math.PI*2); }else{ -val=_30c[i]*parseFloat(c); +val=_3a4[i]*parseFloat(c); } } } -_30f.push(val); +_3a7.push(val); } -return this[_30b].apply(this,_30f); -},fromComputedStyle:function(elem,_315){ +return this[_3a3].apply(this,_3a7); +},fromComputedStyle:function(elem,_3ad){ var d=MochiKit.DOM; var cls=MochiKit.Color.Color; for(elem=d.getElement(elem);elem;elem=elem.parentNode){ -var _318=MochiKit.Style.getStyle.apply(d,arguments); -if(!_318){ +var _3b0=MochiKit.Style.getStyle.apply(d,arguments); +if(!_3b0){ continue; } -var _319=cls.fromString(_318); -if(!_319){ +var _3b1=cls.fromString(_3b0); +if(!_3b1){ break; } -if(_319.asRGB().a>0){ -return _319; +if(_3b1.asRGB().a>0){ +return _3b1; } } return null; @@ -2691,13 +3303,13 @@ return cls.fromComputedStyle(elem,"color","color")||cls.blackColor(); },namedColors:function(){ return MochiKit.Base.clone(MochiKit.Color.Color._namedColors); }}); -MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_31f){ -v*=_31f; +MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_3b7){ +v*=_3b7; if(v<0){ return 0; }else{ -if(v>_31f){ -return _31f; +if(v>_3b7){ +return _3b7; }else{ return v; } @@ -2725,118 +3337,118 @@ val=n1; } } return val; -},hsvToRGB:function(hue,_325,_326,_327){ +},hsvToRGB:function(hue,_3bd,_3be,_3bf){ if(arguments.length==1){ var hsv=hue; hue=hsv.h; -_325=hsv.s; -_326=hsv.v; -_327=hsv.a; +_3bd=hsv.s; +_3be=hsv.v; +_3bf=hsv.a; } var red; -var _32a; +var _3c2; var blue; -if(_325===0){ -red=_326; -_32a=_326; -blue=_326; +if(_3bd===0){ +red=_3be; +_3c2=_3be; +blue=_3be; }else{ var i=Math.floor(hue*6); var f=(hue*6)-i; -var p=_326*(1-_325); -var q=_326*(1-(_325*f)); -var t=_326*(1-(_325*(1-f))); +var p=_3be*(1-_3bd); +var q=_3be*(1-(_3bd*f)); +var t=_3be*(1-(_3bd*(1-f))); switch(i){ case 1: red=q; -_32a=_326; +_3c2=_3be; blue=p; break; case 2: red=p; -_32a=_326; +_3c2=_3be; blue=t; break; case 3: red=p; -_32a=q; -blue=_326; +_3c2=q; +blue=_3be; break; case 4: red=t; -_32a=p; -blue=_326; +_3c2=p; +blue=_3be; break; case 5: -red=_326; -_32a=p; +red=_3be; +_3c2=p; blue=q; break; case 6: case 0: -red=_326; -_32a=t; +red=_3be; +_3c2=t; blue=p; break; } } -return {r:red,g:_32a,b:blue,a:_327}; -},hslToRGB:function(hue,_332,_333,_334){ +return {r:red,g:_3c2,b:blue,a:_3bf}; +},hslToRGB:function(hue,_3ca,_3cb,_3cc){ if(arguments.length==1){ var hsl=hue; hue=hsl.h; -_332=hsl.s; -_333=hsl.l; -_334=hsl.a; +_3ca=hsl.s; +_3cb=hsl.l; +_3cc=hsl.a; } var red; -var _337; +var _3cf; var blue; -if(_332===0){ -red=_333; -_337=_333; -blue=_333; +if(_3ca===0){ +red=_3cb; +_3cf=_3cb; +blue=_3cb; }else{ var m2; -if(_333<=0.5){ -m2=_333*(1+_332); +if(_3cb<=0.5){ +m2=_3cb*(1+_3ca); }else{ -m2=_333+_332-(_333*_332); +m2=_3cb+_3ca-(_3cb*_3ca); } -var m1=(2*_333)-m2; +var m1=(2*_3cb)-m2; var f=MochiKit.Color._hslValue; var h6=hue*6; red=f(m1,m2,h6+2); -_337=f(m1,m2,h6); +_3cf=f(m1,m2,h6); blue=f(m1,m2,h6-2); } -return {r:red,g:_337,b:blue,a:_334}; -},rgbToHSV:function(red,_33e,blue,_340){ +return {r:red,g:_3cf,b:blue,a:_3cc}; +},rgbToHSV:function(red,_3d6,blue,_3d8){ if(arguments.length==1){ var rgb=red; red=rgb.r; -_33e=rgb.g; +_3d6=rgb.g; blue=rgb.b; -_340=rgb.a; +_3d8=rgb.a; } -var max=Math.max(Math.max(red,_33e),blue); -var min=Math.min(Math.min(red,_33e),blue); +var max=Math.max(Math.max(red,_3d6),blue); +var min=Math.min(Math.min(red,_3d6),blue); var hue; -var _345; -var _346=max; +var _3dd; +var _3de=max; if(min==max){ hue=0; -_345=0; +_3dd=0; }else{ -var _347=(max-min); -_345=_347/max; +var _3df=(max-min); +_3dd=_3df/max; if(red==max){ -hue=(_33e-blue)/_347; +hue=(_3d6-blue)/_3df; }else{ -if(_33e==max){ -hue=2+((blue-red)/_347); +if(_3d6==max){ +hue=2+((blue-red)/_3df); }else{ -hue=4+((red-_33e)/_347); +hue=4+((red-_3d6)/_3df); } } hue/=6; @@ -2847,37 +3459,37 @@ if(hue>1){ hue-=1; } } -return {h:hue,s:_345,v:_346,a:_340}; -},rgbToHSL:function(red,_349,blue,_34b){ +return {h:hue,s:_3dd,v:_3de,a:_3d8}; +},rgbToHSL:function(red,_3e1,blue,_3e3){ if(arguments.length==1){ var rgb=red; red=rgb.r; -_349=rgb.g; +_3e1=rgb.g; blue=rgb.b; -_34b=rgb.a; +_3e3=rgb.a; } -var max=Math.max(red,Math.max(_349,blue)); -var min=Math.min(red,Math.min(_349,blue)); +var max=Math.max(red,Math.max(_3e1,blue)); +var min=Math.min(red,Math.min(_3e1,blue)); var hue; -var _350; -var _351=(max+min)/2; -var _352=max-min; -if(_352===0){ +var _3e8; +var _3e9=(max+min)/2; +var _3ea=max-min; +if(_3ea===0){ hue=0; -_350=0; +_3e8=0; }else{ -if(_351<=0.5){ -_350=_352/(max+min); +if(_3e9<=0.5){ +_3e8=_3ea/(max+min); }else{ -_350=_352/(2-max-min); +_3e8=_3ea/(2-max-min); } if(red==max){ -hue=(_349-blue)/_352; +hue=(_3e1-blue)/_3ea; }else{ -if(_349==max){ -hue=2+((blue-red)/_352); +if(_3e1==max){ +hue=2+((blue-red)/_3ea); }else{ -hue=4+((red-_349)/_352); +hue=4+((red-_3e1)/_3ea); } } hue/=6; @@ -2888,33 +3500,33 @@ if(hue>1){ hue-=1; } } -return {h:hue,s:_350,l:_351,a:_34b}; +return {h:hue,s:_3e8,l:_3e9,a:_3e3}; },toColorPart:function(num){ num=Math.round(num); -var _354=num.toString(16); +var _3ec=num.toString(16); if(num<16){ -return "0"+_354; +return "0"+_3ec; } -return _354; +return _3ec; },__new__:function(){ var m=MochiKit.Base; this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]); this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]); -var _356=1/3; -var _357={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_356,_356,_356],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_356,2*_356,2*_356],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]}; -var _358=function(name,r,g,b,a){ +var _3ee=1/3; +var _3ef={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_3ee,_3ee,_3ee],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_3ee,2*_3ee,2*_3ee],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]}; +var _3f0=function(name,r,g,b,a){ var rval=this.fromRGB(r,g,b,a); this[name]=function(){ return rval; }; return rval; }; -for(var k in _357){ +for(var k in _3ef){ var name=k+"Color"; -var _361=m.concat([_358,this.Color,name],_357[k]); -this.Color[name]=m.bind.apply(null,_361); +var _3f9=m.concat([_3f0,this.Color,name],_3ef[k]); +this.Color[name]=m.bind.apply(null,_3f9); } -var _362=function(){ +var _3fa=function(){ for(var i=0;i1){ var src=MochiKit.DOM.getElement(arguments[0]); var sig=arguments[1]; var obj=arguments[2]; var func=arguments[3]; -for(var i=_3a4.length-1;i>=0;i--){ -var o=_3a4[i]; +for(var i=_43c.length-1;i>=0;i--){ +var o=_43c[i]; if(o.source===src&&o.signal===sig&&o.objOrFunc===obj&&o.funcOrStr===func){ self._disconnect(o); if(!self._lock){ -_3a4.splice(i,1); +_43c.splice(i,1); }else{ self._dirty=true; } @@ -3339,11 +3951,11 @@ return true; } } }else{ -var idx=m.findIdentical(_3a4,_3a2); +var idx=m.findIdentical(_43c,_43a); if(idx>=0){ -self._disconnect(_3a2); +self._disconnect(_43a); if(!self._lock){ -_3a4.splice(idx,1); +_43c.splice(idx,1); }else{ self._dirty=true; } @@ -3351,100 +3963,100 @@ return true; } } return false; -},disconnectAllTo:function(_3ad,_3ae){ +},disconnectAllTo:function(_445,_446){ var self=MochiKit.Signal; -var _3b0=self._observers; -var _3b1=self._disconnect; -var _3b2=self._lock; -var _3b3=self._dirty; -if(typeof (_3ae)==="undefined"){ -_3ae=null; +var _448=self._observers; +var _449=self._disconnect; +var _44a=self._lock; +var _44b=self._dirty; +if(typeof (_446)==="undefined"){ +_446=null; } -for(var i=_3b0.length-1;i>=0;i--){ -var _3b5=_3b0[i]; -if(_3b5.objOrFunc===_3ad&&(_3ae===null||_3b5.funcOrStr===_3ae)){ -_3b1(_3b5); -if(_3b2){ -_3b3=true; +for(var i=_448.length-1;i>=0;i--){ +var _44d=_448[i]; +if(_44d.objOrFunc===_445&&(_446===null||_44d.funcOrStr===_446)){ +_449(_44d); +if(_44a){ +_44b=true; }else{ -_3b0.splice(i,1); +_448.splice(i,1); } } } -self._dirty=_3b3; +self._dirty=_44b; },disconnectAll:function(src,sig){ src=MochiKit.DOM.getElement(src); var m=MochiKit.Base; -var _3b9=m.flattenArguments(m.extend(null,arguments,1)); +var _451=m.flattenArguments(m.extend(null,arguments,1)); var self=MochiKit.Signal; -var _3bb=self._disconnect; -var _3bc=self._observers; -var i,_3be; -var _3bf=self._lock; -var _3c0=self._dirty; -if(_3b9.length===0){ -for(i=_3bc.length-1;i>=0;i--){ -_3be=_3bc[i]; -if(_3be.source===src){ -_3bb(_3be); -if(!_3bf){ -_3bc.splice(i,1); +var _453=self._disconnect; +var _454=self._observers; +var i,_456; +var _457=self._lock; +var _458=self._dirty; +if(_451.length===0){ +for(i=_454.length-1;i>=0;i--){ +_456=_454[i]; +if(_456.source===src){ +_453(_456); +if(!_457){ +_454.splice(i,1); }else{ -_3c0=true; +_458=true; } } } }else{ var sigs={}; -for(i=0;i<_3b9.length;i++){ -sigs[_3b9[i]]=true; +for(i=0;i<_451.length;i++){ +sigs[_451[i]]=true; } -for(i=_3bc.length-1;i>=0;i--){ -_3be=_3bc[i]; -if(_3be.source===src&&_3be.signal in sigs){ -_3bb(_3be); -if(!_3bf){ -_3bc.splice(i,1); +for(i=_454.length-1;i>=0;i--){ +_456=_454[i]; +if(_456.source===src&&_456.signal in sigs){ +_453(_456); +if(!_457){ +_454.splice(i,1); }else{ -_3c0=true; +_458=true; } } } } -self._dirty=_3c0; +self._dirty=_458; },signal:function(src,sig){ var self=MochiKit.Signal; -var _3c5=self._observers; +var _45d=self._observers; src=MochiKit.DOM.getElement(src); var args=MochiKit.Base.extend(null,arguments,2); -var _3c7=[]; +var _45f=[]; self._lock=true; -for(var i=0;i<_3c5.length;i++){ -var _3c9=_3c5[i]; -if(_3c9.source===src&&_3c9.signal===sig){ +for(var i=0;i<_45d.length;i++){ +var _461=_45d[i]; +if(_461.source===src&&_461.signal===sig){ try{ -_3c9.listener.apply(src,args); +_461.listener.apply(src,args); } catch(e){ -_3c7.push(e); +_45f.push(e); } } } self._lock=false; if(self._dirty){ self._dirty=false; -for(var i=_3c5.length-1;i>=0;i--){ -if(!_3c5[i].connected){ -_3c5.splice(i,1); +for(var i=_45d.length-1;i>=0;i--){ +if(!_45d[i].connected){ +_45d.splice(i,1); } } } -if(_3c7.length==1){ -throw _3c7[0]; +if(_45f.length==1){ +throw _45f[0]; }else{ -if(_3c7.length>1){ +if(_45f.length>1){ var e=new Error("Multiple errors thrown in handling 'sig', see errors property"); -e.errors=_3c7; +e.errors=_45f; throw e; } }