initial quasi-workingness, I think.
authorAndrew Sutherland <asutherland@asutherland.org>
Fri, 09 Jan 2009 23:54:49 -0800
changeset 0 432fbee7ecb67b519b93ea32e7529dc50dc0acf3
child 1 d331fe76fbda9a052dc617db58df359a5d3e24e9
push id1
push userroot
push dateWed, 08 Apr 2009 01:46:05 +0000
initial quasi-workingness, I think.
client/index.xhtml
client/messages.css
client/messages.xml
client/xbl-dev.js
client/xbl.js
junius.kpf
server/python/build/lib/junius/__init__.py
server/python/build/lib/junius/bootstrap.py
server/python/build/lib/junius/getmail.py
server/python/build/lib/junius/model.py
server/python/junius/__init__.py
server/python/junius/bootstrap.py
server/python/junius/getmail.py
server/python/junius/model.py
server/python/setup.py
new file mode 100644
--- /dev/null
+++ b/client/index.xhtml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Junius</title>
+  <script src="/_utils/script/json2.js"></script>
+  <script src="/_utils/script/jquery.js?1.2.6"></script>
+  <script src="/_utils/script/jquery.couch.js?0.9.0"></script>
+</head>
+<body>
+  
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/client/messages.css
@@ -0,0 +1,3 @@
+message {
+  binding: url("messages.xml#message");
+}
new file mode 100644
--- /dev/null
+++ b/client/messages.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xbl:xbl
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:xbl="http://www.w3.org/ns/xbl">
+
+  <xbl:binding id="message">
+    <xbl:implementation><![CDATA[
+      ({
+        foo: 1,
+        bar: 2
+      })
+    ]]></xbl:implementation>
+    <xbl:handlers>
+      <xbl:handler event="click"><![CDATA[
+      
+      ]]></xbl:handler>
+    </xbl:handlers>
+  </xbl:binding>
+</xbl:xbl>
new file mode 100644
--- /dev/null
+++ b/client/xbl-dev.js
@@ -0,0 +1,1 @@
+(function(m,u,n,g,e,d){for(g=u[d[189]]-1;g>=0;g--)n+=e[d[45]][d[132]](u[d[331]](g)-1);u=n[d[281]](' ');for(g=u[d[189]]-1;g>=0;g--)m=m[d[258]](e[d[42]](g%10+(e[d[45]][d[132]](122-e[d[36]][d[130]](g/10))),'g'),u[g]);e[d[33]]('_',m)(d)})("8y f3=1w;f38x2099x=_[150];f38x699x=1w;f38x2659x=1w;f38x1259x=7x8x1009x(_[280]);f38x1269x=9z(u3){8y o6=6x8x489x?2y 6x8x489x:2y 6x8x79x(_[38]);o68x2309x(_[34],u3,1x);o68x2729x(2x);3y o6};f38x1239x=9z(e0,d9){e08x659x=d9;0y(d98x29x){e08x29x=1w;8z(8y s3 0z d98x29x){0y(!(s3 0z e08x29x))e08x29x[s3]=0w;8z(8y i=0,j=d98x29x[s3]8x1899x;i<j;i0v)e08x29x[s3]8x2469x(d98x29x[s3][i])}}8z(8y s0 0z d98x2459x)e08x2459x[s0]=d98x2459x[s0];e08x2969x=d98x2969x};f38x999x=9z(e0,n3,d8){8y u4,n2;9y(n3){n2=n38x2149x;0y(n38x2159x5w1){0y(u4=n38x1359x(_[323]))n38x889x8w(n38x889x?' ':'')+_[323]+'-'+u4+'-'+e08x1519x;0y(u4=n38x1359x(_[324]))n38x889x8w(n38x889x?' ':'')+_[324]+'-'+u4+'-'+e08x1519x;0y(n38x1299x)4x8x779x(e0,n38x1299x,d8)}7z 0y(!d83wn38x2159x5w3){u4=n38x1059x8x2589x(/\\s+/g,' ');0y(u45w' ')n38x2339x8x2569x(n3);7z 0y(n38x1059x7wu4)n38x1059x=u4}n3=n2}};f38x2439x=9z(n3,r8){0y(n38x2159x5w9)n3=n38x1149x;0y(n38x2159x5w1)f38x1179x(n3,f38x1179x8x3219x,r8)};f38x1379x=9z(q9){0y(!(q9 0z f38x699x)){8y a3=q98x2819x('#');e28x2459x8x1929x8x769x(7x,a3[0])}3y f38x699x[q9]4w2x};f38x1179x=9z(n4,g9,u6){8z(8y i=0,j=n48x869x8x1899x,s3,n3;i<j;i0v){n3=n48x869x[i];0y(n38x2159x5w1)0y(n38x2099x5wf38x2099x){0y(g9[s3=(n38x1949x4wn38x669x)])g9[s3](n3,u6)}}};f38x1179x8x3219x=9z(n3,q9){f38x1179x(n3,4x8x779x,q9)};f38x1179x8x3219x8x679x=9z(n3,q9){8y r6=n38x1359x(_[151]),r0=n38x1359x(_[116]);0y(r64wr0){0y(!r6)r6=_[321]+'-'+6x8x369x8x1309x(6x8x369x8x2499x2w*100000000);8y e0=2y 6x8x339x;e08x1519x=r6;e08x1159x=q9;f38x699x[q9+'#'+r6]=e0;0y(r0){0y(!f38x2659x[r0])f38x2659x[r0]=0w;f38x2659x[r0]8x2469x(q9+'#'+r6)}8y r1=n38x1359x(_[124]),a7,u5=g8(n3,q9),d9;0y(r1){a7=r18x2819x('#');0y(d9=f38x1379x(h9(a7[0],u5)+'#'+a7[1]))f38x1239x(e0,d9)}f38x1179x(n3,4x8x779x,e0)}};f38x1179x8x3219x8x2699x=9z(n3,q9){8y t6=n38x1359x(_[282]),t2,n9;0y(t6){t6=h9(t6,g8(n3,q9));t2=f38x1269x(t6)8x2629x}7z 0y(n38x1299x)t2=n38x1299x8x2169x;n9=7x8x1009x(_[269]);n98x2749x(_[314],_[300]);0y(7x8x2109x)n98x2989x=t2;7z n98x579x(7x8x1019x(t2));7x8x1399x(_[146])[0]8x579x(n9)};f38x1179x8x3219x8x679x8x1529x=9z(n3,e0){8y t6=n38x1359x(_[282]),t2='';0y(t6){t6=h9(t6,g8(n3,e08x1159x));t2=f38x1269x(t6)8x2629x}7z 0y(n38x1299x)t2=n38x1299x8x2169x;0y(t2){7y{8y m8=6x8x339x(t28x2589x(/^\\s*\\(\\s*/g,\"3y \")8x2589x(/\\s*\\)\\s*$/g,''))2w;8z(8y s0 0z m8)e08x2459x[s0]=m8[s0]}3z(m4)1w}};f38x1179x8x3219x8x679x8x2969x=9z(n3,e0){8z(8y n2=n38x1299x,s3='';n2;n2=n28x2149x)0y(n28x2159x5w13wn28x2099x7wf38x2099x)s3=(n28x1949x4wn28x669x)8x3089x2w;8y r5=6x8x499x?2y 6x8x499x2w8x2739x(n3):n38x3309x;r5=r58x2589x(/^<[\\w:]*template[^>]*>\\s*/i,'')8x2589x(/\\s*<\\/[\\w:]*template>$/i,'');r5=r58x2589x(/(<\\/?)[\\w:-]*content/gi,'$1'+_[287]);r5=r58x2589x(/(<\\/?)[\\w:-]*0zherited/gi,'$1'+_[198]);r5=r58x2589x(/(<\\/?)[\\w:-]*div/gi,'$1'+_[113]);r5=r58x2589x(/<([\\w:-]+)([^>]*)\\/>/gi,'<$1$2></$1>');r5=r58x2589x(/<(br|0zput|img)([^>]*)><\\/[^>]*>/gi,'<$1$2/>');r5=r58x2589x(/\\sclass=\"([^\"]+)\"/gi,' '+_[87]+'=\"'+_[321]+'-$1-'+e08x1519x+'\"');r5=r58x2589x(/\\sid=\"([^\"]+)\"/gi,' '+_[323]+'=\"$1\"');r5=r58x2589x(/\\s[\\w-]+:attr=\"([^\"]+)\"/gi,' '+_[322]+'=\"$1\"');r5=r58x2589x(/\\s[\\w-]+:pseudo=\"([^\"]+)\"/gi,' '+_[324]+'=\"$1\"');8y m7=f38x1259x,o3=2x;6y (s3){2z _[295]:2z _[304]:r5='<'+_[311]+'>'+r5+'</'+_[311]+'>';2z _[311]:r5='<'+_[294]+'>'+r5+'</'+_[294]+'>';2z _[294]:2z _[305]:2z _[303]:m78x1729x='<'+_[291]+'>'+r5+'</'+_[291]+'>';o3=m78x1399x(s3)[0]8x2339x;1z;2z _[231]:m78x1729x='<'+_[271]+'>'+r5+'</'+_[271]+'>';o3=m78x1299x;1z;5z:m78x1729x=_[0]+'<div>'+r5+'</div>';o3=m78x869x[1];1z}f38x999x(e0,o3,(n38x1369x?n38x1369x(_[149],_[279]):n38x1359x(_[330]+':'+_[279]))5w_[238]);e08x2969x=o38x2339x8x2569x(o3)};f38x1179x8x3219x8x679x8x1429x=9z(n3,e0){f38x1179x(n3,4x8x779x,e0)};f38x1179x8x3219x8x679x8x1429x8x1419x=9z(n3,e0){8y s3=n38x1359x(_[121]),g9;0y(s3){0y(n38x1299x){0y(!e08x29x)e08x29x=1w;0y(!e08x29x[s3])e08x29x[s3]=0w;7y{g9=2y 6x8x339x(_[121],n38x1299x8x2169x)}3z(m4)1w0y(g9){e08x29x[s3]8x2469x(g9);8y u4;0y(u4=n38x1359x(_[235]))g98x2359x=u45w_[81]?1:u45w_[293]?2:0;0y(u4=n38x1359x(_[313]))g98x3139x=u45w_[312];0y(u4=n38x1359x(_[244]))g98x2449x=u47w_[284];0y(u4=n38x1359x(_[107]))g98x1079x=u47w_[78];0y(u4=n38x1359x(_[75]))g98x759x=u4*1;0y(u4=n38x1359x(_[90]))g98x909x=u4*1;0y(u4=n38x1359x(_[200]))g98x2009x=u4;0y(u4=n38x1359x(_[178]))g98x1789x=u4;0y(u4=n38x1359x(_[179]))g98x1799x=u4;0y(u4=n38x1359x(_[298]))g98x2989x=u4;0y(u4=n38x1359x(_[239]))g98x2399x=u4;0y(u4=n38x1359x(_[212]))g98x2129x=u4;0y(u4=n38x1359x(_[61]))g98x619x=u4;0y(u4=n38x1359x(_[60]))g98x609x=u4}}}};f38x1179x8x3219x8x679x8x2619x=9z(n3,e0){f38x1179x(n3,4x8x779x,e0)};f38x1179x8x3219x8x679x8x2619x8x2899x=9z(n3,e0){8y t6=n38x1359x(_[282]),r9=n38x1359x(_[197]),q5=g8(n3,e08x1159x),t8,o2,a5;0y(t6){t6=h9(t6,q5);t8=f38x1269x(t6)8x2629x}7z 0y(n38x1299x){t6=q5;t8=n38x1299x8x2169x}0y(t8){8y t4=':'+_[72];t8=t88x2589x(/\\s\\.([\\w-]+)([\\s{+~>])/g,' .'+_[321]+'-$1-'+e08x1519x+'$2');t8=t88x2589x(/#([\\w-]+)([\\s{+~>])/g,'.'+_[323]+'-$1-'+e08x1519x+'$2');t8=t88x2589x(/::([\\w-]+)([\\s{+~>])/g,'.'+_[324]+'-$1-'+e08x1519x+'$2');t8=t88x2589x(/\\s*([^{\\n]+{[^}]+})/g,t4+' '+'$1');t8=t88x2589x(2y 6x8x429x(t4+' '+t4,'g'),t4);t8=t88x2589x(/:bound-element([\\s{+~>.:])/g,'.'+_[321]+'-'+_[72]+'-'+e08x1519x+'$1');0y(a5=t88x1969x(/url\\s*\\([^\\)]+\\)/g)){8z(8y i=0,j=a58x1899x,c5;i<j;i0v){c5=a5[i]8x1969x(/(url\\s*\\(['\"]?)([^\\)'\"]+)(['\"]?\\))/);t8=t88x2589x(c5[0],c5[1]+h9(c5[2],t6)+c5[3])}}0y(7x8x2109x){f38x1259x8x1729x='&nbsp;'+'<'+_[289]+' '+_[314]+'=\"'+_[299]+'\"'+(r9?' '+_[197]+'=\"'+r9+'\"':'')+'>'+t8+'</'+_[289]+'>';o2=f38x1259x8x869x[1]}7z {o2=7x8x1009x(_[289]);o28x2749x(_[314],_[299]);0y(r9)o28x2749x(_[197],r9);o28x579x(7x8x1019x(t8))}7x8x1399x(_[146])[0]8x579x(o2)}};f38x1179x8x3219x8x679x8x2619x8x2379x=9z(n3,e0){8y t6=n38x1359x(_[282]);0y(t6){t6=h9(t6,g8(n3,e08x1159x));f38x1269x(t6)}};9z h4(l2,k1){8y u4=6x8x409x(l2)8x3099x(16);0y(u48x1899x<k1)u4=6x8x99x(k1+1-u48x1899x)8x1779x('0')+u4;3y u4};9z g5(m3){8z(8y n3=m3;n3;n3=n38x2339x)0y(n38x3269x4w(n38x3289x3wn38x3289x 1y f2))3y n3;3y m3};9z h2(j1){0y(!7x8x2109x)3y j1;0y(j15w4)3y 1;0y(j15w2)3y 2;3y 0};9z h0(m5){3y n1[m58x1809x]4w('U+'+h4(m58x1809x,4))8x3109x2w};9z h1(m5){8y b3=0w;0y(m58x559x)b3[b38x1899x]=_[8];0y(m58x1039x)b3[b38x1899x]=_[12];0y(m58x1999x)b3[b38x1899x]=_[37];0y(m58x2779x)b3[b38x1899x]=_[44];3y b38x1779x(' ')};8y n1={8:'U+0008',9:'U+0009',13:'Enter',16:_[44],17:_[12],18:_[8],20:'CapsLock',27:'U+001B',33:'PageUp',34:'PageDown',35:'End',36:'Home',37:'Left',38:'Up',39:'Right',40:'Down',45:'Insert',46:'U+002E',91:'W0z',112:'F1',113:'F2',114:'F3',115:'F4',116:'F5',117:'F6',118:'F7',119:'F8',120:'F9',121:'F10',122:'F11',123:'F12'};9z h8(l5,s3){0y(s35w_[302])s3=_[184];7z 0y(s35w_[208]){0y(6x8x989x)s3=_[21]}7z 0y(s35w_[202]){0y(!7x8x2109x)s3=_[206]}7z 0y(s35w_[203]){0y(!7x8x2109x)s3=_[205]}7z 0y(s35w_[89]){h8(l5,_[97]);h8(l5,_[106])}7z 0y(s35w_[19])s3=_[131];7z 0y(s35w_[20])s3=_[70];7z 0y(s35w_[13])s3=_[89];0y(l58x29x[s3])3y;8y m3=l58x739x,g9=9z(m5){3y i0(s3,m5,l5)};l58x29x[s3]=g9;0y(s35w_[14]){0y(7x8x2109x4w6x8x2119x8x3169x8x1969x(/applewebkit/i)){8y s8='$'+_[321]+'-',s6,m6;m3[s8+_[2749x=m38x2749x;m38x2749x=9z(s3,u4){s6=5x8x1359x(s3);0y(s67wu4){5x[s8+_[2749x(s3,u4);m6=2y e8;m68x1659x(s3,3x,1x,5x,s6,u4,s3,s6?e88x359x:e88x59x);g9(m6)}};m3[s8+_[2549x=m38x2549x;m38x2549x=9z(s3){s6=5x8x1359x(s3);0y(s6){5x[s8+_[2549x(s3);m6=2y e8;m68x1659x(s3,3x,1x,5x,s6,2x,s3,e88x419x);g9(m6)}};3y}}0y(m38x599x)m38x599x(_[225]+s3,g9);7z m38x539x(s3,g9,1x)};9z i3(l5,s3){0y(!l58x29x[s3])3y;8y m3=l58x739x,g9=l58x29x[s3];0y(m38x1109x)m38x1109x(_[225]+s3,g9);7z m38x2579x(s3,g9,1x);6z l58x29x[s3]};9z i0(u2,m5,l5){8y m3=g5(m58x2839x4wm58x2939x),j3=0,m6=2x,n5=2x;6y (u2){2z _[97]:u2=_[89];2z _[206]:2z _[205]:n5=m58x2539x4w(u25w_[206]?m58x1339x:u25w_[205]?m58x3079x:2x);0y(n53wg5(n5)5wm3)3y;2z _[204]:2z _[201]:2z _[207]:2z _[106]:2z _[89]:m6=2y e6;m68x1619x(u2,3x,3x,6x,u25w_[106]?2:m58x1119x4w1,m58x2679x,m58x2689x,m58x919x,m58x929x,m58x1039x,m58x559x,m58x2779x,m58x1999x4w1x,m58x3149x5w_[97]?2:h2(m58x759x),n5);1z;2z _[202]:2z _[203]:n5=m58x2539x4w(u25w_[206]?m58x1339x:u25w_[205]?m58x3079x:2x);0y(n53wg5(n5)5wm3)3y;m6=2y e6;m68x1619x(u2,1x,1x,6x,m58x1119x4w1,m58x2679x,m58x2689x,m58x919x,m58x929x,m58x1039x,m58x559x,m58x2779x,m58x1999x4w1x,h2(m58x759x),m58x2539x);1z;2z _[183]:2z _[185]:m6=2y e5;m68x1599x(u2,3x,3x,6x,h0(m5),2x,h1(m5));1z;2z _[184]:0y(m58x1039x4wm58x559x4wm58x1809x 0z n1)3y;u2=_[302];2z _[302]:m6=2y e9;m68x1679x(u2,3x,3x,6x,6x8x459x8x1329x(m58x849x4wm58x1809x));1z;2z _[131]:2z _[70]:m6=2y f0;m68x1699x(u2,1x,1x,6x,2x);1z;2z _[13]:m6=2y f0;m68x1699x(u2,3x,3x,6x,2x);1z;2z _[19]:2z _[20]:2z _[270]:2z _[260]:m6=2y f0;m68x1699x(u2,3x,1x,6x,2x);1z;2z _[21]:u2=_[208];2z _[208]:m6=2y e7;m68x1639x(u2,3x,3x,6x,2x,m58x2679x,m58x2689x,m58x919x,m58x929x,h2(m58x759x),2x,h1(m5),m58x2839x?-1*m58x3199x:m58x1119x*40);1z;2z _[191]:2z _[315]:m6=2y e4;m68x1579x(u2,1x,1x);1z;2z _[290]:2z _[259]:m6=2y e4;m68x1579x(u2,3x,3x);1z;2z _[50]:2z _[120]:2z _[82]:2z _[271]:m6=2y e4;m68x1579x(u2,3x,1x);1z;2z _[26]:2z _[22]:2z _[24]:2z _[25]:2z _[23]:2z _[16]:2z _[18]:2z _[15]:3y;2z _[14]:0y(m58x1049x7wm58x2939x)3y;m6=2y e8;m68x1659x(u2,3x,1x,m58x2529x,m58x2409x,m58x2139x,m58x639x,m58x629x);1z;5z:m6=2y e1;m68x1569x(m58x2099x4w2x,u2,6wm58x749x,6wm58x809x,m58x1119x)}m68x3139x=3x;m68x2939x=m3;m68x1049x=l58x739x;m68x1229x=m58x2939x5wm58x1049x?e48x69x:e48x109x;8y a9=l58x959x8x29x?l58x959x8x29x[m68x3149x]:2x;0y(a9){8z(8y i=0,j=a98x1899x,g9;i<j;i0v){g9=a9[i];0y(_[313] 0z g93wg98x3139x7wm68x3139x)4z;0y(_[235] 0z g9)0y(g98x2359x7wm68x1229x)4z;0y(m6 1y e64wm6 1y e5){0y(_[200] 0z g9){8y s2=g98x2009x;0y(s25w_[217]){0y(m68x1039x4wm68x559x4wm68x2779x4wm68x1999x)4z}7z 0y(s25w_[56]){0y(!(m68x1039x4wm68x559x4wm68x2779x4wm68x1999x))4z}7z {8z(8y k2=0,b2,d6=3x,b3=s28x2819x(' ');k2<b38x1899x;k20v){0y(b2=b3[k2]8x1969x(/([+-]?)(\\w+)(\\??)/))0y(m68x1409x(b2[2])5w(b2[1]5w'-'))d6=1x}0y(!d6)4z}}0y(m6 1y e6){0y(_[90] 0z g93wg98x909x7wm68x1119x)4z;0y(_[75] 0z g93wg98x759x7wm68x759x)4z}7z 0y(m6 1y e5){0y(_[178] 0z g93wg98x1789x7wm68x1819x)4z}}7z 0y(m6 1y e9){0y(_[298] 0z g93wg98x2989x7wm68x1059x)4z}7z 0y(m6 1y e8){0y(m68x3149x5w_[14]){0y(_[61] 0z g93wg98x619x7wm58x639x)4z;0y(_[60] 0z g93we8[g98x609x8x3109x2w]7wm58x629x)4z;0y(_[239] 0z g93wg98x2399x7wm58x2409x)4z;0y(_[212] 0z g93wg98x2129x7wm58x2139x)4z}}0y(_[107] 0z g9)0y(!g98x1079x)m68x2419x2w;0y(_[244] 0z g9)0y(!g98x2449x)m68x2869x2w;g98x769x(l5,m6);0y(m68x49x)1z}}6y (u2){2z _[131]:2z _[70]:0y(!i0(u25w_[131]?_[19]:_[20],m5,l5))m68x2419x2w;1z;2z _[206]:2z _[205]:0y(m58x2539x3wm58x1049x5wm58x2939x)0y(m58x2939x8x2339x5wm58x2539x4wm58x2939x8x2339x5wm58x2539x8x2339x)i0(u25w_[206]?_[202]:_[203],m5,l5);1z;2z _[89]:0y(m68x759x5w0){8y u0=m68x2939x8x2929x8x3089x2w;0y(u05w_[75]4wu05w'a')0y(!i0(_[13],m5,l5))m68x2419x2w}1z}0y(m68x39x){0y(m58x2869x)m58x2869x2w;7z m58x799x=3x}0y(m68x1089x){0y(m58x2419x)m58x2419x2w;3y 1x}3y 3x};9z g7(u3){8y b6=u38x1969x(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?/),n8=1w;n8.a5=b6[2];n8.a0=b6[4];n8.a3=b6[5];n8.a4=b6[7];n8.a1=b6[9];3y n8};9z h9(u3,q6){0y(u35w''4wu38x839x(0)5w'#')3y q6;8y o4=g7(u3);0y(o4.a5)3y u3;8y l4=g7(q6);o4.a5=l4.a5;0y(!o4.a0){o4.a0=l4.a0;0y(o4.a38x839x(0)7w'/'){8y c4=o4.a38x2819x('/'),a2=l4.a38x2819x('/');a28x2369x2w;8y i8=a2[0]5w''?1:0;8z(8y i=0,k1=c48x1899x;i<k1;i0v){0y(c4[i]5w'..'){0y(a28x1899x>i8)a28x2369x2w;7z {a28x2469x(c4[i]);i80v}}7z 0y(c4[i]7w'.')a28x2469x(c4[i])}0y(c4[1vi]5w'..'4wc4[i]5w'.')a28x2469x('');o4.a3=a28x1779x('/')}}8y b6=0w;0y(o4.a5)b68x2469x(o4.a5+':');0y(o4.a0)b68x2469x('/'+'/'+o4.a0);0y(o4.a3)b68x2469x(o4.a3);0y(o4.a4)b68x2469x('?'+o4.a4);0y(o4.a1)b68x2469x('#'+o4.a1);3y b68x1779x('')};9z i4(u3,q6){8y o4=g7(u3),l4=g7(q6);3y!o4.a54w!l4.a54w(o4.a05wl4.a03wo4.a55wl4.a5)};9z g8(n3,q9){0y(n38x2159x5w9)3y q9;0y(n38x2159x5w1){8y u5=n38x1359x(_[330]+':'+_[64]);0y(!u53wn38x1369x)u5=n38x1369x(_[149],_[64]);0y(u5)3y h9(u5,g8(n38x2339x,q9))}3y g8(n38x2339x,q9)};8y e4=2y 6x8x339x;e48x119x=1;e48x69x=2;e48x109x=3;e48x2459x8x2099x=2x;e48x2459x8x749x=2x;e48x2459x8x809x=2x;e48x2459x8x1049x=2x;e48x2459x8x1229x=2x;e48x2459x8x2939x=2x;e48x2459x8x3069x=2x;e48x2459x8x3149x=2x;e48x2459x8x1089x=1x;e48x2459x8x39x=1x;e48x2459x8x49x=1x;e48x2459x8x1579x=9z(u2,d1,d2){5x8x3149x=u2;5x8x749x=d1;5x8x809x=d2};e48x2459x8x1589x=9z(s4,u2,d1,d2){5x8x1579x(u2,d1,d2);5x8x2099x=s4};e48x2459x8x2869x=9z2w{5x8x39x=5x8x749x};e48x2459x8x2859x=9z2w{5x8x49x=5x8x39x=5x8x749x};e48x2459x8x2419x=9z2w{5x8x1089x=5x8x809x};8y f0=2y 6x8x339x;f08x2459x=2y e4;f08x2459x8x3179x=2x;f08x2459x8x1119x=2x;f08x2459x8x1699x=9z(u2,d1,d2,o5,j6){5x8x1579x(u2,d1,d2);5x8x3179x=o5;5x8x1119x=j6};f08x2459x8x1709x=9z(s4,u2,d1,d2,o5,j6){5x8x1699x(u2,d1,d2,o5,j6);5x8x2099x=s4};8y e6=2y 6x8x339x;e68x2459x=2y f0;e68x2459x8x2679x=2x;e68x2459x8x2689x=2x;e68x2459x8x919x=2x;e68x2459x8x929x=2x;e68x2459x8x1039x=2x;e68x2459x8x559x=2x;e68x2459x8x2779x=2x;e68x2459x8x1999x=2x;e68x2459x8x759x=2x;e68x2459x8x2539x=2x;e68x2459x8x1619x=9z(u2,d1,d2,o5,j6,k5,k6,j4,j5,d3,c8,d7,d5,j1,n7){5x8x1699x(u2,d1,d2,o5,j6);5x8x2679x=k5;5x8x2689x=k6;5x8x919x=j4;5x8x929x=j5;5x8x1039x=d3;5x8x559x=c8;5x8x2779x=d7;5x8x1999x=d5;5x8x759x=j1;5x8x2539x=n7};e68x2459x8x1629x=9z(s4,u2,d1,d2,o5,j6,k5,k6,j4,j5,d3,c8,d7,d5,j1,n7){5x8x1619x(u2,d1,d2,o5,j6,k5,k6,j4,j5,d3,c8,d7,d5,j1,n7);5x8x2099x=s4};e68x2459x8x1409x=9z(s1){6y (s1){2z _[8]:3y 5x8x559x;2z _[12]:3y 5x8x1039x;2z _[37]:3y 5x8x1999x;2z _[44]:3y 5x8x2779x}3y 1x};8y e7=2y 6x8x339x;e78x2459x=2y e6;e78x2459x8x3199x=2x;e78x2459x8x1639x=9z(u2,d1,d2,o5,j6,k5,k6,j4,j5,j1,n7,s2,l3){5x8x1619x(u2,d1,d2,o5,j6,k5,k6,j4,j5,s28x1549x(_[12])>-1,s28x1549x(_[8])>-1,s28x1549x(_[44])>-1,s28x1549x(_[37])>-1,j1,n7);5x8x3199x=l3};e78x2459x8x1649x=9z(s4,u2,d1,d2,o5,j6,k5,k6,j4,j5,j1,n7,s2,l3){5x8x1639x(u2,d1,d2,o5,j6,k5,k6,j4,j5,j1,n7,s2,l3);5x8x2099x=s4};8y e5=2y 6x8x339x;e58x2459x=2y f0;e58x309x=0;e58x279x=1;e58x299x=2;e58x289x=3;e58x2459x8x1819x=2x;e58x2459x8x1829x=2x;e58x2459x8x559x=2x;e58x2459x8x1039x=2x;e58x2459x8x1999x=2x;e58x2459x8x2779x=2x;e58x2459x8x1599x=9z(u2,d1,d2,o5,r7,k0,s2){5x8x1699x(u2,d1,d2,o5,2x);5x8x1039x=s28x1549x(_[12])>-1;5x8x559x=s28x1549x(_[8])>-1;5x8x2779x=s28x1549x(_[44])>-1;5x8x1999x=s28x1549x(_[37])>-1;5x8x1819x=r7;5x8x1829x=k0};e58x2459x8x1609x=9z(s4,u2,d1,d2,o5,r7,k0,s2){5x8x1719x(u2,d1,d2,o5,r7,k0,s2);5x8x2099x=s4};e58x2459x8x1409x=9z(s1){6y (s1){2z _[8]:3y 5x8x559x;2z _[12]:3y 5x8x1039x;2z _[37]:3y 5x8x1999x;2z _[44]:3y 5x8x2779x}3y 1x};8y e9=2y 6x8x339x;e98x2459x=2y f0;e98x2459x8x1059x=2x;e98x2459x8x1679x=9z(u2,d1,d2,o5,q8){5x8x1699x(u2,d1,d2,o5,2x);5x8x1059x=q8};e98x2459x8x1689x=9z(s4,u2,d1,d2,o5,q8){5x8x1679x(u2,d1,d2,o5,q8);5x8x2099x=s4};8y e8=2y 6x8x339x;e88x2459x=2y e4;e88x359x=1;e88x59x=2;e88x419x=3;e88x2459x8x2529x=2x;e88x2459x8x2409x=2x;e88x2459x8x2139x=2x;e88x2459x8x639x=2x;e88x2459x8x629x=2x;e88x2459x8x1659x=9z(u2,d1,d2,n6,s9,s5,q3,i5){5x8x1579x(u2,d1,d2);5x8x2529x=n6;5x8x2409x=s9;5x8x2139x=s5;5x8x639x=q3;5x8x629x=i5};e88x2459x8x1669x=9z(s4,u2,d1,d2,n6,s9,s5,q3,i5){5x8x1659x(u2,d1,d2,n6,s9,s5,q3,i5);5x8x2099x=s4};8y e1=2y 6x8x339x;e18x2459x=2y e4;e18x2459x8x1119x=2x;e18x2459x8x1559x=9z(u2,d1,d2,m2){5x8x1579x(u2,d1,d2);5x8x1119x=m2};e18x2459x8x1569x=9z(s4,u2,d1,d2,m2){5x8x1559x(u2,d1,d2,m2);5x8x2099x=s4};8y e3=9z2w{4y 9};e38x2459x8x3289x=2x;e38x2459x8x529x=9z(q9){0y(5y q97w_[288])4y 9;q9=h9(q9,7x8x1959x8x1489x);8y e0=f38x1379x(q9);0y(!e0)3y;8y l5=2y e0;8z(8y s0 0z l5)0y(s08x1549x(_[321])7w0)5x[s0]=l5[s0];0y(e08x2969x){8y o1=g2(e0),c1=o18x1399x(_[287]),k9=0,o0,a6,m3,u4,b4;a6=o18x1399x('*');8z(8y j7=0,j8=a68x1899x;j7<j8;j70v){m3=a6[j7];0y(u4=m38x1359x(_[322])){8z(8y i6=0,a0=u48x2819x(' '),i7=a08x1899x;i6<i7;i60v){b4=a0[i6]8x2819x('=');0y(b48x1899x5w2){0y(b4[0]8x1549x(':'+_[298])>-1){0y(!m38x1299x)m38x579x(m38x2329x8x1019x(5x8x1359x(b4[1])))}7z 0y(b4[1]8x1549x(':'+_[298])>-1)m38x2749x(b4[0],5x8x3019x4w5x8x1739x);7z m38x2749x(b4[0],5x8x1359x(b4[1]))}7z m38x2749x(b4[0],5x8x1359x(b4[0]))}}}9y((o0=c1[k9])3w(k9<c18x1899x)){0y(u4=o08x1359x(_[153])){a6=g0([5x],'>'+u4);8z(8y j7=0,j8=a68x1899x;m3=a6[j7];j70v){0y(!m38x3269x){0y(m38x2159x5w1)m38x3269x=3x;o08x2339x8x1749x(m3,o0)}}o08x2339x8x2569x(o0)}7z {k90v}}0y(o0=c1[0]){8z(j7=0;m3=5x8x869x[j7];j70v){0y(!m38x3269x){0y(m38x2159x5w1)m38x3269x=3x;o08x2339x8x1749x(m3,o0);j71v}}o08x2339x8x2569x(o0)}7y{9y(m0=o18x1299x)5x8x579x(o18x1299x)}3z(e)1wl58x2769x=5x;l58x2769x8x1389x=i2}7z {8z(8y m0=5x8x1299x;m0;m0=m08x2149x)0y(m08x2159x5w1)m08x3269x=3x;l58x2769x=2x}l58x739x=5x;l58x659x=e08x659x?e08x659x8x2459x:2x;5x8x889x8w(5x8x889x?' ':'')+_[321]+'-'+_[72]+'-'+e08x1519x;l58x29x=1w;0y(e08x29x)8z(8y s3 0z e08x29x)h8(l5,s3);0y(!5x8x3289x)5x8x3289x=2y f2;5x8x3289x[5x8x3289x8x1899x0v]=l5;0y(5y l58x3259x5w_[134])l58x3259x2w;0y(5y l58x3279x5w_[134])l58x3279x2w};e38x2459x8x2559x=9z(q9){0y(5y q97w_[288])4y 9;0y(!5x8x3289x)3y;q9=h9(q9,7x8x1959x8x1489x);8z(8y i=0,j=5x8x3289x8x1899x,l5;i<j;i0v){l5=5x8x3289x[i];0y(l58x959x8x1159x+'#'+l58x959x8x1519x5wq9)1z}0y(!l5)3y;0y(l58x29x)8z(8y s3 0z l58x29x)i3(l5,s3);0y(l58x2769x){6z l58x2769x}6z l58x739x;6z l58x659x;8z(;5x8x3289x[i];i0v)5x8x3289x[i]=5x8x3289x[i+1];6z 5x8x3289x[i];5x8x3289x8x1899x1v;0y(5y l58x3299x5w_[134])l58x3299x2w};e38x2459x8x1439x=9z(q9){0y(5y q97w_[288])4y 9;0y(5x8x3289x){q9=h9(q9,7x8x1959x8x1489x);8z(8y i=0,j=5x8x3289x8x1899x,l5;i<j;i0v){l5=5x8x3289x[i];0y(l58x959x8x1159x+'#'+l58x959x8x1519x5wq9)3y 3x}}3y 1x};9z g2(e0){8y o1,c1,o0,m3;o1=e08x2969x8x939x(3x);8y b0=o18x1399x(_[198]),m9,n0;0y(b08x1899x){m9=b0[0];0y(e08x659x3we08x659x8x2969x){n0=g2(e08x659x);c1=n08x1399x(_[287]);0y(c18x1899x3wm98x1299x){9y(m3=m98x1299x)c1[0]8x2339x8x579x(m98x1299x);c1[0]8x2339x8x2569x(c1[0])}9y(m3=n08x1299x)m98x2339x8x1749x(m3,m9)}7z 1wm98x2339x8x2569x(m9)}3y o1};9z i2(r6){0y(!5x8x19x)5x8x19x=1w;3y 5x8x19x[r6]4w(5x8x19x[r6]=(9z (n3){8z(8y m3=2x;n3;n3=n38x2149x){0y(n38x2159x5w13w!n38x3269x){0y(n38x1359x(_[323])5wr6)3y n3;0y(n38x1299x3w(m3=4x8x779x(n38x1299x)))3y m3}}3y m3})(5x8x1299x))};8y e2=9z2w{4y 9};e28x2459x8x689x=2x;e28x2459x8x1929x=9z(q9){0y(5y q97w_[288])4y 9;q9=h9(q9,7x8x1959x8x1489x);0y(!(q9 0z 5x8x689x)){8y m1=f38x1269x(q9)8x2639x;0y(m17w2x3wm18x1149x3wm18x1149x8x2929x5w_[234])m1=2x;5x8x689x[q9]=m1;0y(m1)f38x2439x(m1,q9)}3y 5x8x689x[q9]};9z g3(n3){8z(8y t1 0z f38x2659x)8z(8y j7=0,a4=f38x2659x[t1],a6=g0([7x],t18x2589x(/\\\\:/g,'|')),j8=a68x1899x;j7<j8;j70v)8z(8y i9=0,j0=a48x1899x;i9<j0;i90v)e38x2459x8x529x8x769x(a6[j7],a4[i9])};9z g4(n3){8z(8y l5,e0;n3;n3=n38x2149x){0y(n38x2159x5w1){0y(n38x3289x 1y f2){9y(l5=n38x3289x[1vn38x3289x8x1899x]){e0=l58x959x;0y(l58x29x)8z(8y s3 0z l58x29x)i3(l5,s3);6z l58x659x;6z l58x739x;6z l58x2769x;n38x3289x[n38x3289x8x1899x]=2x}n38x3289x=2x}0y(n38x1299x)g4(n38x1299x)}}};8y p3=/([\\/2w[\\]?1w|*+-])/g,p7=/^('[^']*')|(\"[^\"]*\")$/;8y p4=/\\s*,\\s*/,p2=/^[^\\s>+~]/,p1=/([\\w-]+\\|?[\\w-]+)\\s*(\\W?=)?\\s*([^\\9x*)/,p8=/::|[\\s#.:>+~2w@\\[\\9x|[^\\s#.:>+~2w@\\[\\9x+/g,p9=/\\s*([\\s>+~(,]|^|$)\\s*/g,p5=/(\\[[^\\9x+\\])/g,p6=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;8y j2=0;9z g0(a8,t5,h3,c7){8y a1=a8,b7=0w,c0=t58x2589x(p9,'$1')8x2589x(p5,'@@$1')8x2589x(p6,'$1*$2')8x2819x(p4),b9,t3;8y i,j,u1,r2,q2,i1,a6,m3,c9,d0;8z(8y k7=0,k8=c08x1899x;k7<k8;k70v){t3=c0[k7];0y(p28x2979x(t3))t3=' '+t3;b9=t38x1969x(p8)4w0w;a8=a1;8z(8y j9=0,k1=b98x1899x;j9<k1;q2=''){a6=0w;u1=b9[j90v];r2=b9[j90v];0y(i1=l7[u1]){8y u0=r28x2589x('|',':');8z(i=0,j=a88x1899x;i<j;i0v)i1(a6,a8[i],u0,h3)}7z 0y(u15w'.'){8y q0=6x8x429x('(^|\\\\s)'+r2+'(\\\\s|$)');8z(i=0,j=a88x1899x;i<j;i0v)0y(q08x2979x(a8[i]8x889x))a68x2469x(a8[i])}7z 0y(u15w'#'){8y n3=7x8x1389x(r2);0y(n3)8z(i=0,j=a88x1899x;i<j;i0v)0y(a8[i]5wn3){a68x2469x(n3);1z}}7z 0y(u15w':'4wu15w'@'){c9=b9[j9]5w'(';d0=b9[j9]5w'[';0y(d04wc9){j90v;9y(b9[j90v]7w(c9?')':']')3wj9<k1)q28wb9[j9-1]}0y(u15w'@'){8y b1=q28x1969x(p1);0y(!b1[2]4w(i1=l6[b1[29x)){8y q4=b1[1]8x2589x('|',':'),q7=g1(b1[3])4w'',u4;8z(i=0,j=a88x1899x;i<j;i0v)0y((u4=f5(a8[i],q4,h3))3w(!b1[2]4wi1(u4,q7)))a68x2469x(a8[i])}}7z 0y(u15w':'){0y(r25w_[218]){8y b5=g0([a8[0]8x2329x],q2,h3),d4;8z(i=0,j=a88x1899x;i<j;i0v){d4=1x;8z(8y n=0,m=b58x1899x;n<m3w!d4;n0v)0y(b5[n]5wa8[i])d4=3x;0y(!d4)a68x2469x(a8[i])}}7z {0y(i1=l8[r2]){8z(i=0,j=a88x1899x;i<j;i0v)0y(i1(a8[i],q2))a68x2469x(a8[i])}}}}7z 0y(u15w'::')1w7z {f38x2269x(\"Unknown element selector '\"+u1+\"' 0z query '\"+t3+\"'\")}a8=a6}8z(i=0,j=a68x1899x;i<j;i0v){m3=a6[i];0y(m3.a227wj2){m3.a22=j2;b78x2469x(m3)}}}j20v;3y b7};9z f4(u4){3y u48x2589x(p3,'\\\\$1')};9z g1(t7){3y p78x2979x(t7)?t78x2789x(1,-1):t7};9z f6(n3,u0){8y c3=u08x2819x(':');0y(c38x1899x>13w7x8x2109x3w7x8x2109x[c3[09x){8y a6=0w;8z(8y i=0,c2=n38x1399x(c3[1]),j=c28x1899x;i<j;i0v)0y(c2[i]8x2669x5wc3[0])a68x2469x(c2[i]);3y a6}7z 3y u05w'*'3wn38x549x?n38x549x:n38x1399x(u0)};9z f8(m3){9y(m3=m38x2429x)0y(m38x2159x5w1)3y m3;3y 2x};9z f7(m3){9y(m3=m38x2149x)0y(m38x2159x5w1)3y m3;3y 2x};9z f9(m3,t0,h3){3y t05w'*'4wm38x2929x8x3089x2w5wt08x3089x2w};8y f5=7x8x2109x?9z(m3,t0,h3){3y t05w_[87]?m38x889x:t05w_[289]?m38x2899x8x1029x:m3[t0]}:9z(m3,t0,h3){3y m38x1359x(t0)};8y l7=1w,l6=1w,l8=1w;l7[' ']=9z(b7,m3,u0,h3){8z(8y n=0,c2=f6(m3,u0,h3),m=c28x1899x;n<m;n0v)b78x2469x(c2[n])};l7['>']=9z(b7,m3,u0,h3){8z(8y n=0,c2=m38x869x,m=c28x1899x;n<m;n0v)0y(c2[n]8x2159x5w13wf9(c2[n],u0,h3))b78x2469x(c2[n])};l7['+']=9z(b7,m3,u0,h3){0y((m3=f7(m3))3wf9(m3,u0,h3))b78x2469x(m3)};l7['~']=9z(b7,m3,u0,h3){9y(m3=f7(m3))0y(f9(m3,u0,h3))b78x2469x(m3)};l6['=']=9z(u4,q7){3y u45wq7};l6['~=']=9z(u4,q7){8y l9=4x8x779x8x19x4w(4x8x779x8x19x=1w),q0=l9[q7]4w(l9[q7]=6x8x429x('(^|)'+f4(q7)+'(|$)'));3y q08x2979x(u4)};l6['|=']=9z(u4,q7){8y l9=4x8x779x8x19x4w(4x8x779x8x19x=1w),q0=l9[q7]4w(l9[q7]=6x8x429x('^'+f4(q7)+'(-|$)'));3y q08x2979x(u4)};l6['^=']=9z(u4,q7){3y u48x1549x(q7)5w0};l6['$=']=9z(u4,q7){3y u48x1549x(q7)5wu48x1899x-q78x1899x};l6['*=']=9z(u4,q7){3y u48x1549x(q7)>-1};l88x1279x=9z(m3){3y f8(m3)5w2x};l88x1909x=9z(m3){3y m38x2929x8x3089x2w5w'a'3wm38x1359x(_[148])};l88x1869x=9z(m3,q1){8z(8y u4;m38x2159x7w9;m3=m38x2339x)0y(u4=(m38x1359x(_[186])4wm38x1359x(_[330]+':'+_[186])))3y u48x1549x(q1)5w0;3y 1x};l88x3189x=9z(m3){3y 1x};l88x519x=9z(m3){3y 1x};l88x1479x=9z(m3){3y 1x};l88x1319x=9z(m3){3y 1x};l88x969x=9z(m3,s7){3y (m38x3019x4wm38x1739x)8x1549x(g1(s7))>-1};l88x2649x=9z(m3){3y m35wm38x2329x8x1149x};l88x1189x=9z(m3){3y m38x1299x?1x:3x};l88x1879x=9z(m3){3y f7(m3)5w2x};l88x2199x=9z(m3,s7){3y 1x};l88x2209x=9z(m3,s7){3y 1x};l88x2229x=9z(m3,s7){3y 1x};l88x2219x=9z(m3,s7){3y 1x};l88x1289x=9z(m3){3y 1x};l88x1889x=9z(m3){3y 1x};l88x2279x=9z(m3){3y!f7(m3)3w!f8(m3)};l88x2289x=9z(m3){3y 1x};l88x2939x=9z(m3){3y m38x1519x5w6x8x1959x8x1459x8x2789x(1)};l88x1199x=9z(m3){3y m38x1129x5w=1x};l88x1129x=9z(m3){3y m38x1129x};l88x859x=9z(m3){3y m38x859x};8y f1=2y 6x8x339x;f18x2459x8x3259x=2y 6x8x339x;f18x2459x8x3279x=2y 6x8x339x;f18x2459x8x3299x=2y 6x8x339x;8y f2=2y 6x8x339x;f28x2459x8x1899x=0;f28x2459x8x1769x=9z(j9){0y(5y j95w_[223]3wj92v5x8x1899x)3y 5x[j9];7z 4y 1};8y p0=/\\s*([^}]+)\\s*{([^}]+)}/g,o7=/b0zd0zg:\\s*url\\s*\\(['\"\\s]*([^'\"]+)['\"\\s]*\\)/g,o8=/(\\/\\*.*?\\*\\/)/g,o9=/@namespace\\s+(\\w+)?\\s*\"([^\"]+)\";?/g;9z h7(t9){8y t1,b8,k3,k4,t8,c6,l0,l1;t9=t98x2589x(o8,'');t9=t98x2589x(o9,'');0y(b8=t98x1969x(p0)){8z(k3=0,k4=b88x1899x;k3<k4;k30v){0y(b8[k3]8x1969x(p0)){t1=6x8x429x.$1;t8=6x8x429x.$2;0y(c6=t88x1969x(o7)){0y(!f38x2659x[t1])f38x2659x[t1]=0w;8z(l0=0,l1=c68x1899x;l0<l1;l00v)0y(c6[l0]8x1969x(o7))f38x2659x[t1]8x2469x(6x8x429x.$1)}}}}};9z h62w{0y(!h68x1939x)h68x1939x=3x;7z 3y;8y r4=7x8x1959x8x1489x,r3,u2,a6,m3,i,j;8z(i=0,a6=7x8x1399x(_[289]),j=a68x1899x;i<j;i0v){m3=a6[i];0y(m38x1359x(_[314])5w_[299])h7(m38x3019x4wm38x1729x)}8z(i=0,a6=7x8x1399x(_[190]),j=a68x1899x;i<j;i0v){m3=a6[i];r3=m38x1359x(_[148]);u2=m38x1359x(_[314]);0y(u25w_[299]){0y(i4(r3,r4))h7(f38x1269x(r3)8x2629x)}7z 0y(u25w_[58]){0y(m38x1359x(_[251])5w_[67])e28x2459x8x1929x8x769x(7x,r3)}}g3(7x8x719x)};9z g6(s3){3y 9z 2w{3y _[134]+' '+s3+'2w'+' '+'{\\n\\t[native code]\\n}'}};9z h5(s3){3y 9z 2w{3y '['+s3+']'}};8y m8=7x8x1529x;0y(!m84w!m88x1449x(_[46],'2.0')){0y(7x8x1009x(_[113])8x539x){0y(6x8x2119x8x3169x8x1969x(/applewebkit/i))(9z 2w{0y(7x8x2509x5w_[193]4w7x8x2509x5w_[94])h62w;7z 6x8x2759x(4x8x779x,0)})2w;7z 6x8x539x(_[17],h6,1x)}7z {7x8x3209x('<'+_[269]+' '+_[151]+'=\"'+_[321]+'_'+_[152]+'\" '+_[109]+' '+_[282]+'=\"/'+'/:\"></'+_[269]+'>');7x8x1389x(_[321]+'_'+_[152])8x2299x=9z2w{0y(5x8x2509x5w_[175]4w5x8x2509x5w_[94])h6(5x8x2339x8x2569x(5x))}}0y(6x8x539x)6x8x539x(_[191],h6,3x);7z 6x8x599x(_[225]+_[191],h6);(6x8x329x=e3)8x3099x=h5(_[32]);(6x8x319x=e2)8x3099x=h5(_[31]);(7x8x689x=1w)8x3099x=9z2w{3y '['+_[224]+' '+_[39]+']'};(7x8x1929x=e28x2459x8x1929x)8x3099x=g6(_[192]);e38x2459x8x529x8x3099x=g6(_[52]);e38x2459x8x2559x8x3099x=g6(_[255]);e38x2459x8x1439x8x3099x=g6(_[143])};0y(!m84w!m88x1449x(_[43],'3.0')){0y(!7x8x2479x)(7x8x2479x=9z(t5,h3){0y(5y t57w_[288])4y 9;0y(4x8x1899x>13w5y h37w_[134])4y 9;3y g0([5x],t5,h3)[0]4w2x})8x3099x=g6(_[247]);0y(!7x8x2489x)(7x8x2489x=9z(t5,h3){0y(5y t57w_[288])4y 9;0y(4x8x1899x>13w5y h37w_[134])4y 9;3y g0([5x],t5,h3,3x)})8x3099x=g6(_[248])};",">?!>=!..!,,!>.!>,!>\"!\"\"!>>!}}!\'\'!*)!~|!^\\!^^!\\`\\!uofnvdpe!xpeojx!tjiu!tuofnvhsb!fvsu!mmvo!ftmbg!iujx!fmjix!sbw!zsu!idujxt!gpfqzu!xpsiu!osvufs!xfo!gpfdobutoj!gj!opjudovg!spg!ftmf!fufmfe!umvbgfe!fvojuopd!idubd!ftbd!lbfsc!oj",'',0,this,'#text $cache $handlers $stopped $stoppedImmediate ADDITION AT_TARGET ActiveXObject Alt Array BUBBLING_PHASE CAPTURING_PHASE Control DOMActivate DOMAttrModified DOMAttributeNameChanged DOMCharacterDataModified DOMContentLoaded DOMElementNameChanged DOMFocusIn DOMFocusOut DOMMouseScroll DOMNodeInserted DOMNodeInsertedIntoDocument DOMNodeRemoved DOMNodeRemovedFromDocument DOMSubtreeModified DOM_KEY_LOCATION_LEFT DOM_KEY_LOCATION_NUMPAD DOM_KEY_LOCATION_RIGHT DOM_KEY_LOCATION_STANDARD DocumentXBL ElementXBL Function GET MODIFICATION Math Meta Microsoft.XMLHTTP NamedNodeMap Number REMOVAL RegExp Selectors Shift String XBL XMLHTTP XMLHttpRequest XMLSerializer abort active addBinding addEventListener all altKey any appendChild application/xml attachEvent attr-change attr-name attrChange attrName base baseBinding baseName binding bindingDocuments bindings blur body bound-element boundElement bubbles button call callee cancel cancelBubble cancelable capture change charAt charCode checked childNodes class className click click-count clientX clientY cloneNode complete constructor contains contextmenu controllers correct createElement createTextNode cssText ctrlKey currentTarget data dblclick default-action defaultPrevented defer detachEvent detail disabled div documentElement documentURI element elements empty enabled error event eventPhase extend extends factory fetch first-child first-of-type firstChild floor focus fromCharCode fromElement function getAttribute getAttributeNS getBinding getElementById getElementsByTagName getModifierState handler handlers hasBinding hasFeature hash head hover href http://www.w3.org/XML/1998/namespace http://www.w3.org/ns/xbl id implementation includes indexOf initCustomEvent initCustomEventNS initEvent initEventNS initKeyboardEvent initKeyboardEventNS initMouseEvent initMouseEventNS initMouseWheelEvent initMouseWheelEventNS initMutationEvent initMutationEventNS initTextEvent initTextEventNS initUIEvent initUIEventNS initkeyboardEvent innerHTML innerText insertBefore interactive item join key key-location keyCode keyIdentifier keyLocation keydown keypress keyup lang last-child last-of-type length link load loadBindingDocument loaded localName location match media menu metaKey modifiers mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup mousewheel namespaceURI namespaces navigator new-value newValue nextSibling nodeType nodeValue none not nth-child nth-last-child nth-last-of-type nth-of-type number object on onerror only-child only-of-type onreadystatechange open option ownerDocument parentNode parsererror phase pop prefetch preserve prev-value prevValue preventDefault previousSibling process propagate prototype push querySelector querySelectorAll random readyState rel relatedNode relatedTarget removeAttribute removeBinding removeChild removeEventListener replace reset resize resources responseText responseXML root rules scopeName screenX screenY script scroll select send serializeToString setAttribute setTimeout shadowTree shiftKey slice space span split src srcElement stop stopImmediatePropagation stopPropagation strike string style submit table tagName target tbody td template test text text/css text/javascript textContent textInput tfoot th thead timeStamp toElement toLowerCase toString toUpperCase tr true trusted type unload userAgent view visited wheelDelta write xbl xbl-attr xbl-id xbl-pseudo xblBindingAttached xblChild xblEnteredDocument xblImplementations xblLeftDocument xml charCodeAt'.split(' '))
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/client/xbl.js
@@ -0,0 +1,1 @@
+(function(m,u,n,g,e,d){for(g=u[d[190]]-1;g>=0;g--)n+=e[d[45]][d[133]](u[d[334]](g)-1);u=n[d[284]](' ');for(g=u[d[190]]-1;g>=0;g--)m=m[d[261]](e[d[42]](g%10+(e[d[45]][d[133]](122-e[d[36]][d[131]](g/10))),'g'),u[g]);e[d[33]]('_',m)(d)})("8y f3=1w;f38x2119x=_[151];f38x699x=1w;f38x2689x=1w;f38x1269x=7x8x1019x(_[283]);f38x1279x=9z(u4){8y o6=6x8x489x?2y 6x8x489x:2y 6x8x79x(_[38]);o68x2339x(_[34],u4,1x);o68x2759x(2x);3y o6};f38x1249x=9z(e0,d9){e08x659x=d9;0y(d98x29x){e08x29x=1w;8z(8y s4 0z d98x29x){0y(!(s4 0z e08x29x))e08x29x[s4]=0w;8z(8y i=0,j=d98x29x[s4]8x1909x;i<j;i0v)e08x29x[s4]8x2499x(d98x29x[s4][i])}}8z(8y s0 0z d98x2489x)e08x2489x[s0]=d98x2489x[s0];e08x2999x=d98x2999x};f38x1009x=9z(e0,n3,d8){8y u5,n2;9y(n3){n2=n38x2169x;0y(n38x2189x5w1){0y(u5=n38x1369x(_[326]))n38x889x8w(n38x889x?' ':'')+_[326]+'-'+u5+'-'+e08x1529x;0y(u5=n38x1369x(_[327]))n38x889x8w(n38x889x?' ':'')+_[327]+'-'+u5+'-'+e08x1529x;0y(n38x1309x)4x8x779x(e0,n38x1309x,d8)}7z 0y(!d83wn38x2189x5w3){u5=n38x1069x8x2619x(/\\s+/g,' ');0y(u55w' ')n38x2369x8x2599x(n3);7z 0y(n38x1069x7wu5)n38x1069x=u5}n3=n2}};f38x2469x=9z(n3,r8){0y(n38x2189x5w9)n3=n38x1159x;0y(n38x2189x5w1)f38x1189x(n3,f38x1189x8x3249x,r8);7z f38x2299x(\"Not a valid XML Node passed\")};f38x1389x=9z(q9){0y(!(q9 0z f38x699x)){8y a3=q98x2849x('#');0y(a38x1909x<2)f38x2299x(\"Invalid b0zd0zg URI '\"+q9+\"'\");e28x2489x8x1939x8x769x(7x,a3[0]);0y(!f38x699x[q9])f38x2299x(\"B0zd0zg '\"+a3[1]+\"' was not found 0z '\"+a3[0]+\"'\")}3y f38x699x[q9]4w2x};f38x2299x=9z(s1){0y(6x8x959x3w6x8x959x8x1219x)6x8x959x8x1219x(\"XBL 2.0:\"+s1)};f38x1189x=9z(n4,g9,u7){8z(8y i=0,j=n48x869x8x1909x,s4,n3;i<j;i0v){n3=n48x869x[i];0y(n38x2189x5w1)0y(n38x2119x5wf38x2119x){0y(g9[s4=(n38x1959x4wn38x669x)])g9[s4](n3,u7);7z f38x2299x(\"Element '\"+n38x2179x+\"' could not be a child of '\"+n48x2179x+\"'\")}}};f38x1189x8x3249x=9z(n3,q9){f38x1189x(n3,4x8x779x,q9)};f38x1189x8x3249x8x679x=9z(n3,q9){8y r6=n38x1369x(_[152]),r0=n38x1369x(_[117]);0y(r64wr0){0y(!r6)r6=_[324]+'-'+6x8x369x8x1319x(6x8x369x8x2529x2w*100000000);8y e0=2y 6x8x339x;e08x1529x=r6;e08x1169x=q9;f38x699x[q9+'#'+r6]=e0;0y(r0){0y(!f38x2689x[r0])f38x2689x[r0]=0w;f38x2689x[r0]8x2499x(q9+'#'+r6)}8y r1=n38x1369x(_[125]),a7,u6=g8(n3,q9),d9;0y(r1){a7=r18x2849x('#');0y(d9=f38x1389x(h9(a7[0],u6)+'#'+a7[1]))f38x1249x(e0,d9);7z f38x2299x(\"Extends '\"+r1+\"' was not found thus ignored\")}f38x1189x(n3,4x8x779x,e0)}7z f38x2299x(\"Either required attribute 'id' or 'element' is miss0zg 0z \"+n38x2179x)};f38x1189x8x3249x8x2729x=9z(n3,q9){8y t7=n38x1369x(_[285]),t3,n9;0y(t7){t7=h9(t7,g8(n3,q9));t3=f38x1279x(t7)8x2659x}7z 0y(n38x1309x)t3=n38x1309x8x2199x;n9=7x8x1019x(_[272]);n98x2779x(_[317],_[303]);0y(7x8x2129x)n98x3019x=t3;7z n98x579x(7x8x1029x(t3));7x8x1409x(_[147])[0]8x579x(n9)};f38x1189x8x3249x8x679x8x1539x=9z(n3,e0){8y t7=n38x1369x(_[285]),t3='';0y(t7){t7=h9(t7,g8(n3,e08x1169x));t3=f38x1279x(t7)8x2659x}7z 0y(n38x1309x)t3=n38x1309x8x2199x;0y(t3){7y{8y m8=6x8x339x(t38x2619x(/^\\s*\\(\\s*/g,\"3y \")8x2619x(/\\s*\\)\\s*$/g,''))2w;8z(8y s0 0z m8)e08x2489x[s0]=m8[s0]}3z(m4){f38x2299x(m48x2009x)}}};f38x1189x8x3249x8x679x8x2999x=9z(n3,e0){8z(8y n2=n38x1309x,s4='';n2;n2=n28x2169x)0y(n28x2189x5w13wn28x2119x7wf38x2119x)s4=(n28x1959x4wn28x669x)8x3119x2w;8y r5=6x8x499x?2y 6x8x499x2w8x2769x(n3):n38x3339x;r5=r58x2619x(/^<[\\w:]*template[^>]*>\\s*/i,'')8x2619x(/\\s*<\\/[\\w:]*template>$/i,'');r5=r58x2619x(/(<\\/?)[\\w:-]*content/gi,'$1'+_[290]);r5=r58x2619x(/(<\\/?)[\\w:-]*0zherited/gi,'$1'+_[199]);r5=r58x2619x(/(<\\/?)[\\w:-]*div/gi,'$1'+_[114]);r5=r58x2619x(/<([\\w:-]+)([^>]*)\\/>/gi,'<$1$2></$1>');r5=r58x2619x(/<(br|0zput|img)([^>]*)><\\/[^>]*>/gi,'<$1$2/>');r5=r58x2619x(/\\sclass=\"([^\"]+)\"/gi,' '+_[87]+'=\"'+_[324]+'-$1-'+e08x1529x+'\"');r5=r58x2619x(/\\sid=\"([^\"]+)\"/gi,' '+_[326]+'=\"$1\"');r5=r58x2619x(/\\s[\\w-]+:attr=\"([^\"]+)\"/gi,' '+_[325]+'=\"$1\"');r5=r58x2619x(/\\s[\\w-]+:pseudo=\"([^\"]+)\"/gi,' '+_[327]+'=\"$1\"');8y m7=f38x1269x,o3=2x;6y (s4){2z _[298]:2z _[307]:r5='<'+_[314]+'>'+r5+'</'+_[314]+'>';2z _[314]:r5='<'+_[297]+'>'+r5+'</'+_[297]+'>';2z _[297]:2z _[308]:2z _[306]:m78x1739x='<'+_[294]+'>'+r5+'</'+_[294]+'>';o3=m78x1409x(s4)[0]8x2369x;1z;2z _[234]:m78x1739x='<'+_[274]+'>'+r5+'</'+_[274]+'>';o3=m78x1309x;1z;5z:m78x1739x=_[0]+'<div>'+r5+'</div>';o3=m78x869x[1];1z}f38x1009x(e0,o3,(n38x1379x?n38x1379x(_[150],_[282]):n38x1369x(_[333]+':'+_[282]))5w_[241]);e08x2999x=o38x2369x8x2599x(o3)};f38x1189x8x3249x8x679x8x1439x=9z(n3,e0){f38x1189x(n3,4x8x779x,e0)};f38x1189x8x3249x8x679x8x1439x8x1429x=9z(n3,e0){8y s4=n38x1369x(_[122]),g9;0y(s4){0y(n38x1309x){0y(!e08x29x)e08x29x=1w;0y(!e08x29x[s4])e08x29x[s4]=0w;7y{g9=2y 6x8x339x(_[122],n38x1309x8x2199x)}3z(m4){f38x2299x(m48x2009x)}0y(g9){e08x29x[s4]8x2499x(g9);8y u5;0y(u5=n38x1369x(_[238]))g98x2389x=u55w_[81]?1:u55w_[296]?2:0;0y(u5=n38x1369x(_[316]))g98x3169x=u55w_[315];0y(u5=n38x1369x(_[247]))g98x2479x=u57w_[287];0y(u5=n38x1369x(_[108]))g98x1089x=u57w_[78];0y(u5=n38x1369x(_[75]))g98x759x=u5*1;0y(u5=n38x1369x(_[90]))g98x909x=u5*1;0y(u5=n38x1369x(_[202]))g98x2029x=u5;0y(u5=n38x1369x(_[179]))g98x1799x=u5;0y(u5=n38x1369x(_[180]))g98x1809x=u5;0y(u5=n38x1369x(_[301]))g98x3019x=u5;0y(u5=n38x1369x(_[242]))g98x2429x=u5;0y(u5=n38x1369x(_[214]))g98x2149x=u5;0y(u5=n38x1369x(_[61]))g98x619x=u5;0y(u5=n38x1369x(_[60]))g98x609x=u5}}}7z f38x2299x(\"Miss0zg 'event' attribute 0z \"+n38x2179x)};f38x1189x8x3249x8x679x8x2649x=9z(n3,e0){f38x1189x(n3,4x8x779x,e0)};f38x1189x8x3249x8x679x8x2649x8x2929x=9z(n3,e0){8y t7=n38x1369x(_[285]),r9=n38x1369x(_[198]),q5=g8(n3,e08x1169x),t9,o2,a5;0y(t7){t7=h9(t7,q5);t9=f38x1279x(t7)8x2659x}7z 0y(n38x1309x){t7=q5;t9=n38x1309x8x2199x}0y(t9){8y t5=':'+_[72];t9=t98x2619x(/\\s\\.([\\w-]+)([\\s{+~>])/g,' .'+_[324]+'-$1-'+e08x1529x+'$2');t9=t98x2619x(/#([\\w-]+)([\\s{+~>])/g,'.'+_[326]+'-$1-'+e08x1529x+'$2');t9=t98x2619x(/::([\\w-]+)([\\s{+~>])/g,'.'+_[327]+'-$1-'+e08x1529x+'$2');t9=t98x2619x(/\\s*([^{\\n]+{[^}]+})/g,t5+' '+'$1');t9=t98x2619x(2y 6x8x429x(t5+' '+t5,'g'),t5);t9=t98x2619x(/:bound-element([\\s{+~>.:])/g,'.'+_[324]+'-'+_[72]+'-'+e08x1529x+'$1');0y(a5=t98x1979x(/url\\s*\\([^\\)]+\\)/g)){8z(8y i=0,j=a58x1909x,c5;i<j;i0v){c5=a5[i]8x1979x(/(url\\s*\\(['\"]?)([^\\)'\"]+)(['\"]?\\))/);t9=t98x2619x(c5[0],c5[1]+h9(c5[2],t7)+c5[3])}}0y(7x8x2129x){f38x1269x8x1739x='&nbsp;'+'<'+_[292]+' '+_[317]+'=\"'+_[302]+'\"'+(r9?' '+_[198]+'=\"'+r9+'\"':'')+'>'+t9+'</'+_[292]+'>';o2=f38x1269x8x869x[1]}7z {o2=7x8x1019x(_[292]);o28x2779x(_[317],_[302]);0y(r9)o28x2779x(_[198],r9);o28x579x(7x8x1029x(t9))}7x8x1409x(_[147])[0]8x579x(o2)}};f38x1189x8x3249x8x679x8x2649x8x2409x=9z(n3,e0){8y t7=n38x1369x(_[285]);0y(t7){t7=h9(t7,g8(n3,e08x1169x));f38x1279x(t7)}7z f38x2299x(\"Required attribute 'src' is miss0zg 0z \"+n38x2179x)};9z h4(l2,k1){8y u5=6x8x409x(l2)8x3129x(16);0y(u58x1909x<k1)u5=6x8x99x(k1+1-u58x1909x)8x1789x('0')+u5;3y u5};9z g5(m3){8z(8y n3=m3;n3;n3=n38x2369x)0y(n38x3299x4w(n38x3319x3wn38x3319x 1y f2))3y n3;3y m3};9z h2(j1){0y(!7x8x2129x)3y j1;0y(j15w4)3y 1;0y(j15w2)3y 2;3y 0};9z h0(m5){3y n1[m58x1819x]4w('U+'+h4(m58x1819x,4))8x3139x2w};9z h1(m5){8y b3=0w;0y(m58x559x)b3[b38x1909x]=_[8];0y(m58x1049x)b3[b38x1909x]=_[12];0y(m58x2019x)b3[b38x1909x]=_[37];0y(m58x2809x)b3[b38x1909x]=_[44];3y b38x1789x(' ')};8y n1={8:'U+0008',9:'U+0009',13:'Enter',16:_[44],17:_[12],18:_[8],20:'CapsLock',27:'U+001B',33:'PageUp',34:'PageDown',35:'End',36:'Home',37:'Left',38:'Up',39:'Right',40:'Down',45:'Insert',46:'U+002E',91:'W0z',112:'F1',113:'F2',114:'F3',115:'F4',116:'F5',117:'F6',118:'F7',119:'F8',120:'F9',121:'F10',122:'F11',123:'F12'};9z h8(l5,s4){0y(s45w_[305])s4=_[185];7z 0y(s45w_[210]){0y(6x8x999x)s4=_[21]}7z 0y(s45w_[204]){0y(!7x8x2129x)s4=_[208]}7z 0y(s45w_[205]){0y(!7x8x2129x)s4=_[207]}7z 0y(s45w_[89]){h8(l5,_[98]);h8(l5,_[107])}7z 0y(s45w_[19])s4=_[132];7z 0y(s45w_[20])s4=_[70];7z 0y(s45w_[13])s4=_[89];0y(l58x29x[s4])3y;8y m3=l58x739x,g9=9z(m5){3y i0(s4,m5,l5)};l58x29x[s4]=g9;0y(s45w_[14]){0y(7x8x2129x4w6x8x2139x8x3199x8x1979x(/applewebkit/i)){8y s9='$'+_[324]+'-',s7,m6;m3[s9+_[2779x=m38x2779x;m38x2779x=9z(s4,u5){s7=5x8x1369x(s4);0y(s77wu5){5x[s9+_[2779x(s4,u5);m6=2y e8;m68x1669x(s4,3x,1x,5x,s7,u5,s4,s7?e88x359x:e88x59x);g9(m6)}};m3[s9+_[2579x=m38x2579x;m38x2579x=9z(s4){s7=5x8x1369x(s4);0y(s7){5x[s9+_[2579x(s4);m6=2y e8;m68x1669x(s4,3x,1x,5x,s7,2x,s4,e88x419x);g9(m6)}};3y}}0y(m38x599x)m38x599x(_[228]+s4,g9);7z m38x539x(s4,g9,1x)};9z i3(l5,s4){0y(!l58x29x[s4])3y;8y m3=l58x739x,g9=l58x29x[s4];0y(m38x1119x)m38x1119x(_[228]+s4,g9);7z m38x2609x(s4,g9,1x);6z l58x29x[s4]};9z i0(u3,m5,l5){8y m3=g5(m58x2869x4wm58x2969x),j3=0,m6=2x,n5=2x;6y (u3){2z _[98]:u3=_[89];2z _[208]:2z _[207]:n5=m58x2569x4w(u35w_[208]?m58x1349x:u35w_[207]?m58x3109x:2x);0y(n53wg5(n5)5wm3)3y;2z _[206]:2z _[203]:2z _[209]:2z _[107]:2z _[89]:m6=2y e6;m68x1629x(u3,3x,3x,6x,u35w_[107]?2:m58x1129x4w1,m58x2709x,m58x2719x,m58x919x,m58x929x,m58x1049x,m58x559x,m58x2809x,m58x2019x4w1x,m58x3179x5w_[98]?2:h2(m58x759x),n5);1z;2z _[204]:2z _[205]:n5=m58x2569x4w(u35w_[208]?m58x1349x:u35w_[207]?m58x3109x:2x);0y(n53wg5(n5)5wm3)3y;m6=2y e6;m68x1629x(u3,1x,1x,6x,m58x1129x4w1,m58x2709x,m58x2719x,m58x919x,m58x929x,m58x1049x,m58x559x,m58x2809x,m58x2019x4w1x,h2(m58x759x),m58x2569x);1z;2z _[184]:2z _[186]:m6=2y e5;m68x1609x(u3,3x,3x,6x,h0(m5),2x,h1(m5));1z;2z _[185]:0y(m58x1049x4wm58x559x4wm58x1819x 0z n1)3y;u3=_[305];2z _[305]:m6=2y e9;m68x1689x(u3,3x,3x,6x,6x8x459x8x1339x(m58x849x4wm58x1819x));1z;2z _[132]:2z _[70]:m6=2y f0;m68x1709x(u3,1x,1x,6x,2x);1z;2z _[13]:m6=2y f0;m68x1709x(u3,3x,3x,6x,2x);1z;2z _[19]:2z _[20]:2z _[273]:2z _[263]:m6=2y f0;m68x1709x(u3,3x,1x,6x,2x);1z;2z _[21]:u3=_[210];2z _[210]:m6=2y e7;m68x1649x(u3,3x,3x,6x,2x,m58x2709x,m58x2719x,m58x919x,m58x929x,h2(m58x759x),2x,h1(m5),m58x2869x?-1*m58x3229x:m58x1129x*40);1z;2z _[192]:2z _[318]:m6=2y e4;m68x1589x(u3,1x,1x);1z;2z _[293]:2z _[262]:m6=2y e4;m68x1589x(u3,3x,3x);1z;2z _[50]:2z _[121]:2z _[82]:2z _[274]:m6=2y e4;m68x1589x(u3,3x,1x);1z;2z _[26]:2z _[22]:2z _[24]:2z _[25]:2z _[23]:2z _[16]:2z _[18]:2z _[15]:3y;2z _[14]:0y(m58x1059x7wm58x2969x)3y;m6=2y e8;m68x1669x(u3,3x,1x,m58x2559x,m58x2439x,m58x2159x,m58x639x,m58x629x);1z;5z:m6=2y e1;m68x1579x(m58x2119x4w2x,u3,6wm58x749x,6wm58x809x,m58x1129x)}m68x3169x=3x;m68x2969x=m3;m68x1059x=l58x739x;m68x1239x=m58x2969x5wm58x1059x?e48x69x:e48x109x;8y a9=l58x969x8x29x?l58x969x8x29x[m68x3179x]:2x;0y(a9){8z(8y i=0,j=a98x1909x,g9;i<j;i0v){g9=a9[i];0y(_[316] 0z g93wg98x3169x7wm68x3169x)4z;0y(_[238] 0z g9)0y(g98x2389x7wm68x1239x)4z;0y(m6 1y e64wm6 1y e5){0y(_[202] 0z g9){8y s3=g98x2029x;0y(s35w_[220]){0y(m68x1049x4wm68x559x4wm68x2809x4wm68x2019x)4z}7z 0y(s35w_[56]){0y(!(m68x1049x4wm68x559x4wm68x2809x4wm68x2019x))4z}7z {8z(8y k2=0,b2,d6=3x,b3=s38x2849x(' ');k2<b38x1909x;k20v){0y(b2=b3[k2]8x1979x(/([+-]?)(\\w+)(\\??)/))0y(m68x1419x(b2[2])5w(b2[1]5w'-'))d6=1x}0y(!d6)4z}}0y(m6 1y e6){0y(_[90] 0z g93wg98x909x7wm68x1129x)4z;0y(_[75] 0z g93wg98x759x7wm68x759x)4z}7z 0y(m6 1y e5){0y(_[179] 0z g93wg98x1799x7wm68x1829x)4z}}7z 0y(m6 1y e9){0y(_[301] 0z g93wg98x3019x7wm68x1069x)4z}7z 0y(m6 1y e8){0y(m68x3179x5w_[14]){0y(_[61] 0z g93wg98x619x7wm58x639x)4z;0y(_[60] 0z g93we8[g98x609x8x3139x2w]7wm58x629x)4z;0y(_[242] 0z g93wg98x2429x7wm58x2439x)4z;0y(_[214] 0z g93wg98x2149x7wm58x2159x)4z}}0y(_[108] 0z g9)0y(!g98x1089x)m68x2449x2w;0y(_[247] 0z g9)0y(!g98x2479x)m68x2899x2w;g98x769x(l5,m6);0y(m68x49x)1z}}6y (u3){2z _[132]:2z _[70]:0y(!i0(u35w_[132]?_[19]:_[20],m5,l5))m68x2449x2w;1z;2z _[208]:2z _[207]:0y(m58x2569x3wm58x1059x5wm58x2969x)0y(m58x2969x8x2369x5wm58x2569x4wm58x2969x8x2369x5wm58x2569x8x2369x)i0(u35w_[208]?_[204]:_[205],m5,l5);1z;2z _[89]:0y(m68x759x5w0){8y u1=m68x2969x8x2959x8x3119x2w;0y(u15w_[75]4wu15w'a')0y(!i0(_[13],m5,l5))m68x2449x2w}1z}0y(m68x39x){0y(m58x2899x)m58x2899x2w;7z m58x799x=3x}0y(m68x1099x){0y(m58x2449x)m58x2449x2w;3y 1x}3y 3x};9z g7(u4){8y b6=u48x1979x(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\\\?([^#]*))?(#(.*))?/),n8=1w;n8.a5=b6[2];n8.a0=b6[4];n8.a3=b6[5];n8.a4=b6[7];n8.a1=b6[9];3y n8};9z h9(u4,q6){0y(u45w''4wu48x839x(0)5w'#')3y q6;8y o4=g7(u4);0y(o4.a5)3y u4;8y l4=g7(q6);o4.a5=l4.a5;0y(!o4.a0){o4.a0=l4.a0;0y(o4.a38x839x(0)7w'/'){8y c4=o4.a38x2849x('/'),a2=l4.a38x2849x('/');a28x2399x2w;8y i8=a2[0]5w''?1:0;8z(8y i=0,k1=c48x1909x;i<k1;i0v){0y(c4[i]5w'..'){0y(a28x1909x>i8)a28x2399x2w;7z {a28x2499x(c4[i]);i80v}}7z 0y(c4[i]7w'.')a28x2499x(c4[i])}0y(c4[1vi]5w'..'4wc4[i]5w'.')a28x2499x('');o4.a3=a28x1789x('/')}}8y b6=0w;0y(o4.a5)b68x2499x(o4.a5+':');0y(o4.a0)b68x2499x('/'+'/'+o4.a0);0y(o4.a3)b68x2499x(o4.a3);0y(o4.a4)b68x2499x('?'+o4.a4);0y(o4.a1)b68x2499x('#'+o4.a1);3y b68x1789x('')};9z i4(u4,q6){8y o4=g7(u4),l4=g7(q6);3y!o4.a54w!l4.a54w(o4.a05wl4.a03wo4.a55wl4.a5)};9z g8(n3,q9){0y(n38x2189x5w9)3y q9;0y(n38x2189x5w1){8y u6=n38x1369x(_[333]+':'+_[64]);0y(!u63wn38x1379x)u6=n38x1379x(_[150],_[64]);0y(u6)3y h9(u6,g8(n38x2369x,q9))}3y g8(n38x2369x,q9)};8y e4=2y 6x8x339x;e48x119x=1;e48x69x=2;e48x109x=3;e48x2489x8x2119x=2x;e48x2489x8x749x=2x;e48x2489x8x809x=2x;e48x2489x8x1059x=2x;e48x2489x8x1239x=2x;e48x2489x8x2969x=2x;e48x2489x8x3099x=2x;e48x2489x8x3179x=2x;e48x2489x8x1099x=1x;e48x2489x8x39x=1x;e48x2489x8x49x=1x;e48x2489x8x1589x=9z(u3,d1,d2){5x8x3179x=u3;5x8x749x=d1;5x8x809x=d2};e48x2489x8x1599x=9z(s5,u3,d1,d2){5x8x1589x(u3,d1,d2);5x8x2119x=s5};e48x2489x8x2899x=9z2w{5x8x39x=5x8x749x};e48x2489x8x2889x=9z2w{5x8x49x=5x8x39x=5x8x749x};e48x2489x8x2449x=9z2w{5x8x1099x=5x8x809x};8y f0=2y 6x8x339x;f08x2489x=2y e4;f08x2489x8x3209x=2x;f08x2489x8x1129x=2x;f08x2489x8x1709x=9z(u3,d1,d2,o5,j6){5x8x1589x(u3,d1,d2);5x8x3209x=o5;5x8x1129x=j6};f08x2489x8x1719x=9z(s5,u3,d1,d2,o5,j6){5x8x1709x(u3,d1,d2,o5,j6);5x8x2119x=s5};8y e6=2y 6x8x339x;e68x2489x=2y f0;e68x2489x8x2709x=2x;e68x2489x8x2719x=2x;e68x2489x8x919x=2x;e68x2489x8x929x=2x;e68x2489x8x1049x=2x;e68x2489x8x559x=2x;e68x2489x8x2809x=2x;e68x2489x8x2019x=2x;e68x2489x8x759x=2x;e68x2489x8x2569x=2x;e68x2489x8x1629x=9z(u3,d1,d2,o5,j6,k5,k6,j4,j5,d3,c8,d7,d5,j1,n7){5x8x1709x(u3,d1,d2,o5,j6);5x8x2709x=k5;5x8x2719x=k6;5x8x919x=j4;5x8x929x=j5;5x8x1049x=d3;5x8x559x=c8;5x8x2809x=d7;5x8x2019x=d5;5x8x759x=j1;5x8x2569x=n7};e68x2489x8x1639x=9z(s5,u3,d1,d2,o5,j6,k5,k6,j4,j5,d3,c8,d7,d5,j1,n7){5x8x1629x(u3,d1,d2,o5,j6,k5,k6,j4,j5,d3,c8,d7,d5,j1,n7);5x8x2119x=s5};e68x2489x8x1419x=9z(s2){6y (s2){2z _[8]:3y 5x8x559x;2z _[12]:3y 5x8x1049x;2z _[37]:3y 5x8x2019x;2z _[44]:3y 5x8x2809x}3y 1x};8y e7=2y 6x8x339x;e78x2489x=2y e6;e78x2489x8x3229x=2x;e78x2489x8x1649x=9z(u3,d1,d2,o5,j6,k5,k6,j4,j5,j1,n7,s3,l3){5x8x1629x(u3,d1,d2,o5,j6,k5,k6,j4,j5,s38x1559x(_[12])>-1,s38x1559x(_[8])>-1,s38x1559x(_[44])>-1,s38x1559x(_[37])>-1,j1,n7);5x8x3229x=l3};e78x2489x8x1659x=9z(s5,u3,d1,d2,o5,j6,k5,k6,j4,j5,j1,n7,s3,l3){5x8x1649x(u3,d1,d2,o5,j6,k5,k6,j4,j5,j1,n7,s3,l3);5x8x2119x=s5};8y e5=2y 6x8x339x;e58x2489x=2y f0;e58x309x=0;e58x279x=1;e58x299x=2;e58x289x=3;e58x2489x8x1829x=2x;e58x2489x8x1839x=2x;e58x2489x8x559x=2x;e58x2489x8x1049x=2x;e58x2489x8x2019x=2x;e58x2489x8x2809x=2x;e58x2489x8x1609x=9z(u3,d1,d2,o5,r7,k0,s3){5x8x1709x(u3,d1,d2,o5,2x);5x8x1049x=s38x1559x(_[12])>-1;5x8x559x=s38x1559x(_[8])>-1;5x8x2809x=s38x1559x(_[44])>-1;5x8x2019x=s38x1559x(_[37])>-1;5x8x1829x=r7;5x8x1839x=k0};e58x2489x8x1619x=9z(s5,u3,d1,d2,o5,r7,k0,s3){5x8x1729x(u3,d1,d2,o5,r7,k0,s3);5x8x2119x=s5};e58x2489x8x1419x=9z(s2){6y (s2){2z _[8]:3y 5x8x559x;2z _[12]:3y 5x8x1049x;2z _[37]:3y 5x8x2019x;2z _[44]:3y 5x8x2809x}3y 1x};8y e9=2y 6x8x339x;e98x2489x=2y f0;e98x2489x8x1069x=2x;e98x2489x8x1689x=9z(u3,d1,d2,o5,q8){5x8x1709x(u3,d1,d2,o5,2x);5x8x1069x=q8};e98x2489x8x1699x=9z(s5,u3,d1,d2,o5,q8){5x8x1689x(u3,d1,d2,o5,q8);5x8x2119x=s5};8y e8=2y 6x8x339x;e88x2489x=2y e4;e88x359x=1;e88x59x=2;e88x419x=3;e88x2489x8x2559x=2x;e88x2489x8x2439x=2x;e88x2489x8x2159x=2x;e88x2489x8x639x=2x;e88x2489x8x629x=2x;e88x2489x8x1669x=9z(u3,d1,d2,n6,t0,s6,q3,i5){5x8x1589x(u3,d1,d2);5x8x2559x=n6;5x8x2439x=t0;5x8x2159x=s6;5x8x639x=q3;5x8x629x=i5};e88x2489x8x1679x=9z(s5,u3,d1,d2,n6,t0,s6,q3,i5){5x8x1669x(u3,d1,d2,n6,t0,s6,q3,i5);5x8x2119x=s5};8y e1=2y 6x8x339x;e18x2489x=2y e4;e18x2489x8x1129x=2x;e18x2489x8x1569x=9z(u3,d1,d2,m2){5x8x1589x(u3,d1,d2);5x8x1129x=m2};e18x2489x8x1579x=9z(s5,u3,d1,d2,m2){5x8x1569x(u3,d1,d2,m2);5x8x2119x=s5};8y e3=9z2w{4y 9};e38x2489x8x3319x=2x;e38x2489x8x529x=9z(q9){0y(5y q97w_[291])4y 9;q9=h9(q9,7x8x1969x8x1499x);8y e0=f38x1389x(q9);0y(!e0)3y;8y l5=2y e0;8z(8y s0 0z l5)0y(s08x1559x(_[324])7w0)5x[s0]=l5[s0];0y(e08x2999x){8y o1=g2(e0),c1=o18x1409x(_[290]),k9=0,o0,a6,m3,u5,b4;a6=o18x1409x('*');8z(8y j7=0,j8=a68x1909x;j7<j8;j70v){m3=a6[j7];0y(u5=m38x1369x(_[325])){8z(8y i6=0,a0=u58x2849x(' '),i7=a08x1909x;i6<i7;i60v){b4=a0[i6]8x2849x('=');0y(b48x1909x5w2){0y(b4[0]8x1559x(':'+_[301])>-1){0y(!m38x1309x)m38x579x(m38x2359x8x1029x(5x8x1369x(b4[1])))}7z 0y(b4[1]8x1559x(':'+_[301])>-1)m38x2779x(b4[0],5x8x3049x4w5x8x1749x);7z m38x2779x(b4[0],5x8x1369x(b4[1]))}7z m38x2779x(b4[0],5x8x1369x(b4[0]))}}}9y((o0=c1[k9])3w(k9<c18x1909x)){0y(u5=o08x1369x(_[154])){a6=g0([5x],'>'+u5);8z(8y j7=0,j8=a68x1909x;m3=a6[j7];j70v){0y(!m38x3299x){0y(m38x2189x5w1)m38x3299x=3x;o08x2369x8x1759x(m3,o0)}}o08x2369x8x2599x(o0)}7z {k90v}}0y(o0=c1[0]){8z(j7=0;m3=5x8x869x[j7];j70v){0y(!m38x3299x){0y(m38x2189x5w1)m38x3299x=3x;o08x2369x8x1759x(m3,o0);j71v}}o08x2369x8x2599x(o0)}7y{9y(m0=o18x1309x)5x8x579x(o18x1309x)}3z(e)1wl58x2799x=5x;l58x2799x8x1399x=i2}7z {8z(8y m0=5x8x1309x;m0;m0=m08x2169x)0y(m08x2189x5w1)m08x3299x=3x;l58x2799x=2x}l58x739x=5x;l58x659x=e08x659x?e08x659x8x2489x:2x;5x8x889x8w(5x8x889x?' ':'')+_[324]+'-'+_[72]+'-'+e08x1529x;l58x29x=1w;0y(e08x29x)8z(8y s4 0z e08x29x)h8(l5,s4);0y(!5x8x3319x)5x8x3319x=2y f2;5x8x3319x[5x8x3319x8x1909x0v]=l5;0y(5y l58x3289x5w_[135])l58x3289x2w;0y(5y l58x3309x5w_[135])l58x3309x2w};e38x2489x8x2589x=9z(q9){0y(5y q97w_[291])4y 9;0y(!5x8x3319x)3y;q9=h9(q9,7x8x1969x8x1499x);8z(8y i=0,j=5x8x3319x8x1909x,l5;i<j;i0v){l5=5x8x3319x[i];0y(l58x969x8x1169x+'#'+l58x969x8x1529x5wq9)1z}0y(!l5)3y;0y(l58x29x)8z(8y s4 0z l58x29x)i3(l5,s4);0y(l58x2799x){6z l58x2799x}6z l58x739x;6z l58x659x;8z(;5x8x3319x[i];i0v)5x8x3319x[i]=5x8x3319x[i+1];6z 5x8x3319x[i];5x8x3319x8x1909x1v;0y(5y l58x3329x5w_[135])l58x3329x2w};e38x2489x8x1449x=9z(q9){0y(5y q97w_[291])4y 9;0y(5x8x3319x){q9=h9(q9,7x8x1969x8x1499x);8z(8y i=0,j=5x8x3319x8x1909x,l5;i<j;i0v){l5=5x8x3319x[i];0y(l58x969x8x1169x+'#'+l58x969x8x1529x5wq9)3y 3x}}3y 1x};9z g2(e0){8y o1,c1,o0,m3;o1=e08x2999x8x939x(3x);8y b0=o18x1409x(_[199]),m9,n0;0y(b08x1909x){m9=b0[0];0y(e08x659x3we08x659x8x2999x){n0=g2(e08x659x);c1=n08x1409x(_[290]);0y(c18x1909x3wm98x1309x){9y(m3=m98x1309x)c1[0]8x2369x8x579x(m98x1309x);c1[0]8x2369x8x2599x(c1[0])}9y(m3=n08x1309x)m98x2369x8x1759x(m3,m9)}7z 1wm98x2369x8x2599x(m9)}3y o1};9z i2(r6){0y(!5x8x19x)5x8x19x=1w;3y 5x8x19x[r6]4w(5x8x19x[r6]=(9z (n3){8z(8y m3=2x;n3;n3=n38x2169x){0y(n38x2189x5w13w!n38x3299x){0y(n38x1369x(_[326])5wr6)3y n3;0y(n38x1309x3w(m3=4x8x779x(n38x1309x)))3y m3}}3y m3})(5x8x1309x))};8y e2=9z2w{4y 9};e28x2489x8x689x=2x;e28x2489x8x1939x=9z(q9){0y(5y q97w_[291])4y 9;q9=h9(q9,7x8x1969x8x1499x);0y(!(q9 0z 5x8x689x)){8y m1=f38x1279x(q9)8x2669x;0y(m17w2x3wm18x1159x3wm18x1159x8x2959x5w_[237])m1=2x;5x8x689x[q9]=m1;0y(m1)f38x2469x(m1,q9);7z f38x2299x(\"B0zd0zg 7x '\"+q9+\"' is mall 8zmed\")}3y 5x8x689x[q9]};9z g3(n3){8z(8y t2 0z f38x2689x)8z(8y j7=0,a4=f38x2689x[t2],a6=g0([7x],t28x2619x(/\\\\:/g,'|')),j8=a68x1909x;j7<j8;j70v)8z(8y i9=0,j0=a48x1909x;i9<j0;i90v)e38x2489x8x529x8x769x(a6[j7],a4[i9])};9z g4(n3){8z(8y l5,e0;n3;n3=n38x2169x){0y(n38x2189x5w1){0y(n38x3319x 1y f2){9y(l5=n38x3319x[1vn38x3319x8x1909x]){e0=l58x969x;0y(l58x29x)8z(8y s4 0z l58x29x)i3(l5,s4);6z l58x659x;6z l58x739x;6z l58x2799x;n38x3319x[n38x3319x8x1909x]=2x}n38x3319x=2x}0y(n38x1309x)g4(n38x1309x)}}};8y p3=/([\\/2w[\\]?1w|*+-])/g,p7=/^('[^']*')|(\"[^\"]*\")$/;8y p4=/\\s*,\\s*/,p2=/^[^\\s>+~]/,p1=/([\\w-]+\\|?[\\w-]+)\\s*(\\W?=)?\\s*([^\\9x*)/,p8=/::|[\\s#.:>+~2w@\\[\\9x|[^\\s#.:>+~2w@\\[\\9x+/g,p9=/\\s*([\\s>+~(,]|^|$)\\s*/g,p5=/(\\[[^\\9x+\\])/g,p6=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;8y j2=0;9z g0(a8,t6,h3,c7){8y a1=a8,b7=0w,c0=t68x2619x(p9,'$1')8x2619x(p5,'@@$1')8x2619x(p6,'$1*$2')8x2849x(p4),b9,t4;8y i,j,u2,r2,q2,i1,a6,m3,c9,d0;8z(8y k7=0,k8=c08x1909x;k7<k8;k70v){t4=c0[k7];0y(p28x3009x(t4))t4=' '+t4;b9=t48x1979x(p8)4w0w;a8=a1;8z(8y j9=0,k1=b98x1909x;j9<k1;q2=''){a6=0w;u2=b9[j90v];r2=b9[j90v];0y(i1=l7[u2]){8y u1=r28x2619x('|',':');8z(i=0,j=a88x1909x;i<j;i0v)i1(a6,a8[i],u1,h3)}7z 0y(u25w'.'){8y q0=6x8x429x('(^|\\\\s)'+r2+'(\\\\s|$)');8z(i=0,j=a88x1909x;i<j;i0v)0y(q08x3009x(a8[i]8x889x))a68x2499x(a8[i])}7z 0y(u25w'#'){8y n3=7x8x1399x(r2);0y(n3)8z(i=0,j=a88x1909x;i<j;i0v)0y(a8[i]5wn3){a68x2499x(n3);1z}}7z 0y(u25w':'4wu25w'@'){c9=b9[j9]5w'(';d0=b9[j9]5w'[';0y(d04wc9){j90v;9y(b9[j90v]7w(c9?')':']')3wj9<k1)q28wb9[j9-1]}0y(u25w'@'){8y b1=q28x1979x(p1);0y(!b1[2]4w(i1=l6[b1[29x)){8y q4=b1[1]8x2619x('|',':'),q7=g1(b1[3])4w'',u5;8z(i=0,j=a88x1909x;i<j;i0v)0y((u5=f5(a8[i],q4,h3))3w(!b1[2]4wi1(u5,q7)))a68x2499x(a8[i])}7z f38x2299x(\"Unknown attribute selector '\"+b1[2]+\"'\")}7z 0y(u25w':'){0y(r25w_[221]){8y b5=g0([a8[0]8x2359x],q2,h3),d4;8z(i=0,j=a88x1909x;i<j;i0v){d4=1x;8z(8y n=0,m=b58x1909x;n<m3w!d4;n0v)0y(b5[n]5wa8[i])d4=3x;0y(!d4)a68x2499x(a8[i])}}7z {0y(i1=l8[r2]){8z(i=0,j=a88x1909x;i<j;i0v)0y(i1(a8[i],q2))a68x2499x(a8[i])}7z f38x2299x(\"Unknown pseudo-class selector '\"+r2+\"'\")}}}7z 0y(u25w'::')1w7z {f38x2299x(\"Unknown element selector '\"+u2+\"' 0z query '\"+t4+\"'\")}a8=a6}8z(i=0,j=a68x1909x;i<j;i0v){m3=a6[i];0y(m3.a227wj2){m3.a22=j2;b78x2499x(m3)}}}j20v;3y b7};9z f4(u5){3y u58x2619x(p3,'\\\\$1')};9z g1(t8){3y p78x3009x(t8)?t88x2819x(1,-1):t8};9z f6(n3,u1){8y c3=u18x2849x(':');0y(c38x1909x>13w7x8x2129x3w7x8x2129x[c3[09x){8y a6=0w;8z(8y i=0,c2=n38x1409x(c3[1]),j=c28x1909x;i<j;i0v)0y(c2[i]8x2699x5wc3[0])a68x2499x(c2[i]);3y a6}7z 3y u15w'*'3wn38x549x?n38x549x:n38x1409x(u1)};9z f8(m3){9y(m3=m38x2459x)0y(m38x2189x5w1)3y m3;3y 2x};9z f7(m3){9y(m3=m38x2169x)0y(m38x2189x5w1)3y m3;3y 2x};9z f9(m3,t1,h3){3y t15w'*'4wm38x2959x8x3119x2w5wt18x3119x2w};8y f5=7x8x2129x?9z(m3,t1,h3){3y t15w_[87]?m38x889x:t15w_[292]?m38x2929x8x1039x:m3[t1]}:9z(m3,t1,h3){3y m38x1369x(t1)};8y l7=1w,l6=1w,l8=1w;l7[' ']=9z(b7,m3,u1,h3){8z(8y n=0,c2=f6(m3,u1,h3),m=c28x1909x;n<m;n0v)b78x2499x(c2[n])};l7['>']=9z(b7,m3,u1,h3){8z(8y n=0,c2=m38x869x,m=c28x1909x;n<m;n0v)0y(c2[n]8x2189x5w13wf9(c2[n],u1,h3))b78x2499x(c2[n])};l7['+']=9z(b7,m3,u1,h3){0y((m3=f7(m3))3wf9(m3,u1,h3))b78x2499x(m3)};l7['~']=9z(b7,m3,u1,h3){9y(m3=f7(m3))0y(f9(m3,u1,h3))b78x2499x(m3)};l6['=']=9z(u5,q7){3y u55wq7};l6['~=']=9z(u5,q7){8y l9=4x8x779x8x19x4w(4x8x779x8x19x=1w),q0=l9[q7]4w(l9[q7]=6x8x429x('(^|)'+f4(q7)+'(|$)'));3y q08x3009x(u5)};l6['|=']=9z(u5,q7){8y l9=4x8x779x8x19x4w(4x8x779x8x19x=1w),q0=l9[q7]4w(l9[q7]=6x8x429x('^'+f4(q7)+'(-|$)'));3y q08x3009x(u5)};l6['^=']=9z(u5,q7){3y u58x1559x(q7)5w0};l6['$=']=9z(u5,q7){3y u58x1559x(q7)5wu58x1909x-q78x1909x};l6['*=']=9z(u5,q7){3y u58x1559x(q7)>-1};l88x1289x=9z(m3){3y f8(m3)5w2x};l88x1919x=9z(m3){3y m38x2959x8x3119x2w5w'a'3wm38x1369x(_[149])};l88x1879x=9z(m3,q1){8z(8y u5;m38x2189x7w9;m3=m38x2369x)0y(u5=(m38x1369x(_[187])4wm38x1369x(_[333]+':'+_[187])))3y u58x1559x(q1)5w0;3y 1x};l88x3219x=9z(m3){3y 1x};l88x519x=9z(m3){3y 1x};l88x1489x=9z(m3){3y 1x};l88x1329x=9z(m3){3y 1x};l88x979x=9z(m3,s8){3y (m38x3049x4wm38x1749x)8x1559x(g1(s8))>-1};l88x2679x=9z(m3){3y m35wm38x2359x8x1159x};l88x1199x=9z(m3){3y m38x1309x?1x:3x};l88x1889x=9z(m3){3y f7(m3)5w2x};l88x2229x=9z(m3,s8){3y 1x};l88x2239x=9z(m3,s8){3y 1x};l88x2259x=9z(m3,s8){3y 1x};l88x2249x=9z(m3,s8){3y 1x};l88x1299x=9z(m3){3y 1x};l88x1899x=9z(m3){3y 1x};l88x2309x=9z(m3){3y!f7(m3)3w!f8(m3)};l88x2319x=9z(m3){3y 1x};l88x2969x=9z(m3){3y m38x1529x5w6x8x1969x8x1469x8x2819x(1)};l88x1209x=9z(m3){3y m38x1139x5w=1x};l88x1139x=9z(m3){3y m38x1139x};l88x859x=9z(m3){3y m38x859x};8y f1=2y 6x8x339x;f18x2489x8x3289x=2y 6x8x339x;f18x2489x8x3309x=2y 6x8x339x;f18x2489x8x3329x=2y 6x8x339x;8y f2=2y 6x8x339x;f28x2489x8x1909x=0;f28x2489x8x1779x=9z(j9){0y(5y j95w_[226]3wj92v5x8x1909x)3y 5x[j9];7z 4y 1};8y p0=/\\s*([^}]+)\\s*{([^}]+)}/g,o7=/b0zd0zg:\\s*url\\s*\\(['\"\\s]*([^'\"]+)['\"\\s]*\\)/g,o8=/(\\/\\*.*?\\*\\/)/g,o9=/@namespace\\s+(\\w+)?\\s*\"([^\"]+)\";?/g;9z h7(u0){8y t2,b8,k3,k4,t9,c6,l0,l1;u0=u08x2619x(o8,'');u0=u08x2619x(o9,'');0y(b8=u08x1979x(p0)){8z(k3=0,k4=b88x1909x;k3<k4;k30v){0y(b8[k3]8x1979x(p0)){t2=6x8x429x.$1;t9=6x8x429x.$2;0y(c6=t98x1979x(o7)){0y(!f38x2689x[t2])f38x2689x[t2]=0w;8z(l0=0,l1=c68x1909x;l0<l1;l00v)0y(c6[l0]8x1979x(o7))f38x2689x[t2]8x2499x(6x8x429x.$1)}}}}};9z h62w{0y(!h68x1949x)h68x1949x=3x;7z 3y;8y r4=7x8x1969x8x1499x,r3,u3,a6,m3,i,j;8z(i=0,a6=7x8x1409x(_[292]),j=a68x1909x;i<j;i0v){m3=a6[i];0y(m38x1369x(_[317])5w_[302])h7(m38x3049x4wm38x1739x)}8z(i=0,a6=7x8x1409x(_[191]),j=a68x1909x;i<j;i0v){m3=a6[i];r3=m38x1369x(_[149]);u3=m38x1369x(_[317]);0y(u35w_[302]){0y(i4(r3,r4))h7(f38x1279x(r3)8x2659x)}7z 0y(u35w_[58]){0y(m38x1369x(_[254])5w_[67])e28x2489x8x1939x8x769x(7x,r3)}}g3(7x8x719x)};9z g6(s4){3y 9z 2w{3y _[135]+' '+s4+'2w'+' '+'{\\n\\t[native code]\\n}'}};9z h5(s4){3y 9z 2w{3y '['+s4+']'}};8y m8=7x8x1539x;0y(!m84w!m88x1459x(_[46],'2.0')){0y(7x8x1019x(_[114])8x539x){0y(6x8x2139x8x3199x8x1979x(/applewebkit/i))(9z 2w{0y(7x8x2539x5w_[194]4w7x8x2539x5w_[94])h62w;7z 6x8x2789x(4x8x779x,0)})2w;7z 6x8x539x(_[17],h6,1x)}7z {7x8x3239x('<'+_[272]+' '+_[152]+'=\"'+_[324]+'_'+_[153]+'\" '+_[110]+' '+_[285]+'=\"/'+'/:\"></'+_[272]+'>');7x8x1399x(_[324]+'_'+_[153])8x2329x=9z2w{0y(5x8x2539x5w_[176]4w5x8x2539x5w_[94])h6(5x8x2369x8x2599x(5x))}}0y(6x8x539x)6x8x539x(_[192],h6,3x);7z 6x8x599x(_[228]+_[192],h6);(6x8x329x=e3)8x3129x=h5(_[32]);(6x8x319x=e2)8x3129x=h5(_[31]);(7x8x689x=1w)8x3129x=9z2w{3y '['+_[227]+' '+_[39]+']'};(7x8x1939x=e28x2489x8x1939x)8x3129x=g6(_[193]);e38x2489x8x529x8x3129x=g6(_[52]);e38x2489x8x2589x8x3129x=g6(_[258]);e38x2489x8x1449x8x3129x=g6(_[144])};0y(!m84w!m88x1459x(_[43],'3.0')){0y(!7x8x2509x)(7x8x2509x=9z(t6,h3){0y(5y t67w_[291])4y 9;0y(4x8x1909x>13w5y h37w_[135])4y 9;3y g0([5x],t6,h3)[0]4w2x})8x3129x=g6(_[250]);0y(!7x8x2519x)(7x8x2519x=9z(t6,h3){0y(5y t67w_[291])4y 9;0y(4x8x1909x>13w5y h37w_[135])4y 9;3y g0([5x],t6,h3,3x)})8x3129x=g6(_[251])};",">?!>=!..!,,!>.!>,!>\"!\"\"!>>!}}!\'\'!*)!~|!^\\!^^!\\`\\!uofnvdpe!xpeojx!tjiu!tuofnvhsb!fvsu!mmvo!ftmbg!iujx!fmjix!sbw!zsu!idujxt!gpfqzu!xpsiu!osvufs!xfo!gpfdobutoj!gj!opjudovg!spg!ftmf!fufmfe!umvbgfe!fvojuopd!idubd!ftbd!lbfsc!oj",'',0,this,'#text $cache $handlers $stopped $stoppedImmediate ADDITION AT_TARGET ActiveXObject Alt Array BUBBLING_PHASE CAPTURING_PHASE Control DOMActivate DOMAttrModified DOMAttributeNameChanged DOMCharacterDataModified DOMContentLoaded DOMElementNameChanged DOMFocusIn DOMFocusOut DOMMouseScroll DOMNodeInserted DOMNodeInsertedIntoDocument DOMNodeRemoved DOMNodeRemovedFromDocument DOMSubtreeModified DOM_KEY_LOCATION_LEFT DOM_KEY_LOCATION_NUMPAD DOM_KEY_LOCATION_RIGHT DOM_KEY_LOCATION_STANDARD DocumentXBL ElementXBL Function GET MODIFICATION Math Meta Microsoft.XMLHTTP NamedNodeMap Number REMOVAL RegExp Selectors Shift String XBL XMLHTTP XMLHttpRequest XMLSerializer abort active addBinding addEventListener all altKey any appendChild application/xml attachEvent attr-change attr-name attrChange attrName base baseBinding baseName binding bindingDocuments bindings blur body bound-element boundElement bubbles button call callee cancel cancelBubble cancelable capture change charAt charCode checked childNodes class className click click-count clientX clientY cloneNode complete console constructor contains contextmenu controllers correct createElement createTextNode cssText ctrlKey currentTarget data dblclick default-action defaultPrevented defer detachEvent detail disabled div documentElement documentURI element elements empty enabled error event eventPhase extend extends factory fetch first-child first-of-type firstChild floor focus fromCharCode fromElement function getAttribute getAttributeNS getBinding getElementById getElementsByTagName getModifierState handler handlers hasBinding hasFeature hash head hover href http://www.w3.org/XML/1998/namespace http://www.w3.org/ns/xbl id implementation includes indexOf initCustomEvent initCustomEventNS initEvent initEventNS initKeyboardEvent initKeyboardEventNS initMouseEvent initMouseEventNS initMouseWheelEvent initMouseWheelEventNS initMutationEvent initMutationEventNS initTextEvent initTextEventNS initUIEvent initUIEventNS initkeyboardEvent innerHTML innerText insertBefore interactive item join key key-location keyCode keyIdentifier keyLocation keydown keypress keyup lang last-child last-of-type length link load loadBindingDocument loaded localName location match media menu message metaKey modifiers mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup mousewheel namespaceURI namespaces navigator new-value newValue nextSibling nodeName nodeType nodeValue none not nth-child nth-last-child nth-last-of-type nth-of-type number object on onerror only-child only-of-type onreadystatechange open option ownerDocument parentNode parsererror phase pop prefetch preserve prev-value prevValue preventDefault previousSibling process propagate prototype push querySelector querySelectorAll random readyState rel relatedNode relatedTarget removeAttribute removeBinding removeChild removeEventListener replace reset resize resources responseText responseXML root rules scopeName screenX screenY script scroll select send serializeToString setAttribute setTimeout shadowTree shiftKey slice space span split src srcElement stop stopImmediatePropagation stopPropagation strike string style submit table tagName target tbody td template test text text/css text/javascript textContent textInput tfoot th thead timeStamp toElement toLowerCase toString toUpperCase tr true trusted type unload userAgent view visited wheelDelta write xbl xbl-attr xbl-id xbl-pseudo xblBindingAttached xblChild xblEnteredDocument xblImplementations xblLeftDocument xml charCodeAt'.split(' '))
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/junius.kpf
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Komodo Project File - DO NOT EDIT -->
+<project id="4a557894-e3ea-497e-a93c-303e53a7f435" kpf_version="4" name="junius.kpf">
+<preference-set idref="4a557894-e3ea-497e-a93c-303e53a7f435">
+  <boolean id="import_live">1</boolean>
+</preference-set>
+</project>
new file mode 100644
new file mode 100644
--- /dev/null
+++ b/server/python/build/lib/junius/bootstrap.py
@@ -0,0 +1,5 @@
+#!/usr/bin/env python
+
+'''
+Setup the CouchDB server so that it is fully usable and what not.
+'''
new file mode 100644
--- /dev/null
+++ b/server/python/build/lib/junius/getmail.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+
+from gocept.imapapi.account import Account
+
+import junius.model as model
+
+'''
+Fetch new mail.
+'''
+
+class JuniusAccount(object):
+    def __init__(self, *args):
+        self.acct = Account(*args)
+    
+    def sync(self):
+        inbox = self.acct.folders['INBOX']
+        print 'Folder', inbox
+        for m in inbox.messages.values():
+            print m
+            self.grok_part(m, m.body)
+    
+    def grok_part(self, msg, part, depth=0):
+        ct = part['content_type']
+        if ct.startswith('multipart/'):
+            print '..' * depth, ct, part
+            for subpart in part.parts:
+                self.grok_part(msg, subpart, depth+1)
+        elif ct.startswith('text/'):
+            print '  ' * depth, ct, part
+        elif ct == 'message/rfc822':
+            print '  ' * depth, ct, part.headers
+        else:
+            print '00' * depth, ct, part
+
+if __name__ == '__main__':
+    import os
+    #acct = JuniusAccount('localhost', 8143, os.environ['USER'], 'pass')
+    acct = JuniusAccount('localhost', 10143, 'test', 'bsdf')
+    acct.sync()
new file mode 100644
--- /dev/null
+++ b/server/python/build/lib/junius/model.py
@@ -0,0 +1,51 @@
+from couchdb import schema
+
+class Account(schema.document):
+    kind = schema.TextField()
+    host = schema.TextField()
+    port = schema.IntegerField()
+    username = schema.TextField()
+    password = schema.TextField()
+    ssl = schema.BooleanField()
+
+class Contact(schema.Document):
+    name = schema.TextField()
+    identities = schema.ListField(Schema.build(
+        kind = schema.TextField(),
+        value = schema.TextField()
+    ))
+    #: expose contacts by their identities
+    by_identity = View('by_identity', '''\
+        function(doc) {
+            for each (var identity in doc.identities) {
+                emit([identity.kind, identity.value], doc);
+            }
+        }''')
+    #: expose all suffixes of the contact name and identity values
+    by_suffix = View('by_suffix', '''\
+        function(doc) {
+            var i;
+            for each (i = 0; i < doc.name.length; i++)
+                emit(doc.name.substring(i), doc._id);
+            for each (var identity in doc.identities) {
+                for each (i = 0; i < identity.value.length; i++) {}
+                    emit(identity.value.substring(i), doc._id);
+                }
+            }
+        }''')
+
+class Message(schema.Document):
+    from_contact_id = schema.TextField()
+    to_contact_ids = schema.ListField(schema.TextField())
+    cc_contact_ids = schema.ListField(schema.TextField())
+    
+    message_id = schema.TextField()
+    
+    conversation_id = schema.TextField()
+    
+    date = schema.DateTimeField()
+    ts = schema.IntegerField()
+
+    headers = schema.DictField(Schema.build())
+    parts = schema.ListField(Schema.build())
+    raw = schema.TextField()
new file mode 100644
new file mode 100644
--- /dev/null
+++ b/server/python/junius/bootstrap.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+
+'''
+Setup the CouchDB server so that it is fully usable and what not.
+'''
+
+import os, os.path, mimetypes, base64
+
+import junius.model as model
+
+
+
+def install_client_files(dbs):
+    '''
+    cram everyone in 'client' into the 'junius' app database
+    '''
+    # we cannot go in a zipped egg...
+    junius_root_dir = os.path.join(
+                          *os.path.split(os.path.abspath(model.__file__))[:-4])
+    client_dir = os.path.join(junius, 'client')
+    
+    attachments = {}
+    for filename in os.listdir(client_dir):
+        if os.path.isfile(filename):
+            f = open(os.path.join(client_dir, filename))
+            attachments[filename] = {
+                'content_type': mimetypes.guess_type(filename) or
+                                'application/octet',
+                'data': base64.b64encode(f.read())
+            }
+            f.close()
+    
+    dbs.junius['_design/files'] = {'_attachments': attachments}
+
+
+def main():
+    dbs = model.fab_db()
+    
+    install_client_files(dbs)
+    
+
+if __name__ == '__main__':
+    main()
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/server/python/junius/getmail.py
@@ -0,0 +1,223 @@
+#!/usr/bin/env python
+
+import base64, datetime, email.utils
+import pprint
+
+from gocept.imapapi.account import Account
+
+import junius.model as model
+
+'''
+Fetch new mail.
+'''
+
+class JuniusAccount(object):
+    def __init__(self, dbs, *args):
+        self.dbs = dbs
+        self.acct = Account(*args)
+        self.account_id = 'only'
+    
+    def sync(self):
+        inbox = self.acct.folders['INBOX']
+        print 'Folder', inbox
+        
+        for m in inbox.messages.values():
+            print m
+            self.grok_message(m)
+            
+    
+    def grok_email_addresses(self, *address_strings):
+        seen_contacts = {}
+        result_lists = []
+        involved_list = []
+        for address_string in address_strings:
+            cur_results = []
+            cur_addresses = email.utils.getaddresses((address_string,))
+            for name, address in cur_addresses:
+                # XXX TODO: we can use 'keys' instead of just key.
+                contacts = model.Contact.by_identity(self.dbs.contacts,
+                                                     key=['email', address])
+                print 'Contacts:'
+                pprint.pprint(contacts)
+                if len(contacts):
+                    # the contact exists, use it
+                    contact = list(contacts)[0]
+                    print 'Contact'
+                    pprint.pprint(contact)
+                    if contact.id in seen_contacts:
+                        contact = seen_contacts[contact.id]
+                    else:
+                        involved_list.append(contact)
+                        seen_contacts[contact.id] = contact
+                else:
+                    # the contact does't exist, create it
+                    if not name:
+                        name = address
+                    contact = model.Contact(
+                        name=name,
+                        identities=[{'kind': 'email', 'value': address}]
+                    )
+                    contact.store(self.dbs.contacts)
+                    involved_list.append(contact)
+                    seen_contacts[contact.id] = contact
+                cur_results.append(contact)
+            result_lists.append(cur_results)
+        result_lists.append(involved_list)
+        print '-- Result Lists:'
+        pprint.pprint(result_lists)
+        return result_lists
+    
+    def extract_message_id(self, message_id_string, acceptNonDelimitedReferences):
+        # this is a port of my fix for bug 466796, the comments should be ported
+        #  too if we keep this logic...
+        whitespaceEndedAt = None
+        firstMessageIdChar = None
+        foundLessThan = False
+        message_len = len(message_id_string)
+        i = 0
+        while i < message_len:
+            char = message_id_string[i]
+            # do nothing on whitespace
+            if char in r' \r\n\t':
+                pass
+            else:
+                if char == '<':
+                    i += 1 # skip over the '<'
+                    firstMessageIdChar = i
+                    foundLessThan = True
+                    break
+                if whitespaceEndedAt is None:
+                    whitespaceEndedAt = i
+            i += 1
+        
+        # if we hit a '<', keep going until we hit a '>' or the end
+        if foundLessThan:
+            while i < message_len:
+                char = message_id_string[i]
+                if char == '>':
+                    # it's valid, update reference, making sure to stop before the '>'
+                    return [message_id_string[firstMessageIdChar:i],
+                            message_id_string[i+1:]]
+                i += 1
+        
+        # if we are at the end of the string, we found some non-whitespace,
+        #  and the caller requested that we accept non-delimited whitespace,
+        #  give them that as their reference.  (otherwise, leave it empty)
+        if acceptNonDelimitedReferences and whitespaceEndedAt:
+            return [message_id_string[whitespaceEndedAt:], '']
+        return [None, '']
+    
+    def extract_message_ids(self, message_id_string):
+        references = []
+        while message_id_string:
+            ref, message_id_string = self.extract_message_id(message_id_string,
+                                                             not references)
+            if ref:
+                references.append(ref)
+        return references
+    
+    def grok_message_conversation(self, imsg):
+        refs_str = imsg.headers.get('References') or imsg.headers.get('In-Reply-To')
+        conversation_id = None
+        conversations = {}
+        if refs_str:
+            print 'References', refs_str
+            header_message_ids = self.extract_message_ids(refs_str)
+            unseen = set(header_message_ids)
+            
+            messages = model.Message.by_header_id(self.dbs.messages,
+                                                  keys=header_message_ids)
+            for message in messages:
+                conversation_id = message.conversation_id
+                print 'message', message_id, 'has conversation', conversation_id
+                unseen.remove(message.header_message_id)
+            
+        if conversation_id is None:
+            # we need to allocate a conversation_id...
+            print 'Headers:'
+            pprint.pprint(imsg.headers)
+            conversation_id = imsg.headers['Message-Id']
+            
+        # create dudes who are missing
+        if refs_str and unseen:
+            missing_messages = []
+            for header_message_id in unseen:
+                missing_messages.append(model.Message(
+                    conversation_id=conversation_id,
+                    header_message_id=header_message_id,
+                    ))
+            self.dbs.messages.update(missing_messages)
+        
+        return conversation_id
+    
+    def grok_message(self, imsg):
+        attachments = {}
+        bodyPart = self.grok_part(imsg, imsg.body, attachments)
+        
+        # XXX the gocept header logic unfortunately is case-sensitive...
+        # XXX also, doesn't support repeated values...
+        # (but we can live with these limitations for now)
+        
+        from_contacts, to_contacts, cc_contacts, involves_contacts = self.grok_email_addresses(
+            imsg.headers.get('From', ''), imsg.headers.get('To', ''),
+            imsg.headers.get('Cc', ''))
+        
+        conversation_id = self.grok_message_conversation(imsg)
+        
+        timestamp = email.utils.mktime_tz(email.utils.parsedate_tz(imsg.headers['Date']))
+        
+        
+        cmsg = model.Message(
+            account_id=self.account_id,
+            storage_path=imsg.parent.path,
+            storage_id=imsg.UID,
+            #
+            conversation_id=conversation_id,
+            header_message_id=imsg.headers.get('Message-Id'),
+            #
+            from_contact_id=from_contacts[0].id,
+            to_contact_ids=[c.id for c in to_contacts],
+            cc_contact_ids=[c.id for c in cc_contacts],
+            involves_contact_ids=[c.id for c in involves_contacts],
+            #
+            date=datetime.datetime.utcfromtimestamp(timestamp),
+            timestamp=timestamp,
+            #
+            read=r'\Seen' in imsg.flags,
+            #
+            headers=dict(imsg.headers),
+            bodyPart=bodyPart,
+            _attachments=attachments
+        )
+        
+        pprint.pprint(cmsg.unwrap())
+        cmsg.store(self.dbs.messages)
+        
+    
+    def grok_part(self, msg, part, attachments, depth=0):
+        contentType = part['content_type']
+        partNumber = part['partnumber']
+        me = {'contentType': contentType,
+              'partNumber': partNumber}
+        if contentType.startswith('multipart/'):
+            parts = me['parts'] = []
+            for subpart in part.parts:
+                parts.append(self.grok_part(msg, subpart, attachments, depth+1))
+        else:
+            me['parameters'] = part['parameters']
+            data = part.fetch()
+            # XXX perhaps we should recursively process the nested part dude?
+            # (if contentType == 'message/rfc822')
+            if contentType.startswith('text/'):
+                me['data'] = data
+            else:
+                attachments[partNumber] = {'content_type': contentType,
+                                           'data': base64.b64encode(data)}
+        return me
+
+if __name__ == '__main__':
+    import os
+    #acct = JuniusAccount('localhost', 8143, os.environ['USER'], 'pass')
+    dbs = model.fab_db()
+    acct = JuniusAccount(dbs, 'localhost', 10143, 'test', 'bsdf')
+    acct.sync()
new file mode 100644
--- /dev/null
+++ b/server/python/junius/model.py
@@ -0,0 +1,153 @@
+from couchdb import schema, design
+
+class WildField(schema.Field):
+    '''
+    Allows us to have dictionaries without schemas.
+    '''
+    def _to_python(self, value):
+        return value
+    
+    def _to_json(self, value):
+        return value
+
+class Account(schema.Document):
+    kind = schema.TextField()
+    host = schema.TextField()
+    port = schema.IntegerField()
+    username = schema.TextField()
+    password = schema.TextField()
+    ssl = schema.BooleanField()
+    
+    folderStatuses = WildField(default={})
+
+class Contact(schema.Document):
+    name = schema.TextField()
+    identities = schema.ListField(schema.DictField(schema.Schema.build(
+        kind = schema.TextField(),
+        value = schema.TextField()
+    )))
+    #: expose contacts by their identities
+    by_identity = schema.View('contacts', '''\
+        function(doc) {
+            for each (var identity in doc.identities) {
+                emit([identity.kind, identity.value], doc);
+            }
+        }''')
+    #: expose all suffixes of the contact name and identity values
+    by_suffix = schema.View('contact_ids', '''\
+        function(doc) {
+            var i;
+            for (i = 0; i < doc.name.length; i++)
+                emit(doc.name.substring(i), null);
+            for each (var identity in doc.identities) {
+                for (i = 0; i < identity.value.length; i++)
+                    emit(identity.value.substring(i), null);
+            }
+        }''')
+
+class Message(schema.Document):
+    account_id = schema.TextField()
+    storage_path = schema.TextField()
+    storage_id = schema.IntegerField()
+    
+    conversation_id = schema.TextField()
+    header_message_id = schema.TextField()
+    
+    # canonical contacts
+    from_contact_id = schema.TextField()
+    to_contact_ids = schema.ListField(schema.TextField())
+    cc_contact_ids = schema.ListField(schema.TextField())
+    # convenience contacts with enough semantics to not just map it (for now)
+    involves_contact_ids = schema.ListField(schema.TextField())
+    
+    date = schema.DateTimeField()
+    timestamp = schema.IntegerField()
+
+    # general attribute info...
+    read = schema.BooleanField()
+
+    headers = WildField()
+    bodyPart = WildField()
+    _attachments = WildField(default={})
+
+    # -- conversation views
+    conversation_info = schema.View('conversations', '''\
+        function(doc) {
+            if (doc.timestamp)
+                emit(doc.conversation_id,
+                     {oldest: doc.timestamp, newest: doc.timestamp, count: 1,
+                      involves: doc.involves_contact_ids});
+        }''', '''\
+        function(keys, values, rereduce) {
+            out = values[0];
+            out_involves = {};
+            function involve_fuse(l) {
+                for (var il = 0; il < l.length; il++)
+                    out_involves[l[il]] = true;
+            }
+            involve_fuse(out.involves);
+            for (var i = 1; i < values.length; i++) {
+                var cur = values[i];
+                if (cur.oldest < out.oldest)
+                    out.oldest = cur.oldest;
+                if (cur.newest > out.newest)
+                    out.newest = cur.newest;
+                out.count += cur.count;
+                involve_fuse(cur.involves);
+            }
+            out.involves = [];
+            for (var contact_id in out_involves)
+              out.involves.push(contact_id);
+            return out;
+        }''', group=True, group_level=1)
+
+    # -- message (id) views
+    by_header_id = schema.View('by_header_id', '''\
+        function(doc) {
+            emit(doc.header_message_id, null);
+        }''')    
+    
+    by_timestamp = schema.View('by_timestamp', '''\
+        function(doc) {
+            emit(doc.timestamp, null);
+        }''')    
+    
+    by_involves = schema.View('by_involves', '''\
+        function(doc) {
+            for each (var contact_id in doc.involves_contact_ids)
+                emit(contact_id, null);
+        }''')
+
+DATABASES = {
+    # the app database proper, no real data
+    'junius': None,
+    #
+    'accounts': Account,
+    'contacts': Contact,
+    'messages': Message,
+}
+
+class DBS(object):
+    pass
+
+def fab_db(update_views=False):
+    import couchdb
+    server = couchdb.Server('http://localhost:5984/')
+    
+    dbs = DBS()
+    
+    for db_name, doc_class in DATABASES.items():
+        if not db_name in server:
+            db = server.create(db_name)
+            update_views = True
+        else:
+            db = server[db_name]
+        
+        if update_views and doc_class:
+            views = [v for v in doc_class.__dict__.values() if isinstance(v, schema.View)]
+            if views:
+                design.ViewDefinition.sync_many(db, views)
+
+        setattr(dbs, db_name, db)
+
+    return dbs    
new file mode 100644
--- /dev/null
+++ b/server/python/setup.py
@@ -0,0 +1,18 @@
+from setuptools import setup, find_packages
+
+setup(
+    name = "junius",
+    version = "0.1a1",
+    packages = find_packages(),
+
+    install_requires = [
+                        ],
+
+    # PyPI meta
+    author = 'Andrew Sutherland',
+    author_email = 'asutherland@asutherland.org',
+    description = 'junius',
+    license = 'MPL/GPL/LGPL tri-license',
+    keywords = 'mail',
+    url = 'www.mozillamessaging.com',
+)