<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <tuple>
        <global name="File" module="OFS.Image"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>_Cacheable__manager_id</string> </key>
            <value> <string>http_cache</string> </value>
        </item>
        <item>
            <key> <string>_EtagSupport__etag</string> </key>
            <value> <string>ts38499782.17</string> </value>
        </item>
        <item>
            <key> <string>__name__</string> </key>
            <value> <string>MochiKit.js</string> </value>
        </item>
        <item>
            <key> <string>content_type</string> </key>
            <value> <string>application/javascript</string> </value>
        </item>
        <item>
            <key> <string>data</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
            </value>
        </item>
        <item>
            <key> <string>precondition</string> </key>
            <value> <string></string> </value>
        </item>
        <item>
            <key> <string>size</string> </key>
            <value> <long>202262</long> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string>MochiKitERP5.js</string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
  <record id="2" aka="AAAAAAAAAAI=">
    <pickle>
      <tuple>
        <global name="Pdata" module="OFS.Image"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>data</string> </key>
            <value> <string encoding="cdata"><![CDATA[

/***\n
\n
    MochiKit.MochiKit 1.4.2 : PACKED VERSION\n
\n
    THIS FILE IS AUTOMATICALLY GENERATED.  If creating patches, please\n
    diff against the source tree, not this file.\n
\n
    See <http://mochikit.com/> for documentation, downloads, license, etc.\n
\n
    (c) 2005 Bob Ippolito.  All rights Reserved.\n
\n
***/\n
\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.Base");\n
}\n
if(typeof (MochiKit)=="undefined"){\n
MochiKit={};\n
}\n
if(typeof (MochiKit.Base)=="undefined"){\n
MochiKit.Base={};\n
}\n
if(typeof (MochiKit.__export__)=="undefined"){\n
MochiKit.__export__=(MochiKit.__compat__||(typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined"));\n
}\n
MochiKit.Base.VERSION="1.4.2";\n
MochiKit.Base.NAME="MochiKit.Base";\n
MochiKit.Base.update=function(_1,_2){\n
if(_1===null||_1===undefined){\n
_1={};\n
}\n
for(var i=1;i<arguments.length;i++){\n
var o=arguments[i];\n
if(typeof (o)!="undefined"&&o!==null){\n
for(var k in o){\n
_1[k]=o[k];\n
}\n
}\n
}\n
return _1;\n
};\n
MochiKit.Base.update(MochiKit.Base,{__repr__:function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
},toString:function(){\n
return this.__repr__();\n
},camelize:function(_6){\n
var _7=_6.split("-");\n
var cc=_7[0];\n
for(var i=1;i<_7.length;i++){\n
cc+=_7[i].charAt(0).toUpperCase()+_7[i].substring(1);\n
}\n
return cc;\n
},counter:function(n){\n
if(arguments.length===0){\n
n=1;\n
}\n
return function(){\n
return n++;\n
};\n
},clone:function(_b){\n
var me=arguments.callee;\n
if(arguments.length==1){\n
me.prototype=_b;\n
return new me();\n
}\n
},_deps:function(_d,_e){\n
if(!(_d in MochiKit)){\n
MochiKit[_d]={};\n
}\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit."+_d);\n
}\n
for(var i=0;i<_e.length;i++){\n
if(typeof (dojo)!="undefined"){\n
dojo.require("MochiKit."+_e[i]);\n
}\n
if(typeof (JSAN)!="undefined"){\n
JSAN.use("MochiKit."+_e[i],[]);\n
}\n
if(!(_e[i] in MochiKit)){\n
throw "MochiKit."+_d+" depends on MochiKit."+_e[i]+"!";\n
}\n
}\n
},_flattenArray:function(res,lst){\n
for(var i=0;i<lst.length;i++){\n
var o=lst[i];\n
if(o instanceof Array){\n
arguments.callee(res,o);\n
}else{\n
res.push(o);\n
}\n
}\n
return res;\n
},flattenArray:function(lst){\n
return MochiKit.Base._flattenArray([],lst);\n
},flattenArguments:function(lst){\n
var res=[];\n
var m=MochiKit.Base;\n
var _18=m.extend(null,arguments);\n
while(_18.length){\n
var o=_18.shift();\n
if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){\n
for(var i=o.length-1;i>=0;i--){\n
_18.unshift(o[i]);\n
}\n
}else{\n
res.push(o);\n
}\n
}\n
return res;\n
},extend:function(_1b,obj,_1d){\n
if(!_1d){\n
_1d=0;\n
}\n
if(obj){\n
var l=obj.length;\n
if(typeof (l)!="number"){\n
if(typeof (MochiKit.Iter)!="undefined"){\n
obj=MochiKit.Iter.list(obj);\n
l=obj.length;\n
}else{\n
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");\n
}\n
}\n
if(!_1b){\n
_1b=[];\n
}\n
for(var i=_1d;i<l;i++){\n
_1b.push(obj[i]);\n
}\n
}\n
return _1b;\n
},updatetree:function(_20,obj){\n
if(_20===null||_20===undefined){\n
_20={};\n
}\n
for(var i=1;i<arguments.length;i++){\n
var o=arguments[i];\n
if(typeof (o)!="undefined"&&o!==null){\n
for(var k in o){\n
var v=o[k];\n
if(typeof (_20[k])=="object"&&typeof (v)=="object"){\n
arguments.callee(_20[k],v);\n
}else{\n
_20[k]=v;\n
}\n
}\n
}\n
}\n
return _20;\n
},setdefault:function(_26,obj){\n
if(_26===null||_26===undefined){\n
_26={};\n
}\n
for(var i=1;i<arguments.length;i++){\n
var o=arguments[i];\n
for(var k in o){\n
if(!(k in _26)){\n
_26[k]=o[k];\n
}\n
}\n
}\n
return _26;\n
},keys:function(obj){\n
var _2c=[];\n
for(var _2d in obj){\n
_2c.push(_2d);\n
}\n
return _2c;\n
},values:function(obj){\n
var _2f=[];\n
for(var _30 in obj){\n
_2f.push(obj[_30]);\n
}\n
return _2f;\n
},items:function(obj){\n
var _32=[];\n
var e;\n
for(var _34 in obj){\n
var v;\n
try{\n
v=obj[_34];\n
}\n
catch(e){\n
continue;\n
}\n
_32.push([_34,v]);\n
}\n
return _32;\n
},_newNamedError:function(_36,_37,_38){\n
_38.prototype=new MochiKit.Base.NamedError(_36.NAME+"."+_37);\n
_36[_37]=_38;\n
},operator:{truth:function(a){\n
return !!a;\n
},lognot:function(a){\n
return !a;\n
},identity:function(a){\n
return a;\n
},not:function(a){\n
return ~a;\n
},neg:function(a){\n
return -a;\n
},add:function(a,b){\n
return a+b;\n
},sub:function(a,b){\n
return a-b;\n
},div:function(a,b){\n
return a/b;\n
},mod:function(a,b){\n
return a%b;\n
},mul:function(a,b){\n
return a*b;\n
},and:function(a,b){\n
return a&b;\n
},or:function(a,b){\n
return a|b;\n
},xor:function(a,b){\n
return a^b;\n
},lshift:function(a,b){\n
return a<<b;\n
},rshift:function(a,b){\n
return a>>b;\n
},zrshift:function(a,b){\n
return a>>>b;\n
},eq:function(a,b){\n
return a==b;\n
},ne:function(a,b){\n
return a!=b;\n
},gt:function(a,b){\n
return a>b;\n
},ge:function(a,b){\n
return a>=b;\n
},lt:function(a,b){\n
return a<b;\n
},le:function(a,b){\n
return a<=b;\n
},seq:function(a,b){\n
return a===b;\n
},sne:function(a,b){\n
return a!==b;\n
},ceq:function(a,b){\n
return MochiKit.Base.compare(a,b)===0;\n
},cne:function(a,b){\n
return MochiKit.Base.compare(a,b)!==0;\n
},cgt:function(a,b){\n
return MochiKit.Base.compare(a,b)==1;\n
},cge:function(a,b){\n
return MochiKit.Base.compare(a,b)!=-1;\n
},clt:function(a,b){\n
return MochiKit.Base.compare(a,b)==-1;\n
},cle:function(a,b){\n
return MochiKit.Base.compare(a,b)!=1;\n
},logand:function(a,b){\n
return a&&b;\n
},logor:function(a,b){\n
return a||b;\n
},contains:function(a,b){\n
return b in a;\n
}},forwardCall:function(_76){\n
return function(){\n
return this[_76].apply(this,arguments);\n
};\n
},itemgetter:function(_77){\n
return function(arg){\n
return arg[_77];\n
};\n
},typeMatcher:function(){\n
var _79={};\n
for(var i=0;i<arguments.length;i++){\n
var typ=arguments[i];\n
_79[typ]=typ;\n
}\n
return function(){\n
for(var i=0;i<arguments.length;i++){\n
if(!(typeof (arguments[i]) in _79)){\n
return false;\n
}\n
}\n
return true;\n
};\n
},isNull:function(){\n
for(var i=0;i<arguments.length;i++){\n
if(arguments[i]!==null){\n
return false;\n
}\n
}\n
return true;\n
},isUndefinedOrNull:function(){\n
for(var i=0;i<arguments.length;i++){\n
var o=arguments[i];\n
if(!(typeof (o)=="undefined"||o===null)){\n
return false;\n
}\n
}\n
return true;\n
},isEmpty:function(obj){\n
return !MochiKit.Base.isNotEmpty.apply(this,arguments);\n
},isNotEmpty:function(obj){\n
for(var i=0;i<arguments.length;i++){\n
var o=arguments[i];\n
if(!(o&&o.length)){\n
return false;\n
}\n
}\n
return true;\n
},isArrayLike:function(){\n
for(var i=0;i<arguments.length;i++){\n
var o=arguments[i];\n
var typ=typeof (o);\n
if((typ!="object"&&!(typ=="function"&&typeof (o.item)=="function"))||o===null||typeof (o.length)!="number"||o.nodeType===3||o.nodeType===4){\n
return false;\n
}\n
}\n
return true;\n
},isDateLike:function(){\n
for(var i=0;i<arguments.length;i++){\n
var o=arguments[i];\n
if(typeof (o)!="object"||o===null||typeof (o.getTime)!="function"){\n
return false;\n
}\n
}\n
return true;\n
},xmap:function(fn){\n
if(fn===null){\n
return MochiKit.Base.extend(null,arguments,1);\n
}\n
var _8a=[];\n
for(var i=1;i<arguments.length;i++){\n
_8a.push(fn(arguments[i]));\n
}\n
return _8a;\n
},map:function(fn,lst){\n
var m=MochiKit.Base;\n
var itr=MochiKit.Iter;\n
var _90=m.isArrayLike;\n
if(arguments.length<=2){\n
if(!_90(lst)){\n
if(itr){\n
lst=itr.list(lst);\n
if(fn===null){\n
return lst;\n
}\n
}else{\n
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");\n
}\n
}\n
if(fn===null){\n
return m.extend(null,lst);\n
}\n
var _91=[];\n
for(var i=0;i<lst.length;i++){\n
_91.push(fn(lst[i]));\n
}\n
return _91;\n
}else{\n
if(fn===null){\n
fn=Array;\n
}\n
var _93=null;\n
for(i=1;i<arguments.length;i++){\n
if(!_90(arguments[i])){\n
if(itr){\n
return itr.list(itr.imap.apply(null,arguments));\n
}else{\n
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");\n
}\n
}\n
var l=arguments[i].length;\n
if(_93===null||_93>l){\n
_93=l;\n
}\n
}\n
_91=[];\n
for(i=0;i<_93;i++){\n
var _95=[];\n
for(var j=1;j<arguments.length;j++){\n
_95.push(arguments[j][i]);\n
}\n
_91.push(fn.apply(this,_95));\n
}\n
return _91;\n
}\n
},xfilter:function(fn){\n
var _98=[];\n
if(fn===null){\n
fn=MochiKit.Base.operator.truth;\n
}\n
for(var i=1;i<arguments.length;i++){\n
var o=arguments[i];\n
if(fn(o)){\n
_98.push(o);\n
}\n
}\n
return _98;\n
},filter:function(fn,lst,_9d){\n
var _9e=[];\n
var m=MochiKit.Base;\n
if(!m.isArrayLike(lst)){\n
if(MochiKit.Iter){\n
lst=MochiKit.Iter.list(lst);\n
}else{\n
throw new TypeError("Argument not an array-like and MochiKit.Iter not present");\n
}\n
}\n
if(fn===null){\n
fn=m.operator.truth;\n
}\n
if(typeof (Array.prototype.filter)=="function"){\n
return Array.prototype.filter.call(lst,fn,_9d);\n
}else{\n
if(typeof (_9d)=="undefined"||_9d===null){\n
for(var i=0;i<lst.length;i++){\n
var o=lst[i];\n
if(fn(o)){\n
_9e.push(o);\n
}\n
}\n
}else{\n
for(i=0;i<lst.length;i++){\n
o=lst[i];\n
if(fn.call(_9d,o)){\n
_9e.push(o);\n
}\n
}\n
}\n
}\n
return _9e;\n
},_wrapDumbFunction:function(_a2){\n
return function(){\n
switch(arguments.length){\n
case 0:\n
return _a2();\n
case 1:\n
return _a2(arguments[0]);\n
case 2:\n
return _a2(arguments[0],arguments[1]);\n
case 3:\n
return _a2(arguments[0],arguments[1],arguments[2]);\n
}\n
var _a3=[];\n
for(var i=0;i<arguments.length;i++){\n
_a3.push("arguments["+i+"]");\n
}\n
return eval("(func("+_a3.join(",")+"))");\n
};\n
},methodcaller:function(_a5){\n
var _a6=MochiKit.Base.extend(null,arguments,1);\n
if(typeof (_a5)=="function"){\n
return function(obj){\n
return _a5.apply(obj,_a6);\n
};\n
}else{\n
return function(obj){\n
return obj[_a5].apply(obj,_a6);\n
};\n
}\n
},method:function(_a9,_aa){\n
var m=MochiKit.Base;\n
return m.bind.apply(this,m.extend([_aa,_a9],arguments,2));\n
},compose:function(f1,f2){\n
var _ae=[];\n
var m=MochiKit.Base;\n
if(arguments.length===0){\n
throw new TypeError("compose() requires at least one argument");\n
}\n
for(var i=0;i<arguments.length;i++){\n
var fn=arguments[i];\n
if(typeof (fn)!="function"){\n
throw new TypeError(m.repr(fn)+" is not a function");\n
}\n
_ae.push(fn);\n
}\n
return function(){\n
var _b2=arguments;\n
for(var i=_ae.length-1;i>=0;i--){\n
_b2=[_ae[i].apply(this,_b2)];\n
}\n
return _b2[0];\n
};\n
},bind:function(_b4,_b5){\n
if(typeof (_b4)=="string"){\n
_b4=_b5[_b4];\n
}\n
var _b6=_b4.im_func;\n
var _b7=_b4.im_preargs;\n
var _b8=_b4.im_self;\n
var m=MochiKit.Base;\n
if(typeof (_b4)=="function"&&typeof (_b4.apply)=="undefined"){\n
_b4=m._wrapDumbFunction(_b4);\n
}\n
if(typeof (_b6)!="function"){\n
_b6=_b4;\n
}\n
if(typeof (_b5)!="undefined"){\n
_b8=_b5;\n
}\n
if(typeof (_b7)=="undefined"){\n
_b7=[];\n
}else{\n
_b7=_b7.slice();\n
}\n
m.extend(_b7,arguments,2);\n
var _ba=function(){\n
var _bb=arguments;\n
var me=arguments.callee;\n
if(me.im_preargs.length>0){\n
_bb=m.concat(me.im_preargs,_bb);\n
}\n
var _bd=me.im_self;\n
if(!_bd){\n
_bd=this;\n
}\n
return me.im_func.apply(_bd,_bb);\n
};\n
_ba.im_self=_b8;\n
_ba.im_func=_b6;\n
_ba.im_preargs=_b7;\n
return _ba;\n
},bindLate:function(_be,_bf){\n
var m=MochiKit.Base;\n
if(typeof (_be)!="string"){\n
return m.bind.apply(this,arguments);\n
}\n
var _c1=m.extend([],arguments,2);\n
var _c2=function(){\n
var _c3=arguments;\n
var me=arguments.callee;\n
if(me.im_preargs.length>0){\n
_c3=m.concat(me.im_preargs,_c3);\n
}\n
var _c5=me.im_self;\n
if(!_c5){\n
_c5=this;\n
}\n
return _c5[me.im_func].apply(_c5,_c3);\n
};\n
_c2.im_self=_bf;\n
_c2.im_func=_be;\n
_c2.im_preargs=_c1;\n
return _c2;\n
},bindMethods:function(_c6){\n
var _c7=MochiKit.Base.bind;\n
for(var k in _c6){\n
var _c9=_c6[k];\n
if(typeof (_c9)=="function"){\n
_c6[k]=_c7(_c9,_c6);\n
}\n
}\n
},registerComparator:function(_ca,_cb,_cc,_cd){\n
MochiKit.Base.comparatorRegistry.register(_ca,_cb,_cc,_cd);\n
},_primitives:{"boolean":true,"string":true,"number":true},compare:function(a,b){\n
if(a==b){\n
return 0;\n
}\n
var _d0=(typeof (a)=="undefined"||a===null);\n
var _d1=(typeof (b)=="undefined"||b===null);\n
if(_d0&&_d1){\n
return 0;\n
}else{\n
if(_d0){\n
return -1;\n
}else{\n
if(_d1){\n
return 1;\n
}\n
}\n
}\n
var m=MochiKit.Base;\n
var _d3=m._primitives;\n
if(!(typeof (a) in _d3&&typeof (b) in _d3)){\n
try{\n
return m.comparatorRegistry.match(a,b);\n
}\n
catch(e){\n
if(e!=m.NotFound){\n
throw e;\n
}\n
}\n
}\n
if(a<b){\n
return -1;\n
}else{\n
if(a>b){\n
return 1;\n
}\n
}\n
var _d4=m.repr;\n
throw new TypeError(_d4(a)+" and "+_d4(b)+" can not be compared");\n
},compareDateLike:function(a,b){\n
return MochiKit.Base.compare(a.getTime(),b.getTime());\n
},compareArrayLike:function(a,b){\n
var _d9=MochiKit.Base.compare;\n
var _da=a.length;\n
var _db=0;\n
if(_da>b.length){\n
_db=1;\n
_da=b.length;\n
}else{\n
if(_da<b.length){\n
_db=-1;\n
}\n
}\n
for(var i=0;i<_da;i++){\n
var cmp=_d9(a[i],b[i]);\n
if(cmp){\n
return cmp;\n
}\n
}\n
return _db;\n
},registerRepr:function(_de,_df,_e0,_e1){\n
MochiKit.Base.reprRegistry.register(_de,_df,_e0,_e1);\n
},repr:function(o){\n
if(typeof (o)=="undefined"){\n
return "undefined";\n
}else{\n
if(o===null){\n
return "null";\n
}\n
}\n
try{\n
if(typeof (o.__repr__)=="function"){\n
return o.__repr__();\n
}else{\n
if(typeof (o.repr)=="function"&&o.repr!=arguments.callee){\n
return o.repr();\n
}\n
}\n
return MochiKit.Base.reprRegistry.match(o);\n
}\n
catch(e){\n
if(typeof (o.NAME)=="string"&&(o.toString==Function.prototype.toString||o.toString==Object.prototype.toString)){\n
return o.NAME;\n
}\n
}\n
try{\n
var _e3=(o+"");\n
}\n
catch(e){\n
return "["+typeof (o)+"]";\n
}\n
if(typeof (o)=="function"){\n
_e3=_e3.replace(/^\\s+/,"").replace(/\\s+/g," ");\n
_e3=_e3.replace(/,(\\S)/,", $1");\n
var idx=_e3.indexOf("{");\n
if(idx!=-1){\n
_e3=_e3.substr(0,idx)+"{...}";\n
}\n
}\n
return _e3;\n
},reprArrayLike:function(o){\n
var m=MochiKit.Base;\n
return "["+m.map(m.repr,o).join(", ")+"]";\n
},reprString:function(o){\n
return ("\\""+o.replace(/(["\\\\])/g,"\\\\$1")+"\\"").replace(/[\\f]/g,"\\\\f").replace(/[\\b]/g,"\\\\b").replace(/[\\n]/g,"\\\\n").replace(/[\\t]/g,"\\\\t").replace(/[\\v]/g,"\\\\v").replace(/[\\r]/g,"\\\\r");\n
},reprNumber:function(o){\n
return o+"";\n
},registerJSON:function(_e9,_ea,_eb,_ec){\n
MochiKit.Base.jsonRegistry.register(_e9,_ea,_eb,_ec);\n
},evalJSON:function(){\n
return eval("("+MochiKit.Base._filterJSON(arguments[0])+")");\n
},_filterJSON:function(s){\n
var m=s.match(/^\\s*\\/\\*(.*)\\*\\/\\s*$/);\n
if(m){\n
return m[1];\n
}\n
return s;\n
},serializeJSON:function(o){\n
var _f0=typeof (o);\n
if(_f0=="number"||_f0=="boolean"){\n
return o+"";\n
}else{\n
if(o===null){\n
return "null";\n
}else{\n
if(_f0=="string"){\n
var res="";\n
for(var i=0;i<o.length;i++){\n
var c=o.charAt(i);\n
if(c=="\\""){\n
res+="\\\\\\"";\n
}else{\n
if(c=="\\\\"){\n
res+="\\\\\\\\";\n
}else{\n
if(c=="\\b"){\n
res+="\\\\b";\n
}else{\n
if(c=="\\f"){\n
res+="\\\\f";\n
}else{\n
if(c=="\\n"){\n
res+="\\\\n";\n
}else{\n
if(c=="\\r"){\n
res+="\\\\r";\n
}else{\n
if(c=="\\t"){\n
res+="\\\\t";\n
}else{\n
if(o.charCodeAt(i)<=31){\n
var hex=o.charCodeAt(i).toString(16);\n
if(hex.length<2){\n
hex="0"+hex;\n
}\n
res+="\\\\u00"+hex.toUpperCase();\n
}else{\n
res+=c;\n
}\n
}\n
}\n
}\n
}\n
}\n
}\n
}\n
}\n
return "\\""+res+"\\"";\n
}\n
}\n
}\n
var me=arguments.callee;\n
var _f6;\n
if(typeof (o.__json__)=="function"){\n
_f6=o.__json__();\n
if(o!==_f6){\n
return me(_f6);\n
}\n
}\n
if(typeof (o.json)=="function"){\n
_f6=o.json();\n
if(o!==_f6){\n
return me(_f6);\n
}\n
}\n
if(_f0!="function"&&typeof (o.length)=="number"){\n
var res=[];\n
for(var i=0;i<o.length;i++){\n
var val=me(o[i]);\n
if(typeof (val)!="string"){\n
continue;\n
}\n
res.push(val);\n
}\n
return "["+res.join(", ")+"]";\n
}\n
var m=MochiKit.Base;\n
try{\n
_f6=m.jsonRegistry.match(o);\n
if(o!==_f6){\n
return me(_f6);\n
}\n
}\n
catch(e){\n
if(e!=m.NotFound){\n
throw e;\n
}\n
}\n
if(_f0=="undefined"){\n
throw new TypeError("undefined can not be serialized as JSON");\n
}\n
if(_f0=="function"){\n
return null;\n
}\n
res=[];\n
for(var k in o){\n
var _fa;\n
if(typeof (k)=="number"){\n
_fa="\\""+k+"\\"";\n
}else{\n
if(typeof (k)=="string"){\n
_fa=me(k);\n
}else{\n
continue;\n
}\n
}\n
val=me(o[k]);\n
if(typeof (val)!="string"){\n
continue;\n
}\n
res.push(_fa+":"+val);\n
}\n
return "{"+res.join(", ")+"}";\n
},objEqual:function(a,b){\n
return (MochiKit.Base.compare(a,b)===0);\n
},arrayEqual:function(_fd,arr){\n
if(_fd.length!=arr.length){\n
return false;\n
}\n
return (MochiKit.Base.compare(_fd,arr)===0);\n
},concat:function(){\n
var _ff=[];\n
var _100=MochiKit.Base.extend;\n
for(var i=0;i<arguments.length;i++){\n
_100(_ff,arguments[i]);\n
}\n
return _ff;\n
},keyComparator:function(key){\n
var m=MochiKit.Base;\n
var _104=m.compare;\n
if(arguments.length==1){\n
return function(a,b){\n
return _104(a[key],b[key]);\n
};\n
}\n
var _107=m.extend(null,arguments);\n
return function(a,b){\n
var rval=0;\n
for(var i=0;(rval===0)&&(i<_107.length);i++){\n
var key=_107[i];\n
rval=_104(a[key],b[key]);\n
}\n
return rval;\n
};\n
},reverseKeyComparator:function(key){\n
var _10e=MochiKit.Base.keyComparator.apply(this,arguments);\n
return function(a,b){\n
return _10e(b,a);\n
};\n
},partial:function(func){\n
var m=MochiKit.Base;\n
return m.bind.apply(this,m.extend([func,undefined],arguments,1));\n
},listMinMax:function(_113,lst){\n
if(lst.length===0){\n
return null;\n
}\n
var cur=lst[0];\n
var _116=MochiKit.Base.compare;\n
for(var i=1;i<lst.length;i++){\n
var o=lst[i];\n
if(_116(o,cur)==_113){\n
cur=o;\n
}\n
}\n
return cur;\n
},objMax:function(){\n
return MochiKit.Base.listMinMax(1,arguments);\n
},objMin:function(){\n
return MochiKit.Base.listMinMax(-1,arguments);\n
},findIdentical:function(lst,_11a,_11b,end){\n
if(typeof (end)=="undefined"||end===null){\n
end=lst.length;\n
}\n
if(typeof (_11b)=="undefined"||_11b===null){\n
_11b=0;\n
}\n
for(var i=_11b;i<end;i++){\n
if(lst[i]===_11a){\n
return i;\n
}\n
}\n
return -1;\n
},mean:function(){\n
var sum=0;\n
var m=MochiKit.Base;\n
var args=m.extend(null,arguments);\n
var _121=args.length;\n
while(args.length){\n
var o=args.shift();\n
if(o&&typeof (o)=="object"&&typeof (o.length)=="number"){\n
_121+=o.length-1;\n
for(var i=o.length-1;i>=0;i--){\n
sum+=o[i];\n
}\n
}else{\n
sum+=o;\n
}\n
}\n
if(_121<=0){\n
throw new TypeError("mean() requires at least one argument");\n
}\n
return sum/_121;\n
},median:function(){\n
var data=MochiKit.Base.flattenArguments(arguments);\n
if(data.length===0){\n
throw new TypeError("median() requires at least one argument");\n
}\n
data.sort(compare);\n
if(data.length%2==0){\n
var _125=data.length/2;\n
return (data[_125]+data[_125-1])/2;\n
}else{\n
return data[(data.length-1)/2];\n
}\n
},findValue:function(lst,_127,_128,end){\n
if(typeof (end)=="undefined"||end===null){\n
end=lst.length;\n
}\n
if(typeof (_128)=="undefined"||_128===null){\n
_128=0;\n
}\n
var cmp=MochiKit.Base.compare;\n
for(var i=_128;i<end;i++){\n
if(cmp(lst[i],_127)===0){\n
return i;\n
}\n
}\n
return -1;\n
},nodeWalk:function(node,_12d){\n
var _12e=[node];\n
var _12f=MochiKit.Base.extend;\n
while(_12e.length){\n
var res=_12d(_12e.shift());\n
if(res){\n
_12f(_12e,res);\n
}\n
}\n
},nameFunctions:function(_131){\n
var base=_131.NAME;\n
if(typeof (base)=="undefined"){\n
base="";\n
}else{\n
base=base+".";\n
}\n
for(var name in _131){\n
var o=_131[name];\n
if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){\n
try{\n
o.NAME=base+name;\n
}\n
catch(e){\n
}\n
}\n
}\n
},queryString:function(_135,_136){\n
if(typeof (MochiKit.DOM)!="undefined"&&arguments.length==1&&(typeof (_135)=="string"||(typeof (_135.nodeType)!="undefined"&&_135.nodeType>0))){\n
var kv=MochiKit.DOM.formContents(_135);\n
_135=kv[0];\n
_136=kv[1];\n
}else{\n
if(arguments.length==1){\n
if(typeof (_135.length)=="number"&&_135.length==2){\n
return arguments.callee(_135[0],_135[1]);\n
}\n
var o=_135;\n
_135=[];\n
_136=[];\n
for(var k in o){\n
var v=o[k];\n
if(typeof (v)=="function"){\n
continue;\n
}else{\n
if(MochiKit.Base.isArrayLike(v)){\n
for(var i=0;i<v.length;i++){\n
_135.push(k);\n
_136.push(v[i]);\n
}\n
}else{\n
_135.push(k);\n
_136.push(v);\n
}\n
}\n
}\n
}\n
}\n
var rval=[];\n
var len=Math.min(_135.length,_136.length);\n
var _13e=MochiKit.Base.urlEncode;\n
for(var i=0;i<len;i++){\n
v=_136[i];\n
if(typeof (v)!="undefined"&&v!==null){\n
rval.push(_13e(_135[i])+"="+_13e(v));\n
}\n
}\n
return rval.join("&");\n
},parseQueryString:function(_13f,_140){\n
var qstr=(_13f.charAt(0)=="?")?_13f.substring(1):_13f;\n
var _142=qstr.replace(/\\+/g,"%20").split(/\\&amp\\;|\\&\\#38\\;|\\&#x26;|\\&/);\n
var o={};\n
var _144;\n
if(typeof (decodeURIComponent)!="undefined"){\n
_144=decodeURIComponent;\n
}else{\n
_144=unescape;\n
}\n
if(_140){\n
for(var i=0;i<_142.length;i++){\n
var pair=_142[i].split("=");\n
var name=_144(pair.shift());\n
if(!name){\n
continue;\n
}\n
var arr=o[name];\n
if(!(arr instanceof Array)){\n
arr=[];\n
o[name]=arr;\n
}\n
arr.push(_144(pair.join("=")));\n
}\n
}else{\n
for(i=0;i<_142.length;i++){\n
pair=_142[i].split("=");\n
var name=pair.shift();\n
if(!name){\n
continue;\n
}\n
o[_144(name)]=_144(pair.join("="));\n
}\n
}\n
return o;\n
}});\n
MochiKit.Base.AdapterRegistry=function(){\n
this.pairs=[];\n
};\n
MochiKit.Base.AdapterRegistry.prototype={register:function(name,_14a,wrap,_14c){\n
if(_14c){\n
this.pairs.unshift([name,_14a,wrap]);\n
}else{\n
this.pairs.push([name,_14a,wrap]);\n
}\n
},match:function(){\n
for(var i=0;i<this.pairs.length;i++){\n
var pair=this.pairs[i];\n
if(pair[1].apply(this,arguments)){\n
return pair[2].apply(this,arguments);\n
}\n
}\n
throw MochiKit.Base.NotFound;\n
},unregister:function(name){\n
for(var i=0;i<this.pairs.length;i++){\n
var pair=this.pairs[i];\n
if(pair[0]==name){\n
this.pairs.splice(i,1);\n
return true;\n
}\n
}\n
return false;\n
}};\n
MochiKit.Base.EXPORT=["flattenArray","noop","camelize","counter","clone","extend","update","updatetree","setdefault","keys","values","items","NamedError","operator","forwardCall","itemgetter","typeMatcher","isCallable","isUndefined","isUndefinedOrNull","isNull","isEmpty","isNotEmpty","isArrayLike","isDateLike","xmap","map","xfilter","filter","methodcaller","compose","bind","bindLate","bindMethods","NotFound","AdapterRegistry","registerComparator","compare","registerRepr","repr","objEqual","arrayEqual","concat","keyComparator","reverseKeyComparator","partial","merge","listMinMax","listMax","listMin","objMax","objMin","nodeWalk","zip","urlEncode","queryString","serializeJSON","registerJSON","evalJSON","parseQueryString","findValue","findIdentical","flattenArguments","method","average","mean","median"];\n
MochiKit.Base.EXPORT_OK=["nameFunctions","comparatorRegistry","reprRegistry","jsonRegistry","compareDateLike","compareArrayLike","reprArrayLike","reprString","reprNumber"];\n
MochiKit.Base._exportSymbols=function(_152,_153){\n
if(!MochiKit.__export__){\n
return;\n
}\n
var all=_153.EXPORT_TAGS[":all"];\n
for(var i=0;i<all.length;i++){\n
_152[all[i]]=_153[all[i]];\n
}\n
};\n
MochiKit.Base.__new__=function(){\n
var m=this;\n
m.noop=m.operator.identity;\n
m.forward=m.forwardCall;\n
m.find=m.findValue;\n
if(typeof (encodeURIComponent)!="undefined"){\n
m.urlEncode=function(_157){\n
return encodeURIComponent(_157).replace(/\\\'/g,"%27");\n
};\n
}else{\n
m.urlEncode=function(_158){\n
return escape(_158).replace(/\\+/g,"%2B").replace(/\\"/g,"%22").rval.replace(/\\\'/g,"%27");\n
};\n
}\n
m.NamedError=function(name){\n
this.message=name;\n
this.name=name;\n
};\n
m.NamedError.prototype=new Error();\n
m.update(m.NamedError.prototype,{repr:function(){\n
if(this.message&&this.message!=this.name){\n
return this.name+"("+m.repr(this.message)+")";\n
}else{\n
return this.name+"()";\n
}\n
},toString:m.forwardCall("repr")});\n
m.NotFound=new m.NamedError("MochiKit.Base.NotFound");\n
m.listMax=m.partial(m.listMinMax,1);\n
m.listMin=m.partial(m.listMinMax,-1);\n
m.isCallable=m.typeMatcher("function");\n
m.isUndefined=m.typeMatcher("undefined");\n
m.merge=m.partial(m.update,null);\n
m.zip=m.partial(m.map,null);\n
m.average=m.mean;\n
m.comparatorRegistry=new m.AdapterRegistry();\n
m.registerComparator("dateLike",m.isDateLike,m.compareDateLike);\n
m.registerComparator("arrayLike",m.isArrayLike,m.compareArrayLike);\n
m.reprRegistry=new m.AdapterRegistry();\n
m.registerRepr("arrayLike",m.isArrayLike,m.reprArrayLike);\n
m.registerRepr("string",m.typeMatcher("string"),m.reprString);\n
m.registerRepr("numbers",m.typeMatcher("number","boolean"),m.reprNumber);\n
m.jsonRegistry=new m.AdapterRegistry();\n
var all=m.concat(m.EXPORT,m.EXPORT_OK);\n
m.EXPORT_TAGS={":common":m.concat(m.EXPORT_OK),":all":all};\n
m.nameFunctions(this);\n
};\n
MochiKit.Base.__new__();\n
if(MochiKit.__export__){\n
compare=MochiKit.Base.compare;\n
compose=MochiKit.Base.compose;\n
serializeJSON=MochiKit.Base.serializeJSON;\n
mean=MochiKit.Base.mean;\n
median=MochiKit.Base.median;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.Base);\n
MochiKit.Base._deps("Iter",["Base"]);\n
MochiKit.Iter.NAME="MochiKit.Iter";\n
MochiKit.Iter.VERSION="1.4.2";\n
MochiKit.Base.update(MochiKit.Iter,{__repr__:function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
},toString:function(){\n
return this.__repr__();\n
},registerIteratorFactory:function(name,_15c,_15d,_15e){\n
MochiKit.Iter.iteratorRegistry.register(name,_15c,_15d,_15e);\n
},isIterable:function(o){\n
return o!=null&&(typeof (o.next)=="function"||typeof (o.iter)=="function");\n
},iter:function(_160,_161){\n
var self=MochiKit.Iter;\n
if(arguments.length==2){\n
return self.takewhile(function(a){\n
return a!=_161;\n
},_160);\n
}\n
if(typeof (_160.next)=="function"){\n
return _160;\n
}else{\n
if(typeof (_160.iter)=="function"){\n
return _160.iter();\n
}\n
}\n
try{\n
return self.iteratorRegistry.match(_160);\n
}\n
catch(e){\n
var m=MochiKit.Base;\n
if(e==m.NotFound){\n
e=new TypeError(typeof (_160)+": "+m.repr(_160)+" is not iterable");\n
}\n
throw e;\n
}\n
},count:function(n){\n
if(!n){\n
n=0;\n
}\n
var m=MochiKit.Base;\n
return {repr:function(){\n
return "count("+n+")";\n
},toString:m.forwardCall("repr"),next:m.counter(n)};\n
},cycle:function(p){\n
var self=MochiKit.Iter;\n
var m=MochiKit.Base;\n
var lst=[];\n
var _16b=self.iter(p);\n
return {repr:function(){\n
return "cycle(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
try{\n
var rval=_16b.next();\n
lst.push(rval);\n
return rval;\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
if(lst.length===0){\n
this.next=function(){\n
throw self.StopIteration;\n
};\n
}else{\n
var i=-1;\n
this.next=function(){\n
i=(i+1)%lst.length;\n
return lst[i];\n
};\n
}\n
return this.next();\n
}\n
}};\n
},repeat:function(elem,n){\n
var m=MochiKit.Base;\n
if(typeof (n)=="undefined"){\n
return {repr:function(){\n
return "repeat("+m.repr(elem)+")";\n
},toString:m.forwardCall("repr"),next:function(){\n
return elem;\n
}};\n
}\n
return {repr:function(){\n
return "repeat("+m.repr(elem)+", "+n+")";\n
},toString:m.forwardCall("repr"),next:function(){\n
if(n<=0){\n
throw MochiKit.Iter.StopIteration;\n
}\n
n-=1;\n
return elem;\n
}};\n
},next:function(_171){\n
return _171.next();\n
},izip:function(p,q){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
var next=self.next;\n
var _177=m.map(self.iter,arguments);\n
return {repr:function(){\n
return "izip(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
return m.map(next,_177);\n
}};\n
},ifilter:function(pred,seq){\n
var m=MochiKit.Base;\n
seq=MochiKit.Iter.iter(seq);\n
if(pred===null){\n
pred=m.operator.truth;\n
}\n
return {repr:function(){\n
return "ifilter(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
while(true){\n
var rval=seq.next();\n
if(pred(rval)){\n
return rval;\n
}\n
}\n
return undefined;\n
}};\n
},ifilterfalse:function(pred,seq){\n
var m=MochiKit.Base;\n
seq=MochiKit.Iter.iter(seq);\n
if(pred===null){\n
pred=m.operator.truth;\n
}\n
return {repr:function(){\n
return "ifilterfalse(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
while(true){\n
var rval=seq.next();\n
if(!pred(rval)){\n
return rval;\n
}\n
}\n
return undefined;\n
}};\n
},islice:function(seq){\n
var self=MochiKit.Iter;\n
var m=MochiKit.Base;\n
seq=self.iter(seq);\n
var _183=0;\n
var stop=0;\n
var step=1;\n
var i=-1;\n
if(arguments.length==2){\n
stop=arguments[1];\n
}else{\n
if(arguments.length==3){\n
_183=arguments[1];\n
stop=arguments[2];\n
}else{\n
_183=arguments[1];\n
stop=arguments[2];\n
step=arguments[3];\n
}\n
}\n
return {repr:function(){\n
return "islice("+["...",_183,stop,step].join(", ")+")";\n
},toString:m.forwardCall("repr"),next:function(){\n
var rval;\n
while(i<_183){\n
rval=seq.next();\n
i++;\n
}\n
if(_183>=stop){\n
throw self.StopIteration;\n
}\n
_183+=step;\n
return rval;\n
}};\n
},imap:function(fun,p,q){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
var _18d=m.map(self.iter,m.extend(null,arguments,1));\n
var map=m.map;\n
var next=self.next;\n
return {repr:function(){\n
return "imap(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
return fun.apply(this,map(next,_18d));\n
}};\n
},applymap:function(fun,seq,self){\n
seq=MochiKit.Iter.iter(seq);\n
var m=MochiKit.Base;\n
return {repr:function(){\n
return "applymap(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
return fun.apply(self,seq.next());\n
}};\n
},chain:function(p,q){\n
var self=MochiKit.Iter;\n
var m=MochiKit.Base;\n
if(arguments.length==1){\n
return self.iter(arguments[0]);\n
}\n
var _198=m.map(self.iter,arguments);\n
return {repr:function(){\n
return "chain(...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
while(_198.length>1){\n
try{\n
var _199=_198[0].next();\n
return _199;\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
_198.shift();\n
var _199=_198[0].next();\n
return _199;\n
}\n
}\n
if(_198.length==1){\n
var arg=_198.shift();\n
this.next=m.bind("next",arg);\n
return this.next();\n
}\n
throw self.StopIteration;\n
}};\n
},takewhile:function(pred,seq){\n
var self=MochiKit.Iter;\n
seq=self.iter(seq);\n
return {repr:function(){\n
return "takewhile(...)";\n
},toString:MochiKit.Base.forwardCall("repr"),next:function(){\n
var rval=seq.next();\n
if(!pred(rval)){\n
this.next=function(){\n
throw self.StopIteration;\n
};\n
this.next();\n
}\n
return rval;\n
}};\n
},dropwhile:function(pred,seq){\n
seq=MochiKit.Iter.iter(seq);\n
var m=MochiKit.Base;\n
var bind=m.bind;\n
return {"repr":function(){\n
return "dropwhile(...)";\n
},"toString":m.forwardCall("repr"),"next":function(){\n
while(true){\n
var rval=seq.next();\n
if(!pred(rval)){\n
break;\n
}\n
}\n
this.next=bind("next",seq);\n
return rval;\n
}};\n
},_tee:function(_1a4,sync,_1a6){\n
sync.pos[_1a4]=-1;\n
var m=MochiKit.Base;\n
var _1a8=m.listMin;\n
return {repr:function(){\n
return "tee("+_1a4+", ...)";\n
},toString:m.forwardCall("repr"),next:function(){\n
var rval;\n
var i=sync.pos[_1a4];\n
if(i==sync.max){\n
rval=_1a6.next();\n
sync.deque.push(rval);\n
sync.max+=1;\n
sync.pos[_1a4]+=1;\n
}else{\n
rval=sync.deque[i-sync.min];\n
sync.pos[_1a4]+=1;\n
if(i==sync.min&&_1a8(sync.pos)!=sync.min){\n
sync.min+=1;\n
sync.deque.shift();\n
}\n
}\n
return rval;\n
}};\n
},tee:function(_1ab,n){\n
var rval=[];\n
var sync={"pos":[],"deque":[],"max":-1,"min":-1};\n
if(arguments.length==1||typeof (n)=="undefined"||n===null){\n
n=2;\n
}\n
var self=MochiKit.Iter;\n
_1ab=self.iter(_1ab);\n
var _tee=self._tee;\n
for(var i=0;i<n;i++){\n
rval.push(_tee(i,sync,_1ab));\n
}\n
return rval;\n
},list:function(_1b2){\n
var rval;\n
if(_1b2 instanceof Array){\n
return _1b2.slice();\n
}\n
if(typeof (_1b2)=="function"&&!(_1b2 instanceof Function)&&typeof (_1b2.length)=="number"){\n
rval=[];\n
for(var i=0;i<_1b2.length;i++){\n
rval.push(_1b2[i]);\n
}\n
return rval;\n
}\n
var self=MochiKit.Iter;\n
_1b2=self.iter(_1b2);\n
var rval=[];\n
var _1b6;\n
try{\n
while(true){\n
_1b6=_1b2.next();\n
rval.push(_1b6);\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
return rval;\n
}\n
return undefined;\n
},reduce:function(fn,_1b8,_1b9){\n
var i=0;\n
var x=_1b9;\n
var self=MochiKit.Iter;\n
_1b8=self.iter(_1b8);\n
if(arguments.length<3){\n
try{\n
x=_1b8.next();\n
}\n
catch(e){\n
if(e==self.StopIteration){\n
e=new TypeError("reduce() of empty sequence with no initial value");\n
}\n
throw e;\n
}\n
i++;\n
}\n
try{\n
while(true){\n
x=fn(x,_1b8.next());\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
return x;\n
},range:function(){\n
var _1bd=0;\n
var stop=0;\n
var step=1;\n
if(arguments.length==1){\n
stop=arguments[0];\n
}else{\n
if(arguments.length==2){\n
_1bd=arguments[0];\n
stop=arguments[1];\n
}else{\n
if(arguments.length==3){\n
_1bd=arguments[0];\n
stop=arguments[1];\n
step=arguments[2];\n
}else{\n
throw new TypeError("range() takes 1, 2, or 3 arguments!");\n
}\n
}\n
}\n
if(step===0){\n
throw new TypeError("range() step must not be 0");\n
}\n
return {next:function(){\n
if((step>0&&_1bd>=stop)||(step<0&&_1bd<=stop)){\n
throw MochiKit.Iter.StopIteration;\n
}\n
var rval=_1bd;\n
_1bd+=step;\n
return rval;\n
},repr:function(){\n
return "range("+[_1bd,stop,step].join(", ")+")";\n
},toString:MochiKit.Base.forwardCall("repr")};\n
},sum:function(_1c1,_1c2){\n
if(typeof (_1c2)=="undefined"||_1c2===null){\n
_1c2=0;\n
}\n
var x=_1c2;\n
var self=MochiKit.Iter;\n
_1c1=self.iter(_1c1);\n
try{\n
while(true){\n
x+=_1c1.next();\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
return x;\n
},exhaust:function(_1c5){\n
var self=MochiKit.Iter;\n
_1c5=self.iter(_1c5);\n
try{\n
while(true){\n
_1c5.next();\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
},forEach:function(_1c7,func,obj){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
if(arguments.length>2){\n
func=m.bind(func,obj);\n
}\n
if(m.isArrayLike(_1c7)&&!self.isIterable(_1c7)){\n
try{\n
for(var i=0;i<_1c7.length;i++){\n
func(_1c7[i]);\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
}else{\n
self.exhaust(self.imap(func,_1c7));\n
}\n
},every:function(_1cd,func){\n
var self=MochiKit.Iter;\n
try{\n
self.ifilterfalse(func,_1cd).next();\n
return false;\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
return true;\n
}\n
},sorted:function(_1d0,cmp){\n
var rval=MochiKit.Iter.list(_1d0);\n
if(arguments.length==1){\n
cmp=MochiKit.Base.compare;\n
}\n
rval.sort(cmp);\n
return rval;\n
},reversed:function(_1d3){\n
var rval=MochiKit.Iter.list(_1d3);\n
rval.reverse();\n
return rval;\n
},some:function(_1d5,func){\n
var self=MochiKit.Iter;\n
try{\n
self.ifilter(func,_1d5).next();\n
return true;\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
return false;\n
}\n
},iextend:function(lst,_1d9){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
if(m.isArrayLike(_1d9)&&!self.isIterable(_1d9)){\n
for(var i=0;i<_1d9.length;i++){\n
lst.push(_1d9[i]);\n
}\n
}else{\n
_1d9=self.iter(_1d9);\n
try{\n
while(true){\n
lst.push(_1d9.next());\n
}\n
}\n
catch(e){\n
if(e!=self.StopIteration){\n
throw e;\n
}\n
}\n
}\n
return lst;\n
},groupby:function(_1dd,_1de){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
if(arguments.length<2){\n
_1de=m.operator.identity;\n
}\n
_1dd=self.iter(_1dd);\n
var pk=undefined;\n
var k=undefined;\n
var v;\n
function fetch(){\n
v=_1dd.next();\n
k=_1de(v);\n
}\n
function eat(){\n
var ret=v;\n
v=undefined;\n
return ret;\n
}\n
var _1e5=true;\n
var _1e6=m.compare;\n
return {repr:function(){\n
return "groupby(...)";\n
},next:function(){\n
while(_1e6(k,pk)===0){\n
fetch();\n
if(_1e5){\n
_1e5=false;\n
break;\n
}\n
}\n
pk=k;\n
return [k,{next:function(){\n
if(v==undefined){\n
fetch();\n
}\n
if(_1e6(k,pk)!==0){\n
throw self.StopIteration;\n
}\n
return eat();\n
}}];\n
}};\n
},groupby_as_array:function(_1e7,_1e8){\n
var m=MochiKit.Base;\n
var self=MochiKit.Iter;\n
if(arguments.length<2){\n
_1e8=m.operator.identity;\n
}\n
_1e7=self.iter(_1e7);\n
var _1eb=[];\n
var _1ec=true;\n
var _1ed;\n
var _1ee=m.compare;\n
while(true){\n
try{\n
var _1ef=_1e7.next();\n
var key=_1e8(_1ef);\n
}\n
catch(e){\n
if(e==self.StopIteration){\n
break;\n
}\n
throw e;\n
}\n
if(_1ec||_1ee(key,_1ed)!==0){\n
var _1f1=[];\n
_1eb.push([key,_1f1]);\n
}\n
_1f1.push(_1ef);\n
_1ec=false;\n
_1ed=key;\n
}\n
return _1eb;\n
},arrayLikeIter:function(_1f2){\n
var i=0;\n
return {repr:function(){\n
return "arrayLikeIter(...)";\n
},toString:MochiKit.Base.forwardCall("repr"),next:function(){\n
if(i>=_1f2.length){\n
throw MochiKit.Iter.StopIteration;\n
}\n
return _1f2[i++];\n
}};\n
},hasIterateNext:function(_1f4){\n
return (_1f4&&typeof (_1f4.iterateNext)=="function");\n
},iterateNextIter:function(_1f5){\n
return {repr:function(){\n
return "iterateNextIter(...)";\n
},toString:MochiKit.Base.forwardCall("repr"),next:function(){\n
var rval=_1f5.iterateNext();\n
if(rval===null||rval===undefined){\n
throw MochiKit.Iter.StopIteration;\n
}\n
return rval;\n
}};\n
}});\n
MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter"];\n
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"];\n
MochiKit.Iter.__new__=function(){\n
var m=MochiKit.Base;\n
if(typeof (StopIteration)!="undefined"){\n
this.StopIteration=StopIteration;\n
}else{\n
this.StopIteration=new m.NamedError("StopIteration");\n
}\n
this.iteratorRegistry=new m.AdapterRegistry();\n
this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter);\n
this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter);\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
MochiKit.Iter.__new__();\n
if(MochiKit.__export__){\n
reduce=MochiKit.Iter.reduce;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.Iter);\n
MochiKit.Base._deps("Logging",["Base"]);\n
MochiKit.Logging.NAME="MochiKit.Logging";\n
MochiKit.Logging.VERSION="1.4.2";\n
MochiKit.Logging.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Logging.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Logging.EXPORT=["LogLevel","LogMessage","Logger","alertListener","logger","log","logError","logDebug","logFatal","logWarning"];\n
MochiKit.Logging.EXPORT_OK=["logLevelAtLeast","isLogMessage","compareLogMessage"];\n
MochiKit.Logging.LogMessage=function(num,_1f9,info){\n
this.num=num;\n
this.level=_1f9;\n
this.info=info;\n
this.timestamp=new Date();\n
};\n
MochiKit.Logging.LogMessage.prototype={repr:function(){\n
var m=MochiKit.Base;\n
return "LogMessage("+m.map(m.repr,[this.num,this.level,this.info]).join(", ")+")";\n
},toString:MochiKit.Base.forwardCall("repr")};\n
MochiKit.Base.update(MochiKit.Logging,{logLevelAtLeast:function(_1fc){\n
var self=MochiKit.Logging;\n
if(typeof (_1fc)=="string"){\n
_1fc=self.LogLevel[_1fc];\n
}\n
return function(msg){\n
var _1ff=msg.level;\n
if(typeof (_1ff)=="string"){\n
_1ff=self.LogLevel[_1ff];\n
}\n
return _1ff>=_1fc;\n
};\n
},isLogMessage:function(){\n
var _200=MochiKit.Logging.LogMessage;\n
for(var i=0;i<arguments.length;i++){\n
if(!(arguments[i] instanceof _200)){\n
return false;\n
}\n
}\n
return true;\n
},compareLogMessage:function(a,b){\n
return MochiKit.Base.compare([a.level,a.info],[b.level,b.info]);\n
},alertListener:function(msg){\n
alert("num: "+msg.num+"\\nlevel: "+msg.level+"\\ninfo: "+msg.info.join(" "));\n
}});\n
MochiKit.Logging.Logger=function(_205){\n
this.counter=0;\n
if(typeof (_205)=="undefined"||_205===null){\n
_205=-1;\n
}\n
this.maxSize=_205;\n
this._messages=[];\n
this.listeners={};\n
this.useNativeConsole=false;\n
};\n
MochiKit.Logging.Logger.prototype={clear:function(){\n
this._messages.splice(0,this._messages.length);\n
},logToConsole:function(msg){\n
if(typeof (window)!="undefined"&&window.console&&window.console.log){\n
window.console.log(msg.replace(/%/g,"\\uff05"));\n
}else{\n
if(typeof (opera)!="undefined"&&opera.postError){\n
opera.postError(msg);\n
}else{\n
if(typeof (printfire)=="function"){\n
printfire(msg);\n
}else{\n
if(typeof (Debug)!="undefined"&&Debug.writeln){\n
Debug.writeln(msg);\n
}else{\n
if(typeof (debug)!="undefined"&&debug.trace){\n
debug.trace(msg);\n
}\n
}\n
}\n
}\n
}\n
},dispatchListeners:function(msg){\n
for(var k in this.listeners){\n
var pair=this.listeners[k];\n
if(pair.ident!=k||(pair[0]&&!pair[0](msg))){\n
continue;\n
}\n
pair[1](msg);\n
}\n
},addListener:function(_20a,_20b,_20c){\n
if(typeof (_20b)=="string"){\n
_20b=MochiKit.Logging.logLevelAtLeast(_20b);\n
}\n
var _20d=[_20b,_20c];\n
_20d.ident=_20a;\n
this.listeners[_20a]=_20d;\n
},removeListener:function(_20e){\n
delete this.listeners[_20e];\n
},baseLog:function(_20f,_210){\n
if(typeof (_20f)=="number"){\n
if(_20f>=MochiKit.Logging.LogLevel.FATAL){\n
_20f="FATAL";\n
}else{\n
if(_20f>=MochiKit.Logging.LogLevel.ERROR){\n
_20f="ERROR";\n
}else{\n
if(_20f>=MochiKit.Logging.LogLevel.WARNING){\n
_20f="WARNING";\n
}else{\n
if(_20f>=MochiKit.Logging.LogLevel.INFO){\n
_20f="INFO";\n
}else{\n
_20f="DEBUG";\n
}\n
}\n
}\n
}\n
}\n
var msg=new MochiKit.Logging.LogMessage(this.counter,_20f,MochiKit.Base.extend(null,arguments,1));\n
this._messages.push(msg);\n
this.dispatchListeners(msg);\n
if(this.useNativeConsole){\n
this.logToConsole(msg.level+": "+msg.info.join(" "));\n
}\n
this.counter+=1;\n
while(this.maxSize>=0&&this._messages.length>this.maxSize){\n
this._messages.shift();\n
}\n
},getMessages:function(_212){\n
var _213=0;\n
if(!(typeof (_212)=="undefined"||_212===null)){\n
_213=Math.max(0,this._messages.length-_212);\n
}\n
return this._messages.slice(_213);\n
},getMessageText:function(_214){\n
if(typeof (_214)=="undefined"||_214===null){\n
_214=30;\n
}\n
var _215=this.getMessages(_214);\n
if(_215.length){\n
var lst=map(function(m){\n
return "\\n  ["+m.num+"] "+m.level+": "+m.info.join(" ");\n
},_215);\n
lst.unshift("LAST "+_215.length+" MESSAGES:");\n
return lst.join("");\n
}\n
return "";\n
},debuggingBookmarklet:function(_218){\n
if(typeof (MochiKit.LoggingPane)=="undefined"){\n
alert(this.getMessageText());\n
}else{\n
MochiKit.LoggingPane.createLoggingPane(_218||false);\n
}\n
}};\n
MochiKit.Logging.__new__=function(){\n
this.LogLevel={ERROR:40,FATAL:50,WARNING:30,INFO:20,DEBUG:10};\n
var m=MochiKit.Base;\n
m.registerComparator("LogMessage",this.isLogMessage,this.compareLogMessage);\n
var _21a=m.partial;\n
var _21b=this.Logger;\n
var _21c=_21b.prototype.baseLog;\n
m.update(this.Logger.prototype,{debug:_21a(_21c,"DEBUG"),log:_21a(_21c,"INFO"),error:_21a(_21c,"ERROR"),fatal:_21a(_21c,"FATAL"),warning:_21a(_21c,"WARNING")});\n
var self=this;\n
var _21e=function(name){\n
return function(){\n
self.logger[name].apply(self.logger,arguments);\n
};\n
};\n
this.log=_21e("log");\n
this.logError=_21e("error");\n
this.logDebug=_21e("debug");\n
this.logFatal=_21e("fatal");\n
this.logWarning=_21e("warning");\n
this.logger=new _21b();\n
this.logger.useNativeConsole=true;\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
if(typeof (printfire)=="undefined"&&typeof (document)!="undefined"&&document.createEvent&&typeof (dispatchEvent)!="undefined"){\n
printfire=function(){\n
printfire.args=arguments;\n
var ev=document.createEvent("Events");\n
ev.initEvent("printfire",false,true);\n
dispatchEvent(ev);\n
};\n
}\n
MochiKit.Logging.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Logging);\n
MochiKit.Base._deps("DateTime",["Base"]);\n
MochiKit.DateTime.NAME="MochiKit.DateTime";\n
MochiKit.DateTime.VERSION="1.4.2";\n
MochiKit.DateTime.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.DateTime.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.DateTime.isoDate=function(str){\n
str=str+"";\n
if(typeof (str)!="string"||str.length===0){\n
return null;\n
}\n
var iso=str.split("-");\n
if(iso.length===0){\n
return null;\n
}\n
var date=new Date(iso[0],iso[1]-1,iso[2]);\n
date.setFullYear(iso[0]);\n
date.setMonth(iso[1]-1);\n
date.setDate(iso[2]);\n
return date;\n
};\n
MochiKit.DateTime._isoRegexp=/(\\d{4,})(?:-(\\d{1,2})(?:-(\\d{1,2})(?:[T ](\\d{1,2}):(\\d{1,2})(?::(\\d{1,2})(?:\\.(\\d+))?)?(?:(Z)|([+-])(\\d{1,2})(?::(\\d{1,2}))?)?)?)?)?/;\n
MochiKit.DateTime.isoTimestamp=function(str){\n
str=str+"";\n
if(typeof (str)!="string"||str.length===0){\n
return null;\n
}\n
var res=str.match(MochiKit.DateTime._isoRegexp);\n
if(typeof (res)=="undefined"||res===null){\n
return null;\n
}\n
var year,_227,day,hour,min,sec,msec;\n
year=parseInt(res[1],10);\n
if(typeof (res[2])=="undefined"||res[2]===""){\n
return new Date(year);\n
}\n
_227=parseInt(res[2],10)-1;\n
day=parseInt(res[3],10);\n
if(typeof (res[4])=="undefined"||res[4]===""){\n
return new Date(year,_227,day);\n
}\n
hour=parseInt(res[4],10);\n
min=parseInt(res[5],10);\n
sec=(typeof (res[6])!="undefined"&&res[6]!=="")?parseInt(res[6],10):0;\n
if(typeof (res[7])!="undefined"&&res[7]!==""){\n
msec=Math.round(1000*parseFloat("0."+res[7]));\n
}else{\n
msec=0;\n
}\n
if((typeof (res[8])=="undefined"||res[8]==="")&&(typeof (res[9])=="undefined"||res[9]==="")){\n
return new Date(year,_227,day,hour,min,sec,msec);\n
}\n
var ofs;\n
if(typeof (res[9])!="undefined"&&res[9]!==""){\n
ofs=parseInt(res[10],10)*3600000;\n
if(typeof (res[11])!="undefined"&&res[11]!==""){\n
ofs+=parseInt(res[11],10)*60000;\n
}\n
if(res[9]=="-"){\n
ofs=-ofs;\n
}\n
}else{\n
ofs=0;\n
}\n
return new Date(Date.UTC(year,_227,day,hour,min,sec,msec)-ofs);\n
};\n
MochiKit.DateTime.toISOTime=function(date,_22f){\n
if(typeof (date)=="undefined"||date===null){\n
return null;\n
}\n
var hh=date.getHours();\n
var mm=date.getMinutes();\n
var ss=date.getSeconds();\n
var lst=[((_22f&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)];\n
return lst.join(":");\n
};\n
MochiKit.DateTime.toISOTimestamp=function(date,_235){\n
if(typeof (date)=="undefined"||date===null){\n
return null;\n
}\n
var sep=_235?"T":" ";\n
var foot=_235?"Z":"";\n
if(_235){\n
date=new Date(date.getTime()+(date.getTimezoneOffset()*60000));\n
}\n
return MochiKit.DateTime.toISODate(date)+sep+MochiKit.DateTime.toISOTime(date,_235)+foot;\n
};\n
MochiKit.DateTime.toISODate=function(date){\n
if(typeof (date)=="undefined"||date===null){\n
return null;\n
}\n
var _239=MochiKit.DateTime._padTwo;\n
var _23a=MochiKit.DateTime._padFour;\n
return [_23a(date.getFullYear()),_239(date.getMonth()+1),_239(date.getDate())].join("-");\n
};\n
MochiKit.DateTime.americanDate=function(d){\n
d=d+"";\n
if(typeof (d)!="string"||d.length===0){\n
return null;\n
}\n
var a=d.split("/");\n
return new Date(a[2],a[0]-1,a[1]);\n
};\n
MochiKit.DateTime._padTwo=function(n){\n
return (n>9)?n:"0"+n;\n
};\n
MochiKit.DateTime._padFour=function(n){\n
switch(n.toString().length){\n
case 1:\n
return "000"+n;\n
break;\n
case 2:\n
return "00"+n;\n
break;\n
case 3:\n
return "0"+n;\n
break;\n
case 4:\n
default:\n
return n;\n
}\n
};\n
MochiKit.DateTime.toPaddedAmericanDate=function(d){\n
if(typeof (d)=="undefined"||d===null){\n
return null;\n
}\n
var _240=MochiKit.DateTime._padTwo;\n
return [_240(d.getMonth()+1),_240(d.getDate()),d.getFullYear()].join("/");\n
};\n
MochiKit.DateTime.toAmericanDate=function(d){\n
if(typeof (d)=="undefined"||d===null){\n
return null;\n
}\n
return [d.getMonth()+1,d.getDate(),d.getFullYear()].join("/");\n
};\n
MochiKit.DateTime.EXPORT=["isoDate","isoTimestamp","toISOTime","toISOTimestamp","toISODate","americanDate","toPaddedAmericanDate","toAmericanDate"];\n
MochiKit.DateTime.EXPORT_OK=[];\n
MochiKit.DateTime.EXPORT_TAGS={":common":MochiKit.DateTime.EXPORT,":all":MochiKit.DateTime.EXPORT};\n
MochiKit.DateTime.__new__=function(){\n
var base=this.NAME+".";\n
for(var k in this){\n
var o=this[k];\n
if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){\n
try{\n
o.NAME=base+k;\n
}\n
catch(e){\n
}\n
}\n
}\n
};\n
MochiKit.DateTime.__new__();\n
if(typeof (MochiKit.Base)!="undefined"){\n
MochiKit.Base._exportSymbols(this,MochiKit.DateTime);\n
}else{\n
(function(_245,_246){\n
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(MochiKit.__export__===false)){\n
var all=_246.EXPORT_TAGS[":all"];\n
for(var i=0;i<all.length;i++){\n
_245[all[i]]=_246[all[i]];\n
}\n
}\n
})(this,MochiKit.DateTime);\n
}\n
MochiKit.Base._deps("Format",["Base"]);\n
MochiKit.Format.NAME="MochiKit.Format";\n
MochiKit.Format.VERSION="1.4.2";\n
MochiKit.Format.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Format.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Format._numberFormatter=function(_249,_24a,_24b,_24c,_24d,_24e,_24f,_250,_251){\n
return function(num){\n
num=parseFloat(num);\n
if(typeof (num)=="undefined"||num===null||isNaN(num)){\n
return _249;\n
}\n
var _253=_24a;\n
var _254=_24b;\n
if(num<0){\n
num=-num;\n
}else{\n
_253=_253.replace(/-/,"");\n
}\n
var me=arguments.callee;\n
var fmt=MochiKit.Format.formatLocale(_24c);\n
if(_24d){\n
num=num*100;\n
_254=fmt.percent+_254;\n
}\n
num=MochiKit.Format.roundToFixed(num,_24e);\n
var _257=num.split(/\\./);\n
var _258=_257[0];\n
var frac=(_257.length==1)?"":_257[1];\n
var res="";\n
while(_258.length<_24f){\n
_258="0"+_258;\n
}\n
if(_250){\n
while(_258.length>_250){\n
var i=_258.length-_250;\n
res=fmt.separator+_258.substring(i,_258.length)+res;\n
_258=_258.substring(0,i);\n
}\n
}\n
res=_258+res;\n
if(_24e>0){\n
while(frac.length<_251){\n
frac=frac+"0";\n
}\n
res=res+fmt.decimal+frac;\n
}\n
return _253+res+_254;\n
};\n
};\n
MochiKit.Format.numberFormatter=function(_25c,_25d,_25e){\n
if(typeof (_25d)=="undefined"){\n
_25d="";\n
}\n
var _25f=_25c.match(/((?:[0#]+,)?[0#]+)(?:\\.([0#]+))?(%)?/);\n
if(!_25f){\n
throw TypeError("Invalid pattern");\n
}\n
var _260=_25c.substr(0,_25f.index);\n
var _261=_25c.substr(_25f.index+_25f[0].length);\n
if(_260.search(/-/)==-1){\n
_260=_260+"-";\n
}\n
var _262=_25f[1];\n
var frac=(typeof (_25f[2])=="string"&&_25f[2]!="")?_25f[2]:"";\n
var _264=(typeof (_25f[3])=="string"&&_25f[3]!="");\n
var tmp=_262.split(/,/);\n
var _266;\n
if(typeof (_25e)=="undefined"){\n
_25e="default";\n
}\n
if(tmp.length==1){\n
_266=null;\n
}else{\n
_266=tmp[1].length;\n
}\n
var _267=_262.length-_262.replace(/0/g,"").length;\n
var _268=frac.length-frac.replace(/0/g,"").length;\n
var _269=frac.length;\n
var rval=MochiKit.Format._numberFormatter(_25d,_260,_261,_25e,_264,_269,_267,_266,_268);\n
var m=MochiKit.Base;\n
if(m){\n
var fn=arguments.callee;\n
var args=m.concat(arguments);\n
rval.repr=function(){\n
return [self.NAME,"(",map(m.repr,args).join(", "),")"].join("");\n
};\n
}\n
return rval;\n
};\n
MochiKit.Format.formatLocale=function(_26e){\n
if(typeof (_26e)=="undefined"||_26e===null){\n
_26e="default";\n
}\n
if(typeof (_26e)=="string"){\n
var rval=MochiKit.Format.LOCALE[_26e];\n
if(typeof (rval)=="string"){\n
rval=arguments.callee(rval);\n
MochiKit.Format.LOCALE[_26e]=rval;\n
}\n
return rval;\n
}else{\n
return _26e;\n
}\n
};\n
MochiKit.Format.twoDigitAverage=function(_270,_271){\n
if(_271){\n
var res=_270/_271;\n
if(!isNaN(res)){\n
return MochiKit.Format.twoDigitFloat(res);\n
}\n
}\n
return "0";\n
};\n
MochiKit.Format.twoDigitFloat=function(_273){\n
var res=roundToFixed(_273,2);\n
if(res.indexOf(".00")>0){\n
return res.substring(0,res.length-3);\n
}else{\n
if(res.charAt(res.length-1)=="0"){\n
return res.substring(0,res.length-1);\n
}else{\n
return res;\n
}\n
}\n
};\n
MochiKit.Format.lstrip=function(str,_276){\n
str=str+"";\n
if(typeof (str)!="string"){\n
return null;\n
}\n
if(!_276){\n
return str.replace(/^\\s+/,"");\n
}else{\n
return str.replace(new RegExp("^["+_276+"]+"),"");\n
}\n
};\n
MochiKit.Format.rstrip=function(str,_278){\n
str=str+"";\n
if(typeof (str)!="string"){\n
return null;\n
}\n
if(!_278){\n
return str.replace(/\\s+$/,"");\n
}else{\n
return str.replace(new RegExp("["+_278+"]+$"),"");\n
}\n
};\n
MochiKit.Format.strip=function(str,_27a){\n
var self=MochiKit.Format;\n
return self.rstrip(self.lstrip(str,_27a),_27a);\n
};\n
MochiKit.Format.truncToFixed=function(_27c,_27d){\n
var res=Math.floor(_27c).toFixed(0);\n
if(_27c<0){\n
res=Math.ceil(_27c).toFixed(0);\n
if(res.charAt(0)!="-"&&_27d>0){\n
res="-"+res;\n
}\n
}\n
if(res.indexOf("e")<0&&_27d>0){\n
var tail=_27c.toString();\n
if(tail.indexOf("e")>0){\n
tail=".";\n
}else{\n
if(tail.indexOf(".")<0){\n
tail=".";\n
}else{\n
tail=tail.substring(tail.indexOf("."));\n
}\n
}\n
if(tail.length-1>_27d){\n
tail=tail.substring(0,_27d+1);\n
}\n
while(tail.length-1<_27d){\n
tail+="0";\n
}\n
res+=tail;\n
}\n
return res;\n
};\n
MochiKit.Format.roundToFixed=function(_280,_281){\n
var _282=Math.abs(_280)+0.5*Math.pow(10,-_281);\n
var res=MochiKit.Format.truncToFixed(_282,_281);\n
if(_280<0){\n
res="-"+res;\n
}\n
return res;\n
};\n
MochiKit.Format.percentFormat=function(_284){\n
return MochiKit.Format.twoDigitFloat(100*_284)+"%";\n
};\n
MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"];\n
MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},pt_BR:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"};\n
MochiKit.Format.EXPORT_OK=[];\n
MochiKit.Format.EXPORT_TAGS={":all":MochiKit.Format.EXPORT,":common":MochiKit.Format.EXPORT};\n
MochiKit.Format.__new__=function(){\n
var base=this.NAME+".";\n
var k,v,o;\n
for(k in this.LOCALE){\n
o=this.LOCALE[k];\n
if(typeof (o)=="object"){\n
o.repr=function(){\n
return this.NAME;\n
};\n
o.NAME=base+"LOCALE."+k;\n
}\n
}\n
for(k in this){\n
o=this[k];\n
if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){\n
try{\n
o.NAME=base+k;\n
}\n
catch(e){\n
}\n
}\n
}\n
};\n
MochiKit.Format.__new__();\n
if(typeof (MochiKit.Base)!="undefined"){\n
MochiKit.Base._exportSymbols(this,MochiKit.Format);\n
}else{\n
(function(_289,_28a){\n
if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(MochiKit.__export__===false)){\n
var all=_28a.EXPORT_TAGS[":all"];\n
for(var i=0;i<all.length;i++){\n
_289[all[i]]=_28a[all[i]];\n
}\n
}\n
})(this,MochiKit.Format);\n
}\n
MochiKit.Base._deps("Async",["Base"]);\n
MochiKit.Async.NAME="MochiKit.Async";\n
MochiKit.Async.VERSION="1.4.2";\n
MochiKit.Async.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Async.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Async.Deferred=function(_28d){\n
this.chain=[];\n
this.id=this._nextId();\n
this.fired=-1;\n
this.paused=0;\n
this.results=[null,null];\n
this.canceller=_28d;\n
this.silentlyCancelled=false;\n
this.chained=false;\n
};\n
MochiKit.Async.Deferred.prototype={repr:function(){\n
var _28e;\n
if(this.fired==-1){\n
_28e="unfired";\n
}else{\n
if(this.fired===0){\n
_28e="success";\n
}else{\n
_28e="error";\n
}\n
}\n
return "Deferred("+this.id+", "+_28e+")";\n
},toString:MochiKit.Base.forwardCall("repr"),_nextId:MochiKit.Base.counter(),cancel:function(){\n
var self=MochiKit.Async;\n
if(this.fired==-1){\n
if(this.canceller){\n
this.canceller(this);\n
}else{\n
this.silentlyCancelled=true;\n
}\n
if(this.fired==-1){\n
this.errback(new self.CancelledError(this));\n
}\n
}else{\n
if((this.fired===0)&&(this.results[0] instanceof self.Deferred)){\n
this.results[0].cancel();\n
}\n
}\n
},_resback:function(res){\n
this.fired=((res instanceof Error)?1:0);\n
this.results[this.fired]=res;\n
this._fire();\n
},_check:function(){\n
if(this.fired!=-1){\n
if(!this.silentlyCancelled){\n
throw new MochiKit.Async.AlreadyCalledError(this);\n
}\n
this.silentlyCancelled=false;\n
return;\n
}\n
},callback:function(res){\n
this._check();\n
if(res instanceof MochiKit.Async.Deferred){\n
throw new Error("Deferred instances can only be chained if they are the result of a callback");\n
}\n
this._resback(res);\n
},errback:function(res){\n
this._check();\n
var self=MochiKit.Async;\n
if(res instanceof self.Deferred){\n
throw new Error("Deferred instances can only be chained if they are the result of a callback");\n
}\n
if(!(res instanceof Error)){\n
res=new self.GenericError(res);\n
}\n
this._resback(res);\n
},addBoth:function(fn){\n
if(arguments.length>1){\n
fn=MochiKit.Base.partial.apply(null,arguments);\n
}\n
return this.addCallbacks(fn,fn);\n
},addCallback:function(fn){\n
if(arguments.length>1){\n
fn=MochiKit.Base.partial.apply(null,arguments);\n
}\n
return this.addCallbacks(fn,null);\n
},addErrback:function(fn){\n
if(arguments.length>1){\n
fn=MochiKit.Base.partial.apply(null,arguments);\n
}\n
return this.addCallbacks(null,fn);\n
},addCallbacks:function(cb,eb){\n
if(this.chained){\n
throw new Error("Chained Deferreds can not be re-used");\n
}\n
this.chain.push([cb,eb]);\n
if(this.fired>=0){\n
this._fire();\n
}\n
return this;\n
},_fire:function(){\n
var _299=this.chain;\n
var _29a=this.fired;\n
var res=this.results[_29a];\n
var self=this;\n
var cb=null;\n
while(_299.length>0&&this.paused===0){\n
var pair=_299.shift();\n
var f=pair[_29a];\n
if(f===null){\n
continue;\n
}\n
try{\n
res=f(res);\n
_29a=((res instanceof Error)?1:0);\n
if(res instanceof MochiKit.Async.Deferred){\n
cb=function(res){\n
self._resback(res);\n
self.paused--;\n
if((self.paused===0)&&(self.fired>=0)){\n
self._fire();\n
}\n
};\n
this.paused++;\n
}\n
}\n
catch(err){\n
_29a=1;\n
if(!(err instanceof Error)){\n
err=new MochiKit.Async.GenericError(err);\n
}\n
res=err;\n
}\n
}\n
this.fired=_29a;\n
this.results[_29a]=res;\n
if(cb&&this.paused){\n
res.addBoth(cb);\n
res.chained=true;\n
}\n
}};\n
MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(req){\n
return MochiKit.Base.evalJSON(req.responseText);\n
},succeed:function(_2a2){\n
var d=new MochiKit.Async.Deferred();\n
d.callback.apply(d,arguments);\n
return d;\n
},fail:function(_2a4){\n
var d=new MochiKit.Async.Deferred();\n
d.errback.apply(d,arguments);\n
return d;\n
},getXMLHttpRequest:function(){\n
var self=arguments.callee;\n
if(!self.XMLHttpRequest){\n
var _2a7=[function(){\n
return new XMLHttpRequest();\n
},function(){\n
return new ActiveXObject("Msxml2.XMLHTTP");\n
},function(){\n
return new ActiveXObject("Microsoft.XMLHTTP");\n
},function(){\n
return new ActiveXObject("Msxml2.XMLHTTP.4.0");\n
},function(){\n
throw new MochiKit.Async.BrowserComplianceError("Browser does not support XMLHttpRequest");\n
}];\n
for(var i=0;i<_2a7.length;i++){\n
var func=_2a7[i];\n
try{\n
self.XMLHttpRequest=func;\n
return func();\n
}\n
catch(e){\n
}\n
}\n
}\n
return self.XMLHttpRequest();\n
},_xhr_onreadystatechange:function(d){\n
var m=MochiKit.Base;\n
if(this.readyState==4){\n
try{\n
this.onreadystatechange=null;\n
}\n
catch(e){\n
try{\n
this.onreadystatechange=m.noop;\n
}\n
catch(e){\n
}\n
}\n
var _2ac=null;\n
try{\n
_2ac=this.status;\n
if(!_2ac&&m.isNotEmpty(this.responseText)){\n
_2ac=304;\n
}\n
}\n
catch(e){\n
}\n
if(_2ac==200||_2ac==201||_2ac==204||_2ac==304||_2ac==1223){\n
d.callback(this);\n
}else{\n
var err=new MochiKit.Async.XMLHttpRequestError(this,"Request failed");\n
if(err.number){\n
d.errback(err);\n
}else{\n
d.errback(err);\n
}\n
}\n
}\n
},_xhr_canceller:function(req){\n
try{\n
req.onreadystatechange=null;\n
}\n
catch(e){\n
try{\n
req.onreadystatechange=MochiKit.Base.noop;\n
}\n
catch(e){\n
}\n
}\n
req.abort();\n
},sendXMLHttpRequest:function(req,_2b0){\n
if(typeof (_2b0)=="undefined"||_2b0===null){\n
_2b0="";\n
}\n
var m=MochiKit.Base;\n
var self=MochiKit.Async;\n
var d=new self.Deferred(m.partial(self._xhr_canceller,req));\n
try{\n
req.onreadystatechange=m.bind(self._xhr_onreadystatechange,req,d);\n
req.send(_2b0);\n
}\n
catch(e){\n
try{\n
req.onreadystatechange=null;\n
}\n
catch(ignore){\n
}\n
d.errback(e);\n
}\n
return d;\n
},doXHR:function(url,opts){\n
var self=MochiKit.Async;\n
return self.callLater(0,self._doXHR,url,opts);\n
},_doXHR:function(url,opts){\n
var m=MochiKit.Base;\n
opts=m.update({method:"GET",sendContent:""},opts);\n
var self=MochiKit.Async;\n
var req=self.getXMLHttpRequest();\n
if(opts.queryString){\n
var qs=m.queryString(opts.queryString);\n
if(qs){\n
url+="?"+qs;\n
}\n
}\n
if("username" in opts){\n
req.open(opts.method,url,true,opts.username,opts.password);\n
}else{\n
req.open(opts.method,url,true);\n
}\n
if(req.overrideMimeType&&opts.mimeType){\n
req.overrideMimeType(opts.mimeType);\n
}\n
req.setRequestHeader("X-Requested-With","XMLHttpRequest");\n
if(opts.headers){\n
var _2bd=opts.headers;\n
if(!m.isArrayLike(_2bd)){\n
_2bd=m.items(_2bd);\n
}\n
for(var i=0;i<_2bd.length;i++){\n
var _2bf=_2bd[i];\n
var name=_2bf[0];\n
var _2c1=_2bf[1];\n
req.setRequestHeader(name,_2c1);\n
}\n
}\n
return self.sendXMLHttpRequest(req,opts.sendContent);\n
},_buildURL:function(url){\n
if(arguments.length>1){\n
var m=MochiKit.Base;\n
var qs=m.queryString.apply(null,m.extend(null,arguments,1));\n
if(qs){\n
return url+"?"+qs;\n
}\n
}\n
return url;\n
},doSimpleXMLHttpRequest:function(url){\n
var self=MochiKit.Async;\n
url=self._buildURL.apply(self,arguments);\n
return self.doXHR(url);\n
},loadJSONDoc:function(url){\n
var self=MochiKit.Async;\n
url=self._buildURL.apply(self,arguments);\n
var d=self.doXHR(url,{"mimeType":"text/plain","headers":[["Accept","application/json"]]});\n
d=d.addCallback(self.evalJSONRequest);\n
return d;\n
},wait:function(_2ca,_2cb){\n
var d=new MochiKit.Async.Deferred();\n
var m=MochiKit.Base;\n
if(typeof (_2cb)!="undefined"){\n
d.addCallback(function(){\n
return _2cb;\n
});\n
}\n
var _2ce=setTimeout(m.bind("callback",d),Math.floor(_2ca*1000));\n
d.canceller=function(){\n
try{\n
clearTimeout(_2ce);\n
}\n
catch(e){\n
}\n
};\n
return d;\n
},callLater:function(_2cf,func){\n
var m=MochiKit.Base;\n
var _2d2=m.partial.apply(m,m.extend(null,arguments,1));\n
return MochiKit.Async.wait(_2cf).addCallback(function(res){\n
return _2d2();\n
});\n
}});\n
MochiKit.Async.DeferredLock=function(){\n
this.waiting=[];\n
this.locked=false;\n
this.id=this._nextId();\n
};\n
MochiKit.Async.DeferredLock.prototype={__class__:MochiKit.Async.DeferredLock,acquire:function(){\n
var d=new MochiKit.Async.Deferred();\n
if(this.locked){\n
this.waiting.push(d);\n
}else{\n
this.locked=true;\n
d.callback(this);\n
}\n
return d;\n
},release:function(){\n
if(!this.locked){\n
throw TypeError("Tried to release an unlocked DeferredLock");\n
}\n
this.locked=false;\n
if(this.waiting.length>0){\n
this.locked=true;\n
this.waiting.shift().callback(this);\n
}\n
},_nextId:MochiKit.Base.counter(),repr:function(){\n
var _2d5;\n
if(this.locked){\n
_2d5="locked, "+this.waiting.length+" waiting";\n
}else{\n
_2d5="unlocked";\n
}\n
return "DeferredLock("+this.id+", "+_2d5+")";\n
},toString:MochiKit.Base.forwardCall("repr")};\n
MochiKit.Async.DeferredList=function(list,_2d7,_2d8,_2d9,_2da){\n
MochiKit.Async.Deferred.apply(this,[_2da]);\n
this.list=list;\n
var _2db=[];\n
this.resultList=_2db;\n
this.finishedCount=0;\n
this.fireOnOneCallback=_2d7;\n
this.fireOnOneErrback=_2d8;\n
this.consumeErrors=_2d9;\n
var cb=MochiKit.Base.bind(this._cbDeferred,this);\n
for(var i=0;i<list.length;i++){\n
var d=list[i];\n
_2db.push(undefined);\n
d.addCallback(cb,i,true);\n
d.addErrback(cb,i,false);\n
}\n
if(list.length===0&&!_2d7){\n
this.callback(this.resultList);\n
}\n
};\n
MochiKit.Async.DeferredList.prototype=new MochiKit.Async.Deferred();\n
MochiKit.Async.DeferredList.prototype._cbDeferred=function(_2df,_2e0,_2e1){\n
this.resultList[_2df]=[_2e0,_2e1];\n
this.finishedCount+=1;\n
if(this.fired==-1){\n
if(_2e0&&this.fireOnOneCallback){\n
this.callback([_2df,_2e1]);\n
}else{\n
if(!_2e0&&this.fireOnOneErrback){\n
this.errback(_2e1);\n
}else{\n
if(this.finishedCount==this.list.length){\n
this.callback(this.resultList);\n
}\n
}\n
}\n
}\n
if(!_2e0&&this.consumeErrors){\n
_2e1=null;\n
}\n
return _2e1;\n
};\n
MochiKit.Async.gatherResults=function(_2e2){\n
var d=new MochiKit.Async.DeferredList(_2e2,false,true,false);\n
d.addCallback(function(_2e4){\n
var ret=[];\n
for(var i=0;i<_2e4.length;i++){\n
ret.push(_2e4[i][1]);\n
}\n
return ret;\n
});\n
return d;\n
};\n
MochiKit.Async.maybeDeferred=function(func){\n
var self=MochiKit.Async;\n
var _2e9;\n
try{\n
var r=func.apply(null,MochiKit.Base.extend([],arguments,1));\n
if(r instanceof self.Deferred){\n
_2e9=r;\n
}else{\n
if(r instanceof Error){\n
_2e9=self.fail(r);\n
}else{\n
_2e9=self.succeed(r);\n
}\n
}\n
}\n
catch(e){\n
_2e9=self.fail(e);\n
}\n
return _2e9;\n
};\n
MochiKit.Async.EXPORT=["AlreadyCalledError","CancelledError","BrowserComplianceError","GenericError","XMLHttpRequestError","Deferred","succeed","fail","getXMLHttpRequest","doSimpleXMLHttpRequest","loadJSONDoc","wait","callLater","sendXMLHttpRequest","DeferredLock","DeferredList","gatherResults","maybeDeferred","doXHR"];\n
MochiKit.Async.EXPORT_OK=["evalJSONRequest"];\n
MochiKit.Async.__new__=function(){\n
var m=MochiKit.Base;\n
var ne=m.partial(m._newNamedError,this);\n
ne("AlreadyCalledError",function(_2ed){\n
this.deferred=_2ed;\n
});\n
ne("CancelledError",function(_2ee){\n
this.deferred=_2ee;\n
});\n
ne("BrowserComplianceError",function(msg){\n
this.message=msg;\n
});\n
ne("GenericError",function(msg){\n
this.message=msg;\n
});\n
ne("XMLHttpRequestError",function(req,msg){\n
this.req=req;\n
this.message=msg;\n
try{\n
this.number=req.status;\n
}\n
catch(e){\n
}\n
});\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
MochiKit.Async.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Async);\n
MochiKit.Base._deps("DOM",["Base"]);\n
MochiKit.DOM.NAME="MochiKit.DOM";\n
MochiKit.DOM.VERSION="1.4.2";\n
MochiKit.DOM.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.DOM.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.DOM.EXPORT=["removeEmptyTextNodes","formContents","currentWindow","currentDocument","withWindow","withDocument","registerDOMConverter","coerceToDOM","createDOM","createDOMFunc","isChildNode","getNodeAttribute","removeNodeAttribute","setNodeAttribute","updateNodeAttributes","appendChildNodes","insertSiblingNodesAfter","insertSiblingNodesBefore","replaceChildNodes","removeElement","swapDOM","BUTTON","TT","PRE","H1","H2","H3","H4","H5","H6","BR","CANVAS","HR","LABEL","TEXTAREA","FORM","STRONG","SELECT","OPTION","OPTGROUP","LEGEND","FIELDSET","P","UL","OL","LI","DL","DT","DD","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","getElement","$","getElementsByTagAndClassName","addToCallStack","addLoadEvent","focusOnLoad","setElementClass","toggleElementClass","addElementClass","removeElementClass","swapElementClass","hasElementClass","computedStyle","escapeHTML","toHTML","emitHTML","scrapeText","getFirstParentByTagAndClassName","getFirstElementByTagAndClassName"];\n
MochiKit.DOM.EXPORT_OK=["domConverters"];\n
MochiKit.DOM.DEPRECATED=[["computedStyle","MochiKit.Style.getStyle","1.4"],["elementDimensions","MochiKit.Style.getElementDimensions","1.4"],["elementPosition","MochiKit.Style.getElementPosition","1.4"],["getViewportDimensions","MochiKit.Style.getViewportDimensions","1.4"],["hideElement","MochiKit.Style.hideElement","1.4"],["makeClipping","MochiKit.Style.makeClipping","1.4.1"],["makePositioned","MochiKit.Style.makePositioned","1.4.1"],["setElementDimensions","MochiKit.Style.setElementDimensions","1.4"],["setElementPosition","MochiKit.Style.setElementPosition","1.4"],["setDisplayForElement","MochiKit.Style.setDisplayForElement","1.4"],["setOpacity","MochiKit.Style.setOpacity","1.4"],["showElement","MochiKit.Style.showElement","1.4"],["undoClipping","MochiKit.Style.undoClipping","1.4.1"],["undoPositioned","MochiKit.Style.undoPositioned","1.4.1"],["Coordinates","MochiKit.Style.Coordinates","1.4"],["Dimensions","MochiKit.Style.Dimensions","1.4"]];\n
MochiKit.Base.update(MochiKit.DOM,{currentWindow:function(){\n
return MochiKit.DOM._window;\n
},currentDocument:function(){\n
return MochiKit.DOM._document;\n
},withWindow:function(win,func){\n
var self=MochiKit.DOM;\n
var _2f6=self._document;\n
var _2f7=self._window;\n
var rval;\n
try{\n
self._window=win;\n
self._document=win.document;\n
rval=func();\n
}\n
catch(e){\n
self._window=_2f7;\n
self._document=_2f6;\n
throw e;\n
}\n
self._window=_2f7;\n
self._document=_2f6;\n
return rval;\n
},formContents:function(elem){\n
var _2fa=[];\n
var _2fb=[];\n
var m=MochiKit.Base;\n
var self=MochiKit.DOM;\n
if(typeof (elem)=="undefined"||elem===null){\n
elem=self._document.body;\n
}else{\n
elem=self.getElement(elem);\n
}\n
m.nodeWalk(elem,function(elem){\n
var name=elem.name;\n
if(m.isNotEmpty(name)){\n
var _300=elem.tagName.toUpperCase();\n
if(_300==="INPUT"&&(elem.type=="radio"||elem.type=="checkbox")&&!elem.checked){\n
return null;\n
}\n
if(_300==="SELECT"){\n
if(elem.type=="select-one"){\n
if(elem.selectedIndex>=0){\n
var opt=elem.options[elem.selectedIndex];\n
var v=opt.value;\n
if(!v){\n
var h=opt.outerHTML;\n
if(h&&!h.match(/^[^>]+\\svalue\\s*=/i)){\n
v=opt.text;\n
}\n
}\n
_2fa.push(name);\n
_2fb.push(v);\n
return null;\n
}\n
_2fa.push(name);\n
_2fb.push("");\n
return null;\n
}else{\n
var opts=elem.options;\n
if(!opts.length){\n
_2fa.push(name);\n
_2fb.push("");\n
return null;\n
}\n
for(var i=0;i<opts.length;i++){\n
var opt=opts[i];\n
if(!opt.selected){\n
continue;\n
}\n
var v=opt.value;\n
if(!v){\n
var h=opt.outerHTML;\n
if(h&&!h.match(/^[^>]+\\svalue\\s*=/i)){\n
v=opt.text;\n
}\n
}\n
_2fa.push(name);\n
_2fb.push(v);\n
}\n
return null;\n
}\n
}\n
if(_300==="FORM"||_300==="P"||_300==="SPAN"||_300==="DIV"){\n
return elem.childNodes;\n
}\n
_2fa.push(name);\n
_2fb.push(elem.value||"");\n
return null;\n
}\n
return elem.childNodes;\n
});\n
return [_2fa,_2fb];\n
},withDocument:function(doc,func){\n
var self=MochiKit.DOM;\n
var _309=self._document;\n
var rval;\n
try{\n
self._document=doc;\n
rval=func();\n
}\n
catch(e){\n
self._document=_309;\n
throw e;\n
}\n
self._document=_309;\n
return rval;\n
},registerDOMConverter:function(name,_30c,wrap,_30e){\n
MochiKit.DOM.domConverters.register(name,_30c,wrap,_30e);\n
},coerceToDOM:function(node,ctx){\n
var m=MochiKit.Base;\n
var im=MochiKit.Iter;\n
var self=MochiKit.DOM;\n
if(im){\n
var iter=im.iter;\n
var _315=im.repeat;\n
}\n
var map=m.map;\n
var _317=self.domConverters;\n
var _318=arguments.callee;\n
var _319=m.NotFound;\n
while(true){\n
if(typeof (node)=="undefined"||node===null){\n
return null;\n
}\n
if(typeof (node)=="function"&&typeof (node.length)=="number"&&!(node instanceof Function)){\n
node=im?im.list(node):m.extend(null,node);\n
}\n
if(typeof (node.nodeType)!="undefined"&&node.nodeType>0){\n
return node;\n
}\n
if(typeof (node)=="number"||typeof (node)=="boolean"){\n
node=node.toString();\n
}\n
if(typeof (node)=="string"){\n
return self._document.createTextNode(node);\n
}\n
if(typeof (node.__dom__)=="function"){\n
node=node.__dom__(ctx);\n
continue;\n
}\n
if(typeof (node.dom)=="function"){\n
node=node.dom(ctx);\n
continue;\n
}\n
if(typeof (node)=="function"){\n
node=node.apply(ctx,[ctx]);\n
continue;\n
}\n
if(im){\n
var _31a=null;\n
try{\n
_31a=iter(node);\n
}\n
catch(e){\n
}\n
if(_31a){\n
return map(_318,_31a,_315(ctx));\n
}\n
}else{\n
if(m.isArrayLike(node)){\n
var func=function(n){\n
return _318(n,ctx);\n
};\n
return map(func,node);\n
}\n
}\n
try{\n
node=_317.match(node,ctx);\n
continue;\n
}\n
catch(e){\n
if(e!=_319){\n
throw e;\n
}\n
}\n
return self._document.createTextNode(node.toString());\n
}\n
return undefined;\n
},isChildNode:function(node,_31e){\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
node=self.getElement(node);\n
}\n
if(typeof (_31e)=="string"){\n
_31e=self.getElement(_31e);\n
}\n
if(typeof (node)=="undefined"||node===null){\n
return false;\n
}\n
while(node!=null&&node!==self._document){\n
if(node===_31e){\n
return true;\n
}\n
node=node.parentNode;\n
}\n
return false;\n
},setNodeAttribute:function(node,attr,_322){\n
var o={};\n
o[attr]=_322;\n
try{\n
return MochiKit.DOM.updateNodeAttributes(node,o);\n
}\n
catch(e){\n
}\n
return null;\n
},getNodeAttribute:function(node,attr){\n
var self=MochiKit.DOM;\n
var _327=self.attributeArray.renames[attr];\n
var _328=self.attributeArray.ignoreAttr[attr];\n
node=self.getElement(node);\n
try{\n
if(_327){\n
return node[_327];\n
}\n
var _329=node.getAttribute(attr);\n
if(_329!=_328){\n
return _329;\n
}\n
}\n
catch(e){\n
}\n
return null;\n
},removeNodeAttribute:function(node,attr){\n
var self=MochiKit.DOM;\n
var _32d=self.attributeArray.renames[attr];\n
node=self.getElement(node);\n
try{\n
if(_32d){\n
return node[_32d];\n
}\n
return node.removeAttribute(attr);\n
}\n
catch(e){\n
}\n
return null;\n
},updateNodeAttributes:function(node,_32f){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
}\n
if(_32f){\n
var _332=MochiKit.Base.updatetree;\n
if(self.attributeArray.compliant){\n
for(var k in _32f){\n
var v=_32f[k];\n
if(typeof (v)=="object"&&typeof (elem[k])=="object"){\n
if(k=="style"&&MochiKit.Style){\n
MochiKit.Style.setStyle(elem,v);\n
}else{\n
_332(elem[k],v);\n
}\n
}else{\n
if(k.substring(0,2)=="on"){\n
if(typeof (v)=="string"){\n
v=new Function(v);\n
}\n
elem[k]=v;\n
}else{\n
elem.setAttribute(k,v);\n
}\n
}\n
if(typeof (elem[k])=="string"&&elem[k]!=v){\n
elem[k]=v;\n
}\n
}\n
}else{\n
var _335=self.attributeArray.renames;\n
for(var k in _32f){\n
v=_32f[k];\n
var _336=_335[k];\n
if(k=="style"&&typeof (v)=="string"){\n
elem.style.cssText=v;\n
}else{\n
if(typeof (_336)=="string"){\n
elem[_336]=v;\n
}else{\n
if(typeof (elem[k])=="object"&&typeof (v)=="object"){\n
if(k=="style"&&MochiKit.Style){\n
MochiKit.Style.setStyle(elem,v);\n
}else{\n
_332(elem[k],v);\n
}\n
}else{\n
if(k.substring(0,2)=="on"){\n
if(typeof (v)=="string"){\n
v=new Function(v);\n
}\n
elem[k]=v;\n
}else{\n
elem.setAttribute(k,v);\n
}\n
}\n
}\n
}\n
if(typeof (elem[k])=="string"&&elem[k]!=v){\n
elem[k]=v;\n
}\n
}\n
}\n
}\n
return elem;\n
},appendChildNodes:function(node){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
}\n
var _33a=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];\n
var _33b=MochiKit.Base.concat;\n
while(_33a.length){\n
var n=_33a.shift();\n
if(typeof (n)=="undefined"||n===null){\n
}else{\n
if(typeof (n.nodeType)=="number"){\n
elem.appendChild(n);\n
}else{\n
_33a=_33b(n,_33a);\n
}\n
}\n
}\n
return elem;\n
},insertSiblingNodesBefore:function(node){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
}\n
var _340=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];\n
var _341=elem.parentNode;\n
var _342=MochiKit.Base.concat;\n
while(_340.length){\n
var n=_340.shift();\n
if(typeof (n)=="undefined"||n===null){\n
}else{\n
if(typeof (n.nodeType)=="number"){\n
_341.insertBefore(n,elem);\n
}else{\n
_340=_342(n,_340);\n
}\n
}\n
}\n
return _341;\n
},insertSiblingNodesAfter:function(node){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
}\n
var _347=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];\n
if(elem.nextSibling){\n
return self.insertSiblingNodesBefore(elem.nextSibling,_347);\n
}else{\n
return self.appendChildNodes(elem.parentNode,_347);\n
}\n
},replaceChildNodes:function(node){\n
var elem=node;\n
var self=MochiKit.DOM;\n
if(typeof (node)=="string"){\n
elem=self.getElement(node);\n
arguments[0]=elem;\n
}\n
var _34b;\n
while((_34b=elem.firstChild)){\n
elem.removeChild(_34b);\n
}\n
if(arguments.length<2){\n
return elem;\n
}else{\n
return self.appendChildNodes.apply(this,arguments);\n
}\n
},createDOM:function(name,_34d){\n
var elem;\n
var self=MochiKit.DOM;\n
var m=MochiKit.Base;\n
if(typeof (_34d)=="string"||typeof (_34d)=="number"){\n
var args=m.extend([name,null],arguments,1);\n
return arguments.callee.apply(this,args);\n
}\n
if(typeof (name)=="string"){\n
var _352=self._xhtml;\n
if(_34d&&!self.attributeArray.compliant){\n
var _353="";\n
if("name" in _34d){\n
_353+=" name=\\""+self.escapeHTML(_34d.name)+"\\"";\n
}\n
if(name=="input"&&"type" in _34d){\n
_353+=" type=\\""+self.escapeHTML(_34d.type)+"\\"";\n
}\n
if(_353){\n
name="<"+name+_353+">";\n
_352=false;\n
}\n
}\n
var d=self._document;\n
if(_352&&d===document){\n
elem=d.createElementNS("http://www.w3.org/1999/xhtml",name);\n
}else{\n
elem=d.createElement(name);\n
}\n
}else{\n
elem=name;\n
}\n
if(_34d){\n
self.updateNodeAttributes(elem,_34d);\n
}\n
if(arguments.length<=2){\n
return elem;\n
}else{\n
var args=m.extend([elem],arguments,2);\n
return self.appendChildNodes.apply(this,args);\n
}\n
},createDOMFunc:function(){\n
var m=MochiKit.Base;\n
return m.partial.apply(this,m.extend([MochiKit.DOM.createDOM],arguments));\n
},removeElement:function(elem){\n
var self=MochiKit.DOM;\n
var e=self.coerceToDOM(self.getElement(elem));\n
e.parentNode.removeChild(e);\n
return e;\n
},swapDOM:function(dest,src){\n
var self=MochiKit.DOM;\n
dest=self.getElement(dest);\n
var _35c=dest.parentNode;\n
if(src){\n
src=self.coerceToDOM(self.getElement(src),_35c);\n
_35c.replaceChild(src,dest);\n
}else{\n
_35c.removeChild(dest);\n
}\n
return src;\n
},getElement:function(id){\n
var self=MochiKit.DOM;\n
if(arguments.length==1){\n
return ((typeof (id)=="string")?self._document.getElementById(id):id);\n
}else{\n
return MochiKit.Base.map(self.getElement,arguments);\n
}\n
},getElementsByTagAndClassName:function(_35f,_360,_361){\n
var self=MochiKit.DOM;\n
if(typeof (_35f)=="undefined"||_35f===null){\n
_35f="*";\n
}\n
if(typeof (_361)=="undefined"||_361===null){\n
_361=self._document;\n
}\n
_361=self.getElement(_361);\n
if(_361==null){\n
return [];\n
}\n
var _363=(_361.getElementsByTagName(_35f)||self._document.all);\n
if(typeof (_360)=="undefined"||_360===null){\n
return MochiKit.Base.extend(null,_363);\n
}\n
var _364=[];\n
for(var i=0;i<_363.length;i++){\n
var _366=_363[i];\n
var cls=_366.className;\n
if(typeof (cls)!="string"){\n
cls=_366.getAttribute("class");\n
}\n
if(typeof (cls)=="string"){\n
var _368=cls.split(" ");\n
for(var j=0;j<_368.length;j++){\n
if(_368[j]==_360){\n
_364.push(_366);\n
break;\n
}\n
}\n
}\n
}\n
return _364;\n
},_newCallStack:function(path,once){\n
var rval=function(){\n
var _36d=arguments.callee.callStack;\n
for(var i=0;i<_36d.length;i++){\n
if(_36d[i].app

]]></string> </value>
        </item>
        <item>
            <key> <string>next</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
  <record id="3" aka="AAAAAAAAAAM=">
    <pickle>
      <tuple>
        <global name="Pdata" module="OFS.Image"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>data</string> </key>
            <value> <string encoding="cdata"><![CDATA[

ly(this,arguments)===false){\n
break;\n
}\n
}\n
if(once){\n
try{\n
this[path]=null;\n
}\n
catch(e){\n
}\n
}\n
};\n
rval.callStack=[];\n
return rval;\n
},addToCallStack:function(_36f,path,func,once){\n
var self=MochiKit.DOM;\n
var _374=_36f[path];\n
var _375=_374;\n
if(!(typeof (_374)=="function"&&typeof (_374.callStack)=="object"&&_374.callStack!==null)){\n
_375=self._newCallStack(path,once);\n
if(typeof (_374)=="function"){\n
_375.callStack.push(_374);\n
}\n
_36f[path]=_375;\n
}\n
_375.callStack.push(func);\n
},addLoadEvent:function(func){\n
var self=MochiKit.DOM;\n
self.addToCallStack(self._window,"onload",func,true);\n
},focusOnLoad:function(_378){\n
var self=MochiKit.DOM;\n
self.addLoadEvent(function(){\n
_378=self.getElement(_378);\n
if(_378){\n
_378.focus();\n
}\n
});\n
},setElementClass:function(_37a,_37b){\n
var self=MochiKit.DOM;\n
var obj=self.getElement(_37a);\n
if(self.attributeArray.compliant){\n
obj.setAttribute("class",_37b);\n
}else{\n
obj.setAttribute("className",_37b);\n
}\n
},toggleElementClass:function(_37e){\n
var self=MochiKit.DOM;\n
for(var i=1;i<arguments.length;i++){\n
var obj=self.getElement(arguments[i]);\n
if(!self.addElementClass(obj,_37e)){\n
self.removeElementClass(obj,_37e);\n
}\n
}\n
},addElementClass:function(_382,_383){\n
var self=MochiKit.DOM;\n
var obj=self.getElement(_382);\n
var cls=obj.className;\n
if(typeof (cls)!="string"){\n
cls=obj.getAttribute("class");\n
}\n
if(typeof (cls)!="string"||cls.length===0){\n
self.setElementClass(obj,_383);\n
return true;\n
}\n
if(cls==_383){\n
return false;\n
}\n
var _387=cls.split(" ");\n
for(var i=0;i<_387.length;i++){\n
if(_387[i]==_383){\n
return false;\n
}\n
}\n
self.setElementClass(obj,cls+" "+_383);\n
return true;\n
},removeElementClass:function(_389,_38a){\n
var self=MochiKit.DOM;\n
var obj=self.getElement(_389);\n
var cls=obj.className;\n
if(typeof (cls)!="string"){\n
cls=obj.getAttribute("class");\n
}\n
if(typeof (cls)!="string"||cls.length===0){\n
return false;\n
}\n
if(cls==_38a){\n
self.setElementClass(obj,"");\n
return true;\n
}\n
var _38e=cls.split(" ");\n
for(var i=0;i<_38e.length;i++){\n
if(_38e[i]==_38a){\n
_38e.splice(i,1);\n
self.setElementClass(obj,_38e.join(" "));\n
return true;\n
}\n
}\n
return false;\n
},swapElementClass:function(_390,_391,_392){\n
var obj=MochiKit.DOM.getElement(_390);\n
var res=MochiKit.DOM.removeElementClass(obj,_391);\n
if(res){\n
MochiKit.DOM.addElementClass(obj,_392);\n
}\n
return res;\n
},hasElementClass:function(_395,_396){\n
var obj=MochiKit.DOM.getElement(_395);\n
if(obj==null){\n
return false;\n
}\n
var cls=obj.className;\n
if(typeof (cls)!="string"){\n
cls=obj.getAttribute("class");\n
}\n
if(typeof (cls)!="string"){\n
return false;\n
}\n
var _399=cls.split(" ");\n
for(var i=1;i<arguments.length;i++){\n
var good=false;\n
for(var j=0;j<_399.length;j++){\n
if(_399[j]==arguments[i]){\n
good=true;\n
break;\n
}\n
}\n
if(!good){\n
return false;\n
}\n
}\n
return true;\n
},escapeHTML:function(s){\n
return s.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");\n
},toHTML:function(dom){\n
return MochiKit.DOM.emitHTML(dom).join("");\n
},emitHTML:function(dom,lst){\n
if(typeof (lst)=="undefined"||lst===null){\n
lst=[];\n
}\n
var _3a1=[dom];\n
var self=MochiKit.DOM;\n
var _3a3=self.escapeHTML;\n
var _3a4=self.attributeArray;\n
while(_3a1.length){\n
dom=_3a1.pop();\n
if(typeof (dom)=="string"){\n
lst.push(dom);\n
}else{\n
if(dom.nodeType==1){\n
lst.push("<"+dom.tagName.toLowerCase());\n
var _3a5=[];\n
var _3a6=_3a4(dom);\n
for(var i=0;i<_3a6.length;i++){\n
var a=_3a6[i];\n
_3a5.push([" ",a.name,"=\\"",_3a3(a.value),"\\""]);\n
}\n
_3a5.sort();\n
for(i=0;i<_3a5.length;i++){\n
var _3a9=_3a5[i];\n
for(var j=0;j<_3a9.length;j++){\n
lst.push(_3a9[j]);\n
}\n
}\n
if(dom.hasChildNodes()){\n
lst.push(">");\n
_3a1.push("</"+dom.tagName.toLowerCase()+">");\n
var _3ab=dom.childNodes;\n
for(i=_3ab.length-1;i>=0;i--){\n
_3a1.push(_3ab[i]);\n
}\n
}else{\n
lst.push("/>");\n
}\n
}else{\n
if(dom.nodeType==3){\n
lst.push(_3a3(dom.nodeValue));\n
}\n
}\n
}\n
}\n
return lst;\n
},scrapeText:function(node,_3ad){\n
var rval=[];\n
(function(node){\n
var cn=node.childNodes;\n
if(cn){\n
for(var i=0;i<cn.length;i++){\n
arguments.callee.call(this,cn[i]);\n
}\n
}\n
var _3b2=node.nodeValue;\n
if(typeof (_3b2)=="string"){\n
rval.push(_3b2);\n
}\n
})(MochiKit.DOM.getElement(node));\n
if(_3ad){\n
return rval;\n
}else{\n
return rval.join("");\n
}\n
},removeEmptyTextNodes:function(_3b3){\n
_3b3=MochiKit.DOM.getElement(_3b3);\n
for(var i=0;i<_3b3.childNodes.length;i++){\n
var node=_3b3.childNodes[i];\n
if(node.nodeType==3&&!/\\S/.test(node.nodeValue)){\n
node.parentNode.removeChild(node);\n
}\n
}\n
},getFirstElementByTagAndClassName:function(_3b6,_3b7,_3b8){\n
var self=MochiKit.DOM;\n
if(typeof (_3b6)=="undefined"||_3b6===null){\n
_3b6="*";\n
}\n
if(typeof (_3b8)=="undefined"||_3b8===null){\n
_3b8=self._document;\n
}\n
_3b8=self.getElement(_3b8);\n
if(_3b8==null){\n
return null;\n
}\n
var _3ba=(_3b8.getElementsByTagName(_3b6)||self._document.all);\n
if(_3ba.length<=0){\n
return null;\n
}else{\n
if(typeof (_3b7)=="undefined"||_3b7===null){\n
return _3ba[0];\n
}\n
}\n
for(var i=0;i<_3ba.length;i++){\n
var _3bc=_3ba[i];\n
var cls=_3bc.className;\n
if(typeof (cls)!="string"){\n
cls=_3bc.getAttribute("class");\n
}\n
if(typeof (cls)=="string"){\n
var _3be=cls.split(" ");\n
for(var j=0;j<_3be.length;j++){\n
if(_3be[j]==_3b7){\n
return _3bc;\n
}\n
}\n
}\n
}\n
return null;\n
},getFirstParentByTagAndClassName:function(elem,_3c1,_3c2){\n
var self=MochiKit.DOM;\n
elem=self.getElement(elem);\n
if(typeof (_3c1)=="undefined"||_3c1===null){\n
_3c1="*";\n
}else{\n
_3c1=_3c1.toUpperCase();\n
}\n
if(typeof (_3c2)=="undefined"||_3c2===null){\n
_3c2=null;\n
}\n
if(elem){\n
elem=elem.parentNode;\n
}\n
while(elem&&elem.tagName){\n
var _3c4=elem.tagName.toUpperCase();\n
if((_3c1==="*"||_3c1==_3c4)&&(_3c2===null||self.hasElementClass(elem,_3c2))){\n
return elem;\n
}\n
elem=elem.parentNode;\n
}\n
return null;\n
},__new__:function(win){\n
var m=MochiKit.Base;\n
if(typeof (document)!="undefined"){\n
this._document=document;\n
var _3c7="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";\n
this._xhtml=(document.documentElement&&document.createElementNS&&document.documentElement.namespaceURI===_3c7);\n
}else{\n
if(MochiKit.MockDOM){\n
this._document=MochiKit.MockDOM.document;\n
}\n
}\n
this._window=win;\n
this.domConverters=new m.AdapterRegistry();\n
var _3c8=this._document.createElement("span");\n
var _3c9;\n
if(_3c8&&_3c8.attributes&&_3c8.attributes.length>0){\n
var _3ca=m.filter;\n
_3c9=function(node){\n
return _3ca(_3c9.ignoreAttrFilter,node.attributes);\n
};\n
_3c9.ignoreAttr={};\n
var _3cc=_3c8.attributes;\n
var _3cd=_3c9.ignoreAttr;\n
for(var i=0;i<_3cc.length;i++){\n
var a=_3cc[i];\n
_3cd[a.name]=a.value;\n
}\n
_3c9.ignoreAttrFilter=function(a){\n
return (_3c9.ignoreAttr[a.name]!=a.value);\n
};\n
_3c9.compliant=false;\n
_3c9.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"};\n
}else{\n
_3c9=function(node){\n
return node.attributes;\n
};\n
_3c9.compliant=true;\n
_3c9.ignoreAttr={};\n
_3c9.renames={};\n
}\n
this.attributeArray=_3c9;\n
var _3d2=function(_3d3,arr){\n
var _3d5=arr[0];\n
var _3d6=arr[1];\n
var _3d7=_3d6.split(".")[1];\n
var str="";\n
str+="if (!MochiKit."+_3d7+") { throw new Error(\\"";\n
str+="This function has been deprecated and depends on MochiKit.";\n
str+=_3d7+".\\");}";\n
str+="return "+_3d6+".apply(this, arguments);";\n
MochiKit[_3d3][_3d5]=new Function(str);\n
};\n
for(var i=0;i<MochiKit.DOM.DEPRECATED.length;i++){\n
_3d2("DOM",MochiKit.DOM.DEPRECATED[i]);\n
}\n
var _3d9=this.createDOMFunc;\n
this.UL=_3d9("ul");\n
this.OL=_3d9("ol");\n
this.LI=_3d9("li");\n
this.DL=_3d9("dl");\n
this.DT=_3d9("dt");\n
this.DD=_3d9("dd");\n
this.TD=_3d9("td");\n
this.TR=_3d9("tr");\n
this.TBODY=_3d9("tbody");\n
this.THEAD=_3d9("thead");\n
this.TFOOT=_3d9("tfoot");\n
this.TABLE=_3d9("table");\n
this.TH=_3d9("th");\n
this.INPUT=_3d9("input");\n
this.SPAN=_3d9("span");\n
this.A=_3d9("a");\n
this.DIV=_3d9("div");\n
this.IMG=_3d9("img");\n
this.BUTTON=_3d9("button");\n
this.TT=_3d9("tt");\n
this.PRE=_3d9("pre");\n
this.H1=_3d9("h1");\n
this.H2=_3d9("h2");\n
this.H3=_3d9("h3");\n
this.H4=_3d9("h4");\n
this.H5=_3d9("h5");\n
this.H6=_3d9("h6");\n
this.BR=_3d9("br");\n
this.HR=_3d9("hr");\n
this.LABEL=_3d9("label");\n
this.TEXTAREA=_3d9("textarea");\n
this.FORM=_3d9("form");\n
this.P=_3d9("p");\n
this.SELECT=_3d9("select");\n
this.OPTION=_3d9("option");\n
this.OPTGROUP=_3d9("optgroup");\n
this.LEGEND=_3d9("legend");\n
this.FIELDSET=_3d9("fieldset");\n
this.STRONG=_3d9("strong");\n
this.CANVAS=_3d9("canvas");\n
this.$=this.getElement;\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
}});\n
MochiKit.DOM.__new__(((typeof (window)=="undefined")?this:window));\n
if(MochiKit.__export__){\n
withWindow=MochiKit.DOM.withWindow;\n
withDocument=MochiKit.DOM.withDocument;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.DOM);\n
MochiKit.Base._deps("Selector",["Base","DOM","Iter"]);\n
MochiKit.Selector.NAME="MochiKit.Selector";\n
MochiKit.Selector.VERSION="1.4.2";\n
MochiKit.Selector.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Selector.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Selector.EXPORT=["Selector","findChildElements","findDocElements","$$"];\n
MochiKit.Selector.EXPORT_OK=[];\n
MochiKit.Selector.Selector=function(_3da){\n
this.params={classNames:[],pseudoClassNames:[]};\n
this.expression=_3da.toString().replace(/(^\\s+|\\s+$)/g,"");\n
this.parseExpression();\n
this.compileMatcher();\n
};\n
MochiKit.Selector.Selector.prototype={__class__:MochiKit.Selector.Selector,parseExpression:function(){\n
function abort(_3db){\n
throw "Parse error in selector: "+_3db;\n
}\n
if(this.expression==""){\n
abort("empty expression");\n
}\n
var repr=MochiKit.Base.repr;\n
var _3dd=this.params;\n
var expr=this.expression;\n
var _3df,_3e0,_3e1,rest;\n
while(_3df=expr.match(/^(.*)\\[([a-z0-9_:-]+?)(?:([~\\|!^$*]?=)(?:"([^"]*)"|([^\\]\\s]*)))?\\]$/i)){\n
_3dd.attributes=_3dd.attributes||[];\n
_3dd.attributes.push({name:_3df[2],operator:_3df[3],value:_3df[4]||_3df[5]||""});\n
expr=_3df[1];\n
}\n
if(expr=="*"){\n
return this.params.wildcard=true;\n
}\n
while(_3df=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+(?:\\([^)]*\\))?)(.*)/i)){\n
_3e0=_3df[1];\n
_3e1=_3df[2];\n
rest=_3df[3];\n
switch(_3e0){\n
case "#":\n
_3dd.id=_3e1;\n
break;\n
case ".":\n
_3dd.classNames.push(_3e1);\n
break;\n
case ":":\n
_3dd.pseudoClassNames.push(_3e1);\n
break;\n
case "":\n
case undefined:\n
_3dd.tagName=_3e1.toUpperCase();\n
break;\n
default:\n
abort(repr(expr));\n
}\n
expr=rest;\n
}\n
if(expr.length>0){\n
abort(repr(expr));\n
}\n
},buildMatchExpression:function(){\n
var repr=MochiKit.Base.repr;\n
var _3e4=this.params;\n
var _3e5=[];\n
var _3e6,i;\n
function childElements(_3e8){\n
return "MochiKit.Base.filter(function (node) { return node.nodeType == 1; }, "+_3e8+".childNodes)";\n
}\n
if(_3e4.wildcard){\n
_3e5.push("true");\n
}\n
if(_3e6=_3e4.id){\n
_3e5.push("element.id == "+repr(_3e6));\n
}\n
if(_3e6=_3e4.tagName){\n
_3e5.push("element.tagName.toUpperCase() == "+repr(_3e6));\n
}\n
if((_3e6=_3e4.classNames).length>0){\n
for(i=0;i<_3e6.length;i++){\n
_3e5.push("MochiKit.DOM.hasElementClass(element, "+repr(_3e6[i])+")");\n
}\n
}\n
if((_3e6=_3e4.pseudoClassNames).length>0){\n
for(i=0;i<_3e6.length;i++){\n
var _3e9=_3e6[i].match(/^([^(]+)(?:\\((.*)\\))?$/);\n
var _3ea=_3e9[1];\n
var _3eb=_3e9[2];\n
switch(_3ea){\n
case "root":\n
_3e5.push("element.nodeType == 9 || element === element.ownerDocument.documentElement");\n
break;\n
case "nth-child":\n
case "nth-last-child":\n
case "nth-of-type":\n
case "nth-last-of-type":\n
_3e9=_3eb.match(/^((?:(\\d+)n\\+)?(\\d+)|odd|even)$/);\n
if(!_3e9){\n
throw "Invalid argument to pseudo element nth-child: "+_3eb;\n
}\n
var a,b;\n
if(_3e9[0]=="odd"){\n
a=2;\n
b=1;\n
}else{\n
if(_3e9[0]=="even"){\n
a=2;\n
b=0;\n
}else{\n
a=_3e9[2]&&parseInt(_3e9)||null;\n
b=parseInt(_3e9[3]);\n
}\n
}\n
_3e5.push("this.nthChild(element,"+a+","+b+","+!!_3ea.match("^nth-last")+","+!!_3ea.match("of-type$")+")");\n
break;\n
case "first-child":\n
_3e5.push("this.nthChild(element, null, 1)");\n
break;\n
case "last-child":\n
_3e5.push("this.nthChild(element, null, 1, true)");\n
break;\n
case "first-of-type":\n
_3e5.push("this.nthChild(element, null, 1, false, true)");\n
break;\n
case "last-of-type":\n
_3e5.push("this.nthChild(element, null, 1, true, true)");\n
break;\n
case "only-child":\n
_3e5.push(childElements("element.parentNode")+".length == 1");\n
break;\n
case "only-of-type":\n
_3e5.push("MochiKit.Base.filter(function (node) { return node.tagName == element.tagName; }, "+childElements("element.parentNode")+").length == 1");\n
break;\n
case "empty":\n
_3e5.push("element.childNodes.length == 0");\n
break;\n
case "enabled":\n
_3e5.push("(this.isUIElement(element) && element.disabled === false)");\n
break;\n
case "disabled":\n
_3e5.push("(this.isUIElement(element) && element.disabled === true)");\n
break;\n
case "checked":\n
_3e5.push("(this.isUIElement(element) && element.checked === true)");\n
break;\n
case "not":\n
var _3ee=new MochiKit.Selector.Selector(_3eb);\n
_3e5.push("!( "+_3ee.buildMatchExpression()+")");\n
break;\n
}\n
}\n
}\n
if(_3e6=_3e4.attributes){\n
MochiKit.Base.map(function(_3ef){\n
var _3f0="MochiKit.DOM.getNodeAttribute(element, "+repr(_3ef.name)+")";\n
var _3f1=function(_3f2){\n
return _3f0+".split("+repr(_3f2)+")";\n
};\n
_3e5.push(_3f0+" != null");\n
switch(_3ef.operator){\n
case "=":\n
_3e5.push(_3f0+" == "+repr(_3ef.value));\n
break;\n
case "~=":\n
_3e5.push("MochiKit.Base.findValue("+_3f1(" ")+", "+repr(_3ef.value)+") > -1");\n
break;\n
case "^=":\n
_3e5.push(_3f0+".substring(0, "+_3ef.value.length+") == "+repr(_3ef.value));\n
break;\n
case "$=":\n
_3e5.push(_3f0+".substring("+_3f0+".length - "+_3ef.value.length+") == "+repr(_3ef.value));\n
break;\n
case "*=":\n
_3e5.push(_3f0+".match("+repr(_3ef.value)+")");\n
break;\n
case "|=":\n
_3e5.push(_3f1("-")+"[0].toUpperCase() == "+repr(_3ef.value.toUpperCase()));\n
break;\n
case "!=":\n
_3e5.push(_3f0+" != "+repr(_3ef.value));\n
break;\n
case "":\n
case undefined:\n
break;\n
default:\n
throw "Unknown operator "+_3ef.operator+" in selector";\n
}\n
},_3e6);\n
}\n
return _3e5.join(" && ");\n
},compileMatcher:function(){\n
var code="return (!element.tagName) ? false : "+this.buildMatchExpression()+";";\n
this.match=new Function("element",code);\n
},nthChild:function(_3f4,a,b,_3f7,_3f8){\n
var _3f9=MochiKit.Base.filter(function(node){\n
return node.nodeType==1;\n
},_3f4.parentNode.childNodes);\n
if(_3f8){\n
_3f9=MochiKit.Base.filter(function(node){\n
return node.tagName==_3f4.tagName;\n
},_3f9);\n
}\n
if(_3f7){\n
_3f9=MochiKit.Iter.reversed(_3f9);\n
}\n
if(a){\n
var _3fc=MochiKit.Base.findIdentical(_3f9,_3f4);\n
return ((_3fc+1-b)/a)%1==0;\n
}else{\n
return b==MochiKit.Base.findIdentical(_3f9,_3f4)+1;\n
}\n
},isUIElement:function(_3fd){\n
return MochiKit.Base.findValue(["input","button","select","option","textarea","object"],_3fd.tagName.toLowerCase())>-1;\n
},findElements:function(_3fe,axis){\n
var _400;\n
if(axis==undefined){\n
axis="";\n
}\n
function inScope(_401,_402){\n
if(axis==""){\n
return MochiKit.DOM.isChildNode(_401,_402);\n
}else{\n
if(axis==">"){\n
return _401.parentNode===_402;\n
}else{\n
if(axis=="+"){\n
return _401===nextSiblingElement(_402);\n
}else{\n
if(axis=="~"){\n
var _403=_402;\n
while(_403=nextSiblingElement(_403)){\n
if(_401===_403){\n
return true;\n
}\n
}\n
return false;\n
}else{\n
throw "Invalid axis: "+axis;\n
}\n
}\n
}\n
}\n
}\n
if(_400=MochiKit.DOM.getElement(this.params.id)){\n
if(this.match(_400)){\n
if(!_3fe||inScope(_400,_3fe)){\n
return [_400];\n
}\n
}\n
}\n
function nextSiblingElement(node){\n
node=node.nextSibling;\n
while(node&&node.nodeType!=1){\n
node=node.nextSibling;\n
}\n
return node;\n
}\n
if(axis==""){\n
_3fe=(_3fe||MochiKit.DOM.currentDocument()).getElementsByTagName(this.params.tagName||"*");\n
}else{\n
if(axis==">"){\n
if(!_3fe){\n
throw "> combinator not allowed without preceeding expression";\n
}\n
_3fe=MochiKit.Base.filter(function(node){\n
return node.nodeType==1;\n
},_3fe.childNodes);\n
}else{\n
if(axis=="+"){\n
if(!_3fe){\n
throw "+ combinator not allowed without preceeding expression";\n
}\n
_3fe=nextSiblingElement(_3fe)&&[nextSiblingElement(_3fe)];\n
}else{\n
if(axis=="~"){\n
if(!_3fe){\n
throw "~ combinator not allowed without preceeding expression";\n
}\n
var _406=[];\n
while(nextSiblingElement(_3fe)){\n
_3fe=nextSiblingElement(_3fe);\n
_406.push(_3fe);\n
}\n
_3fe=_406;\n
}\n
}\n
}\n
}\n
if(!_3fe){\n
return [];\n
}\n
var _407=MochiKit.Base.filter(MochiKit.Base.bind(function(_408){\n
return this.match(_408);\n
},this),_3fe);\n
return _407;\n
},repr:function(){\n
return "Selector("+this.expression+")";\n
},toString:MochiKit.Base.forwardCall("repr")};\n
MochiKit.Base.update(MochiKit.Selector,{findChildElements:function(_409,_40a){\n
var uniq=function(arr){\n
var res=[];\n
for(var i=0;i<arr.length;i++){\n
if(MochiKit.Base.findIdentical(res,arr[i])<0){\n
res.push(arr[i]);\n
}\n
}\n
return res;\n
};\n
return MochiKit.Base.flattenArray(MochiKit.Base.map(function(_40f){\n
var _410="";\n
var _411=function(_412,expr){\n
if(match=expr.match(/^[>+~]$/)){\n
_410=match[0];\n
return _412;\n
}else{\n
var _414=new MochiKit.Selector.Selector(expr);\n
var _415=MochiKit.Iter.reduce(function(_416,_417){\n
return MochiKit.Base.extend(_416,_414.findElements(_417||_409,_410));\n
},_412,[]);\n
_410="";\n
return _415;\n
}\n
};\n
var _418=_40f.replace(/(^\\s+|\\s+$)/g,"").split(/\\s+/);\n
return uniq(MochiKit.Iter.reduce(_411,_418,[null]));\n
},_40a));\n
},findDocElements:function(){\n
return MochiKit.Selector.findChildElements(MochiKit.DOM.currentDocument(),arguments);\n
},__new__:function(){\n
var m=MochiKit.Base;\n
this.$$=this.findDocElements;\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
}});\n
MochiKit.Selector.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Selector);\n
MochiKit.Base._deps("Style",["Base","DOM"]);\n
MochiKit.Style.NAME="MochiKit.Style";\n
MochiKit.Style.VERSION="1.4.2";\n
MochiKit.Style.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Style.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Style.EXPORT_OK=[];\n
MochiKit.Style.EXPORT=["setStyle","setOpacity","getStyle","getElementDimensions","elementDimensions","setElementDimensions","getElementPosition","elementPosition","setElementPosition","makePositioned","undoPositioned","makeClipping","undoClipping","setDisplayForElement","hideElement","showElement","getViewportDimensions","getViewportPosition","Dimensions","Coordinates"];\n
MochiKit.Style.Dimensions=function(w,h){\n
this.w=w;\n
this.h=h;\n
};\n
MochiKit.Style.Dimensions.prototype.__repr__=function(){\n
var repr=MochiKit.Base.repr;\n
return "{w: "+repr(this.w)+", h: "+repr(this.h)+"}";\n
};\n
MochiKit.Style.Dimensions.prototype.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Style.Coordinates=function(x,y){\n
this.x=x;\n
this.y=y;\n
};\n
MochiKit.Style.Coordinates.prototype.__repr__=function(){\n
var repr=MochiKit.Base.repr;\n
return "{x: "+repr(this.x)+", y: "+repr(this.y)+"}";\n
};\n
MochiKit.Style.Coordinates.prototype.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Base.update(MochiKit.Style,{getStyle:function(elem,_421){\n
var dom=MochiKit.DOM;\n
var d=dom._document;\n
elem=dom.getElement(elem);\n
_421=MochiKit.Base.camelize(_421);\n
if(!elem||elem==d){\n
return undefined;\n
}\n
if(_421=="opacity"&&typeof (elem.filters)!="undefined"){\n
var _424=(MochiKit.Style.getStyle(elem,"filter")||"").match(/alpha\\(opacity=(.*)\\)/);\n
if(_424&&_424[1]){\n
return parseFloat(_424[1])/100;\n
}\n
return 1;\n
}\n
if(_421=="float"||_421=="cssFloat"||_421=="styleFloat"){\n
if(elem.style["float"]){\n
return elem.style["float"];\n
}else{\n
if(elem.style.cssFloat){\n
return elem.style.cssFloat;\n
}else{\n
if(elem.style.styleFloat){\n
return elem.style.styleFloat;\n
}else{\n
return "none";\n
}\n
}\n
}\n
}\n
var _425=elem.style?elem.style[_421]:null;\n
if(!_425){\n
if(d.defaultView&&d.defaultView.getComputedStyle){\n
var css=d.defaultView.getComputedStyle(elem,null);\n
_421=_421.replace(/([A-Z])/g,"-$1").toLowerCase();\n
_425=css?css.getPropertyValue(_421):null;\n
}else{\n
if(elem.currentStyle){\n
_425=elem.currentStyle[_421];\n
if(/^\\d/.test(_425)&&!/px$/.test(_425)&&_421!="fontWeight"){\n
var left=elem.style.left;\n
var _428=elem.runtimeStyle.left;\n
elem.runtimeStyle.left=elem.currentStyle.left;\n
elem.style.left=_425||0;\n
_425=elem.style.pixelLeft+"px";\n
elem.style.left=left;\n
elem.runtimeStyle.left=_428;\n
}\n
}\n
}\n
}\n
if(_421=="opacity"){\n
_425=parseFloat(_425);\n
}\n
if(/Opera/.test(navigator.userAgent)&&(MochiKit.Base.findValue(["left","top","right","bottom"],_421)!=-1)){\n
if(MochiKit.Style.getStyle(elem,"position")=="static"){\n
_425="auto";\n
}\n
}\n
return _425=="auto"?null:_425;\n
},setStyle:function(elem,_42a){\n
elem=MochiKit.DOM.getElement(elem);\n
for(var name in _42a){\n
switch(name){\n
case "opacity":\n
MochiKit.Style.setOpacity(elem,_42a[name]);\n
break;\n
case "float":\n
case "cssFloat":\n
case "styleFloat":\n
if(typeof (elem.style["float"])!="undefined"){\n
elem.style["float"]=_42a[name];\n
}else{\n
if(typeof (elem.style.cssFloat)!="undefined"){\n
elem.style.cssFloat=_42a[name];\n
}else{\n
elem.style.styleFloat=_42a[name];\n
}\n
}\n
break;\n
default:\n
elem.style[MochiKit.Base.camelize(name)]=_42a[name];\n
}\n
}\n
},setOpacity:function(elem,o){\n
elem=MochiKit.DOM.getElement(elem);\n
var self=MochiKit.Style;\n
if(o==1){\n
var _42f=/Gecko/.test(navigator.userAgent)&&!(/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent));\n
elem.style["opacity"]=_42f?0.999999:1;\n
if(/MSIE/.test(navigator.userAgent)){\n
elem.style["filter"]=self.getStyle(elem,"filter").replace(/alpha\\([^\\)]*\\)/gi,"");\n
}\n
}else{\n
if(o<0.00001){\n
o=0;\n
}\n
elem.style["opacity"]=o;\n
if(/MSIE/.test(navigator.userAgent)){\n
elem.style["filter"]=self.getStyle(elem,"filter").replace(/alpha\\([^\\)]*\\)/gi,"")+"alpha(opacity="+o*100+")";\n
}\n
}\n
},getElementPosition:function(elem,_431){\n
var self=MochiKit.Style;\n
var dom=MochiKit.DOM;\n
elem=dom.getElement(elem);\n
if(!elem||(!(elem.x&&elem.y)&&(!elem.parentNode===null||self.getStyle(elem,"display")=="none"))){\n
return undefined;\n
}\n
var c=new self.Coordinates(0,0);\n
var box=null;\n
var _436=null;\n
var d=MochiKit.DOM._document;\n
var de=d.documentElement;\n
var b=d.body;\n
if(!elem.parentNode&&elem.x&&elem.y){\n
c.x+=elem.x||0;\n
c.y+=elem.y||0;\n
}else{\n
if(elem.getBoundingClientRect){\n
box=elem.getBoundingClientRect();\n
c.x+=box.left+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||0);\n
c.y+=box.top+(de.scrollTop||b.scrollTop)-(de.clientTop||0);\n
}else{\n
if(elem.offsetParent){\n
c.x+=elem.offsetLeft;\n
c.y+=elem.offsetTop;\n
_436=elem.offsetParent;\n
if(_436!=elem){\n
while(_436){\n
c.x+=parseInt(_436.style.borderLeftWidth)||0;\n
c.y+=parseInt(_436.style.borderTopWidth)||0;\n
c.x+=_436.offsetLeft;\n
c.y+=_436.offsetTop;\n
_436=_436.offsetParent;\n
}\n
}\n
var ua=navigator.userAgent.toLowerCase();\n
if((typeof (opera)!="undefined"&&parseFloat(opera.version())<9)||(ua.indexOf("AppleWebKit")!=-1&&self.getStyle(elem,"position")=="absolute")){\n
c.x-=b.offsetLeft;\n
c.y-=b.offsetTop;\n
}\n
if(elem.parentNode){\n
_436=elem.parentNode;\n
}else{\n
_436=null;\n
}\n
while(_436){\n
var _43b=_436.tagName.toUpperCase();\n
if(_43b==="BODY"||_43b==="HTML"){\n
break;\n
}\n
var disp=self.getStyle(_436,"display");\n
if(disp.search(/^inline|table-row.*$/i)){\n
c.x-=_436.scrollLeft;\n
c.y-=_436.scrollTop;\n
}\n
if(_436.parentNode){\n
_436=_436.parentNode;\n
}else{\n
_436=null;\n
}\n
}\n
}\n
}\n
}\n
if(typeof (_431)!="undefined"){\n
_431=arguments.callee(_431);\n
if(_431){\n
c.x-=(_431.x||0);\n
c.y-=(_431.y||0);\n
}\n
}\n
return c;\n
},setElementPosition:function(elem,_43e,_43f){\n
elem=MochiKit.DOM.getElement(elem);\n
if(typeof (_43f)=="undefined"){\n
_43f="px";\n
}\n
var _440={};\n
var _441=MochiKit.Base.isUndefinedOrNull;\n
if(!_441(_43e.x)){\n
_440["left"]=_43e.x+_43f;\n
}\n
if(!_441(_43e.y)){\n
_440["top"]=_43e.y+_43f;\n
}\n
MochiKit.DOM.updateNodeAttributes(elem,{"style":_440});\n
},makePositioned:function(_442){\n
_442=MochiKit.DOM.getElement(_442);\n
var pos=MochiKit.Style.getStyle(_442,"position");\n
if(pos=="static"||!pos){\n
_442.style.position="relative";\n
if(/Opera/.test(navigator.userAgent)){\n
_442.style.top=0;\n
_442.style.left=0;\n
}\n
}\n
},undoPositioned:function(_444){\n
_444=MochiKit.DOM.getElement(_444);\n
if(_444.style.position=="relative"){\n
_444.style.position=_444.style.top=_444.style.left=_444.style.bottom=_444.style.right="";\n
}\n
},makeClipping:function(_445){\n
_445=MochiKit.DOM.getElement(_445);\n
var s=_445.style;\n
var _447={"overflow":s.overflow,"overflow-x":s.overflowX,"overflow-y":s.overflowY};\n
if((MochiKit.Style.getStyle(_445,"overflow")||"visible")!="hidden"){\n
_445.style.overflow="hidden";\n
_445.style.overflowX="hidden";\n
_445.style.overflowY="hidden";\n
}\n
return _447;\n
},undoClipping:function(_448,_449){\n
_448=MochiKit.DOM.getElement(_448);\n
if(typeof (_449)=="string"){\n
_448.style.overflow=_449;\n
}else{\n
if(_449!=null){\n
_448.style.overflow=_449["overflow"];\n
_448.style.overflowX=_449["overflow-x"];\n
_448.style.overflowY=_449["overflow-y"];\n
}\n
}\n
},getElementDimensions:function(elem,_44b){\n
var self=MochiKit.Style;\n
var dom=MochiKit.DOM;\n
if(typeof (elem.w)=="number"||typeof (elem.h)=="number"){\n
return new self.Dimensions(elem.w||0,elem.h||0);\n
}\n
elem=dom.getElement(elem);\n
if(!elem){\n
return undefined;\n
}\n
var disp=self.getStyle(elem,"display");\n
if(disp=="none"||disp==""||typeof (disp)=="undefined"){\n
var s=elem.style;\n
var _450=s.visibility;\n
var _451=s.position;\n
var _452=s.display;\n
s.visibility="hidden";\n
s.position="absolute";\n
s.display=self._getDefaultDisplay(elem);\n
var _453=elem.offsetWidth;\n
var _454=elem.offsetHeight;\n
s.display=_452;\n
s.position=_451;\n
s.visibility=_450;\n
}else{\n
_453=elem.offsetWidth||0;\n
_454=elem.offsetHeight||0;\n
}\n
if(_44b){\n
var _455="colSpan" in elem&&"rowSpan" in elem;\n
var _456=(_455&&elem.parentNode&&self.getStyle(elem.parentNode,"borderCollapse")=="collapse");\n
if(_456){\n
if(/MSIE/.test(navigator.userAgent)){\n
var _457=elem.previousSibling?0.5:1;\n
var _458=elem.nextSibling?0.5:1;\n
}else{\n
var _457=0.5;\n
var _458=0.5;\n
}\n
}else{\n
var _457=1;\n
var _458=1;\n
}\n
_453-=Math.round((parseFloat(self.getStyle(elem,"paddingLeft"))||0)+(parseFloat(self.getStyle(elem,"paddingRight"))||0)+_457*(parseFloat(self.getStyle(elem,"borderLeftWidth"))||0)+_458*(parseFloat(self.getStyle(elem,"borderRightWidth"))||0));\n
if(_455){\n
if(/Gecko|Opera/.test(navigator.userAgent)&&!/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent)){\n
var _459=0;\n
}else{\n
if(/MSIE/.test(navigator.userAgent)){\n
var _459=1;\n
}else{\n
var _459=_456?0.5:1;\n
}\n
}\n
}else{\n
var _459=1;\n
}\n
_454-=Math.round((parseFloat(self.getStyle(elem,"paddingTop"))||0)+(parseFloat(self.getStyle(elem,"paddingBottom"))||0)+_459*((parseFloat(self.getStyle(elem,"borderTopWidth"))||0)+(parseFloat(self.getStyle(elem,"borderBottomWidth"))||0)));\n
}\n
return new self.Dimensions(_453,_454);\n
},setElementDimensions:function(elem,_45b,_45c){\n
elem=MochiKit.DOM.getElement(elem);\n
if(typeof (_45c)=="undefined"){\n
_45c="px";\n
}\n
var _45d={};\n
var _45e=MochiKit.Base.isUndefinedOrNull;\n
if(!_45e(_45b.w)){\n
_45d["width"]=_45b.w+_45c;\n
}\n
if(!_45e(_45b.h)){\n
_45d["height"]=_45b.h+_45c;\n
}\n
MochiKit.DOM.updateNodeAttributes(elem,{"style":_45d});\n
},_getDefaultDisplay:function(elem){\n
var self=MochiKit.Style;\n
var dom=MochiKit.DOM;\n
elem=dom.getElement(elem);\n
if(!elem){\n
return undefined;\n
}\n
var _462=elem.tagName.toUpperCase();\n
return self._defaultDisplay[_462]||"block";\n
},setDisplayForElement:function(_463,_464){\n
var _465=MochiKit.Base.extend(null,arguments,1);\n
var _466=MochiKit.DOM.getElement;\n
for(var i=0;i<_465.length;i++){\n
_464=_466(_465[i]);\n
if(_464){\n
_464.style.display=_463;\n
}\n
}\n
},getViewportDimensions:function(){\n
var d=new MochiKit.Style.Dimensions();\n
var w=MochiKit.DOM._window;\n
var b=MochiKit.DOM._document.body;\n
if(w.innerWidth){\n
d.w=w.innerWidth;\n
d.h=w.innerHeight;\n
}else{\n
if(b&&b.parentElement&&b.parentElement.clientWidth){\n
d.w=b.parentElement.clientWidth;\n
d.h=b.parentElement.clientHeight;\n
}else{\n
if(b&&b.clientWidth){\n
d.w=b.clientWidth;\n
d.h=b.clientHeight;\n
}\n
}\n
}\n
return d;\n
},getViewportPosition:function(){\n
var c=new MochiKit.Style.Coordinates(0,0);\n
var d=MochiKit.DOM._document;\n
var de=d.documentElement;\n
var db=d.body;\n
if(de&&(de.scrollTop||de.scrollLeft)){\n
c.x=de.scrollLeft;\n
c.y=de.scrollTop;\n
}else{\n
if(db){\n
c.x=db.scrollLeft;\n
c.y=db.scrollTop;\n
}\n
}\n
return c;\n
},__new__:function(){\n
var m=MochiKit.Base;\n
var _470=["A","ABBR","ACRONYM","B","BASEFONT","BDO","BIG","BR","CITE","CODE","DFN","EM","FONT","I","IMG","KBD","LABEL","Q","S","SAMP","SMALL","SPAN","STRIKE","STRONG","SUB","SUP","TEXTAREA","TT","U","VAR"];\n
this._defaultDisplay={"TABLE":"table","THEAD":"table-header-group","TBODY":"table-row-group","TFOOT":"table-footer-group","COLGROUP":"table-column-group","COL":"table-column","TR":"table-row","TD":"table-cell","TH":"table-cell","CAPTION":"table-caption","LI":"list-item","INPUT":"inline-block","SELECT":"inline-block"};\n
if(/MSIE/.test(navigator.userAgent)){\n
for(var k in this._defaultDisplay){\n
var v=this._defaultDisplay[k];\n
if(v.indexOf("table")==0){\n
this._defaultDisplay[k]="block";\n
}\n
}\n
}\n
for(var i=0;i<_470.length;i++){\n
this._defaultDisplay[_470[i]]="inline";\n
}\n
this.elementPosition=this.getElementPosition;\n
this.elementDimensions=this.getElementDimensions;\n
this.hideElement=m.partial(this.setDisplayForElement,"none");\n
this.showElement=m.partial(this.setDisplayForElement,"block");\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
}});\n
MochiKit.Style.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Style);\n
MochiKit.Base._deps("LoggingPane",["Base","Logging"]);\n
MochiKit.LoggingPane.NAME="MochiKit.LoggingPane";\n
MochiKit.LoggingPane.VERSION="1.4.2";\n
MochiKit.LoggingPane.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.LoggingPane.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.LoggingPane.createLoggingPane=function(_474){\n
var m=MochiKit.LoggingPane;\n
_474=!(!_474);\n
if(m._loggingPane&&m._loggingPane.inline!=_474){\n
m._loggingPane.closePane();\n
m._loggingPane=null;\n
}\n
if(!m._loggingPane||m._loggingPane.closed){\n
m._loggingPane=new m.LoggingPane(_474,MochiKit.Logging.logger);\n
}\n
return m._loggingPane;\n
};\n
MochiKit.LoggingPane.LoggingPane=function(_476,_477){\n
if(typeof (_477)=="undefined"||_477===null){\n
_477=MochiKit.Logging.logger;\n
}\n
this.logger=_477;\n
var _478=MochiKit.Base.update;\n
var _479=MochiKit.Base.updatetree;\n
var bind=MochiKit.Base.bind;\n
var _47b=MochiKit.Base.clone;\n
var win=window;\n
var uid="_MochiKit_LoggingPane";\n
if(typeof (MochiKit.DOM)!="undefined"){\n
win=MochiKit.DOM.currentWindow();\n
}\n
if(!_476){\n
var url=win.location.href.split("?")[0].replace(/[#:\\/.><&%-]/g,"_");\n
var name=uid+"_"+url;\n
var nwin=win.open("",name,"dependent,resizable,height=200");\n
if(!nwin){\n
alert("Not able to open debugging window due to pop-up blocking.");\n
return undefined;\n
}\n
nwin.document.write("<!DOCTYPE HTML PUBLIC \\"-//W3C//DTD HTML 4.0 Transitional//EN\\" "+"\\"http://www.w3.org/TR/html4/loose.dtd\\">"+"<html><head><title>[MochiKit.LoggingPane]</title></head>"+"<body></body></html>");\n
nwin.document.close();\n
nwin.document.title+=" "+win.document.title;\n
win=nwin;\n
}\n
var doc=win.document;\n
this.doc=doc;\n
var _482=doc.getElementById(uid);\n
var _483=!!_482;\n
if(_482&&typeof (_482.loggingPane)!="undefined"){\n
_482.loggingPane.logger=this.logger;\n
_482.loggingPane.buildAndApplyFilter();\n
return _482.loggingPane;\n
}\n
if(_483){\n
var _484;\n
while((_484=_482.firstChild)){\n
_482.removeChild(_484);\n
}\n
}else{\n
_482=doc.createElement("div");\n
_482.id=uid;\n
}\n
_482.loggingPane=this;\n
var _485=doc.createElement("input");\n
var _486=doc.createElement("input");\n
var _487=doc.createElement("button");\n
var _488=doc.createElement("button");\n
var _489=doc.createElement("button");\n
var _48a=doc.createElement("button");\n
var _48b=doc.createElement("div");\n
var _48c=doc.createElement("div");\n
var _48d=uid+"_Listener";\n
this.colorTable=_47b(this.colorTable);\n
var _48e=[];\n
var _48f=null;\n
var _490=function(msg){\n
var _492=msg.level;\n
if(typeof (_492)=="number"){\n
_492=MochiKit.Logging.LogLevel[_492];\n
}\n
return _492;\n
};\n
var _493=function(msg){\n
return msg.info.join(" ");\n
};\n
var _495=bind(function(msg){\n
var _497=_490(msg);\n
var text=_493(msg);\n
var c=this.colorTable[_497];\n
var p=doc.createElement("span");\n
p.className="MochiKit-LogMessage MochiKit-LogLevel-"+_497;\n
p.style.cssText="margin: 0px; white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; wrap-option: emergency; color: "+c;\n
p.appendChild(doc.createTextNode(_497+": "+text));\n
_48c.appendChild(p);\n
_48c.appendChild(doc.createElement("br"));\n
if(_48b.offsetHeight>_48b.scrollHeight){\n
_48b.scrollTop=0;\n
}else{\n
_48b.scrollTop=_48b.scrollHeight;\n
}\n
},this);\n
var _49b=function(msg){\n
_48e[_48e.length]=msg;\n
_495(msg);\n
};\n
var _49d=function(){\n
var _49e,_49f;\n
try{\n
_49e=new RegExp(_485.value);\n
_49f=new RegExp(_486.value);\n
}\n
catch(e){\n
logDebug("Error in filter regex: "+e.message);\n
return null;\n
}\n
return function(msg){\n
return (_49e.test(_490(msg))&&_49f.test(_493(msg)));\n
};\n
};\n
var _4a1=function(){\n
while(_48c.firstChild){\n
_48c.removeChild(_48c.firstChild);\n
}\n
};\n
var _4a2=function(){\n
_48e=[];\n
_4a1();\n
};\n
var _4a3=bind(function(){\n
if(this.closed){\n
return;\n
}\n
this.closed=true;\n
if(MochiKit.LoggingPane._loggingPane==this){\n
MochiKit.LoggingPane._loggingPane=null;\n
}\n
this.logger.removeListener(_48d);\n
try{\n
try{\n
_482.loggingPane=null;\n
}\n
catch(e){\n
logFatal("Bookmarklet was closed incorrectly.");\n
}\n
if(_476){\n
_482.parentNode.removeChild(_482);\n
}else{\n
this.win.close();\n
}\n
}\n
catch(e){\n
}\n
},this);\n
var _4a4=function(){\n
_4a1();\n
for(var i=0;i<_48e.length;i++){\n
var msg=_48e[i];\n
if(_48f===null||_48f(msg)){\n
_495(msg);\n
}\n
}\n
};\n
this.buildAndApplyFilter=function(){\n
_48f=_49d();\n
_4a4();\n
this.logger.removeListener(_48d);\n
this.logger.addListener(_48d,_48f,_49b);\n
};\n
var _4a7=bind(function(){\n
_48e=this.logger.getMessages();\n
_4a4();\n
},this);\n
var _4a8=bind(function(_4a9){\n
_4a9=_4a9||window.event;\n
key=_4a9.which||_4a9.keyCode;\n
if(key==13){\n
this.buildAndApplyFilter();\n
}\n
},this);\n
var _4aa="display: block; z-index: 1000; left: 0px; bottom: 0px; position: fixed; width: 100%; background-color: white; font: "+this.logFont;\n
if(_476){\n
_4aa+="; height: 10em; border-top: 2px solid black";\n
}else{\n
_4aa+="; height: 100%;";\n
}\n
_482.style.cssText=_4aa;\n
if(!_483){\n
doc.body.appendChild(_482);\n
}\n
_4aa={"cssText":"width: 33%; display: inline; font: "+this.logFont};\n
_479(_485,{"value":"FATAL|ERROR|WARNING|INFO|DEBUG","onkeypress":_4a8,"style":_4aa});\n
_482.appendChild(_485);\n
_479(_486,{"value":".*","onkeypress":_4a8,"style":_4aa});\n
_482.appendChild(_486);\n
_4aa="width: 8%; display:inline; font: "+this.logFont;\n
_487.appendChild(doc.createTextNode("Filter"));\n
_487.onclick=bind("buildAndApplyFilter",this);\n
_487.style.cssText=_4aa;\n
_482.appendChild(_487);\n
_488.appendChild(doc.createTextNode("Load"));\n
_488.onclick=_4a7;\n
_488.style.cssText=_4aa;\n
_482.appendChild(_488);\n
_489.appendChild(doc.createTextNode("Clear"));\n
_489.onclick=_4a2;\n
_489.style.cssText=_4aa;\n
_482.appendChild(_489);\n
_48a.appendChild(doc.createTextNode("Close"));\n
_48a.onclick=_4a3;\n
_48a.style.cssText=_4aa;\n
_482.appendChild(_48a);\n
_48b.style.cssText="overflow: auto; width: 100%";\n
_48c.style.cssText="width: 100%; height: "+(_476?"8em":"100%");\n
_48b.appendChild(_48c);\n
_482.appendChild(_48b);\n
this.buildAndApplyFilter();\n
_4a7();\n
if(_476){\n
this.win=undefined;\n
}else{\n
this.win=win;\n
}\n
this.inline=_476;\n
this.closePane=_4a3;\n
this.closed=false;\n
return this;\n
};\n
MochiKit.LoggingPane.LoggingPane.prototype={"logFont":"8pt Verdana,sans-serif","colorTable":{"ERROR":"red","FATAL":"darkred","WARNING":"blue","INFO":"black","DEBUG":"green"}};\n
MochiKit.LoggingPane.EXPORT_OK=["LoggingPane"];\n
MochiKit.LoggingPane.EXPORT=["createLoggingPane"];\n
MochiKit.LoggingPane.__new__=function(){\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};\n
MochiKit.Base.nameFunctions(this);\n
MochiKit.LoggingPane._loggingPane=null;\n
};\n
MochiKit.LoggingPane.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.LoggingPane);\n
MochiKit.Base._deps("Color",["Base","DOM","Style"]);\n
MochiKit.Color.NAME="MochiKit.Color";\n
MochiKit.Color.VERSION="1.4.2";\n
MochiKit.Color.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Color.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Color.Color=function(red,_4ac,blue,_4ae){\n
if(typeof (_4ae)=="undefined"||_4ae===null){\n
_4ae=1;\n
}\n
this.rgb={r:red,g:_4ac,b:blue,a:_4ae};\n
};\n
MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_4af){\n
var rgb=this.rgb;\n
var m=MochiKit.Color;\n
return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_4af);\n
},colorWithHue:function(hue){\n
var hsl=this.asHSL();\n
hsl.h=hue;\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},colorWithSaturation:function(_4b5){\n
var hsl=this.asHSL();\n
hsl.s=_4b5;\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},colorWithLightness:function(_4b8){\n
var hsl=this.asHSL();\n
hsl.l=_4b8;\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},darkerColorWithLevel:function(_4bb){\n
var hsl=this.asHSL();\n
hsl.l=Math.max(hsl.l-_4bb,0);\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},lighterColorWithLevel:function(_4be){\n
var hsl=this.asHSL();\n
hsl.l=Math.min(hsl.l+_4be,1);\n
var m=MochiKit.Color;\n
return m.Color.fromHSL(hsl);\n
},blendedColor:function(_4c1,_4c2){\n
if(typeof (_4c2)=="undefined"||_4c2===null){\n
_4c2=0.5;\n
}\n
var sf=1-_4c2;\n
var s=this.rgb;\n
var d=_4c1.rgb;\n
var df=_4c2;\n
return MochiKit.Color.Color.fromRGB((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df));\n
},compareRGB:function(_4c7){\n
var a=this.asRGB();\n
var b=_4c7.asRGB();\n
return MochiKit.Base.compare([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a]);\n
},isLight:function(){\n
return this.asHSL().b>0.5;\n
},isDark:function(){\n
return (!this.isLight());\n
},toHSLString:function(){\n
var c=this.asHSL();\n
var ccc=MochiKit.Color.clampColorComponent;\n
var rval=this._hslString;\n
if(!rval){\n
var mid=(ccc(c.h,360).toFixed(0)+","+ccc(c.s,100).toPrecision(4)+"%"+","+ccc(c.l,100).toPrecision(4)+"%");\n
var a=c.a;\n
if(a>=1){\n
a=1;\n
rval="hsl("+mid+")";\n
}else{\n
if(a<=0){\n
a=0;\n
}\n
rval="hsla("+mid+","+a+")";\n
}\n
this._hslString=rval;\n
}\n
return rval;\n
},toRGBString:function(){\n
var c=this.rgb;\n
var ccc=MochiKit.Color.clampColorComponent;\n
var rval=this._rgbString;\n
if(!rval){\n
var mid=(ccc(c.r,255).toFixed(0)+","+ccc(c.g,255).toFixed(0)+","+ccc(c.b,255).toFixed(0));\n
if(c.a!=1){\n
rval="rgba("+mid+","+c.a+")";\n
}else{\n
rval="rgb("+mid+")";\n
}\n
this._rgbString=rval;\n
}\n
return rval;\n
},asRGB:function(){\n
return MochiKit.Base.clone(this.rgb);\n
},toHexString:function(){\n
var m=MochiKit.Color;\n
var c=this.rgb;\n
var ccc=MochiKit.Color.clampColorComponent;\n
var rval=this._hexString;\n
if(!rval){\n
rval=("#"+m.toColorPart(ccc(c.r,255))+m.toColorPart(ccc(c.g,255))+m.toColorPart(ccc(c.b,255)));\n
this._hexString=rval;\n
}\n
return rval;\n
},asHSV:function(){\n
var hsv=this.hsv;\n
var c=this.rgb;\n
if(typeof (hsv)=="undefined"||hsv===null){\n
hsv=MochiKit.Color.rgbToHSV(this.rgb);\n
this.hsv=hsv;\n
}\n
return MochiKit.Base.clone(hsv);\n
},asHSL:function(){\n
var hsl=this.hsl;\n
var c=this.rgb;\n
if(typeof (hsl)=="undefined"||hsl===null){\n
hsl=MochiKit.Color.rgbToHSL(this.rgb);\n
this.hsl=hsl;\n
}\n
return MochiKit.Base.clone(hsl);\n
},toString:function(){\n
return this.toRGBString();\n
},repr:function(){\n
var c=this.rgb;\n
var col=[c.r,c.g,c.b,c.a];\n
return this.__class__.NAME+"("+col.join(", ")+")";\n
}};\n
MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_4de,blue,_4e0){\n
var _4e1=MochiKit.Color.Color;\n
if(arguments.length==1){\n
var rgb=red;\n
red=rgb.r;\n
_4de=rgb.g;\n
blue=rgb.b;\n
if(typeof (rgb.a)=="undefined"){\n
_4e0=undefined;\n
}else{\n
_4e0=rgb.a;\n
}\n
}\n
return new _4e1(red,_4de,blue,_4e0);\n
},fromHSL:function(hue,_4e4,_4e5,_4e6){\n
var m=MochiKit.Color;\n
return m.Color.fromRGB(m.hslToRGB.apply(m,arguments));\n
},fromHSV:function(hue,_4e9,_4ea,_4eb){\n
var m=MochiKit.Color;\n
return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments));\n
},fromName:function(name){\n
var _4ee=MochiKit.Color.Color;\n
if(name.charAt(0)=="\\""){\n
name=name.substr(1,name.length-2);\n
}\n
var _4ef=_4ee._namedColors[name.toLowerCase()];\n
if(typeof (_4ef)=="string"){\n
return _4ee.fromHexString(_4ef);\n
}else{\n
if(name=="transparent"){\n
return _4ee.transparentColor();\n
}\n
}\n
return null;\n
},fromString:function(_4f0){\n
var self=MochiKit.Color.Color;\n
var _4f2=_4f0.substr(0,3);\n
if(_4f2=="rgb"){\n
return self.fromRGBString(_4f0);\n
}else{\n
if(_4f2=="hsl"){\n
return self.fromHSLString(_4f0);\n
}else{\n
if(_4f0.charAt(0)=="#"){\n
return self.fromHexString(_4f0);\n
}\n
}\n
}\n
return self.fromName(_4f0);\n
},fromHexString:function(_4f3){\n
if(_4f3.charAt(0)=="#"){\n
_4f3=_4f3.substring(1);\n
}\n
var _4f4=[];\n
var i,hex;\n
if(_4f3.length==3){\n
for(i=0;i<3;i++){\n
hex=_4f3.substr(i,1);\n
_4f4.push(parseInt(hex+hex,16)/255);\n
}\n
}else{\n
for(i=0;i<6;i+=2){\n
hex=_4f3.substr(i,2);\n
_4f4.push(parseInt(hex,16)/255);\n
}\n
}\n
var _4f7=MochiKit.Color.Color;\n
return _4f7.fromRGB.apply(_4f7,_4f4);\n
},_fromColorString:function(pre,_4f9,_4fa,_4fb){\n
if(_4fb.indexOf(pre)===0){\n
_4fb=_4fb.substring(_4fb.indexOf("(",3)+1,_4fb.length-1);\n
}\n
var _4fc=_4fb.split(/\\s*,\\s*/);\n
var _4fd=[];\n
for(var i=0;i<_4fc.length;i++){\n
var c=_4fc[i];\n
var val;\n
var _501=c.substring(c.length-3);\n
if(c.charAt(c.length-1)=="%"){\n
val=0.01*parseFloat(c.substring(0,c.length-1));\n
}else{\n
if(_501=="deg"){\n
val=parseFloat(c)/360;\n
}else{\n
if(_501=="rad"){\n
val=parseFloat(c)/(Math.PI*2);\n
}else{\n
val=_4fa[i]*parseFloat(c);\n
}\n
}\n
}\n
_4fd.push(val);\n
}\n
return this[_4f9].apply(this,_4fd);\n
},fromComputedStyle:function(elem,_503){\n
var d=MochiKit.DOM;\n
var cls=MochiKit.Color.Color;\n
for(elem=d.getElement(elem);elem;elem=elem.parentNode){\n
var _506=MochiKit.Style.getStyle.apply(d,arguments);\n
if(!_506){\n
continue;\n
}\n
var _507=cls.fromString(_506);\n
if(!_507){\n
break;\n
}\n
if(_507.asRGB().a>0){\n
return _507;\n
}\n
}\n
return null;\n
},fromBackground:function(elem){\n
var cls=MochiKit.Color.Color;\n
return cls.fromComputedStyle(elem,"backgroundColor","background-color")||cls.whiteColor();\n
},fromText:function(elem){\n
var cls=MochiKit.Color.Color;\n
return cls.fromComputedStyle(elem,"color","color")||cls.blackColor();\n
},namedColors:function(){\n
return MochiKit.Base.clone(MochiKit.Color.Color._namedColors);\n
}});\n
MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_50d){\n
v*=_50d;\n
if(v<0){\n
return 0;\n
}else{\n
if(v>_50d){\n
return _50d;\n
}else{\n
return v;\n
}\n
}\n
},_hslValue:function(n1,n2,hue){\n
if(hue>6){\n
hue-=6;\n
}else{\n
if(hue<0){\n
hue+=6;\n
}\n
}\n
var val;\n
if(hue<1){\n
val=n1+(n2-n1)*hue;\n
}else{\n
if(hue<3){\n
val=n2;\n
}else{\n
if(hue<4){\n
val=n1+(n2-n1)*(4-hue);\n
}else{\n
val=n1;\n
}\n
}\n
}\n
return val;\n
},hsvToRGB:function(hue,_513,_514,_515){\n
if(arguments.length==1){\n
var hsv=hue;\n
hue=hsv.h;\n
_513=hsv.s;\n
_514=hsv.v;\n
_515=hsv.a;\n
}\n
var red;\n
var _518;\n
var blue;\n
if(_513===0){\n
red=_514;\n
_518=_514;\n
blue=_514;\n
}else{\n
var i=Math.floor(hue*6);\n
var f=(hue*6)-i;\n
var p=_514*(1-_513);\n
var q=_514*(1-(_513*f));\n
var t=_514*(1-(_513*(1-f)));\n
switch(i){\n
case 1:\n
red=q;\n
_518=_514;\n
blue=p;\n
break;\n
case 2:\n
red=p;\n
_518=_514;\n
blue=t;\n
break;\n
case 3:\n
red=p;\n
_518=q;\n
blue=_514;\n
break;\n
case 4:\n
red=t;\n
_518=p;\n
blue=_514;\n
break;\n
case 5:\n
red=_514;\n
_518=p;\n
blue=q;\n
break;\n
case 6:\n
case 0:\n
red=_514;\n
_518=t;\n
blue=p;\n
break;\n
}\n
}\n
return {r:red,g:_518,b:blue,a:_515};\n
},hslToRGB:function(hue,_520,_521,_522){\n
if(arguments.length==1){\n
var hsl=hue;\n
hue=hsl.h;\n
_520=hsl.s;\n
_521=hsl.l;\n
_522=hsl.a;\n
}\n
var red;\n
var _525;\n
var blue;\n
if(_520===0){\n
red=_521;\n
_525=_521;\n
blue=_521;\n
}else{\n
var m2;\n
if(_521<=0.5){\n
m2=_521*(1+_520);\n
}else{\n
m2=_521+_520-(_521*_520);\n
}\n
var m1=(2*_521)-m2;\n
var f=MochiKit.Color._hslValue;\n
var h6=hue*6;\n
red=f(m1,m2,h6+2);\n
_525=f(m1,m2,h6);\n
blue=f(m1,m2,h6-2);\n
}\n
return {r:red,g:_525,b:blue,a:_522};\n
},rgbToHSV:function(red,_52c,blue,_52e){\n
if(arguments.length==1){\n
var rgb=red;\n
red=rgb.r;\n
_52c=rgb.g;\n
blue=rgb.b;\n
_52e=rgb.a;\n
}\n
var max=Math.max(Math.max(red,_52c),blue);\n
var min=Math.min(Math.min(red,_52c),blue);\n
var hue;\n
var _533;\n
var _534=max;\n
if(min==max){\n
hue=0;\n
_533=0;\n
}else{\n
var _535=(max-min);\n
_533=_535/max;\n
if(red==max){\n
hue=(_52c-blue)/_535;\n
}else{\n
if(_52c==max){\n
hue=2+((blue-red)/_535);\n
}else{\n
hue=4+((red-_52c)/_535);\n
}\n
}\n
hue/=6;\n
if(hue<0){\n
hue+=1;\n
}\n
if(hue>1){\n
hue-=1;\n
}\n
}\n
return {h:hue,s:_533,v:_534,a:_52e};\n
},rgbToHSL:function(red,_537,blue,_539){\n
if(arguments.length==1){\n
var rgb=red;\n
red=rgb.r;\n
_537=rgb.g;\n
blue=rgb.b;\n
_539=rgb.a;\n
}\n
var max=Math.max(red,Math.max(_537,blue));\n
var min=Math.min(red,Math.min(_537,blue));\n
var hue;\n
var _53e;\n
var _53f=(max+min)/2;\n
var _540=max-min;\n
if(_540===0){\n
hue=0;\n
_53e=0;\n
}else{\n
if(_53f<=0.5){\n
_53e=_540/(max+min);\n
}else{\n
_53e=_540/(2-max-min);\n
}\n
if(red==max){\n
hue=(_537-blue)/_540;\n
}else{\n
if(_537==max){\n
hue=2+((blue-red)/_540);\n
}else{\n
hue=4+((red-_537)/_540);\n
}\n
}\n
hue/=6;\n
if(hue<0){\n
hue+=1;\n
}\n
if(hue>1){\n
hue-=1;\n
}\n
}\n
return {h:hue,s:_53e,l:_53f,a:_539};\n
},toColorPart:function(num){\n
num=Math.round(num);\n
var _542=num.toString(16);\n
if(num<16){\n
return "0"+_542;\n
}\n
return _542;\n
},__new__:function(){\n
var m=MochiKit.Base;\n
this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]);\n
this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]);\n
var _544=1/3;\n
var _545={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_544,_544,_544],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_544,2*_544,2*_544],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]};\n
var _546=function(name,r,g,b,a){\n
var rval=this.fromRGB(r,g,b,a);\n
this[name]=function(){\n
return rval;\n
};\n
return rval;\n
};\n
for(var k in _545){\n
var name=k+"Color";\n
var _54f=m.concat([_546,this.Color,name],_545[k]);\n
this.Color[name]=m.bind.apply(null,_54f);\n
}\n
var _550=function(){\n
for(var i=0;i<arguments.length;i++){\n
if(!(arguments[i] instanceof MochiKit.Color.Color)){\n
return false;\n
}\n
}\n
return true;\n
};\n
var _552=function(a,b){\n
return a.compareRGB(b);\n
};\n
m.nameFunctions(this);\n
m.registerComparator(this.Color.NAME,_550,_552);\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
}});\n
MochiKit.Color.EXPORT=["Color"];\n
MochiKit.Color.EXPORT_OK=["clampColorComponent","rgbToHSL","hslToRGB","rgbToHSV","hsvToRGB","toColorPart"];\n
MochiKit.Color.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Color);\n
MochiKit.Color.Color._namedColors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};\n
MochiKit.Base._deps("Signal",["Base","DOM","Style"]);\n
MochiKit.Signal.NAME="MochiKit.Signal";\n
MochiKit.Signal.VERSION="1.4.2";\n
MochiKit.Signal._observers=[];\n
MochiKit.Signal.Event=function(src,e){\n
this._event=e||window.event;\n
this._src=src;\n
};\n
MochiKit.Base.update(MochiKit.Signal.Event.prototype,{__repr__:function(){\n
var repr=MochiKit.Base.repr;\n
var str="{event(): "+repr(this.event())+", src(): "+repr(this.src())+", type(): "+repr(this.type())+", target(): "+repr(this.target());\n
if(this.type()&&this.type().indexOf("key")===0||this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu"){\n
str+=", modifier(): "+"{alt: "+repr(this.modifier().alt)+", ctrl: "+repr(this.modifier().ctrl)+", meta: "+repr(this.modifier().meta)+", shift: "+repr(this.modifier().shift)+", any: "+repr(this.modifier().any)+"}";\n
}\n
if(this.type()&&this.type().indexOf("key")===0){\n
str+=", key(): {code: "+repr(this.key().code)+", string: "+repr(this.key().string)+"}";\n
}\n
if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){\n
str+=", mouse(): {page: "+repr(this.mouse().page)+", client: "+repr(this.mouse().client);\n
if(this.type()!="mousemove"&&this.type()!="mousewheel"){\n
str+=", button: {left: "+repr(this.mouse().button.left)+", middle: "+repr(this.mouse().button.middle)+", right: "+repr(this.mouse().button.right)+"}";\n
}\n
if(this.type()=="mousewheel"){\n
str+=", wheel: "+repr(this.mouse().wheel);\n
}\n
str+="}";\n
}\n
if(this.type()=="mouseover"||this.type()=="mouseout"||this.type()=="mouseenter"||this.type()=="mouseleave"){\n
str+=", relatedTarget(): "+repr(this.relatedTarget());\n
}\n
str+="}";\n
return str;\n
},toString:function(){\n
return this.__repr__();\n
},src:function(){\n
return this._src;\n
},event:function(){\n
return this._event;\n
},type:function(){\n
if(this._event.type==="DOMMouseScroll"){\n
return "mousewheel";\n
}else{\n
return this._event.type||undefined;\n
}\n
},target:function(){\n
return this._event.target||this._event.srcElement;\n
},_relatedTarget:null,relatedTarget:function(){\n
if(this._relatedTarget!==null){\n
return this._relatedTarget;\n
}\n
var elem=null;\n
if(this.type()=="mouseover"||this.type()=="mouseenter"){\n
elem=(this._event.relatedTarget||this._event.fromElement);\n
}else{\n
if(this.type()=="mouseout"||this.type()=="mouseleave"){\n
elem=(this._event.relatedTarget||this._event.toElement);\n
}\n
}\n
try{\n
if(elem!==null&&elem.nodeType!==null){\n
this._relatedTarget=elem;\n
return elem;\n
}\n
}\n
catch(ignore){\n
}\n
return undefined;\n
},_modifier:null,modifier:function(){\n
if(this._modifier!==null){\n
return this._modifier;\n
}\n
var m={};\n
m.alt=this._event.altKey;\n
m.ctrl=this._event.ctrlKey;\n
m.meta=this._event.metaKey||false;\n
m.shift=this._event.shiftKey;\n
m.any=m.alt||m.ctrl||m.shift||m.meta;\n
this._modifier=m;\n
return m;\n
},_key:null,key:function(){\n
if(this._key!==null){\n
return this._key;\n
}\n
var k={};\n
if(this.type()&&this.type().indexOf("key")===0){\n
if(this.type()=="keydown"||this.type()=="keyup"){\n
k.code=this._event.keyCode;\n
k.string=(MochiKit.Signal._specialKeys[k.code]||"KEY_UNKNOWN");\n
this._key=k;\n
return k;\n
}else{\n
if(this.type()=="keypress"){\n
k.code=0;\n
k.string="";\n
if(typeof (this._event.charCode)!="undefined"&&this._event.charCode!==0&&!MochiKit.Signal._specialMacKeys[this._event.charCode]){\n
k.code=this._event.charCode;\n
k.string=String.fromCharCode(k.code);\n
}else{\n
if(this._event.keyCode&&typeof (this._event.charCode)=="undefined"){\n
k.code=this._event.keyCode;\n
k.string=String.fromCharCode(k.code);\n
}\n
}\n
this._key=k;\n
return k;\n
}\n
}\n
}\n
return undefined;\n
},_mouse:null,mouse:function(){\n
if(this._mouse!==null){\n
return this._mouse;\n
}\n
var m={};\n
var e=this._event;\n
if(this.type()&&(this.type().indexOf("mouse")===0||this.type().indexOf("click")!=-1||this.type()=="contextmenu")){\n
m.client=new MochiKit.Style.Coordinates(0,0);\n
if(e.clientX||e.clientY){\n
m.client.x=(!e.clientX||e.clientX<0)?0:e.clientX;\n
m.client.y=(!e.clientY||e.clientY<0)?0:e.clientY;\n
}\n
m.page=new MochiKit.Style.Coordinates(0,0);\n
if(e.pageX||e.pageY){\n
m.page.x=(!e.pageX||e.pageX<0)?0:e.pageX;\n
m.page.y=(!e.pageY||e.pageY<0)?0:e.pageY;\n
}else{\n
var de=MochiKit.DOM._document.documentElement;\n
var b=MochiKit.DOM._document.body;\n
m.page.x=e.clientX+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||0);\n
m.page.y=e.clientY+(de.scrollTop||b.scrollTop)-(de.clientTop||0);\n
}\n
if(this.type()!="mousemove"&&this.type()!="mousewheel"){\n
m.button={};\n
m.button.left=false;\n
m.button.right=false;\n
m.button.middle=false;\n
if(e.which){\n
m.button.left=(e.which==1);\n
m.button.middle=(e.which==2);\n
m.button.right=(e.which==3);\n
}else{\n
m.button.left=!!(e.button&1);\n
m.button.right=!!(e.button&2);\n
m.button.middle=!!(e.button&4);\n
}\n
}\n
if(this.type()=="mousewheel"){\n
m.wheel=new MochiKit.Style.Coordinates(0,0);\n
if(e.wheelDeltaX||e.wheelDeltaY){\n
m.wheel.x=e.wheelDeltaX/-40||0;\n
m.wheel.y=e.wheelDeltaY/-40||0;\n
}else{\n
if(e.wheelDelta){\n
m.wheel.y=e.wheelDelta/-40;\n
}else{\n
m.wheel.y=e.detail||0;\n
}\n
}\n
}\n
this._mouse=m;\n
return m;\n
}\n
return undefined;\n
},stop:function(){\n
this.stopPropagation();\n
this.preventDefault();\n
},stopPropagation:function(){\n
if(this._event.stopPropagation){\n
this._event.stopPropagation();\n
}else{\n
this._event.cancelBubble=true;\n
}\n
},preventDefault:function(){\n
if(this._event.preventDefault){\n
this._event.preventDefault();\n
}else{\n
if(this._confirmUnload===null){\n
this._event.returnValue=false;\n
}\n
}\n
},_confirmUnload:null,confirmUnload:function(msg){\n
if(this.type()=="beforeunload"){\n
this._confirmUnload=msg;\n
this._event.returnValue=msg;\n
}\n
}});\n
MochiKit.Signal._specialMacKeys={3:"KEY_ENTER",63289:"KEY_NUM_PAD_CLEAR",63276:"KEY_PAGE_UP",63277:"KEY_PAGE_DOWN",63275:"KEY_END",63273:"KEY_HOME",63234:"KEY_ARROW_LEFT",63232:"KEY_ARROW_UP",63235:"KEY_ARROW_RIGHT",63233:"KEY_ARROW_DOWN",63302:"KEY_INSERT",63272:"KEY_DELETE"};\n
(function(){\n
var _561=MochiKit.Signal._specialMacKeys;\n
for(i=63236;i<=63242;i++){\n
_561[i]="KEY_F"+(i-63236+1);\n
}\n
})();\n
MochiKit.Signal._specialKeys={8:"KEY_BACKSPACE",9:"KEY_TAB",12:"KEY_NUM_PAD_CLEAR",13:"KEY_ENTER",16:"KEY_SHIFT",17:"KEY_CTRL",18:"KEY_ALT",19:"KEY_PAUSE",20:"KEY_CAPS_LOCK",27:"KEY_ESCAPE",32:"KEY_SPACEBAR",33:"KEY_PAGE_UP",34:"KEY_PAGE_DOWN",35:"KEY_END",36:"KEY_HOME",37:"KEY_ARROW_LEFT",38:"KEY_ARROW_UP",39:"KEY_ARROW_RIGHT",40:"KEY_ARROW_DOWN",44:"KEY_PRINT_SCREEN",45:"KEY_INSERT",46:"KEY_DELETE",59:"KEY_SEMICOLON",91:"KEY_WINDOWS_LEFT",92:"KEY_WINDOWS_RIGHT",93:"KEY_SELECT",106:"KEY_NUM_PAD_ASTERISK",107:"KEY_NUM_PAD_PLUS_SIGN",109:"KEY_NUM_PAD_HYPHEN-MINUS",110:"KEY_NUM_PAD_FULL_STOP",111:"KEY_NUM_PAD_SOLIDUS",144:"KEY_NUM_LOCK",145:"KEY_SCROLL_LOCK",186:"KEY_SEMICOLON",187:"KEY_EQUALS_SIGN",188:"KEY_COMMA",189:"KEY_HYPHEN-MINUS",190:"KEY_FULL_STOP",191:"KEY_SOLIDUS",192:"KEY_GRAVE_ACCENT",219:"KEY_LEFT_SQUARE_BRACKET",220:"KEY_REVERSE_SOLIDUS",221:"KEY_RIGHT_SQUARE_BRACKET",222:"KEY_APOSTROPHE"};\n
(function(){\n
var _562=MochiKit.Signal._specialKeys;\n
for(var i=48;i<=57;i++){\n
_562[i]="KEY_"+(i-48);\n
}\n
for(i=65;i<=90;i++){\n
_562[i]="KEY_"+String.fromCharCode(i);\n
}\n
for(i=96;i<=105;i++){\n
_562[i]="KEY_NUM_PAD_"+(i-96);\n
}\n
for(i=112;i<=123;i++){\n
_562[i]="KEY_F"+(i-112+1);\n
}\n
})();\n
MochiKit.Signal.Ident=function(_564){\n
this.source=_564.source;\n
this.signal=_564.signal;\n
this.listener=_564.listener;\n
this.isDOM=_564.isDOM;\n
this.objOrFunc=_564.objOrFunc;\n
this.funcOrStr=_564.funcOrStr;\n
this.connected=_564.connected;\n
};\n
MochiKit.Signal.Ident.prototype={};\n
MochiKit.Base.update(MochiKit.Signal,{__repr__:function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
},toString:function(){\n
return this.__repr__();\n
},_unloadCache:function(){\n
var self=MochiKit.Signal;\n
var _566=self._observers;\n
for(var i=0;i<_566.length;i++){\n
if(_566[i].signal!=="onload"&&_566[i].signal!=="onunload"){\n
self._disconnect(_566[i]);\n
}\n
}\n
},_listener:function(src,sig,func,obj,_56c){\n
var self=MochiKit.Signal;\n
var E=self.Event;\n
if(!_56c){\n
if(typeof (func.im_self)=="undefined"){\n
return MochiKit.Base.bindLate(func,obj);\n
}else{\n
return func;\n
}\n
}\n
obj=obj||src;\n
if(typeof (func)=="string"){\n
if(sig==="onload"||sig==="onunload"){\n
return function(_56f){\n
obj[func].apply(obj,[new E(src,_56f)]);\n
var _570=new MochiKit.Signal.Ident({source:src,signal:sig,objOrFunc:obj,funcOrStr:func});\n
MochiKit.Signal._disconnect(_570);\n
};\n
}else{\n
return function(_571){\n
obj[func].apply(obj,[new E(src,_571)]);\n
};\n
}\n
}else{\n
if(sig==="onload"||sig==="onunload"){\n
return function(_572){\n
func.apply(obj,[new E(src,_572)]);\n
var _573=new MochiKit.Signal.Ident({source:src,signal:sig,objOrFunc:func});\n
MochiKit.Signal._disconnect(_573);\n
};\n
}else{\n
return function(_574){\n
func.apply(obj,[new E(src,_574)]);\n
};\n
}\n
}\n
},_browserAlreadyHasMouseEnterAndLeave:function(){\n
return /MSIE/.test(navigator.userAgent);\n
},_browserLacksMouseWheelEvent:function(){\n
return /Gecko\\//.test(navigator.userAgent);\n
},_mouseEnterListener:function(src,sig,func,obj){\n
var E=MochiKit.Signal.Event;\n
return function(_57a){\n
var e=new E(src,_57a);\n
try{\n
e.relatedTarget().nodeName;\n
}\n
catch(err){\n
return;\n
}\n
e.stop();\n
if(MochiKit.DOM.isChildNode(e.relatedTarget(),src)){\n
return;\n
}\n
e.type=function(){\n
return sig;\n
};\n
if(typeof (func)=="string"){\n
return obj[func].apply(obj,[e]);\n
}else{\n
return func.apply(obj,[e]);\n
}\n
};\n
},_getDestPair:function(_57c,_57d){\n
var obj=null;\n
var func=null;\n
if(typeof (_57d)!="undefined"){\n
obj=_57c;\n
func=_57d;\n
if(typeof (_57d)=="string"){\n
if(typeof (_57c[_57d])!="function"){\n
throw new Error("\'funcOrStr\' must be a function on \'objOrFunc\'");\n
}\n
}else{\n
if(typeof (_57d)!="function"){\n
throw new Error("\'funcOrStr\' must be a function or string");\n
}\n
}\n
}else{\n
if(typeof (_57c)!="function"){\n
throw new Error("\'objOrFunc\' must be a function if \'funcOrStr\' is not given");\n
}else{\n
func=_57c;\n
}\n
}\n
return [obj,func];\n
},connect:function(src,sig,_582,_583){\n
src=MochiKit.DOM.getElement(src);\n
var self=MochiKit.Signal;\n
if(typeof (sig)!="string"){\n
throw new Error("\'sig\' must be a string");\n
}\n
var _585=self._getDestPair(_582,_583);\n
var obj=_585[0];\n
var func=_585[1];\n
if(typeof (obj)=="undefined"||obj===null){\n
obj=src;\n
}\n
var _588=!!(src.addEventListener||src.attachEvent);\n
if(_588&&(sig==="onmouseenter"||sig==="onmouseleave")&&!self._browserAlreadyHasMouseEnterAndLeave()){\n
var _589=self._mouseEnterListener(src,sig.substr(2),func,obj);\n
if(sig==="onmouseenter"){\n
sig="onmouseover";\n
}else{\n
sig="onmouseout";\n
}\n
}else{\n
if(_588&&sig=="onmousewheel"&&self._browserLacksMouseWheelEvent()){\n
var _589=self._listener(src,sig,func,obj,_588);\n
sig="onDOMMouseScroll";\n
}else{\n
var _589=self._listener(src,sig,func,obj,_588);\n
}\n
}\n
if(src.addEventListener){\n
src.addEventListener(sig.substr(2),_589,false);\n
}else{\n
if(src.attachEvent){\n
src.attachEvent(sig,_589);\n
}\n
}\n
var _58a=new MochiKit.Signal.Ident({source:src,signal:sig,listener:_589,isDOM:_588,objOrFunc:_582,funcOrStr:_583,connected:true});\n
self._observers.push(_58a);\n
if(!_588&&typeof (src.__connect__)=="function"){\n
var args=MochiKit.Base.extend([_58a],arguments,1);\n
src.__connect__.apply(src,args);\n
}\n
return _58a;\n
},_disconnect:function(_58c){\n
if(!_58c.connected){\n
return;\n
}\n
_58c.connected=false;\n
var src=_58c.source;\n
var sig=_58c.signal;\n
var _58f=_58c.listener;\n
if(!_58c.isDOM){\n
if(typeof (src.__disconnect__)=="function"){\n
src.__disconnect__(_58c,sig,_58c.objOrFunc,_58c.funcOrStr);\n
}\n
return;\n
}\n
if(src.removeEventListener){\n
src.removeEventListener(sig.substr(2),_58f,false);\n
}else{\n
if(src.detachEvent){\n
src.detachEvent(sig,_58f);\n
}else{\n
throw new Error("\'src\' must be a DOM element");\n
}\n
}\n
},disconnect:function(_590){\n
var self=MochiKit.Signal;\n
var _592=self._observers;\n
var m=MochiKit.Base;\n
if(arguments.length>1){\n
var src=MochiKit.DOM.getElement(arguments[0]);\n
var sig=arguments[1];\n
var obj=arguments[2];\n
var func=arguments[3];\n
for(var i=_592.length-1;i>=0;i--){\n
var o=_592[i];\n
if(o.source===src&&o.signal===sig&&o.objOrFunc===obj&&o.funcOrStr===func){\n
self._disconnect(o);\n
if(!self._lock){\n
_592.splice(i,1);\n
}else{\n
self._dirty=true;\n
}\n
return true;\n
}\n
}\n
}else{\n
var idx=m.findIdentical(_592,_590);\n
if(idx>=0){\n
self._disconnect(_590);\n
if(!self._lock){\n
_592.splice(idx,1);\n
}else{\n
self._dirty=true;\n
}\n
return true;\n
}\n
}\n
return false;\n
},disconnectAllTo:function(_59b,_59c){\n
var self=MochiKit.Signal;\n
var _59e=self._observers;\n
var _59f=self._disconnect;\n
var _5a0=self._lock;\n
var _5a1=self._dirty;\n
if(typeof (_59c)==="undefined"){\n
_59c=null;\n
}\n
for(var i=_59e.length-1;i>=0;i--){\n
var _5a3=_59e[i];\n
if(_5a3.objOrFunc===_59b&&(_59c===null||_5a3.funcOrStr===_59c)){\n
_59f(_5a3);\n
if(_5a0){\n
_5a1=true;\n
}else{\n
_59e.splice(i,1);\n
}\n
}\n
}\n
self._dirty=_5a1;\n
},disconnectAll:function(src,sig){\n
src=MochiKit.DOM.getElement(src);\n
var m=MochiKit.Base;\n
var _5a7=m.flattenArguments(m.extend(null,arguments,1));\n
var self=MochiKit.Signal;\n
var _5a9=self._disconnect;\n
var _5aa=self._observers;\n
var i,_5ac;\n
var _5ad=self._lock;\n
var _5ae=self._dirty;\n
if(_5a7.length===0){\n
for(i=_5aa.length-1;i>=0;i--){\n
_5ac=_5aa[i];\n
if(_5ac.source===src){\n
_5a9(_5ac);\n
if(!_5ad){\n
_5aa.splice(i,1);\n
}else{\n
_5ae=true;\n
}\n
}\n
}\n
}else{\n
var sigs={};\n
for(i=0;i<_5a7.length;i++){\n
sigs[_5a7[i]]=true;\n
}\n
for(i=_5aa.length-1;i>=0;i--){\n
_5ac=_5aa[i];\n
if(_5ac.source===src&&_5ac.signal in sigs){\n
_5a9(_5ac);\n
if(!_5ad){\n
_5aa.splice(i,1);\n
}else{\n
_5ae=true;\n
}\n
}\n
}\n
}\n
self._dirty=_5ae;\n
},signal:function(src,sig){\n
var self=MochiKit.Signal;\n
var _5b3=self._observers;\n
src=MochiKit.DOM.getElement(src);\n
var args=MochiKit.Base.extend(null,arguments,2);\n
var _5b5=[];\n
self._lock=true;\n
for(var i=0;i<_5b3.length;i++){\n
var _5b7=_5b3[i];\n
if(_5b7.source===src&&_5b7.signal===sig&&_5b7.connected){\n
try{\n
_5b7.listener.apply(src,args);\n
}\n
catch(e){\n
_5b5.push(e);\n
}\n
}\n
}\n
self._lock=false;\n
if(self._dirty){\n
self._dirty=false;\n
for(var i=_5b3.length-1;i>=0;i--){\n
if(!_5b3[i].connected){\n
_5b3.splice(i,1);\n
}\n
}\n
}\n
if(_5b5.length==1){\n
throw _5b5[0];\n
}else{\n
if(_5b5.length>1){\n
var e=new Error("Multiple errors thrown in handling \'sig\', see errors property");\n
e.errors=_5b5;\n
throw e;\n
}\n
}\n
}});\n
MochiKit.Signal.EXPORT_OK=[];\n
MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll","disconnectAllTo"];\n
MochiKit.Signal.__new__=function(win){\n
var m=MochiKit.Base;\n
this._document=document;\n
this._window=win;\n
this._lock=false;\n
this._dirty=false;\n
try{\n
this.connect(window,"onunload",this._unloadCache);\n
}\n
catch(e){\n
}\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
MochiKit.Signal.__new__(this);\n
if(MochiKit.__export__){\n
connect=MochiKit.Signal.connect;\n
disconnect=MochiKit.Signal.disconnect;\n
disconnectAll=MochiKit.Signal.disconnectAll;\n
signal=MochiKit.Signal.signal;\n
}\n
MochiKit.Base._exportSymbols(this,MochiKit.Signal);\n
MochiKit.Base._deps("Position",["Base","DOM","Style"]);\n
MochiKit.Position.NAME="MochiKit.Position";\n
MochiKit.Position.VERSION="1.4.2";\n
MochiKit.Position.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Position.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Position.EXPORT_OK=[];\n
MochiKit.Position.EXPORT=[];\n
MochiKit.Base.update(MochiKit.Position,{includeScrollOffsets:false,prepare:function(){\n
var _5bb=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;\n
var _5bc=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;\n
this.windowOffset=new MochiKit.Style.Coordinates(_5bb,_5bc);\n
},cumulativeOffset:function(_5bd){\n
var _5be=0;\n
var _5bf=0;\n
do{\n
_5be+=_5bd.offsetTop||0;\n
_5bf+=_5bd.offsetLeft||0;\n
_5bd=_5bd.offsetParent;\n
}while(_5bd);\n
return new MochiKit.Style.Coordinates(_5bf,_5be);\n
},realOffset:function(_5c0){\n
var _5c1=0;\n
var _5c2=0;\n
do{\n
_5c1+=_5c0.scrollTop||0;\n
_5c2+=_5c0.scrollLeft||0;\n
_5c0=_5c0.parentNode;\n
}while(_5c0);\n
return new MochiKit.Style.Coordinates(_5c2,_5c1);\n
},within:function(_5c3,x,y){\n
if(this.includeScrollOffsets){\n
return this.withinIncludingScrolloffsets(_5c3,x,y);\n
}\n
this.xcomp=x;\n
this.ycomp=y;\n
this.offset=this.cumulativeOffset(_5c3);\n
if(_5c3.style.position=="fixed"){\n
this.offset.x+=this.windowOffset.x;\n
this.offset.y+=this.windowOffset.y;\n
}\n
return (y>=this.offset.y&&y<this.offset.y+_5c3.offsetHeight&&x>=this.offset.x&&x<this.offset.x+_5c3.offsetWidth);\n
},withinIncludingScrolloffsets:function(_5c6,x,y){\n
var _5c9=this.realOffset(_5c6);\n
this.xcomp=x+_5c9.x-this.windowOffset.x;\n
this.ycomp=y+_5c9.y-this.windowOffset.y;\n
this.offset=this.cumulativeOffset(_5c6);\n
return (this.ycomp>=this.offset.y&&this.ycomp<this.offset.y+_5c6.offsetHeight&&this.xcomp>=this.offset.x&&this.xcomp<this.offset.x+_5c6.offsetWidth);\n
},overlap:function(mode,_5cb){\n
if(!mode){\n
return 0;\n
}\n
if(mode=="vertical"){\n
return ((this.offset.y+_5cb.offsetHeight)-this.ycomp)/_5cb.offsetHeight;\n
}\n
if(mode=="horizontal"){\n
return ((this.offset.x+_5cb.offsetWidth)-this.xcomp)/_5cb.offsetWidth;\n
}\n
},absolutize:function(_5cc){\n
_5cc=MochiKit.DOM.getElement(_5cc);\n
if(_5cc.style.position=="absolute"){\n
return;\n
}\n
MochiKit.Position.prepare();\n
var _5cd=MochiKit.Position.positionedOffset(_5cc);\n
var _5ce=_5cc.clientWidth;\n
var _5cf=_5cc.clientHeight;\n
var _5d0={"position":_5cc.style.position,"left":_5cd.x-parseFloat(_5cc.style.left||0),"top":_5cd.y-parseFloat(_5cc.style.top||0),"width":_5cc.style.width,"height":_5cc.style.height};\n
_5cc.style.position="absolute";\n
_5cc.style.top=_5cd.y+"px";\n
_5cc.style.left=_5cd.x+"px";\n
_5cc.style.width=_5ce+"px";\n
_5cc.style.height=_5cf+"px";\n
return _5d0;\n
},positionedOffset:function(_5d1){\n
var _5d2=0,_5d3=0;\n
do{\n
_5d2+=_5d1.offsetTop||0;\n
_5d3+=_5d1.offsetLeft||0;\n
_5d1=_5d1.offsetParent;\n
if(_5d1){\n
p=MochiKit.Style.getStyle(_5d1,"position");\n
if(p=="relative"||p=="absolute"){\n
break;\n
}\n
}\n
}while(_5d1);\n
return new MochiKit.Style.Coordinates(_5d3,_5d2);\n
},relativize:function(_5d4,_5d5){\n
_5d4=MochiKit.DOM.getElement(_5d4);\n
if(_5d4.style.position=="relative"){\n
return;\n
}\n
MochiKit.Position.prepare();\n
var top=parseFloat(_5d4.style.top||0)-(_5d5["top"]||0);\n
var left=parseFloat(_5d4.style.left||0)-(_5d5["left"]||0);\n
_5d4.style.position=_5d5["position"];\n
_5d4.style.top=top+"px";\n
_5d4.style.left=left+"px"

]]></string> </value>
        </item>
        <item>
            <key> <string>next</string> </key>
            <value>
              <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
  <record id="4" aka="AAAAAAAAAAQ=">
    <pickle>
      <tuple>
        <global name="Pdata" module="OFS.Image"/>
        <tuple/>
      </tuple>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>data</string> </key>
            <value> <string encoding="cdata"><![CDATA[

;\n
_5d4.style.width=_5d5["width"];\n
_5d4.style.height=_5d5["height"];\n
},clone:function(_5d8,_5d9){\n
_5d8=MochiKit.DOM.getElement(_5d8);\n
_5d9=MochiKit.DOM.getElement(_5d9);\n
_5d9.style.position="absolute";\n
var _5da=this.cumulativeOffset(_5d8);\n
_5d9.style.top=_5da.y+"px";\n
_5d9.style.left=_5da.x+"px";\n
_5d9.style.width=_5d8.offsetWidth+"px";\n
_5d9.style.height=_5d8.offsetHeight+"px";\n
},page:function(_5db){\n
var _5dc=0;\n
var _5dd=0;\n
var _5de=_5db;\n
do{\n
_5dc+=_5de.offsetTop||0;\n
_5dd+=_5de.offsetLeft||0;\n
if(_5de.offsetParent==document.body&&MochiKit.Style.getStyle(_5de,"position")=="absolute"){\n
break;\n
}\n
}while(_5de=_5de.offsetParent);\n
_5de=_5db;\n
do{\n
_5dc-=_5de.scrollTop||0;\n
_5dd-=_5de.scrollLeft||0;\n
}while(_5de=_5de.parentNode);\n
return new MochiKit.Style.Coordinates(_5dd,_5dc);\n
}});\n
MochiKit.Position.__new__=function(win){\n
var m=MochiKit.Base;\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
m.nameFunctions(this);\n
};\n
MochiKit.Position.__new__(this);\n
MochiKit.Base._exportSymbols(this,MochiKit.Position);\n
MochiKit.Base._deps("Visual",["Base","DOM","Style","Color","Position"]);\n
MochiKit.Visual.NAME="MochiKit.Visual";\n
MochiKit.Visual.VERSION="1.4.2";\n
MochiKit.Visual.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Visual.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Visual._RoundCorners=function(e,_5e2){\n
e=MochiKit.DOM.getElement(e);\n
this._setOptions(_5e2);\n
if(this.options.__unstable__wrapElement){\n
e=this._doWrap(e);\n
}\n
var _5e3=this.options.color;\n
var C=MochiKit.Color.Color;\n
if(this.options.color==="fromElement"){\n
_5e3=C.fromBackground(e);\n
}else{\n
if(!(_5e3 instanceof C)){\n
_5e3=C.fromString(_5e3);\n
}\n
}\n
this.isTransparent=(_5e3.asRGB().a<=0);\n
var _5e5=this.options.bgColor;\n
if(this.options.bgColor==="fromParent"){\n
_5e5=C.fromBackground(e.offsetParent);\n
}else{\n
if(!(_5e5 instanceof C)){\n
_5e5=C.fromString(_5e5);\n
}\n
}\n
this._roundCornersImpl(e,_5e3,_5e5);\n
};\n
MochiKit.Visual._RoundCorners.prototype={_doWrap:function(e){\n
var _5e7=e.parentNode;\n
var doc=MochiKit.DOM.currentDocument();\n
if(typeof (doc.defaultView)==="undefined"||doc.defaultView===null){\n
return e;\n
}\n
var _5e9=doc.defaultView.getComputedStyle(e,null);\n
if(typeof (_5e9)==="undefined"||_5e9===null){\n
return e;\n
}\n
var _5ea=MochiKit.DOM.DIV({"style":{display:"block",marginTop:_5e9.getPropertyValue("padding-top"),marginRight:_5e9.getPropertyValue("padding-right"),marginBottom:_5e9.getPropertyValue("padding-bottom"),marginLeft:_5e9.getPropertyValue("padding-left"),padding:"0px"}});\n
_5ea.innerHTML=e.innerHTML;\n
e.innerHTML="";\n
e.appendChild(_5ea);\n
return e;\n
},_roundCornersImpl:function(e,_5ec,_5ed){\n
if(this.options.border){\n
this._renderBorder(e,_5ed);\n
}\n
if(this._isTopRounded()){\n
this._roundTopCorners(e,_5ec,_5ed);\n
}\n
if(this._isBottomRounded()){\n
this._roundBottomCorners(e,_5ec,_5ed);\n
}\n
},_renderBorder:function(el,_5ef){\n
var _5f0="1px solid "+this._borderColor(_5ef);\n
var _5f1="border-left: "+_5f0;\n
var _5f2="border-right: "+_5f0;\n
var _5f3="style=\'"+_5f1+";"+_5f2+"\'";\n
el.innerHTML="<div "+_5f3+">"+el.innerHTML+"</div>";\n
},_roundTopCorners:function(el,_5f5,_5f6){\n
var _5f7=this._createCorner(_5f6);\n
for(var i=0;i<this.options.numSlices;i++){\n
_5f7.appendChild(this._createCornerSlice(_5f5,_5f6,i,"top"));\n
}\n
el.style.paddingTop=0;\n
el.insertBefore(_5f7,el.firstChild);\n
},_roundBottomCorners:function(el,_5fa,_5fb){\n
var _5fc=this._createCorner(_5fb);\n
for(var i=(this.options.numSlices-1);i>=0;i--){\n
_5fc.appendChild(this._createCornerSlice(_5fa,_5fb,i,"bottom"));\n
}\n
el.style.paddingBottom=0;\n
el.appendChild(_5fc);\n
},_createCorner:function(_5fe){\n
var dom=MochiKit.DOM;\n
return dom.DIV({style:{backgroundColor:_5fe.toString()}});\n
},_createCornerSlice:function(_600,_601,n,_603){\n
var _604=MochiKit.DOM.SPAN();\n
var _605=_604.style;\n
_605.backgroundColor=_600.toString();\n
_605.display="block";\n
_605.height="1px";\n
_605.overflow="hidden";\n
_605.fontSize="1px";\n
var _606=this._borderColor(_600,_601);\n
if(this.options.border&&n===0){\n
_605.borderTopStyle="solid";\n
_605.borderTopWidth="1px";\n
_605.borderLeftWidth="0px";\n
_605.borderRightWidth="0px";\n
_605.borderBottomWidth="0px";\n
_605.height="0px";\n
_605.borderColor=_606.toString();\n
}else{\n
if(_606){\n
_605.borderColor=_606.toString();\n
_605.borderStyle="solid";\n
_605.borderWidth="0px 1px";\n
}\n
}\n
if(!this.options.compact&&(n==(this.options.numSlices-1))){\n
_605.height="2px";\n
}\n
this._setMargin(_604,n,_603);\n
this._setBorder(_604,n,_603);\n
return _604;\n
},_setOptions:function(_607){\n
this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false,__unstable__wrapElement:false};\n
MochiKit.Base.update(this.options,_607);\n
this.options.numSlices=(this.options.compact?2:4);\n
},_whichSideTop:function(){\n
var _608=this.options.corners;\n
if(this._hasString(_608,"all","top")){\n
return "";\n
}\n
var _609=(_608.indexOf("tl")!=-1);\n
var _60a=(_608.indexOf("tr")!=-1);\n
if(_609&&_60a){\n
return "";\n
}\n
if(_609){\n
return "left";\n
}\n
if(_60a){\n
return "right";\n
}\n
return "";\n
},_whichSideBottom:function(){\n
var _60b=this.options.corners;\n
if(this._hasString(_60b,"all","bottom")){\n
return "";\n
}\n
var _60c=(_60b.indexOf("bl")!=-1);\n
var _60d=(_60b.indexOf("br")!=-1);\n
if(_60c&&_60d){\n
return "";\n
}\n
if(_60c){\n
return "left";\n
}\n
if(_60d){\n
return "right";\n
}\n
return "";\n
},_borderColor:function(_60e,_60f){\n
if(_60e=="transparent"){\n
return _60f;\n
}else{\n
if(this.options.border){\n
return this.options.border;\n
}else{\n
if(this.options.blend){\n
return _60f.blendedColor(_60e);\n
}\n
}\n
}\n
return "";\n
},_setMargin:function(el,n,_612){\n
var _613=this._marginSize(n)+"px";\n
var _614=(_612=="top"?this._whichSideTop():this._whichSideBottom());\n
var _615=el.style;\n
if(_614=="left"){\n
_615.marginLeft=_613;\n
_615.marginRight="0px";\n
}else{\n
if(_614=="right"){\n
_615.marginRight=_613;\n
_615.marginLeft="0px";\n
}else{\n
_615.marginLeft=_613;\n
_615.marginRight=_613;\n
}\n
}\n
},_setBorder:function(el,n,_618){\n
var _619=this._borderSize(n)+"px";\n
var _61a=(_618=="top"?this._whichSideTop():this._whichSideBottom());\n
var _61b=el.style;\n
if(_61a=="left"){\n
_61b.borderLeftWidth=_619;\n
_61b.borderRightWidth="0px";\n
}else{\n
if(_61a=="right"){\n
_61b.borderRightWidth=_619;\n
_61b.borderLeftWidth="0px";\n
}else{\n
_61b.borderLeftWidth=_619;\n
_61b.borderRightWidth=_619;\n
}\n
}\n
},_marginSize:function(n){\n
if(this.isTransparent){\n
return 0;\n
}\n
var o=this.options;\n
if(o.compact&&o.blend){\n
var _61e=[1,0];\n
return _61e[n];\n
}else{\n
if(o.compact){\n
var _61f=[2,1];\n
return _61f[n];\n
}else{\n
if(o.blend){\n
var _620=[3,2,1,0];\n
return _620[n];\n
}else{\n
var _621=[5,3,2,1];\n
return _621[n];\n
}\n
}\n
}\n
},_borderSize:function(n){\n
var o=this.options;\n
var _624;\n
if(o.compact&&(o.blend||this.isTransparent)){\n
return 1;\n
}else{\n
if(o.compact){\n
_624=[1,0];\n
}else{\n
if(o.blend){\n
_624=[2,1,1,1];\n
}else{\n
if(o.border){\n
_624=[0,2,0,0];\n
}else{\n
if(this.isTransparent){\n
_624=[5,3,2,1];\n
}else{\n
return 0;\n
}\n
}\n
}\n
}\n
}\n
return _624[n];\n
},_hasString:function(str){\n
for(var i=1;i<arguments.length;i++){\n
if(str.indexOf(arguments[i])!=-1){\n
return true;\n
}\n
}\n
return false;\n
},_isTopRounded:function(){\n
return this._hasString(this.options.corners,"all","top","tl","tr");\n
},_isBottomRounded:function(){\n
return this._hasString(this.options.corners,"all","bottom","bl","br");\n
},_hasSingleTextChild:function(el){\n
return (el.childNodes.length==1&&el.childNodes[0].nodeType==3);\n
}};\n
MochiKit.Visual.roundElement=function(e,_629){\n
new MochiKit.Visual._RoundCorners(e,_629);\n
};\n
MochiKit.Visual.roundClass=function(_62a,_62b,_62c){\n
var _62d=MochiKit.DOM.getElementsByTagAndClassName(_62a,_62b);\n
for(var i=0;i<_62d.length;i++){\n
MochiKit.Visual.roundElement(_62d[i],_62c);\n
}\n
};\n
MochiKit.Visual.tagifyText=function(_62f,_630){\n
_630=_630||"position:relative";\n
if(/MSIE/.test(navigator.userAgent)){\n
_630+=";zoom:1";\n
}\n
_62f=MochiKit.DOM.getElement(_62f);\n
var ma=MochiKit.Base.map;\n
ma(function(_632){\n
if(_632.nodeType==3){\n
ma(function(_633){\n
_62f.insertBefore(MochiKit.DOM.SPAN({style:_630},_633==" "?String.fromCharCode(160):_633),_632);\n
},_632.nodeValue.split(""));\n
MochiKit.DOM.removeElement(_632);\n
}\n
},_62f.childNodes);\n
};\n
MochiKit.Visual.forceRerendering=function(_634){\n
try{\n
_634=MochiKit.DOM.getElement(_634);\n
var n=document.createTextNode(" ");\n
_634.appendChild(n);\n
_634.removeChild(n);\n
}\n
catch(e){\n
}\n
};\n
MochiKit.Visual.multiple=function(_636,_637,_638){\n
_638=MochiKit.Base.update({speed:0.1,delay:0},_638);\n
var _639=_638.delay;\n
var _63a=0;\n
MochiKit.Base.map(function(_63b){\n
_638.delay=_63a*_638.speed+_639;\n
new _637(_63b,_638);\n
_63a+=1;\n
},_636);\n
};\n
MochiKit.Visual.PAIRS={"slide":["slideDown","slideUp"],"blind":["blindDown","blindUp"],"appear":["appear","fade"],"size":["grow","shrink"]};\n
MochiKit.Visual.toggle=function(_63c,_63d,_63e){\n
_63c=MochiKit.DOM.getElement(_63c);\n
_63d=(_63d||"appear").toLowerCase();\n
_63e=MochiKit.Base.update({queue:{position:"end",scope:(_63c.id||"global"),limit:1}},_63e);\n
var v=MochiKit.Visual;\n
v[MochiKit.Style.getStyle(_63c,"display")!="none"?v.PAIRS[_63d][1]:v.PAIRS[_63d][0]](_63c,_63e);\n
};\n
MochiKit.Visual.Transitions={};\n
MochiKit.Visual.Transitions.linear=function(pos){\n
return pos;\n
};\n
MochiKit.Visual.Transitions.sinoidal=function(pos){\n
return 0.5-Math.cos(pos*Math.PI)/2;\n
};\n
MochiKit.Visual.Transitions.reverse=function(pos){\n
return 1-pos;\n
};\n
MochiKit.Visual.Transitions.flicker=function(pos){\n
return 0.25-Math.cos(pos*Math.PI)/4+Math.random()/2;\n
};\n
MochiKit.Visual.Transitions.wobble=function(pos){\n
return 0.5-Math.cos(9*pos*Math.PI)/2;\n
};\n
MochiKit.Visual.Transitions.pulse=function(pos,_646){\n
if(_646){\n
pos*=2*_646;\n
}else{\n
pos*=10;\n
}\n
var _647=pos-Math.floor(pos);\n
return (Math.floor(pos)%2==0)?_647:1-_647;\n
};\n
MochiKit.Visual.Transitions.parabolic=function(pos){\n
return pos*pos;\n
};\n
MochiKit.Visual.Transitions.none=function(pos){\n
return 0;\n
};\n
MochiKit.Visual.Transitions.full=function(pos){\n
return 1;\n
};\n
MochiKit.Visual.ScopedQueue=function(){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls();\n
}\n
this.__init__();\n
};\n
MochiKit.Base.update(MochiKit.Visual.ScopedQueue.prototype,{__init__:function(){\n
this.effects=[];\n
this.interval=null;\n
},add:function(_64c){\n
var _64d=new Date().getTime();\n
var _64e=(typeof (_64c.options.queue)=="string")?_64c.options.queue:_64c.options.queue.position;\n
var ma=MochiKit.Base.map;\n
switch(_64e){\n
case "front":\n
ma(function(e){\n
if(e.state=="idle"){\n
e.startOn+=_64c.finishOn;\n
e.finishOn+=_64c.finishOn;\n
}\n
},this.effects);\n
break;\n
case "end":\n
var _651;\n
ma(function(e){\n
var i=e.finishOn;\n
if(i>=(_651||i)){\n
_651=i;\n
}\n
},this.effects);\n
_64d=_651||_64d;\n
break;\n
case "break":\n
ma(function(e){\n
e.finalize();\n
},this.effects);\n
break;\n
}\n
_64c.startOn+=_64d;\n
_64c.finishOn+=_64d;\n
if(!_64c.options.queue.limit||this.effects.length<_64c.options.queue.limit){\n
this.effects.push(_64c);\n
}\n
if(!this.interval){\n
this.interval=this.startLoop(MochiKit.Base.bind(this.loop,this),40);\n
}\n
},startLoop:function(func,_656){\n
return setInterval(func,_656);\n
},remove:function(_657){\n
this.effects=MochiKit.Base.filter(function(e){\n
return e!=_657;\n
},this.effects);\n
if(!this.effects.length){\n
this.stopLoop(this.interval);\n
this.interval=null;\n
}\n
},stopLoop:function(_659){\n
clearInterval(_659);\n
},loop:function(){\n
var _65a=new Date().getTime();\n
MochiKit.Base.map(function(_65b){\n
_65b.loop(_65a);\n
},this.effects);\n
}});\n
MochiKit.Visual.Queues={instances:{},get:function(_65c){\n
if(typeof (_65c)!="string"){\n
return _65c;\n
}\n
if(!this.instances[_65c]){\n
this.instances[_65c]=new MochiKit.Visual.ScopedQueue();\n
}\n
return this.instances[_65c];\n
}};\n
MochiKit.Visual.Queue=MochiKit.Visual.Queues.get("global");\n
MochiKit.Visual.DefaultOptions={transition:MochiKit.Visual.Transitions.sinoidal,duration:1,fps:25,sync:false,from:0,to:1,delay:0,queue:"parallel"};\n
MochiKit.Visual.Base=function(){\n
};\n
MochiKit.Visual.Base.prototype={__class__:MochiKit.Visual.Base,start:function(_65d){\n
var v=MochiKit.Visual;\n
this.options=MochiKit.Base.setdefault(_65d,v.DefaultOptions);\n
this.currentFrame=0;\n
this.state="idle";\n
this.startOn=this.options.delay*1000;\n
this.finishOn=this.startOn+(this.options.duration*1000);\n
this.event("beforeStart");\n
if(!this.options.sync){\n
v.Queues.get(typeof (this.options.queue)=="string"?"global":this.options.queue.scope).add(this);\n
}\n
},loop:function(_65f){\n
if(_65f>=this.startOn){\n
if(_65f>=this.finishOn){\n
return this.finalize();\n
}\n
var pos=(_65f-this.startOn)/(this.finishOn-this.startOn);\n
var _661=Math.round(pos*this.options.fps*this.options.duration);\n
if(_661>this.currentFrame){\n
this.render(pos);\n
this.currentFrame=_661;\n
}\n
}\n
},render:function(pos){\n
if(this.state=="idle"){\n
this.state="running";\n
this.event("beforeSetup");\n
this.setup();\n
this.event("afterSetup");\n
}\n
if(this.state=="running"){\n
if(this.options.transition){\n
pos=this.options.transition(pos);\n
}\n
pos*=(this.options.to-this.options.from);\n
pos+=this.options.from;\n
this.event("beforeUpdate");\n
this.update(pos);\n
this.event("afterUpdate");\n
}\n
},cancel:function(){\n
if(!this.options.sync){\n
MochiKit.Visual.Queues.get(typeof (this.options.queue)=="string"?"global":this.options.queue.scope).remove(this);\n
}\n
this.state="finished";\n
},finalize:function(){\n
this.render(1);\n
this.cancel();\n
this.event("beforeFinish");\n
this.finish();\n
this.event("afterFinish");\n
},setup:function(){\n
},finish:function(){\n
},update:function(_663){\n
},event:function(_664){\n
if(this.options[_664+"Internal"]){\n
this.options[_664+"Internal"](this);\n
}\n
if(this.options[_664]){\n
this.options[_664](this);\n
}\n
},repr:function(){\n
return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]";\n
}};\n
MochiKit.Visual.Parallel=function(_665,_666){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_665,_666);\n
}\n
this.__init__(_665,_666);\n
};\n
MochiKit.Visual.Parallel.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Parallel.prototype,{__class__:MochiKit.Visual.Parallel,__init__:function(_668,_669){\n
this.effects=_668||[];\n
this.start(_669);\n
},update:function(_66a){\n
MochiKit.Base.map(function(_66b){\n
_66b.render(_66a);\n
},this.effects);\n
},finish:function(){\n
MochiKit.Base.map(function(_66c){\n
_66c.finalize();\n
},this.effects);\n
}});\n
MochiKit.Visual.Sequence=function(_66d,_66e){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_66d,_66e);\n
}\n
this.__init__(_66d,_66e);\n
};\n
MochiKit.Visual.Sequence.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Sequence.prototype,{__class__:MochiKit.Visual.Sequence,__init__:function(_670,_671){\n
var defs={transition:MochiKit.Visual.Transitions.linear,duration:0};\n
this.effects=_670||[];\n
MochiKit.Base.map(function(_673){\n
defs.duration+=_673.options.duration;\n
},this.effects);\n
MochiKit.Base.setdefault(_671,defs);\n
this.start(_671);\n
},update:function(_674){\n
var time=_674*this.options.duration;\n
for(var i=0;i<this.effects.length;i++){\n
var _677=this.effects[i];\n
if(time<=_677.options.duration){\n
_677.render(time/_677.options.duration);\n
break;\n
}else{\n
time-=_677.options.duration;\n
}\n
}\n
},finish:function(){\n
MochiKit.Base.map(function(_678){\n
_678.finalize();\n
},this.effects);\n
}});\n
MochiKit.Visual.Opacity=function(_679,_67a){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_679,_67a);\n
}\n
this.__init__(_679,_67a);\n
};\n
MochiKit.Visual.Opacity.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Opacity.prototype,{__class__:MochiKit.Visual.Opacity,__init__:function(_67c,_67d){\n
var b=MochiKit.Base;\n
var s=MochiKit.Style;\n
this.element=MochiKit.DOM.getElement(_67c);\n
if(this.element.currentStyle&&(!this.element.currentStyle.hasLayout)){\n
s.setStyle(this.element,{zoom:1});\n
}\n
_67d=b.update({from:s.getStyle(this.element,"opacity")||0,to:1},_67d);\n
this.start(_67d);\n
},update:function(_680){\n
MochiKit.Style.setStyle(this.element,{"opacity":_680});\n
}});\n
MochiKit.Visual.Move=function(_681,_682){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_681,_682);\n
}\n
this.__init__(_681,_682);\n
};\n
MochiKit.Visual.Move.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Move.prototype,{__class__:MochiKit.Visual.Move,__init__:function(_684,_685){\n
this.element=MochiKit.DOM.getElement(_684);\n
_685=MochiKit.Base.update({x:0,y:0,mode:"relative"},_685);\n
this.start(_685);\n
},setup:function(){\n
MochiKit.Style.makePositioned(this.element);\n
var s=this.element.style;\n
var _687=s.visibility;\n
var _688=s.display;\n
if(_688=="none"){\n
s.visibility="hidden";\n
s.display="";\n
}\n
this.originalLeft=parseFloat(MochiKit.Style.getStyle(this.element,"left")||"0");\n
this.originalTop=parseFloat(MochiKit.Style.getStyle(this.element,"top")||"0");\n
if(this.options.mode=="absolute"){\n
this.options.x-=this.originalLeft;\n
this.options.y-=this.originalTop;\n
}\n
if(_688=="none"){\n
s.visibility=_687;\n
s.display=_688;\n
}\n
},update:function(_689){\n
MochiKit.Style.setStyle(this.element,{left:Math.round(this.options.x*_689+this.originalLeft)+"px",top:Math.round(this.options.y*_689+this.originalTop)+"px"});\n
}});\n
MochiKit.Visual.Scale=function(_68a,_68b,_68c){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_68a,_68b,_68c);\n
}\n
this.__init__(_68a,_68b,_68c);\n
};\n
MochiKit.Visual.Scale.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Scale.prototype,{__class__:MochiKit.Visual.Scale,__init__:function(_68e,_68f,_690){\n
this.element=MochiKit.DOM.getElement(_68e);\n
_690=MochiKit.Base.update({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:_68f},_690);\n
this.start(_690);\n
},setup:function(){\n
this.restoreAfterFinish=this.options.restoreAfterFinish||false;\n
this.elementPositioning=MochiKit.Style.getStyle(this.element,"position");\n
var ma=MochiKit.Base.map;\n
var b=MochiKit.Base.bind;\n
this.originalStyle={};\n
ma(b(function(k){\n
this.originalStyle[k]=this.element.style[k];\n
},this),["top","left","width","height","fontSize"]);\n
this.originalTop=this.element.offsetTop;\n
this.originalLeft=this.element.offsetLeft;\n
var _694=MochiKit.Style.getStyle(this.element,"font-size")||"100%";\n
ma(b(function(_695){\n
if(_694.indexOf(_695)>0){\n
this.fontSize=parseFloat(_694);\n
this.fontSizeType=_695;\n
}\n
},this),["em","px","%"]);\n
this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;\n
if(/^content/.test(this.options.scaleMode)){\n
this.dims=[this.element.scrollHeight,this.element.scrollWidth];\n
}else{\n
if(this.options.scaleMode=="box"){\n
this.dims=[this.element.offsetHeight,this.element.offsetWidth];\n
}else{\n
this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth];\n
}\n
}\n
},update:function(_696){\n
var _697=(this.options.scaleFrom/100)+(this.factor*_696);\n
if(this.options.scaleContent&&this.fontSize){\n
MochiKit.Style.setStyle(this.element,{fontSize:this.fontSize*_697+this.fontSizeType});\n
}\n
this.setDimensions(this.dims[0]*_697,this.dims[1]*_697);\n
},finish:function(){\n
if(this.restoreAfterFinish){\n
MochiKit.Style.setStyle(this.element,this.originalStyle);\n
}\n
},setDimensions:function(_698,_699){\n
var d={};\n
var r=Math.round;\n
if(/MSIE/.test(navigator.userAgent)){\n
r=Math.ceil;\n
}\n
if(this.options.scaleX){\n
d.width=r(_699)+"px";\n
}\n
if(this.options.scaleY){\n
d.height=r(_698)+"px";\n
}\n
if(this.options.scaleFromCenter){\n
var topd=(_698-this.dims[0])/2;\n
var _69d=(_699-this.dims[1])/2;\n
if(this.elementPositioning=="absolute"){\n
if(this.options.scaleY){\n
d.top=this.originalTop-topd+"px";\n
}\n
if(this.options.scaleX){\n
d.left=this.originalLeft-_69d+"px";\n
}\n
}else{\n
if(this.options.scaleY){\n
d.top=-topd+"px";\n
}\n
if(this.options.scaleX){\n
d.left=-_69d+"px";\n
}\n
}\n
}\n
MochiKit.Style.setStyle(this.element,d);\n
}});\n
MochiKit.Visual.Highlight=function(_69e,_69f){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_69e,_69f);\n
}\n
this.__init__(_69e,_69f);\n
};\n
MochiKit.Visual.Highlight.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Highlight.prototype,{__class__:MochiKit.Visual.Highlight,__init__:function(_6a1,_6a2){\n
this.element=MochiKit.DOM.getElement(_6a1);\n
_6a2=MochiKit.Base.update({startcolor:"#ffff99"},_6a2);\n
this.start(_6a2);\n
},setup:function(){\n
var b=MochiKit.Base;\n
var s=MochiKit.Style;\n
if(s.getStyle(this.element,"display")=="none"){\n
this.cancel();\n
return;\n
}\n
this.oldStyle={backgroundImage:s.getStyle(this.element,"background-image")};\n
s.setStyle(this.element,{backgroundImage:"none"});\n
if(!this.options.endcolor){\n
this.options.endcolor=MochiKit.Color.Color.fromBackground(this.element).toHexString();\n
}\n
if(b.isUndefinedOrNull(this.options.restorecolor)){\n
this.options.restorecolor=s.getStyle(this.element,"background-color");\n
}\n
this._base=b.map(b.bind(function(i){\n
return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16);\n
},this),[0,1,2]);\n
this._delta=b.map(b.bind(function(i){\n
return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i];\n
},this),[0,1,2]);\n
},update:function(_6a7){\n
var m="#";\n
MochiKit.Base.map(MochiKit.Base.bind(function(i){\n
m+=MochiKit.Color.toColorPart(Math.round(this._base[i]+this._delta[i]*_6a7));\n
},this),[0,1,2]);\n
MochiKit.Style.setStyle(this.element,{backgroundColor:m});\n
},finish:function(){\n
MochiKit.Style.setStyle(this.element,MochiKit.Base.update(this.oldStyle,{backgroundColor:this.options.restorecolor}));\n
}});\n
MochiKit.Visual.ScrollTo=function(_6aa,_6ab){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_6aa,_6ab);\n
}\n
this.__init__(_6aa,_6ab);\n
};\n
MochiKit.Visual.ScrollTo.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.ScrollTo.prototype,{__class__:MochiKit.Visual.ScrollTo,__init__:function(_6ad,_6ae){\n
this.element=MochiKit.DOM.getElement(_6ad);\n
this.start(_6ae);\n
},setup:function(){\n
var p=MochiKit.Position;\n
p.prepare();\n
var _6b0=p.cumulativeOffset(this.element);\n
if(this.options.offset){\n
_6b0.y+=this.options.offset;\n
}\n
var max;\n
if(window.innerHeight){\n
max=window.innerHeight-window.height;\n
}else{\n
if(document.documentElement&&document.documentElement.clientHeight){\n
max=document.documentElement.clientHeight-document.body.scrollHeight;\n
}else{\n
if(document.body){\n
max=document.body.clientHeight-document.body.scrollHeight;\n
}\n
}\n
}\n
this.scrollStart=p.windowOffset.y;\n
this.delta=(_6b0.y>max?max:_6b0.y)-this.scrollStart;\n
},update:function(_6b2){\n
var p=MochiKit.Position;\n
p.prepare();\n
window.scrollTo(p.windowOffset.x,this.scrollStart+(_6b2*this.delta));\n
}});\n
MochiKit.Visual.CSS_LENGTH=/^(([\\+\\-]?[0-9\\.]+)(em|ex|px|in|cm|mm|pt|pc|\\%))|0$/;\n
MochiKit.Visual.Morph=function(_6b4,_6b5){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_6b4,_6b5);\n
}\n
this.__init__(_6b4,_6b5);\n
};\n
MochiKit.Visual.Morph.prototype=new MochiKit.Visual.Base();\n
MochiKit.Base.update(MochiKit.Visual.Morph.prototype,{__class__:MochiKit.Visual.Morph,__init__:function(_6b7,_6b8){\n
this.element=MochiKit.DOM.getElement(_6b7);\n
this.start(_6b8);\n
},setup:function(){\n
var b=MochiKit.Base;\n
var _6ba=this.options.style;\n
this.styleStart={};\n
this.styleEnd={};\n
this.units={};\n
var _6bb,unit;\n
for(var s in _6ba){\n
_6bb=_6ba[s];\n
s=b.camelize(s);\n
if(MochiKit.Visual.CSS_LENGTH.test(_6bb)){\n
var _6be=_6bb.match(/^([\\+\\-]?[0-9\\.]+)(.*)$/);\n
_6bb=parseFloat(_6be[1]);\n
unit=(_6be.length==3)?_6be[2]:null;\n
this.styleEnd[s]=_6bb;\n
this.units[s]=unit;\n
_6bb=MochiKit.Style.getStyle(this.element,s);\n
_6be=_6bb.match(/^([\\+\\-]?[0-9\\.]+)(.*)$/);\n
_6bb=parseFloat(_6be[1]);\n
this.styleStart[s]=_6bb;\n
}else{\n
if(/[Cc]olor$/.test(s)){\n
var c=MochiKit.Color.Color;\n
_6bb=c.fromString(_6bb);\n
if(_6bb){\n
this.units[s]="color";\n
this.styleEnd[s]=_6bb.toHexString();\n
_6bb=MochiKit.Style.getStyle(this.element,s);\n
this.styleStart[s]=c.fromString(_6bb).toHexString();\n
this.styleStart[s]=b.map(b.bind(function(i){\n
return parseInt(this.styleStart[s].slice(i*2+1,i*2+3),16);\n
},this),[0,1,2]);\n
this.styleEnd[s]=b.map(b.bind(function(i){\n
return parseInt(this.styleEnd[s].slice(i*2+1,i*2+3),16);\n
},this),[0,1,2]);\n
}\n
}else{\n
this.element.style[s]=_6bb;\n
}\n
}\n
}\n
},update:function(_6c2){\n
var _6c3;\n
for(var s in this.styleStart){\n
if(this.units[s]=="color"){\n
var m="#";\n
var _6c6=this.styleStart[s];\n
var end=this.styleEnd[s];\n
MochiKit.Base.map(MochiKit.Base.bind(function(i){\n
m+=MochiKit.Color.toColorPart(Math.round(_6c6[i]+(end[i]-_6c6[i])*_6c2));\n
},this),[0,1,2]);\n
this.element.style[s]=m;\n
}else{\n
_6c3=this.styleStart[s]+Math.round((this.styleEnd[s]-this.styleStart[s])*_6c2*1000)/1000+this.units[s];\n
this.element.style[s]=_6c3;\n
}\n
}\n
}});\n
MochiKit.Visual.fade=function(_6c9,_6ca){\n
var s=MochiKit.Style;\n
var _6cc=s.getStyle(_6c9,"opacity");\n
_6ca=MochiKit.Base.update({from:s.getStyle(_6c9,"opacity")||1,to:0,afterFinishInternal:function(_6cd){\n
if(_6cd.options.to!==0){\n
return;\n
}\n
s.hideElement(_6cd.element);\n
s.setStyle(_6cd.element,{"opacity":_6cc});\n
}},_6ca);\n
return new MochiKit.Visual.Opacity(_6c9,_6ca);\n
};\n
MochiKit.Visual.appear=function(_6ce,_6cf){\n
var s=MochiKit.Style;\n
var v=MochiKit.Visual;\n
_6cf=MochiKit.Base.update({from:(s.getStyle(_6ce,"display")=="none"?0:s.getStyle(_6ce,"opacity")||0),to:1,afterFinishInternal:function(_6d2){\n
v.forceRerendering(_6d2.element);\n
},beforeSetupInternal:function(_6d3){\n
s.setStyle(_6d3.element,{"opacity":_6d3.options.from});\n
s.showElement(_6d3.element);\n
}},_6cf);\n
return new v.Opacity(_6ce,_6cf);\n
};\n
MochiKit.Visual.puff=function(_6d4,_6d5){\n
var s=MochiKit.Style;\n
var v=MochiKit.Visual;\n
_6d4=MochiKit.DOM.getElement(_6d4);\n
var _6d8=MochiKit.Style.getElementDimensions(_6d4,true);\n
var _6d9={position:s.getStyle(_6d4,"position"),top:_6d4.style.top,left:_6d4.style.left,width:_6d4.style.width,height:_6d4.style.height,opacity:s.getStyle(_6d4,"opacity")};\n
_6d5=MochiKit.Base.update({beforeSetupInternal:function(_6da){\n
MochiKit.Position.absolutize(_6da.effects[0].element);\n
},afterFinishInternal:function(_6db){\n
s.hideElement(_6db.effects[0].element);\n
s.setStyle(_6db.effects[0].element,_6d9);\n
},scaleContent:true,scaleFromCenter:true},_6d5);\n
return new v.Parallel([new v.Scale(_6d4,200,{sync:true,scaleFromCenter:_6d5.scaleFromCenter,scaleMode:{originalHeight:_6d8.h,originalWidth:_6d8.w},scaleContent:_6d5.scaleContent,restoreAfterFinish:true}),new v.Opacity(_6d4,{sync:true,to:0})],_6d5);\n
};\n
MochiKit.Visual.blindUp=function(_6dc,_6dd){\n
var d=MochiKit.DOM;\n
var s=MochiKit.Style;\n
_6dc=d.getElement(_6dc);\n
var _6e0=s.getElementDimensions(_6dc,true);\n
var _6e1=s.makeClipping(_6dc);\n
_6dd=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleMode:{originalHeight:_6e0.h,originalWidth:_6e0.w},restoreAfterFinish:true,afterFinishInternal:function(_6e2){\n
s.hideElement(_6e2.element);\n
s.undoClipping(_6e2.element,_6e1);\n
}},_6dd);\n
return new MochiKit.Visual.Scale(_6dc,0,_6dd);\n
};\n
MochiKit.Visual.blindDown=function(_6e3,_6e4){\n
var d=MochiKit.DOM;\n
var s=MochiKit.Style;\n
_6e3=d.getElement(_6e3);\n
var _6e7=s.getElementDimensions(_6e3,true);\n
var _6e8;\n
_6e4=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_6e7.h,originalWidth:_6e7.w},restoreAfterFinish:true,afterSetupInternal:function(_6e9){\n
_6e8=s.makeClipping(_6e9.element);\n
s.setStyle(_6e9.element,{height:"0px"});\n
s.showElement(_6e9.element);\n
},afterFinishInternal:function(_6ea){\n
s.undoClipping(_6ea.element,_6e8);\n
}},_6e4);\n
return new MochiKit.Visual.Scale(_6e3,100,_6e4);\n
};\n
MochiKit.Visual.switchOff=function(_6eb,_6ec){\n
var d=MochiKit.DOM;\n
var s=MochiKit.Style;\n
_6eb=d.getElement(_6eb);\n
var _6ef=s.getElementDimensions(_6eb,true);\n
var _6f0=s.getStyle(_6eb,"opacity");\n
var _6f1;\n
_6ec=MochiKit.Base.update({duration:0.7,restoreAfterFinish:true,beforeSetupInternal:function(_6f2){\n
s.makePositioned(_6eb);\n
_6f1=s.makeClipping(_6eb);\n
},afterFinishInternal:function(_6f3){\n
s.hideElement(_6eb);\n
s.undoClipping(_6eb,_6f1);\n
s.undoPositioned(_6eb);\n
s.setStyle(_6eb,{"opacity":_6f0});\n
}},_6ec);\n
var v=MochiKit.Visual;\n
return new v.Sequence([new v.appear(_6eb,{sync:true,duration:0.57*_6ec.duration,from:0,transition:v.Transitions.flicker}),new v.Scale(_6eb,1,{sync:true,duration:0.43*_6ec.duration,scaleFromCenter:true,scaleX:false,scaleMode:{originalHeight:_6ef.h,originalWidth:_6ef.w},scaleContent:false,restoreAfterFinish:true})],_6ec);\n
};\n
MochiKit.Visual.dropOut=function(_6f5,_6f6){\n
var d=MochiKit.DOM;\n
var s=MochiKit.Style;\n
_6f5=d.getElement(_6f5);\n
var _6f9={top:s.getStyle(_6f5,"top"),left:s.getStyle(_6f5,"left"),opacity:s.getStyle(_6f5,"opacity")};\n
_6f6=MochiKit.Base.update({duration:0.5,distance:100,beforeSetupInternal:function(_6fa){\n
s.makePositioned(_6fa.effects[0].element);\n
},afterFinishInternal:function(_6fb){\n
s.hideElement(_6fb.effects[0].element);\n
s.undoPositioned(_6fb.effects[0].element);\n
s.setStyle(_6fb.effects[0].element,_6f9);\n
}},_6f6);\n
var v=MochiKit.Visual;\n
return new v.Parallel([new v.Move(_6f5,{x:0,y:_6f6.distance,sync:true}),new v.Opacity(_6f5,{sync:true,to:0})],_6f6);\n
};\n
MochiKit.Visual.shake=function(_6fd,_6fe){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var s=MochiKit.Style;\n
_6fd=d.getElement(_6fd);\n
var _702={top:s.getStyle(_6fd,"top"),left:s.getStyle(_6fd,"left")};\n
_6fe=MochiKit.Base.update({duration:0.5,afterFinishInternal:function(_703){\n
s.undoPositioned(_6fd);\n
s.setStyle(_6fd,_702);\n
}},_6fe);\n
return new v.Sequence([new v.Move(_6fd,{sync:true,duration:0.1*_6fe.duration,x:20,y:0}),new v.Move(_6fd,{sync:true,duration:0.2*_6fe.duration,x:-40,y:0}),new v.Move(_6fd,{sync:true,duration:0.2*_6fe.duration,x:40,y:0}),new v.Move(_6fd,{sync:true,duration:0.2*_6fe.duration,x:-40,y:0}),new v.Move(_6fd,{sync:true,duration:0.2*_6fe.duration,x:40,y:0}),new v.Move(_6fd,{sync:true,duration:0.1*_6fe.duration,x:-20,y:0})],_6fe);\n
};\n
MochiKit.Visual.slideDown=function(_704,_705){\n
var d=MochiKit.DOM;\n
var b=MochiKit.Base;\n
var s=MochiKit.Style;\n
_704=d.getElement(_704);\n
if(!_704.firstChild){\n
throw new Error("MochiKit.Visual.slideDown must be used on a element with a child");\n
}\n
d.removeEmptyTextNodes(_704);\n
var _709=s.getStyle(_704.firstChild,"bottom")||0;\n
var _70a=s.getElementDimensions(_704,true);\n
var _70b;\n
_705=b.update({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:_70a.h,originalWidth:_70a.w},restoreAfterFinish:true,afterSetupInternal:function(_70c){\n
s.makePositioned(_70c.element);\n
s.makePositioned(_70c.element.firstChild);\n
if(/Opera/.test(navigator.userAgent)){\n
s.setStyle(_70c.element,{top:""});\n
}\n
_70b=s.makeClipping(_70c.element);\n
s.setStyle(_70c.element,{height:"0px"});\n
s.showElement(_70c.element);\n
},afterUpdateInternal:function(_70d){\n
var _70e=s.getElementDimensions(_70d.element,true);\n
s.setStyle(_70d.element.firstChild,{bottom:(_70d.dims[0]-_70e.h)+"px"});\n
},afterFinishInternal:function(_70f){\n
s.undoClipping(_70f.element,_70b);\n
if(/MSIE/.test(navigator.userAgent)){\n
s.undoPositioned(_70f.element);\n
s.undoPositioned(_70f.element.firstChild);\n
}else{\n
s.undoPositioned(_70f.element.firstChild);\n
s.undoPositioned(_70f.element);\n
}\n
s.setStyle(_70f.element.firstChild,{bottom:_709});\n
}},_705);\n
return new MochiKit.Visual.Scale(_704,100,_705);\n
};\n
MochiKit.Visual.slideUp=function(_710,_711){\n
var d=MochiKit.DOM;\n
var b=MochiKit.Base;\n
var s=MochiKit.Style;\n
_710=d.getElement(_710);\n
if(!_710.firstChild){\n
throw new Error("MochiKit.Visual.slideUp must be used on a element with a child");\n
}\n
d.removeEmptyTextNodes(_710);\n
var _715=s.getStyle(_710.firstChild,"bottom");\n
var _716=s.getElementDimensions(_710,true);\n
var _717;\n
_711=b.update({scaleContent:false,scaleX:false,scaleMode:{originalHeight:_716.h,originalWidth:_716.w},scaleFrom:100,restoreAfterFinish:true,beforeStartInternal:function(_718){\n
s.makePositioned(_718.element);\n
s.makePositioned(_718.element.firstChild);\n
if(/Opera/.test(navigator.userAgent)){\n
s.setStyle(_718.element,{top:""});\n
}\n
_717=s.makeClipping(_718.element);\n
s.showElement(_718.element);\n
},afterUpdateInternal:function(_719){\n
var _71a=s.getElementDimensions(_719.element,true);\n
s.setStyle(_719.element.firstChild,{bottom:(_719.dims[0]-_71a.h)+"px"});\n
},afterFinishInternal:function(_71b){\n
s.hideElement(_71b.element);\n
s.undoClipping(_71b.element,_717);\n
s.undoPositioned(_71b.element.firstChild);\n
s.undoPositioned(_71b.element);\n
s.setStyle(_71b.element.firstChild,{bottom:_715});\n
}},_711);\n
return new MochiKit.Visual.Scale(_710,0,_711);\n
};\n
MochiKit.Visual.squish=function(_71c,_71d){\n
var d=MochiKit.DOM;\n
var b=MochiKit.Base;\n
var s=MochiKit.Style;\n
var _721=s.getElementDimensions(_71c,true);\n
var _722;\n
_71d=b.update({restoreAfterFinish:true,scaleMode:{originalHeight:_721.w,originalWidth:_721.h},beforeSetupInternal:function(_723){\n
_722=s.makeClipping(_723.element);\n
},afterFinishInternal:function(_724){\n
s.hideElement(_724.element);\n
s.undoClipping(_724.element,_722);\n
}},_71d);\n
return new MochiKit.Visual.Scale(_71c,/Opera/.test(navigator.userAgent)?1:0,_71d);\n
};\n
MochiKit.Visual.grow=function(_725,_726){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var s=MochiKit.Style;\n
_725=d.getElement(_725);\n
_726=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.full,scaleContent:true,scaleFromCenter:false},_726);\n
var _72a={top:_725.style.top,left:_725.style.left,height:_725.style.height,width:_725.style.width,opacity:s.getStyle(_725,"opacity")};\n
var dims=s.getElementDimensions(_725,true);\n
var _72c,_72d;\n
var _72e,_72f;\n
switch(_726.direction){\n
case "top-left":\n
_72c=_72d=_72e=_72f=0;\n
break;\n
case "top-right":\n
_72c=dims.w;\n
_72d=_72f=0;\n
_72e=-dims.w;\n
break;\n
case "bottom-left":\n
_72c=_72e=0;\n
_72d=dims.h;\n
_72f=-dims.h;\n
break;\n
case "bottom-right":\n
_72c=dims.w;\n
_72d=dims.h;\n
_72e=-dims.w;\n
_72f=-dims.h;\n
break;\n
case "center":\n
_72c=dims.w/2;\n
_72d=dims.h/2;\n
_72e=-dims.w/2;\n
_72f=-dims.h/2;\n
break;\n
}\n
var _730=MochiKit.Base.update({beforeSetupInternal:function(_731){\n
s.setStyle(_731.effects[0].element,{height:"0px"});\n
s.showElement(_731.effects[0].element);\n
},afterFinishInternal:function(_732){\n
s.undoClipping(_732.effects[0].element);\n
s.undoPositioned(_732.effects[0].element);\n
s.setStyle(_732.effects[0].element,_72a);\n
}},_726);\n
return new v.Move(_725,{x:_72c,y:_72d,duration:0.01,beforeSetupInternal:function(_733){\n
s.hideElement(_733.element);\n
s.makeClipping(_733.element);\n
s.makePositioned(_733.element);\n
},afterFinishInternal:function(_734){\n
new v.Parallel([new v.Opacity(_734.element,{sync:true,to:1,from:0,transition:_726.opacityTransition}),new v.Move(_734.element,{x:_72e,y:_72f,sync:true,transition:_726.moveTransition}),new v.Scale(_734.element,100,{scaleMode:{originalHeight:dims.h,originalWidth:dims.w},sync:true,scaleFrom:/Opera/.test(navigator.userAgent)?1:0,transition:_726.scaleTransition,scaleContent:_726.scaleContent,scaleFromCenter:_726.scaleFromCenter,restoreAfterFinish:true})],_730);\n
}});\n
};\n
MochiKit.Visual.shrink=function(_735,_736){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var s=MochiKit.Style;\n
_735=d.getElement(_735);\n
_736=MochiKit.Base.update({direction:"center",moveTransition:v.Transitions.sinoidal,scaleTransition:v.Transitions.sinoidal,opacityTransition:v.Transitions.none,scaleContent:true,scaleFromCenter:false},_736);\n
var _73a={top:_735.style.top,left:_735.style.left,height:_735.style.height,width:_735.style.width,opacity:s.getStyle(_735,"opacity")};\n
var dims=s.getElementDimensions(_735,true);\n
var _73c,_73d;\n
switch(_736.direction){\n
case "top-left":\n
_73c=_73d=0;\n
break;\n
case "top-right":\n
_73c=dims.w;\n
_73d=0;\n
break;\n
case "bottom-left":\n
_73c=0;\n
_73d=dims.h;\n
break;\n
case "bottom-right":\n
_73c=dims.w;\n
_73d=dims.h;\n
break;\n
case "center":\n
_73c=dims.w/2;\n
_73d=dims.h/2;\n
break;\n
}\n
var _73e;\n
var _73f=MochiKit.Base.update({beforeStartInternal:function(_740){\n
s.makePositioned(_740.effects[0].element);\n
_73e=s.makeClipping(_740.effects[0].element);\n
},afterFinishInternal:function(_741){\n
s.hideElement(_741.effects[0].element);\n
s.undoClipping(_741.effects[0].element,_73e);\n
s.undoPositioned(_741.effects[0].element);\n
s.setStyle(_741.effects[0].element,_73a);\n
}},_736);\n
return new v.Parallel([new v.Opacity(_735,{sync:true,to:0,from:1,transition:_736.opacityTransition}),new v.Scale(_735,/Opera/.test(navigator.userAgent)?1:0,{scaleMode:{originalHeight:dims.h,originalWidth:dims.w},sync:true,transition:_736.scaleTransition,scaleContent:_736.scaleContent,scaleFromCenter:_736.scaleFromCenter,restoreAfterFinish:true}),new v.Move(_735,{x:_73c,y:_73d,sync:true,transition:_736.moveTransition})],_73f);\n
};\n
MochiKit.Visual.pulsate=function(_742,_743){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var b=MochiKit.Base;\n
var _747=MochiKit.Style.getStyle(_742,"opacity");\n
_743=b.update({duration:3,from:0,afterFinishInternal:function(_748){\n
MochiKit.Style.setStyle(_748.element,{"opacity":_747});\n
}},_743);\n
var _749=_743.transition||v.Transitions.sinoidal;\n
_743.transition=function(pos){\n
return _749(1-v.Transitions.pulse(pos,_743.pulses));\n
};\n
return new v.Opacity(_742,_743);\n
};\n
MochiKit.Visual.fold=function(_74b,_74c){\n
var d=MochiKit.DOM;\n
var v=MochiKit.Visual;\n
var s=MochiKit.Style;\n
_74b=d.getElement(_74b);\n
var _750=s.getElementDimensions(_74b,true);\n
var _751={top:_74b.style.top,left:_74b.style.left,width:_74b.style.width,height:_74b.style.height};\n
var _752=s.makeClipping(_74b);\n
_74c=MochiKit.Base.update({scaleContent:false,scaleX:false,scaleMode:{originalHeight:_750.h,originalWidth:_750.w},afterFinishInternal:function(_753){\n
new v.Scale(_74b,1,{scaleContent:false,scaleY:false,scaleMode:{originalHeight:_750.h,originalWidth:_750.w},afterFinishInternal:function(_754){\n
s.hideElement(_754.element);\n
s.undoClipping(_754.element,_752);\n
s.setStyle(_754.element,_751);\n
}});\n
}},_74c);\n
return new v.Scale(_74b,5,_74c);\n
};\n
MochiKit.Visual.Color=MochiKit.Color.Color;\n
MochiKit.Visual.getElementsComputedStyle=MochiKit.DOM.computedStyle;\n
MochiKit.Visual.__new__=function(){\n
var m=MochiKit.Base;\n
m.nameFunctions(this);\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)};\n
};\n
MochiKit.Visual.EXPORT=["roundElement","roundClass","tagifyText","multiple","toggle","Parallel","Sequence","Opacity","Move","Scale","Highlight","ScrollTo","Morph","fade","appear","puff","blindUp","blindDown","switchOff","dropOut","shake","slideDown","slideUp","squish","grow","shrink","pulsate","fold"];\n
MochiKit.Visual.EXPORT_OK=["Base","PAIRS"];\n
MochiKit.Visual.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Visual);\n
MochiKit.Base._deps("DragAndDrop",["Base","Iter","DOM","Signal","Visual","Position"]);\n
MochiKit.DragAndDrop.NAME="MochiKit.DragAndDrop";\n
MochiKit.DragAndDrop.VERSION="1.4.2";\n
MochiKit.DragAndDrop.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.DragAndDrop.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.DragAndDrop.EXPORT=["Droppable","Draggable"];\n
MochiKit.DragAndDrop.EXPORT_OK=["Droppables","Draggables"];\n
MochiKit.DragAndDrop.Droppables={drops:[],remove:function(_756){\n
this.drops=MochiKit.Base.filter(function(d){\n
return d.element!=MochiKit.DOM.getElement(_756);\n
},this.drops);\n
},register:function(drop){\n
this.drops.push(drop);\n
},unregister:function(drop){\n
this.drops=MochiKit.Base.filter(function(d){\n
return d!=drop;\n
},this.drops);\n
},prepare:function(_75b){\n
MochiKit.Base.map(function(drop){\n
if(drop.isAccepted(_75b)){\n
if(drop.options.activeclass){\n
MochiKit.DOM.addElementClass(drop.element,drop.options.activeclass);\n
}\n
drop.options.onactive(drop.element,_75b);\n
}\n
},this.drops);\n
},findDeepestChild:function(_75d){\n
deepest=_75d[0];\n
for(i=1;i<_75d.length;++i){\n
if(MochiKit.DOM.isChildNode(_75d[i].element,deepest.element)){\n
deepest=_75d[i];\n
}\n
}\n
return deepest;\n
},show:function(_75e,_75f){\n
if(!this.drops.length){\n
return;\n
}\n
var _760=[];\n
if(this.last_active){\n
this.last_active.deactivate();\n
}\n
MochiKit.Iter.forEach(this.drops,function(drop){\n
if(drop.isAffected(_75e,_75f)){\n
_760.push(drop);\n
}\n
});\n
if(_760.length>0){\n
drop=this.findDeepestChild(_760);\n
MochiKit.Position.within(drop.element,_75e.page.x,_75e.page.y);\n
drop.options.onhover(_75f,drop.element,MochiKit.Position.overlap(drop.options.overlap,drop.element));\n
drop.activate();\n
}\n
},fire:function(_762,_763){\n
if(!this.last_active){\n
return;\n
}\n
MochiKit.Position.prepare();\n
if(this.last_active.isAffected(_762.mouse(),_763)){\n
this.last_active.options.ondrop(_763,this.last_active.element,_762);\n
}\n
},reset:function(_764){\n
MochiKit.Base.map(function(drop){\n
if(drop.options.activeclass){\n
MochiKit.DOM.removeElementClass(drop.element,drop.options.activeclass);\n
}\n
drop.options.ondesactive(drop.element,_764);\n
},this.drops);\n
if(this.last_active){\n
this.last_active.deactivate();\n
}\n
}};\n
MochiKit.DragAndDrop.Droppable=function(_766,_767){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_766,_767);\n
}\n
this.__init__(_766,_767);\n
};\n
MochiKit.DragAndDrop.Droppable.prototype={__class__:MochiKit.DragAndDrop.Droppable,__init__:function(_769,_76a){\n
var d=MochiKit.DOM;\n
var b=MochiKit.Base;\n
this.element=d.getElement(_769);\n
this.options=b.update({greedy:true,hoverclass:null,activeclass:null,hoverfunc:b.noop,accept:null,onactive:b.noop,ondesactive:b.noop,onhover:b.noop,ondrop:b.noop,containment:[],tree:false},_76a);\n
this.options._containers=[];\n
b.map(MochiKit.Base.bind(function(c){\n
this.options._containers.push(d.getElement(c));\n
},this),this.options.containment);\n
MochiKit.Style.makePositioned(this.element);\n
MochiKit.DragAndDrop.Droppables.register(this);\n
},isContained:function(_76e){\n
if(this.options._containers.length){\n
var _76f;\n
if(this.options.tree){\n
_76f=_76e.treeNode;\n
}else{\n
_76f=_76e.parentNode;\n
}\n
return MochiKit.Iter.some(this.options._containers,function(c){\n
return _76f==c;\n
});\n
}else{\n
return true;\n
}\n
},isAccepted:function(_771){\n
return ((!this.options.accept)||MochiKit.Iter.some(this.options.accept,function(c){\n
return MochiKit.DOM.hasElementClass(_771,c);\n
}));\n
},isAffected:function(_773,_774){\n
return ((this.element!=_774)&&this.isContained(_774)&&this.isAccepted(_774)&&MochiKit.Position.within(this.element,_773.page.x,_773.page.y));\n
},deactivate:function(){\n
if(this.options.hoverclass){\n
MochiKit.DOM.removeElementClass(this.element,this.options.hoverclass);\n
}\n
this.options.hoverfunc(this.element,false);\n
MochiKit.DragAndDrop.Droppables.last_active=null;\n
},activate:function(){\n
if(this.options.hoverclass){\n
MochiKit.DOM.addElementClass(this.element,this.options.hoverclass);\n
}\n
this.options.hoverfunc(this.element,true);\n
MochiKit.DragAndDrop.Droppables.last_active=this;\n
},destroy:function(){\n
MochiKit.DragAndDrop.Droppables.unregister(this);\n
},repr:function(){\n
return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]";\n
}};\n
MochiKit.DragAndDrop.Draggables={drags:[],register:function(_775){\n
if(this.drags.length===0){\n
var conn=MochiKit.Signal.connect;\n
this.eventMouseUp=conn(document,"onmouseup",this,this.endDrag);\n
this.eventMouseMove=conn(document,"onmousemove",this,this.updateDrag);\n
this.eventKeypress=conn(document,"onkeypress",this,this.keyPress);\n
}\n
this.drags.push(_775);\n
},unregister:function(_777){\n
this.drags=MochiKit.Base.filter(function(d){\n
return d!=_777;\n
},this.drags);\n
if(this.drags.length===0){\n
var disc=MochiKit.Signal.disconnect;\n
disc(this.eventMouseUp);\n
disc(this.eventMouseMove);\n
disc(this.eventKeypress);\n
}\n
},activate:function(_77a){\n
window.focus();\n
this.activeDraggable=_77a;\n
},deactivate:function(){\n
this.activeDraggable=null;\n
},updateDrag:function(_77b){\n
if(!this.activeDraggable){\n
return;\n
}\n
var _77c=_77b.mouse();\n
if(this._lastPointer&&(MochiKit.Base.repr(this._lastPointer.page)==MochiKit.Base.repr(_77c.page))){\n
return;\n
}\n
this._lastPointer=_77c;\n
this.activeDraggable.updateDrag(_77b,_77c);\n
},endDrag:function(_77d){\n
if(!this.activeDraggable){\n
return;\n
}\n
this._lastPointer=null;\n
this.activeDraggable.endDrag(_77d);\n
this.activeDraggable=null;\n
},keyPress:function(_77e){\n
if(this.activeDraggable){\n
this.activeDraggable.keyPress(_77e);\n
}\n
},notify:function(_77f,_780,_781){\n
MochiKit.Signal.signal(this,_77f,_780,_781);\n
}};\n
MochiKit.DragAndDrop.Draggable=function(_782,_783){\n
var cls=arguments.callee;\n
if(!(this instanceof cls)){\n
return new cls(_782,_783);\n
}\n
this.__init__(_782,_783);\n
};\n
MochiKit.DragAndDrop.Draggable.prototype={__class__:MochiKit.DragAndDrop.Draggable,__init__:function(_785,_786){\n
var v=MochiKit.Visual;\n
var b=MochiKit.Base;\n
_786=b.update({handle:false,starteffect:function(_789){\n
this._savedOpacity=MochiKit.Style.getStyle(_789,"opacity")||1;\n
new v.Opacity(_789,{duration:0.2,from:this._savedOpacity,to:0.7});\n
},reverteffect:function(_78a,_78b,_78c){\n
var dur=Math.sqrt(Math.abs(_78b^2)+Math.abs(_78c^2))*0.02;\n
return new v.Move(_78a,{x:-_78c,y:-_78b,duration:dur});\n
},endeffect:function(_78e){\n
new v.Opacity(_78e,{duration:0.2,from:0.7,to:this._savedOpacity});\n
},onchange:b.noop,zindex:1000,revert:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,snap:false},_786);\n
var d=MochiKit.DOM;\n
this.element=d.getElement(_785);\n
if(_786.handle&&(typeof (_786.handle)=="string")){\n
this.handle=d.getFirstElementByTagAndClassName(null,_786.handle,this.element);\n
}\n
if(!this.handle){\n
this.handle=d.getElement(_786.handle);\n
}\n
if(!this.handle){\n
this.handle=this.element;\n
}\n
if(_786.scroll&&!_786.scroll.scrollTo&&!_786.scroll.outerHTML){\n
_786.scroll=d.getElement(_786.scroll);\n
this._isScrollChild=MochiKit.DOM.isChildNode(this.element,_786.scroll);\n
}\n
MochiKit.Style.makePositioned(this.element);\n
this.delta=this.currentDelta();\n
this.options=_786;\n
this.dragging=false;\n
this.eventMouseDown=MochiKit.Signal.connect(this.handle,"onmousedown",this,this.initDrag);\n
MochiKit.DragAndDrop.Draggables.register(this);\n
},destroy:function(){\n
MochiKit.Signal.disconnect(this.eventMouseDown);\n
MochiKit.DragAndDrop.Draggables.unregister(this);\n
},currentDelta:function(){\n
var s=MochiKit.Style.getStyle;\n
return [parseInt(s(this.element,"left")||"0"),parseInt(s(this.element,"top")||"0")];\n
},initDrag:function(_791){\n
if(!_791.mouse().button.left){\n
return;\n
}\n
var src=_791.target();\n
var _793=(src.tagName||"").toUpperCase();\n
if(_793==="INPUT"||_793==="SELECT"||_793==="OPTION"||_793==="BUTTON"||_793==="TEXTAREA"){\n
return;\n
}\n
if(this._revert){\n
this._revert.cancel();\n
this._revert=null;\n
}\n
var _794=_791.mouse();\n
var pos=MochiKit.Position.cumulativeOffset(this.element);\n
this.offset=[_794.page.x-pos.x,_794.page.y-pos.y];\n
MochiKit.DragAndDrop.Draggables.activate(this);\n
_791.stop();\n
},startDrag:function(_796){\n
this.dragging=true;\n
if(this.options.selectclass){\n
MochiKit.DOM.addElementClass(this.element,this.options.selectclass);\n
}\n
if(this.options.zindex){\n
this.originalZ=parseInt(MochiKit.Style.getStyle(this.element,"z-index")||"0");\n
this.element.style.zIndex=this.options.zindex;\n
}\n
if(this.options.ghosting){\n
this._clone=this.element.cloneNode(true);\n
this.ghostPosition=MochiKit.Position.absolutize(this.element);\n
this.element.parentNode.insertBefore(this._clone,this.element);\n
}\n
if(this.options.scroll){\n
if(this.options.scroll==window){\n
var _797=this._getWindowScroll(this.options.scroll);\n
this.originalScrollLeft=_797.left;\n
this.originalScrollTop=_797.top;\n
}else{\n
this.originalScrollLeft=this.options.scroll.scrollLeft;\n
this.originalScrollTop=this.options.scroll.scrollTop;\n
}\n
}\n
MochiKit.DragAndDrop.Droppables.prepare(this.element);\n
MochiKit.DragAndDrop.Draggables.notify("start",this,_796);\n
if(this.options.starteffect){\n
this.options.starteffect(this.element);\n
}\n
},updateDrag:function(_798,_799){\n
if(!this.dragging){\n
this.startDrag(_798);\n
}\n
MochiKit.Position.prepare();\n
MochiKit.DragAndDrop.Droppables.show(_799,this.element);\n
MochiKit.DragAndDrop.Draggables.notify("drag",this,_798);\n
this.draw(_799);\n
this.options.onchange(this);\n
if(this.options.scroll){\n
this.stopScrolling();\n
var p,q;\n
if(this.options.scroll==window){\n
var s=this._getWindowScroll(this.options.scroll);\n
p=new MochiKit.Style.Coordinates(s.left,s.top);\n
q=new MochiKit.Style.Coordinates(s.left+s.width,s.top+s.height);\n
}else{\n
p=MochiKit.Position.page(this.options.scroll);\n
p.x+=this.options.scroll.scrollLeft;\n
p.y+=this.options.scroll.scrollTop;\n
p.x+=(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0);\n
p.y+=(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0);\n
q=new MochiKit.Style.Coordinates(p.x+this.options.scroll.offsetWidth,p.y+this.options.scroll.offsetHeight);\n
}\n
var _79d=[0,0];\n
if(_799.page.x>(q.x-this.options.scrollSensitivity)){\n
_79d[0]=_799.page.x-(q.x-this.options.scrollSensitivity);\n
}else{\n
if(_799.page.x<(p.x+this.options.scrollSensitivity)){\n
_79d[0]=_799.page.x-(p.x+this.options.scrollSensitivity);\n
}\n
}\n
if(_799.page.y>(q.y-this.options.scrollSensitivity)){\n
_79d[1]=_799.page.y-(q.y-this.options.scrollSensitivity);\n
}else{\n
if(_799.page.y<(p.y+this.options.scrollSensitivity)){\n
_79d[1]=_799.page.y-(p.y+this.options.scrollSensitivity);\n
}\n
}\n
this.startScrolling(_79d);\n
}\n
if(/AppleWebKit/.test(navigator.appVersion)){\n
window.scrollBy(0,0);\n
}\n
_798.stop();\n
},finishDrag:function(_79e,_79f){\n
var dr=MochiKit.DragAndDrop;\n
this.dragging=false;\n
if(this.options.selectclass){\n
MochiKit.DOM.removeElementClass(this.element,this.options.selectclass);\n
}\n
if(this.options.ghosting){\n
MochiKit.Position.relativize(this.element,this.ghostPosition);\n
MochiKit.DOM.removeElement(this._clone);\n
this._clone=null;\n
}\n
if(_79f){\n
dr.Droppables.fire(_79e,this.element);\n
}\n
dr.Draggables.notify("end",this,_79e);\n
var _7a1=this.options.revert;\n
if(_7a1&&typeof (_7a1)=="function"){\n
_7a1=_7a1(this.element);\n
}\n
var d=this.currentDelta();\n
if(_7a1&&this.options.reverteffect){\n
this._revert=this.options.reverteffect(this.element,d[1]-this.delta[1],d[0]-this.delta[0]);\n
}else{\n
this.delta=d;\n
}\n
if(this.options.zindex){\n
this.element.style.zIndex=this.originalZ;\n
}\n
if(this.options.endeffect){\n
this.options.endeffect(this.element);\n
}\n
dr.Draggables.deactivate();\n
dr.Droppables.reset(this.element);\n
},keyPress:function(_7a3){\n
if(_7a3.key().string!="KEY_ESCAPE"){\n
return;\n
}\n
this.finishDrag(_7a3,false);\n
_7a3.stop();\n
},endDrag:function(_7a4){\n
if(!this.dragging){\n
return;\n
}\n
this.stopScrolling();\n
this.finishDrag(_7a4,true);\n
_7a4.stop();\n
},draw:function(_7a5){\n
var pos=MochiKit.Position.cumulativeOffset(this.element);\n
var d=this.currentDelta();\n
pos.x-=d[0];\n
pos.y-=d[1];\n
if(this.options.scroll&&(this.options.scroll!=window&&this._isScrollChild)){\n
pos.x-=this.options.scroll.scrollLeft-this.originalScrollLeft;\n
pos.y-=this.options.scroll.scrollTop-this.originalScrollTop;\n
}\n
var p=[_7a5.page.x-pos.x-this.offset[0],_7a5.page.y-pos.y-this.offset[1]];\n
if(this.options.snap){\n
if(typeof (this.options.snap)=="function"){\n
p=this.options.snap(p[0],p[1]);\n
}else{\n
if(this.options.snap instanceof Array){\n
var i=-1;\n
p=MochiKit.Base.map(MochiKit.Base.bind(function(v){\n
i+=1;\n
return Math.round(v/this.options.snap[i])*this.options.snap[i];\n
},this),p);\n
}else{\n
p=MochiKit.Base.map(MochiKit.Base.bind(function(v){\n
return Math.round(v/this.options.snap)*this.options.snap;\n
},this),p);\n
}\n
}\n
}\n
var _7ac=this.element.style;\n
if((!this.options.constraint)||(this.options.constraint=="horizontal")){\n
_7ac.left=p[0]+"px";\n
}\n
if((!this.options.constraint)||(this.options.constraint=="vertical")){\n
_7ac.top=p[1]+"px";\n
}\n
if(_7ac.visibility=="hidden"){\n
_7ac.visibility="";\n
}\n
},stopScrolling:function(){\n
if(this.scrollInterval){\n
clearInterval(this.scrollInterval);\n
this.scrollInterval=null;\n
MochiKit.DragAndDrop.Draggables._lastScrollPointer=null;\n
}\n
},startScrolling:function(_7ad){\n
if(!_7ad[0]&&!_7ad[1]){\n
return;\n
}\n
this.scrollSpeed=[_7ad[0]*this.options.scrollSpeed,_7ad[1]*this.options.scrollSpeed];\n
this.lastScrolled=new Date();\n
this.scrollInterval=setInterval(MochiKit.Base.bind(this.scroll,this),10);\n
},scroll:function(){\n
var _7ae=new Date();\n
var _7af=_7ae-this.lastScrolled;\n
this.lastScrolled=_7ae;\n
if(this.options.scroll==window){\n
var s=this._getWindowScroll(this.options.scroll);\n
if(this.scrollSpeed[0]||this.scrollSpeed[1]){\n
var dm=_7af/1000;\n
this.options.scroll.scrollTo(s.left+dm*this.scrollSpeed[0],s.top+dm*this.scrollSpeed[1]);\n
}\n
}else{\n
this.options.scroll.scrollLeft+=this.scrollSpeed[0]*_7af/1000;\n
this.options.scroll.scrollTop+=this.scrollSpeed[1]*_7af/1000;\n
}\n
var d=MochiKit.DragAndDrop;\n
MochiKit.Position.prepare();\n
d.Droppables.show(d.Draggables._lastPointer,this.element);\n
d.Draggables.notify("drag",this);\n
if(this._isScrollChild){\n
d.Draggables._lastScrollPointer=d.Draggables._lastScrollPointer||d.Draggables._lastPointer;\n
d.Draggables._lastScrollPointer.x+=this.scrollSpeed[0]*_7af/1000;\n
d.Draggables._lastScrollPointer.y+=this.scrollSpeed[1]*_7af/1000;\n
if(d.Draggables._lastScrollPointer.x<0){\n
d.Draggables._lastScrollPointer.x=0;\n
}\n
if(d.Draggables._lastScrollPointer.y<0){\n
d.Draggables._lastScrollPointer.y=0;\n
}\n
this.draw(d.Draggables._lastScrollPointer);\n
}\n
this.options.onchange(this);\n
},_getWindowScroll:function(win){\n
var vp,w,h;\n
MochiKit.DOM.withWindow(win,function(){\n
vp=MochiKit.Style.getViewportPosition(win.document);\n
});\n
if(win.innerWidth){\n
w=win.innerWidth;\n
h=win.innerHeight;\n
}else{\n
if(win.document.documentElement&&win.document.documentElement.clientWidth){\n
w=win.document.documentElement.clientWidth;\n
h=win.document.documentElement.clientHeight;\n
}else{\n
w=win.document.body.offsetWidth;\n
h=win.document.body.offsetHeight;\n
}\n
}\n
return {top:vp.y,left:vp.x,width:w,height:h};\n
},repr:function(){\n
return "["+this.__class__.NAME+", options:"+MochiKit.Base.repr(this.options)+"]";\n
}};\n
MochiKit.DragAndDrop.__new__=function(){\n
MochiKit.Base.nameFunctions(this);\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};\n
};\n
MochiKit.DragAndDrop.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.DragAndDrop);\n
MochiKit.Base._deps("Sortable",["Base","Iter","DOM","Position","DragAndDrop"]);\n
MochiKit.Sortable.NAME="MochiKit.Sortable";\n
MochiKit.Sortable.VERSION="1.4.2";\n
MochiKit.Sortable.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.Sortable.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.Sortable.EXPORT=[];\n
MochiKit.Sortable.EXPORT_OK=[];\n
MochiKit.Base.update(MochiKit.Sortable,{sortables:{},_findRootElement:function(_7b7){\n
while(_7b7.tagName.toUpperCase()!="BODY"){\n
if(_7b7.id&&MochiKit.Sortable.sortables[_7b7.id]){\n
return _7b7;\n
}\n
_7b7=_7b7.parentNode;\n
}\n
},_createElementId:function(_7b8){\n
if(_7b8.id==null||_7b8.id==""){\n
var d=MochiKit.DOM;\n
var id;\n
var _7bb=1;\n
while(d.getElement(id="sortable"+_7bb)!=null){\n
_7bb+=1;\n
}\n
d.setNodeAttribute(_7b8,"id",id);\n
}\n
},options:function(_7bc){\n
_7bc=MochiKit.Sortable._findRootElement(MochiKit.DOM.getElement(_7bc));\n
if(!_7bc){\n
return;\n
}\n
return MochiKit.Sortable.sortables[_7bc.id];\n
},destroy:function(_7bd){\n
var s=MochiKit.Sortable.options(_7bd);\n
var b=MochiKit.Base;\n
var d=MochiKit.DragAndDrop;\n
if(s){\n
MochiKit.Signal.disconnect(s.startHandle);\n
MochiKit.Signal.disconnect(s.endHandle);\n
b.map(function(dr){\n
d.Droppables.remove(dr);\n
},s.droppables);\n
b.map(function(dr){\n
dr.destroy();\n
},s.draggables);\n
delete MochiKit.Sortable.sortables[s.element.id];\n
}\n
},create:function(_7c3,_7c4){\n
_7c3=MochiKit.DOM.getElement(_7c3);\n
var self=MochiKit.Sortable;\n
self._createElementId(_7c3);\n
_7c4=MochiKit.Base.update({element:_7c3,tag:"li",dropOnEmpty:false,tree:false,treeTag:"ul",overlap:"vertical",constraint:"vertical",containment:[_7c3],handle:false,only:false,hoverclass:null,ghosting:false,scroll:false,scrollSensitivity:20,scrollSpeed:15,format:/^[^_]*_(.*)$/,onChange:MochiKit.Base.noop,onUpdate:MochiKit.Base.noop,accept:null},_7c4);\n
self.destroy(_7c3);\n
var _7c6={revert:true,ghosting:_7c4.ghosting,scroll:_7c4.scroll,scrollSensitivity:_7c4.scrollSensitivity,scrollSpeed:_7c4.scrollSpeed,constraint:_7c4.constraint,handle:_7c4.handle};\n
if(_7c4.starteffect){\n
_7c6.starteffect=_7c4.starteffect;\n
}\n
if(_7c4.reverteffect){\n
_7c6.reverteffect=_7c4.reverteffect;\n
}else{\n
if(_7c4.ghosting){\n
_7c6.reverteffect=function(_7c7){\n
_7c7.style.top=0;\n
_7c7.style.left=0;\n
};\n
}\n
}\n
if(_7c4.endeffect){\n
_7c6.endeffect=_7c4.endeffect;\n
}\n
if(_7c4.zindex){\n
_7c6.zindex=_7c4.zindex;\n
}\n
var _7c8={overlap:_7c4.overlap,containment:_7c4.containment,hoverclass:_7c4.hoverclass,onhover:self.onHover,tree:_7c4.tree,accept:_7c4.accept};\n
var _7c9={onhover:self.onEmptyHover,overlap:_7c4.overlap,containment:_7c4.containment,hoverclass:_7c4.hoverclass,accept:_7c4.accept};\n
MochiKit.DOM.removeEmptyTextNodes(_7c3);\n
_7c4.draggables=[];\n
_7c4.droppables=[];\n
if(_7c4.dropOnEmpty||_7c4.tree){\n
new MochiKit.DragAndDrop.Droppable(_7c3,_7c9);\n
_7c4.droppables.push(_7c3);\n
}\n
MochiKit.Base.map(function(e){\n
var _7cb=_7c4.handle?MochiKit.DOM.getFirstElementByTagAndClassName(null,_7c4.handle,e):e;\n
_7c4.draggables.push(new MochiKit.DragAndDrop.Draggable(e,MochiKit.Base.update(_7c6,{handle:_7cb})));\n
new MochiKit.DragAndDrop.Droppable(e,_7c8);\n
if(_7c4.tree){\n
e.treeNode=_7c3;\n
}\n
_7c4.droppables.push(e);\n
},(self.findElements(_7c3,_7c4)||[]));\n
if(_7c4.tree){\n
MochiKit.Base.map(function(e){\n
new MochiKit.DragAndDrop.Droppable(e,_7c9);\n
e.treeNode=_7c3;\n
_7c4.droppables.push(e);\n
},(self.findTreeElements(_7c3,_7c4)||[]));\n
}\n
self.sortables[_7c3.id]=_7c4;\n
_7c4.lastValue=self.serialize(_7c3);\n
_7c4.startHandle=MochiKit.Signal.connect(MochiKit.DragAndDrop.Draggables,"start",MochiKit.Base.partial(self.onStart,_7c3));\n
_7c4.endHandle=MochiKit.Signal.connect(MochiKit.DragAndDrop.Draggables,"end",MochiKit.Base.partial(self.onEnd,_7c3));\n
},onStart:function(_7cd,_7ce){\n
var self=MochiKit.Sortable;\n
var _7d0=self.options(_7cd);\n
_7d0.lastValue=self.serialize(_7d0.element);\n
},onEnd:function(_7d1,_7d2){\n
var self=MochiKit.Sortable;\n
self.unmark();\n
var _7d4=self.options(_7d1);\n
if(_7d4.lastValue!=self.serialize(_7d4.element)){\n
_7d4.onUpdate(_7d4.element);\n
}\n
},findElements:function(_7d5,_7d6){\n
return MochiKit.Sortable.findChildren(_7d5,_7d6.only,_7d6.tree,_7d6.tag);\n
},findTreeElements:function(_7d7,_7d8){\n
return MochiKit.Sortable.findChildren(_7d7,_7d8.only,_7d8.tree?true:false,_7d8.treeTag);\n
},findChildren:function(_7d9,only,_7db,_7dc){\n
if(!_7d9.hasChildNodes()){\n
return null;\n
}\n
_7dc=_7dc.toUpperCase();\n
if(only){\n
only=MochiKit.Base.flattenArray([only]);\n
}\n
var _7dd=[];\n
MochiKit.Base.map(function(e){\n
if(e.tagName&&e.tagName.toUpperCase()==_7dc&&(!only||MochiKit.Iter.some(only,function(c){\n
return MochiKit.DOM.hasElementClass(e,c);\n
}))){\n
_7dd.push(e);\n
}\n
if(_7db){\n
var _7e0=MochiKit.Sortable.findChildren(e,only,_7db,_7dc);\n
if(_7e0&&_7e0.length>0){\n
_7dd=_7dd.concat(_7e0);\n
}\n
}\n
},_7d9.childNodes);\n
return _7dd;\n
},onHover:function(_7e1,_7e2,_7e3){\n
if(MochiKit.DOM.isChildNode(_7e2,_7e1)){\n
return;\n
}\n
var self=MochiKit.Sortable;\n
if(_7e3>0.33&&_7e3<0.66&&self.options(_7e2).tree){\n
return;\n
}else{\n
if(_7e3>0.5){\n
self.mark(_7e2,"before");\n
if(_7e2.previousSibling!=_7e1){\n
var _7e5=_7e1.parentNode;\n
_7e1.style.visibility="hidden";\n
_7e2.parentNode.insertBefore(_7e1,_7e2);\n
if(_7e2.parentNode!=_7e5){\n
self.options(_7e5).onChange(_7e1);\n
}\n
self.options(_7e2.parentNode).onChange(_7e1);\n
}\n
}else{\n
self.mark(_7e2,"after");\n
var _7e6=_7e2.nextSibling||null;\n
if(_7e6!=_7e1){\n
var _7e5=_7e1.parentNode;\n
_7e1.style.visibility="hidden";\n
_7e2.parentNode.insertBefore(_7e1,_7e6);\n
if(_7e2.parentNode!=_7e5){\n
self.options(_7e5).onChange(_7e1);\n
}\n
self.options(_7e2.parentNode).onChange(_7e1);\n
}\n
}\n
}\n
},_offsetSize:function(_7e7,type){\n
if(type=="vertical"||type=="height"){\n
return _7e7.offsetHeight;\n
}else{\n
return _7e7.offsetWidth;\n
}\n
},onEmptyHover:function(_7e9,_7ea,_7eb){\n
var _7ec=_7e9.parentNode;\n
var self=MochiKit.Sortable;\n
var _7ee=self.options(_7ea);\n
if(!MochiKit.DOM.isChildNode(_7ea,_7e9)){\n
var _7ef;\n
var _7f0=self.findElements(_7ea,{tag:_7ee.tag,only:_7ee.only});\n
var _7f1=null;\n
if(_7f0){\n
var _7f2=self._offsetSize(_7ea,_7ee.overlap)*(1-_7eb);\n
for(_7ef=0;_7ef<_7f0.length;_7ef+=1){\n
if(_7f2-self._offsetSize(_7f0[_7ef],_7ee.overlap)>=0){\n
_7f2-=self._offsetSize(_7f0[_7ef],_7ee.overlap);\n
}else{\n
if(_7f2-(self._offsetSize(_7f0[_7ef],_7ee.overlap)/2)>=0){\n
_7f1=_7ef+1<_7f0.length?_7f0[_7ef+1]:null;\n
break;\n
}else{\n
_7f1=_7f0[_7ef];\n
break;\n
}\n
}\n
}\n
}\n
_7ea.insertBefore(_7e9,_7f1);\n
self.options(_7ec).onChange(_7e9);\n
_7ee.onChange(_7e9);\n
}\n
},unmark:function(){\n
var m=MochiKit.Sortable._marker;\n
if(m){\n
MochiKit.Style.hideElement(m);\n
}\n
},mark:function(_7f4,_7f5){\n
var d=MochiKit.DOM;\n
var self=MochiKit.Sortable;\n
var _7f8=self.options(_7f4.parentNode);\n
if(_7f8&&!_7f8.ghosting){\n
return;\n
}\n
if(!self._marker){\n
self._marker=d.getElement("dropmarker")||document.createElement("DIV");\n
MochiKit.Style.hideElement(self._marker);\n
d.addElementClass(self._marker,"dropmarker");\n
self._marker.style.position="absolute";\n
document.getElementsByTagName("body").item(0).appendChild(self._marker);\n
}\n
var _7f9=MochiKit.Position.cumulativeOffset(_7f4);\n
self._marker.style.left=_7f9.x+"px";\n
self._marker.style.top=_7f9.y+"px";\n
if(_7f5=="after"){\n
if(_7f8.overlap=="horizontal"){\n
self._marker.style.left=(_7f9.x+_7f4.clientWidth)+"px";\n
}else{\n
self._marker.style.top=(_7f9.y+_7f4.clientHeight)+"px";\n
}\n
}\n
MochiKit.Style.showElement(self._marker);\n
},_tree:function(_7fa,_7fb,_7fc){\n
var self=MochiKit.Sortable;\n
var _7fe=self.findElements(_7fa,_7fb)||[];\n
for(var i=0;i<_7fe.length;++i){\n
var _800=_7fe[i].id.match(_7fb.format);\n
if(!_800){\n
continue;\n
}\n
var _801={id:encodeURIComponent(_800?_800[1]:null),element:_7fa,parent:_7fc,children:[],position:_7fc.children.length,container:self._findChildrenElement(_7fe[i],_7fb.treeTag.toUpperCase())};\n
if(_801.container){\n
self._tree(_801.container,_7fb,_801);\n
}\n
_7fc.children.push(_801);\n
}\n
return _7fc;\n
},_findChildrenElement:function(_802,_803){\n
if(_802&&_802.hasChildNodes){\n
_803=_803.toUpperCase();\n
for(var i=0;i<_802.childNodes.length;++i){\n
if(_802.childNodes[i].tagName.toUpperCase()==_803){\n
return _802.childNodes[i];\n
}\n
}\n
}\n
return null;\n
},tree:function(_805,_806){\n
_805=MochiKit.DOM.getElement(_805);\n
var _807=MochiKit.Sortable.options(_805);\n
_806=MochiKit.Base.update({tag:_807.tag,treeTag:_807.treeTag,only:_807.only,name:_805.id,format:_807.format},_806||{});\n
var root={id:null,parent:null,children:new Array,container:_805,position:0};\n
return MochiKit.Sortable._tree(_805,_806,root);\n
},setSequence:function(_809,_80a,_80b){\n
var self=MochiKit.Sortable;\n
var b=MochiKit.Base;\n
_809=MochiKit.DOM.getElement(_809);\n
_80b=b.update(self.options(_809),_80b||{});\n
var _80e={};\n
b.map(function(n){\n
var m=n.id.match(_80b.format);\n
if(m){\n
_80e[m[1]]=[n,n.parentNode];\n
}\n
n.parentNode.removeChild(n);\n
},self.findElements(_809,_80b));\n
b.map(function(_811){\n
var n=_80e[_811];\n
if(n){\n
n[1].appendChild(n[0]);\n
delete _80e[_811];\n
}\n
},_80a);\n
},_constructIndex:function(node){\n
var _814="";\n
do{\n
if(node.id){\n
_814="["+node.position+"]"+_814;\n
}\n
}while((node=node.parent)!=null);\n
return _814;\n
},sequence:function(_815,_816){\n
_815=MochiKit.DOM.getElement(_815);\n
var self=MochiKit.Sortable;\n
var _816=MochiKit.Base.update(self.options(_815),_816||{});\n
return MochiKit.Base.map(function(item){\n
return item.id.match(_816.format)?item.id.match(_816.format)[1]:"";\n
},MochiKit.DOM.getElement(self.findElements(_815,_816)||[]));\n
},serialize:function(_819,_81a){\n
_819=MochiKit.DOM.getElement(_819);\n
var self=MochiKit.Sortable;\n
_81a=MochiKit.Base.update(self.options(_819),_81a||{});\n
var name=encodeURIComponent(_81a.name||_819.id);\n
if(_81a.tree){\n
return MochiKit.Base.flattenArray(MochiKit.Base.map(function(item){\n
return [name+self._constructIndex(item)+"[id]="+encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));\n
},self.tree(_819,_81a).children)).join("&");\n
}else{\n
return MochiKit.Base.map(function(item){\n
return name+"[]="+encodeURIComponent(item);\n
},self.sequence(_819,_81a)).join("&");\n
}\n
}});\n
MochiKit.Sortable.Sortable=MochiKit.Sortable;\n
MochiKit.Sortable.__new__=function(){\n
MochiKit.Base.nameFunctions(this);\n
this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)};\n
};\n
MochiKit.Sortable.__new__();\n
MochiKit.Base._exportSymbols(this,MochiKit.Sortable);\n
if(typeof (MochiKit)=="undefined"){\n
MochiKit={};\n
}\n
if(typeof (MochiKit.MochiKit)=="undefined"){\n
MochiKit.MochiKit={};\n
}\n
MochiKit.MochiKit.NAME="MochiKit.MochiKit";\n
MochiKit.MochiKit.VERSION="1.4.2";\n
MochiKit.MochiKit.__repr__=function(){\n
return "["+this.NAME+" "+this.VERSION+"]";\n
};\n
MochiKit.MochiKit.toString=function(){\n
return this.__repr__();\n
};\n
MochiKit.MochiKit.SUBMODULES=["Base","Iter","Logging","DateTime","Format","Async","DOM","Selector","Style","LoggingPane","Color","Signal","Position","Visual","DragAndDrop","Sortable"];\n
if(typeof (JSAN)!="undefined"||typeof (dojo)!="undefined"){\n
if(typeof (dojo)!="undefined"){\n
dojo.provide("MochiKit.MochiKit");\n
(function(lst){\n
for(var i=0;i<lst.length;i++){\n
dojo.require("MochiKit."+lst[i]);\n
}\n
})(MochiKit.MochiKit.SUBMODULES);\n
}\n
if(typeof (JSAN)!="undefined"){\n
(function(lst){\n
for(var i=0;i<lst.length;i++){\n
JSAN.use("MochiKit."+lst[i],[]);\n
}\n
})(MochiKit.MochiKit.SUBMODULES);\n
}\n
(function(){\n
var _823=MochiKit.Base.extend;\n
var self=MochiKit.MochiKit;\n
var _825=self.SUBMODULES;\n
var _826=[];\n
var _827=[];\n
var _828={};\n
var i,k,m,all;\n
for(i=0;i<_825.length;i++){\n
m=MochiKit[_825[i]];\n
_823(_826,m.EXPORT);\n
_823(_827,m.EXPORT_OK);\n
for(k in m.EXPORT_TAGS){\n
_828[k]=_823(_828[k],m.EXPORT_TAGS[k]);\n
}\n
all=m.EXPORT_TAGS[":all"];\n
if(!all){\n
all=_823(null,m.EXPORT,m.EXPORT_OK);\n
}\n
var j;\n
for(j=0;j<all.length;j++){\n
k=all[j];\n
self[k]=m[k];\n
}\n
}\n
self.EXPORT=_826;\n
self.EXPORT_OK=_827;\n
self.EXPORT_TAGS=_828;\n
}());\n
}else{\n
if(typeof (MochiKit.__compat__)=="undefined"){\n
MochiKit.__compat__=true;\n
}\n
(function(){\n
if(typeof (document)=="undefined"){\n
return;\n
}\n
var _82e=document.getElementsByTagName("script");\n
var _82f="http://www.w3.org/1999/xhtml";\n
var _830="http://www.w3.org/2000/svg";\n
var _831="http://www.w3.org/1999/xlink";\n
var _832="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";\n
var base=null;\n
var _834=null;\n
var _835={};\n
var i;\n
var src;\n
for(i=0;i<_82e.length;i++){\n
src=null;\n
switch(_82e[i].namespaceURI){\n
case _830:\n
src=_82e[i].getAttributeNS(_831,"href");\n
break;\n
default:\n
src=_82e[i].getAttribute("src");\n
break;\n
}\n
if(!src){\n
continue;\n
}\n
_835[src]=true;\n
if(src.match(/MochiKit.js(\\?.*)?$/)){\n
base=src.substring(0,src.lastIndexOf("MochiKit.js"));\n
_834=_82e[i];\n
}\n
}\n
if(base===null){\n
return;\n
}\n
var _838=MochiKit.MochiKit.SUBMODULES;\n
for(var i=0;i<_838.length;i++){\n
if(MochiKit[_838[i]]){\n
continue;\n
}\n
var uri=base+_838[i]+".js";\n
if(uri in _835){\n
continue;\n
}\n
if(_834.namespaceURI==_830||_834.namespaceURI==_832){\n
var s=document.createElementNS(_834.namespaceURI,"script");\n
s.setAttribute("id","MochiKit_"+base+_838[i]);\n
if(_834.namespaceURI==_830){\n
s.setAttributeNS(_831,"href",uri);\n
}else{\n
s.setAttribute("src",uri);\n
}\n
s.setAttribute("type","application/x-javascript");\n
_834.parentNode.appendChild(s);\n
}else{\n
document.write("<"+_834.nodeName+" src=\\""+uri+"\\" type=\\"text/javascript\\"></script>");\n
}\n
}\n
})();\n
}\n
\n
\n


]]></string> </value>
        </item>
        <item>
            <key> <string>next</string> </key>
            <value>
              <none/>
            </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
